zudoku 0.0.0-f62edde → 0.0.0-f687ed1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/app/demo.js +17 -2
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +7 -13
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +3 -3
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/loader.js +2 -5
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.js +5 -0
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +152 -5
- package/dist/config/validators/InputNavigationSchema.js +0 -3
- 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 +4 -3
- 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 +6 -3
- package/dist/config/validators/validate.js +15 -5
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +65 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -0
- package/dist/lib/authentication/components/SignIn.js +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -2
- package/dist/lib/authentication/providers/openid.js +11 -5
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +10 -10
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Main.js +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/MobileTopNavigation.js +8 -5
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +5 -0
- package/dist/lib/components/TopNavigation.js +16 -12
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/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/components/navigation/NavigationWrapper.js +2 -2
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +7 -5
- package/dist/lib/core/ZudokuContext.js +16 -3
- package/dist/lib/core/ZudokuContext.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 +8 -12
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +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.js +5 -5
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +3 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.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/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +16 -12
- 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 +50 -35
- 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 +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +25 -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 +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/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/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +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/build.js +8 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/dev-server.js +10 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +1 -28
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/plugin-docs.js +11 -9
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +2 -3
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +91 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +47 -5
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/lib/Alert-_ISVjPaE.js +161 -0
- package/lib/Alert-_ISVjPaE.js.map +1 -0
- package/lib/{Button-BE9IVkWV.js → Button-B3o-2Xdf.js} +2 -2
- package/lib/{Button-BE9IVkWV.js.map → Button-B3o-2Xdf.js.map} +1 -1
- package/lib/CallbackHandler-CHrZoaQm.js +38 -0
- package/lib/CallbackHandler-CHrZoaQm.js.map +1 -0
- package/lib/{Card-DPhGbYUM.js → Card-CMDQUPM4.js} +2 -2
- package/lib/{Card-DPhGbYUM.js.map → Card-CMDQUPM4.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-B-G0eKtw.js +85 -0
- package/lib/CodeBlock-B-G0eKtw.js.map +1 -0
- package/lib/Command-C9AC5cf-.js +140 -0
- package/lib/Command-C9AC5cf-.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-DMWw1doX.js} +6 -6
- package/lib/Dialog-DMWw1doX.js.map +1 -0
- package/lib/{Drawer-BzkOKwgC.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-BzkOKwgC.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/MdxPage-CO_w2FI6.js +110 -0
- package/lib/MdxPage-CO_w2FI6.js.map +1 -0
- package/lib/{OasProvider-CUXXF3oj.js → OasProvider-BbVO6EgC.js} +3 -3
- package/lib/{OasProvider-CUXXF3oj.js.map → OasProvider-BbVO6EgC.js.map} +1 -1
- package/lib/{OperationList-P_vP7u7f.js → OperationList-Crvmqvd9.js} +726 -714
- package/lib/OperationList-Crvmqvd9.js.map +1 -0
- package/lib/{Pagination-tnJwvuLq.js → Pagination-Ct2YfjYl.js} +10 -9
- package/lib/Pagination-Ct2YfjYl.js.map +1 -0
- package/lib/RouteGuard-Vnlz_t51.js +737 -0
- package/lib/RouteGuard-Vnlz_t51.js.map +1 -0
- package/lib/{SchemaList-6GhTLPZt.js → SchemaList-DOYtqnab.js} +26 -37
- package/lib/SchemaList-DOYtqnab.js.map +1 -0
- package/lib/{SchemaView-DTIMiB_H.js → SchemaView-CyRfElaI.js} +94 -103
- package/lib/SchemaView-CyRfElaI.js.map +1 -0
- package/lib/SignUp-CcP8Tyfs.js +56 -0
- package/lib/SignUp-CcP8Tyfs.js.map +1 -0
- package/lib/{Markdown-BF7mJP8j.js → Slot-DqgTXQwt.js} +3359 -3002
- package/lib/Slot-DqgTXQwt.js.map +1 -0
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-bm761HDo.js} +756 -756
- package/lib/SyntaxHighlight-bm761HDo.js.map +1 -0
- package/lib/{Toc-BxYiZwxz.js → Toc-8NJ4k4Us.js} +3 -3
- package/lib/{Toc-BxYiZwxz.js.map → Toc-8NJ4k4Us.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-BBvOD6jV.js → circular-DZw_Mz7f.js} +2 -2
- package/lib/{circular-BBvOD6jV.js.map → circular-DZw_Mz7f.js.map} +1 -1
- package/lib/{cn-wvCW-ho6.js → cn-dYga0KKN.js} +2 -2
- package/lib/cn-dYga0KKN.js.map +1 -0
- package/lib/{createServer-CR5sbG6H.js → createServer-CQoCyFC1.js} +3398 -3552
- package/lib/createServer-CQoCyFC1.js.map +1 -0
- package/lib/errors-BfmB7Vsx.js +44 -0
- package/lib/errors-BfmB7Vsx.js.map +1 -0
- package/lib/{hook-CHXroBFt.js → hook-CZjW2buS.js} +423 -416
- package/lib/hook-CZjW2buS.js.map +1 -0
- package/lib/index-B3xY0rUq.js +3471 -0
- package/lib/index-B3xY0rUq.js.map +1 -0
- package/lib/index-BHBXOwle.js +3980 -0
- package/lib/index-BHBXOwle.js.map +1 -0
- package/lib/index-Bm35Tkgf.js +107 -0
- package/lib/index-Bm35Tkgf.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BvvmIczU.js → index-D-Vi7oy2.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-D-Vi7oy2.js.map} +1 -1
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index.esm-Cp4wkyud.js.map +1 -1
- package/lib/invariant-DAFpPywt.js.map +1 -1
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- 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 +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +6 -73
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +2 -2
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +24 -24
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +3 -3
- 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 +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- 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-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +40 -9885
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +131 -121
- 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 +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.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +128 -167
- 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 +1 -1
- 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-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +211 -117
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +31 -29
- package/src/app/demo.tsx +20 -3
- package/src/app/main.css +26 -5
- package/src/app/main.tsx +10 -18
- package/src/app/standalone.tsx +3 -3
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/providers/openid.tsx +23 -4
- package/src/lib/components/Autocomplete.tsx +2 -1
- package/src/lib/components/Banner.tsx +1 -2
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Header.tsx +20 -19
- package/src/lib/components/Main.tsx +1 -1
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/MobileTopNavigation.tsx +58 -9
- package/src/lib/components/NotFoundPage.tsx +6 -5
- package/src/lib/components/Pagination.tsx +1 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +30 -14
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/NavigationWrapper.tsx +5 -2
- package/src/lib/core/ZudokuContext.ts +27 -5
- package/src/lib/errors/ErrorAlert.tsx +8 -16
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +18 -18
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/custom-pages/index.tsx +2 -6
- package/src/lib/plugins/markdown/MdxPage.tsx +7 -12
- package/src/lib/plugins/openapi/OperationList.tsx +11 -19
- 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/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +2 -1
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +40 -31
- 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 +5 -6
- package/src/lib/plugins/openapi/playground/Playground.tsx +181 -126
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +103 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -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/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/ui/Alert.tsx +1 -1
- package/src/lib/ui/CodeBlock.tsx +5 -6
- package/src/lib/ui/Dialog.tsx +2 -2
- package/src/lib/ui/EmbeddedCodeBlock.tsx +2 -2
- 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/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-BF7mJP8j.js.map +0 -1
- package/lib/MdxPage-CJs98yjf.js +0 -121
- package/lib/MdxPage-CJs98yjf.js.map +0 -1
- package/lib/OperationList-P_vP7u7f.js.map +0 -1
- package/lib/Pagination-tnJwvuLq.js.map +0 -1
- package/lib/RouteGuard-gV7nvzi7.js +0 -55
- package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
- package/lib/SchemaList-6GhTLPZt.js.map +0 -1
- package/lib/SchemaView-DTIMiB_H.js.map +0 -1
- package/lib/SignUp-B6w5AwHM.js +0 -63
- package/lib/SignUp-B6w5AwHM.js.map +0 -1
- package/lib/Slot-Di32B6gb.js +0 -161
- package/lib/Slot-Di32B6gb.js.map +0 -1
- package/lib/SyntaxHighlight-C5ja40ix.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/cn-wvCW-ho6.js.map +0 -1
- package/lib/createServer-CR5sbG6H.js.map +0 -1
- package/lib/errors-D_5vKvUq.js +0 -78
- package/lib/errors-D_5vKvUq.js.map +0 -1
- package/lib/hook-CHXroBFt.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-DwJ9TXn0.js +0 -3227
- package/lib/index-DwJ9TXn0.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
|
@@ -2,7 +2,7 @@ import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import * as a from "@radix-ui/react-dialog";
|
|
3
3
|
import * as l from "react";
|
|
4
4
|
import { XIcon as c } from "lucide-react";
|
|
5
|
-
import { c as i } from "./cn-
|
|
5
|
+
import { c as i } from "./cn-dYga0KKN.js";
|
|
6
6
|
const j = a.Root, b = a.Trigger, m = a.Portal, h = a.Close, n = l.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ s.jsx(
|
|
7
7
|
a.Overlay,
|
|
8
8
|
{
|
|
@@ -28,8 +28,8 @@ 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
|
|
32
|
-
/* @__PURE__ */ s.jsx(c, { className: "h-
|
|
31
|
+
o && /* @__PURE__ */ s.jsxs(a.Close, { className: "absolute left-1 top-1 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
|
+
/* @__PURE__ */ s.jsx(c, { className: "h-3 w-3", strokeWidth: 2 }),
|
|
33
33
|
/* @__PURE__ */ s.jsx("span", { className: "sr-only", children: "Close" })
|
|
34
34
|
] })
|
|
35
35
|
]
|
|
@@ -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-DMWw1doX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog-DMWw1doX.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 left-1 top-1 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-3 w-3\" strokeWidth={2} />\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,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMW,IAAgBN,EAAM,WAK1B,CAAC,EAAE,WAAAC,GAAW,UAAAM,GAAU,iBAAAC,IAAkB,IAAM,GAAGN,EAAA,GAASC,6BAC3DN,GAAA,EACC,UAAA;AAAA,EAAAO,gBAAAA,EAAAA,IAACL,GAAA,EAAc;AAAA,EACfU,gBAAAA,EAAAA;AAAAA,IAACd,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAQ;AAAA,MACA,WAAWE;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAK;AAAA,QACAC,KACCC,gBAAAA,EAAAA,KAACd,EAAgB,OAAhB,EAAsB,WAAU,kRAC/B,UAAA;AAAA,UAAAS,gBAAAA,EAAAA,IAACM,GAAA,EAAM,WAAU,WAAU,aAAa,GAAG;AAAA,UAC3CN,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,QAAA,EAAA,CACjC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAEJ,GACF,CACD;AACDE,EAAc,cAAcX,EAAgB,QAAQ;AAEpD,MAAMgB,IAAe,CAAC;AAAA,EACpB,WAAAV;AAAA,EACA,GAAGC;AACL,MACEE,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN;AAEFS,EAAa,cAAc;AAE3B,MAAMC,IAAe,CAAC;AAAA,EACpB,WAAAX;AAAA,EACA,GAAGC;AACL,MACEE,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN;AAEFU,EAAa,cAAc;AAE3B,MAAMC,IAAcb,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDW,EAAY,cAAclB,EAAgB,MAAM;AAEhD,MAAMmB,IAAoBd,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1BC,gBAAAA,EAAAA;AAAAA,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;"}
|
|
@@ -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
|