@blimu/react 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +552 -0
- package/dist/_virtual/index.cjs +2 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.cjs +2 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +2 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +2 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/client/auth.service.cjs +2 -0
- package/dist/client/auth.service.cjs.map +1 -0
- package/dist/client/auth.service.d.ts +50 -0
- package/dist/client/auth.service.d.ts.map +1 -0
- package/dist/client/auth.service.js +153 -0
- package/dist/client/auth.service.js.map +1 -0
- package/dist/client/auth.service.test-service.d.ts +39 -0
- package/dist/client/auth.service.test-service.d.ts.map +1 -0
- package/dist/client/external-store.cjs +2 -0
- package/dist/client/external-store.cjs.map +1 -0
- package/dist/client/external-store.d.ts +20 -0
- package/dist/client/external-store.d.ts.map +1 -0
- package/dist/client/external-store.js +13 -0
- package/dist/client/external-store.js.map +1 -0
- package/dist/client/runtime-client.cjs +2 -0
- package/dist/client/runtime-client.cjs.map +1 -0
- package/dist/client/runtime-client.d.ts +49 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +103 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/members-list.cjs +2 -0
- package/dist/components/members-list.cjs.map +1 -0
- package/dist/components/members-list.d.ts +70 -0
- package/dist/components/members-list.d.ts.map +1 -0
- package/dist/components/members-list.js +111 -0
- package/dist/components/members-list.js.map +1 -0
- package/dist/components/redirect-to-sign-in.cjs +2 -0
- package/dist/components/redirect-to-sign-in.cjs.map +1 -0
- package/dist/components/redirect-to-sign-in.d.ts +39 -0
- package/dist/components/redirect-to-sign-in.d.ts.map +1 -0
- package/dist/components/redirect-to-sign-in.js +27 -0
- package/dist/components/redirect-to-sign-in.js.map +1 -0
- package/dist/components/sign-in-button/styles.d.ts +7 -0
- package/dist/components/sign-in-button/styles.d.ts.map +1 -0
- package/dist/components/sign-in-button.cjs +2 -0
- package/dist/components/sign-in-button.cjs.map +1 -0
- package/dist/components/sign-in-button.d.ts +47 -0
- package/dist/components/sign-in-button.d.ts.map +1 -0
- package/dist/components/sign-in-button.js +33 -0
- package/dist/components/sign-in-button.js.map +1 -0
- package/dist/components/ui/avatar.cjs +2 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +43 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +2 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +130 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/user-avatar/styles.d.ts +7 -0
- package/dist/components/user-avatar/styles.d.ts.map +1 -0
- package/dist/components/user-avatar.cjs +2 -0
- package/dist/components/user-avatar.cjs.map +1 -0
- package/dist/components/user-avatar.d.ts +41 -0
- package/dist/components/user-avatar.d.ts.map +1 -0
- package/dist/components/user-avatar.js +23 -0
- package/dist/components/user-avatar.js.map +1 -0
- package/dist/components/user-button/styles.cjs +2 -0
- package/dist/components/user-button/styles.cjs.map +1 -0
- package/dist/components/user-button/styles.d.ts +17 -0
- package/dist/components/user-button/styles.d.ts.map +1 -0
- package/dist/components/user-button/styles.js +39 -0
- package/dist/components/user-button/styles.js.map +1 -0
- package/dist/components/user-button/user-button.cjs +2 -0
- package/dist/components/user-button/user-button.cjs.map +1 -0
- package/dist/components/user-button/user-button.d.ts +15 -0
- package/dist/components/user-button/user-button.d.ts.map +1 -0
- package/dist/components/user-button/user-button.js +93 -0
- package/dist/components/user-button/user-button.js.map +1 -0
- package/dist/components.cjs +2 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.js +13 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-auth.cjs +2 -0
- package/dist/hooks/use-auth.cjs.map +1 -0
- package/dist/hooks/use-auth.d.ts +92 -0
- package/dist/hooks/use-auth.d.ts.map +1 -0
- package/dist/hooks/use-auth.js +41 -0
- package/dist/hooks/use-auth.js.map +1 -0
- package/dist/hooks/use-client.cjs +2 -0
- package/dist/hooks/use-client.cjs.map +1 -0
- package/dist/hooks/use-client.d.ts +27 -0
- package/dist/hooks/use-client.d.ts.map +1 -0
- package/dist/hooks/use-client.js +9 -0
- package/dist/hooks/use-client.js.map +1 -0
- package/dist/hooks/use-members.cjs +2 -0
- package/dist/hooks/use-members.cjs.map +1 -0
- package/dist/hooks/use-members.d.ts +50 -0
- package/dist/hooks/use-members.d.ts.map +1 -0
- package/dist/hooks/use-members.js +49 -0
- package/dist/hooks/use-members.js.map +1 -0
- package/dist/hooks/use-store.cjs +2 -0
- package/dist/hooks/use-store.cjs.map +1 -0
- package/dist/hooks/use-store.d.ts +24 -0
- package/dist/hooks/use-store.d.ts.map +1 -0
- package/dist/hooks/use-store.js +18 -0
- package/dist/hooks/use-store.js.map +1 -0
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.js +14 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.cjs +2 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/variants.cjs +2 -0
- package/dist/lib/variants.cjs.map +1 -0
- package/dist/lib/variants.d.ts +37 -0
- package/dist/lib/variants.d.ts.map +1 -0
- package/dist/lib/variants.js +46 -0
- package/dist/lib/variants.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +2 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +528 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +131 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +76 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +56 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +33 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +59 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +54 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +215 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +609 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +220 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +184 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +53 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +28 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +2 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +53 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs +2 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +36 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.cjs +2 -0
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +2 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +2 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js +74 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -0
- package/dist/node_modules/jwt-decode/build/esm/index.cjs +2 -0
- package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js +53 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +36 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +69 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +39 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2766 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tailwindcss/dist/plugin.cjs +2 -0
- package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -0
- package/dist/node_modules/tailwindcss/dist/plugin.js +14 -0
- package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.cjs +2 -0
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +59 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +47 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/providers/auth/auth.context.cjs +2 -0
- package/dist/providers/auth/auth.context.cjs.map +1 -0
- package/dist/providers/auth/auth.context.d.ts +3 -0
- package/dist/providers/auth/auth.context.d.ts.map +1 -0
- package/dist/providers/auth/auth.context.js +6 -0
- package/dist/providers/auth/auth.context.js.map +1 -0
- package/dist/providers/auth/auth.hook.cjs +2 -0
- package/dist/providers/auth/auth.hook.cjs.map +1 -0
- package/dist/providers/auth/auth.hook.d.ts +7 -0
- package/dist/providers/auth/auth.hook.d.ts.map +1 -0
- package/dist/providers/auth/auth.hook.js +12 -0
- package/dist/providers/auth/auth.hook.js.map +1 -0
- package/dist/providers/auth/auth.provider.cjs +2 -0
- package/dist/providers/auth/auth.provider.cjs.map +1 -0
- package/dist/providers/auth/auth.provider.d.ts +7 -0
- package/dist/providers/auth/auth.provider.d.ts.map +1 -0
- package/dist/providers/auth/auth.provider.js +29 -0
- package/dist/providers/auth/auth.provider.js.map +1 -0
- package/dist/providers/blimu/blimu.context.cjs +2 -0
- package/dist/providers/blimu/blimu.context.cjs.map +1 -0
- package/dist/providers/blimu/blimu.context.d.ts +27 -0
- package/dist/providers/blimu/blimu.context.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.context.js +6 -0
- package/dist/providers/blimu/blimu.context.js.map +1 -0
- package/dist/providers/blimu/blimu.hook.cjs +2 -0
- package/dist/providers/blimu/blimu.hook.cjs.map +1 -0
- package/dist/providers/blimu/blimu.hook.d.ts +19 -0
- package/dist/providers/blimu/blimu.hook.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.hook.js +12 -0
- package/dist/providers/blimu/blimu.hook.js.map +1 -0
- package/dist/providers/blimu/blimu.provider.cjs +2 -0
- package/dist/providers/blimu/blimu.provider.cjs.map +1 -0
- package/dist/providers/blimu/blimu.provider.d.ts +47 -0
- package/dist/providers/blimu/blimu.provider.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.provider.js +67 -0
- package/dist/providers/blimu/blimu.provider.js.map +1 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/theme/index.d.ts +4 -0
- package/dist/providers/theme/index.d.ts.map +1 -0
- package/dist/providers/theme/theme.context.cjs +2 -0
- package/dist/providers/theme/theme.context.cjs.map +1 -0
- package/dist/providers/theme/theme.context.d.ts +8 -0
- package/dist/providers/theme/theme.context.d.ts.map +1 -0
- package/dist/providers/theme/theme.context.js +6 -0
- package/dist/providers/theme/theme.context.js.map +1 -0
- package/dist/providers/theme/theme.hook.cjs +2 -0
- package/dist/providers/theme/theme.hook.cjs.map +1 -0
- package/dist/providers/theme/theme.hook.d.ts +18 -0
- package/dist/providers/theme/theme.hook.d.ts.map +1 -0
- package/dist/providers/theme/theme.hook.js +12 -0
- package/dist/providers/theme/theme.hook.js.map +1 -0
- package/dist/providers/theme/theme.provider.cjs +2 -0
- package/dist/providers/theme/theme.provider.cjs.map +1 -0
- package/dist/providers/theme/theme.provider.d.ts +28 -0
- package/dist/providers/theme/theme.provider.d.ts.map +1 -0
- package/dist/providers/theme/theme.provider.js +68 -0
- package/dist/providers/theme/theme.provider.js.map +1 -0
- package/dist/providers.cjs +2 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.js +13 -0
- package/dist/providers.js.map +1 -0
- package/dist/styles/styles.css +1351 -0
- package/dist/styles/tw-styles.css +120 -0
- package/dist/tailwind.plugin.cjs +2 -0
- package/dist/tailwind.plugin.cjs.map +1 -0
- package/dist/tailwind.plugin.d.ts +19 -0
- package/dist/tailwind.plugin.d.ts.map +1 -0
- package/dist/tailwind.plugin.js +200 -0
- package/dist/tailwind.plugin.js.map +1 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.ts +128 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/publishable-key.cjs +2 -0
- package/dist/utils/publishable-key.cjs.map +1 -0
- package/dist/utils/publishable-key.d.ts +38 -0
- package/dist/utils/publishable-key.d.ts.map +1 -0
- package/dist/utils/publishable-key.js +38 -0
- package/dist/utils/publishable-key.js.map +1 -0
- package/package.json +128 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for accessing authentication state and actions
|
|
3
|
+
*
|
|
4
|
+
* Provides a type-safe interface to authentication state with discriminated union states
|
|
5
|
+
* and convenient boolean properties for common checks.
|
|
6
|
+
*
|
|
7
|
+
* @example Using boolean properties
|
|
8
|
+
* ```tsx
|
|
9
|
+
* function MyComponent() {
|
|
10
|
+
* const { isAuthenticated, isLoading, login, logout } = useAuth();
|
|
11
|
+
*
|
|
12
|
+
* if (isLoading) {
|
|
13
|
+
* return <Spinner />;
|
|
14
|
+
* }
|
|
15
|
+
*
|
|
16
|
+
* if (isAuthenticated) {
|
|
17
|
+
* return (
|
|
18
|
+
* <div>
|
|
19
|
+
* <p>Welcome!</p>
|
|
20
|
+
* <button onClick={logout}>Logout</button>
|
|
21
|
+
* </div>
|
|
22
|
+
* );
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* return <LoginForm onLogin={login} />;
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example Using discriminated union state for advanced cases
|
|
30
|
+
* ```tsx
|
|
31
|
+
* function AuthStatus() {
|
|
32
|
+
* const { state, isError } = useAuth();
|
|
33
|
+
*
|
|
34
|
+
* if (isError && state.status === 'error') {
|
|
35
|
+
* return <div>Error: {state.error}</div>;
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* return <div>Status: {state.status}</div>;
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function useAuth(): {
|
|
43
|
+
isIdle: boolean;
|
|
44
|
+
isLoading: boolean;
|
|
45
|
+
isAuthenticated: boolean;
|
|
46
|
+
isUnauthenticated: boolean;
|
|
47
|
+
isReady: boolean;
|
|
48
|
+
isError: boolean;
|
|
49
|
+
state: import("..").AuthState;
|
|
50
|
+
login: (returnUrl?: string) => void;
|
|
51
|
+
logout: () => Promise<void>;
|
|
52
|
+
getToken: (options: {
|
|
53
|
+
template: "web";
|
|
54
|
+
}) => Promise<string | null>;
|
|
55
|
+
getAuthState: () => import("..").AuthState;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Hook for getting current user information with auth state
|
|
59
|
+
*
|
|
60
|
+
* Returns the user object if authenticated (null otherwise) along with boolean state properties.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* function UserProfile() {
|
|
65
|
+
* const { user, isAuthenticated, isLoading } = useUser();
|
|
66
|
+
*
|
|
67
|
+
* if (isLoading) {
|
|
68
|
+
* return <Spinner />;
|
|
69
|
+
* }
|
|
70
|
+
*
|
|
71
|
+
* if (!isAuthenticated || !user) {
|
|
72
|
+
* return <div>Not authenticated</div>;
|
|
73
|
+
* }
|
|
74
|
+
*
|
|
75
|
+
* return (
|
|
76
|
+
* <div>
|
|
77
|
+
* <h1>{user.firstName} {user.lastName}</h1>
|
|
78
|
+
* <p>{user.email}</p>
|
|
79
|
+
* </div>
|
|
80
|
+
* );
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare function useUser(): {
|
|
85
|
+
isIdle: boolean;
|
|
86
|
+
isLoading: boolean;
|
|
87
|
+
isAuthenticated: boolean;
|
|
88
|
+
isUnauthenticated: boolean;
|
|
89
|
+
isError: boolean;
|
|
90
|
+
user: import("..").User | null;
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=use-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-auth.d.ts","sourceRoot":"","sources":["../../src/hooks/use-auth.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,OAAO;;;;;;;;qBAsEuQ,CAAC;;;;;;EAlD9R;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,OAAO;;;;;;;EAoBtB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useMemo as n } from "react";
|
|
2
|
+
import { useAuthContext as o } from "../providers/auth/auth.hook.js";
|
|
3
|
+
import { AuthStateGuards as t } from "../types/index.js";
|
|
4
|
+
function d() {
|
|
5
|
+
const e = o(), { state: i } = e, s = n(
|
|
6
|
+
() => ({
|
|
7
|
+
isIdle: t.isIdle(i),
|
|
8
|
+
isLoading: t.isLoading(i),
|
|
9
|
+
isAuthenticated: t.isAuthenticated(i),
|
|
10
|
+
isUnauthenticated: t.isUnauthenticated(i),
|
|
11
|
+
isReady: t.isReady(i),
|
|
12
|
+
isError: t.isError(i)
|
|
13
|
+
}),
|
|
14
|
+
[i]
|
|
15
|
+
);
|
|
16
|
+
return {
|
|
17
|
+
...e,
|
|
18
|
+
...s
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function c() {
|
|
22
|
+
const { state: e } = o(), i = t.isAuthenticated(e) ? e.user : null, s = n(
|
|
23
|
+
() => ({
|
|
24
|
+
isIdle: t.isIdle(e),
|
|
25
|
+
isLoading: t.isLoading(e),
|
|
26
|
+
isAuthenticated: t.isAuthenticated(e),
|
|
27
|
+
isUnauthenticated: t.isUnauthenticated(e),
|
|
28
|
+
isError: t.isError(e)
|
|
29
|
+
}),
|
|
30
|
+
[e]
|
|
31
|
+
);
|
|
32
|
+
return {
|
|
33
|
+
user: i,
|
|
34
|
+
...s
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
d as useAuth,
|
|
39
|
+
c as useUser
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=use-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-auth.js","sources":["../../src/hooks/use-auth.ts"],"sourcesContent":["import { useMemo } from 'react';\n\nimport { useAuthContext } from '../providers/auth/auth.hook';\nimport { AuthStateGuards } from '../types';\n\n/**\n * Hook for accessing authentication state and actions\n *\n * Provides a type-safe interface to authentication state with discriminated union states\n * and convenient boolean properties for common checks.\n *\n * @example Using boolean properties\n * ```tsx\n * function MyComponent() {\n * const { isAuthenticated, isLoading, login, logout } = useAuth();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (isAuthenticated) {\n * return (\n * <div>\n * <p>Welcome!</p>\n * <button onClick={logout}>Logout</button>\n * </div>\n * );\n * }\n *\n * return <LoginForm onLogin={login} />;\n * }\n * ```\n *\n * @example Using discriminated union state for advanced cases\n * ```tsx\n * function AuthStatus() {\n * const { state, isError } = useAuth();\n *\n * if (isError && state.status === 'error') {\n * return <div>Error: {state.error}</div>;\n * }\n *\n * return <div>Status: {state.status}</div>;\n * }\n * ```\n */\nexport function useAuth() {\n const context = useAuthContext();\n const { state } = context;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isReady: AuthStateGuards.isReady(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n ...context,\n ...booleanState,\n };\n}\n\n/**\n * Hook for getting current user information with auth state\n *\n * Returns the user object if authenticated (null otherwise) along with boolean state properties.\n *\n * @example\n * ```tsx\n * function UserProfile() {\n * const { user, isAuthenticated, isLoading } = useUser();\n *\n * if (isLoading) {\n * return <Spinner />;\n * }\n *\n * if (!isAuthenticated || !user) {\n * return <div>Not authenticated</div>;\n * }\n *\n * return (\n * <div>\n * <h1>{user.firstName} {user.lastName}</h1>\n * <p>{user.email}</p>\n * </div>\n * );\n * }\n * ```\n */\nexport function useUser() {\n const { state } = useAuthContext();\n\n const user = AuthStateGuards.isAuthenticated(state) ? state.user : null;\n\n const booleanState = useMemo(\n () => ({\n isIdle: AuthStateGuards.isIdle(state),\n isLoading: AuthStateGuards.isLoading(state),\n isAuthenticated: AuthStateGuards.isAuthenticated(state),\n isUnauthenticated: AuthStateGuards.isUnauthenticated(state),\n isError: AuthStateGuards.isError(state),\n }),\n [state],\n );\n\n return {\n user,\n ...booleanState,\n };\n}\n"],"names":["useAuth","context","useAuthContext","state","booleanState","useMemo","AuthStateGuards","useUser","user"],"mappings":";;;AA8CO,SAASA,IAAU;AACxB,QAAMC,IAAUC,EAAA,GACV,EAAE,OAAAC,MAAUF,GAEZG,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,QAAQC,EAAgB,OAAOH,CAAK;AAAA,MACpC,WAAWG,EAAgB,UAAUH,CAAK;AAAA,MAC1C,iBAAiBG,EAAgB,gBAAgBH,CAAK;AAAA,MACtD,mBAAmBG,EAAgB,kBAAkBH,CAAK;AAAA,MAC1D,SAASG,EAAgB,QAAQH,CAAK;AAAA,MACtC,SAASG,EAAgB,QAAQH,CAAK;AAAA,IAAA;AAAA,IAExC,CAACA,CAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,GAAGF;AAAA,IACH,GAAGG;AAAA,EAAA;AAEP;AA6BO,SAASG,IAAU;AACxB,QAAM,EAAE,OAAAJ,EAAA,IAAUD,EAAA,GAEZM,IAAOF,EAAgB,gBAAgBH,CAAK,IAAIA,EAAM,OAAO,MAE7DC,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,QAAQC,EAAgB,OAAOH,CAAK;AAAA,MACpC,WAAWG,EAAgB,UAAUH,CAAK;AAAA,MAC1C,iBAAiBG,EAAgB,gBAAgBH,CAAK;AAAA,MACtD,mBAAmBG,EAAgB,kBAAkBH,CAAK;AAAA,MAC1D,SAASG,EAAgB,QAAQH,CAAK;AAAA,IAAA;AAAA,IAExC,CAACA,CAAK;AAAA,EAAA;AAGR,SAAO;AAAA,IACL,MAAAK;AAAA,IACA,GAAGJ;AAAA,EAAA;AAEP;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-client.cjs","sources":["../../src/hooks/use-client.ts"],"sourcesContent":["import { useBlimu } from '../providers/blimu/blimu.hook';\n\n/**\n * Hook for accessing the Blimu API client instance\n *\n * Returns the underlying Blimu client that can be used to make direct API calls\n * to the Blimu runtime API. The client is pre-configured with authentication\n * headers and the publishable key.\n *\n * @returns The Blimu API client instance\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const client = useClient();\n *\n *\n * const handleListEntitlements = async () => {\n * const result = await client.entitlements.listForTenant({\n * tenantResourceId: 'org_123',\n * });\n * };\n *\n * return <button onClick={handleListEntitlements}>List Entitlements</button>;\n * }\n * ```\n */\nexport function useClient() {\n const { client } = useBlimu();\n const blimuClient = client.getClient();\n return blimuClient;\n}\n"],"names":["useClient","client","useBlimu"],"mappings":"qIA2BO,SAASA,GAAY,CAC1B,KAAM,CAAE,OAAAC,CAAA,EAAWC,WAAA,EAEnB,OADoBD,EAAO,UAAA,CAE7B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for accessing the Blimu API client instance
|
|
3
|
+
*
|
|
4
|
+
* Returns the underlying Blimu client that can be used to make direct API calls
|
|
5
|
+
* to the Blimu runtime API. The client is pre-configured with authentication
|
|
6
|
+
* headers and the publishable key.
|
|
7
|
+
*
|
|
8
|
+
* @returns The Blimu API client instance
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* function MyComponent() {
|
|
13
|
+
* const client = useClient();
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* const handleListEntitlements = async () => {
|
|
17
|
+
* const result = await client.entitlements.listForTenant({
|
|
18
|
+
* tenantResourceId: 'org_123',
|
|
19
|
+
* });
|
|
20
|
+
* };
|
|
21
|
+
*
|
|
22
|
+
* return <button onClick={handleListEntitlements}>List Entitlements</button>;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function useClient(): import("@blimu/client").Blimu;
|
|
27
|
+
//# sourceMappingURL=use-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-client.d.ts","sourceRoot":"","sources":["../../src/hooks/use-client.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,kCAIxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-client.js","sources":["../../src/hooks/use-client.ts"],"sourcesContent":["import { useBlimu } from '../providers/blimu/blimu.hook';\n\n/**\n * Hook for accessing the Blimu API client instance\n *\n * Returns the underlying Blimu client that can be used to make direct API calls\n * to the Blimu runtime API. The client is pre-configured with authentication\n * headers and the publishable key.\n *\n * @returns The Blimu API client instance\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const client = useClient();\n *\n *\n * const handleListEntitlements = async () => {\n * const result = await client.entitlements.listForTenant({\n * tenantResourceId: 'org_123',\n * });\n * };\n *\n * return <button onClick={handleListEntitlements}>List Entitlements</button>;\n * }\n * ```\n */\nexport function useClient() {\n const { client } = useBlimu();\n const blimuClient = client.getClient();\n return blimuClient;\n}\n"],"names":["useClient","client","useBlimu"],"mappings":";AA2BO,SAASA,IAAY;AAC1B,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA;AAEnB,SADoBD,EAAO,UAAA;AAE7B;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),g=require("../providers/blimu/blimu.hook.cjs");function C({resourceType:c,resourceId:u,page:t=1,limit:s=20,search:S="",enabled:a=!0}){const{client:l}=g.useBlimu(),[M,i]=e.useState([]),[f,m]=e.useState(0),[y,b]=e.useState(!1),[E,h]=e.useState(null),o=e.useCallback(async()=>{if(!(!a||!c||!u)){b(!0),h(null);try{const n=l.getClient(),r={items:[],total:0,page:t,limit:s};i(r.items),m(r.total)}catch(n){const r=n instanceof Error?n:new Error("Failed to fetch members");h(r),i([]),m(0)}finally{b(!1)}}},[l,c,u,t,s,S,a]);e.useEffect(()=>{o()},[o]);const P=f>t*s,d=t>1;return{members:M,total:f,page:t,limit:s,isLoading:y,error:E,refetch:o,hasNextPage:P,hasPreviousPage:d}}exports.useMembers=C;
|
|
2
|
+
//# sourceMappingURL=use-members.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-members.cjs","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number;\n limit?: number;\n search?: string;\n enabled?: boolean;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const runtimeClient = client.getClient();\n \n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n \n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, search, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["useMembers","resourceType","resourceId","page","limit","search","enabled","client","useBlimu","members","setMembers","useState","total","setTotal","isLoading","setIsLoading","error","setError","fetchMembers","useCallback","runtimeClient","response","err","useEffect","hasNextPage","hasPreviousPage"],"mappings":"wJAuDO,SAASA,EAAW,CACzB,aAAAC,EACA,WAAAC,EACA,KAAAC,EAAO,EACP,MAAAC,EAAQ,GACR,OAAAC,EAAS,GACT,QAAAC,EAAU,EACZ,EAAwC,CACtC,KAAM,CAAE,OAAAC,CAAA,EAAWC,WAAA,EACb,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAA2B,CAAA,CAAE,EACrD,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAS,CAAC,EAC9B,CAACG,EAAWC,CAAY,EAAIJ,EAAAA,SAAS,EAAK,EAC1C,CAACK,EAAOC,CAAQ,EAAIN,EAAAA,SAAuB,IAAI,EAE/CO,EAAeC,EAAAA,YAAY,SAAY,CAC3C,GAAI,GAACb,GAAW,CAACL,GAAgB,CAACC,GAIlC,CAAAa,EAAa,EAAI,EACjBE,EAAS,IAAI,EAEb,GAAI,CAIF,MAAMG,EAAgBb,EAAO,UAAA,EAUvBc,EAAW,CACf,MAAO,CAAA,EACP,MAAO,EACP,KAAAlB,EACA,MAAAC,CAAA,EAGFM,EAAWW,EAAS,KAAK,EACzBR,EAASQ,EAAS,KAAK,CACzB,OAASC,EAAK,CACZ,MAAMN,EAAQM,aAAe,MAAQA,EAAM,IAAI,MAAM,yBAAyB,EAC9EL,EAASD,CAAK,EACdN,EAAW,CAAA,CAAE,EACbG,EAAS,CAAC,CACZ,QAAA,CACEE,EAAa,EAAK,CACpB,EACF,EAAG,CAACR,EAAQN,EAAcC,EAAYC,EAAMC,EAAOC,EAAQC,CAAO,CAAC,EAEnEiB,EAAAA,UAAU,IAAM,CACdL,EAAA,CACF,EAAG,CAACA,CAAY,CAAC,EAEjB,MAAMM,EAAcZ,EAAQT,EAAOC,EAC7BqB,EAAkBtB,EAAO,EAE/B,MAAO,CACL,QAAAM,EACA,MAAAG,EACA,KAAAT,EACA,MAAAC,EACA,UAAAU,EACA,MAAAE,EACA,QAASE,EACT,YAAAM,EACA,gBAAAC,CAAA,CAEJ"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface ResourceMember {
|
|
2
|
+
userId: string;
|
|
3
|
+
role: string;
|
|
4
|
+
inherited: boolean;
|
|
5
|
+
user: {
|
|
6
|
+
id: string;
|
|
7
|
+
email: string;
|
|
8
|
+
firstName: string | null;
|
|
9
|
+
lastName: string | null;
|
|
10
|
+
avatarUrl: string | null;
|
|
11
|
+
emailVerified: boolean;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
lastLoginAt: string | null;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface UseMembersOptions {
|
|
18
|
+
resourceType: string;
|
|
19
|
+
resourceId: string;
|
|
20
|
+
page?: number;
|
|
21
|
+
limit?: number;
|
|
22
|
+
search?: string;
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface UseMembersResult {
|
|
26
|
+
members: ResourceMember[];
|
|
27
|
+
total: number;
|
|
28
|
+
page: number;
|
|
29
|
+
limit: number;
|
|
30
|
+
isLoading: boolean;
|
|
31
|
+
error: Error | null;
|
|
32
|
+
refetch: () => Promise<void>;
|
|
33
|
+
hasNextPage: boolean;
|
|
34
|
+
hasPreviousPage: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Hook to fetch and manage members list for a resource
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const { members, isLoading, error } = useMembers({
|
|
42
|
+
* resourceType: 'organization',
|
|
43
|
+
* resourceId: 'org_123',
|
|
44
|
+
* page: 1,
|
|
45
|
+
* limit: 20,
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function useMembers({ resourceType, resourceId, page, limit, search, enabled, }: UseMembersOptions): UseMembersResult;
|
|
50
|
+
//# sourceMappingURL=use-members.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-members.d.ts","sourceRoot":"","sources":["../../src/hooks/use-members.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,aAAa,EAAE,OAAO,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;CACH;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,EACzB,YAAY,EACZ,UAAU,EACV,IAAQ,EACR,KAAU,EACV,MAAW,EACX,OAAc,GACf,EAAE,iBAAiB,GAAG,gBAAgB,CAkEtC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useState as r, useCallback as L, useEffect as d } from "react";
|
|
2
|
+
import { useBlimu as g } from "../providers/blimu/blimu.hook.js";
|
|
3
|
+
function w({
|
|
4
|
+
resourceType: c,
|
|
5
|
+
resourceId: a,
|
|
6
|
+
page: t = 1,
|
|
7
|
+
limit: e = 20,
|
|
8
|
+
search: E = "",
|
|
9
|
+
enabled: l = !0
|
|
10
|
+
}) {
|
|
11
|
+
const { client: f } = g(), [C, u] = r([]), [i, m] = r(0), [M, h] = r(!1), [P, b] = r(null), o = L(async () => {
|
|
12
|
+
if (!(!l || !c || !a)) {
|
|
13
|
+
h(!0), b(null);
|
|
14
|
+
try {
|
|
15
|
+
const n = f.getClient(), s = {
|
|
16
|
+
items: [],
|
|
17
|
+
total: 0,
|
|
18
|
+
page: t,
|
|
19
|
+
limit: e
|
|
20
|
+
};
|
|
21
|
+
u(s.items), m(s.total);
|
|
22
|
+
} catch (n) {
|
|
23
|
+
const s = n instanceof Error ? n : new Error("Failed to fetch members");
|
|
24
|
+
b(s), u([]), m(0);
|
|
25
|
+
} finally {
|
|
26
|
+
h(!1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}, [f, c, a, t, e, E, l]);
|
|
30
|
+
d(() => {
|
|
31
|
+
o();
|
|
32
|
+
}, [o]);
|
|
33
|
+
const x = i > t * e, y = t > 1;
|
|
34
|
+
return {
|
|
35
|
+
members: C,
|
|
36
|
+
total: i,
|
|
37
|
+
page: t,
|
|
38
|
+
limit: e,
|
|
39
|
+
isLoading: M,
|
|
40
|
+
error: P,
|
|
41
|
+
refetch: o,
|
|
42
|
+
hasNextPage: x,
|
|
43
|
+
hasPreviousPage: y
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
w as useMembers
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=use-members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-members.js","sources":["../../src/hooks/use-members.ts"],"sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nimport { useBlimu } from '../providers';\n\nexport interface ResourceMember {\n userId: string;\n role: string;\n inherited: boolean;\n user: {\n id: string;\n email: string;\n firstName: string | null;\n lastName: string | null;\n avatarUrl: string | null;\n emailVerified: boolean;\n createdAt: string;\n updatedAt: string;\n lastLoginAt: string | null;\n };\n}\n\nexport interface UseMembersOptions {\n resourceType: string;\n resourceId: string;\n page?: number;\n limit?: number;\n search?: string;\n enabled?: boolean;\n}\n\nexport interface UseMembersResult {\n members: ResourceMember[];\n total: number;\n page: number;\n limit: number;\n isLoading: boolean;\n error: Error | null;\n refetch: () => Promise<void>;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n}\n\n/**\n * Hook to fetch and manage members list for a resource\n *\n * @example\n * ```tsx\n * const { members, isLoading, error } = useMembers({\n * resourceType: 'organization',\n * resourceId: 'org_123',\n * page: 1,\n * limit: 20,\n * });\n * ```\n */\nexport function useMembers({\n resourceType,\n resourceId,\n page = 1,\n limit = 20,\n search = '',\n enabled = true,\n}: UseMembersOptions): UseMembersResult {\n const { client } = useBlimu();\n const [members, setMembers] = useState<ResourceMember[]>([]);\n const [total, setTotal] = useState(0);\n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n const fetchMembers = useCallback(async () => {\n if (!enabled || !resourceType || !resourceId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n // TODO: Implement when resourceMembers API is available in runtime client\n // For now, this is a placeholder that will need to be implemented\n // when the runtime client exposes the resourceMembers service\n const runtimeClient = client.getClient();\n \n // This will need to be implemented when the API is available\n // const response = await runtimeClient.resourceMembers.list(resourceType, resourceId, {\n // page,\n // limit,\n // search,\n // });\n \n // Placeholder response\n const response = {\n items: [],\n total: 0,\n page,\n limit,\n };\n\n setMembers(response.items);\n setTotal(response.total);\n } catch (err) {\n const error = err instanceof Error ? err : new Error('Failed to fetch members');\n setError(error);\n setMembers([]);\n setTotal(0);\n } finally {\n setIsLoading(false);\n }\n }, [client, resourceType, resourceId, page, limit, search, enabled]);\n\n useEffect(() => {\n fetchMembers();\n }, [fetchMembers]);\n\n const hasNextPage = total > page * limit;\n const hasPreviousPage = page > 1;\n\n return {\n members,\n total,\n page,\n limit,\n isLoading,\n error,\n refetch: fetchMembers,\n hasNextPage,\n hasPreviousPage,\n };\n}\n"],"names":["useMembers","resourceType","resourceId","page","limit","search","enabled","client","useBlimu","members","setMembers","useState","total","setTotal","isLoading","setIsLoading","error","setError","fetchMembers","useCallback","runtimeClient","response","err","useEffect","hasNextPage","hasPreviousPage"],"mappings":";;AAuDO,SAASA,EAAW;AAAA,EACzB,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,SAAAC,IAAU;AACZ,GAAwC;AACtC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACb,CAACC,GAASC,CAAU,IAAIC,EAA2B,CAAA,CAAE,GACrD,CAACC,GAAOC,CAAQ,IAAIF,EAAS,CAAC,GAC9B,CAACG,GAAWC,CAAY,IAAIJ,EAAS,EAAK,GAC1C,CAACK,GAAOC,CAAQ,IAAIN,EAAuB,IAAI,GAE/CO,IAAeC,EAAY,YAAY;AAC3C,QAAI,GAACb,KAAW,CAACL,KAAgB,CAACC,IAIlC;AAAA,MAAAa,EAAa,EAAI,GACjBE,EAAS,IAAI;AAEb,UAAI;AAIF,cAAMG,IAAgBb,EAAO,UAAA,GAUvBc,IAAW;AAAA,UACf,OAAO,CAAA;AAAA,UACP,OAAO;AAAA,UACP,MAAAlB;AAAA,UACA,OAAAC;AAAA,QAAA;AAGF,QAAAM,EAAWW,EAAS,KAAK,GACzBR,EAASQ,EAAS,KAAK;AAAA,MACzB,SAASC,GAAK;AACZ,cAAMN,IAAQM,aAAe,QAAQA,IAAM,IAAI,MAAM,yBAAyB;AAC9E,QAAAL,EAASD,CAAK,GACdN,EAAW,CAAA,CAAE,GACbG,EAAS,CAAC;AAAA,MACZ,UAAA;AACE,QAAAE,EAAa,EAAK;AAAA,MACpB;AAAA;AAAA,EACF,GAAG,CAACR,GAAQN,GAAcC,GAAYC,GAAMC,GAAOC,GAAQC,CAAO,CAAC;AAEnE,EAAAiB,EAAU,MAAM;AACd,IAAAL,EAAA;AAAA,EACF,GAAG,CAACA,CAAY,CAAC;AAEjB,QAAMM,IAAcZ,IAAQT,IAAOC,GAC7BqB,IAAkBtB,IAAO;AAE/B,SAAO;AAAA,IACL,SAAAM;AAAA,IACA,OAAAG;AAAA,IACA,MAAAT;AAAA,IACA,OAAAC;AAAA,IACA,WAAAU;AAAA,IACA,OAAAE;AAAA,IACA,SAASE;AAAA,IACT,aAAAM;AAAA,IACA,iBAAAC;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-store.cjs","sources":["../../src/hooks/use-store.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport type { ExternalStore } from '../client/external-store';\n\n/**\n * Hook to subscribe to an ExternalStore and get its current state\n * Uses React's useSyncExternalStore for optimal performance and SSR support\n *\n * @example\n * ```tsx\n * const store = new ExternalStore({ count: 0 });\n *\n * function Counter() {\n * const state = useStore(store);\n * return (\n * <div>\n * <p>Count: {state.count}</p>\n * <button onClick={() => store.setState({ count: state.count + 1 })}>\n * Increment\n * </button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useStore<T>(store: ExternalStore<T>): T {\n return useSyncExternalStore(\n // subscribe function - returns unsubscribe\n // useSyncExternalStore expects a callback that just notifies of changes\n // Our store passes state to listeners, so we wrap it to ignore the state\n store.subscribe,\n // getSnapshot function - returns current state\n store.getSnapshot,\n // getServerSnapshot (optional) - for SSR compatibility\n // Returns initial state for server-side rendering\n store.getSnapshot,\n );\n}\n"],"names":["useStore","store","useSyncExternalStore"],"mappings":"yGAyBO,SAASA,EAAYC,EAA4B,CACtD,OAAOC,EAAAA,qBAILD,EAAM,UAENA,EAAM,YAGNA,EAAM,WAAA,CAEV"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExternalStore } from '../client/external-store';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to subscribe to an ExternalStore and get its current state
|
|
4
|
+
* Uses React's useSyncExternalStore for optimal performance and SSR support
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const store = new ExternalStore({ count: 0 });
|
|
9
|
+
*
|
|
10
|
+
* function Counter() {
|
|
11
|
+
* const state = useStore(store);
|
|
12
|
+
* return (
|
|
13
|
+
* <div>
|
|
14
|
+
* <p>Count: {state.count}</p>
|
|
15
|
+
* <button onClick={() => store.setState({ count: state.count + 1 })}>
|
|
16
|
+
* Increment
|
|
17
|
+
* </button>
|
|
18
|
+
* </div>
|
|
19
|
+
* );
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function useStore<T>(store: ExternalStore<T>): T;
|
|
24
|
+
//# sourceMappingURL=use-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-store.d.ts","sourceRoot":"","sources":["../../src/hooks/use-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAYtD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useSyncExternalStore as e } from "react";
|
|
2
|
+
function r(t) {
|
|
3
|
+
return e(
|
|
4
|
+
// subscribe function - returns unsubscribe
|
|
5
|
+
// useSyncExternalStore expects a callback that just notifies of changes
|
|
6
|
+
// Our store passes state to listeners, so we wrap it to ignore the state
|
|
7
|
+
t.subscribe,
|
|
8
|
+
// getSnapshot function - returns current state
|
|
9
|
+
t.getSnapshot,
|
|
10
|
+
// getServerSnapshot (optional) - for SSR compatibility
|
|
11
|
+
// Returns initial state for server-side rendering
|
|
12
|
+
t.getSnapshot
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
r as useStore
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=use-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-store.js","sources":["../../src/hooks/use-store.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport type { ExternalStore } from '../client/external-store';\n\n/**\n * Hook to subscribe to an ExternalStore and get its current state\n * Uses React's useSyncExternalStore for optimal performance and SSR support\n *\n * @example\n * ```tsx\n * const store = new ExternalStore({ count: 0 });\n *\n * function Counter() {\n * const state = useStore(store);\n * return (\n * <div>\n * <p>Count: {state.count}</p>\n * <button onClick={() => store.setState({ count: state.count + 1 })}>\n * Increment\n * </button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useStore<T>(store: ExternalStore<T>): T {\n return useSyncExternalStore(\n // subscribe function - returns unsubscribe\n // useSyncExternalStore expects a callback that just notifies of changes\n // Our store passes state to listeners, so we wrap it to ignore the state\n store.subscribe,\n // getSnapshot function - returns current state\n store.getSnapshot,\n // getServerSnapshot (optional) - for SSR compatibility\n // Returns initial state for server-side rendering\n store.getSnapshot,\n );\n}\n"],"names":["useStore","store","useSyncExternalStore"],"mappings":";AAyBO,SAASA,EAAYC,GAA4B;AACtD,SAAOC;AAAA;AAAA;AAAA;AAAA,IAILD,EAAM;AAAA;AAAA,IAENA,EAAM;AAAA;AAAA;AAAA,IAGNA,EAAM;AAAA,EAAA;AAEV;"}
|
package/dist/hooks.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./providers/blimu/blimu.hook.cjs"),e=require("./hooks/use-auth.cjs"),s=require("./hooks/use-client.cjs"),r=require("./hooks/use-store.cjs"),t=require("./hooks/use-members.cjs");exports.useBlimu=u.useBlimu;exports.useAuth=e.useAuth;exports.useUser=e.useUser;exports.useClient=s.useClient;exports.useStore=r.useStore;exports.useMembers=t.useMembers;
|
|
2
|
+
//# sourceMappingURL=hooks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useBlimu as o } from "./providers/blimu/blimu.hook.js";
|
|
2
|
+
import { useAuth as t, useUser as u } from "./hooks/use-auth.js";
|
|
3
|
+
import { useClient as f } from "./hooks/use-client.js";
|
|
4
|
+
import { useStore as x } from "./hooks/use-store.js";
|
|
5
|
+
import { useMembers as l } from "./hooks/use-members.js";
|
|
6
|
+
export {
|
|
7
|
+
t as useAuth,
|
|
8
|
+
o as useBlimu,
|
|
9
|
+
f as useClient,
|
|
10
|
+
l as useMembers,
|
|
11
|
+
x as useStore,
|
|
12
|
+
u as useUser
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./components/redirect-to-sign-in.cjs"),t=require("./components/user-button/user-button.cjs"),i=require("./components/user-avatar.cjs"),s=require("./components/sign-in-button.cjs"),n=require("./components/members-list.cjs"),o=require("./providers/blimu/blimu.hook.cjs"),r=require("./hooks/use-auth.cjs"),l=require("./hooks/use-client.cjs"),m=require("./hooks/use-members.cjs"),c=require("./providers/blimu/blimu.provider.cjs"),a=require("./types/index.cjs"),b=require("./client/runtime-client.cjs"),e=require("./utils/publishable-key.cjs"),h=require("./tailwind.plugin.cjs"),d=require("./providers/theme/theme.provider.cjs"),q=require("./providers/theme/theme.hook.cjs");exports.RedirectToSignIn=u.RedirectToSignIn;exports.UserButton=t.UserButton;exports.UserAvatar=i.UserAvatar;exports.SignInButton=s.SignInButton;exports.MembersList=n.MembersList;exports.useBlimu=o.useBlimu;exports.useAuth=r.useAuth;exports.useUser=r.useUser;exports.useClient=l.useClient;exports.useMembers=m.useMembers;exports.BlimuProvider=c.BlimuProvider;exports.AuthStateGuards=a.AuthStateGuards;exports.BlimuRuntimeClientWrapper=b.BlimuRuntimeClientWrapper;exports.decodePublishableKey=e.decodePublishableKey;exports.getAuthApiUrl=e.getAuthApiUrl;exports.getAuthDomainFromPublishableKey=e.getAuthDomainFromPublishableKey;exports.blimuPlugin=h.blimuPlugin;exports.ThemeProvider=d.ThemeProvider;exports.useTheme=q.useTheme;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type { RedirectToSignInProps, UserButtonProps, UserAvatarProps, SignInButtonProps, MembersListProps, } from './components';
|
|
2
|
+
export { RedirectToSignIn, UserButton, UserAvatar, SignInButton, MembersList } from './components';
|
|
3
|
+
export { useAuth, useBlimu, useUser, useMembers, useClient } from './hooks';
|
|
4
|
+
export type { ResourceMember, UseMembersOptions, UseMembersResult } from './hooks';
|
|
5
|
+
export { BlimuProvider, ThemeProvider, useTheme } from './providers';
|
|
6
|
+
export type { Theme, ThemeContextValue, AppearanceConfig } from './providers';
|
|
7
|
+
export type { AuthContextValue, AuthState, BlimuConfig, User } from './types';
|
|
8
|
+
export { AuthStateGuards } from './types';
|
|
9
|
+
export { BlimuRuntimeClientWrapper } from './client/runtime-client';
|
|
10
|
+
export type { DecodedPublishableKey } from './utils/publishable-key';
|
|
11
|
+
export { decodePublishableKey, getAuthApiUrl, getAuthDomainFromPublishableKey, } from './utils/publishable-key';
|
|
12
|
+
export { blimuPlugin } from './tailwind.plugin';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG9E,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAGpE,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,+BAA+B,GAChC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RedirectToSignIn as o } from "./components/redirect-to-sign-in.js";
|
|
2
|
+
import { UserButton as m } from "./components/user-button/user-button.js";
|
|
3
|
+
import { UserAvatar as p } from "./components/user-avatar.js";
|
|
4
|
+
import { SignInButton as f } from "./components/sign-in-button.js";
|
|
5
|
+
import { MembersList as s } from "./components/members-list.js";
|
|
6
|
+
import { useBlimu as n } from "./providers/blimu/blimu.hook.js";
|
|
7
|
+
import { useAuth as h, useUser as b } from "./hooks/use-auth.js";
|
|
8
|
+
import { useClient as A } from "./hooks/use-client.js";
|
|
9
|
+
import { useMembers as B } from "./hooks/use-members.js";
|
|
10
|
+
import { BlimuProvider as U } from "./providers/blimu/blimu.provider.js";
|
|
11
|
+
import { AuthStateGuards as S } from "./types/index.js";
|
|
12
|
+
import { BlimuRuntimeClientWrapper as c } from "./client/runtime-client.js";
|
|
13
|
+
import { decodePublishableKey as C, getAuthApiUrl as I, getAuthDomainFromPublishableKey as K } from "./utils/publishable-key.js";
|
|
14
|
+
import { blimuPlugin as R } from "./tailwind.plugin.js";
|
|
15
|
+
import { ThemeProvider as F } from "./providers/theme/theme.provider.js";
|
|
16
|
+
import { useTheme as L } from "./providers/theme/theme.hook.js";
|
|
17
|
+
export {
|
|
18
|
+
S as AuthStateGuards,
|
|
19
|
+
U as BlimuProvider,
|
|
20
|
+
c as BlimuRuntimeClientWrapper,
|
|
21
|
+
s as MembersList,
|
|
22
|
+
o as RedirectToSignIn,
|
|
23
|
+
f as SignInButton,
|
|
24
|
+
F as ThemeProvider,
|
|
25
|
+
p as UserAvatar,
|
|
26
|
+
m as UserButton,
|
|
27
|
+
R as blimuPlugin,
|
|
28
|
+
C as decodePublishableKey,
|
|
29
|
+
I as getAuthApiUrl,
|
|
30
|
+
K as getAuthDomainFromPublishableKey,
|
|
31
|
+
h as useAuth,
|
|
32
|
+
n as useBlimu,
|
|
33
|
+
A as useClient,
|
|
34
|
+
B as useMembers,
|
|
35
|
+
L as useTheme,
|
|
36
|
+
b as useUser
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../node_modules/clsx/dist/clsx.cjs"),t=require("../node_modules/tailwind-merge/dist/bundle-mjs.cjs");function n(...e){return t.twMerge(r.clsx(e))}exports.cn=n;
|
|
2
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":"sMAOO,SAASA,KAAMC,EAAsB,CAC1C,OAAOC,EAAAA,QAAQC,OAAKF,CAAM,CAAC,CAC7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to merge Tailwind CSS classes
|
|
4
|
+
* Combines clsx for conditional classes and tailwind-merge for deduplication
|
|
5
|
+
*/
|
|
6
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAOO,SAASA,KAAMC,GAAsB;AAC1C,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../node_modules/class-variance-authority/dist/index.cjs"),i=e.cva("inline-flex items-center justify-center rounded-blimu transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-blimu-primary text-blimu-primary-foreground hover:bg-blimu-primary/90",outline:"border border-blimu-input bg-blimu-background hover:bg-blimu-accent hover:text-blimu-accent-foreground",ghost:"hover:bg-blimu-accent hover:text-blimu-accent-foreground",destructive:"bg-blimu-destructive text-blimu-destructive-foreground hover:bg-blimu-destructive/90"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-blimu-md px-3",lg:"h-11 rounded-blimu-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),t=e.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"}},defaultVariants:{size:"default"}});exports.avatarVariants=t;exports.buttonVariants=i;
|
|
2
|
+
//# sourceMappingURL=variants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.cjs","sources":["../../src/lib/variants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * Button variant styles using CVA\n *\n * @example\n * ```tsx\n * import { buttonVariants } from '@blimu/react/lib/variants';\n * import { cn } from '@blimu/react/lib/utils';\n *\n * <button className={cn(buttonVariants({ variant: 'default', size: 'lg' }))}>\n * Click me\n * </button>\n * ```\n */\nexport const buttonVariants = cva(\n // Base styles\n 'inline-flex items-center justify-center rounded-blimu transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'bg-blimu-primary text-blimu-primary-foreground hover:bg-blimu-primary/90',\n outline:\n 'border border-blimu-input bg-blimu-background hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n ghost: 'hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n destructive:\n 'bg-blimu-destructive text-blimu-destructive-foreground hover:bg-blimu-destructive/90',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-blimu-md px-3',\n lg: 'h-11 rounded-blimu-md px-8',\n icon: 'h-10 w-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\n/**\n * Avatar variant styles using CVA\n *\n * @example\n * ```tsx\n * import { avatarVariants } from '@blimu/react/lib/variants';\n * import { cn } from '@blimu/react/lib/utils';\n *\n * <div className={cn(avatarVariants({ size: 'lg' }))}>\n * <img src=\"...\" alt=\"...\" />\n * </div>\n * ```\n */\nexport const avatarVariants = cva(\n // Base styles\n 'relative flex shrink-0 overflow-hidden rounded-full',\n {\n variants: {\n size: {\n default: 'h-10 w-10',\n sm: 'h-8 w-8',\n lg: 'h-12 w-12',\n xl: 'h-16 w-16',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport type AvatarVariants = VariantProps<typeof avatarVariants>;\n"],"names":["buttonVariants","cva","avatarVariants"],"mappings":"2JAeaA,EAAiBC,EAAAA,IAE5B,gRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,2EACT,QACE,yGACF,MAAO,2DACP,YACE,sFAAA,EAEJ,KAAM,CACJ,QAAS,iBACT,GAAI,4BACJ,GAAI,6BACJ,KAAM,WAAA,CACR,EAEF,gBAAiB,CACf,QAAS,UACT,KAAM,SAAA,CACR,CAEJ,EAiBaC,EAAiBD,EAAAA,IAE5B,sDACA,CACE,SAAU,CACR,KAAM,CACJ,QAAS,YACT,GAAI,UACJ,GAAI,YACJ,GAAI,WAAA,CACN,EAEF,gBAAiB,CACf,KAAM,SAAA,CACR,CAEJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* Button variant styles using CVA
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* import { buttonVariants } from '@blimu/react/lib/variants';
|
|
8
|
+
* import { cn } from '@blimu/react/lib/utils';
|
|
9
|
+
*
|
|
10
|
+
* <button className={cn(buttonVariants({ variant: 'default', size: 'lg' }))}>
|
|
11
|
+
* Click me
|
|
12
|
+
* </button>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare const buttonVariants: (props?: ({
|
|
16
|
+
variant?: "default" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
17
|
+
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
18
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
20
|
+
/**
|
|
21
|
+
* Avatar variant styles using CVA
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { avatarVariants } from '@blimu/react/lib/variants';
|
|
26
|
+
* import { cn } from '@blimu/react/lib/utils';
|
|
27
|
+
*
|
|
28
|
+
* <div className={cn(avatarVariants({ size: 'lg' }))}>
|
|
29
|
+
* <img src="..." alt="..." />
|
|
30
|
+
* </div>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const avatarVariants: (props?: ({
|
|
34
|
+
size?: "sm" | "lg" | "xl" | "default" | null | undefined;
|
|
35
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
36
|
+
export type AvatarVariants = VariantProps<typeof avatarVariants>;
|
|
37
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/lib/variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;;;8EAyB1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAEjE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc;;8EAgB1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC"}
|