zudoku 0.3.0-dev.5 → 0.3.0-dev.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/App.d.ts +1 -2
- package/dist/app/App.js +1 -28
- package/dist/app/App.js.map +1 -1
- package/dist/app/demo.d.ts +2 -0
- package/dist/app/demo.js +27 -0
- package/dist/app/demo.js.map +1 -0
- package/dist/app/entry.client.d.ts +2 -0
- package/dist/app/entry.client.js +35 -0
- package/dist/app/entry.client.js.map +1 -0
- package/dist/app/entry.server.d.ts +12 -0
- package/dist/app/entry.server.js +104 -0
- package/dist/app/entry.server.js.map +1 -0
- package/dist/app/main.d.ts +6 -1
- package/dist/app/main.js +54 -12
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.d.ts +2 -0
- package/dist/app/standalone.js +32 -0
- package/dist/app/standalone.js.map +1 -0
- package/dist/app/tailwind.d.ts +1 -1
- package/dist/app/tailwind.js +0 -4
- package/dist/app/tailwind.js.map +1 -1
- package/dist/app/zudoku-manifest.d.ts +1 -0
- package/dist/app/zudoku-manifest.js +20 -0
- package/dist/app/zudoku-manifest.js.map +1 -0
- package/dist/cli/cmds/dev.js +5 -0
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/dev/handler.d.ts +1 -0
- package/dist/cli/dev/handler.js +3 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +5 -39
- package/dist/config/validators/validate.d.ts +799 -2
- package/dist/config/validators/validate.js +134 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/internal.d.ts +1 -0
- package/dist/internal.js +2 -0
- package/dist/internal.js.map +1 -0
- package/dist/lib/authentication/Callback.js +1 -1
- package/dist/lib/authentication/Callback.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -2
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -0
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +2 -0
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +1 -0
- package/dist/lib/authentication/state.js +1 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +12 -0
- package/dist/lib/components/Bootstrap.js +9 -0
- package/dist/lib/components/Bootstrap.js.map +1 -0
- package/dist/lib/components/DevPortal.d.ts +4 -19
- package/dist/lib/components/DevPortal.js +17 -12
- package/dist/lib/components/DevPortal.js.map +1 -1
- package/dist/lib/components/ErrorPage.d.ts +6 -0
- package/dist/lib/components/ErrorPage.js +9 -0
- package/dist/lib/components/ErrorPage.js.map +1 -0
- package/dist/lib/components/Header.js +3 -3
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +9 -4
- package/dist/lib/components/Heading.js +17 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.d.ts +5 -0
- package/dist/lib/components/InlineCode.js +4 -0
- package/dist/lib/components/InlineCode.js.map +1 -0
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/NotFoundPage.d.ts +1 -0
- package/dist/lib/components/NotFoundPage.js +12 -0
- package/dist/lib/components/NotFoundPage.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
- package/dist/lib/components/SyntaxHighlight.js +21 -19
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +4 -0
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
- package/dist/lib/components/context/DevPortalProvider.js +2 -2
- package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +28 -3
- package/dist/lib/components/index.js +17 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +36 -11
- package/dist/lib/core/DevPortalContext.js +11 -12
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +7 -4
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +3 -0
- package/dist/lib/errors/ErrorAlert.js +8 -0
- package/dist/lib/errors/ErrorAlert.js.map +1 -0
- package/dist/lib/errors/RouterError.d.ts +1 -0
- package/dist/lib/errors/RouterError.js +12 -0
- package/dist/lib/errors/RouterError.js.map +1 -0
- package/dist/lib/errors/ServerError.d.ts +3 -0
- package/dist/lib/errors/ServerError.js +6 -0
- package/dist/lib/errors/ServerError.js.map +1 -0
- package/dist/lib/errors/TopLevelError.d.ts +2 -0
- package/dist/lib/errors/TopLevelError.js +7 -0
- package/dist/lib/errors/TopLevelError.js.map +1 -0
- package/dist/lib/oas/graphql/index.js +1 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -1
- package/dist/lib/oas/parser/index.js +38 -12
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +4 -0
- package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +4 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +39 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
- package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +2 -3
- package/dist/lib/plugins/{api-key → api-keys}/index.js +15 -4
- package/dist/lib/plugins/api-keys/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
- package/dist/lib/plugins/markdown/MdxPage.js +7 -6
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/Toc.js +1 -1
- package/dist/lib/plugins/markdown/Toc.js.map +1 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
- package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +4 -1
- package/dist/lib/plugins/markdown/index.js +3 -7
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +16 -5
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +1 -1
- package/dist/lib/plugins/openapi/{MakeRequest.js → PlaygroundDialogWrapper.js} +5 -5
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +1 -9
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +6 -0
- package/dist/lib/plugins/openapi/Route.js +8 -0
- package/dist/lib/plugins/openapi/Route.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListView.js +6 -27
- package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +16 -0
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +10 -8
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
- package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/createServer.js +30 -0
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
- package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
- package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
- package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
- package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
- package/dist/lib/plugins/openapi/context.d.ts +5 -0
- package/dist/lib/plugins/openapi/context.js +11 -0
- package/dist/lib/plugins/openapi/context.js.map +1 -0
- package/dist/lib/plugins/openapi/index.d.ts +4 -18
- package/dist/lib/plugins/openapi/index.js +35 -20
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
- package/dist/lib/plugins/openapi/interfaces.js +2 -0
- package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +2 -3
- package/dist/lib/plugins/openapi/playground/Headers.js +16 -6
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +4 -3
- package/dist/lib/plugins/openapi/playground/Playground.js +8 -12
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +10 -0
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +2 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/prose.js +4 -0
- package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
- package/dist/lib/plugins/openapi-worker.d.ts +1 -1
- package/dist/lib/plugins/openapi-worker.js +1 -1
- package/dist/lib/plugins/openapi-worker.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +0 -1
- package/dist/lib/plugins/redirect/index.js +3 -4
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Callout.js +2 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/button-variants.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -2
- package/dist/lib/util/MdxComponents.js +6 -4
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/groupBy.d.ts +1 -6
- package/dist/lib/util/groupBy.js +10 -8
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/logInit.d.ts +1 -0
- package/dist/lib/util/logInit.js +9 -0
- package/dist/lib/util/logInit.js.map +1 -0
- package/dist/lib/util/objectEntries.d.ts +4 -0
- package/dist/lib/util/objectEntries.js +2 -0
- package/dist/lib/util/objectEntries.js.map +1 -0
- package/dist/lib/util/renderIf.d.ts +1 -0
- package/dist/lib/util/renderIf.js +2 -0
- package/dist/lib/util/renderIf.js.map +1 -0
- package/dist/vite/build.js +26 -6
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +13 -12
- package/dist/vite/config.js +100 -55
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +7 -4
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.d.ts +2 -1
- package/dist/vite/dev-server.js +43 -15
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +18 -5
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.js +7 -8
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +9 -20
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +5 -6
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.js +4 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +0 -2
- package/dist/vite/plugin-config.js +2 -13
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +6 -0
- package/dist/vite/plugin-custom-css.js +55 -0
- package/dist/vite/plugin-custom-css.js.map +1 -0
- package/dist/vite/plugin-docs.js +15 -5
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-docs.test.js +1 -1
- package/dist/vite/plugin-docs.test.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +3 -1
- package/dist/vite/plugin-mdx.js +5 -5
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.js +1 -1
- package/dist/vite/plugin-metadata.js.map +1 -1
- package/dist/vite/plugin-redirect.js +10 -10
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin.js +3 -5
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +17 -0
- package/dist/vite/prerender.js +55 -0
- package/dist/vite/prerender.js.map +1 -0
- package/lib/AnchorLink-CZUp-F0P.js +705 -0
- package/lib/AnchorLink-CZUp-F0P.js.map +1 -0
- package/lib/DevPortalProvider-Do9oJqme.js +1081 -0
- package/lib/DevPortalProvider-Do9oJqme.js.map +1 -0
- package/lib/Markdown-Dbzrtopg.js +15030 -0
- package/lib/Markdown-Dbzrtopg.js.map +1 -0
- package/lib/MdxPage-JvboTsbK.js +190 -0
- package/lib/MdxPage-JvboTsbK.js.map +1 -0
- package/lib/OperationList-DGdaixGa.js +5562 -0
- package/lib/OperationList-DGdaixGa.js.map +1 -0
- package/lib/Route-C1LyvITr.js +13 -0
- package/lib/Route-C1LyvITr.js.map +1 -0
- package/lib/Select-DHm1jDdS.js +4571 -0
- package/lib/Select-DHm1jDdS.js.map +1 -0
- package/lib/Spinner-BSk0ImmP.js +182 -0
- package/lib/Spinner-BSk0ImmP.js.map +1 -0
- package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
- package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
- package/lib/assets/index-BPdJm2ty.js +1 -0
- package/lib/assets/index-BPdJm2ty.js.map +1 -0
- package/lib/assets/{worker-BCcpCNJ7.js → worker-BjPv-hjP.js} +10742 -10318
- package/lib/assets/worker-BjPv-hjP.js.map +1 -0
- package/lib/context-_fYfJFgk.js +14 -0
- package/lib/context-_fYfJFgk.js.map +1 -0
- package/lib/hook-CGFJQf_n.js +77 -0
- package/lib/hook-CGFJQf_n.js.map +1 -0
- package/lib/index-CXXn0D4E.js +412 -0
- package/lib/index-CXXn0D4E.js.map +1 -0
- package/lib/index-DSZ4Cj5q.js +725 -0
- package/lib/index-DSZ4Cj5q.js.map +1 -0
- package/lib/index-pI9JkN46.js +4765 -0
- package/lib/index-pI9JkN46.js.map +1 -0
- package/lib/jsx-runtime-CJZJivg2.js +1526 -0
- package/lib/jsx-runtime-CJZJivg2.js.map +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js +1 -0
- package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
- package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
- package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
- package/lib/prism-java.min-d5iT_mOd.js +1 -0
- package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
- package/lib/prism-json.min-B1GJqK1k.js +1 -0
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
- package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
- package/lib/prism-php.min-o7FpoMP_.js +1 -0
- package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
- package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
- package/lib/router-CBw2vqJE.js +2973 -0
- package/lib/router-CBw2vqJE.js.map +1 -0
- package/lib/slugify-CiPVjteN.js +28 -0
- package/lib/slugify-CiPVjteN.js.map +1 -0
- package/lib/state-DKdaQzvh.js +288 -0
- package/lib/state-DKdaQzvh.js.map +1 -0
- package/lib/urql-DMlBWUKL.js +1 -0
- package/lib/urql-DMlBWUKL.js.map +1 -0
- package/lib/util-_jwUlTBU.js +41 -0
- package/lib/util-_jwUlTBU.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +3 -1
- package/lib/zudoku.auth-auth0.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +11 -8
- package/lib/zudoku.auth-clerk.js.map +1 -0
- package/lib/zudoku.auth-openid.js +8 -4
- package/lib/zudoku.auth-openid.js.map +1 -0
- package/lib/zudoku.components.js +806 -451
- package/lib/zudoku.components.js.map +1 -0
- package/lib/zudoku.openapi-worker.js +15032 -146
- package/lib/zudoku.openapi-worker.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +302 -0
- package/lib/zudoku.plugin-api-keys.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +49 -0
- package/lib/zudoku.plugin-markdown.js.map +1 -0
- package/lib/zudoku.plugin-openapi.js +10 -0
- package/lib/zudoku.plugin-openapi.js.map +1 -0
- package/lib/zudoku.plugin-redirect.js +11 -0
- package/lib/zudoku.plugin-redirect.js.map +1 -0
- package/package.json +37 -15
- package/src/app/App.tsx +0 -40
- package/src/app/demo-cdn.html +26 -0
- package/src/app/demo.html +18 -0
- package/src/app/demo.tsx +40 -0
- package/src/app/entry.client.tsx +47 -0
- package/src/app/entry.server.tsx +158 -0
- package/src/app/main.css +74 -0
- package/src/app/main.tsx +71 -15
- package/src/app/standalone.html +20 -0
- package/src/app/standalone.tsx +46 -0
- package/src/app/tailwind.ts +2 -6
- package/src/app/zudoku-manifest.ts +22 -0
- package/src/lib/authentication/Callback.tsx +1 -1
- package/src/lib/authentication/authentication.ts +2 -5
- package/src/lib/authentication/hook.ts +1 -0
- package/src/lib/authentication/providers/auth0.tsx +1 -0
- package/src/lib/authentication/providers/clerk.tsx +3 -0
- package/src/lib/authentication/providers/openid.tsx +3 -1
- package/src/lib/authentication/state.ts +2 -0
- package/src/lib/components/Bootstrap.tsx +37 -0
- package/src/lib/components/DevPortal.tsx +41 -56
- package/src/lib/components/ErrorPage.tsx +28 -0
- package/src/lib/components/Header.tsx +13 -7
- package/src/lib/components/Heading.tsx +26 -7
- package/src/lib/components/InlineCode.tsx +19 -0
- package/src/lib/components/Layout.tsx +9 -7
- package/src/lib/components/NotFoundPage.tsx +39 -0
- package/src/lib/components/SyntaxHighlight.tsx +27 -19
- package/src/lib/components/TopNavigation.tsx +5 -0
- package/src/lib/components/context/DevPortalProvider.ts +2 -2
- package/src/lib/components/index.ts +21 -3
- package/src/lib/core/DevPortalContext.ts +47 -28
- package/src/lib/core/plugins.ts +10 -5
- package/src/lib/errors/ErrorAlert.tsx +21 -0
- package/src/lib/errors/RouterError.tsx +13 -0
- package/src/lib/errors/ServerError.tsx +5 -0
- package/src/lib/errors/TopLevelError.tsx +8 -0
- package/src/lib/oas/graphql/index.ts +2 -2
- package/src/lib/oas/parser/index.ts +41 -20
- package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -8
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +139 -0
- package/src/lib/plugins/{api-key → api-keys}/index.tsx +22 -9
- package/src/lib/plugins/markdown/MdxPage.tsx +51 -34
- package/src/lib/plugins/markdown/Toc.tsx +1 -1
- package/src/lib/plugins/markdown/generateRoutes.tsx +16 -6
- package/src/lib/plugins/markdown/index.tsx +10 -7
- package/src/lib/plugins/openapi/OperationList.tsx +40 -4
- package/src/lib/plugins/openapi/OperationListItem.tsx +69 -42
- package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
- package/src/lib/plugins/openapi/{MakeRequest.tsx → PlaygroundDialogWrapper.tsx} +4 -4
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -16
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -1
- package/src/lib/plugins/openapi/Route.tsx +21 -0
- package/src/lib/plugins/openapi/SchemaListView.tsx +23 -192
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +110 -0
- package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +15 -10
- package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
- package/src/lib/plugins/openapi/client/createServer.ts +33 -0
- package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
- package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
- package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
- package/src/lib/plugins/openapi/context.tsx +16 -0
- package/src/lib/plugins/openapi/index.tsx +59 -52
- package/src/lib/plugins/openapi/interfaces.ts +9 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +60 -33
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +158 -193
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +34 -0
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +7 -2
- package/src/lib/plugins/openapi/playground/createUrl.ts +1 -1
- package/src/lib/plugins/openapi/util/prose.ts +7 -0
- package/src/lib/plugins/openapi-worker.ts +1 -1
- package/src/lib/plugins/redirect/index.tsx +3 -4
- package/src/lib/ui/Callout.tsx +4 -4
- package/src/lib/util/MdxComponents.tsx +6 -14
- package/src/lib/util/groupBy.ts +7 -12
- package/src/lib/util/logInit.ts +9 -0
- package/src/lib/util/objectEntries.ts +5 -0
- package/src/lib/util/renderIf.ts +4 -0
- package/dist/lib/components/Link.d.ts +0 -1
- package/dist/lib/components/Link.js +0 -2
- package/dist/lib/components/Link.js.map +0 -1
- package/dist/lib/components/Router.d.ts +0 -4
- package/dist/lib/components/Router.js +0 -20
- package/dist/lib/components/Router.js.map +0 -1
- package/dist/lib/core/helmet.d.ts +0 -4
- package/dist/lib/core/helmet.js +0 -5
- package/dist/lib/core/helmet.js.map +0 -1
- package/dist/lib/core/icons.d.ts +0 -1
- package/dist/lib/core/icons.js +0 -2
- package/dist/lib/core/icons.js.map +0 -1
- package/dist/lib/core/router.d.ts +0 -1
- package/dist/lib/core/router.js +0 -2
- package/dist/lib/core/router.js.map +0 -1
- package/dist/lib/plugins/api-key/CreateApiKey.d.ts +0 -5
- package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
- package/dist/lib/plugins/api-key/SettingsApiKeys.d.ts +0 -5
- package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -37
- package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
- package/dist/lib/plugins/api-key/index.js.map +0 -1
- package/dist/lib/plugins/index.d.ts +0 -4
- package/dist/lib/plugins/index.js +0 -5
- package/dist/lib/plugins/index.js.map +0 -1
- package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
- package/dist/lib/plugins/openapi/Select.js +0 -5
- package/dist/lib/plugins/openapi/Select.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
- package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
- package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
- package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
- package/dist/vite/common.d.ts +0 -1
- package/dist/vite/common.js +0 -5
- package/dist/vite/common.js.map +0 -1
- package/dist/vite/plugin-html.d.ts +0 -3
- package/dist/vite/plugin-html.js +0 -47
- package/dist/vite/plugin-html.js.map +0 -1
- package/dist/vite/plugin-openapi-worker.d.ts +0 -4
- package/dist/vite/plugin-openapi-worker.js +0 -28
- package/dist/vite/plugin-openapi-worker.js.map +0 -1
- package/lib/Spinner-DWHrSHMP.js +0 -8411
- package/lib/clerk-Wslx_mPo.js +0 -19685
- package/lib/index-DNx3xWa2.js +0 -3461
- package/lib/state-DfftBQ9X.js +0 -312
- package/lib/zudoku.plugins.js +0 -19873
- package/src/lib/components/Link.tsx +0 -1
- package/src/lib/components/Router.tsx +0 -28
- package/src/lib/core/helmet.ts +0 -5
- package/src/lib/core/icons.tsx +0 -1
- package/src/lib/core/router.tsx +0 -1
- package/src/lib/plugins/api-key/SettingsApiKeys.tsx +0 -122
- package/src/lib/plugins/index.ts +0 -4
- package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
- /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type HelmetData, HelmetProvider } from "@zudoku/react-helmet-async";
|
|
2
|
+
import { StrictMode } from "react";
|
|
3
|
+
import { createBrowserRouter, RouterProvider } from "react-router-dom";
|
|
4
|
+
import {
|
|
5
|
+
type StaticHandlerContext,
|
|
6
|
+
StaticRouterProvider,
|
|
7
|
+
} from "react-router-dom/server.js";
|
|
8
|
+
|
|
9
|
+
const Bootstrap = ({
|
|
10
|
+
router,
|
|
11
|
+
}: {
|
|
12
|
+
router: ReturnType<typeof createBrowserRouter>;
|
|
13
|
+
}) => (
|
|
14
|
+
<StrictMode>
|
|
15
|
+
<HelmetProvider>
|
|
16
|
+
<RouterProvider router={router} />
|
|
17
|
+
</HelmetProvider>
|
|
18
|
+
</StrictMode>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const BootstrapStatic = ({
|
|
22
|
+
router,
|
|
23
|
+
context,
|
|
24
|
+
helmetContext,
|
|
25
|
+
}: {
|
|
26
|
+
helmetContext: HelmetData["context"];
|
|
27
|
+
context: StaticHandlerContext;
|
|
28
|
+
router: ReturnType<typeof createBrowserRouter>;
|
|
29
|
+
}) => (
|
|
30
|
+
<StrictMode>
|
|
31
|
+
<HelmetProvider context={helmetContext}>
|
|
32
|
+
<StaticRouterProvider router={router} context={context} />
|
|
33
|
+
</HelmetProvider>
|
|
34
|
+
</StrictMode>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export { Bootstrap, BootstrapStatic };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/* eslint-disable react/destructuring-assignment */
|
|
2
1
|
import { MDXProvider } from "@mdx-js/react";
|
|
3
2
|
import { QueryClientProvider } from "@tanstack/react-query";
|
|
4
|
-
import {
|
|
3
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
4
|
+
import {
|
|
5
|
+
Fragment,
|
|
6
|
+
memo,
|
|
7
|
+
type PropsWithChildren,
|
|
8
|
+
useEffect,
|
|
9
|
+
useMemo,
|
|
10
|
+
} from "react";
|
|
11
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
5
12
|
import {
|
|
6
13
|
DevPortalContext,
|
|
7
14
|
queryClient,
|
|
8
|
-
|
|
15
|
+
ZudokuContextOptions,
|
|
9
16
|
} from "../core/DevPortalContext.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
import { AuthenticationProvider } from "../authentication/authentication.js";
|
|
14
|
-
import {
|
|
15
|
-
MdxComponents,
|
|
16
|
-
type MdxComponentsType,
|
|
17
|
-
} from "../util/MdxComponents.js";
|
|
17
|
+
import { hasHead } from "../core/plugins.js";
|
|
18
|
+
import { TopLevelError } from "../errors/TopLevelError.js";
|
|
19
|
+
import { MdxComponents } from "../util/MdxComponents.js";
|
|
18
20
|
import {
|
|
19
21
|
ComponentsProvider,
|
|
20
22
|
DEFAULT_COMPONENTS,
|
|
21
|
-
type ComponentsContextType,
|
|
22
23
|
} from "./context/ComponentsContext.js";
|
|
23
24
|
import { DevPortalProvider } from "./context/DevPortalProvider.js";
|
|
24
25
|
import { ThemeProvider } from "./context/ThemeContext.js";
|
|
25
26
|
import { ViewportAnchorProvider } from "./context/ViewportAnchorContext.js";
|
|
26
|
-
import { Router } from "./Router.js";
|
|
27
27
|
|
|
28
28
|
export const DevPortalSystemPaths = {
|
|
29
29
|
Settings: "/settings",
|
|
@@ -33,22 +33,10 @@ export type DevPortalPath =
|
|
|
33
33
|
| string
|
|
34
34
|
| (typeof DevPortalSystemPaths)[keyof typeof DevPortalSystemPaths];
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
description: string;
|
|
41
|
-
logo: string;
|
|
42
|
-
favicon: string;
|
|
43
|
-
}>;
|
|
44
|
-
authentication?: AuthenticationProvider;
|
|
45
|
-
navigation: NavigationItem[];
|
|
46
|
-
plugins?: DevPortalPlugin[];
|
|
47
|
-
mdxComponents?: MdxComponentsType;
|
|
48
|
-
overrides?: ComponentsContextType;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const DevPortalInner = (props: DevPortalProps) => {
|
|
36
|
+
const DevPortalInner = ({
|
|
37
|
+
children,
|
|
38
|
+
...props
|
|
39
|
+
}: PropsWithChildren<ZudokuContextOptions>) => {
|
|
52
40
|
const components = useMemo(
|
|
53
41
|
() => ({ ...DEFAULT_COMPONENTS, ...props.overrides }),
|
|
54
42
|
[props.overrides],
|
|
@@ -65,39 +53,36 @@ const DevPortalInner = (props: DevPortalProps) => {
|
|
|
65
53
|
void devPortalContext.initialize();
|
|
66
54
|
}, [devPortalContext]);
|
|
67
55
|
|
|
56
|
+
const heads = props.plugins
|
|
57
|
+
?.filter(hasHead)
|
|
58
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
59
|
+
.map((plugin, i) => <Fragment key={i}>{plugin.getHead?.()}</Fragment>);
|
|
60
|
+
|
|
68
61
|
return (
|
|
69
62
|
<QueryClientProvider client={queryClient}>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</div>
|
|
81
|
-
}
|
|
82
|
-
>
|
|
83
|
-
<Router
|
|
84
|
-
plugins={[
|
|
85
|
-
...(props.plugins ?? []),
|
|
86
|
-
...(props.authentication ? [props.authentication] : []),
|
|
87
|
-
]}
|
|
88
|
-
/>
|
|
89
|
-
</Suspense>
|
|
90
|
-
</ViewportAnchorProvider>
|
|
91
|
-
</ComponentsProvider>
|
|
92
|
-
</ThemeProvider>
|
|
93
|
-
</MDXProvider>
|
|
94
|
-
</DevPortalProvider>
|
|
95
|
-
</HelmetProvider>
|
|
63
|
+
<Helmet>{heads}</Helmet>
|
|
64
|
+
<DevPortalProvider value={devPortalContext}>
|
|
65
|
+
<MDXProvider components={mdxComponents}>
|
|
66
|
+
<ThemeProvider>
|
|
67
|
+
<ComponentsProvider value={components}>
|
|
68
|
+
<ViewportAnchorProvider>{children}</ViewportAnchorProvider>
|
|
69
|
+
</ComponentsProvider>
|
|
70
|
+
</ThemeProvider>
|
|
71
|
+
</MDXProvider>
|
|
72
|
+
</DevPortalProvider>
|
|
96
73
|
</QueryClientProvider>
|
|
97
74
|
);
|
|
98
75
|
};
|
|
99
76
|
|
|
100
|
-
const
|
|
77
|
+
const Inner = memo(DevPortalInner);
|
|
78
|
+
|
|
79
|
+
const DevPortal = (props: ZudokuContextOptions) => {
|
|
80
|
+
return (
|
|
81
|
+
<ErrorBoundary FallbackComponent={TopLevelError}>
|
|
82
|
+
<Inner {...props} />
|
|
83
|
+
</ErrorBoundary>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
101
86
|
DevPortal.displayName = "DevPortal";
|
|
102
87
|
|
|
103
88
|
export { DevPortal };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { Link } from "react-router-dom";
|
|
3
|
+
import { CategoryHeading } from "./CategoryHeading.js";
|
|
4
|
+
import { Heading } from "./Heading.js";
|
|
5
|
+
import { ProseClasses } from "./Markdown.js";
|
|
6
|
+
|
|
7
|
+
export const ErrorPage = ({
|
|
8
|
+
title = "An error occurred",
|
|
9
|
+
message,
|
|
10
|
+
category,
|
|
11
|
+
}: {
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
message?: ReactNode;
|
|
14
|
+
category?: ReactNode;
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
<div className={ProseClasses + " h-full pt-[--padding-content-top]"}>
|
|
18
|
+
{category && <CategoryHeading>{category}</CategoryHeading>}
|
|
19
|
+
{title && (
|
|
20
|
+
<Heading level={1} className="flex gap-3.5 items-center">
|
|
21
|
+
{title}
|
|
22
|
+
</Heading>
|
|
23
|
+
)}
|
|
24
|
+
<p>{message}</p>
|
|
25
|
+
<Link to="/">Go back home</Link>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MoonStarIcon,
|
|
1
|
+
import { MoonStarIcon, SunIcon } from "lucide-react";
|
|
2
2
|
import { memo } from "react";
|
|
3
3
|
|
|
4
4
|
import { useAuth } from "../authentication/hook.js";
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "./context/ThemeContext.js";
|
|
|
9
9
|
export const Header = memo(function HeaderInner() {
|
|
10
10
|
const [isDark, toggleTheme] = useTheme();
|
|
11
11
|
const { isAuthenticated, profile, isAuthEnabled, login, logout } = useAuth();
|
|
12
|
-
const {
|
|
12
|
+
const { page } = useDevPortal();
|
|
13
13
|
|
|
14
14
|
const ThemeIcon = isDark ? MoonStarIcon : SunIcon;
|
|
15
15
|
|
|
@@ -18,16 +18,16 @@ export const Header = memo(function HeaderInner() {
|
|
|
18
18
|
<div className="max-w-screen-2xl mx-auto">
|
|
19
19
|
<div className="grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b border-border px-12 h-[--top-header-height]">
|
|
20
20
|
<div className="flex items-center gap-3.5">
|
|
21
|
-
{
|
|
22
|
-
<img src={
|
|
21
|
+
{page?.logo && (
|
|
22
|
+
<img src={page.logo} alt={page.pageTitle} className="h-10" />
|
|
23
23
|
)}
|
|
24
24
|
<span className="font-bold text-2xl text-foreground/85 tracking-wide">
|
|
25
|
-
{
|
|
25
|
+
{page?.pageTitle}
|
|
26
26
|
</span>
|
|
27
27
|
</div>
|
|
28
28
|
<div className="grid grid-cols-[--sidecar-grid-cols] items-center gap-8">
|
|
29
29
|
<div className="w-full max-w-prose">
|
|
30
|
-
|
|
30
|
+
{/*<button className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-40 sm:w-72">
|
|
31
31
|
<div className="flex items-center gap-2 flex-grow">
|
|
32
32
|
<SearchIcon size={14} />
|
|
33
33
|
Search
|
|
@@ -35,7 +35,7 @@ export const Header = memo(function HeaderInner() {
|
|
|
35
35
|
<kbd className="absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex">
|
|
36
36
|
⌘K
|
|
37
37
|
</kbd>
|
|
38
|
-
</button
|
|
38
|
+
</button>*/}
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
41
|
<div className="items-center justify-self-end text-sm hidden lg:flex">
|
|
@@ -43,6 +43,7 @@ export const Header = memo(function HeaderInner() {
|
|
|
43
43
|
<>
|
|
44
44
|
{isAuthenticated ? (
|
|
45
45
|
<button
|
|
46
|
+
type="button"
|
|
46
47
|
className="cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded text-nowrap"
|
|
47
48
|
onClick={logout}
|
|
48
49
|
>
|
|
@@ -50,6 +51,7 @@ export const Header = memo(function HeaderInner() {
|
|
|
50
51
|
</button>
|
|
51
52
|
) : (
|
|
52
53
|
<button
|
|
54
|
+
type="button"
|
|
53
55
|
className="cursor-pointer hover:bg-secondary p-1 px-2 mx-2 rounded"
|
|
54
56
|
onClick={login}
|
|
55
57
|
>
|
|
@@ -59,6 +61,10 @@ export const Header = memo(function HeaderInner() {
|
|
|
59
61
|
</>
|
|
60
62
|
)}
|
|
61
63
|
<button
|
|
64
|
+
type="button"
|
|
65
|
+
aria-label={
|
|
66
|
+
isDark ? "Switch to light mode" : "Switch to dark mode"
|
|
67
|
+
}
|
|
62
68
|
className="cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full"
|
|
63
69
|
onClick={toggleTheme}
|
|
64
70
|
>
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
import { cn } from "../util/cn.js";
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
3
2
|
import { useRegisterAnchorElement } from "./context/ViewportAnchorContext.js";
|
|
4
3
|
|
|
4
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
const heading = cva("group relative", {
|
|
7
|
+
variants: {
|
|
8
|
+
level: {
|
|
9
|
+
6: "text-md",
|
|
10
|
+
5: "text-lg",
|
|
11
|
+
4: "text-xl",
|
|
12
|
+
3: "text-xl font-semibold",
|
|
13
|
+
2: "text-2xl font-bold",
|
|
14
|
+
1: "text-4xl font-extrabold",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
level: 1,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
|
|
5
22
|
const getComponent = (level: number) => {
|
|
6
23
|
switch (level) {
|
|
7
24
|
case 1:
|
|
@@ -21,27 +38,29 @@ const getComponent = (level: number) => {
|
|
|
21
38
|
}
|
|
22
39
|
};
|
|
23
40
|
|
|
24
|
-
export
|
|
41
|
+
export interface HeadingProps
|
|
42
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
43
|
+
VariantProps<typeof heading> {
|
|
25
44
|
children: ReactNode;
|
|
26
45
|
className?: string;
|
|
27
46
|
id?: string;
|
|
28
47
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
29
48
|
registerSidebarAnchor?: boolean;
|
|
30
|
-
}
|
|
49
|
+
}
|
|
31
50
|
|
|
32
|
-
export const Heading = ({
|
|
51
|
+
export const Heading: React.FC<HeadingProps> = ({
|
|
33
52
|
level,
|
|
34
53
|
children,
|
|
35
54
|
id,
|
|
36
55
|
className,
|
|
37
56
|
registerSidebarAnchor,
|
|
38
|
-
}
|
|
57
|
+
}) => {
|
|
39
58
|
const Component = getComponent(level ?? 1);
|
|
40
59
|
const { ref } = useRegisterAnchorElement();
|
|
41
60
|
|
|
42
61
|
return (
|
|
43
62
|
<Component
|
|
44
|
-
className={
|
|
63
|
+
className={heading({ className, level })}
|
|
45
64
|
ref={registerSidebarAnchor ? ref : undefined}
|
|
46
65
|
id={id}
|
|
47
66
|
>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { cn } from "../util/cn.js";
|
|
3
|
+
|
|
4
|
+
export const InlineCode = ({
|
|
5
|
+
className,
|
|
6
|
+
children,
|
|
7
|
+
}: {
|
|
8
|
+
className?: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}) => (
|
|
11
|
+
<code
|
|
12
|
+
className={cn(
|
|
13
|
+
className,
|
|
14
|
+
"font-mono border border-border p-1 py-0.5 rounded bg-border/50 dark:bg-border/70 whitespace-nowrap",
|
|
15
|
+
)}
|
|
16
|
+
>
|
|
17
|
+
{children}
|
|
18
|
+
</code>
|
|
19
|
+
);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
1
2
|
import { Suspense, useEffect, useRef, type ReactNode } from "react";
|
|
2
3
|
import { Outlet, useLocation } from "react-router-dom";
|
|
3
|
-
import {
|
|
4
|
+
import { cn } from "../util/cn.js";
|
|
4
5
|
import { useScrollToAnchor } from "../util/useScrollToAnchor.js";
|
|
5
6
|
import { useScrollToTop } from "../util/useScrollToTop.js";
|
|
6
7
|
import { useDevPortal } from "./context/DevPortalProvider.js";
|
|
@@ -29,8 +30,7 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
32
|
<>
|
|
32
|
-
<Helmet titleTemplate={meta?.
|
|
33
|
-
<title>Home</title>
|
|
33
|
+
<Helmet titleTemplate={meta?.title}>
|
|
34
34
|
{meta?.description && (
|
|
35
35
|
<meta name="description" content={meta.description} />
|
|
36
36
|
)}
|
|
@@ -48,10 +48,12 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
48
48
|
>
|
|
49
49
|
<SideNavigation />
|
|
50
50
|
<main
|
|
51
|
-
className=
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
className={cn(
|
|
52
|
+
"dark:border-white/10 translate-x-0 h-full",
|
|
53
|
+
"lg:overflow-visible",
|
|
54
|
+
"lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
|
|
55
|
+
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12",
|
|
56
|
+
)}
|
|
55
57
|
>
|
|
56
58
|
{children ?? <Outlet />}
|
|
57
59
|
</main>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { UnlinkIcon } from "lucide-react";
|
|
2
|
+
import { Link, useParams } from "react-router-dom";
|
|
3
|
+
import { Callout } from "../ui/Callout.js";
|
|
4
|
+
import { CategoryHeading } from "./CategoryHeading.js";
|
|
5
|
+
import { Heading } from "./Heading.js";
|
|
6
|
+
import { ProseClasses } from "./Markdown.js";
|
|
7
|
+
|
|
8
|
+
export const NotFoundPage = () => {
|
|
9
|
+
const params = useParams();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className={ProseClasses + " h-full pt-[--padding-content-top]"}>
|
|
13
|
+
<CategoryHeading>404</CategoryHeading>
|
|
14
|
+
<Heading level={1} className="flex gap-3.5 items-center">
|
|
15
|
+
Page not found
|
|
16
|
+
<UnlinkIcon size={24} />
|
|
17
|
+
</Heading>
|
|
18
|
+
{import.meta.env.DEV && (
|
|
19
|
+
<Callout type="caution" title="Developer hint">
|
|
20
|
+
Start by adding a file at{" "}
|
|
21
|
+
<code>
|
|
22
|
+
{"{PROJECT_ROOT}"}/{params["*"]}.mdx
|
|
23
|
+
</code>{" "}
|
|
24
|
+
and add some content to make this error go away.
|
|
25
|
+
<br />
|
|
26
|
+
<small className="italic">
|
|
27
|
+
Note: This hint is only shown in development mode.
|
|
28
|
+
</small>
|
|
29
|
+
</Callout>
|
|
30
|
+
)}
|
|
31
|
+
<p>
|
|
32
|
+
It seems that the page you are looking for does not exist or may have
|
|
33
|
+
been moved. Please check the URL for any typos or use the navigation
|
|
34
|
+
menu to find the correct page.
|
|
35
|
+
</p>
|
|
36
|
+
<Link to="/">Go back home</Link>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -7,21 +7,23 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
globalThis.Prism = Prism;
|
|
11
|
+
// @ts-expect-error This is untyped
|
|
12
|
+
import("prismjs/components/prism-bash.min.js");
|
|
13
|
+
// @ts-expect-error This is untyped
|
|
14
|
+
import("prismjs/components/prism-ruby.min.js");
|
|
15
|
+
// @ts-expect-error This is untyped
|
|
16
|
+
import("prismjs/components/prism-markup-templating.js");
|
|
17
|
+
// @ts-expect-error This is untyped
|
|
18
|
+
import("prismjs/components/prism-php.min.js");
|
|
19
|
+
// @ts-expect-error This is untyped
|
|
20
|
+
import("prismjs/components/prism-json.min.js");
|
|
21
|
+
// @ts-expect-error This is untyped
|
|
22
|
+
import("prismjs/components/prism-java.min.js");
|
|
23
|
+
// @ts-expect-error This is untyped
|
|
24
|
+
import("prismjs/components/prism-csharp.min.js");
|
|
25
|
+
// @ts-expect-error This is untyped
|
|
26
|
+
import("prismjs/components/prism-objectivec.min.js");
|
|
25
27
|
|
|
26
28
|
import { useState } from "react";
|
|
27
29
|
import { cn } from "../util/cn.js";
|
|
@@ -33,10 +35,12 @@ type SyntaxHighlightProps = {
|
|
|
33
35
|
wrapLines?: boolean;
|
|
34
36
|
copyable?: boolean;
|
|
35
37
|
showLanguageIndicator?: boolean;
|
|
36
|
-
|
|
38
|
+
language?: string;
|
|
39
|
+
} & Omit<HighlightProps, "children" | "language">;
|
|
37
40
|
|
|
38
41
|
export const SyntaxHighlight = ({
|
|
39
42
|
copyable = true,
|
|
43
|
+
language = "plain",
|
|
40
44
|
...props
|
|
41
45
|
}: SyntaxHighlightProps) => {
|
|
42
46
|
const [isDark] = useTheme();
|
|
@@ -47,7 +51,11 @@ export const SyntaxHighlight = ({
|
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
return (
|
|
50
|
-
<Highlight
|
|
54
|
+
<Highlight
|
|
55
|
+
theme={isDark ? themes.vsDark : themes.github}
|
|
56
|
+
language={language}
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
51
59
|
{({ className, style, tokens, getLineProps, getTokenProps }) => (
|
|
52
60
|
<pre
|
|
53
61
|
className={cn(
|
|
@@ -67,7 +75,7 @@ export const SyntaxHighlight = ({
|
|
|
67
75
|
disabled={isCopied}
|
|
68
76
|
onClick={() => {
|
|
69
77
|
setIsCopied(true);
|
|
70
|
-
navigator.clipboard.writeText(
|
|
78
|
+
void navigator.clipboard.writeText(
|
|
71
79
|
tokens
|
|
72
80
|
.map((line) => line.map(({ content }) => content).join(""))
|
|
73
81
|
.join("\n"),
|
|
@@ -84,7 +92,7 @@ export const SyntaxHighlight = ({
|
|
|
84
92
|
)}
|
|
85
93
|
{props.showLanguageIndicator && (
|
|
86
94
|
<span className="absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0">
|
|
87
|
-
{
|
|
95
|
+
{language}
|
|
88
96
|
</span>
|
|
89
97
|
)}
|
|
90
98
|
{tokens.map((line, i) => (
|
|
@@ -6,6 +6,11 @@ import { useDevPortal } from "./context/DevPortalProvider.js";
|
|
|
6
6
|
export const TopNavigation = () => {
|
|
7
7
|
const { navigation } = useDevPortal();
|
|
8
8
|
|
|
9
|
+
// Hide tope nav if there is only one item
|
|
10
|
+
if (navigation.length <= 1) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
return (
|
|
10
15
|
<nav className="border-b border-border text-sm px-12 h-[--top-nav-height]">
|
|
11
16
|
<ul className="flex flex-row items-center gap-8">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
1
|
+
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
3
|
import { matchPath, useLocation } from "react-router-dom";
|
|
4
4
|
import { DevPortalContext } from "../../core/DevPortalContext.js";
|
|
@@ -21,7 +21,7 @@ export const useDevPortal = () => {
|
|
|
21
21
|
|
|
22
22
|
export const useApiIdentities = () => {
|
|
23
23
|
const { getApiIdentities } = useDevPortal();
|
|
24
|
-
return
|
|
24
|
+
return useQuery({
|
|
25
25
|
queryFn: getApiIdentities,
|
|
26
26
|
queryKey: ["api-identities"],
|
|
27
27
|
});
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
|
|
2
|
+
import { Link as LinkImport } from "react-router-dom";
|
|
3
|
+
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
4
|
+
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
5
|
+
import { Callout as CalloutImport } from "../ui/Callout.js";
|
|
6
|
+
import {
|
|
7
|
+
Bootstrap as BootstrapImport,
|
|
8
|
+
BootstrapStatic as BootstrapStaticImport,
|
|
9
|
+
} from "./Bootstrap.js";
|
|
10
|
+
import { DevPortal as DevPortalImport } from "./DevPortal.js";
|
|
11
|
+
import { Layout as LayoutImport } from "./Layout.js";
|
|
12
|
+
|
|
13
|
+
export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
|
|
14
|
+
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
15
|
+
export const DevPortal = /*@__PURE__*/ DevPortalImport;
|
|
16
|
+
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
17
|
+
export const Link = /*@__PURE__*/ LinkImport;
|
|
18
|
+
export const RouterError = /*@__PURE__*/ RouterErrorImport;
|
|
19
|
+
export const ServerError = /*@__PURE__*/ ServerErrorImport;
|
|
20
|
+
export const Bootstrap = /*@__PURE__*/ BootstrapImport;
|
|
21
|
+
export const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;
|