@blimu/react 1.1.0 → 1.1.4

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 (489) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/index.cjs +5 -1
  3. package/dist/_virtual/index.cjs.map +1 -1
  4. package/dist/_virtual/index.js +3 -3
  5. package/dist/_virtual/index2.cjs +4 -1
  6. package/dist/_virtual/index2.cjs.map +1 -1
  7. package/dist/_virtual/index2.js +2 -2
  8. package/dist/_virtual/use-sync-external-store-shim.development.cjs +4 -1
  9. package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -1
  10. package/dist/_virtual/use-sync-external-store-shim.development.js +2 -2
  11. package/dist/_virtual/use-sync-external-store-shim.production.cjs +4 -1
  12. package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -1
  13. package/dist/_virtual/use-sync-external-store-shim.production.js +2 -2
  14. package/dist/client/auth.service.cjs +248 -1
  15. package/dist/client/auth.service.cjs.map +1 -1
  16. package/dist/client/auth.service.d.ts.map +1 -1
  17. package/dist/client/auth.service.js +193 -96
  18. package/dist/client/auth.service.js.map +1 -1
  19. package/dist/client/external-store.cjs +26 -1
  20. package/dist/client/external-store.cjs.map +1 -1
  21. package/dist/client/external-store.js +22 -8
  22. package/dist/client/external-store.js.map +1 -1
  23. package/dist/client/runtime-client.cjs +136 -1
  24. package/dist/client/runtime-client.cjs.map +1 -1
  25. package/dist/client/runtime-client.d.ts +1 -1
  26. package/dist/client/runtime-client.d.ts.map +1 -1
  27. package/dist/client/runtime-client.js +85 -51
  28. package/dist/client/runtime-client.js.map +1 -1
  29. package/dist/components/index.cjs +13 -0
  30. package/dist/components/index.cjs.map +1 -0
  31. package/dist/components/index.d.ts +6 -6
  32. package/dist/components/index.d.ts.map +1 -1
  33. package/dist/components/index.js +13 -0
  34. package/dist/components/index.js.map +1 -0
  35. package/dist/components/members-list.cjs +132 -1
  36. package/dist/components/members-list.cjs.map +1 -1
  37. package/dist/components/members-list.d.ts.map +1 -1
  38. package/dist/components/members-list.js +69 -64
  39. package/dist/components/members-list.js.map +1 -1
  40. package/dist/components/redirect-to-sign-in.cjs +34 -1
  41. package/dist/components/redirect-to-sign-in.cjs.map +1 -1
  42. package/dist/components/redirect-to-sign-in.js +28 -20
  43. package/dist/components/redirect-to-sign-in.js.map +1 -1
  44. package/dist/components/sign-in-button.cjs +36 -1
  45. package/dist/components/sign-in-button.cjs.map +1 -1
  46. package/dist/components/sign-in-button.d.ts.map +1 -1
  47. package/dist/components/sign-in-button.js +25 -21
  48. package/dist/components/sign-in-button.js.map +1 -1
  49. package/dist/components/ui/avatar.cjs +42 -1
  50. package/dist/components/ui/avatar.cjs.map +1 -1
  51. package/dist/components/ui/avatar.d.ts +2 -2
  52. package/dist/components/ui/avatar.d.ts.map +1 -1
  53. package/dist/components/ui/avatar.js +23 -23
  54. package/dist/components/ui/avatar.js.map +1 -1
  55. package/dist/components/ui/badge.d.ts +2 -2
  56. package/dist/components/ui/badge.d.ts.map +1 -1
  57. package/dist/components/ui/dropdown-menu.cjs +148 -1
  58. package/dist/components/ui/dropdown-menu.cjs.map +1 -1
  59. package/dist/components/ui/dropdown-menu.d.ts +2 -2
  60. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  61. package/dist/components/ui/dropdown-menu.js +83 -81
  62. package/dist/components/ui/dropdown-menu.js.map +1 -1
  63. package/dist/components/ui/popover.d.ts +2 -2
  64. package/dist/components/ui/popover.d.ts.map +1 -1
  65. package/dist/components/ui/separator.d.ts +1 -1
  66. package/dist/components/ui/separator.d.ts.map +1 -1
  67. package/dist/components/user-avatar.cjs +22 -1
  68. package/dist/components/user-avatar.cjs.map +1 -1
  69. package/dist/components/user-avatar.d.ts +5 -5
  70. package/dist/components/user-avatar.d.ts.map +1 -1
  71. package/dist/components/user-avatar.js +16 -16
  72. package/dist/components/user-avatar.js.map +1 -1
  73. package/dist/components/user-button/styles.cjs +39 -1
  74. package/dist/components/user-button/styles.cjs.map +1 -1
  75. package/dist/components/user-button/styles.js +6 -5
  76. package/dist/components/user-button/styles.js.map +1 -1
  77. package/dist/components/user-button/user-button.cjs +98 -1
  78. package/dist/components/user-button/user-button.cjs.map +1 -1
  79. package/dist/components/user-button/user-button.d.ts +1 -1
  80. package/dist/components/user-button/user-button.d.ts.map +1 -1
  81. package/dist/components/user-button/user-button.js +64 -58
  82. package/dist/components/user-button/user-button.js.map +1 -1
  83. package/dist/hooks/index.cjs +14 -0
  84. package/dist/hooks/index.cjs.map +1 -0
  85. package/dist/hooks/index.d.ts +3 -2
  86. package/dist/hooks/index.d.ts.map +1 -1
  87. package/dist/hooks/index.js +14 -0
  88. package/dist/hooks/index.js.map +1 -0
  89. package/dist/hooks/use-auth.cjs +44 -1
  90. package/dist/hooks/use-auth.cjs.map +1 -1
  91. package/dist/hooks/use-auth.d.ts +13 -15
  92. package/dist/hooks/use-auth.d.ts.map +1 -1
  93. package/dist/hooks/use-auth.js +30 -26
  94. package/dist/hooks/use-auth.js.map +1 -1
  95. package/dist/hooks/use-client.cjs +9 -1
  96. package/dist/hooks/use-client.cjs.map +1 -1
  97. package/dist/hooks/use-client.d.ts +1 -1
  98. package/dist/hooks/use-client.d.ts.map +1 -1
  99. package/dist/hooks/use-client.js +6 -5
  100. package/dist/hooks/use-client.js.map +1 -1
  101. package/dist/hooks/use-members.cjs +60 -1
  102. package/dist/hooks/use-members.cjs.map +1 -1
  103. package/dist/hooks/use-members.d.ts +5 -5
  104. package/dist/hooks/use-members.d.ts.map +1 -1
  105. package/dist/hooks/use-members.js +53 -41
  106. package/dist/hooks/use-members.js.map +1 -1
  107. package/dist/hooks/use-store.cjs +17 -1
  108. package/dist/hooks/use-store.cjs.map +1 -1
  109. package/dist/hooks/use-store.js +7 -7
  110. package/dist/hooks/use-store.js.map +1 -1
  111. package/dist/index.cjs +37 -1
  112. package/dist/index.cjs.map +1 -1
  113. package/dist/index.d.ts +5 -5
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +35 -35
  116. package/dist/lib/utils.cjs +8 -1
  117. package/dist/lib/utils.cjs.map +1 -1
  118. package/dist/lib/utils.js +5 -5
  119. package/dist/lib/utils.js.map +1 -1
  120. package/dist/lib/variants.cjs +46 -1
  121. package/dist/lib/variants.cjs.map +1 -1
  122. package/dist/lib/variants.d.ts +1 -1
  123. package/dist/lib/variants.js +6 -5
  124. package/dist/lib/variants.js.map +1 -1
  125. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +721 -1
  126. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
  127. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +571 -377
  128. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
  129. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +625 -1
  130. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
  131. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +539 -316
  132. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
  133. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +313 -1
  134. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -1
  135. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +261 -172
  136. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
  137. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +154 -1
  138. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
  139. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +173 -1
  140. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
  141. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -107
  142. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
  143. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +111 -87
  144. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -1
  145. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +11 -1
  146. package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
  147. package/dist/node_modules/@radix-ui/primitive/dist/index.js +7 -5
  148. package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
  149. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -1
  150. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  151. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +17 -16
  152. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
  153. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -1
  154. package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
  155. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +105 -57
  156. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
  157. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +80 -1
  158. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  159. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +49 -41
  160. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
  161. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -1
  162. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  163. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +17 -10
  164. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  165. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +119 -1
  166. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  167. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +86 -42
  168. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
  169. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +70 -1
  170. package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
  171. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +57 -37
  172. package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
  173. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -1
  174. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
  175. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -19
  176. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
  177. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +79 -1
  178. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  179. package/dist/node_modules/@radix-ui/react-context/dist/index.js +48 -39
  180. package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
  181. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -1
  182. package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
  183. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +6 -6
  184. package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
  185. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -1
  186. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  187. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +182 -97
  188. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
  189. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +296 -1
  190. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
  191. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +232 -167
  192. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
  193. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -1
  194. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
  195. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +23 -11
  196. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
  197. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -1
  198. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  199. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +169 -98
  200. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
  201. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +31 -1
  202. package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
  203. package/dist/node_modules/@radix-ui/react-id/dist/index.js +11 -10
  204. package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
  205. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -1
  206. package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
  207. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +662 -442
  208. package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
  209. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -1
  210. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  211. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +209 -137
  212. package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
  213. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +34 -1
  214. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  215. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +14 -12
  216. package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
  217. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +145 -1
  218. package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
  219. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +103 -45
  220. package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
  221. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -1
  222. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  223. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +21 -14
  224. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
  225. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -1
  226. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
  227. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -135
  228. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
  229. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +105 -1
  230. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  231. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +74 -35
  232. package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
  233. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -1
  234. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
  235. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +8 -7
  236. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
  237. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -1
  238. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
  239. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -40
  240. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
  241. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -1
  242. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -1
  243. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +13 -10
  244. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
  245. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +15 -1
  246. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -1
  247. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +8 -8
  248. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -1
  249. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -1
  250. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
  251. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
  252. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
  253. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -1
  254. package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
  255. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +34 -22
  256. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
  257. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +122 -1
  258. package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -1
  259. package/dist/node_modules/aria-hidden/dist/es2015/index.js +111 -41
  260. package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
  261. package/dist/node_modules/class-variance-authority/dist/index.cjs +45 -1
  262. package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -1
  263. package/dist/node_modules/class-variance-authority/dist/index.js +40 -30
  264. package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
  265. package/dist/node_modules/clsx/dist/clsx.cjs +17 -1
  266. package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
  267. package/dist/node_modules/clsx/dist/clsx.js +13 -13
  268. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  269. package/dist/node_modules/get-nonce/dist/es2015/index.cjs +9 -1
  270. package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -1
  271. package/dist/node_modules/get-nonce/dist/es2015/index.js +5 -3
  272. package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -1
  273. package/dist/node_modules/js-cookie/dist/js.cookie.cjs +99 -1
  274. package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
  275. package/dist/node_modules/js-cookie/dist/js.cookie.js +69 -43
  276. package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -1
  277. package/dist/node_modules/jwt-decode/build/esm/index.cjs +58 -1
  278. package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -1
  279. package/dist/node_modules/jwt-decode/build/esm/index.js +36 -30
  280. package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -1
  281. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +35 -1
  282. package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
  283. package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -25
  284. package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -1
  285. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +22 -1
  286. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
  287. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +16 -15
  288. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -1
  289. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +14 -1
  290. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
  291. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +2 -2
  292. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -1
  293. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +7 -1
  294. package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
  295. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +5 -4
  296. package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -1
  297. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +7 -1
  298. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
  299. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +5 -4
  300. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
  301. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +7 -1
  302. package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
  303. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +5 -4
  304. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -1
  305. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +11 -1
  306. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
  307. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +6 -5
  308. package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -1
  309. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +26 -1
  310. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
  311. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -14
  312. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -1
  313. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +28 -1
  314. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
  315. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +8 -8
  316. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
  317. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +197 -4
  318. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
  319. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -98
  320. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
  321. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +55 -1
  322. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -1
  323. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -24
  324. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
  325. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +19 -1
  326. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -1
  327. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +12 -9
  328. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
  329. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +102 -1
  330. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -1
  331. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -51
  332. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
  333. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +5 -1
  334. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -1
  335. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
  336. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -1
  337. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +7 -1
  338. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
  339. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
  340. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -1
  341. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +62 -36
  342. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -1
  343. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +41 -65
  344. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
  345. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +10 -1
  346. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -1
  347. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -5
  348. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -1
  349. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +37 -1
  350. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -1
  351. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +28 -16
  352. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
  353. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +13 -1
  354. package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -1
  355. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +9 -7
  356. package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
  357. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +33 -1
  358. package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -1
  359. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +11 -10
  360. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
  361. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +48 -1
  362. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -1
  363. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -17
  364. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
  365. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +3014 -1
  366. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
  367. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +804 -555
  368. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  369. package/dist/node_modules/tailwindcss/dist/plugin.cjs +13 -1
  370. package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
  371. package/dist/node_modules/tailwindcss/dist/plugin.js +8 -8
  372. package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -1
  373. package/dist/node_modules/tslib/tslib.es6.cjs +38 -1
  374. package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -1
  375. package/dist/node_modules/tslib/tslib.es6.js +33 -21
  376. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  377. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +11 -1
  378. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -1
  379. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +8 -3
  380. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -1
  381. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +52 -1
  382. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -1
  383. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +28 -19
  384. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
  385. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +29 -1
  386. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -1
  387. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +15 -11
  388. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
  389. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +38 -1
  390. package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -1
  391. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +15 -12
  392. package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -1
  393. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +88 -1
  394. package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
  395. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +64 -43
  396. package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
  397. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +68 -1
  398. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -1
  399. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +49 -39
  400. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
  401. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +53 -1
  402. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -1
  403. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +39 -32
  404. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
  405. package/dist/node_modules/use-sync-external-store/shim/index.cjs +17 -1
  406. package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -1
  407. package/dist/node_modules/use-sync-external-store/shim/index.js +14 -7
  408. package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -1
  409. package/dist/providers/auth/auth.context.cjs +5 -1
  410. package/dist/providers/auth/auth.context.cjs.map +1 -1
  411. package/dist/providers/auth/auth.context.js +3 -3
  412. package/dist/providers/auth/auth.context.js.map +1 -1
  413. package/dist/providers/auth/auth.hook.cjs +12 -1
  414. package/dist/providers/auth/auth.hook.cjs.map +1 -1
  415. package/dist/providers/auth/auth.hook.js +8 -7
  416. package/dist/providers/auth/auth.hook.js.map +1 -1
  417. package/dist/providers/auth/auth.provider.cjs +37 -1
  418. package/dist/providers/auth/auth.provider.cjs.map +1 -1
  419. package/dist/providers/auth/auth.provider.js +31 -22
  420. package/dist/providers/auth/auth.provider.js.map +1 -1
  421. package/dist/providers/blimu/blimu.context.cjs +5 -1
  422. package/dist/providers/blimu/blimu.context.cjs.map +1 -1
  423. package/dist/providers/blimu/blimu.context.d.ts +4 -4
  424. package/dist/providers/blimu/blimu.context.d.ts.map +1 -1
  425. package/dist/providers/blimu/blimu.context.js +3 -3
  426. package/dist/providers/blimu/blimu.context.js.map +1 -1
  427. package/dist/providers/blimu/blimu.hook.cjs +12 -1
  428. package/dist/providers/blimu/blimu.hook.cjs.map +1 -1
  429. package/dist/providers/blimu/blimu.hook.js +8 -7
  430. package/dist/providers/blimu/blimu.hook.js.map +1 -1
  431. package/dist/providers/blimu/blimu.provider.cjs +71 -1
  432. package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
  433. package/dist/providers/blimu/blimu.provider.d.ts +1 -1
  434. package/dist/providers/blimu/blimu.provider.d.ts.map +1 -1
  435. package/dist/providers/blimu/blimu.provider.js +32 -27
  436. package/dist/providers/blimu/blimu.provider.js.map +1 -1
  437. package/dist/providers/index.cjs +13 -0
  438. package/dist/providers/index.cjs.map +1 -0
  439. package/dist/providers/index.d.ts +3 -3
  440. package/dist/providers/index.d.ts.map +1 -1
  441. package/dist/providers/index.js +13 -0
  442. package/dist/providers/index.js.map +1 -0
  443. package/dist/providers/theme/index.d.ts +2 -2
  444. package/dist/providers/theme/index.d.ts.map +1 -1
  445. package/dist/providers/theme/theme.context.cjs +5 -1
  446. package/dist/providers/theme/theme.context.cjs.map +1 -1
  447. package/dist/providers/theme/theme.context.js +3 -3
  448. package/dist/providers/theme/theme.context.js.map +1 -1
  449. package/dist/providers/theme/theme.hook.cjs +12 -1
  450. package/dist/providers/theme/theme.hook.cjs.map +1 -1
  451. package/dist/providers/theme/theme.hook.js +8 -7
  452. package/dist/providers/theme/theme.hook.js.map +1 -1
  453. package/dist/providers/theme/theme.provider.cjs +104 -1
  454. package/dist/providers/theme/theme.provider.cjs.map +1 -1
  455. package/dist/providers/theme/theme.provider.d.ts.map +1 -1
  456. package/dist/providers/theme/theme.provider.js +85 -48
  457. package/dist/providers/theme/theme.provider.js.map +1 -1
  458. package/dist/styles/styles.css +34 -40
  459. package/dist/styles/tw-styles.css +34 -40
  460. package/dist/tailwind.cjs +200 -0
  461. package/dist/tailwind.cjs.map +1 -0
  462. package/dist/{tailwind.plugin.js → tailwind.js} +43 -43
  463. package/dist/tailwind.js.map +1 -0
  464. package/dist/types/index.cjs +11 -1
  465. package/dist/types/index.cjs.map +1 -1
  466. package/dist/types/index.d.ts +22 -8
  467. package/dist/types/index.d.ts.map +1 -1
  468. package/dist/types/index.js +8 -8
  469. package/dist/types/index.js.map +1 -1
  470. package/dist/utils/publishable-key.cjs +62 -1
  471. package/dist/utils/publishable-key.cjs.map +1 -1
  472. package/dist/utils/publishable-key.js +52 -27
  473. package/dist/utils/publishable-key.js.map +1 -1
  474. package/package.json +68 -53
  475. package/dist/components.cjs +0 -2
  476. package/dist/components.cjs.map +0 -1
  477. package/dist/components.js +0 -13
  478. package/dist/components.js.map +0 -1
  479. package/dist/hooks.cjs +0 -2
  480. package/dist/hooks.cjs.map +0 -1
  481. package/dist/hooks.js +0 -14
  482. package/dist/hooks.js.map +0 -1
  483. package/dist/providers.cjs +0 -2
  484. package/dist/providers.cjs.map +0 -1
  485. package/dist/providers.js +0 -13
  486. package/dist/providers.js.map +0 -1
  487. package/dist/tailwind.plugin.cjs +0 -2
  488. package/dist/tailwind.plugin.cjs.map +0 -1
  489. package/dist/tailwind.plugin.js.map +0 -1
