@blimu/react 0.7.0 → 1.1.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/_virtual/index.cjs +5 -1
- package/dist/_virtual/index.cjs.map +1 -1
- package/dist/_virtual/index.js +3 -3
- package/dist/_virtual/index2.cjs +4 -1
- package/dist/_virtual/index2.cjs.map +1 -1
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +2 -2
- package/dist/client/auth.service.cjs +249 -1
- package/dist/client/auth.service.cjs.map +1 -1
- package/dist/client/auth.service.d.ts.map +1 -1
- package/dist/client/auth.service.js +195 -95
- package/dist/client/auth.service.js.map +1 -1
- package/dist/client/external-store.cjs +26 -1
- package/dist/client/external-store.cjs.map +1 -1
- package/dist/client/external-store.js +22 -8
- package/dist/client/external-store.js.map +1 -1
- package/dist/client/runtime-client.cjs +136 -1
- package/dist/client/runtime-client.cjs.map +1 -1
- package/dist/client/runtime-client.js +86 -52
- package/dist/client/runtime-client.js.map +1 -1
- package/dist/components/index.cjs +13 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/members-list.cjs +132 -1
- package/dist/components/members-list.cjs.map +1 -1
- package/dist/components/members-list.js +69 -64
- package/dist/components/members-list.js.map +1 -1
- package/dist/components/redirect-to-sign-in.cjs +34 -1
- package/dist/components/redirect-to-sign-in.cjs.map +1 -1
- package/dist/components/redirect-to-sign-in.js +28 -20
- package/dist/components/redirect-to-sign-in.js.map +1 -1
- package/dist/components/sign-in-button.cjs +36 -1
- package/dist/components/sign-in-button.cjs.map +1 -1
- package/dist/components/sign-in-button.js +25 -21
- package/dist/components/sign-in-button.js.map +1 -1
- package/dist/components/ui/avatar.cjs +42 -1
- package/dist/components/ui/avatar.cjs.map +1 -1
- package/dist/components/ui/avatar.js +23 -23
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/dropdown-menu.cjs +148 -1
- package/dist/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/components/ui/dropdown-menu.js +83 -81
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/user-avatar.cjs +22 -1
- package/dist/components/user-avatar.cjs.map +1 -1
- package/dist/components/user-avatar.js +16 -16
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/user-button/styles.cjs +39 -1
- package/dist/components/user-button/styles.cjs.map +1 -1
- package/dist/components/user-button/styles.js +6 -5
- package/dist/components/user-button/styles.js.map +1 -1
- package/dist/components/user-button/user-button.cjs +98 -1
- package/dist/components/user-button/user-button.cjs.map +1 -1
- package/dist/components/user-button/user-button.js +64 -58
- package/dist/components/user-button/user-button.js.map +1 -1
- package/dist/hooks/index.cjs +14 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +14 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-auth.cjs +44 -1
- package/dist/hooks/use-auth.cjs.map +1 -1
- package/dist/hooks/use-auth.d.ts +13 -15
- package/dist/hooks/use-auth.d.ts.map +1 -1
- package/dist/hooks/use-auth.js +30 -26
- package/dist/hooks/use-auth.js.map +1 -1
- package/dist/hooks/use-client.cjs +9 -1
- package/dist/hooks/use-client.cjs.map +1 -1
- package/dist/hooks/use-client.d.ts +1 -1
- package/dist/hooks/use-client.d.ts.map +1 -1
- package/dist/hooks/use-client.js +6 -5
- package/dist/hooks/use-client.js.map +1 -1
- package/dist/hooks/use-members.cjs +60 -1
- package/dist/hooks/use-members.cjs.map +1 -1
- package/dist/hooks/use-members.js +53 -41
- package/dist/hooks/use-members.js.map +1 -1
- package/dist/hooks/use-store.cjs +17 -1
- package/dist/hooks/use-store.cjs.map +1 -1
- package/dist/hooks/use-store.js +7 -7
- package/dist/hooks/use-store.js.map +1 -1
- package/dist/index.cjs +37 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -35
- package/dist/lib/utils.cjs +8 -1
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js +5 -5
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/variants.cjs +46 -1
- package/dist/lib/variants.cjs.map +1 -1
- package/dist/lib/variants.js +6 -5
- package/dist/lib/variants.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +721 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +571 -377
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +625 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +539 -316
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +313 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +261 -172
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +154 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +173 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -107
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +111 -87
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +11 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +7 -5
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +105 -57
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +80 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +49 -41
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +17 -10
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +119 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +86 -42
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +70 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +57 -37
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -19
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +79 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +48 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +6 -6
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +182 -97
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +296 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +232 -167
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +23 -11
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +169 -98
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +31 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +662 -442
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +209 -137
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +14 -12
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +145 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +103 -45
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +21 -14
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -135
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +105 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +74 -35
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +8 -7
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -40
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +13 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +15 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +34 -22
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +122 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +111 -41
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs +45 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.js +40 -30
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.cjs +17 -1
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +13 -13
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +9 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.js +5 -3
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +98 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.js +69 -43
- package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs +58 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.js +36 -30
- package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +34 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -25
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +21 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +16 -15
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +13 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +2 -2
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +11 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +6 -5
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +26 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -14
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +27 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +8 -8
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +197 -4
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -98
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +55 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -24
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +19 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +12 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +102 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -51
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +5 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +62 -36
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +41 -65
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +10 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -5
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +37 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +28 -16
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +13 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +9 -7
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +33 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +11 -10
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +48 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +3014 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +804 -555
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs +12 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.js +8 -8
- package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.cjs +38 -1
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +33 -21
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +11 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +8 -3
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +52 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +28 -19
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +29 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +15 -11
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +38 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +15 -12
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +88 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +64 -43
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +68 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +49 -39
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +53 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +39 -32
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +17 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +14 -7
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -1
- package/dist/providers/auth/auth.context.cjs +5 -1
- package/dist/providers/auth/auth.context.cjs.map +1 -1
- package/dist/providers/auth/auth.context.js +3 -3
- package/dist/providers/auth/auth.context.js.map +1 -1
- package/dist/providers/auth/auth.hook.cjs +12 -1
- package/dist/providers/auth/auth.hook.cjs.map +1 -1
- package/dist/providers/auth/auth.hook.js +8 -7
- package/dist/providers/auth/auth.hook.js.map +1 -1
- package/dist/providers/auth/auth.provider.cjs +37 -1
- package/dist/providers/auth/auth.provider.cjs.map +1 -1
- package/dist/providers/auth/auth.provider.js +31 -22
- package/dist/providers/auth/auth.provider.js.map +1 -1
- package/dist/providers/blimu/blimu.context.cjs +5 -1
- package/dist/providers/blimu/blimu.context.cjs.map +1 -1
- package/dist/providers/blimu/blimu.context.js +3 -3
- package/dist/providers/blimu/blimu.context.js.map +1 -1
- package/dist/providers/blimu/blimu.hook.cjs +12 -1
- package/dist/providers/blimu/blimu.hook.cjs.map +1 -1
- package/dist/providers/blimu/blimu.hook.js +8 -7
- package/dist/providers/blimu/blimu.hook.js.map +1 -1
- package/dist/providers/blimu/blimu.provider.cjs +71 -1
- package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
- package/dist/providers/blimu/blimu.provider.js +32 -27
- package/dist/providers/blimu/blimu.provider.js.map +1 -1
- package/dist/providers/index.cjs +13 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.js +13 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/theme/theme.context.cjs +5 -1
- package/dist/providers/theme/theme.context.cjs.map +1 -1
- package/dist/providers/theme/theme.context.js +3 -3
- package/dist/providers/theme/theme.context.js.map +1 -1
- package/dist/providers/theme/theme.hook.cjs +12 -1
- package/dist/providers/theme/theme.hook.cjs.map +1 -1
- package/dist/providers/theme/theme.hook.js +8 -7
- package/dist/providers/theme/theme.hook.js.map +1 -1
- package/dist/providers/theme/theme.provider.cjs +104 -1
- package/dist/providers/theme/theme.provider.cjs.map +1 -1
- package/dist/providers/theme/theme.provider.js +85 -48
- package/dist/providers/theme/theme.provider.js.map +1 -1
- package/dist/tailwind.cjs +200 -0
- package/dist/tailwind.cjs.map +1 -0
- package/dist/{tailwind.plugin.js → tailwind.js} +6 -6
- package/dist/tailwind.js.map +1 -0
- package/dist/types/index.cjs +11 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +8 -8
- package/dist/types/index.js.map +1 -1
- package/dist/utils/publishable-key.cjs +62 -1
- package/dist/utils/publishable-key.cjs.map +1 -1
- package/dist/utils/publishable-key.js +52 -27
- package/dist/utils/publishable-key.js.map +1 -1
- package/package.json +41 -42
- package/dist/components.cjs +0 -2
- package/dist/components.cjs.map +0 -1
- package/dist/components.js +0 -13
- package/dist/components.js.map +0 -1
- package/dist/hooks.cjs +0 -2
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js +0 -14
- package/dist/hooks.js.map +0 -1
- package/dist/providers.cjs +0 -2
- package/dist/providers.cjs.map +0 -1
- package/dist/providers.js +0 -13
- package/dist/providers.js.map +0 -1
- package/dist/tailwind.plugin.cjs +0 -2
- package/dist/tailwind.plugin.cjs.map +0 -1
- package/dist/tailwind.plugin.js.map +0 -1
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const ReactDOM = require("react-dom");
|
|
5
|
+
const index$1 = require("../../react-primitive/dist/index.cjs");
|
|
6
|
+
const index = require("../../react-use-layout-effect/dist/index.cjs");
|
|
7
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
function _interopNamespaceDefault(e) {
|
|
9
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
10
|
+
if (e) {
|
|
11
|
+
for (const k in e) {
|
|
12
|
+
if (k !== "default") {
|
|
13
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: () => e[k]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
|
+
var PORTAL_NAME = "Portal";
|
|
26
|
+
var Portal = React__namespace.forwardRef((props, forwardedRef) => {
|
|
27
|
+
const { container: containerProp, ...portalProps } = props;
|
|
28
|
+
const [mounted, setMounted] = React__namespace.useState(false);
|
|
29
|
+
index.useLayoutEffect(() => setMounted(true), []);
|
|
30
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
31
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(index$1.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
32
|
+
});
|
|
33
|
+
Portal.displayName = PORTAL_NAME;
|
|
34
|
+
exports.Portal = Portal;
|
|
2
35
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React","useLayoutEffect","jsx","Primitive"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAI,cAAc;AACf,IAAC,SAASA,iBAAM,WAAW,CAAC,OAAO,iBAAiB;AACrD,QAAM,EAAE,WAAW,eAAe,GAAG,YAAW,IAAK;AACrD,QAAM,CAAC,SAAS,UAAU,IAAIA,iBAAM,SAAS,KAAK;AAClDC,QAAAA,gBAAgB,MAAM,WAAW,IAAI,GAAG,CAAA,CAAE;AAC1C,QAAM,YAAY,iBAAiB,WAAW,YAAY,UAAU;AACpE,SAAO,YAAY,SAAS,aAA6BC,2BAAAA,IAAIC,QAAAA,UAAU,KAAK,EAAE,GAAG,aAAa,KAAK,aAAY,CAAE,GAAG,SAAS,IAAI;AACnI,CAAC;AACD,OAAO,cAAc;;","x_google_ignoreList":[0]}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Primitive
|
|
4
|
-
import { useLayoutEffect as
|
|
5
|
-
import { jsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import ReactDOM__default from "react-dom";
|
|
3
|
+
import { Primitive } from "../../react-primitive/dist/index.js";
|
|
4
|
+
import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var PORTAL_NAME = "Portal";
|
|
7
|
+
var Portal = React.forwardRef((props, forwardedRef) => {
|
|
8
|
+
const { container: containerProp, ...portalProps } = props;
|
|
9
|
+
const [mounted, setMounted] = React.useState(false);
|
|
10
|
+
useLayoutEffect2(() => setMounted(true), []);
|
|
11
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
12
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
11
13
|
});
|
|
12
|
-
|
|
14
|
+
Portal.displayName = PORTAL_NAME;
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
Portal
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect","ReactDOM"],"mappings":";;;;;AAQA,IAAI,cAAc;AACf,IAAC,SAAS,MAAM,WAAW,CAAC,OAAO,iBAAiB;AACrD,QAAM,EAAE,WAAW,eAAe,GAAG,YAAW,IAAK;AACrD,QAAM,CAAC,SAAS,UAAU,IAAI,MAAM,SAAS,KAAK;AAClDA,mBAAgB,MAAM,WAAW,IAAI,GAAG,CAAA,CAAE;AAC1C,QAAM,YAAY,iBAAiB,WAAW,YAAY,UAAU;AACpE,SAAO,YAAYC,kBAAS,aAA6B,oBAAI,UAAU,KAAK,EAAE,GAAG,aAAa,KAAK,aAAY,CAAE,GAAG,SAAS,IAAI;AACnI,CAAC;AACD,OAAO,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,146 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const index = require("../../react-compose-refs/dist/index.cjs");
|
|
5
|
+
const index$1 = require("../../react-use-layout-effect/dist/index.cjs");
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
7
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
8
|
+
if (e) {
|
|
9
|
+
for (const k in e) {
|
|
10
|
+
if (k !== "default") {
|
|
11
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: () => e[k]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
n.default = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
23
|
+
function useStateMachine(initialState, machine) {
|
|
24
|
+
return React__namespace.useReducer((state, event) => {
|
|
25
|
+
const nextState = machine[state][event];
|
|
26
|
+
return nextState ?? state;
|
|
27
|
+
}, initialState);
|
|
28
|
+
}
|
|
29
|
+
var Presence = (props) => {
|
|
30
|
+
const { present, children } = props;
|
|
31
|
+
const presence = usePresence(present);
|
|
32
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React__namespace.Children.only(children);
|
|
33
|
+
const ref = index.useComposedRefs(presence.ref, getElementRef(child));
|
|
34
|
+
const forceMount = typeof children === "function";
|
|
35
|
+
return forceMount || presence.isPresent ? React__namespace.cloneElement(child, { ref }) : null;
|
|
36
|
+
};
|
|
37
|
+
Presence.displayName = "Presence";
|
|
38
|
+
function usePresence(present) {
|
|
39
|
+
const [node, setNode] = React__namespace.useState();
|
|
40
|
+
const stylesRef = React__namespace.useRef(null);
|
|
41
|
+
const prevPresentRef = React__namespace.useRef(present);
|
|
42
|
+
const prevAnimationNameRef = React__namespace.useRef("none");
|
|
43
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
44
|
+
const [state, send] = useStateMachine(initialState, {
|
|
45
|
+
mounted: {
|
|
46
|
+
UNMOUNT: "unmounted",
|
|
47
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
48
|
+
},
|
|
49
|
+
unmountSuspended: {
|
|
50
|
+
MOUNT: "mounted",
|
|
51
|
+
ANIMATION_END: "unmounted"
|
|
52
|
+
},
|
|
53
|
+
unmounted: {
|
|
54
|
+
MOUNT: "mounted"
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
React__namespace.useEffect(() => {
|
|
58
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
59
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
60
|
+
}, [state]);
|
|
61
|
+
index$1.useLayoutEffect(() => {
|
|
62
|
+
const styles = stylesRef.current;
|
|
63
|
+
const wasPresent = prevPresentRef.current;
|
|
64
|
+
const hasPresentChanged = wasPresent !== present;
|
|
65
|
+
if (hasPresentChanged) {
|
|
66
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
67
|
+
const currentAnimationName = getAnimationName(styles);
|
|
68
|
+
if (present) {
|
|
69
|
+
send("MOUNT");
|
|
70
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
71
|
+
send("UNMOUNT");
|
|
72
|
+
} else {
|
|
73
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
74
|
+
if (wasPresent && isAnimating) {
|
|
75
|
+
send("ANIMATION_OUT");
|
|
76
|
+
} else {
|
|
77
|
+
send("UNMOUNT");
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
prevPresentRef.current = present;
|
|
81
|
+
}
|
|
82
|
+
}, [present, send]);
|
|
83
|
+
index$1.useLayoutEffect(() => {
|
|
84
|
+
if (node) {
|
|
85
|
+
let timeoutId;
|
|
86
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
87
|
+
const handleAnimationEnd = (event) => {
|
|
88
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
89
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
90
|
+
if (event.target === node && isCurrentAnimation) {
|
|
91
|
+
send("ANIMATION_END");
|
|
92
|
+
if (!prevPresentRef.current) {
|
|
93
|
+
const currentFillMode = node.style.animationFillMode;
|
|
94
|
+
node.style.animationFillMode = "forwards";
|
|
95
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
96
|
+
if (node.style.animationFillMode === "forwards") {
|
|
97
|
+
node.style.animationFillMode = currentFillMode;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const handleAnimationStart = (event) => {
|
|
104
|
+
if (event.target === node) {
|
|
105
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
109
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
110
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
111
|
+
return () => {
|
|
112
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
113
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
114
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
115
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
116
|
+
};
|
|
117
|
+
} else {
|
|
118
|
+
send("ANIMATION_END");
|
|
119
|
+
}
|
|
120
|
+
}, [node, send]);
|
|
121
|
+
return {
|
|
122
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
123
|
+
ref: React__namespace.useCallback((node2) => {
|
|
124
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
125
|
+
setNode(node2);
|
|
126
|
+
}, [])
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function getAnimationName(styles) {
|
|
130
|
+
return styles?.animationName || "none";
|
|
131
|
+
}
|
|
132
|
+
function getElementRef(element) {
|
|
133
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
134
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
135
|
+
if (mayWarn) {
|
|
136
|
+
return element.ref;
|
|
137
|
+
}
|
|
138
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
139
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
140
|
+
if (mayWarn) {
|
|
141
|
+
return element.props.ref;
|
|
142
|
+
}
|
|
143
|
+
return element.props.ref || element.ref;
|
|
144
|
+
}
|
|
145
|
+
exports.Presence = Presence;
|
|
2
146
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React","React2","useComposedRefs","useLayoutEffect"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useComposedRefs
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useComposedRefs } from "../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { useLayoutEffect as useLayoutEffect2 } from "../../react-use-layout-effect/dist/index.js";
|
|
4
|
+
function useStateMachine(initialState, machine) {
|
|
5
|
+
return React.useReducer((state, event) => {
|
|
6
|
+
const nextState = machine[state][event];
|
|
7
|
+
return nextState ?? state;
|
|
8
|
+
}, initialState);
|
|
6
9
|
}
|
|
7
|
-
var
|
|
8
|
-
const { present
|
|
9
|
-
|
|
10
|
+
var Presence = (props) => {
|
|
11
|
+
const { present, children } = props;
|
|
12
|
+
const presence = usePresence(present);
|
|
13
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
14
|
+
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
|
15
|
+
const forceMount = typeof children === "function";
|
|
16
|
+
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
10
17
|
};
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
const [
|
|
18
|
+
Presence.displayName = "Presence";
|
|
19
|
+
function usePresence(present) {
|
|
20
|
+
const [node, setNode] = React.useState();
|
|
21
|
+
const stylesRef = React.useRef(null);
|
|
22
|
+
const prevPresentRef = React.useRef(present);
|
|
23
|
+
const prevAnimationNameRef = React.useRef("none");
|
|
24
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
25
|
+
const [state, send] = useStateMachine(initialState, {
|
|
14
26
|
mounted: {
|
|
15
27
|
UNMOUNT: "unmounted",
|
|
16
28
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -23,49 +35,95 @@ function R(n) {
|
|
|
23
35
|
MOUNT: "mounted"
|
|
24
36
|
}
|
|
25
37
|
});
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
40
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
41
|
+
}, [state]);
|
|
42
|
+
useLayoutEffect2(() => {
|
|
43
|
+
const styles = stylesRef.current;
|
|
44
|
+
const wasPresent = prevPresentRef.current;
|
|
45
|
+
const hasPresentChanged = wasPresent !== present;
|
|
46
|
+
if (hasPresentChanged) {
|
|
47
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
48
|
+
const currentAnimationName = getAnimationName(styles);
|
|
49
|
+
if (present) {
|
|
50
|
+
send("MOUNT");
|
|
51
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
52
|
+
send("UNMOUNT");
|
|
53
|
+
} else {
|
|
54
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
55
|
+
if (wasPresent && isAnimating) {
|
|
56
|
+
send("ANIMATION_OUT");
|
|
57
|
+
} else {
|
|
58
|
+
send("UNMOUNT");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
prevPresentRef.current = present;
|
|
34
62
|
}
|
|
35
|
-
}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
63
|
+
}, [present, send]);
|
|
64
|
+
useLayoutEffect2(() => {
|
|
65
|
+
if (node) {
|
|
66
|
+
let timeoutId;
|
|
67
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
68
|
+
const handleAnimationEnd = (event) => {
|
|
69
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
70
|
+
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
71
|
+
if (event.target === node && isCurrentAnimation) {
|
|
72
|
+
send("ANIMATION_END");
|
|
73
|
+
if (!prevPresentRef.current) {
|
|
74
|
+
const currentFillMode = node.style.animationFillMode;
|
|
75
|
+
node.style.animationFillMode = "forwards";
|
|
76
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
77
|
+
if (node.style.animationFillMode === "forwards") {
|
|
78
|
+
node.style.animationFillMode = currentFillMode;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const handleAnimationStart = (event) => {
|
|
85
|
+
if (event.target === node) {
|
|
86
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
45
87
|
}
|
|
46
|
-
}, f = (u) => {
|
|
47
|
-
u.target === e && (c.current = l(r.current));
|
|
48
88
|
};
|
|
49
|
-
|
|
50
|
-
|
|
89
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
90
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
91
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
92
|
+
return () => {
|
|
93
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
94
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
95
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
96
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
51
97
|
};
|
|
52
|
-
} else
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
98
|
+
} else {
|
|
99
|
+
send("ANIMATION_END");
|
|
100
|
+
}
|
|
101
|
+
}, [node, send]);
|
|
102
|
+
return {
|
|
103
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
104
|
+
ref: React.useCallback((node2) => {
|
|
105
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
106
|
+
setNode(node2);
|
|
58
107
|
}, [])
|
|
59
108
|
};
|
|
60
109
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
110
|
+
function getAnimationName(styles) {
|
|
111
|
+
return styles?.animationName || "none";
|
|
63
112
|
}
|
|
64
|
-
function
|
|
65
|
-
let
|
|
66
|
-
|
|
113
|
+
function getElementRef(element) {
|
|
114
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
115
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
116
|
+
if (mayWarn) {
|
|
117
|
+
return element.ref;
|
|
118
|
+
}
|
|
119
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
120
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
121
|
+
if (mayWarn) {
|
|
122
|
+
return element.props.ref;
|
|
123
|
+
}
|
|
124
|
+
return element.props.ref || element.ref;
|
|
67
125
|
}
|
|
68
126
|
export {
|
|
69
|
-
|
|
127
|
+
Presence
|
|
70
128
|
};
|
|
71
129
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React2","useLayoutEffect"],"mappings":"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","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const ReactDOM = require("react-dom");
|
|
5
|
+
const index = require("../../react-slot/dist/index.cjs");
|
|
6
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
+
if (e) {
|
|
10
|
+
for (const k in e) {
|
|
11
|
+
if (k !== "default") {
|
|
12
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: () => e[k]
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
24
|
+
const ReactDOM__namespace = /* @__PURE__ */ _interopNamespaceDefault(ReactDOM);
|
|
25
|
+
var NODES = [
|
|
26
|
+
"a",
|
|
27
|
+
"button",
|
|
28
|
+
"div",
|
|
29
|
+
"form",
|
|
30
|
+
"h2",
|
|
31
|
+
"h3",
|
|
32
|
+
"img",
|
|
33
|
+
"input",
|
|
34
|
+
"label",
|
|
35
|
+
"li",
|
|
36
|
+
"nav",
|
|
37
|
+
"ol",
|
|
38
|
+
"p",
|
|
39
|
+
"select",
|
|
40
|
+
"span",
|
|
41
|
+
"svg",
|
|
42
|
+
"ul"
|
|
43
|
+
];
|
|
44
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
45
|
+
const Slot = index.createSlot(`Primitive.${node}`);
|
|
46
|
+
const Node = React__namespace.forwardRef((props, forwardedRef) => {
|
|
47
|
+
const { asChild, ...primitiveProps } = props;
|
|
48
|
+
const Comp = asChild ? Slot : node;
|
|
49
|
+
if (typeof window !== "undefined") {
|
|
50
|
+
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
51
|
+
}
|
|
52
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
53
|
+
});
|
|
54
|
+
Node.displayName = `Primitive.${node}`;
|
|
55
|
+
return { ...primitive, [node]: Node };
|
|
56
|
+
}, {});
|
|
57
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
|
58
|
+
if (target) ReactDOM__namespace.flushSync(() => target.dispatchEvent(event));
|
|
59
|
+
}
|
|
60
|
+
exports.Primitive = Primitive;
|
|
61
|
+
exports.dispatchDiscreteCustomEvent = dispatchDiscreteCustomEvent;
|
|
2
62
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","React","jsx","ReactDOM"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAI,QAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACG,IAAC,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAChD,QAAM,OAAOA,MAAAA,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAOC,iBAAM,WAAW,CAAC,OAAO,iBAAiB;AACrD,UAAM,EAAE,SAAS,GAAG,eAAc,IAAK;AACvC,UAAM,OAAO,UAAU,OAAO;AAC9B,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO,uBAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IACnC;AACA,WAAuBC,2BAAAA,IAAI,MAAM,EAAE,GAAG,gBAAgB,KAAK,cAAc;AAAA,EAC3E,CAAC;AACD,OAAK,cAAc,aAAa,IAAI;AACpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAI;AACrC,GAAG,CAAA,CAAE;AACL,SAAS,4BAA4B,QAAQ,OAAO;AAClD,MAAI,OAAQC,qBAAS,UAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;;;","x_google_ignoreList":[0]}
|