@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.
Files changed (516) hide show
  1. package/README.md +552 -0
  2. package/dist/_virtual/index.cjs +2 -0
  3. package/dist/_virtual/index.cjs.map +1 -0
  4. package/dist/_virtual/index.js +6 -0
  5. package/dist/_virtual/index.js.map +1 -0
  6. package/dist/_virtual/index2.cjs +2 -0
  7. package/dist/_virtual/index2.cjs.map +1 -0
  8. package/dist/_virtual/index2.js +5 -0
  9. package/dist/_virtual/index2.js.map +1 -0
  10. package/dist/_virtual/use-sync-external-store-shim.development.cjs +2 -0
  11. package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
  12. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  13. package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
  14. package/dist/_virtual/use-sync-external-store-shim.production.cjs +2 -0
  15. package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -0
  16. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  17. package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
  18. package/dist/client/auth.service.cjs +2 -0
  19. package/dist/client/auth.service.cjs.map +1 -0
  20. package/dist/client/auth.service.d.ts +50 -0
  21. package/dist/client/auth.service.d.ts.map +1 -0
  22. package/dist/client/auth.service.js +153 -0
  23. package/dist/client/auth.service.js.map +1 -0
  24. package/dist/client/auth.service.test-service.d.ts +39 -0
  25. package/dist/client/auth.service.test-service.d.ts.map +1 -0
  26. package/dist/client/external-store.cjs +2 -0
  27. package/dist/client/external-store.cjs.map +1 -0
  28. package/dist/client/external-store.d.ts +20 -0
  29. package/dist/client/external-store.d.ts.map +1 -0
  30. package/dist/client/external-store.js +13 -0
  31. package/dist/client/external-store.js.map +1 -0
  32. package/dist/client/runtime-client.cjs +2 -0
  33. package/dist/client/runtime-client.cjs.map +1 -0
  34. package/dist/client/runtime-client.d.ts +49 -0
  35. package/dist/client/runtime-client.d.ts.map +1 -0
  36. package/dist/client/runtime-client.js +103 -0
  37. package/dist/client/runtime-client.js.map +1 -0
  38. package/dist/components/index.d.ts +11 -0
  39. package/dist/components/index.d.ts.map +1 -0
  40. package/dist/components/members-list.cjs +2 -0
  41. package/dist/components/members-list.cjs.map +1 -0
  42. package/dist/components/members-list.d.ts +70 -0
  43. package/dist/components/members-list.d.ts.map +1 -0
  44. package/dist/components/members-list.js +111 -0
  45. package/dist/components/members-list.js.map +1 -0
  46. package/dist/components/redirect-to-sign-in.cjs +2 -0
  47. package/dist/components/redirect-to-sign-in.cjs.map +1 -0
  48. package/dist/components/redirect-to-sign-in.d.ts +39 -0
  49. package/dist/components/redirect-to-sign-in.d.ts.map +1 -0
  50. package/dist/components/redirect-to-sign-in.js +27 -0
  51. package/dist/components/redirect-to-sign-in.js.map +1 -0
  52. package/dist/components/sign-in-button/styles.d.ts +7 -0
  53. package/dist/components/sign-in-button/styles.d.ts.map +1 -0
  54. package/dist/components/sign-in-button.cjs +2 -0
  55. package/dist/components/sign-in-button.cjs.map +1 -0
  56. package/dist/components/sign-in-button.d.ts +47 -0
  57. package/dist/components/sign-in-button.d.ts.map +1 -0
  58. package/dist/components/sign-in-button.js +33 -0
  59. package/dist/components/sign-in-button.js.map +1 -0
  60. package/dist/components/ui/avatar.cjs +2 -0
  61. package/dist/components/ui/avatar.cjs.map +1 -0
  62. package/dist/components/ui/avatar.d.ts +7 -0
  63. package/dist/components/ui/avatar.d.ts.map +1 -0
  64. package/dist/components/ui/avatar.js +43 -0
  65. package/dist/components/ui/avatar.js.map +1 -0
  66. package/dist/components/ui/badge.d.ts +10 -0
  67. package/dist/components/ui/badge.d.ts.map +1 -0
  68. package/dist/components/ui/dropdown-menu.cjs +2 -0
  69. package/dist/components/ui/dropdown-menu.cjs.map +1 -0
  70. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  71. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  72. package/dist/components/ui/dropdown-menu.js +130 -0
  73. package/dist/components/ui/dropdown-menu.js.map +1 -0
  74. package/dist/components/ui/popover.d.ts +8 -0
  75. package/dist/components/ui/popover.d.ts.map +1 -0
  76. package/dist/components/ui/separator.d.ts +5 -0
  77. package/dist/components/ui/separator.d.ts.map +1 -0
  78. package/dist/components/user-avatar/styles.d.ts +7 -0
  79. package/dist/components/user-avatar/styles.d.ts.map +1 -0
  80. package/dist/components/user-avatar.cjs +2 -0
  81. package/dist/components/user-avatar.cjs.map +1 -0
  82. package/dist/components/user-avatar.d.ts +41 -0
  83. package/dist/components/user-avatar.d.ts.map +1 -0
  84. package/dist/components/user-avatar.js +23 -0
  85. package/dist/components/user-avatar.js.map +1 -0
  86. package/dist/components/user-button/styles.cjs +2 -0
  87. package/dist/components/user-button/styles.cjs.map +1 -0
  88. package/dist/components/user-button/styles.d.ts +17 -0
  89. package/dist/components/user-button/styles.d.ts.map +1 -0
  90. package/dist/components/user-button/styles.js +39 -0
  91. package/dist/components/user-button/styles.js.map +1 -0
  92. package/dist/components/user-button/user-button.cjs +2 -0
  93. package/dist/components/user-button/user-button.cjs.map +1 -0
  94. package/dist/components/user-button/user-button.d.ts +15 -0
  95. package/dist/components/user-button/user-button.d.ts.map +1 -0
  96. package/dist/components/user-button/user-button.js +93 -0
  97. package/dist/components/user-button/user-button.js.map +1 -0
  98. package/dist/components.cjs +2 -0
  99. package/dist/components.cjs.map +1 -0
  100. package/dist/components.js +13 -0
  101. package/dist/components.js.map +1 -0
  102. package/dist/hooks/index.d.ts +7 -0
  103. package/dist/hooks/index.d.ts.map +1 -0
  104. package/dist/hooks/use-auth.cjs +2 -0
  105. package/dist/hooks/use-auth.cjs.map +1 -0
  106. package/dist/hooks/use-auth.d.ts +92 -0
  107. package/dist/hooks/use-auth.d.ts.map +1 -0
  108. package/dist/hooks/use-auth.js +41 -0
  109. package/dist/hooks/use-auth.js.map +1 -0
  110. package/dist/hooks/use-client.cjs +2 -0
  111. package/dist/hooks/use-client.cjs.map +1 -0
  112. package/dist/hooks/use-client.d.ts +27 -0
  113. package/dist/hooks/use-client.d.ts.map +1 -0
  114. package/dist/hooks/use-client.js +9 -0
  115. package/dist/hooks/use-client.js.map +1 -0
  116. package/dist/hooks/use-members.cjs +2 -0
  117. package/dist/hooks/use-members.cjs.map +1 -0
  118. package/dist/hooks/use-members.d.ts +50 -0
  119. package/dist/hooks/use-members.d.ts.map +1 -0
  120. package/dist/hooks/use-members.js +49 -0
  121. package/dist/hooks/use-members.js.map +1 -0
  122. package/dist/hooks/use-store.cjs +2 -0
  123. package/dist/hooks/use-store.cjs.map +1 -0
  124. package/dist/hooks/use-store.d.ts +24 -0
  125. package/dist/hooks/use-store.d.ts.map +1 -0
  126. package/dist/hooks/use-store.js +18 -0
  127. package/dist/hooks/use-store.js.map +1 -0
  128. package/dist/hooks.cjs +2 -0
  129. package/dist/hooks.cjs.map +1 -0
  130. package/dist/hooks.js +14 -0
  131. package/dist/hooks.js.map +1 -0
  132. package/dist/index.cjs +2 -0
  133. package/dist/index.cjs.map +1 -0
  134. package/dist/index.d.ts +13 -0
  135. package/dist/index.d.ts.map +1 -0
  136. package/dist/index.js +38 -0
  137. package/dist/index.js.map +1 -0
  138. package/dist/lib/utils.cjs +2 -0
  139. package/dist/lib/utils.cjs.map +1 -0
  140. package/dist/lib/utils.d.ts +7 -0
  141. package/dist/lib/utils.d.ts.map +1 -0
  142. package/dist/lib/utils.js +9 -0
  143. package/dist/lib/utils.js.map +1 -0
  144. package/dist/lib/variants.cjs +2 -0
  145. package/dist/lib/variants.cjs.map +1 -0
  146. package/dist/lib/variants.d.ts +37 -0
  147. package/dist/lib/variants.d.ts.map +1 -0
  148. package/dist/lib/variants.js +46 -0
  149. package/dist/lib/variants.js.map +1 -0
  150. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +2 -0
  151. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -0
  152. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +528 -0
  153. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
  154. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +2 -0
  155. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -0
  156. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
  157. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
  158. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +2 -0
  159. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -0
  160. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
  161. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
  162. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +2 -0
  163. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -0
  164. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +2 -0
  165. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -0
  166. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
  167. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  168. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +131 -0
  169. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
  170. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +2 -0
  171. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
  172. package/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
  173. package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
  174. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +2 -0
  175. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
  176. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
  177. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
  178. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +2 -0
  179. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -0
  180. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +76 -0
  181. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
  182. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
  183. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
  184. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +56 -0
  185. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  186. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
  187. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
  188. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +33 -0
  189. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  190. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
  191. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
  192. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +59 -0
  193. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  194. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -0
  195. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -0
  196. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +51 -0
  197. package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
  198. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
  199. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
  200. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
  201. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
  202. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
  203. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
  204. package/dist/node_modules/@radix-ui/react-context/dist/index.js +54 -0
  205. package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  206. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +2 -0
  207. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -0
  208. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
  209. package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
  210. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +2 -0
  211. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
  212. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
  213. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
  214. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +2 -0
  215. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -0
  216. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +215 -0
  217. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
  218. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +2 -0
  219. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -0
  220. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
  221. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
  222. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +2 -0
  223. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -0
  224. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
  225. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
  226. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +2 -0
  227. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -0
  228. package/dist/node_modules/@radix-ui/react-id/dist/index.js +14 -0
  229. package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
  230. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +2 -0
  231. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -0
  232. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +609 -0
  233. package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
  234. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
  235. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
  236. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +220 -0
  237. package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
  238. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -0
  239. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
  240. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
  241. package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
  242. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +2 -0
  243. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -0
  244. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +71 -0
  245. package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
  246. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
  247. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
  248. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
  249. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  250. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +2 -0
  251. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -0
  252. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +184 -0
  253. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
  254. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
  255. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
  256. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
  257. package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  258. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
  259. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
  260. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +11 -0
  261. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
  262. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +2 -0
  263. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
  264. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +53 -0
  265. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
  266. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +2 -0
  267. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -0
  268. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -0
  269. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
  270. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +2 -0
  271. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -0
  272. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
  273. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
  274. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +2 -0
  275. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -0
  276. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  277. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
  278. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +2 -0
  279. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -0
  280. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +28 -0
  281. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
  282. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +2 -0
  283. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -0
  284. package/dist/node_modules/aria-hidden/dist/es2015/index.js +53 -0
  285. package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
  286. package/dist/node_modules/class-variance-authority/dist/index.cjs +2 -0
  287. package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -0
  288. package/dist/node_modules/class-variance-authority/dist/index.js +36 -0
  289. package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
  290. package/dist/node_modules/clsx/dist/clsx.cjs +2 -0
  291. package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -0
  292. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  293. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  294. package/dist/node_modules/get-nonce/dist/es2015/index.cjs +2 -0
  295. package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -0
  296. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  297. package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
  298. package/dist/node_modules/js-cookie/dist/js.cookie.cjs +2 -0
  299. package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -0
  300. package/dist/node_modules/js-cookie/dist/js.cookie.js +74 -0
  301. package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -0
  302. package/dist/node_modules/jwt-decode/build/esm/index.cjs +2 -0
  303. package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -0
  304. package/dist/node_modules/jwt-decode/build/esm/index.js +53 -0
  305. package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -0
  306. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +2 -0
  307. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -0
  308. package/dist/node_modules/lucide-react/dist/esm/Icon.js +36 -0
  309. package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
  310. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +2 -0
  311. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -0
  312. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +22 -0
  313. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
  314. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +2 -0
  315. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -0
  316. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +15 -0
  317. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
  318. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +2 -0
  319. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -0
  320. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +7 -0
  321. package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
  322. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +2 -0
  323. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -0
  324. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +7 -0
  325. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
  326. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +2 -0
  327. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -0
  328. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +7 -0
  329. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
  330. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +2 -0
  331. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -0
  332. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +11 -0
  333. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -0
  334. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +2 -0
  335. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -0
  336. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +19 -0
  337. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
  338. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -0
  339. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
  340. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
  341. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
  342. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +5 -0
  343. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
  344. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
  345. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
  346. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -0
  347. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
  348. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
  349. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
  350. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +2 -0
  351. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
  352. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
  353. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
  354. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +2 -0
  355. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
  356. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +69 -0
  357. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
  358. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +2 -0
  359. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
  360. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
  361. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
  362. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +2 -0
  363. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
  364. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
  365. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
  366. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +39 -0
  367. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -0
  368. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
  369. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
  370. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +2 -0
  371. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -0
  372. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
  373. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
  374. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +2 -0
  375. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -0
  376. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
  377. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
  378. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +2 -0
  379. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -0
  380. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
  381. package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
  382. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +2 -0
  383. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -0
  384. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
  385. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
  386. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +2 -0
  387. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -0
  388. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
  389. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
  390. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +2 -0
  391. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -0
  392. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2766 -0
  393. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  394. package/dist/node_modules/tailwindcss/dist/plugin.cjs +2 -0
  395. package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -0
  396. package/dist/node_modules/tailwindcss/dist/plugin.js +14 -0
  397. package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -0
  398. package/dist/node_modules/tslib/tslib.es6.cjs +2 -0
  399. package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -0
  400. package/dist/node_modules/tslib/tslib.es6.js +28 -0
  401. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  402. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +2 -0
  403. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -0
  404. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
  405. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
  406. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +2 -0
  407. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -0
  408. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
  409. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
  410. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +2 -0
  411. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -0
  412. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
  413. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
  414. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +2 -0
  415. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -0
  416. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
  417. package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
  418. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +2 -0
  419. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -0
  420. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
  421. package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
  422. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +2 -0
  423. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
  424. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +59 -0
  425. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
  426. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +2 -0
  427. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -0
  428. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +47 -0
  429. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
  430. package/dist/node_modules/use-sync-external-store/shim/index.cjs +2 -0
  431. package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
  432. package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
  433. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
  434. package/dist/providers/auth/auth.context.cjs +2 -0
  435. package/dist/providers/auth/auth.context.cjs.map +1 -0
  436. package/dist/providers/auth/auth.context.d.ts +3 -0
  437. package/dist/providers/auth/auth.context.d.ts.map +1 -0
  438. package/dist/providers/auth/auth.context.js +6 -0
  439. package/dist/providers/auth/auth.context.js.map +1 -0
  440. package/dist/providers/auth/auth.hook.cjs +2 -0
  441. package/dist/providers/auth/auth.hook.cjs.map +1 -0
  442. package/dist/providers/auth/auth.hook.d.ts +7 -0
  443. package/dist/providers/auth/auth.hook.d.ts.map +1 -0
  444. package/dist/providers/auth/auth.hook.js +12 -0
  445. package/dist/providers/auth/auth.hook.js.map +1 -0
  446. package/dist/providers/auth/auth.provider.cjs +2 -0
  447. package/dist/providers/auth/auth.provider.cjs.map +1 -0
  448. package/dist/providers/auth/auth.provider.d.ts +7 -0
  449. package/dist/providers/auth/auth.provider.d.ts.map +1 -0
  450. package/dist/providers/auth/auth.provider.js +29 -0
  451. package/dist/providers/auth/auth.provider.js.map +1 -0
  452. package/dist/providers/blimu/blimu.context.cjs +2 -0
  453. package/dist/providers/blimu/blimu.context.cjs.map +1 -0
  454. package/dist/providers/blimu/blimu.context.d.ts +27 -0
  455. package/dist/providers/blimu/blimu.context.d.ts.map +1 -0
  456. package/dist/providers/blimu/blimu.context.js +6 -0
  457. package/dist/providers/blimu/blimu.context.js.map +1 -0
  458. package/dist/providers/blimu/blimu.hook.cjs +2 -0
  459. package/dist/providers/blimu/blimu.hook.cjs.map +1 -0
  460. package/dist/providers/blimu/blimu.hook.d.ts +19 -0
  461. package/dist/providers/blimu/blimu.hook.d.ts.map +1 -0
  462. package/dist/providers/blimu/blimu.hook.js +12 -0
  463. package/dist/providers/blimu/blimu.hook.js.map +1 -0
  464. package/dist/providers/blimu/blimu.provider.cjs +2 -0
  465. package/dist/providers/blimu/blimu.provider.cjs.map +1 -0
  466. package/dist/providers/blimu/blimu.provider.d.ts +47 -0
  467. package/dist/providers/blimu/blimu.provider.d.ts.map +1 -0
  468. package/dist/providers/blimu/blimu.provider.js +67 -0
  469. package/dist/providers/blimu/blimu.provider.js.map +1 -0
  470. package/dist/providers/index.d.ts +7 -0
  471. package/dist/providers/index.d.ts.map +1 -0
  472. package/dist/providers/theme/index.d.ts +4 -0
  473. package/dist/providers/theme/index.d.ts.map +1 -0
  474. package/dist/providers/theme/theme.context.cjs +2 -0
  475. package/dist/providers/theme/theme.context.cjs.map +1 -0
  476. package/dist/providers/theme/theme.context.d.ts +8 -0
  477. package/dist/providers/theme/theme.context.d.ts.map +1 -0
  478. package/dist/providers/theme/theme.context.js +6 -0
  479. package/dist/providers/theme/theme.context.js.map +1 -0
  480. package/dist/providers/theme/theme.hook.cjs +2 -0
  481. package/dist/providers/theme/theme.hook.cjs.map +1 -0
  482. package/dist/providers/theme/theme.hook.d.ts +18 -0
  483. package/dist/providers/theme/theme.hook.d.ts.map +1 -0
  484. package/dist/providers/theme/theme.hook.js +12 -0
  485. package/dist/providers/theme/theme.hook.js.map +1 -0
  486. package/dist/providers/theme/theme.provider.cjs +2 -0
  487. package/dist/providers/theme/theme.provider.cjs.map +1 -0
  488. package/dist/providers/theme/theme.provider.d.ts +28 -0
  489. package/dist/providers/theme/theme.provider.d.ts.map +1 -0
  490. package/dist/providers/theme/theme.provider.js +68 -0
  491. package/dist/providers/theme/theme.provider.js.map +1 -0
  492. package/dist/providers.cjs +2 -0
  493. package/dist/providers.cjs.map +1 -0
  494. package/dist/providers.js +13 -0
  495. package/dist/providers.js.map +1 -0
  496. package/dist/styles/styles.css +1351 -0
  497. package/dist/styles/tw-styles.css +120 -0
  498. package/dist/tailwind.plugin.cjs +2 -0
  499. package/dist/tailwind.plugin.cjs.map +1 -0
  500. package/dist/tailwind.plugin.d.ts +19 -0
  501. package/dist/tailwind.plugin.d.ts.map +1 -0
  502. package/dist/tailwind.plugin.js +200 -0
  503. package/dist/tailwind.plugin.js.map +1 -0
  504. package/dist/types/index.cjs +2 -0
  505. package/dist/types/index.cjs.map +1 -0
  506. package/dist/types/index.d.ts +128 -0
  507. package/dist/types/index.d.ts.map +1 -0
  508. package/dist/types/index.js +12 -0
  509. package/dist/types/index.js.map +1 -0
  510. package/dist/utils/publishable-key.cjs +2 -0
  511. package/dist/utils/publishable-key.cjs.map +1 -0
  512. package/dist/utils/publishable-key.d.ts +38 -0
  513. package/dist/utils/publishable-key.d.ts.map +1 -0
  514. package/dist/utils/publishable-key.js +38 -0
  515. package/dist/utils/publishable-key.js.map +1 -0
  516. package/package.json +128 -0
