@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,49 @@
1
+ import { MoleculeScopeOptions } from "../../base/utilities/create-molecule.mjs";
2
+ import { ColorThemeName } from "../types.mjs";
3
+ //#region src/theme/hooks/use-theme-store.d.ts
4
+ /**
5
+ * Get the color role scheme for the current theme name
6
+ *
7
+ * @remarks
8
+ * The following color roles are checked:
9
+ * - base
10
+ * - brand
11
+ * - alternate
12
+ * - accent
13
+ * - link
14
+ * - help
15
+ * - info
16
+ * - warning
17
+ * - danger
18
+ * - success
19
+ * - positive
20
+ * - negative
21
+ *
22
+ * @returns The color role scheme for the theme name or undefined
23
+ */
24
+ declare const useColorThemeName: () => ColorThemeName | undefined;
25
+ /**
26
+ * Check if a color role scheme is set for the current theme name
27
+ *
28
+ * @remarks
29
+ * The following color roles are checked:
30
+ * - base
31
+ * - brand
32
+ * - alternate
33
+ * - accent
34
+ * - link
35
+ * - help
36
+ * - info
37
+ * - warning
38
+ * - danger
39
+ * - success
40
+ * - positive
41
+ * - negative
42
+ *
43
+ * @returns An indication if a theme color scheme is set
44
+ */
45
+ declare const useColorThemeNameExists: () => boolean;
46
+ declare const useThemeMode: (options?: MoleculeScopeOptions) => string;
47
+ //#endregion
48
+ export { useColorThemeName, useColorThemeNameExists, useThemeMode };
49
+ //# sourceMappingURL=use-theme-store.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-theme-store.d.mts","names":[],"sources":["../../../src/theme/hooks/use-theme-store.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{ThemeApi as e}from"../molecules/theme-molecule.mjs";import{getThemeColorThemeName as t,themeColorThemeNameExists as n}from"../utilities/theme-helpers.mjs";import{useThemeName as r}from"@tamagui/core";const i=()=>{let e=r();return t(e)},a=()=>{let e=r();return n(e)},o=t=>e.use(t).mode.get();export{i as useColorThemeName,a as useColorThemeNameExists,o as useThemeMode};
2
+ //# sourceMappingURL=use-theme-store.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-theme-store.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./molecules/theme-molecule.cjs"),t=require("./hooks/use-theme-actions.cjs"),n=require("./utilities/theme-helpers.cjs"),r=require("./hooks/use-theme-store.cjs");require("./hooks/index.cjs"),require("./molecules/index.cjs");const i=require("./providers/ThemeProvider.cjs"),a=require("./types.cjs");exports.ColorThemeName=a.ColorThemeName,exports.ThemeApi=e.ThemeApi,exports.ThemeProvider=i.ThemeProvider,exports.getThemeColorThemeName=n.getThemeColorThemeName,exports.themeColorThemeNameExists=n.themeColorThemeNameExists,exports.useColorThemeName=r.useColorThemeName,exports.useColorThemeNameExists=r.useColorThemeNameExists,exports.useThemeActions=t.useThemeActions,exports.useThemeMode=r.useThemeMode;
@@ -0,0 +1,9 @@
1
+ import { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions } from "./types.cjs";
2
+ import { useThemeActions } from "./hooks/use-theme-actions.cjs";
3
+ import { useColorThemeName, useColorThemeNameExists, useThemeMode } from "./hooks/use-theme-store.cjs";
4
+ import "./hooks/index.cjs";
5
+ import { ThemeApi } from "./molecules/theme-molecule.cjs";
6
+ import "./molecules/index.cjs";
7
+ import { ThemeProvider, ThemeProviderProps } from "./providers/ThemeProvider.cjs";
8
+ import { getThemeColorThemeName, themeColorThemeNameExists } from "./utilities/theme-helpers.cjs";
9
+ export { ColorThemeMode, ColorThemeName, ThemeApi, ThemeBaseState, ThemeOptions, ThemeProvider, ThemeProviderProps, getThemeColorThemeName, themeColorThemeNameExists, useColorThemeName, useColorThemeNameExists, useThemeActions, useThemeMode };
@@ -0,0 +1,9 @@
1
+ import { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions } from "./types.mjs";
2
+ import { useThemeActions } from "./hooks/use-theme-actions.mjs";
3
+ import { useColorThemeName, useColorThemeNameExists, useThemeMode } from "./hooks/use-theme-store.mjs";
4
+ import "./hooks/index.mjs";
5
+ import { ThemeApi } from "./molecules/theme-molecule.mjs";
6
+ import "./molecules/index.mjs";
7
+ import { ThemeProvider, ThemeProviderProps } from "./providers/ThemeProvider.mjs";
8
+ import { getThemeColorThemeName, themeColorThemeNameExists } from "./utilities/theme-helpers.mjs";
9
+ export { ColorThemeMode, ColorThemeName, ThemeApi, ThemeBaseState, ThemeOptions, ThemeProvider, ThemeProviderProps, getThemeColorThemeName, themeColorThemeNameExists, useColorThemeName, useColorThemeNameExists, useThemeActions, useThemeMode };
@@ -0,0 +1 @@
1
+ import{ThemeApi as e}from"./molecules/theme-molecule.mjs";import{useThemeActions as t}from"./hooks/use-theme-actions.mjs";import{getThemeColorThemeName as n,themeColorThemeNameExists as r}from"./utilities/theme-helpers.mjs";import{useColorThemeName as i,useColorThemeNameExists as a,useThemeMode as o}from"./hooks/use-theme-store.mjs";import"./hooks/index.mjs";import"./molecules/index.mjs";import{ThemeProvider as s}from"./providers/ThemeProvider.mjs";import{ColorThemeName as c}from"./types.mjs";export{c as ColorThemeName,e as ThemeApi,s as ThemeProvider,n as getThemeColorThemeName,r as themeColorThemeNameExists,i as useColorThemeName,a as useColorThemeNameExists,t as useThemeActions,o as useThemeMode};
@@ -0,0 +1 @@
1
+ const e=require("./theme-molecule.cjs");exports.ThemeApi=e.ThemeApi;
@@ -0,0 +1,2 @@
1
+ import { ThemeApi } from "./theme-molecule.cjs";
2
+ export { ThemeApi };
@@ -0,0 +1,2 @@
1
+ import { ThemeApi } from "./theme-molecule.mjs";
2
+ export { ThemeApi };
@@ -0,0 +1 @@
1
+ import{ThemeApi as e}from"./theme-molecule.mjs";export{e as ThemeApi};
@@ -0,0 +1 @@
1
+ const e=require("../../base/utilities/create-molecule.cjs");let t=require("jotai/utils"),n=require("jotai");const r=e.createMoleculeApi(()=>({items:(0,n.atom)([`light`,`dark`]),mode:(0,t.atomWithReset)(`dark`)}),{type:`theme`});exports.ThemeApi=r;
@@ -0,0 +1,14 @@
1
+ import { MoleculeApi } from "../../base/utilities/create-molecule.cjs";
2
+ import "../../index.cjs";
3
+ //#region src/theme/molecules/theme-molecule.d.ts
4
+ declare const ThemeApi: MoleculeApi<{
5
+ items: import("jotai").PrimitiveAtom<string[]> & {
6
+ init: string[];
7
+ };
8
+ mode: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void> & {
9
+ init: string;
10
+ };
11
+ }>;
12
+ //#endregion
13
+ export { ThemeApi };
14
+ //# sourceMappingURL=theme-molecule.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-molecule.d.cts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":";;;cAsBa,UAAA"}
@@ -0,0 +1,14 @@
1
+ import { MoleculeApi } from "../../base/utilities/create-molecule.mjs";
2
+ import "../../index.mjs";
3
+ //#region src/theme/molecules/theme-molecule.d.ts
4
+ declare const ThemeApi: MoleculeApi<{
5
+ items: import("jotai").PrimitiveAtom<string[]> & {
6
+ init: string[];
7
+ };
8
+ mode: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void> & {
9
+ init: string;
10
+ };
11
+ }>;
12
+ //#endregion
13
+ export { ThemeApi };
14
+ //# sourceMappingURL=theme-molecule.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-molecule.d.mts","names":[],"sources":["../../../src/theme/molecules/theme-molecule.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{createMoleculeApi as e}from"../../base/utilities/create-molecule.mjs";import{atomWithReset as t}from"jotai/utils";import{atom as n}from"jotai";const r=e(()=>({items:n([`light`,`dark`]),mode:t(`dark`)}),{type:`theme`});export{r as ThemeApi};
2
+ //# sourceMappingURL=theme-molecule.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-molecule.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ const e=require("../molecules/theme-molecule.cjs");let t=require("react"),n=require("@tamagui/core");const r=({children:t,disableInjectCSS:r=!0,...i})=>{let a=e.ThemeApi.use().mode.get();return<n.TamaguiProvider{...i} defaultTheme={a} disableInjectCSS={r}>
2
+ {t}
3
+ </n.TamaguiProvider>},i=[`light`,`dark`],a=({children:n,defaultMode:a=`dark`,items:o=i,...s})=>{let c=(0,t.useMemo)(()=>{if(typeof window<`u`&&window.matchMedia){if(window.matchMedia(`(prefers-color-scheme: light)`).matches)return`light`;if(window.matchMedia(`(prefers-color-scheme: dark)`).matches)return`dark`}return a},[a]);return<e.ThemeApi.Provider scope="theme" initialState={{mode:c,items:o}}>
4
+ <r{...s}>{n}</r>
5
+ </e.ThemeApi.Provider>};exports.ThemeProvider=a;
@@ -0,0 +1,13 @@
1
+ import { ThemeOptions } from "../types.cjs";
2
+ import { PropsWithChildren } from "react";
3
+ import { CreateTamaguiProps, InferTamaguiConfig, TamaguiProviderProps } from "@tamagui/core";
4
+ //#region src/theme/providers/ThemeProvider.d.ts
5
+ type ThemeStateManagerProps = PropsWithChildren<Omit<TamaguiProviderProps, "defaultTheme"> & {
6
+ disableInjectCSS?: boolean;
7
+ config: InferTamaguiConfig<CreateTamaguiProps>;
8
+ }>;
9
+ type ThemeProviderProps = PropsWithChildren<Partial<ThemeOptions> & ThemeStateManagerProps>;
10
+ declare const ThemeProvider: ({ children, defaultMode, items, ...props }: ThemeProviderProps) => import("react").JSX.Element;
11
+ //#endregion
12
+ export { ThemeProvider, ThemeProviderProps };
13
+ //# sourceMappingURL=ThemeProvider.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.d.cts","names":[],"sources":["../../../src/theme/providers/ThemeProvider.tsx"],"mappings":";;;;KA+BK,yBAAyB,kBAC5B,KAAK;EACH;EACA,QAAQ,mBAAmB;;KAInB,qBAAqB,kBAC/B,QAAQ,gBAAgB;cAuBb,kBAAiB,UAAA,aAAA,UAAA,SAK3B,uCAAkB,IAAA"}
@@ -0,0 +1,13 @@
1
+ import { ThemeOptions } from "../types.mjs";
2
+ import { PropsWithChildren } from "react";
3
+ import { CreateTamaguiProps, InferTamaguiConfig, TamaguiProviderProps } from "@tamagui/core";
4
+ //#region src/theme/providers/ThemeProvider.d.ts
5
+ type ThemeStateManagerProps = PropsWithChildren<Omit<TamaguiProviderProps, "defaultTheme"> & {
6
+ disableInjectCSS?: boolean;
7
+ config: InferTamaguiConfig<CreateTamaguiProps>;
8
+ }>;
9
+ type ThemeProviderProps = PropsWithChildren<Partial<ThemeOptions> & ThemeStateManagerProps>;
10
+ declare const ThemeProvider: ({ children, defaultMode, items, ...props }: ThemeProviderProps) => import("react").JSX.Element;
11
+ //#endregion
12
+ export { ThemeProvider, ThemeProviderProps };
13
+ //# sourceMappingURL=ThemeProvider.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.d.mts","names":[],"sources":["../../../src/theme/providers/ThemeProvider.tsx"],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import{ThemeApi as e}from"../molecules/theme-molecule.mjs";import{useMemo as t}from"react";import{TamaguiProvider as n}from"@tamagui/core";const r=({children:t,disableInjectCSS:r=!0,...i})=>{let a=e.use().mode.get();return<n{...i} defaultTheme={a} disableInjectCSS={r}>
2
+ {t}
3
+ </n>},i=[`light`,`dark`],a=({children:n,defaultMode:a=`dark`,items:o=i,...s})=>{let c=t(()=>{if(typeof window<`u`&&window.matchMedia){if(window.matchMedia(`(prefers-color-scheme: light)`).matches)return`light`;if(window.matchMedia(`(prefers-color-scheme: dark)`).matches)return`dark`}return a},[a]);return<e.Provider scope="theme" initialState={{mode:c,items:o}}>
4
+ <r{...s}>{n}</r>
5
+ </e.Provider>};export{a as ThemeProvider};
6
+ //# sourceMappingURL=ThemeProvider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e={PRIMARY:`primary`,SECONDARY:`secondary`,DISCOVERY:`discovery`,INFO:`info`,WARNING:`warning`,DANGER:`danger`,SUCCESS:`success`,POSITIVE:`positive`,NEGATIVE:`negative`};exports.ColorThemeName=e;
@@ -0,0 +1,41 @@
1
+ //#region src/theme/types.d.ts
2
+ type ColorThemeMode = "light" | "dark";
3
+ type ColorThemeName = "primary" | "secondary" | "discovery" | "info" | "warning" | "danger" | "success" | "positive" | "negative";
4
+ declare const ColorThemeName: {
5
+ readonly PRIMARY: "primary";
6
+ readonly SECONDARY: "secondary";
7
+ readonly DISCOVERY: "discovery";
8
+ readonly INFO: "info";
9
+ readonly WARNING: "warning";
10
+ readonly DANGER: "danger";
11
+ readonly SUCCESS: "success";
12
+ readonly POSITIVE: "positive";
13
+ readonly NEGATIVE: "negative";
14
+ };
15
+ interface ThemeOptions {
16
+ /**
17
+ * The theme mode options.
18
+ *
19
+ * @defaultValue ["light", "dark"]
20
+ */
21
+ items: ColorThemeMode[];
22
+ /**
23
+ * The theme mode to default to.
24
+ *
25
+ * @defaultValue "dark"
26
+ */
27
+ defaultMode: ColorThemeMode;
28
+ }
29
+ interface ThemeBaseState {
30
+ /**
31
+ * The theme store options.
32
+ */
33
+ options: ThemeOptions;
34
+ /**
35
+ * The current theme mode.
36
+ */
37
+ mode: ColorThemeMode;
38
+ }
39
+ //#endregion
40
+ export { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions };
41
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/theme/types.ts"],"mappings":";KAkBY;KAEA;cAWC;;;;;;;;;;;UAYI;;;;;;EAMf,OAAO;;;;;;EAOP,aAAa;;UAGE;;;;EAIf,SAAS;;;;EAKT,MAAM"}
@@ -0,0 +1,41 @@
1
+ //#region src/theme/types.d.ts
2
+ type ColorThemeMode = "light" | "dark";
3
+ type ColorThemeName = "primary" | "secondary" | "discovery" | "info" | "warning" | "danger" | "success" | "positive" | "negative";
4
+ declare const ColorThemeName: {
5
+ readonly PRIMARY: "primary";
6
+ readonly SECONDARY: "secondary";
7
+ readonly DISCOVERY: "discovery";
8
+ readonly INFO: "info";
9
+ readonly WARNING: "warning";
10
+ readonly DANGER: "danger";
11
+ readonly SUCCESS: "success";
12
+ readonly POSITIVE: "positive";
13
+ readonly NEGATIVE: "negative";
14
+ };
15
+ interface ThemeOptions {
16
+ /**
17
+ * The theme mode options.
18
+ *
19
+ * @defaultValue ["light", "dark"]
20
+ */
21
+ items: ColorThemeMode[];
22
+ /**
23
+ * The theme mode to default to.
24
+ *
25
+ * @defaultValue "dark"
26
+ */
27
+ defaultMode: ColorThemeMode;
28
+ }
29
+ interface ThemeBaseState {
30
+ /**
31
+ * The theme store options.
32
+ */
33
+ options: ThemeOptions;
34
+ /**
35
+ * The current theme mode.
36
+ */
37
+ mode: ColorThemeMode;
38
+ }
39
+ //#endregion
40
+ export { ColorThemeMode, ColorThemeName, ThemeBaseState, ThemeOptions };
41
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../../src/theme/types.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ const e={PRIMARY:`primary`,SECONDARY:`secondary`,DISCOVERY:`discovery`,INFO:`info`,WARNING:`warning`,DANGER:`danger`,SUCCESS:`success`,POSITIVE:`positive`,NEGATIVE:`negative`};export{e as ColorThemeName};
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","names":[],"sources":[],"mappings":""}
@@ -0,0 +1 @@
1
+ const e=e=>{if(e){if(e.includes(`primary`))return`primary`;if(e.includes(`secondary`))return`secondary`;if(e.includes(`discovery`))return`discovery`;if(e.includes(`info`))return`info`;if(e.includes(`warning`))return`warning`;if(e.includes(`danger`))return`danger`;if(e.includes(`success`))return`success`;if(e.includes(`positive`))return`positive`;if(e.includes(`negative`))return`negative`}},t=t=>!!e(t);exports.getThemeColorThemeName=e,exports.themeColorThemeNameExists=t;
@@ -0,0 +1,55 @@
1
+ import { ColorThemeName } from "../types.cjs";
2
+ //#region src/theme/utilities/theme-helpers.d.ts
3
+ /**
4
+ * Get the color role scheme for the current theme name
5
+ *
6
+ * @example
7
+ * getThemeColorThemeName('dark') // undefined
8
+ * getThemeColorThemeName('dark_Input') // undefined
9
+ * getThemeColorThemeName('dark_primary_Input') // "primary"
10
+ * getThemeColorThemeName('dark_brand_Input') // "brand"
11
+ *
12
+ * @remarks
13
+ * The following color roles are checked:
14
+ * - primary
15
+ * - secondary
16
+ * - discovery
17
+ * - info
18
+ * - warning
19
+ * - danger
20
+ * - success
21
+ * - positive
22
+ * - negative
23
+ *
24
+ * @param theme - The theme name
25
+ * @returns The color role scheme for the theme name or undefined
26
+ */
27
+ declare const getThemeColorThemeName: (theme?: string) => ColorThemeName | undefined;
28
+ /**
29
+ * Check if a color role scheme is set for the current theme name
30
+ *
31
+ * @example
32
+ * themeColorThemeNameExists('dark') // false
33
+ * themeColorThemeNameExists('dark_Input') // false
34
+ * themeColorThemeNameExists('dark_primary_Input') // true
35
+ * themeColorThemeNameExists('dark_brand_Input') // true
36
+ *
37
+ * @remarks
38
+ * The following color roles are checked:
39
+ * - primary
40
+ * - secondary
41
+ * - discovery
42
+ * - info
43
+ * - warning
44
+ * - danger
45
+ * - success
46
+ * - positive
47
+ * - negative
48
+ *
49
+ * @param theme - The theme name
50
+ * @returns An indication if a theme color scheme is set
51
+ */
52
+ declare const themeColorThemeNameExists: (theme?: string) => boolean;
53
+ //#endregion
54
+ export { getThemeColorThemeName, themeColorThemeNameExists };
55
+ //# sourceMappingURL=theme-helpers.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-helpers.d.cts","names":[],"sources":["../../../src/theme/utilities/theme-helpers.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cA4Ca,yBACX,mBACC;;;;;;;;;;;;;;;;;;;;;;;;;cAkDU,4BAA6B"}
@@ -0,0 +1,55 @@
1
+ import { ColorThemeName } from "../types.mjs";
2
+ //#region src/theme/utilities/theme-helpers.d.ts
3
+ /**
4
+ * Get the color role scheme for the current theme name
5
+ *
6
+ * @example
7
+ * getThemeColorThemeName('dark') // undefined
8
+ * getThemeColorThemeName('dark_Input') // undefined
9
+ * getThemeColorThemeName('dark_primary_Input') // "primary"
10
+ * getThemeColorThemeName('dark_brand_Input') // "brand"
11
+ *
12
+ * @remarks
13
+ * The following color roles are checked:
14
+ * - primary
15
+ * - secondary
16
+ * - discovery
17
+ * - info
18
+ * - warning
19
+ * - danger
20
+ * - success
21
+ * - positive
22
+ * - negative
23
+ *
24
+ * @param theme - The theme name
25
+ * @returns The color role scheme for the theme name or undefined
26
+ */
27
+ declare const getThemeColorThemeName: (theme?: string) => ColorThemeName | undefined;
28
+ /**
29
+ * Check if a color role scheme is set for the current theme name
30
+ *
31
+ * @example
32
+ * themeColorThemeNameExists('dark') // false
33
+ * themeColorThemeNameExists('dark_Input') // false
34
+ * themeColorThemeNameExists('dark_primary_Input') // true
35
+ * themeColorThemeNameExists('dark_brand_Input') // true
36
+ *
37
+ * @remarks
38
+ * The following color roles are checked:
39
+ * - primary
40
+ * - secondary
41
+ * - discovery
42
+ * - info
43
+ * - warning
44
+ * - danger
45
+ * - success
46
+ * - positive
47
+ * - negative
48
+ *
49
+ * @param theme - The theme name
50
+ * @returns An indication if a theme color scheme is set
51
+ */
52
+ declare const themeColorThemeNameExists: (theme?: string) => boolean;
53
+ //#endregion
54
+ export { getThemeColorThemeName, themeColorThemeNameExists };
55
+ //# sourceMappingURL=theme-helpers.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-helpers.d.mts","names":[],"sources":["../../../src/theme/utilities/theme-helpers.ts"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ const e=e=>{if(e){if(e.includes(`primary`))return`primary`;if(e.includes(`secondary`))return`secondary`;if(e.includes(`discovery`))return`discovery`;if(e.includes(`info`))return`info`;if(e.includes(`warning`))return`warning`;if(e.includes(`danger`))return`danger`;if(e.includes(`success`))return`success`;if(e.includes(`positive`))return`positive`;if(e.includes(`negative`))return`negative`}},t=t=>!!e(t);export{e as getThemeColorThemeName,t as themeColorThemeNameExists};
2
+ //# sourceMappingURL=theme-helpers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-helpers.mjs","names":[],"sources":[],"mappings":""}
package/dist/types.cjs ADDED
File without changes
@@ -0,0 +1,55 @@
1
+ import { Atom, ExtractAtomArgs, ExtractAtomValue, PrimitiveAtom, SetStateAction, WritableAtom, createStore } from "jotai";
2
+ import { FileResult } from "@stryke/types/file";
3
+ import { RESET } from "jotai/utils";
4
+ //#region src/types.d.ts
5
+ type JotaiStore = ReturnType<typeof createStore>;
6
+ type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
7
+ interface WithInitialValue<Value> {
8
+ init: Value;
9
+ }
10
+ /**
11
+ * A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object
12
+ */
13
+ type IsAtom<T> = [T] extends [Atom<unknown>] ? true : false;
14
+ /**
15
+ * A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object
16
+ */
17
+ type IsWritableAtom<T> = [T] extends [WritableAtom<unknown, unknown[], Promise<void> | void>] ? true : false;
18
+ /**
19
+ * A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object without the ability to be read
20
+ */
21
+ type IsWriteOnlyAtom<T> = [T] extends [WritableAtom<null, unknown[], Promise<void> | void>] ? true : false;
22
+ /**
23
+ * A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object with the ability to reset to it's initial value
24
+ */
25
+ type IsResetAtom<T> = IsWritableAtom<T> extends true ? ExtractAtomArgs<T> extends [SetStateActionWithReset<infer _U>] ? true : false : false;
26
+ type BaseAtom<TValue, TArgs extends unknown[] = [SetStateAction<TValue>], TResult = void> = WritableAtom<TValue, TArgs, TResult>;
27
+ type AtomRecord<T> = { [K in keyof T]: Atom<T[K]>; };
28
+ /**
29
+ * Constraint for objects whose values are Jotai atoms.
30
+ *
31
+ * Prefer `TState extends AtomRecordConstraint<TState>` over
32
+ * `TState extends AtomRecord<any>` — the latter requires a string index
33
+ * signature and rejects fixed-key interfaces such as `FormAtoms`.
34
+ */
35
+ type AtomRecordConstraint<T extends object = object> = { [K in keyof T]: Atom<unknown>; };
36
+ type WritableAtomRecord<T extends object = object> = { [K in keyof T]: WritableAtom<T[K], [SetStateAction<T[K]> | typeof RESET], void>; };
37
+ type ExtractAtomRecordValues<T extends AtomRecordConstraint<T>> = { [K in keyof T]: ExtractAtomValue<T[K]>; };
38
+ type ClientFileResult = FileResult & {
39
+ id: number;
40
+ };
41
+ type SplitAtomAction<TValue> = {
42
+ type: "remove";
43
+ atom: PrimitiveAtom<TValue>;
44
+ } | {
45
+ type: "insert";
46
+ value: TValue;
47
+ before?: PrimitiveAtom<TValue>;
48
+ } | {
49
+ type: "move";
50
+ atom: PrimitiveAtom<TValue>;
51
+ before?: PrimitiveAtom<TValue>;
52
+ };
53
+ //#endregion
54
+ export { AtomRecord, AtomRecordConstraint, BaseAtom, ClientFileResult, ExtractAtomRecordValues, IsAtom, IsResetAtom, IsWritableAtom, IsWriteOnlyAtom, JotaiStore, SetStateActionWithReset, SplitAtomAction, WithInitialValue, WritableAtomRecord };
55
+ //# sourceMappingURL=types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../src/types.ts"],"mappings":";;;;KA8BY,aAAa,kBAAkB;KAE/B,wBAAwB,SAClC,eAAe,UAAU,MAAM,UAAU,eAAe;UACzC,iBAAiB;EAChC,MAAM;;;;;KAMI,OAAO,MAAM,YAAY;;;;KAKzB,eAAe,MAAM,YAC/B,iCAAiC;;;;KAQvB,gBAAgB,MAAM,YAChC,8BAA8B;;;;KAQpB,YAAY,KACtB,eAAe,kBACX,gBAAgB,YAAY,8BAA8B;KAKpD,SACV,QACA,2BAA2B,eAAe,UAC1C,kBACE,aAAa,QAAQ,OAAO;KAEpB,WAAW,QACpB,WAAW,IAAI,KAAK,EAAE;;;;;;;;KAUb,qBAAqB,gCAC9B,WAAW,IAAI;KAGN,mBAAmB,gCAC5B,WAAW,IAAI,aACd,EAAE,KACD,eAAe,EAAE,aAAa;KAKvB,wBAAwB,UAAU,qBAAqB,SAChE,WAAW,IAAI,iBAAiB,EAAE;KAGzB,mBAAmB;EAC7B;;KAGU,gBAAgB;EAEtB;EACA,MAAM,cAAc;;EAGpB;EACA,OAAO;EACP,SAAS,cAAc;;EAGvB;EACA,MAAM,cAAc;EACpB,SAAS,cAAc"}
@@ -0,0 +1,55 @@
1
+ import { RESET } from "jotai/utils";
2
+ import { Atom, ExtractAtomArgs, ExtractAtomValue, PrimitiveAtom, SetStateAction, WritableAtom, createStore } from "jotai";
3
+ import { FileResult } from "@stryke/types/file";
4
+ //#region src/types.d.ts
5
+ type JotaiStore = ReturnType<typeof createStore>;
6
+ type SetStateActionWithReset<Value> = Value | typeof RESET | ((prev: Value) => Value | typeof RESET);
7
+ interface WithInitialValue<Value> {
8
+ init: Value;
9
+ }
10
+ /**
11
+ * A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object
12
+ */
13
+ type IsAtom<T> = [T] extends [Atom<unknown>] ? true : false;
14
+ /**
15
+ * A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object
16
+ */
17
+ type IsWritableAtom<T> = [T] extends [WritableAtom<unknown, unknown[], Promise<void> | void>] ? true : false;
18
+ /**
19
+ * A type that checks if the value is a [Jotai](https://jotai.org) `WritableAtom` object without the ability to be read
20
+ */
21
+ type IsWriteOnlyAtom<T> = [T] extends [WritableAtom<null, unknown[], Promise<void> | void>] ? true : false;
22
+ /**
23
+ * A type that checks if the value is a [Jotai](https://jotai.org) `Atom` object with the ability to reset to it's initial value
24
+ */
25
+ type IsResetAtom<T> = IsWritableAtom<T> extends true ? ExtractAtomArgs<T> extends [SetStateActionWithReset<infer _U>] ? true : false : false;
26
+ type BaseAtom<TValue, TArgs extends unknown[] = [SetStateAction<TValue>], TResult = void> = WritableAtom<TValue, TArgs, TResult>;
27
+ type AtomRecord<T> = { [K in keyof T]: Atom<T[K]>; };
28
+ /**
29
+ * Constraint for objects whose values are Jotai atoms.
30
+ *
31
+ * Prefer `TState extends AtomRecordConstraint<TState>` over
32
+ * `TState extends AtomRecord<any>` — the latter requires a string index
33
+ * signature and rejects fixed-key interfaces such as `FormAtoms`.
34
+ */
35
+ type AtomRecordConstraint<T extends object = object> = { [K in keyof T]: Atom<unknown>; };
36
+ type WritableAtomRecord<T extends object = object> = { [K in keyof T]: WritableAtom<T[K], [SetStateAction<T[K]> | typeof RESET], void>; };
37
+ type ExtractAtomRecordValues<T extends AtomRecordConstraint<T>> = { [K in keyof T]: ExtractAtomValue<T[K]>; };
38
+ type ClientFileResult = FileResult & {
39
+ id: number;
40
+ };
41
+ type SplitAtomAction<TValue> = {
42
+ type: "remove";
43
+ atom: PrimitiveAtom<TValue>;
44
+ } | {
45
+ type: "insert";
46
+ value: TValue;
47
+ before?: PrimitiveAtom<TValue>;
48
+ } | {
49
+ type: "move";
50
+ atom: PrimitiveAtom<TValue>;
51
+ before?: PrimitiveAtom<TValue>;
52
+ };
53
+ //#endregion
54
+ export { AtomRecord, AtomRecordConstraint, BaseAtom, ClientFileResult, ExtractAtomRecordValues, IsAtom, IsResetAtom, IsWritableAtom, IsWriteOnlyAtom, JotaiStore, SetStateActionWithReset, SplitAtomAction, WithInitialValue, WritableAtomRecord };
55
+ //# sourceMappingURL=types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.mts","names":[],"sources":["../src/types.ts"],"mappings":""}
package/dist/types.mjs ADDED
File without changes