@cyclone-ui/state 0.0.2

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 (368) hide show
  1. package/LICENSE +187 -0
  2. package/README.md +302 -0
  3. package/dist/base/atoms/atom-with-broadcast.cjs +1 -0
  4. package/dist/base/atoms/atom-with-broadcast.d.cts +13 -0
  5. package/dist/base/atoms/atom-with-broadcast.d.cts.map +1 -0
  6. package/dist/base/atoms/atom-with-broadcast.d.mts +13 -0
  7. package/dist/base/atoms/atom-with-broadcast.d.mts.map +1 -0
  8. package/dist/base/atoms/atom-with-broadcast.mjs +2 -0
  9. package/dist/base/atoms/atom-with-broadcast.mjs.map +1 -0
  10. package/dist/base/atoms/atom-with-compare.cjs +1 -0
  11. package/dist/base/atoms/atom-with-compare.d.cts +5 -0
  12. package/dist/base/atoms/atom-with-compare.d.cts.map +1 -0
  13. package/dist/base/atoms/atom-with-compare.d.mts +5 -0
  14. package/dist/base/atoms/atom-with-compare.d.mts.map +1 -0
  15. package/dist/base/atoms/atom-with-compare.mjs +2 -0
  16. package/dist/base/atoms/atom-with-compare.mjs.map +1 -0
  17. package/dist/base/atoms/atom-with-debounce.cjs +1 -0
  18. package/dist/base/atoms/atom-with-debounce.d.cts +12 -0
  19. package/dist/base/atoms/atom-with-debounce.d.cts.map +1 -0
  20. package/dist/base/atoms/atom-with-debounce.d.mts +12 -0
  21. package/dist/base/atoms/atom-with-debounce.d.mts.map +1 -0
  22. package/dist/base/atoms/atom-with-debounce.mjs +2 -0
  23. package/dist/base/atoms/atom-with-debounce.mjs.map +1 -0
  24. package/dist/base/atoms/atom-with-effect.cjs +1 -0
  25. package/dist/base/atoms/atom-with-effect.d.cts +14 -0
  26. package/dist/base/atoms/atom-with-effect.d.cts.map +1 -0
  27. package/dist/base/atoms/atom-with-effect.d.mts +14 -0
  28. package/dist/base/atoms/atom-with-effect.d.mts.map +1 -0
  29. package/dist/base/atoms/atom-with-effect.mjs +2 -0
  30. package/dist/base/atoms/atom-with-effect.mjs.map +1 -0
  31. package/dist/base/atoms/atom-with-listeners.cjs +1 -0
  32. package/dist/base/atoms/atom-with-listeners.d.cts +13 -0
  33. package/dist/base/atoms/atom-with-listeners.d.cts.map +1 -0
  34. package/dist/base/atoms/atom-with-listeners.d.mts +13 -0
  35. package/dist/base/atoms/atom-with-listeners.d.mts.map +1 -0
  36. package/dist/base/atoms/atom-with-listeners.mjs +2 -0
  37. package/dist/base/atoms/atom-with-listeners.mjs.map +1 -0
  38. package/dist/base/atoms/atom-with-pending.cjs +1 -0
  39. package/dist/base/atoms/atom-with-pending.d.cts +12 -0
  40. package/dist/base/atoms/atom-with-pending.d.cts.map +1 -0
  41. package/dist/base/atoms/atom-with-pending.d.mts +12 -0
  42. package/dist/base/atoms/atom-with-pending.d.mts.map +1 -0
  43. package/dist/base/atoms/atom-with-pending.mjs +2 -0
  44. package/dist/base/atoms/atom-with-pending.mjs.map +1 -0
  45. package/dist/base/atoms/atom-with-refresh-and-default.cjs +1 -0
  46. package/dist/base/atoms/atom-with-refresh-and-default.d.cts +6 -0
  47. package/dist/base/atoms/atom-with-refresh-and-default.d.cts.map +1 -0
  48. package/dist/base/atoms/atom-with-refresh-and-default.d.mts +6 -0
  49. package/dist/base/atoms/atom-with-refresh-and-default.d.mts.map +1 -0
  50. package/dist/base/atoms/atom-with-refresh-and-default.mjs +2 -0
  51. package/dist/base/atoms/atom-with-refresh-and-default.mjs.map +1 -0
  52. package/dist/base/atoms/atom-with-refresh.cjs +1 -0
  53. package/dist/base/atoms/atom-with-refresh.d.cts +6 -0
  54. package/dist/base/atoms/atom-with-refresh.d.cts.map +1 -0
  55. package/dist/base/atoms/atom-with-refresh.d.mts +6 -0
  56. package/dist/base/atoms/atom-with-refresh.d.mts.map +1 -0
  57. package/dist/base/atoms/atom-with-refresh.mjs +2 -0
  58. package/dist/base/atoms/atom-with-refresh.mjs.map +1 -0
  59. package/dist/base/atoms/atom-with-toggle.cjs +1 -0
  60. package/dist/base/atoms/atom-with-toggle.d.cts +6 -0
  61. package/dist/base/atoms/atom-with-toggle.d.cts.map +1 -0
  62. package/dist/base/atoms/atom-with-toggle.d.mts +6 -0
  63. package/dist/base/atoms/atom-with-toggle.d.mts.map +1 -0
  64. package/dist/base/atoms/atom-with-toggle.mjs +2 -0
  65. package/dist/base/atoms/atom-with-toggle.mjs.map +1 -0
  66. package/dist/base/atoms/atom-with-web-storage.cjs +1 -0
  67. package/dist/base/atoms/atom-with-web-storage.d.cts +20 -0
  68. package/dist/base/atoms/atom-with-web-storage.d.cts.map +1 -0
  69. package/dist/base/atoms/atom-with-web-storage.d.mts +20 -0
  70. package/dist/base/atoms/atom-with-web-storage.d.mts.map +1 -0
  71. package/dist/base/atoms/atom-with-web-storage.mjs +2 -0
  72. package/dist/base/atoms/atom-with-web-storage.mjs.map +1 -0
  73. package/dist/base/atoms/atom-with-wrapper.cjs +1 -0
  74. package/dist/base/atoms/atom-with-wrapper.d.cts +18 -0
  75. package/dist/base/atoms/atom-with-wrapper.d.cts.map +1 -0
  76. package/dist/base/atoms/atom-with-wrapper.d.mts +18 -0
  77. package/dist/base/atoms/atom-with-wrapper.d.mts.map +1 -0
  78. package/dist/base/atoms/atom-with-wrapper.mjs +2 -0
  79. package/dist/base/atoms/atom-with-wrapper.mjs.map +1 -0
  80. package/dist/base/atoms/base-atom.cjs +1 -0
  81. package/dist/base/atoms/base-atom.mjs +2 -0
  82. package/dist/base/atoms/base-atom.mjs.map +1 -0
  83. package/dist/base/atoms/index.cjs +1 -0
  84. package/dist/base/atoms/index.d.cts +12 -0
  85. package/dist/base/atoms/index.d.mts +12 -0
  86. package/dist/base/atoms/index.mjs +1 -0
  87. package/dist/base/hooks/index.cjs +1 -0
  88. package/dist/base/hooks/index.d.cts +5 -0
  89. package/dist/base/hooks/index.d.mts +5 -0
  90. package/dist/base/hooks/index.mjs +1 -0
  91. package/dist/base/hooks/use-atom-effect.cjs +1 -0
  92. package/dist/base/hooks/use-atom-effect.d.cts +11 -0
  93. package/dist/base/hooks/use-atom-effect.d.cts.map +1 -0
  94. package/dist/base/hooks/use-atom-effect.d.mts +11 -0
  95. package/dist/base/hooks/use-atom-effect.d.mts.map +1 -0
  96. package/dist/base/hooks/use-atom-effect.mjs +2 -0
  97. package/dist/base/hooks/use-atom-effect.mjs.map +1 -0
  98. package/dist/base/hooks/use-hydrate-molecule.cjs +1 -0
  99. package/dist/base/hooks/use-hydrate-molecule.d.cts +11 -0
  100. package/dist/base/hooks/use-hydrate-molecule.d.cts.map +1 -0
  101. package/dist/base/hooks/use-hydrate-molecule.d.mts +11 -0
  102. package/dist/base/hooks/use-hydrate-molecule.d.mts.map +1 -0
  103. package/dist/base/hooks/use-hydrate-molecule.mjs +2 -0
  104. package/dist/base/hooks/use-hydrate-molecule.mjs.map +1 -0
  105. package/dist/base/hooks/use-prepare-atoms.cjs +1 -0
  106. package/dist/base/hooks/use-prepare-atoms.d.cts +8 -0
  107. package/dist/base/hooks/use-prepare-atoms.d.cts.map +1 -0
  108. package/dist/base/hooks/use-prepare-atoms.d.mts +8 -0
  109. package/dist/base/hooks/use-prepare-atoms.d.mts.map +1 -0
  110. package/dist/base/hooks/use-prepare-atoms.mjs +2 -0
  111. package/dist/base/hooks/use-prepare-atoms.mjs.map +1 -0
  112. package/dist/base/hooks/use-sync-molecule.cjs +1 -0
  113. package/dist/base/hooks/use-sync-molecule.d.cts +10 -0
  114. package/dist/base/hooks/use-sync-molecule.d.cts.map +1 -0
  115. package/dist/base/hooks/use-sync-molecule.d.mts +10 -0
  116. package/dist/base/hooks/use-sync-molecule.d.mts.map +1 -0
  117. package/dist/base/hooks/use-sync-molecule.mjs +2 -0
  118. package/dist/base/hooks/use-sync-molecule.mjs.map +1 -0
  119. package/dist/base/index.cjs +1 -0
  120. package/dist/base/index.d.cts +23 -0
  121. package/dist/base/index.d.mts +23 -0
  122. package/dist/base/index.mjs +1 -0
  123. package/dist/base/utilities/create-molecule.cjs +4 -0
  124. package/dist/base/utilities/create-molecule.d.cts +68 -0
  125. package/dist/base/utilities/create-molecule.d.cts.map +1 -0
  126. package/dist/base/utilities/create-molecule.d.mts +68 -0
  127. package/dist/base/utilities/create-molecule.d.mts.map +1 -0
  128. package/dist/base/utilities/create-molecule.mjs +5 -0
  129. package/dist/base/utilities/create-molecule.mjs.map +1 -0
  130. package/dist/base/utilities/create-web-storage.cjs +1 -0
  131. package/dist/base/utilities/create-web-storage.d.cts +6 -0
  132. package/dist/base/utilities/create-web-storage.d.cts.map +1 -0
  133. package/dist/base/utilities/create-web-storage.d.mts +6 -0
  134. package/dist/base/utilities/create-web-storage.d.mts.map +1 -0
  135. package/dist/base/utilities/create-web-storage.mjs +2 -0
  136. package/dist/base/utilities/create-web-storage.mjs.map +1 -0
  137. package/dist/base/utilities/debounce.cjs +1 -0
  138. package/dist/base/utilities/debounce.d.cts +19 -0
  139. package/dist/base/utilities/debounce.d.cts.map +1 -0
  140. package/dist/base/utilities/debounce.d.mts +19 -0
  141. package/dist/base/utilities/debounce.d.mts.map +1 -0
  142. package/dist/base/utilities/debounce.mjs +2 -0
  143. package/dist/base/utilities/debounce.mjs.map +1 -0
  144. package/dist/base/utilities/index.cjs +1 -0
  145. package/dist/base/utilities/index.d.cts +5 -0
  146. package/dist/base/utilities/index.d.mts +5 -0
  147. package/dist/base/utilities/index.mjs +1 -0
  148. package/dist/base/utilities/is-atom.cjs +1 -0
  149. package/dist/base/utilities/is-atom.mjs +2 -0
  150. package/dist/base/utilities/is-atom.mjs.map +1 -0
  151. package/dist/base/utilities/set-atom-debug.cjs +1 -0
  152. package/dist/base/utilities/set-atom-debug.d.cts +18 -0
  153. package/dist/base/utilities/set-atom-debug.d.cts.map +1 -0
  154. package/dist/base/utilities/set-atom-debug.d.mts +18 -0
  155. package/dist/base/utilities/set-atom-debug.d.mts.map +1 -0
  156. package/dist/base/utilities/set-atom-debug.mjs +2 -0
  157. package/dist/base/utilities/set-atom-debug.mjs.map +1 -0
  158. package/dist/client/index.cjs +1 -0
  159. package/dist/client/index.d.cts +8 -0
  160. package/dist/client/index.d.mts +8 -0
  161. package/dist/client/index.mjs +1 -0
  162. package/dist/form/atoms/atom-with-field.cjs +1 -0
  163. package/dist/form/atoms/atom-with-field.mjs +2 -0
  164. package/dist/form/atoms/atom-with-field.mjs.map +1 -0
  165. package/dist/form/atoms/atom-with-messages.cjs +1 -0
  166. package/dist/form/atoms/atom-with-messages.mjs +2 -0
  167. package/dist/form/atoms/atom-with-messages.mjs.map +1 -0
  168. package/dist/form/hooks/index.cjs +1 -0
  169. package/dist/form/hooks/index.d.cts +4 -0
  170. package/dist/form/hooks/index.d.mts +4 -0
  171. package/dist/form/hooks/index.mjs +1 -0
  172. package/dist/form/hooks/use-field-actions.cjs +1 -0
  173. package/dist/form/hooks/use-field-actions.d.cts +17 -0
  174. package/dist/form/hooks/use-field-actions.d.cts.map +1 -0
  175. package/dist/form/hooks/use-field-actions.d.mts +17 -0
  176. package/dist/form/hooks/use-field-actions.d.mts.map +1 -0
  177. package/dist/form/hooks/use-field-actions.mjs +2 -0
  178. package/dist/form/hooks/use-field-actions.mjs.map +1 -0
  179. package/dist/form/hooks/use-field-ref.cjs +1 -0
  180. package/dist/form/hooks/use-field-ref.d.cts +6 -0
  181. package/dist/form/hooks/use-field-ref.d.cts.map +1 -0
  182. package/dist/form/hooks/use-field-ref.d.mts +6 -0
  183. package/dist/form/hooks/use-field-ref.d.mts.map +1 -0
  184. package/dist/form/hooks/use-field-ref.mjs +2 -0
  185. package/dist/form/hooks/use-field-ref.mjs.map +1 -0
  186. package/dist/form/hooks/use-form-actions.cjs +1 -0
  187. package/dist/form/hooks/use-form-actions.d.cts +13 -0
  188. package/dist/form/hooks/use-form-actions.d.cts.map +1 -0
  189. package/dist/form/hooks/use-form-actions.d.mts +13 -0
  190. package/dist/form/hooks/use-form-actions.d.mts.map +1 -0
  191. package/dist/form/hooks/use-form-actions.mjs +2 -0
  192. package/dist/form/hooks/use-form-actions.mjs.map +1 -0
  193. package/dist/form/index.cjs +1 -0
  194. package/dist/form/index.d.cts +16 -0
  195. package/dist/form/index.d.mts +16 -0
  196. package/dist/form/index.mjs +1 -0
  197. package/dist/form/molecules/field-molecule.cjs +1 -0
  198. package/dist/form/molecules/field-molecule.d.cts +9 -0
  199. package/dist/form/molecules/field-molecule.d.cts.map +1 -0
  200. package/dist/form/molecules/field-molecule.d.mts +9 -0
  201. package/dist/form/molecules/field-molecule.d.mts.map +1 -0
  202. package/dist/form/molecules/field-molecule.mjs +2 -0
  203. package/dist/form/molecules/field-molecule.mjs.map +1 -0
  204. package/dist/form/molecules/form-molecule.cjs +1 -0
  205. package/dist/form/molecules/form-molecule.d.cts +9 -0
  206. package/dist/form/molecules/form-molecule.d.cts.map +1 -0
  207. package/dist/form/molecules/form-molecule.d.mts +9 -0
  208. package/dist/form/molecules/form-molecule.d.mts.map +1 -0
  209. package/dist/form/molecules/form-molecule.mjs +2 -0
  210. package/dist/form/molecules/form-molecule.mjs.map +1 -0
  211. package/dist/form/molecules/index.cjs +1 -0
  212. package/dist/form/molecules/index.d.cts +3 -0
  213. package/dist/form/molecules/index.d.mts +3 -0
  214. package/dist/form/molecules/index.mjs +1 -0
  215. package/dist/form/providers/FieldProvider.cjs +4 -0
  216. package/dist/form/providers/FieldProvider.d.cts +10 -0
  217. package/dist/form/providers/FieldProvider.d.cts.map +1 -0
  218. package/dist/form/providers/FieldProvider.d.mts +10 -0
  219. package/dist/form/providers/FieldProvider.d.mts.map +1 -0
  220. package/dist/form/providers/FieldProvider.mjs +5 -0
  221. package/dist/form/providers/FieldProvider.mjs.map +1 -0
  222. package/dist/form/providers/FormProvider.cjs +4 -0
  223. package/dist/form/providers/FormProvider.d.cts +10 -0
  224. package/dist/form/providers/FormProvider.d.cts.map +1 -0
  225. package/dist/form/providers/FormProvider.d.mts +10 -0
  226. package/dist/form/providers/FormProvider.d.mts.map +1 -0
  227. package/dist/form/providers/FormProvider.mjs +5 -0
  228. package/dist/form/providers/FormProvider.mjs.map +1 -0
  229. package/dist/form/providers/index.cjs +1 -0
  230. package/dist/form/providers/index.d.cts +3 -0
  231. package/dist/form/providers/index.d.mts +3 -0
  232. package/dist/form/providers/index.mjs +1 -0
  233. package/dist/form/types.cjs +1 -0
  234. package/dist/form/types.d.cts +288 -0
  235. package/dist/form/types.d.cts.map +1 -0
  236. package/dist/form/types.d.mts +288 -0
  237. package/dist/form/types.d.mts.map +1 -0
  238. package/dist/form/types.mjs +2 -0
  239. package/dist/form/types.mjs.map +1 -0
  240. package/dist/form/utilities/abort-error.cjs +1 -0
  241. package/dist/form/utilities/abort-error.d.cts +13 -0
  242. package/dist/form/utilities/abort-error.d.cts.map +1 -0
  243. package/dist/form/utilities/abort-error.d.mts +13 -0
  244. package/dist/form/utilities/abort-error.d.mts.map +1 -0
  245. package/dist/form/utilities/abort-error.mjs +2 -0
  246. package/dist/form/utilities/abort-error.mjs.map +1 -0
  247. package/dist/form/utilities/index.cjs +1 -0
  248. package/dist/form/utilities/index.d.cts +4 -0
  249. package/dist/form/utilities/index.d.mts +4 -0
  250. package/dist/form/utilities/index.mjs +1 -0
  251. package/dist/form/utilities/is-validation-results.cjs +1 -0
  252. package/dist/form/utilities/is-validation-results.d.cts +6 -0
  253. package/dist/form/utilities/is-validation-results.d.cts.map +1 -0
  254. package/dist/form/utilities/is-validation-results.d.mts +6 -0
  255. package/dist/form/utilities/is-validation-results.d.mts.map +1 -0
  256. package/dist/form/utilities/is-validation-results.mjs +2 -0
  257. package/dist/form/utilities/is-validation-results.mjs.map +1 -0
  258. package/dist/form/utilities/validators.cjs +1 -0
  259. package/dist/form/utilities/validators.d.cts +6 -0
  260. package/dist/form/utilities/validators.d.cts.map +1 -0
  261. package/dist/form/utilities/validators.d.mts +6 -0
  262. package/dist/form/utilities/validators.d.mts.map +1 -0
  263. package/dist/form/utilities/validators.mjs +2 -0
  264. package/dist/form/utilities/validators.mjs.map +1 -0
  265. package/dist/index.cjs +1 -0
  266. package/dist/index.d.cts +34 -0
  267. package/dist/index.d.mts +34 -0
  268. package/dist/index.mjs +1 -0
  269. package/dist/message/components/MessageViewport.cjs +1 -0
  270. package/dist/message/components/MessageViewport.d.cts +19 -0
  271. package/dist/message/components/MessageViewport.d.cts.map +1 -0
  272. package/dist/message/components/MessageViewport.d.mts +19 -0
  273. package/dist/message/components/MessageViewport.d.mts.map +1 -0
  274. package/dist/message/components/MessageViewport.mjs +2 -0
  275. package/dist/message/components/MessageViewport.mjs.map +1 -0
  276. package/dist/message/components/index.cjs +1 -0
  277. package/dist/message/components/index.d.cts +2 -0
  278. package/dist/message/components/index.d.mts +2 -0
  279. package/dist/message/components/index.mjs +1 -0
  280. package/dist/message/hooks/index.cjs +1 -0
  281. package/dist/message/hooks/index.d.cts +2 -0
  282. package/dist/message/hooks/index.d.mts +2 -0
  283. package/dist/message/hooks/index.mjs +1 -0
  284. package/dist/message/hooks/use-message-actions.cjs +1 -0
  285. package/dist/message/hooks/use-message-actions.d.cts +21 -0
  286. package/dist/message/hooks/use-message-actions.d.cts.map +1 -0
  287. package/dist/message/hooks/use-message-actions.d.mts +21 -0
  288. package/dist/message/hooks/use-message-actions.d.mts.map +1 -0
  289. package/dist/message/hooks/use-message-actions.mjs +2 -0
  290. package/dist/message/hooks/use-message-actions.mjs.map +1 -0
  291. package/dist/message/index.cjs +1 -0
  292. package/dist/message/index.d.cts +9 -0
  293. package/dist/message/index.d.mts +9 -0
  294. package/dist/message/index.mjs +1 -0
  295. package/dist/message/providers/MessageProvider.cjs +1 -0
  296. package/dist/message/providers/MessageProvider.d.cts +21 -0
  297. package/dist/message/providers/MessageProvider.d.cts.map +1 -0
  298. package/dist/message/providers/MessageProvider.d.mts +21 -0
  299. package/dist/message/providers/MessageProvider.d.mts.map +1 -0
  300. package/dist/message/providers/MessageProvider.mjs +2 -0
  301. package/dist/message/providers/MessageProvider.mjs.map +1 -0
  302. package/dist/message/providers/index.d.cts +2 -0
  303. package/dist/message/providers/index.d.mts +2 -0
  304. package/dist/message/types.d.cts +6 -0
  305. package/dist/message/types.d.cts.map +1 -0
  306. package/dist/message/types.d.mts +6 -0
  307. package/dist/message/types.d.mts.map +1 -0
  308. package/dist/theme/hooks/index.cjs +1 -0
  309. package/dist/theme/hooks/index.d.cts +3 -0
  310. package/dist/theme/hooks/index.d.mts +3 -0
  311. package/dist/theme/hooks/index.mjs +1 -0
  312. package/dist/theme/hooks/use-theme-actions.cjs +1 -0
  313. package/dist/theme/hooks/use-theme-actions.d.cts +11 -0
  314. package/dist/theme/hooks/use-theme-actions.d.cts.map +1 -0
  315. package/dist/theme/hooks/use-theme-actions.d.mts +11 -0
  316. package/dist/theme/hooks/use-theme-actions.d.mts.map +1 -0
  317. package/dist/theme/hooks/use-theme-actions.mjs +2 -0
  318. package/dist/theme/hooks/use-theme-actions.mjs.map +1 -0
  319. package/dist/theme/hooks/use-theme-store.cjs +1 -0
  320. package/dist/theme/hooks/use-theme-store.d.cts +49 -0
  321. package/dist/theme/hooks/use-theme-store.d.cts.map +1 -0
  322. package/dist/theme/hooks/use-theme-store.d.mts +49 -0
  323. package/dist/theme/hooks/use-theme-store.d.mts.map +1 -0
  324. package/dist/theme/hooks/use-theme-store.mjs +2 -0
  325. package/dist/theme/hooks/use-theme-store.mjs.map +1 -0
  326. package/dist/theme/index.cjs +1 -0
  327. package/dist/theme/index.d.cts +9 -0
  328. package/dist/theme/index.d.mts +9 -0
  329. package/dist/theme/index.mjs +1 -0
  330. package/dist/theme/molecules/index.cjs +1 -0
  331. package/dist/theme/molecules/index.d.cts +2 -0
  332. package/dist/theme/molecules/index.d.mts +2 -0
  333. package/dist/theme/molecules/index.mjs +1 -0
  334. package/dist/theme/molecules/theme-molecule.cjs +1 -0
  335. package/dist/theme/molecules/theme-molecule.d.cts +14 -0
  336. package/dist/theme/molecules/theme-molecule.d.cts.map +1 -0
  337. package/dist/theme/molecules/theme-molecule.d.mts +14 -0
  338. package/dist/theme/molecules/theme-molecule.d.mts.map +1 -0
  339. package/dist/theme/molecules/theme-molecule.mjs +2 -0
  340. package/dist/theme/molecules/theme-molecule.mjs.map +1 -0
  341. package/dist/theme/providers/ThemeProvider.cjs +5 -0
  342. package/dist/theme/providers/ThemeProvider.d.cts +13 -0
  343. package/dist/theme/providers/ThemeProvider.d.cts.map +1 -0
  344. package/dist/theme/providers/ThemeProvider.d.mts +13 -0
  345. package/dist/theme/providers/ThemeProvider.d.mts.map +1 -0
  346. package/dist/theme/providers/ThemeProvider.mjs +6 -0
  347. package/dist/theme/providers/ThemeProvider.mjs.map +1 -0
  348. package/dist/theme/types.cjs +1 -0
  349. package/dist/theme/types.d.cts +41 -0
  350. package/dist/theme/types.d.cts.map +1 -0
  351. package/dist/theme/types.d.mts +41 -0
  352. package/dist/theme/types.d.mts.map +1 -0
  353. package/dist/theme/types.mjs +2 -0
  354. package/dist/theme/types.mjs.map +1 -0
  355. package/dist/theme/utilities/theme-helpers.cjs +1 -0
  356. package/dist/theme/utilities/theme-helpers.d.cts +55 -0
  357. package/dist/theme/utilities/theme-helpers.d.cts.map +1 -0
  358. package/dist/theme/utilities/theme-helpers.d.mts +55 -0
  359. package/dist/theme/utilities/theme-helpers.d.mts.map +1 -0
  360. package/dist/theme/utilities/theme-helpers.mjs +2 -0
  361. package/dist/theme/utilities/theme-helpers.mjs.map +1 -0
  362. package/dist/types.cjs +0 -0
  363. package/dist/types.d.cts +55 -0
  364. package/dist/types.d.cts.map +1 -0
  365. package/dist/types.d.mts +55 -0
  366. package/dist/types.d.mts.map +1 -0
  367. package/dist/types.mjs +0 -0
  368. package/package.json +146 -0