@@ -1,12 +1,13 @@
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)
1
+ import { useContext } from "react";
2
+ import { ThemeContext } from "./theme.context.js";
3
+ function useTheme() {
4
+ const context = useContext(ThemeContext);
5
+ if (!context) {
6
6
  throw new Error("useTheme must be used within a ThemeProvider");
7
- return e;
7
+ }
8
+ return context;
8
9
  }
9
10
  export {
10
- n as useTheme
11
+ useTheme
11
12
  };
12
13
  //# sourceMappingURL=theme.hook.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.hook.js","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":["useTheme","context","useContext","ThemeContext"],"mappings":";;AAoBO,SAASA,IAAW;AACzB,QAAMC,IAAUC,EAAWC,CAAY;AACvC,MAAI,CAACF;AACH,UAAM,IAAI,MAAM,8CAA8C;AAEhE,SAAOA;AACT;"}
1
+ {"version":3,"file":"theme.hook.js","sources":["../../../src/providers/theme/theme.hook.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { ThemeContext } from './theme.context';\n\n/**\n * Hook for accessing and controlling the theme\n *\n * @example\n * ```tsx\n * function ThemeToggle() {\n * const { theme, setTheme, resolvedTheme } = useTheme();\n *\n * return (\n * <button onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}>\n * Current theme: {resolvedTheme}\n * </button>\n * );\n * }\n * ```\n */\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n"],"names":[],"mappings":";;AAoBO,SAAS,WAAW;AACzB,QAAM,UAAU,WAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,8CAA8C;AAAA,EAChE;AACA,SAAO;AACT;"}
@@ -1,2 +1,105 @@
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;
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const theme_context = require("./theme.context.cjs");
6
+ function ThemeProvider({
7
+ children,
8
+ defaultTheme = "system",
9
+ storageKey = "blimu-theme",
10
+ autoDetect = true
11
+ }) {
12
+ const [theme, setTheme] = React.useState(() => {
13
+ if (typeof window === "undefined") {
14
+ return defaultTheme;
15
+ }
16
+ const stored = localStorage.getItem(storageKey);
17
+ return stored || defaultTheme;
18
+ });
19
+ const [resolvedTheme, setResolvedTheme] = React.useState(() => {
20
+ if (typeof window === "undefined") {
21
+ return "light";
22
+ }
23
+ return getResolvedTheme(theme);
24
+ });
25
+ React.useEffect(() => {
26
+ if (typeof window === "undefined") {
27
+ return;
28
+ }
29
+ const root = window.document.documentElement;
30
+ root.classList.remove("light", "dark");
31
+ if (theme === "system") {
32
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
33
+ root.classList.add(systemTheme);
34
+ setResolvedTheme(systemTheme);
35
+ return;
36
+ }
37
+ root.classList.add(theme);
38
+ setResolvedTheme(theme);
39
+ }, [theme]);
40
+ React.useEffect(() => {
41
+ if (typeof window === "undefined") {
42
+ return;
43
+ }
44
+ localStorage.setItem(storageKey, theme);
45
+ }, [theme, storageKey]);
46
+ React.useEffect(() => {
47
+ if (!autoDetect || typeof window === "undefined") {
48
+ return;
49
+ }
50
+ const observer = new MutationObserver((mutations) => {
51
+ mutations.forEach((mutation) => {
52
+ if (mutation.attributeName === "class") {
53
+ const isDark = document.documentElement.classList.contains("dark");
54
+ const isLight = document.documentElement.classList.contains("light");
55
+ if (isDark || isLight) {
56
+ const detectedTheme = isDark ? "dark" : "light";
57
+ if (resolvedTheme !== detectedTheme) {
58
+ setResolvedTheme(detectedTheme);
59
+ }
60
+ }
61
+ }
62
+ });
63
+ });
64
+ observer.observe(document.documentElement, {
65
+ attributes: true,
66
+ attributeFilter: ["class"]
67
+ });
68
+ return () => observer.disconnect();
69
+ }, [autoDetect, resolvedTheme]);
70
+ React.useEffect(() => {
71
+ if (theme !== "system" || typeof window === "undefined") {
72
+ return;
73
+ }
74
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
75
+ const handleChange = (e) => {
76
+ const root = window.document.documentElement;
77
+ root.classList.remove("light", "dark");
78
+ const systemTheme = e.matches ? "dark" : "light";
79
+ root.classList.add(systemTheme);
80
+ setResolvedTheme(systemTheme);
81
+ };
82
+ mediaQuery.addEventListener("change", handleChange);
83
+ return () => mediaQuery.removeEventListener("change", handleChange);
84
+ }, [theme]);
85
+ const value = React.useMemo(
86
+ () => ({
87
+ theme,
88
+ setTheme,
89
+ resolvedTheme
90
+ }),
91
+ [theme, resolvedTheme]
92
+ );
93
+ return /* @__PURE__ */ jsxRuntime.jsx(theme_context.ThemeContext.Provider, { value, children });
94
+ }
95
+ function getResolvedTheme(theme) {
96
+ if (theme === "system") {
97
+ if (typeof window === "undefined") {
98
+ return "light";
99
+ }
100
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
101
+ }
102
+ return theme;
103
+ }
104
+ exports.ThemeProvider = ThemeProvider;
2
105
  //# sourceMappingURL=theme.provider.cjs.map
