From 98ed88d525dab5e6c469666ad98b1387a33f7c4e Mon Sep 17 00:00:00 2001 From: ronny-mysten <118224482+ronny-mysten@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:50:24 -0600 Subject: [PATCH] [sdk docs] Added mermaid ref (#19528) ## Description Was unable to build site locally to test. Trying to get mermaid graph to render here: https://sdk.mystenlabs.com/typedoc/index.html ## Test plan https://sui-typescript-docs-7fcypvvd6-mysten-labs.vercel.app/typedoc/index.html --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- README.md | 2 +- pnpm-lock.yaml | 75 ++++++++++++++++++++++++++++++++----------- sdk/docs/package.json | 3 +- sdk/docs/typedoc.json | 3 +- 4 files changed, 62 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1323054a4f9f8..b203dfa32e418 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-Logo +Logo

# Welcome to Sui diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7000e60b8a4ee..aba62dbe38aec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -140,13 +140,13 @@ importers: devDependencies: '@headlessui/tailwindcss': specifier: ^0.1.3 - version: 0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3))) + version: 0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3))) '@tailwindcss/aspect-ratio': specifier: ^0.4.2 - version: 0.4.2(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3))) + version: 0.4.2(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3))) '@tailwindcss/forms': specifier: ^0.5.7 - version: 0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3))) + version: 0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3))) '@types/react': specifier: ^18.3.3 version: 18.3.3 @@ -613,7 +613,7 @@ importers: devDependencies: '@headlessui/tailwindcss': specifier: ^0.1.3 - version: 0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3))) + version: 0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3))) '@types/react': specifier: ^18.3.3 version: 18.3.3 @@ -725,7 +725,7 @@ importers: devDependencies: '@tailwindcss/forms': specifier: ^0.5.7 - version: 0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3))) + version: 0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3))) '@tsconfig/docusaurus': specifier: ^2.0.3 version: 2.0.3 @@ -817,7 +817,7 @@ importers: devDependencies: ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3) + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -924,7 +924,7 @@ importers: version: 5.16.2 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3) + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -1304,7 +1304,7 @@ importers: version: 0.2.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3) + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) ts-retry-promise: specifier: ^0.8.1 version: 0.8.1 @@ -1341,7 +1341,7 @@ importers: version: 0.2.3 ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3) + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) ts-retry-promise: specifier: ^0.8.1 version: 0.8.1 @@ -1411,6 +1411,9 @@ importers: react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) + typedoc-plugin-mermaid: + specifier: ^1.12.0 + version: 1.12.0(typedoc@0.26.3(typescript@5.5.3)) devDependencies: '@types/react': specifier: ^18.3.3 @@ -1614,7 +1617,7 @@ importers: version: link:../build-scripts ts-node: specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3) + version: 10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -1742,7 +1745,7 @@ importers: version: 5.5.3 typescript-json-schema: specifier: ^0.64.0 - version: 0.64.0(@swc/core@1.6.13(@swc/helpers@0.5.5)) + version: 0.64.0(@swc/core@1.6.13) sdk/zklogin: dependencies: @@ -9943,6 +9946,9 @@ packages: html-entities@2.5.2: resolution: {integrity: sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==} + html-escaper@3.0.3: + resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + html-minifier-terser@6.1.0: resolution: {integrity: sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==} engines: {node: '>=12'} @@ -13919,6 +13925,12 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + typedoc-plugin-mermaid@1.12.0: + resolution: {integrity: sha512-CRjw29j0YbQEh4ygG7xeGjq8zKUikgd1BBBrW3ttzTeCPLrNKZopWFPd1/leSb9dUEJ3p9exOO84aP4CgjYp3g==} + engines: {node: '>=16.0.0'} + peerDependencies: + typedoc: '>=0.23.0 || 0.24.x || 0.25.x || 0.26.x' + typedoc@0.26.3: resolution: {integrity: sha512-6d2Sw9disvvpdk4K7VNjKr5/3hzijtfQVHRthhDqJgnhMHy1wQz4yPMJVKXElvnZhFr0nkzo+GzjXDTRV5yLpg==} engines: {node: '>= 18'} @@ -17420,7 +17432,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - '@headlessui/tailwindcss@0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)))': + '@headlessui/tailwindcss@0.1.3(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3)))': dependencies: tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)) @@ -20425,11 +20437,11 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)))': + '@tailwindcss/aspect-ratio@0.4.2(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3)))': dependencies: tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)) - '@tailwindcss/forms@0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)))': + '@tailwindcss/forms@0.5.7(tailwindcss@3.4.4(ts-node@10.9.2(@types/node@20.14.10)(typescript@5.5.3)))': dependencies: mini-svg-data-uri: 1.4.4 tailwindcss: 3.4.4(ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3)) @@ -25148,6 +25160,8 @@ snapshots: html-entities@2.5.2: {} + html-escaper@3.0.3: {} + html-minifier-terser@6.1.0: dependencies: camel-case: 4.1.2 @@ -29486,7 +29500,27 @@ snapshots: ts-log@2.2.5: {} - ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@16.18.101)(typescript@5.1.6): + ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3): + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.14.10 + acorn: 8.12.1 + acorn-walk: 8.3.3 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.5.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + optionalDependencies: + '@swc/core': 1.6.13(@swc/helpers@0.5.5) + + ts-node@10.9.2(@swc/core@1.6.13)(@types/node@16.18.101)(typescript@5.1.6): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -29506,7 +29540,7 @@ snapshots: optionalDependencies: '@swc/core': 1.6.13(@swc/helpers@0.5.5) - ts-node@10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@20.14.10)(typescript@5.5.3): + ts-node@10.9.2(@swc/core@1.6.13)(@types/node@20.14.10)(typescript@5.5.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -29675,6 +29709,11 @@ snapshots: typedarray@0.0.6: {} + typedoc-plugin-mermaid@1.12.0(typedoc@0.26.3(typescript@5.5.3)): + dependencies: + html-escaper: 3.0.3 + typedoc: 0.26.3(typescript@5.5.3) + typedoc@0.26.3(typescript@5.5.3): dependencies: lunr: 2.3.9 @@ -29684,14 +29723,14 @@ snapshots: typescript: 5.5.3 yaml: 2.4.5 - typescript-json-schema@0.64.0(@swc/core@1.6.13(@swc/helpers@0.5.5)): + typescript-json-schema@0.64.0(@swc/core@1.6.13): dependencies: '@types/json-schema': 7.0.15 '@types/node': 16.18.101 glob: 7.2.3 path-equal: 1.2.5 safe-stable-stringify: 2.4.3 - ts-node: 10.9.2(@swc/core@1.6.13(@swc/helpers@0.5.5))(@types/node@16.18.101)(typescript@5.1.6) + ts-node: 10.9.2(@swc/core@1.6.13)(@types/node@16.18.101)(typescript@5.1.6) typescript: 5.1.6 yargs: 17.7.2 transitivePeerDependencies: diff --git a/sdk/docs/package.json b/sdk/docs/package.json index cbc1306e9264a..7bf683235eb86 100644 --- a/sdk/docs/package.json +++ b/sdk/docs/package.json @@ -39,7 +39,8 @@ "nextra": "^2.13.4", "nextra-theme-docs": "^2.13.4", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "typedoc-plugin-mermaid": "^1.12.0" }, "devDependencies": { "@types/react": "^18.3.3", diff --git a/sdk/docs/typedoc.json b/sdk/docs/typedoc.json index edf0f934b0299..1a2a7e3ff1610 100644 --- a/sdk/docs/typedoc.json +++ b/sdk/docs/typedoc.json @@ -15,5 +15,6 @@ "excludePrivate": true, "intentionallyNotExported": [], "out": "public/typedoc", - "entryPointStrategy": "packages" + "entryPointStrategy": "packages", + "plugin": ["typedoc-plugin-mermaid"] }