zudoku 0.0.0-f0602bf → 0.0.0-f0b4321
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/README.md +2 -2
- package/dist/app/ZuploBuildConfig.d.ts +11 -121
- package/dist/app/ZuploBuildConfig.js +8 -8
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +21 -5
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +0 -2
- package/dist/app/entry.client.js +0 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +0 -2
- package/dist/app/entry.server.js +0 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +7 -7
- package/dist/app/env.js +8 -0
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +15 -20
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +7 -6
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/config.d.ts +11 -0
- package/dist/config/loader.js +4 -8
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +20 -44
- package/dist/config/validators/BuildSchema.js +8 -14
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +7364 -0
- package/dist/config/validators/InputNavigationSchema.js +71 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +145 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +95 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1813 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +474 -5556
- package/dist/config/validators/validate.js +106 -73
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.d.ts +1 -0
- package/dist/config/validators/validate.test.js +141 -0
- package/dist/config/validators/validate.test.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/issuer.d.ts +2 -0
- package/dist/lib/auth/issuer.js +37 -0
- package/dist/lib/auth/issuer.js.map +1 -0
- package/dist/lib/auth/issuer.test.d.ts +1 -0
- package/dist/lib/auth/issuer.test.js +94 -0
- package/dist/lib/auth/issuer.test.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +0 -5
- package/dist/lib/authentication/AuthenticationPlugin.js +0 -12
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -0
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +6 -0
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
- package/dist/lib/authentication/providers/azureb2c.js +145 -0
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.js +3 -12
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +5 -2
- package/dist/lib/authentication/providers/openid.js +49 -5
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +2 -9
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +6 -5
- package/dist/lib/authentication/state.js +19 -6
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +1 -1
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +19 -18
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +6 -2
- package/dist/lib/components/Heading.js +7 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Main.js +4 -4
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +9 -5
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +11 -7
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -3
- package/dist/lib/components/TopNavigation.js +49 -44
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
- package/dist/lib/components/context/ZudokuContext.js +44 -26
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
- package/dist/lib/components/index.d.ts +39 -23
- package/dist/lib/components/index.js +15 -7
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +2 -2
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +15 -13
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +47 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarWrapper.d.ts → NavigationWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarWrapper.js → NavigationWrapper.js} +5 -5
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +12 -9
- package/dist/lib/components/navigation/utils.js +38 -18
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +13 -13
- package/dist/lib/core/ZudokuContext.js +21 -10
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -2
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +25 -0
- package/dist/lib/hooks/index.js +11 -0
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +5 -3
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
- package/dist/lib/plugins/api-catalog/index.js +10 -10
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +115 -23
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +3 -3
- package/dist/lib/plugins/api-keys/index.js +37 -18
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +15 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +30 -10
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +10 -2
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +3 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +11 -91
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -3
- package/dist/lib/plugins/openapi/index.js +10 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +54 -32
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +3 -8
- package/dist/lib/plugins/openapi/playground/Playground.js +110 -92
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -31
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +5 -5
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +5 -4
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +2 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/shiki.d.ts +8 -12
- package/dist/lib/shiki.js +11 -13
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +6 -5
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +1 -2
- package/dist/lib/ui/CodeBlock.js +10 -11
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +3 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +3 -1
- package/dist/lib/ui/SyntaxHighlight.js +3 -2
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +9 -1
- package/dist/lib/util/MdxComponents.js +4 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/humanFileSize.d.ts +6 -0
- package/dist/lib/util/humanFileSize.js +14 -0
- package/dist/lib/util/humanFileSize.js.map +1 -0
- package/dist/lib/util/humanFileSize.test.d.ts +1 -0
- package/dist/lib/util/humanFileSize.test.js +22 -0
- package/dist/lib/util/humanFileSize.test.js.map +1 -0
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +3 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +4 -4
- package/dist/vite/api/SchemaManager.js +25 -21
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +4 -4
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +10 -34
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +12 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/css/plugin.js +11 -0
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +29 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-api.js +8 -8
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +2 -0
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-custom-pages.js +2 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.js +61 -59
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +6 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +17 -38
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-sidebar.d.ts → plugin-navigation.d.ts} +1 -1
- package/dist/vite/{plugin-sidebar.js → plugin-navigation.js} +20 -19
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +234 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +312 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.js +4 -6
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +45 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/lib/Alert-Cig_8hW6.js +161 -0
- package/lib/Alert-Cig_8hW6.js.map +1 -0
- package/lib/{Button-u7M2QYds.js → Button-B3o-2Xdf.js} +3 -3
- package/lib/{Button-u7M2QYds.js.map → Button-B3o-2Xdf.js.map} +1 -1
- package/lib/{Card-DkH-AU1V.js → Card-CMDQUPM4.js} +2 -2
- package/lib/{Card-DkH-AU1V.js.map → Card-CMDQUPM4.js.map} +1 -1
- package/lib/CodeBlock-BaBgX9Wy.js +85 -0
- package/lib/CodeBlock-BaBgX9Wy.js.map +1 -0
- package/lib/Command-C9AC5cf-.js +140 -0
- package/lib/Command-C9AC5cf-.js.map +1 -0
- package/lib/{Dialog-irKZWXGg.js → Dialog-DMWw1doX.js} +26 -26
- package/lib/Dialog-DMWw1doX.js.map +1 -0
- package/lib/{Drawer-DZ214i5V.js → Drawer-DXGPOKPx.js} +2 -2
- package/lib/{Drawer-DZ214i5V.js.map → Drawer-DXGPOKPx.js.map} +1 -1
- package/lib/MdxPage-D8Med7IR.js +110 -0
- package/lib/MdxPage-D8Med7IR.js.map +1 -0
- package/lib/OasProvider-YexVRErA.js +35 -0
- package/lib/OasProvider-YexVRErA.js.map +1 -0
- package/lib/{OperationList-CkKcRPvk.js → OperationList-CL_tp7DC.js} +1749 -1728
- package/lib/OperationList-CL_tp7DC.js.map +1 -0
- package/lib/Pagination-Bcjbdo_g.js +37 -0
- package/lib/Pagination-Bcjbdo_g.js.map +1 -0
- package/lib/RouteGuard-Vnlz_t51.js +737 -0
- package/lib/RouteGuard-Vnlz_t51.js.map +1 -0
- package/lib/{SchemaList-BUiEgmw6.js → SchemaList-BNDTWO1B.js} +32 -43
- package/lib/SchemaList-BNDTWO1B.js.map +1 -0
- package/lib/{SchemaView-DSgzGi1L.js → SchemaView-DdKqED8D.js} +95 -104
- package/lib/SchemaView-DdKqED8D.js.map +1 -0
- package/lib/SignUp-BkAQMKsK.js +56 -0
- package/lib/SignUp-BkAQMKsK.js.map +1 -0
- package/lib/Slot-CrCBhP3G.js +15743 -0
- package/lib/Slot-CrCBhP3G.js.map +1 -0
- package/lib/{SyntaxHighlight-DTgNHbGp.js → SyntaxHighlight-CVe58ZSY.js} +4683 -3484
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +1 -0
- package/lib/{Toc-Ccycwd-T.js → Toc-CpsFSXeD.js} +3 -3
- package/lib/{Toc-Ccycwd-T.js.map → Toc-CpsFSXeD.js.map} +1 -1
- package/lib/{chunk-BAXFHI7N-C9WnHsLV.js → chunk-DQRVZFIR-DHK7_Ilc.js} +701 -701
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +1 -0
- package/lib/{circular-D1Bwr5bf.js → circular-BJUzZQ5q.js} +1812 -1807
- package/lib/circular-BJUzZQ5q.js.map +1 -0
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-BOFVZgHd.js → cn-dYga0KKN.js} +237 -250
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/{createServer-BZp1gEBL.js → createServer-C8-YhyiB.js} +2459 -2448
- package/lib/createServer-C8-YhyiB.js.map +1 -0
- package/lib/errors-CKo4K1aM.js +78 -0
- package/lib/errors-CKo4K1aM.js.map +1 -0
- package/lib/hook-CZjW2buS.js +1510 -0
- package/lib/hook-CZjW2buS.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-4XtG1tlD.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-4XtG1tlD.js.map} +1 -1
- package/lib/index-B3xhxwZH.js +3469 -0
- package/lib/index-B3xhxwZH.js.map +1 -0
- package/lib/index-B4yKFxne.js +3980 -0
- package/lib/index-B4yKFxne.js.map +1 -0
- package/lib/index-Bm35Tkgf.js +107 -0
- package/lib/index-Bm35Tkgf.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-C1S4w-gl.js → index-DI5SPFK9.js} +2 -2
- package/lib/{index-C1S4w-gl.js.map → index-DI5SPFK9.js.map} +1 -1
- package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
- package/lib/index-DmNq2fbN.js.map +1 -0
- package/lib/index.esm-Cp4wkyud.js +1236 -0
- package/lib/index.esm-Cp4wkyud.js.map +1 -0
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +54 -38
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +6 -5
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +6 -80
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Dialog.js +40 -40
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +80 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +5 -4
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/{useExposedProps-DG8J6ewJ.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-DG8J6ewJ.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +2 -2
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +9971 -0
- package/lib/zudoku.auth-azureb2c.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +39 -48
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +381 -406
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +29 -30
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +21 -13
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +45 -45
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +512 -4971
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +12 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +19 -69
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +211 -117
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +91 -70
- package/src/app/ZuploBuildConfig.ts +8 -8
- package/src/app/defaultTheme.css +68 -49
- package/src/app/demo.tsx +24 -6
- package/src/app/entry.client.tsx +0 -2
- package/src/app/entry.server.tsx +0 -2
- package/src/app/env.ts +8 -0
- package/src/app/main.css +15 -57
- package/src/app/main.tsx +18 -24
- package/src/app/standalone.tsx +7 -6
- package/src/lib/auth/issuer.test.ts +120 -0
- package/src/lib/auth/issuer.ts +41 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +0 -14
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/providers/auth0.tsx +1 -1
- package/src/lib/authentication/providers/azureb2c.tsx +196 -0
- package/src/lib/authentication/providers/clerk.tsx +3 -12
- package/src/lib/authentication/providers/openid.tsx +76 -4
- package/src/lib/authentication/providers/supabase.tsx +2 -9
- package/src/lib/authentication/state.ts +37 -7
- package/src/lib/components/Autocomplete.tsx +2 -1
- package/src/lib/components/Banner.tsx +1 -2
- package/src/lib/components/BuildCheck.tsx +1 -1
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +25 -22
- package/src/lib/components/Heading.tsx +16 -8
- package/src/lib/components/Main.tsx +9 -9
- package/src/lib/components/Markdown.tsx +17 -9
- package/src/lib/components/MobileTopNavigation.tsx +69 -15
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +5 -4
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +75 -68
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/context/ZudokuContext.ts +50 -32
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/index.ts +16 -10
- package/src/lib/components/navigation/{Sidebar.tsx → Navigation.tsx} +18 -16
- package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +1 -1
- package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +17 -15
- package/src/lib/components/navigation/NavigationItem.tsx +151 -0
- package/src/lib/components/navigation/{SidebarWrapper.tsx → NavigationWrapper.tsx} +7 -4
- package/src/lib/components/navigation/utils.ts +52 -29
- package/src/lib/core/ZudokuContext.ts +36 -20
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/index.ts +11 -0
- package/src/lib/hooks/useEvent.test.tsx +7 -5
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-catalog/index.tsx +19 -19
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +238 -70
- package/src/lib/plugins/api-keys/index.tsx +50 -23
- package/src/lib/plugins/custom-pages/index.tsx +21 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +76 -21
- package/src/lib/plugins/markdown/index.tsx +28 -41
- package/src/lib/plugins/openapi/OperationList.tsx +12 -20
- package/src/lib/plugins/openapi/OperationListItem.tsx +3 -3
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
- package/src/lib/plugins/openapi/SchemaList.tsx +5 -11
- package/src/lib/plugins/openapi/Sidecar.tsx +12 -97
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +5 -5
- package/src/lib/plugins/openapi/graphql/graphql.ts +6 -6
- package/src/lib/plugins/openapi/index.tsx +12 -12
- package/src/lib/plugins/openapi/interfaces.ts +3 -3
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +8 -1
- package/src/lib/plugins/openapi/playground/Headers.tsx +217 -115
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +13 -16
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +4 -5
- package/src/lib/plugins/openapi/playground/Playground.tsx +253 -288
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +2 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +149 -108
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -89
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -11
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
- package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +6 -5
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/shiki.ts +21 -22
- package/src/lib/ui/Alert.tsx +45 -39
- package/src/lib/ui/Callout.tsx +1 -0
- package/src/lib/ui/CodeBlock.tsx +40 -54
- package/src/lib/ui/Dialog.tsx +11 -7
- package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +11 -3
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/util/MdxComponents.tsx +13 -2
- package/src/lib/util/humanFileSize.test.ts +24 -0
- package/src/lib/util/humanFileSize.ts +16 -0
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -3
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
- package/dist/config/validators/InputSidebarSchema.js +0 -62
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
- package/dist/lib/components/navigation/Sidebar.js +0 -10
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -11
- package/dist/lib/components/navigation/SidebarItem.js +0 -49
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
- package/dist/lib/plugins/markdown/resolver.js +0 -46
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -19
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +0 -2
- package/dist/vite/plugin-configure-tailwind.js +0 -38
- package/dist/vite/plugin-configure-tailwind.js.map +0 -1
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -5
- package/dist/vite/plugin-theme-css.js +0 -77
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/lib/Callout-CtCQJ6Cc.js +0 -230
- package/lib/Callout-CtCQJ6Cc.js.map +0 -1
- package/lib/CategoryHeading-BA7lKNWz.js +0 -10
- package/lib/CategoryHeading-BA7lKNWz.js.map +0 -1
- package/lib/Dialog-irKZWXGg.js.map +0 -1
- package/lib/Markdown-BNG8bTDA.js +0 -7691
- package/lib/Markdown-BNG8bTDA.js.map +0 -1
- package/lib/MdxPage-D74eGiYZ.js +0 -84
- package/lib/MdxPage-D74eGiYZ.js.map +0 -1
- package/lib/OasProvider-D61BSWef.js +0 -33
- package/lib/OasProvider-D61BSWef.js.map +0 -1
- package/lib/OperationList-CkKcRPvk.js.map +0 -1
- package/lib/Pagination-CeFxTDan.js +0 -36
- package/lib/Pagination-CeFxTDan.js.map +0 -1
- package/lib/RouteGuard-CIyGFkFD.js +0 -55
- package/lib/RouteGuard-CIyGFkFD.js.map +0 -1
- package/lib/SchemaList-BUiEgmw6.js.map +0 -1
- package/lib/SchemaView-DSgzGi1L.js.map +0 -1
- package/lib/SignUp-DCgoDR--.js +0 -63
- package/lib/SignUp-DCgoDR--.js.map +0 -1
- package/lib/Slot-Dw-g06lX.js +0 -160
- package/lib/Slot-Dw-g06lX.js.map +0 -1
- package/lib/SyntaxHighlight-DTgNHbGp.js.map +0 -1
- package/lib/chunk-BAXFHI7N-C9WnHsLV.js.map +0 -1
- package/lib/circular-D1Bwr5bf.js.map +0 -1
- package/lib/cn-BOFVZgHd.js.map +0 -1
- package/lib/createServer-BZp1gEBL.js.map +0 -1
- package/lib/hook-BpiAQVtd.js +0 -1446
- package/lib/hook-BpiAQVtd.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-DEr_Ta6s.js +0 -4977
- package/lib/index-DEr_Ta6s.js.map +0 -1
- package/lib/index-E90CTqBl.js +0 -3268
- package/lib/index-E90CTqBl.js.map +0 -1
- package/lib/index-zddirpDj.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/index.esm-DSfX_eMP.js +0 -1216
- package/lib/index.esm-DSfX_eMP.js.map +0 -1
- package/lib/mutation-CJrIFMgY.js +0 -196
- package/lib/mutation-CJrIFMgY.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-B2LNwShM.js +0 -97
- package/lib/useMutation-B2LNwShM.js.map +0 -1
- package/src/lib/components/navigation/SidebarItem.tsx +0 -117
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/resolver.ts +0 -59
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -70
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
2
|
-
import { HTTPSnippet } from "@zudoku/httpsnippet";
|
|
3
2
|
import { useMemo, useState, useTransition } from "react";
|
|
4
3
|
import { useSearchParams } from "react-router";
|
|
5
|
-
import { useZudoku } from "zudoku/
|
|
4
|
+
import { useZudoku } from "zudoku/hooks";
|
|
6
5
|
import { useAuthState } from "../../authentication/state.js";
|
|
7
6
|
import { PathRenderer } from "../../components/PathRenderer.js";
|
|
8
7
|
import type { SchemaObject } from "../../oas/parser/index.js";
|
|
@@ -21,53 +20,10 @@ import { ResponsesSidecarBox } from "./ResponsesSidecarBox.js";
|
|
|
21
20
|
import * as SidecarBox from "./SidecarBox.js";
|
|
22
21
|
import { SimpleSelect } from "./SimpleSelect.js";
|
|
23
22
|
import { useSelectedServer } from "./state.js";
|
|
23
|
+
import { createHttpSnippet, getConverted } from "./util/createHttpSnippet.js";
|
|
24
24
|
import { generateSchemaExample } from "./util/generateSchemaExample.js";
|
|
25
25
|
import { methodForColor } from "./util/methodToColor.js";
|
|
26
26
|
|
|
27
|
-
const getConverted = (snippet: HTTPSnippet, option: string) => {
|
|
28
|
-
let converted;
|
|
29
|
-
switch (option) {
|
|
30
|
-
case "shell":
|
|
31
|
-
converted = snippet.convert("shell", "curl");
|
|
32
|
-
break;
|
|
33
|
-
case "js":
|
|
34
|
-
converted = snippet.convert("javascript", "fetch");
|
|
35
|
-
break;
|
|
36
|
-
case "python":
|
|
37
|
-
converted = snippet.convert("python", "requests");
|
|
38
|
-
break;
|
|
39
|
-
case "java":
|
|
40
|
-
converted = snippet.convert("java", "okhttp");
|
|
41
|
-
break;
|
|
42
|
-
case "go":
|
|
43
|
-
converted = snippet.convert("go", "native");
|
|
44
|
-
break;
|
|
45
|
-
case "csharp":
|
|
46
|
-
converted = snippet.convert("csharp", "httpclient");
|
|
47
|
-
break;
|
|
48
|
-
case "kotlin":
|
|
49
|
-
converted = snippet.convert("kotlin", "okhttp");
|
|
50
|
-
break;
|
|
51
|
-
case "objc":
|
|
52
|
-
converted = snippet.convert("objc", "nsurlsession");
|
|
53
|
-
break;
|
|
54
|
-
case "php":
|
|
55
|
-
converted = snippet.convert("php", "http2");
|
|
56
|
-
break;
|
|
57
|
-
case "ruby":
|
|
58
|
-
converted = snippet.convert("ruby");
|
|
59
|
-
break;
|
|
60
|
-
case "swift":
|
|
61
|
-
converted = snippet.convert("swift");
|
|
62
|
-
break;
|
|
63
|
-
default:
|
|
64
|
-
converted = snippet.convert("shell");
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return converted ? converted[0] : "";
|
|
69
|
-
};
|
|
70
|
-
|
|
71
27
|
export const GetServerQuery = graphql(/* GraphQL */ `
|
|
72
28
|
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
73
29
|
schema(input: $input, type: $type) {
|
|
@@ -149,7 +105,7 @@ export const Sidecar = ({
|
|
|
149
105
|
const { selectedServer } = useSelectedServer(result.data.schema.servers);
|
|
150
106
|
|
|
151
107
|
const code = useMemo(() => {
|
|
152
|
-
const
|
|
108
|
+
const exampleBody =
|
|
153
109
|
selectedExample ??
|
|
154
110
|
(transformedRequestBodyContent?.[0]?.schema
|
|
155
111
|
? generateSchemaExample(
|
|
@@ -157,66 +113,24 @@ export const Sidecar = ({
|
|
|
157
113
|
)
|
|
158
114
|
: undefined);
|
|
159
115
|
|
|
160
|
-
const snippet =
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
operation.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
165
|
-
postData: example
|
|
116
|
+
const snippet = createHttpSnippet({
|
|
117
|
+
operation,
|
|
118
|
+
selectedServer,
|
|
119
|
+
exampleBody: exampleBody
|
|
166
120
|
? {
|
|
167
|
-
text: JSON.stringify(example, null, 2),
|
|
168
121
|
mimeType: "application/json",
|
|
122
|
+
text: JSON.stringify(exampleBody, null, 2),
|
|
169
123
|
}
|
|
170
|
-
:
|
|
171
|
-
headers: [
|
|
172
|
-
{ name: "Content-Type", value: "application/json" },
|
|
173
|
-
...(operation.parameters
|
|
174
|
-
?.filter((p) => p.in === "header" && p.required === true)
|
|
175
|
-
.map((p) => ({
|
|
176
|
-
name: p.name,
|
|
177
|
-
value:
|
|
178
|
-
p.examples?.find((x) => x.value)?.value ??
|
|
179
|
-
p.schema?.default ??
|
|
180
|
-
(p.schema?.type === "string"
|
|
181
|
-
? "string"
|
|
182
|
-
: p.schema?.type === "number" || p.schema?.type === "integer"
|
|
183
|
-
? "0"
|
|
184
|
-
: p.schema?.type === "boolean"
|
|
185
|
-
? "true"
|
|
186
|
-
: ""),
|
|
187
|
-
})) ?? []),
|
|
188
|
-
],
|
|
189
|
-
queryString:
|
|
190
|
-
operation.parameters
|
|
191
|
-
?.filter((p) => p.in === "query" && p.required === true)
|
|
192
|
-
.map((p) => ({
|
|
193
|
-
name: p.name,
|
|
194
|
-
value:
|
|
195
|
-
p.examples?.find((x) => x.value)?.value ??
|
|
196
|
-
p.schema?.default ??
|
|
197
|
-
(p.schema?.type === "string"
|
|
198
|
-
? "string"
|
|
199
|
-
: p.schema?.type === "number" || p.schema?.type === "integer"
|
|
200
|
-
? "0"
|
|
201
|
-
: p.schema?.type === "boolean"
|
|
202
|
-
? "true"
|
|
203
|
-
: ""),
|
|
204
|
-
})) ?? [],
|
|
205
|
-
httpVersion: "",
|
|
206
|
-
cookies: [],
|
|
207
|
-
headersSize: 0,
|
|
208
|
-
bodySize: 0,
|
|
124
|
+
: { mimeType: "application/json" },
|
|
209
125
|
});
|
|
210
126
|
|
|
211
127
|
return getConverted(snippet, selectedLang);
|
|
212
128
|
}, [
|
|
213
129
|
selectedExample,
|
|
214
130
|
transformedRequestBodyContent,
|
|
215
|
-
operation
|
|
216
|
-
operation.path,
|
|
131
|
+
operation,
|
|
217
132
|
selectedServer,
|
|
218
133
|
selectedLang,
|
|
219
|
-
operation.parameters,
|
|
220
134
|
]);
|
|
221
135
|
const [ref, isOnScreen] = useOnScreen({ rootMargin: "200px 0px 200px 0px" });
|
|
222
136
|
|
|
@@ -238,7 +152,7 @@ export const Sidecar = ({
|
|
|
238
152
|
<SidecarBox.Head className="flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs">
|
|
239
153
|
<span className="font-mono break-words leading-6">
|
|
240
154
|
<span className={cn("font-semibold", methodTextColor)}>
|
|
241
|
-
{operation.method.
|
|
155
|
+
{operation.method.toUpperCase()}
|
|
242
156
|
</span>
|
|
243
157
|
|
|
244
158
|
{path}
|
|
@@ -256,6 +170,7 @@ export const Sidecar = ({
|
|
|
256
170
|
<SidecarBox.Body className="p-0">
|
|
257
171
|
<CollapsibleCode>
|
|
258
172
|
<SyntaxHighlight
|
|
173
|
+
embedded
|
|
259
174
|
language={selectedLang}
|
|
260
175
|
noBackground
|
|
261
176
|
className="[--scrollbar-color:gray] rounded-none text-xs max-h-[500px] p-2"
|
|
@@ -19,7 +19,7 @@ type Documents = {
|
|
|
19
19
|
"\n query OperationsForTag(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tag(slug: $tag, untagged: $untagged) {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n next {\n name\n slug\n }\n prev {\n name\n slug\n }\n }\n }\n }\n": typeof types.OperationsForTagDocument;
|
|
20
20
|
"\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n": typeof types.GetSchemasDocument;
|
|
21
21
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": typeof types.GetServerQueryDocument;
|
|
22
|
-
"\n query
|
|
22
|
+
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n": typeof types.GetNavigationOperationsDocument;
|
|
23
23
|
};
|
|
24
24
|
const documents: Documents = {
|
|
25
25
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
@@ -34,8 +34,8 @@ const documents: Documents = {
|
|
|
34
34
|
types.GetSchemasDocument,
|
|
35
35
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n":
|
|
36
36
|
types.GetServerQueryDocument,
|
|
37
|
-
"\n query
|
|
38
|
-
types.
|
|
37
|
+
"\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n":
|
|
38
|
+
types.GetNavigationOperationsDocument,
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -78,8 +78,8 @@ export function graphql(
|
|
|
78
78
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
79
79
|
*/
|
|
80
80
|
export function graphql(
|
|
81
|
-
source: "\n query
|
|
82
|
-
): typeof import("./graphql.js").
|
|
81
|
+
source: "\n query GetNavigationOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n tags {\n slug\n name\n extensions\n operations {\n summary\n slug\n method\n operationId\n path\n }\n }\n components {\n schemas {\n __typename\n }\n }\n }\n }\n",
|
|
82
|
+
): typeof import("./graphql.js").GetNavigationOperationsDocument;
|
|
83
83
|
|
|
84
84
|
export function graphql(source: string) {
|
|
85
85
|
return (documents as any)[source] ?? {};
|
|
@@ -374,12 +374,12 @@ export type GetServerQueryQuery = {
|
|
|
374
374
|
};
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
-
export type
|
|
377
|
+
export type GetNavigationOperationsQueryVariables = Exact<{
|
|
378
378
|
input: Scalars["JSON"]["input"];
|
|
379
379
|
type: SchemaType;
|
|
380
380
|
}>;
|
|
381
381
|
|
|
382
|
-
export type
|
|
382
|
+
export type GetNavigationOperationsQuery = {
|
|
383
383
|
__typename?: "Query";
|
|
384
384
|
schema: {
|
|
385
385
|
__typename?: "Schema";
|
|
@@ -642,8 +642,8 @@ export const GetServerQueryDocument = new TypedDocumentString(`
|
|
|
642
642
|
GetServerQueryQuery,
|
|
643
643
|
GetServerQueryQueryVariables
|
|
644
644
|
>;
|
|
645
|
-
export const
|
|
646
|
-
query
|
|
645
|
+
export const GetNavigationOperationsDocument = new TypedDocumentString(`
|
|
646
|
+
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
647
647
|
schema(input: $input, type: $type) {
|
|
648
648
|
tags {
|
|
649
649
|
slug
|
|
@@ -665,6 +665,6 @@ export const GetSidebarOperationsDocument = new TypedDocumentString(`
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
`) as unknown as TypedDocumentString<
|
|
668
|
-
|
|
669
|
-
|
|
668
|
+
GetNavigationOperationsQuery,
|
|
669
|
+
GetNavigationOperationsQueryVariables
|
|
670
670
|
>;
|
|
@@ -7,16 +7,16 @@ import { Button } from "../../ui/Button.js";
|
|
|
7
7
|
import { joinUrl } from "../../util/joinUrl.js";
|
|
8
8
|
import { GraphQLClient } from "./client/GraphQLClient.js";
|
|
9
9
|
import { createQuery } from "./client/useCreateQuery.js";
|
|
10
|
-
import type {
|
|
10
|
+
import type { GetNavigationOperationsQuery as GetNavigationOperationsQueryResult } from "./graphql/graphql.js";
|
|
11
11
|
import { graphql } from "./graphql/index.js";
|
|
12
12
|
import { type OasPluginConfig } from "./interfaces.js";
|
|
13
13
|
import type { PlaygroundContentProps } from "./playground/Playground.js";
|
|
14
14
|
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
15
|
-
import {
|
|
15
|
+
import { createNavigationCategory } from "./util/createNavigationCategory.js";
|
|
16
16
|
import { getRoutes, getVersions } from "./util/getRoutes.js";
|
|
17
17
|
|
|
18
|
-
export const
|
|
19
|
-
query
|
|
18
|
+
export const GetNavigationOperationsQuery = graphql(`
|
|
19
|
+
query GetNavigationOperations($input: JSON!, $type: SchemaType!) {
|
|
20
20
|
schema(input: $input, type: $type) {
|
|
21
21
|
tags {
|
|
22
22
|
slug
|
|
@@ -40,14 +40,14 @@ export const GetSidebarOperationsQuery = graphql(`
|
|
|
40
40
|
`);
|
|
41
41
|
|
|
42
42
|
export type OperationResult =
|
|
43
|
-
|
|
43
|
+
GetNavigationOperationsQueryResult["schema"]["tags"][number]["operations"][number];
|
|
44
44
|
|
|
45
45
|
export type OpenApiPluginOptions = OasPluginConfig;
|
|
46
46
|
|
|
47
47
|
export const UNTAGGED_PATH = "~endpoints";
|
|
48
48
|
|
|
49
49
|
export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
50
|
-
const basePath = joinUrl(config.
|
|
50
|
+
const basePath = joinUrl(config.path);
|
|
51
51
|
const client = new GraphQLClient(config);
|
|
52
52
|
|
|
53
53
|
return {
|
|
@@ -117,7 +117,7 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
|
117
117
|
);
|
|
118
118
|
},
|
|
119
119
|
}),
|
|
120
|
-
|
|
120
|
+
getNavigation: async (path, context) => {
|
|
121
121
|
if (!matchPath({ path: basePath, end: false }, path)) {
|
|
122
122
|
return [];
|
|
123
123
|
}
|
|
@@ -133,7 +133,7 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
|
133
133
|
const { type } = config;
|
|
134
134
|
const input = type === "file" ? config.input[version!] : config.input;
|
|
135
135
|
|
|
136
|
-
const query = createQuery(client,
|
|
136
|
+
const query = createQuery(client, GetNavigationOperationsQuery, {
|
|
137
137
|
type,
|
|
138
138
|
input,
|
|
139
139
|
});
|
|
@@ -150,7 +150,7 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
|
150
150
|
const isCollapsible =
|
|
151
151
|
tag.extensions?.["x-zudoku-collapsible"] ?? true;
|
|
152
152
|
|
|
153
|
-
return
|
|
153
|
+
return createNavigationCategory({
|
|
154
154
|
label: tag.name,
|
|
155
155
|
path: categoryPath,
|
|
156
156
|
operations: tag.operations,
|
|
@@ -165,8 +165,8 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
|
165
165
|
|
|
166
166
|
if (untaggedOperations) {
|
|
167
167
|
categories.push(
|
|
168
|
-
|
|
169
|
-
label: "Other endpoints",
|
|
168
|
+
createNavigationCategory({
|
|
169
|
+
label: categories.length === 0 ? "Endpoints" : "Other endpoints",
|
|
170
170
|
path: joinUrl(basePath, versionParam, UNTAGGED_PATH),
|
|
171
171
|
operations: untaggedOperations,
|
|
172
172
|
collapsed: !config.options?.expandAllTags,
|
|
@@ -178,7 +178,7 @@ export const openApiPlugin = (config: OasPluginConfig): ZudokuPlugin => {
|
|
|
178
178
|
categories.push({
|
|
179
179
|
type: "link" as const,
|
|
180
180
|
label: "Schemas",
|
|
181
|
-
|
|
181
|
+
to: joinUrl(basePath, versionParam, "~schemas"),
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
|
|
@@ -32,7 +32,7 @@ type Content = {
|
|
|
32
32
|
examples?: Array<Example> | null;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export type
|
|
35
|
+
export type TransformExamplesFn = (options: {
|
|
36
36
|
content: Content[];
|
|
37
37
|
context: ZudokuContext;
|
|
38
38
|
auth: AuthState;
|
|
@@ -42,7 +42,7 @@ export type transformExamples = (options: {
|
|
|
42
42
|
|
|
43
43
|
type BaseOasConfig = {
|
|
44
44
|
server?: string;
|
|
45
|
-
|
|
45
|
+
path?: string;
|
|
46
46
|
skipPreload?: boolean;
|
|
47
47
|
tagPages?: Array<string>;
|
|
48
48
|
schemaImports?: SchemaImports;
|
|
@@ -52,7 +52,7 @@ type BaseOasConfig = {
|
|
|
52
52
|
disableSidecar?: boolean;
|
|
53
53
|
showVersionSelect?: "always" | "if-available" | "hide";
|
|
54
54
|
expandAllTags?: boolean;
|
|
55
|
-
transformExamples?:
|
|
55
|
+
transformExamples?: TransformExamplesFn;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FileInput } from "lucide-react";
|
|
2
|
+
import { useFormContext } from "react-hook-form";
|
|
3
|
+
import { Collapsible, CollapsibleContent } from "zudoku/ui/Collapsible.js";
|
|
4
|
+
import { Textarea } from "zudoku/ui/Textarea.js";
|
|
5
|
+
import { cn } from "../../../util/cn.js";
|
|
6
|
+
import { type Content } from "../SidecarExamples.js";
|
|
7
|
+
import {
|
|
8
|
+
CollapsibleHeader,
|
|
9
|
+
CollapsibleHeaderTrigger,
|
|
10
|
+
} from "./CollapsibleHeader.js";
|
|
11
|
+
import ExamplesDropdown from "./ExamplesDropdown.js";
|
|
12
|
+
import { type PlaygroundForm } from "./Playground.js";
|
|
13
|
+
|
|
14
|
+
export const BodyPanel = ({ content }: { content?: Content }) => {
|
|
15
|
+
const { register, setValue, watch } = useFormContext<PlaygroundForm>();
|
|
16
|
+
const examples = (content ?? []).flatMap((e) => e.examples);
|
|
17
|
+
const headers = watch("headers");
|
|
18
|
+
return (
|
|
19
|
+
<Collapsible defaultOpen>
|
|
20
|
+
<CollapsibleHeaderTrigger>
|
|
21
|
+
<FileInput size={16} />
|
|
22
|
+
<CollapsibleHeader>Body</CollapsibleHeader>
|
|
23
|
+
{content && examples.length > 0 ? (
|
|
24
|
+
<ExamplesDropdown
|
|
25
|
+
examples={content}
|
|
26
|
+
onSelect={(example, mediaType) => {
|
|
27
|
+
setValue("body", JSON.stringify(example.value, null, 2));
|
|
28
|
+
setValue("headers", [
|
|
29
|
+
...headers.filter((h) => h.name !== "Content-Type"),
|
|
30
|
+
{
|
|
31
|
+
name: "Content-Type",
|
|
32
|
+
value: mediaType,
|
|
33
|
+
active: true,
|
|
34
|
+
},
|
|
35
|
+
]);
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
) : (
|
|
39
|
+
<div />
|
|
40
|
+
)}
|
|
41
|
+
</CollapsibleHeaderTrigger>
|
|
42
|
+
<CollapsibleContent className="flex flex-col gap-2 ">
|
|
43
|
+
<Textarea
|
|
44
|
+
{...register("body")}
|
|
45
|
+
className={cn(
|
|
46
|
+
"w-full p-2 h-64 font-mono md:text-xs border-none rounded-none focus-visible:ring-0",
|
|
47
|
+
)}
|
|
48
|
+
placeholder="Your body here..."
|
|
49
|
+
/>
|
|
50
|
+
</CollapsibleContent>
|
|
51
|
+
</Collapsible>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default BodyPanel;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ChevronUpIcon } from "lucide-react";
|
|
2
|
+
import { CollapsibleTrigger } from "zudoku/ui/Collapsible.js";
|
|
3
|
+
import { cn } from "../../../util/cn.js";
|
|
4
|
+
|
|
5
|
+
export const CollapsibleHeaderTrigger = ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
}: {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
className={cn(
|
|
15
|
+
"grid grid-cols-[max-content_1fr_min-content_max-content] items-center gap-4 group bg-muted w-full h-10 ps-4 pe-2 border-b",
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
<CollapsibleTrigger
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex items-center gap-4 group bg-muted w-full p-2 hover:bg-accent hover:brightness-95 rounded-md",
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
>
|
|
26
|
+
<ChevronUpIcon
|
|
27
|
+
className="group-data-[state=open]:rotate-180 transition-transform flex-shrink-0"
|
|
28
|
+
size={16}
|
|
29
|
+
/>
|
|
30
|
+
</CollapsibleTrigger>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const CollapsibleHeader = ({
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
}: {
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
}) => {
|
|
42
|
+
return (
|
|
43
|
+
<span className={cn("font-semibold w-full text-start", className)}>
|
|
44
|
+
{children}
|
|
45
|
+
</span>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PlusCircleIcon } from "lucide-react";
|
|
1
2
|
import { Button } from "zudoku/ui/Button.js";
|
|
2
3
|
import {
|
|
3
4
|
DropdownMenu,
|
|
@@ -20,7 +21,13 @@ const ExamplesDropdown = ({
|
|
|
20
21
|
return (
|
|
21
22
|
<DropdownMenu>
|
|
22
23
|
<DropdownMenuTrigger asChild>
|
|
23
|
-
<Button
|
|
24
|
+
<Button
|
|
25
|
+
variant="ghost"
|
|
26
|
+
size="sm"
|
|
27
|
+
className="hover:bg-accent hover:brightness-95"
|
|
28
|
+
>
|
|
29
|
+
Use Example <PlusCircleIcon size={16} className="ml-2" />
|
|
30
|
+
</Button>
|
|
24
31
|
</DropdownMenuTrigger>
|
|
25
32
|
<DropdownMenuContent className="max-w-72">
|
|
26
33
|
{examples.map((mediaTypeObject) => (
|