@@ -1 +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,EACxB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ACH,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"}
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 // eslint-disable-next-line react-hooks/set-state-in-effect\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-sche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AO,WAAW,8BAA8B,EAAE,UAAU,SAAS;AAAA,EAC9E;AACA,SAAO;AACT;;"}
@@ -1 +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"}
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,qBA2GpB"}
@@ -1,68 +1,105 @@
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
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState, useEffect, useMemo } from "react";
3
+ import { ThemeContext } from "./theme.context.js";
4
+ function ThemeProvider({
5
+ children,
6
+ defaultTheme = "system",
7
+ storageKey = "blimu-theme",
8
+ autoDetect = true
9
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")
10
+ const [theme, setTheme] = useState(() => {
11
+ if (typeof window === "undefined") {
12
+ return defaultTheme;
13
+ }
14
+ const stored = localStorage.getItem(storageKey);
15
+ return stored || defaultTheme;
16
+ });
17
+ const [resolvedTheme, setResolvedTheme] = useState(() => {
18
+ if (typeof window === "undefined") {
19
+ return "light";
20
+ }
21
+ return getResolvedTheme(theme);
22
+ });
23
+ useEffect(() => {
24
+ if (typeof window === "undefined") {
13
25
  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);
26
+ }
27
+ const root = window.document.documentElement;
28
+ root.classList.remove("light", "dark");
29
+ if (theme === "system") {
30
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
31
+ root.classList.add(systemTheme);
32
+ setResolvedTheme(systemTheme);
33
+ return;
34
+ }
35
+ root.classList.add(theme);
36
+ setResolvedTheme(theme);
37
+ }, [theme]);
38
+ useEffect(() => {
39
+ if (typeof window === "undefined") {
18
40
  return;
19
41
  }
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")
42
+ localStorage.setItem(storageKey, theme);
43
+ }, [theme, storageKey]);
44
+ useEffect(() => {
45
+ if (!autoDetect || typeof window === "undefined") {
25
46
  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);
47
+ }
48
+ const observer = new MutationObserver((mutations) => {
49
+ mutations.forEach((mutation) => {
50
+ if (mutation.attributeName === "class") {
51
+ const isDark = document.documentElement.classList.contains("dark");
52
+ const isLight = document.documentElement.classList.contains("light");
53
+ if (isDark || isLight) {
54
+ const detectedTheme = isDark ? "dark" : "light";
55
+ if (resolvedTheme !== detectedTheme) {
56
+ setResolvedTheme(detectedTheme);
57
+ }
33
58
  }
34
59
  }
35
60
  });
36
61
  });
37
- return t.observe(document.documentElement, {
38
- attributes: !0,
62
+ observer.observe(document.documentElement, {
63
+ attributes: true,
39
64
  attributeFilter: ["class"]
40
- }), () => t.disconnect();
41
- }, [f, s]), c(() => {
42
- if (e !== "system" || typeof window > "u")
65
+ });
66
+ return () => observer.disconnect();
67
+ }, [autoDetect, resolvedTheme]);
68
+ useEffect(() => {
69
+ if (theme !== "system" || typeof window === "undefined") {
43
70
  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);
71
+ }
72
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
73
+ const handleChange = (e) => {
74
+ const root = window.document.documentElement;
75
+ root.classList.remove("light", "dark");
76
+ const systemTheme = e.matches ? "dark" : "light";
77
+ root.classList.add(systemTheme);
78
+ setResolvedTheme(systemTheme);
49
79
  };
50
- return t.addEventListener("change", n), () => t.removeEventListener("change", n);
51
- }, [e]);
52
- const g = v(
80
+ mediaQuery.addEventListener("change", handleChange);
81
+ return () => mediaQuery.removeEventListener("change", handleChange);
82
+ }, [theme]);
83
+ const value = useMemo(
53
84
  () => ({
54
- theme: e,
55
- setTheme: w,
56
- resolvedTheme: s
85
+ theme,
86
+ setTheme,
87
+ resolvedTheme
57
88
  }),
58
- [e, s]
89
+ [theme, resolvedTheme]
59
90
  );
