zudoku 0.0.2-dev.0
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/cli.js +1 -0
- package/dist/app/DevPortal.d.ts +26 -0
- package/dist/app/DevPortal.js +41 -0
- package/dist/app/DevPortal.js.map +1 -0
- package/dist/app/Heading.d.ts +9 -0
- package/dist/app/Heading.js +27 -0
- package/dist/app/Heading.js.map +1 -0
- package/dist/app/app.d.ts +2 -0
- package/dist/app/app.js +69 -0
- package/dist/app/app.js.map +1 -0
- package/dist/app/authentication/authentication.d.ts +13 -0
- package/dist/app/authentication/authentication.js +2 -0
- package/dist/app/authentication/authentication.js.map +1 -0
- package/dist/app/authentication/clerk.d.ts +5 -0
- package/dist/app/authentication/clerk.js +36 -0
- package/dist/app/authentication/clerk.js.map +1 -0
- package/dist/app/authentication/openid.d.ts +11 -0
- package/dist/app/authentication/openid.js +118 -0
- package/dist/app/authentication/openid.js.map +1 -0
- package/dist/app/components/AnchorLink.d.ts +5 -0
- package/dist/app/components/AnchorLink.js +17 -0
- package/dist/app/components/AnchorLink.js.map +1 -0
- package/dist/app/components/CategoryHeading.d.ts +5 -0
- package/dist/app/components/CategoryHeading.js +6 -0
- package/dist/app/components/CategoryHeading.js.map +1 -0
- package/dist/app/components/DynamicIcon.d.ts +6 -0
- package/dist/app/components/DynamicIcon.js +6 -0
- package/dist/app/components/DynamicIcon.js.map +1 -0
- package/dist/app/components/Header.d.ts +2 -0
- package/dist/app/components/Header.js +15 -0
- package/dist/app/components/Header.js.map +1 -0
- package/dist/app/components/Layout.d.ts +4 -0
- package/dist/app/components/Layout.js +31 -0
- package/dist/app/components/Layout.js.map +1 -0
- package/dist/app/components/Markdown.d.ts +5 -0
- package/dist/app/components/Markdown.js +20 -0
- package/dist/app/components/Markdown.js.map +1 -0
- package/dist/app/components/SyntaxHighlight.d.ts +9 -0
- package/dist/app/components/SyntaxHighlight.js +31 -0
- package/dist/app/components/SyntaxHighlight.js.map +1 -0
- package/dist/app/components/TopNavigation.d.ts +1 -0
- package/dist/app/components/TopNavigation.js +11 -0
- package/dist/app/components/TopNavigation.js.map +1 -0
- package/dist/app/components/context/ComponentsContext.d.ts +10 -0
- package/dist/app/components/context/ComponentsContext.js +11 -0
- package/dist/app/components/context/ComponentsContext.js.map +1 -0
- package/dist/app/components/context/DevPortalProvider.d.ts +10 -0
- package/dist/app/components/context/DevPortalProvider.js +39 -0
- package/dist/app/components/context/DevPortalProvider.js.map +1 -0
- package/dist/app/components/context/PluginSystem.d.ts +1 -0
- package/dist/app/components/context/PluginSystem.js +2 -0
- package/dist/app/components/context/PluginSystem.js.map +1 -0
- package/dist/app/components/context/ThemeContext.d.ts +5 -0
- package/dist/app/components/context/ThemeContext.js +33 -0
- package/dist/app/components/context/ThemeContext.js.map +1 -0
- package/dist/app/components/context/ViewportAnchorContext.d.ts +15 -0
- package/dist/app/components/context/ViewportAnchorContext.js +89 -0
- package/dist/app/components/context/ViewportAnchorContext.js.map +1 -0
- package/dist/app/components/navigation/SideNavigation.d.ts +1 -0
- package/dist/app/components/navigation/SideNavigation.js +11 -0
- package/dist/app/components/navigation/SideNavigation.js.map +1 -0
- package/dist/app/components/navigation/SideNavigationCategory.d.ts +4 -0
- package/dist/app/components/navigation/SideNavigationCategory.js +26 -0
- package/dist/app/components/navigation/SideNavigationCategory.js.map +1 -0
- package/dist/app/components/navigation/SideNavigationItem.d.ts +12 -0
- package/dist/app/components/navigation/SideNavigationItem.js +38 -0
- package/dist/app/components/navigation/SideNavigationItem.js.map +1 -0
- package/dist/app/components/navigation/SideNavigationWrapper.d.ts +4 -0
- package/dist/app/components/navigation/SideNavigationWrapper.js +6 -0
- package/dist/app/components/navigation/SideNavigationWrapper.js.map +1 -0
- package/dist/app/components/navigation/useNavigationCollapsibleState.d.ts +7 -0
- package/dist/app/components/navigation/useNavigationCollapsibleState.js +16 -0
- package/dist/app/components/navigation/useNavigationCollapsibleState.js.map +1 -0
- package/dist/app/components/navigation/util.d.ts +8 -0
- package/dist/app/components/navigation/util.js +15 -0
- package/dist/app/components/navigation/util.js.map +1 -0
- package/dist/app/config.d.ts +3 -0
- package/dist/app/config.js +9 -0
- package/dist/app/config.js.map +1 -0
- package/dist/app/core/DevPortalContext.d.ts +80 -0
- package/dist/app/core/DevPortalContext.js +68 -0
- package/dist/app/core/DevPortalContext.js.map +1 -0
- package/dist/app/core/helmet.d.ts +4 -0
- package/dist/app/core/helmet.js +5 -0
- package/dist/app/core/helmet.js.map +1 -0
- package/dist/app/core/icons.d.ts +1 -0
- package/dist/app/core/icons.js +2 -0
- package/dist/app/core/icons.js.map +1 -0
- package/dist/app/core/plugins.d.ts +24 -0
- package/dist/app/core/plugins.js +4 -0
- package/dist/app/core/plugins.js.map +1 -0
- package/dist/app/core/router.d.ts +1 -0
- package/dist/app/core/router.js +2 -0
- package/dist/app/core/router.js.map +1 -0
- package/dist/app/core/types/combine.d.ts +4 -0
- package/dist/app/core/types/combine.js +2 -0
- package/dist/app/core/types/combine.js.map +1 -0
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +18 -0
- package/dist/app/main.js.map +1 -0
- package/dist/app/markdowns.d.ts +3 -0
- package/dist/app/markdowns.js +5 -0
- package/dist/app/markdowns.js.map +1 -0
- package/dist/app/oas/graphql/index.d.ts +12 -0
- package/dist/app/oas/graphql/index.js +290 -0
- package/dist/app/oas/graphql/index.js.map +1 -0
- package/dist/app/oas/graphql/server.d.ts +1 -0
- package/dist/app/oas/graphql/server.js +8 -0
- package/dist/app/oas/graphql/server.js.map +1 -0
- package/dist/app/oas/parser/dereference/index.d.ts +5 -0
- package/dist/app/oas/parser/dereference/index.js +43 -0
- package/dist/app/oas/parser/dereference/index.js.map +1 -0
- package/dist/app/oas/parser/dereference/resolveRef.d.ts +5 -0
- package/dist/app/oas/parser/dereference/resolveRef.js +26 -0
- package/dist/app/oas/parser/dereference/resolveRef.js.map +1 -0
- package/dist/app/oas/parser/index.d.ts +21 -0
- package/dist/app/oas/parser/index.js +58 -0
- package/dist/app/oas/parser/index.js.map +1 -0
- package/dist/app/oas/parser/schemas/v3.0.json +1489 -0
- package/dist/app/oas/parser/schemas/v3.1.json +1298 -0
- package/dist/app/oas/parser/upgrade/index.d.ts +9 -0
- package/dist/app/oas/parser/upgrade/index.js +90 -0
- package/dist/app/oas/parser/upgrade/index.js.map +1 -0
- package/dist/app/plugins/api-key/SettingsApiKeys.d.ts +4 -0
- package/dist/app/plugins/api-key/SettingsApiKeys.js +7 -0
- package/dist/app/plugins/api-key/SettingsApiKeys.js.map +1 -0
- package/dist/app/plugins/api-key/index.d.ts +32 -0
- package/dist/app/plugins/api-key/index.js +55 -0
- package/dist/app/plugins/api-key/index.js.map +1 -0
- package/dist/app/plugins/markdown/MdxPage.d.ts +3 -0
- package/dist/app/plugins/markdown/MdxPage.js +55 -0
- package/dist/app/plugins/markdown/MdxPage.js.map +1 -0
- package/dist/app/plugins/markdown/Toc.d.ts +4 -0
- package/dist/app/plugins/markdown/Toc.js +40 -0
- package/dist/app/plugins/markdown/Toc.js.map +1 -0
- package/dist/app/plugins/markdown/generateRoutes.d.ts +3 -0
- package/dist/app/plugins/markdown/generateRoutes.js +50 -0
- package/dist/app/plugins/markdown/generateRoutes.js.map +1 -0
- package/dist/app/plugins/markdown/index.d.ts +19 -0
- package/dist/app/plugins/markdown/index.js +9 -0
- package/dist/app/plugins/markdown/index.js.map +1 -0
- package/dist/app/plugins/openapi/ColorizedParam.d.ts +8 -0
- package/dist/app/plugins/openapi/ColorizedParam.js +40 -0
- package/dist/app/plugins/openapi/ColorizedParam.js.map +1 -0
- package/dist/app/plugins/openapi/MakeRequest.d.ts +4 -0
- package/dist/app/plugins/openapi/MakeRequest.js +11 -0
- package/dist/app/plugins/openapi/MakeRequest.js.map +1 -0
- package/dist/app/plugins/openapi/MethodBadge.d.ts +13 -0
- package/dist/app/plugins/openapi/MethodBadge.js +26 -0
- package/dist/app/plugins/openapi/MethodBadge.js.map +1 -0
- package/dist/app/plugins/openapi/OperationList.d.ts +47 -0
- package/dist/app/plugins/openapi/OperationList.js +82 -0
- package/dist/app/plugins/openapi/OperationList.js.map +1 -0
- package/dist/app/plugins/openapi/OperationListItem.d.ts +7 -0
- package/dist/app/plugins/openapi/OperationListItem.js +15 -0
- package/dist/app/plugins/openapi/OperationListItem.js.map +1 -0
- package/dist/app/plugins/openapi/ParameterList.d.ts +7 -0
- package/dist/app/plugins/openapi/ParameterList.js +5 -0
- package/dist/app/plugins/openapi/ParameterList.js.map +1 -0
- package/dist/app/plugins/openapi/ParameterListItem.d.ts +8 -0
- package/dist/app/plugins/openapi/ParameterListItem.js +13 -0
- package/dist/app/plugins/openapi/ParameterListItem.js.map +1 -0
- package/dist/app/plugins/openapi/RequestBodySidecarBox.d.ts +6 -0
- package/dist/app/plugins/openapi/RequestBodySidecarBox.js +19 -0
- package/dist/app/plugins/openapi/RequestBodySidecarBox.js.map +1 -0
- package/dist/app/plugins/openapi/ResponsesSidecarBox.d.ts +6 -0
- package/dist/app/plugins/openapi/ResponsesSidecarBox.js +15 -0
- package/dist/app/plugins/openapi/ResponsesSidecarBox.js.map +1 -0
- package/dist/app/plugins/openapi/Select.d.ts +9 -0
- package/dist/app/plugins/openapi/Select.js +5 -0
- package/dist/app/plugins/openapi/Select.js.map +1 -0
- package/dist/app/plugins/openapi/Sidecar.d.ts +4 -0
- package/dist/app/plugins/openapi/Sidecar.js +39 -0
- package/dist/app/plugins/openapi/Sidecar.js.map +1 -0
- package/dist/app/plugins/openapi/SidecarBox.d.ts +10 -0
- package/dist/app/plugins/openapi/SidecarBox.js +8 -0
- package/dist/app/plugins/openapi/SidecarBox.js.map +1 -0
- package/dist/app/plugins/openapi/graphql/index.d.ts +836 -0
- package/dist/app/plugins/openapi/graphql/index.js +4 -0
- package/dist/app/plugins/openapi/graphql/index.js.map +1 -0
- package/dist/app/plugins/openapi/index.d.ts +22 -0
- package/dist/app/plugins/openapi/index.js +91 -0
- package/dist/app/plugins/openapi/index.js.map +1 -0
- package/dist/app/plugins/openapi/util/generateSchemaExample.d.ts +3 -0
- package/dist/app/plugins/openapi/util/generateSchemaExample.js +52 -0
- package/dist/app/plugins/openapi/util/generateSchemaExample.js.map +1 -0
- package/dist/app/plugins/openapi/util/getCode.d.ts +2 -0
- package/dist/app/plugins/openapi/util/getCode.js +54 -0
- package/dist/app/plugins/openapi/util/getCode.js.map +1 -0
- package/dist/app/plugins/openapi/util/urql.d.ts +8 -0
- package/dist/app/plugins/openapi/util/urql.js +8 -0
- package/dist/app/plugins/openapi/util/urql.js.map +1 -0
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.d.ts +5 -0
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js +47 -0
- package/dist/app/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -0
- package/dist/app/plugins/openapi/worker/worker.d.ts +1 -0
- package/dist/app/plugins/openapi/worker/worker.js +20 -0
- package/dist/app/plugins/openapi/worker/worker.js.map +1 -0
- package/dist/app/plugins/redirect/index.d.ts +10 -0
- package/dist/app/plugins/redirect/index.js +11 -0
- package/dist/app/plugins/redirect/index.js.map +1 -0
- package/dist/app/tailwind.d.ts +3 -0
- package/dist/app/tailwind.js +69 -0
- package/dist/app/tailwind.js.map +1 -0
- package/dist/app/ui/Callout.d.ts +51 -0
- package/dist/app/ui/Callout.js +50 -0
- package/dist/app/ui/Callout.js.map +1 -0
- package/dist/app/ui/Card.d.ts +8 -0
- package/dist/app/ui/Card.js +17 -0
- package/dist/app/ui/Card.js.map +1 -0
- package/dist/app/ui/Note.d.ts +8 -0
- package/dist/app/ui/Note.js +23 -0
- package/dist/app/ui/Note.js.map +1 -0
- package/dist/app/util/MdxComponents.d.ts +27 -0
- package/dist/app/util/MdxComponents.js +40 -0
- package/dist/app/util/MdxComponents.js.map +1 -0
- package/dist/app/util/cn.d.ts +2 -0
- package/dist/app/util/cn.js +6 -0
- package/dist/app/util/cn.js.map +1 -0
- package/dist/app/util/createWaitForNotify.d.ts +1 -0
- package/dist/app/util/createWaitForNotify.js +15 -0
- package/dist/app/util/createWaitForNotify.js.map +1 -0
- package/dist/app/util/groupBy.d.ts +6 -0
- package/dist/app/util/groupBy.js +9 -0
- package/dist/app/util/groupBy.js.map +1 -0
- package/dist/app/util/joinPath.d.ts +1 -0
- package/dist/app/util/joinPath.js +8 -0
- package/dist/app/util/joinPath.js.map +1 -0
- package/dist/app/util/pastellize.d.ts +4 -0
- package/dist/app/util/pastellize.js +14 -0
- package/dist/app/util/pastellize.js.map +1 -0
- package/dist/app/util/slugify.d.ts +3 -0
- package/dist/app/util/slugify.js +3 -0
- package/dist/app/util/slugify.js.map +1 -0
- package/dist/app/util/traverseNavigation.d.ts +6 -0
- package/dist/app/util/traverseNavigation.js +30 -0
- package/dist/app/util/traverseNavigation.js.map +1 -0
- package/dist/app/util/useScrollToAnchor.d.ts +1 -0
- package/dist/app/util/useScrollToAnchor.js +33 -0
- package/dist/app/util/useScrollToAnchor.js.map +1 -0
- package/dist/app/util/useScrollToTop.d.ts +1 -0
- package/dist/app/util/useScrollToTop.js +13 -0
- package/dist/app/util/useScrollToTop.js.map +1 -0
- package/dist/auth.d.ts +2 -0
- package/dist/auth.js +3 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli/build/handler.d.ts +4 -0
- package/dist/cli/build/handler.js +9 -0
- package/dist/cli/build/handler.js.map +1 -0
- package/dist/cli/cli.d.ts +1 -0
- package/dist/cli/cli.js +64 -0
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/cmds/build.d.ts +8 -0
- package/dist/cli/cmds/build.js +23 -0
- package/dist/cli/cmds/build.js.map +1 -0
- package/dist/cli/cmds/dev.d.ts +8 -0
- package/dist/cli/cmds/dev.js +29 -0
- package/dist/cli/cmds/dev.js.map +1 -0
- package/dist/cli/common/analytics/lib.d.ts +17 -0
- package/dist/cli/common/analytics/lib.js +53 -0
- package/dist/cli/common/analytics/lib.js.map +1 -0
- package/dist/cli/common/constants.d.ts +5 -0
- package/dist/cli/common/constants.js +9 -0
- package/dist/cli/common/constants.js.map +1 -0
- package/dist/cli/common/logger.d.ts +2 -0
- package/dist/cli/common/logger.js +14 -0
- package/dist/cli/common/logger.js.map +1 -0
- package/dist/cli/common/machine-id/lib.d.ts +1 -0
- package/dist/cli/common/machine-id/lib.js +74 -0
- package/dist/cli/common/machine-id/lib.js.map +1 -0
- package/dist/cli/common/outdated.d.ts +1 -0
- package/dist/cli/common/outdated.js +70 -0
- package/dist/cli/common/outdated.js.map +1 -0
- package/dist/cli/common/output.d.ts +9 -0
- package/dist/cli/common/output.js +65 -0
- package/dist/cli/common/output.js.map +1 -0
- package/dist/cli/common/utils/box.d.ts +33 -0
- package/dist/cli/common/utils/box.js +81 -0
- package/dist/cli/common/utils/box.js.map +1 -0
- package/dist/cli/common/utils/ports.d.ts +1 -0
- package/dist/cli/common/utils/ports.js +18 -0
- package/dist/cli/common/utils/ports.js.map +1 -0
- package/dist/cli/common/validators/lib.d.ts +20 -0
- package/dist/cli/common/validators/lib.js +31 -0
- package/dist/cli/common/validators/lib.js.map +1 -0
- package/dist/cli/common/xdg/lib.d.ts +6 -0
- package/dist/cli/common/xdg/lib.js +18 -0
- package/dist/cli/common/xdg/lib.js.map +1 -0
- package/dist/cli/dev/handler.d.ts +5 -0
- package/dist/cli/dev/handler.js +22 -0
- package/dist/cli/dev/handler.js.map +1 -0
- package/dist/config/config.d.ts +37 -0
- package/dist/config/config.js +2 -0
- package/dist/config/config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins.d.ts +4 -0
- package/dist/plugins.js +6 -0
- package/dist/plugins.js.map +1 -0
- package/dist/vite/build.d.ts +3 -0
- package/dist/vite/build.js +29 -0
- package/dist/vite/build.js.map +1 -0
- package/dist/vite/config.d.ts +6 -0
- package/dist/vite/config.js +74 -0
- package/dist/vite/config.js.map +1 -0
- package/dist/vite/dev-server.d.ts +10 -0
- package/dist/vite/dev-server.js +53 -0
- package/dist/vite/dev-server.js.map +1 -0
- package/dist/vite/html.d.ts +5 -0
- package/dist/vite/html.js +32 -0
- package/dist/vite/html.js.map +1 -0
- package/dist/vite/import-auth-plugin.d.ts +3 -0
- package/dist/vite/import-auth-plugin.js +28 -0
- package/dist/vite/import-auth-plugin.js.map +1 -0
- package/dist/vite/plugin.d.ts +7 -0
- package/dist/vite/plugin.js +109 -0
- package/dist/vite/plugin.js.map +1 -0
- package/package.json +118 -0
- package/src/app/DevPortal.tsx +115 -0
- package/src/app/Heading.tsx +60 -0
- package/src/app/app.tsx +85 -0
- package/src/app/authentication/authentication.ts +18 -0
- package/src/app/authentication/clerk.ts +47 -0
- package/src/app/authentication/openid.ts +192 -0
- package/src/app/components/AnchorLink.tsx +19 -0
- package/src/app/components/CategoryHeading.tsx +16 -0
- package/src/app/components/DynamicIcon.tsx +60 -0
- package/src/app/components/Header.tsx +69 -0
- package/src/app/components/Layout.tsx +56 -0
- package/src/app/components/Markdown.tsx +37 -0
- package/src/app/components/SyntaxHighlight.tsx +92 -0
- package/src/app/components/TopNavigation.tsx +32 -0
- package/src/app/components/context/ComponentsContext.tsx +24 -0
- package/src/app/components/context/DevPortalProvider.ts +54 -0
- package/src/app/components/context/PluginSystem.ts +0 -0
- package/src/app/components/context/ThemeContext.tsx +46 -0
- package/src/app/components/context/ViewportAnchorContext.tsx +139 -0
- package/src/app/components/navigation/SideNavigation.tsx +18 -0
- package/src/app/components/navigation/SideNavigationCategory.tsx +74 -0
- package/src/app/components/navigation/SideNavigationItem.tsx +143 -0
- package/src/app/components/navigation/SideNavigationWrapper.tsx +15 -0
- package/src/app/components/navigation/useNavigationCollapsibleState.ts +27 -0
- package/src/app/components/navigation/util.ts +38 -0
- package/src/app/config.ts +20 -0
- package/src/app/core/DevPortalContext.ts +164 -0
- package/src/app/core/helmet.ts +5 -0
- package/src/app/core/icons.tsx +1 -0
- package/src/app/core/plugins.ts +43 -0
- package/src/app/core/router.tsx +1 -0
- package/src/app/core/types/combine.ts +16 -0
- package/src/app/main.css +137 -0
- package/src/app/main.tsx +22 -0
- package/src/app/markdowns.ts +7 -0
- package/src/app/oas/graphql/index.ts +422 -0
- package/src/app/oas/graphql/server.ts +10 -0
- package/src/app/oas/parser/dereference/index.ts +59 -0
- package/src/app/oas/parser/dereference/resolveRef.ts +32 -0
- package/src/app/oas/parser/index.ts +94 -0
- package/src/app/oas/parser/schemas/v3.0.json +1489 -0
- package/src/app/oas/parser/schemas/v3.1.json +1298 -0
- package/src/app/oas/parser/upgrade/index.ts +108 -0
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +22 -0
- package/src/app/plugins/api-key/index.tsx +123 -0
- package/src/app/plugins/markdown/MdxPage.tsx +128 -0
- package/src/app/plugins/markdown/Toc.tsx +122 -0
- package/src/app/plugins/markdown/generateRoutes.tsx +72 -0
- package/src/app/plugins/markdown/index.tsx +31 -0
- package/src/app/plugins/openapi/ColorizedParam.tsx +73 -0
- package/src/app/plugins/openapi/MakeRequest.tsx +30 -0
- package/src/app/plugins/openapi/MethodBadge.tsx +36 -0
- package/src/app/plugins/openapi/OperationList.tsx +119 -0
- package/src/app/plugins/openapi/OperationListItem.tsx +55 -0
- package/src/app/plugins/openapi/ParameterList.tsx +32 -0
- package/src/app/plugins/openapi/ParameterListItem.tsx +60 -0
- package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +48 -0
- package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +60 -0
- package/src/app/plugins/openapi/Select.tsx +35 -0
- package/src/app/plugins/openapi/Sidecar.tsx +99 -0
- package/src/app/plugins/openapi/SidecarBox.tsx +35 -0
- package/src/app/plugins/openapi/graphql/env.d.ts +48 -0
- package/src/app/plugins/openapi/graphql/index.ts +13 -0
- package/src/app/plugins/openapi/index.tsx +142 -0
- package/src/app/plugins/openapi/util/generateSchemaExample.ts +59 -0
- package/src/app/plugins/openapi/util/getCode.tsx +69 -0
- package/src/app/plugins/openapi/util/urql.ts +8 -0
- package/src/app/plugins/openapi/worker/createSharedWorkerClient.ts +60 -0
- package/src/app/plugins/openapi/worker/worker.ts +30 -0
- package/src/app/plugins/redirect/index.tsx +20 -0
- package/src/app/tailwind.ts +72 -0
- package/src/app/ui/Callout.tsx +87 -0
- package/src/app/ui/Card.tsx +82 -0
- package/src/app/ui/Note.tsx +58 -0
- package/src/app/util/MdxComponents.tsx +70 -0
- package/src/app/util/cn.ts +6 -0
- package/src/app/util/createWaitForNotify.ts +18 -0
- package/src/app/util/groupBy.ts +24 -0
- package/src/app/util/joinPath.tsx +10 -0
- package/src/app/util/pastellize.ts +25 -0
- package/src/app/util/slugify.ts +3 -0
- package/src/app/util/traverseNavigation.ts +55 -0
- package/src/app/util/useScrollToAnchor.ts +38 -0
- package/src/app/util/useScrollToTop.ts +13 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { matchPath } from "react-router-dom";
|
|
2
|
+
import type {
|
|
3
|
+
HrefNavigationCategoryItem,
|
|
4
|
+
PathNavigationCategoryItem,
|
|
5
|
+
} from "../../core/DevPortalContext.js";
|
|
6
|
+
import {
|
|
7
|
+
traverseNavigationNode,
|
|
8
|
+
type NavigationNode,
|
|
9
|
+
} from "../../util/traverseNavigation.js";
|
|
10
|
+
|
|
11
|
+
export const isPathItem = (
|
|
12
|
+
item: NavigationNode,
|
|
13
|
+
): item is PathNavigationCategoryItem => "path" in item;
|
|
14
|
+
|
|
15
|
+
export const isLinkItem = (
|
|
16
|
+
item: NavigationNode,
|
|
17
|
+
): item is HrefNavigationCategoryItem => "href" in item;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Recursively checks if the current item or any of its children are active.
|
|
21
|
+
*/
|
|
22
|
+
export const checkHasActiveItem = (
|
|
23
|
+
item: NavigationNode,
|
|
24
|
+
locationPath: string,
|
|
25
|
+
basePath: string,
|
|
26
|
+
) => {
|
|
27
|
+
return Boolean(
|
|
28
|
+
traverseNavigationNode(
|
|
29
|
+
item,
|
|
30
|
+
(node, fullPath) => {
|
|
31
|
+
if (isPathItem(node) && matchPath(fullPath, locationPath)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
basePath,
|
|
36
|
+
),
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ZudokuConfig } from "../config/config.js";
|
|
2
|
+
|
|
3
|
+
interface ZuploConfigImport {
|
|
4
|
+
default: ZudokuConfig;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// Search for config files
|
|
8
|
+
const configs = import.meta.glob<ZuploConfigImport>(
|
|
9
|
+
"/zudoku.config.{js,jsx,ts,tsx,mjs}",
|
|
10
|
+
{ eager: true },
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
let config: ZudokuConfig = {};
|
|
14
|
+
|
|
15
|
+
// If we found any, load the first one
|
|
16
|
+
if (Object.keys(configs).length > 0) {
|
|
17
|
+
config = configs[Object.keys(configs)[0]].default;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default config;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { QueryClient } from "@tanstack/react-query";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
import { create } from "zustand";
|
|
4
|
+
import { type DevPortalPath, type DevPortalProps } from "../DevPortal.js";
|
|
5
|
+
import { type AuthProvider } from "../authentication/authentication.js";
|
|
6
|
+
import {
|
|
7
|
+
isApiKeyPlugin,
|
|
8
|
+
isNavigationPlugin,
|
|
9
|
+
needsInitialization,
|
|
10
|
+
type DevPortalPlugin,
|
|
11
|
+
type NavigationPlugin,
|
|
12
|
+
} from "./plugins.js";
|
|
13
|
+
|
|
14
|
+
import type { LucideIcon } from "lucide-react";
|
|
15
|
+
import type { IconName } from "../components/DynamicIcon.js";
|
|
16
|
+
|
|
17
|
+
export interface ApiIdentity {
|
|
18
|
+
authorizeRequest: (request: Request) => Request;
|
|
19
|
+
name: string;
|
|
20
|
+
id: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type BaseNavigationCategoryItem = {
|
|
24
|
+
label: ReactNode;
|
|
25
|
+
title?: string;
|
|
26
|
+
icon?: ReactNode | IconName;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type PathNavigationCategoryItem = BaseNavigationCategoryItem & {
|
|
30
|
+
path: string;
|
|
31
|
+
children?: NavigationCategoryItem[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type HrefNavigationCategoryItem = BaseNavigationCategoryItem & {
|
|
35
|
+
href: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type NavigationCategoryItem =
|
|
39
|
+
| PathNavigationCategoryItem
|
|
40
|
+
| HrefNavigationCategoryItem;
|
|
41
|
+
|
|
42
|
+
export type NavigationCategory = {
|
|
43
|
+
label: string;
|
|
44
|
+
path?: string;
|
|
45
|
+
expanded?: boolean;
|
|
46
|
+
collapsible?: boolean;
|
|
47
|
+
icon?: LucideIcon;
|
|
48
|
+
children: NavigationCategoryItem[];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type NavigationItem = {
|
|
52
|
+
label: string;
|
|
53
|
+
path: DevPortalPath;
|
|
54
|
+
categories?: NavigationCategory[];
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type SessionProfileState = {
|
|
58
|
+
isLoggedIn: boolean;
|
|
59
|
+
sub?: string;
|
|
60
|
+
email?: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
email_verified?: string;
|
|
63
|
+
picture?: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type RoutingState = {
|
|
67
|
+
path?: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const queryClient = new QueryClient();
|
|
71
|
+
|
|
72
|
+
export const useDevPortalState = create<SessionProfileState & RoutingState>(
|
|
73
|
+
() => ({
|
|
74
|
+
isLoggedIn: false,
|
|
75
|
+
}),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
export type ApiKeyCache = "api-keys";
|
|
79
|
+
export type DevPortalCacheKey = ApiKeyCache | string;
|
|
80
|
+
|
|
81
|
+
export class DevPortalContext {
|
|
82
|
+
private plugins: DevPortalPlugin[] = [];
|
|
83
|
+
private navigationPlugins: NavigationPlugin[];
|
|
84
|
+
|
|
85
|
+
public navigation: NavigationItem[];
|
|
86
|
+
public meta: DevPortalProps["meta"];
|
|
87
|
+
public authentication?: AuthProvider;
|
|
88
|
+
public state: typeof useDevPortalState;
|
|
89
|
+
|
|
90
|
+
constructor(private config: DevPortalProps) {
|
|
91
|
+
this.plugins = config.plugins ?? [];
|
|
92
|
+
this.navigation = config.navigation;
|
|
93
|
+
this.navigationPlugins = this.plugins.filter(isNavigationPlugin);
|
|
94
|
+
this.authentication = config.authentication;
|
|
95
|
+
this.meta = config.meta;
|
|
96
|
+
this.state = useDevPortalState;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
initialize = async () => {
|
|
100
|
+
this.plugins
|
|
101
|
+
.filter(needsInitialization)
|
|
102
|
+
.forEach((plugin) => plugin.initialize(this));
|
|
103
|
+
this.authentication?.initialize(this);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
setUserProfile = async (profile: Partial<SessionProfileState>) => {
|
|
107
|
+
return useDevPortalState.setState(profile);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
invalidateCache = async (key: DevPortalCacheKey[]) => {
|
|
111
|
+
queryClient.invalidateQueries({ queryKey: key });
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
getApiIdentities = async () => {
|
|
115
|
+
const keys = await Promise.all(
|
|
116
|
+
this.plugins
|
|
117
|
+
.filter(isApiKeyPlugin)
|
|
118
|
+
.map((plugin) => plugin.getIdentities(this)),
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
return keys.flat();
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
login = async () => {
|
|
125
|
+
if (!this.authentication) {
|
|
126
|
+
throw new Error("No authentication configured");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return this.authentication.login(this);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
logout = async () => {
|
|
133
|
+
if (!this.authentication) {
|
|
134
|
+
throw new Error("No authentication configured");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return this.authentication.signOut(this);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
handleAuthenticationResponse = async (path: {
|
|
141
|
+
pathname: string;
|
|
142
|
+
search: string;
|
|
143
|
+
hash: string;
|
|
144
|
+
}) => {
|
|
145
|
+
this.config.authentication?.handleAuthenticationResponse?.(path, this);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
getNavigation = async (path: string) => {
|
|
149
|
+
const navigations = await Promise.all(
|
|
150
|
+
this.navigationPlugins.map(async (plugin) =>
|
|
151
|
+
plugin.getNavigation?.(path),
|
|
152
|
+
),
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
return navigations.flatMap((nav) => nav ?? []);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
sessionStorage = {
|
|
159
|
+
get: async (key: string) => localStorage.getItem(`session-${key}`) ?? "",
|
|
160
|
+
setProfile: async () => {},
|
|
161
|
+
set: async (key: string, value: string) =>
|
|
162
|
+
localStorage.setItem(`session-${key}`, value),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "lucide-react";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type RouteObject } from "react-router-dom";
|
|
2
|
+
import {
|
|
3
|
+
DevPortalContext,
|
|
4
|
+
type ApiIdentity,
|
|
5
|
+
type NavigationCategory,
|
|
6
|
+
} from "./DevPortalContext.js";
|
|
7
|
+
import { type Combine } from "./types/combine.js";
|
|
8
|
+
|
|
9
|
+
export type PluginNavigationCategory = {
|
|
10
|
+
path: string;
|
|
11
|
+
} & NavigationCategory;
|
|
12
|
+
|
|
13
|
+
export type DevPortalPlugin = Combine<
|
|
14
|
+
[NavigationPlugin, ApiIdentityPlugin, InitializationPlugin]
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export interface NavigationPlugin {
|
|
18
|
+
getRoutes: () => RouteObject[];
|
|
19
|
+
getNavigation?: (path: string) => Promise<PluginNavigationCategory[]>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ApiIdentityPlugin {
|
|
23
|
+
getIdentities: (context: DevPortalContext) => Promise<ApiIdentity[]>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface InitializationPlugin {
|
|
27
|
+
initialize: (context: DevPortalContext) => Promise<void> | void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const isNavigationPlugin = (
|
|
31
|
+
obj: DevPortalPlugin,
|
|
32
|
+
): obj is NavigationPlugin =>
|
|
33
|
+
"getRoutes" in obj && typeof obj.getRoutes === "function";
|
|
34
|
+
|
|
35
|
+
export const needsInitialization = (
|
|
36
|
+
obj: DevPortalPlugin,
|
|
37
|
+
): obj is InitializationPlugin =>
|
|
38
|
+
"initialize" in obj && typeof obj.initialize === "function";
|
|
39
|
+
|
|
40
|
+
export const isApiKeyPlugin = (
|
|
41
|
+
obj: DevPortalPlugin,
|
|
42
|
+
): obj is ApiIdentityPlugin =>
|
|
43
|
+
"getIdentities" in obj && typeof obj.getIdentities === "function";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "react-router-dom";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (
|
|
3
|
+
k: infer I,
|
|
4
|
+
) => void
|
|
5
|
+
? I
|
|
6
|
+
: never;
|
|
7
|
+
|
|
8
|
+
type AnyCombination<T, U = T> = T extends any
|
|
9
|
+
? U extends any
|
|
10
|
+
? T | (T & U)
|
|
11
|
+
: never
|
|
12
|
+
: never;
|
|
13
|
+
|
|
14
|
+
export type Combine<T extends any[]> =
|
|
15
|
+
| UnionToIntersection<T[number]>
|
|
16
|
+
| AnyCombination<T[number]>;
|
package/src/app/main.css
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--top-header-height: 65px;
|
|
8
|
+
--top-nav-height: 50px;
|
|
9
|
+
--side-nav-width: theme("spacing.72");
|
|
10
|
+
--header-height: calc(var(--top-header-height) + var(--top-nav-height));
|
|
11
|
+
--scroll-padding: calc(var(--header-height) + 10px);
|
|
12
|
+
--padding-content-top: theme("spacing.12");
|
|
13
|
+
--padding-content-bottom: theme("spacing.12");
|
|
14
|
+
--padding-nav-item: theme("spacing[2.5]");
|
|
15
|
+
--sidecar-grid-cols: 1fr minmax(200px, 260px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
html,
|
|
19
|
+
body,
|
|
20
|
+
#root {
|
|
21
|
+
@apply h-full min-h-screen;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
html {
|
|
25
|
+
scroll-padding-block: var(--scroll-padding);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
body {
|
|
29
|
+
@apply antialiased bg-background text-foreground;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dark {
|
|
33
|
+
color-scheme: dark;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.prose.prose {
|
|
37
|
+
@apply prose-a:decoration-primary/60 hover:prose-a:decoration-primary prose-a:underline-offset-4 hover:prose-a:decoration-2;
|
|
38
|
+
@apply prose-blockquote:not-italic prose-blockquote:text-neutral-500/75 prose-blockquote:dark:text-neutral-400;
|
|
39
|
+
@apply prose-headings:prose-code:mx-2;
|
|
40
|
+
@apply prose-code:before:content-none prose-code:after:content-none;
|
|
41
|
+
|
|
42
|
+
ul.contains-task-list {
|
|
43
|
+
@apply list-none px-0;
|
|
44
|
+
li {
|
|
45
|
+
@apply flex items-center gap-2;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
select {
|
|
51
|
+
@apply focus-visible:ring-primary focus-visible:ring-[1.5px] focus:outline-none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.CollapsibleContent {
|
|
55
|
+
--easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
56
|
+
--slide-offset: -0.75rem;
|
|
57
|
+
@apply overflow-hidden;
|
|
58
|
+
}
|
|
59
|
+
.CollapsibleContent[data-state="open"] {
|
|
60
|
+
animation: slideDown 300ms var(--easing);
|
|
61
|
+
}
|
|
62
|
+
.CollapsibleContent[data-state="closed"] {
|
|
63
|
+
animation: slideUp 300ms var(--easing);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes slideDown {
|
|
67
|
+
from {
|
|
68
|
+
height: 0;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transform: translateY(var(--slide-offset));
|
|
71
|
+
}
|
|
72
|
+
to {
|
|
73
|
+
height: var(--radix-collapsible-content-height);
|
|
74
|
+
opacity: 1;
|
|
75
|
+
transform: translateY(0);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@keyframes slideUp {
|
|
80
|
+
from {
|
|
81
|
+
height: var(--radix-collapsible-content-height);
|
|
82
|
+
opacity: 1;
|
|
83
|
+
transform: translateY(0);
|
|
84
|
+
}
|
|
85
|
+
to {
|
|
86
|
+
height: 0;
|
|
87
|
+
opacity: 0;
|
|
88
|
+
transform: translateY(var(--slide-offset));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Theme */
|
|
93
|
+
:root {
|
|
94
|
+
--background: 0 0% 100%;
|
|
95
|
+
--foreground: 222.2 84% 4.9%;
|
|
96
|
+
--card: 0 0% 100%;
|
|
97
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
98
|
+
--popover: 0 0% 100%;
|
|
99
|
+
--popover-foreground: 222.2 84% 4.9%;
|
|
100
|
+
--primary: 221.2 83.2% 53.3%;
|
|
101
|
+
--primary-foreground: 210 40% 98%;
|
|
102
|
+
--secondary: 210 40% 96.1%;
|
|
103
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
104
|
+
--muted: 210 40% 96.1%;
|
|
105
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
106
|
+
--accent: 210 40% 96.1%;
|
|
107
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
108
|
+
--destructive: 0 72.22% 50.59%;
|
|
109
|
+
--destructive-foreground: 210 40% 98%;
|
|
110
|
+
--border: 214.3 31.8% 91.4%;
|
|
111
|
+
--input: 214.3 31.8% 91.4%;
|
|
112
|
+
--ring: 221.2 83.2% 53.3%;
|
|
113
|
+
--radius: 0.5rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dark {
|
|
117
|
+
--background: 222.2 84% 4.9%;
|
|
118
|
+
--foreground: 210 40% 98%;
|
|
119
|
+
--card: 222.2 84% 4.9%;
|
|
120
|
+
--card-foreground: 210 40% 98%;
|
|
121
|
+
--popover: 222.2 84% 4.9%;
|
|
122
|
+
--popover-foreground: 210 40% 98%;
|
|
123
|
+
--primary: 217.2 91.2% 59.8%;
|
|
124
|
+
--primary-foreground: 222.2 47.4% 11.2%;
|
|
125
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
126
|
+
--secondary-foreground: 210 40% 98%;
|
|
127
|
+
--muted: 217.2 32.6% 17.5%;
|
|
128
|
+
--muted-foreground: 215 20.2% 65.1%;
|
|
129
|
+
--accent: 217.2 32.6% 17.5%;
|
|
130
|
+
--accent-foreground: 210 40% 98%;
|
|
131
|
+
--destructive: 0 62.8% 30.6%;
|
|
132
|
+
--destructive-foreground: 210 40% 98%;
|
|
133
|
+
--border: 217.2 32.6% 17.5%;
|
|
134
|
+
--input: 217.2 32.6% 17.5%;
|
|
135
|
+
--ring: 224.3 76.3% 48%;
|
|
136
|
+
}
|
|
137
|
+
}
|
package/src/app/main.tsx
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom/client";
|
|
3
|
+
import App from "./app.js";
|
|
4
|
+
|
|
5
|
+
// if (import.meta.env.DEV) {
|
|
6
|
+
// const { default: wdyr } = await import(
|
|
7
|
+
// "@welldone-software/why-did-you-render"
|
|
8
|
+
// );
|
|
9
|
+
//
|
|
10
|
+
// wdyr(React, {
|
|
11
|
+
// include: [/.*/],
|
|
12
|
+
// exclude: [/^BrowserRouter/, /^Link/, /^Route/],
|
|
13
|
+
// trackHooks: true,
|
|
14
|
+
// trackAllPureComponents: true,
|
|
15
|
+
// });
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
19
|
+
<React.StrictMode>
|
|
20
|
+
<App />
|
|
21
|
+
</React.StrictMode>,
|
|
22
|
+
);
|