@tachui/core 0.7.0-alpha1 → 0.7.1-alpha

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 (947) hide show
  1. package/README.md +195 -0
  2. package/dist/ScrollView-h-6wYMAm.js +515 -0
  3. package/dist/Spacer-BbteDQ9I.js +5337 -0
  4. package/dist/binding-CmdpowkI.js +2276 -0
  5. package/dist/bundles/minimal.d.ts +30 -4
  6. package/dist/bundles/minimal.d.ts.map +1 -1
  7. package/dist/common.js +825 -954
  8. package/dist/compiler/index.js +1386 -10
  9. package/dist/components/index.js +4166 -101
  10. package/dist/concatenated-component-DPcl2TEO.js +6779 -0
  11. package/dist/{runtime/context.js → context--zQFIImS.js} +65 -71
  12. package/dist/debug.js +0 -1
  13. package/dist/dom-bridge-Cx-s6Ihx.js +406 -0
  14. package/dist/effect-CytAc9em.js +66 -0
  15. package/dist/essential.js +825 -954
  16. package/dist/index-Nfi2SBQh.js +3268 -0
  17. package/dist/index.js +825 -954
  18. package/dist/minimal-prod.js +162 -191
  19. package/dist/minimal.js +183 -957
  20. package/dist/modifiers/responsive/index.d.ts +10 -9
  21. package/dist/modifiers/responsive/index.d.ts.map +1 -1
  22. package/dist/plugins/index.js +543 -32
  23. package/dist/reactive/index.js +490 -93
  24. package/dist/runtime/dom-bridge.js +12 -239
  25. package/dist/runtime/renderer.js +8 -388
  26. package/dist/scheduler-7SvC3a21.js +814 -0
  27. package/dist/validation/index.js +6614 -198
  28. package/dist/viewport/index.js +2002 -83
  29. package/package.json +3 -4
  30. package/dist/assets/Asset.cjs +0 -2
  31. package/dist/assets/Asset.cjs.map +0 -1
  32. package/dist/assets/Asset.js +0 -9
  33. package/dist/assets/Asset.js.map +0 -1
  34. package/dist/assets/AssetCollection.cjs +0 -2
  35. package/dist/assets/AssetCollection.cjs.map +0 -1
  36. package/dist/assets/AssetCollection.js +0 -44
  37. package/dist/assets/AssetCollection.js.map +0 -1
  38. package/dist/assets/ColorAsset.cjs +0 -2
  39. package/dist/assets/ColorAsset.cjs.map +0 -1
  40. package/dist/assets/ColorAsset.js +0 -114
  41. package/dist/assets/ColorAsset.js.map +0 -1
  42. package/dist/assets/FontAsset.cjs +0 -9
  43. package/dist/assets/FontAsset.cjs.map +0 -1
  44. package/dist/assets/FontAsset.js +0 -173
  45. package/dist/assets/FontAsset.js.map +0 -1
  46. package/dist/assets/ImageAsset.cjs +0 -2
  47. package/dist/assets/ImageAsset.cjs.map +0 -1
  48. package/dist/assets/ImageAsset.js +0 -39
  49. package/dist/assets/ImageAsset.js.map +0 -1
  50. package/dist/assets/index.cjs +0 -2
  51. package/dist/assets/index.cjs.map +0 -1
  52. package/dist/assets/index.js +0 -119
  53. package/dist/assets/index.js.map +0 -1
  54. package/dist/common.cjs +0 -2
  55. package/dist/common.cjs.map +0 -1
  56. package/dist/common.js.map +0 -1
  57. package/dist/compiler/advanced-parser.cjs +0 -5
  58. package/dist/compiler/advanced-parser.cjs.map +0 -1
  59. package/dist/compiler/advanced-parser.js +0 -440
  60. package/dist/compiler/advanced-parser.js.map +0 -1
  61. package/dist/compiler/codegen.cjs +0 -6
  62. package/dist/compiler/codegen.cjs.map +0 -1
  63. package/dist/compiler/codegen.js +0 -241
  64. package/dist/compiler/codegen.js.map +0 -1
  65. package/dist/compiler/enhanced-codegen.cjs +0 -6
  66. package/dist/compiler/enhanced-codegen.cjs.map +0 -1
  67. package/dist/compiler/enhanced-codegen.js +0 -347
  68. package/dist/compiler/enhanced-codegen.js.map +0 -1
  69. package/dist/compiler/index.cjs +0 -2
  70. package/dist/compiler/index.cjs.map +0 -1
  71. package/dist/compiler/index.js.map +0 -1
  72. package/dist/compiler/parser.cjs +0 -5
  73. package/dist/compiler/parser.cjs.map +0 -1
  74. package/dist/compiler/parser.js +0 -275
  75. package/dist/compiler/parser.js.map +0 -1
  76. package/dist/compiler/plugin.cjs +0 -33
  77. package/dist/compiler/plugin.cjs.map +0 -1
  78. package/dist/compiler/plugin.js +0 -103
  79. package/dist/compiler/plugin.js.map +0 -1
  80. package/dist/components/BasicInput.cjs +0 -2
  81. package/dist/components/BasicInput.cjs.map +0 -1
  82. package/dist/components/BasicInput.js +0 -182
  83. package/dist/components/BasicInput.js.map +0 -1
  84. package/dist/components/Button.cjs +0 -7
  85. package/dist/components/Button.cjs.map +0 -1
  86. package/dist/components/Button.js +0 -408
  87. package/dist/components/Button.js.map +0 -1
  88. package/dist/components/Divider.cjs +0 -2
  89. package/dist/components/Divider.cjs.map +0 -1
  90. package/dist/components/Divider.js +0 -187
  91. package/dist/components/Divider.js.map +0 -1
  92. package/dist/components/EnhancedLink.cjs +0 -2
  93. package/dist/components/EnhancedLink.cjs.map +0 -1
  94. package/dist/components/EnhancedLink.js +0 -345
  95. package/dist/components/EnhancedLink.js.map +0 -1
  96. package/dist/components/Form.cjs +0 -2
  97. package/dist/components/Form.cjs.map +0 -1
  98. package/dist/components/Form.js +0 -244
  99. package/dist/components/Form.js.map +0 -1
  100. package/dist/components/Grid.cjs +0 -2
  101. package/dist/components/Grid.cjs.map +0 -1
  102. package/dist/components/Grid.js +0 -1045
  103. package/dist/components/Grid.js.map +0 -1
  104. package/dist/components/GridResponsive.cjs +0 -2
  105. package/dist/components/GridResponsive.cjs.map +0 -1
  106. package/dist/components/GridResponsive.js +0 -382
  107. package/dist/components/GridResponsive.js.map +0 -1
  108. package/dist/components/Image.cjs +0 -2
  109. package/dist/components/Image.cjs.map +0 -1
  110. package/dist/components/Image.js +0 -212
  111. package/dist/components/Image.js.map +0 -1
  112. package/dist/components/List.cjs +0 -2
  113. package/dist/components/List.cjs.map +0 -1
  114. package/dist/components/List.js +0 -561
  115. package/dist/components/List.js.map +0 -1
  116. package/dist/components/Menu.cjs +0 -2
  117. package/dist/components/Menu.cjs.map +0 -1
  118. package/dist/components/Menu.js +0 -443
  119. package/dist/components/Menu.js.map +0 -1
  120. package/dist/components/Picker.cjs +0 -2
  121. package/dist/components/Picker.cjs.map +0 -1
  122. package/dist/components/Picker.js +0 -478
  123. package/dist/components/Picker.js.map +0 -1
  124. package/dist/components/ScrollView.cjs +0 -6
  125. package/dist/components/ScrollView.cjs.map +0 -1
  126. package/dist/components/ScrollView.js +0 -363
  127. package/dist/components/ScrollView.js.map +0 -1
  128. package/dist/components/Section.cjs +0 -2
  129. package/dist/components/Section.cjs.map +0 -1
  130. package/dist/components/Section.js +0 -323
  131. package/dist/components/Section.js.map +0 -1
  132. package/dist/components/Show.cjs +0 -2
  133. package/dist/components/Show.cjs.map +0 -1
  134. package/dist/components/Show.js +0 -112
  135. package/dist/components/Show.js.map +0 -1
  136. package/dist/components/Spacer.cjs +0 -2
  137. package/dist/components/Spacer.cjs.map +0 -1
  138. package/dist/components/Spacer.js +0 -53
  139. package/dist/components/Spacer.js.map +0 -1
  140. package/dist/components/Text.cjs +0 -2
  141. package/dist/components/Text.cjs.map +0 -1
  142. package/dist/components/Text.js +0 -193
  143. package/dist/components/Text.js.map +0 -1
  144. package/dist/components/Toggle.cjs +0 -2
  145. package/dist/components/Toggle.cjs.map +0 -1
  146. package/dist/components/Toggle.js +0 -477
  147. package/dist/components/Toggle.js.map +0 -1
  148. package/dist/components/index.cjs +0 -2
  149. package/dist/components/index.cjs.map +0 -1
  150. package/dist/components/index.js.map +0 -1
  151. package/dist/components/wrapper.cjs +0 -2
  152. package/dist/components/wrapper.cjs.map +0 -1
  153. package/dist/components/wrapper.js +0 -484
  154. package/dist/components/wrapper.js.map +0 -1
  155. package/dist/concatenation/concatenatable.cjs +0 -2
  156. package/dist/concatenation/concatenatable.cjs.map +0 -1
  157. package/dist/concatenation/concatenatable.js +0 -118
  158. package/dist/concatenation/concatenatable.js.map +0 -1
  159. package/dist/concatenation/concatenated-component.cjs +0 -2
  160. package/dist/concatenation/concatenated-component.cjs.map +0 -1
  161. package/dist/concatenation/concatenated-component.js +0 -276
  162. package/dist/concatenation/concatenated-component.js.map +0 -1
  163. package/dist/concatenation/text-optimizer.cjs +0 -2
  164. package/dist/concatenation/text-optimizer.cjs.map +0 -1
  165. package/dist/concatenation/text-optimizer.js +0 -236
  166. package/dist/concatenation/text-optimizer.js.map +0 -1
  167. package/dist/concatenation/types.cjs +0 -2
  168. package/dist/concatenation/types.cjs.map +0 -1
  169. package/dist/concatenation/types.js +0 -13
  170. package/dist/concatenation/types.js.map +0 -1
  171. package/dist/constants/frame-utils.cjs +0 -2
  172. package/dist/constants/frame-utils.cjs.map +0 -1
  173. package/dist/constants/frame-utils.js +0 -116
  174. package/dist/constants/frame-utils.js.map +0 -1
  175. package/dist/constants/layout.cjs +0 -2
  176. package/dist/constants/layout.cjs.map +0 -1
  177. package/dist/constants/layout.js +0 -46
  178. package/dist/constants/layout.js.map +0 -1
  179. package/dist/css-classes/component-base.cjs +0 -2
  180. package/dist/css-classes/component-base.cjs.map +0 -1
  181. package/dist/css-classes/component-base.js +0 -62
  182. package/dist/css-classes/component-base.js.map +0 -1
  183. package/dist/css-classes/css-class-manager.cjs +0 -2
  184. package/dist/css-classes/css-class-manager.cjs.map +0 -1
  185. package/dist/css-classes/css-class-manager.js +0 -209
  186. package/dist/css-classes/css-class-manager.js.map +0 -1
  187. package/dist/css-classes/dom-integration.cjs +0 -2
  188. package/dist/css-classes/dom-integration.cjs.map +0 -1
  189. package/dist/css-classes/dom-integration.js +0 -67
  190. package/dist/css-classes/dom-integration.js.map +0 -1
  191. package/dist/css-classes/enhanced-renderer.cjs +0 -2
  192. package/dist/css-classes/enhanced-renderer.cjs.map +0 -1
  193. package/dist/css-classes/enhanced-renderer.js +0 -73
  194. package/dist/css-classes/enhanced-renderer.js.map +0 -1
  195. package/dist/css-classes/utilities.cjs +0 -2
  196. package/dist/css-classes/utilities.cjs.map +0 -1
  197. package/dist/css-classes/utilities.js +0 -41
  198. package/dist/css-classes/utilities.js.map +0 -1
  199. package/dist/debug.cjs +0 -52
  200. package/dist/debug.cjs.map +0 -1
  201. package/dist/debug.js.map +0 -1
  202. package/dist/essential.cjs +0 -2
  203. package/dist/essential.cjs.map +0 -1
  204. package/dist/essential.js.map +0 -1
  205. package/dist/gradients/css-generator.cjs +0 -2
  206. package/dist/gradients/css-generator.cjs.map +0 -1
  207. package/dist/gradients/css-generator.js +0 -100
  208. package/dist/gradients/css-generator.js.map +0 -1
  209. package/dist/gradients/examples.cjs +0 -2
  210. package/dist/gradients/examples.cjs.map +0 -1
  211. package/dist/gradients/examples.js +0 -555
  212. package/dist/gradients/examples.js.map +0 -1
  213. package/dist/gradients/gradient-asset.cjs +0 -2
  214. package/dist/gradients/gradient-asset.cjs.map +0 -1
  215. package/dist/gradients/gradient-asset.js +0 -22
  216. package/dist/gradients/gradient-asset.js.map +0 -1
  217. package/dist/gradients/index.cjs +0 -2
  218. package/dist/gradients/index.cjs.map +0 -1
  219. package/dist/gradients/index.js +0 -78
  220. package/dist/gradients/index.js.map +0 -1
  221. package/dist/gradients/performance.cjs +0 -2
  222. package/dist/gradients/performance.cjs.map +0 -1
  223. package/dist/gradients/performance.js +0 -237
  224. package/dist/gradients/performance.js.map +0 -1
  225. package/dist/gradients/presets.cjs +0 -2
  226. package/dist/gradients/presets.cjs.map +0 -1
  227. package/dist/gradients/presets.js +0 -254
  228. package/dist/gradients/presets.js.map +0 -1
  229. package/dist/gradients/reactive.cjs +0 -2
  230. package/dist/gradients/reactive.cjs.map +0 -1
  231. package/dist/gradients/reactive.js +0 -239
  232. package/dist/gradients/reactive.js.map +0 -1
  233. package/dist/gradients/state-gradient-asset.cjs +0 -2
  234. package/dist/gradients/state-gradient-asset.cjs.map +0 -1
  235. package/dist/gradients/state-gradient-asset.js +0 -111
  236. package/dist/gradients/state-gradient-asset.js.map +0 -1
  237. package/dist/gradients/utils.cjs +0 -2
  238. package/dist/gradients/utils.cjs.map +0 -1
  239. package/dist/gradients/utils.js +0 -385
  240. package/dist/gradients/utils.js.map +0 -1
  241. package/dist/gradients/validation.cjs +0 -2
  242. package/dist/gradients/validation.cjs.map +0 -1
  243. package/dist/gradients/validation.js +0 -209
  244. package/dist/gradients/validation.js.map +0 -1
  245. package/dist/index.cjs +0 -2
  246. package/dist/index.cjs.map +0 -1
  247. package/dist/index.js.map +0 -1
  248. package/dist/index2.cjs +0 -2
  249. package/dist/index2.cjs.map +0 -1
  250. package/dist/index2.js +0 -293
  251. package/dist/index2.js.map +0 -1
  252. package/dist/lifecycle/hooks.cjs +0 -2
  253. package/dist/lifecycle/hooks.cjs.map +0 -1
  254. package/dist/lifecycle/hooks.js +0 -159
  255. package/dist/lifecycle/hooks.js.map +0 -1
  256. package/dist/minimal-prod.cjs +0 -2
  257. package/dist/minimal-prod.cjs.map +0 -1
  258. package/dist/minimal-prod.js.map +0 -1
  259. package/dist/minimal.cjs +0 -2
  260. package/dist/minimal.cjs.map +0 -1
  261. package/dist/minimal.js.map +0 -1
  262. package/dist/modifiers/as-html-validator.cjs +0 -2
  263. package/dist/modifiers/as-html-validator.cjs.map +0 -1
  264. package/dist/modifiers/as-html-validator.js +0 -47
  265. package/dist/modifiers/as-html-validator.js.map +0 -1
  266. package/dist/modifiers/as-html.cjs +0 -2
  267. package/dist/modifiers/as-html.cjs.map +0 -1
  268. package/dist/modifiers/as-html.js +0 -71
  269. package/dist/modifiers/as-html.js.map +0 -1
  270. package/dist/modifiers/attributes.cjs +0 -2
  271. package/dist/modifiers/attributes.cjs.map +0 -1
  272. package/dist/modifiers/attributes.js +0 -272
  273. package/dist/modifiers/attributes.js.map +0 -1
  274. package/dist/modifiers/backdrop.cjs +0 -2
  275. package/dist/modifiers/backdrop.cjs.map +0 -1
  276. package/dist/modifiers/backdrop.js +0 -109
  277. package/dist/modifiers/backdrop.js.map +0 -1
  278. package/dist/modifiers/background.cjs +0 -2
  279. package/dist/modifiers/background.cjs.map +0 -1
  280. package/dist/modifiers/background.js +0 -67
  281. package/dist/modifiers/background.js.map +0 -1
  282. package/dist/modifiers/base.cjs +0 -25
  283. package/dist/modifiers/base.cjs.map +0 -1
  284. package/dist/modifiers/base.js +0 -745
  285. package/dist/modifiers/base.js.map +0 -1
  286. package/dist/modifiers/basic-sanitizer.cjs +0 -2
  287. package/dist/modifiers/basic-sanitizer.cjs.map +0 -1
  288. package/dist/modifiers/basic-sanitizer.js +0 -162
  289. package/dist/modifiers/basic-sanitizer.js.map +0 -1
  290. package/dist/modifiers/border.cjs +0 -2
  291. package/dist/modifiers/border.cjs.map +0 -1
  292. package/dist/modifiers/border.js +0 -160
  293. package/dist/modifiers/border.js.map +0 -1
  294. package/dist/modifiers/builder.cjs +0 -2
  295. package/dist/modifiers/builder.cjs.map +0 -1
  296. package/dist/modifiers/builder.js +0 -930
  297. package/dist/modifiers/builder.js.map +0 -1
  298. package/dist/modifiers/core.cjs +0 -2
  299. package/dist/modifiers/core.cjs.map +0 -1
  300. package/dist/modifiers/core.js +0 -398
  301. package/dist/modifiers/core.js.map +0 -1
  302. package/dist/modifiers/css.cjs +0 -2
  303. package/dist/modifiers/css.cjs.map +0 -1
  304. package/dist/modifiers/css.js +0 -50
  305. package/dist/modifiers/css.js.map +0 -1
  306. package/dist/modifiers/effects.cjs +0 -2
  307. package/dist/modifiers/effects.cjs.map +0 -1
  308. package/dist/modifiers/effects.js +0 -178
  309. package/dist/modifiers/effects.js.map +0 -1
  310. package/dist/modifiers/elements.cjs +0 -2
  311. package/dist/modifiers/elements.cjs.map +0 -1
  312. package/dist/modifiers/elements.js +0 -216
  313. package/dist/modifiers/elements.js.map +0 -1
  314. package/dist/modifiers/filters.cjs +0 -2
  315. package/dist/modifiers/filters.cjs.map +0 -1
  316. package/dist/modifiers/filters.js +0 -223
  317. package/dist/modifiers/filters.js.map +0 -1
  318. package/dist/modifiers/flexbox.cjs +0 -2
  319. package/dist/modifiers/flexbox.cjs.map +0 -1
  320. package/dist/modifiers/flexbox.js +0 -56
  321. package/dist/modifiers/flexbox.js.map +0 -1
  322. package/dist/modifiers/font.cjs +0 -2
  323. package/dist/modifiers/font.cjs.map +0 -1
  324. package/dist/modifiers/font.js +0 -60
  325. package/dist/modifiers/font.js.map +0 -1
  326. package/dist/modifiers/grid.cjs +0 -2
  327. package/dist/modifiers/grid.cjs.map +0 -1
  328. package/dist/modifiers/grid.js +0 -92
  329. package/dist/modifiers/grid.js.map +0 -1
  330. package/dist/modifiers/margin.cjs +0 -2
  331. package/dist/modifiers/margin.cjs.map +0 -1
  332. package/dist/modifiers/margin.js +0 -65
  333. package/dist/modifiers/margin.js.map +0 -1
  334. package/dist/modifiers/padding.cjs +0 -2
  335. package/dist/modifiers/padding.cjs.map +0 -1
  336. package/dist/modifiers/padding.js +0 -109
  337. package/dist/modifiers/padding.js.map +0 -1
  338. package/dist/modifiers/registry.cjs +0 -2
  339. package/dist/modifiers/registry.cjs.map +0 -1
  340. package/dist/modifiers/registry.js +0 -163
  341. package/dist/modifiers/registry.js.map +0 -1
  342. package/dist/modifiers/responsive/advanced-utilities.cjs +0 -2
  343. package/dist/modifiers/responsive/advanced-utilities.cjs.map +0 -1
  344. package/dist/modifiers/responsive/advanced-utilities.js +0 -291
  345. package/dist/modifiers/responsive/advanced-utilities.js.map +0 -1
  346. package/dist/modifiers/responsive/breakpoints.cjs +0 -2
  347. package/dist/modifiers/responsive/breakpoints.cjs.map +0 -1
  348. package/dist/modifiers/responsive/breakpoints.js +0 -168
  349. package/dist/modifiers/responsive/breakpoints.js.map +0 -1
  350. package/dist/modifiers/responsive/css-generator.cjs +0 -5
  351. package/dist/modifiers/responsive/css-generator.cjs.map +0 -1
  352. package/dist/modifiers/responsive/css-generator.js +0 -261
  353. package/dist/modifiers/responsive/css-generator.js.map +0 -1
  354. package/dist/modifiers/responsive/dev-tools.cjs +0 -77
  355. package/dist/modifiers/responsive/dev-tools.cjs.map +0 -1
  356. package/dist/modifiers/responsive/dev-tools.js +0 -380
  357. package/dist/modifiers/responsive/dev-tools.js.map +0 -1
  358. package/dist/modifiers/responsive/layout-patterns.cjs +0 -2
  359. package/dist/modifiers/responsive/layout-patterns.cjs.map +0 -1
  360. package/dist/modifiers/responsive/layout-patterns.js +0 -254
  361. package/dist/modifiers/responsive/layout-patterns.js.map +0 -1
  362. package/dist/modifiers/responsive/performance.cjs +0 -3
  363. package/dist/modifiers/responsive/performance.cjs.map +0 -1
  364. package/dist/modifiers/responsive/performance.js +0 -212
  365. package/dist/modifiers/responsive/performance.js.map +0 -1
  366. package/dist/modifiers/responsive/responsive-builder.cjs +0 -2
  367. package/dist/modifiers/responsive/responsive-builder.cjs.map +0 -1
  368. package/dist/modifiers/responsive/responsive-builder.js +0 -272
  369. package/dist/modifiers/responsive/responsive-builder.js.map +0 -1
  370. package/dist/modifiers/responsive/responsive-modifier.cjs +0 -3
  371. package/dist/modifiers/responsive/responsive-modifier.cjs.map +0 -1
  372. package/dist/modifiers/responsive/responsive-modifier.js +0 -204
  373. package/dist/modifiers/responsive/responsive-modifier.js.map +0 -1
  374. package/dist/modifiers/responsive/types.cjs +0 -2
  375. package/dist/modifiers/responsive/types.cjs.map +0 -1
  376. package/dist/modifiers/responsive/types.js +0 -26
  377. package/dist/modifiers/responsive/types.js.map +0 -1
  378. package/dist/modifiers/responsive/utilities.cjs +0 -16
  379. package/dist/modifiers/responsive/utilities.cjs.map +0 -1
  380. package/dist/modifiers/responsive/utilities.js +0 -273
  381. package/dist/modifiers/responsive/utilities.js.map +0 -1
  382. package/dist/modifiers/scroll.cjs +0 -2
  383. package/dist/modifiers/scroll.cjs.map +0 -1
  384. package/dist/modifiers/scroll.js +0 -82
  385. package/dist/modifiers/scroll.js.map +0 -1
  386. package/dist/modifiers/shadows.cjs +0 -2
  387. package/dist/modifiers/shadows.cjs.map +0 -1
  388. package/dist/modifiers/shadows.js +0 -147
  389. package/dist/modifiers/shadows.js.map +0 -1
  390. package/dist/modifiers/size.cjs +0 -2
  391. package/dist/modifiers/size.cjs.map +0 -1
  392. package/dist/modifiers/size.js +0 -74
  393. package/dist/modifiers/size.js.map +0 -1
  394. package/dist/modifiers/text.cjs +0 -2
  395. package/dist/modifiers/text.cjs.map +0 -1
  396. package/dist/modifiers/text.js +0 -166
  397. package/dist/modifiers/text.js.map +0 -1
  398. package/dist/modifiers/transformations.cjs +0 -2
  399. package/dist/modifiers/transformations.cjs.map +0 -1
  400. package/dist/modifiers/transformations.js +0 -216
  401. package/dist/modifiers/transformations.js.map +0 -1
  402. package/dist/modifiers/transitions.cjs +0 -2
  403. package/dist/modifiers/transitions.cjs.map +0 -1
  404. package/dist/modifiers/transitions.js +0 -102
  405. package/dist/modifiers/transitions.js.map +0 -1
  406. package/dist/modifiers/types.cjs +0 -2
  407. package/dist/modifiers/types.cjs.map +0 -1
  408. package/dist/modifiers/types.js +0 -5
  409. package/dist/modifiers/types.js.map +0 -1
  410. package/dist/modifiers/typography.cjs +0 -2
  411. package/dist/modifiers/typography.cjs.map +0 -1
  412. package/dist/modifiers/typography.js +0 -76
  413. package/dist/modifiers/typography.js.map +0 -1
  414. package/dist/modifiers/utility.cjs +0 -2
  415. package/dist/modifiers/utility.cjs.map +0 -1
  416. package/dist/modifiers/utility.js +0 -71
  417. package/dist/modifiers/utility.js.map +0 -1
  418. package/dist/modifiers/utils.cjs +0 -2
  419. package/dist/modifiers/utils.cjs.map +0 -1
  420. package/dist/modifiers/utils.js +0 -250
  421. package/dist/modifiers/utils.js.map +0 -1
  422. package/dist/plugins/index.cjs +0 -2
  423. package/dist/plugins/index.cjs.map +0 -1
  424. package/dist/plugins/index.js.map +0 -1
  425. package/dist/plugins/legacy-adapter.cjs +0 -2
  426. package/dist/plugins/legacy-adapter.cjs.map +0 -1
  427. package/dist/plugins/legacy-adapter.js +0 -30
  428. package/dist/plugins/legacy-adapter.js.map +0 -1
  429. package/dist/plugins/simplified-component-registry.cjs +0 -2
  430. package/dist/plugins/simplified-component-registry.cjs.map +0 -1
  431. package/dist/plugins/simplified-component-registry.js +0 -71
  432. package/dist/plugins/simplified-component-registry.js.map +0 -1
  433. package/dist/plugins/simplified-error-handler.cjs +0 -2
  434. package/dist/plugins/simplified-error-handler.cjs.map +0 -1
  435. package/dist/plugins/simplified-error-handler.js +0 -154
  436. package/dist/plugins/simplified-error-handler.js.map +0 -1
  437. package/dist/plugins/simplified-lazy-loader.cjs +0 -2
  438. package/dist/plugins/simplified-lazy-loader.cjs.map +0 -1
  439. package/dist/plugins/simplified-lazy-loader.js +0 -129
  440. package/dist/plugins/simplified-lazy-loader.js.map +0 -1
  441. package/dist/plugins/simplified-plugin-manager.cjs +0 -2
  442. package/dist/plugins/simplified-plugin-manager.cjs.map +0 -1
  443. package/dist/plugins/simplified-plugin-manager.js +0 -51
  444. package/dist/plugins/simplified-plugin-manager.js.map +0 -1
  445. package/dist/plugins/simplified-tachui-instance.cjs +0 -2
  446. package/dist/plugins/simplified-tachui-instance.cjs.map +0 -1
  447. package/dist/plugins/simplified-tachui-instance.js +0 -88
  448. package/dist/plugins/simplified-tachui-instance.js.map +0 -1
  449. package/dist/plugins/simplified-types.cjs +0 -2
  450. package/dist/plugins/simplified-types.cjs.map +0 -1
  451. package/dist/plugins/simplified-types.js +0 -9
  452. package/dist/plugins/simplified-types.js.map +0 -1
  453. package/dist/plugins/simplified-utils.cjs +0 -2
  454. package/dist/plugins/simplified-utils.cjs.map +0 -1
  455. package/dist/plugins/simplified-utils.js +0 -40
  456. package/dist/plugins/simplified-utils.js.map +0 -1
  457. package/dist/reactive/cleanup.cjs +0 -2
  458. package/dist/reactive/cleanup.cjs.map +0 -1
  459. package/dist/reactive/cleanup.js +0 -62
  460. package/dist/reactive/cleanup.js.map +0 -1
  461. package/dist/reactive/computed.cjs +0 -2
  462. package/dist/reactive/computed.cjs.map +0 -1
  463. package/dist/reactive/computed.js +0 -121
  464. package/dist/reactive/computed.js.map +0 -1
  465. package/dist/reactive/context.cjs +0 -2
  466. package/dist/reactive/context.cjs.map +0 -1
  467. package/dist/reactive/context.js +0 -143
  468. package/dist/reactive/context.js.map +0 -1
  469. package/dist/reactive/effect.cjs +0 -2
  470. package/dist/reactive/effect.cjs.map +0 -1
  471. package/dist/reactive/effect.js +0 -67
  472. package/dist/reactive/effect.js.map +0 -1
  473. package/dist/reactive/enhanced-effect.cjs +0 -2
  474. package/dist/reactive/enhanced-effect.cjs.map +0 -1
  475. package/dist/reactive/enhanced-effect.js +0 -153
  476. package/dist/reactive/enhanced-effect.js.map +0 -1
  477. package/dist/reactive/enhanced-signal.cjs +0 -2
  478. package/dist/reactive/enhanced-signal.cjs.map +0 -1
  479. package/dist/reactive/enhanced-signal.js +0 -117
  480. package/dist/reactive/enhanced-signal.js.map +0 -1
  481. package/dist/reactive/equality.cjs +0 -2
  482. package/dist/reactive/equality.cjs.map +0 -1
  483. package/dist/reactive/equality.js +0 -66
  484. package/dist/reactive/equality.js.map +0 -1
  485. package/dist/reactive/index.cjs +0 -2
  486. package/dist/reactive/index.cjs.map +0 -1
  487. package/dist/reactive/index.js.map +0 -1
  488. package/dist/reactive/migration.cjs +0 -18
  489. package/dist/reactive/migration.cjs.map +0 -1
  490. package/dist/reactive/migration.js +0 -164
  491. package/dist/reactive/migration.js.map +0 -1
  492. package/dist/reactive/ownership.cjs +0 -2
  493. package/dist/reactive/ownership.cjs.map +0 -1
  494. package/dist/reactive/ownership.js +0 -34
  495. package/dist/reactive/ownership.js.map +0 -1
  496. package/dist/reactive/scheduler.cjs +0 -2
  497. package/dist/reactive/scheduler.cjs.map +0 -1
  498. package/dist/reactive/scheduler.js +0 -111
  499. package/dist/reactive/scheduler.js.map +0 -1
  500. package/dist/reactive/signal.cjs +0 -2
  501. package/dist/reactive/signal.cjs.map +0 -1
  502. package/dist/reactive/signal.js +0 -96
  503. package/dist/reactive/signal.js.map +0 -1
  504. package/dist/reactive/theme.cjs +0 -2
  505. package/dist/reactive/theme.cjs.map +0 -1
  506. package/dist/reactive/theme.js +0 -27
  507. package/dist/reactive/theme.js.map +0 -1
  508. package/dist/reactive/types.cjs +0 -2
  509. package/dist/reactive/types.cjs.map +0 -1
  510. package/dist/reactive/types.js +0 -5
  511. package/dist/reactive/types.js.map +0 -1
  512. package/dist/reactive/unified-scheduler.cjs +0 -2
  513. package/dist/reactive/unified-scheduler.cjs.map +0 -1
  514. package/dist/reactive/unified-scheduler.js +0 -219
  515. package/dist/reactive/unified-scheduler.js.map +0 -1
  516. package/dist/runtime/component-context.cjs +0 -2
  517. package/dist/runtime/component-context.cjs.map +0 -1
  518. package/dist/runtime/component-context.js +0 -177
  519. package/dist/runtime/component-context.js.map +0 -1
  520. package/dist/runtime/component.cjs +0 -2
  521. package/dist/runtime/component.cjs.map +0 -1
  522. package/dist/runtime/component.js +0 -238
  523. package/dist/runtime/component.js.map +0 -1
  524. package/dist/runtime/context.cjs +0 -2
  525. package/dist/runtime/context.cjs.map +0 -1
  526. package/dist/runtime/context.js.map +0 -1
  527. package/dist/runtime/dev-tools.cjs +0 -2
  528. package/dist/runtime/dev-tools.cjs.map +0 -1
  529. package/dist/runtime/dev-tools.js +0 -391
  530. package/dist/runtime/dev-tools.js.map +0 -1
  531. package/dist/runtime/development-warnings.cjs +0 -2
  532. package/dist/runtime/development-warnings.cjs.map +0 -1
  533. package/dist/runtime/development-warnings.js +0 -69
  534. package/dist/runtime/development-warnings.js.map +0 -1
  535. package/dist/runtime/dom-bridge.cjs +0 -2
  536. package/dist/runtime/dom-bridge.cjs.map +0 -1
  537. package/dist/runtime/dom-bridge.js.map +0 -1
  538. package/dist/runtime/element-override.cjs +0 -2
  539. package/dist/runtime/element-override.cjs.map +0 -1
  540. package/dist/runtime/element-override.js +0 -214
  541. package/dist/runtime/element-override.js.map +0 -1
  542. package/dist/runtime/error-boundary.cjs +0 -2
  543. package/dist/runtime/error-boundary.cjs.map +0 -1
  544. package/dist/runtime/error-boundary.js +0 -559
  545. package/dist/runtime/error-boundary.js.map +0 -1
  546. package/dist/runtime/error-recovery.cjs +0 -2
  547. package/dist/runtime/error-recovery.cjs.map +0 -1
  548. package/dist/runtime/error-recovery.js +0 -385
  549. package/dist/runtime/error-recovery.js.map +0 -1
  550. package/dist/runtime/error-reporting.cjs +0 -3
  551. package/dist/runtime/error-reporting.cjs.map +0 -1
  552. package/dist/runtime/error-reporting.js +0 -479
  553. package/dist/runtime/error-reporting.js.map +0 -1
  554. package/dist/runtime/error-utils.cjs +0 -3
  555. package/dist/runtime/error-utils.cjs.map +0 -1
  556. package/dist/runtime/error-utils.js +0 -352
  557. package/dist/runtime/error-utils.js.map +0 -1
  558. package/dist/runtime/lazy-component.cjs +0 -2
  559. package/dist/runtime/lazy-component.cjs.map +0 -1
  560. package/dist/runtime/lazy-component.js +0 -129
  561. package/dist/runtime/lazy-component.js.map +0 -1
  562. package/dist/runtime/lifecycle.cjs +0 -2
  563. package/dist/runtime/lifecycle.cjs.map +0 -1
  564. package/dist/runtime/lifecycle.js +0 -7
  565. package/dist/runtime/lifecycle.js.map +0 -1
  566. package/dist/runtime/mounting.cjs +0 -2
  567. package/dist/runtime/mounting.cjs.map +0 -1
  568. package/dist/runtime/mounting.js +0 -12
  569. package/dist/runtime/mounting.js.map +0 -1
  570. package/dist/runtime/optimization.cjs +0 -2
  571. package/dist/runtime/optimization.cjs.map +0 -1
  572. package/dist/runtime/optimization.js +0 -6
  573. package/dist/runtime/optimization.js.map +0 -1
  574. package/dist/runtime/performance.cjs +0 -2
  575. package/dist/runtime/performance.cjs.map +0 -1
  576. package/dist/runtime/performance.js +0 -399
  577. package/dist/runtime/performance.js.map +0 -1
  578. package/dist/runtime/props.cjs +0 -2
  579. package/dist/runtime/props.cjs.map +0 -1
  580. package/dist/runtime/props.js +0 -265
  581. package/dist/runtime/props.js.map +0 -1
  582. package/dist/runtime/renderer.cjs +0 -2
  583. package/dist/runtime/renderer.cjs.map +0 -1
  584. package/dist/runtime/renderer.js.map +0 -1
  585. package/dist/runtime/semantic-role-manager.cjs +0 -2
  586. package/dist/runtime/semantic-role-manager.cjs.map +0 -1
  587. package/dist/runtime/semantic-role-manager.js +0 -82
  588. package/dist/runtime/semantic-role-manager.js.map +0 -1
  589. package/dist/state/binding.cjs +0 -2
  590. package/dist/state/binding.cjs.map +0 -1
  591. package/dist/state/binding.js +0 -155
  592. package/dist/state/binding.js.map +0 -1
  593. package/dist/state/environment.cjs +0 -2
  594. package/dist/state/environment.cjs.map +0 -1
  595. package/dist/state/environment.js +0 -115
  596. package/dist/state/environment.js.map +0 -1
  597. package/dist/state/index.cjs +0 -2
  598. package/dist/state/index.cjs.map +0 -1
  599. package/dist/state/index.js +0 -63
  600. package/dist/state/index.js.map +0 -1
  601. package/dist/state/observed-object.cjs +0 -2
  602. package/dist/state/observed-object.cjs.map +0 -1
  603. package/dist/state/observed-object.js +0 -163
  604. package/dist/state/observed-object.js.map +0 -1
  605. package/dist/state/state-manager.cjs +0 -2
  606. package/dist/state/state-manager.cjs.map +0 -1
  607. package/dist/state/state-manager.js +0 -233
  608. package/dist/state/state-manager.js.map +0 -1
  609. package/dist/state/state.cjs +0 -2
  610. package/dist/state/state.cjs.map +0 -1
  611. package/dist/state/state.js +0 -159
  612. package/dist/state/state.js.map +0 -1
  613. package/dist/sui-compat.cjs +0 -2
  614. package/dist/sui-compat.cjs.map +0 -1
  615. package/dist/sui-compat.js +0 -88
  616. package/dist/sui-compat.js.map +0 -1
  617. package/dist/validation/advanced-debugging.cjs +0 -44
  618. package/dist/validation/advanced-debugging.cjs.map +0 -1
  619. package/dist/validation/advanced-debugging.js +0 -455
  620. package/dist/validation/advanced-debugging.js.map +0 -1
  621. package/dist/validation/build-time/detection.cjs +0 -2
  622. package/dist/validation/build-time/detection.cjs.map +0 -1
  623. package/dist/validation/build-time/detection.js +0 -199
  624. package/dist/validation/build-time/detection.js.map +0 -1
  625. package/dist/validation/build-time/index.cjs +0 -2
  626. package/dist/validation/build-time/index.cjs.map +0 -1
  627. package/dist/validation/build-time/index.js +0 -122
  628. package/dist/validation/build-time/index.js.map +0 -1
  629. package/dist/validation/build-time/plugins.cjs +0 -3
  630. package/dist/validation/build-time/plugins.cjs.map +0 -1
  631. package/dist/validation/build-time/plugins.js +0 -282
  632. package/dist/validation/build-time/plugins.js.map +0 -1
  633. package/dist/validation/build-time/rules.cjs +0 -2
  634. package/dist/validation/build-time/rules.cjs.map +0 -1
  635. package/dist/validation/build-time/rules.js +0 -576
  636. package/dist/validation/build-time/rules.js.map +0 -1
  637. package/dist/validation/build-time/transformer.cjs +0 -3
  638. package/dist/validation/build-time/transformer.cjs.map +0 -1
  639. package/dist/validation/build-time/transformer.js +0 -177
  640. package/dist/validation/build-time/transformer.js.map +0 -1
  641. package/dist/validation/comprehensive.cjs +0 -9
  642. package/dist/validation/comprehensive.cjs.map +0 -1
  643. package/dist/validation/comprehensive.js +0 -916
  644. package/dist/validation/comprehensive.js.map +0 -1
  645. package/dist/validation/debug-tools.cjs +0 -16
  646. package/dist/validation/debug-tools.cjs.map +0 -1
  647. package/dist/validation/debug-tools.js +0 -405
  648. package/dist/validation/debug-tools.js.map +0 -1
  649. package/dist/validation/developer-experience.cjs +0 -17
  650. package/dist/validation/developer-experience.cjs.map +0 -1
  651. package/dist/validation/developer-experience.js +0 -433
  652. package/dist/validation/developer-experience.js.map +0 -1
  653. package/dist/validation/documentation-integration.cjs +0 -7
  654. package/dist/validation/documentation-integration.cjs.map +0 -1
  655. package/dist/validation/documentation-integration.js +0 -440
  656. package/dist/validation/documentation-integration.js.map +0 -1
  657. package/dist/validation/enhanced-runtime.cjs +0 -6
  658. package/dist/validation/enhanced-runtime.cjs.map +0 -1
  659. package/dist/validation/enhanced-runtime.js +0 -465
  660. package/dist/validation/enhanced-runtime.js.map +0 -1
  661. package/dist/validation/error-reporting.cjs +0 -32
  662. package/dist/validation/error-reporting.cjs.map +0 -1
  663. package/dist/validation/error-reporting.js +0 -370
  664. package/dist/validation/error-reporting.js.map +0 -1
  665. package/dist/validation/ide-integration.cjs +0 -85
  666. package/dist/validation/ide-integration.cjs.map +0 -1
  667. package/dist/validation/ide-integration.js +0 -557
  668. package/dist/validation/ide-integration.js.map +0 -1
  669. package/dist/validation/index.cjs +0 -6
  670. package/dist/validation/index.cjs.map +0 -1
  671. package/dist/validation/index.js.map +0 -1
  672. package/dist/validation/lifecycle-validation.cjs +0 -2
  673. package/dist/validation/lifecycle-validation.cjs.map +0 -1
  674. package/dist/validation/lifecycle-validation.js +0 -314
  675. package/dist/validation/lifecycle-validation.js.map +0 -1
  676. package/dist/validation/performance-optimizer.cjs +0 -2
  677. package/dist/validation/performance-optimizer.cjs.map +0 -1
  678. package/dist/validation/performance-optimizer.js +0 -338
  679. package/dist/validation/performance-optimizer.js.map +0 -1
  680. package/dist/validation/plugin-registration.cjs +0 -2
  681. package/dist/validation/plugin-registration.cjs.map +0 -1
  682. package/dist/validation/plugin-registration.js +0 -126
  683. package/dist/validation/plugin-registration.js.map +0 -1
  684. package/dist/validation/production-bypass.cjs +0 -2
  685. package/dist/validation/production-bypass.cjs.map +0 -1
  686. package/dist/validation/production-bypass.js +0 -218
  687. package/dist/validation/production-bypass.js.map +0 -1
  688. package/dist/validation/simple.cjs +0 -9
  689. package/dist/validation/simple.cjs.map +0 -1
  690. package/dist/validation/simple.js +0 -146
  691. package/dist/validation/simple.js.map +0 -1
  692. package/dist/viewport/adapters/web-adapter.cjs +0 -70
  693. package/dist/viewport/adapters/web-adapter.cjs.map +0 -1
  694. package/dist/viewport/adapters/web-adapter.js +0 -823
  695. package/dist/viewport/adapters/web-adapter.js.map +0 -1
  696. package/dist/viewport/components.cjs +0 -2
  697. package/dist/viewport/components.cjs.map +0 -1
  698. package/dist/viewport/components.js +0 -298
  699. package/dist/viewport/components.js.map +0 -1
  700. package/dist/viewport/environment.cjs +0 -2
  701. package/dist/viewport/environment.cjs.map +0 -1
  702. package/dist/viewport/environment.js +0 -86
  703. package/dist/viewport/environment.js.map +0 -1
  704. package/dist/viewport/index.cjs +0 -2
  705. package/dist/viewport/index.cjs.map +0 -1
  706. package/dist/viewport/index.js.map +0 -1
  707. package/dist/viewport/platform-detection.cjs +0 -2
  708. package/dist/viewport/platform-detection.cjs.map +0 -1
  709. package/dist/viewport/platform-detection.js +0 -205
  710. package/dist/viewport/platform-detection.js.map +0 -1
  711. package/dist/viewport/types.cjs +0 -2
  712. package/dist/viewport/types.cjs.map +0 -1
  713. package/dist/viewport/types.js +0 -13
  714. package/dist/viewport/types.js.map +0 -1
  715. package/dist/viewport/viewport-manager.cjs +0 -2
  716. package/dist/viewport/viewport-manager.cjs.map +0 -1
  717. package/dist/viewport/viewport-manager.js +0 -524
  718. package/dist/viewport/viewport-manager.js.map +0 -1
  719. package/src/assets/Asset.ts +0 -11
  720. package/src/assets/AssetCollection.ts +0 -99
  721. package/src/assets/ColorAsset.ts +0 -210
  722. package/src/assets/FontAsset.ts +0 -380
  723. package/src/assets/ImageAsset.ts +0 -91
  724. package/src/assets/README.md +0 -190
  725. package/src/assets/index.ts +0 -175
  726. package/src/assets/test-assets.ts +0 -69
  727. package/src/assets/test-integration.ts +0 -46
  728. package/src/assets/test-simple.ts +0 -28
  729. package/src/assets/types.ts +0 -79
  730. package/src/bundles/common.ts +0 -30
  731. package/src/bundles/complete.ts +0 -29
  732. package/src/bundles/essential.ts +0 -26
  733. package/src/bundles/minimal.ts +0 -26
  734. package/src/bundles/production-minimal.ts +0 -67
  735. package/src/compiler/advanced-parser.ts +0 -871
  736. package/src/compiler/codegen.ts +0 -450
  737. package/src/compiler/enhanced-codegen.ts +0 -729
  738. package/src/compiler/index.ts +0 -25
  739. package/src/compiler/parser.ts +0 -461
  740. package/src/compiler/plugin.ts +0 -181
  741. package/src/compiler/types.ts +0 -177
  742. package/src/components/BasicInput.ts +0 -352
  743. package/src/components/Button.ts +0 -963
  744. package/src/components/Divider.ts +0 -341
  745. package/src/components/EnhancedLink.ts +0 -676
  746. package/src/components/Form.ts +0 -414
  747. package/src/components/Grid.ts +0 -2507
  748. package/src/components/GridResponsive.ts +0 -637
  749. package/src/components/Image.ts +0 -426
  750. package/src/components/List.ts +0 -1084
  751. package/src/components/Menu.ts +0 -807
  752. package/src/components/Picker.ts +0 -678
  753. package/src/components/ScrollView.ts +0 -725
  754. package/src/components/Section.ts +0 -472
  755. package/src/components/Show.ts +0 -205
  756. package/src/components/Spacer.ts +0 -93
  757. package/src/components/Text.ts +0 -447
  758. package/src/components/Toggle.ts +0 -700
  759. package/src/components/index.ts +0 -231
  760. package/src/components/wrapper.ts +0 -828
  761. package/src/concatenation/concatenatable.ts +0 -211
  762. package/src/concatenation/concatenated-component.ts +0 -471
  763. package/src/concatenation/index.ts +0 -41
  764. package/src/concatenation/styles.css +0 -120
  765. package/src/concatenation/text-optimizer.ts +0 -440
  766. package/src/concatenation/types.ts +0 -116
  767. package/src/constants/README.md +0 -339
  768. package/src/constants/__tests__/frame-utils.test.ts +0 -276
  769. package/src/constants/__tests__/layout.test.ts +0 -215
  770. package/src/constants/frame-utils.ts +0 -174
  771. package/src/constants/index.ts +0 -8
  772. package/src/constants/layout.ts +0 -120
  773. package/src/css-classes/component-base.ts +0 -117
  774. package/src/css-classes/css-class-manager.ts +0 -372
  775. package/src/css-classes/dom-integration.ts +0 -162
  776. package/src/css-classes/enhanced-renderer.ts +0 -166
  777. package/src/css-classes/index.ts +0 -45
  778. package/src/css-classes/types.ts +0 -73
  779. package/src/css-classes/utilities.ts +0 -175
  780. package/src/debug/index.ts +0 -267
  781. package/src/developer-experience/enhanced-errors.ts +0 -556
  782. package/src/developer-experience/enhanced-types.ts +0 -427
  783. package/src/developer-experience/index.ts +0 -220
  784. package/src/globals.d.ts +0 -43
  785. package/src/gradients/__tests__/angular-gradient.test.ts +0 -111
  786. package/src/gradients/__tests__/background-modifier.test.ts +0 -81
  787. package/src/gradients/__tests__/comprehensive-gradients.test.ts +0 -296
  788. package/src/gradients/__tests__/gradient-asset.test.ts +0 -144
  789. package/src/gradients/__tests__/linear-gradient.test.ts +0 -92
  790. package/src/gradients/__tests__/phase4-features.test.ts +0 -386
  791. package/src/gradients/__tests__/radial-gradient.test.ts +0 -110
  792. package/src/gradients/__tests__/repeating-gradients.test.ts +0 -125
  793. package/src/gradients/__tests__/state-background-modifier.test.ts +0 -340
  794. package/src/gradients/__tests__/state-gradient-asset.test.ts +0 -262
  795. package/src/gradients/__tests__/state-gradient-integration.test.ts +0 -277
  796. package/src/gradients/css-generator.ts +0 -158
  797. package/src/gradients/examples.ts +0 -632
  798. package/src/gradients/gradient-asset.ts +0 -30
  799. package/src/gradients/index.ts +0 -85
  800. package/src/gradients/performance.ts +0 -521
  801. package/src/gradients/presets.ts +0 -422
  802. package/src/gradients/reactive.ts +0 -470
  803. package/src/gradients/state-gradient-asset.ts +0 -179
  804. package/src/gradients/types.ts +0 -148
  805. package/src/gradients/utils.ts +0 -579
  806. package/src/gradients/validation.ts +0 -489
  807. package/src/index.ts +0 -168
  808. package/src/lifecycle/hooks.ts +0 -332
  809. package/src/modifiers/__tests__/as-html-integration.test.ts +0 -204
  810. package/src/modifiers/__tests__/as-html.test.ts +0 -437
  811. package/src/modifiers/__tests__/basic-sanitizer-security.test.ts +0 -294
  812. package/src/modifiers/__tests__/border.test.ts +0 -371
  813. package/src/modifiers/__tests__/margin-string-support.test.ts +0 -41
  814. package/src/modifiers/__tests__/padding-string-support.test.ts +0 -41
  815. package/src/modifiers/as-html-validator.ts +0 -68
  816. package/src/modifiers/as-html.ts +0 -216
  817. package/src/modifiers/attributes.ts +0 -574
  818. package/src/modifiers/backdrop.ts +0 -290
  819. package/src/modifiers/background.ts +0 -165
  820. package/src/modifiers/base.ts +0 -1815
  821. package/src/modifiers/basic-sanitizer.ts +0 -227
  822. package/src/modifiers/border.ts +0 -574
  823. package/src/modifiers/builder.ts +0 -1747
  824. package/src/modifiers/core.ts +0 -521
  825. package/src/modifiers/css.ts +0 -148
  826. package/src/modifiers/effects.ts +0 -412
  827. package/src/modifiers/elements.ts +0 -541
  828. package/src/modifiers/filters.ts +0 -501
  829. package/src/modifiers/flexbox.ts +0 -180
  830. package/src/modifiers/font.ts +0 -149
  831. package/src/modifiers/grid.ts +0 -238
  832. package/src/modifiers/index.ts +0 -481
  833. package/src/modifiers/margin.ts +0 -218
  834. package/src/modifiers/padding.ts +0 -318
  835. package/src/modifiers/registry.ts +0 -444
  836. package/src/modifiers/responsive/__tests__/advanced-media-queries.test.ts +0 -392
  837. package/src/modifiers/responsive/__tests__/advanced-utilities.test.ts +0 -368
  838. package/src/modifiers/responsive/__tests__/comprehensive-browser-tests.test.ts +0 -556
  839. package/src/modifiers/responsive/__tests__/layout-patterns.test.ts +0 -558
  840. package/src/modifiers/responsive/advanced-utilities.ts +0 -562
  841. package/src/modifiers/responsive/breakpoints.ts +0 -330
  842. package/src/modifiers/responsive/css-generator.ts +0 -432
  843. package/src/modifiers/responsive/dev-tools.ts +0 -650
  844. package/src/modifiers/responsive/index.ts +0 -119
  845. package/src/modifiers/responsive/layout-patterns.ts +0 -592
  846. package/src/modifiers/responsive/performance.ts +0 -385
  847. package/src/modifiers/responsive/responsive-builder.ts +0 -620
  848. package/src/modifiers/responsive/responsive-modifier.ts +0 -410
  849. package/src/modifiers/responsive/types.ts +0 -226
  850. package/src/modifiers/responsive/utilities.ts +0 -478
  851. package/src/modifiers/scroll.ts +0 -297
  852. package/src/modifiers/shadows.ts +0 -321
  853. package/src/modifiers/size.ts +0 -208
  854. package/src/modifiers/text.ts +0 -416
  855. package/src/modifiers/transformations.ts +0 -640
  856. package/src/modifiers/transitions.ts +0 -218
  857. package/src/modifiers/types.ts +0 -889
  858. package/src/modifiers/typography.ts +0 -341
  859. package/src/modifiers/utility.ts +0 -209
  860. package/src/modifiers/utils.ts +0 -413
  861. package/src/plugins/__tests__/simplified-plugin-system.test.ts +0 -190
  862. package/src/plugins/component-loader-registry.ts +0 -371
  863. package/src/plugins/index.ts +0 -61
  864. package/src/plugins/legacy-adapter.ts +0 -84
  865. package/src/plugins/simplified-component-registry.ts +0 -130
  866. package/src/plugins/simplified-error-handler.ts +0 -372
  867. package/src/plugins/simplified-index.ts +0 -61
  868. package/src/plugins/simplified-lazy-loader.ts +0 -242
  869. package/src/plugins/simplified-plugin-manager.ts +0 -93
  870. package/src/plugins/simplified-tachui-instance.ts +0 -142
  871. package/src/plugins/simplified-types.ts +0 -79
  872. package/src/plugins/simplified-utils.ts +0 -118
  873. package/src/reactive/cleanup.ts +0 -241
  874. package/src/reactive/computed.ts +0 -281
  875. package/src/reactive/context.ts +0 -287
  876. package/src/reactive/effect.ts +0 -194
  877. package/src/reactive/enhanced-effect.ts +0 -318
  878. package/src/reactive/enhanced-signal.ts +0 -227
  879. package/src/reactive/equality.ts +0 -188
  880. package/src/reactive/globals.d.ts +0 -5
  881. package/src/reactive/index.ts +0 -150
  882. package/src/reactive/migration.ts +0 -335
  883. package/src/reactive/ownership.ts +0 -182
  884. package/src/reactive/scheduler.ts +0 -300
  885. package/src/reactive/signal.ts +0 -201
  886. package/src/reactive/theme.ts +0 -49
  887. package/src/reactive/types.ts +0 -103
  888. package/src/reactive/unified-scheduler.ts +0 -357
  889. package/src/runtime/component-context.ts +0 -343
  890. package/src/runtime/component.ts +0 -499
  891. package/src/runtime/context.ts +0 -527
  892. package/src/runtime/dev-tools.ts +0 -752
  893. package/src/runtime/development-warnings.ts +0 -114
  894. package/src/runtime/dom-bridge.ts +0 -570
  895. package/src/runtime/element-override.ts +0 -282
  896. package/src/runtime/error-boundary.ts +0 -955
  897. package/src/runtime/error-recovery.ts +0 -638
  898. package/src/runtime/error-reporting.ts +0 -808
  899. package/src/runtime/error-utils.ts +0 -698
  900. package/src/runtime/index.ts +0 -202
  901. package/src/runtime/lazy-component.ts +0 -268
  902. package/src/runtime/lifecycle.ts +0 -10
  903. package/src/runtime/mounting.ts +0 -17
  904. package/src/runtime/optimization.ts +0 -13
  905. package/src/runtime/performance.ts +0 -693
  906. package/src/runtime/props.ts +0 -434
  907. package/src/runtime/refs.ts +0 -13
  908. package/src/runtime/renderer.ts +0 -674
  909. package/src/runtime/semantic-role-manager.ts +0 -140
  910. package/src/runtime/types.ts +0 -282
  911. package/src/state/binding.ts +0 -381
  912. package/src/state/environment-object.ts +0 -444
  913. package/src/state/environment.ts +0 -351
  914. package/src/state/index.ts +0 -179
  915. package/src/state/observed-object.ts +0 -405
  916. package/src/state/state-manager.ts +0 -366
  917. package/src/state/state.ts +0 -339
  918. package/src/state/types.ts +0 -192
  919. package/src/sui-compat.ts +0 -163
  920. package/src/validation/__tests__/phase-1d-integration.test.ts +0 -558
  921. package/src/validation/advanced-debugging.ts +0 -860
  922. package/src/validation/build-time/detection.ts +0 -373
  923. package/src/validation/build-time/index.ts +0 -222
  924. package/src/validation/build-time/plugins.ts +0 -515
  925. package/src/validation/build-time/rules.ts +0 -624
  926. package/src/validation/build-time/transformer.ts +0 -372
  927. package/src/validation/build-time/types.ts +0 -232
  928. package/src/validation/comprehensive.ts +0 -1272
  929. package/src/validation/debug-tools.ts +0 -724
  930. package/src/validation/developer-experience.ts +0 -712
  931. package/src/validation/documentation-integration.ts +0 -835
  932. package/src/validation/enhanced-runtime.ts +0 -765
  933. package/src/validation/error-reporting.ts +0 -587
  934. package/src/validation/ide-integration.ts +0 -845
  935. package/src/validation/index.ts +0 -353
  936. package/src/validation/lifecycle-validation.ts +0 -636
  937. package/src/validation/performance-optimizer.ts +0 -599
  938. package/src/validation/plugin-registration.ts +0 -249
  939. package/src/validation/production-bypass.ts +0 -466
  940. package/src/validation/simple.ts +0 -465
  941. package/src/viewport/adapters/web-adapter.ts +0 -1385
  942. package/src/viewport/components.ts +0 -505
  943. package/src/viewport/environment.ts +0 -173
  944. package/src/viewport/index.ts +0 -290
  945. package/src/viewport/platform-detection.ts +0 -431
  946. package/src/viewport/types.ts +0 -371
  947. package/src/viewport/viewport-manager.ts +0 -979
