mythik 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1111) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +4 -0
  3. package/README.md +97 -2
  4. package/dist/actions/dispatcher.d.ts +46 -0
  5. package/dist/actions/dispatcher.d.ts.map +1 -0
  6. package/dist/actions/dispatcher.js +366 -0
  7. package/dist/actions/dispatcher.js.map +1 -0
  8. package/dist/actions/middleware.d.ts +27 -0
  9. package/dist/actions/middleware.d.ts.map +1 -0
  10. package/dist/actions/middleware.js +37 -0
  11. package/dist/actions/middleware.js.map +1 -0
  12. package/dist/actions/transaction-engine.d.ts +13 -0
  13. package/dist/actions/transaction-engine.d.ts.map +1 -0
  14. package/dist/actions/transaction-engine.js +96 -0
  15. package/dist/actions/transaction-engine.js.map +1 -0
  16. package/dist/app/app-engine.d.ts +106 -0
  17. package/dist/app/app-engine.d.ts.map +1 -0
  18. package/dist/app/app-engine.js +413 -0
  19. package/dist/app/app-engine.js.map +1 -0
  20. package/dist/auth/cross-tab.d.ts +24 -0
  21. package/dist/auth/cross-tab.d.ts.map +1 -0
  22. package/dist/auth/cross-tab.js +117 -0
  23. package/dist/auth/cross-tab.js.map +1 -0
  24. package/dist/auth/engine.d.ts +16 -0
  25. package/dist/auth/engine.d.ts.map +1 -0
  26. package/dist/auth/engine.js +225 -0
  27. package/dist/auth/engine.js.map +1 -0
  28. package/dist/auth/persistence.d.ts +21 -0
  29. package/dist/auth/persistence.d.ts.map +1 -0
  30. package/dist/auth/persistence.js +97 -0
  31. package/dist/auth/persistence.js.map +1 -0
  32. package/dist/auth/providers/custom-jwt.d.ts +41 -0
  33. package/dist/auth/providers/custom-jwt.d.ts.map +1 -0
  34. package/dist/auth/providers/custom-jwt.js +165 -0
  35. package/dist/auth/providers/custom-jwt.js.map +1 -0
  36. package/dist/auth/providers/mock.d.ts +7 -0
  37. package/dist/auth/providers/mock.d.ts.map +1 -0
  38. package/dist/auth/providers/mock.js +52 -0
  39. package/dist/auth/providers/mock.js.map +1 -0
  40. package/dist/auth/providers/supabase.d.ts +90 -0
  41. package/dist/auth/providers/supabase.d.ts.map +1 -0
  42. package/dist/auth/providers/supabase.js +102 -0
  43. package/dist/auth/providers/supabase.js.map +1 -0
  44. package/dist/auth/rate-limiter.d.ts +29 -0
  45. package/dist/auth/rate-limiter.d.ts.map +1 -0
  46. package/dist/auth/rate-limiter.js +67 -0
  47. package/dist/auth/rate-limiter.js.map +1 -0
  48. package/dist/auth/refresh-engine.d.ts +25 -0
  49. package/dist/auth/refresh-engine.d.ts.map +1 -0
  50. package/dist/auth/refresh-engine.js +59 -0
  51. package/dist/auth/refresh-engine.js.map +1 -0
  52. package/dist/auth/types.d.ts +89 -0
  53. package/dist/auth/types.d.ts.map +1 -0
  54. package/dist/auth/types.js +2 -0
  55. package/dist/auth/types.js.map +1 -0
  56. package/dist/contract/endpoint-map.d.ts +20 -0
  57. package/dist/contract/endpoint-map.d.ts.map +1 -0
  58. package/dist/contract/endpoint-map.js +57 -0
  59. package/dist/contract/endpoint-map.js.map +1 -0
  60. package/dist/contract/engine.d.ts +12 -0
  61. package/dist/contract/engine.d.ts.map +1 -0
  62. package/dist/contract/engine.js +80 -0
  63. package/dist/contract/engine.js.map +1 -0
  64. package/dist/contract/extractor.d.ts +7 -0
  65. package/dist/contract/extractor.d.ts.map +1 -0
  66. package/dist/contract/extractor.js +133 -0
  67. package/dist/contract/extractor.js.map +1 -0
  68. package/dist/contract/index.d.ts +4 -0
  69. package/dist/contract/index.d.ts.map +1 -0
  70. package/dist/contract/index.js +2 -0
  71. package/dist/contract/index.js.map +1 -0
  72. package/dist/contract/matcher.d.ts +13 -0
  73. package/dist/contract/matcher.d.ts.map +1 -0
  74. package/dist/contract/matcher.js +57 -0
  75. package/dist/contract/matcher.js.map +1 -0
  76. package/dist/contract/rules/endpoints-exist.d.ts +3 -0
  77. package/dist/contract/rules/endpoints-exist.d.ts.map +1 -0
  78. package/dist/contract/rules/endpoints-exist.js +29 -0
  79. package/dist/contract/rules/endpoints-exist.js.map +1 -0
  80. package/dist/contract/rules/fields-valid.d.ts +3 -0
  81. package/dist/contract/rules/fields-valid.d.ts.map +1 -0
  82. package/dist/contract/rules/fields-valid.js +39 -0
  83. package/dist/contract/rules/fields-valid.js.map +1 -0
  84. package/dist/contract/rules/params-match.d.ts +3 -0
  85. package/dist/contract/rules/params-match.d.ts.map +1 -0
  86. package/dist/contract/rules/params-match.js +40 -0
  87. package/dist/contract/rules/params-match.js.map +1 -0
  88. package/dist/contract/rules/permissions-consistent.d.ts +3 -0
  89. package/dist/contract/rules/permissions-consistent.d.ts.map +1 -0
  90. package/dist/contract/rules/permissions-consistent.js +52 -0
  91. package/dist/contract/rules/permissions-consistent.js.map +1 -0
  92. package/dist/contract/types.d.ts +66 -0
  93. package/dist/contract/types.d.ts.map +1 -0
  94. package/dist/contract/types.js +2 -0
  95. package/dist/contract/types.js.map +1 -0
  96. package/dist/data/data-sources.d.ts +26 -0
  97. package/dist/data/data-sources.d.ts.map +1 -0
  98. package/dist/data/data-sources.js +218 -0
  99. package/dist/data/data-sources.js.map +1 -0
  100. package/dist/data/fetch.d.ts +29 -0
  101. package/dist/data/fetch.d.ts.map +1 -0
  102. package/dist/data/fetch.js +63 -0
  103. package/dist/data/fetch.js.map +1 -0
  104. package/dist/data/offline.d.ts +29 -0
  105. package/dist/data/offline.d.ts.map +1 -0
  106. package/dist/data/offline.js +48 -0
  107. package/dist/data/offline.js.map +1 -0
  108. package/dist/data/realtime.d.ts +21 -0
  109. package/dist/data/realtime.d.ts.map +1 -0
  110. package/dist/data/realtime.js +40 -0
  111. package/dist/data/realtime.js.map +1 -0
  112. package/dist/derive/evaluator.d.ts +19 -0
  113. package/dist/derive/evaluator.d.ts.map +1 -0
  114. package/dist/derive/evaluator.js +59 -0
  115. package/dist/derive/evaluator.js.map +1 -0
  116. package/dist/derive/topo-sort.d.ts +10 -0
  117. package/dist/derive/topo-sort.d.ts.map +1 -0
  118. package/dist/derive/topo-sort.js +36 -0
  119. package/dist/derive/topo-sort.js.map +1 -0
  120. package/dist/design/animation/cascade-types.d.ts +23 -0
  121. package/dist/design/animation/cascade-types.d.ts.map +1 -0
  122. package/dist/design/animation/cascade-types.js +2 -0
  123. package/dist/design/animation/cascade-types.js.map +1 -0
  124. package/dist/design/animation/cascade.d.ts +4 -0
  125. package/dist/design/animation/cascade.d.ts.map +1 -0
  126. package/dist/design/animation/cascade.js +73 -0
  127. package/dist/design/animation/cascade.js.map +1 -0
  128. package/dist/design/animation/css-keyframes.d.ts +8 -0
  129. package/dist/design/animation/css-keyframes.d.ts.map +1 -0
  130. package/dist/design/animation/css-keyframes.js +72 -0
  131. package/dist/design/animation/css-keyframes.js.map +1 -0
  132. package/dist/design/animation/index.d.ts +14 -0
  133. package/dist/design/animation/index.d.ts.map +1 -0
  134. package/dist/design/animation/index.js +9 -0
  135. package/dist/design/animation/index.js.map +1 -0
  136. package/dist/design/animation/keyframes-builder.d.ts +40 -0
  137. package/dist/design/animation/keyframes-builder.d.ts.map +1 -0
  138. package/dist/design/animation/keyframes-builder.js +140 -0
  139. package/dist/design/animation/keyframes-builder.js.map +1 -0
  140. package/dist/design/animation/reanimated-spec.d.ts +16 -0
  141. package/dist/design/animation/reanimated-spec.d.ts.map +1 -0
  142. package/dist/design/animation/reanimated-spec.js +162 -0
  143. package/dist/design/animation/reanimated-spec.js.map +1 -0
  144. package/dist/design/animation/reduced-motion.d.ts +3 -0
  145. package/dist/design/animation/reduced-motion.d.ts.map +1 -0
  146. package/dist/design/animation/reduced-motion.js +54 -0
  147. package/dist/design/animation/reduced-motion.js.map +1 -0
  148. package/dist/design/animation/resolver.d.ts +3 -0
  149. package/dist/design/animation/resolver.d.ts.map +1 -0
  150. package/dist/design/animation/resolver.js +86 -0
  151. package/dist/design/animation/resolver.js.map +1 -0
  152. package/dist/design/animation/types.d.ts +109 -0
  153. package/dist/design/animation/types.d.ts.map +1 -0
  154. package/dist/design/animation/types.js +7 -0
  155. package/dist/design/animation/types.js.map +1 -0
  156. package/dist/design/animation/validator.d.ts +44 -0
  157. package/dist/design/animation/validator.d.ts.map +1 -0
  158. package/dist/design/animation/validator.js +169 -0
  159. package/dist/design/animation/validator.js.map +1 -0
  160. package/dist/design/background/blobs/catalog.d.ts +10 -0
  161. package/dist/design/background/blobs/catalog.d.ts.map +1 -0
  162. package/dist/design/background/blobs/catalog.js +63 -0
  163. package/dist/design/background/blobs/catalog.js.map +1 -0
  164. package/dist/design/background/blobs/index.d.ts +4 -0
  165. package/dist/design/background/blobs/index.d.ts.map +1 -0
  166. package/dist/design/background/blobs/index.js +5 -0
  167. package/dist/design/background/blobs/index.js.map +1 -0
  168. package/dist/design/background/blobs/resolver.d.ts +16 -0
  169. package/dist/design/background/blobs/resolver.d.ts.map +1 -0
  170. package/dist/design/background/blobs/resolver.js +301 -0
  171. package/dist/design/background/blobs/resolver.js.map +1 -0
  172. package/dist/design/background/blobs/types.d.ts +112 -0
  173. package/dist/design/background/blobs/types.d.ts.map +1 -0
  174. package/dist/design/background/blobs/types.js +27 -0
  175. package/dist/design/background/blobs/types.js.map +1 -0
  176. package/dist/design/background/grain.d.ts +3 -0
  177. package/dist/design/background/grain.d.ts.map +1 -0
  178. package/dist/design/background/grain.js +23 -0
  179. package/dist/design/background/grain.js.map +1 -0
  180. package/dist/design/background/index.d.ts +8 -0
  181. package/dist/design/background/index.d.ts.map +1 -0
  182. package/dist/design/background/index.js +8 -0
  183. package/dist/design/background/index.js.map +1 -0
  184. package/dist/design/background/layers.d.ts +3 -0
  185. package/dist/design/background/layers.d.ts.map +1 -0
  186. package/dist/design/background/layers.js +23 -0
  187. package/dist/design/background/layers.js.map +1 -0
  188. package/dist/design/background/patterns/chevron.d.ts +8 -0
  189. package/dist/design/background/patterns/chevron.d.ts.map +1 -0
  190. package/dist/design/background/patterns/chevron.js +10 -0
  191. package/dist/design/background/patterns/chevron.js.map +1 -0
  192. package/dist/design/background/patterns/crosshatch.d.ts +8 -0
  193. package/dist/design/background/patterns/crosshatch.d.ts.map +1 -0
  194. package/dist/design/background/patterns/crosshatch.js +12 -0
  195. package/dist/design/background/patterns/crosshatch.js.map +1 -0
  196. package/dist/design/background/patterns/diagonal.d.ts +8 -0
  197. package/dist/design/background/patterns/diagonal.d.ts.map +1 -0
  198. package/dist/design/background/patterns/diagonal.js +7 -0
  199. package/dist/design/background/patterns/diagonal.js.map +1 -0
  200. package/dist/design/background/patterns/dots.d.ts +7 -0
  201. package/dist/design/background/patterns/dots.d.ts.map +1 -0
  202. package/dist/design/background/patterns/dots.js +9 -0
  203. package/dist/design/background/patterns/dots.js.map +1 -0
  204. package/dist/design/background/patterns/grid.d.ts +7 -0
  205. package/dist/design/background/patterns/grid.d.ts.map +1 -0
  206. package/dist/design/background/patterns/grid.js +8 -0
  207. package/dist/design/background/patterns/grid.js.map +1 -0
  208. package/dist/design/background/patterns/index.d.ts +8 -0
  209. package/dist/design/background/patterns/index.d.ts.map +1 -0
  210. package/dist/design/background/patterns/index.js +8 -0
  211. package/dist/design/background/patterns/index.js.map +1 -0
  212. package/dist/design/background/patterns/iso.d.ts +7 -0
  213. package/dist/design/background/patterns/iso.d.ts.map +1 -0
  214. package/dist/design/background/patterns/iso.js +11 -0
  215. package/dist/design/background/patterns/iso.js.map +1 -0
  216. package/dist/design/background/patterns/resolver.d.ts +3 -0
  217. package/dist/design/background/patterns/resolver.d.ts.map +1 -0
  218. package/dist/design/background/patterns/resolver.js +56 -0
  219. package/dist/design/background/patterns/resolver.js.map +1 -0
  220. package/dist/design/background/primitives/gradient.d.ts +3 -0
  221. package/dist/design/background/primitives/gradient.d.ts.map +1 -0
  222. package/dist/design/background/primitives/gradient.js +68 -0
  223. package/dist/design/background/primitives/gradient.js.map +1 -0
  224. package/dist/design/background/primitives/image.d.ts +3 -0
  225. package/dist/design/background/primitives/image.d.ts.map +1 -0
  226. package/dist/design/background/primitives/image.js +12 -0
  227. package/dist/design/background/primitives/image.js.map +1 -0
  228. package/dist/design/background/primitives/index.d.ts +4 -0
  229. package/dist/design/background/primitives/index.d.ts.map +1 -0
  230. package/dist/design/background/primitives/index.js +4 -0
  231. package/dist/design/background/primitives/index.js.map +1 -0
  232. package/dist/design/background/primitives/solid.d.ts +8 -0
  233. package/dist/design/background/primitives/solid.d.ts.map +1 -0
  234. package/dist/design/background/primitives/solid.js +15 -0
  235. package/dist/design/background/primitives/solid.js.map +1 -0
  236. package/dist/design/background/resolver.d.ts +3 -0
  237. package/dist/design/background/resolver.d.ts.map +1 -0
  238. package/dist/design/background/resolver.js +20 -0
  239. package/dist/design/background/resolver.js.map +1 -0
  240. package/dist/design/background/sanitizer.d.ts +2 -0
  241. package/dist/design/background/sanitizer.d.ts.map +1 -0
  242. package/dist/design/background/sanitizer.js +54 -0
  243. package/dist/design/background/sanitizer.js.map +1 -0
  244. package/dist/design/deep-tokens.d.ts +125 -0
  245. package/dist/design/deep-tokens.d.ts.map +1 -0
  246. package/dist/design/deep-tokens.js +115 -0
  247. package/dist/design/deep-tokens.js.map +1 -0
  248. package/dist/design/dna.d.ts +7 -0
  249. package/dist/design/dna.d.ts.map +1 -0
  250. package/dist/design/dna.js +210 -0
  251. package/dist/design/dna.js.map +1 -0
  252. package/dist/design/identity/color.d.ts +8 -0
  253. package/dist/design/identity/color.d.ts.map +1 -0
  254. package/dist/design/identity/color.js +64 -0
  255. package/dist/design/identity/color.js.map +1 -0
  256. package/dist/design/identity/elevation.d.ts +8 -0
  257. package/dist/design/identity/elevation.d.ts.map +1 -0
  258. package/dist/design/identity/elevation.js +31 -0
  259. package/dist/design/identity/elevation.js.map +1 -0
  260. package/dist/design/identity/index.d.ts +12 -0
  261. package/dist/design/identity/index.d.ts.map +1 -0
  262. package/dist/design/identity/index.js +14 -0
  263. package/dist/design/identity/index.js.map +1 -0
  264. package/dist/design/identity/shape.d.ts +4 -0
  265. package/dist/design/identity/shape.d.ts.map +1 -0
  266. package/dist/design/identity/shape.js +23 -0
  267. package/dist/design/identity/shape.js.map +1 -0
  268. package/dist/design/identity/surface.d.ts +18 -0
  269. package/dist/design/identity/surface.d.ts.map +1 -0
  270. package/dist/design/identity/surface.js +125 -0
  271. package/dist/design/identity/surface.js.map +1 -0
  272. package/dist/design/identity/types.d.ts +280 -0
  273. package/dist/design/identity/types.d.ts.map +1 -0
  274. package/dist/design/identity/types.js +21 -0
  275. package/dist/design/identity/types.js.map +1 -0
  276. package/dist/design/identity/typography.d.ts +7 -0
  277. package/dist/design/identity/typography.d.ts.map +1 -0
  278. package/dist/design/identity/typography.js +42 -0
  279. package/dist/design/identity/typography.js.map +1 -0
  280. package/dist/design/identity-resolver.d.ts +15 -0
  281. package/dist/design/identity-resolver.d.ts.map +1 -0
  282. package/dist/design/identity-resolver.js +52 -0
  283. package/dist/design/identity-resolver.js.map +1 -0
  284. package/dist/design/oklch.d.ts +10 -0
  285. package/dist/design/oklch.d.ts.map +1 -0
  286. package/dist/design/oklch.js +61 -0
  287. package/dist/design/oklch.js.map +1 -0
  288. package/dist/design/palette.d.ts +26 -0
  289. package/dist/design/palette.d.ts.map +1 -0
  290. package/dist/design/palette.js +73 -0
  291. package/dist/design/palette.js.map +1 -0
  292. package/dist/design/presets.d.ts +18 -0
  293. package/dist/design/presets.d.ts.map +1 -0
  294. package/dist/design/presets.js +2 -0
  295. package/dist/design/presets.js.map +1 -0
  296. package/dist/design/recipes/animations.d.ts +11 -0
  297. package/dist/design/recipes/animations.d.ts.map +1 -0
  298. package/dist/design/recipes/animations.js +180 -0
  299. package/dist/design/recipes/animations.js.map +1 -0
  300. package/dist/design/recipes/backgrounds.d.ts +3 -0
  301. package/dist/design/recipes/backgrounds.d.ts.map +1 -0
  302. package/dist/design/recipes/backgrounds.js +152 -0
  303. package/dist/design/recipes/backgrounds.js.map +1 -0
  304. package/dist/design/recipes/index.d.ts +2 -0
  305. package/dist/design/recipes/index.d.ts.map +1 -0
  306. package/dist/design/recipes/index.js +2 -0
  307. package/dist/design/recipes/index.js.map +1 -0
  308. package/dist/design/surface-to-css.d.ts +57 -0
  309. package/dist/design/surface-to-css.d.ts.map +1 -0
  310. package/dist/design/surface-to-css.js +130 -0
  311. package/dist/design/surface-to-css.js.map +1 -0
  312. package/dist/design/surface-to-rn.d.ts +57 -0
  313. package/dist/design/surface-to-rn.d.ts.map +1 -0
  314. package/dist/design/surface-to-rn.js +133 -0
  315. package/dist/design/surface-to-rn.js.map +1 -0
  316. package/dist/design/tokens.d.ts +67 -0
  317. package/dist/design/tokens.d.ts.map +1 -0
  318. package/dist/design/tokens.js +36 -0
  319. package/dist/design/tokens.js.map +1 -0
  320. package/dist/device/context.d.ts +13 -0
  321. package/dist/device/context.d.ts.map +1 -0
  322. package/dist/device/context.js +2 -0
  323. package/dist/device/context.js.map +1 -0
  324. package/dist/editor-session/clone.d.ts +4 -0
  325. package/dist/editor-session/clone.d.ts.map +1 -0
  326. package/dist/editor-session/clone.js +55 -0
  327. package/dist/editor-session/clone.js.map +1 -0
  328. package/dist/editor-session/engine.d.ts +21 -0
  329. package/dist/editor-session/engine.d.ts.map +1 -0
  330. package/dist/editor-session/engine.js +375 -0
  331. package/dist/editor-session/engine.js.map +1 -0
  332. package/dist/editor-session/persistence.d.ts +8 -0
  333. package/dist/editor-session/persistence.d.ts.map +1 -0
  334. package/dist/editor-session/persistence.js +89 -0
  335. package/dist/editor-session/persistence.js.map +1 -0
  336. package/dist/editor-session/types.d.ts +90 -0
  337. package/dist/editor-session/types.d.ts.map +1 -0
  338. package/dist/editor-session/types.js +2 -0
  339. package/dist/editor-session/types.js.map +1 -0
  340. package/dist/editor-session/validators.d.ts +5 -0
  341. package/dist/editor-session/validators.d.ts.map +1 -0
  342. package/dist/editor-session/validators.js +106 -0
  343. package/dist/editor-session/validators.js.map +1 -0
  344. package/dist/elements/composer.d.ts +109 -0
  345. package/dist/elements/composer.d.ts.map +1 -0
  346. package/dist/elements/composer.js +129 -0
  347. package/dist/elements/composer.js.map +1 -0
  348. package/dist/export/csv.d.ts +3 -0
  349. package/dist/export/csv.d.ts.map +1 -0
  350. package/dist/export/csv.js +16 -0
  351. package/dist/export/csv.js.map +1 -0
  352. package/dist/export/download.d.ts +2 -0
  353. package/dist/export/download.d.ts.map +1 -0
  354. package/dist/export/download.js +13 -0
  355. package/dist/export/download.js.map +1 -0
  356. package/dist/export/format.d.ts +3 -0
  357. package/dist/export/format.d.ts.map +1 -0
  358. package/dist/export/format.js +43 -0
  359. package/dist/export/format.js.map +1 -0
  360. package/dist/export/types.d.ts +22 -0
  361. package/dist/export/types.d.ts.map +1 -0
  362. package/dist/export/types.js +2 -0
  363. package/dist/export/types.js.map +1 -0
  364. package/dist/expressions/deep-resolve.d.ts +4 -0
  365. package/dist/expressions/deep-resolve.d.ts.map +1 -0
  366. package/dist/expressions/deep-resolve.js +20 -0
  367. package/dist/expressions/deep-resolve.js.map +1 -0
  368. package/dist/expressions/handlers/array.d.ts +19 -0
  369. package/dist/expressions/handlers/array.d.ts.map +1 -0
  370. package/dist/expressions/handlers/array.js +161 -0
  371. package/dist/expressions/handlers/array.js.map +1 -0
  372. package/dist/expressions/handlers/auth.d.ts +13 -0
  373. package/dist/expressions/handlers/auth.d.ts.map +1 -0
  374. package/dist/expressions/handlers/auth.js +90 -0
  375. package/dist/expressions/handlers/auth.js.map +1 -0
  376. package/dist/expressions/handlers/bind.d.ts +22 -0
  377. package/dist/expressions/handlers/bind.d.ts.map +1 -0
  378. package/dist/expressions/handlers/bind.js +57 -0
  379. package/dist/expressions/handlers/bind.js.map +1 -0
  380. package/dist/expressions/handlers/breakpoint.d.ts +10 -0
  381. package/dist/expressions/handlers/breakpoint.d.ts.map +1 -0
  382. package/dist/expressions/handlers/breakpoint.js +39 -0
  383. package/dist/expressions/handlers/breakpoint.js.map +1 -0
  384. package/dist/expressions/handlers/computed.d.ts +3 -0
  385. package/dist/expressions/handlers/computed.d.ts.map +1 -0
  386. package/dist/expressions/handlers/computed.js +20 -0
  387. package/dist/expressions/handlers/computed.js.map +1 -0
  388. package/dist/expressions/handlers/cond.d.ts +3 -0
  389. package/dist/expressions/handlers/cond.d.ts.map +1 -0
  390. package/dist/expressions/handlers/cond.js +57 -0
  391. package/dist/expressions/handlers/cond.js.map +1 -0
  392. package/dist/expressions/handlers/date.d.ts +14 -0
  393. package/dist/expressions/handlers/date.d.ts.map +1 -0
  394. package/dist/expressions/handlers/date.js +95 -0
  395. package/dist/expressions/handlers/date.js.map +1 -0
  396. package/dist/expressions/handlers/format.d.ts +19 -0
  397. package/dist/expressions/handlers/format.d.ts.map +1 -0
  398. package/dist/expressions/handlers/format.js +93 -0
  399. package/dist/expressions/handlers/format.js.map +1 -0
  400. package/dist/expressions/handlers/group.d.ts +25 -0
  401. package/dist/expressions/handlers/group.d.ts.map +1 -0
  402. package/dist/expressions/handlers/group.js +85 -0
  403. package/dist/expressions/handlers/group.js.map +1 -0
  404. package/dist/expressions/handlers/i18n.d.ts +8 -0
  405. package/dist/expressions/handlers/i18n.d.ts.map +1 -0
  406. package/dist/expressions/handlers/i18n.js +35 -0
  407. package/dist/expressions/handlers/i18n.js.map +1 -0
  408. package/dist/expressions/handlers/index.d.ts +4 -0
  409. package/dist/expressions/handlers/index.d.ts.map +1 -0
  410. package/dist/expressions/handlers/index.js +52 -0
  411. package/dist/expressions/handlers/index.js.map +1 -0
  412. package/dist/expressions/handlers/let.d.ts +4 -0
  413. package/dist/expressions/handlers/let.d.ts.map +1 -0
  414. package/dist/expressions/handlers/let.js +36 -0
  415. package/dist/expressions/handlers/let.js.map +1 -0
  416. package/dist/expressions/handlers/logic.d.ts +27 -0
  417. package/dist/expressions/handlers/logic.d.ts.map +1 -0
  418. package/dist/expressions/handlers/logic.js +52 -0
  419. package/dist/expressions/handlers/logic.js.map +1 -0
  420. package/dist/expressions/handlers/math.d.ts +13 -0
  421. package/dist/expressions/handlers/math.d.ts.map +1 -0
  422. package/dist/expressions/handlers/math.js +58 -0
  423. package/dist/expressions/handlers/math.js.map +1 -0
  424. package/dist/expressions/handlers/platform.d.ts +13 -0
  425. package/dist/expressions/handlers/platform.d.ts.map +1 -0
  426. package/dist/expressions/handlers/platform.js +37 -0
  427. package/dist/expressions/handlers/platform.js.map +1 -0
  428. package/dist/expressions/handlers/prop.d.ts +10 -0
  429. package/dist/expressions/handlers/prop.d.ts.map +1 -0
  430. package/dist/expressions/handlers/prop.js +18 -0
  431. package/dist/expressions/handlers/prop.js.map +1 -0
  432. package/dist/expressions/handlers/selection.d.ts +10 -0
  433. package/dist/expressions/handlers/selection.d.ts.map +1 -0
  434. package/dist/expressions/handlers/selection.js +33 -0
  435. package/dist/expressions/handlers/selection.js.map +1 -0
  436. package/dist/expressions/handlers/state.d.ts +3 -0
  437. package/dist/expressions/handlers/state.d.ts.map +1 -0
  438. package/dist/expressions/handlers/state.js +8 -0
  439. package/dist/expressions/handlers/state.js.map +1 -0
  440. package/dist/expressions/handlers/switch.d.ts +15 -0
  441. package/dist/expressions/handlers/switch.d.ts.map +1 -0
  442. package/dist/expressions/handlers/switch.js +31 -0
  443. package/dist/expressions/handlers/switch.js.map +1 -0
  444. package/dist/expressions/handlers/template.d.ts +3 -0
  445. package/dist/expressions/handlers/template.d.ts.map +1 -0
  446. package/dist/expressions/handlers/template.js +23 -0
  447. package/dist/expressions/handlers/template.js.map +1 -0
  448. package/dist/expressions/handlers/token.d.ts +3 -0
  449. package/dist/expressions/handlers/token.d.ts.map +1 -0
  450. package/dist/expressions/handlers/token.js +40 -0
  451. package/dist/expressions/handlers/token.js.map +1 -0
  452. package/dist/expressions/handlers/unique-id.d.ts +11 -0
  453. package/dist/expressions/handlers/unique-id.d.ts.map +1 -0
  454. package/dist/expressions/handlers/unique-id.js +52 -0
  455. package/dist/expressions/handlers/unique-id.js.map +1 -0
  456. package/dist/expressions/registry.d.ts +8 -0
  457. package/dist/expressions/registry.d.ts.map +1 -0
  458. package/dist/expressions/registry.js +35 -0
  459. package/dist/expressions/registry.js.map +1 -0
  460. package/dist/expressions/resolver.d.ts +15 -0
  461. package/dist/expressions/resolver.d.ts.map +1 -0
  462. package/dist/expressions/resolver.js +56 -0
  463. package/dist/expressions/resolver.js.map +1 -0
  464. package/dist/factory.d.ts +56 -0
  465. package/dist/factory.d.ts.map +1 -0
  466. package/dist/factory.js +265 -0
  467. package/dist/factory.js.map +1 -0
  468. package/dist/fetch/framework-fetch.d.ts +12 -0
  469. package/dist/fetch/framework-fetch.d.ts.map +1 -0
  470. package/dist/fetch/framework-fetch.js +36 -0
  471. package/dist/fetch/framework-fetch.js.map +1 -0
  472. package/dist/fetch/interceptors/auth.d.ts +19 -0
  473. package/dist/fetch/interceptors/auth.d.ts.map +1 -0
  474. package/dist/fetch/interceptors/auth.js +66 -0
  475. package/dist/fetch/interceptors/auth.js.map +1 -0
  476. package/dist/fetch/interceptors/logging.d.ts +8 -0
  477. package/dist/fetch/interceptors/logging.d.ts.map +1 -0
  478. package/dist/fetch/interceptors/logging.js +40 -0
  479. package/dist/fetch/interceptors/logging.js.map +1 -0
  480. package/dist/fetch/interceptors/retry.d.ts +20 -0
  481. package/dist/fetch/interceptors/retry.d.ts.map +1 -0
  482. package/dist/fetch/interceptors/retry.js +34 -0
  483. package/dist/fetch/interceptors/retry.js.map +1 -0
  484. package/dist/fetch/interceptors/timeout.d.ts +7 -0
  485. package/dist/fetch/interceptors/timeout.d.ts.map +1 -0
  486. package/dist/fetch/interceptors/timeout.js +20 -0
  487. package/dist/fetch/interceptors/timeout.js.map +1 -0
  488. package/dist/fetch/types.d.ts +30 -0
  489. package/dist/fetch/types.d.ts.map +1 -0
  490. package/dist/fetch/types.js +2 -0
  491. package/dist/fetch/types.js.map +1 -0
  492. package/dist/forms/engine.d.ts +3 -0
  493. package/dist/forms/engine.d.ts.map +1 -0
  494. package/dist/forms/engine.js +167 -0
  495. package/dist/forms/engine.js.map +1 -0
  496. package/dist/forms/types.d.ts +30 -0
  497. package/dist/forms/types.d.ts.map +1 -0
  498. package/dist/forms/types.js +2 -0
  499. package/dist/forms/types.js.map +1 -0
  500. package/dist/i18n/engine.d.ts +15 -0
  501. package/dist/i18n/engine.d.ts.map +1 -0
  502. package/dist/i18n/engine.js +61 -0
  503. package/dist/i18n/engine.js.map +1 -0
  504. package/dist/index.d.ts +161 -0
  505. package/dist/index.d.ts.map +1 -0
  506. package/dist/index.js +106 -0
  507. package/dist/index.js.map +1 -0
  508. package/dist/interactions/data-operations.d.ts +51 -0
  509. package/dist/interactions/data-operations.d.ts.map +1 -0
  510. package/dist/interactions/data-operations.js +64 -0
  511. package/dist/interactions/data-operations.js.map +1 -0
  512. package/dist/interactions/drag-drop.d.ts +14 -0
  513. package/dist/interactions/drag-drop.d.ts.map +1 -0
  514. package/dist/interactions/drag-drop.js +35 -0
  515. package/dist/interactions/drag-drop.js.map +1 -0
  516. package/dist/interactions/export.d.ts +24 -0
  517. package/dist/interactions/export.d.ts.map +1 -0
  518. package/dist/interactions/export.js +44 -0
  519. package/dist/interactions/export.js.map +1 -0
  520. package/dist/interactions/history.d.ts +16 -0
  521. package/dist/interactions/history.d.ts.map +1 -0
  522. package/dist/interactions/history.js +52 -0
  523. package/dist/interactions/history.js.map +1 -0
  524. package/dist/motion/engine.d.ts +47 -0
  525. package/dist/motion/engine.d.ts.map +1 -0
  526. package/dist/motion/engine.js +81 -0
  527. package/dist/motion/engine.js.map +1 -0
  528. package/dist/navigation/router.d.ts +36 -0
  529. package/dist/navigation/router.d.ts.map +1 -0
  530. package/dist/navigation/router.js +51 -0
  531. package/dist/navigation/router.js.map +1 -0
  532. package/dist/permissions/evaluator.d.ts +15 -0
  533. package/dist/permissions/evaluator.d.ts.map +1 -0
  534. package/dist/permissions/evaluator.js +32 -0
  535. package/dist/permissions/evaluator.js.map +1 -0
  536. package/dist/plugins/loader.d.ts +30 -0
  537. package/dist/plugins/loader.d.ts.map +1 -0
  538. package/dist/plugins/loader.js +87 -0
  539. package/dist/plugins/loader.js.map +1 -0
  540. package/dist/reference/generator.d.ts +25 -0
  541. package/dist/reference/generator.d.ts.map +1 -0
  542. package/dist/reference/generator.js +808 -0
  543. package/dist/reference/generator.js.map +1 -0
  544. package/dist/renderer/deps.d.ts +24 -0
  545. package/dist/renderer/deps.d.ts.map +1 -0
  546. package/dist/renderer/deps.js +150 -0
  547. package/dist/renderer/deps.js.map +1 -0
  548. package/dist/renderer/engine.d.ts +15 -0
  549. package/dist/renderer/engine.d.ts.map +1 -0
  550. package/dist/renderer/engine.js +1097 -0
  551. package/dist/renderer/engine.js.map +1 -0
  552. package/dist/renderer/lazy-paths.d.ts +14 -0
  553. package/dist/renderer/lazy-paths.d.ts.map +1 -0
  554. package/dist/renderer/lazy-paths.js +63 -0
  555. package/dist/renderer/lazy-paths.js.map +1 -0
  556. package/dist/renderer/prop-schemas.d.ts +17 -0
  557. package/dist/renderer/prop-schemas.d.ts.map +1 -0
  558. package/dist/renderer/prop-schemas.js +81 -0
  559. package/dist/renderer/prop-schemas.js.map +1 -0
  560. package/dist/renderer/registry.d.ts +10 -0
  561. package/dist/renderer/registry.d.ts.map +1 -0
  562. package/dist/renderer/registry.js +22 -0
  563. package/dist/renderer/registry.js.map +1 -0
  564. package/dist/renderer/variants.d.ts +54 -0
  565. package/dist/renderer/variants.d.ts.map +1 -0
  566. package/dist/renderer/variants.js +105 -0
  567. package/dist/renderer/variants.js.map +1 -0
  568. package/dist/runtime/mount-spec-runtime.d.ts +59 -0
  569. package/dist/runtime/mount-spec-runtime.d.ts.map +1 -0
  570. package/dist/runtime/mount-spec-runtime.js +73 -0
  571. package/dist/runtime/mount-spec-runtime.js.map +1 -0
  572. package/dist/security/api-spec-validator.d.ts +13 -0
  573. package/dist/security/api-spec-validator.d.ts.map +1 -0
  574. package/dist/security/api-spec-validator.js +347 -0
  575. package/dist/security/api-spec-validator.js.map +1 -0
  576. package/dist/security/app-spec-validator.d.ts +4 -0
  577. package/dist/security/app-spec-validator.d.ts.map +1 -0
  578. package/dist/security/app-spec-validator.js +200 -0
  579. package/dist/security/app-spec-validator.js.map +1 -0
  580. package/dist/security/identifier-guard.d.ts +3 -0
  581. package/dist/security/identifier-guard.d.ts.map +1 -0
  582. package/dist/security/identifier-guard.js +15 -0
  583. package/dist/security/identifier-guard.js.map +1 -0
  584. package/dist/security/identity-token-validator.d.ts +3 -0
  585. package/dist/security/identity-token-validator.d.ts.map +1 -0
  586. package/dist/security/identity-token-validator.js +121 -0
  587. package/dist/security/identity-token-validator.js.map +1 -0
  588. package/dist/security/index.d.ts +14 -0
  589. package/dist/security/index.d.ts.map +1 -0
  590. package/dist/security/index.js +8 -0
  591. package/dist/security/index.js.map +1 -0
  592. package/dist/security/protection-registry.d.ts +24 -0
  593. package/dist/security/protection-registry.d.ts.map +1 -0
  594. package/dist/security/protection-registry.js +35 -0
  595. package/dist/security/protection-registry.js.map +1 -0
  596. package/dist/security/rate-limiter.d.ts +23 -0
  597. package/dist/security/rate-limiter.d.ts.map +1 -0
  598. package/dist/security/rate-limiter.js +44 -0
  599. package/dist/security/rate-limiter.js.map +1 -0
  600. package/dist/security/spec-signing.d.ts +23 -0
  601. package/dist/security/spec-signing.d.ts.map +1 -0
  602. package/dist/security/spec-signing.js +62 -0
  603. package/dist/security/spec-signing.js.map +1 -0
  604. package/dist/security/spec-validator.d.ts +60 -0
  605. package/dist/security/spec-validator.d.ts.map +1 -0
  606. package/dist/security/spec-validator.js +903 -0
  607. package/dist/security/spec-validator.js.map +1 -0
  608. package/dist/security/state-protection.d.ts +23 -0
  609. package/dist/security/state-protection.d.ts.map +1 -0
  610. package/dist/security/state-protection.js +49 -0
  611. package/dist/security/state-protection.js.map +1 -0
  612. package/dist/security/url-whitelist.d.ts +14 -0
  613. package/dist/security/url-whitelist.d.ts.map +1 -0
  614. package/dist/security/url-whitelist.js +37 -0
  615. package/dist/security/url-whitelist.js.map +1 -0
  616. package/dist/server.d.ts +6 -0
  617. package/dist/server.d.ts.map +1 -0
  618. package/dist/server.js +8 -0
  619. package/dist/server.js.map +1 -0
  620. package/dist/spec-engine/app-elements.d.ts +5 -0
  621. package/dist/spec-engine/app-elements.d.ts.map +1 -0
  622. package/dist/spec-engine/app-elements.js +36 -0
  623. package/dist/spec-engine/app-elements.js.map +1 -0
  624. package/dist/spec-engine/app-manifest.d.ts +3 -0
  625. package/dist/spec-engine/app-manifest.d.ts.map +1 -0
  626. package/dist/spec-engine/app-manifest.js +132 -0
  627. package/dist/spec-engine/app-manifest.js.map +1 -0
  628. package/dist/spec-engine/elements.d.ts +8 -0
  629. package/dist/spec-engine/elements.d.ts.map +1 -0
  630. package/dist/spec-engine/elements.js +18 -0
  631. package/dist/spec-engine/elements.js.map +1 -0
  632. package/dist/spec-engine/engine.d.ts +3 -0
  633. package/dist/spec-engine/engine.d.ts.map +1 -0
  634. package/dist/spec-engine/engine.js +76 -0
  635. package/dist/spec-engine/engine.js.map +1 -0
  636. package/dist/spec-engine/handlers/api-handler.d.ts +5 -0
  637. package/dist/spec-engine/handlers/api-handler.d.ts.map +1 -0
  638. package/dist/spec-engine/handlers/api-handler.js +111 -0
  639. package/dist/spec-engine/handlers/api-handler.js.map +1 -0
  640. package/dist/spec-engine/handlers/app-handler.d.ts +4 -0
  641. package/dist/spec-engine/handlers/app-handler.d.ts.map +1 -0
  642. package/dist/spec-engine/handlers/app-handler.js +41 -0
  643. package/dist/spec-engine/handlers/app-handler.js.map +1 -0
  644. package/dist/spec-engine/handlers/index.d.ts +8 -0
  645. package/dist/spec-engine/handlers/index.d.ts.map +1 -0
  646. package/dist/spec-engine/handlers/index.js +17 -0
  647. package/dist/spec-engine/handlers/index.js.map +1 -0
  648. package/dist/spec-engine/handlers/screen-handler.d.ts +4 -0
  649. package/dist/spec-engine/handlers/screen-handler.d.ts.map +1 -0
  650. package/dist/spec-engine/handlers/screen-handler.js +34 -0
  651. package/dist/spec-engine/handlers/screen-handler.js.map +1 -0
  652. package/dist/spec-engine/manifest.d.ts +11 -0
  653. package/dist/spec-engine/manifest.d.ts.map +1 -0
  654. package/dist/spec-engine/manifest.js +76 -0
  655. package/dist/spec-engine/manifest.js.map +1 -0
  656. package/dist/spec-engine/types.d.ts +61 -0
  657. package/dist/spec-engine/types.d.ts.map +1 -0
  658. package/dist/spec-engine/types.js +2 -0
  659. package/dist/spec-engine/types.js.map +1 -0
  660. package/dist/spec-stores/file.d.ts +12 -0
  661. package/dist/spec-stores/file.d.ts.map +1 -0
  662. package/dist/spec-stores/file.js +32 -0
  663. package/dist/spec-stores/file.js.map +1 -0
  664. package/dist/spec-stores/memory-versioned.d.ts +22 -0
  665. package/dist/spec-stores/memory-versioned.d.ts.map +1 -0
  666. package/dist/spec-stores/memory-versioned.js +125 -0
  667. package/dist/spec-stores/memory-versioned.js.map +1 -0
  668. package/dist/spec-stores/memory.d.ts +10 -0
  669. package/dist/spec-stores/memory.d.ts.map +1 -0
  670. package/dist/spec-stores/memory.js +31 -0
  671. package/dist/spec-stores/memory.js.map +1 -0
  672. package/dist/spec-stores/sqlserver-versioned.d.ts +44 -0
  673. package/dist/spec-stores/sqlserver-versioned.d.ts.map +1 -0
  674. package/dist/spec-stores/sqlserver-versioned.js +253 -0
  675. package/dist/spec-stores/sqlserver-versioned.js.map +1 -0
  676. package/dist/spec-stores/sqlserver.d.ts +27 -0
  677. package/dist/spec-stores/sqlserver.d.ts.map +1 -0
  678. package/dist/spec-stores/sqlserver.js +78 -0
  679. package/dist/spec-stores/sqlserver.js.map +1 -0
  680. package/dist/spec-stores/supabase-versioned.d.ts +38 -0
  681. package/dist/spec-stores/supabase-versioned.d.ts.map +1 -0
  682. package/dist/spec-stores/supabase-versioned.js +197 -0
  683. package/dist/spec-stores/supabase-versioned.js.map +1 -0
  684. package/dist/spec-stores/supabase.d.ts +18 -0
  685. package/dist/spec-stores/supabase.d.ts.map +1 -0
  686. package/dist/spec-stores/supabase.js +68 -0
  687. package/dist/spec-stores/supabase.js.map +1 -0
  688. package/dist/state/reserved-paths.d.ts +41 -0
  689. package/dist/state/reserved-paths.d.ts.map +1 -0
  690. package/dist/state/reserved-paths.js +40 -0
  691. package/dist/state/reserved-paths.js.map +1 -0
  692. package/dist/state/store.d.ts +18 -0
  693. package/dist/state/store.d.ts.map +1 -0
  694. package/dist/state/store.js +114 -0
  695. package/dist/state/store.js.map +1 -0
  696. package/dist/storage/supabase.d.ts +37 -0
  697. package/dist/storage/supabase.d.ts.map +1 -0
  698. package/dist/storage/supabase.js +22 -0
  699. package/dist/storage/supabase.js.map +1 -0
  700. package/dist/storage/types.d.ts +22 -0
  701. package/dist/storage/types.d.ts.map +1 -0
  702. package/dist/storage/types.js +2 -0
  703. package/dist/storage/types.js.map +1 -0
  704. package/dist/storage/upload-action.d.ts +22 -0
  705. package/dist/storage/upload-action.d.ts.map +1 -0
  706. package/dist/storage/upload-action.js +117 -0
  707. package/dist/storage/upload-action.js.map +1 -0
  708. package/dist/storage/url.d.ts +17 -0
  709. package/dist/storage/url.d.ts.map +1 -0
  710. package/dist/storage/url.js +48 -0
  711. package/dist/storage/url.js.map +1 -0
  712. package/dist/streaming/compiler.d.ts +26 -0
  713. package/dist/streaming/compiler.d.ts.map +1 -0
  714. package/dist/streaming/compiler.js +54 -0
  715. package/dist/streaming/compiler.js.map +1 -0
  716. package/dist/streaming/patch.d.ts +19 -0
  717. package/dist/streaming/patch.d.ts.map +1 -0
  718. package/dist/streaming/patch.js +139 -0
  719. package/dist/streaming/patch.js.map +1 -0
  720. package/dist/types.d.ts +443 -0
  721. package/dist/types.d.ts.map +1 -0
  722. package/dist/types.js +8 -0
  723. package/dist/types.js.map +1 -0
  724. package/dist/util/to-array.d.ts +2 -0
  725. package/dist/util/to-array.d.ts.map +1 -0
  726. package/dist/util/to-array.js +14 -0
  727. package/dist/util/to-array.js.map +1 -0
  728. package/dist/utils/levenshtein.d.ts +3 -0
  729. package/dist/utils/levenshtein.d.ts.map +1 -0
  730. package/dist/utils/levenshtein.js +29 -0
  731. package/dist/utils/levenshtein.js.map +1 -0
  732. package/dist/validation/validators.d.ts +20 -0
  733. package/dist/validation/validators.d.ts.map +1 -0
  734. package/dist/validation/validators.js +138 -0
  735. package/dist/validation/validators.js.map +1 -0
  736. package/dist/versioning/compute-patches.d.ts +7 -0
  737. package/dist/versioning/compute-patches.d.ts.map +1 -0
  738. package/dist/versioning/compute-patches.js +62 -0
  739. package/dist/versioning/compute-patches.js.map +1 -0
  740. package/dist/versioning/index.d.ts +12 -0
  741. package/dist/versioning/index.d.ts.map +1 -0
  742. package/dist/versioning/index.js +7 -0
  743. package/dist/versioning/index.js.map +1 -0
  744. package/dist/versioning/promote-gate.d.ts +12 -0
  745. package/dist/versioning/promote-gate.d.ts.map +1 -0
  746. package/dist/versioning/promote-gate.js +166 -0
  747. package/dist/versioning/promote-gate.js.map +1 -0
  748. package/dist/versioning/rollback.d.ts +26 -0
  749. package/dist/versioning/rollback.d.ts.map +1 -0
  750. package/dist/versioning/rollback.js +67 -0
  751. package/dist/versioning/rollback.js.map +1 -0
  752. package/dist/versioning/structural-diff.d.ts +8 -0
  753. package/dist/versioning/structural-diff.d.ts.map +1 -0
  754. package/dist/versioning/structural-diff.js +287 -0
  755. package/dist/versioning/structural-diff.js.map +1 -0
  756. package/dist/versioning/types.d.ts +90 -0
  757. package/dist/versioning/types.d.ts.map +1 -0
  758. package/dist/versioning/types.js +2 -0
  759. package/dist/versioning/types.js.map +1 -0
  760. package/dist/visibility/evaluator.d.ts +12 -0
  761. package/dist/visibility/evaluator.d.ts.map +1 -0
  762. package/dist/visibility/evaluator.js +76 -0
  763. package/dist/visibility/evaluator.js.map +1 -0
  764. package/dist/watchers/engine.d.ts +19 -0
  765. package/dist/watchers/engine.d.ts.map +1 -0
  766. package/dist/watchers/engine.js +24 -0
  767. package/dist/watchers/engine.js.map +1 -0
  768. package/docs/consumer/README.md +44 -0
  769. package/docs/consumer/WHERE-TO-LOOK.md +94 -0
  770. package/docs/consumer/ai-context-api.md +195 -0
  771. package/docs/consumer/ai-context-custom-elements.md +249 -0
  772. package/docs/consumer/ai-context-patterns.md +254 -0
  773. package/docs/consumer/ai-context-primitives.md +839 -0
  774. package/docs/consumer/ai-context-runtime-semantics.md +1075 -0
  775. package/docs/consumer/ai-context.md +1374 -0
  776. package/docs/consumer/reference-doc.md +3201 -0
  777. package/docs/llms.txt +17 -0
  778. package/docs/wiki/compiled/README.md +33 -0
  779. package/docs/wiki/compiled/_gaps.md +52 -0
  780. package/docs/wiki/compiled/_index.md +354 -0
  781. package/docs/wiki/compiled/_inventory.md +2986 -0
  782. package/docs/wiki/compiled/_lint.md +66 -0
  783. package/docs/wiki/compiled/_unmapped.md +3 -0
  784. package/docs/wiki/compiled/action-apply-preset.md +63 -0
  785. package/docs/wiki/compiled/action-copy-clipboard.md +45 -0
  786. package/docs/wiki/compiled/action-drawer.md +50 -0
  787. package/docs/wiki/compiled/action-export.md +66 -0
  788. package/docs/wiki/compiled/action-fetch.md +87 -0
  789. package/docs/wiki/compiled/action-form-control.md +55 -0
  790. package/docs/wiki/compiled/action-login.md +71 -0
  791. package/docs/wiki/compiled/action-modal.md +61 -0
  792. package/docs/wiki/compiled/action-navigate.md +72 -0
  793. package/docs/wiki/compiled/action-open-url.md +38 -0
  794. package/docs/wiki/compiled/action-refresh-data-source.md +51 -0
  795. package/docs/wiki/compiled/action-selection.md +55 -0
  796. package/docs/wiki/compiled/action-set-locale.md +44 -0
  797. package/docs/wiki/compiled/action-set-state.md +61 -0
  798. package/docs/wiki/compiled/action-show-notification.md +65 -0
  799. package/docs/wiki/compiled/action-submit-form.md +69 -0
  800. package/docs/wiki/compiled/action-toggle-theme.md +50 -0
  801. package/docs/wiki/compiled/action-update-tokens.md +63 -0
  802. package/docs/wiki/compiled/action-upload-file.md +87 -0
  803. package/docs/wiki/compiled/antipattern-action-chain-no-stop.md +49 -0
  804. package/docs/wiki/compiled/antipattern-all-filter-wildcard.md +59 -0
  805. package/docs/wiki/compiled/antipattern-auth-domains-port.md +47 -0
  806. package/docs/wiki/compiled/antipattern-background-blobs-prop.md +62 -0
  807. package/docs/wiki/compiled/antipattern-background-css-token.md +53 -0
  808. package/docs/wiki/compiled/antipattern-checkbox-toggle-value.md +42 -0
  809. package/docs/wiki/compiled/antipattern-crud-id-collision.md +66 -0
  810. package/docs/wiki/compiled/antipattern-derive-server-pagination.md +58 -0
  811. package/docs/wiki/compiled/antipattern-element-variant-top-level.md +57 -0
  812. package/docs/wiki/compiled/antipattern-event-expression.md +55 -0
  813. package/docs/wiki/compiled/antipattern-input-type-name.md +43 -0
  814. package/docs/wiki/compiled/antipattern-mix-fetch-and-datasources.md +48 -0
  815. package/docs/wiki/compiled/antipattern-modal-drawer-visible.md +57 -0
  816. package/docs/wiki/compiled/antipattern-motion-entrance-token.md +53 -0
  817. package/docs/wiki/compiled/antipattern-overflow-hidden-with-shadow.md +50 -0
  818. package/docs/wiki/compiled/antipattern-required-if-equals.md +59 -0
  819. package/docs/wiki/compiled/antipattern-row-literal.md +70 -0
  820. package/docs/wiki/compiled/antipattern-row-template-capture.md +42 -0
  821. package/docs/wiki/compiled/antipattern-store-save-bypass.md +72 -0
  822. package/docs/wiki/compiled/antipattern-style-block-duplication.md +56 -0
  823. package/docs/wiki/compiled/antipattern-submit-form-in-tx-confirm.md +56 -0
  824. package/docs/wiki/compiled/cli-app-spec.md +53 -0
  825. package/docs/wiki/compiled/cli-config.md +46 -0
  826. package/docs/wiki/compiled/cli-contract.md +73 -0
  827. package/docs/wiki/compiled/cli-delete.md +37 -0
  828. package/docs/wiki/compiled/cli-docs.md +44 -0
  829. package/docs/wiki/compiled/cli-elements.md +39 -0
  830. package/docs/wiki/compiled/cli-existing-spec-edit-loop.md +24 -0
  831. package/docs/wiki/compiled/cli-history.md +38 -0
  832. package/docs/wiki/compiled/cli-lint.md +77 -0
  833. package/docs/wiki/compiled/cli-manifest.md +43 -0
  834. package/docs/wiki/compiled/cli-overview.md +77 -0
  835. package/docs/wiki/compiled/cli-patch.md +85 -0
  836. package/docs/wiki/compiled/cli-programmatic-api.md +73 -0
  837. package/docs/wiki/compiled/cli-pull.md +39 -0
  838. package/docs/wiki/compiled/cli-push.md +91 -0
  839. package/docs/wiki/compiled/cli-tokens.md +38 -0
  840. package/docs/wiki/compiled/cli-toon.md +44 -0
  841. package/docs/wiki/compiled/cli-validate.md +52 -0
  842. package/docs/wiki/compiled/cli-versioning-author.md +58 -0
  843. package/docs/wiki/compiled/concept-action-chains.md +65 -0
  844. package/docs/wiki/compiled/concept-action-middleware.md +55 -0
  845. package/docs/wiki/compiled/concept-animation-build-css.md +43 -0
  846. package/docs/wiki/compiled/concept-animation-build-rn.md +44 -0
  847. package/docs/wiki/compiled/concept-animation-caps.md +38 -0
  848. package/docs/wiki/compiled/concept-animation-cascade.md +89 -0
  849. package/docs/wiki/compiled/concept-animation-null-semantics.md +55 -0
  850. package/docs/wiki/compiled/concept-animation-recipes.md +67 -0
  851. package/docs/wiki/compiled/concept-animation-triggers.md +54 -0
  852. package/docs/wiki/compiled/concept-animations-engine.md +78 -0
  853. package/docs/wiki/compiled/concept-api-audit.md +67 -0
  854. package/docs/wiki/compiled/concept-api-auth.md +67 -0
  855. package/docs/wiki/compiled/concept-api-catalogs.md +44 -0
  856. package/docs/wiki/compiled/concept-api-crud-endpoint.md +90 -0
  857. package/docs/wiki/compiled/concept-api-endpoint-properties.md +40 -0
  858. package/docs/wiki/compiled/concept-api-endpoints-overview.md +57 -0
  859. package/docs/wiki/compiled/concept-api-handler-endpoint.md +56 -0
  860. package/docs/wiki/compiled/concept-api-login-body-contract.md +47 -0
  861. package/docs/wiki/compiled/concept-api-param-properties.md +44 -0
  862. package/docs/wiki/compiled/concept-api-public-endpoint.md +33 -0
  863. package/docs/wiki/compiled/concept-api-query-endpoint.md +53 -0
  864. package/docs/wiki/compiled/concept-api-scope-filter.md +59 -0
  865. package/docs/wiki/compiled/concept-api-spec.md +70 -0
  866. package/docs/wiki/compiled/concept-app-auto-state-paths.md +59 -0
  867. package/docs/wiki/compiled/concept-app-spec.md +89 -0
  868. package/docs/wiki/compiled/concept-auth-config.md +71 -0
  869. package/docs/wiki/compiled/concept-auth-domains.md +55 -0
  870. package/docs/wiki/compiled/concept-auth-security.md +58 -0
  871. package/docs/wiki/compiled/concept-auth-state-paths.md +48 -0
  872. package/docs/wiki/compiled/concept-auto-dark-mode.md +55 -0
  873. package/docs/wiki/compiled/concept-background-caps.md +42 -0
  874. package/docs/wiki/compiled/concept-background-layer-kinds.md +80 -0
  875. package/docs/wiki/compiled/concept-background-recipes.md +53 -0
  876. package/docs/wiki/compiled/concept-background-stack.md +55 -0
  877. package/docs/wiki/compiled/concept-blob-layer.md +92 -0
  878. package/docs/wiki/compiled/concept-blob-motion.md +58 -0
  879. package/docs/wiki/compiled/concept-blob-shapes-catalog.md +45 -0
  880. package/docs/wiki/compiled/concept-cli-tokens-inspect.md +38 -0
  881. package/docs/wiki/compiled/concept-component-variants.md +89 -0
  882. package/docs/wiki/compiled/concept-cross-tab-sync.md +35 -0
  883. package/docs/wiki/compiled/concept-css-vs-motion.md +46 -0
  884. package/docs/wiki/compiled/concept-custom-detection-pattern.md +49 -0
  885. package/docs/wiki/compiled/concept-custom-element-action-props.md +81 -0
  886. package/docs/wiki/compiled/concept-custom-element-black-box.md +56 -0
  887. package/docs/wiki/compiled/concept-custom-element-cache.md +39 -0
  888. package/docs/wiki/compiled/concept-custom-element-error-boundary.md +33 -0
  889. package/docs/wiki/compiled/concept-custom-element-prop-cascade.md +60 -0
  890. package/docs/wiki/compiled/concept-custom-element-repeat.md +53 -0
  891. package/docs/wiki/compiled/concept-custom-elements.md +71 -0
  892. package/docs/wiki/compiled/concept-custom-jwt-provider.md +63 -0
  893. package/docs/wiki/compiled/concept-customize-action.md +33 -0
  894. package/docs/wiki/compiled/concept-customize-cli-lint-rule.md +30 -0
  895. package/docs/wiki/compiled/concept-customize-expression-handler.md +30 -0
  896. package/docs/wiki/compiled/concept-customize-plugin.md +43 -0
  897. package/docs/wiki/compiled/concept-customize-server-middleware.md +36 -0
  898. package/docs/wiki/compiled/concept-customize-spec-store.md +42 -0
  899. package/docs/wiki/compiled/concept-customize-validator-rule.md +35 -0
  900. package/docs/wiki/compiled/concept-customize-versioned-store.md +37 -0
  901. package/docs/wiki/compiled/concept-data-sources-lifecycle.md +61 -0
  902. package/docs/wiki/compiled/concept-data-sources.md +96 -0
  903. package/docs/wiki/compiled/concept-debugging-runtime-pointers.md +45 -0
  904. package/docs/wiki/compiled/concept-derive-datasources-mount-order.md +72 -0
  905. package/docs/wiki/compiled/concept-derive.md +67 -0
  906. package/docs/wiki/compiled/concept-dna-seeds.md +79 -0
  907. package/docs/wiki/compiled/concept-editor-commit.md +37 -0
  908. package/docs/wiki/compiled/concept-editor-save.md +18 -0
  909. package/docs/wiki/compiled/concept-editor-sessions.md +23 -0
  910. package/docs/wiki/compiled/concept-element-children-slot.md +54 -0
  911. package/docs/wiki/compiled/concept-element-definition.md +60 -0
  912. package/docs/wiki/compiled/concept-element-key.md +56 -0
  913. package/docs/wiki/compiled/concept-element-prop-definition.md +54 -0
  914. package/docs/wiki/compiled/concept-element-properties.md +81 -0
  915. package/docs/wiki/compiled/concept-element-render-node.md +62 -0
  916. package/docs/wiki/compiled/concept-element-variants.md +67 -0
  917. package/docs/wiki/compiled/concept-environment-store.md +46 -0
  918. package/docs/wiki/compiled/concept-export-action.md +56 -0
  919. package/docs/wiki/compiled/concept-expression-contexts.md +56 -0
  920. package/docs/wiki/compiled/concept-expression-timing.md +56 -0
  921. package/docs/wiki/compiled/concept-fetch-interceptors.md +49 -0
  922. package/docs/wiki/compiled/concept-file-upload-overview.md +55 -0
  923. package/docs/wiki/compiled/concept-fire-and-forget.md +45 -0
  924. package/docs/wiki/compiled/concept-font-loading.md +52 -0
  925. package/docs/wiki/compiled/concept-form-state-paths.md +55 -0
  926. package/docs/wiki/compiled/concept-forms.md +89 -0
  927. package/docs/wiki/compiled/concept-identity-accent-application.md +48 -0
  928. package/docs/wiki/compiled/concept-identity-animations.md +48 -0
  929. package/docs/wiki/compiled/concept-identity-border-elevation-override.md +56 -0
  930. package/docs/wiki/compiled/concept-identity-color-scheme.md +74 -0
  931. package/docs/wiki/compiled/concept-identity-color-weight.md +50 -0
  932. package/docs/wiki/compiled/concept-identity-glass-rn.md +46 -0
  933. package/docs/wiki/compiled/concept-identity-gradients.md +56 -0
  934. package/docs/wiki/compiled/concept-identity-heading-color.md +40 -0
  935. package/docs/wiki/compiled/concept-identity-helpers.md +61 -0
  936. package/docs/wiki/compiled/concept-identity-icons.md +46 -0
  937. package/docs/wiki/compiled/concept-identity-images.md +36 -0
  938. package/docs/wiki/compiled/concept-identity-label-style.md +36 -0
  939. package/docs/wiki/compiled/concept-identity-overview.md +72 -0
  940. package/docs/wiki/compiled/concept-identity-radius-pattern.md +39 -0
  941. package/docs/wiki/compiled/concept-identity-surface.md +62 -0
  942. package/docs/wiki/compiled/concept-identity-text-decoration.md +48 -0
  943. package/docs/wiki/compiled/concept-identity-typography-hierarchy.md +40 -0
  944. package/docs/wiki/compiled/concept-initial-actions.md +82 -0
  945. package/docs/wiki/compiled/concept-interactive-states.md +72 -0
  946. package/docs/wiki/compiled/concept-keyframe-snapshot.md +52 -0
  947. package/docs/wiki/compiled/concept-layer-background.md +80 -0
  948. package/docs/wiki/compiled/concept-motion-field.md +77 -0
  949. package/docs/wiki/compiled/concept-mount-spec-runtime.md +47 -0
  950. package/docs/wiki/compiled/concept-mythik-renderer.md +76 -0
  951. package/docs/wiki/compiled/concept-navigation-dirty-guard.md +23 -0
  952. package/docs/wiki/compiled/concept-navigation.md +75 -0
  953. package/docs/wiki/compiled/concept-package-layout.md +35 -0
  954. package/docs/wiki/compiled/concept-path-references.md +53 -0
  955. package/docs/wiki/compiled/concept-pattern-primitives.md +54 -0
  956. package/docs/wiki/compiled/concept-preset-dropdown-pattern.md +52 -0
  957. package/docs/wiki/compiled/concept-presets.md +49 -0
  958. package/docs/wiki/compiled/concept-primitive-prop-schemas.md +53 -0
  959. package/docs/wiki/compiled/concept-primitives-overview.md +49 -0
  960. package/docs/wiki/compiled/concept-promote-gate.md +47 -0
  961. package/docs/wiki/compiled/concept-prop-cascade.md +76 -0
  962. package/docs/wiki/compiled/concept-public-package-names.md +33 -0
  963. package/docs/wiki/compiled/concept-query-envelope.md +55 -0
  964. package/docs/wiki/compiled/concept-reduced-motion.md +38 -0
  965. package/docs/wiki/compiled/concept-register-presets.md +44 -0
  966. package/docs/wiki/compiled/concept-render-error-visibility.md +57 -0
  967. package/docs/wiki/compiled/concept-repeat-grouped.md +72 -0
  968. package/docs/wiki/compiled/concept-repeat-selection.md +61 -0
  969. package/docs/wiki/compiled/concept-repeat.md +81 -0
  970. package/docs/wiki/compiled/concept-role-access.md +61 -0
  971. package/docs/wiki/compiled/concept-rollback.md +36 -0
  972. package/docs/wiki/compiled/concept-rules-catalog.md +49 -0
  973. package/docs/wiki/compiled/concept-screen-definition.md +51 -0
  974. package/docs/wiki/compiled/concept-screen-outlet.md +46 -0
  975. package/docs/wiki/compiled/concept-session-persistence.md +41 -0
  976. package/docs/wiki/compiled/concept-shape-animations.md +66 -0
  977. package/docs/wiki/compiled/concept-skeleton-auto.md +58 -0
  978. package/docs/wiki/compiled/concept-skeleton-manual.md +47 -0
  979. package/docs/wiki/compiled/concept-source-of-truth-references.md +37 -0
  980. package/docs/wiki/compiled/concept-source-reading-misleading.md +37 -0
  981. package/docs/wiki/compiled/concept-spatial-map-editor.md +22 -0
  982. package/docs/wiki/compiled/concept-spatial-map-zones.md +18 -0
  983. package/docs/wiki/compiled/concept-spec-engine.md +47 -0
  984. package/docs/wiki/compiled/concept-spec-store-interface.md +59 -0
  985. package/docs/wiki/compiled/concept-spec-store-layering.md +51 -0
  986. package/docs/wiki/compiled/concept-spec-stores-catalog.md +66 -0
  987. package/docs/wiki/compiled/concept-spec-structure.md +94 -0
  988. package/docs/wiki/compiled/concept-spec-types.md +76 -0
  989. package/docs/wiki/compiled/concept-state-change-animation.md +73 -0
  990. package/docs/wiki/compiled/concept-state-policies.md +44 -0
  991. package/docs/wiki/compiled/concept-state-protection.md +51 -0
  992. package/docs/wiki/compiled/concept-storage-adapter.md +69 -0
  993. package/docs/wiki/compiled/concept-storage-custom-names.md +69 -0
  994. package/docs/wiki/compiled/concept-storage-evolution.md +32 -0
  995. package/docs/wiki/compiled/concept-storage-idempotency.md +35 -0
  996. package/docs/wiki/compiled/concept-storage-overview.md +81 -0
  997. package/docs/wiki/compiled/concept-storage-postgres-jsonb.md +53 -0
  998. package/docs/wiki/compiled/concept-storage-postgres-triggers.md +60 -0
  999. package/docs/wiki/compiled/concept-storage-table-environments.md +40 -0
  1000. package/docs/wiki/compiled/concept-storage-table-screens.md +44 -0
  1001. package/docs/wiki/compiled/concept-storage-table-versions.md +50 -0
  1002. package/docs/wiki/compiled/concept-storage-verification.md +57 -0
  1003. package/docs/wiki/compiled/concept-template-children-marker.md +56 -0
  1004. package/docs/wiki/compiled/concept-template-interpolation.md +60 -0
  1005. package/docs/wiki/compiled/concept-templates-vs-variants.md +80 -0
  1006. package/docs/wiki/compiled/concept-templates.md +93 -0
  1007. package/docs/wiki/compiled/concept-token-categories.md +58 -0
  1008. package/docs/wiki/compiled/concept-token-system.md +61 -0
  1009. package/docs/wiki/compiled/concept-transaction-phase-timing.md +47 -0
  1010. package/docs/wiki/compiled/concept-transaction-rollback.md +38 -0
  1011. package/docs/wiki/compiled/concept-transaction-snapshot.md +37 -0
  1012. package/docs/wiki/compiled/concept-transactions.md +72 -0
  1013. package/docs/wiki/compiled/concept-validation-checks.md +63 -0
  1014. package/docs/wiki/compiled/concept-validators-catalog.md +76 -0
  1015. package/docs/wiki/compiled/concept-versioned-store.md +65 -0
  1016. package/docs/wiki/compiled/concept-versioning-snapshots-patches.md +61 -0
  1017. package/docs/wiki/compiled/concept-visibility.md +55 -0
  1018. package/docs/wiki/compiled/concept-web-only-recipes.md +37 -0
  1019. package/docs/wiki/compiled/concept-where-to-look.md +78 -0
  1020. package/docs/wiki/compiled/expression-and-or-not.md +68 -0
  1021. package/docs/wiki/compiled/expression-array.md +111 -0
  1022. package/docs/wiki/compiled/expression-auth.md +83 -0
  1023. package/docs/wiki/compiled/expression-binditem.md +52 -0
  1024. package/docs/wiki/compiled/expression-bindstate.md +63 -0
  1025. package/docs/wiki/compiled/expression-breakpoint.md +71 -0
  1026. package/docs/wiki/compiled/expression-computed.md +52 -0
  1027. package/docs/wiki/compiled/expression-cond.md +78 -0
  1028. package/docs/wiki/compiled/expression-date.md +66 -0
  1029. package/docs/wiki/compiled/expression-format.md +79 -0
  1030. package/docs/wiki/compiled/expression-group.md +84 -0
  1031. package/docs/wiki/compiled/expression-i18n.md +53 -0
  1032. package/docs/wiki/compiled/expression-item-index.md +72 -0
  1033. package/docs/wiki/compiled/expression-let-ref.md +87 -0
  1034. package/docs/wiki/compiled/expression-math.md +67 -0
  1035. package/docs/wiki/compiled/expression-platform.md +68 -0
  1036. package/docs/wiki/compiled/expression-prop.md +89 -0
  1037. package/docs/wiki/compiled/expression-selection.md +58 -0
  1038. package/docs/wiki/compiled/expression-state.md +70 -0
  1039. package/docs/wiki/compiled/expression-switch.md +68 -0
  1040. package/docs/wiki/compiled/expression-template.md +71 -0
  1041. package/docs/wiki/compiled/expression-token.md +67 -0
  1042. package/docs/wiki/compiled/path-app-screens.md +55 -0
  1043. package/docs/wiki/compiled/path-data-source-paths.md +44 -0
  1044. package/docs/wiki/compiled/path-forms.md +38 -0
  1045. package/docs/wiki/compiled/path-login.md +57 -0
  1046. package/docs/wiki/compiled/path-navigation.md +62 -0
  1047. package/docs/wiki/compiled/path-presets-available.md +44 -0
  1048. package/docs/wiki/compiled/path-tokens.md +56 -0
  1049. package/docs/wiki/compiled/path-tx-result-error.md +56 -0
  1050. package/docs/wiki/compiled/path-ui-device.md +53 -0
  1051. package/docs/wiki/compiled/path-ui-loading-error.md +40 -0
  1052. package/docs/wiki/compiled/path-ui-modals-drawers.md +46 -0
  1053. package/docs/wiki/compiled/path-ui-selected-row.md +92 -0
  1054. package/docs/wiki/compiled/path-uploads.md +32 -0
  1055. package/docs/wiki/compiled/pattern-cross-screen-data-flow.md +83 -0
  1056. package/docs/wiki/compiled/pattern-fetch-vs-datasources.md +63 -0
  1057. package/docs/wiki/compiled/pattern-file-upload-auto.md +61 -0
  1058. package/docs/wiki/compiled/pattern-file-upload-manual.md +59 -0
  1059. package/docs/wiki/compiled/pattern-form-validation-cross-field.md +58 -0
  1060. package/docs/wiki/compiled/pattern-form-validation.md +58 -0
  1061. package/docs/wiki/compiled/pattern-fullstack-coherence.md +49 -0
  1062. package/docs/wiki/compiled/pattern-git-vs-db-versioning.md +55 -0
  1063. package/docs/wiki/compiled/pattern-identity-aware-spec.md +70 -0
  1064. package/docs/wiki/compiled/pattern-loading-content-empty.md +66 -0
  1065. package/docs/wiki/compiled/pattern-login-body-template.md +47 -0
  1066. package/docs/wiki/compiled/pattern-login-screen.md +83 -0
  1067. package/docs/wiki/compiled/pattern-push-vs-patch.md +54 -0
  1068. package/docs/wiki/compiled/pattern-reusable-components.md +67 -0
  1069. package/docs/wiki/compiled/pattern-tx-create.md +76 -0
  1070. package/docs/wiki/compiled/pattern-tx-delete.md +50 -0
  1071. package/docs/wiki/compiled/pattern-tx-toggle.md +45 -0
  1072. package/docs/wiki/compiled/pattern-tx-update.md +68 -0
  1073. package/docs/wiki/compiled/primitive-accordion.md +46 -0
  1074. package/docs/wiki/compiled/primitive-area-chart.md +35 -0
  1075. package/docs/wiki/compiled/primitive-audio-player.md +27 -0
  1076. package/docs/wiki/compiled/primitive-bar-chart.md +34 -0
  1077. package/docs/wiki/compiled/primitive-box.md +58 -0
  1078. package/docs/wiki/compiled/primitive-button.md +55 -0
  1079. package/docs/wiki/compiled/primitive-camera.md +39 -0
  1080. package/docs/wiki/compiled/primitive-checkbox.md +62 -0
  1081. package/docs/wiki/compiled/primitive-divider.md +31 -0
  1082. package/docs/wiki/compiled/primitive-drawer.md +44 -0
  1083. package/docs/wiki/compiled/primitive-file-upload.md +65 -0
  1084. package/docs/wiki/compiled/primitive-grid.md +48 -0
  1085. package/docs/wiki/compiled/primitive-icon.md +106 -0
  1086. package/docs/wiki/compiled/primitive-image.md +49 -0
  1087. package/docs/wiki/compiled/primitive-input.md +81 -0
  1088. package/docs/wiki/compiled/primitive-kanban-board.md +30 -0
  1089. package/docs/wiki/compiled/primitive-line-chart.md +33 -0
  1090. package/docs/wiki/compiled/primitive-list.md +34 -0
  1091. package/docs/wiki/compiled/primitive-modal.md +51 -0
  1092. package/docs/wiki/compiled/primitive-pie-chart.md +32 -0
  1093. package/docs/wiki/compiled/primitive-screen-outlet.md +42 -0
  1094. package/docs/wiki/compiled/primitive-screen.md +43 -0
  1095. package/docs/wiki/compiled/primitive-scroll.md +33 -0
  1096. package/docs/wiki/compiled/primitive-select.md +76 -0
  1097. package/docs/wiki/compiled/primitive-signature.md +40 -0
  1098. package/docs/wiki/compiled/primitive-skeleton.md +48 -0
  1099. package/docs/wiki/compiled/primitive-slider.md +47 -0
  1100. package/docs/wiki/compiled/primitive-spacer.md +33 -0
  1101. package/docs/wiki/compiled/primitive-spatial-map.md +26 -0
  1102. package/docs/wiki/compiled/primitive-stack.md +46 -0
  1103. package/docs/wiki/compiled/primitive-table.md +127 -0
  1104. package/docs/wiki/compiled/primitive-tabs.md +52 -0
  1105. package/docs/wiki/compiled/primitive-text.md +59 -0
  1106. package/docs/wiki/compiled/primitive-textarea.md +44 -0
  1107. package/docs/wiki/compiled/primitive-toast-container.md +44 -0
  1108. package/docs/wiki/compiled/primitive-toggle.md +46 -0
  1109. package/docs/wiki/compiled/primitive-touchable.md +40 -0
  1110. package/docs/wiki/compiled/primitive-wizard.md +43 -0
  1111. package/package.json +58 -8
