mates-devtools 0.1.0-beta.1

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 (379) hide show
  1. package/dist/mates-devtools.es.js +3464 -0
  2. package/dist/mates-devtools.umd.js +650 -0
  3. package/dist/types/Mates-DevTools/src/MatesDevTools.d.ts +5 -0
  4. package/dist/types/Mates-DevTools/src/MatesDevTools.d.ts.map +1 -0
  5. package/dist/types/Mates-DevTools/src/MatesDevToolsComponent.d.ts +24 -0
  6. package/dist/types/Mates-DevTools/src/MatesDevToolsComponent.d.ts.map +1 -0
  7. package/dist/types/Mates-DevTools/src/components/AtomsViewer.d.ts +2 -0
  8. package/dist/types/Mates-DevTools/src/components/AtomsViewer.d.ts.map +1 -0
  9. package/dist/types/Mates-DevTools/src/components/ComponentInspector.d.ts +27 -0
  10. package/dist/types/Mates-DevTools/src/components/ComponentInspector.d.ts.map +1 -0
  11. package/dist/types/Mates-DevTools/src/components/ComponentList.d.ts +11 -0
  12. package/dist/types/Mates-DevTools/src/components/ComponentList.d.ts.map +1 -0
  13. package/dist/types/Mates-DevTools/src/components/ComponentTree.d.ts +9 -0
  14. package/dist/types/Mates-DevTools/src/components/ComponentTree.d.ts.map +1 -0
  15. package/dist/types/Mates-DevTools/src/components/Header.d.ts +10 -0
  16. package/dist/types/Mates-DevTools/src/components/Header.d.ts.map +1 -0
  17. package/dist/types/Mates-DevTools/src/components/Highlight.d.ts +6 -0
  18. package/dist/types/Mates-DevTools/src/components/Highlight.d.ts.map +1 -0
  19. package/dist/types/Mates-DevTools/src/components/HooksViewer.d.ts +7 -0
  20. package/dist/types/Mates-DevTools/src/components/HooksViewer.d.ts.map +1 -0
  21. package/dist/types/Mates-DevTools/src/components/LogsViewer.d.ts +6 -0
  22. package/dist/types/Mates-DevTools/src/components/LogsViewer.d.ts.map +1 -0
  23. package/dist/types/Mates-DevTools/src/components/PerfViewer.d.ts +7 -0
  24. package/dist/types/Mates-DevTools/src/components/PerfViewer.d.ts.map +1 -0
  25. package/dist/types/Mates-DevTools/src/components/PropsViewer.d.ts +2 -0
  26. package/dist/types/Mates-DevTools/src/components/PropsViewer.d.ts.map +1 -0
  27. package/dist/types/Mates-DevTools/src/components/ScopesViewer.d.ts +2 -0
  28. package/dist/types/Mates-DevTools/src/components/ScopesViewer.d.ts.map +1 -0
  29. package/dist/types/Mates-DevTools/src/components/TimerLogger.d.ts +5 -0
  30. package/dist/types/Mates-DevTools/src/components/TimerLogger.d.ts.map +1 -0
  31. package/dist/types/Mates-DevTools/src/components/UseStateViewer.d.ts +12 -0
  32. package/dist/types/Mates-DevTools/src/components/UseStateViewer.d.ts.map +1 -0
  33. package/dist/types/Mates-DevTools/src/components/ValueTree.d.ts +19 -0
  34. package/dist/types/Mates-DevTools/src/components/ValueTree.d.ts.map +1 -0
  35. package/dist/types/Mates-DevTools/src/index.d.ts +23 -0
  36. package/dist/types/Mates-DevTools/src/index.d.ts.map +1 -0
  37. package/dist/types/Mates-DevTools/src/interceptTimers.d.ts +11 -0
  38. package/dist/types/Mates-DevTools/src/interceptTimers.d.ts.map +1 -0
  39. package/dist/types/Mates-DevTools/src/logStore.d.ts +38 -0
  40. package/dist/types/Mates-DevTools/src/logStore.d.ts.map +1 -0
  41. package/dist/types/Mates-DevTools/src/perfStore.d.ts +36 -0
  42. package/dist/types/Mates-DevTools/src/perfStore.d.ts.map +1 -0
  43. package/dist/types/Mates-DevTools/src/registry.d.ts +68 -0
  44. package/dist/types/Mates-DevTools/src/registry.d.ts.map +1 -0
  45. package/dist/types/Mates-DevTools/src/styles.d.ts +833 -0
  46. package/dist/types/Mates-DevTools/src/styles.d.ts.map +1 -0
  47. package/dist/types/Mates-DevTools/src/types.d.ts +19 -0
  48. package/dist/types/Mates-DevTools/src/types.d.ts.map +1 -0
  49. package/dist/types/lib/Directives/$.d.ts +371 -0
  50. package/dist/types/lib/Directives/$.d.ts.map +1 -0
  51. package/dist/types/lib/Directives/animatedConditional.d.ts +67 -0
  52. package/dist/types/lib/Directives/animatedConditional.d.ts.map +1 -0
  53. package/dist/types/lib/Directives/animationClasses.d.ts +50 -0
  54. package/dist/types/lib/Directives/animationClasses.d.ts.map +1 -0
  55. package/dist/types/lib/Directives/attrDirective.d.ts +69 -0
  56. package/dist/types/lib/Directives/attrDirective.d.ts.map +1 -0
  57. package/dist/types/lib/Directives/classesDirective.d.ts +79 -0
  58. package/dist/types/lib/Directives/classesDirective.d.ts.map +1 -0
  59. package/dist/types/lib/Directives/eleHook.d.ts +84 -0
  60. package/dist/types/lib/Directives/eleHook.d.ts.map +1 -0
  61. package/dist/types/lib/Directives/eventBinding.d.ts +29 -0
  62. package/dist/types/lib/Directives/eventBinding.d.ts.map +1 -0
  63. package/dist/types/lib/Directives/htmlHook.d.ts +101 -0
  64. package/dist/types/lib/Directives/htmlHook.d.ts.map +1 -0
  65. package/dist/types/lib/Directives/index.d.ts +18 -0
  66. package/dist/types/lib/Directives/index.d.ts.map +1 -0
  67. package/dist/types/lib/Directives/intersectDirective.d.ts +67 -0
  68. package/dist/types/lib/Directives/intersectDirective.d.ts.map +1 -0
  69. package/dist/types/lib/Directives/lazyLoadDirective.d.ts +66 -0
  70. package/dist/types/lib/Directives/lazyLoadDirective.d.ts.map +1 -0
  71. package/dist/types/lib/Directives/lifecycleDirectives.d.ts +56 -0
  72. package/dist/types/lib/Directives/lifecycleDirectives.d.ts.map +1 -0
  73. package/dist/types/lib/Directives/masonryGrid.d.ts +114 -0
  74. package/dist/types/lib/Directives/masonryGrid.d.ts.map +1 -0
  75. package/dist/types/lib/Directives/memoTemplate.d.ts +94 -0
  76. package/dist/types/lib/Directives/memoTemplate.d.ts.map +1 -0
  77. package/dist/types/lib/Directives/onDirective.d.ts +71 -0
  78. package/dist/types/lib/Directives/onDirective.d.ts.map +1 -0
  79. package/dist/types/lib/Directives/onParentDirective.d.ts +34 -0
  80. package/dist/types/lib/Directives/onParentDirective.d.ts.map +1 -0
  81. package/dist/types/lib/Directives/renderSwitch.d.ts +55 -0
  82. package/dist/types/lib/Directives/renderSwitch.d.ts.map +1 -0
  83. package/dist/types/lib/Directives/resolveAttrValue.d.ts +35 -0
  84. package/dist/types/lib/Directives/resolveAttrValue.d.ts.map +1 -0
  85. package/dist/types/lib/Directives/styleDirective.d.ts +81 -0
  86. package/dist/types/lib/Directives/styleDirective.d.ts.map +1 -0
  87. package/dist/types/lib/Directives/timerDirective.d.ts +52 -0
  88. package/dist/types/lib/Directives/timerDirective.d.ts.map +1 -0
  89. package/dist/types/lib/Directives/virtualHelpers.d.ts +10 -0
  90. package/dist/types/lib/Directives/virtualHelpers.d.ts.map +1 -0
  91. package/dist/types/lib/Fetch/ErrorTypes.d.ts +74 -0
  92. package/dist/types/lib/Fetch/ErrorTypes.d.ts.map +1 -0
  93. package/dist/types/lib/Fetch/Fetch.d.ts +168 -0
  94. package/dist/types/lib/Fetch/Fetch.d.ts.map +1 -0
  95. package/dist/types/lib/Fetch/index.d.ts +3 -0
  96. package/dist/types/lib/Fetch/index.d.ts.map +1 -0
  97. package/dist/types/lib/Mutables/Extended Atoms/cacheAtom.d.ts +156 -0
  98. package/dist/types/lib/Mutables/Extended Atoms/cacheAtom.d.ts.map +1 -0
  99. package/dist/types/lib/Mutables/Extended Atoms/index.d.ts +4 -0
  100. package/dist/types/lib/Mutables/Extended Atoms/index.d.ts.map +1 -0
  101. package/dist/types/lib/Mutables/Extended Atoms/paginationAtom.d.ts +32 -0
  102. package/dist/types/lib/Mutables/Extended Atoms/paginationAtom.d.ts.map +1 -0
  103. package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts +59 -0
  104. package/dist/types/lib/Mutables/Extended Atoms/themeAtom.d.ts.map +1 -0
  105. package/dist/types/lib/Mutables/atom/atom.d.ts +148 -0
  106. package/dist/types/lib/Mutables/atom/atom.d.ts.map +1 -0
  107. package/dist/types/lib/Mutables/atom/createTimedAtom.d.ts +43 -0
  108. package/dist/types/lib/Mutables/atom/createTimedAtom.d.ts.map +1 -0
  109. package/dist/types/lib/Mutables/atom/debouncedAtom.d.ts +37 -0
  110. package/dist/types/lib/Mutables/atom/debouncedAtom.d.ts.map +1 -0
  111. package/dist/types/lib/Mutables/atom/index.d.ts +10 -0
  112. package/dist/types/lib/Mutables/atom/index.d.ts.map +1 -0
  113. package/dist/types/lib/Mutables/atom/mapAtom.d.ts +105 -0
  114. package/dist/types/lib/Mutables/atom/mapAtom.d.ts.map +1 -0
  115. package/dist/types/lib/Mutables/atom/setAtom.d.ts +107 -0
  116. package/dist/types/lib/Mutables/atom/setAtom.d.ts.map +1 -0
  117. package/dist/types/lib/Mutables/atom/storageAtom.d.ts +44 -0
  118. package/dist/types/lib/Mutables/atom/storageAtom.d.ts.map +1 -0
  119. package/dist/types/lib/Mutables/atom/throttledAtom.d.ts +37 -0
  120. package/dist/types/lib/Mutables/atom/throttledAtom.d.ts.map +1 -0
  121. package/dist/types/lib/Mutables/atom/titleAtom.d.ts +20 -0
  122. package/dist/types/lib/Mutables/atom/titleAtom.d.ts.map +1 -0
  123. package/dist/types/lib/Mutables/effect/effect.d.ts +31 -0
  124. package/dist/types/lib/Mutables/effect/effect.d.ts.map +1 -0
  125. package/dist/types/lib/Mutables/effect/index.d.ts +2 -0
  126. package/dist/types/lib/Mutables/effect/index.d.ts.map +1 -0
  127. package/dist/types/lib/Mutables/events/events.d.ts +123 -0
  128. package/dist/types/lib/Mutables/events/events.d.ts.map +1 -0
  129. package/dist/types/lib/Mutables/events/index.d.ts +2 -0
  130. package/dist/types/lib/Mutables/events/index.d.ts.map +1 -0
  131. package/dist/types/lib/Mutables/events/xTabEvent.d.ts +61 -0
  132. package/dist/types/lib/Mutables/events/xTabEvent.d.ts.map +1 -0
  133. package/dist/types/lib/Mutables/form/formAtom.d.ts +56 -0
  134. package/dist/types/lib/Mutables/form/formAtom.d.ts.map +1 -0
  135. package/dist/types/lib/Mutables/form/index.d.ts +5 -0
  136. package/dist/types/lib/Mutables/form/index.d.ts.map +1 -0
  137. package/dist/types/lib/Mutables/form/transformers.d.ts +4 -0
  138. package/dist/types/lib/Mutables/form/transformers.d.ts.map +1 -0
  139. package/dist/types/lib/Mutables/form/validateAll.d.ts +40 -0
  140. package/dist/types/lib/Mutables/form/validateAll.d.ts.map +1 -0
  141. package/dist/types/lib/Mutables/form/validators.d.ts +61 -0
  142. package/dist/types/lib/Mutables/form/validators.d.ts.map +1 -0
  143. package/dist/types/lib/Mutables/index.d.ts +13 -0
  144. package/dist/types/lib/Mutables/index.d.ts.map +1 -0
  145. package/dist/types/lib/Mutables/memo/index.d.ts +2 -0
  146. package/dist/types/lib/Mutables/memo/index.d.ts.map +1 -0
  147. package/dist/types/lib/Mutables/memo/memo.d.ts +47 -0
  148. package/dist/types/lib/Mutables/memo/memo.d.ts.map +1 -0
  149. package/dist/types/lib/Mutables/reactiveRunner/index.d.ts +4 -0
  150. package/dist/types/lib/Mutables/reactiveRunner/index.d.ts.map +1 -0
  151. package/dist/types/lib/Mutables/reactiveRunner/reactiveRunner.d.ts +56 -0
  152. package/dist/types/lib/Mutables/reactiveRunner/reactiveRunner.d.ts.map +1 -0
  153. package/dist/types/lib/Mutables/reactiveRunner/trackAndSubscribe.d.ts +6 -0
  154. package/dist/types/lib/Mutables/reactiveRunner/trackAndSubscribe.d.ts.map +1 -0
  155. package/dist/types/lib/Mutables/reactiveRunner/validateReactiveFunction.d.ts +6 -0
  156. package/dist/types/lib/Mutables/reactiveRunner/validateReactiveFunction.d.ts.map +1 -0
  157. package/dist/types/lib/Mutables/ref/index.d.ts +2 -0
  158. package/dist/types/lib/Mutables/ref/index.d.ts.map +1 -0
  159. package/dist/types/lib/Mutables/ref/ref.d.ts +74 -0
  160. package/dist/types/lib/Mutables/ref/ref.d.ts.map +1 -0
  161. package/dist/types/lib/Mutables/scope/index.d.ts +2 -0
  162. package/dist/types/lib/Mutables/scope/index.d.ts.map +1 -0
  163. package/dist/types/lib/Mutables/scope/scope.d.ts +60 -0
  164. package/dist/types/lib/Mutables/scope/scope.d.ts.map +1 -0
  165. package/dist/types/lib/Mutables/store/index.d.ts +2 -0
  166. package/dist/types/lib/Mutables/store/index.d.ts.map +1 -0
  167. package/dist/types/lib/Mutables/store/store.d.ts +73 -0
  168. package/dist/types/lib/Mutables/store/store.d.ts.map +1 -0
  169. package/dist/types/lib/Mutables/useState/index.d.ts +2 -0
  170. package/dist/types/lib/Mutables/useState/index.d.ts.map +1 -0
  171. package/dist/types/lib/Mutables/useState/useState.d.ts +54 -0
  172. package/dist/types/lib/Mutables/useState/useState.d.ts.map +1 -0
  173. package/dist/types/lib/Mutables/useStore/hostContext.d.ts +13 -0
  174. package/dist/types/lib/Mutables/useStore/hostContext.d.ts.map +1 -0
  175. package/dist/types/lib/Mutables/useStore/index.d.ts +9 -0
  176. package/dist/types/lib/Mutables/useStore/index.d.ts.map +1 -0
  177. package/dist/types/lib/Mutables/useStore/lifecycle.d.ts +94 -0
  178. package/dist/types/lib/Mutables/useStore/lifecycle.d.ts.map +1 -0
  179. package/dist/types/lib/Mutables/useStore/onError.d.ts +21 -0
  180. package/dist/types/lib/Mutables/useStore/onError.d.ts.map +1 -0
  181. package/dist/types/lib/Mutables/useStore/onReferenceChange.d.ts +2 -0
  182. package/dist/types/lib/Mutables/useStore/onReferenceChange.d.ts.map +1 -0
  183. package/dist/types/lib/Mutables/useStore/safetyCheck.d.ts +2 -0
  184. package/dist/types/lib/Mutables/useStore/safetyCheck.d.ts.map +1 -0
  185. package/dist/types/lib/Mutables/useStore/setter.d.ts +52 -0
  186. package/dist/types/lib/Mutables/useStore/setter.d.ts.map +1 -0
  187. package/dist/types/lib/Mutables/useStore/subscription.d.ts +50 -0
  188. package/dist/types/lib/Mutables/useStore/subscription.d.ts.map +1 -0
  189. package/dist/types/lib/Mutables/useStore/useContext.d.ts +3 -0
  190. package/dist/types/lib/Mutables/useStore/useContext.d.ts.map +1 -0
  191. package/dist/types/lib/Mutables/useStore/useStore.d.ts +7 -0
  192. package/dist/types/lib/Mutables/useStore/useStore.d.ts.map +1 -0
  193. package/dist/types/lib/Router/Router.d.ts +54 -0
  194. package/dist/types/lib/Router/Router.d.ts.map +1 -0
  195. package/dist/types/lib/Router/animatedRouter.d.ts +48 -0
  196. package/dist/types/lib/Router/animatedRouter.d.ts.map +1 -0
  197. package/dist/types/lib/Router/buildPath.d.ts +20 -0
  198. package/dist/types/lib/Router/buildPath.d.ts.map +1 -0
  199. package/dist/types/lib/Router/hashAtom.d.ts +12 -0
  200. package/dist/types/lib/Router/hashAtom.d.ts.map +1 -0
  201. package/dist/types/lib/Router/index.d.ts +11 -0
  202. package/dist/types/lib/Router/index.d.ts.map +1 -0
  203. package/dist/types/lib/Router/isPathMatching.d.ts +12 -0
  204. package/dist/types/lib/Router/isPathMatching.d.ts.map +1 -0
  205. package/dist/types/lib/Router/location.d.ts +74 -0
  206. package/dist/types/lib/Router/location.d.ts.map +1 -0
  207. package/dist/types/lib/Router/navigateTo.d.ts +31 -0
  208. package/dist/types/lib/Router/navigateTo.d.ts.map +1 -0
  209. package/dist/types/lib/Router/navigationLock.d.ts +50 -0
  210. package/dist/types/lib/Router/navigationLock.d.ts.map +1 -0
  211. package/dist/types/lib/Router/pathAtom.d.ts +42 -0
  212. package/dist/types/lib/Router/pathAtom.d.ts.map +1 -0
  213. package/dist/types/lib/Router/pathResolver.d.ts +9 -0
  214. package/dist/types/lib/Router/pathResolver.d.ts.map +1 -0
  215. package/dist/types/lib/Router/qsAtom.d.ts +12 -0
  216. package/dist/types/lib/Router/qsAtom.d.ts.map +1 -0
  217. package/dist/types/lib/Template/index.d.ts +6 -0
  218. package/dist/types/lib/Template/index.d.ts.map +1 -0
  219. package/dist/types/lib/Template/scheduler.d.ts +59 -0
  220. package/dist/types/lib/Template/scheduler.d.ts.map +1 -0
  221. package/dist/types/lib/Template/x-x.d.ts +60 -0
  222. package/dist/types/lib/Template/x-x.d.ts.map +1 -0
  223. package/dist/types/lib/Template/x-x.types.d.ts +91 -0
  224. package/dist/types/lib/Template/x-x.types.d.ts.map +1 -0
  225. package/dist/types/lib/Template/x-x.utils.d.ts +15 -0
  226. package/dist/types/lib/Template/x-x.utils.d.ts.map +1 -0
  227. package/dist/types/lib/Template/x.d.ts +5 -0
  228. package/dist/types/lib/Template/x.d.ts.map +1 -0
  229. package/dist/types/lib/Template/xProvider.d.ts +2 -0
  230. package/dist/types/lib/Template/xProvider.d.ts.map +1 -0
  231. package/dist/types/lib/Timers/createManagedTimer.d.ts +12 -0
  232. package/dist/types/lib/Timers/createManagedTimer.d.ts.map +1 -0
  233. package/dist/types/lib/Timers/index.d.ts +4 -0
  234. package/dist/types/lib/Timers/index.d.ts.map +1 -0
  235. package/dist/types/lib/Timers/interval.d.ts +2 -0
  236. package/dist/types/lib/Timers/interval.d.ts.map +1 -0
  237. package/dist/types/lib/Timers/timeout.d.ts +2 -0
  238. package/dist/types/lib/Timers/timeout.d.ts.map +1 -0
  239. package/dist/types/lib/TrackState/componentStatus.d.ts +105 -0
  240. package/dist/types/lib/TrackState/componentStatus.d.ts.map +1 -0
  241. package/dist/types/lib/TrackState/readTracking.d.ts +20 -0
  242. package/dist/types/lib/TrackState/readTracking.d.ts.map +1 -0
  243. package/dist/types/lib/Utils/Context.d.ts +6 -0
  244. package/dist/types/lib/Utils/Context.d.ts.map +1 -0
  245. package/dist/types/lib/Utils/Date/calendar.d.ts +30 -0
  246. package/dist/types/lib/Utils/Date/calendar.d.ts.map +1 -0
  247. package/dist/types/lib/Utils/Date/core.d.ts +29 -0
  248. package/dist/types/lib/Utils/Date/core.d.ts.map +1 -0
  249. package/dist/types/lib/Utils/Date/date.d.ts +60 -0
  250. package/dist/types/lib/Utils/Date/date.d.ts.map +1 -0
  251. package/dist/types/lib/Utils/Date/index.d.ts +3 -0
  252. package/dist/types/lib/Utils/Date/index.d.ts.map +1 -0
  253. package/dist/types/lib/Utils/deepClone.d.ts +7 -0
  254. package/dist/types/lib/Utils/deepClone.d.ts.map +1 -0
  255. package/dist/types/lib/Utils/deepFreeze.d.ts +2 -0
  256. package/dist/types/lib/Utils/deepFreeze.d.ts.map +1 -0
  257. package/dist/types/lib/Utils/getAllProps.d.ts +2 -0
  258. package/dist/types/lib/Utils/getAllProps.d.ts.map +1 -0
  259. package/dist/types/lib/Utils/helpers.d.ts +13 -0
  260. package/dist/types/lib/Utils/helpers.d.ts.map +1 -0
  261. package/dist/types/lib/Utils/index.d.ts +13 -0
  262. package/dist/types/lib/Utils/index.d.ts.map +1 -0
  263. package/dist/types/lib/Utils/is.d.ts +12 -0
  264. package/dist/types/lib/Utils/is.d.ts.map +1 -0
  265. package/dist/types/lib/Utils/isDefinedAsGetter.d.ts +2 -0
  266. package/dist/types/lib/Utils/isDefinedAsGetter.d.ts.map +1 -0
  267. package/dist/types/lib/Utils/logger.d.ts +22 -0
  268. package/dist/types/lib/Utils/logger.d.ts.map +1 -0
  269. package/dist/types/lib/Utils/notificationManager.d.ts +67 -0
  270. package/dist/types/lib/Utils/notificationManager.d.ts.map +1 -0
  271. package/dist/types/lib/Utils/registerCleanup.d.ts +7 -0
  272. package/dist/types/lib/Utils/registerCleanup.d.ts.map +1 -0
  273. package/dist/types/lib/Utils/svgIcon.d.ts +95 -0
  274. package/dist/types/lib/Utils/svgIcon.d.ts.map +1 -0
  275. package/dist/types/lib/Utils/uuid.d.ts +7 -0
  276. package/dist/types/lib/Utils/uuid.d.ts.map +1 -0
  277. package/dist/types/lib/ZeroPromise/index.d.ts +2 -0
  278. package/dist/types/lib/ZeroPromise/index.d.ts.map +1 -0
  279. package/dist/types/lib/ZeroPromise/zero.d.ts +23 -0
  280. package/dist/types/lib/ZeroPromise/zero.d.ts.map +1 -0
  281. package/dist/types/lib/actions/action.d.ts +14 -0
  282. package/dist/types/lib/actions/action.d.ts.map +1 -0
  283. package/dist/types/lib/actions/animatePresets.d.ts +38 -0
  284. package/dist/types/lib/actions/animatePresets.d.ts.map +1 -0
  285. package/dist/types/lib/actions/animateSwap.d.ts +79 -0
  286. package/dist/types/lib/actions/animateSwap.d.ts.map +1 -0
  287. package/dist/types/lib/actions/animateTypes.d.ts +103 -0
  288. package/dist/types/lib/actions/animateTypes.d.ts.map +1 -0
  289. package/dist/types/lib/actions/asyncAction.d.ts +4 -0
  290. package/dist/types/lib/actions/asyncAction.d.ts.map +1 -0
  291. package/dist/types/lib/actions/asyncActionCache.d.ts +16 -0
  292. package/dist/types/lib/actions/asyncActionCache.d.ts.map +1 -0
  293. package/dist/types/lib/actions/asyncActionPolling.d.ts +14 -0
  294. package/dist/types/lib/actions/asyncActionPolling.d.ts.map +1 -0
  295. package/dist/types/lib/actions/asyncActionTypes.d.ts +74 -0
  296. package/dist/types/lib/actions/asyncActionTypes.d.ts.map +1 -0
  297. package/dist/types/lib/actions/createTimingFunction.d.ts +23 -0
  298. package/dist/types/lib/actions/createTimingFunction.d.ts.map +1 -0
  299. package/dist/types/lib/actions/debounce.d.ts +10 -0
  300. package/dist/types/lib/actions/debounce.d.ts.map +1 -0
  301. package/dist/types/lib/actions/index.d.ts +12 -0
  302. package/dist/types/lib/actions/index.d.ts.map +1 -0
  303. package/dist/types/lib/actions/paginatedAsyncAction.d.ts +121 -0
  304. package/dist/types/lib/actions/paginatedAsyncAction.d.ts.map +1 -0
  305. package/dist/types/lib/actions/taskAction.d.ts +105 -0
  306. package/dist/types/lib/actions/taskAction.d.ts.map +1 -0
  307. package/dist/types/lib/actions/throttle.d.ts +9 -0
  308. package/dist/types/lib/actions/throttle.d.ts.map +1 -0
  309. package/dist/types/lib/css-in-js/cl.d.ts +37 -0
  310. package/dist/types/lib/css-in-js/cl.d.ts.map +1 -0
  311. package/dist/types/lib/css-in-js/index.d.ts +7 -0
  312. package/dist/types/lib/css-in-js/index.d.ts.map +1 -0
  313. package/dist/types/lib/css-in-js/sanitize.d.ts +31 -0
  314. package/dist/types/lib/css-in-js/sanitize.d.ts.map +1 -0
  315. package/dist/types/lib/css-in-js/serialize.d.ts +98 -0
  316. package/dist/types/lib/css-in-js/serialize.d.ts.map +1 -0
  317. package/dist/types/lib/css-in-js/stylesheet.d.ts +188 -0
  318. package/dist/types/lib/css-in-js/stylesheet.d.ts.map +1 -0
  319. package/dist/types/lib/css-in-js/theme.d.ts +110 -0
  320. package/dist/types/lib/css-in-js/theme.d.ts.map +1 -0
  321. package/dist/types/lib/devtools/devtoolsHooks.d.ts +101 -0
  322. package/dist/types/lib/devtools/devtoolsHooks.d.ts.map +1 -0
  323. package/dist/types/lib/devtools/index.d.ts +2 -0
  324. package/dist/types/lib/devtools/index.d.ts.map +1 -0
  325. package/dist/types/lib/index.d.ts +46 -0
  326. package/dist/types/lib/index.d.ts.map +1 -0
  327. package/dist/types/lib/on/hooks.d.ts +319 -0
  328. package/dist/types/lib/on/hooks.d.ts.map +1 -0
  329. package/dist/types/lib/on/index.d.ts +3 -0
  330. package/dist/types/lib/on/index.d.ts.map +1 -0
  331. package/dist/types/lib/on/on.d.ts +16 -0
  332. package/dist/types/lib/on/on.d.ts.map +1 -0
  333. package/dist/types/lib/portals/dialog.d.ts +56 -0
  334. package/dist/types/lib/portals/dialog.d.ts.map +1 -0
  335. package/dist/types/lib/portals/index.d.ts +9 -0
  336. package/dist/types/lib/portals/index.d.ts.map +1 -0
  337. package/dist/types/lib/portals/popup.d.ts +37 -0
  338. package/dist/types/lib/portals/popup.d.ts.map +1 -0
  339. package/dist/types/lib/portals/portal.d.ts +57 -0
  340. package/dist/types/lib/portals/portal.d.ts.map +1 -0
  341. package/dist/types/lib/portals/tip.d.ts +38 -0
  342. package/dist/types/lib/portals/tip.d.ts.map +1 -0
  343. package/dist/types/lib/socket/index.d.ts +2 -0
  344. package/dist/types/lib/socket/index.d.ts.map +1 -0
  345. package/dist/types/lib/socket/ws.d.ts +83 -0
  346. package/dist/types/lib/socket/ws.d.ts.map +1 -0
  347. package/dist/types/lib/ssr/index.d.ts +3 -0
  348. package/dist/types/lib/ssr/index.d.ts.map +1 -0
  349. package/dist/types/lib/ssr/ssr-bridge.d.ts +89 -0
  350. package/dist/types/lib/ssr/ssr-bridge.d.ts.map +1 -0
  351. package/dist/types/lib/ssr/ssrFlag.d.ts +38 -0
  352. package/dist/types/lib/ssr/ssrFlag.d.ts.map +1 -0
  353. package/dist/types/lib/virtualizer/ScrollerController.d.ts +54 -0
  354. package/dist/types/lib/virtualizer/ScrollerController.d.ts.map +1 -0
  355. package/dist/types/lib/virtualizer/Virtualizer.d.ts +214 -0
  356. package/dist/types/lib/virtualizer/Virtualizer.d.ts.map +1 -0
  357. package/dist/types/lib/virtualizer/events.d.ts +27 -0
  358. package/dist/types/lib/virtualizer/events.d.ts.map +1 -0
  359. package/dist/types/lib/virtualizer/layouts/flow.d.ts +123 -0
  360. package/dist/types/lib/virtualizer/layouts/flow.d.ts.map +1 -0
  361. package/dist/types/lib/virtualizer/layouts/grid.d.ts +25 -0
  362. package/dist/types/lib/virtualizer/layouts/grid.d.ts.map +1 -0
  363. package/dist/types/lib/virtualizer/layouts/masonry.d.ts +37 -0
  364. package/dist/types/lib/virtualizer/layouts/masonry.d.ts.map +1 -0
  365. package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts +204 -0
  366. package/dist/types/lib/virtualizer/layouts/shared/BaseLayout.d.ts.map +1 -0
  367. package/dist/types/lib/virtualizer/layouts/shared/GridBaseLayout.d.ts +41 -0
  368. package/dist/types/lib/virtualizer/layouts/shared/GridBaseLayout.d.ts.map +1 -0
  369. package/dist/types/lib/virtualizer/layouts/shared/Layout.d.ts +138 -0
  370. package/dist/types/lib/virtualizer/layouts/shared/Layout.d.ts.map +1 -0
  371. package/dist/types/lib/virtualizer/layouts/shared/SizeCache.d.ts +19 -0
  372. package/dist/types/lib/virtualizer/layouts/shared/SizeCache.d.ts.map +1 -0
  373. package/dist/types/lib/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts +57 -0
  374. package/dist/types/lib/virtualizer/layouts/shared/SizeGapPaddingBaseLayout.d.ts.map +1 -0
  375. package/dist/types/lib/virtualizer/mates-adapter.d.ts +201 -0
  376. package/dist/types/lib/virtualizer/mates-adapter.d.ts.map +1 -0
  377. package/dist/types/lib/virtualizer/virtualize.d.ts +52 -0
  378. package/dist/types/lib/virtualizer/virtualize.d.ts.map +1 -0
  379. package/package.json +45 -0