60
- return /* @__PURE__ */ p(y.Provider, { value: g, children: o });
91
+ return /* @__PURE__ */ jsx(ThemeContext.Provider, { value, children });
61
92
  }
62
- function k(o) {
63
- return o === "system" ? typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : o;
93
+ function getResolvedTheme(theme) {
94
+ if (theme === "system") {
95
+ if (typeof window === "undefined") {
96
+ return "light";
97
+ }
98
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
99
+ }
100
+ return theme;
64
101
  }
65
102
  export {
66
- b as ThemeProvider
103
+ ThemeProvider
67
104
  };
68
105
  //# sourceMappingURL=theme.provider.js.map
@@ -1 +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,EAA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AAA,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;"}
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 // eslint-disable-next-line react-hooks/set-state-in-effect\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":[],"mappings":";;;AA6BO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AACf,GAAuB;AACrB,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAgB,MAAM;AAC9C,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,UAAM,SAAS,aAAa,QAAQ,UAAU;AAC9C,WAAO,UAAU;AAAA,EACnB,CAAC;AAED,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAA2B,MAAM;AACzE,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,WAAO,iBAAiB,KAAK;AAAA,EAC/B,CAAC;AAGD,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC;AAAA,IACF;AAEA,UAAM,OAAO,OAAO,SAAS;AAC7B,SAAK,UAAU,OAAO,SAAS,MAAM;AAErC,QAAI,UAAU,UAAU;AACtB,YAAM,cAAc,OAAO,WAAW,8BAA8B,EAAE,UAClE,SACA;AACJ,WAAK,UAAU,IAAI,WAAW;AAE9B,uBAAiB,WAAW;AAC5B;AAAA,IACF;AAEA,SAAK,UAAU,IAAI,KAAK;AACxB,qBAAiB,KAAK;AAAA,EACxB,GAAG,CAAC,KAAK,CAAC;AAGV,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC;AAAA,IACF;AACA,iBAAa,QAAQ,YAAY,KAAK;AAAA,EACxC,GAAG,CAAC,OAAO,UAAU,CAAC;AAGtB,YAAU,MAAM;AACd,QAAI,CAAC,cAAc,OAAO,WAAW,aAAa;AAChD;AAAA,IACF;AAEA,UAAM,WAAW,IAAI,iBAAiB,CAAC,cAAc;AACnD,gBAAU,QAAQ,CAAC,aAAa;AAC9B,YAAI,SAAS,kBAAkB,SAAS;A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E;AACA,SAAO;AACT;"}
@@ -1099,27 +1099,24 @@
1099
1099
  }