@@ -0,0 +1,903 @@
1
+ import { SPEC_KEYS } from '../types.js';
2
+ import { suggest } from '../utils/levenshtein.js';
3
+ import { COMMON_PROPS, TABLE_COLUMN_PROPS } from '../renderer/prop-schemas.js';
4
+ import { validateIdentityTokens } from './identity-token-validator.js';
5
+ /** Expression handler rules: required properties and operation-specific requirements */
6
+ const EXPRESSION_RULES = {
7
+ $state: { required: ['$state'] },
8
+ $bindState: { required: ['$bindState'] },
9
+ $token: { required: ['$token'] },
10
+ $template: { required: ['$template'] },
11
+ $computed: { required: ['$computed'] },
12
+ $ref: { required: ['$ref'] },
13
+ $item: { required: ['$item'] },
14
+ $index: {},
15
+ $bindItem: { required: ['$bindItem'] },
16
+ $prop: { required: ['$prop'] },
17
+ $i18n: { required: ['$i18n'] },
18
+ $not: { required: ['$not'] },
19
+ $and: { required: ['$and'] },
20
+ $or: { required: ['$or'] },
21
+ $breakpoint: { required: ['$breakpoint'] },
22
+ $cond: { required: ['$cond', '$then', '$else'] },
23
+ $switch: { required: ['$switch', 'cases', 'default'] },
24
+ $group: { required: ['$group'] },
25
+ $selection: { required: ['$selection'] },
26
+ $uniqueId: { required: ['$uniqueId', 'source'] },
27
+ $let: { required: ['$let', '$in'] },
28
+ $format: { required: ['$format', 'value'] },
29
+ $math: {
30
+ required: ['$math'],
31
+ operations: {
32
+ add: { required: ['args'] }, subtract: { required: ['args'] }, multiply: { required: ['args'] },
33
+ divide: { required: ['args'] }, mod: { required: ['args'] }, min: { required: ['args'] }, max: { required: ['args'] },
34
+ round: { required: ['value'] }, floor: { required: ['value'] }, ceil: { required: ['value'] }, abs: { required: ['value'] },
35
+ },
36
+ },
37
+ $date: {
38
+ required: ['$date'],
39
+ operations: {
40
+ now: {}, today: {},
41
+ age: { required: ['from'] }, diff: { required: ['from'] },
42
+ format: { required: ['value'] }, add: { required: ['value', 'amount'] },
43
+ },
44
+ },
45
+ $array: {
46
+ required: ['$array', 'source'],
47
+ operations: {
48
+ count: {}, length: {}, first: {}, last: {}, slice: {}, filter: {},
49
+ sum: { required: ['field'] }, sumProduct: { required: ['field1', 'field2'] },
50
+ remove: { required: ['where'] }, replace: { required: ['where', 'value'] },
51
+ append: { required: ['value'] }, toggle: { required: ['value'] },
52
+ search: { required: ['query'] }, includes: { required: ['value'] },
53
+ sort: { required: ['field'] }, map: { required: ['field'] }, find: { required: ['where'] },
54
+ },
55
+ },
56
+ };
57
+ /** Required params per built-in action */
58
+ const ACTION_REQUIRED_PARAMS = {
59
+ setState: ['statePath'],
60
+ fetch: ['url'],
61
+ submitForm: ['url'],
62
+ navigate: ['screen'],
63
+ setLocale: ['locale'],
64
+ uploadFile: ['bucket', 'target'],
65
+ deleteFile: ['path', 'bucket'],
66
+ export: ['source', 'columns', 'filename'],
67
+ editorCommit: ['session', 'changes'],
68
+ editorUndo: ['session'],
69
+ editorRedo: ['session'],
70
+ editorMarkSaved: ['session'],
71
+ editorSave: ['session'],
72
+ editorDiscard: ['session'],
73
+ editorValidate: ['session'],
74
+ };
75
+ function validateExpression(expr, elementId, exprPath, errors) {
76
+ if (expr === null || expr === undefined || typeof expr !== 'object')
77
+ return;
78
+ if (Array.isArray(expr)) {
79
+ for (let i = 0; i < expr.length; i++) {
80
+ validateExpression(expr[i], elementId, `${exprPath}.${i}`, errors);
81
+ }
82
+ return;
83
+ }
84
+ const obj = expr;
85
+ const exprKey = Object.keys(obj).find((k) => k.startsWith('$') && EXPRESSION_RULES[k]);
86
+ if (!exprKey) {
87
+ for (const [key, val] of Object.entries(obj)) {
88
+ if (val && typeof val === 'object') {
89
+ validateExpression(val, elementId, `${exprPath}.${key}`, errors);
90
+ }
91
+ }
92
+ return;
93
+ }
94
+ const rules = EXPRESSION_RULES[exprKey];
95
+ if (rules.required) {
96
+ for (const prop of rules.required) {
97
+ if (obj[prop] === undefined) {
98
+ errors.push({
99
+ message: `Element "${elementId}": ${exprKey} at ${exprPath} requires "${prop}" property`,
100
+ elementId,
101
+ path: `/elements/${elementId}/${exprPath.replace(/\./g, '/')}`,
102
+ });
103
+ }
104
+ }
105
+ }
106
+ if (exprKey === '$state' && obj.$state !== undefined && typeof obj.$state !== 'string') {
107
+ errors.push({
108
+ message: `Element "${elementId}": $state at ${exprPath} requires a string path`,
109
+ elementId,
110
+ path: `/elements/${elementId}/${exprPath.replace(/\./g, '/')}/$state`,
111
+ });
112
+ }
113
+ if (rules.operations) {
114
+ const operation = obj[exprKey];
115
+ if (typeof operation === 'string' && rules.operations[operation]) {
116
+ const opRules = rules.operations[operation];
117
+ if (opRules.required) {
118
+ for (const prop of opRules.required) {
119
+ if (obj[prop] === undefined) {
120
+ errors.push({
121
+ message: `Element "${elementId}": ${exprKey} "${operation}" at ${exprPath} requires "${prop}" property`,
122
+ elementId,
123
+ path: `/elements/${elementId}/${exprPath.replace(/\./g, '/')}`,
124
+ });
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ for (const [key, val] of Object.entries(obj)) {
131
+ if (key !== exprKey && val && typeof val === 'object') {
132
+ validateExpression(val, elementId, `${exprPath}.${key}`, errors);
133
+ }
134
+ }
135
+ }
136
+ function validateActionBinding(binding, elementId, eventPath, errors, spec) {
137
+ if (!binding || typeof binding !== 'object')
138
+ return;
139
+ if ('transaction' in binding)
140
+ return;
141
+ const b = binding;
142
+ const action = b.action;
143
+ if (!action)
144
+ return;
145
+ const requiredParams = ACTION_REQUIRED_PARAMS[action];
146
+ if (b.params && typeof b.params === 'object') {
147
+ const params = b.params;
148
+ if (requiredParams) {
149
+ for (const param of requiredParams) {
150
+ if (params[param] === undefined) {
151
+ errors.push({
152
+ message: `Element "${elementId}": action "${action}" at ${eventPath} requires "${param}" param`,
153
+ elementId,
154
+ path: `/elements/${elementId}/${eventPath.replace(/\./g, '/')}`,
155
+ });
156
+ }
157
+ }
158
+ }
159
+ for (const [paramName, paramValue] of Object.entries(params)) {
160
+ validateExpression(paramValue, elementId, `${eventPath}.params.${paramName}`, errors);
161
+ }
162
+ validateEditorSaveAction(action, params, elementId, eventPath, errors, spec);
163
+ }
164
+ else if (requiredParams) {
165
+ for (const param of requiredParams) {
166
+ errors.push({
167
+ message: `Element "${elementId}": action "${action}" at ${eventPath} requires "${param}" param`,
168
+ elementId,
169
+ path: `/elements/${elementId}/${eventPath.replace(/\./g, '/')}`,
170
+ });
171
+ }
172
+ }
173
+ }
174
+ function validateEditorSaveAction(action, params, elementId, eventPath, errors, spec) {
175
+ if (action !== 'editorSave')
176
+ return;
177
+ if (typeof params.session !== 'string' || !params.session)
178
+ return;
179
+ const sessionId = params.session;
180
+ const sessions = spec?.editorSessions;
181
+ const session = sessions?.[sessionId];
182
+ if (!session) {
183
+ errors.push({
184
+ message: `Element "${elementId}": editorSave at ${eventPath} references unknown editor session "${sessionId}"`,
185
+ elementId,
186
+ path: `/elements/${elementId}/${eventPath.replace(/\./g, '/')}/params/session`,
187
+ });
188
+ return;
189
+ }
190
+ if (!session.persistence && params.url === undefined) {
191
+ errors.push({
192
+ message: `Element "${elementId}": editorSave at ${eventPath} requires session persistence or params.url`,
193
+ elementId,
194
+ path: `/elements/${elementId}/${eventPath.replace(/\./g, '/')}/params`,
195
+ });
196
+ }
197
+ }
198
+ /**
199
+ * Lint walker — detects `$row` literal usage in spec values.
200
+ *
201
+ * `$row` is not a valid expression handler in Mythik — it was a historical doc lie
202
+ * removed in v49 Item B. AI consumers may still generate it from training data.
203
+ * Runtime resolves to undefined silently; lint catches at validate/push/lint time.
204
+ *
205
+ * Emits warnings to the provided array with `ruleId: 'spec-row-literal'`.
206
+ * Suggested fix: replace `{ $row: 'X' }` with `{ $state: '/ui/selectedRow/X' }`.
207
+ */
208
+ function validateEditorSessions(spec, errors) {
209
+ const sessions = spec.editorSessions;
210
+ if (sessions === undefined)
211
+ return;
212
+ if (!sessions || typeof sessions !== 'object' || Array.isArray(sessions)) {
213
+ errors.push({ message: 'editorSessions must be an object keyed by session id', path: '/editorSessions' });
214
+ return;
215
+ }
216
+ for (const [sessionId, rawConfig] of Object.entries(sessions)) {
217
+ const basePath = `/editorSessions/${sessionId}`;
218
+ if (!rawConfig || typeof rawConfig !== 'object' || Array.isArray(rawConfig)) {
219
+ errors.push({ message: `editorSession "${sessionId}" must be an object`, path: basePath });
220
+ continue;
221
+ }
222
+ const config = rawConfig;
223
+ const paths = config.paths;
224
+ if (!Array.isArray(paths) || paths.length === 0) {
225
+ errors.push({ message: `editorSession "${sessionId}" requires at least one path`, path: `${basePath}/paths` });
226
+ }
227
+ else {
228
+ paths.forEach((path, index) => {
229
+ if (typeof path !== 'string' || !path.startsWith('/')) {
230
+ errors.push({
231
+ message: `editorSession "${sessionId}" path must start with "/"`,
232
+ path: `${basePath}/paths/${index}`,
233
+ });
234
+ }
235
+ if (path === '/ui' || (typeof path === 'string' && path.startsWith('/ui/'))) {
236
+ errors.push({
237
+ message: `editorSession "${sessionId}" should not track transient /ui paths`,
238
+ path: `${basePath}/paths/${index}`,
239
+ });
240
+ }
241
+ });
242
+ }
243
+ if (config.maxHistory !== undefined
244
+ && (!Number.isInteger(config.maxHistory) || config.maxHistory < 1)) {
245
+ errors.push({ message: `editorSession "${sessionId}" maxHistory must be a positive integer`, path: `${basePath}/maxHistory` });
246
+ }
247
+ const persistence = config.persistence;
248
+ if (persistence !== undefined) {
249
+ if (!persistence || typeof persistence !== 'object' || Array.isArray(persistence)) {
250
+ errors.push({ message: `editorSession "${sessionId}" persistence must be an object`, path: `${basePath}/persistence` });
251
+ }
252
+ else {
253
+ const rawPersistence = persistence;
254
+ if (rawPersistence.url === undefined) {
255
+ errors.push({ message: `editorSession "${sessionId}" persistence requires url`, path: `${basePath}/persistence/url` });
256
+ }
257
+ if (rawPersistence.method !== undefined
258
+ && !['POST', 'PUT', 'PATCH'].includes(String(rawPersistence.method))) {
259
+ errors.push({ message: `editorSession "${sessionId}" persistence method must be POST, PUT, or PATCH`, path: `${basePath}/persistence/method` });
260
+ }
261
+ if (rawPersistence.body !== undefined
262
+ && rawPersistence.body !== 'trackedPaths'
263
+ && rawPersistence.body !== 'snapshot'
264
+ && (typeof rawPersistence.body !== 'object' || rawPersistence.body === null || Array.isArray(rawPersistence.body))) {
265
+ errors.push({ message: `editorSession "${sessionId}" persistence body must be "trackedPaths", "snapshot", or an object`, path: `${basePath}/persistence/body` });
266
+ }
267
+ }
268
+ }
269
+ }
270
+ }
271
+ function walkForRowLiteral(value, jsonPath, warnings) {
272
+ if (value === null || value === undefined)
273
+ return;
274
+ if (typeof value !== 'object')
275
+ return;
276
+ if (Array.isArray(value)) {
277
+ for (let i = 0; i < value.length; i++) {
278
+ walkForRowLiteral(value[i], `${jsonPath}/${i}`, warnings);
279
+ }
280
+ return;
281
+ }
282
+ const obj = value;
283
+ if ('$row' in obj) {
284
+ const rowValue = obj.$row;
285
+ const inferredKey = typeof rowValue === 'string' ? rowValue : '<key>';
286
+ warnings.push({
287
+ message: `$row is not a valid expression handler — use $state with /ui/selectedRow path`,
288
+ path: jsonPath,
289
+ ruleId: 'spec-row-literal',
290
+ suggestedFixes: [{
291
+ patch: { op: 'replace', path: jsonPath, value: { $state: `/ui/selectedRow/${inferredKey}` } },
292
+ confidence: 'high',
293
+ description: `Replace $row with /ui/selectedRow/${inferredKey}`,
294
+ }],
295
+ });
296
+ return; // Don't descend into the $row object itself
297
+ }
298
+ for (const [key, val] of Object.entries(obj)) {
299
+ walkForRowLiteral(val, `${jsonPath}/${key}`, warnings);
300
+ }
301
+ }
302
+ /**
303
+ * Validates a Spec structure before rendering.
304
+ * With primitiveRegistry: also validates primitive types, expressions, and action params.
305
+ */
306
+ export function validateSpec(spec, context = {}) {
307
+ const errors = [];
308
+ const warnings = [];
309
+ const doFixes = context.generateFixes !== false;
310
+ if (!spec || typeof spec !== 'object') {
311
+ return { valid: false, errors: [{ message: 'Spec must be an object' }] };
312
+ }
313
+ const s = spec;
314
+ if (!s.root || typeof s.root !== 'string') {
315
+ errors.push({ message: 'Spec must have a "root" string property' });
316
+ }
317
+ if (!s.elements || typeof s.elements !== 'object' || Array.isArray(s.elements)) {
318
+ errors.push({ message: 'Spec must have an "elements" object property' });
319
+ }
320
+ if (errors.length > 0)
321
+ return { valid: false, errors };
322
+ // Warn on unknown top-level properties (typo detection)
323
+ const specKeySet = new Set(SPEC_KEYS);
324
+ for (const key of Object.keys(s)) {
325
+ if (!specKeySet.has(key)) {
326
+ const warning = {
327
+ message: `Unknown top-level property "${key}"`,
328
+ path: `/${key}`,
329
+ };
330
+ if (doFixes) {
331
+ const suggested = suggest(key, SPEC_KEYS);
332
+ if (suggested) {
333
+ warning.suggestedFixes = [{
334
+ patch: { op: 'remove', path: `/${key}` },
335
+ confidence: 'high',
336
+ description: `did you mean '${suggested}'?`,
337
+ }];
338
+ }
339
+ }
340
+ warnings.push(warning);
341
+ }
342
+ }
343
+ validateEditorSessions(s, errors);
344
+ const elements = s.elements;
345
+ const root = s.root;
346
+ if (s.tokens && typeof s.tokens === 'object' && !Array.isArray(s.tokens)) {
347
+ const tokens = s.tokens;
348
+ if (tokens.identity !== undefined) {
349
+ validateIdentityTokens(tokens.identity, '/tokens/identity', errors);
350
+ }
351
+ }
352
+ if (!elements[root]) {
353
+ errors.push({ message: `Root element "${root}" not found in elements` });
354
+ }
355
+ // Collect orphan child errors per parent for descending index ordering
356
+ const orphanErrors = [];
357
+ for (const [id, element] of Object.entries(elements)) {
358
+ if (!element || typeof element !== 'object') {
359
+ errors.push({ message: `Element "${id}" must be an object`, elementId: id });
360
+ continue;
361
+ }
362
+ const el = element;
363
+ if (!el.type || typeof el.type !== 'string') {
364
+ errors.push({ message: `Element "${id}" must have a "type" string property`, elementId: id, path: `/elements/${id}/type` });
365
+ }
366
+ // Validate primitive type exists in registry — auto-fix #1
367
+ // Also accept Layer 3 custom elements registered via ElementRegistry.
368
+ if (context.primitiveRegistry && el.type && typeof el.type === 'string') {
369
+ const isPrimitive = context.primitiveRegistry.has(el.type);
370
+ const isCustomElement = context.elementRegistry?.has(el.type) ?? false;
371
+ if (!isPrimitive && !isCustomElement) {
372
+ const error = {
373
+ message: `Element "${id}": unknown primitive type "${el.type}"`,
374
+ elementId: id,
375
+ path: `/elements/${id}/type`,
376
+ };
377
+ if (doFixes) {
378
+ const candidates = [
379
+ ...context.primitiveRegistry.keys(),
380
+ ...(context.elementRegistry ? [...context.elementRegistry.getAll().keys()] : []),
381
+ ];
382
+ const suggested = suggest(el.type, candidates);
383
+ if (suggested) {
384
+ error.suggestedFixes = [{
385
+ patch: { op: 'replace', path: `/elements/${id}/type`, value: suggested },
386
+ confidence: 'high',
387
+ description: `type '${el.type}' → '${suggested}' (Levenshtein match)`,
388
+ }];
389
+ }
390
+ }
391
+ errors.push(error);
392
+ }
393
+ }
394
+ // Children — orphan detection with auto-fix #2
395
+ if (el.children !== undefined) {
396
+ if (!Array.isArray(el.children)) {
397
+ errors.push({ message: `Element "${id}": "children" must be an array`, elementId: id, path: `/elements/${id}/children` });
398
+ }
399
+ else {
400
+ for (let i = 0; i < el.children.length; i++) {
401
+ const childId = el.children[i];
402
+ if (typeof childId !== 'string') {
403
+ errors.push({ message: `Element "${id}": children must be strings (element IDs)`, elementId: id, path: `/elements/${id}/children/${i}` });
404
+ }
405
+ else if (!elements[childId]) {
406
+ const error = {
407
+ message: `Element "${id}": child "${childId}" not found in elements`,
408
+ elementId: id,
409
+ path: `/elements/${id}/children/${i}`,
410
+ };
411
+ if (doFixes) {
412
+ error.suggestedFixes = [{
413
+ patch: { op: 'remove', path: `/elements/${id}/children/${i}` },
414
+ confidence: 'high',
415
+ description: `remove orphan child '${childId}' at index ${i}`,
416
+ }];
417
+ }
418
+ orphanErrors.push(error);
419
+ }
420
+ }
421
+ }
422
+ }
423
+ if (el.props !== undefined && (typeof el.props !== 'object' || Array.isArray(el.props))) {
424
+ errors.push({ message: `Element "${id}": "props" must be an object`, elementId: id, path: `/elements/${id}/props` });
425
+ }
426
+ if (el.style !== undefined && (typeof el.style !== 'object' || Array.isArray(el.style))) {
427
+ errors.push({ message: `Element "${id}": "style" must be an object`, elementId: id, path: `/elements/${id}/style` });
428
+ }
429
+ if (el.props && typeof el.props === 'object' && !Array.isArray(el.props)) {
430
+ for (const [propName, propVal] of Object.entries(el.props)) {
431
+ if (propVal && typeof propVal === 'object') {
432
+ validateExpression(propVal, id, `props.${propName}`, errors);
433
+ }
434
+ }
435
+ // Validate prop names against primitive schema
436
+ if (context.propSchemas && el.type && typeof el.type === 'string') {
437
+ const knownProps = context.propSchemas[el.type]?.validProps;
438
+ if (knownProps) {
439
+ for (const propName of Object.keys(el.props)) {
440
+ if (COMMON_PROPS.has(propName))
441
+ continue;
442
+ if (!knownProps.includes(propName)) {
443
+ const warning = {
444
+ message: `Element "${id}": unknown prop "${propName}" for type "${el.type}"`,
445
+ elementId: id,
446
+ path: `/elements/${id}/props/${propName}`,
447
+ };
448
+ if (doFixes) {
449
+ const suggested = suggest(propName, knownProps);
450
+ if (suggested) {
451
+ warning.suggestedFixes = [{
452
+ patch: { op: 'replace', path: `/elements/${id}/props/${propName}`, value: suggested },
453
+ confidence: 'high',
454
+ description: `did you mean '${suggested}'?`,
455
+ }];
456
+ }
457
+ }
458
+ warnings.push(warning);
459
+ }
460
+ }
461
+ }
462
+ }
463
+ // Validate table column props
464
+ if (el.type === 'table' && context.propSchemas) {
465
+ const cols = el.props?.columns;
466
+ if (Array.isArray(cols)) {
467
+ const colKeySet = new Set(TABLE_COLUMN_PROPS);
468
+ for (let ci = 0; ci < cols.length; ci++) {
469
+ const col = cols[ci];
470
+ if (col && typeof col === 'object' && !Array.isArray(col)) {
471
+ for (const colKey of Object.keys(col)) {
472
+ if (!colKeySet.has(colKey)) {
473
+ const warning = {
474
+ message: `Element "${id}": unknown column prop "${colKey}" at columns[${ci}]`,
475
+ elementId: id,
476
+ path: `/elements/${id}/props/columns/${ci}/${colKey}`,
477
+ };
478
+ if (doFixes) {
479
+ const suggested = suggest(colKey, TABLE_COLUMN_PROPS);
480
+ if (suggested) {
481
+ warning.suggestedFixes = [{
482
+ patch: { op: 'replace', path: `/elements/${id}/props/columns/${ci}/${colKey}`, value: suggested },
483
+ confidence: 'high',
484
+ description: `did you mean '${suggested}'?`,
485
+ }];
486
+ }
487
+ }
488
+ warnings.push(warning);
489
+ }
490
+ }
491
+ }
492
+ }
493
+ }
494
+ }
495
+ }
496
+ if (el.style && typeof el.style === 'object' && !Array.isArray(el.style)) {
497
+ for (const [styleProp, styleVal] of Object.entries(el.style)) {
498
+ if (styleVal && typeof styleVal === 'object') {
499
+ validateExpression(styleVal, id, `style.${styleProp}`, errors);
500
+ }
501
+ }
502
+ }
503
+ if (el.visible && typeof el.visible === 'object') {
504
+ validateExpression(el.visible, id, 'visible', errors);
505
+ }
506
+ if (el.on !== undefined && (typeof el.on !== 'object' || Array.isArray(el.on))) {
507
+ errors.push({ message: `Element "${id}": "on" must be an object`, elementId: id, path: `/elements/${id}/on` });
508
+ }
509
+ if (el.on && typeof el.on === 'object' && !Array.isArray(el.on)) {
510
+ for (const [eventName, binding] of Object.entries(el.on)) {
511
+ if (binding && typeof binding === 'object' && !Array.isArray(binding) && 'transaction' in binding) {
512
+ const tx = binding.transaction;
513
+ if (!tx || typeof tx !== 'object' || Array.isArray(tx)) {
514
+ errors.push({ message: `Element "${id}": on.${eventName}.transaction must be an object`, elementId: id, path: `/elements/${id}/on/${eventName}/transaction` });
515
+ continue;
516
+ }
517
+ const txObj = tx;
518
+ if (!txObj.confirm || !Array.isArray(txObj.confirm) || txObj.confirm.length === 0) {
519
+ errors.push({ message: `Element "${id}": on.${eventName}.transaction.confirm is required and must be a non-empty array`, elementId: id, path: `/elements/${id}/on/${eventName}/transaction/confirm` });
520
+ }
521
+ for (const phase of ['before', 'optimistic', 'onSuccess', 'onError']) {
522
+ if (txObj[phase] !== undefined && !Array.isArray(txObj[phase])) {
523
+ errors.push({ message: `Element "${id}": on.${eventName}.transaction.${phase} must be an array`, elementId: id, path: `/elements/${id}/on/${eventName}/transaction/${phase}` });
524
+ }
525
+ }
526
+ if (txObj.timeout !== undefined) {
527
+ if (typeof txObj.timeout !== 'number' || txObj.timeout <= 0) {
528
+ errors.push({ message: `Element "${id}": on.${eventName}.transaction.timeout must be a positive number`, elementId: id, path: `/elements/${id}/on/${eventName}/transaction/timeout` });
529
+ }
530
+ }
531
+ for (const phase of ['before', 'optimistic', 'confirm', 'onSuccess', 'onError']) {
532
+ if (Array.isArray(txObj[phase])) {
533
+ for (const action of txObj[phase]) {
534
+ if (action && typeof action === 'object' && 'transaction' in action) {
535
+ errors.push({ message: `Element "${id}": on.${eventName}.transaction.${phase} cannot contain nested transactions`, elementId: id, path: `/elements/${id}/on/${eventName}/transaction/${phase}` });
536
+ }
537
+ validateActionBinding(action, id, `on.${eventName}.transaction.${phase}`, errors, s);
538
+ }
539
+ }
540
+ }
541
+ }
542
+ else if (Array.isArray(binding)) {
543
+ for (const action of binding) {
544
+ validateActionBinding(action, id, `on.${eventName}`, errors, s);
545
+ }
546
+ }
547
+ else if (binding && typeof binding === 'object') {
548
+ validateActionBinding(binding, id, `on.${eventName}`, errors, s);
549
+ }
550
+ }
551
+ }
552
+ if (el.repeat !== undefined) {
553
+ const repeat = el.repeat;
554
+ if (!repeat.statePath && !repeat.source && !repeat.count) {
555
+ errors.push({ message: `Element "${id}": "repeat" must have "statePath", "source", or "count"`, elementId: id, path: `/elements/${id}/repeat` });
556
+ }
557
+ }
558
+ if (context.cssHoverTypes && el.type && typeof el.type === 'string') {
559
+ const hasCssInteraction = el.hover || el.active || el.focus;
560
+ if (hasCssInteraction && !context.cssHoverTypes.has(el.type)) {
561
+ const fields = [el.hover && 'hover', el.active && 'active', el.focus && 'focus'].filter(Boolean).join(', ');
562
+ errors.push({ message: `Element "${id}": has ${fields} but type "${el.type}" does not support CSS className — interaction will be silently ignored. Use transform-based props (scale, y, rotate) for Motion wrapper, or add className support to the primitive`, elementId: id, path: `/elements/${id}` });
563
+ }
564
+ }
565
+ // Toast-container validation — auto-fix #3
566
+ if (el.type === 'toast-container' && el.props && typeof el.props === 'object') {
567
+ const props = el.props;
568
+ const validPositions = ['top-right', 'top-left', 'top-center', 'bottom-right', 'bottom-left', 'bottom-center'];
569
+ if (props.position !== undefined && !validPositions.includes(props.position)) {
570
+ const error = {
571
+ message: `Element "${id}": toast-container position must be one of: ${validPositions.join(', ')}`,
572
+ elementId: id,
573
+ path: `/elements/${id}/props/position`,
574
+ };
575
+ if (doFixes) {
576
+ const suggested = suggest(props.position, validPositions);
577
+ if (suggested) {
578
+ error.suggestedFixes = [{
579
+ patch: { op: 'replace', path: `/elements/${id}/props/position`, value: suggested },
580
+ confidence: 'high',
581
+ description: `position '${props.position}' → '${suggested}' (Levenshtein match)`,
582
+ }];
583
+ }
584
+ }
585
+ errors.push(error);
586
+ }
587
+ if (props.duration !== undefined && props.duration !== null && typeof props.duration !== 'number') {
588
+ errors.push({ message: `Element "${id}": toast-container duration must be a number or null`, elementId: id, path: `/elements/${id}/props/duration` });
589
+ }
590
+ if (props.maxVisible !== undefined && (typeof props.maxVisible !== 'number' || props.maxVisible < 1)) {
591
+ errors.push({ message: `Element "${id}": toast-container maxVisible must be a positive number`, elementId: id, path: `/elements/${id}/props/maxVisible` });
592
+ }
593
+ }
594
+ if (el.type === 'table' && el.props && typeof el.props === 'object') {
595
+ const props = el.props;
596
+ if (props.sorting && typeof props.sorting === 'object') {
597
+ const sorting = props.sorting;
598
+ if (sorting.enabled && sorting.mode === 'server' && !sorting.state) {
599
+ errors.push({ message: `Element "${id}": table sorting.mode "server" requires "state" path`, elementId: id, path: `/elements/${id}/props/sorting/state` });
600
+ }
601
+ }
602
+ if (props.pagination && typeof props.pagination === 'object') {
603
+ const pagination = props.pagination;
604
+ if (pagination.enabled && pagination.mode === 'server' && !pagination.state) {
605
+ errors.push({ message: `Element "${id}": table pagination.mode "server" requires "state" path`, elementId: id, path: `/elements/${id}/props/pagination/state` });
606
+ }
607
+ }
608
+ }
609
+ // File-upload validation
610
+ if (el.type === 'file-upload' && el.props && typeof el.props === 'object') {
611
+ const props = el.props;
612
+ if (props.maxSize !== undefined && (typeof props.maxSize !== 'number' || props.maxSize <= 0)) {
613
+ errors.push({ message: `Element "${id}": file-upload maxSize must be a positive number`, elementId: id, path: `/elements/${id}/props/maxSize` });
614
+ }
615
+ if (props.maxFiles !== undefined && (typeof props.maxFiles !== 'number' || props.maxFiles <= 0 || !Number.isInteger(props.maxFiles))) {
616
+ errors.push({ message: `Element "${id}": file-upload maxFiles must be a positive integer`, elementId: id, path: `/elements/${id}/props/maxFiles` });
617
+ }
618
+ }
619
+ // Skeleton validation
620
+ if (el.type === 'skeleton' && el.props && typeof el.props === 'object') {
621
+ const props = el.props;
622
+ const validVariants = ['text', 'circle', 'rect'];
623
+ if (props.variant !== undefined && !validVariants.includes(props.variant)) {
624
+ errors.push({ message: `Element "${id}": skeleton variant must be one of ${validVariants.join(', ')}`, elementId: id, path: `/elements/${id}/props/variant` });
625
+ }
626
+ if (props.height !== undefined && (typeof props.height !== 'number' || props.height <= 0)) {
627
+ errors.push({ message: `Element "${id}": skeleton height must be a positive number`, elementId: id, path: `/elements/${id}/props/height` });
628
+ }
629
+ if (props.count !== undefined && (typeof props.count !== 'number' || props.count <= 0 || !Number.isInteger(props.count))) {
630
+ errors.push({ message: `Element "${id}": skeleton count must be a positive integer`, elementId: id, path: `/elements/${id}/props/count` });
631
+ }
632
+ if (props.gap !== undefined && (typeof props.gap !== 'number' || props.gap < 0)) {
633
+ errors.push({ message: `Element "${id}": skeleton gap must be a non-negative number`, elementId: id, path: `/elements/${id}/props/gap` });
634
+ }
635
+ }
636
+ // Variant validation
637
+ if (el.props && typeof el.props === 'object') {
638
+ const props = el.props;
639
+ const variantVal = props.variant;
640
+ if (variantVal && typeof variantVal === 'string' && context?.variantTokens) {
641
+ const components = context.variantTokens.components;
642
+ if (components) {
643
+ const elType = el.type;
644
+ const typeVariants = components[elType];
645
+ if (!typeVariants || !typeVariants[variantVal]) {
646
+ errors.push({
647
+ message: `Element "${id}": variant "${variantVal}" not found in tokens.components.${elType}`,
648
+ elementId: id,
649
+ path: `/elements/${id}/props/variant`,
650
+ });
651
+ }
652
+ }
653
+ }
654
+ }
655
+ }
656
+ // Add orphan errors sorted by descending index (for safe sequential patch application)
657
+ orphanErrors.sort((a, b) => {
658
+ const idxA = parseInt(a.path.split('/').pop(), 10);
659
+ const idxB = parseInt(b.path.split('/').pop(), 10);
660
+ return idxB - idxA;
661
+ });
662
+ errors.push(...orphanErrors);
663
+ // Lint rule: spec-row-literal — walk all elements for $row literal usage.
664
+ for (const [id, element] of Object.entries(elements)) {
665
+ if (element && typeof element === 'object') {
666
+ walkForRowLiteral(element, `/elements/${id}`, warnings);
667
+ }
668
+ }
669
+ // Validate derive section
670
+ if (s.derive && typeof s.derive === 'object' && !Array.isArray(s.derive)) {
671
+ const derive = s.derive;
672
+ const derivePaths = new Set(Object.keys(derive));
673
+ const deriveDeps = new Map();
674
+ for (const [derivePath, expr] of Object.entries(derive)) {
675
+ const deps = new Set();
676
+ function walkDerive(v) {
677
+ if (v === null || v === undefined || typeof v !== 'object')
678
+ return;
679
+ if (Array.isArray(v)) {
680
+ for (const item of v)
681
+ walkDerive(item);
682
+ return;
683
+ }
684
+ const obj = v;
685
+ if ('$state' in obj && typeof obj.$state === 'string')
686
+ deps.add(obj.$state);
687
+ for (const val of Object.values(obj))
688
+ walkDerive(val);
689
+ }
690
+ walkDerive(expr);
691
+ deriveDeps.set(derivePath, deps);
692
+ validateExpression(expr, `derive:${derivePath}`, 'derive', errors);
693
+ }
694
+ const dVisited = new Set();
695
+ const dVisiting = new Set();
696
+ function visitDerive(derivePath) {
697
+ if (dVisited.has(derivePath))
698
+ return;
699
+ if (dVisiting.has(derivePath)) {
700
+ errors.push({ message: `Derive circular dependency: "${derivePath}" depends on itself (direct or indirect cycle)` });
701
+ return;
702
+ }
703
+ dVisiting.add(derivePath);
704
+ const deps = deriveDeps.get(derivePath) ?? new Set();
705
+ for (const dep of deps) {
706
+ if (derivePaths.has(dep))
707
+ visitDerive(dep);
708
+ }
709
+ dVisiting.delete(derivePath);
710
+ dVisited.add(derivePath);
711
+ }
712
+ for (const derivePath of derivePaths)
713
+ visitDerive(derivePath);
714
+ }
715
+ // Validate dataSources
716
+ if (s.dataSources && typeof s.dataSources === 'object') {
717
+ for (const [dsId, ds] of Object.entries(s.dataSources)) {
718
+ if (!ds.url)
719
+ errors.push({ message: `dataSource "${dsId}" requires "url"`, path: `/dataSources/${dsId}/url` });
720
+ if (!ds.target)
721
+ errors.push({ message: `dataSource "${dsId}" requires "target"`, path: `/dataSources/${dsId}/target` });
722
+ }
723
+ }
724
+ // Validate templates
725
+ if (s.templates && typeof s.templates === 'object') {
726
+ for (const [tmplId, tmpl] of Object.entries(s.templates)) {
727
+ if (!tmpl.type || typeof tmpl.type !== 'string') {
728
+ errors.push({ message: `template "${tmplId}" requires "type" string`, path: `/templates/${tmplId}/type` });
729
+ }
730
+ }
731
+ }
732
+ // Validate forms config — auto-fix #4
733
+ if (s.forms && typeof s.forms === 'object') {
734
+ const knownValidators = new Set([
735
+ 'required', 'email', 'minLength', 'maxLength', 'pattern',
736
+ 'min', 'max', 'numeric', 'url', 'matches', 'equalTo',
737
+ 'lessThan', 'greaterThan', 'requiredIf',
738
+ ]);
739
+ for (const [formId, form] of Object.entries(s.forms)) {
740
+ if (!form.fields || typeof form.fields !== 'object') {
741
+ errors.push({ message: `form "${formId}" requires "fields" object`, path: `/forms/${formId}/fields` });
742
+ continue;
743
+ }
744
+ for (const [fieldId, field] of Object.entries(form.fields)) {
745
+ if (!field.statePath || typeof field.statePath !== 'string') {
746
+ errors.push({ message: `form "${formId}" field "${fieldId}" requires "statePath" string`, path: `/forms/${formId}/fields/${fieldId}/statePath` });
747
+ }
748
+ if (field.rules && Array.isArray(field.rules)) {
749
+ for (let i = 0; i < field.rules.length; i++) {
750
+ const rule = field.rules[i];
751
+ if (rule.type && typeof rule.type === 'string' && !knownValidators.has(rule.type)) {
752
+ const error = {
753
+ message: `form "${formId}" field "${fieldId}": unknown validator type "${rule.type}"`,
754
+ path: `/forms/${formId}/fields/${fieldId}/rules/${i}/type`,
755
+ };
756
+ if (doFixes) {
757
+ const suggested = suggest(rule.type, Array.from(knownValidators));
758
+ if (suggested) {
759
+ error.suggestedFixes = [{
760
+ patch: { op: 'replace', path: `/forms/${formId}/fields/${fieldId}/rules/${i}/type`, value: suggested },
761
+ confidence: 'high',
762
+ description: `validator '${rule.type}' → '${suggested}' (Levenshtein match)`,
763
+ }];
764
+ }
765
+ }
766
+ errors.push(error);
767
+ }
768
+ }
769
+ }
770
+ }
771
+ }
772
+ }
773
+ // Check for circular references
774
+ function checkCircular(id, ancestors) {
775
+ if (ancestors.has(id)) {
776
+ errors.push({ message: `Circular reference detected: element "${id}" references itself in its children chain`, elementId: id });
777
+ return;
778
+ }
779
+ const el = elements[id];
780
+ if (el?.children && Array.isArray(el.children)) {
781
+ const newAncestors = new Set(ancestors);
782
+ newAncestors.add(id);
783
+ for (const childId of el.children) {
784
+ if (elements[childId]) {
785
+ checkCircular(childId, newAncestors);
786
+ }
787
+ }
788
+ }
789
+ }
790
+ if (elements[root]) {
791
+ checkCircular(root, new Set());
792
+ }
793
+ // ── v49 Item E: derive + dataSources structural checks ──
794
+ // (Cycle detection in derive is handled inline above; these add 7 additional checks.)
795
+ const DEFAULT_PROTECTED_PATTERNS = ['/tx/*', '/ui/forms/*', '/auth/*'];
796
+ function isUnderProtectedPattern(path) {
797
+ return DEFAULT_PROTECTED_PATTERNS.some((pattern) => {
798
+ if (pattern.endsWith('/*')) {
799
+ const prefix = pattern.slice(0, -1); // e.g. "/auth/"
800
+ if (path.startsWith(prefix))
801
+ return true;
802
+ // Also match the bare prefix without trailing slash (e.g. "/auth")
803
+ if (path === pattern.slice(0, -2))
804
+ return true;
805
+ return false;
806
+ }
807
+ return path === pattern;
808
+ });
809
+ }
810
+ function isUrlTemplateWellFormed(url) {
811
+ let i = 0;
812
+ while (i < url.length) {
813
+ const open = url.indexOf('${', i);
814
+ if (open === -1)
815
+ return true;
816
+ const close = url.indexOf('}', open + 2);
817
+ if (close === -1)
818
+ return false; // unclosed
819
+ if (close === open + 2)
820
+ return false; // empty ${}
821
+ i = close + 1;
822
+ }
823
+ return true;
824
+ }
825
+ function containsTemplatePattern(s) {
826
+ return /\$\{[^}]+\}/.test(s);
827
+ }
828
+ if (s.derive && typeof s.derive === 'object' && !Array.isArray(s.derive)) {
829
+ const derive = s.derive;
830
+ // Check 1: empty derive entries (undefined value)
831
+ for (const [path, expr] of Object.entries(derive)) {
832
+ if (expr === undefined) {
833
+ errors.push({ message: `Derive path "${path}" has empty (undefined) expression` });
834
+ }
835
+ }
836
+ // Check 3: derive path under default protected pattern
837
+ for (const path of Object.keys(derive)) {
838
+ if (isUnderProtectedPattern(path)) {
839
+ errors.push({ message: `Derive path "${path}" is under a default protected pattern (/tx/*, /ui/forms/*, /auth/*) and cannot be used as a derive target` });
840
+ }
841
+ }
842
+ }
843
+ if (s.dataSources && typeof s.dataSources === 'object' && !Array.isArray(s.dataSources)) {
844
+ const dataSources = s.dataSources;
845
+ // Check 4: derive path conflicts with dataSources target
846
+ if (s.derive && typeof s.derive === 'object') {
847
+ const derivePaths = new Set(Object.keys(s.derive));
848
+ for (const [id, ds] of Object.entries(dataSources)) {
849
+ if (typeof ds.target === 'string' && derivePaths.has(ds.target)) {
850
+ errors.push({ message: `Derive path "${ds.target}" conflicts with dataSources["${id}"].target — both want to write the same path` });
851
+ }
852
+ }
853
+ }
854
+ for (const [id, ds] of Object.entries(dataSources)) {
855
+ // Check 5: object-form $template syntax
856
+ if (ds.url && typeof ds.url === 'object' && !Array.isArray(ds.url)) {
857
+ const urlObj = ds.url;
858
+ if (typeof urlObj.$template === 'string' && !isUrlTemplateWellFormed(urlObj.$template)) {
859
+ errors.push({ message: `dataSources["${id}"].url has malformed $template (unclosed \${ or empty \${}): "${urlObj.$template}"` });
860
+ }
861
+ }
862
+ // Check 8 (NEW v49 Item E): plain-string URL containing ${...} — resolver does NOT substitute
863
+ if (typeof ds.url === 'string' && containsTemplatePattern(ds.url)) {
864
+ errors.push({ message: `dataSources["${id}"].url is a plain string containing \${...} which the resolver does NOT substitute. Wrap in $template: { $template: "${ds.url}" } to enable templating.` });
865
+ }
866
+ // Check 6: target validation
867
+ if (typeof ds.target === 'string') {
868
+ if (!ds.target.startsWith('/')) {
869
+ errors.push({ message: `dataSources["${id}"].target must start with "/" — got "${ds.target}"` });
870
+ }
871
+ if (isUnderProtectedPattern(ds.target)) {
872
+ errors.push({ message: `dataSources["${id}"].target "${ds.target}" is under a default protected pattern and cannot be used as a write target` });
873
+ }
874
+ }
875
+ }
876
+ }
877
+ // Check 7: setState action targeting a derive path (read-only at runtime)
878
+ if (s.derive && typeof s.derive === 'object') {
879
+ const derivePaths = new Set(Object.keys(s.derive));
880
+ function walkBindingsForSetState(obj) {
881
+ if (!obj || typeof obj !== 'object')
882
+ return;
883
+ if (Array.isArray(obj)) {
884
+ obj.forEach(walkBindingsForSetState);
885
+ return;
886
+ }
887
+ const o = obj;
888
+ if (o.action === 'setState' && o.params && typeof o.params === 'object') {
889
+ const path = o.params.statePath;
890
+ if (typeof path === 'string' && derivePaths.has(path)) {
891
+ errors.push({ message: `setState action targets derive path "${path}" — derive paths are read-only at runtime` });
892
+ }
893
+ }
894
+ for (const v of Object.values(o))
895
+ walkBindingsForSetState(v);
896
+ }
897
+ walkBindingsForSetState(s.elements);
898
+ if (s.initialActions)
899
+ walkBindingsForSetState(s.initialActions);
900
+ }
901
+ return { valid: errors.length === 0, errors, ...(warnings.length > 0 ? { warnings } : {}) };
902
+ }
903
+ //# sourceMappingURL=spec-validator.js.map