zudoku 0.0.0-fd0986c → 0.0.0-fdf886de
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +1 -1
- package/dist/app/entry.server.js +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +12 -6
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +251 -156
- package/dist/config/validators/InputNavigationSchema.js +5 -4
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +6 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +44 -30
- package/dist/config/validators/validate.js +8 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +11 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +3 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +9 -3
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +5 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +4 -3
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +22 -14
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +0 -27
- package/dist/lib/components/index.js +0 -15
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +11 -3
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +18 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -1
- package/dist/lib/core/ZudokuContext.js +23 -1
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -4
- package/dist/lib/plugins/api-keys/index.js +3 -7
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- 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 +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +42 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/shiki.d.ts +4 -0
- package/dist/lib/shiki.js +2 -0
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +30 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- 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/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/vite/config.js +6 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +9 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
- package/dist/vite/mdx/remark-inject-filepath.js +6 -0
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
- package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
- package/dist/vite/mdx/remark-link-rewrite.js +20 -0
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
- package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
- package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
- package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
- package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
- package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +1 -1
- package/dist/vite/mdx/remark-static-generation.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-docs.js +18 -13
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +6 -23
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +80 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +4 -4
- package/dist/vite/sitemap.js +10 -9
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/Button-B3o-2Xdf.js.map +1 -1
- package/lib/Card-CMDQUPM4.js.map +1 -1
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-yJjjRwj-.js +98 -0
- package/lib/CodeBlock-yJjjRwj-.js.map +1 -0
- package/lib/{Command-C9AC5cf-.js → Command-CDn17s8X.js} +2 -2
- package/lib/{Command-C9AC5cf-.js.map → Command-CDn17s8X.js.map} +1 -1
- package/lib/Dialog-BrIjMmUK.js +114 -0
- package/lib/Dialog-BrIjMmUK.js.map +1 -0
- package/lib/{Drawer-DXGPOKPx.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-DXGPOKPx.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/{MdxPage-BI0vLjSn.js → MdxPage-BmOQ5m5g.js} +19 -18
- package/lib/{MdxPage-BI0vLjSn.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
- package/lib/OAuthErrorPage-Jv3r8wnL.js +150 -0
- package/lib/OAuthErrorPage-Jv3r8wnL.js.map +1 -0
- package/lib/{OasProvider-CK4C2QI3.js → OasProvider-CA_lpILt.js} +3 -3
- package/lib/{OasProvider-CK4C2QI3.js.map → OasProvider-CA_lpILt.js.map} +1 -1
- package/lib/{OperationList-DhA6x6qm.js → OperationList-C-TObVw6.js} +47 -44
- package/lib/OperationList-C-TObVw6.js.map +1 -0
- package/lib/{Pagination-YjKVdgm9.js → Pagination-CBiRGddW.js} +3 -3
- package/lib/{Pagination-YjKVdgm9.js.map → Pagination-CBiRGddW.js.map} +1 -1
- package/lib/RouteGuard-JLH6tCY8.js +56 -0
- package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
- package/lib/RouterError-DcVonMP1.js +41 -0
- package/lib/RouterError-DcVonMP1.js.map +1 -0
- package/lib/{SchemaList-Cx9MS7Wf.js → SchemaList-BeYWvBC7.js} +15 -14
- package/lib/{SchemaList-Cx9MS7Wf.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
- package/lib/{SchemaView-C6sTKWyS.js → SchemaView-CRcShewo.js} +4 -4
- package/lib/{SchemaView-C6sTKWyS.js.map → SchemaView-CRcShewo.js.map} +1 -1
- package/lib/Select-C3efYI1n.js +273 -0
- package/lib/Select-C3efYI1n.js.map +1 -0
- package/lib/{SignUp-DiDmVb3x.js → SignUp-CxBGHgba.js} +6 -6
- package/lib/{SignUp-DiDmVb3x.js.map → SignUp-CxBGHgba.js.map} +1 -1
- package/lib/{Slot-CrCBhP3G.js → Slot-DOtTvoyj.js} +2050 -2288
- package/lib/{Slot-CrCBhP3G.js.map → Slot-DOtTvoyj.js.map} +1 -1
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CVe58ZSY.js → SyntaxHighlight-GR0eix_L.js} +411 -409
- package/lib/SyntaxHighlight-GR0eix_L.js.map +1 -0
- package/lib/{Toc-CpsFSXeD.js → Toc-BlcGIkXc.js} +2 -2
- package/lib/{Toc-CpsFSXeD.js.map → Toc-BlcGIkXc.js.map} +1 -1
- package/lib/ZudokuContext-BuJD7yIX.js +1286 -0
- package/lib/ZudokuContext-BuJD7yIX.js.map +1 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-OvXQH6UK.js → circular-CGTcsqA3.js} +2 -2
- package/lib/{circular-OvXQH6UK.js.map → circular-CGTcsqA3.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/{createServer-B5U_8E3S.js → createServer-DjgpuLne.js} +5 -5
- package/lib/{createServer-B5U_8E3S.js.map → createServer-DjgpuLne.js.map} +1 -1
- package/lib/errors-CrI3s7mR.js +45 -0
- package/lib/errors-CrI3s7mR.js.map +1 -0
- package/lib/hook-bv3iuX7X.js +247 -0
- package/lib/hook-bv3iuX7X.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BzcS9JBW.js → index-CvTWnHZF.js} +860 -938
- package/lib/index-CvTWnHZF.js.map +1 -0
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index-DzO-Qh6S.js +1061 -0
- package/lib/index-DzO-Qh6S.js.map +1 -0
- package/lib/{index-4XtG1tlD.js → index-HarEI51d.js} +2 -2
- package/lib/{index-4XtG1tlD.js.map → index-HarEI51d.js.map} +1 -1
- package/lib/index.esm-BnYHxCYC.js +683 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/mutation-Dy_5up8v.js +196 -0
- package/lib/mutation-Dy_5up8v.js.map +1 -0
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +9 -9
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useExposedProps-BH9aq4MD.js +113 -0
- package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2965 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +46 -9880
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +204 -195
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +21 -28
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +7 -7
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +23 -22
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +410 -295
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +28 -27
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +31 -23
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +22 -5
- package/src/app/main.tsx +23 -11
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +7 -1
- package/src/lib/components/BuildCheck.tsx +13 -3
- package/src/lib/components/Header.tsx +4 -3
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +2 -21
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/Meta.tsx +32 -0
- package/src/lib/components/MobileTopNavigation.tsx +6 -3
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/TopNavigation.tsx +4 -4
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +26 -19
- package/src/lib/components/index.ts +0 -18
- package/src/lib/components/navigation/NavigationCategory.tsx +1 -1
- package/src/lib/components/navigation/NavigationItem.tsx +13 -3
- package/src/lib/components/navigation/utils.ts +21 -15
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +37 -5
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +17 -3
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +21 -3
- package/src/lib/plugins/api-keys/index.tsx +16 -11
- package/src/lib/plugins/custom-pages/index.tsx +3 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +66 -16
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
- package/src/lib/shiki.ts +2 -0
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/CodeBlock.tsx +38 -13
- package/src/lib/ui/Dialog.tsx +12 -3
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/Alert-Cig_8hW6.js +0 -161
- package/lib/Alert-Cig_8hW6.js.map +0 -1
- package/lib/CodeBlock-BaBgX9Wy.js +0 -85
- package/lib/CodeBlock-BaBgX9Wy.js.map +0 -1
- package/lib/Dialog-DMWw1doX.js +0 -99
- package/lib/Dialog-DMWw1doX.js.map +0 -1
- package/lib/OperationList-DhA6x6qm.js.map +0 -1
- package/lib/RouteGuard-Vnlz_t51.js +0 -737
- package/lib/RouteGuard-Vnlz_t51.js.map +0 -1
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +0 -1839
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/errors-DOCWNkkS.js +0 -78
- package/lib/errors-DOCWNkkS.js.map +0 -1
- package/lib/hook-CZjW2buS.js +0 -1510
- package/lib/hook-CZjW2buS.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-BzcS9JBW.js.map +0 -1
- package/lib/index-Sb7nQNHJ.js +0 -3980
- package/lib/index-Sb7nQNHJ.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
- package/lib/useExposedProps-BIYjecPD.js +0 -9
- package/lib/useExposedProps-BIYjecPD.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as X } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as pt from "react";
|
|
3
3
|
import r, { useMemo as ye, useLayoutEffect as be, useEffect as Se } from "react";
|
|
4
4
|
import * as Z from "@radix-ui/react-dialog";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as it } from "./cn-dYga0KKN.js";
|
|
6
6
|
function De(t) {
|
|
7
7
|
if (typeof document > "u") return;
|
|
8
8
|
let n = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
@@ -55,7 +55,7 @@ const qt = r.createContext({
|
|
|
55
55
|
noBodyStyles: !1,
|
|
56
56
|
container: null,
|
|
57
57
|
autoFocus: !1
|
|
58
|
-
}),
|
|
58
|
+
}), wt = () => {
|
|
59
59
|
const t = r.useContext(qt);
|
|
60
60
|
if (!t)
|
|
61
61
|
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
@@ -116,13 +116,13 @@ const $e = /* @__PURE__ */ new Set([
|
|
|
116
116
|
"submit",
|
|
117
117
|
"reset"
|
|
118
118
|
]);
|
|
119
|
-
let
|
|
119
|
+
let yt = 0, Ot;
|
|
120
120
|
function Ae(t = {}) {
|
|
121
121
|
let { isDisabled: n } = t;
|
|
122
122
|
Ce(() => {
|
|
123
123
|
if (!n)
|
|
124
|
-
return
|
|
125
|
-
|
|
124
|
+
return yt++, yt === 1 && Xt() && (Ot = Me()), () => {
|
|
125
|
+
yt--, yt === 0 && Ot?.();
|
|
126
126
|
};
|
|
127
127
|
}, [
|
|
128
128
|
n
|
|
@@ -156,16 +156,16 @@ function Me() {
|
|
|
156
156
|
window.scrollTo(0, 0);
|
|
157
157
|
}, w = window.pageXOffset, D = window.pageYOffset, R = zt(Ne(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
158
158
|
window.scrollTo(0, 0);
|
|
159
|
-
let h = zt(
|
|
159
|
+
let h = zt(ft(document, "touchstart", e, {
|
|
160
160
|
passive: !1,
|
|
161
161
|
capture: !0
|
|
162
|
-
}),
|
|
162
|
+
}), ft(document, "touchmove", a, {
|
|
163
163
|
passive: !1,
|
|
164
164
|
capture: !0
|
|
165
|
-
}),
|
|
165
|
+
}), ft(document, "touchend", i, {
|
|
166
166
|
passive: !1,
|
|
167
167
|
capture: !0
|
|
168
|
-
}),
|
|
168
|
+
}), ft(document, "focus", o, !0), ft(window, "scroll", v));
|
|
169
169
|
return () => {
|
|
170
170
|
R(), h(), window.scrollTo(w, D);
|
|
171
171
|
};
|
|
@@ -176,7 +176,7 @@ function Ne(t, n, e) {
|
|
|
176
176
|
t.style[n] = a;
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function ft(t, n, e, a) {
|
|
180
180
|
return t.addEventListener(n, e, a), () => {
|
|
181
181
|
t.removeEventListener(n, e, a);
|
|
182
182
|
};
|
|
@@ -203,7 +203,7 @@ function Ie(...t) {
|
|
|
203
203
|
return (n) => t.forEach((e) => Pe(e, n));
|
|
204
204
|
}
|
|
205
205
|
function Gt(...t) {
|
|
206
|
-
return
|
|
206
|
+
return pt.useCallback(Ie(...t), t);
|
|
207
207
|
}
|
|
208
208
|
const Jt = /* @__PURE__ */ new WeakMap();
|
|
209
209
|
function $(t, n, e = !1) {
|
|
@@ -234,7 +234,7 @@ const C = (t) => {
|
|
|
234
234
|
return t;
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
|
-
function
|
|
237
|
+
function bt(t, n) {
|
|
238
238
|
if (!t)
|
|
239
239
|
return null;
|
|
240
240
|
const e = window.getComputedStyle(t), a = (
|
|
@@ -269,7 +269,7 @@ const x = {
|
|
|
269
269
|
0,
|
|
270
270
|
1
|
|
271
271
|
]
|
|
272
|
-
}, Qt = 0.4, Le = 0.25, Be = 100, Zt = 8,
|
|
272
|
+
}, Qt = 0.4, Le = 0.25, Be = 100, Zt = 8, nt = 16, Mt = 26, $t = "vaul-dragging";
|
|
273
273
|
function te(t) {
|
|
274
274
|
const n = r.useRef(t);
|
|
275
275
|
return r.useEffect(() => {
|
|
@@ -456,7 +456,7 @@ function Ue({ activeSnapPointProp: t, setActiveSnapPointProp: n, snapPoints: e,
|
|
|
456
456
|
const je = () => () => {
|
|
457
457
|
};
|
|
458
458
|
function We() {
|
|
459
|
-
const { direction: t, isOpen: n, shouldScaleBackground: e, setBackgroundColorOnScale: a, noBodyStyles: i } =
|
|
459
|
+
const { direction: t, isOpen: n, shouldScaleBackground: e, setBackgroundColorOnScale: a, noBodyStyles: i } = wt(), o = r.useRef(null), v = ye(() => document.body.style.backgroundColor, []);
|
|
460
460
|
function w() {
|
|
461
461
|
return (window.innerWidth - Mt) / window.innerWidth;
|
|
462
462
|
}
|
|
@@ -494,11 +494,11 @@ function We() {
|
|
|
494
494
|
v
|
|
495
495
|
]);
|
|
496
496
|
}
|
|
497
|
-
let
|
|
497
|
+
let mt = null;
|
|
498
498
|
function ze({ isOpen: t, modal: n, nested: e, hasBeenOpened: a, preventScrollRestoration: i, noBodyStyles: o }) {
|
|
499
499
|
const [v, w] = r.useState(() => typeof window < "u" ? window.location.href : ""), D = r.useRef(0), R = r.useCallback(() => {
|
|
500
|
-
if (Wt() &&
|
|
501
|
-
|
|
500
|
+
if (Wt() && mt === null && t && !o) {
|
|
501
|
+
mt = {
|
|
502
502
|
position: document.body.style.position,
|
|
503
503
|
top: document.body.style.top,
|
|
504
504
|
left: document.body.style.left,
|
|
@@ -519,15 +519,15 @@ function ze({ isOpen: t, modal: n, nested: e, hasBeenOpened: a, preventScrollRes
|
|
|
519
519
|
}, [
|
|
520
520
|
t
|
|
521
521
|
]), h = r.useCallback(() => {
|
|
522
|
-
if (Wt() &&
|
|
522
|
+
if (Wt() && mt !== null && !o) {
|
|
523
523
|
const f = -parseInt(document.body.style.top, 10), m = -parseInt(document.body.style.left, 10);
|
|
524
|
-
Object.assign(document.body.style,
|
|
524
|
+
Object.assign(document.body.style, mt), window.requestAnimationFrame(() => {
|
|
525
525
|
if (i && v !== window.location.href) {
|
|
526
526
|
w(window.location.href);
|
|
527
527
|
return;
|
|
528
528
|
}
|
|
529
529
|
window.scrollTo(m, f);
|
|
530
|
-
}),
|
|
530
|
+
}), mt = null;
|
|
531
531
|
}
|
|
532
532
|
}, [
|
|
533
533
|
v
|
|
@@ -575,15 +575,15 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
575
575
|
document.body.style.pointerEvents = "auto";
|
|
576
576
|
}), s || (document.body.style.pointerEvents = "auto");
|
|
577
577
|
}
|
|
578
|
-
}), [P, K] = r.useState(!1), [G,
|
|
579
|
-
o && s ===
|
|
580
|
-
}, []), { activeSnapPoint: se, activeSnapPointIndex:
|
|
578
|
+
}), [P, K] = r.useState(!1), [G, st] = r.useState(!1), [oe, Pt] = r.useState(!1), rt = r.useRef(null), ht = r.useRef(null), St = r.useRef(null), Dt = r.useRef(null), lt = r.useRef(null), ut = r.useRef(!1), Tt = r.useRef(null), Rt = r.useRef(0), at = r.useRef(!1), It = r.useRef(!Y), _t = r.useRef(0), d = r.useRef(null), Ht = r.useRef(((l = d.current) == null ? void 0 : l.getBoundingClientRect().height) || 0), kt = r.useRef(((U = d.current) == null ? void 0 : U.getBoundingClientRect().width) || 0), Et = r.useRef(0), ie = r.useCallback((s) => {
|
|
579
|
+
o && s === ct.length - 1 && (ht.current = /* @__PURE__ */ new Date());
|
|
580
|
+
}, []), { activeSnapPoint: se, activeSnapPointIndex: ot, setActiveSnapPoint: Lt, onRelease: le, snapPointsOffset: ct, onDrag: ue, shouldFade: Bt, getPercentageDragged: ce } = Ue({
|
|
581
581
|
snapPoints: o,
|
|
582
582
|
activeSnapPointProp: B,
|
|
583
583
|
setActiveSnapPointProp: k,
|
|
584
584
|
drawerRef: d,
|
|
585
585
|
fadeFromIndex: m,
|
|
586
|
-
overlayRef:
|
|
586
|
+
overlayRef: rt,
|
|
587
587
|
onSnapPointChange: ie,
|
|
588
588
|
direction: c,
|
|
589
589
|
container: N,
|
|
@@ -600,35 +600,35 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
600
600
|
preventScrollRestoration: b,
|
|
601
601
|
noBodyStyles: A
|
|
602
602
|
});
|
|
603
|
-
function
|
|
603
|
+
function gt() {
|
|
604
604
|
return (window.innerWidth - Mt) / window.innerWidth;
|
|
605
605
|
}
|
|
606
606
|
function fe(s) {
|
|
607
607
|
var S, T;
|
|
608
|
-
!h && !o || d.current && !d.current.contains(s.target) || (Ht.current = ((S = d.current) == null ? void 0 : S.getBoundingClientRect().height) || 0, kt.current = ((T = d.current) == null ? void 0 : T.getBoundingClientRect().width) || 0,
|
|
608
|
+
!h && !o || d.current && !d.current.contains(s.target) || (Ht.current = ((S = d.current) == null ? void 0 : S.getBoundingClientRect().height) || 0, kt.current = ((T = d.current) == null ? void 0 : T.getBoundingClientRect().width) || 0, st(!0), St.current = /* @__PURE__ */ new Date(), Xt() && window.addEventListener("touchend", () => ut.current = !1, {
|
|
609
609
|
once: !0
|
|
610
610
|
}), s.target.setPointerCapture(s.pointerId), Rt.current = C(c) ? s.pageY : s.pageX);
|
|
611
611
|
}
|
|
612
612
|
function Ft(s, S) {
|
|
613
613
|
var T;
|
|
614
614
|
let g = s;
|
|
615
|
-
const O = (T = window.getSelection()) == null ? void 0 : T.toString(), L = d.current ?
|
|
615
|
+
const O = (T = window.getSelection()) == null ? void 0 : T.toString(), L = d.current ? bt(d.current, c) : null, H = /* @__PURE__ */ new Date();
|
|
616
616
|
if (g.tagName === "SELECT" || g.hasAttribute("data-vaul-no-drag") || g.closest("[data-vaul-no-drag]"))
|
|
617
617
|
return !1;
|
|
618
618
|
if (c === "right" || c === "left")
|
|
619
619
|
return !0;
|
|
620
|
-
if (
|
|
620
|
+
if (ht.current && H.getTime() - ht.current.getTime() < 500)
|
|
621
621
|
return !1;
|
|
622
622
|
if (L !== null && (c === "bottom" ? L > 0 : L < 0))
|
|
623
623
|
return !0;
|
|
624
624
|
if (O && O.length > 0)
|
|
625
625
|
return !1;
|
|
626
|
-
if (
|
|
627
|
-
return
|
|
626
|
+
if (lt.current && H.getTime() - lt.current.getTime() < R && L === 0 || S)
|
|
627
|
+
return lt.current = H, !1;
|
|
628
628
|
for (; g; ) {
|
|
629
629
|
if (g.scrollHeight > g.clientHeight) {
|
|
630
630
|
if (g.scrollTop !== 0)
|
|
631
|
-
return
|
|
631
|
+
return lt.current = /* @__PURE__ */ new Date(), !1;
|
|
632
632
|
if (g.getAttribute("role") === "dialog")
|
|
633
633
|
return !0;
|
|
634
634
|
}
|
|
@@ -639,32 +639,32 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
639
639
|
function me(s) {
|
|
640
640
|
if (d.current && G) {
|
|
641
641
|
const S = c === "bottom" || c === "right" ? 1 : -1, T = (Rt.current - (C(c) ? s.pageY : s.pageX)) * S, g = T > 0, O = o && !h && !g;
|
|
642
|
-
if (O &&
|
|
642
|
+
if (O && ot === 0) return;
|
|
643
643
|
const L = Math.abs(T), H = document.querySelector("[data-vaul-drawer-wrapper]"), J = c === "bottom" || c === "top" ? Ht.current : kt.current;
|
|
644
644
|
let z = L / J;
|
|
645
645
|
const et = ce(L, g);
|
|
646
|
-
if (et !== null && (z = et), O && z >= 1 || !
|
|
647
|
-
if (d.current.classList.add($t),
|
|
646
|
+
if (et !== null && (z = et), O && z >= 1 || !ut.current && !Ft(s.target, g)) return;
|
|
647
|
+
if (d.current.classList.add($t), ut.current = !0, $(d.current, {
|
|
648
648
|
transition: "none"
|
|
649
|
-
}), $(
|
|
649
|
+
}), $(rt.current, {
|
|
650
650
|
transition: "none"
|
|
651
651
|
}), o && ue({
|
|
652
652
|
draggedDistance: T
|
|
653
653
|
}), g && !o) {
|
|
654
|
-
const q = He(T),
|
|
654
|
+
const q = He(T), vt = Math.min(q * -1, 0) * S;
|
|
655
655
|
$(d.current, {
|
|
656
|
-
transform: C(c) ? `translate3d(0, ${
|
|
656
|
+
transform: C(c) ? `translate3d(0, ${vt}px, 0)` : `translate3d(${vt}px, 0, 0)`
|
|
657
657
|
});
|
|
658
658
|
return;
|
|
659
659
|
}
|
|
660
660
|
const Q = 1 - z;
|
|
661
|
-
if ((Bt || m &&
|
|
661
|
+
if ((Bt || m && ot === m - 1) && (a?.(s, z), $(rt.current, {
|
|
662
662
|
opacity: `${Q}`,
|
|
663
663
|
transition: "none"
|
|
664
|
-
}, !0)), H &&
|
|
665
|
-
const q = Math.min(
|
|
664
|
+
}, !0)), H && rt.current && v) {
|
|
665
|
+
const q = Math.min(gt() + z * (1 - gt()), 1), vt = 8 - z * 8, jt = Math.max(0, 14 - z * 14);
|
|
666
666
|
$(H, {
|
|
667
|
-
borderRadius: `${
|
|
667
|
+
borderRadius: `${vt}px`,
|
|
668
668
|
transform: C(c) ? `scale(${q}) translate3d(0, ${jt}px, 0)` : `scale(${q}) translate3d(${jt}px, 0, 0)`,
|
|
669
669
|
transition: "none"
|
|
670
670
|
}, !0);
|
|
@@ -686,23 +686,23 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
686
686
|
function S() {
|
|
687
687
|
if (!d.current || !y) return;
|
|
688
688
|
const T = document.activeElement;
|
|
689
|
-
if (At(T) ||
|
|
689
|
+
if (At(T) || at.current) {
|
|
690
690
|
var g;
|
|
691
691
|
const O = ((g = window.visualViewport) == null ? void 0 : g.height) || 0, L = window.innerHeight;
|
|
692
692
|
let H = L - O;
|
|
693
693
|
const J = d.current.getBoundingClientRect().height || 0, z = J > L * 0.8;
|
|
694
694
|
Et.current || (Et.current = J);
|
|
695
695
|
const et = d.current.getBoundingClientRect().top;
|
|
696
|
-
if (Math.abs(_t.current - H) > 60 && (
|
|
697
|
-
const Q =
|
|
696
|
+
if (Math.abs(_t.current - H) > 60 && (at.current = !at.current), o && o.length > 0 && ct && ot) {
|
|
697
|
+
const Q = ct[ot] || 0;
|
|
698
698
|
H += Q;
|
|
699
699
|
}
|
|
700
|
-
if (_t.current = H, J > O ||
|
|
700
|
+
if (_t.current = H, J > O || at.current) {
|
|
701
701
|
const Q = d.current.getBoundingClientRect().height;
|
|
702
702
|
let q = Q;
|
|
703
703
|
Q > O && (q = O - (z ? et : Mt)), E ? d.current.style.height = `${Q - Math.max(H, 0)}px` : d.current.style.height = `${Math.max(q, O - et)}px`;
|
|
704
704
|
} else Te() || (d.current.style.height = `${Et.current}px`);
|
|
705
|
-
o && o.length > 0 && !
|
|
705
|
+
o && o.length > 0 && !at.current ? d.current.style.bottom = "0px" : d.current.style.bottom = `${Math.max(H, 0)}px`;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
return (s = window.visualViewport) == null || s.addEventListener("resize", S), () => {
|
|
@@ -710,32 +710,32 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
710
710
|
return (T = window.visualViewport) == null ? void 0 : T.removeEventListener("resize", S);
|
|
711
711
|
};
|
|
712
712
|
}, [
|
|
713
|
-
|
|
713
|
+
ot,
|
|
714
714
|
o,
|
|
715
|
-
|
|
715
|
+
ct
|
|
716
716
|
]);
|
|
717
|
-
function
|
|
717
|
+
function dt(s) {
|
|
718
718
|
pe(), p?.(), s || W(!1), setTimeout(() => {
|
|
719
719
|
o && Lt(o[0]);
|
|
720
720
|
}, x.DURATION * 1e3);
|
|
721
721
|
}
|
|
722
722
|
function Ut() {
|
|
723
723
|
if (!d.current) return;
|
|
724
|
-
const s = document.querySelector("[data-vaul-drawer-wrapper]"), S =
|
|
724
|
+
const s = document.querySelector("[data-vaul-drawer-wrapper]"), S = bt(d.current, c);
|
|
725
725
|
$(d.current, {
|
|
726
726
|
transform: "translate3d(0, 0, 0)",
|
|
727
727
|
transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`
|
|
728
|
-
}), $(
|
|
728
|
+
}), $(rt.current, {
|
|
729
729
|
transition: `opacity ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
|
|
730
730
|
opacity: "1"
|
|
731
731
|
}), v && S && S > 0 && _ && $(s, {
|
|
732
732
|
borderRadius: `${Zt}px`,
|
|
733
733
|
overflow: "hidden",
|
|
734
734
|
...C(c) ? {
|
|
735
|
-
transform: `scale(${
|
|
735
|
+
transform: `scale(${gt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
736
736
|
transformOrigin: "top"
|
|
737
737
|
} : {
|
|
738
|
-
transform: `scale(${
|
|
738
|
+
transform: `scale(${gt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
739
739
|
transformOrigin: "left"
|
|
740
740
|
},
|
|
741
741
|
transitionProperty: "transform, border-radius",
|
|
@@ -744,12 +744,12 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
744
744
|
}, !0);
|
|
745
745
|
}
|
|
746
746
|
function pe() {
|
|
747
|
-
!G || !d.current || (d.current.classList.remove($t),
|
|
747
|
+
!G || !d.current || (d.current.classList.remove($t), ut.current = !1, st(!1), Dt.current = /* @__PURE__ */ new Date());
|
|
748
748
|
}
|
|
749
749
|
function we(s) {
|
|
750
750
|
if (!G || !d.current) return;
|
|
751
|
-
d.current.classList.remove($t),
|
|
752
|
-
const S =
|
|
751
|
+
d.current.classList.remove($t), ut.current = !1, st(!1), Dt.current = /* @__PURE__ */ new Date();
|
|
752
|
+
const S = bt(d.current, c);
|
|
753
753
|
if (!s || !Ft(s.target, !1) || !S || Number.isNaN(S) || St.current === null) return;
|
|
754
754
|
const T = Dt.current.getTime() - St.current.getTime(), g = Rt.current - (C(c) ? s.pageY : s.pageX), O = Math.abs(g) / T;
|
|
755
755
|
if (O > 0.05 && (Pt(!0), setTimeout(() => {
|
|
@@ -757,7 +757,7 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
757
757
|
}, 200)), o) {
|
|
758
758
|
le({
|
|
759
759
|
draggedDistance: g * (c === "bottom" || c === "right" ? 1 : -1),
|
|
760
|
-
closeDrawer:
|
|
760
|
+
closeDrawer: dt,
|
|
761
761
|
velocity: O,
|
|
762
762
|
dismissible: h
|
|
763
763
|
}), i?.(s, !0);
|
|
@@ -768,7 +768,7 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
770
|
if (O > Qt) {
|
|
771
|
-
|
|
771
|
+
dt(), i?.(s, !1);
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
774
|
var L;
|
|
@@ -776,25 +776,25 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
776
776
|
var J;
|
|
777
777
|
const z = Math.min((J = d.current.getBoundingClientRect().width) != null ? J : 0, window.innerWidth), et = c === "left" || c === "right";
|
|
778
778
|
if (Math.abs(S) >= (et ? z : H) * D) {
|
|
779
|
-
|
|
779
|
+
dt(), i?.(s, !1);
|
|
780
780
|
return;
|
|
781
781
|
}
|
|
782
782
|
i?.(s, !0), Ut();
|
|
783
783
|
}
|
|
784
784
|
r.useEffect(() => (_ && ($(document.documentElement, {
|
|
785
785
|
scrollBehavior: "auto"
|
|
786
|
-
}),
|
|
786
|
+
}), ht.current = /* @__PURE__ */ new Date()), () => {
|
|
787
787
|
_e(document.documentElement, "scrollBehavior");
|
|
788
788
|
}), [
|
|
789
789
|
_
|
|
790
790
|
]);
|
|
791
791
|
function he(s) {
|
|
792
|
-
const S = s ? (window.innerWidth -
|
|
792
|
+
const S = s ? (window.innerWidth - nt) / window.innerWidth : 1, T = s ? -nt : 0;
|
|
793
793
|
Tt.current && window.clearTimeout(Tt.current), $(d.current, {
|
|
794
794
|
transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
|
|
795
795
|
transform: C(c) ? `scale(${S}) translate3d(0, ${T}px, 0)` : `scale(${S}) translate3d(${T}px, 0, 0)`
|
|
796
796
|
}), !s && d.current && (Tt.current = setTimeout(() => {
|
|
797
|
-
const g =
|
|
797
|
+
const g = bt(d.current, c);
|
|
798
798
|
$(d.current, {
|
|
799
799
|
transition: "none",
|
|
800
800
|
transform: C(c) ? `translate3d(0, ${g}px, 0)` : `translate3d(${g}px, 0, 0)`
|
|
@@ -803,14 +803,14 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
803
803
|
}
|
|
804
804
|
function ge(s, S) {
|
|
805
805
|
if (S < 0) return;
|
|
806
|
-
const T = (window.innerWidth -
|
|
806
|
+
const T = (window.innerWidth - nt) / window.innerWidth, g = T + S * (1 - T), O = -nt + S * nt;
|
|
807
807
|
$(d.current, {
|
|
808
808
|
transform: C(c) ? `scale(${g}) translate3d(0, ${O}px, 0)` : `scale(${g}) translate3d(${O}px, 0, 0)`,
|
|
809
809
|
transition: "none"
|
|
810
810
|
});
|
|
811
811
|
}
|
|
812
812
|
function ve(s, S) {
|
|
813
|
-
const T = C(c) ? window.innerHeight : window.innerWidth, g = S ? (T -
|
|
813
|
+
const T = C(c) ? window.innerHeight : window.innerWidth, g = S ? (T - nt) / T : 1, O = S ? -nt : 0;
|
|
814
814
|
S && $(d.current, {
|
|
815
815
|
transition: `transform ${x.DURATION}s cubic-bezier(${x.EASE.join(",")})`,
|
|
816
816
|
transform: C(c) ? `scale(${g}) translate3d(0, ${O}px, 0)` : `scale(${g}) translate3d(${O}px, 0, 0)`
|
|
@@ -825,7 +825,7 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
825
825
|
]), /* @__PURE__ */ r.createElement(Z.Root, {
|
|
826
826
|
defaultOpen: Y,
|
|
827
827
|
onOpenChange: (s) => {
|
|
828
|
-
!h && !s || (s ? K(!0) :
|
|
828
|
+
!h && !s || (s ? K(!0) : dt(!0), W(s));
|
|
829
829
|
},
|
|
830
830
|
open: _
|
|
831
831
|
}, /* @__PURE__ */ r.createElement(qt.Provider, {
|
|
@@ -834,7 +834,7 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
834
834
|
snapPoints: o,
|
|
835
835
|
setActiveSnapPoint: Lt,
|
|
836
836
|
drawerRef: d,
|
|
837
|
-
overlayRef:
|
|
837
|
+
overlayRef: rt,
|
|
838
838
|
onOpenChange: n,
|
|
839
839
|
onPress: fe,
|
|
840
840
|
onRelease: we,
|
|
@@ -845,14 +845,14 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
845
845
|
isOpen: _,
|
|
846
846
|
isDragging: G,
|
|
847
847
|
shouldFade: Bt,
|
|
848
|
-
closeDrawer:
|
|
848
|
+
closeDrawer: dt,
|
|
849
849
|
onNestedDrag: ge,
|
|
850
850
|
onNestedOpenChange: he,
|
|
851
851
|
onNestedRelease: ve,
|
|
852
|
-
keyboardIsOpen:
|
|
852
|
+
keyboardIsOpen: at,
|
|
853
853
|
modal: F,
|
|
854
|
-
snapPointsOffset:
|
|
855
|
-
activeSnapPointIndex:
|
|
854
|
+
snapPointsOffset: ct,
|
|
855
|
+
activeSnapPointIndex: ot,
|
|
856
856
|
direction: c,
|
|
857
857
|
shouldScaleBackground: v,
|
|
858
858
|
setBackgroundColorOnScale: w,
|
|
@@ -863,7 +863,7 @@ function Ve({ open: t, onOpenChange: n, children: e, onDrag: a, onRelease: i, sn
|
|
|
863
863
|
}, e));
|
|
864
864
|
}
|
|
865
865
|
const ne = /* @__PURE__ */ r.forwardRef(function({ ...t }, n) {
|
|
866
|
-
const { overlayRef: e, snapPoints: a, onRelease: i, shouldFade: o, isOpen: v, modal: w, shouldAnimate: D } =
|
|
866
|
+
const { overlayRef: e, snapPoints: a, onRelease: i, shouldFade: o, isOpen: v, modal: w, shouldAnimate: D } = wt(), R = Gt(n, e), h = a && a.length > 0;
|
|
867
867
|
if (!w)
|
|
868
868
|
return null;
|
|
869
869
|
const f = r.useCallback((m) => i(m), [
|
|
@@ -881,7 +881,7 @@ const ne = /* @__PURE__ */ r.forwardRef(function({ ...t }, n) {
|
|
|
881
881
|
});
|
|
882
882
|
ne.displayName = "Drawer.Overlay";
|
|
883
883
|
const re = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, style: n, onOpenAutoFocus: e, ...a }, i) {
|
|
884
|
-
const { drawerRef: o, onPress: v, onRelease: w, onDrag: D, keyboardIsOpen: R, snapPointsOffset: h, activeSnapPointIndex: f, modal: m, isOpen: B, direction: k, snapPoints: E, container: F, handleOnly: p, shouldAnimate: M, autoFocus: A } =
|
|
884
|
+
const { drawerRef: o, onPress: v, onRelease: w, onDrag: D, keyboardIsOpen: R, snapPointsOffset: h, activeSnapPointIndex: f, modal: m, isOpen: B, direction: k, snapPoints: E, container: F, handleOnly: p, shouldAnimate: M, autoFocus: A } = wt(), [c, Y] = r.useState(!1), tt = Gt(i, o), u = r.useRef(null), b = r.useRef(null), y = r.useRef(!1), I = E && E.length > 0;
|
|
885
885
|
We();
|
|
886
886
|
const N = (l, U, _ = 0) => {
|
|
887
887
|
if (y.current) return !0;
|
|
@@ -960,7 +960,7 @@ const re = /* @__PURE__ */ r.forwardRef(function({ onPointerDownOutside: t, styl
|
|
|
960
960
|
});
|
|
961
961
|
re.displayName = "Drawer.Content";
|
|
962
962
|
const Ye = 250, qe = 120, Xe = /* @__PURE__ */ r.forwardRef(function({ preventCycle: t = !1, children: n, ...e }, a) {
|
|
963
|
-
const { closeDrawer: i, isDragging: o, snapPoints: v, activeSnapPoint: w, setActiveSnapPoint: D, dismissible: R, handleOnly: h, isOpen: f, onPress: m, onDrag: B } =
|
|
963
|
+
const { closeDrawer: i, isDragging: o, snapPoints: v, activeSnapPoint: w, setActiveSnapPoint: D, dismissible: R, handleOnly: h, isOpen: f, onPress: m, onDrag: B } = wt(), k = r.useRef(null), E = r.useRef(!1);
|
|
964
964
|
function F() {
|
|
965
965
|
if (E.current) {
|
|
966
966
|
A();
|
|
@@ -1018,7 +1018,7 @@ const Ye = 250, qe = 120, Xe = /* @__PURE__ */ r.forwardRef(function({ preventCy
|
|
|
1018
1018
|
});
|
|
1019
1019
|
Xe.displayName = "Drawer.Handle";
|
|
1020
1020
|
function Ke(t) {
|
|
1021
|
-
const n =
|
|
1021
|
+
const n = wt(), { container: e = n.container, ...a } = t;
|
|
1022
1022
|
return /* @__PURE__ */ r.createElement(Z.Portal, {
|
|
1023
1023
|
container: e,
|
|
1024
1024
|
...a
|
|
@@ -1044,23 +1044,23 @@ const V = {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
);
|
|
1046
1046
|
Ge.displayName = "Drawer";
|
|
1047
|
-
const sn = V.Trigger, Je = V.Portal, ln = V.Close, ae =
|
|
1047
|
+
const sn = V.Trigger, Je = V.Portal, ln = V.Close, ae = pt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
|
|
1048
1048
|
V.Overlay,
|
|
1049
1049
|
{
|
|
1050
1050
|
ref: e,
|
|
1051
|
-
className:
|
|
1051
|
+
className: it("fixed inset-0 z-50 bg-black/80", t),
|
|
1052
1052
|
...n
|
|
1053
1053
|
}
|
|
1054
1054
|
));
|
|
1055
1055
|
ae.displayName = V.Overlay.displayName;
|
|
1056
|
-
const Qe =
|
|
1056
|
+
const Qe = pt.forwardRef(
|
|
1057
1057
|
({ className: t, children: n, hideBar: e = !0, ...a }, i) => /* @__PURE__ */ X.jsxs(Je, { children: [
|
|
1058
1058
|
/* @__PURE__ */ X.jsx(ae, {}),
|
|
1059
1059
|
/* @__PURE__ */ X.jsxs(
|
|
1060
1060
|
V.Content,
|
|
1061
1061
|
{
|
|
1062
1062
|
ref: i,
|
|
1063
|
-
className:
|
|
1063
|
+
className: it(
|
|
1064
1064
|
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
1065
1065
|
t
|
|
1066
1066
|
),
|
|
@@ -1080,7 +1080,7 @@ const Ze = ({
|
|
|
1080
1080
|
}) => /* @__PURE__ */ X.jsx(
|
|
1081
1081
|
"div",
|
|
1082
1082
|
{
|
|
1083
|
-
className:
|
|
1083
|
+
className: it("grid gap-1.5 p-4 text-center sm:text-left", t),
|
|
1084
1084
|
...n
|
|
1085
1085
|
}
|
|
1086
1086
|
);
|
|
@@ -1091,16 +1091,16 @@ const tn = ({
|
|
|
1091
1091
|
}) => /* @__PURE__ */ X.jsx(
|
|
1092
1092
|
"div",
|
|
1093
1093
|
{
|
|
1094
|
-
className:
|
|
1094
|
+
className: it("mt-auto flex flex-col gap-2 p-4", t),
|
|
1095
1095
|
...n
|
|
1096
1096
|
}
|
|
1097
1097
|
);
|
|
1098
1098
|
tn.displayName = "DrawerFooter";
|
|
1099
|
-
const en =
|
|
1099
|
+
const en = pt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
|
|
1100
1100
|
V.Title,
|
|
1101
1101
|
{
|
|
1102
1102
|
ref: e,
|
|
1103
|
-
className:
|
|
1103
|
+
className: it(
|
|
1104
1104
|
"text-lg font-semibold leading-none tracking-tight",
|
|
1105
1105
|
t
|
|
1106
1106
|
),
|
|
@@ -1108,11 +1108,11 @@ const en = mt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
|
|
|
1108
1108
|
}
|
|
1109
1109
|
));
|
|
1110
1110
|
en.displayName = V.Title.displayName;
|
|
1111
|
-
const nn =
|
|
1111
|
+
const nn = pt.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ X.jsx(
|
|
1112
1112
|
V.Description,
|
|
1113
1113
|
{
|
|
1114
1114
|
ref: e,
|
|
1115
|
-
className:
|
|
1115
|
+
className: it("text-sm text-muted-foreground", t),
|
|
1116
1116
|
...n
|
|
1117
1117
|
}
|
|
1118
1118
|
));
|
|
@@ -1130,4 +1130,4 @@ export {
|
|
|
1130
1130
|
ae as i,
|
|
1131
1131
|
Je as j
|
|
1132
1132
|
};
|
|
1133
|
-
//# sourceMappingURL=Drawer-
|
|
1133
|
+
//# sourceMappingURL=Drawer-DJ05s2pH.js.map
|