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 @@
|
|
|
1
|
+
{"version":3,"file":"InlineCode.js","sourceRoot":"","sources":["../../../src/lib/components/InlineCode.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,QAAQ,GAIT,EAAE,EAAE,CAAC,CACJ,eACE,SAAS,EAAE,EAAE,CACX,SAAS,EACT,oGAAoG,CACrG,YAEA,QAAQ,GACJ,CACR,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Helmet } from "@zudoku/react-helmet-async";
|
|
2
3
|
import { Suspense, useEffect, useRef } from "react";
|
|
3
4
|
import { Outlet, useLocation } from "react-router-dom";
|
|
4
|
-
import {
|
|
5
|
+
import { cn } from "../util/cn.js";
|
|
5
6
|
import { useScrollToAnchor } from "../util/useScrollToAnchor.js";
|
|
6
7
|
import { useScrollToTop } from "../util/useScrollToTop.js";
|
|
7
8
|
import { useDevPortal } from "./context/DevPortalProvider.js";
|
|
@@ -23,6 +24,6 @@ export const Layout = ({ children }) => {
|
|
|
23
24
|
}
|
|
24
25
|
previousLocationPath.current = location.pathname;
|
|
25
26
|
}, [location.pathname, setActiveAnchor]);
|
|
26
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Helmet, { titleTemplate: meta?.
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Helmet, { titleTemplate: meta?.title, children: [meta?.description && (_jsx("meta", { name: "description", content: meta.description })), meta?.favicon && _jsx("link", { rel: "icon", href: meta.favicon })] }), _jsx(Header, {}), _jsx("div", { className: "max-w-screen-2xl mx-auto pt-[--header-height] px-10 lg:px-12 h-full", children: _jsxs(Suspense, { fallback: _jsx("div", { className: "grid h-full place-items-center", children: _jsx(Spinner, {}) }), children: [_jsx(SideNavigation, {}), _jsx("main", { className: cn("dark:border-white/10 translate-x-0 h-full", "lg:overflow-visible", "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]", "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"), children: children ?? _jsx(Outlet, {}) })] }) })] }));
|
|
27
28
|
};
|
|
28
29
|
//# sourceMappingURL=Layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/lib/components/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../../../src/lib/components/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAkB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,cA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C,qBAAqB,EACrB,qEAAqE,EACrE,oGAAoG,CACrG,YAEA,QAAQ,IAAI,KAAC,MAAM,KAAG,GAClB,IACE,GACP,IACL,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NotFoundPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { UnlinkIcon } from "lucide-react";
|
|
3
|
+
import { Link, useParams } from "react-router-dom";
|
|
4
|
+
import { Callout } from "../ui/Callout.js";
|
|
5
|
+
import { CategoryHeading } from "./CategoryHeading.js";
|
|
6
|
+
import { Heading } from "./Heading.js";
|
|
7
|
+
import { ProseClasses } from "./Markdown.js";
|
|
8
|
+
export const NotFoundPage = () => {
|
|
9
|
+
const params = useParams();
|
|
10
|
+
return (_jsxs("div", { className: ProseClasses + " h-full pt-[--padding-content-top]", children: [_jsx(CategoryHeading, { children: "404" }), _jsxs(Heading, { level: 1, className: "flex gap-3.5 items-center", children: ["Page not found", _jsx(UnlinkIcon, { size: 24 })] }), import.meta.env.DEV && (_jsxs(Callout, { type: "caution", title: "Developer hint", children: ["Start by adding a file at", " ", _jsxs("code", { children: ["{PROJECT_ROOT}", "/", params["*"], ".mdx"] }), " ", "and add some content to make this error go away.", _jsx("br", {}), _jsx("small", { className: "italic", children: "Note: This hint is only shown in development mode." })] })), _jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }), _jsx(Link, { to: "/", children: "Go back home" })] }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=NotFoundPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotFoundPage.js","sourceRoot":"","sources":["../../../src/lib/components/NotFoundPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,CACL,eAAK,SAAS,EAAE,YAAY,GAAG,oCAAoC,aACjE,KAAC,eAAe,sBAAsB,EACtC,MAAC,OAAO,IAAC,KAAK,EAAE,CAAC,EAAE,SAAS,EAAC,2BAA2B,+BAEtD,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,GAAI,IAChB,EACT,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CACtB,MAAC,OAAO,IAAC,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,gBAAgB,0CAClB,GAAG,EAC7B,2BACG,gBAAgB,OAAG,MAAM,CAAC,GAAG,CAAC,YAC1B,EAAC,GAAG,sDAEX,cAAM,EACN,gBAAO,SAAS,EAAC,QAAQ,mEAEjB,IACA,CACX,EACD,oMAII,EACJ,KAAC,IAAI,IAAC,EAAE,EAAC,GAAG,6BAAoB,IAC5B,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -5,6 +5,7 @@ type SyntaxHighlightProps = {
|
|
|
5
5
|
wrapLines?: boolean;
|
|
6
6
|
copyable?: boolean;
|
|
7
7
|
showLanguageIndicator?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
language?: string;
|
|
9
|
+
} & Omit<HighlightProps, "children" | "language">;
|
|
10
|
+
export declare const SyntaxHighlight: ({ copyable, language, ...props }: SyntaxHighlightProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
11
|
export {};
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Highlight, Prism, themes, } from "prism-react-renderer";
|
|
3
3
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
globalThis.Prism = Prism;
|
|
5
|
+
// @ts-expect-error This is untyped
|
|
6
|
+
import("prismjs/components/prism-bash.min.js");
|
|
7
|
+
// @ts-expect-error This is untyped
|
|
8
|
+
import("prismjs/components/prism-ruby.min.js");
|
|
9
|
+
// @ts-expect-error This is untyped
|
|
10
|
+
import("prismjs/components/prism-markup-templating.js");
|
|
11
|
+
// @ts-expect-error This is untyped
|
|
12
|
+
import("prismjs/components/prism-php.min.js");
|
|
13
|
+
// @ts-expect-error This is untyped
|
|
14
|
+
import("prismjs/components/prism-json.min.js");
|
|
15
|
+
// @ts-expect-error This is untyped
|
|
16
|
+
import("prismjs/components/prism-java.min.js");
|
|
17
|
+
// @ts-expect-error This is untyped
|
|
18
|
+
import("prismjs/components/prism-csharp.min.js");
|
|
19
|
+
// @ts-expect-error This is untyped
|
|
20
|
+
import("prismjs/components/prism-objectivec.min.js");
|
|
19
21
|
import { useState } from "react";
|
|
20
22
|
import { cn } from "../util/cn.js";
|
|
21
23
|
import { useTheme } from "./context/ThemeContext.js";
|
|
22
|
-
export const SyntaxHighlight = ({ copyable = true, ...props }) => {
|
|
24
|
+
export const SyntaxHighlight = ({ copyable = true, language = "plain", ...props }) => {
|
|
23
25
|
const [isDark] = useTheme();
|
|
24
26
|
const [isCopied, setIsCopied] = useState(false);
|
|
25
27
|
if (!props.code) {
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
28
|
-
return (_jsx(Highlight, { theme: isDark ? themes.vsDark : themes.github, ...props, children: ({ className, style, tokens, getLineProps, getTokenProps }) => (_jsxs("pre", { className: cn("group relative", className, props.className, props.noBackground && "!bg-transparent", props.wrapLines && "whitespace-pre-wrap break-words"), style: style, children: [copyable && (_jsx("button", { type: "button", "aria-label": "Copy code", className: "absolute top-1.5 right-3 p-3 opacity-0 group-hover:opacity-100 transition hover:bg-zinc-500/10 hover:dark:bg-zinc-700/25 rounded-lg text-sm text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-400", disabled: isCopied, onClick: () => {
|
|
30
|
+
return (_jsx(Highlight, { theme: isDark ? themes.vsDark : themes.github, language: language, ...props, children: ({ className, style, tokens, getLineProps, getTokenProps }) => (_jsxs("pre", { className: cn("group relative", className, props.className, props.noBackground && "!bg-transparent", props.wrapLines && "whitespace-pre-wrap break-words"), style: style, children: [copyable && (_jsx("button", { type: "button", "aria-label": "Copy code", className: "absolute top-1.5 right-3 p-3 opacity-0 group-hover:opacity-100 transition hover:bg-zinc-500/10 hover:dark:bg-zinc-700/25 rounded-lg text-sm text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-400", disabled: isCopied, onClick: () => {
|
|
29
31
|
setIsCopied(true);
|
|
30
|
-
navigator.clipboard.writeText(tokens
|
|
32
|
+
void navigator.clipboard.writeText(tokens
|
|
31
33
|
.map((line) => line.map(({ content }) => content).join(""))
|
|
32
34
|
.join("\n"));
|
|
33
35
|
setTimeout(() => setIsCopied(false), 2000);
|
|
34
|
-
}, children: isCopied ? (_jsx(CheckIcon, { className: "text-emerald-600", size: 18 })) : (_jsx(CopyIcon, { size: 18 })) })), props.showLanguageIndicator && (_jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children:
|
|
36
|
+
}, children: isCopied ? (_jsx(CheckIcon, { className: "text-emerald-600", size: 18 })) : (_jsx(CopyIcon, { size: 18 })) })), props.showLanguageIndicator && (_jsx("span", { className: "absolute top-1.5 right-3 text-[11px] font-mono text-muted-foreground transition group-hover:opacity-0", children: language })), tokens.map((line, i) => (_jsx("div", { ...getLineProps({ line }), children: line.map((token, key) => (_jsx("span", { ...getTokenProps({ token }) }, key))) }, i)))] })) }));
|
|
35
37
|
};
|
|
36
38
|
//# sourceMappingURL=SyntaxHighlight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyntaxHighlight.js","sourceRoot":"","sources":["../../../src/lib/components/SyntaxHighlight.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,GAEP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEnD,
|
|
1
|
+
{"version":3,"file":"SyntaxHighlight.js","sourceRoot":"","sources":["../../../src/lib/components/SyntaxHighlight.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,GAEP,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEnD,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;AACzB,mCAAmC;AACnC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAC/C,mCAAmC;AACnC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAC/C,mCAAmC;AACnC,MAAM,CAAC,+CAA+C,CAAC,CAAC;AACxD,mCAAmC;AACnC,MAAM,CAAC,qCAAqC,CAAC,CAAC;AAC9C,mCAAmC;AACnC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAC/C,mCAAmC;AACnC,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAC/C,mCAAmC;AACnC,MAAM,CAAC,wCAAwC,CAAC,CAAC;AACjD,mCAAmC;AACnC,MAAM,CAAC,4CAA4C,CAAC,CAAC;AAErD,OAAO,EAAE,QAAQ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AE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;6BAC1D,IAAI,CAAC,IAAI,CAAC,CACd,CAAC;wBACF,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;oBAC7C,CAAC,YAEA,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,SAAS,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAE,EAAE,GAAI,CACrD,CAAC,CAAC,CAAC,CACF,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI,CACvB,GACM,CACV,EACA,KAAK,CAAC,qBAAqB,IAAI,CAC9B,eAAM,SAAS,EAAC,uGAAuG,YACpH,QAAQ,GACJ,CACR,EACA,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACvB,iBAAiB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,YACpC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CACxB,kBAAoB,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,IAAjC,GAAG,CAAkC,CACjD,CAAC,IAHM,CAAC,CAIL,CACP,CAAC,IACE,CACP,GACS,CACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TopNavigation: () => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
export declare const TopNavigation: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -4,6 +4,10 @@ import { NavLink } from "react-router-dom";
|
|
|
4
4
|
import { useDevPortal } from "./context/DevPortalProvider.js";
|
|
5
5
|
export const TopNavigation = () => {
|
|
6
6
|
const { navigation } = useDevPortal();
|
|
7
|
+
// Hide tope nav if there is only one item
|
|
8
|
+
if (navigation.length <= 1) {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
7
11
|
return (_jsx("nav", { className: "border-b border-border text-sm px-12 h-[--top-nav-height]", children: _jsx("ul", { className: "flex flex-row items-center gap-8", children: navigation.map((item) => (_jsx("li", { children: _jsx(NavLink, { className: ({ isActive }) => cx("block py-3.5 font-medium -mb-px border-b-2", isActive
|
|
8
12
|
? "border-primary text-foreground"
|
|
9
13
|
: "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"), to: item.path, children: item.label }) }, item.label))) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNavigation.js","sourceRoot":"","sources":["../../../src/lib/components/TopNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,EAAE,CAAC;IAEtC,OAAO,CACL,cAAK,SAAS,EAAC,2DAA2D,YACxE,aAAI,SAAS,EAAC,kCAAkC,YAC7C,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,uBACE,KAAC,OAAO,IACN,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC1B,EAAE,CACA,4CAA4C,EAC5C,QAAQ;wBACN,CAAC,CAAC,gCAAgC;wBAClC,CAAC,CAAC,+FAA+F,CACpG,EAEH,EAAE,EAAE,IAAI,CAAC,IAAI,YAEZ,IAAI,CAAC,KAAK,GACH,IAbH,IAAI,CAAC,KAAK,CAcd,CACN,CAAC,GACC,GACD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"TopNavigation.js","sourceRoot":"","sources":["../../../src/lib/components/TopNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,UAAU,EAAE,GAAG,YAAY,EAAE,CAAC;IAEtC,0CAA0C;IAC1C,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,cAAK,SAAS,EAAC,2DAA2D,YACxE,aAAI,SAAS,EAAC,kCAAkC,YAC7C,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACxB,uBACE,KAAC,OAAO,IACN,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC1B,EAAE,CACA,4CAA4C,EAC5C,QAAQ;wBACN,CAAC,CAAC,gCAAgC;wBAClC,CAAC,CAAC,+FAA+F,CACpG,EAEH,EAAE,EAAE,IAAI,CAAC,IAAI,YAEZ,IAAI,CAAC,KAAK,GACH,IAbH,IAAI,CAAC,KAAK,CAcd,CACN,CAAC,GACC,GACD,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DevPortalContext } from "../../core/DevPortalContext.js";
|
|
2
2
|
export declare const DevPortalProvider: import("react").Provider<DevPortalContext | undefined>;
|
|
3
3
|
export declare const useDevPortal: () => DevPortalContext;
|
|
4
|
-
export declare const useApiIdentities: () => import("@tanstack/react-query").
|
|
4
|
+
export declare const useApiIdentities: () => import("@tanstack/react-query").UseQueryResult<import("../../core/DevPortalContext.js").ApiIdentity[], Error>;
|
|
5
5
|
export declare const useTopNavigationItem: () => import("../../core/DevPortalContext.js").NavigationItem | undefined;
|
|
6
6
|
export declare const useNavigation: () => import("@tanstack/react-query").UseSuspenseQueryResult<{
|
|
7
7
|
items: import("../../core/DevPortalContext.js").NavigationCategory[];
|
|
@@ -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
|
const DevPortalReactContext = createContext(undefined);
|
|
@@ -12,7 +12,7 @@ export const useDevPortal = () => {
|
|
|
12
12
|
};
|
|
13
13
|
export const useApiIdentities = () => {
|
|
14
14
|
const { getApiIdentities } = useDevPortal();
|
|
15
|
-
return
|
|
15
|
+
return useQuery({
|
|
16
16
|
queryFn: getApiIdentities,
|
|
17
17
|
queryKey: ["api-identities"],
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevPortalProvider.js","sourceRoot":"","sources":["../../../../src/lib/components/context/DevPortalProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"DevPortalProvider.js","sourceRoot":"","sources":["../../../../src/lib/components/context/DevPortalProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG1D,MAAM,qBAAqB,GAAG,aAAa,CACzC,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,QAAQ,CAAC;AAEhE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAElD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAA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AC"}
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
|
|
2
|
+
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
3
|
+
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
4
|
+
export declare const useMDXComponents: typeof useMDXComponentsImport;
|
|
5
|
+
export declare const Callout: ({ type, children, title, className }: {
|
|
6
|
+
type: "note" | "tip" | "info" | "caution" | "danger";
|
|
7
|
+
title?: string;
|
|
8
|
+
children: import("react").ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const DevPortal: {
|
|
12
|
+
(props: import("../core/DevPortalContext.js").ZudokuContextOptions): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const Layout: ({ children }: {
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const Link: import("react").ForwardRefExoticComponent<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
19
|
+
export declare const RouterError: typeof RouterErrorImport;
|
|
20
|
+
export declare const ServerError: typeof ServerErrorImport;
|
|
21
|
+
export declare const Bootstrap: ({ router, }: {
|
|
22
|
+
router: ReturnType<typeof import("react-router-dom").createBrowserRouter>;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const BootstrapStatic: ({ router, context, helmetContext, }: {
|
|
25
|
+
helmetContext: HelmetData;
|
|
26
|
+
context: import("react-router-dom/server.js").StaticHandlerContext;
|
|
27
|
+
router: ReturnType<typeof import("react-router-dom").createBrowserRouter>;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,18 @@
|
|
|
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 { Bootstrap as BootstrapImport, BootstrapStatic as BootstrapStaticImport, } from "./Bootstrap.js";
|
|
7
|
+
import { DevPortal as DevPortalImport } from "./DevPortal.js";
|
|
8
|
+
import { Layout as LayoutImport } from "./Layout.js";
|
|
9
|
+
export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
|
|
10
|
+
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
11
|
+
export const DevPortal = /*@__PURE__*/ DevPortalImport;
|
|
12
|
+
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
13
|
+
export const Link = /*@__PURE__*/ LinkImport;
|
|
14
|
+
export const RouterError = /*@__PURE__*/ RouterErrorImport;
|
|
15
|
+
export const ServerError = /*@__PURE__*/ ServerErrorImport;
|
|
16
|
+
export const Bootstrap = /*@__PURE__*/ BootstrapImport;
|
|
17
|
+
export const BootstrapStatic = /*@__PURE__*/ BootstrapStaticImport;
|
|
4
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,SAAS,IAAI,eAAe,EAC5B,eAAe,IAAI,qBAAqB,GACzC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,sBAAsB,CAAC;AACrE,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,aAAa,CAAC;AACnD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,eAAe,CAAC;AACvD,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,CAAC;AACjD,MAAM,CAAC,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC,iBAAiB,CAAC;AAC3D,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAC,eAAe,CAAC;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC,qBAAqB,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { QueryClient } from "@tanstack/react-query";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type AuthenticationProvider } from "../authentication/authentication.js";
|
|
4
|
-
import
|
|
4
|
+
import type { ComponentsContextType } from "../components/context/ComponentsContext.js";
|
|
5
|
+
import { type DevPortalPath } from "../components/DevPortal.js";
|
|
6
|
+
import type { MdxComponentsType } from "../util/MdxComponents.js";
|
|
7
|
+
import { type DevPortalPlugin } from "./plugins.js";
|
|
5
8
|
export interface ApiIdentity {
|
|
6
9
|
authorizeRequest: (request: Request) => Request;
|
|
7
10
|
label: string;
|
|
@@ -34,25 +37,47 @@ export type NavigationItem = {
|
|
|
34
37
|
path: DevPortalPath;
|
|
35
38
|
categories?: NavigationCategory[];
|
|
36
39
|
};
|
|
37
|
-
export type RoutingState = {
|
|
38
|
-
path?: string;
|
|
39
|
-
};
|
|
40
40
|
export declare const queryClient: QueryClient;
|
|
41
|
-
export declare const useRoutingState: import("zustand").UseBoundStore<import("zustand").StoreApi<RoutingState>>;
|
|
42
41
|
export type ApiKeyCache = "api-keys";
|
|
43
42
|
export type DevPortalCacheKey = ApiKeyCache | string;
|
|
43
|
+
type Metadata = Partial<{
|
|
44
|
+
title: string;
|
|
45
|
+
description: string;
|
|
46
|
+
logo: string;
|
|
47
|
+
favicon: string;
|
|
48
|
+
generator: string;
|
|
49
|
+
applicationName: string;
|
|
50
|
+
referrer: string;
|
|
51
|
+
keywords: string[];
|
|
52
|
+
authors: string[];
|
|
53
|
+
creator: string;
|
|
54
|
+
publisher: string;
|
|
55
|
+
}>;
|
|
56
|
+
type Page = Partial<{
|
|
57
|
+
pageTitle?: string;
|
|
58
|
+
logo?: string;
|
|
59
|
+
}>;
|
|
60
|
+
export type ZudokuContextOptions = {
|
|
61
|
+
metadata?: Metadata;
|
|
62
|
+
page?: Page;
|
|
63
|
+
authentication?: AuthenticationProvider;
|
|
64
|
+
navigation: NavigationItem[];
|
|
65
|
+
plugins?: DevPortalPlugin[];
|
|
66
|
+
mdxComponents?: MdxComponentsType;
|
|
67
|
+
overrides?: ComponentsContextType;
|
|
68
|
+
};
|
|
44
69
|
export declare class DevPortalContext {
|
|
45
70
|
private plugins;
|
|
71
|
+
navigation: ZudokuContextOptions["navigation"];
|
|
72
|
+
meta: ZudokuContextOptions["metadata"];
|
|
73
|
+
page: ZudokuContextOptions["page"];
|
|
74
|
+
authentication?: ZudokuContextOptions["authentication"];
|
|
46
75
|
private navigationPlugins;
|
|
47
|
-
|
|
48
|
-
meta: DevPortalProps["meta"];
|
|
49
|
-
authentication?: AuthenticationProvider;
|
|
50
|
-
state: typeof useRoutingState;
|
|
51
|
-
constructor(config: DevPortalProps);
|
|
76
|
+
constructor(config: ZudokuContextOptions);
|
|
52
77
|
initialize: () => Promise<void>;
|
|
53
78
|
invalidateCache: (key: DevPortalCacheKey[]) => Promise<void>;
|
|
54
79
|
getApiIdentities: () => Promise<ApiIdentity[]>;
|
|
55
80
|
getNavigation: (path: string) => Promise<import("./plugins.js").PluginNavigationCategory[]>;
|
|
56
|
-
signRequest(request: Request)
|
|
81
|
+
signRequest: (request: Request) => Promise<Request>;
|
|
57
82
|
}
|
|
58
83
|
export {};
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
-
import { create } from "zustand";
|
|
3
2
|
import { isApiIdentityPlugin, isNavigationPlugin, needsInitialization, } from "./plugins.js";
|
|
4
3
|
export const queryClient = new QueryClient();
|
|
5
|
-
export const useRoutingState = create(() => ({}));
|
|
6
4
|
export class DevPortalContext {
|
|
7
5
|
plugins = [];
|
|
8
|
-
navigationPlugins;
|
|
9
6
|
navigation;
|
|
10
7
|
meta;
|
|
8
|
+
page;
|
|
11
9
|
authentication;
|
|
12
|
-
|
|
10
|
+
navigationPlugins;
|
|
13
11
|
constructor(config) {
|
|
14
12
|
this.plugins = config.plugins ?? [];
|
|
15
13
|
this.navigation = config.navigation;
|
|
16
14
|
this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
|
|
17
15
|
this.authentication = config.authentication;
|
|
18
|
-
this.meta = config.
|
|
19
|
-
this.
|
|
16
|
+
this.meta = config.metadata;
|
|
17
|
+
this.page = config.page;
|
|
20
18
|
}
|
|
21
19
|
initialize = async () => {
|
|
22
|
-
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
await Promise.all([
|
|
21
|
+
this.plugins
|
|
22
|
+
.filter(needsInitialization)
|
|
23
|
+
.map((plugin) => plugin.initialize?.(this)),
|
|
24
|
+
]);
|
|
26
25
|
};
|
|
27
26
|
invalidateCache = async (key) => {
|
|
28
27
|
await queryClient.invalidateQueries({ queryKey: key });
|
|
@@ -37,13 +36,13 @@ export class DevPortalContext {
|
|
|
37
36
|
const navigations = await Promise.all(this.navigationPlugins.map(async (plugin) => plugin.getNavigation?.(path)));
|
|
38
37
|
return navigations.flatMap((nav) => nav ?? []);
|
|
39
38
|
};
|
|
40
|
-
async
|
|
39
|
+
signRequest = async (request) => {
|
|
41
40
|
if (!this.authentication) {
|
|
42
41
|
throw new Error("No authentication provider configured");
|
|
43
42
|
}
|
|
44
43
|
const accessToken = await this.authentication.getAccessToken();
|
|
45
44
|
request.headers.set("Authorization", `Bearer ${accessToken}`);
|
|
46
45
|
return request;
|
|
47
|
-
}
|
|
46
|
+
};
|
|
48
47
|
}
|
|
49
48
|
//# sourceMappingURL=DevPortalContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevPortalContext.js","sourceRoot":"","sources":["../../../src/lib/core/DevPortalContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"DevPortalContext.js","sourceRoot":"","sources":["../../../src/lib/core/DevPortalContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAMpD,OAAO,EAEL,mBAAmB,EACnB,kBAAkB,EAElB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AA2CtB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AAgC7C,MAAM,OAAO,gBAAgB;IACnB,OAAO,GAAiD,EAAE,CAAC;IAC5D,UAAU,CAAqC;IAC/C,IAAI,CAAmC;IACvC,IAAI,CAA+B;IACnC,cAAc,CAA0C;IACvD,iBAAiB,CAAqB;IAE9C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CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAC1C,MAAM,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAC7B,CACF,CAAC;QAEF,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IACjD,CAAC,CAAC;IAEF,WAAW,GAAG,KAAK,EAAE,OAAgB,EAAE,EAAE;QACvC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC;QAE/D,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,WAAW,EAAE,CAAC,CAAC;QAE9D,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;CACH"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
1
2
|
import { type RouteObject } from "react-router-dom";
|
|
2
3
|
import { DevPortalContext, type ApiIdentity, type NavigationCategory } from "./DevPortalContext.js";
|
|
3
4
|
export type PluginNavigationCategory = {
|
|
4
5
|
path: string;
|
|
5
6
|
} & NavigationCategory;
|
|
6
|
-
export type DevPortalPlugin =
|
|
7
|
+
export type DevPortalPlugin = CommonPlugin | NavigationPlugin | ApiIdentityPlugin;
|
|
7
8
|
export interface NavigationPlugin {
|
|
8
9
|
getRoutes: () => RouteObject[];
|
|
9
10
|
getNavigation?: (path: string) => Promise<PluginNavigationCategory[]>;
|
|
@@ -11,9 +12,11 @@ export interface NavigationPlugin {
|
|
|
11
12
|
export interface ApiIdentityPlugin {
|
|
12
13
|
getIdentities: (context: DevPortalContext) => Promise<ApiIdentity[]>;
|
|
13
14
|
}
|
|
14
|
-
export interface
|
|
15
|
-
initialize
|
|
15
|
+
export interface CommonPlugin {
|
|
16
|
+
initialize?: (context: DevPortalContext) => Promise<void> | void;
|
|
17
|
+
getHead?: () => ReactElement | undefined;
|
|
16
18
|
}
|
|
17
19
|
export declare const isNavigationPlugin: (obj: DevPortalPlugin) => obj is NavigationPlugin;
|
|
18
|
-
export declare const needsInitialization: (obj: DevPortalPlugin) => obj is
|
|
20
|
+
export declare const needsInitialization: (obj: DevPortalPlugin) => obj is CommonPlugin;
|
|
21
|
+
export declare const hasHead: (obj: DevPortalPlugin) => obj is CommonPlugin;
|
|
19
22
|
export declare const isApiIdentityPlugin: (obj: DevPortalPlugin) => obj is ApiIdentityPlugin;
|
package/dist/lib/core/plugins.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const isNavigationPlugin = (obj) => "getRoutes" in obj && typeof obj.getRoutes === "function";
|
|
2
2
|
export const needsInitialization = (obj) => "initialize" in obj && typeof obj.initialize === "function";
|
|
3
|
+
export const hasHead = (obj) => "getHead" in obj && typeof obj.getHead === "function";
|
|
3
4
|
export const isApiIdentityPlugin = (obj) => "getIdentities" in obj && typeof obj.getIdentities === "function";
|
|
4
5
|
//# sourceMappingURL=plugins.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/lib/core/plugins.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/lib/core/plugins.ts"],"names":[],"mappings":"AA+BA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,GAAoB,EACK,EAAE,CAC3B,WAAW,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,GAAoB,EACC,EAAE,CACvB,YAAY,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAoB,EAAuB,EAAE,CACnE,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,UAAU,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,GAAoB,EACM,EAAE,CAC5B,eAAe,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,aAAa,KAAK,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
export function ErrorAlert({ error }) {
|
|
4
|
+
const message = error?.message ?? "Something went wrong";
|
|
5
|
+
const stack = error?.stack;
|
|
6
|
+
return (_jsx("div", { className: "flex h-screen max-h-screen min-h-full items-center justify-center bg-primary-background px-4 py-16 lg:px-8", children: _jsxs("div", { className: "mx-auto max-w-[85%] sm:max-w-[50%]", children: [_jsx("h1", { className: "text-4xl font-bold tracking-tight text-h1-text sm:text-5xl", children: "Something went wrong" }), _jsx("p", { className: "mt-5 text-h1-text", children: message }), stack ? (_jsx("pre", { className: "mt-5 max-h-[400px] w-full overflow-scroll rounded-md border border-input-border bg-input-background p-3 text-property-name-text text-red-700", children: stack })) : null] }) }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ErrorAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorAlert.js","sourceRoot":"","sources":["../../../src/lib/errors/ErrorAlert.tsx"],"names":[],"mappings":";AAAA,8DAA8D;AAC9D,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAkB;IAClD,MAAM,OAAO,GAAG,KAAK,EAAE,OAAO,IAAI,sBAAsB,CAAC;IACzD,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,CAAC;IAE3B,OAAO,CACL,cAAK,SAAS,EAAC,4GAA4G,YACzH,eAAK,SAAS,EAAC,oCAAoC,aACjD,aAAI,SAAS,EAAC,4DAA4D,qCAErE,EACL,YAAG,SAAS,EAAC,mBAAmB,YAAE,OAAO,GAAK,EAC7C,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,8IAA8I,YAC1J,KAAK,GACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RouterError(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { isRouteErrorResponse, useRouteError } from "react-router-dom";
|
|
3
|
+
import { NotFoundPage } from "../components/NotFoundPage.js";
|
|
4
|
+
import { ErrorAlert } from "./ErrorAlert.js";
|
|
5
|
+
export function RouterError() {
|
|
6
|
+
const error = useRouteError();
|
|
7
|
+
if (isRouteErrorResponse(error) && error.status === 404) {
|
|
8
|
+
return _jsx(NotFoundPage, {});
|
|
9
|
+
}
|
|
10
|
+
return _jsx(ErrorAlert, { error: error });
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=RouterError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterError.js","sourceRoot":"","sources":["../../../src/lib/errors/RouterError.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,WAAW;IACzB,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAE9B,IAAI,oBAAoB,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QACxD,OAAO,KAAC,YAAY,KAAG,CAAC;IAC1B,CAAC;IAED,OAAO,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerError.js","sourceRoot":"","sources":["../../../src/lib/errors/ServerError.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAsB;IACvD,OAAO,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorAlert } from "./ErrorAlert.js";
|
|
3
|
+
export function TopLevelError({ error, resetErrorBoundary }) {
|
|
4
|
+
// Call resetErrorBoundary() to reset the error boundary and retry the render.
|
|
5
|
+
return _jsx(ErrorAlert, { error: error });
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=TopLevelError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopLevelError.js","sourceRoot":"","sources":["../../../src/lib/errors/TopLevelError.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAiB;IACxE,8EAA8E;IAE9E,OAAO,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;AACtC,CAAC"}
|