zudoku 0.1.1-dev.15 → 0.1.1-dev.17
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 -17
- 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/main.css +0 -137
- 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,143 +0,0 @@
|
|
|
1
|
-
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
|
-
import { ChevronRightIcon, ExternalLinkIcon } from "lucide-react";
|
|
4
|
-
import { NavLink, useLocation } from "react-router-dom";
|
|
5
|
-
|
|
6
|
-
import type {
|
|
7
|
-
NavigationCategory,
|
|
8
|
-
NavigationCategoryItem,
|
|
9
|
-
NavigationItem,
|
|
10
|
-
} from "../../core/DevPortalContext.js";
|
|
11
|
-
import { cn } from "../../util/cn.js";
|
|
12
|
-
import { joinPath } from "../../util/joinPath.js";
|
|
13
|
-
import { AnchorLink } from "../AnchorLink.js";
|
|
14
|
-
import { DynamicIcon, isValidIcon } from "../DynamicIcon.js";
|
|
15
|
-
import { useNavigationCollapsibleState } from "./useNavigationCollapsibleState.js";
|
|
16
|
-
import { checkHasActiveItem, isLinkItem, isPathItem } from "./util.js";
|
|
17
|
-
|
|
18
|
-
export const linkItem = cva(
|
|
19
|
-
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
20
|
-
{
|
|
21
|
-
variants: {
|
|
22
|
-
isActive: {
|
|
23
|
-
true: "text-primary font-medium",
|
|
24
|
-
false: "text-foreground/80",
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export const DATA_ANCHOR_ATTR = "data-anchor";
|
|
31
|
-
|
|
32
|
-
export const SideNavigationItem = ({
|
|
33
|
-
category,
|
|
34
|
-
item,
|
|
35
|
-
activeAnchor,
|
|
36
|
-
currentTopNavItem,
|
|
37
|
-
basePath = "",
|
|
38
|
-
}: {
|
|
39
|
-
category: NavigationCategory;
|
|
40
|
-
item: NavigationCategoryItem;
|
|
41
|
-
activeAnchor?: string;
|
|
42
|
-
currentTopNavItem?: NavigationItem;
|
|
43
|
-
basePath?: string;
|
|
44
|
-
}) => {
|
|
45
|
-
const currentPath = isPathItem(item) ? joinPath(basePath, item.path) : "";
|
|
46
|
-
const location = useLocation();
|
|
47
|
-
|
|
48
|
-
const [isOpen, setIsOpen] = useNavigationCollapsibleState({
|
|
49
|
-
item,
|
|
50
|
-
path: currentPath,
|
|
51
|
-
defaultOpen: () => checkHasActiveItem(item, location.pathname, currentPath),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
if (isLinkItem(item)) {
|
|
55
|
-
const classes = cn(
|
|
56
|
-
"flex items-center gap-2",
|
|
57
|
-
linkItem({ isActive: item.href === location.pathname }),
|
|
58
|
-
);
|
|
59
|
-
return item.href.startsWith("http") ? (
|
|
60
|
-
<a
|
|
61
|
-
className={classes}
|
|
62
|
-
href={item.href}
|
|
63
|
-
target="_blank"
|
|
64
|
-
rel="noopener noreferrer"
|
|
65
|
-
>
|
|
66
|
-
{item.label}
|
|
67
|
-
<ExternalLinkIcon size={14} />
|
|
68
|
-
</a>
|
|
69
|
-
) : (
|
|
70
|
-
<NavLink className={classes} to={item.href}>
|
|
71
|
-
{item.label}
|
|
72
|
-
</NavLink>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const linkContent = (
|
|
77
|
-
<div className="flex justify-between w-full">
|
|
78
|
-
<div className="flex items-center gap-2 truncate w-full">
|
|
79
|
-
{isValidIcon(item.icon) && <DynamicIcon name={item.icon} size={16} />}
|
|
80
|
-
{typeof item.label !== "string" ? (
|
|
81
|
-
item.label
|
|
82
|
-
) : (
|
|
83
|
-
<span className="truncate">{item.label}</span>
|
|
84
|
-
)}
|
|
85
|
-
</div>
|
|
86
|
-
{item.children && (
|
|
87
|
-
<ChevronRightIcon
|
|
88
|
-
size={16}
|
|
89
|
-
className="transition shrink-0 group-data-[state=open]:rotate-90"
|
|
90
|
-
/>
|
|
91
|
-
)}
|
|
92
|
-
</div>
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<li title={typeof item.label === "string" ? item.label : item.title}>
|
|
97
|
-
{item.children ? (
|
|
98
|
-
<Collapsible.Root
|
|
99
|
-
open={isOpen}
|
|
100
|
-
onOpenChange={() => setIsOpen((prev) => !prev)}
|
|
101
|
-
className="flex flex-col"
|
|
102
|
-
>
|
|
103
|
-
<Collapsible.Trigger
|
|
104
|
-
className={cn("group text-start", linkItem({ isActive: false }))}
|
|
105
|
-
>
|
|
106
|
-
{linkContent}
|
|
107
|
-
</Collapsible.Trigger>
|
|
108
|
-
<Collapsible.Content className="CollapsibleContent ms-[calc(var(--padding-nav-item)*1.125)]">
|
|
109
|
-
<ul className="mt-1 border-border border-l ps-1.5">
|
|
110
|
-
{item.children.map((child) => (
|
|
111
|
-
<SideNavigationItem
|
|
112
|
-
key={isPathItem(child) ? child.path : child.href}
|
|
113
|
-
category={category}
|
|
114
|
-
item={child}
|
|
115
|
-
activeAnchor={activeAnchor}
|
|
116
|
-
currentTopNavItem={currentTopNavItem}
|
|
117
|
-
basePath={currentPath}
|
|
118
|
-
/>
|
|
119
|
-
))}
|
|
120
|
-
</ul>
|
|
121
|
-
</Collapsible.Content>
|
|
122
|
-
</Collapsible.Root>
|
|
123
|
-
) : item.path.startsWith("#") ? (
|
|
124
|
-
<AnchorLink
|
|
125
|
-
to={item.path}
|
|
126
|
-
{...{ [DATA_ANCHOR_ATTR]: item.path }}
|
|
127
|
-
className={linkItem({
|
|
128
|
-
isActive: item.path.slice(1) === activeAnchor,
|
|
129
|
-
})}
|
|
130
|
-
>
|
|
131
|
-
{linkContent}
|
|
132
|
-
</AnchorLink>
|
|
133
|
-
) : (
|
|
134
|
-
<NavLink
|
|
135
|
-
className={({ isActive }) => linkItem({ isActive })}
|
|
136
|
-
to={currentPath}
|
|
137
|
-
>
|
|
138
|
-
{linkContent}
|
|
139
|
-
</NavLink>
|
|
140
|
-
)}
|
|
141
|
-
</li>
|
|
142
|
-
);
|
|
143
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type PropsWithChildren } from "react";
|
|
2
|
-
|
|
3
|
-
export const SideNavigationWrapper = forwardRef<
|
|
4
|
-
HTMLDivElement,
|
|
5
|
-
PropsWithChildren
|
|
6
|
-
>(({ children }, ref) => {
|
|
7
|
-
return (
|
|
8
|
-
<nav
|
|
9
|
-
className="hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0 p-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 pt-[--padding-content-top] w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2"
|
|
10
|
-
ref={ref}
|
|
11
|
-
>
|
|
12
|
-
{children}
|
|
13
|
-
</nav>
|
|
14
|
-
);
|
|
15
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { useLocation } from "react-router-dom";
|
|
3
|
-
import type { NavigationNode } from "../../util/traverseNavigation.js";
|
|
4
|
-
import { checkHasActiveItem } from "./util.js";
|
|
5
|
-
|
|
6
|
-
export const useNavigationCollapsibleState = ({
|
|
7
|
-
item,
|
|
8
|
-
defaultOpen,
|
|
9
|
-
path,
|
|
10
|
-
}: {
|
|
11
|
-
item: NavigationNode;
|
|
12
|
-
defaultOpen: () => boolean;
|
|
13
|
-
path: string;
|
|
14
|
-
}) => {
|
|
15
|
-
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
16
|
-
const location = useLocation();
|
|
17
|
-
const previousLocationPath = useRef(location.pathname);
|
|
18
|
-
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
if (!isOpen && previousLocationPath.current !== location.pathname) {
|
|
21
|
-
setIsOpen(checkHasActiveItem(item, location.pathname, path));
|
|
22
|
-
}
|
|
23
|
-
previousLocationPath.current = location.pathname;
|
|
24
|
-
}, [isOpen, item, path, location.pathname]);
|
|
25
|
-
|
|
26
|
-
return [isOpen, setIsOpen] as const;
|
|
27
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,164 +0,0 @@
|
|
|
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
|
-
}
|
package/src/app/core/helmet.ts
DELETED
package/src/app/core/icons.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "lucide-react";
|
package/src/app/core/plugins.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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";
|
package/src/app/core/router.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "react-router-dom";
|
|
@@ -1,16 +0,0 @@
|
|
|
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]>;
|