zudoku 0.1.1-dev.15 → 0.1.1-dev.16
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.js +3 -1
- package/dist/app/App.js.map +1 -1
- package/dist/config/config.d.ts +3 -3
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/{app → lib}/DevPortal.d.ts +2 -2
- package/dist/{app → lib}/DevPortal.js +4 -4
- package/dist/{app → lib}/DevPortal.js.map +1 -1
- package/dist/{app → lib}/Heading.js.map +1 -1
- package/dist/{app → lib}/Router.js.map +1 -1
- package/dist/lib/auth.d.ts +1 -0
- package/dist/lib/auth.js +2 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/authentication/authentication.js.map +1 -0
- package/dist/{app → lib}/authentication/clerk.d.ts +1 -2
- package/dist/{app → lib}/authentication/clerk.js +1 -2
- package/dist/lib/authentication/clerk.js.map +1 -0
- package/dist/{app → lib}/authentication/openid.js.map +1 -1
- package/dist/{app → lib}/components/AnchorLink.js.map +1 -1
- package/dist/{app → lib}/components/CategoryHeading.js.map +1 -1
- package/dist/{app → lib}/components/Dialog.js.map +1 -1
- package/dist/{app → lib}/components/DynamicIcon.js.map +1 -1
- package/dist/{app → lib}/components/Header.js.map +1 -1
- package/dist/{app → lib}/components/Input.js.map +1 -1
- package/dist/{app → lib}/components/Layout.js.map +1 -1
- package/dist/{app → lib}/components/Markdown.js.map +1 -1
- package/dist/{app → lib}/components/SyntaxHighlight.js.map +1 -1
- package/dist/{app → lib}/components/TopNavigation.js.map +1 -1
- package/dist/{app → lib}/components/context/ComponentsContext.js.map +1 -1
- package/dist/{app → lib}/components/context/DevPortalProvider.js.map +1 -1
- package/dist/lib/components/context/PluginSystem.js.map +1 -0
- package/dist/{app → lib}/components/context/ThemeContext.js.map +1 -1
- package/dist/{app → lib}/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigation.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationCategory.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationItem.js.map +1 -1
- package/dist/{app → lib}/components/navigation/SideNavigationWrapper.js.map +1 -1
- package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js.map +1 -1
- package/dist/{app → lib}/components/navigation/util.js.map +1 -1
- package/dist/lib/components.d.ts +3 -0
- package/dist/lib/components.js +4 -0
- package/dist/lib/components.js.map +1 -0
- package/dist/{app → lib}/core/DevPortalContext.js.map +1 -1
- package/dist/{app → lib}/core/helmet.js.map +1 -1
- package/dist/lib/core/icons.js.map +1 -0
- package/dist/{app → lib}/core/plugins.js.map +1 -1
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/core/types/combine.js.map +1 -0
- package/dist/{app → lib}/oas/graphql/index.js.map +1 -1
- package/dist/{app → lib}/oas/graphql/server.js.map +1 -1
- package/dist/{app → lib}/oas/parser/dereference/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/{app → lib}/oas/parser/index.js.map +1 -1
- package/dist/{app → lib}/oas/parser/upgrade/index.js.map +1 -1
- package/dist/{app → lib}/plugins/api-key/SettingsApiKeys.js.map +1 -1
- package/dist/{app → lib}/plugins/api-key/index.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/Toc.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/generateRoutes.js.map +1 -1
- package/dist/{app → lib}/plugins/markdown/index.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/MakeRequest.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/MethodBadge.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/OperationList.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/Select.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/index.js.map +1 -0
- package/dist/{app → lib}/plugins/openapi/index.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/util/urql.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -1
- package/dist/{app → lib}/plugins/openapi/worker/worker.js.map +1 -1
- package/dist/{app → lib}/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins.d.ts +4 -0
- package/dist/lib/plugins.js +6 -0
- package/dist/lib/plugins.js.map +1 -0
- package/dist/{app → lib}/ui/Button.d.ts +1 -1
- package/dist/{app → lib}/ui/Button.js.map +1 -1
- package/dist/{app → lib}/ui/Callout.js.map +1 -1
- package/dist/{app → lib}/ui/Card.js.map +1 -1
- package/dist/{app → lib}/ui/Note.js.map +1 -1
- package/dist/{app → lib}/ui/Tabs.js.map +1 -1
- package/dist/{app → lib}/util/MdxComponents.js.map +1 -1
- package/dist/{app → lib}/util/cn.js.map +1 -1
- package/dist/{app → lib}/util/createVariantComponent.js.map +1 -1
- package/dist/{app → lib}/util/createWaitForNotify.js.map +1 -1
- package/dist/{app → lib}/util/groupBy.js.map +1 -1
- package/dist/{app → lib}/util/joinPath.js.map +1 -1
- package/dist/{app → lib}/util/pastellize.js.map +1 -1
- package/dist/lib/util/slugify.js.map +1 -0
- package/dist/{app → lib}/util/traverseNavigation.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToAnchor.js.map +1 -1
- package/dist/{app → lib}/util/useScrollToTop.js.map +1 -1
- package/dist/vite/config.d.ts +0 -1
- package/dist/vite/config.js +18 -14
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/dist/vite/plugin-api.js +1 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +2 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +3 -0
- package/dist/vite/plugin-component.js +22 -0
- package/dist/vite/plugin-component.js.map +1 -0
- package/dist/vite/plugin-docs.js +1 -1
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-html.js +0 -3
- package/dist/vite/plugin-html.js.map +1 -1
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/package.json +15 -16
- package/src/app/App.tsx +4 -1
- package/dist/app/authentication/authentication.js.map +0 -1
- package/dist/app/authentication/clerk.js.map +0 -1
- package/dist/app/components/context/PluginSystem.js.map +0 -1
- package/dist/app/core/icons.js.map +0 -1
- package/dist/app/core/router.js.map +0 -1
- package/dist/app/core/types/combine.js.map +0 -1
- package/dist/app/plugins/openapi/graphql/index.js.map +0 -1
- package/dist/app/util/slugify.js.map +0 -1
- package/dist/auth.d.ts +0 -2
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -1
- package/dist/plugins.d.ts +0 -4
- package/dist/plugins.js +0 -6
- package/dist/plugins.js.map +0 -1
- package/src/app/DevPortal.tsx +0 -93
- package/src/app/Heading.tsx +0 -60
- package/src/app/Router.tsx +0 -28
- package/src/app/authentication/authentication.ts +0 -18
- package/src/app/authentication/clerk.ts +0 -47
- package/src/app/authentication/openid.ts +0 -192
- package/src/app/components/AnchorLink.tsx +0 -19
- package/src/app/components/CategoryHeading.tsx +0 -16
- package/src/app/components/Dialog.tsx +0 -119
- package/src/app/components/DynamicIcon.tsx +0 -60
- package/src/app/components/Header.tsx +0 -69
- package/src/app/components/Input.tsx +0 -24
- package/src/app/components/Layout.tsx +0 -56
- package/src/app/components/Markdown.tsx +0 -37
- package/src/app/components/SyntaxHighlight.tsx +0 -94
- package/src/app/components/TopNavigation.tsx +0 -32
- package/src/app/components/context/ComponentsContext.tsx +0 -24
- package/src/app/components/context/DevPortalProvider.ts +0 -54
- package/src/app/components/context/PluginSystem.ts +0 -0
- package/src/app/components/context/ThemeContext.tsx +0 -46
- package/src/app/components/context/ViewportAnchorContext.tsx +0 -139
- package/src/app/components/navigation/SideNavigation.tsx +0 -18
- package/src/app/components/navigation/SideNavigationCategory.tsx +0 -74
- package/src/app/components/navigation/SideNavigationItem.tsx +0 -143
- package/src/app/components/navigation/SideNavigationWrapper.tsx +0 -15
- package/src/app/components/navigation/useNavigationCollapsibleState.ts +0 -27
- package/src/app/components/navigation/util.ts +0 -38
- package/src/app/core/DevPortalContext.ts +0 -164
- package/src/app/core/helmet.ts +0 -5
- package/src/app/core/icons.tsx +0 -1
- package/src/app/core/plugins.ts +0 -43
- package/src/app/core/router.tsx +0 -1
- package/src/app/core/types/combine.ts +0 -16
- package/src/app/oas/graphql/index.ts +0 -422
- package/src/app/oas/graphql/server.ts +0 -10
- package/src/app/oas/parser/dereference/index.ts +0 -59
- package/src/app/oas/parser/dereference/resolveRef.ts +0 -32
- package/src/app/oas/parser/index.ts +0 -94
- package/src/app/oas/parser/schemas/v3.0.json +0 -1489
- package/src/app/oas/parser/schemas/v3.1.json +0 -1298
- package/src/app/oas/parser/upgrade/index.ts +0 -108
- package/src/app/plugins/api-key/SettingsApiKeys.tsx +0 -22
- package/src/app/plugins/api-key/index.tsx +0 -123
- package/src/app/plugins/markdown/MdxPage.tsx +0 -128
- package/src/app/plugins/markdown/Toc.tsx +0 -122
- package/src/app/plugins/markdown/generateRoutes.tsx +0 -72
- package/src/app/plugins/markdown/index.tsx +0 -31
- package/src/app/plugins/openapi/ColorizedParam.tsx +0 -82
- package/src/app/plugins/openapi/MakeRequest.tsx +0 -49
- package/src/app/plugins/openapi/MethodBadge.tsx +0 -36
- package/src/app/plugins/openapi/OperationList.tsx +0 -117
- package/src/app/plugins/openapi/OperationListItem.tsx +0 -55
- package/src/app/plugins/openapi/ParameterList.tsx +0 -32
- package/src/app/plugins/openapi/ParameterListItem.tsx +0 -60
- package/src/app/plugins/openapi/RequestBodySidecarBox.tsx +0 -51
- package/src/app/plugins/openapi/ResponsesSidecarBox.tsx +0 -60
- package/src/app/plugins/openapi/Select.tsx +0 -35
- package/src/app/plugins/openapi/Sidecar.tsx +0 -160
- package/src/app/plugins/openapi/SidecarBox.tsx +0 -36
- package/src/app/plugins/openapi/graphql/fragment-masking.ts +0 -111
- package/src/app/plugins/openapi/graphql/gql.ts +0 -70
- package/src/app/plugins/openapi/graphql/graphql.ts +0 -795
- package/src/app/plugins/openapi/graphql/index.ts +0 -2
- package/src/app/plugins/openapi/index.tsx +0 -142
- package/src/app/plugins/openapi/playground/Playground.tsx +0 -309
- package/src/app/plugins/openapi/queries.graphql +0 -6
- package/src/app/plugins/openapi/util/generateSchemaExample.ts +0 -59
- package/src/app/plugins/openapi/util/urql.ts +0 -8
- package/src/app/plugins/openapi/worker/createSharedWorkerClient.ts +0 -60
- package/src/app/plugins/openapi/worker/worker.ts +0 -30
- package/src/app/plugins/redirect/index.tsx +0 -20
- package/src/app/ui/Button.tsx +0 -56
- package/src/app/ui/Callout.tsx +0 -87
- package/src/app/ui/Card.tsx +0 -82
- package/src/app/ui/Note.tsx +0 -58
- package/src/app/ui/Tabs.tsx +0 -52
- package/src/app/util/MdxComponents.tsx +0 -70
- package/src/app/util/cn.ts +0 -6
- package/src/app/util/createVariantComponent.tsx +0 -30
- package/src/app/util/createWaitForNotify.ts +0 -18
- package/src/app/util/groupBy.ts +0 -24
- package/src/app/util/joinPath.tsx +0 -10
- package/src/app/util/pastellize.ts +0 -25
- package/src/app/util/slugify.ts +0 -3
- package/src/app/util/traverseNavigation.ts +0 -55
- package/src/app/util/useScrollToAnchor.ts +0 -38
- package/src/app/util/useScrollToTop.ts +0 -13
- /package/dist/{app → lib}/Heading.d.ts +0 -0
- /package/dist/{app → lib}/Heading.js +0 -0
- /package/dist/{app → lib}/Router.d.ts +0 -0
- /package/dist/{app → lib}/Router.js +0 -0
- /package/dist/{app → lib}/authentication/authentication.d.ts +0 -0
- /package/dist/{app → lib}/authentication/authentication.js +0 -0
- /package/dist/{app → lib}/authentication/openid.d.ts +0 -0
- /package/dist/{app → lib}/authentication/openid.js +0 -0
- /package/dist/{app → lib}/components/AnchorLink.d.ts +0 -0
- /package/dist/{app → lib}/components/AnchorLink.js +0 -0
- /package/dist/{app → lib}/components/CategoryHeading.d.ts +0 -0
- /package/dist/{app → lib}/components/CategoryHeading.js +0 -0
- /package/dist/{app → lib}/components/Dialog.d.ts +0 -0
- /package/dist/{app → lib}/components/Dialog.js +0 -0
- /package/dist/{app → lib}/components/DynamicIcon.d.ts +0 -0
- /package/dist/{app → lib}/components/DynamicIcon.js +0 -0
- /package/dist/{app → lib}/components/Header.d.ts +0 -0
- /package/dist/{app → lib}/components/Header.js +0 -0
- /package/dist/{app → lib}/components/Input.d.ts +0 -0
- /package/dist/{app → lib}/components/Input.js +0 -0
- /package/dist/{app → lib}/components/Layout.d.ts +0 -0
- /package/dist/{app → lib}/components/Layout.js +0 -0
- /package/dist/{app → lib}/components/Markdown.d.ts +0 -0
- /package/dist/{app → lib}/components/Markdown.js +0 -0
- /package/dist/{app → lib}/components/SyntaxHighlight.d.ts +0 -0
- /package/dist/{app → lib}/components/SyntaxHighlight.js +0 -0
- /package/dist/{app → lib}/components/TopNavigation.d.ts +0 -0
- /package/dist/{app → lib}/components/TopNavigation.js +0 -0
- /package/dist/{app → lib}/components/context/ComponentsContext.d.ts +0 -0
- /package/dist/{app → lib}/components/context/ComponentsContext.js +0 -0
- /package/dist/{app → lib}/components/context/DevPortalProvider.d.ts +0 -0
- /package/dist/{app → lib}/components/context/DevPortalProvider.js +0 -0
- /package/dist/{app → lib}/components/context/PluginSystem.d.ts +0 -0
- /package/dist/{app → lib}/components/context/PluginSystem.js +0 -0
- /package/dist/{app → lib}/components/context/ThemeContext.d.ts +0 -0
- /package/dist/{app → lib}/components/context/ThemeContext.js +0 -0
- /package/dist/{app → lib}/components/context/ViewportAnchorContext.d.ts +0 -0
- /package/dist/{app → lib}/components/context/ViewportAnchorContext.js +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigation.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigation.js +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationCategory.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationCategory.js +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationItem.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationItem.js +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationWrapper.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/SideNavigationWrapper.js +0 -0
- /package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/useNavigationCollapsibleState.js +0 -0
- /package/dist/{app → lib}/components/navigation/util.d.ts +0 -0
- /package/dist/{app → lib}/components/navigation/util.js +0 -0
- /package/dist/{app → lib}/core/DevPortalContext.d.ts +0 -0
- /package/dist/{app → lib}/core/DevPortalContext.js +0 -0
- /package/dist/{app → lib}/core/helmet.d.ts +0 -0
- /package/dist/{app → lib}/core/helmet.js +0 -0
- /package/dist/{app → lib}/core/icons.d.ts +0 -0
- /package/dist/{app → lib}/core/icons.js +0 -0
- /package/dist/{app → lib}/core/plugins.d.ts +0 -0
- /package/dist/{app → lib}/core/plugins.js +0 -0
- /package/dist/{app → lib}/core/router.d.ts +0 -0
- /package/dist/{app → lib}/core/router.js +0 -0
- /package/dist/{app → lib}/core/types/combine.d.ts +0 -0
- /package/dist/{app → lib}/core/types/combine.js +0 -0
- /package/dist/{app → lib}/oas/graphql/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/graphql/index.js +0 -0
- /package/dist/{app → lib}/oas/graphql/server.d.ts +0 -0
- /package/dist/{app → lib}/oas/graphql/server.js +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/index.js +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/resolveRef.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/dereference/resolveRef.js +0 -0
- /package/dist/{app → lib}/oas/parser/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/index.js +0 -0
- /package/dist/{app → lib}/oas/parser/upgrade/index.d.ts +0 -0
- /package/dist/{app → lib}/oas/parser/upgrade/index.js +0 -0
- /package/dist/{app → lib}/plugins/api-key/SettingsApiKeys.d.ts +0 -0
- /package/dist/{app → lib}/plugins/api-key/SettingsApiKeys.js +0 -0
- /package/dist/{app → lib}/plugins/api-key/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/api-key/index.js +0 -0
- /package/dist/{app → lib}/plugins/markdown/MdxPage.d.ts +0 -0
- /package/dist/{app → lib}/plugins/markdown/MdxPage.js +0 -0
- /package/dist/{app → lib}/plugins/markdown/Toc.d.ts +0 -0
- /package/dist/{app → lib}/plugins/markdown/Toc.js +0 -0
- /package/dist/{app → lib}/plugins/markdown/generateRoutes.d.ts +0 -0
- /package/dist/{app → lib}/plugins/markdown/generateRoutes.js +0 -0
- /package/dist/{app → lib}/plugins/markdown/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/markdown/index.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/ColorizedParam.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ColorizedParam.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/MakeRequest.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/MakeRequest.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/MethodBadge.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/MethodBadge.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationList.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationList.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationListItem.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/OperationListItem.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/ParameterList.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ParameterList.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/ParameterListItem.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ParameterListItem.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/RequestBodySidecarBox.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/ResponsesSidecarBox.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/Select.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/Select.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/Sidecar.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/Sidecar.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/SidecarBox.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/SidecarBox.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/fragment-masking.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/gql.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/gql.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/graphql.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/graphql.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/graphql/index.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/index.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/playground/Playground.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/playground/Playground.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/generateSchemaExample.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/urql.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/util/urql.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/worker/createSharedWorkerClient.js +0 -0
- /package/dist/{app → lib}/plugins/openapi/worker/worker.d.ts +0 -0
- /package/dist/{app → lib}/plugins/openapi/worker/worker.js +0 -0
- /package/dist/{app → lib}/plugins/redirect/index.d.ts +0 -0
- /package/dist/{app → lib}/plugins/redirect/index.js +0 -0
- /package/dist/{app → lib}/ui/Button.js +0 -0
- /package/dist/{app → lib}/ui/Callout.d.ts +0 -0
- /package/dist/{app → lib}/ui/Callout.js +0 -0
- /package/dist/{app → lib}/ui/Card.d.ts +0 -0
- /package/dist/{app → lib}/ui/Card.js +0 -0
- /package/dist/{app → lib}/ui/Note.d.ts +0 -0
- /package/dist/{app → lib}/ui/Note.js +0 -0
- /package/dist/{app → lib}/ui/Tabs.d.ts +0 -0
- /package/dist/{app → lib}/ui/Tabs.js +0 -0
- /package/dist/{app → lib}/util/MdxComponents.d.ts +0 -0
- /package/dist/{app → lib}/util/MdxComponents.js +0 -0
- /package/dist/{app → lib}/util/cn.d.ts +0 -0
- /package/dist/{app → lib}/util/cn.js +0 -0
- /package/dist/{app → lib}/util/createVariantComponent.d.ts +0 -0
- /package/dist/{app → lib}/util/createVariantComponent.js +0 -0
- /package/dist/{app → lib}/util/createWaitForNotify.d.ts +0 -0
- /package/dist/{app → lib}/util/createWaitForNotify.js +0 -0
- /package/dist/{app → lib}/util/groupBy.d.ts +0 -0
- /package/dist/{app → lib}/util/groupBy.js +0 -0
- /package/dist/{app → lib}/util/joinPath.d.ts +0 -0
- /package/dist/{app → lib}/util/joinPath.js +0 -0
- /package/dist/{app → lib}/util/pastellize.d.ts +0 -0
- /package/dist/{app → lib}/util/pastellize.js +0 -0
- /package/dist/{app → lib}/util/slugify.d.ts +0 -0
- /package/dist/{app → lib}/util/slugify.js +0 -0
- /package/dist/{app → lib}/util/traverseNavigation.d.ts +0 -0
- /package/dist/{app → lib}/util/traverseNavigation.js +0 -0
- /package/dist/{app → lib}/util/useScrollToAnchor.d.ts +0 -0
- /package/dist/{app → lib}/util/useScrollToAnchor.js +0 -0
- /package/dist/{app → lib}/util/useScrollToTop.d.ts +0 -0
- /package/dist/{app → lib}/util/useScrollToTop.js +0 -0
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { JSONSchema4, JSONSchema6 } from "json-schema";
|
|
2
|
-
import { resolveLocalRef } from "./resolveRef.js";
|
|
3
|
-
|
|
4
|
-
export type JSONSchema = JSONSchema4 | JSONSchema6;
|
|
5
|
-
|
|
6
|
-
type CustomResolver = (ref: string) => Promise<JSONSchema | undefined>;
|
|
7
|
-
|
|
8
|
-
const cache = new Map<JSONSchema, JSONSchema>();
|
|
9
|
-
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
-
const isIndexableObject = (obj: any): obj is Record<string, any> =>
|
|
12
|
-
obj !== null && typeof obj === "object";
|
|
13
|
-
|
|
14
|
-
// Taken and inspired from `dereference-json-schema` package.
|
|
15
|
-
export const dereference = async (
|
|
16
|
-
schema: JSONSchema,
|
|
17
|
-
resolvers: CustomResolver[] = [],
|
|
18
|
-
) => {
|
|
19
|
-
if (cache.has(schema)) {
|
|
20
|
-
return cache.get(schema)!;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const cloned = structuredClone(schema);
|
|
24
|
-
const visited = new Set();
|
|
25
|
-
|
|
26
|
-
const resolve = async (current: unknown, path: string) => {
|
|
27
|
-
if (isIndexableObject(current)) {
|
|
28
|
-
if (visited.has(current)) {
|
|
29
|
-
return current;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
visited.add(current);
|
|
33
|
-
|
|
34
|
-
if (Array.isArray(current)) {
|
|
35
|
-
for (let index = 0; index < current.length; index++) {
|
|
36
|
-
current[index] = await resolve(current[index], `${path}/${index}`);
|
|
37
|
-
}
|
|
38
|
-
} else {
|
|
39
|
-
if ("$ref" in current && typeof current.$ref === "string") {
|
|
40
|
-
for (const resolver of resolvers) {
|
|
41
|
-
const resolved = await resolver(current.$ref);
|
|
42
|
-
if (resolved) return resolved;
|
|
43
|
-
}
|
|
44
|
-
return await resolveLocalRef(cloned, current.$ref);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
for (const key in current) {
|
|
48
|
-
current[key] = await resolve(current[key], `${path}/${key}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return current;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const result = (await resolve(cloned, "#")) as JSONSchema;
|
|
57
|
-
cache.set(schema, result);
|
|
58
|
-
return result;
|
|
59
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { JSONSchema } from "./index.js";
|
|
2
|
-
|
|
3
|
-
const cache = new Map<JSONSchema, Map<string, unknown>>();
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Resolves a $ref pointer in a schema and returns the referenced value.
|
|
7
|
-
*/
|
|
8
|
-
export const resolveLocalRef = (schema: JSONSchema, ref: string): unknown => {
|
|
9
|
-
if (!cache.has(schema)) {
|
|
10
|
-
cache.set(schema, new Map<string, unknown>());
|
|
11
|
-
}
|
|
12
|
-
const schemaCache = cache.get(schema);
|
|
13
|
-
|
|
14
|
-
if (schemaCache!.has(ref)) {
|
|
15
|
-
return schemaCache!.get(ref);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const path = ref.split("/").slice(1);
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
let current: any = schema;
|
|
22
|
-
for (const segment of path) {
|
|
23
|
-
if (!current || typeof current !== "object") {
|
|
24
|
-
// we've reached a dead end
|
|
25
|
-
current = null;
|
|
26
|
-
}
|
|
27
|
-
current = current[segment] ?? null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
schemaCache!.set(ref, current);
|
|
31
|
-
return current;
|
|
32
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { OpenAPIV3, type OpenAPIV3_1 } from "openapi-types";
|
|
2
|
-
import { dereference, type JSONSchema } from "./dereference/index.js";
|
|
3
|
-
import { upgradeSchema } from "./upgrade/index.js";
|
|
4
|
-
|
|
5
|
-
type ReferenceObject = OpenAPIV3_1.ReferenceObject;
|
|
6
|
-
type DeepOmitReference<T> = T extends ReferenceObject
|
|
7
|
-
? never
|
|
8
|
-
: T extends object
|
|
9
|
-
? { [K in keyof T]: DeepOmitReference<T[K]> }
|
|
10
|
-
: T;
|
|
11
|
-
|
|
12
|
-
// type Prettify<T> = {
|
|
13
|
-
// [K in keyof T]: T[K];
|
|
14
|
-
// } & {};
|
|
15
|
-
|
|
16
|
-
export type OpenAPIDocument = DeepOmitReference<OpenAPIV3_1.Document>;
|
|
17
|
-
export type ResponseObject = DeepOmitReference<OpenAPIV3_1.ResponseObject>;
|
|
18
|
-
export type OperationObject = DeepOmitReference<OpenAPIV3_1.OperationObject>;
|
|
19
|
-
export type PathsObject = DeepOmitReference<OpenAPIV3_1.PathsObject>;
|
|
20
|
-
export type PathItemObject = DeepOmitReference<OpenAPIV3_1.PathItemObject>;
|
|
21
|
-
export type ParameterObject = DeepOmitReference<OpenAPIV3_1.ParameterObject>;
|
|
22
|
-
export type TagObject = DeepOmitReference<OpenAPIV3_1.TagObject>;
|
|
23
|
-
export type ExampleObject = DeepOmitReference<OpenAPIV3_1.ExampleObject>;
|
|
24
|
-
export type EncodingObject = DeepOmitReference<OpenAPIV3_1.EncodingObject>;
|
|
25
|
-
export type SchemaObject = DeepOmitReference<OpenAPIV3_1.SchemaObject>;
|
|
26
|
-
|
|
27
|
-
export const HttpMethods = Object.values(OpenAPIV3.HttpMethods);
|
|
28
|
-
|
|
29
|
-
// class ValidationError extends Error {
|
|
30
|
-
// constructor(public errors: OutputUnit[]) {
|
|
31
|
-
// super("Validation error");
|
|
32
|
-
// }
|
|
33
|
-
// }
|
|
34
|
-
|
|
35
|
-
// const getValidator = async (openApiVersion: string) => {
|
|
36
|
-
// if (openApiVersion.startsWith("3.0")) {
|
|
37
|
-
// const schema = (await import("./schemas/v3.0.json")) as any;
|
|
38
|
-
// return new Validator(schema, "4");
|
|
39
|
-
// }
|
|
40
|
-
// if (openApiVersion.startsWith("3.1")) {
|
|
41
|
-
// const schema = (await import("./schemas/v3.1.json")) as any;
|
|
42
|
-
// return new Validator(schema as any, "2020-12");
|
|
43
|
-
// }
|
|
44
|
-
|
|
45
|
-
// throw new Error(`Unsupported OpenAPI version: ${openApiVersion}`);
|
|
46
|
-
// };
|
|
47
|
-
|
|
48
|
-
const parseSchemaInput = async (
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
schemaInput: any,
|
|
51
|
-
): Promise<JSONSchema & { openapi?: string }> => {
|
|
52
|
-
if (typeof schemaInput === "string") {
|
|
53
|
-
if (schemaInput.trim().startsWith("{")) {
|
|
54
|
-
return JSON.parse(schemaInput);
|
|
55
|
-
}
|
|
56
|
-
if (schemaInput.includes("://")) {
|
|
57
|
-
const response = await fetch(schemaInput);
|
|
58
|
-
return (await response.json()) as JSONSchema;
|
|
59
|
-
}
|
|
60
|
-
const yaml = await import("yaml");
|
|
61
|
-
return yaml.parse(schemaInput);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (typeof schemaInput === "object") return schemaInput;
|
|
65
|
-
|
|
66
|
-
throw new Error("Unsupported schema input");
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Validates, dereferences and upgrades the OpenAPI schema (to v3.1) if necessary.
|
|
71
|
-
*/
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
export const validate = async (schemaInput: any) => {
|
|
74
|
-
const schema = await parseSchemaInput(schemaInput);
|
|
75
|
-
|
|
76
|
-
if (!schema.openapi) {
|
|
77
|
-
throw new Error("OpenAPI version is not defined");
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// const validator = await getValidator(schema.openapi);
|
|
81
|
-
// const result = validator.validate(schema);
|
|
82
|
-
//
|
|
83
|
-
// if (!result.valid) {
|
|
84
|
-
// throw new ValidationError(result.errors);
|
|
85
|
-
// }
|
|
86
|
-
|
|
87
|
-
const dereferenced = await dereference(schema);
|
|
88
|
-
|
|
89
|
-
const upgraded = upgradeSchema(
|
|
90
|
-
dereferenced as OpenAPIV3_1.Document | OpenAPIV3.Document,
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
return upgraded;
|
|
94
|
-
};
|