1100
1100
  :root {
1101
1101
  --blimu-background: var(--background, oklch(1 0 0));
1102
- --blimu-foreground: var(--foreground, oklch(0.145 0 0));
1102
+ --blimu-foreground: var(--foreground, oklch(0.141 0.005 285.823));
1103
1103
  --blimu-card: var(--card, oklch(1 0 0));
1104
- --blimu-card-foreground: var(--card-foreground, oklch(0.145 0 0));
1105
- --blimu-popover: var(--popover, oklab(0.27 0 0 / 1));
1106
- --blimu-popover-foreground: var(--popover-foreground, oklch(0.145 0 0));
1107
- --blimu-primary: var(--primary, oklch(0.205 0 0));
1104
+ --blimu-card-foreground: var(--card-foreground, oklch(0.141 0.005 285.823));
1105
+ --blimu-popover: var(--popover, oklch(1 0 0));
1106
+ --blimu-popover-foreground: var(--popover-foreground, oklch(0.141 0.005 285.823));
1107
+ --blimu-primary: var(--primary, oklch(0.21 0.006 285.885));
1108
1108
  --blimu-primary-foreground: var(--primary-foreground, oklch(0.985 0 0));
1109
- --blimu-secondary: var(--secondary, oklch(0.97 0 0));
1110
- --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.205 0 0));
1111
- --blimu-muted: var(--muted, oklch(0.97 0 0));
1112
- --blimu-muted-foreground: var(--muted-foreground, oklch(0.556 0 0));
1113
- --blimu-accent: var(--accent, oklch(0.97 0 0));
1114
- --blimu-accent-foreground: var(--accent-foreground, oklch(0.205 0 0));
1109
+ --blimu-secondary: var(--secondary, oklch(0.967 0.001 286.375));
1110
+ --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.21 0.006 285.885));
1111
+ --blimu-muted: var(--muted, oklch(0.967 0.001 286.375));
1112
+ --blimu-muted-foreground: var(--muted-foreground, oklch(0.552 0.016 285.938));
1113
+ --blimu-accent: var(--accent, oklch(0.967 0.001 286.375));
1114
+ --blimu-accent-foreground: var(--accent-foreground, oklch(0.21 0.006 285.885));
1115
1115
  --blimu-destructive: var(--destructive, oklch(0.577 0.245 27.325));
