@blimu/react 1.1.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.js +194 -96
- 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 +85 -51
- 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,29 +1,38 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useEffect
|
|
3
|
-
import { useBlimu
|
|
4
|
-
import { AuthContext
|
|
5
|
-
function
|
|
6
|
-
const { client
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, [
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useCallback, useMemo } from "react";
|
|
3
|
+
import { useBlimu } from "../blimu/blimu.hook.js";
|
|
4
|
+
import { AuthContext } from "./auth.context.js";
|
|
5
|
+
function AuthProvider({ children }) {
|
|
6
|
+
const { client, state } = useBlimu();
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const cleanup = client.initialize();
|
|
9
|
+
return cleanup;
|
|
10
|
+
}, [client]);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (state.status === "authenticated") {
|
|
13
|
+
return client.scheduleRefresh();
|
|
14
|
+
}
|
|
15
|
+
}, [client, state.status]);
|
|
16
|
+
const login = useCallback((returnUrl) => client.redirectToAuth(returnUrl), [client]);
|
|
17
|
+
const logout = useCallback(async () => client.logout(), [client]);
|
|
18
|
+
const getToken = useCallback(
|
|
19
|
+
(options) => client.getAccessToken(options),
|
|
20
|
+
[client]
|
|
21
|
+
);
|
|
22
|
+
const getAuthState = useCallback(() => client.store.getSnapshot(), [client]);
|
|
23
|
+
const value = useMemo(
|
|
15
24
|
() => ({
|
|
16
|
-
state
|
|
17
|
-
login
|
|
18
|
-
logout
|
|
19
|
-
getToken
|
|
20
|
-
getAuthState
|
|
25
|
+
state,
|
|
26
|
+
login,
|
|
27
|
+
logout,
|
|
28
|
+
getToken,
|
|
29
|
+
getAuthState
|
|
21
30
|
}),
|
|
22
|
-
[
|
|
31
|
+
[state, login, logout, getToken, getAuthState]
|
|
23
32
|
);
|
|
24
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ jsx(AuthContext.Provider, { value, children });
|
|
25
34
|
}
|
|
26
35
|
export {
|
|
27
|
-
|
|
36
|
+
AuthProvider
|
|
28
37
|
};
|
|
29
38
|
//# sourceMappingURL=auth.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.provider.js","sources":["../../../src/providers/auth/auth.provider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\n\nimport type { AuthContextValue } from '../../types';\nimport { useBlimu } from '../blimu/blimu.hook';\nimport { AuthContext } from './auth.context';\n\ninterface AuthProviderProps {\n children: React.ReactNode;\n}\n\nexport function AuthProvider({ children }: AuthProviderProps) {\n const { client, state } = useBlimu();\n\n useEffect(() => {\n const cleanup = client.initialize();\n return cleanup;\n }, [client]);\n\n // Automatic token refresh scheduling when authenticated\n // The SessionManager schedules refreshes at T-10 seconds (10 seconds before token expiration)\n // This effect manages the refresh scheduling lifecycle tied to React component lifecycle\n useEffect(() => {\n // Start scheduling when user becomes authenticated\n if (state.status === 'authenticated') {\n return client.scheduleRefresh();\n }\n }, [client, state.status]);\n\n const login = useCallback((returnUrl?: string) => client.redirectToAuth(returnUrl), [client]);\n const logout = useCallback(async () => client.logout(), [client]);\n const getToken = useCallback(\n (options: { template: 'web' }) => client.getAccessToken(options),\n [client],\n );\n\n const getAuthState = useCallback(() => client.store.getSnapshot(), [client]);\n\n const value: AuthContextValue = useMemo(\n () => ({\n state,\n login,\n logout,\n getToken,\n getAuthState,\n }),\n [state, login, logout, getToken, getAuthState],\n );\n\n return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"auth.provider.js","sources":["../../../src/providers/auth/auth.provider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\n\nimport type { AuthContextValue } from '../../types';\nimport { useBlimu } from '../blimu/blimu.hook';\nimport { AuthContext } from './auth.context';\n\ninterface AuthProviderProps {\n children: React.ReactNode;\n}\n\nexport function AuthProvider({ children }: AuthProviderProps) {\n const { client, state } = useBlimu();\n\n useEffect(() => {\n const cleanup = client.initialize();\n return cleanup;\n }, [client]);\n\n // Automatic token refresh scheduling when authenticated\n // The SessionManager schedules refreshes at T-10 seconds (10 seconds before token expiration)\n // This effect manages the refresh scheduling lifecycle tied to React component lifecycle\n useEffect(() => {\n // Start scheduling when user becomes authenticated\n if (state.status === 'authenticated') {\n return client.scheduleRefresh();\n }\n }, [client, state.status]);\n\n const login = useCallback((returnUrl?: string) => client.redirectToAuth(returnUrl), [client]);\n const logout = useCallback(async () => client.logout(), [client]);\n const getToken = useCallback(\n (options: { template: 'web' }) => client.getAccessToken(options),\n [client],\n );\n\n const getAuthState = useCallback(() => client.store.getSnapshot(), [client]);\n\n const value: AuthContextValue = useMemo(\n () => ({\n state,\n login,\n logout,\n getToken,\n getAuthState,\n }),\n [state, login, logout, getToken, getAuthState],\n );\n\n return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;\n}\n"],"names":[],"mappings":";;;;AAUO,SAAS,aAAa,EAAE,YAA+B;AAC5D,QAAM,EAAE,QAAQ,MAAA,IAAU,SAAA;AAE1B,YAAU,MAAM;AACd,UAAM,UAAU,OAAO,WAAA;AACvB,WAAO;AAAA,EACT,GAAG,CAAC,MAAM,CAAC;AAKX,YAAU,MAAM;AAEd,QAAI,MAAM,WAAW,iBAAiB;AACpC,aAAO,OAAO,gBAAA;AAAA,IAChB;AAAA,EACF,GAAG,CAAC,QAAQ,MAAM,MAAM,CAAC;AAEzB,QAAM,QAAQ,YAAY,CAAC,cAAuB,OAAO,eAAe,SAAS,GAAG,CAAC,MAAM,CAAC;AAC5F,QAAM,SAAS,YAAY,YAAY,OAAO,UAAU,CAAC,MAAM,CAAC;AAChE,QAAM,WAAW;AAAA,IACf,CAAC,YAAiC,OAAO,eAAe,OAAO;AAAA,IAC/D,CAAC,MAAM;AAAA,EAAA;AAGT,QAAM,eAAe,YAAY,MAAM,OAAO,MAAM,YAAA,GAAe,CAAC,MAAM,CAAC;AAE3E,QAAM,QAA0B;AAAA,IAC9B,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,CAAC,OAAO,OAAO,QAAQ,UAAU,YAAY;AAAA,EAAA;AAG/C,SAAO,oBAAC,YAAY,UAAZ,EAAqB,OAAe,SAAA,CAAS;AACvD;"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const BlimuContext = React.createContext(null);
|
|
5
|
+
exports.BlimuContext = BlimuContext;
|
|
2
6
|
//# sourceMappingURL=blimu.context.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.context.cjs","sources":["../../../src/providers/blimu/blimu.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport type { AuthState, BlimuConfig } from '../../types';\nimport type { Theme } from '../theme/theme.context';\n\nexport interface AppearanceConfig {\n /**\n * Base theme (light, dark, or system)\n * @default \"system\"\n */\n baseTheme?: Theme;\n /**\n * CSS variable overrides\n */\n variables?: Record<string, string>;\n /**\n * Whether to inherit theme from parent app (e.g., next-themes)\n * @default true\n */\n inheritTheme?: boolean;\n}\n\nexport interface BlimuContextValue {\n client: BlimuRuntimeClientWrapper;\n config: BlimuConfig;\n state: AuthState;\n appearance?: AppearanceConfig;\n}\n\nexport const BlimuContext = createContext<BlimuContextValue | null>(null);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"blimu.context.cjs","sources":["../../../src/providers/blimu/blimu.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport type { AuthState, BlimuConfig } from '../../types';\nimport type { Theme } from '../theme/theme.context';\n\nexport interface AppearanceConfig {\n /**\n * Base theme (light, dark, or system)\n * @default \"system\"\n */\n baseTheme?: Theme;\n /**\n * CSS variable overrides\n */\n variables?: Record<string, string>;\n /**\n * Whether to inherit theme from parent app (e.g., next-themes)\n * @default true\n */\n inheritTheme?: boolean;\n}\n\nexport interface BlimuContextValue {\n client: BlimuRuntimeClientWrapper;\n config: BlimuConfig;\n state: AuthState;\n appearance?: AppearanceConfig;\n}\n\nexport const BlimuContext = createContext<BlimuContextValue | null>(null);\n"],"names":["createContext"],"mappings":";;;AA8BO,MAAM,eAAeA,MAAAA,cAAwC,IAAI;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.context.js","sources":["../../../src/providers/blimu/blimu.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport type { AuthState, BlimuConfig } from '../../types';\nimport type { Theme } from '../theme/theme.context';\n\nexport interface AppearanceConfig {\n /**\n * Base theme (light, dark, or system)\n * @default \"system\"\n */\n baseTheme?: Theme;\n /**\n * CSS variable overrides\n */\n variables?: Record<string, string>;\n /**\n * Whether to inherit theme from parent app (e.g., next-themes)\n * @default true\n */\n inheritTheme?: boolean;\n}\n\nexport interface BlimuContextValue {\n client: BlimuRuntimeClientWrapper;\n config: BlimuConfig;\n state: AuthState;\n appearance?: AppearanceConfig;\n}\n\nexport const BlimuContext = createContext<BlimuContextValue | null>(null);\n"],"names":[
|
|
1
|
+
{"version":3,"file":"blimu.context.js","sources":["../../../src/providers/blimu/blimu.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport type { AuthState, BlimuConfig } from '../../types';\nimport type { Theme } from '../theme/theme.context';\n\nexport interface AppearanceConfig {\n /**\n * Base theme (light, dark, or system)\n * @default \"system\"\n */\n baseTheme?: Theme;\n /**\n * CSS variable overrides\n */\n variables?: Record<string, string>;\n /**\n * Whether to inherit theme from parent app (e.g., next-themes)\n * @default true\n */\n inheritTheme?: boolean;\n}\n\nexport interface BlimuContextValue {\n client: BlimuRuntimeClientWrapper;\n config: BlimuConfig;\n state: AuthState;\n appearance?: AppearanceConfig;\n}\n\nexport const BlimuContext = createContext<BlimuContextValue | null>(null);\n"],"names":[],"mappings":";AA8BO,MAAM,eAAe,cAAwC,IAAI;"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const blimu_context = require("./blimu.context.cjs");
|
|
5
|
+
function useBlimu() {
|
|
6
|
+
const context = React.useContext(blimu_context.BlimuContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useBlimu must be used within a BlimuProvider");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
}
|
|
12
|
+
exports.useBlimu = useBlimu;
|
|
2
13
|
//# sourceMappingURL=blimu.hook.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.hook.cjs","sources":["../../../src/providers/blimu/blimu.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { BlimuContext } from './blimu.context';\n\n/**\n * Hook for accessing Blimu client and configuration\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { client, config } = useBlimu();\n *\n * // Use client to make API calls\n * const handleAction = async () => {\n * const result = await client.getClient().someMethod();\n * };\n *\n * return <div>Publishable Key: {config.publishableKey}</div>;\n * }\n * ```\n */\nexport function useBlimu() {\n const context = useContext(BlimuContext);\n if (!context) {\n throw new Error('useBlimu must be used within a BlimuProvider');\n }\n return context;\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"blimu.hook.cjs","sources":["../../../src/providers/blimu/blimu.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { BlimuContext } from './blimu.context';\n\n/**\n * Hook for accessing Blimu client and configuration\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { client, config } = useBlimu();\n *\n * // Use client to make API calls\n * const handleAction = async () => {\n * const result = await client.getClient().someMethod();\n * };\n *\n * return <div>Publishable Key: {config.publishableKey}</div>;\n * }\n * ```\n */\nexport function useBlimu() {\n const context = useContext(BlimuContext);\n if (!context) {\n throw new Error('useBlimu must be used within a BlimuProvider');\n }\n return context;\n}\n"],"names":["useContext","BlimuContext"],"mappings":";;;;AAqBO,SAAS,WAAW;AACzB,QAAM,UAAUA,MAAAA,WAAWC,0BAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { useContext
|
|
2
|
-
import { BlimuContext
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
if (!
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { BlimuContext } from "./blimu.context.js";
|
|
3
|
+
function useBlimu() {
|
|
4
|
+
const context = useContext(BlimuContext);
|
|
5
|
+
if (!context) {
|
|
6
6
|
throw new Error("useBlimu must be used within a BlimuProvider");
|
|
7
|
-
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
useBlimu
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=blimu.hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.hook.js","sources":["../../../src/providers/blimu/blimu.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { BlimuContext } from './blimu.context';\n\n/**\n * Hook for accessing Blimu client and configuration\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { client, config } = useBlimu();\n *\n * // Use client to make API calls\n * const handleAction = async () => {\n * const result = await client.getClient().someMethod();\n * };\n *\n * return <div>Publishable Key: {config.publishableKey}</div>;\n * }\n * ```\n */\nexport function useBlimu() {\n const context = useContext(BlimuContext);\n if (!context) {\n throw new Error('useBlimu must be used within a BlimuProvider');\n }\n return context;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"blimu.hook.js","sources":["../../../src/providers/blimu/blimu.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { BlimuContext } from './blimu.context';\n\n/**\n * Hook for accessing Blimu client and configuration\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const { client, config } = useBlimu();\n *\n * // Use client to make API calls\n * const handleAction = async () => {\n * const result = await client.getClient().someMethod();\n * };\n *\n * return <div>Publishable Key: {config.publishableKey}</div>;\n * }\n * ```\n */\nexport function useBlimu() {\n const context = useContext(BlimuContext);\n if (!context) {\n throw new Error('useBlimu must be used within a BlimuProvider');\n }\n return context;\n}\n"],"names":[],"mappings":";;AAqBO,SAAS,WAAW;AACzB,QAAM,UAAU,WAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;"}
|
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const runtimeClient = require("../../client/runtime-client.cjs");
|
|
6
|
+
const useStore = require("../../hooks/use-store.cjs");
|
|
7
|
+
const auth_provider = require("../auth/auth.provider.cjs");
|
|
8
|
+
const blimu_context = require("./blimu.context.cjs");
|
|
9
|
+
function themeToStyleVars(theme) {
|
|
10
|
+
if (!theme) return {};
|
|
11
|
+
const vars = {};
|
|
12
|
+
if (theme.colors) {
|
|
13
|
+
const colorMap = {
|
|
14
|
+
background: "--blimu-background",
|
|
15
|
+
foreground: "--blimu-foreground",
|
|
16
|
+
card: "--blimu-card",
|
|
17
|
+
cardForeground: "--blimu-card-foreground",
|
|
18
|
+
popover: "--blimu-popover",
|
|
19
|
+
popoverForeground: "--blimu-popover-foreground",
|
|
20
|
+
primary: "--blimu-primary",
|
|
21
|
+
primaryForeground: "--blimu-primary-foreground",
|
|
22
|
+
secondary: "--blimu-secondary",
|
|
23
|
+
secondaryForeground: "--blimu-secondary-foreground",
|
|
24
|
+
muted: "--blimu-muted",
|
|
25
|
+
mutedForeground: "--blimu-muted-foreground",
|
|
26
|
+
accent: "--blimu-accent",
|
|
27
|
+
accentForeground: "--blimu-accent-foreground",
|
|
28
|
+
destructive: "--blimu-destructive",
|
|
29
|
+
destructiveForeground: "--blimu-destructive-foreground",
|
|
30
|
+
border: "--blimu-border",
|
|
31
|
+
input: "--blimu-input",
|
|
32
|
+
ring: "--blimu-ring"
|
|
33
|
+
};
|
|
34
|
+
Object.entries(theme.colors).forEach(([key, value]) => {
|
|
35
|
+
if (value) {
|
|
36
|
+
const varName = colorMap[key];
|
|
37
|
+
if (varName) {
|
|
38
|
+
vars[varName] = value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (theme.radius) {
|
|
44
|
+
const radiusMap = {
|
|
45
|
+
none: "0",
|
|
46
|
+
sm: "0.25rem",
|
|
47
|
+
md: "0.5rem",
|
|
48
|
+
lg: "0.75rem",
|
|
49
|
+
xl: "1rem",
|
|
50
|
+
full: "9999px"
|
|
51
|
+
};
|
|
52
|
+
vars["--blimu-radius"] = radiusMap[theme.radius] ?? theme.radius;
|
|
53
|
+
}
|
|
54
|
+
return vars;
|
|
55
|
+
}
|
|
56
|
+
function BlimuProvider({ publishableKey, children, theme }) {
|
|
57
|
+
const client = React.useMemo(() => new runtimeClient.BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);
|
|
58
|
+
const state = useStore.useStore(client.store);
|
|
59
|
+
const themeVars = React.useMemo(() => themeToStyleVars(theme), [theme]);
|
|
60
|
+
const value = {
|
|
61
|
+
client,
|
|
62
|
+
state,
|
|
63
|
+
config: {
|
|
64
|
+
publishableKey,
|
|
65
|
+
redirectUri: window.location.origin,
|
|
66
|
+
theme
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-blimu": true, style: themeVars, children: /* @__PURE__ */ jsxRuntime.jsx(blimu_context.BlimuContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(auth_provider.AuthProvider, { children }) }) });
|
|
70
|
+
}
|
|
71
|
+
exports.BlimuProvider = BlimuProvider;
|
|
2
72
|
//# sourceMappingURL=blimu.provider.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.provider.cjs","sources":["../../../src/providers/blimu/blimu.provider.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport { useStore } from '../../hooks/use-store';\nimport type { BlimuRadiusPreset, BlimuTheme } from '../../types';\nimport { AuthProvider } from '../auth/auth.provider';\nimport { BlimuContext } from './blimu.context';\n\ninterface BlimuProviderProps {\n publishableKey: string;\n children: React.ReactNode;\n theme?: BlimuTheme;\n}\n\n/**\n * Convert theme configuration to CSS custom properties\n */\nfunction themeToStyleVars(theme?: BlimuTheme): React.CSSProperties {\n if (!theme) return {};\n\n const vars: Record<string, string> = {};\n\n // Map colors to CSS variables\n if (theme.colors) {\n const colorMap: Record<keyof typeof theme.colors, string> = {\n background: '--blimu-background',\n foreground: '--blimu-foreground',\n card: '--blimu-card',\n cardForeground: '--blimu-card-foreground',\n popover: '--blimu-popover',\n popoverForeground: '--blimu-popover-foreground',\n primary: '--blimu-primary',\n primaryForeground: '--blimu-primary-foreground',\n secondary: '--blimu-secondary',\n secondaryForeground: '--blimu-secondary-foreground',\n muted: '--blimu-muted',\n mutedForeground: '--blimu-muted-foreground',\n accent: '--blimu-accent',\n accentForeground: '--blimu-accent-foreground',\n destructive: '--blimu-destructive',\n destructiveForeground: '--blimu-destructive-foreground',\n border: '--blimu-border',\n input: '--blimu-input',\n ring: '--blimu-ring',\n };\n\n Object.entries(theme.colors).forEach(([key, value]) => {\n if (value) {\n const varName = colorMap[key as keyof typeof theme.colors];\n if (varName) {\n vars[varName] = value;\n }\n }\n });\n }\n\n // Map radius to CSS variable\n if (theme.radius) {\n const radiusMap: Record<BlimuRadiusPreset, string> = {\n none: '0',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n full: '9999px',\n };\n\n vars['--blimu-radius'] = radiusMap[theme.radius as BlimuRadiusPreset] ?? theme.radius;\n }\n\n return vars as React.CSSProperties;\n}\n\n/**\n * Provider component that initializes Blimu SDK and wraps the application\n *\n * This provider must be at the root of your application to enable authentication\n * and authorization features.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider publishableKey=\"pk_...\">\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n *\n * @example With theme customization\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider\n * publishableKey=\"pk_...\"\n * theme={{\n * colors: {\n * primary: 'oklch(0.5 0.2 250)',\n * background: '#ffffff',\n * },\n * radius: 'lg',\n * }}\n * >\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n */\nexport function BlimuProvider({ publishableKey, children, theme }: BlimuProviderProps) {\n const client = useMemo(() => new BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);\n const state = useStore(client.store);\n const themeVars = useMemo(() => themeToStyleVars(theme), [theme]);\n\n const value = {\n client,\n state,\n config: {\n publishableKey,\n redirectUri: window.location.origin,\n theme,\n },\n };\n\n return (\n <div data-blimu style={themeVars}>\n <BlimuContext.Provider value={value}>\n <AuthProvider>{children}</AuthProvider>\n </BlimuContext.Provider>\n </div>\n );\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"blimu.provider.cjs","sources":["../../../src/providers/blimu/blimu.provider.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport { useStore } from '../../hooks/use-store';\nimport type { BlimuRadiusPreset, BlimuTheme } from '../../types';\nimport { AuthProvider } from '../auth/auth.provider';\nimport { BlimuContext } from './blimu.context';\n\ninterface BlimuProviderProps {\n publishableKey: string;\n children: React.ReactNode;\n theme?: BlimuTheme;\n}\n\n/**\n * Convert theme configuration to CSS custom properties\n */\nfunction themeToStyleVars(theme?: BlimuTheme): React.CSSProperties {\n if (!theme) return {};\n\n const vars: Record<string, string> = {};\n\n // Map colors to CSS variables\n if (theme.colors) {\n const colorMap: Record<keyof typeof theme.colors, string> = {\n background: '--blimu-background',\n foreground: '--blimu-foreground',\n card: '--blimu-card',\n cardForeground: '--blimu-card-foreground',\n popover: '--blimu-popover',\n popoverForeground: '--blimu-popover-foreground',\n primary: '--blimu-primary',\n primaryForeground: '--blimu-primary-foreground',\n secondary: '--blimu-secondary',\n secondaryForeground: '--blimu-secondary-foreground',\n muted: '--blimu-muted',\n mutedForeground: '--blimu-muted-foreground',\n accent: '--blimu-accent',\n accentForeground: '--blimu-accent-foreground',\n destructive: '--blimu-destructive',\n destructiveForeground: '--blimu-destructive-foreground',\n border: '--blimu-border',\n input: '--blimu-input',\n ring: '--blimu-ring',\n };\n\n Object.entries(theme.colors).forEach(([key, value]) => {\n if (value) {\n const varName = colorMap[key as keyof typeof theme.colors];\n if (varName) {\n vars[varName] = value;\n }\n }\n });\n }\n\n // Map radius to CSS variable\n if (theme.radius) {\n const radiusMap: Record<BlimuRadiusPreset, string> = {\n none: '0',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n full: '9999px',\n };\n\n vars['--blimu-radius'] = radiusMap[theme.radius as BlimuRadiusPreset] ?? theme.radius;\n }\n\n return vars as React.CSSProperties;\n}\n\n/**\n * Provider component that initializes Blimu SDK and wraps the application\n *\n * This provider must be at the root of your application to enable authentication\n * and authorization features.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider publishableKey=\"pk_...\">\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n *\n * @example With theme customization\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider\n * publishableKey=\"pk_...\"\n * theme={{\n * colors: {\n * primary: 'oklch(0.5 0.2 250)',\n * background: '#ffffff',\n * },\n * radius: 'lg',\n * }}\n * >\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n */\nexport function BlimuProvider({ publishableKey, children, theme }: BlimuProviderProps) {\n const client = useMemo(() => new BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);\n const state = useStore(client.store);\n const themeVars = useMemo(() => themeToStyleVars(theme), [theme]);\n\n const value = {\n client,\n state,\n config: {\n publishableKey,\n redirectUri: window.location.origin,\n theme,\n },\n };\n\n return (\n <div data-blimu style={themeVars}>\n <BlimuContext.Provider value={value}>\n <AuthProvider>{children}</AuthProvider>\n </BlimuContext.Provider>\n </div>\n );\n}\n"],"names":["useMemo","BlimuRuntimeClientWrapper","useStore","jsx","BlimuContext","AuthProvider"],"mappings":";;;;;;;;AAiBA,SAAS,iBAAiB,OAAyC;AACjE,MAAI,CAAC,MAAO,QAAO,CAAA;AAEnB,QAAM,OAA+B,CAAA;AAGrC,MAAI,MAAM,QAAQ;AAChB,UAAM,WAAsD;AAAA,MAC1D,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,WAAW;AAAA,MACX,qBAAqB;AAAA,MACrB,OAAO;AAAA,MACP,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,uBAAuB;AAAA,MACvB,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAGR,WAAO,QAAQ,MAAM,MAAM,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACrD,UAAI,OAAO;AACT,cAAM,UAAU,SAAS,GAAgC;AACzD,YAAI,SAAS;AACX,eAAK,OAAO,IAAI;AAAA,QAClB;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAGA,MAAI,MAAM,QAAQ;AAChB,UAAM,YAA+C;AAAA,MACnD,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA;AAGR,SAAK,gBAAgB,IAAI,UAAU,MAAM,MAA2B,KAAK,MAAM;AAAA,EACjF;AAEA,SAAO;AACT;AAuCO,SAAS,cAAc,EAAE,gBAAgB,UAAU,SAA6B;AACrF,QAAM,SAASA,MAAAA,QAAQ,MAAM,IAAIC,cAAAA,0BAA0B,EAAE,eAAA,CAAgB,GAAG,CAAC,cAAc,CAAC;AAChG,QAAM,QAAQC,SAAAA,SAAS,OAAO,KAAK;AACnC,QAAM,YAAYF,MAAAA,QAAQ,MAAM,iBAAiB,KAAK,GAAG,CAAC,KAAK,CAAC;AAEhE,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA,aAAa,OAAO,SAAS;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF;AAGF,SACEG,2BAAAA,IAAC,OAAA,EAAI,cAAU,MAAC,OAAO,WACrB,UAAAA,+BAACC,cAAAA,aAAa,UAAb,EAAsB,OACrB,UAAAD,2BAAAA,IAACE,cAAAA,cAAA,EAAc,SAAA,CAAS,GAC1B,GACF;AAEJ;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { useMemo
|
|
3
|
-
import { BlimuRuntimeClientWrapper
|
|
4
|
-
import { useStore
|
|
5
|
-
import { AuthProvider
|
|
6
|
-
import { BlimuContext
|
|
7
|
-
function
|
|
8
|
-
if (!
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { BlimuRuntimeClientWrapper } from "../../client/runtime-client.js";
|
|
4
|
+
import { useStore } from "../../hooks/use-store.js";
|
|
5
|
+
import { AuthProvider } from "../auth/auth.provider.js";
|
|
6
|
+
import { BlimuContext } from "./blimu.context.js";
|
|
7
|
+
function themeToStyleVars(theme) {
|
|
8
|
+
if (!theme) return {};
|
|
9
|
+
const vars = {};
|
|
10
|
+
if (theme.colors) {
|
|
11
|
+
const colorMap = {
|
|
12
12
|
background: "--blimu-background",
|
|
13
13
|
foreground: "--blimu-foreground",
|
|
14
14
|
card: "--blimu-card",
|
|
@@ -29,15 +29,17 @@ function f(r) {
|
|
|
29
29
|
input: "--blimu-input",
|
|
30
30
|
ring: "--blimu-ring"
|
|
31
31
|
};
|
|
32
|
-
Object.entries(
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
Object.entries(theme.colors).forEach(([key, value]) => {
|
|
33
|
+
if (value) {
|
|
34
|
+
const varName = colorMap[key];
|
|
35
|
+
if (varName) {
|
|
36
|
+
vars[varName] = value;
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
|
-
if (
|
|
40
|
-
const
|
|
41
|
+
if (theme.radius) {
|
|
42
|
+
const radiusMap = {
|
|
41
43
|
none: "0",
|
|
42
44
|
sm: "0.25rem",
|
|
43
45
|
md: "0.5rem",
|
|
@@ -45,23 +47,26 @@ function f(r) {
|
|
|
45
47
|
xl: "1rem",
|
|
46
48
|
full: "9999px"
|
|
47
49
|
};
|
|
48
|
-
|
|
50
|
+
vars["--blimu-radius"] = radiusMap[theme.radius] ?? theme.radius;
|
|
49
51
|
}
|
|
50
|
-
return
|
|
52
|
+
return vars;
|
|
51
53
|
}
|
|
52
|
-
function
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
function BlimuProvider({ publishableKey, children, theme }) {
|
|
55
|
+
const client = useMemo(() => new BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);
|
|
56
|
+
const state = useStore(client.store);
|
|
57
|
+
const themeVars = useMemo(() => themeToStyleVars(theme), [theme]);
|
|
58
|
+
const value = {
|
|
59
|
+
client,
|
|
60
|
+
state,
|
|
56
61
|
config: {
|
|
57
|
-
publishableKey
|
|
62
|
+
publishableKey,
|
|
58
63
|
redirectUri: window.location.origin,
|
|
59
|
-
theme
|
|
64
|
+
theme
|
|
60
65
|
}
|
|
61
66
|
};
|
|
62
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ jsx("div", { "data-blimu": true, style: themeVars, children: /* @__PURE__ */ jsx(BlimuContext.Provider, { value, children: /* @__PURE__ */ jsx(AuthProvider, { children }) }) });
|
|
63
68
|
}
|
|
64
69
|
export {
|
|
65
|
-
|
|
70
|
+
BlimuProvider
|
|
66
71
|
};
|
|
67
72
|
//# sourceMappingURL=blimu.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blimu.provider.js","sources":["../../../src/providers/blimu/blimu.provider.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport { useStore } from '../../hooks/use-store';\nimport type { BlimuRadiusPreset, BlimuTheme } from '../../types';\nimport { AuthProvider } from '../auth/auth.provider';\nimport { BlimuContext } from './blimu.context';\n\ninterface BlimuProviderProps {\n publishableKey: string;\n children: React.ReactNode;\n theme?: BlimuTheme;\n}\n\n/**\n * Convert theme configuration to CSS custom properties\n */\nfunction themeToStyleVars(theme?: BlimuTheme): React.CSSProperties {\n if (!theme) return {};\n\n const vars: Record<string, string> = {};\n\n // Map colors to CSS variables\n if (theme.colors) {\n const colorMap: Record<keyof typeof theme.colors, string> = {\n background: '--blimu-background',\n foreground: '--blimu-foreground',\n card: '--blimu-card',\n cardForeground: '--blimu-card-foreground',\n popover: '--blimu-popover',\n popoverForeground: '--blimu-popover-foreground',\n primary: '--blimu-primary',\n primaryForeground: '--blimu-primary-foreground',\n secondary: '--blimu-secondary',\n secondaryForeground: '--blimu-secondary-foreground',\n muted: '--blimu-muted',\n mutedForeground: '--blimu-muted-foreground',\n accent: '--blimu-accent',\n accentForeground: '--blimu-accent-foreground',\n destructive: '--blimu-destructive',\n destructiveForeground: '--blimu-destructive-foreground',\n border: '--blimu-border',\n input: '--blimu-input',\n ring: '--blimu-ring',\n };\n\n Object.entries(theme.colors).forEach(([key, value]) => {\n if (value) {\n const varName = colorMap[key as keyof typeof theme.colors];\n if (varName) {\n vars[varName] = value;\n }\n }\n });\n }\n\n // Map radius to CSS variable\n if (theme.radius) {\n const radiusMap: Record<BlimuRadiusPreset, string> = {\n none: '0',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n full: '9999px',\n };\n\n vars['--blimu-radius'] = radiusMap[theme.radius as BlimuRadiusPreset] ?? theme.radius;\n }\n\n return vars as React.CSSProperties;\n}\n\n/**\n * Provider component that initializes Blimu SDK and wraps the application\n *\n * This provider must be at the root of your application to enable authentication\n * and authorization features.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider publishableKey=\"pk_...\">\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n *\n * @example With theme customization\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider\n * publishableKey=\"pk_...\"\n * theme={{\n * colors: {\n * primary: 'oklch(0.5 0.2 250)',\n * background: '#ffffff',\n * },\n * radius: 'lg',\n * }}\n * >\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n */\nexport function BlimuProvider({ publishableKey, children, theme }: BlimuProviderProps) {\n const client = useMemo(() => new BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);\n const state = useStore(client.store);\n const themeVars = useMemo(() => themeToStyleVars(theme), [theme]);\n\n const value = {\n client,\n state,\n config: {\n publishableKey,\n redirectUri: window.location.origin,\n theme,\n },\n };\n\n return (\n <div data-blimu style={themeVars}>\n <BlimuContext.Provider value={value}>\n <AuthProvider>{children}</AuthProvider>\n </BlimuContext.Provider>\n </div>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"blimu.provider.js","sources":["../../../src/providers/blimu/blimu.provider.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { BlimuRuntimeClientWrapper } from '../../client/runtime-client';\nimport { useStore } from '../../hooks/use-store';\nimport type { BlimuRadiusPreset, BlimuTheme } from '../../types';\nimport { AuthProvider } from '../auth/auth.provider';\nimport { BlimuContext } from './blimu.context';\n\ninterface BlimuProviderProps {\n publishableKey: string;\n children: React.ReactNode;\n theme?: BlimuTheme;\n}\n\n/**\n * Convert theme configuration to CSS custom properties\n */\nfunction themeToStyleVars(theme?: BlimuTheme): React.CSSProperties {\n if (!theme) return {};\n\n const vars: Record<string, string> = {};\n\n // Map colors to CSS variables\n if (theme.colors) {\n const colorMap: Record<keyof typeof theme.colors, string> = {\n background: '--blimu-background',\n foreground: '--blimu-foreground',\n card: '--blimu-card',\n cardForeground: '--blimu-card-foreground',\n popover: '--blimu-popover',\n popoverForeground: '--blimu-popover-foreground',\n primary: '--blimu-primary',\n primaryForeground: '--blimu-primary-foreground',\n secondary: '--blimu-secondary',\n secondaryForeground: '--blimu-secondary-foreground',\n muted: '--blimu-muted',\n mutedForeground: '--blimu-muted-foreground',\n accent: '--blimu-accent',\n accentForeground: '--blimu-accent-foreground',\n destructive: '--blimu-destructive',\n destructiveForeground: '--blimu-destructive-foreground',\n border: '--blimu-border',\n input: '--blimu-input',\n ring: '--blimu-ring',\n };\n\n Object.entries(theme.colors).forEach(([key, value]) => {\n if (value) {\n const varName = colorMap[key as keyof typeof theme.colors];\n if (varName) {\n vars[varName] = value;\n }\n }\n });\n }\n\n // Map radius to CSS variable\n if (theme.radius) {\n const radiusMap: Record<BlimuRadiusPreset, string> = {\n none: '0',\n sm: '0.25rem',\n md: '0.5rem',\n lg: '0.75rem',\n xl: '1rem',\n full: '9999px',\n };\n\n vars['--blimu-radius'] = radiusMap[theme.radius as BlimuRadiusPreset] ?? theme.radius;\n }\n\n return vars as React.CSSProperties;\n}\n\n/**\n * Provider component that initializes Blimu SDK and wraps the application\n *\n * This provider must be at the root of your application to enable authentication\n * and authorization features.\n *\n * @example\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider publishableKey=\"pk_...\">\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n *\n * @example With theme customization\n * ```tsx\n * function App() {\n * return (\n * <BlimuProvider\n * publishableKey=\"pk_...\"\n * theme={{\n * colors: {\n * primary: 'oklch(0.5 0.2 250)',\n * background: '#ffffff',\n * },\n * radius: 'lg',\n * }}\n * >\n * <YourApp />\n * </BlimuProvider>\n * );\n * }\n * ```\n */\nexport function BlimuProvider({ publishableKey, children, theme }: BlimuProviderProps) {\n const client = useMemo(() => new BlimuRuntimeClientWrapper({ publishableKey }), [publishableKey]);\n const state = useStore(client.store);\n const themeVars = useMemo(() => themeToStyleVars(theme), [theme]);\n\n const value = {\n client,\n state,\n config: {\n publishableKey,\n redirectUri: window.location.origin,\n theme,\n },\n };\n\n return (\n <div data-blimu style={themeVars}>\n <BlimuContext.Provider value={value}>\n <AuthProvider>{children}</AuthProvider>\n </BlimuContext.Provider>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;AAiBA,SAAS,iBAAiB,OAAyC;AACjE,MAAI,CAAC,MAAO,QAAO,CAAA;AAEnB,QAAM,OAA+B,CAAA;AAGrC,MAAI,MAAM,QAAQ;AAChB,UAAM,WAAsD;AAAA,MAC1D,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,WAAW;AAAA,MACX,qBAAqB;AAAA,MACrB,OAAO;AAAA,MACP,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,kBAAkB;AAAA,MAClB,aAAa;AAAA,MACb,uBAAuB;AAAA,MACvB,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAGR,WAAO,QAAQ,MAAM,MAAM,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACrD,UAAI,OAAO;AACT,cAAM,UAAU,SAAS,GAAgC;AACzD,YAAI,SAAS;AACX,eAAK,OAAO,IAAI;AAAA,QAClB;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AAGA,MAAI,MAAM,QAAQ;AAChB,UAAM,YAA+C;AAAA,MACnD,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA;AAGR,SAAK,gBAAgB,IAAI,UAAU,MAAM,MAA2B,KAAK,MAAM;AAAA,EACjF;AAEA,SAAO;AACT;AAuCO,SAAS,cAAc,EAAE,gBAAgB,UAAU,SAA6B;AACrF,QAAM,SAAS,QAAQ,MAAM,IAAI,0BAA0B,EAAE,eAAA,CAAgB,GAAG,CAAC,cAAc,CAAC;AAChG,QAAM,QAAQ,SAAS,OAAO,KAAK;AACnC,QAAM,YAAY,QAAQ,MAAM,iBAAiB,KAAK,GAAG,CAAC,KAAK,CAAC;AAEhE,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA,aAAa,OAAO,SAAS;AAAA,MAC7B;AAAA,IAAA;AAAA,EACF;AAGF,SACE,oBAAC,OAAA,EAAI,cAAU,MAAC,OAAO,WACrB,UAAA,oBAAC,aAAa,UAAb,EAAsB,OACrB,UAAA,oBAAC,cAAA,EAAc,SAAA,CAAS,GAC1B,GACF;AAEJ;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const blimu_hook = require("./blimu/blimu.hook.cjs");
|
|
4
|
+
const blimu_provider = require("./blimu/blimu.provider.cjs");
|
|
5
|
+
const auth_provider = require("./auth/auth.provider.cjs");
|
|
6
|
+
const theme_provider = require("./theme/theme.provider.cjs");
|
|
7
|
+
const theme_hook = require("./theme/theme.hook.cjs");
|
|
8
|
+
exports.useBlimu = blimu_hook.useBlimu;
|
|
9
|
+
exports.BlimuProvider = blimu_provider.BlimuProvider;
|
|
10
|
+
exports.AuthProvider = auth_provider.AuthProvider;
|
|
11
|
+
exports.ThemeProvider = theme_provider.ThemeProvider;
|
|
12
|
+
exports.useTheme = theme_hook.useTheme;
|
|
13
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useBlimu } from "./blimu/blimu.hook.js";
|
|
2
|
+
import { BlimuProvider } from "./blimu/blimu.provider.js";
|
|
3
|
+
import { AuthProvider } from "./auth/auth.provider.js";
|
|
4
|
+
import { ThemeProvider } from "./theme/theme.provider.js";
|
|
5
|
+
import { useTheme } from "./theme/theme.hook.js";
|
|
6
|
+
export {
|
|
7
|
+
AuthProvider,
|
|
8
|
+
BlimuProvider,
|
|
9
|
+
ThemeProvider,
|
|
10
|
+
useBlimu,
|
|
11
|
+
useTheme
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const ThemeContext = React.createContext(null);
|
|
5
|
+
exports.ThemeContext = ThemeContext;
|
|
2
6
|
//# sourceMappingURL=theme.context.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.context.cjs","sources":["../../../src/providers/theme/theme.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport interface ThemeContextValue {\n theme: Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: 'light' | 'dark';\n}\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n"],"names":["
|
|
1
|
+
{"version":3,"file":"theme.context.cjs","sources":["../../../src/providers/theme/theme.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport interface ThemeContextValue {\n theme: Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: 'light' | 'dark';\n}\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n"],"names":["createContext"],"mappings":";;;AAUO,MAAM,eAAeA,MAAAA,cAAwC,IAAI;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.context.js","sources":["../../../src/providers/theme/theme.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport interface ThemeContextValue {\n theme: Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: 'light' | 'dark';\n}\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n"],"names":[
|
|
1
|
+
{"version":3,"file":"theme.context.js","sources":["../../../src/providers/theme/theme.context.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport interface ThemeContextValue {\n theme: Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: 'light' | 'dark';\n}\n\nexport const ThemeContext = createContext<ThemeContextValue | null>(null);\n"],"names":[],"mappings":";AAUO,MAAM,eAAe,cAAwC,IAAI;"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const theme_context = require("./theme.context.cjs");
|
|
5
|
+
function useTheme() {
|
|
6
|
+
const context = React.useContext(theme_context.ThemeContext);
|
|
7
|
+
if (!context) {
|
|
8
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
9
|
+
}
|
|
10
|
+
return context;
|
|
11
|
+
}
|
|
12
|
+
exports.useTheme = useTheme;
|
|
2
13
|
//# sourceMappingURL=theme.hook.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.hook.cjs","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"theme.hook.cjs","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":["useContext","ThemeContext"],"mappings":";;;;AAoBO,SAAS,WAAW;AACzB,QAAM,UAAUA,MAAAA,WAAWC,0BAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { useContext
|
|
2
|
-
import { ThemeContext
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
if (!
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ThemeContext } from "./theme.context.js";
|
|
3
|
+
function useTheme() {
|
|
4
|
+
const context = useContext(ThemeContext);
|
|
5
|
+
if (!context) {
|
|
6
6
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
7
|
-
|
|
7
|
+
}
|
|
8
|
+
return context;
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
useTheme
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=theme.hook.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.hook.js","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"theme.hook.js","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":[],"mappings":";;AAoBO,SAAS,WAAW;AACzB,QAAM,UAAU,WAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;"}
|