@@ -0,0 +1,14 @@
1
+ import { Atom, Getter, Setter } from "jotai/vanilla";
2
+ //#region src/base/atoms/atom-with-effect.d.ts
3
+ type Cleanup = () => void;
4
+ type GetterWithPeek = Getter & {
5
+ peek: Getter;
6
+ };
7
+ type SetterWithRecurse = Setter & {
8
+ recurse: Setter;
9
+ };
10
+ type EffectCallback = (get: GetterWithPeek, set: SetterWithRecurse) => void | Cleanup;
11
+ declare function atomWithEffect(effect: EffectCallback): Atom<void>;
12
+ //#endregion
13
+ export { EffectCallback, atomWithEffect };
14
+ //# sourceMappingURL=atom-with-effect.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-effect.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-effect.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{atom as e}from"jotai/vanilla";import{isEqual as t}from"@stryke/helpers/is-equal";function n(n){let r=e(0),i=e(()=>({inProgress:0,mounted:!1,promise:void 0,pendingError:void 0,cleanup:void 0,fromCleanup:!1,isRecursing:!1,isRefreshing:!1,get:(()=>{}),set:(()=>{})}),(e,t)=>{let n=e(i);return Object.assign(n,{mounted:!0,get:e,set:t}),t(r,e=>e+1),()=>{n.mounted=!1,s(n),c(n)}});i.onMount=e=>e();let a=e(async e=>{e(r);let a=e(i);if(!a.mounted||a.isRecursing||a.inProgress&&!a.isRefreshing)return a.promise;c(a);let l=new Map,u=t=>{let n=e(t);return l.set(t,n),n};u.peek=e=>a.get(e);let d=(...t)=>{try{return++a.inProgress,a.set(...t)}finally{Array.from(l.keys(),e),--a.inProgress}};d.recurse=(n,...r)=>{if(!a.fromCleanup)try{return a.isRecursing=!0,a.set(n,...r)}finally{a.isRecursing=!1,Array.from(l).some(([n,r])=>!t(e(n),r))&&o(a)}},++a.inProgress;function f(){try{if(a.isRefreshing=!1,!a.mounted)return;s(a),a.cleanup=n(u,d)}catch(e){a.pendingError=e,o(a)}finally{a.promise=void 0,--a.inProgress}}return a.isRefreshing?f():a.promise=Promise.resolve().then(f)});return e(e=>void e(a));function o(e){try{e.isRefreshing=!0,e.set(r,e=>e+1)}finally{e.isRefreshing=!1}}function s(e){if(e.cleanup)try{e.fromCleanup=!0,e.cleanup()}finally{e.fromCleanup=!1,e.cleanup=void 0}}function c(e){if(`e`in e){let t=e.pendingError;throw delete e.pendingError,t}}}export{n as atomWithEffect};
2
+ //# sourceMappingURL=atom-with-effect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-effect.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs");let n=require("jotai"),r=require("react");function i(i){let a=e.isAtom(i)?i:t.baseAtom(i),o=t.baseAtom([]);return[t.baseAtom(e=>e(a),(e,t,n)=>{let r=e(a);t(a,n);let i=e(a);for(let n of e(o))n(e,t,i,r)}),e=>{let t=(0,n.useSetAtom)(o);(0,r.useEffect)(()=>(t(t=>[...t,e]),()=>t(t=>{let n=t.indexOf(e);return[...t.slice(0,n),...t.slice(n+1)]})),[t,e])}]}exports.atomWithListeners=i;
@@ -0,0 +1,13 @@
1
+ import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
2
+ //#region src/base/atoms/atom-with-listeners.d.ts
3
+ type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
4
+ /**
5
+ * Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
6
+ *
7
+ * @param initialValue - The initial value of the atom
8
+ * @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
9
+ */
10
+ declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
11
+ //#endregion
12
+ export { Callback, atomWithListeners };
13
+ //# sourceMappingURL=atom-with-listeners.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-listeners.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":";;KA6BY,SAAS,UACnB,KAAK,QACL,KAAK,QACL,QAAQ,OACR,SAAS;;;;;;;iBASK,kBAAkB,QAChC,cAAc,SAAS,aAAa,aAAa,kCAAqB,aAAA,SAAA,KAAA,eAAA,kBAAA,UAkBvC,SAAS"}
@@ -0,0 +1,13 @@
1
+ import { Getter, SetStateAction, Setter, WritableAtom } from "jotai/vanilla";
2
+ //#region src/base/atoms/atom-with-listeners.d.ts
3
+ type Callback<Value> = (get: Getter, set: Setter, newVal: Value, prevVal: Value) => void;
4
+ /**
5
+ * Creates an atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
6
+ *
7
+ * @param initialValue - The initial value of the atom
8
+ * @returns An atom that broadcasts its value to other tabs/windows using the BroadcastChannel API.
9
+ */
10
+ declare function atomWithListeners<TValue>(initialValue: TValue | WritableAtom<TValue, any, Promise<void> | void>): readonly [WritableAtom<TValue, [arg: SetStateAction<TValue>], void>, (callback: Callback<TValue>) => void];
11
+ //#endregion
12
+ export { Callback, atomWithListeners };
13
+ //# sourceMappingURL=atom-with-listeners.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-listeners.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-listeners.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{useSetAtom as n}from"jotai";import{useEffect as r}from"react";function i(i){let a=e(i)?i:t(i),o=t([]);return[t(e=>e(a),(e,t,n)=>{let r=e(a);t(a,n);let i=e(a);for(let n of e(o))n(e,t,i,r)}),e=>{let t=n(o);r(()=>(t(t=>[...t,e]),()=>t(t=>{let n=t.indexOf(e);return[...t.slice(0,n),...t.slice(n+1)]})),[t,e])}]}export{i as atomWithListeners};
2
+ //# sourceMappingURL=atom-with-listeners.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-listeners.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./base-atom.cjs");let t=require("@stryke/helpers/noop");const n=new Promise(t.noop),r=()=>e.baseAtom(n);exports.atomWithPending=r;
@@ -0,0 +1,12 @@
1
+ import { WithInitialValue } from "../../types.cjs";
2
+ import { PrimitiveAtom } from "jotai";
3
+ //#region src/base/atoms/atom-with-pending.d.ts
4
+ /**
5
+ * Creates an atom that always returns a pending promise.
6
+ *
7
+ * @returns An atom that always returns a pending promise.
8
+ */
9
+ declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
10
+ //#endregion
11
+ export { atomWithPending };
12
+ //# sourceMappingURL=atom-with-pending.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-pending.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":";;;;;;;;cA8Ba,kBAAmB,YAAU,cAAc,SACtD,iBAAiB"}
@@ -0,0 +1,12 @@
1
+ import { WithInitialValue } from "../../types.mjs";
2
+ import { PrimitiveAtom } from "jotai";
3
+ //#region src/base/atoms/atom-with-pending.d.ts
4
+ /**
5
+ * Creates an atom that always returns a pending promise.
6
+ *
7
+ * @returns An atom that always returns a pending promise.
8
+ */
9
+ declare const atomWithPending: <Value>() => PrimitiveAtom<Value> & WithInitialValue<Value>;
10
+ //#endregion
11
+ export { atomWithPending };
12
+ //# sourceMappingURL=atom-with-pending.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-pending.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-pending.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{baseAtom as e}from"./base-atom.mjs";import{noop as t}from"@stryke/helpers/noop";const n=new Promise(t),r=()=>e(n);export{r as atomWithPending};
2
+ //# sourceMappingURL=atom-with-pending.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-pending.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./base-atom.cjs"),t=(t,n)=>{let r=e.baseAtom(null);return e.baseAtom(e=>{let i=e(r);return i&&i.refresh===e(t)?i.value:n(e)},(e,n,i)=>{n(r,{refresh:e(t),value:i})})};exports.atomWithRefreshAndDefault=t;
@@ -0,0 +1,6 @@
1
+ import { Getter, PrimitiveAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-refresh-and-default.d.ts
3
+ declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
4
+ //#endregion
5
+ export { atomWithRefreshAndDefault };
6
+ //# sourceMappingURL=atom-with-refresh-and-default.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh-and-default.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":";;cAqBa,4BAA6B,QACxC,aAAa,uBACb,aAAa,KAAK,WAAW,2BAAM,aAAA,SAAA,QAAA"}
@@ -0,0 +1,6 @@
1
+ import { Getter, PrimitiveAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-refresh-and-default.d.ts
3
+ declare const atomWithRefreshAndDefault: <TValue>(refreshAtom: PrimitiveAtom<number>, getDefault: (get: Getter) => TValue) => import("jotai").WritableAtom<TValue, [update: TValue], void>;
4
+ //#endregion
5
+ export { atomWithRefreshAndDefault };
6
+ //# sourceMappingURL=atom-with-refresh-and-default.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh-and-default.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh-and-default.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{baseAtom as e}from"./base-atom.mjs";const t=(t,n)=>{let r=e(null);return e(e=>{let i=e(r);return i&&i.refresh===e(t)?i.value:n(e)},(e,n,i)=>{n(r,{refresh:e(t),value:i})})};export{t as atomWithRefreshAndDefault};
2
+ //# sourceMappingURL=atom-with-refresh-and-default.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh-and-default.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./base-atom.cjs");function t(t){let n=e.baseAtom(0);return e.baseAtom(e=>(e(n),t(e)),(e,t)=>t(n,e=>e+1))}exports.atomWithRefresh=t;
@@ -0,0 +1,6 @@
1
+ import { Getter } from "jotai";
2
+ //#region src/base/atoms/atom-with-refresh.d.ts
3
+ declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
4
+ //#endregion
5
+ export { atomWithRefresh };
6
+ //# sourceMappingURL=atom-with-refresh.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":";;iBAqBgB,gBAAgB,QAAQ,KAAK,KAAK,WAAW,yBAAM,aAAA"}
@@ -0,0 +1,6 @@
1
+ import { Getter } from "jotai";
2
+ //#region src/base/atoms/atom-with-refresh.d.ts
3
+ declare function atomWithRefresh<TValue>(fn: (get: Getter) => TValue): import("jotai").WritableAtom<TValue, [], void>;
4
+ //#endregion
5
+ export { atomWithRefresh };
6
+ //# sourceMappingURL=atom-with-refresh.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-refresh.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{baseAtom as e}from"./base-atom.mjs";function t(t){let n=e(0);return e(e=>(e(n),t(e)),(e,t)=>t(n,e=>e+1))}export{t as atomWithRefresh};
2
+ //# sourceMappingURL=atom-with-refresh.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-refresh.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./base-atom.cjs");function t(t){let n=e.baseAtom(t,(e,t,r)=>{let i=r??!e(n);t(n,i)});return n}exports.atomWithToggle=t;
@@ -0,0 +1,6 @@
1
+ import { WritableAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-toggle.d.ts
3
+ declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
4
+ //#endregion
5
+ export { atomWithToggle };
6
+ //# sourceMappingURL=atom-with-toggle.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-toggle.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":";;iBAqBgB,eACd,yBACC"}
@@ -0,0 +1,6 @@
1
+ import { WritableAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-toggle.d.ts
3
+ declare function atomWithToggle(initialValue?: boolean): WritableAtom<boolean, [boolean | undefined], void>;
4
+ //#endregion
5
+ export { atomWithToggle };
6
+ //# sourceMappingURL=atom-with-toggle.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-toggle.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-toggle.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{baseAtom as e}from"./base-atom.mjs";function t(t){let n=e(t,(e,t,r)=>{let i=r??!e(n);t(n,i)});return n}export{t as atomWithToggle};
2
+ //# sourceMappingURL=atom-with-toggle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-toggle.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("../utilities/is-atom.cjs"),t=require("./base-atom.cjs"),n=require("./atom-with-broadcast.cjs"),r=require("./atom-with-debounce.cjs"),i=require("./atom-with-effect.cjs"),a=require("../utilities/create-web-storage.cjs");let o=require("@stryke/type-checks/is-function"),s=require("jotai/utils");const c=()=>a.createWebStorage(()=>localStorage);function l(a,l,u=c(),d){let f=d?.debounceMs??500,p=d?.getOnInit??!0,m=e.isAtom(l)?l:t.baseAtom(l),h=r.atomWithDebounce((0,s.atomWithStorage)(a,e.isAtom(l)?void 0:l,u,{getOnInit:p}),f),g=r.atomWithDebounce(n.atomWithBroadcast(a,e.isAtom(l)?void 0:l),f),_=t.baseAtom(e=>e(m),(e,t,n)=>{let r=(0,o.isFunction)(n)?n(e(m)):n;t(m,r),t(h.debouncedValueAtom,r),t(g.debouncedValueAtom,r)}),v=i.atomWithEffect((e,t)=>{let n=e(g.debouncedValueAtom);n!==e(_)&&t(_,n)});return t.baseAtom(e=>(e(v),e(_)),(e,t,n)=>{t(_,n)})}exports.atomWithWebStorage=l,exports.getWebStorage=c;
@@ -0,0 +1,20 @@
1
+ import { PrimitiveAtom, WritableAtom } from "jotai";
2
+ import { atomWithStorage } from "jotai/utils";
3
+ import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
4
+ import { SetStateAction as SetStateAction$1 } from "react";
5
+ //#region src/base/atoms/atom-with-web-storage.d.ts
6
+ declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
7
+ /**
8
+ * Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
9
+ *
10
+ * @param key - The key to use for the storage
11
+ * @param initialValue - The initial value of the atom
12
+ * @param webStorage - The storage to use
13
+ * @returns An atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
14
+ */
15
+ declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
16
+ debounceMs?: number;
17
+ } & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
18
+ //#endregion
19
+ export { atomWithWebStorage, getWebStorage };
20
+ //# sourceMappingURL=atom-with-web-storage.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-web-storage.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":";;;;;cAiCa,gBAAiB,aAC5B,aAAa,UAAU,YAAY;;;;;;;;;iBAWrB,mBAAmB,QACjC,aACA,oBACI,cAAc,UACd,SACA,aAAa,SAAS,iBAAe,iBACzC,aACE,aAAa,UAAU,YAAY,SACrC;EAAY;IAAwB,kBAAkB,sBACrD,aAAa,SAAS,iBAAe"}
@@ -0,0 +1,20 @@
1
+ import { atomWithStorage } from "jotai/utils";
2
+ import { PrimitiveAtom, WritableAtom } from "jotai";
3
+ import { SetStateAction as SetStateAction$1 } from "react";
4
+ import { AsyncStorage, SyncStorage } from "jotai/vanilla/utils/atomWithStorage";
5
+ //#region src/base/atoms/atom-with-web-storage.d.ts
6
+ declare const getWebStorage: <TValue>() => AsyncStorage<TValue> | SyncStorage<TValue>;
7
+ /**
8
+ * Creates an atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
9
+ *
10
+ * @param key - The key to use for the storage
11
+ * @param initialValue - The initial value of the atom
12
+ * @param webStorage - The storage to use
13
+ * @returns An atom that persists its state in external storage and sends a broadcast message to other tabs/windows when the state changes.
14
+ */
15
+ declare function atomWithWebStorage<TValue>(key: string, initialValueOrAtom: PrimitiveAtom<TValue> | TValue | WritableAtom<TValue, [SetStateAction$1<TValue>], void>, webStorage?: AsyncStorage<TValue> | SyncStorage<TValue>, options?: {
16
+ debounceMs?: number;
17
+ } & Parameters<typeof atomWithStorage>[3]): WritableAtom<TValue, [SetStateAction$1<TValue>], void>;
18
+ //#endregion
19
+ export { atomWithWebStorage, getWebStorage };
20
+ //# sourceMappingURL=atom-with-web-storage.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-web-storage.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-web-storage.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{isAtom as e}from"../utilities/is-atom.mjs";import{baseAtom as t}from"./base-atom.mjs";import{atomWithBroadcast as n}from"./atom-with-broadcast.mjs";import{atomWithDebounce as r}from"./atom-with-debounce.mjs";import{atomWithEffect as i}from"./atom-with-effect.mjs";import{createWebStorage as a}from"../utilities/create-web-storage.mjs";import{isFunction as o}from"@stryke/type-checks/is-function";import{atomWithStorage as s}from"jotai/utils";const c=()=>a(()=>localStorage);function l(a,l,u=c(),d){let f=d?.debounceMs??500,p=d?.getOnInit??!0,m=e(l)?l:t(l),h=r(s(a,e(l)?void 0:l,u,{getOnInit:p}),f),g=r(n(a,e(l)?void 0:l),f),_=t(e=>e(m),(e,t,n)=>{let r=o(n)?n(e(m)):n;t(m,r),t(h.debouncedValueAtom,r),t(g.debouncedValueAtom,r)}),v=i((e,t)=>{let n=e(g.debouncedValueAtom);n!==e(_)&&t(_,n)});return t(e=>(e(v),e(_)),(e,t,n)=>{t(_,n)})}export{l as atomWithWebStorage,c as getWebStorage};
2
+ //# sourceMappingURL=atom-with-web-storage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-web-storage.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./base-atom.cjs");let t=require("@stryke/type-checks/is-function");const n=e=>(0,t.isFunction)(e)?{__fn:e}:e,r=e=>e&&typeof e==`object`&&`__fn`in e?e.__fn:e,i=t=>{let i=e.baseAtom(n(t));return e.baseAtom(e=>r(e(i)),(e,t,r)=>t(i,n(r)))};exports.atomWithWrapper=i;
@@ -0,0 +1,18 @@
1
+ import { WritableAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-wrapper.d.ts
3
+ /**
4
+ * Create an atom with a wrapper that allows functions as values.
5
+ *
6
+ * @remarks
7
+ * Jotai atoms don't allow functions as values by default. This function is a
8
+ * drop-in replacement for `atom` that wraps functions in an object while
9
+ * leaving non-functions unchanged. The wrapper object should be completely
10
+ * invisible to consumers of the atom.
11
+ *
12
+ * @param initialValue - The initial value of the atom
13
+ * @returns An atom with a wrapper that allows functions as values.
14
+ */
15
+ declare const atomWithWrapper: <TValue>(initialValue: TValue) => WritableAtom<TValue, [TValue], Promise<void> | void>;
16
+ //#endregion
17
+ export { atomWithWrapper };
18
+ //# sourceMappingURL=atom-with-wrapper.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-wrapper.d.cts","names":[],"sources":["../../../src/base/atoms/atom-with-wrapper.ts"],"mappings":";;;;;;;;;;;;;;cAiDa,kBAAmB,QAC9B,cAAc,WACb,aAAa,SAAS,SAAS"}
@@ -0,0 +1,18 @@
1
+ import { WritableAtom } from "jotai";
2
+ //#region src/base/atoms/atom-with-wrapper.d.ts
3
+ /**
4
+ * Create an atom with a wrapper that allows functions as values.
5
+ *
6
+ * @remarks
7
+ * Jotai atoms don't allow functions as values by default. This function is a
8
+ * drop-in replacement for `atom` that wraps functions in an object while
9
+ * leaving non-functions unchanged. The wrapper object should be completely
10
+ * invisible to consumers of the atom.
11
+ *
12
+ * @param initialValue - The initial value of the atom
13
+ * @returns An atom with a wrapper that allows functions as values.
14
+ */
15
+ declare const atomWithWrapper: <TValue>(initialValue: TValue) => WritableAtom<TValue, [TValue], Promise<void> | void>;
16
+ //#endregion
17
+ export { atomWithWrapper };
18
+ //# sourceMappingURL=atom-with-wrapper.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-wrapper.d.mts","names":[],"sources":["../../../src/base/atoms/atom-with-wrapper.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{baseAtom as e}from"./base-atom.mjs";import{isFunction as t}from"@stryke/type-checks/is-function";const n=e=>t(e)?{__fn:e}:e,r=e=>e&&typeof e==`object`&&`__fn`in e?e.__fn:e,i=t=>{let i=e(n(t));return e(e=>r(e(i)),(e,t,r)=>t(i,n(r)))};export{i as atomWithWrapper};
2
+ //# sourceMappingURL=atom-with-wrapper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atom-with-wrapper.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("../utilities/set-atom-debug.cjs");let t=require("jotai/vanilla");function n(n,r){let i=(0,t.atom)(n,r);return i.setDebugLabel=t=>{e.setAtomDebugLabel(i,t)},i}exports.baseAtom=n;
@@ -0,0 +1,2 @@
1
+ import{setAtomDebugLabel as e}from"../utilities/set-atom-debug.mjs";import{atom as t}from"jotai/vanilla";function n(n,r){let i=t(n,r);return i.setDebugLabel=t=>{e(i,t)},i}export{n as baseAtom};
2
+ //# sourceMappingURL=base-atom.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-atom.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("./atom-with-broadcast.cjs"),t=require("./atom-with-compare.cjs"),n=require("./atom-with-wrapper.cjs"),r=require("./atom-with-debounce.cjs"),i=require("./atom-with-effect.cjs"),a=require("./atom-with-listeners.cjs"),o=require("./atom-with-pending.cjs"),s=require("./atom-with-refresh.cjs"),c=require("./atom-with-refresh-and-default.cjs"),l=require("./atom-with-toggle.cjs"),u=require("./atom-with-web-storage.cjs");exports.atomWithBroadcast=e.atomWithBroadcast,exports.atomWithCompare=t.atomWithCompare,exports.atomWithDebounce=r.atomWithDebounce,exports.atomWithEffect=i.atomWithEffect,exports.atomWithListeners=a.atomWithListeners,exports.atomWithPending=o.atomWithPending,exports.atomWithRefresh=s.atomWithRefresh,exports.atomWithRefreshAndDefault=c.atomWithRefreshAndDefault,exports.atomWithToggle=l.atomWithToggle,exports.atomWithWebStorage=u.atomWithWebStorage,exports.atomWithWrapper=n.atomWithWrapper,exports.getWebStorage=u.getWebStorage;
@@ -0,0 +1,12 @@
1
+ import { atomWithBroadcast } from "./atom-with-broadcast.cjs";
2
+ import { atomWithCompare } from "./atom-with-compare.cjs";
3
+ import { atomWithDebounce } from "./atom-with-debounce.cjs";
4
+ import { EffectCallback, atomWithEffect } from "./atom-with-effect.cjs";
5
+ import { Callback, atomWithListeners } from "./atom-with-listeners.cjs";
6
+ import { atomWithPending } from "./atom-with-pending.cjs";
7
+ import { atomWithRefresh } from "./atom-with-refresh.cjs";
8
+ import { atomWithRefreshAndDefault } from "./atom-with-refresh-and-default.cjs";
9
+ import { atomWithToggle } from "./atom-with-toggle.cjs";
10
+ import { atomWithWebStorage, getWebStorage } from "./atom-with-web-storage.cjs";
11
+ import { atomWithWrapper } from "./atom-with-wrapper.cjs";
12
+ export { Callback, EffectCallback, atomWithBroadcast, atomWithCompare, atomWithDebounce, atomWithEffect, atomWithListeners, atomWithPending, atomWithRefresh, atomWithRefreshAndDefault, atomWithToggle, atomWithWebStorage, atomWithWrapper, getWebStorage };
@@ -0,0 +1,12 @@
1
+ import { atomWithBroadcast } from "./atom-with-broadcast.mjs";
2
+ import { atomWithCompare } from "./atom-with-compare.mjs";
3
+ import { atomWithDebounce } from "./atom-with-debounce.mjs";
4
+ import { EffectCallback, atomWithEffect } from "./atom-with-effect.mjs";
5
+ import { Callback, atomWithListeners } from "./atom-with-listeners.mjs";
6
+ import { atomWithPending } from "./atom-with-pending.mjs";
7
+ import { atomWithRefresh } from "./atom-with-refresh.mjs";
8
+ import { atomWithRefreshAndDefault } from "./atom-with-refresh-and-default.mjs";
9
+ import { atomWithToggle } from "./atom-with-toggle.mjs";
10
+ import { atomWithWebStorage, getWebStorage } from "./atom-with-web-storage.mjs";
11
+ import { atomWithWrapper } from "./atom-with-wrapper.mjs";
12
+ export { Callback, EffectCallback, atomWithBroadcast, atomWithCompare, atomWithDebounce, atomWithEffect, atomWithListeners, atomWithPending, atomWithRefresh, atomWithRefreshAndDefault, atomWithToggle, atomWithWebStorage, atomWithWrapper, getWebStorage };
@@ -0,0 +1 @@
1
+ import{atomWithBroadcast as e}from"./atom-with-broadcast.mjs";import{atomWithCompare as t}from"./atom-with-compare.mjs";import{atomWithWrapper as n}from"./atom-with-wrapper.mjs";import{atomWithDebounce as r}from"./atom-with-debounce.mjs";import{atomWithEffect as i}from"./atom-with-effect.mjs";import{atomWithListeners as a}from"./atom-with-listeners.mjs";import{atomWithPending as o}from"./atom-with-pending.mjs";import{atomWithRefresh as s}from"./atom-with-refresh.mjs";import{atomWithRefreshAndDefault as c}from"./atom-with-refresh-and-default.mjs";import{atomWithToggle as l}from"./atom-with-toggle.mjs";import{atomWithWebStorage as u,getWebStorage as d}from"./atom-with-web-storage.mjs";export{e as atomWithBroadcast,t as atomWithCompare,r as atomWithDebounce,i as atomWithEffect,a as atomWithListeners,o as atomWithPending,s as atomWithRefresh,c as atomWithRefreshAndDefault,l as atomWithToggle,u as atomWithWebStorage,n as atomWithWrapper,d as getWebStorage};
@@ -0,0 +1 @@
1
+ const e=require("./use-atom-effect.cjs"),t=require("./use-hydrate-molecule.cjs"),n=require("./use-prepare-atoms.cjs"),r=require("./use-sync-molecule.cjs");exports.useAtomEffect=e.useAtomEffect,exports.useHydrateMolecule=t.useHydrateMolecule,exports.usePrepareAtoms=n.usePrepareAtoms,exports.useSyncMolecule=r.useSyncMolecule;
@@ -0,0 +1,5 @@
1
+ import { useAtomEffect } from "./use-atom-effect.cjs";
2
+ import { UseHydrateAtoms, useHydrateMolecule } from "./use-hydrate-molecule.cjs";
3
+ import { usePrepareAtoms } from "./use-prepare-atoms.cjs";
4
+ import { UseSyncAtoms, useSyncMolecule } from "./use-sync-molecule.cjs";
5
+ export { UseHydrateAtoms, UseSyncAtoms, useAtomEffect, useHydrateMolecule, usePrepareAtoms, useSyncMolecule };
@@ -0,0 +1,5 @@
1
+ import { useAtomEffect } from "./use-atom-effect.mjs";
2
+ import { UseHydrateAtoms, useHydrateMolecule } from "./use-hydrate-molecule.mjs";
3
+ import { usePrepareAtoms } from "./use-prepare-atoms.mjs";
4
+ import { UseSyncAtoms, useSyncMolecule } from "./use-sync-molecule.mjs";
5
+ export { UseHydrateAtoms, UseSyncAtoms, useAtomEffect, useHydrateMolecule, usePrepareAtoms, useSyncMolecule };
@@ -0,0 +1 @@
1
+ import{useAtomEffect as e}from"./use-atom-effect.mjs";import{useHydrateMolecule as t}from"./use-hydrate-molecule.mjs";import{usePrepareAtoms as n}from"./use-prepare-atoms.mjs";import{useSyncMolecule as r}from"./use-sync-molecule.mjs";export{e as useAtomEffect,t as useHydrateMolecule,n as usePrepareAtoms,r as useSyncMolecule};
@@ -0,0 +1 @@
1
+ const e=require("../atoms/atom-with-effect.cjs");let t=require("jotai/utils"),n=require("@stryke/hooks/use-memo-stable"),r=require("jotai/react");function i(i,a=[]){(0,r.useAtomValue)((0,t.loadable)((0,n.useMemoStable)(()=>e.atomWithEffect(i),a)))}exports.useAtomEffect=i;
@@ -0,0 +1,11 @@
1
+ import { EffectCallback } from "../atoms/atom-with-effect.cjs";
2
+ //#region src/base/hooks/use-atom-effect.d.ts
3
+ /**
4
+ * A hook that runs a side effect when the component mounts.
5
+ *
6
+ * @param effectFn - The side effect function.
7
+ */
8
+ declare function useAtomEffect(effectFn: EffectCallback, deps?: any[]): void;
9
+ //#endregion
10
+ export { useAtomEffect };
11
+ //# sourceMappingURL=use-atom-effect.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-atom-effect.d.cts","names":[],"sources":["../../../src/base/hooks/use-atom-effect.ts"],"mappings":";;;;;;;iBA6BgB,cAAc,UAAU,gBAAgB"}
@@ -0,0 +1,11 @@
1
+ import { EffectCallback } from "../atoms/atom-with-effect.mjs";
2
+ //#region src/base/hooks/use-atom-effect.d.ts
3
+ /**
4
+ * A hook that runs a side effect when the component mounts.
5
+ *
6
+ * @param effectFn - The side effect function.
7
+ */
8
+ declare function useAtomEffect(effectFn: EffectCallback, deps?: any[]): void;
9
+ //#endregion
10
+ export { useAtomEffect };
11
+ //# sourceMappingURL=use-atom-effect.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-atom-effect.d.mts","names":[],"sources":["../../../src/base/hooks/use-atom-effect.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{atomWithEffect as e}from"../atoms/atom-with-effect.mjs";import{loadable as t}from"jotai/utils";import{useMemoStable as n}from"@stryke/hooks/use-memo-stable";import{useAtomValue as r}from"jotai/react";function i(i,a=[]){r(t(n(()=>e(i),a)))}export{i as useAtomEffect};
2
+ //# sourceMappingURL=use-atom-effect.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-atom-effect.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ let e=require("jotai/utils");const t=(t,n,r)=>{let i=[];for(let e of Object.keys(t)){let r=n[e];r!==void 0&&i.push([t[e],r])}(0,e.useHydrateAtoms)(i,{store:r})};exports.useHydrateMolecule=t;
@@ -0,0 +1,11 @@
1
+ import { JotaiStore, WritableAtomRecord } from "../../types.cjs";
2
+ import { useHydrateAtoms } from "jotai/utils";
3
+ //#region src/base/hooks/use-hydrate-molecule.d.ts
4
+ type UseHydrateAtoms<T> = (initialValues: Partial<Record<keyof T, any>>, options?: Parameters<typeof useHydrateAtoms>[1]) => void;
5
+ /**
6
+ * Hydrate atoms with initial values for SSR.
7
+ */
8
+ declare const useHydrateMolecule: <T extends object>(atoms: WritableAtomRecord<T>, initialValues: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
9
+ //#endregion
10
+ export { UseHydrateAtoms, useHydrateMolecule };
11
+ //# sourceMappingURL=use-hydrate-molecule.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-hydrate-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-hydrate-molecule.ts"],"mappings":";;;KAsBY,gBAAgB,MAC1B,eAAe,QAAQ,aAAa,UACpC,UAAU,kBAAkB;;;;cAMjB,qBAAsB,kBACjC,OAAO,mBAAmB,IAC1B,eAAe,QAAQ,aAAa,cACpC,QAAQ"}
@@ -0,0 +1,11 @@
1
+ import { JotaiStore, WritableAtomRecord } from "../../types.mjs";
2
+ import { useHydrateAtoms } from "jotai/utils";
3
+ //#region src/base/hooks/use-hydrate-molecule.d.ts
4
+ type UseHydrateAtoms<T> = (initialValues: Partial<Record<keyof T, any>>, options?: Parameters<typeof useHydrateAtoms>[1]) => void;
5
+ /**
6
+ * Hydrate atoms with initial values for SSR.
7
+ */
8
+ declare const useHydrateMolecule: <T extends object>(atoms: WritableAtomRecord<T>, initialValues: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
9
+ //#endregion
10
+ export { UseHydrateAtoms, useHydrateMolecule };
11
+ //# sourceMappingURL=use-hydrate-molecule.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-hydrate-molecule.d.mts","names":[],"sources":["../../../src/base/hooks/use-hydrate-molecule.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{useHydrateAtoms as e}from"jotai/utils";const t=(t,n,r)=>{let i=[];for(let e of Object.keys(t)){let r=n[e];r!==void 0&&i.push([t[e],r])}e(i,{store:r})};export{t as useHydrateMolecule};
2
+ //# sourceMappingURL=use-hydrate-molecule.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-hydrate-molecule.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ let e=require("jotai/vanilla"),t=require("react"),n=require("jotai/react");function r(e,n=(e,t)=>e===t){let[r,i]=(0,t.useState)(e),a=e.length!==r.length||e.some((e,t)=>!n(e,r[t]));return a&&i(e),a?e:r}function i(i,a){let o=r(i);(0,n.useAtomValue)((0,t.useMemo)(()=>(0,e.atom)(e=>{o.map(t=>e(t))}),[o]),a)}exports.usePrepareAtoms=i;
@@ -0,0 +1,8 @@
1
+ import { Atom } from "jotai/vanilla";
2
+ import { useAtomValue } from "jotai/react";
3
+ //#region src/base/hooks/use-prepare-atoms.d.ts
4
+ type Options = Parameters<typeof useAtomValue>[1];
5
+ declare function usePrepareAtoms(atoms: Atom<unknown>[], options?: Options): void;
6
+ //#endregion
7
+ export { usePrepareAtoms };
8
+ //# sourceMappingURL=use-prepare-atoms.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-prepare-atoms.d.cts","names":[],"sources":["../../../src/base/hooks/use-prepare-atoms.ts"],"mappings":";;;KAmCK,UAAU,kBAAkB;iBAEjB,gBAAgB,OAAO,iBAAiB,UAAU"}
@@ -0,0 +1,8 @@
1
+ import { Atom } from "jotai/vanilla";
2
+ import { useAtomValue } from "jotai/react";
3
+ //#region src/base/hooks/use-prepare-atoms.d.ts
4
+ type Options = Parameters<typeof useAtomValue>[1];
5
+ declare function usePrepareAtoms(atoms: Atom<unknown>[], options?: Options): void;
6
+ //#endregion
7
+ export { usePrepareAtoms };
8
+ //# sourceMappingURL=use-prepare-atoms.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-prepare-atoms.d.mts","names":[],"sources":["../../../src/base/hooks/use-prepare-atoms.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{atom as e}from"jotai/vanilla";import{useMemo as t,useState as n}from"react";import{useAtomValue as r}from"jotai/react";function i(e,t=(e,t)=>e===t){let[r,i]=n(e),a=e.length!==r.length||e.some((e,n)=>!t(e,r[n]));return a&&i(e),a?e:r}function a(n,a){let o=i(n);r(t(()=>e(e=>{o.map(t=>e(t))}),[o]),a)}export{a as usePrepareAtoms};
2
+ //# sourceMappingURL=use-prepare-atoms.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-prepare-atoms.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=require("../utilities/is-atom.cjs");let t=require("jotai"),n=require("react");const r=(r,i,a)=>{for(let o of Object.keys(r)){let s=i[o];e.isAtom(s)&&(s=(0,t.useAtomValue)(s));let c=(0,t.useSetAtom)(r[o],{store:a});(0,n.useEffect)(()=>{s!==void 0&&c(s)},[c,s])}};exports.useSyncMolecule=r;
@@ -0,0 +1,10 @@
1
+ import { JotaiStore, WritableAtomRecord } from "../../types.cjs";
2
+ //#region src/base/hooks/use-sync-molecule.d.ts
3
+ type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
4
+ /**
5
+ * Update atoms with new values on changes.
6
+ */
7
+ declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
8
+ //#endregion
9
+ export { UseSyncAtoms, useSyncMolecule };
10
+ //# sourceMappingURL=use-sync-molecule.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sync-molecule.d.cts","names":[],"sources":["../../../src/base/hooks/use-sync-molecule.ts"],"mappings":";;KA4BY,aAAa,MACvB,QAAQ,QAAQ,aAAa,UAC7B,QAAQ;;;;cAMG,kBAAmB,kBAC9B,OAAO,mBAAmB,IAC1B,QAAQ,QAAQ,aAAa,cAC7B,QAAQ"}
@@ -0,0 +1,10 @@
1
+ import { JotaiStore, WritableAtomRecord } from "../../types.mjs";
2
+ //#region src/base/hooks/use-sync-molecule.d.ts
3
+ type UseSyncAtoms<T> = (values: Partial<Record<keyof T, any>>, store?: JotaiStore) => void;
4
+ /**
5
+ * Update atoms with new values on changes.
6
+ */
7
+ declare const useSyncMolecule: <T extends object>(atoms: WritableAtomRecord<T>, values: Partial<Record<keyof T, unknown>>, store?: JotaiStore) => void;
8
+ //#endregion
9
+ export { UseSyncAtoms, useSyncMolecule };
10
+ //# sourceMappingURL=use-sync-molecule.d.mts.map