@pixpilot/shadcn-ui 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AbsoluteFill.cjs +24 -1
- package/dist/AbsoluteFill.d.ts +2 -2
- package/dist/AbsoluteFill.js +21 -1
- package/dist/Alert.cjs +81 -1
- package/dist/Alert.js +77 -1
- package/dist/Button.cjs +84 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +79 -1
- package/dist/CloseButtonAbsolute.cjs +20 -1
- package/dist/CloseButtonAbsolute.js +16 -1
- package/dist/CloseButtonRounded.cjs +22 -1
- package/dist/CloseButtonRounded.js +17 -1
- package/dist/Combobox.cjs +53 -1
- package/dist/Combobox.js +48 -1
- package/dist/CommandOptionList.cjs +29 -1
- package/dist/CommandOptionList.js +25 -1
- package/dist/ContentCard.cjs +27 -1
- package/dist/ContentCard.js +23 -1
- package/dist/DatePicker.cjs +38 -1
- package/dist/DatePicker.d.ts +2 -2
- package/dist/DatePicker.js +33 -1
- package/dist/LoadingOverlay.cjs +65 -1
- package/dist/LoadingOverlay.js +60 -1
- package/dist/Select.cjs +27 -1
- package/dist/Select.js +23 -1
- package/dist/Slider.cjs +19 -1
- package/dist/Slider.js +15 -1
- package/dist/ThemeToggle.cjs +98 -1
- package/dist/ThemeToggle.js +94 -1
- package/dist/_virtual/rolldown_runtime.cjs +44 -1
- package/dist/_virtual/rolldown_runtime.js +43 -1
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +47 -1
- package/dist/confirmation-dialog/ConfirmationDialog.d.cts +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.js +43 -1
- package/dist/confirmation-dialog/DialogProvider.cjs +16 -1
- package/dist/confirmation-dialog/DialogProvider.js +12 -1
- package/dist/confirmation-dialog/confirmation-dialogs.cjs +14 -1
- package/dist/confirmation-dialog/confirmation-dialogs.js +12 -1
- package/dist/confirmation-dialog/index.cjs +7 -1
- package/dist/confirmation-dialog/index.js +6 -1
- package/dist/file-upload/FileUpload.cjs +68 -1
- package/dist/file-upload/FileUpload.js +63 -1
- package/dist/file-upload/FileUploadItems.cjs +36 -1
- package/dist/file-upload/FileUploadItems.js +32 -1
- package/dist/file-upload/FileUploadListItem.cjs +89 -1
- package/dist/file-upload/FileUploadListItem.js +83 -1
- package/dist/file-upload/hooks/index.cjs +4 -1
- package/dist/file-upload/hooks/index.d.cts +2 -0
- package/dist/file-upload/hooks/index.js +3 -1
- package/dist/file-upload/hooks/use-file-error.cjs +15 -1
- package/dist/file-upload/hooks/use-file-error.js +14 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +34 -1
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.cts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +32 -1
- package/dist/file-upload/hooks/use-file-upload-store.cjs +77 -1
- package/dist/file-upload/hooks/use-file-upload-store.d.cts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.js +75 -1
- package/dist/file-upload/index.cjs +6 -1
- package/dist/file-upload/index.d.cts +2 -1
- package/dist/file-upload/index.js +5 -1
- package/dist/file-upload/utils/create-placeholder-file.cjs +12 -1
- package/dist/file-upload/utils/create-placeholder-file.js +10 -1
- package/dist/file-upload/utils/get-file-key.cjs +9 -1
- package/dist/file-upload/utils/get-file-key.d.cts +1 -0
- package/dist/file-upload/utils/get-file-key.js +7 -1
- package/dist/file-upload/utils/get-file-meta.cjs +24 -1
- package/dist/file-upload/utils/get-file-meta.d.cts +1 -0
- package/dist/file-upload/utils/get-file-meta.js +21 -1
- package/dist/file-upload/utils/index.d.cts +4 -0
- package/dist/file-upload/utils/is-file-equal.cjs +10 -1
- package/dist/file-upload/utils/is-file-equal.d.cts +1 -0
- package/dist/file-upload/utils/is-file-equal.js +8 -1
- package/dist/file-upload/utils/merge-file-metadata.cjs +27 -1
- package/dist/file-upload/utils/merge-file-metadata.d.cts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.js +26 -1
- package/dist/file-upload-inline/FileUploadInline.cjs +71 -1
- package/dist/file-upload-inline/FileUploadInline.js +66 -1
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +96 -1
- package/dist/file-upload-inline/FileUploadInlineItem.js +90 -1
- package/dist/file-upload-inline/defaults.cjs +12 -1
- package/dist/file-upload-inline/defaults.js +10 -1
- package/dist/file-upload-inline/index.cjs +2 -1
- package/dist/file-upload-inline/index.js +1 -1
- package/dist/file-upload-inline/utils.cjs +37 -1
- package/dist/file-upload-inline/utils.js +34 -1
- package/dist/hooks/index.cjs +2 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-media-query.cjs +9 -1
- package/dist/hooks/use-media-query.js +7 -1
- package/dist/icon-selector/IconPicker.cjs +93 -1
- package/dist/icon-selector/IconPicker.js +88 -1
- package/dist/icon-selector/constants.cjs +7 -1
- package/dist/icon-selector/constants.js +5 -0
- package/dist/icon-selector/icon-picker-container.cjs +35 -1
- package/dist/icon-selector/icon-picker-container.js +32 -1
- package/dist/icon-selector/icon-picker-content.cjs +146 -1
- package/dist/icon-selector/icon-picker-content.js +141 -1
- package/dist/icon-selector/index.cjs +2 -1
- package/dist/icon-selector/index.js +1 -1
- package/dist/icon-selector/use-async-providers.cjs +69 -1
- package/dist/icon-selector/use-async-providers.js +67 -1
- package/dist/icon-selector/utils/is-valid-provider.cjs +12 -1
- package/dist/icon-selector/utils/is-valid-provider.js +10 -1
- package/dist/icon-selector/virtualized-icon-grid.cjs +137 -1
- package/dist/icon-selector/virtualized-icon-grid.js +132 -1
- package/dist/index.cjs +76 -1
- package/dist/index.js +37 -1
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.cjs +558 -1
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.js +555 -1
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.cjs +566 -1
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.js +565 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +695 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +679 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +521 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +503 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +282 -1
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +266 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.cjs +3767 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js +3747 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs +426 -1
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +379 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +165 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +175 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +151 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +138 -1
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.cjs +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +33 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.cjs +92 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-context@1.1.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.js +88 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_4f1d9653b0e2175502748f45fd432185/node_modules/@radix-ui/react-dialog/dist/index.cjs +310 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dialog@1.1.15_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react_4f1d9653b0e2175502748f45fd432185/node_modules/@radix-ui/react-dialog/dist/index.js +299 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +190 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.11_@types_react-dom@19.2.3_@types_react@19.2.6__@_9ee1db7daf927866cf505b31d40047ad/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +187 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +34 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-guards@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.js +32 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +203 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-focus-scope@1.1.7_@types_react-dom@19.2.3_@types_react@19.2.6__@types_r_0a31b7f987af9482d13505312e1a1be9/node_modules/@radix-ui/react-focus-scope/dist/index.js +200 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.cjs +18 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-id@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-id/dist/index.js +16 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9/node_modules/@radix-ui/react-portal/dist/index.cjs +29 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.9_@types_react-dom@19.2.3_@types_react@19.2.6__@types_react@_1bb4e0f97f86496802d28a2e74e2a8b9/node_modules/@radix-ui/react-portal/dist/index.js +25 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.cjs +110 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-presence@1.1.5_@types_react-dom@19.2.3_@types_react@19.2.6__@types_reac_90f8e5c12233caef3399d5fd66452a13/node_modules/@radix-ui/react-presence/dist/index.js +108 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.cjs +52 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.1.3_@types_react-dom@19.2.3_@types_react@19.2.6__@types_rea_a92a69cb1cb39305138539e4fa72f596/node_modules/@radix-ui/react-primitive/dist/index.js +47 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs +92 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.js +89 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.cjs +103 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.4_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-slot/dist/index.js +100 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +15 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +64 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.2.2_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +62 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +19 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +17 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +9 -0
- package/dist/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.1.1_@types_react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js +108 -0
- package/dist/node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.cjs +155 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.cjs +19 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.cjs +14 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js +9 -0
- package/dist/node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.cjs +22 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js +46 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +12 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +37 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/component.cjs +61 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/constants.cjs +23 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/index.cjs +57 -0
- package/dist/node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll-bar/dist/es5/utils.cjs +49 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +17 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +64 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +16 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +7 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +9 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/Combination.cjs +29 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/SideEffect.cjs +179 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/UI.cjs +79 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.cjs +27 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/handleScroll.cjs +98 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/index.cjs +19 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/medium.cjs +18 -0
- package/dist/node_modules/.pnpm/react-remove-scroll@2.7.1_@types_react@19.2.6_react@19.2.0/node_modules/react-remove-scroll/dist/es5/sidecar.cjs +21 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/component.js +21 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/hook.js +27 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es2015/singleton.js +43 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/component.cjs +33 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/hook.cjs +40 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/index.cjs +39 -0
- package/dist/node_modules/.pnpm/react-style-singleton@2.2.3_@types_react@19.2.6_react@19.2.0/node_modules/react-style-singleton/dist/es5/singleton.cjs +55 -0
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +347 -1
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +268 -1
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.cjs +1895 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1893 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.cjs +557 -0
- package/dist/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.js +31 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/assignRef.js +22 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +47 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/assignRef.cjs +34 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/createRef.cjs +39 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/index.cjs +85 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/mergeRef.cjs +40 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/refToCallback.cjs +59 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/transformRef.cjs +34 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useMergeRef.cjs +61 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useRef.cjs +53 -0
- package/dist/node_modules/.pnpm/use-callback-ref@1.3.3_@types_react@19.2.6_react@19.2.0/node_modules/use-callback-ref/dist/es5/useTransformRef.cjs +38 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es2015/medium.js +84 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/config.cjs +22 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/env.cjs +21 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/exports.cjs +31 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/hoc.cjs +31 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/hook.cjs +60 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/index.cjs +69 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/medium.cjs +101 -0
- package/dist/node_modules/.pnpm/use-sidecar@1.1.3_@types_react@19.2.6_react@19.2.0/node_modules/use-sidecar/dist/es5/renderProp.cjs +58 -0
- package/dist/packages/shadcn/src/components/index.cjs +6 -1
- package/dist/packages/shadcn/src/components/index.js +5 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +6 -1
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +3 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +6 -1
- package/dist/packages/shadcn/src/components/ui/alert.cjs +44 -1
- package/dist/packages/shadcn/src/components/ui/alert.js +38 -1
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/avatar.js +2 -1
- package/dist/packages/shadcn/src/components/ui/badge.cjs +20 -1
- package/dist/packages/shadcn/src/components/ui/badge.js +16 -1
- package/dist/packages/shadcn/src/components/ui/button.cjs +50 -1
- package/dist/packages/shadcn/src/components/ui/button.js +45 -1
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +8 -1
- package/dist/packages/shadcn/src/components/ui/calendar.js +4 -1
- package/dist/packages/shadcn/src/components/ui/card.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/card.js +2 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/checkbox.js +6 -1
- package/dist/packages/shadcn/src/components/ui/command.cjs +11 -1
- package/dist/packages/shadcn/src/components/ui/command.js +7 -1
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +93 -1
- package/dist/packages/shadcn/src/components/ui/dialog.js +81 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +3 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +49 -1
- package/dist/packages/shadcn/src/components/ui/file-upload.js +45 -1
- package/dist/packages/shadcn/src/components/ui/form.cjs +12 -1
- package/dist/packages/shadcn/src/components/ui/form.js +9 -1
- package/dist/packages/shadcn/src/components/ui/index.cjs +30 -1
- package/dist/packages/shadcn/src/components/ui/index.js +29 -1
- package/dist/packages/shadcn/src/components/ui/input.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/input.js +2 -1
- package/dist/packages/shadcn/src/components/ui/label.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/label.js +2 -1
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +9 -1
- package/dist/packages/shadcn/src/components/ui/pagination.js +4 -1
- package/dist/packages/shadcn/src/components/ui/popover.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/popover.js +2 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/radio-group.js +3 -1
- package/dist/packages/shadcn/src/components/ui/select.cjs +10 -1
- package/dist/packages/shadcn/src/components/ui/select.js +6 -1
- package/dist/packages/shadcn/src/components/ui/separator.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/separator.js +2 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +26 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +22 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +6 -1
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +3 -1
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +7 -1
- package/dist/packages/shadcn/src/components/ui/sheet.js +3 -1
- package/dist/packages/shadcn/src/components/ui/slider.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/slider.js +2 -1
- package/dist/packages/shadcn/src/components/ui/switch.cjs +8 -1
- package/dist/packages/shadcn/src/components/ui/switch.js +5 -1
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/tabs.js +2 -1
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/textarea.js +2 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +5 -1
- package/dist/packages/shadcn/src/components/ui/tooltip.js +2 -1
- package/dist/packages/shadcn/src/lib/utils.cjs +11 -1
- package/dist/packages/shadcn/src/lib/utils.js +10 -1
- package/dist/pagination/Pagination.cjs +156 -1
- package/dist/pagination/Pagination.js +151 -1
- package/dist/pagination/index.cjs +2 -1
- package/dist/pagination/index.js +1 -1
- package/dist/rich-text-editor/RichTextEditor.cjs +132 -1
- package/dist/rich-text-editor/RichTextEditor.js +126 -1
- package/dist/rich-text-editor/index.cjs +2 -1
- package/dist/rich-text-editor/index.js +1 -1
- package/dist/rich-text-editor/predefined-toolbar-options.cjs +84 -1
- package/dist/rich-text-editor/predefined-toolbar-options.js +81 -1
- package/dist/spinner/index.cjs +2 -1
- package/dist/spinner/index.js +1 -1
- package/dist/spinner/spinner.cjs +73 -6
- package/dist/spinner/spinner.js +70 -6
- package/dist/spinner/styles.cjs +25 -12
- package/dist/spinner/styles.js +23 -12
- package/dist/tags-input.cjs +226 -1
- package/dist/tags-input.js +222 -1
- package/dist/theme-provider/ThemeProvider.cjs +27 -1
- package/dist/theme-provider/ThemeProvider.js +23 -1
- package/dist/theme-provider/index.cjs +4 -1
- package/dist/theme-provider/index.js +4 -1
- package/dist/toast/AlertToast.cjs +36 -1
- package/dist/toast/AlertToast.js +31 -1
- package/dist/toast/index.cjs +2 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast/toast.cjs +75 -1
- package/dist/toast/toast.js +66 -1
- package/package.json +3 -3
- package/dist/packages/shadcn/src/lib/index.cjs +0 -1
- package/dist/packages/shadcn/src/lib/index.js +0 -1
|
@@ -1 +1,175 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
4
|
+
function hasWindow() {
|
|
5
|
+
return typeof window !== "undefined";
|
|
6
|
+
}
|
|
7
|
+
function getNodeName(node) {
|
|
8
|
+
if (isNode(node)) return (node.nodeName || "").toLowerCase();
|
|
9
|
+
return "#document";
|
|
10
|
+
}
|
|
11
|
+
function getWindow(node) {
|
|
12
|
+
var _node$ownerDocument;
|
|
13
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
14
|
+
}
|
|
15
|
+
function getDocumentElement(node) {
|
|
16
|
+
var _ref;
|
|
17
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
18
|
+
}
|
|
19
|
+
function isNode(value) {
|
|
20
|
+
if (!hasWindow()) return false;
|
|
21
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
22
|
+
}
|
|
23
|
+
function isElement(value) {
|
|
24
|
+
if (!hasWindow()) return false;
|
|
25
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
26
|
+
}
|
|
27
|
+
function isHTMLElement(value) {
|
|
28
|
+
if (!hasWindow()) return false;
|
|
29
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
30
|
+
}
|
|
31
|
+
function isShadowRoot(value) {
|
|
32
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
|
|
33
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
34
|
+
}
|
|
35
|
+
function isOverflowElement(element) {
|
|
36
|
+
const { overflow, overflowX, overflowY, display } = getComputedStyle(element);
|
|
37
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
38
|
+
}
|
|
39
|
+
function isTableElement(element) {
|
|
40
|
+
return tableElements.has(getNodeName(element));
|
|
41
|
+
}
|
|
42
|
+
function isTopLayer(element) {
|
|
43
|
+
return topLayerSelectors.some((selector) => {
|
|
44
|
+
try {
|
|
45
|
+
return element.matches(selector);
|
|
46
|
+
} catch (_e) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function isContainingBlock(elementOrCss) {
|
|
52
|
+
const webkit = isWebKit();
|
|
53
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
54
|
+
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
55
|
+
}
|
|
56
|
+
function getContainingBlock(element) {
|
|
57
|
+
let currentNode = getParentNode(element);
|
|
58
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
59
|
+
if (isContainingBlock(currentNode)) return currentNode;
|
|
60
|
+
else if (isTopLayer(currentNode)) return null;
|
|
61
|
+
currentNode = getParentNode(currentNode);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
function isWebKit() {
|
|
66
|
+
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
67
|
+
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
68
|
+
}
|
|
69
|
+
function isLastTraversableNode(node) {
|
|
70
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
71
|
+
}
|
|
72
|
+
function getComputedStyle(element) {
|
|
73
|
+
return getWindow(element).getComputedStyle(element);
|
|
74
|
+
}
|
|
75
|
+
function getNodeScroll(element) {
|
|
76
|
+
if (isElement(element)) return {
|
|
77
|
+
scrollLeft: element.scrollLeft,
|
|
78
|
+
scrollTop: element.scrollTop
|
|
79
|
+
};
|
|
80
|
+
return {
|
|
81
|
+
scrollLeft: element.scrollX,
|
|
82
|
+
scrollTop: element.scrollY
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function getParentNode(node) {
|
|
86
|
+
if (getNodeName(node) === "html") return node;
|
|
87
|
+
const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
88
|
+
return isShadowRoot(result) ? result.host : result;
|
|
89
|
+
}
|
|
90
|
+
function getNearestOverflowAncestor(node) {
|
|
91
|
+
const parentNode = getParentNode(node);
|
|
92
|
+
if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
93
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
|
|
94
|
+
return getNearestOverflowAncestor(parentNode);
|
|
95
|
+
}
|
|
96
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
97
|
+
var _node$ownerDocument2;
|
|
98
|
+
if (list === void 0) list = [];
|
|
99
|
+
if (traverseIframes === void 0) traverseIframes = true;
|
|
100
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
101
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
102
|
+
const win = getWindow(scrollableAncestor);
|
|
103
|
+
if (isBody) {
|
|
104
|
+
const frameElement = getFrameElement(win);
|
|
105
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
106
|
+
}
|
|
107
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
108
|
+
}
|
|
109
|
+
function getFrameElement(win) {
|
|
110
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
111
|
+
}
|
|
112
|
+
var invalidOverflowDisplayValues, tableElements, topLayerSelectors, transformProperties, willChangeValues, containValues, lastTraversableNodeNames;
|
|
113
|
+
var init_floating_ui_utils_dom = require_rolldown_runtime.__esm({ "../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs": (() => {
|
|
114
|
+
invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
115
|
+
tableElements = /* @__PURE__ */ new Set([
|
|
116
|
+
"table",
|
|
117
|
+
"td",
|
|
118
|
+
"th"
|
|
119
|
+
]);
|
|
120
|
+
topLayerSelectors = [":popover-open", ":modal"];
|
|
121
|
+
transformProperties = [
|
|
122
|
+
"transform",
|
|
123
|
+
"translate",
|
|
124
|
+
"scale",
|
|
125
|
+
"rotate",
|
|
126
|
+
"perspective"
|
|
127
|
+
];
|
|
128
|
+
willChangeValues = [
|
|
129
|
+
"transform",
|
|
130
|
+
"translate",
|
|
131
|
+
"scale",
|
|
132
|
+
"rotate",
|
|
133
|
+
"perspective",
|
|
134
|
+
"filter"
|
|
135
|
+
];
|
|
136
|
+
containValues = [
|
|
137
|
+
"paint",
|
|
138
|
+
"layout",
|
|
139
|
+
"strict",
|
|
140
|
+
"content"
|
|
141
|
+
];
|
|
142
|
+
lastTraversableNodeNames = /* @__PURE__ */ new Set([
|
|
143
|
+
"html",
|
|
144
|
+
"body",
|
|
145
|
+
"#document"
|
|
146
|
+
]);
|
|
147
|
+
}) });
|
|
148
|
+
|
|
149
|
+
//#endregion
|
|
150
|
+
init_floating_ui_utils_dom();
|
|
151
|
+
exports.getComputedStyle = getComputedStyle;
|
|
152
|
+
exports.getContainingBlock = getContainingBlock;
|
|
153
|
+
exports.getDocumentElement = getDocumentElement;
|
|
154
|
+
exports.getFrameElement = getFrameElement;
|
|
155
|
+
exports.getNodeName = getNodeName;
|
|
156
|
+
exports.getNodeScroll = getNodeScroll;
|
|
157
|
+
exports.getOverflowAncestors = getOverflowAncestors;
|
|
158
|
+
exports.getParentNode = getParentNode;
|
|
159
|
+
exports.getWindow = getWindow;
|
|
160
|
+
Object.defineProperty(exports, 'init_floating_ui_utils_dom', {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () {
|
|
163
|
+
return init_floating_ui_utils_dom;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
exports.isContainingBlock = isContainingBlock;
|
|
167
|
+
exports.isElement = isElement;
|
|
168
|
+
exports.isHTMLElement = isHTMLElement;
|
|
169
|
+
exports.isLastTraversableNode = isLastTraversableNode;
|
|
170
|
+
exports.isNode = isNode;
|
|
171
|
+
exports.isOverflowElement = isOverflowElement;
|
|
172
|
+
exports.isShadowRoot = isShadowRoot;
|
|
173
|
+
exports.isTableElement = isTableElement;
|
|
174
|
+
exports.isTopLayer = isTopLayer;
|
|
175
|
+
exports.isWebKit = isWebKit;
|
|
@@ -1 +1,151 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { __esm } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
4
|
+
function hasWindow() {
|
|
5
|
+
return typeof window !== "undefined";
|
|
6
|
+
}
|
|
7
|
+
function getNodeName(node) {
|
|
8
|
+
if (isNode(node)) return (node.nodeName || "").toLowerCase();
|
|
9
|
+
return "#document";
|
|
10
|
+
}
|
|
11
|
+
function getWindow(node) {
|
|
12
|
+
var _node$ownerDocument;
|
|
13
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
14
|
+
}
|
|
15
|
+
function getDocumentElement(node) {
|
|
16
|
+
var _ref;
|
|
17
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
18
|
+
}
|
|
19
|
+
function isNode(value) {
|
|
20
|
+
if (!hasWindow()) return false;
|
|
21
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
22
|
+
}
|
|
23
|
+
function isElement(value) {
|
|
24
|
+
if (!hasWindow()) return false;
|
|
25
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
26
|
+
}
|
|
27
|
+
function isHTMLElement(value) {
|
|
28
|
+
if (!hasWindow()) return false;
|
|
29
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
30
|
+
}
|
|
31
|
+
function isShadowRoot(value) {
|
|
32
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") return false;
|
|
33
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
34
|
+
}
|
|
35
|
+
function isOverflowElement(element) {
|
|
36
|
+
const { overflow, overflowX, overflowY, display } = getComputedStyle(element);
|
|
37
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
38
|
+
}
|
|
39
|
+
function isTableElement(element) {
|
|
40
|
+
return tableElements.has(getNodeName(element));
|
|
41
|
+
}
|
|
42
|
+
function isTopLayer(element) {
|
|
43
|
+
return topLayerSelectors.some((selector) => {
|
|
44
|
+
try {
|
|
45
|
+
return element.matches(selector);
|
|
46
|
+
} catch (_e) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function isContainingBlock(elementOrCss) {
|
|
52
|
+
const webkit = isWebKit();
|
|
53
|
+
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
54
|
+
return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
|
|
55
|
+
}
|
|
56
|
+
function getContainingBlock(element) {
|
|
57
|
+
let currentNode = getParentNode(element);
|
|
58
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
59
|
+
if (isContainingBlock(currentNode)) return currentNode;
|
|
60
|
+
else if (isTopLayer(currentNode)) return null;
|
|
61
|
+
currentNode = getParentNode(currentNode);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
function isWebKit() {
|
|
66
|
+
if (typeof CSS === "undefined" || !CSS.supports) return false;
|
|
67
|
+
return CSS.supports("-webkit-backdrop-filter", "none");
|
|
68
|
+
}
|
|
69
|
+
function isLastTraversableNode(node) {
|
|
70
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
71
|
+
}
|
|
72
|
+
function getComputedStyle(element) {
|
|
73
|
+
return getWindow(element).getComputedStyle(element);
|
|
74
|
+
}
|
|
75
|
+
function getNodeScroll(element) {
|
|
76
|
+
if (isElement(element)) return {
|
|
77
|
+
scrollLeft: element.scrollLeft,
|
|
78
|
+
scrollTop: element.scrollTop
|
|
79
|
+
};
|
|
80
|
+
return {
|
|
81
|
+
scrollLeft: element.scrollX,
|
|
82
|
+
scrollTop: element.scrollY
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function getParentNode(node) {
|
|
86
|
+
if (getNodeName(node) === "html") return node;
|
|
87
|
+
const result = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
88
|
+
return isShadowRoot(result) ? result.host : result;
|
|
89
|
+
}
|
|
90
|
+
function getNearestOverflowAncestor(node) {
|
|
91
|
+
const parentNode = getParentNode(node);
|
|
92
|
+
if (isLastTraversableNode(parentNode)) return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
93
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
|
|
94
|
+
return getNearestOverflowAncestor(parentNode);
|
|
95
|
+
}
|
|
96
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
97
|
+
var _node$ownerDocument2;
|
|
98
|
+
if (list === void 0) list = [];
|
|
99
|
+
if (traverseIframes === void 0) traverseIframes = true;
|
|
100
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
101
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
102
|
+
const win = getWindow(scrollableAncestor);
|
|
103
|
+
if (isBody) {
|
|
104
|
+
const frameElement = getFrameElement(win);
|
|
105
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
106
|
+
}
|
|
107
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
108
|
+
}
|
|
109
|
+
function getFrameElement(win) {
|
|
110
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
111
|
+
}
|
|
112
|
+
var invalidOverflowDisplayValues, tableElements, topLayerSelectors, transformProperties, willChangeValues, containValues, lastTraversableNodeNames;
|
|
113
|
+
var init_floating_ui_utils_dom = __esm({ "../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs": (() => {
|
|
114
|
+
invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
115
|
+
tableElements = /* @__PURE__ */ new Set([
|
|
116
|
+
"table",
|
|
117
|
+
"td",
|
|
118
|
+
"th"
|
|
119
|
+
]);
|
|
120
|
+
topLayerSelectors = [":popover-open", ":modal"];
|
|
121
|
+
transformProperties = [
|
|
122
|
+
"transform",
|
|
123
|
+
"translate",
|
|
124
|
+
"scale",
|
|
125
|
+
"rotate",
|
|
126
|
+
"perspective"
|
|
127
|
+
];
|
|
128
|
+
willChangeValues = [
|
|
129
|
+
"transform",
|
|
130
|
+
"translate",
|
|
131
|
+
"scale",
|
|
132
|
+
"rotate",
|
|
133
|
+
"perspective",
|
|
134
|
+
"filter"
|
|
135
|
+
];
|
|
136
|
+
containValues = [
|
|
137
|
+
"paint",
|
|
138
|
+
"layout",
|
|
139
|
+
"strict",
|
|
140
|
+
"content"
|
|
141
|
+
];
|
|
142
|
+
lastTraversableNodeNames = /* @__PURE__ */ new Set([
|
|
143
|
+
"html",
|
|
144
|
+
"body",
|
|
145
|
+
"#document"
|
|
146
|
+
]);
|
|
147
|
+
}) });
|
|
148
|
+
|
|
149
|
+
//#endregion
|
|
150
|
+
init_floating_ui_utils_dom();
|
|
151
|
+
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, init_floating_ui_utils_dom, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };
|
|
@@ -1 +1,138 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { __esm } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
4
|
+
function clamp(start, value, end) {
|
|
5
|
+
return max(start, min(value, end));
|
|
6
|
+
}
|
|
7
|
+
function evaluate(value, param) {
|
|
8
|
+
return typeof value === "function" ? value(param) : value;
|
|
9
|
+
}
|
|
10
|
+
function getSide(placement) {
|
|
11
|
+
return placement.split("-")[0];
|
|
12
|
+
}
|
|
13
|
+
function getAlignment(placement) {
|
|
14
|
+
return placement.split("-")[1];
|
|
15
|
+
}
|
|
16
|
+
function getOppositeAxis(axis) {
|
|
17
|
+
return axis === "x" ? "y" : "x";
|
|
18
|
+
}
|
|
19
|
+
function getAxisLength(axis) {
|
|
20
|
+
return axis === "y" ? "height" : "width";
|
|
21
|
+
}
|
|
22
|
+
function getSideAxis(placement) {
|
|
23
|
+
return yAxisSides.has(getSide(placement)) ? "y" : "x";
|
|
24
|
+
}
|
|
25
|
+
function getAlignmentAxis(placement) {
|
|
26
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
27
|
+
}
|
|
28
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
29
|
+
if (rtl === void 0) rtl = false;
|
|
30
|
+
const alignment = getAlignment(placement);
|
|
31
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
32
|
+
const length = getAxisLength(alignmentAxis);
|
|
33
|
+
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
34
|
+
if (rects.reference[length] > rects.floating[length]) mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
35
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
36
|
+
}
|
|
37
|
+
function getExpandedPlacements(placement) {
|
|
38
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
39
|
+
return [
|
|
40
|
+
getOppositeAlignmentPlacement(placement),
|
|
41
|
+
oppositePlacement,
|
|
42
|
+
getOppositeAlignmentPlacement(oppositePlacement)
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
46
|
+
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
47
|
+
}
|
|
48
|
+
function getSideList(side, isStart, rtl) {
|
|
49
|
+
switch (side) {
|
|
50
|
+
case "top":
|
|
51
|
+
case "bottom":
|
|
52
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
53
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
54
|
+
case "left":
|
|
55
|
+
case "right": return isStart ? tbPlacement : btPlacement;
|
|
56
|
+
default: return [];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
60
|
+
const alignment = getAlignment(placement);
|
|
61
|
+
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
62
|
+
if (alignment) {
|
|
63
|
+
list = list.map((side) => side + "-" + alignment);
|
|
64
|
+
if (flipAlignment) list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
65
|
+
}
|
|
66
|
+
return list;
|
|
67
|
+
}
|
|
68
|
+
function getOppositePlacement(placement) {
|
|
69
|
+
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
70
|
+
}
|
|
71
|
+
function expandPaddingObject(padding) {
|
|
72
|
+
return {
|
|
73
|
+
top: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
...padding
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function getPaddingObject(padding) {
|
|
81
|
+
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
82
|
+
top: padding,
|
|
83
|
+
right: padding,
|
|
84
|
+
bottom: padding,
|
|
85
|
+
left: padding
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function rectToClientRect(rect) {
|
|
89
|
+
const { x, y, width, height } = rect;
|
|
90
|
+
return {
|
|
91
|
+
width,
|
|
92
|
+
height,
|
|
93
|
+
top: y,
|
|
94
|
+
left: x,
|
|
95
|
+
right: x + width,
|
|
96
|
+
bottom: y + height,
|
|
97
|
+
x,
|
|
98
|
+
y
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
var sides, alignments, placements, min, max, round, floor, createCoords, oppositeSideMap, oppositeAlignmentMap, yAxisSides, lrPlacement, rlPlacement, tbPlacement, btPlacement;
|
|
102
|
+
var init_floating_ui_utils = __esm({ "../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs": (() => {
|
|
103
|
+
sides = [
|
|
104
|
+
"top",
|
|
105
|
+
"right",
|
|
106
|
+
"bottom",
|
|
107
|
+
"left"
|
|
108
|
+
];
|
|
109
|
+
alignments = ["start", "end"];
|
|
110
|
+
placements = /* @__PURE__ */ sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
111
|
+
min = Math.min;
|
|
112
|
+
max = Math.max;
|
|
113
|
+
round = Math.round;
|
|
114
|
+
floor = Math.floor;
|
|
115
|
+
createCoords = (v) => ({
|
|
116
|
+
x: v,
|
|
117
|
+
y: v
|
|
118
|
+
});
|
|
119
|
+
oppositeSideMap = {
|
|
120
|
+
left: "right",
|
|
121
|
+
right: "left",
|
|
122
|
+
bottom: "top",
|
|
123
|
+
top: "bottom"
|
|
124
|
+
};
|
|
125
|
+
oppositeAlignmentMap = {
|
|
126
|
+
start: "end",
|
|
127
|
+
end: "start"
|
|
128
|
+
};
|
|
129
|
+
yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
130
|
+
lrPlacement = ["left", "right"];
|
|
131
|
+
rlPlacement = ["right", "left"];
|
|
132
|
+
tbPlacement = ["top", "bottom"];
|
|
133
|
+
btPlacement = ["bottom", "top"];
|
|
134
|
+
}) });
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
init_floating_ui_utils();
|
|
138
|
+
export { clamp, createCoords, evaluate, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, init_floating_ui_utils, max, min, placements, rectToClientRect, round, sides };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
4
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
5
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
6
|
+
return function handleEvent(event) {
|
|
7
|
+
originalEventHandler?.(event);
|
|
8
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.composeEventHandlers = composeEventHandlers;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
3
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
4
|
+
return function handleEvent(event) {
|
|
5
|
+
originalEventHandler?.(event);
|
|
6
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { composeEventHandlers };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
6
|
+
function setRef(ref, value) {
|
|
7
|
+
if (typeof ref === "function") return ref(value);
|
|
8
|
+
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
9
|
+
}
|
|
10
|
+
function composeRefs(...refs) {
|
|
11
|
+
return (node) => {
|
|
12
|
+
let hasCleanup = false;
|
|
13
|
+
const cleanups = refs.map((ref) => {
|
|
14
|
+
const cleanup = setRef(ref, node);
|
|
15
|
+
if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
|
|
16
|
+
return cleanup;
|
|
17
|
+
});
|
|
18
|
+
if (hasCleanup) return () => {
|
|
19
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
20
|
+
const cleanup = cleanups[i];
|
|
21
|
+
if (typeof cleanup == "function") cleanup();
|
|
22
|
+
else setRef(refs[i], null);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function useComposedRefs(...refs) {
|
|
28
|
+
return react.useCallback(composeRefs(...refs), refs);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.composeRefs = composeRefs;
|
|
33
|
+
exports.useComposedRefs = useComposedRefs;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
4
|
+
function setRef(ref, value) {
|
|
5
|
+
if (typeof ref === "function") return ref(value);
|
|
6
|
+
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
7
|
+
}
|
|
8
|
+
function composeRefs(...refs) {
|
|
9
|
+
return (node) => {
|
|
10
|
+
let hasCleanup = false;
|
|
11
|
+
const cleanups = refs.map((ref) => {
|
|
12
|
+
const cleanup = setRef(ref, node);
|
|
13
|
+
if (!hasCleanup && typeof cleanup == "function") hasCleanup = true;
|
|
14
|
+
return cleanup;
|
|
15
|
+
});
|
|
16
|
+
if (hasCleanup) return () => {
|
|
17
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
18
|
+
const cleanup = cleanups[i];
|
|
19
|
+
if (typeof cleanup == "function") cleanup();
|
|
20
|
+
else setRef(refs[i], null);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function useComposedRefs(...refs) {
|
|
26
|
+
return React$1.useCallback(composeRefs(...refs), refs);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { composeRefs, useComposedRefs };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
6
|
+
|
|
7
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.6_react@19.2.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
8
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
9
|
+
const Context = react.createContext(defaultContext);
|
|
10
|
+
const Provider = (props) => {
|
|
11
|
+
const { children,...context } = props;
|
|
12
|
+
const value = react.useMemo(() => context, Object.values(context));
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Context.Provider, {
|
|
14
|
+
value,
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
19
|
+
function useContext2(consumerName) {
|
|
20
|
+
const context = react.useContext(Context);
|
|
21
|
+
if (context) return context;
|
|
22
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
23
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
24
|
+
}
|
|
25
|
+
return [Provider, useContext2];
|
|
26
|
+
}
|
|
27
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
28
|
+
let defaultContexts = [];
|
|
29
|
+
function createContext3(rootComponentName, defaultContext) {
|
|
30
|
+
const BaseContext = react.createContext(defaultContext);
|
|
31
|
+
const index = defaultContexts.length;
|
|
32
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
33
|
+
const Provider = (props) => {
|
|
34
|
+
const { scope, children,...context } = props;
|
|
35
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
36
|
+
const value = react.useMemo(() => context, Object.values(context));
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Context.Provider, {
|
|
38
|
+
value,
|
|
39
|
+
children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
43
|
+
function useContext2(consumerName, scope) {
|
|
44
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
45
|
+
const context = react.useContext(Context);
|
|
46
|
+
if (context) return context;
|
|
47
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
48
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
49
|
+
}
|
|
50
|
+
return [Provider, useContext2];
|
|
51
|
+
}
|
|
52
|
+
const createScope = () => {
|
|
53
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
54
|
+
return react.createContext(defaultContext);
|
|
55
|
+
});
|
|
56
|
+
return function useScope(scope) {
|
|
57
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
58
|
+
return react.useMemo(() => ({ [`__scope${scopeName}`]: {
|
|
59
|
+
...scope,
|
|
60
|
+
[scopeName]: contexts
|
|
61
|
+
} }), [scope, contexts]);
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
createScope.scopeName = scopeName;
|
|
65
|
+
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
66
|
+
}
|
|
67
|
+
function composeContextScopes(...scopes) {
|
|
68
|
+
const baseScope = scopes[0];
|
|
69
|
+
if (scopes.length === 1) return baseScope;
|
|
70
|
+
const createScope = () => {
|
|
71
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
72
|
+
useScope: createScope2(),
|
|
73
|
+
scopeName: createScope2.scopeName
|
|
74
|
+
}));
|
|
75
|
+
return function useComposedScopes(overrideScopes) {
|
|
76
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
77
|
+
const currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
|
|
78
|
+
return {
|
|
79
|
+
...nextScopes2,
|
|
80
|
+
...currentScope
|
|
81
|
+
};
|
|
82
|
+
}, {});
|
|
83
|
+
return react.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
createScope.scopeName = baseScope.scopeName;
|
|
87
|
+
return createScope;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
exports.createContext2 = createContext2;
|
|
92
|
+
exports.createContextScope = createContextScope;
|