zudoku 0.51.0 → 0.52.1
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/config/validators/InputNavigationSchema.d.ts +152 -0
- package/dist/config/validators/NavigationSchema.js +1 -1
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +38 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +10 -0
- package/dist/config/validators/validate.js +7 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Autocomplete.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/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.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/Pagination.js +1 -1
- package/dist/lib/components/Pagination.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/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.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-keys/SettingsApiKeys.js +4 -8
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
- package/dist/lib/plugins/custom-pages/index.js +1 -3
- 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 +22 -6
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +8 -1
- package/dist/lib/plugins/markdown/index.js +1 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -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/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.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/playground/BodyPanel.js +14 -11
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- 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 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- 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.js +52 -34
- 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/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 +6 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -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 +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -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/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 +4 -4
- 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/ui/CodeBlock.js +5 -6
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- 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/vite/api/SchemaManager.js +6 -2
- package/dist/vite/api/SchemaManager.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/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +56 -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-frontmatter.js +4 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +11 -33
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +21 -9
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +22 -1
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/lib/Alert-CT_ViLrJ.js +161 -0
- package/lib/Alert-CT_ViLrJ.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-CPtGTZAL.js +140 -0
- package/lib/Command-CPtGTZAL.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
- package/lib/Dialog-DGlrUTCS.js.map +1 -0
- package/lib/MdxPage-D-QSUlMf.js +110 -0
- package/lib/MdxPage-D-QSUlMf.js.map +1 -0
- package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DKB2uJU-.js} +3 -3
- package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DKB2uJU-.js.map} +1 -1
- package/lib/{OperationList-Dpip6ozi.js → OperationList-CccIt45w.js} +579 -567
- package/lib/OperationList-CccIt45w.js.map +1 -0
- package/lib/Pagination-ClHXydm9.js +36 -0
- package/lib/Pagination-ClHXydm9.js.map +1 -0
- package/lib/RouteGuard-Bd-ppFbi.js +737 -0
- package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
- package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-DY3FBF2U.js} +26 -37
- package/lib/SchemaList-DY3FBF2U.js.map +1 -0
- package/lib/{SchemaView-CLxthVcA.js → SchemaView-matL2maR.js} +94 -103
- package/lib/SchemaView-matL2maR.js.map +1 -0
- package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
- package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
- package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
- package/lib/Slot-DwZlQ-vX.js.map +1 -0
- package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
- package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
- package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
- package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-DfOaDE_x.js → circular-CqHpo7-e.js} +2 -2
- package/lib/{circular-DfOaDE_x.js.map → circular-CqHpo7-e.js.map} +1 -1
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/{createServer-DjOMygls.js → createServer-ByKo3XCG.js} +4 -4
- package/lib/{createServer-DjOMygls.js.map → createServer-ByKo3XCG.js.map} +1 -1
- package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
- package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
- package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
- package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
- package/lib/index-BIbCx5Fh.js +3919 -0
- package/lib/index-BIbCx5Fh.js.map +1 -0
- package/lib/index-CEfpz8vY.js +3458 -0
- package/lib/index-CEfpz8vY.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/ui/CodeBlock.js +6 -73
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +2 -2
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +33 -3534
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +268 -321
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -20
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +4 -5
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +201 -111
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +5 -4
- package/src/lib/components/Autocomplete.tsx +1 -0
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/Pagination.tsx +4 -4
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
- package/src/lib/plugins/custom-pages/index.tsx +2 -6
- package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
- package/src/lib/plugins/markdown/index.tsx +10 -2
- package/src/lib/plugins/openapi/OperationList.tsx +7 -17
- package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- 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 +3 -4
- package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -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 +104 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
- 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 +5 -10
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/ui/CodeBlock.tsx +5 -6
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/dist/flat-config.d.ts +0 -320
- 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/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/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-BQ8YqLsz.js.map +0 -1
- package/lib/MdxPage-DJvKmI-r.js +0 -84
- package/lib/MdxPage-DJvKmI-r.js.map +0 -1
- package/lib/OperationList-Dpip6ozi.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-gV7nvzi7.js +0 -55
- package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
- package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
- package/lib/SchemaView-CLxthVcA.js.map +0 -1
- package/lib/Slot-CSEIvwwO.js +0 -161
- package/lib/Slot-CSEIvwwO.js.map +0 -1
- package/lib/clerk-yAKDC3Qz.js +0 -24812
- package/lib/clerk-yAKDC3Qz.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-DW2qmCJa.js +0 -3227
- package/lib/index-DW2qmCJa.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/mutation-BpcyTgWI.js +0 -196
- package/lib/mutation-BpcyTgWI.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-N4ockVKi.js +0 -97
- package/lib/useMutation-N4ockVKi.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alert-CT_ViLrJ.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/.pnpm/@tanstack+react-query@5.74.3_react@19.1.0/node_modules/@tanstack/react-query/build/modern/useMutation.js","../src/lib/ui/Alert.tsx"],"sourcesContent":["// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const context = this.#currentResult.context;\n if (action?.type === \"success\") {\n this.#mutateOptions.onSuccess?.(action.data, variables, context);\n this.#mutateOptions.onSettled?.(action.data, null, variables, context);\n } else if (action?.type === \"error\") {\n this.#mutateOptions.onError?.(action.error, variables, context);\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport { MutationObserver, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { noop, shouldThrowError } from \"./utils.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map","import { cva, type VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"names":["MutationObserver","Subscribable","#client","#currentResult","#currentMutation","#mutateOptions","client","options","#updateResult","prevOptions","shallowEqualObjects","hashKey","action","#notify","variables","state","getDefaultState","notifyManager","context","listener","useMutation","queryClient","useQueryClient","observer","React","result","onStoreChange","mutate","mutateOptions","noop","shouldThrowError","alertVariants","cva","Alert","className","variant","props","jsx","cn","AlertTitle","AlertDescription"],"mappings":";;;;;;AAKA,IAAIA,IAAmB,cAAcC,EAAa;AAAA,EAChDC;AAAA,EACAC,KAAiB;AAAA,EACjBC;AAAA,EACAC;AAAA,E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IAAA;AAAA,EACN;AAEJ;AAEA,SAASI,EAAiB;AAAA,EACxB,WAAAN;AAAA,EACA,GAAGE;AACL,GAAgC;AAE5B,SAAAC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MACF;AAAA,MACC,GAAGE;AAAA,IAAA;AAAA,EACN;AAEJ;","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { CheckIcon as u, CopyIcon as m } from "lucide-react";
|
|
3
|
+
import { useState as x, useCallback as b, useRef as f } from "react";
|
|
4
|
+
import { c as n } from "./cn-wvCW-ho6.js";
|
|
5
|
+
const C = (o = 2e3) => {
|
|
6
|
+
const [r, s] = x(!1), t = b(
|
|
7
|
+
(l) => {
|
|
8
|
+
navigator.clipboard.writeText(l), s(!0), setTimeout(() => s(!1), o);
|
|
9
|
+
},
|
|
10
|
+
[o]
|
|
11
|
+
);
|
|
12
|
+
return [r, t];
|
|
13
|
+
}, w = ({
|
|
14
|
+
children: o,
|
|
15
|
+
title: r = "Code",
|
|
16
|
+
language: s,
|
|
17
|
+
showCopy: t = "hover",
|
|
18
|
+
showLanguageIndicator: l = !1,
|
|
19
|
+
showLineNumbers: c,
|
|
20
|
+
...d
|
|
21
|
+
}) => {
|
|
22
|
+
const [i, p] = C(), a = f(null);
|
|
23
|
+
return o ? /* @__PURE__ */ e.jsxs(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: n(
|
|
27
|
+
"border code-block-wrapper relative group bg-muted/50 rounded-md overflow-hidden",
|
|
28
|
+
c && "line-numbers"
|
|
29
|
+
),
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e.jsxs("div", { className: "border-b flex items-center h-10 font-sans bg-black/2", children: [
|
|
32
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex-1 text-sm w-full px-4", children: [
|
|
33
|
+
r,
|
|
34
|
+
l && s && /* @__PURE__ */ e.jsxs("span", { className: "text-muted-foreground ml-2", children: [
|
|
35
|
+
"(",
|
|
36
|
+
s,
|
|
37
|
+
")"
|
|
38
|
+
] })
|
|
39
|
+
] }),
|
|
40
|
+
" ",
|
|
41
|
+
t !== "never" && /* @__PURE__ */ e.jsx(
|
|
42
|
+
"button",
|
|
43
|
+
{
|
|
44
|
+
type: "button",
|
|
45
|
+
"aria-label": "Copy code",
|
|
46
|
+
title: "Copy code",
|
|
47
|
+
className: n(
|
|
48
|
+
"cursor:pointer h-full hover:border-l-border active:shadow-none active:inset-shadow-xs hover:inset-shadow-xs flex items-center gap-2 px-4 outline-border text-sm hover:bg-black/5 transition-all"
|
|
49
|
+
),
|
|
50
|
+
disabled: i,
|
|
51
|
+
onClick: () => {
|
|
52
|
+
a.current?.textContent && p(a.current.textContent);
|
|
53
|
+
},
|
|
54
|
+
children: i ? /* @__PURE__ */ e.jsx(
|
|
55
|
+
u,
|
|
56
|
+
{
|
|
57
|
+
className: "text-emerald-600",
|
|
58
|
+
size: 14,
|
|
59
|
+
strokeWidth: 2.5,
|
|
60
|
+
absoluteStrokeWidth: !0
|
|
61
|
+
}
|
|
62
|
+
) : /* @__PURE__ */ e.jsx(m, { size: 14 })
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ e.jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: n(
|
|
70
|
+
"code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4",
|
|
71
|
+
d.className
|
|
72
|
+
),
|
|
73
|
+
ref: a,
|
|
74
|
+
children: o
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
) : null;
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
w as C,
|
|
83
|
+
C as u
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=CodeBlock-DAKxs_Tu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeBlock-DAKxs_Tu.js","sources":["../src/lib/util/useCopyToClipboard.ts","../src/lib/ui/CodeBlock.tsx"],"sourcesContent":["import { useCallback, useState } from \"react\";\n\nexport const useCopyToClipboard = (timeout = 2000) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const copyToClipboard = useCallback(\n (text: string) => {\n void navigator.clipboard.writeText(text);\n setIsCopied(true);\n\n setTimeout(() => setIsCopied(false), timeout);\n },\n [timeout],\n );\n\n return [isCopied, copyToClipboard] as const;\n};\n","import { CheckIcon, CopyIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { useRef } from \"react\";\nimport { cn } from \"../util/cn.js\";\nimport { useCopyToClipboard } from \"../util/useCopyToClipboard.js\";\n\nexport type CodeBlockProps = {\n className?: string;\n noBackground?: boolean;\n wrapLines?: boolean;\n showLanguageIndicator?: boolean;\n language?: string;\n title?: string;\n children?: ReactNode;\n code?: ReactNode;\n showCopy?: \"hover\" | \"always\" | \"never\";\n disabled?: boolean;\n showLineNumbers?: boolean;\n};\n\nexport const CodeBlock = ({\n children,\n title = \"Code\",\n language,\n showCopy = \"hover\",\n showLanguageIndicator = false,\n showLineNumbers,\n ...props\n}: CodeBlockProps) => {\n const [isCopied, copyToClipboard] = useCopyToClipboard();\n const ref = useRef<HTMLDivElement>(null);\n\n if (!children) return null;\n\n return (\n <div\n className={cn(\n \"border code-block-wrapper relative group bg-muted/50 rounded-md overflow-hidden\",\n showLineNumbers && \"line-numbers\",\n )}\n >\n <div className=\"border-b flex items-center h-10 font-sans bg-black/2\">\n <div className=\"flex-1 text-sm w-full px-4\">\n {title}\n {showLanguageIndicator && language && (\n <span className=\"text-muted-foreground ml-2\">({language})</span>\n )}\n </div>{\" \"}\n {showCopy !== \"never\" && (\n <button\n type=\"button\"\n aria-label=\"Copy code\"\n title=\"Copy code\"\n className={cn(\n \"cursor:pointer h-full hover:border-l-border active:shadow-none active:inset-shadow-xs hover:inset-shadow-xs flex items-center gap-2 px-4 outline-border text-sm hover:bg-black/5 transition-all\",\n )}\n disabled={isCopied}\n onClick={() => {\n if (!ref.current?.textContent) return;\n\n copyToClipboard(ref.current.textContent);\n }}\n >\n {isCopied ? (\n <CheckIcon\n className=\"text-emerald-600\"\n size={14}\n strokeWidth={2.5}\n absoluteStrokeWidth\n />\n ) : (\n <CopyIcon size={14} />\n )}\n </button>\n )}\n </div>\n <div\n className={cn(\n \"code-block text-sm not-prose scrollbar overflow-x-auto scrollbar p-4\",\n props.className,\n )}\n ref={ref}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"names":["useCopyToClipboard","timeout","isCopied","setIsCopied","useState","copyToClipboard","useCallback","text","CodeBlock","children","title","language","showCopy","showLanguageIndicator","showLineNumbers","props","ref","useRef","jsxs","cn","jsx","CheckIcon","CopyIcon"],"mappings":";;;;AAEa,MAAAA,IAAqB,CAACC,IAAU,QAAS;AACpD,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GAExCC,IAAkBC;AAAA,IACtB,CAACC,MAAiB;AACX,MAAA,UAAU,UAAU,UAAUA,CAAI,GACvCJ,EAAY,EAAI,GAEhB,WAAW,MAAMA,EAAY,EAAK,GAAGF,CAAO;AAAA,IAC9C;AAAA,IACA,CAACA,CAAO;AAAA,EACV;AAEO,SAAA,CAACC,GAAUG,CAAe;AACnC,GCIaG,IAAY,CAAC;AAAA,EACxB,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,uBAAAC,IAAwB;AAAA,EACxB,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAsB;AACpB,QAAM,CAACb,GAAUG,CAAe,IAAIL,EAAmB,GACjDgB,IAAMC,EAAuB,IAAI;AAEnC,SAACR,IAGHS,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAA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from "./index-CrcNWbel.js";
|
|
3
|
+
import { Search as n } from "lucide-react";
|
|
4
|
+
import * as t from "react";
|
|
5
|
+
import { D as p, a as l } from "./Dialog-DGlrUTCS.js";
|
|
6
|
+
import { c as o } from "./cn-wvCW-ho6.js";
|
|
7
|
+
const m = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
8
|
+
s,
|
|
9
|
+
{
|
|
10
|
+
ref: d,
|
|
11
|
+
className: o(
|
|
12
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
13
|
+
a
|
|
14
|
+
),
|
|
15
|
+
...e
|
|
16
|
+
}
|
|
17
|
+
));
|
|
18
|
+
m.displayName = s.displayName;
|
|
19
|
+
const k = ({
|
|
20
|
+
children: a,
|
|
21
|
+
command: e,
|
|
22
|
+
content: d,
|
|
23
|
+
...i
|
|
24
|
+
}) => /* @__PURE__ */ r.jsx(p, { ...i, children: /* @__PURE__ */ r.jsx(
|
|
25
|
+
l,
|
|
26
|
+
{
|
|
27
|
+
...d,
|
|
28
|
+
className: o(
|
|
29
|
+
"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]",
|
|
30
|
+
d?.className
|
|
31
|
+
),
|
|
32
|
+
"aria-describedby": void 0,
|
|
33
|
+
children: /* @__PURE__ */ r.jsx(
|
|
34
|
+
m,
|
|
35
|
+
{
|
|
36
|
+
...e,
|
|
37
|
+
className: o(
|
|
38
|
+
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
39
|
+
e?.className
|
|
40
|
+
),
|
|
41
|
+
children: a
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
) }), c = t.forwardRef(({ className: a, ...e }, d) => (
|
|
46
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
47
|
+
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
48
|
+
/* @__PURE__ */ r.jsx(n, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
49
|
+
/* @__PURE__ */ r.jsx(
|
|
50
|
+
s.Input,
|
|
51
|
+
{
|
|
52
|
+
ref: d,
|
|
53
|
+
className: o(
|
|
54
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
55
|
+
a
|
|
56
|
+
),
|
|
57
|
+
...e
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] })
|
|
61
|
+
));
|
|
62
|
+
c.displayName = s.Input.displayName;
|
|
63
|
+
const u = t.forwardRef(({ className: a, ...e }, d) => (
|
|
64
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
65
|
+
/* @__PURE__ */ r.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ r.jsx(
|
|
66
|
+
s.Input,
|
|
67
|
+
{
|
|
68
|
+
ref: d,
|
|
69
|
+
className: o(
|
|
70
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
71
|
+
"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
|
|
72
|
+
a
|
|
73
|
+
),
|
|
74
|
+
...e
|
|
75
|
+
}
|
|
76
|
+
) })
|
|
77
|
+
));
|
|
78
|
+
u.displayName = s.Input.displayName;
|
|
79
|
+
const f = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
80
|
+
s.List,
|
|
81
|
+
{
|
|
82
|
+
ref: d,
|
|
83
|
+
className: o("max-h-[300px] overflow-y-auto overflow-x-hidden", a),
|
|
84
|
+
...e
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
f.displayName = s.List.displayName;
|
|
88
|
+
const x = t.forwardRef((a, e) => /* @__PURE__ */ r.jsx(
|
|
89
|
+
s.Empty,
|
|
90
|
+
{
|
|
91
|
+
ref: e,
|
|
92
|
+
className: "py-6 text-center text-sm",
|
|
93
|
+
...a
|
|
94
|
+
}
|
|
95
|
+
));
|
|
96
|
+
x.displayName = s.Empty.displayName;
|
|
97
|
+
const g = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
98
|
+
s.Group,
|
|
99
|
+
{
|
|
100
|
+
ref: d,
|
|
101
|
+
className: o(
|
|
102
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
103
|
+
a
|
|
104
|
+
),
|
|
105
|
+
...e
|
|
106
|
+
}
|
|
107
|
+
));
|
|
108
|
+
g.displayName = s.Group.displayName;
|
|
109
|
+
const h = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
110
|
+
s.Separator,
|
|
111
|
+
{
|
|
112
|
+
ref: d,
|
|
113
|
+
className: o("-mx-1 h-px bg-border", a),
|
|
114
|
+
...e
|
|
115
|
+
}
|
|
116
|
+
));
|
|
117
|
+
h.displayName = s.Separator.displayName;
|
|
118
|
+
const y = t.forwardRef(({ className: a, ...e }, d) => /* @__PURE__ */ r.jsx(
|
|
119
|
+
s.Item,
|
|
120
|
+
{
|
|
121
|
+
ref: d,
|
|
122
|
+
className: o(
|
|
123
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
124
|
+
a
|
|
125
|
+
),
|
|
126
|
+
...e
|
|
127
|
+
}
|
|
128
|
+
));
|
|
129
|
+
y.displayName = s.Item.displayName;
|
|
130
|
+
export {
|
|
131
|
+
f as C,
|
|
132
|
+
g as a,
|
|
133
|
+
y as b,
|
|
134
|
+
k as c,
|
|
135
|
+
c as d,
|
|
136
|
+
x as e,
|
|
137
|
+
m as f,
|
|
138
|
+
u as g
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=Command-CPtGTZAL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command-CPtGTZAL.js","sources":["../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { type ComponentPropsWithoutRef } from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({\n children,\n command,\n content,\n ...props\n}: DialogProps & {\n command?: ComponentPropsWithoutRef<typeof CommandPrimitive>;\n content?: ComponentPropsWithoutRef<typeof DialogContent>;\n}) => {\n return (\n <Dialog {...props}>\n <DialogContent\n {...content}\n className={cn(\n \"overflow-hidden p-0 shadow-lg top-[15vh] translate-y-[0%]\",\n content?.className,\n )}\n aria-describedby={undefined}\n >\n <Command\n {...command}\n className={cn(\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\",\n command?.className,\n )}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","command","content","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"],"mappings":";;;;;;AAQM,MAAAA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcM,EAAiB;AAEvC,MAAME,IAAgB,CAAC;AAAA,EACrB,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGR;AACL,MAKIE,gBAAAA,EAAA,IAACO,GAAQ,EAAA,GAAGT,GACV,UAAA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ACN,CACD;AAEDmB,EAAY,cAAchB,EAAiB,KAAK;"}
|
|
@@ -28,7 +28,7 @@ const f = l.forwardRef(({ className: e, children: t, showCloseButton: o = !0, ..
|
|
|
28
28
|
...d,
|
|
29
29
|
children: [
|
|
30
30
|
t,
|
|
31
|
-
o && /* @__PURE__ */ s.jsxs(a.Close, { className: "absolute right-
|
|
31
|
+
o && /* @__PURE__ */ s.jsxs(a.Close, { className: "absolute -right-2 -top-2 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
32
32
|
/* @__PURE__ */ s.jsx(c, { className: "h-4 w-4" }),
|
|
33
33
|
/* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Close" })
|
|
34
34
|
] })
|
|
@@ -89,11 +89,11 @@ u.displayName = a.Description.displayName;
|
|
|
89
89
|
export {
|
|
90
90
|
j as D,
|
|
91
91
|
f as a,
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
x as b,
|
|
93
|
+
p as c,
|
|
94
94
|
u as d,
|
|
95
95
|
b as e,
|
|
96
96
|
g as f,
|
|
97
97
|
h as g
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=Dialog-
|
|
99
|
+
//# sourceMappingURL=Dialog-DGlrUTCS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog-DGlrUTCS.js","sources":["../src/lib/ui/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\n\nimport { XIcon } from \"lucide-react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n }\n>(({ className, children, showCloseButton = true, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute -right-2 -top-2 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","jsx","cn","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;AAMA,MAAMA,IAASC,EAAgB,MAEzBC,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACT,EAAgB;AAAA,EAA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AAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFU,EAAa,cAAc;AAErB,MAAAC,IAAcb,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CACD;AACDW,EAAY,cAAclB,EAAgB,MAAM;AAE1C,MAAAmB,IAAoBd,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE,EAAG,iCAAiCJ,CAAS;AAAA,IACvD,GAAGC;AAAA,EAAA;AACN,CACD;AACDY,EAAkB,cAAcnB,EAAgB,YAAY;"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
+
import { s as E } from "./index-CcV90rin.js";
|
|
3
|
+
import { H as T } from "./RouteGuard-Bd-ppFbi.js";
|
|
4
|
+
import { EditIcon as M } from "lucide-react";
|
|
5
|
+
import { useEffect as P } from "react";
|
|
6
|
+
import { B as L } from "./Button-BE9IVkWV.js";
|
|
7
|
+
import { T as S, C as k, H as h } from "./Slot-DwZlQ-vX.js";
|
|
8
|
+
import { P as C } from "./Pagination-ClHXydm9.js";
|
|
9
|
+
import { T as H } from "./Toc-WCmwFkX-.js";
|
|
10
|
+
import { a as D, b as I } from "./hook-Bd0yS8M0.js";
|
|
11
|
+
import { u as R } from "./index-ClhS5TxS.js";
|
|
12
|
+
const A = {
|
|
13
|
+
h2: ({ children: t, id: s }) => /* @__PURE__ */ e.jsx(h, { level: 2, id: s, registerNavigationAnchor: !0, children: t }),
|
|
14
|
+
h3: ({ children: t, id: s }) => /* @__PURE__ */ e.jsx(h, { level: 3, id: s, registerNavigationAnchor: !0, children: t })
|
|
15
|
+
}, K = ({
|
|
16
|
+
mdxComponent: t,
|
|
17
|
+
frontmatter: s = {},
|
|
18
|
+
defaultOptions: r,
|
|
19
|
+
__filepath: a,
|
|
20
|
+
tableOfContents: n,
|
|
21
|
+
excerpt: p
|
|
22
|
+
}) => {
|
|
23
|
+
const u = D()?.categoryLabel, o = s.title, c = s.category ?? u, v = s.toc === !1 || r?.toc === !1, w = n.find((i) => i.depth === 1)?.value ?? o, b = s.disable_pager ?? s.disablePager ?? r?.disablePager ?? !1, f = s.showLastModified ?? r?.showLastModified ?? !0, d = s.lastModifiedTime ? new Date(s.lastModifiedTime) : null, l = s.suggestEdit !== !1 && (s.suggestEdit ?? r?.suggestEdit), m = l ? l.url.replaceAll("{filePath}", a) : null, N = l ? l.text || "Edit this page" : null, j = n.find((i) => i.depth === 1)?.children ?? // if `title` is provided by frontmatter it does not appear in the table of contents
|
|
24
|
+
n.filter((i) => i.depth === 2), y = !v && j.length > 0, { prev: g, next: x } = I();
|
|
25
|
+
return P(() => {
|
|
26
|
+
if (process.env.NODE_ENV === "development")
|
|
27
|
+
return window.__getReactRefreshIgnoredExports = ({ id: i }) => {
|
|
28
|
+
if (i.endsWith(a))
|
|
29
|
+
return ["frontmatter", "tableOfContents"];
|
|
30
|
+
}, () => {
|
|
31
|
+
window.__getReactRefreshIgnoredExports = void 0;
|
|
32
|
+
};
|
|
33
|
+
}, [a]), /* @__PURE__ */ e.jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: "grid grid-cols-1 xl:grid-cols-(--sidecar-grid-cols) gap-8 justify-between",
|
|
37
|
+
"data-pagefind-filter": "section:markdown",
|
|
38
|
+
"data-pagefind-meta": "section:markdown",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ e.jsxs(T, { children: [
|
|
41
|
+
/* @__PURE__ */ e.jsx("title", { children: w }),
|
|
42
|
+
p && /* @__PURE__ */ e.jsx("meta", { name: "description", content: p })
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e.jsxs(S, { className: "max-w-full xl:w-full xl:max-w-3xl flex-1 shrink pt-(--padding-content-top)", children: [
|
|
45
|
+
(c || o) && /* @__PURE__ */ e.jsxs("header", { children: [
|
|
46
|
+
c && /* @__PURE__ */ e.jsx(k, { children: c }),
|
|
47
|
+
o && /* @__PURE__ */ e.jsx(h, { level: 1, id: E(o), children: o })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ e.jsx(
|
|
50
|
+
t,
|
|
51
|
+
{
|
|
52
|
+
components: { ...R(), ...A }
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-16" }),
|
|
56
|
+
f && d || m ? /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between text-xs text-muted-foreground ", children: [
|
|
57
|
+
/* @__PURE__ */ e.jsx("div", {}),
|
|
58
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
59
|
+
/* @__PURE__ */ e.jsx("div", { children: m && /* @__PURE__ */ e.jsx(L, { asChild: !0, variant: "ghost", size: "sm", children: /* @__PURE__ */ e.jsxs(
|
|
60
|
+
"a",
|
|
61
|
+
{
|
|
62
|
+
href: m,
|
|
63
|
+
target: "_blank",
|
|
64
|
+
rel: "noopener noreferrer",
|
|
65
|
+
className: "flex items-center gap-1",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(M, { size: 12 }),
|
|
68
|
+
N
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
) }) }),
|
|
72
|
+
/* @__PURE__ */ e.jsx("div", { children: f && d && /* @__PURE__ */ e.jsxs(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
title: d.toLocaleString(void 0, {
|
|
76
|
+
dateStyle: "full",
|
|
77
|
+
timeStyle: "medium"
|
|
78
|
+
}),
|
|
79
|
+
children: [
|
|
80
|
+
"Last modified on",
|
|
81
|
+
" ",
|
|
82
|
+
/* @__PURE__ */ e.jsx("time", { dateTime: d.toISOString(), children: d.toLocaleDateString(void 0, {
|
|
83
|
+
dateStyle: "long"
|
|
84
|
+
}) })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) })
|
|
88
|
+
] })
|
|
89
|
+
] }) : null,
|
|
90
|
+
!b && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
91
|
+
/* @__PURE__ */ e.jsx("div", { className: "h-px bg-border mt-2 mb-6" }),
|
|
92
|
+
/* @__PURE__ */ e.jsx(
|
|
93
|
+
C,
|
|
94
|
+
{
|
|
95
|
+
prev: g ? { to: g.id, label: g.label } : void 0,
|
|
96
|
+
next: x ? { to: x.id, label: x.label } : void 0,
|
|
97
|
+
className: "mb-10"
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] })
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ e.jsx("div", { className: "hidden xl:block", children: y && /* @__PURE__ */ e.jsx(H, { entries: j }) })
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
K as MdxPage
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=MdxPage-D-QSUlMf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MdxPage-D-QSUlMf.js","sources":["../src/lib/plugins/markdown/MdxPage.tsx"],"sourcesContent":["import { useMDXComponents } from \"@mdx-js/react\";\nimport slugify from \"@sindresorhus/slugify\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport { EditIcon } from \"lucide-react\";\nimport { type PropsWithChildren, useEffect } from \"react\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Pagination } from \"../../components/Pagination.js\";\nimport { Typography } from \"../../components/Typography.js\";\nimport { Toc } from \"../../components/navigation/Toc.js\";\nimport {\n useCurrentItem,\n usePrevNext,\n} from \"../../components/navigation/utils.js\";\nimport type { MdxComponentsType } from \"../../util/MdxComponents.js\";\nimport { type MarkdownPluginDefaultOptions, type MDXImport } from \"./index.js\";\n\ndeclare global {\n interface Window {\n __getReactRefreshIgnoredExports?: (args: {\n id: string;\n }) => string[] | undefined;\n }\n}\n\nconst MarkdownHeadings = {\n h2: ({ children, id }) => (\n <Heading level={2} id={id} registerNavigationAnchor>\n {children}\n </Heading>\n ),\n h3: ({ children, id }) => (\n <Heading level={3} id={id} registerNavigationAnchor>\n {children}\n </Heading>\n ),\n} satisfies MdxComponentsType;\n\nexport const MdxPage = ({\n mdxComponent: MdxComponent,\n frontmatter = {},\n defaultOptions,\n __filepath,\n tableOfContents,\n excerpt,\n}: PropsWithChildren<\n Omit<MDXImport, \"default\"> & {\n mdxComponent: MDXImport[\"default\"];\n defaultOptions?: MarkdownPluginDefaultOptions;\n }\n>) => {\n const categoryTitle = useCurrentItem()?.categoryLabel;\n\n const title = frontmatter.title;\n const category = frontmatter.category ?? categoryTitle;\n const hideToc = frontmatter.toc === false || defaultOptions?.toc === false;\n const pageTitle =\n tableOfContents.find((item) => item.depth === 1)?.value ?? title;\n const hidePager =\n frontmatter.disable_pager ??\n frontmatter.disablePager ??\n defaultOptions?.disablePager ??\n false;\n\n const showLastModified =\n frontmatter.showLastModified ?? defaultOptions?.showLastModified ?? true;\n\n const lastModifiedDate = frontmatter.lastModifiedTime\n ? new Date(frontmatter.lastModifiedTime)\n : null;\n\n const editConfig =\n frontmatter.suggestEdit !== false &&\n (frontmatter.suggestEdit ?? defaultOptions?.suggestEdit);\n\n const editUrl = editConfig\n ? editConfig.url.replaceAll(\"{filePath}\", __filepath)\n : null;\n const editText = editConfig ? editConfig.text || \"Edit this page\" : null;\n\n const tocEntries =\n tableOfContents.find((item) => item.depth === 1)?.children ??\n // if `title` is provided by frontmatter it does not appear in the table of contents\n tableOfContents.filter((item) => item.depth === 2);\n\n const showToc = !hideToc && tocEntries.length > 0;\n\n const { prev, next } = usePrevNext();\n\n useEffect(() => {\n if (process.env.NODE_ENV === \"development\") {\n window.__getReactRefreshIgnoredExports = ({ id }) => {\n if (!id.endsWith(__filepath)) return;\n\n return [\"frontmatter\", \"tableOfContents\"];\n };\n\n return () => {\n window.__getReactRefreshIgnoredExports = undefined;\n };\n }\n }, [__filepath]);\n\n return (\n <div\n className=\"grid grid-cols-1 xl:grid-cols-(--sidecar-grid-cols) gap-8 justify-between\"\n data-pagefind-filter=\"section:markdown\"\n data-pagefind-meta=\"section:markdown\"\n >\n <Helmet>\n <title>{pageTitle}</title>\n {excerpt && <meta name=\"description\" content={excerpt} />}\n </Helmet>\n <Typography className=\"max-w-full xl:w-full xl:max-w-3xl flex-1 shrink pt-(--padding-content-top)\">\n {(category || title) && (\n <header>\n {category && <CategoryHeading>{category}</CategoryHeading>}\n {title && (\n <Heading level={1} id={slugify(title)}>\n {title}\n </Heading>\n )}\n </header>\n )}\n <MdxComponent\n components={{ ...useMDXComponents(), ...MarkdownHeadings }}\n />\n <div className=\"h-16\" />\n {(showLastModified && lastModifiedDate) || editUrl ? (\n <div className=\"flex justify-between text-xs text-muted-foreground \">\n <div />\n <div className=\"flex items-center gap-2\">\n <div>\n {editUrl && (\n <Button asChild variant=\"ghost\" size=\"sm\">\n <a\n href={editUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1\"\n >\n <EditIcon size={12} />\n {editText}\n </a>\n </Button>\n )}\n </div>\n <div>\n {showLastModified && lastModifiedDate && (\n <div\n title={lastModifiedDate.toLocaleString(undefined, {\n dateStyle: \"full\",\n timeStyle: \"medium\",\n })}\n >\n Last modified on{\" \"}\n <time dateTime={lastModifiedDate.toISOString()}>\n {lastModifiedDate.toLocaleDateString(undefined, {\n dateStyle: \"long\",\n })}\n </time>\n </div>\n )}\n </div>\n </div>\n </div>\n ) : null}\n {!hidePager && (\n <>\n <div className=\"h-px bg-border mt-2 mb-6\" />\n <Pagination\n prev={prev ? { to: prev.id, label: prev.label } : undefined}\n next={next ? { to: next.id, label: next.label } : undefined}\n className=\"mb-10\"\n />\n </>\n )}\n </Typography>\n <div className=\"hidden xl:block\">\n {showToc && <Toc entries={tocEntries} />}\n </div>\n </div>\n );\n};\n"],"names":["MarkdownHeadings","children","id","jsx","Heading","MdxPage","MdxComponent","frontmatter","defaultOptions","__filepath","tableOfContents","excerpt","categoryTitle","useCurrentItem","title","category","hideToc","pageTitle","item","hidePager","showLastModified","lastModifiedDate","editConfig","editUrl","editText","tocEntries","showToc","prev","next","usePrevNext","useEffect","jsxs","Helmet","Typography","CategoryHeading","slugify","useMDXComponents","Button","EditIcon","Fragment","Pagination","Toc"],"mappings":";;;;;;;;;;;AA0BA,MAAMA,IAAmB;AAAA,EACvB,IAAI,CAAC,EAAE,UAAAC,GAAU,IAAAC,EAAG,MACjBC,gBAAAA,EAAA,IAAAC,GAAA,EAAQ,OAAO,GAAG,IAAAF,GAAQ,0BAAwB,IAChD,UAAAD,EACH,CAAA;AAAA,EAEF,IAAI,CAAC,EAAE,UAAAA,GAAU,IAAAC,EAAG,MACjBC,gBAAAA,EAAAA,IAAAC,GAAA,EAAQ,OAAO,GAAG,IAAAF,GAAQ,0BAAwB,IAChD,UAAAD,EACH,CAAA;AAEJ,GAEaI,IAAU,CAAC;AAAA,EACtB,cAAcC;AAAA,EACd,aAAAC,IAAc,CAAC;AAAA,EACf,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AACF,MAKM;AACE,QAAAC,IAAgBC,KAAkB,eAElCC,IAAQP,EAAY,OACpBQ,IAAWR,EAAY,YAAYK,GACnCI,IAAUT,EAAY,QAAQ,MAASC,GAAgB,QAAQ,IAC/DS,IACJP,EAAgB,KAAK,CAACQ,MAASA,EAAK,UAAU,CAAC,GAAG,SAASJ,GACvDK,I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A,oBACkB;AAAA,oBACjBlB,gBAAAA,MAAC,UAAK,UAAUkB,EAAiB,YAC9B,GAAA,UAAAA,EAAiB,mBAAmB,QAAW;AAAA,sBAC9C,WAAW;AAAA,oBAAA,CACZ,EACH,CAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA,EAGN,CAAA;AAAA,YAAA,EACF,CAAA;AAAA,UAAA,EAAA,CACF,IACE;AAAA,UACH,CAACF,KAEEY,gBAAAA,EAAAA,KAAAQ,EAAA,UAAA,EAAA,UAAA;AAAA,YAACpC,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAU,2BAA2B,CAAA;AAAA,YAC1CA,gBAAAA,EAAA;AAAA,cAACqC;AAAA,cAAA;AAAA,gBACC,MAAMb,IAAO,EAAE,IAAIA,EAAK,IAAI,OAAOA,EAAK,MAAA,IAAU;AAAA,gBAClD,MAAMC,IAAO,EAAE,IAAIA,EAAK,IAAI,OAAOA,EAAK,MAAA,IAAU;AAAA,gBAClD,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ,EACF,CAAA;AAAA,QAAA,GAEJ;AAAA,QACAzB,gBAAAA,EAAAA,IAAC,SAAI,WAAU,mBACZ,eAAYA,gBAAAA,EAAAA,IAAAsC,GAAA,EAAI,SAAShB,EAAY,CAAA,EACxC,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { useMemo as m } from "react";
|
|
3
|
-
import { O as l } from "./chunk-DQRVZFIR-
|
|
4
|
-
import { d as j, O as c, G as O } from "./index-
|
|
3
|
+
import { O as l } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
4
|
+
import { d as j, O as c, G as O } from "./index-CEfpz8vY.js";
|
|
5
5
|
const d = (...r) => {
|
|
6
6
|
const e = r.filter((t) => !!t).map((t) => t.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
7
7
|
return e ? `/${e}` : "/";
|
|
@@ -32,4 +32,4 @@ const d = (...r) => {
|
|
|
32
32
|
export {
|
|
33
33
|
P as OasProvider
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=OasProvider-
|
|
35
|
+
//# sourceMappingURL=OasProvider-DKB2uJU-.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OasProvider-
|
|
1
|
+
{"version":3,"file":"OasProvider-DKB2uJU-.js","sources":["../src/lib/util/joinPath.tsx","../src/lib/plugins/openapi/OasProvider.tsx"],"sourcesContent":["/**\n * @deprecated Use `joinUrl` instead.\n */\nexport const joinPath = (\n ...parts: Array<string | null | undefined | boolean>\n) => {\n const cleanPath = parts\n .filter((part): part is string => Boolean(part))\n .map((part) => part.replace(/(^\\/+|\\/+$)/g, \"\")) // Strip leading and trailing slashes\n .join(\"/\")\n .replace(/(^\\/+|\\/+$)/g, \"\");\n\n return cleanPath ? `/${cleanPath}` : \"/\";\n};\n","import { useMemo } from \"react\";\nimport { Outlet } from \"react-router\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport type { GraphQLClient } from \"./client/GraphQLClient.js\";\nimport { GraphQLProvider } from \"./client/GraphQLContext.js\";\nimport { OasConfigProvider } from \"./context.js\";\nimport { type OasPluginConfig } from \"./interfaces.js\";\nimport { getVersions } from \"./util/getRoutes.js\";\n\nexport const OasProvider = ({\n basePath,\n version,\n config,\n client,\n}: {\n basePath: string;\n version?: string;\n config: OasPluginConfig;\n client: GraphQLClient;\n}) => {\n const value = useMemo(() => {\n const versions = getVersions(config);\n const firstVersion = Object.values(config.input).at(0);\n const input =\n config.type === \"file\"\n ? {\n type: config.type,\n input: version ? config.input[version]! : firstVersion!,\n }\n : { type: config.type, input: config.input };\n\n return {\n config: {\n ...config,\n version: version ?? versions.at(0),\n versions: Object.fromEntries(\n versions.map((version) => [version, joinPath(basePath, version)]),\n ),\n ...input,\n },\n };\n }, [config, basePath, version]);\n\n return (\n <OasConfigProvider value={value}>\n <GraphQLProvider client={client}>\n <Outlet />\n </GraphQLProvider>\n </OasConfigProvider>\n );\n};\n"],"names":["joinPath","parts","cleanPath","part","OasProvider","basePath","version","config","client","value","useMemo","versions","getVersions","firstVersion","input","jsx","OasConfigProvider","GraphQLProvider","Outlet"],"mappings":";;;;AAGa,MAAAA,IAAW,IACnBC,MACA;AACG,QAAAC,IAAYD,EACf,OAAO,CAACE,MAAyB,EAAQA,CAAK,EAC9C,IAAI,CAACA,MAASA,EAAK,QAAQ,gBAAgB,EAAE,CAAC,EAC9C,KAAK,GAAG,EACR,QAAQ,gBAAgB,EAAE;AAEtB,SAAAD,IAAY,IAAIA,CAAS,KAAK;AACvC,GCJaE,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AACF,MAKM;AACE,QAAAC,IAAQC,EAAQ,MAAM;AACpB,UAAAC,IAAWC,EAAYL,CAAM,GAC7BM,IAAe,OAAO,OAAON,EAAO,KAAK,EAAE,GAAG,CAAC,GAC/CO,IACJP,EAAO,SAAS,SACZ;AAAA,MACE,MAAMA,EAAO;AAAA,MACb,OAAOD,IAAUC,EAAO,MAAMD,CAAO,IAAKO;AAAA,IAAA,IAE5C,EAAE,MAAMN,EAAO,MAAM,OAAOA,EAAO,MAAM;AAExC,WAAA;AAAA,MACL,QAAQ;AAAA,QACN,GAAGA;AAAA,QACH,SAASD,KAAWK,EAAS,GAAG,CAAC;AAAA,QACjC,UAAU,OAAO;AAAA,UACfA,EAAS,IAAI,CAACL,MAAY,CAACA,GAASN,EAASK,GAAUC,CAAO,CAAC,CAAC;AAAA,QAClE;AAAA,QACA,GAAGQ;AAAA,MAAA;AAAA,IAEP;AAAA,EACC,GAAA,CAACP,GAAQF,GAAUC,CAAO,CAAC;AAG5B,SAAAS,gBAAAA,EAAAA,IAACC,KAAkB,OAAAP,GACjB,UAAAM,gBAAAA,EAAA,IAACE,KAAgB,QAAAT,GACf,UAAAO,gBAAAA,EAAAA,IAACG,GAAO,CAAA,CAAA,EAAA,CACV,EACF,CAAA;AAEJ;"}
|