1116
- --blimu-destructive-foreground: var(
1117
- --destructive-foreground,
1118
- oklch(0.577 0.245 27.325)
1119
- );
1120
- --blimu-border: var(--border, oklch(0.922 0 0));
1121
- --blimu-input: var(--input, oklch(0.922 0 0));
1122
- --blimu-ring: var(--ring, oklch(0.708 0 0));
1116
+ --blimu-destructive-foreground: var(--destructive-foreground, oklch(0.577 0.245 27.325));
1117
+ --blimu-border: var(--border, oklch(0.92 0.004 286.32));
1118
+ --blimu-input: var(--input, oklch(0.92 0.004 286.32));
1119
+ --blimu-ring: var(--ring, oklch(0.705 0.015 286.067));
1123
1120
  --blimu-radius: var(--radius, 0.625rem);
1124
1121
  --blimu-rounded-sm: var(--blimu-rounded-sm, 0.25rem);
1125
1122
  --blimu-rounded-md: var(--blimu-rounded-md, 0.5rem);
@@ -1128,28 +1125,25 @@
1128
1125
  --blimu-rounded-full: var(--blimu-rounded-full, 9999px);
1129
1126
  }
1130
1127
  .dark {
1131
- --blimu-background: var(--background, oklch(0.145 0 0));
1132
- --blimu-foreground: var(--foreground, lab(98.26% 0 0));
1133
- --blimu-card: var(--card, oklch(0.145 0 0));
1134
- --blimu-card-foreground: var(--card-foreground, lab(98.26% 0 0));
1135
- --blimu-popover: var(--popover, oklab(0.27 0 0 / 1));
1136
- --blimu-popover-foreground: var(--popover-foreground, lab(98.26% 0 0));
1137
- --blimu-primary: var(--primary, lab(98.26% 0 0));
1138
- --blimu-primary-foreground: var(--primary-foreground, oklch(0.205 0 0));
1139
- --blimu-secondary: var(--secondary, oklch(0.269 0 0));
1140
- --blimu-secondary-foreground: var(--secondary-foreground, lab(98.26% 0 0));
1141
- --blimu-muted: var(--muted, oklch(0.269 0 0));
1142
- --blimu-muted-foreground: var(--muted-foreground, oklch(0.708 0 0));
1143
- --blimu-accent: var(--accent, lab(27.036% 0 0));
1144
- --blimu-accent-foreground: var(--accent-foreground, lab(98.26% 0 0));
1145
- --blimu-destructive: var(--destructive, oklch(0.396 0.141 25.723));
1146
- --blimu-destructive-foreground: var(
1147
- --destructive-foreground,
1148
- oklch(0.637 0.237 25.331)
1149
- );
1150
- --blimu-border: var(--border, lab(100% 0 0 / 0.1));
1151
- --blimu-input: var(--input, oklch(0.269 0 0));
1152
- --blimu-ring: var(--ring, oklch(0.439 0 0));
1128
+ --blimu-background: var(--background, oklch(0.141 0.005 285.823));
1129
+ --blimu-foreground: var(--foreground, oklch(0.985 0 0));
1130
+ --blimu-card: var(--card, oklch(0.21 0.006 285.885));
1131
+ --blimu-card-foreground: var(--card-foreground, oklch(0.985 0 0));
1132
+ --blimu-popover: var(--popover, oklch(0.21 0.006 285.885));
1133
+ --blimu-popover-foreground: var(--popover-foreground, oklch(0.985 0 0));
1134
+ --blimu-primary: var(--primary, oklch(0.92 0.004 286.32));
1135
+ --blimu-primary-foreground: var(--primary-foreground, oklch(0.21 0.006 285.885));
1136
+ --blimu-secondary: var(--secondary, oklch(0.274 0.006 286.033));
1137
+ --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.985 0 0));
1138
+ --blimu-muted: var(--muted, oklch(0.274 0.006 286.033));
1139
+ --blimu-muted-foreground: var(--muted-foreground, oklch(0.705 0.015 286.067));
1140
+ --blimu-accent: var(--accent, oklch(0.274 0.006 286.033));
1141
+ --blimu-accent-foreground: var(--accent-foreground, oklch(0.985 0 0));
1142
+ --blimu-destructive: var(--destructive, oklch(0.704 0.191 22.216));
1143
+ --blimu-destructive-foreground: var(--destructive-foreground, oklch(0.704 0.191 22.216));
1144
+ --blimu-border: var(--border, oklch(1 0 0 / 10%));
1145
+ --blimu-input: var(--input, oklch(1 0 0 / 15%));
1146
+ --blimu-ring: var(--ring, oklch(0.552 0.016 285.938));
1153
1147
  }
