zudoku 0.3.0-dev.5 → 0.3.0-dev.50
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 -6
- package/dist/lib/core/DevPortalContext.js +9 -6
- 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-DCYGmylw.js +77 -0
- package/lib/hook-DCYGmylw.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-D36MLDHk.js +289 -0
- package/lib/state-D36MLDHk.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 +804 -447
- 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 +46 -17
- 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,11 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const OasContext = createContext(undefined);
|
|
3
|
+
export const OasConfigProvider = OasContext.Provider;
|
|
4
|
+
export const useOasConfig = () => {
|
|
5
|
+
const ctx = useContext(OasContext);
|
|
6
|
+
if (!ctx) {
|
|
7
|
+
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
8
|
+
}
|
|
9
|
+
return ctx.config;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGlD,MAAM,UAAU,GAAG,aAAa,CAC9B,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,QAAQ,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,GAAG,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,GAAG,CAAC,MAAM,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
import { type DevPortalPlugin } from "../../core/plugins.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const useOasConfig: () => OasPluginConfig;
|
|
6
|
-
type OasSource = {
|
|
7
|
-
type: "url";
|
|
8
|
-
input: string;
|
|
9
|
-
} | {
|
|
10
|
-
type: "yaml";
|
|
11
|
-
input: string;
|
|
12
|
-
} | {
|
|
13
|
-
type: "json";
|
|
14
|
-
input: object;
|
|
2
|
+
import { OasPluginConfig } from "./interfaces.js";
|
|
3
|
+
type InternalOasPluginConfig = {
|
|
4
|
+
inMemory?: boolean;
|
|
15
5
|
};
|
|
16
|
-
export
|
|
17
|
-
server?: string;
|
|
18
|
-
path?: string;
|
|
19
|
-
} & OasSource;
|
|
20
|
-
export declare const openApiPlugin: (config: OasPluginConfig) => DevPortalPlugin;
|
|
6
|
+
export declare const openApiPlugin: (config: OasPluginConfig & InternalOasPluginConfig) => DevPortalPlugin;
|
|
21
7
|
export {};
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { Outlet, matchPath } from "../../core/router.js";
|
|
2
|
+
import { matchPath, useRouteError } from "react-router-dom";
|
|
4
3
|
import { MethodBadge } from "./MethodBadge.js";
|
|
5
|
-
import { OperationList } from "./OperationList.js";
|
|
6
4
|
import { graphql } from "./graphql/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export const useOasConfig = () => {
|
|
12
|
-
const ctx = useContext(OasContext);
|
|
13
|
-
if (!ctx) {
|
|
14
|
-
throw new Error("useOasConfig must be used within a OasConfigProvider");
|
|
15
|
-
}
|
|
16
|
-
return ctx.config;
|
|
17
|
-
};
|
|
18
|
-
const OasContextProvider = ({ config, client, }) => {
|
|
19
|
-
return (_jsx(Provider, { value: client, children: _jsx(OasConfigProvider, { value: { config }, children: _jsx(Outlet, {}) }) }));
|
|
20
|
-
};
|
|
5
|
+
import { Client as UrqlClient, cacheExchange, fetchExchange, } from "./util/urql.js";
|
|
6
|
+
import { createClient } from "zudoku/openapi-worker";
|
|
7
|
+
import { ErrorPage } from "../../components/ErrorPage.js";
|
|
8
|
+
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
21
9
|
const GetCategoriesQuery = graphql(`
|
|
22
10
|
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
23
11
|
schema(input: $input, type: $type) {
|
|
@@ -37,6 +25,11 @@ const GetCategoriesQuery = graphql(`
|
|
|
37
25
|
}
|
|
38
26
|
}
|
|
39
27
|
`);
|
|
28
|
+
const OpenApiErrorPage = () => {
|
|
29
|
+
const error = useRouteError();
|
|
30
|
+
const message = error instanceof Error ? (_jsx(SyntaxHighlight, { code: error.message })) : ("An unknown error occurred");
|
|
31
|
+
return (_jsx(ErrorPage, { category: "Error", title: "An error occurred", message: message }));
|
|
32
|
+
};
|
|
40
33
|
export const openApiPlugin = (config) => {
|
|
41
34
|
const basePath = config.path ?? "/reference";
|
|
42
35
|
const client = config.server
|
|
@@ -44,8 +37,16 @@ export const openApiPlugin = (config) => {
|
|
|
44
37
|
url: config.server,
|
|
45
38
|
exchanges: [cacheExchange, fetchExchange],
|
|
46
39
|
})
|
|
47
|
-
:
|
|
40
|
+
: createClient({ useMemoryClient: config.inMemory ?? false });
|
|
48
41
|
return {
|
|
42
|
+
getHead: () => {
|
|
43
|
+
if (config.type === "url") {
|
|
44
|
+
return (_jsx("link", { rel: "preload", href: config.input, as: "fetch", crossOrigin: "anonymous" }));
|
|
45
|
+
}
|
|
46
|
+
if (config.server) {
|
|
47
|
+
return _jsx("link", { rel: "preconnect", href: config.server });
|
|
48
|
+
}
|
|
49
|
+
},
|
|
49
50
|
getNavigation: async (path) => {
|
|
50
51
|
if (!matchPath({ path: basePath, end: false }, path)) {
|
|
51
52
|
return [];
|
|
@@ -79,11 +80,25 @@ export const openApiPlugin = (config) => {
|
|
|
79
80
|
},
|
|
80
81
|
getRoutes: () => [
|
|
81
82
|
{
|
|
82
|
-
|
|
83
|
+
async lazy() {
|
|
84
|
+
const { OpenApiRoute } = await import("./Route.js");
|
|
85
|
+
return {
|
|
86
|
+
element: _jsx(OpenApiRoute, { client: client, config: config }),
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
errorElement: _jsx(OpenApiErrorPage, {}),
|
|
83
90
|
children: [
|
|
84
91
|
{
|
|
85
92
|
path: basePath,
|
|
86
|
-
children: [
|
|
93
|
+
children: [
|
|
94
|
+
{
|
|
95
|
+
index: true,
|
|
96
|
+
async lazy() {
|
|
97
|
+
const { OperationList } = await import("./OperationList.js");
|
|
98
|
+
return { element: _jsx(OperationList, {}) };
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
87
102
|
},
|
|
88
103
|
],
|
|
89
104
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAoB,MAAM,kBAAkB,CAAC;AAK9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAGtE,MAAM,kBAAkB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;CAkBlC,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC;IAC9B,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,CACvB,KAAC,eAAe,IAAC,IAAI,EAA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QACpB,CAAC;QACD,SAAS,EAAE,GAAG,EAAE,CACd;YACE;gBACE,KAAK,CAAC,IAAI;oBACR,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;oBACpD,OAAO;wBACL,OAAO,EAAE,KAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI;qBAC1D,CAAC;gBACJ,CAAC;gBACD,YAAY,EAAE,KAAC,gBAAgB,KAAG;gBAClC,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE;4BACR;gCACE,KAAK,EAAE,IAAI;gCACX,KAAK,CAAC,IAAI;oCACR,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CACpC,oBAAoB,CACrB,CAAC;oCACF,OAAO,EAAE,OAAO,EAAE,KAAC,aAAa,KAAG,EAAE,CAAC;gCACxC,CAAC;6BACF;yBACF;qBACF;iBACF;aACF;SACsB;KAC5B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Control, UseFormRegister } from "react-hook-form";
|
|
2
|
-
import
|
|
3
|
-
export declare const Headers: ({ control, register,
|
|
2
|
+
import { type PlaygroundForm } from "./Playground.js";
|
|
3
|
+
export declare const Headers: ({ control, register, }: {
|
|
4
4
|
register: UseFormRegister<PlaygroundForm>;
|
|
5
5
|
control: Control<PlaygroundForm>;
|
|
6
|
-
headers: Header[];
|
|
7
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { XIcon } from "lucide-react";
|
|
3
|
-
import { useFieldArray } from "react-hook-form";
|
|
2
|
+
import { TriangleAlertIcon, XIcon } from "lucide-react";
|
|
3
|
+
import { useFieldArray, useWatch, } from "react-hook-form";
|
|
4
4
|
import { Button } from "../../../ui/Button.js";
|
|
5
|
+
import { cn } from "../../../util/cn.js";
|
|
5
6
|
import { InlineInput } from "./InlineInput.js";
|
|
6
|
-
|
|
7
|
+
import { NO_IDENTITY } from "./Playground.js";
|
|
8
|
+
export const Headers = ({ control, register, }) => {
|
|
7
9
|
const { fields, append, remove } = useFieldArray({
|
|
8
10
|
control,
|
|
9
11
|
name: "headers",
|
|
10
12
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const selectedIdentity = useWatch({ name: "identity", control });
|
|
14
|
+
const liveHeaders = useWatch({ name: "headers", control });
|
|
15
|
+
const disableAuth = selectedIdentity !== NO_IDENTITY;
|
|
16
|
+
return (_jsxs("div", { className: "grid grid-cols-[1fr_1fr_auto]", children: [fields.map((header, i) => {
|
|
17
|
+
const isDisabledByAuth = disableAuth && liveHeaders.at(i)?.name === "Authorization";
|
|
18
|
+
return (_jsxs("div", { className: cn("grid-cols-subgrid col-span-full grid items-center gap-x-2 has-[:focus]:bg-muted hover:bg-muted rounded overflow-hidden group", isDisabledByAuth && "line-through"), title: isDisabledByAuth
|
|
19
|
+
? "This header is disabled because authentication was selected"
|
|
20
|
+
: undefined, children: [_jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(InlineInput, { ...register(`headers.${i}.name`), placeholder: "Name", className: "peer", autoComplete: "off" }), isDisabledByAuth && (_jsx(TriangleAlertIcon, { size: 16, className: "text-amber-500" }))] }), _jsx(InlineInput, { placeholder: "Value", className: "peer", ...register(`headers.${i}.value`), autoComplete: "off" }), _jsx("button", { className: "hover:bg-black/5 p-1 rounded mr-2 text-muted-foreground invisible group-hover:visible peer-focus:visible", onClick: () => {
|
|
21
|
+
remove(i);
|
|
22
|
+
}, type: "button", children: _jsx(XIcon, { size: 16 }) }), _jsx("div", { className: "col-span-full border-b border-border" })] }, header.id));
|
|
23
|
+
}), _jsx(Button, { className: "col-span-full mt-4", onClick: () => append({ name: "", value: "" }), type: "button", children: "Add header" })] }));
|
|
14
24
|
};
|
|
15
25
|
//# sourceMappingURL=Headers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Headers.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/Headers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Headers.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/Headers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAEL,aAAa,EAEb,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAuB,MAAM,iBAAiB,CAAC;AAEnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACtB,OAAO,EACP,QAAQ,GAIT,EAAE,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAiB;QAC/D,OAAO;QACP,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3D,MAAM,WAAW,GAAG,gBAAgB,KAAK,WAAW,CAAC;IAErD,OAAO,CACL,eAAK,SAAS,EAAC,+BAA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GN,IACL,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Control, UseFormRegister } from "react-hook-form";
|
|
2
|
-
import { PlaygroundForm } from "./Playground.js";
|
|
2
|
+
import type { PlaygroundForm } from "./Playground.js";
|
|
3
3
|
export declare const PathParams: ({ control, register, }: {
|
|
4
4
|
register: UseFormRegister<PlaygroundForm>;
|
|
5
5
|
control: Control<PlaygroundForm>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const NO_IDENTITY = "__none";
|
|
1
2
|
export type Header = {
|
|
2
3
|
name: string;
|
|
3
4
|
value: string;
|
|
@@ -19,7 +20,7 @@ export type PlaygroundForm = {
|
|
|
19
20
|
headers: Header[];
|
|
20
21
|
identity?: string;
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
export type PlaygroundContentProps = {
|
|
23
24
|
host: string;
|
|
24
25
|
url: string;
|
|
25
26
|
method: string;
|
|
@@ -27,5 +28,5 @@ declare const Playground: ({ url, host, method, headers, queryParams, pathParams
|
|
|
27
28
|
queryParams?: QueryParam[];
|
|
28
29
|
pathParams?: PathParam[];
|
|
29
30
|
hasParams: boolean;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
31
|
+
};
|
|
32
|
+
export declare const Playground: ({ host, url, method, headers, queryParams, pathParams, hasParams, }: PlaygroundContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
3
2
|
import { useMutation } from "@tanstack/react-query";
|
|
4
|
-
import { CirclePlayIcon } from "lucide-react";
|
|
5
3
|
import { Fragment } from "react";
|
|
6
4
|
import { FormProvider, useForm } from "react-hook-form";
|
|
7
5
|
import { useApiIdentities } from "../../../components/context/DevPortalProvider.js";
|
|
8
|
-
import { Dialog, DialogContent, DialogTitle, DialogTrigger, } from "../../../components/Dialog.js";
|
|
9
6
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../../../components/Select.js";
|
|
10
7
|
import { Spinner } from "../../../components/Spinner.js";
|
|
11
8
|
import { SyntaxHighlight } from "../../../components/SyntaxHighlight.js";
|
|
@@ -17,6 +14,7 @@ import { createUrl } from "./createUrl.js";
|
|
|
17
14
|
import { Headers } from "./Headers.js";
|
|
18
15
|
import { PathParams } from "./PathParams.js";
|
|
19
16
|
import { QueryParams } from "./QueryParams.js";
|
|
17
|
+
export const NO_IDENTITY = "__none";
|
|
20
18
|
function mimeTypeToLanguage(mimeType) {
|
|
21
19
|
const mimeTypeMapping = {
|
|
22
20
|
"application/json": "json",
|
|
@@ -42,8 +40,7 @@ const statusCodeMap = {
|
|
|
42
40
|
405: "Method Not Allowed",
|
|
43
41
|
500: "Internal Server Error",
|
|
44
42
|
};
|
|
45
|
-
const
|
|
46
|
-
const Playground = ({ url, host, method, headers = [{ name: "", value: "" }], queryParams = [], pathParams = [], hasParams, }) => {
|
|
43
|
+
export const Playground = ({ host, url, method, headers = [{ name: "", value: "" }], queryParams = [], pathParams = [], hasParams, }) => {
|
|
47
44
|
const { register, control, handleSubmit, watch, ...form } = useForm({
|
|
48
45
|
defaultValues: {
|
|
49
46
|
body: "",
|
|
@@ -61,13 +58,13 @@ const Playground = ({ url, host, method, headers = [{ name: "", value: "" }], qu
|
|
|
61
58
|
const start = performance.now();
|
|
62
59
|
const request = new Request(requestUrl, {
|
|
63
60
|
method: method.toUpperCase(),
|
|
64
|
-
headers: Object.fromEntries(data.
|
|
61
|
+
headers: Object.fromEntries(data.headers
|
|
65
62
|
.filter((h) => h.name)
|
|
66
63
|
.map((header) => [header.name, header.value])),
|
|
67
64
|
});
|
|
68
65
|
if (data.identity !== NO_IDENTITY) {
|
|
69
66
|
identities.data
|
|
70
|
-
|
|
67
|
+
?.find((i) => i.id === data.identity)
|
|
71
68
|
?.authorizeRequest(request);
|
|
72
69
|
}
|
|
73
70
|
const response = await fetch(request);
|
|
@@ -88,10 +85,9 @@ const Playground = ({ url, host, method, headers = [{ name: "", value: "" }], qu
|
|
|
88
85
|
const urlQueryParams = formState.queryParams
|
|
89
86
|
.filter((p) => p.active)
|
|
90
87
|
.map((p) => (_jsxs(Fragment, { children: [p.name, "=", p.value, _jsx("wbr", {})] }, p.name)));
|
|
91
|
-
return (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
return (_jsx(FormProvider, { register, control, handleSubmit, watch, ...form, children: _jsx("form", { onSubmit: handleSubmit((data) => queryMutation.mutateAsync(data)), children: _jsxs("div", { className: "grid grid-cols-2 text-sm h-full", children: [_jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [_jsxs("div", { className: "flex gap-2 items-stretch", children: [_jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md border-border", children: [_jsx("div", { className: "border-r border-border p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: method.toUpperCase() }), _jsxs("div", { className: "p-2 font-mono text-xs", children: [path, urlQueryParams.length > 0 ? "?" : "", urlQueryParams] })] }), _jsx(Button, { type: "submit", className: "h-auto flex gap-1", children: "Send" })] }), _jsxs(Tabs, { defaultValue: hasParams ? "parameters" : "headers", children: [_jsxs("div", { className: "flex justify-between", children: [_jsxs(TabsList, { children: [hasParams && (_jsx(TabsTrigger, { value: "parameters", children: "Parameters" })), _jsxs(TabsTrigger, { value: "headers", children: ["Headers", " ", formState.headers.length > 0 &&
|
|
89
|
+
`(${formState.headers.length})`] }), _jsx(TabsTrigger, { value: "body", disabled: ["POST", "PUT", "PATCH", "DELETE"].includes(method.toUpperCase()), children: "Body" })] }), _jsxs("div", { className: "flex gap-2 items-center", children: ["Auth:", _jsxs(Select, { onValueChange: (value) => form.setValue("identity", value), defaultValue: formState.identity, children: [_jsx(SelectTrigger, { className: "w-[180px] flex", children: identities.isPending ? _jsx(Spinner, {}) : _jsx(SelectValue, {}) }), _jsxs(SelectContent, { align: "center", children: [_jsx(SelectItem, { value: NO_IDENTITY, children: "None" }), identities.data?.map((identity) => (_jsx(SelectItem, { value: identity.id, children: identity.label }, identity.id)))] })] })] })] }), _jsx(TabsContent, { value: "headers", children: _jsx(Headers, { control: control, register: register }) }), _jsx(TabsContent, { value: "parameters", children: _jsxs("div", { className: "grid grid-cols-[min-content_1fr_1fr_auto]", children: [pathParams.length > 0 && (_jsx("div", { className: "font-semibold my-3 col-span-3", children: "Path Parameters" })), _jsx(PathParams, { control: control, register: register }), queryParams.length > 0 && (_jsx("span", { className: "font-semibold my-3 col-span-3", children: "Query Parameters" })), _jsx(QueryParams, { control: control })] }) }), _jsx(TabsContent, { value: "body", children: _jsx("textarea", { ...register("body"), className: "border border-border w-full rounded p-2 bg-muted h-40" }) })] })] }), _jsx("div", { className: "flex flex-col gap-4 p-8 bg-muted/70", children: queryMutation.error ? (_jsx("div", { children: queryMutation.error.message })) : queryMutation.data ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "flex gap-2", children: _jsxs("div", { className: "flex text-xs gap-6", children: [_jsxs("div", { children: ["Status: ", queryMutation.data.status, " ", statusCodeMap[queryMutation.data.status] ?? ""] }), _jsxs("div", { children: ["Time: ", queryMutation.data.time.toFixed(0), "ms"] }), _jsxs("div", { children: ["Size: ", queryMutation.data.size, " B"] })] }) }), _jsxs(Tabs, { defaultValue: "response", children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "response", children: "Response" }), _jsx(TabsTrigger, { value: "headers", children: headerEntries.length
|
|
90
|
+
? `Headers (${headerEntries.length})`
|
|
91
|
+
: "No headers" })] }), _jsx(TabsContent, { value: "response", children: _jsx(Card, { className: "shadow-none p-4", children: _jsx(SyntaxHighlight, { language: lang ?? "json", noBackground: true, className: "overflow-x-auto ", code: queryMutation.data.body ?? JSON.stringify("") }) }) }), _jsx(TabsContent, { value: "headers", children: _jsxs(Card, { className: "grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4", children: [_jsx("div", { className: "font-semibold", children: "Key" }), _jsx("div", { className: "font-semibold", children: "Value" }), headerEntries.map(([key, value]) => (_jsxs(Fragment, { children: [_jsx("div", { children: key }), _jsx("div", { children: value })] }, key)))] }) })] })] })) : (_jsx("div", { className: "grid place-items-center h-full", children: _jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: queryMutation.isPending ? (_jsx(Spinner, {})) : ("Send a request first to see the response here") }) })) })] }) }) }));
|
|
95
92
|
};
|
|
96
|
-
export { Playground };
|
|
97
93
|
//# sourceMappingURL=Playground.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Playground.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/Playground.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Playground.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/Playground.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AACpF,OAAO,EACL,MAAM,EACN,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,GACZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,qBAAq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B,KAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,YAC/B,KAAC,eAAe,IACd,QAAQ,EAAE,IAAI,IAAI,MAAM,EACxB,YAAY,QACZ,SAAS,EAAC,kBAAkB,EAC5B,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,GACnD,GACG,GACK,EACd,KAAC,WAAW,IAAC,KAAK,EAAC,SAAS,YAC1B,MAAC,IAAI,IAAC,SAAS,EAAC,mEAAmE,aACjF,cAAK,SAAS,EAAC,eAAe,oBAAU,EACxC,cAAK,SAAS,EAAC,eAAe,sBAAY,EACzC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACnC,MAAC,QAAQ,eACP,wBAAM,GAAG,GAAO,EAChB,wBAAM,KAAK,GAAO,KAFL,GAAG,CAGP,CACZ,CAAC,IACG,GACK,IACT,IACH,CACP,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,gCAAgC,YAC7C,eAAM,SAAS,EAAC,iDAAiD,YAC9D,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CACzB,KAAC,OAAO,KAAG,CACZ,CAAC,CAAC,CAAC,CACF,+CAA+C,CAChD,GACI,GACH,CACP,GACG,IACF,GACD,GACM,CAChB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
|
|
3
|
+
import { CirclePlayIcon } from "lucide-react";
|
|
4
|
+
import { Dialog, DialogContent, DialogTitle, DialogTrigger, } from "../../../components/Dialog.js";
|
|
5
|
+
import { Playground } from "./Playground.js";
|
|
6
|
+
const PlaygroundDialog = (props) => {
|
|
7
|
+
return (_jsxs(Dialog, { children: [_jsx(DialogTrigger, { asChild: true, children: _jsx(CirclePlayIcon, { className: "cursor-pointer text-primary hover:text-primary/80", size: 16 }) }), _jsxs(DialogContent, { className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0", "aria-describedby": undefined, children: [_jsx(VisuallyHidden, { children: _jsx(DialogTitle, { children: "Playground" }) }), _jsx(Playground, { ...props })] })] }));
|
|
8
|
+
};
|
|
9
|
+
export { PlaygroundDialog };
|
|
10
|
+
//# sourceMappingURL=PlaygroundDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundDialog.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/PlaygroundDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAA+B,MAAM,iBAAiB,CAAC;AAE1E,MAAM,gBAAgB,GAAG,CAAC,KAA6B,EAAE,EAAE;IACzD,OAAO,CACL,MAAC,MAAM,eACL,KAAC,aAAa,IAAC,OAAO,kBACpB,KAAC,cAAc,IACb,SAAS,EAAC,mDAAmD,EAC7D,IAAI,EAAE,EAAE,GACR,GACY,EAEhB,MAAC,aAAa,IACZ,SAAS,EAAC,gDAAgD,sBACxC,SAAS,aAE3B,KAAC,cAAc,cACb,KAAC,WAAW,6BAAyB,GACtB,EACjB,KAAC,UAAU,OAAK,KAAK,GAAI,IACX,IACT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Control } from "react-hook-form";
|
|
2
|
-
import { PlaygroundForm } from "./Playground.js";
|
|
2
|
+
import type { PlaygroundForm } from "./Playground.js";
|
|
3
3
|
export declare const QueryParams: ({ control, }: {
|
|
4
4
|
control: Control<PlaygroundForm>;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { XIcon } from "lucide-react";
|
|
3
3
|
import { Controller, useFieldArray, useFormContext, } from "react-hook-form";
|
|
4
|
+
import { cn } from "../../../util/cn.js";
|
|
4
5
|
import { InlineInput } from "./InlineInput.js";
|
|
5
6
|
export const QueryParams = ({ control, }) => {
|
|
6
7
|
const { fields } = useFieldArray({
|
|
@@ -16,7 +17,7 @@ export const QueryParams = ({ control, }) => {
|
|
|
16
17
|
}, name: `queryParams.${i}.name` }), _jsx(Controller, { control: control, render: ({ field }) => {
|
|
17
18
|
return (_jsx(InlineInput, { ...field, placeholder: "Value", className: "peer" }));
|
|
18
19
|
}, name: `queryParams.${i}.value` }), _jsx(Controller, { control: control, render: ({ field }) => {
|
|
19
|
-
return (_jsx("button", { className: "hover:bg-black/5 p-1 rounded mr-2 text-muted-foreground invisible group-hover:visible peer-focus:visible", onClick: () => field.onChange(""), children: _jsx(XIcon, { size: 16 }) }));
|
|
20
|
+
return (_jsx("button", { type: "button", className: cn("hover:bg-black/5 p-1 rounded mr-2 text-muted-foreground invisible group-hover:visible peer-focus:visible", field.value.length === 0 && "opacity-0 pointer-events-none"), onClick: () => field.onChange(""), children: _jsx(XIcon, { size: 16 }) }));
|
|
20
21
|
}, name: `queryParams.${i}.value` }), _jsx("div", { className: "-mx-2 col-span-full border-b border-border" })] }, field.id)));
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=QueryParams.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryParams.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/QueryParams.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAEL,UAAU,EACV,aAAa,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,kBAAkB,kBAAQ,IACzD,GACI,CACf,CAAC;gBACJ,CAAC,EACD,IAAI,EAAE,eAAe,CAAC,OAAO,GAC7B,EACF,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;oBACpB,OAAO,CACL,KAAC,WAAW,OAAK,KAAK,EAAE,WAAW,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,GAAG,CAChE,CAAC;gBACJ,CAAC,EACD,IAAI,EAAE,eAAe,CAAC,QAAQ,GAC9B,EACF,KAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;oBACpB,OAAO,CACL,iBACE,
|
|
1
|
+
{"version":3,"file":"QueryParams.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/playground/QueryParams.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAEL,UAAU,EACV,aAAa,EACb,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,GAGR,EAAE,EAAE;IACH,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAiB;QAC/C,OAAO;QACP,IAAI,EAAE,aAAa;KACpB,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,cAAc,EAAkB,CAAC;IAE9C,MAAM,cAAc,GAAG,IAAI;SACxB,SAAS,CAAC,aAAa,CAAC;SACxB,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAEpC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,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G,EAC1G,KAAK,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,+BAA+B,CAC5D,EACD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,YAEjC,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,GAAI,GACZ,CACV,CAAC;gBACJ,CAAC,EACD,IAAI,EAAE,eAAe,CAAC,QAAQ,GAC9B,EAEF,cAAK,SAAS,EAAC,4CAA4C,GAAO,KA9D7D,KAAK,CAAC,EAAE,CA+DT,CACP,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PlaygroundForm } from "./Playground.js";
|
|
1
|
+
import type { PlaygroundForm } from "./Playground.js";
|
|
2
2
|
export declare const createUrl: (host: string, path: string, data: PlaygroundForm) => URL;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SchemaProseClasses: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/util/prose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAClC,YAAY,EACZ,kCAAkC,CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createClient } from "./openapi/client/createWorkerClient.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createClient } from "./openapi/client/createWorkerClient.js";
|
|
2
2
|
//# sourceMappingURL=openapi-worker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-worker.js","sourceRoot":"","sources":["../../../src/lib/plugins/openapi-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"openapi-worker.js","sourceRoot":"","sources":["../../../src/lib/plugins/openapi-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Navigate } from "react-router-dom";
|
|
1
|
+
import { redirect } from "react-router-dom";
|
|
3
2
|
export const redirectPlugin = (options) => {
|
|
4
3
|
return {
|
|
5
|
-
getRoutes: () => options.redirects.map(({ from, to
|
|
4
|
+
getRoutes: () => options.redirects.map(({ from, to }) => ({
|
|
6
5
|
path: from,
|
|
7
|
-
|
|
6
|
+
loader: () => redirect(to),
|
|
8
7
|
})),
|
|
9
8
|
};
|
|
10
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/plugins/redirect/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/plugins/redirect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAQ5C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAE9B,EAAmB,EAAE;IACpB,OAAO;QACL,SAAS,EAAE,GAAG,EAAE,CACd,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YACvC,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;SAC3B,CAAC,CAAC;KACN,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/lib/ui/Callout.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AlertTriangleIcon, InfoIcon, LightbulbIcon, ShieldAlertIcon, } from "
|
|
2
|
+
import { AlertTriangleIcon, InfoIcon, LightbulbIcon, ShieldAlertIcon, } from "lucide-react";
|
|
3
3
|
import { cn } from "../util/cn.js";
|
|
4
4
|
const stylesMap = {
|
|
5
5
|
note: {
|
|
@@ -45,6 +45,6 @@ const stylesMap = {
|
|
|
45
45
|
};
|
|
46
46
|
export const Callout = ({ type, children, title, className }) => {
|
|
47
47
|
const { border, bg, iconColor, titleColor, textColor, Icon } = stylesMap[type];
|
|
48
|
-
return (_jsxs("div", { className: cn("not-prose grid grid-cols-[
|
|
48
|
+
return (_jsxs("div", { className: cn("not-prose grid grid-cols-[min-content_1fr] grid-rows-[fit-content_1fr] gap-x-4 gap-y-2 text-md rounded-md border p-4", "[&_a]:underline [&_a]:decoration-current [&_a]:decoration-from-font [&_a]:underline-offset-4 hover:[&_a]:decoration-1", "[&_code]:!bg-gray-50 [&_code]:dark:!bg-gray-800 [&_code]:!border-none", title && "items-center", border, bg, className), children: [_jsx(Icon, { className: cn(!title && "mt-1 translate-y-px", iconColor), size: 20, "aria-hidden": "true" }), title && _jsx("h3", { className: cn("font-medium", titleColor), children: title }), _jsx("div", { className: cn("col-start-2", !title && "row-start-1", textColor), children: children })] }));
|
|
49
49
|
};
|
|
50
50
|
//# sourceMappingURL=Callout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../src/lib/ui/Callout.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../../../src/lib/ui/Callout.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE;QACJ,MAAM,EAAE,sCAAsC;QAC9C,EAAE,EAAE,iCAAiC;QACrC,S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,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,qBAAqB,EAAE,SAAS,CAAC,EACzD,IAAI,EAAE,EAAE,iBACI,MAAM,GAClB,EACD,KAAK,IAAI,aAAI,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,YAAG,KAAK,GAAM,EACpE,cAAK,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,CAAC,KAAK,IAAI,aAAa,EAAE,SAAS,CAAC,YAClE,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: ({
|
|
2
|
-
variant?: "
|
|
2
|
+
variant?: "link" | "default" | "outline" | "destructive" | "secondary" | "ghost" | null | undefined;
|
|
3
3
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -2,14 +2,14 @@ import { MDXProvider } from "@mdx-js/react";
|
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
export type MdxComponentsType = ComponentProps<typeof MDXProvider>["components"];
|
|
4
4
|
export declare const MdxComponents: {
|
|
5
|
-
img: (props: import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
img: ({ node, ...props }: import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
h1: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
h2: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
h3: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
h4: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
h5: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
h6: ({ children, id }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
a: ({ href, ...props }: import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
a: ({ href, node, ...props }: import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
Callout: ({ type, children, title, className }: {
|
|
14
14
|
type: "note" | "tip" | "info" | "caution" | "danger";
|
|
15
15
|
title?: string;
|