@@ -0,0 +1,56 @@
1
+ import { type AtomConfig, type AtomType } from "../atom/atom";
2
+ import type { ValidatorFn } from "./validators";
3
+ /**
4
+ * Widen literal types so that `formAtom("")` infers `FormAtom<string>`
5
+ * instead of `FormAtom<"">`, and `formAtom(0)` infers `FormAtom<number>`
6
+ * instead of `FormAtom<0>`.
7
+ */
8
+ type Widen<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;
9
+ /**
10
+ * The callable interface returned by `formAtom()`.
11
+ *
12
+ * Extends the full `AtomType<T>` contract (get, set, update, val,
13
+ * __subscribe, __version__, lock/unlock, toJSON, …) with form-specific
14
+ * members: errors, isValid, validate(), and the numeric helpers.
15
+ */
16
+ export type FormAtom<T> = AtomType<T> & {
17
+ validate(): string[];
18
+ readonly errors: string[];
19
+ readonly isValid: boolean;
20
+ readonly __isFormAtom__: true;
21
+ toFloat(): number;
22
+ toFloatString(): string;
23
+ toValidNumber(): number;
24
+ readonly name: "formAtom";
25
+ };
26
+ /**
27
+ * Create a reactive form field atom.
28
+ *
29
+ * Inherits the full `AtomType<T>` interface — callable as a function,
30
+ * `.get()`, `.set()`, `.update()`, `.val`, `.__subscribe()`,
31
+ * `.__version__`, `.lock()` / `.unlock()`, `.toJSON()` — plus:
32
+ *
33
+ * - `errors` — `string[]` reactive via an internal atom; `[]` on mount.
34
+ * - `isValid` — `boolean` derived from errors.
35
+ * - `validate()` — run validators manually (e.g. on form submit).
36
+ * - `toFloat()` / `toFloatString()` / `toValidNumber()` — numeric helpers.
37
+ *
38
+ * No validation runs on mount. Every `set()` or `update()` call runs
39
+ * validators and updates the errors atom — one notification, one re-render.
40
+ * Call `validate()` manually to surface errors before the user has typed.
41
+ *
42
+ * @param initial - The initial value.
43
+ * @param validators - Validator functions; each returns an error string or null.
44
+ *
45
+ * @example
46
+ * const name = formAtom("", [isRequired, minLength(2)]);
47
+ * name.set("Alice"); // runs validators, updates errors
48
+ * name.update(v => v.trim()); // also runs validators
49
+ * name("Bob"); // callable set — also runs validators
50
+ * name.errors; // string[]
51
+ * name.isValid; // boolean
52
+ * name.validate(); // force-run on submit
53
+ */
54
+ export declare const formAtom: <T>(initial: T, validators?: ValidatorFn<Widen<T>>[], config?: AtomConfig) => FormAtom<Widen<T>>;
55
+ export {};
56
+ //# sourceMappingURL=formAtom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formAtom.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/form/formAtom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,QAAQ,EAAQ,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;GAIG;AACH,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GAC5B,MAAM,GACN,CAAC,SAAS,MAAM,GACd,MAAM,GACN,CAAC,SAAS,OAAO,GACf,OAAO,GACP,CAAC,CAAC;AAIV;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG;IACtC,QAAQ,IAAI,MAAM,EAAE,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC;IAC9B,OAAO,IAAI,MAAM,CAAC;IAClB,aAAa,IAAI,MAAM,CAAC;IACxB,aAAa,IAAI,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B,CAAC;AA2FF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,QAAQ,GAAI,CAAC,EACxB,SAAS,CAAC,EACV,aAAY,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAO,EACxC,SAAS,UAAU,KAClB,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAC+C,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./formAtom";
2
+ export * from "./transformers";
3
+ export * from "./validateAll";
4
+ export * from "./validators";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/form/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function toFloat(value: unknown, precision?: number): number;
2
+ export declare function toValidNumber(value: unknown): number;
3
+ export declare function toFloatString(value: string | number, precision?: number): string;
4
+ //# sourceMappingURL=transformers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformers.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/form/transformers.ts"],"names":[],"mappings":"AAWA,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,GAAE,MAAU,GAAG,MAAM,CAKrE;AAiBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIpD;AAiBD,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,SAAS,GAAE,MAAU,GACpB,MAAM,CAIR"}
@@ -0,0 +1,40 @@
1
+ export interface ValidateAllResult {
2
+ /** `true` when every discovered FormAtom is valid. */
3
+ isValid: boolean;
4
+ /** Flat list of every error string collected across all FormAtoms. */
5
+ errors: string[];
6
+ /** Map from a human-readable key path to that field's errors. */
7
+ errorsByField: Record<string, string[]>;
8
+ }
9
+ /**
10
+ * Deeply walks an object or array, finds every `FormAtom` value, calls
11
+ * `.validate()` on each one, and returns the aggregated result.
12
+ *
13
+ * Works with:
14
+ * - Plain objects (recursed by key)
15
+ * - Arrays (recursed by index)
16
+ * - Nested combinations of the two
17
+ * - FormAtom values at any depth
18
+ *
19
+ * Non-object / non-array leaves that aren't FormAtoms are silently skipped.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const form = {
24
+ * name: formAtom("", [isRequired]),
25
+ * email: formAtom("", [isRequired, isEmail]),
26
+ * address: {
27
+ * street: formAtom("", [isRequired]),
28
+ * city: formAtom("", [isRequired]),
29
+ * },
30
+ * tags: [formAtom("", [isRequired]), formAtom("", [isRequired])],
31
+ * };
32
+ *
33
+ * const { isValid, errors, errorsByField } = validateAll(form);
34
+ * // isValid → false
35
+ * // errors → ["Required", "Required", "Required", "Required", "Required", "Required"]
36
+ * // errorsByField → { "name": ["Required"], "email": ["Required"], "address.street": ["Required"], ... }
37
+ * ```
38
+ */
39
+ export declare function validateAll(input: unknown): ValidateAllResult;
40
+ //# sourceMappingURL=validateAll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateAll.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/form/validateAll.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,sEAAsE;IACtE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAiD7D"}
@@ -0,0 +1,61 @@
1
+ export type ValidatorFn<T = any> = (value: T) => string | null;
2
+ export declare const checkRequired: (value: unknown) => boolean;
3
+ export declare const checkEmail: (value: string) => boolean;
4
+ export declare const checkMinLength: (value: string, n: number) => boolean;
5
+ export declare const checkMaxLength: (value: string, n: number) => boolean;
6
+ export declare const checkPattern: (value: string, regex: RegExp) => boolean;
7
+ export declare const checkMin: (value: number, n: number) => boolean;
8
+ export declare const checkMax: (value: number, n: number) => boolean;
9
+ export declare const checkGreaterThan: (value: number, n: number) => boolean;
10
+ export declare const checkLessThan: (value: number, n: number) => boolean;
11
+ export declare const checkBetween: (value: number, min: number, max: number) => boolean;
12
+ export declare const checkDateBetween: (value: Date, min: Date, max: Date) => boolean;
13
+ export declare const checkAfter: (value: Date, date: Date) => boolean;
14
+ export declare const checkBefore: (value: Date, date: Date) => boolean;
15
+ export declare const checkPast: (value: Date) => boolean;
16
+ export declare const checkFuture: (value: Date) => boolean;
17
+ export declare const checkInTheLast24Hours: (value: Date) => boolean;
18
+ export declare const checkInTheNext24Hours: (value: Date) => boolean;
19
+ export declare const checkThisCurrentMonth: (value: Date) => boolean;
20
+ export declare const checkThisCurrentYear: (value: Date) => boolean;
21
+ export declare const checkHasCapitalLetter: (value: string) => boolean;
22
+ export declare const checkHasLowercaseLetter: (value: string) => boolean;
23
+ export declare const checkHasNumber: (value: string) => boolean;
24
+ export declare const checkHasSpecialCharacter: (value: string) => boolean;
25
+ export declare const checkUrl: (value: string) => boolean;
26
+ export declare const checkFloat: (value: unknown) => boolean;
27
+ export declare const checkInteger: (value: unknown) => boolean;
28
+ export declare const checkPositive: (value: number) => boolean;
29
+ export declare const checkNegative: (value: number) => boolean;
30
+ export declare const isRequired: ValidatorFn;
31
+ export declare const isEmail: ValidatorFn<string>;
32
+ export declare const minLength: (n: number) => ValidatorFn<string>;
33
+ export declare const maxLength: (n: number) => ValidatorFn<string>;
34
+ export declare const isPattern: (regex: RegExp, msg?: string) => ValidatorFn<string>;
35
+ export declare const isMin: (n: number) => ValidatorFn<number>;
36
+ export declare const isMax: (n: number) => ValidatorFn<number>;
37
+ export declare const isGreaterThan: (n: number) => ValidatorFn<number>;
38
+ export declare const isLessThan: (n: number) => ValidatorFn<number>;
39
+ export declare const isBetween: (min: number, max: number) => ValidatorFn<number>;
40
+ export declare const isDateBetween: (min: Date, max: Date) => ValidatorFn<Date>;
41
+ export declare const isAfter: (date: Date) => ValidatorFn<Date>;
42
+ export declare const isBefore: (date: Date) => ValidatorFn<Date>;
43
+ export declare const isPast: () => ValidatorFn<Date>;
44
+ export declare const isFuture: () => ValidatorFn<Date>;
45
+ export declare const isInTheLast24Hours: () => ValidatorFn<Date>;
46
+ export declare const isInTheNext24Hours: () => ValidatorFn<Date>;
47
+ export declare const isThisCurrentMonth: () => ValidatorFn<Date>;
48
+ export declare const isThisCurrentYear: () => ValidatorFn<Date>;
49
+ export declare const isGoodPassword: () => ValidatorFn<string>;
50
+ export declare const isStrongPassword: () => ValidatorFn<string>;
51
+ export declare const isStrongestPassword: () => ValidatorFn<string>;
52
+ export declare const hasCapitalLetter: () => ValidatorFn<string>;
53
+ export declare const hasLowercaseLetter: () => ValidatorFn<string>;
54
+ export declare const hasNumber: () => ValidatorFn<string>;
55
+ export declare const hasSpecialCharacter: () => ValidatorFn<string>;
56
+ export declare const isUrl: () => ValidatorFn<string>;
57
+ export declare const isFloat: () => ValidatorFn<number>;
58
+ export declare const isInteger: () => ValidatorFn<number>;
59
+ export declare const isPositive: () => ValidatorFn<number>;
60
+ export declare const isNegative: () => ValidatorFn<number>;
61
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/form/validators.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,13 @@
1
+ export * from "./atom";
2
+ export * from "./Extended Atoms";
3
+ export * from "./effect";
4
+ export * from "./events";
5
+ export * from "./form";
6
+ export * from "./memo";
7
+ export * from "./reactiveRunner";
8
+ export * from "./ref";
9
+ export * from "./scope";
10
+ export * from "./store";
11
+ export * from "./useState";
12
+ export * from "./useStore";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/Mutables/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./memo";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/memo/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { type AtomType } from "../atom/atom";
2
+ /**
3
+ * Creates a reactive computed atom whose value is derived from other atoms/stores.
4
+ *
5
+ * - Calls `fn` immediately, tracking all atoms/stores read inside it as dependencies.
6
+ * - Returns a reactive `AtomType<T>` atom that holds the computed value.
7
+ * - Whenever any dependency changes, `fn` re-runs and the returned atom is updated,
8
+ * triggering its own subscribers and any component re-renders that depend on it.
9
+ * - The returned atom is a full `AtomType<T>` — it can be subscribed to, read as
10
+ * `result()` or `result.val`, passed into templates, used inside other `memo()`/
11
+ * `effect()` calls, etc.
12
+ * - This is a "computed" / "derived" atom pattern. It is functionally equivalent to
13
+ * `atom(() => fn())` but implemented separately to avoid a circular import between
14
+ * `atom` and `memo`. Prefer `atom(() => derived)` for inline derived atoms inside
15
+ * components.
16
+ * - Correctly handles memos whose `fn` returns a function value: the function is
17
+ * stored as the atom value, not called as an updater.
18
+ * - Must NOT be called inside a template function (restricted context guard applies
19
+ * via `createReactiveRunner`).
20
+ *
21
+ * @param fn - A pure function that reads reactive dependencies and returns a derived value.
22
+ * @returns A reactive `AtomType<T>` atom whose value stays in sync with `fn`.
23
+ *
24
+ * @example
25
+ * const firstName = atom("Alice");
26
+ * const lastName = atom("Smith");
27
+ *
28
+ * const fullName = memo(() => `${firstName()} ${lastName()}`);
29
+ *
30
+ * fullName(); // "Alice Smith"
31
+ * firstName.set("Bob");
32
+ * fullName(); // "Bob Smith" — recomputed automatically
33
+ * fullName.__subscribe(() => console.log("name changed:", fullName()));
34
+ *
35
+ * @example
36
+ * // memo can return a function value — it is stored as-is, not called:
37
+ * const multiplier = atom(2);
38
+ * const memoFn = memo(() => {
39
+ * const m = multiplier();
40
+ * return (x: number) => x * m;
41
+ * });
42
+ * memoFn()(5); // 10
43
+ * multiplier.set(3);
44
+ * memoFn()(5); // 15
45
+ */
46
+ export declare function memo<T>(fn: () => T): AtomType<T>;
47
+ //# sourceMappingURL=memo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memo.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/memo/memo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,cAAc,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CA+BhD"}
@@ -0,0 +1,4 @@
1
+ export * from "./reactiveRunner";
2
+ export * from "./trackAndSubscribe";
3
+ export * from "./validateReactiveFunction";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/reactiveRunner/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,56 @@
1
+ interface ReactiveRunnerOptions {
2
+ name: string;
3
+ fn: () => any;
4
+ onRun: (value: any) => void;
5
+ /** If true, fn can return a cleanup function that runs before next execution */
6
+ supportsCleanup?: boolean;
7
+ }
8
+ export declare function createReactiveRunner(options: ReactiveRunnerOptions): () => void;
9
+ export {};
10
+ /**
11
+ *
12
+ * const state = {count: 0};
13
+ * const getters = {
14
+ * count() {
15
+ * return state.count;
16
+ * },
17
+ * }
18
+ * const setters = ({
19
+ * incr() {
20
+ * state.count++;
21
+ * },
22
+ * });
23
+ *
24
+ * export const countStore = store({getters, setters});
25
+ *
26
+ * store();
27
+ *
28
+ * const st = store({
29
+ * count: 0,
30
+ * incr(){
31
+ * this.count++;
32
+ * }
33
+ * });
34
+ *
35
+ * st().count;
36
+ * st().incr();
37
+ *
38
+ * st().decr();
39
+ *
40
+ *
41
+ *
42
+ * const state = atom({count: 0, address: { street: ""}});
43
+ *
44
+ * export const getters = {
45
+ * get count() {return state().count;},
46
+ * get state (){return state().address.street;},
47
+ * set street(value: string) {
48
+ *
49
+ * },
50
+ * }
51
+ *
52
+ * memoDirective([....keys], ()=>html``);
53
+ *
54
+ *
55
+ */
56
+ //# sourceMappingURL=reactiveRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactiveRunner.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/reactiveRunner/reactiveRunner.ts"],"names":[],"mappings":"AAKA,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,GAAG,CAAC;IACd,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,gFAAgF;IAChF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,MAAM,IAAI,CA6EZ;;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tracks stores accessed during function execution and subscribes to them.
3
+ * Returns an array of unsubscribe functions.
4
+ */
5
+ export declare function trackAndSubscribe(fn: () => any, onSubscribe: (store: any, runFn: () => void) => void, runFn: () => void): any;
6
+ //# sourceMappingURL=trackAndSubscribe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackAndSubscribe.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/reactiveRunner/trackAndSubscribe.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,GAAG,EACb,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,EACpD,KAAK,EAAE,MAAM,IAAI,GAChB,GAAG,CAmBL"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Validates that a function can be used in a reactive context.
3
+ * Checks for async functions and nesting restrictions.
4
+ */
5
+ export declare function validateReactiveFunction(name: string, fn: Function): void;
6
+ //# sourceMappingURL=validateReactiveFunction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateReactiveFunction.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/reactiveRunner/validateReactiveFunction.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,GAAG,IAAI,CAczE"}
@@ -0,0 +1,2 @@
1
+ export * from "./ref";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/ref/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { ref as litRef } from "lit-html/directives/ref.js";
2
+ export interface MatesRef<T extends Element = Element> {
3
+ readonly value: T | undefined;
4
+ __subscribe: (fn: (el: T | undefined) => void) => () => void;
5
+ readonly __isMatesRef__: true;
6
+ }
7
+ /**
8
+ * Creates a `MatesRef<T>` — a reactive reference that holds a DOM element,
9
+ * or `undefined` when no element is currently attached.
10
+ *
11
+ * The actual value is managed exclusively by the `setRef` directive; you
12
+ * should never call `__set` directly.
13
+ *
14
+ * @typeParam T - The element type held by this ref (defaults to `Element`).
15
+ *
16
+ * ### Members
17
+ * - **`value`** — the current element, or `undefined` before the element is
18
+ * attached (pre-render) or after it is detached (unmount / conditional render).
19
+ * - **`__subscribe(fn)`** — registers a subscriber that fires synchronously
20
+ * whenever `value` changes (element attached *or* detached). Returns an
21
+ * unsubscribe function.
22
+ * - **`__isMatesRef__`** — type discriminator; always `true`. Used by
23
+ * `setRef` to distinguish a `MatesRef` from a plain lit-html `Ref`.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const inputRef = ref<HTMLInputElement>();
28
+ *
29
+ * inputRef.__subscribe((el) => {
30
+ * if (el) el.focus(); // focus on mount
31
+ * });
32
+ *
33
+ * // In a template:
34
+ * html`<input ${setRef(inputRef)} type="text" />`;
35
+ *
36
+ * // After render:
37
+ * inputRef.value; // HTMLInputElement
38
+ * ```
39
+ */
40
+ export declare function ref<T extends Element = Element>(): MatesRef<T>;
41
+ /**
42
+ * A lit-html directive that attaches a DOM element to a `MatesRef` created by
43
+ * `ref()`, or forwards to a plain lit-html `Ref` / callback for backwards
44
+ * compatibility.
45
+ *
46
+ * ### Lifecycle behaviour
47
+ * - **Element added to the DOM** — `ref.value` is set to the element and all
48
+ * subscribers fire synchronously.
49
+ * - **Element removed from the DOM** — `ref.value` is set to `undefined` and
50
+ * all subscribers fire synchronously.
51
+ *
52
+ * @param r - A `MatesRef<T>` (created by `ref()`), a lit-html `Ref` object,
53
+ * or a lit-html ref callback. When `r.__isMatesRef__` is `true` the
54
+ * `MatesRef` path is used; otherwise the value is passed straight through
55
+ * to lit-html's own `ref` directive.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const inputRef = ref<HTMLInputElement>();
60
+ *
61
+ * inputRef.__subscribe((el) => {
62
+ * if (el) el.focus(); // focus on mount
63
+ * });
64
+ *
65
+ * // In a template:
66
+ * html`<input ${setRef(inputRef)} type="text" />`;
67
+ *
68
+ * // After render:
69
+ * inputRef.value; // HTMLInputElement
70
+ * ```
71
+ */
72
+ export declare function setRef<T extends Element = Element>(r: MatesRef<T> | Parameters<typeof litRef>[0]): import("lit-html/directive.js").DirectiveResult<typeof import("lit-html/directives/ref.js").RefDirective>;
73
+ export type { MatesRef as Ref };
74
+ //# sourceMappingURL=ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/ref/ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAK3D,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO;IACnD,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IAC9B,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC7D,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,CAsB9D;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,GAAG,OAAO,EAChD,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,6GAY9C;AAKD,YAAY,EAAE,QAAQ,IAAI,GAAG,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./scope";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/scope/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,60 @@
1
+ type TScope<T> = T & {
2
+ reset: () => void;
3
+ __isScope___: boolean;
4
+ };
5
+ /**
6
+ * Creates a scope instance from `ScopeClass` and registers it on the current
7
+ * host component so child components can access it via `getParentScope`.
8
+ *
9
+ * - Instantiates `ScopeClass` in a special context (`viewOuterInProgress = true`)
10
+ * so atoms and other reactive primitives can be created inside the constructor.
11
+ * - Walks all properties of the instance and binds non-atom methods to the instance
12
+ * (`method.bind(returnObj)`), so methods work correctly when passed as callbacks.
13
+ * - If the instance has a `setup(propsFn)` method, calls it with the component's
14
+ * props function — this allows lifecycle hooks like `onMount`/`onCleanup` to be
15
+ * registered inside `setup()`.
16
+ * - Registers the instance on the host element's scope map so descendant components
17
+ * can retrieve it via `getParentScope`.
18
+ * - Marks the returned object with `__isScope___: true`.
19
+ * - Throws if the same `ScopeClass` is used more than once in the same component.
20
+ *
21
+ * @param ScopeClass - A class whose constructor may contain atoms and reactive primitives.
22
+ * @returns The instantiated scope object, augmented with `__isScope___: true`.
23
+ *
24
+ * @example
25
+ * // In a parent component:
26
+ * class CounterScope {
27
+ * count = atom(0);
28
+ * incr() { this.count.set(this.count() + 1); }
29
+ * setup(props) {
30
+ * onMount(() => console.log("mounted"));
31
+ * }
32
+ * }
33
+ *
34
+ * const counter = scope(CounterScope);
35
+ * counter.count(); // 0
36
+ * counter.incr(); // count becomes 1
37
+ */
38
+ export declare const scope: <T extends object>(ScopeClass: new () => T) => TScope<T>;
39
+ /**
40
+ * Retrieves a scope instance of `ScopeClass` from the nearest ancestor component
41
+ * that created it via `scope(ScopeClass)`.
42
+ *
43
+ * - Dispatches a bubbling `CustomEvent("request-parent-scope")` up the DOM tree.
44
+ * - Any ancestor host element that has the matching scope class registered will
45
+ * call `detail.resolve(inst)`, providing the scope instance.
46
+ * - Throws an error if no ancestor has registered the requested scope class.
47
+ *
48
+ * @param ScopeClass - The class whose scope instance should be retrieved from an ancestor.
49
+ * @returns The scope instance registered by the nearest ancestor for `ScopeClass`.
50
+ * @throws If no ancestor component has a matching scope registered.
51
+ *
52
+ * @example
53
+ * // In a child component (ancestor must have called scope(CounterScope)):
54
+ * const counter = getParentScope(CounterScope);
55
+ * counter.count(); // reads the parent's atom
56
+ * counter.incr(); // mutates the parent's atom
57
+ */
58
+ export declare const getParentScope: <T extends object>(ScopeClass: new () => T) => TScope<T>;
59
+ export {};
60
+ //# sourceMappingURL=scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/scope/scope.ts"],"names":[],"mappings":"AAKA,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,MAAM,EAAE,YAAY,UAAU,CAAC,KAAG,MAAM,CAAC,CAAC,CAiEzE,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAC7C,YAAY,UAAU,CAAC,KACtB,MAAM,CAAC,CAAC,CAoBV,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./store";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { type AtomType } from "../atom/atom";
2
+ /**
3
+ * Mutates `stateObj` in place and returns a read-tracked wrapper around it.
4
+ *
5
+ * **Step 1 — mutate `stateObj` in place:**
6
+ * - Getters are redefined with version-based caching: the getter result is
7
+ * recomputed only when `a.__version__` changes, avoiding redundant calls.
8
+ * - Methods are wrapped so that every call is automatically batched inside
9
+ * `a.update()`, making method-based mutations reactive with no extra boilerplate.
10
+ * - Async functions are not supported and will throw.
11
+ *
12
+ * **Step 2 — build a read-tracked wrapper:**
13
+ * - `Object.create(stateObj)` gives the wrapper free access to all methods and
14
+ * version-cached getters through the prototype chain — no need to redefine them.
15
+ * - Plain data properties (non-function, non-getter) get their own tracked
16
+ * `get`/`set` pair on the wrapper:
17
+ * - `get` calls `a()`, which registers the atom as a dependency inside
18
+ * `memo()`, `effect()`, and component template functions, so they
19
+ * automatically re-run when `a.update()` is called.
20
+ * - `set` is a convenience shorthand: `wrapper.count = 5` is equivalent to
21
+ * `a.update(s => { s.count = 5; })`.
22
+ * - Functions and getters are intentionally skipped on the wrapper — they are
23
+ * already accessible via the prototype chain.
24
+ *
25
+ * @param stateObj - The plain state object to wrap. Mutated in place.
26
+ * @param a - The atom that holds `stateObj` and drives reactivity.
27
+ * @param contextName - Display name used in error messages (`"store"` / `"useState"`).
28
+ * @returns A read-tracked wrapper whose data-property reads subscribe the
29
+ * caller to `a` as a reactive dependency.
30
+ */
31
+ export declare const wrapStateFunctions: <T extends Record<string, any>>(stateObj: T, a: AtomType<T>, contextName: string) => T;
32
+ /**
33
+ * Creates a global reactive state container from a plain object.
34
+ *
35
+ * Unlike `useState`, `store` is designed to be called at module level (outside
36
+ * any component) and shared across the application. The returned factory
37
+ * function can be called inside any component to obtain the shared
38
+ * `[wrapper, update]` pair.
39
+ *
40
+ * - `wrapper` is a read-tracked object (built by `wrapStateFunctions`):
41
+ * - Reading a data property (e.g. `state.count`) subscribes the current
42
+ * component / `memo` / `effect` to re-run when the store updates.
43
+ * - Methods defined on the initial object are automatically wrapped to call
44
+ * `a.update()` — no manual batching needed.
45
+ * - Getters are version-cached and recomputed only when `a.update()` is called.
46
+ * - Direct assignment (`state.count = 5`) is also reactive and equivalent to
47
+ * `update(s => { s.count = 5; })`.
48
+ * - `update` is the raw `a.update` handle for external mutations that don't go
49
+ * through a method.
50
+ *
51
+ * @param initialState - A plain object (with optional methods and getters) that
52
+ * represents the initial state of the store.
53
+ * @returns A factory function `() => [wrapper, update]` to be called inside
54
+ * components or reactive contexts.
55
+ *
56
+ * @example
57
+ * // module-level — created once
58
+ * const counterStore = store({
59
+ * count: 0,
60
+ * incr() { this.count++; },
61
+ * get doubled() { return this.count * 2; },
62
+ * });
63
+ *
64
+ * // inside a component or effect
65
+ * const [state, update] = counterStore();
66
+ *
67
+ * state.count; // 0 — tracked read, component re-renders on change
68
+ * state.incr(); // calls a.update() automatically
69
+ * state.doubled; // 0 — version-cached getter
70
+ * update(() => { state.count = 10; }); // direct external mutation
71
+ */
72
+ export declare const store: <T extends Record<string, any>>(initialState: T) => () => (T | ((fn: (draft: T) => void, silently?: boolean) => void))[];
73
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/store/store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAQ,MAAM,cAAc,CAAC;AAkBnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC9D,UAAU,CAAC,EACX,GAAG,QAAQ,CAAC,CAAC,CAAC,EACd,aAAa,MAAM,KAClB,CAyFF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,CAAC,yEASnE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./useState";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/Mutables/useState/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}