@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,104 +1,4169 @@
1
- import { BasicInput as o, BasicInputStyles as r, BasicInputUtils as i } from "./BasicInput.js";
2
- import { BaseGridComponent as a, EnhancedGrid as c, EnhancedGridRow as l, EnhancedLazyHGrid as m, EnhancedLazyVGrid as d, Grid as s, GridCSSGenerator as p, GridItem as S, GridRow as h, LazyHGrid as f, LazyVGrid as x } from "./Grid.js";
3
- import { Button as g, ButtonStyles as u, EnhancedButton as E, defaultButtonTheme as T } from "./Button.js";
4
- import { Divider as G, DividerStyles as H, DividerUtils as L, defaultDividerTheme as F } from "./Divider.js";
5
- import { BasicForm as U, BasicFormImplementation as k, BasicFormStyles as w, BasicFormValidation as M } from "./Form.js";
6
- import { EnhancedImage as C, Image as v, ImageContentModes as W, ImageStates as z, ImageUtils as D } from "./Image.js";
7
- import { Link as R, LinkUtils as b } from "./EnhancedLink.js";
8
- import { EnhancedList as j, For as q, ForEach as A, ForEachComponent as J, List as K, ListUtils as N } from "./List.js";
9
- import { Menu as Q, MenuStyles as X, MenuUtils as Y, defaultMenuTheme as _ } from "./Menu.js";
10
- import { EnhancedPicker as ee, Picker as te, PickerStyles as oe, PickerUtils as re } from "./Picker.js";
11
- import { EnhancedScrollView as ne, ScrollView as ae, ScrollViewUtils as ce } from "./ScrollView.js";
12
- import { EnhancedSection as me, Section as de, SectionStyles as se, SectionWithHeader as pe, SectionWithHeaderFooter as Se } from "./Section.js";
13
- import { Show as fe, Unless as xe, When as ye } from "./Show.js";
14
- import { Spacer as ue } from "./Spacer.js";
15
- import { Text as Te, TextFormat as Be, TextStyles as Ge, Typography as He } from "./Text.js";
16
- import { EnhancedToggle as Fe, Toggle as Ie, ToggleStyles as Ue, ToggleUtils as ke, ToggleWithLabel as we } from "./Toggle.js";
17
- import { H1 as Ve, H2 as Ce, H3 as ve, H4 as We, H5 as ze, H6 as De, HStack as Pe, HTML as Re, Layout as be, VStack as Ze, ZStack as je, createModifiableComponentFactory as qe, createReactiveWrapper as Ae, withModifierSupport as Je, withModifiers as Ke, wrapComponent as Ne } from "./wrapper.js";
1
+ import { b3 as ie, aX as le, aa as I, n as re, aW as ue, aN as he, aO as fe } from "../Spacer-BbteDQ9I.js";
2
+ import { D as Lt, G as Mt, F as Ot, B as Tt, t as zt, s as Dt, u as Ft, a1 as Gt, a2 as Pt, a3 as Vt, a4 as _t, a5 as Ht, a6 as jt, H as Nt, a7 as Bt, v as Wt, y as Ut, x as qt, z as Yt, a8 as Xt, L as Kt, J as Qt, q as Zt, o as Jt, T as ei, U as ti, V as ii, W as si, Z as ni, $ as ri, a0 as oi, r as ai, a9 as li, ab as ci } from "../Spacer-BbteDQ9I.js";
3
+ import { dg as me, dz as ge, d$ as se, bG as be, dR as d, dT as S, X as ye, dQ as Se } from "../concatenated-component-DPcl2TEO.js";
4
+ import { a as $, i as f, b as xe, h as ve, q as Ce } from "../scheduler-7SvC3a21.js";
5
+ import { r as we } from "../dom-bridge-Cx-s6Ihx.js";
6
+ import { S as $e } from "../ScrollView-h-6wYMAm.js";
7
+ import { D as pi, a as ui, b as hi, E as fi, c as mi, d as gi } from "../ScrollView-h-6wYMAm.js";
8
+ import { c as D } from "../effect-CytAc9em.js";
9
+ import "../context--zQFIImS.js";
10
+ var Ie = Object.defineProperty, ke = (r, e, t) => e in r ? Ie(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, F = (r, e, t) => ke(r, typeof e != "symbol" ? e + "" : e, t);
11
+ class Ee extends ge {
12
+ constructor(e) {
13
+ super({
14
+ selector: e,
15
+ mobileFirst: !0,
16
+ optimizeOutput: !0,
17
+ includeComments: !1,
18
+ generateMinified: !0
19
+ });
20
+ }
21
+ /**
22
+ * Generate responsive grid CSS that integrates with tachUI's modifier system
23
+ */
24
+ generateGridCSS(e) {
25
+ const t = {};
26
+ return Object.entries(e).forEach(([i, s]) => {
27
+ if (this.isResponsiveValue(s))
28
+ Object.entries(s).forEach(([n, o]) => {
29
+ t[n] || (t[n] = {});
30
+ const a = this.mapGridPropertyToCSS(i, o);
31
+ a && Object.assign(t[n], a);
32
+ });
33
+ else {
34
+ t.base || (t.base = {});
35
+ const n = this.mapGridPropertyToCSS(i, s);
36
+ n && Object.assign(t.base, n);
37
+ }
38
+ }), this.generateResponsiveCSS(t);
39
+ }
40
+ /**
41
+ * Map grid property names to CSS properties with appropriate value processing
42
+ */
43
+ mapGridPropertyToCSS(e, t) {
44
+ switch (e) {
45
+ case "columns":
46
+ return { "grid-template-columns": this.generateGridColumns(t) };
47
+ case "rows":
48
+ return { "grid-template-rows": this.generateGridRows(t) };
49
+ case "gap":
50
+ return { gap: this.normalizeSpacing(t) };
51
+ case "columnGap":
52
+ return { "column-gap": this.normalizeSpacing(t) };
53
+ case "rowGap":
54
+ return { "row-gap": this.normalizeSpacing(t) };
55
+ case "autoFlow":
56
+ return { "grid-auto-flow": t };
57
+ case "autoRows":
58
+ return { "grid-auto-rows": t };
59
+ case "autoColumns":
60
+ return { "grid-auto-columns": t };
61
+ case "templateAreas":
62
+ return { "grid-template-areas": t };
63
+ case "alignItems":
64
+ return { "align-items": t };
65
+ case "justifyItems":
66
+ return { "justify-items": t };
67
+ case "alignContent":
68
+ return { "align-content": t };
69
+ case "justifyContent":
70
+ return { "justify-content": t };
71
+ default:
72
+ return null;
73
+ }
74
+ }
75
+ /**
76
+ * Generate CSS grid-template-columns from GridItem configurations
77
+ */
78
+ generateGridColumns(e) {
79
+ return e.map((t) => {
80
+ switch (t.type) {
81
+ case "fixed":
82
+ return `${t.size}px`;
83
+ case "flexible":
84
+ const i = t.minimum || 0, s = t.maximum ? `${t.maximum}px` : "1fr";
85
+ return i > 0 ? `minmax(${i}px, ${s})` : "1fr";
86
+ case "adaptive":
87
+ const n = t.minimum, o = t.maximum ? `${t.maximum}px` : "1fr";
88
+ return `minmax(${n}px, ${o})`;
89
+ default:
90
+ return "1fr";
91
+ }
92
+ }).join(" ");
93
+ }
94
+ /**
95
+ * Generate CSS grid-template-rows from GridItem configurations
96
+ */
97
+ generateGridRows(e) {
98
+ return this.generateGridColumns(e);
99
+ }
100
+ /**
101
+ * Normalize spacing values to CSS
102
+ */
103
+ normalizeSpacing(e) {
104
+ return typeof e == "number" ? `${e}px` : e;
105
+ }
106
+ /**
107
+ * Check if a value is responsive (has breakpoint keys)
108
+ */
109
+ isResponsiveValue(e) {
110
+ return e && typeof e == "object" && !Array.isArray(e) && Object.keys(e).some((t) => ["base", "sm", "md", "lg", "xl", "xxl"].includes(t));
111
+ }
112
+ }
113
+ function ce(r) {
114
+ return me((e) => {
115
+ const t = `#${e}`;
116
+ return T.getCachedCSS(r, t);
117
+ });
118
+ }
119
+ class T {
120
+ /**
121
+ * Generate cache key from configuration
122
+ */
123
+ static generateCacheKey(e) {
124
+ return JSON.stringify(e, (t, i) => typeof i == "function" ? "[Function]" : i);
125
+ }
126
+ /**
127
+ * Get cached CSS or generate new if not cached
128
+ */
129
+ static getCachedCSS(e, t) {
130
+ const i = this.generateCacheKey(e);
131
+ if (this.cache.has(i)) {
132
+ this.hitCount++;
133
+ const a = this.cache.get(i);
134
+ return {
135
+ ...a,
136
+ mediaQueries: a.mediaQueries.map((l) => ({
137
+ ...l,
138
+ selector: t
139
+ }))
140
+ };
141
+ }
142
+ this.missCount++;
143
+ const n = new Ee(t).generateGridCSS(e), o = {
144
+ ...n,
145
+ mediaQueries: n.mediaQueries.map((a) => ({
146
+ ...a,
147
+ selector: ".cached-selector"
148
+ // Placeholder selector for caching
149
+ }))
150
+ };
151
+ if (this.cache.size >= this.maxCacheSize) {
152
+ const a = this.cache.keys().next().value;
153
+ a !== void 0 && this.cache.delete(a);
154
+ }
155
+ return this.cache.set(i, o), n;
156
+ }
157
+ /**
158
+ * Get cache statistics for performance monitoring
159
+ */
160
+ static getStats() {
161
+ return {
162
+ cacheSize: this.cache.size,
163
+ hitCount: this.hitCount,
164
+ missCount: this.missCount,
165
+ hitRate: this.hitCount / (this.hitCount + this.missCount) || 0
166
+ };
167
+ }
168
+ /**
169
+ * Clear cache (useful for testing or memory management)
170
+ */
171
+ static clearCache() {
172
+ this.cache.clear(), this.hitCount = 0, this.missCount = 0;
173
+ }
174
+ }
175
+ F(T, "cache", /* @__PURE__ */ new Map());
176
+ F(T, "maxCacheSize", 100);
177
+ F(T, "hitCount", 0);
178
+ F(T, "missCount", 0);
179
+ class de {
180
+ /**
181
+ * Convert legacy ResponsiveGridItemConfig to enhanced format
182
+ */
183
+ static convertLegacyConfig(e) {
184
+ const t = {};
185
+ return Object.entries(e).forEach(([i, s]) => {
186
+ s && (t[i] = s);
187
+ }), t;
188
+ }
189
+ /**
190
+ * Create responsive grid configuration from simple column/row definitions
191
+ */
192
+ static createResponsiveGridConfig(e) {
193
+ const t = {};
194
+ if (e.columns && (this.isLegacyResponsiveGridConfig(e.columns) ? t.columns = this.convertLegacyConfig(e.columns) : t.columns = e.columns), e.rows && (this.isLegacyResponsiveGridConfig(e.rows) ? t.rows = this.convertLegacyConfig(e.rows) : t.rows = e.rows), e.spacing)
195
+ if (this.isResponsiveValue(e.spacing)) {
196
+ const i = {};
197
+ Object.entries(e.spacing).forEach(([s, n]) => {
198
+ i[s] = this.normalizeSpacing(n);
199
+ }), t.gap = i;
200
+ } else
201
+ t.gap = { base: this.normalizeSpacing(e.spacing) };
202
+ if (e.alignment)
203
+ if (this.isResponsiveValue(e.alignment)) {
204
+ const i = {}, s = {};
205
+ Object.entries(e.alignment).forEach(([n, o]) => {
206
+ const { alignItems: a, justifyItems: l } = this.convertAlignment(o);
207
+ i[n] = a, s[n] = l;
208
+ }), t.alignItems = i, t.justifyItems = s;
209
+ } else {
210
+ const { alignItems: i, justifyItems: s } = this.convertAlignment(e.alignment);
211
+ t.alignItems = { base: i }, t.justifyItems = { base: s };
212
+ }
213
+ return t;
214
+ }
215
+ /**
216
+ * Convert GridAlignment to CSS alignment properties
217
+ */
218
+ static convertAlignment(e) {
219
+ const t = {
220
+ topLeading: { alignItems: "start", justifyItems: "start" },
221
+ top: { alignItems: "start", justifyItems: "center" },
222
+ topTrailing: { alignItems: "start", justifyItems: "end" },
223
+ leading: { alignItems: "center", justifyItems: "start" },
224
+ center: { alignItems: "center", justifyItems: "center" },
225
+ trailing: { alignItems: "center", justifyItems: "end" },
226
+ bottomLeading: { alignItems: "end", justifyItems: "start" },
227
+ bottom: { alignItems: "end", justifyItems: "center" },
228
+ bottomTrailing: { alignItems: "end", justifyItems: "end" }
229
+ };
230
+ return t[e] || t.center;
231
+ }
232
+ /**
233
+ * Normalize spacing values to CSS
234
+ */
235
+ static normalizeSpacing(e) {
236
+ if (typeof e == "number")
237
+ return `${e}px`;
238
+ if (typeof e == "string")
239
+ return e;
240
+ if (e && typeof e == "object") {
241
+ const t = e.horizontal ?? 0;
242
+ return `${e.vertical ?? 0}px ${t}px`;
243
+ }
244
+ return "0";
245
+ }
246
+ /**
247
+ * Check if value is a responsive value
248
+ */
249
+ static isResponsiveValue(e) {
250
+ return e && typeof e == "object" && !Array.isArray(e) && Object.keys(e).some((t) => ["base", "sm", "md", "lg", "xl", "xxl"].includes(t));
251
+ }
252
+ /**
253
+ * Check if value is legacy ResponsiveGridItemConfig
254
+ */
255
+ static isLegacyResponsiveGridConfig(e) {
256
+ return e && typeof e == "object" && !Array.isArray(e) && Object.keys(e).some((t) => ["base", "sm", "md", "lg", "xl", "xxl"].includes(t)) && Object.values(e).every((t) => Array.isArray(t));
257
+ }
258
+ }
259
+ class _ {
260
+ /**
261
+ * Enable/disable grid debugging
262
+ */
263
+ static setDebugMode(e) {
264
+ this.debugMode = e, e && console.log("🔍 tachUI Grid debugging enabled");
265
+ }
266
+ /**
267
+ * Register a grid instance for debugging
268
+ */
269
+ static registerGrid(e, t, i) {
270
+ this.debugMode && (this.instances.set(e, {
271
+ config: t,
272
+ selector: i,
273
+ timestamp: Date.now()
274
+ }), console.group(`🏗️ Grid registered: ${e}`), console.log("Configuration:", t), console.log("Selector:", i), console.log("Cache stats:", T.getStats()), console.groupEnd());
275
+ }
276
+ /**
277
+ * Log responsive grid performance metrics
278
+ */
279
+ static logPerformanceMetrics() {
280
+ if (!this.debugMode) return;
281
+ console.group("📊 Grid Performance Metrics");
282
+ const e = T.getStats();
283
+ console.log(`Cache efficiency: ${(e.hitRate * 100).toFixed(1)}%`), console.log(`Cache size: ${e.cacheSize}/100`), console.log(`Cache hits: ${e.hitCount}, misses: ${e.missCount}`), console.log(`Active grid instances: ${this.instances.size}`), console.groupEnd();
284
+ }
285
+ /**
286
+ * Visualize breakpoint behavior in browser console
287
+ */
288
+ static visualizeBreakpoints(e) {
289
+ this.debugMode && (console.group("📱 Responsive Grid Breakpoints"), e.columns && (console.log("Column configuration:"), Object.entries(e.columns).forEach(([t, i]) => {
290
+ const s = Array.isArray(i) ? i.map((n) => `${n.type}(${n.size || n.minimum || "auto"})`).join(" ") : String(i || "auto");
291
+ console.log(` ${t}: ${s}`);
292
+ })), e.gap && (console.log("Gap configuration:"), Object.entries(e.gap).forEach(([t, i]) => {
293
+ console.log(` ${t}: ${i}`);
294
+ })), console.groupEnd());
295
+ }
296
+ /**
297
+ * Get debugging information for all registered grids
298
+ */
299
+ static getDebugInfo() {
300
+ return {
301
+ debugMode: this.debugMode,
302
+ instances: Array.from(this.instances.entries()).map(([e, t]) => ({
303
+ id: e,
304
+ ...t,
305
+ age: Date.now() - t.timestamp
306
+ })),
307
+ cacheStats: T.getStats()
308
+ };
309
+ }
310
+ /**
311
+ * Clear debugging data
312
+ */
313
+ static clear() {
314
+ this.instances.clear(), T.clearCache(), this.debugMode && console.log("🧹 Grid debugging data cleared");
315
+ }
316
+ }
317
+ F(_, "debugMode", !1);
318
+ F(_, "instances", /* @__PURE__ */ new Map());
319
+ class J {
320
+ /**
321
+ * Enable performance monitoring
322
+ */
323
+ static enable() {
324
+ this.enabled = !0, console.log("⏱️ Grid performance monitoring enabled");
325
+ }
326
+ /**
327
+ * Disable performance monitoring
328
+ */
329
+ static disable() {
330
+ this.enabled = !1;
331
+ }
332
+ /**
333
+ * Start measuring a performance metric
334
+ */
335
+ static startMeasurement(e) {
336
+ if (!this.enabled) return () => {
337
+ };
338
+ const t = performance.now();
339
+ return () => {
340
+ const i = performance.now() - t;
341
+ this.measurements.has(e) || this.measurements.set(e, []), this.measurements.get(e).push(i), i > 10 && console.warn(`🐌 Slow grid operation: ${e} took ${i.toFixed(2)}ms`);
342
+ };
343
+ }
344
+ /**
345
+ * Get performance statistics
346
+ */
347
+ static getStats() {
348
+ const e = {};
349
+ for (const [t, i] of this.measurements) {
350
+ const s = i.length, n = i.reduce((u, c) => u + c, 0), o = n / s, a = Math.min(...i), l = Math.max(...i);
351
+ e[t] = {
352
+ count: s,
353
+ averageTime: Number(o.toFixed(2)),
354
+ minTime: Number(a.toFixed(2)),
355
+ maxTime: Number(l.toFixed(2)),
356
+ totalTime: Number(n.toFixed(2))
357
+ };
358
+ }
359
+ return e;
360
+ }
361
+ /**
362
+ * Log performance report
363
+ */
364
+ static logReport() {
365
+ if (!this.enabled) return;
366
+ console.group("📈 Grid Performance Report");
367
+ const e = this.getStats();
368
+ for (const [t, i] of Object.entries(e))
369
+ console.log(`${t}:`, i);
370
+ console.groupEnd();
371
+ }
372
+ /**
373
+ * Clear performance data
374
+ */
375
+ static clear() {
376
+ this.measurements.clear(), this.enabled && console.log("🧹 Grid performance data cleared");
377
+ }
378
+ }
379
+ F(J, "measurements", /* @__PURE__ */ new Map());
380
+ F(J, "enabled", !1);
381
+ var Ae = Object.defineProperty, Re = (r, e, t) => e in r ? Ae(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, v = (r, e, t) => Re(r, typeof e != "symbol" ? e + "" : e, t);
382
+ let Y = null;
383
+ const U = () => {
384
+ if (!Y)
385
+ try {
386
+ Y = require("../debug").debugManager;
387
+ } catch {
388
+ Y = {
389
+ isEnabled: () => !1,
390
+ logComponent: () => {
391
+ }
392
+ };
393
+ }
394
+ return Y;
395
+ };
396
+ class at {
397
+ /**
398
+ * Fixed-size grid column/row
399
+ */
400
+ static fixed(e, t) {
401
+ return {
402
+ type: "fixed",
403
+ size: e,
404
+ spacing: t
405
+ };
406
+ }
407
+ /**
408
+ * Flexible grid column/row with optional constraints
409
+ */
410
+ static flexible(e = 0, t) {
411
+ return {
412
+ type: "flexible",
413
+ minimum: e,
414
+ maximum: t
415
+ };
416
+ }
417
+ /**
418
+ * Adaptive grid column/row with minimum size
419
+ */
420
+ static adaptive(e, t) {
421
+ return {
422
+ type: "adaptive",
423
+ minimum: e,
424
+ maximum: t
425
+ };
426
+ }
427
+ /**
428
+ * Create spanning configuration for grid items (Phase 3)
429
+ */
430
+ static spanning(e) {
431
+ return e;
432
+ }
433
+ /**
434
+ * Create enhanced grid item with spanning support (Phase 3)
435
+ */
436
+ static withSpan(e, t) {
437
+ return {
438
+ ...e,
439
+ span: t
440
+ };
441
+ }
442
+ }
443
+ class y {
444
+ /**
445
+ * Generate CSS grid-template-columns from GridItem configurations
446
+ */
447
+ static generateColumns(e) {
448
+ return e.map((t) => {
449
+ switch (t.type) {
450
+ case "fixed":
451
+ return `${t.size}px`;
452
+ case "flexible":
453
+ const i = t.minimum || 0, s = t.maximum ? `${t.maximum}px` : "1fr";
454
+ return i > 0 ? `minmax(${i}px, ${s})` : "1fr";
455
+ case "adaptive":
456
+ const n = t.minimum, o = t.maximum ? `${t.maximum}px` : "1fr";
457
+ return `minmax(${n}px, ${o})`;
458
+ default:
459
+ return "1fr";
460
+ }
461
+ }).join(" ");
462
+ }
463
+ /**
464
+ * Generate CSS grid-template-rows from GridItem configurations
465
+ */
466
+ static generateRows(e) {
467
+ return this.generateColumns(e);
468
+ }
469
+ /**
470
+ * Generate responsive CSS for grid layouts
471
+ */
472
+ static generateResponsiveGridCSS(e, t) {
473
+ const i = {};
474
+ return e.base && (i[t] = t === "grid-template-columns" ? this.generateColumns(e.base) : this.generateRows(e.base)), Object.entries({
475
+ sm: "640px",
476
+ md: "768px",
477
+ lg: "1024px",
478
+ xl: "1280px",
479
+ xxl: "1536px"
480
+ }).forEach(([n, o]) => {
481
+ const a = e[n];
482
+ if (a) {
483
+ const l = `@media (min-width: ${o})`, u = t === "grid-template-columns" ? this.generateColumns(a) : this.generateRows(a);
484
+ i[l] || (i[l] = {});
485
+ const c = i[l];
486
+ i[l] = {
487
+ ...c,
488
+ [t]: u
489
+ };
490
+ }
491
+ }), i;
492
+ }
493
+ /**
494
+ * Convert spacing configuration to CSS gap values
495
+ */
496
+ static generateSpacing(e) {
497
+ if (typeof e == "number")
498
+ return `${e}px`;
499
+ if (e && typeof e == "object") {
500
+ const t = e.horizontal ?? 0;
501
+ return `${e.vertical ?? 0}px ${t}px`;
502
+ }
503
+ return "0";
504
+ }
505
+ /**
506
+ * Convert GridAlignment to CSS grid alignment properties
507
+ */
508
+ static generateAlignment(e) {
509
+ const t = {
510
+ topLeading: { justifyItems: "start", alignItems: "start" },
511
+ top: { justifyItems: "center", alignItems: "start" },
512
+ topTrailing: { justifyItems: "end", alignItems: "start" },
513
+ leading: { justifyItems: "start", alignItems: "center" },
514
+ center: { justifyItems: "center", alignItems: "center" },
515
+ trailing: { justifyItems: "end", alignItems: "center" },
516
+ bottomLeading: { justifyItems: "start", alignItems: "end" },
517
+ bottom: { justifyItems: "center", alignItems: "end" },
518
+ bottomTrailing: { justifyItems: "end", alignItems: "end" }
519
+ };
520
+ return t[e] || t.center;
521
+ }
522
+ /**
523
+ * Generate CSS for section header/footer styling (Phase 3)
524
+ */
525
+ static generateSectionHeaderCSS(e, t, i) {
526
+ const s = {
527
+ gridColumn: `1 / span ${i}`,
528
+ display: "flex",
529
+ alignItems: "center"
530
+ };
531
+ switch (e) {
532
+ case "sticky":
533
+ s.position = "sticky", s.top = t === "header" ? "0" : "auto", s.bottom = t === "footer" ? "0" : "auto", s.zIndex = "10", s.backgroundColor = "var(--background-color, white)";
534
+ break;
535
+ case "grouped":
536
+ s.padding = "12px 16px", s.backgroundColor = "var(--section-bg, #f8f9fa)", s.borderRadius = t === "header" ? "8px 8px 0 0" : "0 0 8px 8px";
537
+ break;
538
+ case "plain":
539
+ s.padding = "8px 0";
540
+ break;
541
+ case "automatic":
542
+ default:
543
+ s.padding = "12px 0", s.fontWeight = "600", s.fontSize = "1.1em", t === "footer" && (s.fontSize = "0.9em", s.fontWeight = "400", s.color = "var(--text-secondary, #6b7280)");
544
+ break;
545
+ }
546
+ return s;
547
+ }
548
+ /**
549
+ * Generate CSS animations for grid layout changes (Phase 3)
550
+ */
551
+ static generateGridAnimationCSS(e) {
552
+ const t = {};
553
+ if (e.layoutChanges) {
554
+ const i = typeof e.layoutChanges == "boolean" ? {} : e.layoutChanges, s = i.duration || 300, n = i.easing || "ease-out", o = i.delay || 0;
555
+ t.transition = `grid-template-columns ${s}ms ${n}${o > 0 ? ` ${o}ms` : ""}, grid-template-rows ${s}ms ${n}${o > 0 ? ` ${o}ms` : ""}`;
556
+ }
557
+ if (e.responsive) {
558
+ const i = typeof e.responsive == "boolean" ? {} : e.responsive, s = i.duration || 250, n = i.easing || "ease-out", o = i.delay || 0, a = `grid-template-columns ${s}ms ${n}${o > 0 ? ` ${o}ms` : ""}, grid-template-rows ${s}ms ${n}${o > 0 ? ` ${o}ms` : ""}, gap ${s}ms ${n}${o > 0 ? ` ${o}ms` : ""}`;
559
+ t.transition ? t.transition += `, ${a}` : t.transition = a;
560
+ }
561
+ return t;
562
+ }
563
+ /**
564
+ * Generate item entrance/exit animation keyframes (Phase 3)
565
+ */
566
+ static generateItemAnimationKeyframes(e, t) {
567
+ const i = `grid-item-${e}-${t}`;
568
+ let s = "";
569
+ switch (t) {
570
+ case "fade":
571
+ s = e === "enter" ? "from { opacity: 0; } to { opacity: 1; }" : "from { opacity: 1; } to { opacity: 0; }";
572
+ break;
573
+ case "scale":
574
+ s = e === "enter" ? "from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); }" : "from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.8); }";
575
+ break;
576
+ case "slide-up":
577
+ s = e === "enter" ? "from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); }" : "from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); }";
578
+ break;
579
+ case "slide-down":
580
+ s = e === "enter" ? "from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); }" : "from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(20px); }";
581
+ break;
582
+ case "slide-left":
583
+ s = e === "enter" ? "from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); }" : "from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-20px); }";
584
+ break;
585
+ case "slide-right":
586
+ s = e === "enter" ? "from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); }" : "from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(20px); }";
587
+ break;
588
+ }
589
+ return {
590
+ [`@keyframes ${i}`]: `{ ${s} }`,
591
+ [`--${i}-keyframes`]: i
592
+ };
593
+ }
594
+ /**
595
+ * Generate accessibility attributes for grid elements (Phase 3)
596
+ */
597
+ static generateAccessibilityAttributes(e, t, i, s) {
598
+ const n = {}, o = t === "grid" ? "grid" : "group", a = e.role || o;
599
+ if (n.role = a, e.label && (n["aria-label"] = e.label), e.description && (n["aria-describedby"] = e.description), e.screenReader !== !1) {
600
+ const l = typeof e.screenReader == "boolean" ? {} : e.screenReader || {};
601
+ l.announceStructure !== !1 && i !== void 0 && (n["aria-colcount"] = i), l.announceStructure !== !1 && s !== void 0 && (n["aria-rowcount"] = s);
602
+ }
603
+ if (e.keyboardNavigation !== !1) {
604
+ const l = typeof e.keyboardNavigation == "boolean" ? {} : e.keyboardNavigation || {};
605
+ l.enabled !== !1 && (n.tabIndex = 0, n["data-keyboard-navigation"] = l.mode || "grid", l.pageNavigation && (n["data-page-navigation"] = !0), l.homeEndNavigation && (n["data-home-end-navigation"] = !0));
606
+ }
607
+ if (e.focusManagement !== !1) {
608
+ const l = typeof e.focusManagement == "boolean" ? {} : e.focusManagement || {};
609
+ l.trapFocus && (n["data-focus-trap"] = !0), l.skipLinks && (n["data-skip-links"] = !0);
610
+ }
611
+ if (e.reducedMotion !== !1) {
612
+ const l = typeof e.reducedMotion == "boolean" ? {} : e.reducedMotion || {};
613
+ l.respectPreference !== !1 && (n["data-respect-reduced-motion"] = !0, n["data-reduced-motion-fallback"] = l.fallbackBehavior || "disable");
614
+ }
615
+ return n;
616
+ }
617
+ /**
618
+ * Generate reduced motion CSS based on user preferences (Phase 3)
619
+ */
620
+ static generateReducedMotionCSS(e) {
621
+ if (!e?.reducedMotion) return {};
622
+ const i = (typeof e.reducedMotion == "boolean" ? {} : e.reducedMotion).fallbackBehavior || "disable", s = {};
623
+ switch (i) {
624
+ case "disable":
625
+ s["@media (prefers-reduced-motion: reduce)"] = "{ transition: none !important; animation: none !important; }";
626
+ break;
627
+ case "reduce":
628
+ s["@media (prefers-reduced-motion: reduce)"] = "{ transition-duration: 0.1s !important; animation-duration: 0.1s !important; }";
629
+ break;
630
+ case "instant":
631
+ s["@media (prefers-reduced-motion: reduce)"] = "{ transition-duration: 0s !important; animation-duration: 0s !important; }";
632
+ break;
633
+ }
634
+ return s;
635
+ }
636
+ /**
637
+ * Generate advanced styling CSS for grid components (Phase 3)
638
+ */
639
+ static generateAdvancedStylingCSS(e) {
640
+ const t = {};
641
+ if (e.templateAreas && e.templateAreas.length > 0) {
642
+ const i = e.templateAreas.map((s) => `"${s}"`).join(" ");
643
+ t.gridTemplateAreas = i;
644
+ }
645
+ if (e.advancedGap && (e.advancedGap.row && (typeof e.advancedGap.row == "object" ? Object.entries(e.advancedGap.row).forEach(([i, s]) => {
646
+ const n = this.getMediaQueryForBreakpoint(i);
647
+ n && (t[n] = t[n] || "{}", t[n] = t[n].replace("}", ` row-gap: ${s}px; }`));
648
+ }) : t.rowGap = typeof e.advancedGap.row == "number" ? `${e.advancedGap.row}px` : e.advancedGap.row), e.advancedGap.column && (typeof e.advancedGap.column == "object" ? Object.entries(e.advancedGap.column).forEach(([i, s]) => {
649
+ const n = this.getMediaQueryForBreakpoint(i);
650
+ n && (t[n] = t[n] || "{}", t[n] = t[n].replace("}", ` column-gap: ${s}px; }`));
651
+ }) : t.columnGap = typeof e.advancedGap.column == "number" ? `${e.advancedGap.column}px` : e.advancedGap.column)), e.container) {
652
+ if (e.container.background)
653
+ if (typeof e.container.background == "string")
654
+ t.background = e.container.background;
655
+ else {
656
+ const i = e.container.background;
657
+ switch (i.pattern) {
658
+ case "dots":
659
+ t.background = `radial-gradient(circle, ${i.color || "#e0e0e0"} 1px, transparent 1px)`, t.backgroundSize = "20px 20px", i.opacity && (t.opacity = i.opacity.toString());
660
+ break;
661
+ case "lines":
662
+ t.background = `linear-gradient(90deg, ${i.color || "#e0e0e0"} 1px, transparent 1px), linear-gradient(${i.color || "#e0e0e0"} 1px, transparent 1px)`, t.backgroundSize = "20px 20px";
663
+ break;
664
+ case "grid":
665
+ t.background = `linear-gradient(to right, ${i.color || "#e0e0e0"} 1px, transparent 1px), linear-gradient(to bottom, ${i.color || "#e0e0e0"} 1px, transparent 1px)`, t.backgroundSize = "20px 20px";
666
+ break;
667
+ }
668
+ }
669
+ if (e.container.border && (t.border = e.container.border), e.container.borderRadius && (t.borderRadius = typeof e.container.borderRadius == "number" ? `${e.container.borderRadius}px` : e.container.borderRadius), e.container.boxShadow && (t.boxShadow = e.container.boxShadow), e.container.padding)
670
+ if (typeof e.container.padding == "object") {
671
+ const i = e.container.padding;
672
+ t.padding = `${i.top || 0} ${i.right || 0} ${i.bottom || 0} ${i.left || 0}`;
673
+ } else
674
+ t.padding = typeof e.container.padding == "number" ? `${e.container.padding}px` : e.container.padding;
675
+ }
676
+ if (e.debug && (e.debug === !0 || e.debug.enabled)) {
677
+ const i = typeof e.debug == "boolean" ? {} : e.debug, s = i.lineColor || "#ff0000";
678
+ if (i.showLines !== !1) {
679
+ const n = `linear-gradient(to right, ${s} 1px, transparent 1px), linear-gradient(to bottom, ${s} 1px, transparent 1px)`;
680
+ t.background && !t.background.includes("linear-gradient") ? t.background = `${n}, ${t.background}` : t.background = n, t.backgroundSize = "var(--grid-debug-size, 20px) var(--grid-debug-size, 20px)";
681
+ }
682
+ i.showAreas && (t.position = "relative", t["&::after"] = `{ content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient(45deg, transparent, transparent 10px, ${s}22 10px, ${s}22 20px); pointer-events: none; }`);
683
+ }
684
+ return t;
685
+ }
686
+ /**
687
+ * Generate item state CSS (hover, focus, active) (Phase 3)
688
+ */
689
+ static generateItemStateCSS(e) {
690
+ const t = {};
691
+ if (e.hover && e.hover.enabled !== !1) {
692
+ const i = e.hover, s = [];
693
+ switch (i.transform) {
694
+ case "scale":
695
+ s.push("transform: scale(1.05)");
696
+ break;
697
+ case "lift":
698
+ s.push("transform: translateY(-2px)", "box-shadow: 0 4px 8px rgba(0,0,0,0.12)");
699
+ break;
700
+ case "glow":
701
+ s.push("box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4)");
702
+ break;
703
+ case "highlight":
704
+ s.push("background-color: rgba(59, 130, 246, 0.1)");
705
+ break;
706
+ }
707
+ i.transition ? s.push(`transition: ${i.transition}`) : s.push("transition: all 0.2s ease"), i.customCSS && Object.entries(i.customCSS).forEach(([n, o]) => {
708
+ s.push(`${n}: ${o}`);
709
+ }), t["& > *:hover"] = `{ ${s.join("; ")} }`;
710
+ }
711
+ if (e.focus && e.focus.enabled !== !1) {
712
+ const i = e.focus, s = [];
713
+ switch (i.style) {
714
+ case "ring":
715
+ s.push(`box-shadow: 0 0 0 2px ${i.color || "#3b82f6"}`);
716
+ break;
717
+ case "outline":
718
+ s.push(`outline: 2px solid ${i.color || "#3b82f6"}`, "outline-offset: 2px");
719
+ break;
720
+ case "background":
721
+ s.push(`background-color: ${i.color || "rgba(59, 130, 246, 0.1)"}`);
722
+ break;
723
+ case "border":
724
+ s.push(`border: 2px solid ${i.color || "#3b82f6"}`);
725
+ break;
726
+ }
727
+ i.customCSS && Object.entries(i.customCSS).forEach(([n, o]) => {
728
+ s.push(`${n}: ${o}`);
729
+ }), t["& > *:focus"] = `{ ${s.join("; ")} }`;
730
+ }
731
+ if (e.active && e.active.enabled !== !1) {
732
+ const i = e.active, s = [];
733
+ switch (i.transform) {
734
+ case "scale":
735
+ s.push("transform: scale(0.95)");
736
+ break;
737
+ case "inset":
738
+ s.push("box-shadow: inset 0 2px 4px rgba(0,0,0,0.1)");
739
+ break;
740
+ case "darken":
741
+ s.push("filter: brightness(0.9)");
742
+ break;
743
+ }
744
+ i.customCSS && Object.entries(i.customCSS).forEach(([n, o]) => {
745
+ s.push(`${n}: ${o}`);
746
+ }), t["& > *:active"] = `{ ${s.join("; ")} }`;
747
+ }
748
+ return t;
749
+ }
750
+ /**
751
+ * Get media query for breakpoint (helper function)
752
+ */
753
+ static getMediaQueryForBreakpoint(e) {
754
+ return {
755
+ sm: "@media (min-width: 640px)",
756
+ md: "@media (min-width: 768px)",
757
+ lg: "@media (min-width: 1024px)",
758
+ xl: "@media (min-width: 1280px)",
759
+ xxl: "@media (min-width: 1536px)"
760
+ }[e] || null;
761
+ }
762
+ }
763
+ class Z extends ie {
764
+ constructor(e) {
765
+ super(), this.props = e, v(this, "type", "component"), v(this, "id"), v(this, "mounted", !1), v(this, "cleanup", []), v(this, "effectiveTag"), v(this, "validationResult"), this.id = `grid-section-${e.type}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
766
+ const t = `GridSection${e.type === "header" ? "Header" : "Footer"}`, i = se(t, "div", this.props.element);
767
+ this.effectiveTag = i.tag, this.validationResult = i.validation;
768
+ }
769
+ render() {
770
+ const { content: e, sectionId: t, type: i, style: s, debugLabel: n } = this.props, o = U();
771
+ o.logComponent(`GRID_SECTION_${i.toUpperCase()}`, n);
772
+ const a = [`tachui-grid-section-${i}`, ...o.isEnabled() ? ["tachui-debug"] : []], l = this.createClassString(this.props, a), c = y.generateSectionHeaderCSS(s, i, 12);
773
+ let p;
774
+ if (typeof e == "string")
775
+ p = [{
776
+ type: "element",
777
+ tag: "span",
778
+ props: {
779
+ className: `tachui-grid-section-${i}-text`,
780
+ children: [{ type: "text", text: e }]
781
+ }
782
+ }];
783
+ else {
784
+ const x = e.render();
785
+ p = Array.isArray(x) ? x : [x];
786
+ }
787
+ return [{
788
+ type: "element",
789
+ tag: this.effectiveTag,
790
+ props: {
791
+ className: l,
792
+ style: c,
793
+ "data-section-id": t,
794
+ "data-section-type": i,
795
+ // Add debug attributes
796
+ ...o.isEnabled() && {
797
+ "data-tachui-component": `GridSection${i === "header" ? "Header" : "Footer"}`,
798
+ ...n && { "data-tachui-label": n }
799
+ }
800
+ },
801
+ children: p,
802
+ // Add component metadata
803
+ componentMetadata: {
804
+ originalType: `GridSection${i === "header" ? "Header" : "Footer"}`,
805
+ overriddenTo: this.effectiveTag !== "div" ? this.effectiveTag : void 0,
806
+ validationResult: this.validationResult
807
+ }
808
+ }];
809
+ }
810
+ }
811
+ class ne extends ie {
812
+ constructor(e, t, i = []) {
813
+ super(), this.props = e, this.gridType = t, this.children = i, v(this, "type", "component"), v(this, "id"), v(this, "mounted", !1), v(this, "cleanup", []), v(this, "effectiveTag"), v(this, "validationResult"), this.id = `${t}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
814
+ const n = se(t === "grid" ? "Grid" : t === "lazy-vgrid" ? "LazyVGrid" : "LazyHGrid", "div", this.props.element);
815
+ this.effectiveTag = n.tag, this.validationResult = n.validation, this.setupLifecycleHooks(), we(this);
816
+ }
817
+ /**
818
+ * Generate animation styles for grid layout (Phase 3)
819
+ */
820
+ generateAnimationStyles(e) {
821
+ return e ? y.generateGridAnimationCSS(e) : {};
822
+ }
823
+ /**
824
+ * Apply item animations to child elements (Phase 3)
825
+ */
826
+ applyItemAnimations(e, t) {
827
+ if (!t?.itemChanges) return e;
828
+ const i = typeof t.itemChanges == "boolean" ? {} : t.itemChanges;
829
+ if (i.enter) {
830
+ const s = i.enter, n = s.duration || 250, o = s.easing || "ease-out", a = s.delay || 0;
831
+ return e.map((l, u) => {
832
+ if ("modifiers" in l && Array.isArray(l.modifiers)) {
833
+ const c = a + u * 50, p = be("all", n, o, c);
834
+ l.modifiers.push(p);
835
+ }
836
+ return l;
837
+ });
838
+ }
839
+ return e;
840
+ }
841
+ /**
842
+ * Generate accessibility attributes for grid (Phase 3)
843
+ */
844
+ generateAccessibilityAttributes(e, t, i) {
845
+ return e ? y.generateAccessibilityAttributes(e, this.gridType, t, i) : {};
846
+ }
847
+ /**
848
+ * Generate advanced styling CSS for grid (Phase 3)
849
+ */
850
+ generateStylingCSS(e) {
851
+ if (!e) return {};
852
+ const t = y.generateAdvancedStylingCSS(e);
853
+ if (e.itemStates) {
854
+ const i = y.generateItemStateCSS(e.itemStates);
855
+ Object.assign(t, i);
856
+ }
857
+ return t;
858
+ }
859
+ /**
860
+ * Handle keyboard navigation events (Phase 3)
861
+ */
862
+ setupKeyboardNavigation(e, t) {
863
+ if (!t?.keyboardNavigation) return;
864
+ const i = typeof t.keyboardNavigation == "boolean" ? {} : t.keyboardNavigation;
865
+ if (i.enabled === !1) return;
866
+ const s = i.mode || "grid", n = (o) => {
867
+ const a = o.target;
868
+ if (!e.contains(a)) return;
869
+ let l = !1;
870
+ switch (o.key) {
871
+ case "ArrowUp":
872
+ s === "grid" && (this.navigateGrid(e, "up"), l = !0);
873
+ break;
874
+ case "ArrowDown":
875
+ s === "grid" ? (this.navigateGrid(e, "down"), l = !0) : s === "list" && (this.navigateList(e, "next"), l = !0);
876
+ break;
877
+ case "ArrowLeft":
878
+ this.navigateGrid(e, "left"), l = !0;
879
+ break;
880
+ case "ArrowRight":
881
+ this.navigateGrid(e, "right"), l = !0;
882
+ break;
883
+ case "Home":
884
+ i.homeEndNavigation && (this.navigateToFirst(e), l = !0);
885
+ break;
886
+ case "End":
887
+ i.homeEndNavigation && (this.navigateToLast(e), l = !0);
888
+ break;
889
+ case "PageUp":
890
+ i.pageNavigation && (this.navigatePage(e, "up"), l = !0);
891
+ break;
892
+ case "PageDown":
893
+ i.pageNavigation && (this.navigatePage(e, "down"), l = !0);
894
+ break;
895
+ }
896
+ l && (o.preventDefault(), o.stopPropagation());
897
+ };
898
+ e.addEventListener("keydown", n), this.cleanup.push(() => {
899
+ e.removeEventListener("keydown", n);
900
+ });
901
+ }
902
+ /**
903
+ * Navigate within grid structure (Phase 3)
904
+ */
905
+ navigateGrid(e, t) {
906
+ const i = e.querySelectorAll('[tabindex="0"], button, input, select, textarea, [contenteditable]'), s = Array.from(i).indexOf(document.activeElement);
907
+ if (s === -1) return;
908
+ const o = getComputedStyle(e).gridTemplateColumns.split(" ").length;
909
+ let a = s;
910
+ switch (t) {
911
+ case "up":
912
+ a = Math.max(0, s - o);
913
+ break;
914
+ case "down":
915
+ a = Math.min(i.length - 1, s + o);
916
+ break;
917
+ case "left":
918
+ a = Math.max(0, s - 1);
919
+ break;
920
+ case "right":
921
+ a = Math.min(i.length - 1, s + 1);
922
+ break;
923
+ }
924
+ a !== s && i[a].focus();
925
+ }
926
+ /**
927
+ * Navigate in list mode (Phase 3)
928
+ */
929
+ navigateList(e, t) {
930
+ const i = e.querySelectorAll('[tabindex="0"], button, input, select, textarea, [contenteditable]'), s = Array.from(i).indexOf(document.activeElement);
931
+ if (s === -1) return;
932
+ const n = t === "next" ? Math.min(i.length - 1, s + 1) : Math.max(0, s - 1);
933
+ n !== s && i[n].focus();
934
+ }
935
+ /**
936
+ * Navigate to first/last elements (Phase 3)
937
+ */
938
+ navigateToFirst(e) {
939
+ const t = e.querySelectorAll('[tabindex="0"], button, input, select, textarea, [contenteditable]');
940
+ t.length > 0 && t[0].focus();
941
+ }
942
+ navigateToLast(e) {
943
+ const t = e.querySelectorAll('[tabindex="0"], button, input, select, textarea, [contenteditable]');
944
+ t.length > 0 && t[t.length - 1].focus();
945
+ }
946
+ /**
947
+ * Navigate by page (Phase 3)
948
+ */
949
+ navigatePage(e, t) {
950
+ const i = e.querySelectorAll('[tabindex="0"], button, input, select, textarea, [contenteditable]'), s = Array.from(i).indexOf(document.activeElement);
951
+ if (s === -1) return;
952
+ const n = 10, o = t === "down" ? Math.min(i.length - 1, s + n) : Math.max(0, s - n);
953
+ o !== s && i[o].focus();
954
+ }
955
+ setupLifecycleHooks() {
956
+ le(this, {
957
+ onDOMReady: (e, t) => {
958
+ this.children.forEach((i, s) => {
959
+ const n = i._enhancedLifecycle;
960
+ if (n && n.onDOMReady && !i.domReady)
961
+ try {
962
+ if (t) {
963
+ const o = this.findChildDOMElements(i, t, s);
964
+ if (o.length > 0) {
965
+ i.domElements = /* @__PURE__ */ new Map(), o.forEach((l, u) => {
966
+ const c = l.id || `element-${u}`;
967
+ i.domElements.set(c, l), i.primaryElement || (i.primaryElement = l);
968
+ }), i.domReady = !0;
969
+ const a = n.onDOMReady(
970
+ i.domElements,
971
+ i.primaryElement
972
+ );
973
+ if (typeof a == "function" && (i.cleanup = i.cleanup || [], i.cleanup.push(a)), n.onMount) {
974
+ const l = n.onMount();
975
+ typeof l == "function" && (i.cleanup = i.cleanup || [], i.cleanup.push(l));
976
+ }
977
+ }
978
+ }
979
+ } catch (o) {
980
+ console.error(`Error processing lifecycle hooks for child ${i.id}:`, o);
981
+ }
982
+ });
983
+ }
984
+ });
985
+ }
986
+ /**
987
+ * Find DOM elements for child components (reusing pattern from LayoutComponent)
988
+ */
989
+ findChildDOMElements(e, t, i) {
990
+ if (e.id.startsWith("image-")) {
991
+ const n = t.querySelectorAll("img.tachui-image");
992
+ return n[i] ? [n[i]] : Array.from(n);
993
+ }
994
+ if (e.id.startsWith("button-")) {
995
+ const n = t.querySelectorAll("button.tachui-button");
996
+ return n[i] ? [n[i]] : Array.from(n);
997
+ }
998
+ if (e.id.startsWith("text-")) {
999
+ const n = t.querySelectorAll("span.tachui-text, .tachui-text");
1000
+ return n[i] ? [n[i]] : Array.from(n);
1001
+ }
1002
+ const s = Array.from(t.children);
1003
+ return s[i] ? [s[i]] : s;
1004
+ }
1005
+ render() {
1006
+ throw new Error("BaseGridComponent.render() must be implemented by subclass");
1007
+ }
1008
+ }
1009
+ class Le extends ne {
1010
+ constructor(e, t = []) {
1011
+ super(e, "grid", t), this.props = e;
1012
+ }
1013
+ render() {
1014
+ const { alignment: e = "center", spacing: t, debugLabel: i, animations: s, accessibility: n, styling: o } = this.props, a = U();
1015
+ a.logComponent("GRID", i);
1016
+ const l = ["tachui-grid", ...a.isEnabled() ? ["tachui-debug"] : []], u = this.createClassString(this.props, l), p = this.applyItemAnimations(this.children, s).map((N) => {
1017
+ const G = N.render();
1018
+ return Array.isArray(G) ? G : [G];
1019
+ }).flat(), h = y.generateAlignment(e), x = y.generateSpacing(t), k = this.generateAnimationStyles(s), C = this.generateAccessibilityAttributes(n), m = y.generateReducedMotionCSS(n), H = this.generateStylingCSS(o), j = {
1020
+ display: "grid",
1021
+ gap: x,
1022
+ ...h,
1023
+ ...k,
1024
+ ...m,
1025
+ ...H
1026
+ };
1027
+ return [{
1028
+ type: "element",
1029
+ tag: this.effectiveTag,
1030
+ props: {
1031
+ className: u,
1032
+ style: j,
1033
+ ...C,
1034
+ // Add debug attributes
1035
+ ...a.isEnabled() && {
1036
+ "data-tachui-component": "Grid",
1037
+ ...i && { "data-tachui-label": i }
1038
+ }
1039
+ },
1040
+ children: p,
1041
+ // Add component metadata for semantic role processing
1042
+ componentMetadata: {
1043
+ originalType: "Grid",
1044
+ overriddenTo: this.effectiveTag !== "div" ? this.effectiveTag : void 0,
1045
+ validationResult: this.validationResult
1046
+ }
1047
+ }];
1048
+ }
1049
+ }
1050
+ class Me extends ie {
1051
+ constructor(e, t = []) {
1052
+ super(), this.props = e, this.children = t, v(this, "type", "component"), v(this, "id"), v(this, "mounted", !1), v(this, "cleanup", []), v(this, "effectiveTag"), v(this, "validationResult"), this.id = `gridrow-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1053
+ const i = se("GridRow", "div", this.props.element);
1054
+ this.effectiveTag = i.tag, this.validationResult = i.validation;
1055
+ }
1056
+ render() {
1057
+ const { debugLabel: e } = this.props, t = U();
1058
+ t.logComponent("GRIDROW", e);
1059
+ const i = ["tachui-gridrow", ...t.isEnabled() ? ["tachui-debug"] : []], s = this.createClassString(this.props, i), n = this.children.map((a) => {
1060
+ const l = a.render();
1061
+ return Array.isArray(l) ? l : [l];
1062
+ }).flat();
1063
+ return [{
1064
+ type: "element",
1065
+ tag: this.effectiveTag,
1066
+ props: {
1067
+ className: s,
1068
+ style: {
1069
+ display: "contents"
1070
+ // GridRow acts as a transparent container within CSS Grid
1071
+ },
1072
+ // Add debug attributes
1073
+ ...t.isEnabled() && {
1074
+ "data-tachui-component": "GridRow",
1075
+ ...e && { "data-tachui-label": e }
1076
+ }
1077
+ },
1078
+ children: n,
1079
+ // Add component metadata
1080
+ componentMetadata: {
1081
+ originalType: "GridRow",
1082
+ overriddenTo: this.effectiveTag !== "div" ? this.effectiveTag : void 0,
1083
+ validationResult: this.validationResult
1084
+ }
1085
+ }];
1086
+ }
1087
+ }
1088
+ class Oe extends ne {
1089
+ constructor(e, t = []) {
1090
+ super(e, "lazy-vgrid", t), this.props = e;
1091
+ }
1092
+ render() {
1093
+ const { columns: e, alignment: t = "center", spacing: i, debugLabel: s, responsive: n, sections: o, pinnedViews: a, animations: l, accessibility: u, styling: c } = this.props, p = U();
1094
+ p.logComponent("LAZYVGRID", s);
1095
+ const h = ["tachui-lazy-vgrid", ...p.isEnabled() ? ["tachui-debug"] : []], x = this.createClassString(this.props, h);
1096
+ let k;
1097
+ o && o.length > 0 ? k = this.renderSections(o, a) : k = this.applyItemAnimations(this.children, l).map((L) => {
1098
+ const g = L.render();
1099
+ return Array.isArray(g) ? g : [g];
1100
+ }).flat();
1101
+ let C, m = {
1102
+ display: "grid"
1103
+ };
1104
+ if (n) {
1105
+ const R = J.startMeasurement("responsive-css-generation");
1106
+ try {
1107
+ const g = { ...de.createResponsiveGridConfig({
1108
+ columns: e,
1109
+ spacing: i,
1110
+ alignment: t
1111
+ }), ...n };
1112
+ _.registerGrid(this.id, g, `#${this.id}`), _.visualizeBreakpoints(g);
1113
+ const M = ce(g);
1114
+ g.columns && typeof g.columns == "object" && "base" in g.columns && g.columns.base ? C = this.generateColumnsFromConfig(g.columns.base) : Array.isArray(e) ? C = y.generateColumns(e) : C = "1fr", m._responsiveModifier = M;
1115
+ } finally {
1116
+ R();
1117
+ }
1118
+ } else {
1119
+ const R = y.generateAlignment(t), L = y.generateSpacing(i);
1120
+ if (Array.isArray(e))
1121
+ C = y.generateColumns(e);
1122
+ else {
1123
+ const M = y.generateResponsiveGridCSS(e, "grid-template-columns")["grid-template-columns"];
1124
+ C = typeof M == "string" ? M : "1fr";
1125
+ }
1126
+ m = {
1127
+ ...m,
1128
+ gap: L,
1129
+ ...R
1130
+ };
1131
+ }
1132
+ m.gridTemplateColumns = C;
1133
+ const H = this.generateAnimationStyles(l);
1134
+ Object.assign(m, H);
1135
+ const j = this.getColumnCount(), q = this.generateAccessibilityAttributes(u, j), N = y.generateReducedMotionCSS(u);
1136
+ Object.assign(m, N);
1137
+ const G = this.generateStylingCSS(c);
1138
+ Object.assign(m, G);
1139
+ const ee = {
1140
+ type: "element",
1141
+ tag: this.effectiveTag,
1142
+ props: {
1143
+ className: x,
1144
+ style: m,
1145
+ ...q,
1146
+ // Add debug attributes
1147
+ ...p.isEnabled() && {
1148
+ "data-tachui-component": "LazyVGrid",
1149
+ ...s && { "data-tachui-label": s }
1150
+ }
1151
+ },
1152
+ children: k,
1153
+ // Add component metadata
1154
+ componentMetadata: {
1155
+ originalType: "LazyVGrid",
1156
+ overriddenTo: this.effectiveTag !== "div" ? this.effectiveTag : void 0,
1157
+ validationResult: this.validationResult,
1158
+ // Phase 2: Include responsive modifier for processing
1159
+ ...n && m._responsiveModifier && {
1160
+ responsiveModifier: m._responsiveModifier
1161
+ }
1162
+ }
1163
+ };
1164
+ return m._responsiveModifier && delete m._responsiveModifier, [ee];
1165
+ }
1166
+ /**
1167
+ * Render sectioned data with headers and footers (Phase 3)
1168
+ */
1169
+ renderSections(e, t) {
1170
+ const i = [], s = this.getColumnCount(), n = t?.includes("sectionHeaders"), o = t?.includes("sectionFooters");
1171
+ return e.forEach((a) => {
1172
+ if (a.header) {
1173
+ const l = a.headerStyle || (n ? "sticky" : "automatic"), c = new Z({
1174
+ content: a.header,
1175
+ sectionId: a.id,
1176
+ type: "header",
1177
+ style: l
1178
+ }).render();
1179
+ Array.isArray(c) && (c.forEach((p) => {
1180
+ p.props && p.props.style && (p.props.style.gridColumn = `1 / span ${s}`);
1181
+ }), i.push(...c));
1182
+ }
1183
+ if (a.items.forEach((l) => {
1184
+ const u = l.render(), c = Array.isArray(u) ? u : [u];
1185
+ i.push(...c);
1186
+ }), a.footer) {
1187
+ const l = a.footerStyle || (o ? "sticky" : "automatic"), c = new Z({
1188
+ content: a.footer,
1189
+ sectionId: a.id,
1190
+ type: "footer",
1191
+ style: l
1192
+ }).render();
1193
+ Array.isArray(c) && (c.forEach((p) => {
1194
+ p.props && p.props.style && (p.props.style.gridColumn = `1 / span ${s}`);
1195
+ }), i.push(...c));
1196
+ }
1197
+ }), i;
1198
+ }
1199
+ /**
1200
+ * Get the number of columns in the grid (Phase 3 helper)
1201
+ */
1202
+ getColumnCount() {
1203
+ const { columns: e } = this.props;
1204
+ if (Array.isArray(e))
1205
+ return e.length;
1206
+ if (typeof e == "object" && e !== null) {
1207
+ const t = e, i = t.base || t.sm || t.md || t.lg || t.xl || t.xxl;
1208
+ return Array.isArray(i) ? i.length : 1;
1209
+ }
1210
+ return 1;
1211
+ }
1212
+ /**
1213
+ * Generate columns from GridItemConfig array (Phase 2 helper)
1214
+ */
1215
+ generateColumnsFromConfig(e) {
1216
+ return e.map((t) => {
1217
+ switch (t.type) {
1218
+ case "fixed":
1219
+ return `${t.size}px`;
1220
+ case "flexible":
1221
+ const i = t.minimum || 0, s = t.maximum ? `${t.maximum}px` : "1fr";
1222
+ return i > 0 ? `minmax(${i}px, ${s})` : "1fr";
1223
+ case "adaptive":
1224
+ const n = t.minimum, o = t.maximum ? `${t.maximum}px` : "1fr";
1225
+ return `minmax(${n}px, ${o})`;
1226
+ default:
1227
+ return "1fr";
1228
+ }
1229
+ }).join(" ");
1230
+ }
1231
+ }
1232
+ class Te extends ne {
1233
+ constructor(e, t = []) {
1234
+ super(e, "lazy-hgrid", t), this.props = e;
1235
+ }
1236
+ render() {
1237
+ const { rows: e, alignment: t = "center", spacing: i, debugLabel: s, responsive: n, sections: o, pinnedViews: a, animations: l, accessibility: u, styling: c } = this.props, p = U();
1238
+ p.logComponent("LAZYHGRID", s);
1239
+ const h = ["tachui-lazy-hgrid", ...p.isEnabled() ? ["tachui-debug"] : []], x = this.createClassString(this.props, h);
1240
+ let k;
1241
+ o && o.length > 0 ? k = this.renderSections(o, a) : k = this.applyItemAnimations(this.children, l).map((L) => {
1242
+ const g = L.render();
1243
+ return Array.isArray(g) ? g : [g];
1244
+ }).flat();
1245
+ let C, m = {
1246
+ display: "grid",
1247
+ gridAutoFlow: "column",
1248
+ // Horizontal flow for LazyHGrid
1249
+ overflowX: "auto"
1250
+ // Enable horizontal scrolling
1251
+ };
1252
+ if (n) {
1253
+ const R = J.startMeasurement("responsive-css-generation");
1254
+ try {
1255
+ const g = { ...de.createResponsiveGridConfig({
1256
+ rows: e,
1257
+ spacing: i,
1258
+ alignment: t
1259
+ }), ...n };
1260
+ _.registerGrid(this.id, g, `#${this.id}`), _.visualizeBreakpoints(g);
1261
+ const M = ce(g);
1262
+ g.rows && typeof g.rows == "object" && "base" in g.rows && g.rows.base ? C = this.generateRowsFromConfig(g.rows.base) : Array.isArray(e) ? C = y.generateRows(e) : C = "auto", m._responsiveModifier = M;
1263
+ } finally {
1264
+ R();
1265
+ }
1266
+ } else {
1267
+ const R = y.generateAlignment(t), L = y.generateSpacing(i);
1268
+ if (Array.isArray(e))
1269
+ C = y.generateRows(e);
1270
+ else {
1271
+ const M = y.generateResponsiveGridCSS(e, "grid-template-rows")["grid-template-rows"];
1272
+ C = typeof M == "string" ? M : "auto";
1273
+ }
1274
+ m = {
1275
+ ...m,
1276
+ gap: L,
1277
+ ...R
1278
+ };
1279
+ }
1280
+ m.gridTemplateRows = C;
1281
+ const H = this.generateAnimationStyles(l);
1282
+ Object.assign(m, H);
1283
+ const j = this.getRowCount(), q = this.generateAccessibilityAttributes(u, void 0, j), N = y.generateReducedMotionCSS(u);
1284
+ Object.assign(m, N);
1285
+ const G = this.generateStylingCSS(c);
1286
+ Object.assign(m, G);
1287
+ const ee = {
1288
+ type: "element",
1289
+ tag: this.effectiveTag,
1290
+ props: {
1291
+ className: x,
1292
+ style: m,
1293
+ ...q,
1294
+ // Add debug attributes
1295
+ ...p.isEnabled() && {
1296
+ "data-tachui-component": "LazyHGrid",
1297
+ ...s && { "data-tachui-label": s }
1298
+ }
1299
+ },
1300
+ children: k,
1301
+ // Add component metadata
1302
+ componentMetadata: {
1303
+ originalType: "LazyHGrid",
1304
+ overriddenTo: this.effectiveTag !== "div" ? this.effectiveTag : void 0,
1305
+ validationResult: this.validationResult,
1306
+ // Phase 2: Include responsive modifier for processing
1307
+ ...n && m._responsiveModifier && {
1308
+ responsiveModifier: m._responsiveModifier
1309
+ }
1310
+ }
1311
+ };
1312
+ return m._responsiveModifier && delete m._responsiveModifier, [ee];
1313
+ }
1314
+ /**
1315
+ * Render sectioned data with headers and footers (Phase 3)
1316
+ */
1317
+ renderSections(e, t) {
1318
+ const i = [], s = this.getRowCount(), n = t?.includes("sectionHeaders"), o = t?.includes("sectionFooters");
1319
+ return e.forEach((a) => {
1320
+ if (a.header) {
1321
+ const l = a.headerStyle || (n ? "sticky" : "automatic"), c = new Z({
1322
+ content: a.header,
1323
+ sectionId: a.id,
1324
+ type: "header",
1325
+ style: l
1326
+ }).render();
1327
+ Array.isArray(c) && (c.forEach((p) => {
1328
+ p.props && p.props.style && (p.props.style.gridRow = `1 / span ${s}`, p.props.style.gridColumn = "auto");
1329
+ }), i.push(...c));
1330
+ }
1331
+ if (a.items.forEach((l) => {
1332
+ const u = l.render(), c = Array.isArray(u) ? u : [u];
1333
+ i.push(...c);
1334
+ }), a.footer) {
1335
+ const l = a.footerStyle || (o ? "sticky" : "automatic"), c = new Z({
1336
+ content: a.footer,
1337
+ sectionId: a.id,
1338
+ type: "footer",
1339
+ style: l
1340
+ }).render();
1341
+ Array.isArray(c) && (c.forEach((p) => {
1342
+ p.props && p.props.style && (p.props.style.gridRow = `1 / span ${s}`, p.props.style.gridColumn = "auto");
1343
+ }), i.push(...c));
1344
+ }
1345
+ }), i;
1346
+ }
1347
+ /**
1348
+ * Get the number of rows in the grid (Phase 3 helper)
1349
+ */
1350
+ getRowCount() {
1351
+ const { rows: e } = this.props;
1352
+ if (Array.isArray(e))
1353
+ return e.length;
1354
+ if (typeof e == "object" && e !== null) {
1355
+ const t = e, i = t.base || t.sm || t.md || t.lg || t.xl || t.xxl;
1356
+ return Array.isArray(i) ? i.length : 1;
1357
+ }
1358
+ return 1;
1359
+ }
1360
+ /**
1361
+ * Generate rows from GridItemConfig array (Phase 2 helper)
1362
+ */
1363
+ generateRowsFromConfig(e) {
1364
+ return e.map((t) => {
1365
+ switch (t.type) {
1366
+ case "fixed":
1367
+ return `${t.size}px`;
1368
+ case "flexible":
1369
+ const i = t.minimum || 0, s = t.maximum ? `${t.maximum}px` : "1fr";
1370
+ return i > 0 ? `minmax(${i}px, ${s})` : "1fr";
1371
+ case "adaptive":
1372
+ const n = t.minimum, o = t.maximum ? `${t.maximum}px` : "1fr";
1373
+ return `minmax(${n}px, ${o})`;
1374
+ default:
1375
+ return "auto";
1376
+ }
1377
+ }).join(" ");
1378
+ }
1379
+ }
1380
+ function lt(r = {}) {
1381
+ const { children: e = [], ...t } = r, i = new Le(t, e);
1382
+ return I(i);
1383
+ }
1384
+ function ct(r = [], e = {}) {
1385
+ const t = { ...e, children: r }, i = new Me(t, r);
1386
+ return I(i);
1387
+ }
1388
+ function dt(r) {
1389
+ const { children: e = [], ...t } = r, i = new Oe({ ...t, children: e }, e);
1390
+ return I(i);
1391
+ }
1392
+ function pt(r) {
1393
+ const { children: e = [], ...t } = r, i = new Te({ ...t, children: e }, e);
1394
+ return I(i);
1395
+ }
1396
+ var ze = Object.defineProperty, De = (r, e, t) => e in r ? ze(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, E = (r, e, t) => De(r, typeof e != "symbol" ? e + "" : e, t);
1397
+ class Fe {
1398
+ constructor(e) {
1399
+ this.props = e, E(this, "type", "component"), E(this, "id"), E(this, "mounted", !1), E(this, "cleanup", []), E(this, "formElement", null), E(this, "validationErrors"), E(this, "setValidationErrors"), E(this, "setIsValid"), E(this, "handleSubmit", async (n) => {
1400
+ if (n.preventDefault(), this.props.validateOnSubmit !== !1) {
1401
+ const o = this.validateForm();
1402
+ if (this.setValidationErrors(o), o.length > 0)
1403
+ return;
1404
+ }
1405
+ if (this.props.onSubmit) {
1406
+ const o = this.extractFormData();
1407
+ await this.props.onSubmit(o);
1408
+ }
1409
+ }), E(this, "handleChange", () => {
1410
+ if (this.props.validateOnChange) {
1411
+ const n = this.validateForm();
1412
+ this.setValidationErrors(n);
1413
+ }
1414
+ }), this.id = `form-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1415
+ const [t, i] = $([]), [, s] = $(!0);
1416
+ this.validationErrors = t, this.setValidationErrors = i, this.setIsValid = s, D(() => {
1417
+ const n = this.validationErrors(), o = n.length === 0;
1418
+ this.setIsValid(o), this.props.onValidationChange && this.props.onValidationChange(o, n);
1419
+ });
1420
+ }
1421
+ /**
1422
+ * Extract form data from form elements
1423
+ */
1424
+ extractFormData() {
1425
+ if (!this.formElement) return {};
1426
+ const e = new FormData(this.formElement), t = {};
1427
+ for (const [i, s] of e.entries())
1428
+ t[i] ? Array.isArray(t[i]) ? t[i].push(s) : t[i] = [t[i], s] : t[i] = s;
1429
+ return t;
1430
+ }
1431
+ /**
1432
+ * Validate all form fields
1433
+ */
1434
+ validateForm() {
1435
+ if (!this.formElement) return [];
1436
+ const e = [];
1437
+ return this.formElement.querySelectorAll("input, select, textarea").forEach((i) => {
1438
+ const s = i, n = s.name || s.id;
1439
+ s.checkValidity() || e.push({
1440
+ field: n,
1441
+ message: s.validationMessage,
1442
+ code: "html5_validation"
1443
+ }), s.hasAttribute("required") && !s.value.trim() && e.push({
1444
+ field: n,
1445
+ message: `${n} is required`,
1446
+ code: "required"
1447
+ });
1448
+ }), e;
1449
+ }
1450
+ /**
1451
+ * Get form styling based on style prop
1452
+ */
1453
+ getFormStyles() {
1454
+ const { style: e = "automatic", spacing: t = 16 } = this.props, i = {
1455
+ display: "flex",
1456
+ flexDirection: "column",
1457
+ gap: `${t}px`
1458
+ };
1459
+ switch (e) {
1460
+ case "grouped":
1461
+ return {
1462
+ ...i,
1463
+ backgroundColor: "#ffffff",
1464
+ border: "1px solid #e0e0e0",
1465
+ borderRadius: "12px",
1466
+ padding: "20px",
1467
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1468
+ };
1469
+ case "inset":
1470
+ return {
1471
+ ...i,
1472
+ backgroundColor: "#f8f9fa",
1473
+ border: "1px solid #e9ecef",
1474
+ borderRadius: "8px",
1475
+ padding: "16px",
1476
+ margin: "0 16px"
1477
+ };
1478
+ case "plain":
1479
+ return i;
1480
+ default:
1481
+ return {
1482
+ ...i,
1483
+ backgroundColor: "#ffffff",
1484
+ borderRadius: "8px",
1485
+ padding: "16px"
1486
+ };
1487
+ }
1488
+ }
1489
+ /**
1490
+ * Render validation summary
1491
+ */
1492
+ renderValidationSummary() {
1493
+ const e = this.validationErrors();
1494
+ return !this.props.showValidationSummary || e.length === 0 ? null : d(
1495
+ "div",
1496
+ {
1497
+ style: {
1498
+ backgroundColor: "#fff5f5",
1499
+ border: "1px solid #fed7d7",
1500
+ borderRadius: "6px",
1501
+ padding: "12px 16px",
1502
+ marginBottom: "16px"
1503
+ }
1504
+ },
1505
+ d(
1506
+ "div",
1507
+ {
1508
+ style: {
1509
+ fontSize: "14px",
1510
+ fontWeight: "600",
1511
+ color: "#e53e3e",
1512
+ marginBottom: "8px"
1513
+ }
1514
+ },
1515
+ S("Please fix the following errors:")
1516
+ ),
1517
+ d(
1518
+ "ul",
1519
+ {
1520
+ style: {
1521
+ margin: "0",
1522
+ paddingLeft: "20px",
1523
+ fontSize: "14px",
1524
+ color: "#c53030"
1525
+ }
1526
+ },
1527
+ ...e.map((t) => d("li", { key: t.field }, S(t.message)))
1528
+ )
1529
+ );
1530
+ }
1531
+ render() {
1532
+ const { children: e = [], accessibilityLabel: t, accessibilityRole: i = "form" } = this.props;
1533
+ return [
1534
+ d(
1535
+ "form",
1536
+ {
1537
+ ref: (s) => {
1538
+ this.formElement = s, s && !this.mounted && (s.addEventListener("submit", this.handleSubmit), s.addEventListener("change", this.handleChange), s.addEventListener("input", this.handleChange), this.cleanup.push(() => {
1539
+ s.removeEventListener("submit", this.handleSubmit), s.removeEventListener("change", this.handleChange), s.removeEventListener("input", this.handleChange);
1540
+ }), this.mounted = !0);
1541
+ },
1542
+ style: this.getFormStyles(),
1543
+ "aria-label": t,
1544
+ role: i,
1545
+ noValidate: !0
1546
+ // We handle validation manually
1547
+ },
1548
+ ...this.renderValidationSummary() !== null ? [this.renderValidationSummary()] : [],
1549
+ ...e.flatMap((s) => s.render())
1550
+ )
1551
+ ];
1552
+ }
1553
+ }
1554
+ function X(r, e = {}) {
1555
+ const t = { ...e, children: r }, i = new Fe(t);
1556
+ return I(i);
1557
+ }
1558
+ const ut = {
1559
+ /**
1560
+ * Automatic form styling (default)
1561
+ */
1562
+ Automatic(r, e = {}) {
1563
+ return X(r, { ...e, style: "automatic" });
1564
+ },
1565
+ /**
1566
+ * Grouped form with container styling
1567
+ */
1568
+ Grouped(r, e = {}) {
1569
+ return X(r, { ...e, style: "grouped" });
1570
+ },
1571
+ /**
1572
+ * Inset form styling
1573
+ */
1574
+ Inset(r, e = {}) {
1575
+ return X(r, { ...e, style: "inset" });
1576
+ },
1577
+ /**
1578
+ * Plain form without styling
1579
+ */
1580
+ Plain(r, e = {}) {
1581
+ return X(r, { ...e, style: "plain" });
1582
+ }
1583
+ }, ht = {
1584
+ /**
1585
+ * Common validation rules
1586
+ */
1587
+ rules: {
1588
+ // biome-ignore lint/suspicious/noExplicitAny: Validation rules accept any input type
1589
+ required: (r) => r != null && r !== "",
1590
+ email: (r) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r),
1591
+ minLength: (r) => (e) => e.length >= r,
1592
+ maxLength: (r) => (e) => e.length <= r,
1593
+ pattern: (r) => (e) => r.test(e),
1594
+ number: (r) => !Number.isNaN(Number(r)),
1595
+ integer: (r) => Number.isInteger(Number(r)),
1596
+ min: (r) => (e) => Number(e) >= r,
1597
+ max: (r) => (e) => Number(e) <= r
1598
+ },
1599
+ /**
1600
+ * Validate a single field
1601
+ */
1602
+ validateField(r, e) {
1603
+ for (const t of e) {
1604
+ const i = t(r);
1605
+ if (i !== !0)
1606
+ return {
1607
+ field: "field",
1608
+ message: typeof i == "string" ? i : "Validation failed",
1609
+ code: "custom_validation"
1610
+ };
1611
+ }
1612
+ return null;
1613
+ }
1614
+ };
1615
+ var Ge = Object.defineProperty, Pe = (r, e, t) => e in r ? Ge(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, te = (r, e, t) => Pe(r, typeof e != "symbol" ? e + "" : e, t);
1616
+ class oe {
1617
+ constructor(e) {
1618
+ te(this, "type", "component"), te(this, "id"), te(this, "props"), this.props = e, this.id = `enhanced-link-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1619
+ }
1620
+ resolveValue(e) {
1621
+ return f(e) ? e() : e;
1622
+ }
1623
+ getDestination() {
1624
+ const e = this.resolveValue(this.props.destination);
1625
+ return e instanceof URL ? e.toString() : e;
1626
+ }
1627
+ getTarget() {
1628
+ const e = this.resolveValue(this.props.target);
1629
+ if (e)
1630
+ return e;
1631
+ const t = this.resolveValue(this.props.destination), i = t instanceof URL ? t.toString() : t;
1632
+ return this.isExternalURL(i) ? "_blank" : "_self";
1633
+ }
1634
+ getRoutingMode() {
1635
+ return this.resolveValue(this.props.routingMode) || "auto";
1636
+ }
1637
+ getRel() {
1638
+ const e = this.resolveValue(this.props.rel), t = this.getTarget(), i = this.getDestination(), n = this.isExternalURL(i) && t === "_blank" ? "noopener noreferrer" : "";
1639
+ return e && n ? `${e} ${n}`.trim() : e || n;
1640
+ }
1641
+ getDownload() {
1642
+ return this.resolveValue(this.props.download);
1643
+ }
1644
+ isDisabled() {
1645
+ return this.resolveValue(this.props.disabled) || !1;
1646
+ }
1647
+ getAccessibilityLabel() {
1648
+ return this.resolveValue(this.props.accessibilityLabel);
1649
+ }
1650
+ getAccessibilityHint() {
1651
+ return this.resolveValue(this.props.accessibilityHint);
1652
+ }
1653
+ getAccessibilityRole() {
1654
+ return this.resolveValue(this.props.accessibilityRole);
1655
+ }
1656
+ shouldUseInternalRouting(e) {
1657
+ const t = this.getRoutingMode();
1658
+ return t === "internal" ? !0 : t === "external" ? !1 : t === "spa" ? !0 : !(this.isSpecialScheme(e) || this.isExternalURL(e));
1659
+ }
1660
+ isSpecialScheme(e) {
1661
+ return /^(mailto|tel|sms|ftp|file):/.test(e);
1662
+ }
1663
+ async handleClick(e) {
1664
+ if (this.isDisabled()) {
1665
+ e.preventDefault();
1666
+ return;
1667
+ }
1668
+ if (this.props.onPress)
1669
+ try {
1670
+ this.props.onPress(e);
1671
+ } catch (n) {
1672
+ console.error("Link onPress error:", n);
1673
+ }
1674
+ const t = this.getDestination();
1675
+ if (this.isSpecialScheme(t) || (e.preventDefault(), this.props.openURLAction && this.props.openURLAction(t) === "handled"))
1676
+ return;
1677
+ if (this.props.onBeforeNavigation)
1678
+ try {
1679
+ if (!await this.props.onBeforeNavigation(t))
1680
+ return;
1681
+ } catch (n) {
1682
+ throw console.error("Link onBeforeNavigation error:", n), n;
1683
+ }
1684
+ const i = this.getTarget(), s = this.getRoutingMode();
1685
+ if (this.shouldUseInternalRouting(t)) {
1686
+ if (this.props.onInternalNavigation)
1687
+ try {
1688
+ if (await this.props.onInternalNavigation(t))
1689
+ return;
1690
+ } catch (n) {
1691
+ console.error("Link onInternalNavigation error:", n);
1692
+ }
1693
+ s === "spa" ? this.handleSPANavigation(t) : i === "_blank" ? window.open(t, i) : window.location.href = t;
1694
+ } else
1695
+ i === "_blank" || i === "_top" || i === "_parent" ? window.open(t, i) : window.location.href = t;
1696
+ }
1697
+ handleSPANavigation(e) {
1698
+ typeof window < "u" && window.history && window.history.pushState ? (window.history.pushState(null, "", e), window.dispatchEvent(new PopStateEvent("popstate"))) : window.location.href = e;
1699
+ }
1700
+ isExternalURL(e) {
1701
+ try {
1702
+ return new URL(e, window.location.href).hostname !== window.location.hostname;
1703
+ } catch {
1704
+ return !1;
1705
+ }
1706
+ }
1707
+ renderContent() {
1708
+ if (this.props.label) {
1709
+ const n = this.props.label().render();
1710
+ return Array.isArray(n) ? n : [n];
1711
+ }
1712
+ if (this.props.children)
1713
+ return this.renderChildren();
1714
+ let e;
1715
+ this.props.text ? e = this.props.text : f(this.props.destination) ? e = xe(() => this.getDestination()) : e = this.getDestination();
1716
+ const i = re(e).render();
1717
+ return Array.isArray(i) ? i : [i];
1718
+ }
1719
+ renderChildren() {
1720
+ const { children: e } = this.props;
1721
+ return e ? Array.isArray(e) ? e.map((t) => this.renderChild(t)).flat() : this.renderChild(e) : [];
1722
+ }
1723
+ renderChild(e) {
1724
+ if (typeof e == "string") {
1725
+ const i = re(e).render();
1726
+ return Array.isArray(i) ? i : [i];
1727
+ } else {
1728
+ const t = e.render();
1729
+ return Array.isArray(t) ? t : [t];
1730
+ }
1731
+ }
1732
+ render() {
1733
+ const e = this.renderContent(), t = this.isDisabled(), i = {
1734
+ id: this.id,
1735
+ "data-component": "enhanced-link"
1736
+ };
1737
+ f(this.props.destination) ? i.href = () => this.getDestination() : i.href = this.getDestination(), this.props.target && (f(this.props.target) ? i.target = () => this.getTarget() : i.target = this.getTarget());
1738
+ const s = this.getRel();
1739
+ s && (f(this.props.rel) || f(this.props.target) ? i.rel = () => this.getRel() : i.rel = s);
1740
+ const n = this.getDownload();
1741
+ n !== void 0 && (f(this.props.download) ? i.download = () => this.getDownload() : n === !0 ? i.download = !0 : typeof n == "string" && (i.download = n));
1742
+ const o = this.getAccessibilityLabel();
1743
+ o && (f(this.props.accessibilityLabel) ? i["aria-label"] = () => this.getAccessibilityLabel() : i["aria-label"] = o);
1744
+ const a = this.getAccessibilityHint();
1745
+ a && (f(this.props.accessibilityHint) ? i["aria-describedby"] = () => this.getAccessibilityHint() : i["aria-describedby"] = a);
1746
+ const l = this.getAccessibilityRole();
1747
+ return l && (f(this.props.accessibilityRole) ? i.role = () => this.getAccessibilityRole() : i.role = l), t && (i["aria-disabled"] = "true", i.tabindex = "-1"), i.onclick = (c) => this.handleClick(c), i.style = {
1748
+ textDecoration: "none",
1749
+ color: "inherit",
1750
+ cursor: t ? "not-allowed" : "pointer",
1751
+ opacity: t ? 0.6 : 1
1752
+ }, d("a", i, ...e);
1753
+ }
1754
+ // Concatenation support
1755
+ concat(e) {
1756
+ const t = this.toSegment(), i = e.toSegment(), s = {
1757
+ totalSegments: 2,
1758
+ accessibilityRole: "composite",
1759
+ semanticStructure: "inline"
1760
+ };
1761
+ return new ye([t, i], s);
1762
+ }
1763
+ toSegment() {
1764
+ return {
1765
+ id: this.id,
1766
+ component: this,
1767
+ modifiers: [],
1768
+ render: () => this.render()
1769
+ };
1770
+ }
1771
+ isConcatenatable() {
1772
+ return !0;
1773
+ }
1774
+ }
1775
+ function ft(r, e) {
1776
+ if (e !== void 0) {
1777
+ const s = {
1778
+ text: r,
1779
+ destination: e
1780
+ }, n = new oe(s);
1781
+ return I(n);
1782
+ }
1783
+ const t = r, i = new oe(t);
1784
+ return I(i);
1785
+ }
1786
+ const P = {
1787
+ /**
1788
+ * Create an external link that opens in a new tab
1789
+ */
1790
+ external(r, e, t = {}) {
1791
+ return {
1792
+ destination: r,
1793
+ children: e,
1794
+ target: "_blank",
1795
+ routingMode: "external",
1796
+ rel: "noopener noreferrer external",
1797
+ accessibilityHint: "Opens in a new tab",
1798
+ ...t
1799
+ };
1800
+ },
1801
+ /**
1802
+ * Create an internal link for same-domain navigation
1803
+ */
1804
+ internal(r, e, t = {}) {
1805
+ return {
1806
+ destination: r,
1807
+ children: e,
1808
+ routingMode: "internal",
1809
+ target: "_self",
1810
+ ...t
1811
+ };
1812
+ },
1813
+ /**
1814
+ * Create a SPA link using History API
1815
+ */
1816
+ spa(r, e, t = {}) {
1817
+ return {
1818
+ destination: r,
1819
+ children: e,
1820
+ routingMode: "spa",
1821
+ target: "_self",
1822
+ accessibilityHint: "Navigates within the app",
1823
+ ...t
1824
+ };
1825
+ },
1826
+ /**
1827
+ * Create an email link with optional subject and body
1828
+ */
1829
+ email(r, e, t, i) {
1830
+ let s = `mailto:${r}`;
1831
+ const n = new URLSearchParams();
1832
+ return e && n.append("subject", e), t && n.append("body", t), n.toString() && (s += `?${n.toString()}`), {
1833
+ destination: s,
1834
+ children: i || r,
1835
+ accessibilityLabel: `Send email to ${r}`,
1836
+ accessibilityHint: "Opens your email app"
1837
+ };
1838
+ },
1839
+ /**
1840
+ * Create a phone link with formatted display
1841
+ */
1842
+ phone(r, e) {
1843
+ return {
1844
+ destination: `tel:${r.replace(/[^\d+]/g, "")}`,
1845
+ children: e || r,
1846
+ accessibilityLabel: `Call ${r}`,
1847
+ accessibilityHint: "Opens your phone app"
1848
+ };
1849
+ },
1850
+ /**
1851
+ * Create a download link
1852
+ */
1853
+ download(r, e, t) {
1854
+ return {
1855
+ destination: r,
1856
+ children: t || `Download ${e || "file"}`,
1857
+ download: e || !0,
1858
+ accessibilityLabel: `Download ${e || "file"}`,
1859
+ accessibilityHint: "Downloads file to your device"
1860
+ };
1861
+ },
1862
+ /**
1863
+ * Social media link utilities
1864
+ */
1865
+ social: {
1866
+ twitter(r, e) {
1867
+ return P.external(
1868
+ `https://twitter.com/${r}`,
1869
+ e || `@${r}`,
1870
+ { accessibilityLabel: `Visit ${r} on Twitter` }
1871
+ );
1872
+ },
1873
+ github(r, e) {
1874
+ return P.external(
1875
+ `https://github.com/${r}`,
1876
+ e || r,
1877
+ { accessibilityLabel: `Visit ${r} on GitHub` }
1878
+ );
1879
+ },
1880
+ linkedin(r, e) {
1881
+ return P.external(
1882
+ `https://linkedin.com/in/${r}`,
1883
+ e || r,
1884
+ { accessibilityLabel: `Visit ${r} on LinkedIn` }
1885
+ );
1886
+ },
1887
+ instagram(r, e) {
1888
+ return P.external(
1889
+ `https://instagram.com/${r}`,
1890
+ e || `@${r}`,
1891
+ { accessibilityLabel: `Visit ${r} on Instagram` }
1892
+ );
1893
+ },
1894
+ facebook(r, e) {
1895
+ return P.external(
1896
+ `https://facebook.com/${r}`,
1897
+ e || r,
1898
+ { accessibilityLabel: `Visit ${r} on Facebook` }
1899
+ );
1900
+ }
1901
+ },
1902
+ /**
1903
+ * App store link utilities
1904
+ */
1905
+ appStore: {
1906
+ ios(r, e) {
1907
+ return P.external(
1908
+ `https://apps.apple.com/app/id${r}`,
1909
+ e || "Download from App Store",
1910
+ {
1911
+ accessibilityLabel: "Download from the iOS App Store",
1912
+ accessibilityHint: "Opens App Store app or website"
1913
+ }
1914
+ );
1915
+ },
1916
+ android(r, e) {
1917
+ return P.external(
1918
+ `https://play.google.com/store/apps/details?id=${r}`,
1919
+ e || "Get it on Google Play",
1920
+ {
1921
+ accessibilityLabel: "Download from Google Play Store",
1922
+ accessibilityHint: "Opens Google Play Store app or website"
1923
+ }
1924
+ );
1925
+ }
1926
+ },
1927
+ /**
1928
+ * Create a custom OpenURL action
1929
+ */
1930
+ openURLAction(r) {
1931
+ return (e) => r(e) ? "handled" : "systemAction";
1932
+ }
1933
+ };
1934
+ var Ve = Object.defineProperty, _e = (r, e, t) => e in r ? Ve(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, b = (r, e, t) => _e(r, typeof e != "symbol" ? e + "" : e, t);
1935
+ class He {
1936
+ constructor(e) {
1937
+ this.props = e, b(this, "type", "component"), b(this, "id"), b(this, "mounted", !1), b(this, "cleanup", []), b(this, "dataSignal"), b(this, "setData"), b(this, "sectionsSignal"), b(this, "setSections"), b(this, "selectedItemsSignal"), b(this, "setSelectedItems"), b(this, "isLoadingSignal"), b(this, "setIsLoading"), b(this, "virtualItems", []), b(this, "visibleStartIndex", 0), b(this, "visibleEndIndex", 0), b(this, "scrollOffset", 0), b(this, "containerHeight", 0), b(this, "totalHeight", 0), b(this, "handleListScroll", (p) => {
1938
+ this.scrollOffset = p.offset.y, this.containerHeight = p.containerSize.height, this.props.virtualScrolling?.enabled && this.calculateVisibleRange(), this.props.onLoadMore && p.edges.bottom && (f(this.props.hasMore) ? this.props.hasMore() : this.props.hasMore) && !this.isLoadingSignal() && (this.setIsLoading(!0), this.props.onLoadMore().finally(() => {
1939
+ this.setIsLoading(!1);
1940
+ })), this.props.onScroll && this.props.onScroll(p);
1941
+ }), this.id = `list-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1942
+ const [t, i] = $(this.resolveData());
1943
+ this.dataSignal = t, this.setData = i;
1944
+ const [s, n] = $(this.resolveSections());
1945
+ this.sectionsSignal = s, this.setSections = n;
1946
+ const o = /* @__PURE__ */ new Set(), [a, l] = $(o);
1947
+ this.selectedItemsSignal = a, this.setSelectedItems = l;
1948
+ const [u, c] = $(this.resolveIsLoading());
1949
+ this.isLoadingSignal = u, this.setIsLoading = c, this.setupReactiveUpdates(), e.virtualScrolling?.enabled && this.initializeVirtualScrolling();
1950
+ }
1951
+ /**
1952
+ * Helper to flatten render results
1953
+ */
1954
+ flattenRenderResult(e) {
1955
+ return Array.isArray(e) ? e : [e];
1956
+ }
1957
+ /**
1958
+ * Resolve data from various input types
1959
+ */
1960
+ resolveData() {
1961
+ const { data: e } = this.props;
1962
+ return Array.isArray(e) ? e : f(e) ? e() : [];
1963
+ }
1964
+ /**
1965
+ * Resolve sections from various input types
1966
+ */
1967
+ resolveSections() {
1968
+ const { sections: e } = this.props;
1969
+ return Array.isArray(e) ? e : f(e) ? e() : [];
1970
+ }
1971
+ /**
1972
+ * Resolve loading state
1973
+ */
1974
+ resolveIsLoading() {
1975
+ const { isLoading: e } = this.props;
1976
+ return typeof e == "boolean" ? e : f(e) ? e() : !1;
1977
+ }
1978
+ /**
1979
+ * Set up reactive updates for data and state
1980
+ */
1981
+ setupReactiveUpdates() {
1982
+ if (f(this.props.data)) {
1983
+ const e = D(() => {
1984
+ this.setData(this.resolveData()), this.updateVirtualScrolling();
1985
+ });
1986
+ this.cleanup.push(() => e.dispose());
1987
+ }
1988
+ if (f(this.props.sections)) {
1989
+ const e = D(() => {
1990
+ this.setSections(this.resolveSections()), this.updateVirtualScrolling();
1991
+ });
1992
+ this.cleanup.push(() => e.dispose());
1993
+ }
1994
+ if (f(this.props.isLoading)) {
1995
+ const e = D(() => {
1996
+ this.setIsLoading(this.resolveIsLoading());
1997
+ });
1998
+ this.cleanup.push(() => e.dispose());
1999
+ }
2000
+ if (this.props.selectedItems) {
2001
+ const e = D(() => {
2002
+ this.props.selectedItems && this.setSelectedItems(this.props.selectedItems());
2003
+ });
2004
+ this.cleanup.push(() => e.dispose());
2005
+ }
2006
+ }
2007
+ /**
2008
+ * Initialize virtual scrolling calculations
2009
+ */
2010
+ initializeVirtualScrolling() {
2011
+ const e = this.dataSignal(), i = this.props.virtualScrolling.estimatedItemHeight || 50;
2012
+ this.virtualItems = e.map((s, n) => ({
2013
+ index: n,
2014
+ height: i,
2015
+ offset: n * i,
2016
+ item: s
2017
+ })), this.totalHeight = e.length * i;
2018
+ }
2019
+ /**
2020
+ * Update virtual scrolling calculations
2021
+ */
2022
+ updateVirtualScrolling() {
2023
+ this.props.virtualScrolling?.enabled && (this.initializeVirtualScrolling(), this.calculateVisibleRange());
2024
+ }
2025
+ /**
2026
+ * Calculate visible item range for virtual scrolling
2027
+ */
2028
+ calculateVisibleRange() {
2029
+ if (!this.props.virtualScrolling?.enabled) return;
2030
+ const e = this.props.virtualScrolling, t = e.overscan || 5, i = e.threshold || 0;
2031
+ let s = 0;
2032
+ for (let o = 0; o < this.virtualItems.length; o++)
2033
+ if (this.virtualItems[o].offset + this.virtualItems[o].height > this.scrollOffset - i) {
2034
+ s = Math.max(0, o - t);
2035
+ break;
2036
+ }
2037
+ let n = this.virtualItems.length - 1;
2038
+ for (let o = s; o < this.virtualItems.length; o++)
2039
+ if (this.virtualItems[o].offset > this.scrollOffset + this.containerHeight + i) {
2040
+ n = Math.min(this.virtualItems.length - 1, o + t);
2041
+ break;
2042
+ }
2043
+ this.visibleStartIndex = s, this.visibleEndIndex = n;
2044
+ }
2045
+ /**
2046
+ * Handle item selection
2047
+ */
2048
+ handleItemSelection(e, t) {
2049
+ const { selectionMode: i, getItemId: s, onSelectionChange: n } = this.props;
2050
+ if (i === "none") return;
2051
+ const o = s ? s(e, t) : t, a = new Set(this.selectedItemsSignal());
2052
+ i === "single" ? (a.clear(), a.add(o)) : i === "multiple" && (a.has(o) ? a.delete(o) : a.add(o)), this.setSelectedItems(a), n && n(a);
2053
+ }
2054
+ /**
2055
+ * Create list item component
2056
+ */
2057
+ createListItem(e, t, i) {
2058
+ const { renderItem: s, style: n, onItemTap: o, onItemLongPress: a } = this.props, l = s(e, t);
2059
+ return {
2060
+ type: "component",
2061
+ id: `${this.id}-item-${t}`,
2062
+ mounted: !1,
2063
+ cleanup: [],
2064
+ props: {},
2065
+ render: () => {
2066
+ const u = d(
2067
+ "div",
2068
+ {
2069
+ class: `tachui-list-item tachui-list-item-${n || "plain"}`,
2070
+ style: {
2071
+ display: "flex",
2072
+ flexDirection: "column",
2073
+ position: "relative",
2074
+ backgroundColor: i ? "#e6f3ff" : "transparent",
2075
+ transition: "background-color 0.2s ease",
2076
+ cursor: o ? "pointer" : "default"
2077
+ }
2078
+ },
2079
+ ...this.flattenRenderResult(l.render())
2080
+ );
2081
+ if (u.element) {
2082
+ const c = u.element;
2083
+ if (o && c.addEventListener("click", () => o(e, t)), a) {
2084
+ let p;
2085
+ const h = () => {
2086
+ p = setTimeout(() => a(e, t), 500);
2087
+ }, x = () => {
2088
+ clearTimeout(p);
2089
+ };
2090
+ c.addEventListener("mousedown", h), c.addEventListener("mouseup", x), c.addEventListener("mouseleave", x), c.addEventListener("touchstart", h), c.addEventListener("touchend", x);
2091
+ }
2092
+ this.props.selectionMode !== "none" && c.addEventListener("click", (p) => {
2093
+ (p.metaKey || p.ctrlKey || this.props.selectionMode === "multiple") && (p.preventDefault(), this.handleItemSelection(e, t));
2094
+ });
2095
+ }
2096
+ return [u];
2097
+ }
2098
+ };
2099
+ }
2100
+ /**
2101
+ * Create list separator
2102
+ */
2103
+ createSeparator() {
2104
+ const { separator: e } = this.props;
2105
+ return e ? typeof e == "object" && "render" in e ? e : {
2106
+ type: "component",
2107
+ id: `${this.id}-separator`,
2108
+ mounted: !1,
2109
+ cleanup: [],
2110
+ props: {},
2111
+ render: () => [
2112
+ d("div", {
2113
+ class: "tachui-list-separator",
2114
+ style: {
2115
+ height: "1px",
2116
+ backgroundColor: "#e0e0e0",
2117
+ margin: "0 16px"
2118
+ }
2119
+ })
2120
+ ]
2121
+ } : null;
2122
+ }
2123
+ /**
2124
+ * Create section header
2125
+ */
2126
+ createSectionHeader(e, t) {
2127
+ return e.header ? typeof e.header == "string" ? {
2128
+ type: "component",
2129
+ id: `${this.id}-section-header-${t}`,
2130
+ mounted: !1,
2131
+ cleanup: [],
2132
+ props: {},
2133
+ render: () => [
2134
+ d(
2135
+ "div",
2136
+ {
2137
+ class: "tachui-list-section-header",
2138
+ style: {
2139
+ padding: "8px 16px",
2140
+ backgroundColor: "#f8f9fa",
2141
+ fontWeight: "600",
2142
+ fontSize: "14px",
2143
+ color: "#666",
2144
+ textTransform: "uppercase",
2145
+ letterSpacing: "0.5px"
2146
+ }
2147
+ },
2148
+ e.header
2149
+ )
2150
+ ]
2151
+ } : this.props.renderSectionHeader ? this.props.renderSectionHeader(e, t) : e.header : null;
2152
+ }
2153
+ /**
2154
+ * Create section footer
2155
+ */
2156
+ createSectionFooter(e, t) {
2157
+ return e.footer ? typeof e.footer == "string" ? {
2158
+ type: "component",
2159
+ id: `${this.id}-section-footer-${t}`,
2160
+ mounted: !1,
2161
+ cleanup: [],
2162
+ props: {},
2163
+ render: () => [
2164
+ d(
2165
+ "div",
2166
+ {
2167
+ class: "tachui-list-section-footer",
2168
+ style: {
2169
+ padding: "8px 16px",
2170
+ fontSize: "12px",
2171
+ color: "#999"
2172
+ }
2173
+ },
2174
+ e.footer
2175
+ )
2176
+ ]
2177
+ } : this.props.renderSectionFooter ? this.props.renderSectionFooter(e, t) : e.footer : null;
2178
+ }
2179
+ /**
2180
+ * Create empty state component
2181
+ */
2182
+ createEmptyState() {
2183
+ const { emptyState: e } = this.props;
2184
+ return e || {
2185
+ type: "component",
2186
+ id: `${this.id}-empty`,
2187
+ mounted: !1,
2188
+ cleanup: [],
2189
+ props: {},
2190
+ render: () => [
2191
+ d(
2192
+ "div",
2193
+ {
2194
+ class: "tachui-list-empty",
2195
+ style: {
2196
+ display: "flex",
2197
+ flexDirection: "column",
2198
+ alignItems: "center",
2199
+ justifyContent: "center",
2200
+ padding: "40px 20px",
2201
+ color: "#999",
2202
+ fontSize: "16px"
2203
+ }
2204
+ },
2205
+ "No items to display"
2206
+ )
2207
+ ]
2208
+ };
2209
+ }
2210
+ /**
2211
+ * Create loading indicator
2212
+ */
2213
+ createLoadingIndicator() {
2214
+ const { loadingIndicator: e } = this.props;
2215
+ return e || {
2216
+ type: "component",
2217
+ id: `${this.id}-loading`,
2218
+ mounted: !1,
2219
+ cleanup: [],
2220
+ props: {},
2221
+ render: () => [
2222
+ d(
2223
+ "div",
2224
+ {
2225
+ class: "tachui-list-loading",
2226
+ style: {
2227
+ display: "flex",
2228
+ alignItems: "center",
2229
+ justifyContent: "center",
2230
+ padding: "20px",
2231
+ color: "#999"
2232
+ }
2233
+ },
2234
+ "Loading..."
2235
+ )
2236
+ ]
2237
+ };
2238
+ }
2239
+ /**
2240
+ * Render virtual scrolling content
2241
+ */
2242
+ renderVirtualContent() {
2243
+ if (!this.props.virtualScrolling?.enabled)
2244
+ return this.renderRegularContent();
2245
+ const e = this.dataSignal(), t = this.selectedItemsSignal(), i = this.createSeparator(), s = [];
2246
+ if (this.visibleStartIndex > 0) {
2247
+ const n = this.virtualItems[this.visibleStartIndex]?.offset || 0;
2248
+ s.push({
2249
+ type: "component",
2250
+ id: `${this.id}-spacer-top`,
2251
+ mounted: !1,
2252
+ cleanup: [],
2253
+ props: {},
2254
+ render: () => [
2255
+ d("div", {
2256
+ style: { height: `${n}px` }
2257
+ })
2258
+ ]
2259
+ });
2260
+ }
2261
+ for (let n = this.visibleStartIndex; n <= this.visibleEndIndex && n < e.length; n++) {
2262
+ const o = e[n], a = this.props.getItemId ? this.props.getItemId(o, n) : n, l = t.has(a);
2263
+ s.push(this.createListItem(o, n, l)), i && n < e.length - 1 && s.push(i);
2264
+ }
2265
+ if (this.visibleEndIndex < e.length - 1) {
2266
+ const n = this.totalHeight - (this.virtualItems[this.visibleEndIndex + 1]?.offset || 0);
2267
+ s.push({
2268
+ type: "component",
2269
+ id: `${this.id}-spacer-bottom`,
2270
+ mounted: !1,
2271
+ cleanup: [],
2272
+ props: {},
2273
+ render: () => [
2274
+ d("div", {
2275
+ style: { height: `${n}px` }
2276
+ })
2277
+ ]
2278
+ });
2279
+ }
2280
+ return s;
2281
+ }
2282
+ /**
2283
+ * Render regular (non-virtual) content
2284
+ */
2285
+ renderRegularContent() {
2286
+ const e = this.dataSignal(), t = this.sectionsSignal(), i = this.selectedItemsSignal(), s = this.createSeparator(), n = [];
2287
+ return t.length > 0 ? t.forEach((o, a) => {
2288
+ const l = this.createSectionHeader(o, a);
2289
+ l && n.push(l), o.items.forEach((c, p) => {
2290
+ const h = a * 1e3 + p, x = this.props.getItemId ? this.props.getItemId(c, h) : h, k = i.has(x);
2291
+ n.push(this.createListItem(c, h, k)), s && p < o.items.length - 1 && n.push(s);
2292
+ });
2293
+ const u = this.createSectionFooter(o, a);
2294
+ u && n.push(u);
2295
+ }) : e.forEach((o, a) => {
2296
+ const l = this.props.getItemId ? this.props.getItemId(o, a) : a, u = i.has(l);
2297
+ n.push(this.createListItem(o, a, u)), s && a < e.length - 1 && n.push(s);
2298
+ }), n;
2299
+ }
2300
+ /**
2301
+ * Render the list component
2302
+ */
2303
+ render() {
2304
+ const e = this.dataSignal(), t = this.isLoadingSignal();
2305
+ if (t && e.length === 0) {
2306
+ const o = this.createLoadingIndicator();
2307
+ return o ? o.render() : [];
2308
+ }
2309
+ if (e.length === 0 && !t) {
2310
+ const o = this.createEmptyState();
2311
+ return o ? o.render() : [];
2312
+ }
2313
+ const i = this.props.virtualScrolling?.enabled ? this.renderVirtualContent() : this.renderRegularContent();
2314
+ if (t && e.length > 0) {
2315
+ const o = this.createLoadingIndicator();
2316
+ o && i.push(o);
2317
+ }
2318
+ const s = {
2319
+ ...this.props,
2320
+ children: i,
2321
+ onScroll: this.handleListScroll
2322
+ };
2323
+ return new $e(s).render();
2324
+ }
2325
+ }
2326
+ class pe {
2327
+ constructor(e) {
2328
+ b(this, "type", "component"), b(this, "id"), b(this, "mounted", !1), b(this, "cleanup", []), b(this, "props"), b(this, "dataSignal"), this.props = {
2329
+ ...e,
2330
+ renderItem: e.children,
2331
+ children: void 0
2332
+ // ComponentProps children
2333
+ }, this.id = `foreach-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.dataSignal = f(e.data) ? e.data : () => e.data;
2334
+ }
2335
+ /**
2336
+ * Helper to flatten render results
2337
+ */
2338
+ flattenRenderResult(e) {
2339
+ return Array.isArray(e) ? e : [e];
2340
+ }
2341
+ /**
2342
+ * Render children for current data
2343
+ */
2344
+ renderChildren() {
2345
+ return this.dataSignal().flatMap((t, i) => {
2346
+ const s = this.props.renderItem(t, i);
2347
+ return (Array.isArray(s) ? s : [s]).flatMap((o) => this.flattenRenderResult(o.render()));
2348
+ });
2349
+ }
2350
+ /**
2351
+ * Render ForEach with reactive container pattern like Show component
2352
+ */
2353
+ render() {
2354
+ if (!(f(this.props.data) || ve(this.props.data)))
2355
+ return this.renderChildren();
2356
+ const t = {
2357
+ type: "element",
2358
+ tag: "div",
2359
+ props: {
2360
+ style: { display: "contents" }
2361
+ // Make container invisible
2362
+ },
2363
+ children: [],
2364
+ dispose: void 0
2365
+ }, i = Ce(() => {
2366
+ const n = D(() => {
2367
+ const o = this.renderChildren();
2368
+ t.children = o, t.element && t.element instanceof HTMLElement && this.updateContainerDOM(t.element, o);
2369
+ });
2370
+ return () => n.dispose();
2371
+ });
2372
+ t.dispose = i;
2373
+ const s = this.renderChildren();
2374
+ return t.children = s, [t];
2375
+ }
2376
+ /**
2377
+ * Update the container DOM element with new children using TachUI's renderer
2378
+ */
2379
+ updateContainerDOM(e, t) {
2380
+ e.innerHTML = "";
2381
+ const i = new Se();
2382
+ t.forEach((s) => {
2383
+ try {
2384
+ const n = i.render(s);
2385
+ n && e.appendChild(n);
2386
+ } catch (n) {
2387
+ console.error("Error rendering ForEach component child:", n);
2388
+ }
2389
+ });
2390
+ }
2391
+ /**
2392
+ * Cleanup resources
2393
+ */
2394
+ dispose() {
2395
+ this.cleanup.forEach((e) => {
2396
+ try {
2397
+ e();
2398
+ } catch (t) {
2399
+ console.error("ForEach component cleanup error:", t);
2400
+ }
2401
+ }), this.cleanup = [];
2402
+ }
2403
+ }
2404
+ function K(r) {
2405
+ const e = new He(r);
2406
+ return I(e);
2407
+ }
2408
+ function mt(r) {
2409
+ return new pe(r);
2410
+ }
2411
+ function gt(r) {
2412
+ const e = {
2413
+ data: r.each,
2414
+ children: r.children,
2415
+ key: r.key,
2416
+ ref: r.ref
2417
+ };
2418
+ return new pe(e);
2419
+ }
2420
+ const bt = {
2421
+ /**
2422
+ * Create a simple list from array
2423
+ */
2424
+ simple(r, e, t = {}) {
2425
+ return K({
2426
+ ...t,
2427
+ data: r,
2428
+ renderItem: e
2429
+ });
2430
+ },
2431
+ /**
2432
+ * Create a sectioned list
2433
+ */
2434
+ sectioned(r, e, t = {}) {
2435
+ return K({
2436
+ ...t,
2437
+ sections: r,
2438
+ renderItem: e
2439
+ });
2440
+ },
2441
+ /**
2442
+ * Create a virtual scrolling list for large datasets
2443
+ */
2444
+ virtual(r, e, t, i = {}) {
2445
+ return K({
2446
+ ...i,
2447
+ data: r,
2448
+ renderItem: e,
2449
+ virtualScrolling: t
2450
+ });
2451
+ },
2452
+ /**
2453
+ * Create an infinite scrolling list
2454
+ */
2455
+ infinite(r, e, t, i, s = {}) {
2456
+ return K({
2457
+ ...s,
2458
+ data: r,
2459
+ renderItem: e,
2460
+ onLoadMore: t,
2461
+ hasMore: i
2462
+ });
2463
+ }
2464
+ };
2465
+ var je = Object.defineProperty, Ne = (r, e, t) => e in r ? je(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, w = (r, e, t) => Ne(r, typeof e != "symbol" ? e + "" : e, t);
2466
+ const W = {
2467
+ colors: {
2468
+ background: "#FFFFFF",
2469
+ surface: "#F8F9FA",
2470
+ text: "#1A1A1A",
2471
+ textSecondary: "#6B7280",
2472
+ textDisabled: "#A0A0A0",
2473
+ textDestructive: "#FF3B30",
2474
+ border: "#E5E5E5",
2475
+ hover: "#F0F0F0",
2476
+ active: "#E3F2FD",
2477
+ separator: "#E5E5E5",
2478
+ shortcut: "#8E8E93",
2479
+ backdrop: "rgba(0, 0, 0, 0.1)"
2480
+ },
2481
+ spacing: {
2482
+ padding: 8,
2483
+ itemPadding: 12,
2484
+ gap: 4
2485
+ },
2486
+ borderRadius: 8,
2487
+ minWidth: 200,
2488
+ maxWidth: 320,
2489
+ itemHeight: 36,
2490
+ shadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
2491
+ backdropBlur: "blur(2px)"
2492
+ };
2493
+ class Be {
2494
+ constructor(e) {
2495
+ w(this, "type", "component"), w(this, "id"), w(this, "props"), w(this, "cleanup", []), w(this, "theme", W), w(this, "isOpenSignal", $(!1)), w(this, "focusedIndex", -1), w(this, "menuElement", null), w(this, "triggerElement", null), w(this, "handleKeyDown", (t) => {
2496
+ if (!this.isOpen()) return;
2497
+ const i = this.getVisibleItems();
2498
+ switch (t.key) {
2499
+ case "Escape":
2500
+ (this.props.escapeKeyCloses ?? !0) && (t.preventDefault(), this.setIsOpenValue(!1));
2501
+ break;
2502
+ case "ArrowDown":
2503
+ t.preventDefault(), this.focusedIndex = Math.min(this.focusedIndex + 1, i.length - 1), this.updateItemFocus();
2504
+ break;
2505
+ case "ArrowUp":
2506
+ t.preventDefault(), this.focusedIndex = Math.max(this.focusedIndex - 1, 0), this.updateItemFocus();
2507
+ break;
2508
+ case "Enter":
2509
+ case " ":
2510
+ if (this.focusedIndex >= 0 && this.focusedIndex < i.length) {
2511
+ t.preventDefault();
2512
+ const s = this.menuElement?.querySelector(
2513
+ `[data-menu-item-index="${this.focusedIndex}"]`
2514
+ );
2515
+ s && s.click();
2516
+ }
2517
+ break;
2518
+ case "Home":
2519
+ t.preventDefault(), this.focusedIndex = 0, this.updateItemFocus();
2520
+ break;
2521
+ case "End":
2522
+ t.preventDefault(), this.focusedIndex = i.length - 1, this.updateItemFocus();
2523
+ break;
2524
+ }
2525
+ }), w(this, "handleClickOutside", (t) => {
2526
+ if (!(this.props.closeOnClickOutside ?? !0)) return;
2527
+ const i = t.target, s = this.menuElement?.contains(i), n = this.triggerElement?.contains(i);
2528
+ !s && !n && this.setIsOpenValue(!1);
2529
+ }), w(this, "setIsOpenValue", (t) => {
2530
+ this.props.isOpen ? typeof this.props.isOpen == "function" && this.props.isOpen(t) : this.setIsOpen(t);
2531
+ }), this.props = e, this.id = `menu-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.props.isOpen && (this.isOpenSignal = [
2532
+ this.props.isOpen,
2533
+ ((t) => {
2534
+ typeof this.props.isOpen == "function" && this.props.isOpen(
2535
+ typeof t == "function" ? t(this.props.isOpen()) : t
2536
+ );
2537
+ })
2538
+ ]), le(this, {
2539
+ onDOMReady: (t, i) => {
2540
+ i && (this.setupMenuPositioning(i), this.setupMenuAnimations(i));
2541
+ }
2542
+ });
2543
+ }
2544
+ get isOpen() {
2545
+ return this.isOpenSignal[0];
2546
+ }
2547
+ get setIsOpen() {
2548
+ return this.isOpenSignal[1];
2549
+ }
2550
+ resolveValue(e) {
2551
+ return f(e) ? e() : e;
2552
+ }
2553
+ /**
2554
+ * Set up menu positioning using enhanced lifecycle (ENHANCED Phase 3)
2555
+ */
2556
+ setupMenuPositioning(e) {
2557
+ this.cleanup || (this.cleanup = []), ue(
2558
+ this,
2559
+ `[data-menu-trigger="${this.id}"]`,
2560
+ `[data-menu-content="${this.id}"]`,
2561
+ (t, i) => this.calculatePosition(t, i)
2562
+ );
2563
+ }
2564
+ /**
2565
+ * Set up menu animations using enhanced lifecycle (ENHANCED Phase 3)
2566
+ */
2567
+ setupMenuAnimations(e) {
2568
+ this.cleanup || (this.cleanup = []);
2569
+ }
2570
+ getVisibleItems() {
2571
+ return this.props.items.filter((e) => e.title !== "---");
2572
+ }
2573
+ createMenuItem(e, t) {
2574
+ if (e.title === "---")
2575
+ return d("div", {
2576
+ role: "separator",
2577
+ style: {
2578
+ height: "1px",
2579
+ backgroundColor: this.theme.colors.separator,
2580
+ margin: `${this.theme.spacing.gap}px 0`
2581
+ }
2582
+ });
2583
+ const i = this.resolveValue(e.disabled ?? !1), s = this.resolveValue(e.title), n = d("div", {
2584
+ role: "menuitem",
2585
+ tabindex: i ? "-1" : "0",
2586
+ "aria-disabled": i,
2587
+ "data-menu-item-index": t,
2588
+ style: {
2589
+ display: "flex",
2590
+ alignItems: "center",
2591
+ justifyContent: "space-between",
2592
+ padding: `${this.theme.spacing.itemPadding}px`,
2593
+ minHeight: `${this.theme.itemHeight}px`,
2594
+ fontSize: "14px",
2595
+ fontWeight: "400",
2596
+ color: i ? this.theme.colors.textDisabled : e.destructive || e.role === "destructive" ? this.theme.colors.textDestructive : this.theme.colors.text,
2597
+ cursor: i ? "default" : "pointer",
2598
+ borderRadius: `${this.theme.borderRadius / 2}px`,
2599
+ transition: "all 150ms ease-out",
2600
+ userSelect: "none"
2601
+ },
2602
+ onclick: async (p) => {
2603
+ if (!i) {
2604
+ if (p.preventDefault(), p.stopPropagation(), e.action)
2605
+ try {
2606
+ await e.action();
2607
+ } catch (h) {
2608
+ console.error("Menu item action failed:", h);
2609
+ }
2610
+ (this.props.closeOnSelect ?? !0) && this.setIsOpenValue(!1);
2611
+ }
2612
+ },
2613
+ onmouseenter: () => {
2614
+ if (!i) {
2615
+ this.focusedIndex = t, this.updateItemFocus();
2616
+ const p = n.element;
2617
+ p && (p.style.backgroundColor = this.theme.colors.hover);
2618
+ }
2619
+ },
2620
+ onmouseleave: () => {
2621
+ if (!i) {
2622
+ const p = n.element;
2623
+ p && (p.style.backgroundColor = "transparent");
2624
+ }
2625
+ }
2626
+ }), o = d("div", {
2627
+ style: {
2628
+ display: "flex",
2629
+ alignItems: "center",
2630
+ gap: `${this.theme.spacing.gap * 2}px`
2631
+ }
2632
+ });
2633
+ if (e.systemImage) {
2634
+ const h = d("span", {
2635
+ style: {
2636
+ fontSize: "16px",
2637
+ color: "inherit"
2638
+ }
2639
+ }).element;
2640
+ h && (h.textContent = e.systemImage);
2641
+ const x = o.element;
2642
+ x && h && x.appendChild(h);
2643
+ }
2644
+ const l = d("span").element;
2645
+ l && (l.textContent = s);
2646
+ const u = o.element;
2647
+ u && l && u.appendChild(l);
2648
+ const c = n.element;
2649
+ if (c && u && c.appendChild(u), e.shortcut) {
2650
+ const h = d("span", {
2651
+ style: {
2652
+ fontSize: "12px",
2653
+ color: this.theme.colors.shortcut,
2654
+ fontFamily: "monospace"
2655
+ }
2656
+ }).element;
2657
+ h && (h.textContent = e.shortcut), c && h && c.appendChild(h);
2658
+ }
2659
+ if (e.submenu && e.submenu.length > 0) {
2660
+ const h = d("span", {
2661
+ style: {
2662
+ fontSize: "12px",
2663
+ color: this.theme.colors.textSecondary
2664
+ }
2665
+ }).element;
2666
+ h && (h.textContent = "▶"), c && h && c.appendChild(h);
2667
+ }
2668
+ return n;
2669
+ }
2670
+ updateItemFocus() {
2671
+ if (!this.menuElement) return;
2672
+ this.menuElement.querySelectorAll('[role="menuitem"]').forEach((t, i) => {
2673
+ const s = t;
2674
+ i === this.focusedIndex ? (s.style.backgroundColor = this.theme.colors.hover, s.focus()) : s.style.backgroundColor = "transparent";
2675
+ });
2676
+ }
2677
+ calculatePosition(e, t) {
2678
+ const i = e.getBoundingClientRect(), s = t.getBoundingClientRect(), n = {
2679
+ width: window.innerWidth,
2680
+ height: window.innerHeight
2681
+ }, o = this.props.placement ?? "bottom", a = this.props.offset ?? { x: 0, y: 4 };
2682
+ let l = 0, u = 0;
2683
+ switch (o) {
2684
+ case "bottom":
2685
+ case "bottom-start":
2686
+ case "bottom-end":
2687
+ u = i.bottom + a.y;
2688
+ break;
2689
+ case "top":
2690
+ case "top-start":
2691
+ case "top-end":
2692
+ u = i.top - s.height - a.y;
2693
+ break;
2694
+ case "right":
2695
+ case "right-start":
2696
+ case "right-end":
2697
+ l = i.right + a.x;
2698
+ break;
2699
+ case "left":
2700
+ case "left-start":
2701
+ case "left-end":
2702
+ l = i.left - s.width - a.x;
2703
+ break;
2704
+ }
2705
+ switch (o) {
2706
+ case "bottom":
2707
+ case "top":
2708
+ l = i.left + (i.width - s.width) / 2;
2709
+ break;
2710
+ case "bottom-start":
2711
+ case "top-start":
2712
+ l = i.left;
2713
+ break;
2714
+ case "bottom-end":
2715
+ case "top-end":
2716
+ l = i.right - s.width;
2717
+ break;
2718
+ case "right":
2719
+ case "left":
2720
+ u = i.top + (i.height - s.height) / 2;
2721
+ break;
2722
+ case "right-start":
2723
+ case "left-start":
2724
+ u = i.top;
2725
+ break;
2726
+ case "right-end":
2727
+ case "left-end":
2728
+ u = i.bottom - s.height;
2729
+ break;
2730
+ }
2731
+ return (this.props.flip ?? !0) && (u + s.height > n.height && i.top > s.height && (u = i.top - s.height - a.y), l + s.width > n.width && i.left > s.width && (l = i.left - s.width - a.x)), (this.props.shift ?? !0) && (l = Math.max(8, Math.min(l, n.width - s.width - 8)), u = Math.max(8, Math.min(u, n.height - s.height - 8))), { x: l, y: u };
2732
+ }
2733
+ createMenuContent() {
2734
+ const e = d("div", {
2735
+ role: "menu",
2736
+ "aria-labelledby": `${this.id}-trigger`,
2737
+ "data-menu-id": this.id,
2738
+ "data-menu-content": this.id,
2739
+ // ENHANCED: Add data attribute for lifecycle hooks
2740
+ style: {
2741
+ position: "fixed",
2742
+ backgroundColor: this.theme.colors.background,
2743
+ border: `1px solid ${this.theme.colors.border}`,
2744
+ borderRadius: `${this.theme.borderRadius}px`,
2745
+ boxShadow: this.theme.shadow,
2746
+ minWidth: `${this.theme.minWidth}px`,
2747
+ maxWidth: `${this.theme.maxWidth}px`,
2748
+ padding: `${this.theme.spacing.padding}px`,
2749
+ zIndex: "9999",
2750
+ opacity: "0",
2751
+ transform: "scale(0.95)",
2752
+ transformOrigin: "top",
2753
+ transition: `all ${this.props.animationDuration || 150}ms cubic-bezier(0.16, 1, 0.3, 1)`
2754
+ }
2755
+ });
2756
+ return this.props.items.forEach((t, i) => {
2757
+ const s = this.createMenuItem(t, i), n = e.element, o = s.element;
2758
+ n && o && n.appendChild(o);
2759
+ }), this.menuElement = e.element, e;
2760
+ }
2761
+ setupTrigger() {
2762
+ let e;
2763
+ if (typeof this.props.trigger == "function") {
2764
+ const t = this.props.trigger();
2765
+ if ("render" in t) {
2766
+ const i = t.render();
2767
+ Array.isArray(i) ? e = i[0]?.element : e = i instanceof HTMLElement ? i : i?.element;
2768
+ } else
2769
+ e = t;
2770
+ } else if ("render" in this.props.trigger) {
2771
+ const t = this.props.trigger.render();
2772
+ Array.isArray(t) ? e = t[0]?.element : e = t instanceof HTMLElement ? t : t?.element;
2773
+ } else
2774
+ e = this.props.trigger;
2775
+ return e.id = e.id || `${this.id}-trigger`, e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", String(this.isOpen())), e.setAttribute("data-menu-trigger", this.id), e.addEventListener("click", (t) => {
2776
+ t.preventDefault(), t.stopPropagation(), this.setIsOpenValue(!this.isOpen());
2777
+ }), this.triggerElement = e, e;
2778
+ }
2779
+ render() {
2780
+ const e = d("div", {
2781
+ style: {
2782
+ position: "relative",
2783
+ display: "inline-block"
2784
+ }
2785
+ }), t = this.setupTrigger();
2786
+ return e.element && t && e.element.appendChild(t), D(() => {
2787
+ if (this.isOpen()) {
2788
+ const n = this.createMenuContent().element;
2789
+ if (n && (document.body.appendChild(n), this.menuElement = n), this.triggerElement && this.menuElement) {
2790
+ const o = this.calculatePosition(this.triggerElement, this.menuElement);
2791
+ this.menuElement.style.left = `${o.x}px`, this.menuElement.style.top = `${o.y}px`, he.scaleIn(this, this.menuElement, this.props.animationDuration || 150), this.focusedIndex = 0, fe.focusWhenReady(this, '[role="menuitem"]', this.menuElement);
2792
+ }
2793
+ document.addEventListener("keydown", this.handleKeyDown), document.addEventListener("click", this.handleClickOutside), this.triggerElement?.setAttribute("aria-expanded", "true");
2794
+ } else {
2795
+ if (this.menuElement) {
2796
+ this.menuElement.style.opacity = "0", this.menuElement.style.transform = "scale(0.95)";
2797
+ const s = () => {
2798
+ this.menuElement?.parentNode && (document.body.removeChild(this.menuElement), this.menuElement = null), this.menuElement?.removeEventListener("transitionend", s);
2799
+ };
2800
+ this.menuElement.addEventListener("transitionend", s);
2801
+ const n = setTimeout(() => {
2802
+ this.menuElement?.removeEventListener("transitionend", s), s();
2803
+ }, this.props.animationDuration || 150);
2804
+ this.cleanup || (this.cleanup = []), this.cleanup.push(() => {
2805
+ n && clearTimeout(n);
2806
+ });
2807
+ }
2808
+ document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("click", this.handleClickOutside), this.triggerElement?.setAttribute("aria-expanded", "false"), this.focusedIndex = -1;
2809
+ }
2810
+ }), e;
2811
+ }
2812
+ }
2813
+ function yt(r) {
2814
+ return I(new Be(r));
2815
+ }
2816
+ const St = {
2817
+ /**
2818
+ * Create a separator item
2819
+ */
2820
+ separator() {
2821
+ return { title: "---" };
2822
+ },
2823
+ /**
2824
+ * Create a destructive menu item
2825
+ */
2826
+ destructive(r, e, t) {
2827
+ return {
2828
+ title: r,
2829
+ action: e,
2830
+ destructive: !0,
2831
+ systemImage: t
2832
+ };
2833
+ },
2834
+ /**
2835
+ * Create a menu item with keyboard shortcut
2836
+ */
2837
+ withShortcut(r, e, t, i) {
2838
+ return {
2839
+ title: r,
2840
+ shortcut: e,
2841
+ action: t,
2842
+ systemImage: i
2843
+ };
2844
+ },
2845
+ /**
2846
+ * Create a context menu for right-click interactions
2847
+ */
2848
+ contextMenu(r, e) {
2849
+ const [t, i] = $(!1), [s, n] = $({ x: 0, y: 0 });
2850
+ r.addEventListener("contextmenu", (o) => {
2851
+ o.preventDefault(), n({ x: o.clientX, y: o.clientY }), i(!0);
2852
+ }), console.log("Context menu requested", { items: e, position: s(), isOpen: t() });
2853
+ }
2854
+ }, xt = {
2855
+ theme: W,
2856
+ /**
2857
+ * Create a custom menu theme
2858
+ */
2859
+ createTheme(r) {
2860
+ return { ...W, ...r };
2861
+ },
2862
+ /**
2863
+ * Dark theme preset
2864
+ */
2865
+ darkTheme() {
2866
+ return {
2867
+ ...W,
2868
+ colors: {
2869
+ ...W.colors,
2870
+ background: "#2A2A2A",
2871
+ surface: "#3A3A3A",
2872
+ text: "#FFFFFF",
2873
+ textSecondary: "#A0A0A0",
2874
+ border: "#404040",
2875
+ hover: "#404040",
2876
+ active: "#0066CC"
2877
+ }
2878
+ };
2879
+ }
2880
+ };
2881
+ var We = Object.defineProperty, Ue = (r, e, t) => e in r ? We(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, A = (r, e, t) => Ue(r, typeof e != "symbol" ? e + "" : e, t);
2882
+ class qe {
2883
+ constructor(e) {
2884
+ this.props = e, A(this, "type", "component"), A(this, "id"), A(this, "mounted", !1), A(this, "cleanup", []), A(this, "isOpen"), A(this, "setIsOpen"), A(this, "searchTerm"), A(this, "setSearchTerm"), A(this, "handleSelection", (o) => {
2885
+ this.props.onSelectionChange && this.props.onSelectionChange(o), (this.props.variant === "dropdown" || this.props.variant === "menu") && this.setIsOpen(!1), this.setSearchTerm("");
2886
+ }), A(this, "toggleOpen", () => {
2887
+ this.isDisabled() || this.setIsOpen(!this.isOpen());
2888
+ }), this.id = `picker-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2889
+ const [t, i] = $(!1), [s, n] = $("");
2890
+ if (this.isOpen = t, this.setIsOpen = i, this.searchTerm = s, this.setSearchTerm = n, typeof window < "u") {
2891
+ const o = (a) => {
2892
+ const l = document.getElementById(this.id);
2893
+ l && !l.contains(a.target) && this.setIsOpen(!1);
2894
+ };
2895
+ document.addEventListener("click", o), this.cleanup.push(() => {
2896
+ document.removeEventListener("click", o);
2897
+ });
2898
+ }
2899
+ }
2900
+ /**
2901
+ * Get current selection value
2902
+ */
2903
+ getSelection() {
2904
+ const { selection: e } = this.props;
2905
+ return f(e) ? e() : e;
2906
+ }
2907
+ /**
2908
+ * Get current options
2909
+ */
2910
+ getOptions() {
2911
+ const { options: e } = this.props;
2912
+ return f(e) ? e() : e;
2913
+ }
2914
+ /**
2915
+ * Filter options based on search term
2916
+ */
2917
+ getFilteredOptions() {
2918
+ const e = this.getOptions(), t = this.searchTerm().toLowerCase();
2919
+ return !t || !this.props.searchable ? e : e.filter(
2920
+ (i) => i.label.toLowerCase().includes(t) || i.description?.toLowerCase().includes(t)
2921
+ );
2922
+ }
2923
+ /**
2924
+ * Check if picker is disabled
2925
+ */
2926
+ isDisabled() {
2927
+ const { disabled: e } = this.props;
2928
+ return typeof e == "boolean" ? e : f(e) ? e() : !1;
2929
+ }
2930
+ /**
2931
+ * Get selected option
2932
+ */
2933
+ getSelectedOption() {
2934
+ const e = this.getSelection();
2935
+ return this.getOptions().find((i) => i.value === e) || null;
2936
+ }
2937
+ /**
2938
+ * Get picker size styles
2939
+ */
2940
+ getSizeStyles() {
2941
+ const { size: e = "medium" } = this.props;
2942
+ switch (e) {
2943
+ case "small":
2944
+ return {
2945
+ fontSize: "14px",
2946
+ padding: "6px 12px",
2947
+ minHeight: "32px"
2948
+ };
2949
+ case "large":
2950
+ return {
2951
+ fontSize: "18px",
2952
+ padding: "12px 16px",
2953
+ minHeight: "48px"
2954
+ };
2955
+ default:
2956
+ return {
2957
+ fontSize: "16px",
2958
+ padding: "8px 12px",
2959
+ minHeight: "40px"
2960
+ };
2961
+ }
2962
+ }
2963
+ /**
2964
+ * Render dropdown variant
2965
+ */
2966
+ renderDropdown() {
2967
+ const e = this.getSelectedOption(), t = this.getFilteredOptions(), i = this.getSizeStyles(), s = this.isOpen();
2968
+ return d(
2969
+ "div",
2970
+ {
2971
+ id: this.id,
2972
+ style: {
2973
+ position: "relative",
2974
+ display: "inline-block",
2975
+ minWidth: "200px"
2976
+ }
2977
+ },
2978
+ // Trigger button
2979
+ d(
2980
+ "button",
2981
+ {
2982
+ type: "button",
2983
+ onClick: this.toggleOpen,
2984
+ disabled: this.isDisabled(),
2985
+ style: {
2986
+ ...i,
2987
+ width: "100%",
2988
+ display: "flex",
2989
+ alignItems: "center",
2990
+ justifyContent: "space-between",
2991
+ backgroundColor: "#ffffff",
2992
+ border: "1px solid #d1d5db",
2993
+ borderRadius: "6px",
2994
+ cursor: this.isDisabled() ? "not-allowed" : "pointer",
2995
+ opacity: this.isDisabled() ? 0.6 : 1,
2996
+ ...s && {
2997
+ borderColor: this.props.tint || "#007AFF",
2998
+ boxShadow: `0 0 0 1px ${this.props.tint || "#007AFF"}`
2999
+ }
3000
+ }
3001
+ },
3002
+ d(
3003
+ "span",
3004
+ {
3005
+ style: {
3006
+ color: e ? "#1a1a1a" : "#6b7280"
3007
+ }
3008
+ },
3009
+ S(e?.label || this.props.placeholder || "Select an option")
3010
+ ),
3011
+ d(
3012
+ "span",
3013
+ {
3014
+ style: {
3015
+ fontSize: "12px",
3016
+ color: "#6b7280",
3017
+ transform: s ? "rotate(180deg)" : "rotate(0deg)",
3018
+ transition: "transform 0.2s"
3019
+ }
3020
+ },
3021
+ S("▼")
3022
+ )
3023
+ ),
3024
+ ...s ? [
3025
+ d(
3026
+ "div",
3027
+ {
3028
+ style: {
3029
+ position: "absolute",
3030
+ top: "100%",
3031
+ left: "0",
3032
+ right: "0",
3033
+ zIndex: 1e3,
3034
+ backgroundColor: "#ffffff",
3035
+ border: "1px solid #d1d5db",
3036
+ borderRadius: "6px",
3037
+ boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
3038
+ maxHeight: "200px",
3039
+ overflowY: "auto",
3040
+ marginTop: "2px"
3041
+ }
3042
+ },
3043
+ ...this.props.searchable ? [
3044
+ d(
3045
+ "div",
3046
+ {
3047
+ style: {
3048
+ padding: "8px",
3049
+ borderBottom: "1px solid #e5e7eb"
3050
+ }
3051
+ },
3052
+ d("input", {
3053
+ type: "text",
3054
+ placeholder: "Search options...",
3055
+ value: this.searchTerm(),
3056
+ onInput: (n) => {
3057
+ const o = n.target;
3058
+ this.setSearchTerm(o.value);
3059
+ },
3060
+ style: {
3061
+ width: "100%",
3062
+ padding: "6px 8px",
3063
+ border: "1px solid #d1d5db",
3064
+ borderRadius: "4px",
3065
+ fontSize: "14px"
3066
+ }
3067
+ })
3068
+ )
3069
+ ] : [],
3070
+ ...t.map(
3071
+ (n) => d(
3072
+ "button",
3073
+ {
3074
+ type: "button",
3075
+ key: String(n.value),
3076
+ onClick: () => this.handleSelection(n.value),
3077
+ disabled: n.disabled,
3078
+ style: {
3079
+ width: "100%",
3080
+ padding: "8px 12px",
3081
+ textAlign: "left",
3082
+ backgroundColor: n.value === this.getSelection() ? "#f3f4f6" : "transparent",
3083
+ border: "none",
3084
+ cursor: n.disabled ? "not-allowed" : "pointer",
3085
+ opacity: n.disabled ? 0.5 : 1,
3086
+ fontSize: "14px",
3087
+ display: "flex",
3088
+ alignItems: "center",
3089
+ gap: "8px",
3090
+ ":hover": {
3091
+ backgroundColor: "#f9fafb"
3092
+ }
3093
+ }
3094
+ },
3095
+ ...n.icon ? [d("span", { style: { fontSize: "16px" } }, S(n.icon))] : [],
3096
+ d(
3097
+ "div",
3098
+ {},
3099
+ d("div", {}, S(n.label)),
3100
+ ...n.description ? [
3101
+ d(
3102
+ "div",
3103
+ {
3104
+ style: {
3105
+ fontSize: "12px",
3106
+ color: "#6b7280",
3107
+ marginTop: "2px"
3108
+ }
3109
+ },
3110
+ S(n.description)
3111
+ )
3112
+ ] : []
3113
+ )
3114
+ )
3115
+ ),
3116
+ ...t.length === 0 ? [
3117
+ d(
3118
+ "div",
3119
+ {
3120
+ style: {
3121
+ padding: "12px",
3122
+ textAlign: "center",
3123
+ color: "#6b7280",
3124
+ fontSize: "14px"
3125
+ }
3126
+ },
3127
+ S("No options found")
3128
+ )
3129
+ ] : []
3130
+ )
3131
+ ] : []
3132
+ );
3133
+ }
3134
+ /**
3135
+ * Render segmented variant
3136
+ */
3137
+ renderSegmented() {
3138
+ const e = this.getOptions(), t = this.getSelection(), i = this.getSizeStyles();
3139
+ return d(
3140
+ "div",
3141
+ {
3142
+ style: {
3143
+ display: "flex",
3144
+ backgroundColor: "#f3f4f6",
3145
+ borderRadius: "8px",
3146
+ padding: "2px"
3147
+ },
3148
+ role: "radiogroup",
3149
+ "aria-label": this.props.accessibilityLabel
3150
+ },
3151
+ ...e.map(
3152
+ (s, n) => d(
3153
+ "button",
3154
+ {
3155
+ type: "button",
3156
+ key: String(s.value),
3157
+ onClick: () => this.handleSelection(s.value),
3158
+ disabled: s.disabled || this.isDisabled(),
3159
+ role: "radio",
3160
+ "aria-checked": s.value === t,
3161
+ style: {
3162
+ ...i,
3163
+ flex: 1,
3164
+ border: "none",
3165
+ borderRadius: "6px",
3166
+ backgroundColor: s.value === t ? "#ffffff" : "transparent",
3167
+ color: s.value === t ? "#1a1a1a" : "#6b7280",
3168
+ fontWeight: s.value === t ? "600" : "400",
3169
+ cursor: s.disabled || this.isDisabled() ? "not-allowed" : "pointer",
3170
+ opacity: s.disabled || this.isDisabled() ? 0.5 : 1,
3171
+ boxShadow: s.value === t ? "0 1px 2px rgba(0, 0, 0, 0.1)" : "none",
3172
+ transition: "all 0.2s",
3173
+ margin: "0",
3174
+ ...n === 0 && { marginRight: "1px" },
3175
+ ...n === e.length - 1 && { marginLeft: "1px" }
3176
+ }
3177
+ },
3178
+ ...s.icon ? [
3179
+ d(
3180
+ "span",
3181
+ {
3182
+ style: {
3183
+ marginRight: "6px",
3184
+ fontSize: "14px"
3185
+ }
3186
+ },
3187
+ S(s.icon)
3188
+ )
3189
+ ] : [],
3190
+ S(s.label)
3191
+ )
3192
+ )
3193
+ );
3194
+ }
3195
+ /**
3196
+ * Render wheel variant (simplified)
3197
+ */
3198
+ renderWheel() {
3199
+ const e = this.getOptions(), t = this.getSelection();
3200
+ return d(
3201
+ "select",
3202
+ {
3203
+ value: String(t),
3204
+ onChange: (i) => {
3205
+ const s = i.target, n = e.find((o) => String(o.value) === s.value);
3206
+ n && this.handleSelection(n.value);
3207
+ },
3208
+ disabled: this.isDisabled(),
3209
+ style: {
3210
+ ...this.getSizeStyles(),
3211
+ minWidth: "200px",
3212
+ backgroundColor: "#ffffff",
3213
+ border: "1px solid #d1d5db",
3214
+ borderRadius: "6px",
3215
+ cursor: this.isDisabled() ? "not-allowed" : "pointer",
3216
+ opacity: this.isDisabled() ? 0.6 : 1
3217
+ }
3218
+ },
3219
+ ...e.map(
3220
+ (i) => d(
3221
+ "option",
3222
+ {
3223
+ key: String(i.value),
3224
+ value: String(i.value),
3225
+ disabled: i.disabled
3226
+ },
3227
+ S(i.label)
3228
+ )
3229
+ )
3230
+ );
3231
+ }
3232
+ render() {
3233
+ const { variant: e = "dropdown", accessibilityLabel: t, accessibilityHint: i } = this.props, s = {
3234
+ "aria-label": t,
3235
+ "aria-describedby": i ? `${this.id}-hint` : void 0
3236
+ };
3237
+ let n;
3238
+ switch (e) {
3239
+ case "segmented":
3240
+ n = this.renderSegmented();
3241
+ break;
3242
+ case "wheel":
3243
+ n = this.renderWheel();
3244
+ break;
3245
+ default:
3246
+ n = this.renderDropdown();
3247
+ break;
3248
+ }
3249
+ return d(
3250
+ "div",
3251
+ s,
3252
+ n,
3253
+ ...i ? [
3254
+ d(
3255
+ "div",
3256
+ {
3257
+ id: `${this.id}-hint`,
3258
+ style: {
3259
+ fontSize: "12px",
3260
+ color: "#6b7280",
3261
+ marginTop: "4px"
3262
+ }
3263
+ },
3264
+ S(i)
3265
+ )
3266
+ ] : []
3267
+ );
3268
+ }
3269
+ }
3270
+ function Q(r, e, t = {}) {
3271
+ const i = { ...t, selection: r, options: e }, s = new qe(i);
3272
+ return I(s);
3273
+ }
3274
+ const vt = {
3275
+ /**
3276
+ * Dropdown picker (default)
3277
+ */
3278
+ // biome-ignore lint/suspicious/noExplicitAny: Generic dropdown picker requires flexible type
3279
+ Dropdown(r, e, t = {}) {
3280
+ return Q(r, e, { ...t, variant: "dropdown" });
3281
+ },
3282
+ /**
3283
+ * Segmented picker
3284
+ */
3285
+ // biome-ignore lint/suspicious/noExplicitAny: Generic segmented picker requires flexible type
3286
+ Segmented(r, e, t = {}) {
3287
+ return Q(r, e, { ...t, variant: "segmented" });
3288
+ },
3289
+ /**
3290
+ * Wheel picker (native select)
3291
+ */
3292
+ // biome-ignore lint/suspicious/noExplicitAny: Generic wheel picker requires flexible type
3293
+ Wheel(r, e, t = {}) {
3294
+ return Q(r, e, { ...t, variant: "wheel" });
3295
+ },
3296
+ /**
3297
+ * Menu picker
3298
+ */
3299
+ // biome-ignore lint/suspicious/noExplicitAny: Generic menu picker requires flexible type
3300
+ Menu(r, e, t = {}) {
3301
+ return Q(r, e, { ...t, variant: "menu" });
3302
+ }
3303
+ }, Ct = {
3304
+ /**
3305
+ * Create options from simple array
3306
+ */
3307
+ fromArray(r, e) {
3308
+ return r.map((t) => ({
3309
+ value: t,
3310
+ label: String(e && typeof t == "object" && t !== null ? t[e] : t)
3311
+ }));
3312
+ },
3313
+ /**
3314
+ * Create options from enum
3315
+ */
3316
+ fromEnum(r) {
3317
+ return Object.entries(r).map(([e, t]) => ({
3318
+ value: t,
3319
+ label: e.replace(/([A-Z])/g, " $1").trim()
3320
+ }));
3321
+ },
3322
+ /**
3323
+ * Group options by category
3324
+ */
3325
+ grouped(r) {
3326
+ return r.reduce(
3327
+ (e, t) => {
3328
+ const i = t.category || "Other";
3329
+ return e[i] || (e[i] = []), e[i].push(t), e;
3330
+ },
3331
+ {}
3332
+ );
3333
+ }
3334
+ };
3335
+ var Ye = Object.defineProperty, Xe = (r, e, t) => e in r ? Ye(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, B = (r, e, t) => Xe(r, typeof e != "symbol" ? e + "" : e, t);
3336
+ class Ke {
3337
+ constructor(e) {
3338
+ this.props = e, B(this, "type", "component"), B(this, "id"), B(this, "mounted", !1), B(this, "cleanup", []), B(this, "handleToggle", () => {
3339
+ this.props.onToggle && this.props.onToggle(!this.isCollapsed());
3340
+ }), this.id = `section-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
3341
+ }
3342
+ /**
3343
+ * Resolve dynamic content
3344
+ */
3345
+ resolveContent(e) {
3346
+ return e ? typeof e == "string" ? e : typeof e == "function" || f(e) ? e() : e : null;
3347
+ }
3348
+ /**
3349
+ * Check if section is collapsed
3350
+ */
3351
+ isCollapsed() {
3352
+ const { collapsed: e } = this.props;
3353
+ return typeof e == "boolean" ? e : f(e) ? e() : !1;
3354
+ }
3355
+ /**
3356
+ * Helper to render component content safely
3357
+ */
3358
+ renderComponentContent(e) {
3359
+ const t = e.render();
3360
+ return Array.isArray(t) ? t : [t];
3361
+ }
3362
+ /**
3363
+ * Get section styles based on style prop
3364
+ */
3365
+ getSectionStyles() {
3366
+ const { style: e = "automatic" } = this.props, t = {
3367
+ marginBottom: "20px"
3368
+ };
3369
+ switch (e) {
3370
+ case "grouped":
3371
+ return {
3372
+ ...t,
3373
+ backgroundColor: "#ffffff",
3374
+ border: "1px solid #e0e0e0",
3375
+ borderRadius: "12px",
3376
+ overflow: "hidden"
3377
+ };
3378
+ case "inset":
3379
+ return {
3380
+ ...t,
3381
+ backgroundColor: "#f8f9fa",
3382
+ border: "1px solid #e9ecef",
3383
+ borderRadius: "8px",
3384
+ margin: "0 16px 20px 16px"
3385
+ };
3386
+ case "sidebar":
3387
+ return {
3388
+ ...t,
3389
+ borderLeft: "3px solid #007AFF",
3390
+ paddingLeft: "16px",
3391
+ backgroundColor: "#f8f9fa",
3392
+ borderRadius: "0 8px 8px 0"
3393
+ };
3394
+ case "plain":
3395
+ return t;
3396
+ default:
3397
+ return {
3398
+ ...t,
3399
+ backgroundColor: "#ffffff",
3400
+ border: "1px solid #f0f0f0",
3401
+ borderRadius: "8px"
3402
+ };
3403
+ }
3404
+ }
3405
+ /**
3406
+ * Get header styles
3407
+ */
3408
+ getHeaderStyles() {
3409
+ const { style: e = "automatic" } = this.props, t = {
3410
+ fontSize: "16px",
3411
+ fontWeight: "600",
3412
+ color: "#1a1a1a",
3413
+ margin: "0 0 12px 0"
3414
+ };
3415
+ switch (e) {
3416
+ case "grouped":
3417
+ case "inset":
3418
+ return {
3419
+ ...t,
3420
+ padding: "12px 16px 0 16px",
3421
+ backgroundColor: "#f8f9fa",
3422
+ borderBottom: "1px solid #e9ecef"
3423
+ };
3424
+ case "sidebar":
3425
+ return {
3426
+ ...t,
3427
+ fontSize: "14px",
3428
+ textTransform: "uppercase",
3429
+ letterSpacing: "0.5px",
3430
+ color: "#666",
3431
+ marginBottom: "8px"
3432
+ };
3433
+ default:
3434
+ return {
3435
+ ...t,
3436
+ padding: "0 0 8px 0"
3437
+ };
3438
+ }
3439
+ }
3440
+ /**
3441
+ * Get content styles
3442
+ */
3443
+ getContentStyles() {
3444
+ const { style: e = "automatic", spacing: t = 12 } = this.props, i = {
3445
+ display: "flex",
3446
+ flexDirection: "column",
3447
+ gap: `${t}px`
3448
+ };
3449
+ switch (e) {
3450
+ case "grouped":
3451
+ case "inset":
3452
+ return {
3453
+ ...i,
3454
+ padding: "16px"
3455
+ };
3456
+ case "sidebar":
3457
+ return {
3458
+ ...i,
3459
+ padding: "8px 0"
3460
+ };
3461
+ default:
3462
+ return {
3463
+ ...i,
3464
+ padding: "12px"
3465
+ };
3466
+ }
3467
+ }
3468
+ /**
3469
+ * Get footer styles
3470
+ */
3471
+ getFooterStyles() {
3472
+ const { style: e = "automatic" } = this.props, t = {
3473
+ fontSize: "14px",
3474
+ color: "#666",
3475
+ margin: "8px 0 0 0"
3476
+ };
3477
+ switch (e) {
3478
+ case "grouped":
3479
+ case "inset":
3480
+ return {
3481
+ ...t,
3482
+ padding: "0 16px 12px 16px",
3483
+ backgroundColor: "#f8f9fa",
3484
+ borderTop: "1px solid #e9ecef"
3485
+ };
3486
+ default:
3487
+ return {
3488
+ ...t,
3489
+ padding: "0 0 4px 0"
3490
+ };
3491
+ }
3492
+ }
3493
+ /**
3494
+ * Render header content
3495
+ */
3496
+ renderHeader() {
3497
+ const e = this.resolveContent(this.props.header);
3498
+ if (!e) return null;
3499
+ const t = this.getHeaderStyles();
3500
+ if (this.props.collapsible) {
3501
+ const i = this.isCollapsed() ? "▶" : "▼";
3502
+ return d(
3503
+ "div",
3504
+ {
3505
+ style: {
3506
+ ...t,
3507
+ cursor: "pointer",
3508
+ display: "flex",
3509
+ alignItems: "center",
3510
+ gap: "8px"
3511
+ },
3512
+ onClick: this.handleToggle
3513
+ },
3514
+ d(
3515
+ "span",
3516
+ {
3517
+ style: {
3518
+ fontSize: "12px",
3519
+ color: "#666"
3520
+ }
3521
+ },
3522
+ S(i)
3523
+ ),
3524
+ ...typeof e == "string" ? [S(e)] : this.renderComponentContent(e)
3525
+ );
3526
+ }
3527
+ return d(
3528
+ "div",
3529
+ { style: t },
3530
+ ...typeof e == "string" ? [S(e)] : this.renderComponentContent(e)
3531
+ );
3532
+ }
3533
+ /**
3534
+ * Render content
3535
+ */
3536
+ renderContent() {
3537
+ const { children: e = [] } = this.props;
3538
+ return this.props.collapsible && this.isCollapsed() || e.length === 0 ? null : d(
3539
+ "div",
3540
+ {
3541
+ style: this.getContentStyles()
3542
+ },
3543
+ ...e.flatMap((t) => {
3544
+ const i = t.render();
3545
+ return Array.isArray(i) ? i : [i];
3546
+ })
3547
+ );
3548
+ }
3549
+ /**
3550
+ * Render footer content
3551
+ */
3552
+ renderFooter() {
3553
+ const e = this.resolveContent(this.props.footer);
3554
+ return e ? d(
3555
+ "div",
3556
+ {
3557
+ style: this.getFooterStyles()
3558
+ },
3559
+ ...typeof e == "string" ? [S(e)] : this.renderComponentContent(e)
3560
+ ) : null;
3561
+ }
3562
+ render() {
3563
+ const { accessibilityLabel: e, accessibilityRole: t = "group" } = this.props;
3564
+ return d(
3565
+ "div",
3566
+ {
3567
+ style: this.getSectionStyles(),
3568
+ "aria-label": e,
3569
+ role: t
3570
+ },
3571
+ ...[this.renderHeader(), this.renderContent(), this.renderFooter()].filter(
3572
+ (i) => i !== null
3573
+ )
3574
+ );
3575
+ }
3576
+ }
3577
+ function z(r, e = {}) {
3578
+ console.warn(
3579
+ "Section from @tachui/core is deprecated. Use FormSection from @tachui/forms for form contexts, or VStack for general layout grouping."
3580
+ );
3581
+ const t = { ...e, children: r }, i = new Ke(t);
3582
+ return I(i);
3583
+ }
3584
+ function wt(r, e, t = {}) {
3585
+ return z(e, { ...t, header: r });
3586
+ }
3587
+ function $t(r, e, t, i = {}) {
3588
+ return z(t, { ...i, header: r, footer: e });
3589
+ }
3590
+ const It = {
3591
+ /**
3592
+ * Automatic section styling (default)
3593
+ */
3594
+ Automatic(r, e = {}) {
3595
+ return z(r, { ...e, style: "automatic" });
3596
+ },
3597
+ /**
3598
+ * Grouped section with container styling
3599
+ */
3600
+ Grouped(r, e = {}) {
3601
+ return z(r, { ...e, style: "grouped" });
3602
+ },
3603
+ /**
3604
+ * Inset section styling
3605
+ */
3606
+ Inset(r, e = {}) {
3607
+ return z(r, { ...e, style: "inset" });
3608
+ },
3609
+ /**
3610
+ * Sidebar-style section
3611
+ */
3612
+ Sidebar(r, e = {}) {
3613
+ return z(r, { ...e, style: "sidebar" });
3614
+ },
3615
+ /**
3616
+ * Plain section without styling
3617
+ */
3618
+ Plain(r, e = {}) {
3619
+ return z(r, { ...e, style: "plain" });
3620
+ },
3621
+ /**
3622
+ * Collapsible section
3623
+ */
3624
+ Collapsible(r, e, t = !1, i = {}) {
3625
+ return z(e, {
3626
+ ...i,
3627
+ header: r,
3628
+ collapsible: !0,
3629
+ collapsed: t
3630
+ });
3631
+ }
3632
+ };
3633
+ var Qe = Object.defineProperty, Ze = (r, e, t) => e in r ? Qe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, V = (r, e, t) => Ze(r, typeof e != "symbol" ? e + "" : e, t);
3634
+ class Je {
3635
+ constructor(e) {
3636
+ this.props = e, V(this, "type", "component"), V(this, "id"), V(this, "mounted", !1), V(this, "cleanup", []), V(this, "toggleElement", null), V(this, "setIsAnimating"), V(this, "handleToggle", async (i) => {
3637
+ if (i.preventDefault(), this.isDisabled()) return;
3638
+ const s = !this.getIsOn();
3639
+ this.props.animated !== !1 && (this.setIsAnimating(!0), setTimeout(() => {
3640
+ this.setIsAnimating(!1);
3641
+ }, 200)), this.props.onToggle && this.props.onToggle(s);
3642
+ }), this.id = `toggle-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
3643
+ const [, t] = $(!1);
3644
+ this.setIsAnimating = t, D(() => {
3645
+ const i = this.getIsOn();
3646
+ this.toggleElement && this.toggleElement.checked !== i && (this.toggleElement.checked = i);
3647
+ });
3648
+ }
3649
+ /**
3650
+ * Get current toggle state
3651
+ */
3652
+ getIsOn() {
3653
+ const { isOn: e } = this.props;
3654
+ return f(e) ? e() : e;
3655
+ }
3656
+ // /**
3657
+ // * Get toggle state as signal or static value for DOM renderer
3658
+ // */
3659
+ // private getIsOnForDOM(): boolean | (() => boolean) {
3660
+ // const { isOn } = this.props
3661
+ // if (isSignal(isOn)) {
3662
+ // return isOn as () => boolean
3663
+ // }
3664
+ // return isOn as boolean
3665
+ // }
3666
+ /**
3667
+ * Check if toggle is disabled
3668
+ */
3669
+ isDisabled() {
3670
+ const { disabled: e } = this.props;
3671
+ return typeof e == "boolean" ? e : f(e) ? e() : !1;
3672
+ }
3673
+ // /**
3674
+ // * Get disabled state as signal or static value for DOM renderer
3675
+ // */
3676
+ // private getDisabledForDOM(): boolean | (() => boolean) {
3677
+ // const { disabled } = this.props
3678
+ // if (typeof disabled === 'boolean') return disabled
3679
+ // if (isSignal(disabled)) return disabled as () => boolean
3680
+ // return false
3681
+ // }
3682
+ /**
3683
+ * Resolve label content
3684
+ */
3685
+ resolveLabel() {
3686
+ const { label: e } = this.props;
3687
+ return e ? typeof e == "string" ? e : typeof e == "function" || f(e) ? e() : e : null;
3688
+ }
3689
+ /**
3690
+ * Helper to render component content safely
3691
+ */
3692
+ renderComponentContent(e) {
3693
+ const t = e.render();
3694
+ return Array.isArray(t) ? t : [t];
3695
+ }
3696
+ /**
3697
+ * Get toggle size styles
3698
+ */
3699
+ getSizeStyles() {
3700
+ const { size: e = "medium" } = this.props;
3701
+ switch (e) {
3702
+ case "small":
3703
+ return {
3704
+ width: "36px",
3705
+ height: "20px",
3706
+ thumbSize: "16px",
3707
+ fontSize: "14px"
3708
+ };
3709
+ case "large":
3710
+ return {
3711
+ width: "56px",
3712
+ height: "32px",
3713
+ thumbSize: "28px",
3714
+ fontSize: "18px"
3715
+ };
3716
+ default:
3717
+ return {
3718
+ width: "46px",
3719
+ height: "26px",
3720
+ thumbSize: "22px",
3721
+ fontSize: "16px"
3722
+ };
3723
+ }
3724
+ }
3725
+ /**
3726
+ * Render switch variant
3727
+ */
3728
+ renderSwitch() {
3729
+ const e = this.getIsOn(), t = this.isDisabled(), i = this.getSizeStyles(), {
3730
+ color: s = "#007AFF",
3731
+ offColor: n = "#e2e8f0",
3732
+ thumbColor: o = "#ffffff",
3733
+ animated: a = !0
3734
+ } = this.props, l = e ? s : n, u = e ? `translateX(${parseInt(i.width) - parseInt(i.thumbSize) - 2}px)` : "translateX(2px)";
3735
+ return d(
3736
+ "div",
3737
+ {
3738
+ style: {
3739
+ position: "relative",
3740
+ display: "inline-block"
3741
+ }
3742
+ },
3743
+ // Hidden input for form integration
3744
+ d("input", {
3745
+ ref: (c) => {
3746
+ this.toggleElement = c, c && !this.mounted && (c.addEventListener("change", this.handleToggle), this.cleanup.push(() => {
3747
+ c.removeEventListener("change", this.handleToggle);
3748
+ }));
3749
+ },
3750
+ type: "checkbox",
3751
+ checked: e,
3752
+ disabled: t,
3753
+ style: {
3754
+ position: "absolute",
3755
+ opacity: 0,
3756
+ width: "100%",
3757
+ height: "100%",
3758
+ margin: 0,
3759
+ cursor: t ? "not-allowed" : "pointer"
3760
+ },
3761
+ "aria-label": this.props.accessibilityLabel,
3762
+ "aria-describedby": this.props.accessibilityHint ? `${this.id}-hint` : void 0
3763
+ }),
3764
+ // Switch track
3765
+ d(
3766
+ "div",
3767
+ {
3768
+ style: {
3769
+ width: i.width,
3770
+ height: i.height,
3771
+ backgroundColor: l,
3772
+ borderRadius: i.height,
3773
+ position: "relative",
3774
+ cursor: t ? "not-allowed" : "pointer",
3775
+ opacity: t ? 0.5 : 1,
3776
+ transition: a ? "background-color 0.2s ease" : "none",
3777
+ border: "1px solid rgba(0,0,0,0.1)",
3778
+ boxShadow: "inset 0 1px 2px rgba(0,0,0,0.1)"
3779
+ },
3780
+ onClick: this.handleToggle
3781
+ },
3782
+ // Switch thumb
3783
+ d("div", {
3784
+ style: {
3785
+ width: i.thumbSize,
3786
+ height: i.thumbSize,
3787
+ backgroundColor: o,
3788
+ borderRadius: "50%",
3789
+ position: "absolute",
3790
+ top: "50%",
3791
+ transform: `translateY(-50%) ${u}`,
3792
+ transition: a ? "transform 0.2s ease" : "none",
3793
+ boxShadow: "0 2px 4px rgba(0,0,0,0.2)",
3794
+ border: "1px solid rgba(0,0,0,0.1)"
3795
+ }
3796
+ })
3797
+ )
3798
+ );
3799
+ }
3800
+ /**
3801
+ * Render checkbox variant
3802
+ */
3803
+ renderCheckbox() {
3804
+ const e = this.getIsOn(), t = this.isDisabled(), i = this.getSizeStyles(), { color: s = "#007AFF" } = this.props;
3805
+ return d(
3806
+ "div",
3807
+ {
3808
+ style: {
3809
+ position: "relative",
3810
+ display: "inline-block"
3811
+ }
3812
+ },
3813
+ // Hidden input
3814
+ d("input", {
3815
+ ref: (n) => {
3816
+ this.toggleElement = n, n && !this.mounted && (n.addEventListener("change", this.handleToggle), this.cleanup.push(() => {
3817
+ n.removeEventListener("change", this.handleToggle);
3818
+ }));
3819
+ },
3820
+ type: "checkbox",
3821
+ checked: e,
3822
+ disabled: t,
3823
+ style: {
3824
+ position: "absolute",
3825
+ opacity: 0,
3826
+ width: "100%",
3827
+ height: "100%",
3828
+ margin: 0,
3829
+ cursor: t ? "not-allowed" : "pointer"
3830
+ }
3831
+ }),
3832
+ // Checkbox visual
3833
+ d(
3834
+ "div",
3835
+ {
3836
+ style: {
3837
+ width: i.thumbSize,
3838
+ height: i.thumbSize,
3839
+ border: `2px solid ${e ? s : "#d1d5db"}`,
3840
+ borderRadius: "4px",
3841
+ backgroundColor: e ? s : "#ffffff",
3842
+ display: "flex",
3843
+ alignItems: "center",
3844
+ justifyContent: "center",
3845
+ cursor: t ? "not-allowed" : "pointer",
3846
+ opacity: t ? 0.5 : 1,
3847
+ transition: "all 0.2s ease"
3848
+ },
3849
+ onClick: this.handleToggle
3850
+ },
3851
+ ...e ? [
3852
+ // Checkmark
3853
+ d("div", {
3854
+ style: {
3855
+ width: "6px",
3856
+ height: "10px",
3857
+ border: "2px solid white",
3858
+ borderTop: "none",
3859
+ borderLeft: "none",
3860
+ transform: "rotate(45deg) translateY(-1px)",
3861
+ opacity: e ? 1 : 0,
3862
+ transition: "opacity 0.1s ease"
3863
+ }
3864
+ })
3865
+ ] : []
3866
+ )
3867
+ );
3868
+ }
3869
+ /**
3870
+ * Render button variant
3871
+ */
3872
+ renderButton() {
3873
+ const e = this.getIsOn(), t = this.isDisabled(), i = this.getSizeStyles(), { color: s = "#007AFF", offColor: n = "#f3f4f6" } = this.props;
3874
+ return d(
3875
+ "button",
3876
+ {
3877
+ ref: (o) => {
3878
+ o && !this.mounted && (o.addEventListener("click", this.handleToggle), this.cleanup.push(() => {
3879
+ o.removeEventListener("click", this.handleToggle);
3880
+ }));
3881
+ },
3882
+ type: "button",
3883
+ disabled: t,
3884
+ style: {
3885
+ padding: "8px 16px",
3886
+ backgroundColor: e ? s : n,
3887
+ color: e ? "#ffffff" : "#374151",
3888
+ border: `1px solid ${e ? s : "#d1d5db"}`,
3889
+ borderRadius: "6px",
3890
+ fontSize: i.fontSize,
3891
+ fontWeight: "500",
3892
+ cursor: t ? "not-allowed" : "pointer",
3893
+ opacity: t ? 0.5 : 1,
3894
+ transition: "all 0.2s ease",
3895
+ outline: "none"
3896
+ },
3897
+ "aria-pressed": e,
3898
+ "aria-label": this.props.accessibilityLabel
3899
+ },
3900
+ S(e ? "ON" : "OFF")
3901
+ );
3902
+ }
3903
+ /**
3904
+ * Render toggle control based on variant
3905
+ */
3906
+ renderToggleControl() {
3907
+ const { variant: e = "switch" } = this.props;
3908
+ switch (e) {
3909
+ case "checkbox":
3910
+ return this.renderCheckbox();
3911
+ case "button":
3912
+ return this.renderButton();
3913
+ default:
3914
+ return this.renderSwitch();
3915
+ }
3916
+ }
3917
+ /**
3918
+ * Render label content
3919
+ */
3920
+ renderLabel() {
3921
+ const e = this.resolveLabel();
3922
+ if (!e) return null;
3923
+ const t = this.getSizeStyles();
3924
+ return d(
3925
+ "span",
3926
+ {
3927
+ style: {
3928
+ fontSize: t.fontSize,
3929
+ color: this.isDisabled() ? "#9ca3af" : "#374151",
3930
+ cursor: this.isDisabled() ? "not-allowed" : "pointer"
3931
+ },
3932
+ onClick: this.isDisabled() ? void 0 : this.handleToggle
3933
+ },
3934
+ ...typeof e == "string" ? [S(e)] : this.renderComponentContent(e)
3935
+ );
3936
+ }
3937
+ render() {
3938
+ const { labelPosition: e = "trailing", spacing: t = 8, accessibilityHint: i } = this.props, s = this.renderLabel(), n = this.renderToggleControl(), o = e === "leading" && s ? [s, n] : s ? [n, s] : [n];
3939
+ return d(
3940
+ "div",
3941
+ {
3942
+ style: {
3943
+ display: "flex",
3944
+ alignItems: "center",
3945
+ gap: s ? `${t}px` : "0",
3946
+ cursor: this.isDisabled() ? "not-allowed" : "pointer"
3947
+ },
3948
+ "aria-describedby": i ? `${this.id}-hint` : void 0
3949
+ },
3950
+ ...o,
3951
+ ...i ? [
3952
+ d(
3953
+ "div",
3954
+ {
3955
+ id: `${this.id}-hint`,
3956
+ style: {
3957
+ fontSize: "12px",
3958
+ color: "#6b7280",
3959
+ marginTop: "4px",
3960
+ display: "block",
3961
+ width: "100%"
3962
+ }
3963
+ },
3964
+ S(i)
3965
+ )
3966
+ ] : []
3967
+ );
3968
+ }
3969
+ }
3970
+ function O(r, e = {}) {
3971
+ const t = { ...e, isOn: r }, i = new Je(t);
3972
+ return I(i);
3973
+ }
3974
+ function ae(r, e, t = {}) {
3975
+ return O(e, { ...t, label: r });
3976
+ }
3977
+ const kt = {
3978
+ /**
3979
+ * Switch toggle (default)
3980
+ */
3981
+ Switch(r, e = {}) {
3982
+ return O(r, { ...e, variant: "switch" });
3983
+ },
3984
+ /**
3985
+ * Checkbox toggle
3986
+ */
3987
+ Checkbox(r, e = {}) {
3988
+ return O(r, { ...e, variant: "checkbox" });
3989
+ },
3990
+ /**
3991
+ * Button toggle
3992
+ */
3993
+ Button(r, e = {}) {
3994
+ return O(r, { ...e, variant: "button" });
3995
+ },
3996
+ /**
3997
+ * Small toggle
3998
+ */
3999
+ Small(r, e = {}) {
4000
+ return O(r, { ...e, size: "small" });
4001
+ },
4002
+ /**
4003
+ * Large toggle
4004
+ */
4005
+ Large(r, e = {}) {
4006
+ return O(r, { ...e, size: "large" });
4007
+ },
4008
+ /**
4009
+ * Custom color toggle
4010
+ */
4011
+ CustomColor(r, e, t = {}) {
4012
+ return O(r, { ...t, color: e });
4013
+ },
4014
+ /**
4015
+ * Toggle with leading label
4016
+ */
4017
+ WithLeadingLabel(r, e, t = {}) {
4018
+ return O(e, { ...t, label: r, labelPosition: "leading" });
4019
+ },
4020
+ /**
4021
+ * Toggle with trailing label (default)
4022
+ */
4023
+ WithTrailingLabel(r, e, t = {}) {
4024
+ return O(e, { ...t, label: r, labelPosition: "trailing" });
4025
+ }
4026
+ }, Et = {
4027
+ /**
4028
+ * Create a toggle group with multiple options
4029
+ */
4030
+ createGroup(r, e = {}) {
4031
+ return r.map(
4032
+ (t) => ae(t.label, t.isOn, {
4033
+ ...e,
4034
+ onToggle: t.onToggle
4035
+ })
4036
+ );
4037
+ },
4038
+ /**
4039
+ * Create exclusive toggle group (radio-like behavior)
4040
+ */
4041
+ createExclusiveGroup(r, e, t, i = {}) {
4042
+ const s = () => f(e) ? e() : e;
4043
+ return r.map(
4044
+ (n) => ae(n.label, s() === n.key, {
4045
+ ...i,
4046
+ onToggle: (o) => {
4047
+ o && t && t(n.key);
4048
+ }
4049
+ })
4050
+ );
4051
+ },
4052
+ /**
4053
+ * Batch toggle operations
4054
+ */
4055
+ batch: {
4056
+ /**
4057
+ * Toggle all items in a group
4058
+ */
4059
+ toggleAll(r, e) {
4060
+ r.forEach((t) => {
4061
+ t.onToggle && t.onToggle(e);
4062
+ });
4063
+ },
4064
+ /**
4065
+ * Get state of all toggles in a group
4066
+ */
4067
+ getStates(r) {
4068
+ return r.map((e) => f(e.isOn) ? e.isOn() : e.isOn);
4069
+ },
4070
+ /**
4071
+ * Check if all toggles are on
4072
+ */
4073
+ allOn(r) {
4074
+ return this.getStates(r).every((e) => e);
4075
+ },
4076
+ /**
4077
+ * Check if any toggle is on
4078
+ */
4079
+ anyOn(r) {
4080
+ return this.getStates(r).some((e) => e);
4081
+ }
4082
+ }
4083
+ };
18
4084
  export {
19
- a as BaseGridComponent,
20
- U as BasicForm,
21
- k as BasicFormImplementation,
22
- w as BasicFormStyles,
23
- M as BasicFormValidation,
24
- o as BasicInput,
25
- r as BasicInputStyles,
26
- i as BasicInputUtils,
27
- g as Button,
28
- u as ButtonStyles,
29
- G as Divider,
30
- H as DividerStyles,
31
- L as DividerUtils,
32
- E as EnhancedButton,
33
- c as EnhancedGrid,
34
- l as EnhancedGridRow,
35
- C as EnhancedImage,
36
- m as EnhancedLazyHGrid,
37
- d as EnhancedLazyVGrid,
38
- j as EnhancedList,
39
- ee as EnhancedPicker,
40
- ne as EnhancedScrollView,
41
- me as EnhancedSection,
42
- Fe as EnhancedToggle,
43
- q as For,
44
- A as ForEach,
45
- J as ForEachComponent,
46
- s as Grid,
47
- p as GridCSSGenerator,
48
- S as GridItem,
49
- h as GridRow,
50
- Ve as H1,
51
- Ce as H2,
52
- ve as H3,
53
- We as H4,
54
- ze as H5,
55
- De as H6,
56
- Pe as HStack,
57
- Re as HTML,
58
- v as Image,
59
- W as ImageContentModes,
60
- z as ImageStates,
61
- D as ImageUtils,
62
- be as Layout,
63
- f as LazyHGrid,
64
- x as LazyVGrid,
65
- R as Link,
66
- b as LinkUtils,
4085
+ ne as BaseGridComponent,
4086
+ X as BasicForm,
4087
+ Fe as BasicFormImplementation,
4088
+ ut as BasicFormStyles,
4089
+ ht as BasicFormValidation,
4090
+ Lt as BasicInput,
4091
+ Mt as BasicInputStyles,
4092
+ Ot as BasicInputUtils,
4093
+ Tt as Button,
4094
+ zt as ButtonStyles,
4095
+ pi as Divider,
4096
+ ui as DividerStyles,
4097
+ hi as DividerUtils,
4098
+ Dt as EnhancedButton,
4099
+ Le as EnhancedGrid,
4100
+ Me as EnhancedGridRow,
4101
+ Ft as EnhancedImage,
4102
+ Te as EnhancedLazyHGrid,
4103
+ Oe as EnhancedLazyVGrid,
4104
+ He as EnhancedList,
4105
+ qe as EnhancedPicker,
4106
+ fi as EnhancedScrollView,
4107
+ Ke as EnhancedSection,
4108
+ Je as EnhancedToggle,
4109
+ gt as For,
4110
+ pe as ForEach,
4111
+ mt as ForEachComponent,
4112
+ lt as Grid,
4113
+ y as GridCSSGenerator,
4114
+ at as GridItem,
4115
+ ct as GridRow,
4116
+ Gt as H1,
4117
+ Pt as H2,
4118
+ Vt as H3,
4119
+ _t as H4,
4120
+ Ht as H5,
4121
+ jt as H6,
4122
+ Nt as HStack,
4123
+ Bt as HTML,
4124
+ Wt as Image,
4125
+ Ut as ImageContentModes,
4126
+ qt as ImageStates,
4127
+ Yt as ImageUtils,
4128
+ Xt as Layout,
4129
+ pt as LazyHGrid,
4130
+ dt as LazyVGrid,
4131
+ ft as Link,
4132
+ P as LinkUtils,
67
4133
  K as List,
68
- N as ListUtils,
69
- Q as Menu,
70
- X as MenuStyles,
71
- Y as MenuUtils,
72
- te as Picker,
73
- oe as PickerStyles,
74
- re as PickerUtils,
75
- ae as ScrollView,
76
- ce as ScrollViewUtils,
77
- de as Section,
78
- se as SectionStyles,
79
- pe as SectionWithHeader,
80
- Se as SectionWithHeaderFooter,
81
- fe as Show,
82
- ue as Spacer,
83
- Te as Text,
84
- Be as TextFormat,
85
- Ge as TextStyles,
86
- Ie as Toggle,
87
- Ue as ToggleStyles,
88
- ke as ToggleUtils,
89
- we as ToggleWithLabel,
90
- He as Typography,
91
- xe as Unless,
92
- Ze as VStack,
93
- ye as When,
94
- je as ZStack,
95
- qe as createModifiableComponentFactory,
96
- Ae as createReactiveWrapper,
97
- T as defaultButtonTheme,
98
- F as defaultDividerTheme,
99
- _ as defaultMenuTheme,
100
- Je as withModifierSupport,
101
- Ke as withModifiers,
102
- Ne as wrapComponent
4134
+ bt as ListUtils,
4135
+ yt as Menu,
4136
+ xt as MenuStyles,
4137
+ St as MenuUtils,
4138
+ Q as Picker,
4139
+ vt as PickerStyles,
4140
+ Ct as PickerUtils,
4141
+ $e as ScrollView,
4142
+ mi as ScrollViewUtils,
4143
+ z as Section,
4144
+ It as SectionStyles,
4145
+ wt as SectionWithHeader,
4146
+ $t as SectionWithHeaderFooter,
4147
+ Kt as Show,
4148
+ Qt as Spacer,
4149
+ re as Text,
4150
+ Zt as TextFormat,
4151
+ Jt as TextStyles,
4152
+ O as Toggle,
4153
+ kt as ToggleStyles,
4154
+ Et as ToggleUtils,
4155
+ ae as ToggleWithLabel,
4156
+ ei as Typography,
4157
+ ti as Unless,
4158
+ ii as VStack,
4159
+ si as When,
4160
+ ni as ZStack,
4161
+ ri as createModifiableComponentFactory,
4162
+ oi as createReactiveWrapper,
4163
+ ai as defaultButtonTheme,
4164
+ gi as defaultDividerTheme,
4165
+ W as defaultMenuTheme,
4166
+ li as withModifierSupport,
4167
+ I as withModifiers,
4168
+ ci as wrapComponent
103
4169
  };
104
- //# sourceMappingURL=index.js.map