@@ -0,0 +1,27 @@
1
+ import type { BlimuRuntimeClientWrapper } from '../../client/runtime-client';
2
+ import type { AuthState, BlimuConfig } from '../../types';
3
+ import type { Theme } from '../theme/theme.context';
4
+ export interface AppearanceConfig {
5
+ /**
6
+ * Base theme (light, dark, or system)
7
+ * @default "system"
8
+ */
9
+ baseTheme?: Theme;
10
+ /**
11
+ * CSS variable overrides
12
+ */
13
+ variables?: Record<string, string>;
14
+ /**
15
+ * Whether to inherit theme from parent app (e.g., next-themes)
16
+ * @default true
17
+ */
18
+ inheritTheme?: boolean;
19
+ }
20
+ export interface BlimuContextValue {
21
+ client: BlimuRuntimeClientWrapper;
22
+ config: BlimuConfig;
23
+ state: AuthState;
24
+ appearance?: AppearanceConfig;
25
+ }
26
+ export declare const BlimuContext: import("react").Context<BlimuContextValue | null>;
27
+ //# sourceMappingURL=blimu.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blimu.context.d.ts","sourceRoot":"","sources":["../../../src/providers/blimu/blimu.context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { createContext as t } from "react";
2
+ const e = t(null);
3
+ export {
4
+ e as BlimuContext
5
+ };
6
+ //# sourceMappingURL=blimu.context.js.map
@@ -0,0 +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":["BlimuContext","createContext"],"mappings":";AA8BO,MAAMA,IAAeC,EAAwC,IAAI;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),u=require("./blimu.context.cjs");function i(){const e=t.useContext(u.BlimuContext);if(!e)throw new Error("useBlimu must be used within a BlimuProvider");return e}exports.useBlimu=i;
2
+ //# sourceMappingURL=blimu.hook.cjs.map
@@ -0,0 +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":["useBlimu","context","useContext","BlimuContext"],"mappings":"0IAqBO,SAASA,GAAW,CACzB,MAAMC,EAAUC,EAAAA,WAAWC,cAAY,EACvC,GAAI,CAACF,EACH,MAAM,IAAI,MAAM,8CAA8C,EAEhE,OAAOA,CACT"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Hook for accessing Blimu client and configuration
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * function MyComponent() {
7
+ * const { client, config } = useBlimu();
8
+ *
9
+ * // Use client to make API calls
10
+ * const handleAction = async () => {
11
+ * const result = await client.getClient().someMethod();
12
+ * };
13
+ *
14
+ * return <div>Publishable Key: {config.publishableKey}</div>;
15
+ * }
16
+ * ```
17
+ */
18
+ export declare function useBlimu(): import("./blimu.context").BlimuContextValue;
19
+ //# sourceMappingURL=blimu.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blimu.hook.d.ts","sourceRoot":"","sources":["../../../src/providers/blimu/blimu.hook.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,gDAMvB"}
@@ -0,0 +1,12 @@
1
+ import { useContext as o } from "react";
2
+ import { BlimuContext as r } from "./blimu.context.js";
3
+ function u() {
4
+ const t = o(r);
5
+ if (!t)
6
+ throw new Error("useBlimu must be used within a BlimuProvider");
7
+ return t;
8
+ }
9
+ export {
10
+ u as useBlimu
11
+ };
12
+ //# sourceMappingURL=blimu.hook.js.map
@@ -0,0 +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":["useBlimu","context","useContext","BlimuContext"],"mappings":";;AAqBO,SAASA,IAAW;AACzB,QAAMC,IAAUC,EAAWC,CAAY;AACvC,MAAI,CAACF;AACH,UAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAOA;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("react"),s=require("../../client/runtime-client.cjs"),m=require("../../hooks/use-store.cjs"),l=require("../auth/auth.provider.cjs"),a=require("./blimu.context.cjs");function b(r){if(!r)return{};const e={};if(r.colors){const o={background:"--blimu-background",foreground:"--blimu-foreground",card:"--blimu-card",cardForeground:"--blimu-card-foreground",popover:"--blimu-popover",popoverForeground:"--blimu-popover-foreground",primary:"--blimu-primary",primaryForeground:"--blimu-primary-foreground",secondary:"--blimu-secondary",secondaryForeground:"--blimu-secondary-foreground",muted:"--blimu-muted",mutedForeground:"--blimu-muted-foreground",accent:"--blimu-accent",accentForeground:"--blimu-accent-foreground",destructive:"--blimu-destructive",destructiveForeground:"--blimu-destructive-foreground",border:"--blimu-border",input:"--blimu-input",ring:"--blimu-ring"};Object.entries(r.colors).forEach(([u,i])=>{if(i){const n=o[u];n&&(e[n]=i)}})}if(r.radius){const o={none:"0",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem",full:"9999px"};e["--blimu-radius"]=o[r.radius]??r.radius}return e}function g({publishableKey:r,children:e,theme:o}){const u=d.useMemo(()=>new s.BlimuRuntimeClientWrapper({publishableKey:r}),[r]),i=m.useStore(u.store),n=d.useMemo(()=>b(o),[o]),c={client:u,state:i,config:{publishableKey:r,redirectUri:window.location.origin,theme:o}};return t.jsx("div",{"data-blimu":!0,style:n,children:t.jsx(a.BlimuContext.Provider,{value:c,children:t.jsx(l.AuthProvider,{children:e})})})}exports.BlimuProvider=g;
2
+ //# sourceMappingURL=blimu.provider.cjs.map
@@ -0,0 +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":["themeToStyleVars","theme","vars","colorMap","key","value","varName","radiusMap","BlimuProvider","publishableKey","children","client","useMemo","BlimuRuntimeClientWrapper","state","useStore","themeVars","jsx","BlimuContext","AuthProvider"],"mappings":"oSAiBA,SAASA,EAAiBC,EAAyC,CACjE,GAAI,CAACA,EAAO,MAAO,CAAA,EAEnB,MAAMC,EAA+B,CAAA,EAGrC,GAAID,EAAM,OAAQ,CAChB,MAAME,EAAsD,CAC1D,WAAY,qBACZ,WAAY,qBACZ,KAAM,eACN,eAAgB,0BAChB,QAAS,kBACT,kBAAmB,6BACnB,QAAS,kBACT,kBAAmB,6BACnB,UAAW,oBACX,oBAAqB,+BACrB,MAAO,gBACP,gBAAiB,2BACjB,OAAQ,iBACR,iBAAkB,4BAClB,YAAa,sBACb,sBAAuB,iCACvB,OAAQ,iBACR,MAAO,gBACP,KAAM,cAAA,EAGR,OAAO,QAAQF,EAAM,MAAM,EAAE,QAAQ,CAAC,CAACG,EAAKC,CAAK,IAAM,CACrD,GAAIA,EAAO,CACT,MAAMC,EAAUH,EAASC,CAAgC,EACrDE,IACFJ,EAAKI,CAAO,EAAID,EAEpB,CACF,CAAC,CACH,CAGA,GAAIJ,EAAM,OAAQ,CAChB,MAAMM,EAA+C,CACnD,KAAM,IACN,GAAI,UACJ,GAAI,SACJ,GAAI,UACJ,GAAI,OACJ,KAAM,QAAA,EAGRL,EAAK,gBAAgB,EAAIK,EAAUN,EAAM,MAA2B,GAAKA,EAAM,MACjF,CAEA,OAAOC,CACT,CAuCO,SAASM,EAAc,CAAE,eAAAC,EAAgB,SAAAC,EAAU,MAAAT,GAA6B,CACrF,MAAMU,EAASC,EAAAA,QAAQ,IAAM,IAAIC,EAAAA,0BAA0B,CAAE,eAAAJ,CAAA,CAAgB,EAAG,CAACA,CAAc,CAAC,EAC1FK,EAAQC,EAAAA,SAASJ,EAAO,KAAK,EAC7BK,EAAYJ,EAAAA,QAAQ,IAAMZ,EAAiBC,CAAK,EAAG,CAACA,CAAK,CAAC,EAE1DI,EAAQ,CACZ,OAAAM,EACA,MAAAG,EACA,OAAQ,CACN,eAAAL,EACA,YAAa,OAAO,SAAS,OAC7B,MAAAR,CAAA,CACF,EAGF,OACEgB,EAAAA,IAAC,MAAA,CAAI,aAAU,GAAC,MAAOD,EACrB,SAAAC,MAACC,EAAAA,aAAa,SAAb,CAAsB,MAAAb,EACrB,SAAAY,EAAAA,IAACE,EAAAA,aAAA,CAAc,SAAAT,CAAA,CAAS,EAC1B,EACF,CAEJ"}
@@ -0,0 +1,47 @@
1
+ import React from 'react';
2
+ import type { BlimuTheme } from '../../types';
3
+ interface BlimuProviderProps {
4
+ publishableKey: string;
5
+ children: React.ReactNode;
6
+ theme?: BlimuTheme;
7
+ }
8
+ /**
9
+ * Provider component that initializes Blimu SDK and wraps the application
10
+ *
11
+ * This provider must be at the root of your application to enable authentication
12
+ * and authorization features.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * function App() {
17
+ * return (
18
+ * <BlimuProvider publishableKey="pk_...">
19
+ * <YourApp />
20
+ * </BlimuProvider>
21
+ * );
22
+ * }
23
+ * ```
24
+ *
25
+ * @example With theme customization
26
+ * ```tsx
27
+ * function App() {
28
+ * return (
29
+ * <BlimuProvider
30
+ * publishableKey="pk_..."
31
+ * theme={{
32
+ * colors: {
33
+ * primary: 'oklch(0.5 0.2 250)',
34
+ * background: '#ffffff',
35
+ * },
36
+ * radius: 'lg',
37
+ * }}
38
+ * >
39
+ * <YourApp />
40
+ * </BlimuProvider>
41
+ * );
42
+ * }
43
+ * ```
44
+ */
45
+ export declare function BlimuProvider({ publishableKey, children, theme }: BlimuProviderProps): React.JSX.Element;
46
+ export {};
47
+ //# sourceMappingURL=blimu.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blimu.provider.d.ts","sourceRoot":"","sources":["../../../src/providers/blimu/blimu.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,aAAa,CAAC;AAIjE,UAAU,kBAAkB;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AA6DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,aAAa,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB,qBAsBpF"}
@@ -0,0 +1,67 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useMemo as t } from "react";
3
+ import { BlimuRuntimeClientWrapper as c } from "../../client/runtime-client.js";
4
+ import { useStore as a } from "../../hooks/use-store.js";
5
+ import { AuthProvider as l } from "../auth/auth.provider.js";
6
+ import { BlimuContext as s } from "./blimu.context.js";
7
+ function f(r) {
8
+ if (!r) return {};
9
+ const i = {};
10
+ if (r.colors) {
11
+ const o = {
12
+ background: "--blimu-background",
13
+ foreground: "--blimu-foreground",
14
+ card: "--blimu-card",
15
+ cardForeground: "--blimu-card-foreground",
16
+ popover: "--blimu-popover",
17
+ popoverForeground: "--blimu-popover-foreground",
18
+ primary: "--blimu-primary",
19
+ primaryForeground: "--blimu-primary-foreground",
20
+ secondary: "--blimu-secondary",
21
+ secondaryForeground: "--blimu-secondary-foreground",
22
+ muted: "--blimu-muted",
23
+ mutedForeground: "--blimu-muted-foreground",
24
+ accent: "--blimu-accent",
25
+ accentForeground: "--blimu-accent-foreground",
26
+ destructive: "--blimu-destructive",
27
+ destructiveForeground: "--blimu-destructive-foreground",
28
+ border: "--blimu-border",
29
+ input: "--blimu-input",
30
+ ring: "--blimu-ring"
31
+ };
32
+ Object.entries(r.colors).forEach(([u, e]) => {
33
+ if (e) {
34
+ const n = o[u];
35
+ n && (i[n] = e);
36
+ }
37
+ });
38
+ }
39
+ if (r.radius) {
40
+ const o = {
41
+ none: "0",
42
+ sm: "0.25rem",
43
+ md: "0.5rem",
44
+ lg: "0.75rem",
45
+ xl: "1rem",
46
+ full: "9999px"
47
+ };
48
+ i["--blimu-radius"] = o[r.radius] ?? r.radius;
49
+ }
50
+ return i;
51
+ }
52
+ function x({ publishableKey: r, children: i, theme: o }) {
53
+ const u = t(() => new c({ publishableKey: r }), [r]), e = a(u.store), n = t(() => f(o), [o]), m = {
54
+ client: u,
55
+ state: e,
56
+ config: {
57
+ publishableKey: r,
58
+ redirectUri: window.location.origin,
59
+ theme: o
60
+ }
61
+ };
62
+ return /* @__PURE__ */ d("div", { "data-blimu": !0, style: n, children: /* @__PURE__ */ d(s.Provider, { value: m, children: /* @__PURE__ */ d(l, { children: i }) }) });
63
+ }
64
+ export {
65
+ x as BlimuProvider
66
+ };
67
+ //# sourceMappingURL=blimu.provider.js.map
@@ -0,0 +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":["themeToStyleVars","theme","vars","colorMap","key","value","varName","radiusMap","BlimuProvider","publishableKey","children","client","useMemo","BlimuRuntimeClientWrapper","state","useStore","themeVars","jsx","BlimuContext","AuthProvider"],"mappings":";;;;;;AAiBA,SAASA,EAAiBC,GAAyC;AACjE,MAAI,CAACA,EAAO,QAAO,CAAA;AAEnB,QAAMC,IAA+B,CAAA;AAGrC,MAAID,EAAM,QAAQ;AAChB,UAAME,IAAsD;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,QAAQF,EAAM,MAAM,EAAE,QAAQ,CAAC,CAACG,GAAKC,CAAK,MAAM;AACrD,UAAIA,GAAO;AACT,cAAMC,IAAUH,EAASC,CAAgC;AACzD,QAAIE,MACFJ,EAAKI,CAAO,IAAID;AAAA,MAEpB;AAAA,IACF,CAAC;AAAA,EACH;AAGA,MAAIJ,EAAM,QAAQ;AAChB,UAAMM,IAA+C;AAAA,MACnD,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA;AAGR,IAAAL,EAAK,gBAAgB,IAAIK,EAAUN,EAAM,MAA2B,KAAKA,EAAM;AAAA,EACjF;AAEA,SAAOC;AACT;AAuCO,SAASM,EAAc,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,OAAAT,KAA6B;AACrF,QAAMU,IAASC,EAAQ,MAAM,IAAIC,EAA0B,EAAE,gBAAAJ,EAAA,CAAgB,GAAG,CAACA,CAAc,CAAC,GAC1FK,IAAQC,EAASJ,EAAO,KAAK,GAC7BK,IAAYJ,EAAQ,MAAMZ,EAAiBC,CAAK,GAAG,CAACA,CAAK,CAAC,GAE1DI,IAAQ;AAAA,IACZ,QAAAM;AAAA,IACA,OAAAG;AAAA,IACA,QAAQ;AAAA,MACN,gBAAAL;AAAA,MACA,aAAa,OAAO,SAAS;AAAA,MAC7B,OAAAR;AAAA,IAAA;AAAA,EACF;AAGF,SACE,gBAAAgB,EAAC,OAAA,EAAI,cAAU,IAAC,OAAOD,GACrB,UAAA,gBAAAC,EAACC,EAAa,UAAb,EAAsB,OAAAb,GACrB,UAAA,gBAAAY,EAACE,GAAA,EAAc,UAAAT,EAAA,CAAS,GAC1B,GACF;AAEJ;"}
@@ -0,0 +1,7 @@
1
+ export { useBlimu } from './blimu/blimu.hook';
2
+ export { BlimuProvider } from './blimu/blimu.provider';
3
+ export { AuthProvider } from './auth/auth.provider';
4
+ export { ThemeProvider, useTheme } from './theme';
5
+ export type { Theme, ThemeContextValue } from './theme';
6
+ export type { AppearanceConfig } from './blimu/blimu.context';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ThemeProvider } from './theme.provider';
2
+ export { useTheme } from './theme.hook';
3
+ export type { Theme, ThemeContextValue } from './theme.context';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(null);exports.ThemeContext=t;
2
+ //# sourceMappingURL=theme.context.cjs.map
@@ -0,0 +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":["ThemeContext","createContext"],"mappings":"yGAUaA,EAAeC,EAAAA,cAAwC,IAAI"}
@@ -0,0 +1,8 @@
1
+ export type Theme = 'light' | 'dark' | 'system';
2
+ export interface ThemeContextValue {
3
+ theme: Theme;
4
+ setTheme: (theme: Theme) => void;
5
+ resolvedTheme: 'light' | 'dark';
6
+ }
7
+ export declare const ThemeContext: import("react").Context<ThemeContextValue | null>;
8
+ //# sourceMappingURL=theme.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.context.d.ts","sourceRoot":"","sources":["../../../src/providers/theme/theme.context.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEhD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;CACjC;AAED,eAAO,MAAM,YAAY,mDAAgD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { createContext as t } from "react";
2
+ const o = t(null);
3
+ export {
4
+ o as ThemeContext
5
+ };
6
+ //# sourceMappingURL=theme.context.js.map
@@ -0,0 +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":["ThemeContext","createContext"],"mappings":";AAUO,MAAMA,IAAeC,EAAwC,IAAI;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),r=require("./theme.context.cjs");function o(){const e=t.useContext(r.ThemeContext);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}exports.useTheme=o;
2
+ //# sourceMappingURL=theme.hook.cjs.map
@@ -0,0 +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":["useTheme","context","useContext","ThemeContext"],"mappings":"0IAoBO,SAASA,GAAW,CACzB,MAAMC,EAAUC,EAAAA,WAAWC,cAAY,EACvC,GAAI,CAACF,EACH,MAAM,IAAI,MAAM,8CAA8C,EAEhE,OAAOA,CACT"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Hook for accessing and controlling the theme
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * function ThemeToggle() {
7
+ * const { theme, setTheme, resolvedTheme } = useTheme();
8
+ *
9
+ * return (
10
+ * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>
11
+ * Current theme: {resolvedTheme}
12
+ * </button>
13
+ * );
14
+ * }
15
+ * ```
16
+ */
17
+ export declare function useTheme(): import("./theme.context").ThemeContextValue;
18
+ //# sourceMappingURL=theme.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.hook.d.ts","sourceRoot":"","sources":["../../../src/providers/theme/theme.hook.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,gDAMvB"}
@@ -0,0 +1,12 @@
1
+ import { useContext as t } from "react";
2
+ import { ThemeContext as o } from "./theme.context.js";
3
+ function n() {
4
+ const e = t(o);
5
+ if (!e)
6
+ throw new Error("useTheme must be used within a ThemeProvider");
7
+ return e;
8
+ }
9
+ export {
10
+ n as useTheme
11
+ };
12
+ //# sourceMappingURL=theme.hook.js.map
@@ -0,0 +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":["useTheme","context","useContext","ThemeContext"],"mappings":";;AAoBO,SAASA,IAAW;AACzB,QAAMC,IAAUC,EAAWC,CAAY;AACvC,MAAI,CAACF;AACH,UAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAOA;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),s=require("react"),v=require("./theme.context.cjs");function y({children:o,defaultTheme:m="system",storageKey:u="blimu-theme",autoDetect:f=!0}){const[e,h]=s.useState(()=>typeof window>"u"?m:localStorage.getItem(u)||m),[i,d]=s.useState(()=>typeof window>"u"?"light":E(e));s.useEffect(()=>{if(typeof window>"u")return;const t=window.document.documentElement;if(t.classList.remove("light","dark"),e==="system"){const n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";t.classList.add(n),d(n);return}t.classList.add(e),d(e)},[e]),s.useEffect(()=>{typeof window>"u"||localStorage.setItem(u,e)},[e,u]),s.useEffect(()=>{if(!f||typeof window>"u")return;const t=new MutationObserver(n=>{n.forEach(a=>{if(a.attributeName==="class"){const r=document.documentElement.classList.contains("dark"),c=document.documentElement.classList.contains("light");if(r||c){const l=r?"dark":"light";i!==l&&d(l)}}})});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[f,i]),s.useEffect(()=>{if(e!=="system"||typeof window>"u")return;const t=window.matchMedia("(prefers-color-scheme: dark)"),n=a=>{const r=window.document.documentElement;r.classList.remove("light","dark");const c=a.matches?"dark":"light";r.classList.add(c),d(c)};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[e]);const w=s.useMemo(()=>({theme:e,setTheme:h,resolvedTheme:i}),[e,i]);return g.jsx(v.ThemeContext.Provider,{value:w,children:o})}function E(o){return o==="system"?typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o}exports.ThemeProvider=y;
2
+ //# sourceMappingURL=theme.provider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.provider.cjs","sources":["../../../src/providers/theme/theme.provider.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\n\nimport type { Theme, ThemeContextValue } from './theme.context';\nimport { ThemeContext } from './theme.context';\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: Theme;\n storageKey?: string;\n /**\n * Whether to automatically detect and sync with parent app's theme\n * @default true\n */\n autoDetect?: boolean;\n}\n\n/**\n * ThemeProvider component that manages theme state and syncs with system preferences\n *\n * Supports automatic detection of parent app's theme (e.g., next-themes) via\n * MutationObserver watching for class changes on the document element.\n *\n * @example\n * ```tsx\n * <ThemeProvider defaultTheme=\"system\" storageKey=\"my-app-theme\">\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = 'system',\n storageKey = 'blimu-theme',\n autoDetect = true,\n}: ThemeProviderProps) {\n const [theme, setTheme] = useState<Theme>(() => {\n if (typeof window === 'undefined') {\n return defaultTheme;\n }\n const stored = localStorage.getItem(storageKey) as Theme | null;\n return stored || defaultTheme;\n });\n\n const [resolvedTheme, setResolvedTheme] = useState<'light' | 'dark'>(() => {\n if (typeof window === 'undefined') {\n return 'light';\n }\n return getResolvedTheme(theme);\n });\n\n // Apply theme to document\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const root = window.document.documentElement;\n root.classList.remove('light', 'dark');\n\n if (theme === 'system') {\n const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light';\n root.classList.add(systemTheme);\n setResolvedTheme(systemTheme);\n return;\n }\n\n root.classList.add(theme);\n setResolvedTheme(theme);\n }, [theme]);\n\n // Persist theme to localStorage\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n localStorage.setItem(storageKey, theme);\n }, [theme, storageKey]);\n\n // Auto-detect parent app's theme changes (e.g., next-themes)\n useEffect(() => {\n if (!autoDetect || typeof window === 'undefined') {\n return;\n }\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'class') {\n const isDark = document.documentElement.classList.contains('dark');\n const isLight = document.documentElement.classList.contains('light');\n\n // Only sync if parent app has explicitly set a theme class\n if (isDark || isLight) {\n const detectedTheme = isDark ? 'dark' : 'light';\n if (resolvedTheme !== detectedTheme) {\n setResolvedTheme(detectedTheme);\n }\n }\n }\n });\n });\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n\n return () => observer.disconnect();\n }, [autoDetect, resolvedTheme]);\n\n // Listen to system theme changes when theme is 'system'\n useEffect(() => {\n if (theme !== 'system' || typeof window === 'undefined') {\n return;\n }\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n const handleChange = (e: MediaQueryListEvent) => {\n const root = window.document.documentElement;\n root.classList.remove('light', 'dark');\n const systemTheme = e.matches ? 'dark' : 'light';\n root.classList.add(systemTheme);\n setResolvedTheme(systemTheme);\n };\n\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, [theme]);\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n theme,\n setTheme,\n resolvedTheme,\n }),\n [theme, resolvedTheme],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\n/**\n * Get the resolved theme (light or dark) from a Theme value\n */\nfunction getResolvedTheme(theme: Theme): 'light' | 'dark' {\n if (theme === 'system') {\n if (typeof window === 'undefined') {\n return 'light';\n }\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n return theme;\n}\n"],"names":["ThemeProvider","children","defaultTheme","storageKey","autoDetect","theme","setTheme","useState","resolvedTheme","setResolvedTheme","getResolvedTheme","useEffect","root","systemTheme","observer","mutations","mutation","isDark","isLight","detectedTheme","mediaQuery","handleChange","e","value","useMemo","jsx","ThemeContext"],"mappings":"yKA6BO,SAASA,EAAc,CAC5B,SAAAC,EACA,aAAAC,EAAe,SACf,WAAAC,EAAa,cACb,WAAAC,EAAa,EACf,EAAuB,CACrB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAgB,IACpC,OAAO,OAAW,IACbL,EAEM,aAAa,QAAQC,CAAU,GAC7BD,CAClB,EAEK,CAACM,EAAeC,CAAgB,EAAIF,EAAAA,SAA2B,IAC/D,OAAO,OAAW,IACb,QAEFG,EAAiBL,CAAK,CAC9B,EAGDM,EAAAA,UAAU,IAAM,CACd,GAAI,OAAO,OAAW,IACpB,OAGF,MAAMC,EAAO,OAAO,SAAS,gBAG7B,GAFAA,EAAK,UAAU,OAAO,QAAS,MAAM,EAEjCP,IAAU,SAAU,CACtB,MAAMQ,EAAc,OAAO,WAAW,8BAA8B,EAAE,QAClE,OACA,QACJD,EAAK,UAAU,IAAIC,CAAW,EAC9BJ,EAAiBI,CAAW,EAC5B,MACF,CAEAD,EAAK,UAAU,IAAIP,CAAK,EACxBI,EAAiBJ,CAAK,CACxB,EAAG,CAACA,CAAK,CAAC,EAGVM,EAAAA,UAAU,IAAM,CACV,OAAO,OAAW,KAGtB,aAAa,QAAQR,EAAYE,CAAK,CACxC,EAAG,CAACA,EAAOF,CAAU,CAAC,EAGtBQ,EAAAA,UAAU,IAAM,CACd,GAAI,CAACP,GAAc,OAAO,OAAW,IACnC,OAGF,MAAMU,EAAW,IAAI,iBAAkBC,GAAc,CACnDA,EAAU,QAASC,GAAa,CAC9B,GAAIA,EAAS,gBAAkB,QAAS,CACtC,MAAMC,EAAS,SAAS,gBAAgB,UAAU,SAAS,MAAM,EAC3DC,EAAU,SAAS,gBAAgB,UAAU,SAAS,OAAO,EAGnE,GAAID,GAAUC,EAAS,CACrB,MAAMC,EAAgBF,EAAS,OAAS,QACpCT,IAAkBW,GACpBV,EAAiBU,CAAa,CAElC,CACF,CACF,CAAC,CACH,CAAC,EAED,OAAAL,EAAS,QAAQ,SAAS,gBAAiB,CACzC,WAAY,GACZ,gBAAiB,CAAC,OAAO,CAAA,CAC1B,EAEM,IAAMA,EAAS,WAAA,CACxB,EAAG,CAACV,EAAYI,CAAa,CAAC,EAG9BG,EAAAA,UAAU,IAAM,CACd,GAAIN,IAAU,UAAY,OAAO,OAAW,IAC1C,OAGF,MAAMe,EAAa,OAAO,WAAW,8BAA8B,EAC7DC,EAAgBC,GAA2B,CAC/C,MAAMV,EAAO,OAAO,SAAS,gBAC7BA,EAAK,UAAU,OAAO,QAAS,MAAM,EACrC,MAAMC,EAAcS,EAAE,QAAU,OAAS,QACzCV,EAAK,UAAU,IAAIC,CAAW,EAC9BJ,EAAiBI,CAAW,CAC9B,EAEA,OAAAO,EAAW,iBAAiB,SAAUC,CAAY,EAC3C,IAAMD,EAAW,oBAAoB,SAAUC,CAAY,CACpE,EAAG,CAAChB,CAAK,CAAC,EAEV,MAAMkB,EAAQC,EAAAA,QACZ,KAAO,CACL,MAAAnB,EACA,SAAAC,EACA,cAAAE,CAAA,GAEF,CAACH,EAAOG,CAAa,CAAA,EAGvB,OAAOiB,EAAAA,IAACC,EAAAA,aAAa,SAAb,CAAsB,MAAAH,EAAe,SAAAtB,CAAA,CAAS,CACxD,CAKA,SAASS,EAAiBL,EAAgC,CACxD,OAAIA,IAAU,SACR,OAAO,OAAW,IACb,QAEF,OAAO,WAAW,8BAA8B,EAAE,QAAU,OAAS,QAEvEA,CACT"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { Theme } from './theme.context';
3
+ interface ThemeProviderProps {
4
+ children: React.ReactNode;
5
+ defaultTheme?: Theme;
6
+ storageKey?: string;
7
+ /**
8
+ * Whether to automatically detect and sync with parent app's theme
9
+ * @default true
10
+ */
11
+ autoDetect?: boolean;
12
+ }
13
+ /**
14
+ * ThemeProvider component that manages theme state and syncs with system preferences
15
+ *
16
+ * Supports automatic detection of parent app's theme (e.g., next-themes) via
17
+ * MutationObserver watching for class changes on the document element.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <ThemeProvider defaultTheme="system" storageKey="my-app-theme">
22
+ * <App />
23
+ * </ThemeProvider>
24
+ * ```
25
+ */
26
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, autoDetect, }: ThemeProviderProps): React.JSX.Element;
27
+ export {};
28
+ //# sourceMappingURL=theme.provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.provider.d.ts","sourceRoot":"","sources":["../../../src/providers/theme/theme.provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAqB,MAAM,iBAAiB,CAAC;AAGhE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAuB,EACvB,UAA0B,EAC1B,UAAiB,GAClB,EAAE,kBAAkB,qBA0GpB"}
@@ -0,0 +1,68 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as c, useMemo as v } from "react";
3
+ import { ThemeContext as y } from "./theme.context.js";
4
+ function b({
5
+ children: o,
6
+ defaultTheme: u = "system",
7
+ storageKey: m = "blimu-theme",
8
+ autoDetect: f = !0
9
+ }) {
10
+ const [e, w] = h(() => typeof window > "u" ? u : localStorage.getItem(m) || u), [s, i] = h(() => typeof window > "u" ? "light" : k(e));
11
+ c(() => {
12
+ if (typeof window > "u")
13
+ return;
14
+ const t = window.document.documentElement;
15
+ if (t.classList.remove("light", "dark"), e === "system") {
16
+ const n = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
17
+ t.classList.add(n), i(n);
18
+ return;
19
+ }
20
+ t.classList.add(e), i(e);
21
+ }, [e]), c(() => {
22
+ typeof window > "u" || localStorage.setItem(m, e);
23
+ }, [e, m]), c(() => {
24
+ if (!f || typeof window > "u")
25
+ return;
26
+ const t = new MutationObserver((n) => {
27
+ n.forEach((a) => {
28
+ if (a.attributeName === "class") {
29
+ const r = document.documentElement.classList.contains("dark"), d = document.documentElement.classList.contains("light");
30
+ if (r || d) {
31
+ const l = r ? "dark" : "light";
32
+ s !== l && i(l);
33
+ }
34
+ }
35
+ });
36
+ });
37
+ return t.observe(document.documentElement, {
38
+ attributes: !0,
39
+ attributeFilter: ["class"]
40
+ }), () => t.disconnect();
41
+ }, [f, s]), c(() => {
42
+ if (e !== "system" || typeof window > "u")
43
+ return;
44
+ const t = window.matchMedia("(prefers-color-scheme: dark)"), n = (a) => {
45
+ const r = window.document.documentElement;
46
+ r.classList.remove("light", "dark");
47
+ const d = a.matches ? "dark" : "light";
48
+ r.classList.add(d), i(d);
49
+ };
50
+ return t.addEventListener("change", n), () => t.removeEventListener("change", n);
51
+ }, [e]);
52
+ const g = v(
53
+ () => ({
54
+ theme: e,
55
+ setTheme: w,
56
+ resolvedTheme: s
57
+ }),
58
+ [e, s]
59
+ );
60
+ return /* @__PURE__ */ p(y.Provider, { value: g, children: o });
61
+ }
62
+ function k(o) {
63
+ return o === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o;
64
+ }
65
+ export {
66
+ b as ThemeProvider
67
+ };
68
+ //# sourceMappingURL=theme.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.provider.js","sources":["../../../src/providers/theme/theme.provider.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\n\nimport type { Theme, ThemeContextValue } from './theme.context';\nimport { ThemeContext } from './theme.context';\n\ninterface ThemeProviderProps {\n children: React.ReactNode;\n defaultTheme?: Theme;\n storageKey?: string;\n /**\n * Whether to automatically detect and sync with parent app's theme\n * @default true\n */\n autoDetect?: boolean;\n}\n\n/**\n * ThemeProvider component that manages theme state and syncs with system preferences\n *\n * Supports automatic detection of parent app's theme (e.g., next-themes) via\n * MutationObserver watching for class changes on the document element.\n *\n * @example\n * ```tsx\n * <ThemeProvider defaultTheme=\"system\" storageKey=\"my-app-theme\">\n * <App />\n * </ThemeProvider>\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = 'system',\n storageKey = 'blimu-theme',\n autoDetect = true,\n}: ThemeProviderProps) {\n const [theme, setTheme] = useState<Theme>(() => {\n if (typeof window === 'undefined') {\n return defaultTheme;\n }\n const stored = localStorage.getItem(storageKey) as Theme | null;\n return stored || defaultTheme;\n });\n\n const [resolvedTheme, setResolvedTheme] = useState<'light' | 'dark'>(() => {\n if (typeof window === 'undefined') {\n return 'light';\n }\n return getResolvedTheme(theme);\n });\n\n // Apply theme to document\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const root = window.document.documentElement;\n root.classList.remove('light', 'dark');\n\n if (theme === 'system') {\n const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light';\n root.classList.add(systemTheme);\n setResolvedTheme(systemTheme);\n return;\n }\n\n root.classList.add(theme);\n setResolvedTheme(theme);\n }, [theme]);\n\n // Persist theme to localStorage\n useEffect(() => {\n if (typeof window === 'undefined') {\n return;\n }\n localStorage.setItem(storageKey, theme);\n }, [theme, storageKey]);\n\n // Auto-detect parent app's theme changes (e.g., next-themes)\n useEffect(() => {\n if (!autoDetect || typeof window === 'undefined') {\n return;\n }\n\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.attributeName === 'class') {\n const isDark = document.documentElement.classList.contains('dark');\n const isLight = document.documentElement.classList.contains('light');\n\n // Only sync if parent app has explicitly set a theme class\n if (isDark || isLight) {\n const detectedTheme = isDark ? 'dark' : 'light';\n if (resolvedTheme !== detectedTheme) {\n setResolvedTheme(detectedTheme);\n }\n }\n }\n });\n });\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n\n return () => observer.disconnect();\n }, [autoDetect, resolvedTheme]);\n\n // Listen to system theme changes when theme is 'system'\n useEffect(() => {\n if (theme !== 'system' || typeof window === 'undefined') {\n return;\n }\n\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n const handleChange = (e: MediaQueryListEvent) => {\n const root = window.document.documentElement;\n root.classList.remove('light', 'dark');\n const systemTheme = e.matches ? 'dark' : 'light';\n root.classList.add(systemTheme);\n setResolvedTheme(systemTheme);\n };\n\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, [theme]);\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n theme,\n setTheme,\n resolvedTheme,\n }),\n [theme, resolvedTheme],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\n/**\n * Get the resolved theme (light or dark) from a Theme value\n */\nfunction getResolvedTheme(theme: Theme): 'light' | 'dark' {\n if (theme === 'system') {\n if (typeof window === 'undefined') {\n return 'light';\n }\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n return theme;\n}\n"],"names":["ThemeProvider","children","defaultTheme","storageKey","autoDetect","theme","setTheme","useState","resolvedTheme","setResolvedTheme","getResolvedTheme","useEffect","root","systemTheme","observer","mutations","mutation","isDark","isLight","detectedTheme","mediaQuery","handleChange","e","value","useMemo","jsx","ThemeContext"],"mappings":";;;AA6BO,SAASA,EAAc;AAAA,EAC5B,UAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AACf,GAAuB;AACrB,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAgB,MACpC,OAAO,SAAW,MACbL,IAEM,aAAa,QAAQC,CAAU,KAC7BD,CAClB,GAEK,CAACM,GAAeC,CAAgB,IAAIF,EAA2B,MAC/D,OAAO,SAAW,MACb,UAEFG,EAAiBL,CAAK,CAC9B;AAGD,EAAAM,EAAU,MAAM;AACd,QAAI,OAAO,SAAW;AACpB;AAGF,UAAMC,IAAO,OAAO,SAAS;AAG7B,QAFAA,EAAK,UAAU,OAAO,SAAS,MAAM,GAEjCP,MAAU,UAAU;AACtB,YAAMQ,IAAc,OAAO,WAAW,8BAA8B,EAAE,UAClE,SACA;AACJ,MAAAD,EAAK,UAAU,IAAIC,CAAW,GAC9BJ,EAAiBI,CAAW;AAC5B;AAAA,IACF;AAEA,IAAAD,EAAK,UAAU,IAAIP,CAAK,GACxBI,EAAiBJ,CAAK;AAAA,EACxB,GAAG,CAACA,CAAK,CAAC,GAGVM,EAAU,MAAM;AACd,IAAI,OAAO,SAAW,OAGtB,aAAa,QAAQR,GAAYE,CAAK;AAAA,EACxC,GAAG,CAACA,GAAOF,CAAU,CAAC,GAGtBQ,EAAU,MAAM;AACd,QAAI,CAACP,KAAc,OAAO,SAAW;AACnC;AAGF,UAAMU,IAAW,IAAI,iBAAiB,CAACC,MAAc;AACnD,MAAAA,EAAU,QAAQ,CAACC,MAAa;AAC9B,YAAIA,EAAS,kBAAkB,SAAS;AACtC,gBAAMC,IAAS,SAAS,gBAAgB,UAAU,SAAS,MAAM,GAC3DC,IAAU,SAAS,gBAAgB,UAAU,SAAS,OAAO;AAGnE,cAAID,KAAUC,GAAS;AACrB,kBAAMC,IAAgBF,IAAS,SAAS;AACxC,YAAIT,MAAkBW,KACpBV,EAAiBU,CAAa;AAAA,UAElC;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAED,WAAAL,EAAS,QAAQ,SAAS,iBAAiB;AAAA,MACzC,YAAY;AAAA,MACZ,iBAAiB,CAAC,OAAO;AAAA,IAAA,CAC1B,GAEM,MAAMA,EAAS,WAAA;AAAA,EACxB,GAAG,CAACV,GAAYI,CAAa,CAAC,GAG9BG,EAAU,MAAM;AACd,QAAIN,MAAU,YAAY,OAAO,SAAW;AAC1C;AAGF,UAAMe,IAAa,OAAO,WAAW,8BAA8B,GAC7DC,IAAe,CAACC,MAA2B;AAC/C,YAAMV,IAAO,OAAO,SAAS;AAC7B,MAAAA,EAAK,UAAU,OAAO,SAAS,MAAM;AACrC,YAAMC,IAAcS,EAAE,UAAU,SAAS;AACzC,MAAAV,EAAK,UAAU,IAAIC,CAAW,GAC9BJ,EAAiBI,CAAW;AAAA,IAC9B;AAEA,WAAAO,EAAW,iBAAiB,UAAUC,CAAY,GAC3C,MAAMD,EAAW,oBAAoB,UAAUC,CAAY;AAAA,EACpE,GAAG,CAAChB,CAAK,CAAC;AAEV,QAAMkB,IAAQC;AAAA,IACZ,OAAO;AAAA,MACL,OAAAnB;AAAA,MACA,UAAAC;AAAA,MACA,eAAAE;AAAA,IAAA;AAAA,IAEF,CAACH,GAAOG,CAAa;AAAA,EAAA;AAGvB,SAAO,gBAAAiB,EAACC,EAAa,UAAb,EAAsB,OAAAH,GAAe,UAAAtB,EAAA,CAAS;AACxD;AAKA,SAASS,EAAiBL,GAAgC;AACxD,SAAIA,MAAU,WACR,OAAO,SAAW,MACb,UAEF,OAAO,WAAW,8BAA8B,EAAE,UAAU,SAAS,UAEvEA;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./providers/blimu/blimu.hook.cjs"),r=require("./providers/blimu/blimu.provider.cjs"),i=require("./providers/auth/auth.provider.cjs"),o=require("./providers/theme/theme.provider.cjs"),u=require("./providers/theme/theme.hook.cjs");exports.useBlimu=e.useBlimu;exports.BlimuProvider=r.BlimuProvider;exports.AuthProvider=i.AuthProvider;exports.ThemeProvider=o.ThemeProvider;exports.useTheme=u.useTheme;
2
+ //# sourceMappingURL=providers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ import { useBlimu as o } from "./providers/blimu/blimu.hook.js";
2
+ import { BlimuProvider as t } from "./providers/blimu/blimu.provider.js";
3
+ import { AuthProvider as i } from "./providers/auth/auth.provider.js";
4
+ import { ThemeProvider as u } from "./providers/theme/theme.provider.js";
5
+ import { useTheme as d } from "./providers/theme/theme.hook.js";
6
+ export {
7
+ i as AuthProvider,
8
+ t as BlimuProvider,
9
+ u as ThemeProvider,
10
+ o as useBlimu,
11
+ d as useTheme
12
+ };
13
+ //# sourceMappingURL=providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}