1154
1148
  @property --tw-rotate-x {
1155
1149
  syntax: "*";
@@ -12,43 +12,40 @@
12
12
  :root {
13
13
  /* Background & Foreground */
14
14
  --blimu-background: var(--background, oklch(1 0 0));
15
- --blimu-foreground: var(--foreground, oklch(0.145 0 0));
15
+ --blimu-foreground: var(--foreground, oklch(0.141 0.005 285.823));
16
16
 
17
17
  /* Card */
18
18
  --blimu-card: var(--card, oklch(1 0 0));
19
- --blimu-card-foreground: var(--card-foreground, oklch(0.145 0 0));
19
+ --blimu-card-foreground: var(--card-foreground, oklch(0.141 0.005 285.823));
20
20
 
21
21
  /* Popover */
22
- --blimu-popover: var(--popover, oklab(0.27 0 0 / 1));
23
- --blimu-popover-foreground: var(--popover-foreground, oklch(0.145 0 0));
22
+ --blimu-popover: var(--popover, oklch(1 0 0));
23
+ --blimu-popover-foreground: var(--popover-foreground, oklch(0.141 0.005 285.823));
24
24
 
25
25
  /* Primary */
26
- --blimu-primary: var(--primary, oklch(0.205 0 0));
26
+ --blimu-primary: var(--primary, oklch(0.21 0.006 285.885));
27
27
  --blimu-primary-foreground: var(--primary-foreground, oklch(0.985 0 0));
28
28
 
29
29
  /* Secondary */
30
- --blimu-secondary: var(--secondary, oklch(0.97 0 0));
31
- --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.205 0 0));
30
+ --blimu-secondary: var(--secondary, oklch(0.967 0.001 286.375));
31
+ --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.21 0.006 285.885));
32
32
 