@@ -1,1815 +0,0 @@
1
- /**
2
- * Base Modifier System Implementation
3
- *
4
- * Core modifier classes and utilities for the SwiftUI-inspired modifier system.
5
- */
6
-
7
- import { createEffect, isComputed, isSignal, getThemeSignal } from '../reactive'
8
- import type { Signal } from '../reactive/types'
9
- import type { DOMNode } from '../runtime/types'
10
- import type {
11
- CSSStyleProperties,
12
- LifecycleModifierProps,
13
- Modifier,
14
- ModifierContext,
15
- ReactiveModifierProps,
16
- StyleComputationContext,
17
- } from './types'
18
- import { ModifierPriority } from './types'
19
- import { isInfinity, dimensionToCSS, shouldExpandForInfinity } from '../constants/layout'
20
-
21
- /**
22
- * Abstract base modifier class
23
- */
24
- export abstract class BaseModifier<TProps = {}> implements Modifier<TProps> {
25
- abstract readonly type: string
26
- abstract readonly priority: number
27
-
28
- constructor(public readonly properties: TProps) {}
29
-
30
- /**
31
- * Apply the modifier to a DOM node
32
- */
33
- abstract apply(node: DOMNode, context: ModifierContext): DOMNode | undefined
34
-
35
- /**
36
- * Helper to resolve reactive properties
37
- */
38
- protected resolveReactiveProps<T extends Record<string, any>>(
39
- props: ReactiveModifierProps<T>,
40
- context: StyleComputationContext
41
- ): T {
42
- const resolved = {} as T
43
-
44
- for (const [key, value] of Object.entries(props)) {
45
- if (isSignal(value) || isComputed(value)) {
46
- // Preserve the signal/computed - let applyStyles handle reactivity
47
- resolved[key as keyof T] = value as T[keyof T]
48
- } else {
49
- // Static value
50
- resolved[key as keyof T] = value
51
- }
52
- }
53
-
54
- // Context parameter is kept for compatibility but not used in new approach
55
- void context
56
-
57
- return resolved
58
- }
59
-
60
- /**
61
- * Apply a single style change to an element with reactive support
62
- */
63
- protected applyStyleChange(element: Element, property: string, value: any): void {
64
- if (element instanceof HTMLElement) {
65
- const cssProperty = this.toCSSProperty(property)
66
-
67
- // Handle reactive values (signals and computed)
68
- if (isSignal(value) || isComputed(value)) {
69
- // Create reactive effect for this style property
70
- createEffect(() => {
71
- const currentValue = value()
72
- const cssValue = String(currentValue)
73
-
74
- // Check if value contains !important and handle it properly
75
- if (cssValue.includes('!important')) {
76
- const actualValue = cssValue.replace(/\s*!important\s*$/, '').trim()
77
- element.style.setProperty(cssProperty, actualValue, 'important')
78
- } else {
79
- element.style.setProperty(cssProperty, cssValue)
80
- }
81
- })
82
- } else {
83
- // Handle static values
84
- const cssValue = String(value)
85
-
86
- // Check if value contains !important and handle it properly
87
- if (cssValue.includes('!important')) {
88
- const actualValue = cssValue.replace(/\s*!important\s*$/, '').trim()
89
- element.style.setProperty(cssProperty, actualValue, 'important')
90
- } else {
91
- element.style.setProperty(cssProperty, cssValue)
92
- }
93
- }
94
- }
95
- }
96
-
97
- /**
98
- * Convert camelCase property to CSS kebab-case
99
- */
100
- protected toCSSProperty(property: string): string {
101
- return property.replace(/([A-Z])/g, '-$1').toLowerCase()
102
- }
103
-
104
- /**
105
- * Convert value to CSS value string
106
- */
107
- protected toCSSValue(value: any): string {
108
- if (typeof value === 'number') {
109
- return `${value}px`
110
- }
111
- return String(value)
112
- }
113
-
114
- /**
115
- * Convert value to CSS value string with property-specific handling
116
- */
117
- protected toCSSValueForProperty(property: string, value: any): string {
118
- if (typeof value === 'number') {
119
- // Properties that should be unitless
120
- const unitlessProperties = [
121
- 'opacity',
122
- 'z-index',
123
- 'line-height',
124
- 'flex-grow',
125
- 'flex-shrink',
126
- 'order',
127
- 'column-count',
128
- 'font-weight',
129
- ]
130
-
131
- if (unitlessProperties.includes(property)) {
132
- return String(value)
133
- }
134
-
135
- return `${value}px`
136
- }
137
-
138
- // Properties that should be passed through as-is (no processing)
139
- const passthroughProperties = [
140
- 'filter', // CSS filter strings should not be processed
141
- 'transform', // CSS transform strings
142
- 'clip-path' // CSS clip-path strings
143
- ]
144
-
145
- if (passthroughProperties.includes(property)) {
146
- return String(value)
147
- }
148
-
149
- return String(value)
150
- }
151
-
152
- /**
153
- * Apply multiple CSS properties to an element with reactive support
154
- */
155
- protected applyStyles(element: Element, styles: CSSStyleProperties): void {
156
- // Check if element has a style property (for testing and real elements)
157
- if (element instanceof HTMLElement || (element as any).style) {
158
- const styleTarget = element instanceof HTMLElement ? element.style : (element as any).style
159
-
160
- for (const [property, value] of Object.entries(styles)) {
161
- if (value !== undefined) {
162
- const cssProperty = this.toCSSProperty(property)
163
-
164
- // Handle reactive values (signals and computed)
165
- if (isSignal(value) || isComputed(value)) {
166
- // Create reactive effect for this style property
167
- createEffect(() => {
168
- const currentValue = value()
169
- const cssValue = this.toCSSValueForProperty(cssProperty, currentValue)
170
-
171
- if (styleTarget.setProperty) {
172
- // Check if value contains !important and handle it properly
173
- if (typeof cssValue === 'string' && cssValue.includes('!important')) {
174
- const actualValue = cssValue.replace(/\s*!important\s*$/, '').trim()
175
- styleTarget.setProperty(cssProperty, actualValue, 'important')
176
- } else {
177
- styleTarget.setProperty(cssProperty, cssValue)
178
- }
179
- } else {
180
- ;(styleTarget as any)[cssProperty] = cssValue
181
- }
182
- })
183
- } else {
184
- // Handle static values
185
- const cssValue = this.toCSSValueForProperty(cssProperty, value)
186
-
187
- if (styleTarget.setProperty) {
188
- // Check if value contains !important and handle it properly
189
- if (typeof cssValue === 'string' && cssValue.includes('!important')) {
190
- const actualValue = cssValue.replace(/\s*!important\s*$/, '').trim()
191
- styleTarget.setProperty(cssProperty, actualValue, 'important')
192
- } else {
193
- styleTarget.setProperty(cssProperty, cssValue)
194
- }
195
- } else {
196
- ;(styleTarget as any)[cssProperty] = cssValue
197
- }
198
- }
199
- }
200
- }
201
- }
202
- }
203
-
204
- /**
205
- * Add CSS classes to an element
206
- */
207
- protected addClasses(element: Element, classes: string[]): void {
208
- if (element instanceof HTMLElement) {
209
- element.classList.add(...classes)
210
- }
211
- }
212
-
213
- /**
214
- * Remove CSS classes from an element
215
- */
216
- protected removeClasses(element: Element, classes: string[]): void {
217
- if (element instanceof HTMLElement) {
218
- element.classList.remove(...classes)
219
- }
220
- }
221
-
222
- /**
223
- * Create a style computation context
224
- */
225
- protected createStyleContext(
226
- componentId: string,
227
- element: Element,
228
- modifiers: Modifier[]
229
- ): StyleComputationContext {
230
- return {
231
- componentId,
232
- element,
233
- modifiers,
234
- signals: new Set(),
235
- cleanup: [],
236
- }
237
- }
238
- }
239
-
240
- /**
241
- * Layout modifier for frame, padding, margin
242
- */
243
- export class LayoutModifier extends BaseModifier {
244
- readonly type = 'layout'
245
- readonly priority = ModifierPriority.LAYOUT
246
-
247
- apply(node: DOMNode, context: ModifierContext): DOMNode | undefined {
248
- if (!node.element || !context.element) return
249
-
250
- const styleContext = this.createStyleContext(context.componentId, context.element, [])
251
-
252
- const styles = this.computeLayoutStyles(this.properties as any, styleContext)
253
-
254
- this.applyStyles(context.element, styles)
255
-
256
- // Handle offset separately for proper transform combining
257
- const props = this.properties as any
258
- if (props.offset && context.element instanceof HTMLElement) {
259
- this.applyOffsetTransform(context.element, props.offset)
260
- }
261
-
262
- // Handle aspectRatio separately for reactive support
263
- if (props.aspectRatio && context.element instanceof HTMLElement) {
264
- this.applyAspectRatio(context.element, props.aspectRatio)
265
- }
266
-
267
- // Handle scaleEffect separately for proper transform combining (Phase 3 - Epic: Butternut)
268
- if (props.scaleEffect && context.element instanceof HTMLElement) {
269
- this.applyScaleTransform(context.element, props.scaleEffect)
270
- }
271
-
272
- // Handle absolutePosition separately for proper positioning (Phase 3 - Epic: Butternut)
273
- if (props.position && context.element instanceof HTMLElement) {
274
- this.applyAbsolutePosition(context.element, props.position)
275
- }
276
-
277
- // Handle zIndex separately for proper layering (Phase 3 - Epic: Butternut)
278
- if (props.zIndex !== undefined && context.element instanceof HTMLElement) {
279
- this.applyZIndex(context.element, props.zIndex)
280
- }
281
-
282
- return undefined
283
- }
284
-
285
- private applyOffsetTransform(element: HTMLElement, offset: { x?: any; y?: any }): void {
286
- const { x, y } = offset
287
-
288
- // Handle reactive values
289
- if (isSignal(x) || isComputed(x) || isSignal(y) || isComputed(y)) {
290
- createEffect(() => {
291
- const currentX = isSignal(x) || isComputed(x) ? x() : (x ?? 0)
292
- const currentY = isSignal(y) || isComputed(y) ? y() : (y ?? 0)
293
-
294
- const offsetX = this.toCSSValue(currentX)
295
- const offsetY = this.toCSSValue(currentY)
296
- const translateValue = `translate(${offsetX}, ${offsetY})`
297
-
298
- // Preserve existing transforms but replace any existing translate
299
- const existingTransform = element.style.transform || ''
300
- const existingTransforms = existingTransform
301
- .split(' ')
302
- .filter((t) => t && !t.startsWith('translate('))
303
- .join(' ')
304
-
305
- const newTransform = existingTransforms
306
- ? `${existingTransforms} ${translateValue}`
307
- : translateValue
308
-
309
- element.style.transform = newTransform
310
- })
311
- } else {
312
- // Handle static values
313
- const currentX = x ?? 0
314
- const currentY = y ?? 0
315
-
316
- const offsetX = this.toCSSValue(currentX)
317
- const offsetY = this.toCSSValue(currentY)
318
- const translateValue = `translate(${offsetX}, ${offsetY})`
319
-
320
- // Preserve existing transforms but replace any existing translate
321
- const existingTransform = element.style.transform || ''
322
- const existingTransforms = existingTransform
323
- .split(' ')
324
- .filter((t) => t && !t.startsWith('translate('))
325
- .join(' ')
326
-
327
- const newTransform = existingTransforms
328
- ? `${existingTransforms} ${translateValue}`
329
- : translateValue
330
-
331
- element.style.transform = newTransform
332
- }
333
- }
334
-
335
- private applyAspectRatio(
336
- element: HTMLElement,
337
- aspectRatio: { ratio?: any; contentMode?: 'fit' | 'fill' }
338
- ): void {
339
- const { ratio, contentMode } = aspectRatio
340
-
341
- if (ratio !== undefined) {
342
- // Handle reactive aspect ratio
343
- if (isSignal(ratio) || isComputed(ratio)) {
344
- createEffect(() => {
345
- const currentRatio = typeof ratio === 'function' ? ratio() : ratio
346
- element.style.aspectRatio = String(currentRatio)
347
- })
348
- } else {
349
- element.style.aspectRatio = String(ratio)
350
- }
351
-
352
- // Set content mode
353
- if (contentMode === 'fill') {
354
- element.style.objectFit = 'cover'
355
- } else {
356
- element.style.objectFit = 'contain'
357
- }
358
- }
359
- }
360
-
361
- // Phase 3 - Epic: Butternut Transform Methods
362
-
363
- private applyScaleTransform(
364
- element: HTMLElement,
365
- scaleEffect: { x?: any; y?: any; anchor?: string }
366
- ): void {
367
- const { x, y, anchor } = scaleEffect
368
- const scaleX = x ?? 1
369
- const scaleY = y ?? scaleX // Default to uniform scaling if y not provided
370
-
371
- // Handle reactive values
372
- if (isSignal(scaleX) || isComputed(scaleX) || isSignal(scaleY) || isComputed(scaleY)) {
373
- createEffect(() => {
374
- const currentX = isSignal(scaleX) || isComputed(scaleX) ? scaleX() : scaleX
375
- const currentY = isSignal(scaleY) || isComputed(scaleY) ? scaleY() : scaleY
376
-
377
- const scaleValue = `scale(${currentX}, ${currentY})`
378
-
379
- // Set transform-origin based on anchor
380
- element.style.transformOrigin = this.getTransformOrigin(anchor || 'center')
381
-
382
- // Preserve existing transforms but replace any existing scale
383
- const existingTransform = element.style.transform || ''
384
- const existingTransforms = existingTransform
385
- .replace(/\s*scale\([^)]*\)\s*/g, ' ')
386
- .replace(/\s+/g, ' ')
387
- .trim()
388
-
389
- const newTransform = existingTransforms
390
- ? `${existingTransforms} ${scaleValue}`
391
- : scaleValue
392
-
393
- element.style.transform = newTransform
394
- })
395
- } else {
396
- // Handle static values
397
- const scaleValue = `scale(${scaleX}, ${scaleY})`
398
-
399
- // Set transform-origin based on anchor
400
- element.style.transformOrigin = this.getTransformOrigin(anchor || 'center')
401
-
402
- // Preserve existing transforms but replace any existing scale
403
- const existingTransform = element.style.transform || ''
404
- const existingTransforms = existingTransform
405
- .replace(/\s*scale\([^)]*\)\s*/g, ' ')
406
- .replace(/\s+/g, ' ')
407
- .trim()
408
-
409
- const newTransform = existingTransforms
410
- ? `${existingTransforms} ${scaleValue}`
411
- : scaleValue
412
-
413
- element.style.transform = newTransform
414
- }
415
- }
416
-
417
- private applyAbsolutePosition(element: HTMLElement, position: { x?: any; y?: any }): void {
418
- const { x, y } = position
419
-
420
- // Set position to absolute for SwiftUI-style absolute positioning
421
- element.style.position = 'absolute'
422
-
423
- // Handle reactive values
424
- if (isSignal(x) || isComputed(x) || isSignal(y) || isComputed(y)) {
425
- createEffect(() => {
426
- const currentX = isSignal(x) || isComputed(x) ? x() : (x ?? 0)
427
- const currentY = isSignal(y) || isComputed(y) ? y() : (y ?? 0)
428
-
429
- element.style.left = this.toCSSValue(currentX)
430
- element.style.top = this.toCSSValue(currentY)
431
- })
432
- } else {
433
- // Handle static values
434
- const currentX = x ?? 0
435
- const currentY = y ?? 0
436
-
437
- element.style.left = this.toCSSValue(currentX)
438
- element.style.top = this.toCSSValue(currentY)
439
- }
440
- }
441
-
442
- private applyZIndex(element: HTMLElement, zIndex: any): void {
443
- // Handle reactive values
444
- if (isSignal(zIndex) || isComputed(zIndex)) {
445
- createEffect(() => {
446
- const currentZIndex = zIndex()
447
- element.style.zIndex = String(currentZIndex)
448
- })
449
- } else {
450
- // Handle static values
451
- element.style.zIndex = String(zIndex)
452
- }
453
- }
454
-
455
- private getTransformOrigin(anchor: string): string {
456
- const anchorMap: Record<string, string> = {
457
- center: 'center center',
458
- top: 'center top',
459
- topLeading: 'left top',
460
- topTrailing: 'right top',
461
- bottom: 'center bottom',
462
- bottomLeading: 'left bottom',
463
- bottomTrailing: 'right bottom',
464
- leading: 'left center',
465
- trailing: 'right center',
466
- }
467
-
468
- return anchorMap[anchor] || 'center center'
469
- }
470
-
471
- private computeLayoutStyles(props: any, _context: StyleComputationContext): CSSStyleProperties {
472
- const styles: CSSStyleProperties = {}
473
-
474
- // Frame properties - handle infinity values properly
475
- if (props.frame) {
476
- const frame = props.frame
477
-
478
- // Check for infinity constraints and apply appropriate flex/size styles
479
- const infinityResult = shouldExpandForInfinity(frame)
480
- Object.assign(styles, infinityResult.cssProps)
481
-
482
- // Convert dimensions to CSS, handling infinity appropriately
483
- // Don't apply explicit width/height if infinity expansion is happening
484
- if (frame.width !== undefined) {
485
- const cssValue = dimensionToCSS(frame.width)
486
- if (cssValue !== undefined && !isInfinity(frame.width) && !infinityResult.expandWidth) {
487
- styles.width = cssValue
488
- }
489
- }
490
-
491
- if (frame.height !== undefined) {
492
- const cssValue = dimensionToCSS(frame.height)
493
- if (cssValue !== undefined && !isInfinity(frame.height) && !infinityResult.expandHeight) {
494
- styles.height = cssValue
495
- }
496
- }
497
-
498
- if (frame.minWidth !== undefined) {
499
- const cssValue = dimensionToCSS(frame.minWidth)
500
- if (cssValue !== undefined) {
501
- styles.minWidth = cssValue
502
- }
503
- }
504
-
505
- if (frame.maxWidth !== undefined && !isInfinity(frame.maxWidth)) {
506
- const cssValue = dimensionToCSS(frame.maxWidth)
507
- if (cssValue !== undefined) {
508
- styles.maxWidth = cssValue
509
- }
510
- } else if (isInfinity(frame.maxWidth)) {
511
- // SwiftUI compatibility: maxWidth infinity means expand to fill available width
512
- // Remove maxWidth constraint and use flex properties for expansion
513
- styles.maxWidth = 'none'
514
- styles.flexGrow = '1 !important'
515
- styles.flexShrink = '1 !important'
516
- styles.flexBasis = '0% !important'
517
- styles.alignSelf = 'stretch !important'
518
- }
519
-
520
- if (frame.minHeight !== undefined) {
521
- const cssValue = dimensionToCSS(frame.minHeight)
522
- if (cssValue !== undefined) {
523
- styles.minHeight = cssValue
524
- }
525
- }
526
-
527
- if (frame.maxHeight !== undefined && !isInfinity(frame.maxHeight)) {
528
- const cssValue = dimensionToCSS(frame.maxHeight)
529
- if (cssValue !== undefined) {
530
- styles.maxHeight = cssValue
531
- }
532
- } else if (isInfinity(frame.maxHeight)) {
533
- // SwiftUI compatibility: maxHeight infinity means expand to fill available height
534
- // Remove maxHeight constraint and use flex properties for expansion
535
- styles.maxHeight = 'none'
536
- styles.flexGrow = '1 !important'
537
- styles.flexShrink = '1 !important'
538
- styles.flexBasis = '0% !important'
539
- styles.alignSelf = 'stretch !important'
540
- }
541
- }
542
-
543
- // Padding
544
- if (props.padding !== undefined) {
545
- if (typeof props.padding === 'number') {
546
- styles.padding = this.toCSSValue(props.padding)
547
- } else {
548
- const p = props.padding
549
- if (p.top !== undefined) styles.paddingTop = this.toCSSValue(p.top)
550
- if (p.right !== undefined) styles.paddingRight = this.toCSSValue(p.right)
551
- if (p.bottom !== undefined) styles.paddingBottom = this.toCSSValue(p.bottom)
552
- if (p.left !== undefined) styles.paddingLeft = this.toCSSValue(p.left)
553
- }
554
- }
555
-
556
- // Margin
557
- if (props.margin !== undefined) {
558
- if (typeof props.margin === 'number') {
559
- styles.margin = this.toCSSValue(props.margin)
560
- } else {
561
- const m = props.margin
562
- if (m.top !== undefined) styles.marginTop = this.toCSSValue(m.top)
563
- if (m.right !== undefined) styles.marginRight = this.toCSSValue(m.right)
564
- if (m.bottom !== undefined) styles.marginBottom = this.toCSSValue(m.bottom)
565
- if (m.left !== undefined) styles.marginLeft = this.toCSSValue(m.left)
566
- }
567
- }
568
-
569
- // Alignment
570
- if (props.alignment) {
571
- switch (props.alignment) {
572
- case 'leading':
573
- styles.textAlign = 'left'
574
- styles.alignItems = 'flex-start'
575
- break
576
- case 'center':
577
- styles.textAlign = 'center'
578
- styles.alignItems = 'center'
579
- break
580
- case 'trailing':
581
- styles.textAlign = 'right'
582
- styles.alignItems = 'flex-end'
583
- break
584
- case 'top':
585
- styles.alignItems = 'flex-start'
586
- break
587
- case 'bottom':
588
- styles.alignItems = 'flex-end'
589
- break
590
- }
591
- }
592
-
593
- // Layout Priority
594
- // In SwiftUI, layoutPriority determines which views get priority in sizing
595
- // Higher priority views determine container size in ZStack
596
- // We implement this using CSS flexbox properties for flexible layouts
597
- if (props.layoutPriority !== undefined) {
598
- const priority = Number(props.layoutPriority)
599
-
600
- // Set flex properties based on priority
601
- // Higher priority = less flex shrink, more flex grow
602
- if (priority > 0) {
603
- // High priority: Don't shrink, allow growth
604
- styles.flexShrink = '0'
605
- styles.flexGrow = String(Math.max(1, priority / 10))
606
-
607
- // For ZStack containers, higher priority elements determine size
608
- // We use z-index for layering and flex properties for sizing behavior
609
- styles.zIndex = String(priority)
610
-
611
- // In grid layouts, higher priority gets more space
612
- styles.gridRowEnd = `span ${String(Math.min(10, Math.max(1, Math.ceil(priority / 10))))}`
613
- styles.gridColumnEnd = `span ${String(Math.min(10, Math.max(1, Math.ceil(priority / 10))))}`
614
- } else if (priority === 0) {
615
- // Default priority: Normal flex behavior
616
- styles.flexShrink = '1'
617
- styles.flexGrow = '1'
618
- } else {
619
- // Low priority: Shrink more, grow less
620
- styles.flexShrink = String(Math.abs(priority))
621
- styles.flexGrow = '0'
622
- styles.zIndex = String(priority)
623
- }
624
-
625
- // For containers that need to size based on highest priority child
626
- // We use CSS custom properties that can be read by parent containers
627
- if (styles && typeof styles === 'object' && 'setProperty' in styles) {
628
- ;(styles as any).setProperty('--layout-priority', String(priority))
629
- }
630
- }
631
-
632
- // Offset modifier (SwiftUI .offset(x, y))
633
- // Note: Offset handling is done in the apply method with proper reactive support
634
- // This is just for setting up the basic structure
635
- if (props.offset) {
636
- // The actual transform application happens in apply() method
637
- // to handle both reactive and static values properly
638
- }
639
-
640
- // Aspect Ratio modifier (SwiftUI .aspectRatio(ratio, contentMode))
641
- if (props.aspectRatio) {
642
- const { ratio, contentMode } = props.aspectRatio
643
-
644
- if (ratio !== undefined) {
645
- // Apply CSS aspect-ratio property
646
- styles.aspectRatio = typeof ratio === 'number' ? String(ratio) : ratio
647
-
648
- // Handle content mode
649
- if (contentMode === 'fill') {
650
- styles.objectFit = 'cover'
651
- } else {
652
- styles.objectFit = 'contain'
653
- }
654
- }
655
- }
656
-
657
- // Fixed Size modifier (SwiftUI .fixedSize())
658
- if (props.fixedSize) {
659
- const { horizontal, vertical } = props.fixedSize
660
-
661
- if (horizontal) {
662
- styles.flexShrink = '0'
663
- styles.width = 'max-content'
664
- }
665
- if (vertical) {
666
- styles.flexShrink = '0'
667
- styles.height = 'max-content'
668
- }
669
- }
670
-
671
- return styles
672
- }
673
- }
674
-
675
- /**
676
- * Appearance modifier for colors, fonts, borders, shadows
677
- */
678
- export class AppearanceModifier extends BaseModifier {
679
- readonly type = 'appearance'
680
- readonly priority = ModifierPriority.APPEARANCE
681
-
682
- apply(node: DOMNode, context: ModifierContext): DOMNode | undefined {
683
- if (!node.element || !context.element) {
684
- return
685
- }
686
-
687
- const styleContext = this.createStyleContext(context.componentId, context.element, [])
688
-
689
- const resolved = this.resolveReactiveProps(this.properties as any, styleContext)
690
-
691
- // Handle Assets separately with theme reactivity
692
- this.applyAssetBasedStyles(context.element, resolved)
693
-
694
- // Handle non-Asset styles normally
695
- const styles = this.computeAppearanceStyles(resolved)
696
- this.applyStyles(context.element, styles)
697
-
698
- return undefined
699
- }
700
-
701
- /**
702
- * Apply Asset-based styles with theme reactivity
703
- */
704
- private applyAssetBasedStyles(element: Element, props: any): void {
705
- // Get the shared theme signal
706
- const themeSignal = getThemeSignal()
707
-
708
- // Handle foregroundColor Asset
709
- if (props.foregroundColor && this.isAsset(props.foregroundColor)) {
710
- createEffect(() => {
711
- // Watch theme changes to trigger re-resolution
712
- themeSignal()
713
- // Re-resolve Asset when theme changes
714
- const resolvedColor = props.foregroundColor.resolve()
715
- this.applyStyleChange(element, 'color', resolvedColor)
716
- })
717
- }
718
-
719
- // Handle backgroundColor Asset
720
- if (props.backgroundColor && this.isAsset(props.backgroundColor)) {
721
- createEffect(() => {
722
- // Watch theme changes to trigger re-resolution
723
- themeSignal()
724
- // Re-resolve Asset when theme changes
725
- const resolvedColor = props.backgroundColor.resolve()
726
- this.applyStyleChange(element, 'backgroundColor', resolvedColor)
727
- })
728
- }
729
-
730
- // Handle border color Asset
731
- if (props.border?.color && this.isAsset(props.border.color)) {
732
- createEffect(() => {
733
- // Watch theme changes
734
- themeSignal()
735
- // Re-resolve Asset when theme changes
736
- const resolvedColor = props.border.color.resolve()
737
- this.applyStyleChange(element, 'borderColor', resolvedColor)
738
- })
739
- }
740
- }
741
-
742
- /**
743
- * Check if a value is an Asset object (including Asset proxies)
744
- */
745
- private isAsset(value: any): boolean {
746
- return (
747
- value !== null &&
748
- value !== undefined &&
749
- typeof value === 'object' &&
750
- 'resolve' in value &&
751
- typeof value.resolve === 'function'
752
- )
753
- }
754
-
755
- private computeAppearanceStyles(props: any): CSSStyleProperties {
756
- const styles: CSSStyleProperties = {}
757
-
758
- // Colors (skip Assets - they're handled reactively in applyAssetBasedStyles)
759
- if (props.foregroundColor && !this.isAsset(props.foregroundColor)) {
760
- styles.color = props.foregroundColor
761
- }
762
- if (props.backgroundColor && !this.isAsset(props.backgroundColor)) {
763
- styles.backgroundColor = props.backgroundColor
764
- }
765
- if (props.opacity !== undefined) styles.opacity = props.opacity
766
-
767
- // Font
768
- if (props.font) {
769
- const font = props.font
770
- if (font.family) {
771
- // Handle FontAsset objects that need to be resolved
772
- if (typeof font.family === 'object' && font.family !== null && 'resolve' in font.family) {
773
- styles.fontFamily = (font.family as any).resolve()
774
- } else {
775
- styles.fontFamily = font.family as string
776
- }
777
- }
778
- if (font.size) styles.fontSize = this.toCSSValue(font.size)
779
- if (font.weight) styles.fontWeight = String(font.weight)
780
- if (font.style) styles.fontStyle = font.style
781
- }
782
-
783
- // Corner radius
784
- if (props.cornerRadius !== undefined) {
785
- styles.borderRadius = this.toCSSValue(props.cornerRadius)
786
- }
787
-
788
- // Border
789
- if (props.border) {
790
- const border = props.border
791
- if (border.width !== undefined) styles.borderWidth = this.toCSSValue(border.width)
792
- if (border.color && !this.isAsset(border.color)) {
793
- styles.borderColor = border.color as string
794
- }
795
- if (border.style) styles.borderStyle = border.style
796
- }
797
-
798
- // Shadow
799
- if (props.shadow) {
800
- const shadow = props.shadow
801
- const x = shadow.x || 0
802
- const y = shadow.y || 0
803
- const radius = shadow.radius || 0
804
- const color = shadow.color || 'rgba(0,0,0,0.25)'
805
- styles.boxShadow = `${x}px ${y}px ${radius}px ${color}`
806
- }
807
-
808
- // Clipped modifier (SwiftUI .clipped())
809
- if (props.clipped) {
810
- styles.overflow = 'hidden'
811
- }
812
-
813
- // Clip Shape modifier (SwiftUI .clipShape())
814
- if (props.clipShape) {
815
- const { shape, parameters } = props.clipShape
816
-
817
- switch (shape) {
818
- case 'circle':
819
- styles.clipPath = 'circle(50%)'
820
- break
821
- case 'ellipse': {
822
- const radiusX = parameters?.radiusX || '50%'
823
- const radiusY = parameters?.radiusY || '50%'
824
- styles.clipPath = `ellipse(${radiusX} ${radiusY} at center)`
825
- break
826
- }
827
- case 'rect': {
828
- const inset = parameters?.inset || 0
829
- styles.clipPath = `inset(${inset}px)`
830
- break
831
- }
832
- case 'polygon': {
833
- const points = parameters?.points || '0% 0%, 100% 0%, 100% 100%, 0% 100%'
834
- styles.clipPath = `polygon(${points})`
835
- break
836
- }
837
- }
838
- }
839
-
840
- // Visual Effects (Phase 2 - Epic: Butternut)
841
- const filters: string[] = []
842
-
843
- if (props.blur !== undefined) {
844
- filters.push(`blur(${props.blur}px)`)
845
- }
846
- if (props.brightness !== undefined) {
847
- filters.push(`brightness(${props.brightness})`)
848
- }
849
- if (props.contrast !== undefined) {
850
- filters.push(`contrast(${props.contrast})`)
851
- }
852
- if (props.saturation !== undefined) {
853
- filters.push(`saturate(${props.saturation})`)
854
- }
855
- if (props.hueRotation !== undefined) {
856
- filters.push(`hue-rotate(${props.hueRotation}deg)`)
857
- }
858
- if (props.grayscale !== undefined) {
859
- filters.push(`grayscale(${props.grayscale})`)
860
- }
861
- if (props.colorInvert !== undefined) {
862
- filters.push(`invert(${props.colorInvert})`)
863
- }
864
-
865
- if (filters.length > 0) {
866
- styles.filter = filters.join(' ')
867
- }
868
-
869
- return styles
870
- }
871
- }
872
-
873
- /**
874
- * Interaction modifier for events and accessibility
875
- */
876
- export class InteractionModifier extends BaseModifier {
877
- readonly type = 'interaction'
878
- readonly priority = ModifierPriority.INTERACTION
879
-
880
- apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined {
881
- if (!context.element) return
882
-
883
- const props = this.properties as any
884
-
885
- // Event handlers
886
- if (props.onTap) {
887
- context.element.addEventListener('click', props.onTap)
888
- }
889
-
890
- if (props.onHover) {
891
- context.element.addEventListener('mouseenter', () => props.onHover(true))
892
- context.element.addEventListener('mouseleave', () => props.onHover(false))
893
- }
894
-
895
- if (props.onMouseEnter) {
896
- context.element.addEventListener('mouseenter', props.onMouseEnter)
897
- }
898
-
899
- if (props.onMouseLeave) {
900
- context.element.addEventListener('mouseleave', props.onMouseLeave)
901
- }
902
-
903
- if (props.onMouseDown) {
904
- context.element.addEventListener('mousedown', props.onMouseDown)
905
- }
906
-
907
- if (props.onMouseUp) {
908
- context.element.addEventListener('mouseup', props.onMouseUp)
909
- }
910
-
911
- if (props.onDragStart) {
912
- context.element.addEventListener('dragstart', props.onDragStart)
913
- }
914
-
915
- if (props.onDragOver) {
916
- context.element.addEventListener('dragover', props.onDragOver)
917
- }
918
-
919
- if (props.onDragLeave) {
920
- context.element.addEventListener('dragleave', props.onDragLeave)
921
- }
922
-
923
- if (props.onDrop) {
924
- context.element.addEventListener('drop', props.onDrop)
925
- }
926
-
927
- // Additional mouse events
928
- if (props.onDoubleClick) {
929
- context.element.addEventListener('dblclick', props.onDoubleClick)
930
- }
931
-
932
- if (props.onContextMenu) {
933
- context.element.addEventListener('contextmenu', props.onContextMenu)
934
- }
935
-
936
- // Focus events
937
- if (props.onFocus) {
938
- context.element.addEventListener('focus', () => props.onFocus(true))
939
- context.element.addEventListener('blur', () => props.onFocus(false))
940
- }
941
-
942
- if (props.onBlur) {
943
- context.element.addEventListener('blur', () => props.onBlur(false))
944
- }
945
-
946
- // Keyboard events
947
- if (props.onKeyPress) {
948
- context.element.addEventListener('keypress', props.onKeyPress)
949
- }
950
-
951
- if (props.onKeyDown) {
952
- context.element.addEventListener('keydown', props.onKeyDown)
953
- }
954
-
955
- if (props.onKeyUp) {
956
- context.element.addEventListener('keyup', props.onKeyUp)
957
- }
958
-
959
- // Scroll and wheel events
960
- if (props.onScroll) {
961
- context.element.addEventListener('scroll', props.onScroll, { passive: true })
962
- }
963
-
964
- if (props.onWheel) {
965
- context.element.addEventListener('wheel', props.onWheel, { passive: false })
966
- }
967
-
968
- // Input events
969
- if (props.onInput) {
970
- context.element.addEventListener('input', props.onInput)
971
- }
972
-
973
- if (props.onChange) {
974
- context.element.addEventListener('change', (event) => {
975
- const target = event.target as HTMLInputElement
976
- const value = target.value || target.textContent || ''
977
- props.onChange(value, event)
978
- })
979
- }
980
-
981
- // Clipboard events
982
- if (props.onCopy) {
983
- context.element.addEventListener('copy', props.onCopy)
984
- }
985
-
986
- if (props.onCut) {
987
- context.element.addEventListener('cut', props.onCut)
988
- }
989
-
990
- if (props.onPaste) {
991
- context.element.addEventListener('paste', props.onPaste)
992
- }
993
-
994
- // Selection events
995
- if (props.onSelect) {
996
- context.element.addEventListener('select', props.onSelect)
997
- }
998
-
999
- // Disabled state
1000
- if (props.disabled !== undefined) {
1001
- if (context.element instanceof HTMLElement) {
1002
- if (props.disabled) {
1003
- context.element.setAttribute('disabled', 'true')
1004
- context.element.style.pointerEvents = 'none'
1005
- context.element.style.opacity = '0.6'
1006
- } else {
1007
- context.element.removeAttribute('disabled')
1008
- context.element.style.pointerEvents = ''
1009
- context.element.style.opacity = ''
1010
- }
1011
- }
1012
- }
1013
-
1014
- // Draggable state
1015
- if (props.draggable !== undefined) {
1016
- if (context.element instanceof HTMLElement) {
1017
- context.element.draggable = props.draggable
1018
- }
1019
- }
1020
-
1021
- // Accessibility
1022
- if (props.accessibilityLabel) {
1023
- context.element.setAttribute('aria-label', props.accessibilityLabel)
1024
- }
1025
-
1026
- if (props.accessibilityHint) {
1027
- context.element.setAttribute('aria-describedby', props.accessibilityHint)
1028
- }
1029
-
1030
- // Advanced Gesture Modifiers (Phase 4 - Epic: Butternut)
1031
- if (props.onLongPressGesture) {
1032
- this.setupLongPressGesture(context.element, props.onLongPressGesture)
1033
- }
1034
-
1035
- if (props.keyboardShortcut) {
1036
- this.setupKeyboardShortcut(context.element, props.keyboardShortcut)
1037
- }
1038
-
1039
- if (props.focused !== undefined) {
1040
- this.setupFocusManagement(context.element, props.focused)
1041
- }
1042
-
1043
- if (props.focusable) {
1044
- this.setupFocusable(context.element, props.focusable)
1045
- }
1046
-
1047
- if (props.onContinuousHover) {
1048
- this.setupContinuousHover(context.element, props.onContinuousHover)
1049
- }
1050
-
1051
- if (props.allowsHitTesting !== undefined) {
1052
- this.setupHitTesting(context.element, props.allowsHitTesting)
1053
- }
1054
-
1055
- return undefined
1056
- }
1057
-
1058
- // Phase 4 Advanced Gesture Methods
1059
-
1060
- /**
1061
- * Setup long press gesture with timing and distance constraints
1062
- */
1063
- private setupLongPressGesture(
1064
- element: Element,
1065
- options: {
1066
- minimumDuration?: number
1067
- maximumDistance?: number
1068
- perform: () => void
1069
- onPressingChanged?: (isPressing: boolean) => void
1070
- }
1071
- ): void {
1072
- const minimumDuration = options.minimumDuration ?? 500 // ms
1073
- const maximumDistance = options.maximumDistance ?? 10 // px
1074
-
1075
- let timeoutId: number | undefined
1076
- let startPoint: { x: number; y: number } | null = null
1077
- let isPressing = false
1078
-
1079
- const cleanup = () => {
1080
- if (timeoutId) {
1081
- clearTimeout(timeoutId)
1082
- timeoutId = undefined
1083
- }
1084
- if (isPressing && options.onPressingChanged) {
1085
- options.onPressingChanged(false)
1086
- }
1087
- isPressing = false
1088
- startPoint = null
1089
- }
1090
-
1091
- const handlePointerDown = (event: Event) => {
1092
- const pointerEvent = event as PointerEvent
1093
- startPoint = { x: pointerEvent.clientX, y: pointerEvent.clientY }
1094
- isPressing = true
1095
-
1096
- if (options.onPressingChanged) {
1097
- options.onPressingChanged(true)
1098
- }
1099
-
1100
- timeoutId = window.setTimeout(() => {
1101
- if (isPressing && startPoint) {
1102
- options.perform()
1103
- cleanup()
1104
- }
1105
- }, minimumDuration)
1106
- }
1107
-
1108
- const handlePointerMove = (event: Event) => {
1109
- const pointerEvent = event as PointerEvent
1110
- if (!startPoint || !isPressing) return
1111
-
1112
- const distance = Math.sqrt(
1113
- Math.pow(pointerEvent.clientX - startPoint.x, 2) +
1114
- Math.pow(pointerEvent.clientY - startPoint.y, 2)
1115
- )
1116
-
1117
- if (distance > maximumDistance) {
1118
- cleanup()
1119
- }
1120
- }
1121
-
1122
- const handlePointerUp = () => {
1123
- cleanup()
1124
- }
1125
-
1126
- const handlePointerCancel = () => {
1127
- cleanup()
1128
- }
1129
-
1130
- // Use pointer events for better touch/mouse compatibility
1131
- element.addEventListener('pointerdown', handlePointerDown as EventListener)
1132
- element.addEventListener('pointermove', handlePointerMove as EventListener)
1133
- element.addEventListener('pointerup', handlePointerUp as EventListener)
1134
- element.addEventListener('pointercancel', handlePointerCancel as EventListener)
1135
-
1136
- // Store cleanup function for later removal
1137
- ;(element as any)._longPressCleanup = cleanup
1138
- }
1139
-
1140
- /**
1141
- * Setup keyboard shortcut handling
1142
- */
1143
- private setupKeyboardShortcut(
1144
- element: Element,
1145
- shortcut: {
1146
- key: string
1147
- modifiers?: ('cmd' | 'ctrl' | 'shift' | 'alt' | 'meta')[]
1148
- action: () => void
1149
- }
1150
- ): void {
1151
- const modifiers = shortcut.modifiers ?? []
1152
-
1153
- const handleKeyDown = (event: KeyboardEvent) => {
1154
- // Check if all required modifiers are pressed
1155
- const requiredModifiers = {
1156
- cmd: modifiers.includes('cmd') || modifiers.includes('meta'),
1157
- ctrl: modifiers.includes('ctrl'),
1158
- shift: modifiers.includes('shift'),
1159
- alt: modifiers.includes('alt')
1160
- }
1161
-
1162
- const actualModifiers = {
1163
- cmd: event.metaKey || event.ctrlKey, // Handle both Mac (meta) and PC (ctrl)
1164
- ctrl: event.ctrlKey,
1165
- shift: event.shiftKey,
1166
- alt: event.altKey
1167
- }
1168
-
1169
- // Check key match (case insensitive)
1170
- const keyMatches = event.key.toLowerCase() === shortcut.key.toLowerCase()
1171
-
1172
- // Check modifier requirements
1173
- const modifiersMatch = Object.entries(requiredModifiers).every(
1174
- ([mod, required]) => required === actualModifiers[mod as keyof typeof actualModifiers]
1175
- )
1176
-
1177
- if (keyMatches && modifiersMatch) {
1178
- event.preventDefault()
1179
- shortcut.action()
1180
- }
1181
- }
1182
-
1183
- // Add keyboard event listener to document for global shortcuts
1184
- document.addEventListener('keydown', handleKeyDown)
1185
-
1186
- // Store cleanup function
1187
- ;(element as any)._keyboardShortcutCleanup = () => {
1188
- document.removeEventListener('keydown', handleKeyDown)
1189
- }
1190
- }
1191
-
1192
- /**
1193
- * Setup focus management with reactive binding
1194
- */
1195
- private setupFocusManagement(element: Element, focused: boolean | Signal<boolean>): void {
1196
- if (!(element instanceof HTMLElement)) return
1197
-
1198
- const htmlElement = element as HTMLElement
1199
-
1200
- // Make element focusable if it's not naturally focusable
1201
- if (!htmlElement.hasAttribute('tabindex')) {
1202
- htmlElement.setAttribute('tabindex', '0')
1203
- }
1204
-
1205
- if (isSignal(focused) || isComputed(focused)) {
1206
- // Reactive focus management
1207
- createEffect(() => {
1208
- const shouldFocus = focused()
1209
- if (shouldFocus) {
1210
- htmlElement.focus()
1211
- } else {
1212
- htmlElement.blur()
1213
- }
1214
- })
1215
- } else {
1216
- // Static focus management
1217
- if (focused) {
1218
- htmlElement.focus()
1219
- }
1220
- }
1221
- }
1222
-
1223
- /**
1224
- * Setup focusable behavior
1225
- */
1226
- private setupFocusable(
1227
- element: Element,
1228
- options: {
1229
- isFocusable?: boolean
1230
- interactions?: ('activate' | 'edit')[]
1231
- }
1232
- ): void {
1233
- if (!(element instanceof HTMLElement)) return
1234
-
1235
- const htmlElement = element as HTMLElement
1236
-
1237
- if (options.isFocusable === false) {
1238
- htmlElement.setAttribute('tabindex', '-1')
1239
- } else {
1240
- if (!htmlElement.hasAttribute('tabindex')) {
1241
- htmlElement.setAttribute('tabindex', '0')
1242
- }
1243
- }
1244
-
1245
- // Setup interaction behaviors
1246
- if (options.interactions?.includes('activate')) {
1247
- htmlElement.addEventListener('keydown', (event) => {
1248
- if (event.key === 'Enter' || event.key === ' ') {
1249
- event.preventDefault()
1250
- htmlElement.click()
1251
- }
1252
- })
1253
- }
1254
-
1255
- if (options.interactions?.includes('edit')) {
1256
- htmlElement.setAttribute('role', 'textbox')
1257
- htmlElement.setAttribute('contenteditable', 'true')
1258
- }
1259
- }
1260
-
1261
- /**
1262
- * Setup continuous hover tracking with coordinates
1263
- */
1264
- private setupContinuousHover(
1265
- element: Element,
1266
- options: {
1267
- coordinateSpace?: 'local' | 'global'
1268
- perform: (location: { x: number; y: number } | null) => void
1269
- }
1270
- ): void {
1271
- const coordinateSpace = options.coordinateSpace ?? 'local'
1272
-
1273
- const handleMouseMove = (event: Event) => {
1274
- const mouseEvent = event as MouseEvent
1275
- let x: number, y: number
1276
-
1277
- if (coordinateSpace === 'local') {
1278
- const rect = element.getBoundingClientRect()
1279
- x = mouseEvent.clientX - rect.left
1280
- y = mouseEvent.clientY - rect.top
1281
- } else {
1282
- x = mouseEvent.clientX
1283
- y = mouseEvent.clientY
1284
- }
1285
-
1286
- options.perform({ x, y })
1287
- }
1288
-
1289
- const handleMouseLeave = () => {
1290
- options.perform(null)
1291
- }
1292
-
1293
- element.addEventListener('mousemove', handleMouseMove as EventListener)
1294
- element.addEventListener('mouseleave', handleMouseLeave as EventListener)
1295
-
1296
- // Store cleanup
1297
- ;(element as any)._continuousHoverCleanup = () => {
1298
- element.removeEventListener('mousemove', handleMouseMove as EventListener)
1299
- element.removeEventListener('mouseleave', handleMouseLeave as EventListener)
1300
- }
1301
- }
1302
-
1303
- /**
1304
- * Setup hit testing control
1305
- */
1306
- private setupHitTesting(element: Element, enabled: boolean): void {
1307
- if (element instanceof HTMLElement) {
1308
- element.style.pointerEvents = enabled ? '' : 'none'
1309
- }
1310
- }
1311
- }
1312
-
1313
- /**
1314
- * Animation modifier for transitions and animations
1315
- */
1316
- export class AnimationModifier extends BaseModifier {
1317
- readonly type = 'animation'
1318
- readonly priority = ModifierPriority.ANIMATION
1319
-
1320
- apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined {
1321
- if (!context.element) return
1322
-
1323
- const props = this.properties as any
1324
-
1325
- // Transition
1326
- if (props.transition) {
1327
- const t = props.transition
1328
- const property = t.property || 'all'
1329
- const duration = t.duration || 300
1330
- const easing = t.easing || 'ease'
1331
- const delay = t.delay || 0
1332
-
1333
- if (context.element instanceof HTMLElement) {
1334
- context.element.style.transition = `${property} ${duration}ms ${easing} ${delay}ms`
1335
- }
1336
- }
1337
-
1338
- // Animation
1339
- if (props.animation && context.element instanceof HTMLElement) {
1340
- const anim = props.animation
1341
-
1342
- if (anim.keyframes) {
1343
- // Create keyframes
1344
- const keyframeName = `tachui-animation-${context.componentId}-${Date.now()}`
1345
- const keyframeRule = this.createKeyframeRule(keyframeName, anim.keyframes)
1346
-
1347
- // Add keyframes to stylesheet
1348
- this.addKeyframesToStylesheet(keyframeRule)
1349
-
1350
- // Apply animation
1351
- const duration = anim.duration || 1000
1352
- const easing = anim.easing || 'ease'
1353
- const iterations = anim.iterations || 1
1354
- const direction = anim.direction || 'normal'
1355
-
1356
- context.element.style.animation = `${keyframeName} ${duration}ms ${easing} ${iterations} ${direction}`
1357
- }
1358
- }
1359
-
1360
- // Transform
1361
- if (props.transform && context.element instanceof HTMLElement) {
1362
- if (isSignal(props.transform) || isComputed(props.transform)) {
1363
- // Create reactive effect for transform
1364
- createEffect(() => {
1365
- const transformValue = props.transform()
1366
- if (context.element instanceof HTMLElement) {
1367
- context.element.style.transform = transformValue
1368
- }
1369
- })
1370
- } else {
1371
- context.element.style.transform = props.transform
1372
- }
1373
- }
1374
-
1375
- // Rotation Effect (SwiftUI .rotationEffect(angle))
1376
- if (props.rotationEffect && context.element instanceof HTMLElement) {
1377
- const { angle, anchor } = props.rotationEffect
1378
-
1379
- // Convert anchor to CSS transform-origin
1380
- const anchorOrigins: Record<string, string> = {
1381
- center: '50% 50%',
1382
- top: '50% 0%',
1383
- topLeading: '0% 0%',
1384
- topTrailing: '100% 0%',
1385
- bottom: '50% 100%',
1386
- bottomLeading: '0% 100%',
1387
- bottomTrailing: '100% 100%',
1388
- leading: '0% 50%',
1389
- trailing: '100% 50%',
1390
- }
1391
-
1392
- const transformOrigin = anchorOrigins[anchor || 'center'] || '50% 50%'
1393
-
1394
- // Create rotation transform
1395
- const rotationTransform = `rotate(${angle}deg)`
1396
-
1397
- if (isSignal(angle) || isComputed(angle)) {
1398
- // Reactive rotation
1399
- createEffect(() => {
1400
- const currentAngle = typeof angle === 'function' ? angle() : angle
1401
- const currentRotation = `rotate(${currentAngle}deg)`
1402
-
1403
- if (context.element instanceof HTMLElement) {
1404
- context.element.style.transformOrigin = transformOrigin
1405
-
1406
- // Combine with existing transforms if any
1407
- const existingTransform = context.element.style.transform || ''
1408
- const existingTransforms = existingTransform
1409
- .split(' ')
1410
- .filter((t) => t && !t.startsWith('rotate('))
1411
- .join(' ')
1412
-
1413
- const newTransform = existingTransforms
1414
- ? `${existingTransforms} ${currentRotation}`
1415
- : currentRotation
1416
-
1417
- context.element.style.transform = newTransform
1418
- }
1419
- })
1420
- } else {
1421
- // Static rotation
1422
- if (context.element instanceof HTMLElement) {
1423
- context.element.style.transformOrigin = transformOrigin
1424
-
1425
- // Combine with existing transforms if any
1426
- const existingTransform = context.element.style.transform || ''
1427
- const existingTransforms = existingTransform
1428
- .split(' ')
1429
- .filter((t) => t && !t.startsWith('rotate('))
1430
- .join(' ')
1431
-
1432
- const newTransform = existingTransforms
1433
- ? `${existingTransforms} ${rotationTransform}`
1434
- : rotationTransform
1435
-
1436
- context.element.style.transform = newTransform
1437
- }
1438
- }
1439
- }
1440
-
1441
- // Overlay modifier (SwiftUI .overlay())
1442
- if (props.overlay && context.element instanceof HTMLElement) {
1443
- this.applyOverlay(context.element, props.overlay, context)
1444
- }
1445
-
1446
- return undefined
1447
- }
1448
-
1449
- private applyOverlay(
1450
- element: HTMLElement,
1451
- overlay: { content: any; alignment?: string },
1452
- _context: ModifierContext
1453
- ): void {
1454
- const { content, alignment = 'center' } = overlay
1455
-
1456
- // Make the element a positioned container
1457
- if (element.style.position === '' || element.style.position === 'static') {
1458
- element.style.position = 'relative'
1459
- }
1460
-
1461
- // Create overlay container
1462
- const overlayContainer = document.createElement('div')
1463
- overlayContainer.style.position = 'absolute'
1464
- overlayContainer.style.pointerEvents = 'none' // Allow clicks to pass through by default
1465
-
1466
- // Apply alignment positioning
1467
- const alignmentStyles = this.getOverlayAlignment(alignment)
1468
- Object.assign(overlayContainer.style, alignmentStyles)
1469
-
1470
- // Render content
1471
- if (typeof content === 'function') {
1472
- // If content is a function, call it to get component
1473
- const contentComponent = content()
1474
- if (contentComponent && typeof contentComponent.render === 'function') {
1475
- const contentNode = contentComponent.render()
1476
- if (contentNode.element) {
1477
- overlayContainer.appendChild(contentNode.element)
1478
- }
1479
- }
1480
- } else if (content && typeof content.render === 'function') {
1481
- // If content is a component instance
1482
- const contentNode = content.render()
1483
- if (contentNode.element) {
1484
- overlayContainer.appendChild(contentNode.element)
1485
- }
1486
- } else if (content instanceof HTMLElement) {
1487
- // If content is already a DOM element
1488
- overlayContainer.appendChild(content)
1489
- }
1490
-
1491
- // Add overlay to the element
1492
- element.appendChild(overlayContainer)
1493
- }
1494
-
1495
- private getOverlayAlignment(alignment: string): Record<string, string> {
1496
- const alignments: Record<string, Record<string, string>> = {
1497
- center: {
1498
- top: '50%',
1499
- left: '50%',
1500
- transform: 'translate(-50%, -50%)',
1501
- },
1502
- top: {
1503
- top: '0',
1504
- left: '50%',
1505
- transform: 'translateX(-50%)',
1506
- },
1507
- bottom: {
1508
- bottom: '0',
1509
- left: '50%',
1510
- transform: 'translateX(-50%)',
1511
- },
1512
- leading: {
1513
- top: '50%',
1514
- left: '0',
1515
- transform: 'translateY(-50%)',
1516
- },
1517
- trailing: {
1518
- top: '50%',
1519
- right: '0',
1520
- transform: 'translateY(-50%)',
1521
- },
1522
- topLeading: {
1523
- top: '0',
1524
- left: '0',
1525
- },
1526
- topTrailing: {
1527
- top: '0',
1528
- right: '0',
1529
- },
1530
- bottomLeading: {
1531
- bottom: '0',
1532
- left: '0',
1533
- },
1534
- bottomTrailing: {
1535
- bottom: '0',
1536
- right: '0',
1537
- },
1538
- }
1539
-
1540
- return alignments[alignment] || alignments.center
1541
- }
1542
-
1543
- private createKeyframeRule(
1544
- name: string,
1545
- keyframes: Record<string, Record<string, string>>
1546
- ): string {
1547
- let rule = `@keyframes ${name} {\n`
1548
-
1549
- for (const [percentage, styles] of Object.entries(keyframes)) {
1550
- rule += ` ${percentage} {\n`
1551
- for (const [property, value] of Object.entries(styles)) {
1552
- const cssProperty = this.toCSSProperty(property)
1553
- rule += ` ${cssProperty}: ${value};\n`
1554
- }
1555
- rule += ` }\n`
1556
- }
1557
-
1558
- rule += '}'
1559
- return rule
1560
- }
1561
-
1562
- private addKeyframesToStylesheet(rule: string): void {
1563
- let stylesheet = document.querySelector('#tachui-animations') as HTMLStyleElement
1564
-
1565
- if (!stylesheet) {
1566
- stylesheet = document.createElement('style')
1567
- stylesheet.id = 'tachui-animations'
1568
- document.head.appendChild(stylesheet)
1569
- }
1570
-
1571
- stylesheet.appendChild(document.createTextNode(rule))
1572
- }
1573
- }
1574
-
1575
- /**
1576
- * Lifecycle modifier for component lifecycle events
1577
- */
1578
- export class LifecycleModifier extends BaseModifier {
1579
- readonly type = 'lifecycle'
1580
- readonly priority = ModifierPriority.CUSTOM
1581
-
1582
- private activeAbortController?: AbortController
1583
-
1584
- apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined {
1585
- if (!context.element) return
1586
-
1587
- const props = this.properties as LifecycleModifierProps
1588
-
1589
- // Clean up any existing tasks on re-application
1590
- if (this.activeAbortController) {
1591
- this.activeAbortController.abort()
1592
- }
1593
-
1594
- // Set up intersection observer for onAppear/onDisappear
1595
- if (props.onAppear || props.onDisappear) {
1596
- this.setupLifecycleObserver(context.element, props)
1597
- }
1598
-
1599
- // Set up async task with cancellation
1600
- if (props.task) {
1601
- this.setupTask(context, props.task)
1602
- }
1603
-
1604
- // Set up refreshable behavior
1605
- if (props.refreshable) {
1606
- this.setupRefreshable(context.element, props.refreshable)
1607
- }
1608
-
1609
- return undefined
1610
- }
1611
-
1612
- private setupLifecycleObserver(element: Element, props: LifecycleModifierProps): void {
1613
- const observer = new IntersectionObserver(
1614
- (entries) => {
1615
- entries.forEach((entry) => {
1616
- if (entry.isIntersecting && props.onAppear) {
1617
- // Element has appeared in viewport
1618
- props.onAppear()
1619
- } else if (!entry.isIntersecting && props.onDisappear) {
1620
- // Element has disappeared from viewport
1621
- props.onDisappear()
1622
- }
1623
- })
1624
- },
1625
- {
1626
- threshold: 0.1, // Trigger when 10% of element is visible
1627
- rootMargin: '10px', // Add some margin for better UX
1628
- }
1629
- )
1630
-
1631
- observer.observe(element)
1632
-
1633
- // Store cleanup function
1634
- this.addCleanup(() => {
1635
- observer.disconnect()
1636
- })
1637
- }
1638
-
1639
- private setupTask(_context: ModifierContext, task: LifecycleModifierProps['task']): void {
1640
- if (!task) return
1641
-
1642
- // Create abort controller for task cancellation
1643
- this.activeAbortController = new AbortController()
1644
- const { signal } = this.activeAbortController
1645
-
1646
- // Execute the task operation
1647
- const executeTask = async () => {
1648
- try {
1649
- if (signal.aborted) return
1650
-
1651
- const result = task.operation()
1652
-
1653
- // Handle both sync and async operations
1654
- if (result instanceof Promise) {
1655
- await result
1656
- }
1657
- } catch (error) {
1658
- if (signal.aborted) return
1659
- console.error('TachUI Task Error:', error)
1660
- }
1661
- }
1662
-
1663
- // Start task execution
1664
- executeTask()
1665
-
1666
- // Add cleanup to cancel task on component unmount
1667
- this.addCleanup(() => {
1668
- if (this.activeAbortController) {
1669
- this.activeAbortController.abort()
1670
- }
1671
- })
1672
- }
1673
-
1674
- private setupRefreshable(
1675
- element: Element,
1676
- refreshable: LifecycleModifierProps['refreshable']
1677
- ): void {
1678
- if (!refreshable) return
1679
-
1680
- let isRefreshing = false
1681
- let pullDistance = 0
1682
- let startY = 0
1683
-
1684
- const threshold = 70 // Pull threshold in pixels
1685
-
1686
- // Create refresh indicator element
1687
- const refreshIndicator = document.createElement('div')
1688
- refreshIndicator.style.cssText = `
1689
- position: absolute;
1690
- top: -50px;
1691
- left: 50%;
1692
- transform: translateX(-50%);
1693
- width: 30px;
1694
- height: 30px;
1695
- border: 2px solid #ccc;
1696
- border-top: 2px solid #007AFF;
1697
- border-radius: 50%;
1698
- animation: tachui-spin 1s linear infinite;
1699
- opacity: 0;
1700
- transition: opacity 0.3s ease;
1701
- z-index: 1000;
1702
- `
1703
-
1704
- // Add spinner animation
1705
- if (!document.querySelector('#tachui-refresh-styles')) {
1706
- const style = document.createElement('style')
1707
- style.id = 'tachui-refresh-styles'
1708
- style.textContent = `
1709
- @keyframes tachui-spin {
1710
- 0% { transform: translateX(-50%) rotate(0deg); }
1711
- 100% { transform: translateX(-50%) rotate(360deg); }
1712
- }
1713
- `
1714
- document.head.appendChild(style)
1715
- }
1716
-
1717
- const container = element.parentElement || element
1718
- if (container instanceof HTMLElement) {
1719
- container.style.position = 'relative'
1720
- container.appendChild(refreshIndicator)
1721
- }
1722
-
1723
- // Touch event handlers
1724
- const handleTouchStart = (e: TouchEvent) => {
1725
- if (isRefreshing) return
1726
- startY = e.touches[0].clientY
1727
- }
1728
-
1729
- const handleTouchMove = (e: TouchEvent) => {
1730
- if (isRefreshing) return
1731
-
1732
- const currentY = e.touches[0].clientY
1733
- pullDistance = Math.max(0, currentY - startY)
1734
-
1735
- if (pullDistance > 20) {
1736
- e.preventDefault() // Prevent default scrolling
1737
-
1738
- const progress = Math.min(pullDistance / threshold, 1)
1739
- refreshIndicator.style.opacity = String(progress * 0.8)
1740
- refreshIndicator.style.top = `${-50 + progress * 20}px`
1741
- }
1742
- }
1743
-
1744
- const handleTouchEnd = async () => {
1745
- if (isRefreshing || pullDistance < threshold) {
1746
- // Reset if threshold not met
1747
- refreshIndicator.style.opacity = '0'
1748
- refreshIndicator.style.top = '-50px'
1749
- pullDistance = 0
1750
- return
1751
- }
1752
-
1753
- // Trigger refresh
1754
- isRefreshing = true
1755
- refreshIndicator.style.opacity = '1'
1756
- refreshIndicator.style.top = '10px'
1757
-
1758
- try {
1759
- await refreshable.onRefresh()
1760
- } catch (error) {
1761
- console.error('TachUI Refresh Error:', error)
1762
- } finally {
1763
- isRefreshing = false
1764
- refreshIndicator.style.opacity = '0'
1765
- refreshIndicator.style.top = '-50px'
1766
- pullDistance = 0
1767
- }
1768
- }
1769
-
1770
- // Add event listeners with proper typing
1771
- element.addEventListener('touchstart', handleTouchStart as EventListener, { passive: false })
1772
- element.addEventListener('touchmove', handleTouchMove as EventListener, { passive: false })
1773
- element.addEventListener('touchend', handleTouchEnd as EventListener)
1774
-
1775
- // Cleanup
1776
- this.addCleanup(() => {
1777
- element.removeEventListener('touchstart', handleTouchStart as EventListener)
1778
- element.removeEventListener('touchmove', handleTouchMove as EventListener)
1779
- element.removeEventListener('touchend', handleTouchEnd as EventListener)
1780
-
1781
- if (refreshIndicator.parentElement) {
1782
- refreshIndicator.parentElement.removeChild(refreshIndicator)
1783
- }
1784
- })
1785
- }
1786
-
1787
- private addCleanup(cleanup: () => void): void {
1788
- // Store cleanup functions for proper disposal
1789
- if (!(this.properties as any)._cleanupFunctions) {
1790
- ;(this.properties as any)._cleanupFunctions = []
1791
- }
1792
- ;(this.properties as any)._cleanupFunctions.push(cleanup)
1793
- }
1794
- }
1795
-
1796
- /**
1797
- * Resizable modifier for making images resizable
1798
- * In SwiftUI, .resizable() allows images to be scaled to fit their container
1799
- */
1800
- export class ResizableModifier extends BaseModifier {
1801
- readonly type = 'resizable'
1802
- readonly priority = ModifierPriority.APPEARANCE
1803
-
1804
- apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined {
1805
- if (!context.element) return
1806
-
1807
- // For images, resizable means they can be scaled to fit their container
1808
- // This is typically achieved with object-fit: fill in CSS
1809
- if (context.element instanceof HTMLImageElement) {
1810
- context.element.style.objectFit = 'fill'
1811
- }
1812
-
1813
- return undefined
1814
- }
1815
- }