33
33
  /* Muted */
34
- --blimu-muted: var(--muted, oklch(0.97 0 0));
35
- --blimu-muted-foreground: var(--muted-foreground, oklch(0.556 0 0));
34
+ --blimu-muted: var(--muted, oklch(0.967 0.001 286.375));
35
+ --blimu-muted-foreground: var(--muted-foreground, oklch(0.552 0.016 285.938));
36
36
 
37
37
  /* Accent */
38
- --blimu-accent: var(--accent, oklch(0.97 0 0));
39
- --blimu-accent-foreground: var(--accent-foreground, oklch(0.205 0 0));
38
+ --blimu-accent: var(--accent, oklch(0.967 0.001 286.375));
39
+ --blimu-accent-foreground: var(--accent-foreground, oklch(0.21 0.006 285.885));
40
40
 
41
41
  /* Destructive */
42
42
  --blimu-destructive: var(--destructive, oklch(0.577 0.245 27.325));
43
- --blimu-destructive-foreground: var(
44
- --destructive-foreground,
45
- oklch(0.577 0.245 27.325)
46
- );
43
+ --blimu-destructive-foreground: var(--destructive-foreground, oklch(0.577 0.245 27.325));
47
44
 
48
45
  /* Border & Input */
49
- --blimu-border: var(--border, oklch(0.922 0 0));
50
- --blimu-input: var(--input, oklch(0.922 0 0));
51
- --blimu-ring: var(--ring, oklch(0.708 0 0));
46
+ --blimu-border: var(--border, oklch(0.92 0.004 286.32));
47
+ --blimu-input: var(--input, oklch(0.92 0.004 286.32));
48
+ --blimu-ring: var(--ring, oklch(0.705 0.015 286.067));
52
49
 
53
50
  /* Border Radius */
54
51
  --blimu-radius: var(--radius, 0.625rem);
@@ -61,28 +58,25 @@
61
58
 
62
59
  .dark {
63
60
  /* Dark mode theme */
64
- --blimu-background: var(--background, oklch(0.145 0 0));
65
- --blimu-foreground: var(--foreground, lab(98.26% 0 0));
66
- --blimu-card: var(--card, oklch(0.145 0 0));
67
- --blimu-card-foreground: var(--card-foreground, lab(98.26% 0 0));
68
- --blimu-popover: var(--popover, oklab(0.27 0 0 / 1));
69
- --blimu-popover-foreground: var(--popover-foreground, lab(98.26% 0 0));
70
- --blimu-primary: var(--primary, lab(98.26% 0 0));
71
- --blimu-primary-foreground: var(--primary-foreground, oklch(0.205 0 0));
72
- --blimu-secondary: var(--secondary, oklch(0.269 0 0));
73
- --blimu-secondary-foreground: var(--secondary-foreground, lab(98.26% 0 0));
74
- --blimu-muted: var(--muted, oklch(0.269 0 0));
75
- --blimu-muted-foreground: var(--muted-foreground, oklch(0.708 0 0));
76
- --blimu-accent: var(--accent, lab(27.036% 0 0));
77
- --blimu-accent-foreground: var(--accent-foreground, lab(98.26% 0 0));
78
- --blimu-destructive: var(--destructive, oklch(0.396 0.141 25.723));
79
- --blimu-destructive-foreground: var(
80
- --destructive-foreground,
81
- oklch(0.637 0.237 25.331)
82
- );
83
- --blimu-border: var(--border, lab(100% 0 0 / 0.1));
84
- --blimu-input: var(--input, oklch(0.269 0 0));
85
- --blimu-ring: var(--ring, oklch(0.439 0 0));
61
+ --blimu-background: var(--background, oklch(0.141 0.005 285.823));
62
+ --blimu-foreground: var(--foreground, oklch(0.985 0 0));
63
+ --blimu-card: var(--card, oklch(0.21 0.006 285.885));
64
+ --blimu-card-foreground: var(--card-foreground, oklch(0.985 0 0));
65
+ --blimu-popover: var(--popover, oklch(0.21 0.006 285.885));
66
+ --blimu-popover-foreground: var(--popover-foreground, oklch(0.985 0 0));
67
+ --blimu-primary: var(--primary, oklch(0.92 0.004 286.32));
68
+ --blimu-primary-foreground: var(--primary-foreground, oklch(0.21 0.006 285.885));
69
+ --blimu-secondary: var(--secondary, oklch(0.274 0.006 286.033));
70
+ --blimu-secondary-foreground: var(--secondary-foreground, oklch(0.985 0 0));
71
+ --blimu-muted: var(--muted, oklch(0.274 0.006 286.033));
72
+ --blimu-muted-foreground: var(--muted-foreground, oklch(0.705 0.015 286.067));
73
+ --blimu-accent: var(--accent, oklch(0.274 0.006 286.033));
74
+ --blimu-accent-foreground: var(--accent-foreground, oklch(0.985 0 0));
75
+ --blimu-destructive: var(--destructive, oklch(0.704 0.191 22.216));
76
+ --blimu-destructive-foreground: var(--destructive-foreground, oklch(0.704 0.191 22.216));
77
+ --blimu-border: var(--border, oklch(1 0 0 / 10%));
78
+ --blimu-input: var(--input, oklch(1 0 0 / 15%));
79
+ --blimu-ring: var(--ring, oklch(0.552 0.016 285.938));
86
80
  }
87
81
 
88
82
  /*