@tachui/core 0.7.1-alpha → 0.8.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 (286) hide show
  1. package/README.md +20 -2
  2. package/dist/bundles/assets.d.ts +19 -0
  3. package/dist/bundles/assets.d.ts.map +1 -0
  4. package/dist/bundles/common.d.ts +1 -1
  5. package/dist/bundles/common.d.ts.map +1 -1
  6. package/dist/bundles/context.d.ts +22 -0
  7. package/dist/bundles/context.d.ts.map +1 -0
  8. package/dist/bundles/minimal.d.ts +8 -18
  9. package/dist/bundles/minimal.d.ts.map +1 -1
  10. package/dist/bundles/production-minimal.d.ts +2 -16
  11. package/dist/bundles/production-minimal.d.ts.map +1 -1
  12. package/dist/common.js +405 -828
  13. package/dist/compiler/advanced-parser.d.ts.map +1 -1
  14. package/dist/compiler/codegen.d.ts.map +1 -1
  15. package/dist/compiler/index.js +6 -1387
  16. package/dist/compiler/parser.d.ts +1 -1
  17. package/dist/compiler/parser.d.ts.map +1 -1
  18. package/dist/compiler/plugin.d.ts.map +1 -1
  19. package/dist/compiler/types.d.ts +28 -0
  20. package/dist/compiler/types.d.ts.map +1 -1
  21. package/dist/component-XAzF1xqs.js +487 -0
  22. package/dist/component-base-x2XmHFjy.js +255 -0
  23. package/dist/components/index.d.ts +4 -38
  24. package/dist/components/index.d.ts.map +1 -1
  25. package/dist/components/index.js +7 -4167
  26. package/dist/components/wrapper.d.ts +5 -152
  27. package/dist/components/wrapper.d.ts.map +1 -1
  28. package/dist/concatenated-component-ByPl3_FF.js +2933 -0
  29. package/dist/constants/index.d.ts +1 -1
  30. package/dist/constants/layout.d.ts +47 -4
  31. package/dist/constants/layout.d.ts.map +1 -1
  32. package/dist/constants/layout.js +84 -0
  33. package/dist/css-classes/index.js +176 -0
  34. package/dist/{dom-bridge-Cx-s6Ihx.js → dom-bridge-CAa1N2zX.js} +28 -28
  35. package/dist/{effect-CytAc9em.js → effect-B9Knft0b.js} +3 -3
  36. package/dist/essential.js +397 -826
  37. package/dist/index-DEBd8cq7.js +1144 -0
  38. package/dist/index-DIvMCJQO.js +268 -0
  39. package/dist/index-vdsiw6gQ.js +777 -0
  40. package/dist/index.d.ts +9 -9
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +397 -826
  43. package/dist/minimal-prod.js +101 -155
  44. package/dist/minimal.js +118 -170
  45. package/dist/modifiers/background.d.ts +41 -11
  46. package/dist/modifiers/background.d.ts.map +1 -1
  47. package/dist/modifiers/base.d.ts +6 -33
  48. package/dist/modifiers/base.d.ts.map +1 -1
  49. package/dist/modifiers/base.js +487 -0
  50. package/dist/modifiers/builder.d.ts +103 -195
  51. package/dist/modifiers/builder.d.ts.map +1 -1
  52. package/dist/modifiers/builder.js +9 -0
  53. package/dist/modifiers/core.d.ts +9 -401
  54. package/dist/modifiers/core.d.ts.map +1 -1
  55. package/dist/modifiers/{utils.d.ts → factories.d.ts} +18 -5
  56. package/dist/modifiers/factories.d.ts.map +1 -0
  57. package/dist/modifiers/index.d.ts +8 -52
  58. package/dist/modifiers/index.d.ts.map +1 -1
  59. package/dist/modifiers/index.js +38 -0
  60. package/dist/modifiers/presets.d.ts +368 -0
  61. package/dist/modifiers/presets.d.ts.map +1 -0
  62. package/dist/modifiers/registry.js +10 -0
  63. package/dist/modifiers/types.d.ts +39 -211
  64. package/dist/modifiers/types.d.ts.map +1 -1
  65. package/dist/modifiers/types.js +4 -0
  66. package/dist/observed-object-Cos-FtjP.js +269 -0
  67. package/dist/performance-optimizer-stub-CtfXUwl4.js +38 -0
  68. package/dist/plugin-BCAdZXKq.js +1680 -0
  69. package/dist/plugins/index.d.ts +5 -6
  70. package/dist/plugins/index.d.ts.map +1 -1
  71. package/dist/plugins/index.js +147 -297
  72. package/dist/plugins/simplified-index.d.ts +5 -6
  73. package/dist/plugins/simplified-index.d.ts.map +1 -1
  74. package/dist/production-minimal-BY_gMc-l.js +2532 -0
  75. package/dist/reactive/index.js +96 -95
  76. package/dist/reactive/types.js +4 -0
  77. package/dist/runtime/concatenation-aria.d.ts +24 -0
  78. package/dist/runtime/concatenation-aria.d.ts.map +1 -0
  79. package/dist/runtime/concatenation-aria.js +53 -0
  80. package/dist/runtime/concatenation-full.d.ts +30 -0
  81. package/dist/runtime/concatenation-full.d.ts.map +1 -0
  82. package/dist/runtime/concatenation-full.js +77 -0
  83. package/dist/runtime/concatenation-minimal.d.ts +25 -0
  84. package/dist/runtime/concatenation-minimal.d.ts.map +1 -0
  85. package/dist/runtime/concatenation-minimal.js +40 -0
  86. package/dist/runtime/dom-bridge.js +5 -5
  87. package/dist/runtime/element-override.d.ts.map +1 -1
  88. package/dist/runtime/index.d.ts +0 -7
  89. package/dist/runtime/index.d.ts.map +1 -1
  90. package/dist/runtime/renderer.d.ts.map +1 -1
  91. package/dist/runtime/renderer.js +7 -8
  92. package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
  93. package/dist/runtime/types.js +1 -0
  94. package/dist/{scheduler-7SvC3a21.js → scheduler-BKeqwrYE.js} +130 -130
  95. package/dist/validation/build-time-stub.d.ts +33 -0
  96. package/dist/validation/build-time-stub.d.ts.map +1 -0
  97. package/dist/validation/debug-tools-stub.d.ts +67 -0
  98. package/dist/validation/debug-tools-stub.d.ts.map +1 -0
  99. package/dist/validation/index.d.ts +23 -78
  100. package/dist/validation/index.d.ts.map +1 -1
  101. package/dist/validation/index.js +609 -6470
  102. package/dist/validation/lifecycle-validation.d.ts.map +1 -1
  103. package/dist/validation/performance-optimizer-stub.d.ts +50 -0
  104. package/dist/validation/performance-optimizer-stub.d.ts.map +1 -0
  105. package/dist/validation/plugin-registration.d.ts +5 -1
  106. package/dist/validation/plugin-registration.d.ts.map +1 -1
  107. package/dist/validation/production-bypass-core.d.ts +69 -0
  108. package/dist/validation/production-bypass-core.d.ts.map +1 -0
  109. package/package.json +61 -5
  110. package/dist/ScrollView-h-6wYMAm.js +0 -515
  111. package/dist/Spacer-BbteDQ9I.js +0 -5337
  112. package/dist/binding-CmdpowkI.js +0 -2276
  113. package/dist/components/BasicInput.d.ts +0 -116
  114. package/dist/components/BasicInput.d.ts.map +0 -1
  115. package/dist/components/Button.d.ts +0 -252
  116. package/dist/components/Button.d.ts.map +0 -1
  117. package/dist/components/Divider.d.ts +0 -141
  118. package/dist/components/Divider.d.ts.map +0 -1
  119. package/dist/components/EnhancedLink.d.ts +0 -365
  120. package/dist/components/EnhancedLink.d.ts.map +0 -1
  121. package/dist/components/Form.d.ts +0 -141
  122. package/dist/components/Form.d.ts.map +0 -1
  123. package/dist/components/Grid.d.ts +0 -698
  124. package/dist/components/Grid.d.ts.map +0 -1
  125. package/dist/components/GridResponsive.d.ts +0 -214
  126. package/dist/components/GridResponsive.d.ts.map +0 -1
  127. package/dist/components/Image.d.ts +0 -162
  128. package/dist/components/Image.d.ts.map +0 -1
  129. package/dist/components/List.d.ts +0 -287
  130. package/dist/components/List.d.ts.map +0 -1
  131. package/dist/components/Menu.d.ts +0 -159
  132. package/dist/components/Menu.d.ts.map +0 -1
  133. package/dist/components/Picker.d.ts +0 -153
  134. package/dist/components/Picker.d.ts.map +0 -1
  135. package/dist/components/ScrollView.d.ts +0 -222
  136. package/dist/components/ScrollView.d.ts.map +0 -1
  137. package/dist/components/Section.d.ts +0 -153
  138. package/dist/components/Section.d.ts.map +0 -1
  139. package/dist/components/Show.d.ts +0 -64
  140. package/dist/components/Show.d.ts.map +0 -1
  141. package/dist/components/Spacer.d.ts +0 -35
  142. package/dist/components/Spacer.d.ts.map +0 -1
  143. package/dist/components/Text.d.ts +0 -242
  144. package/dist/components/Text.d.ts.map +0 -1
  145. package/dist/components/Toggle.d.ts +0 -207
  146. package/dist/components/Toggle.d.ts.map +0 -1
  147. package/dist/concatenated-component-DPcl2TEO.js +0 -6779
  148. package/dist/context--zQFIImS.js +0 -283
  149. package/dist/debug/index.d.ts +0 -61
  150. package/dist/debug/index.d.ts.map +0 -1
  151. package/dist/debug.js +0 -178
  152. package/dist/developer-experience/enhanced-errors.d.ts +0 -128
  153. package/dist/developer-experience/enhanced-errors.d.ts.map +0 -1
  154. package/dist/developer-experience/enhanced-types.d.ts +0 -281
  155. package/dist/developer-experience/enhanced-types.d.ts.map +0 -1
  156. package/dist/developer-experience/index.d.ts +0 -44
  157. package/dist/developer-experience/index.d.ts.map +0 -1
  158. package/dist/index-Nfi2SBQh.js +0 -3268
  159. package/dist/modifiers/attributes.d.ts +0 -203
  160. package/dist/modifiers/attributes.d.ts.map +0 -1
  161. package/dist/modifiers/backdrop.d.ts +0 -59
  162. package/dist/modifiers/backdrop.d.ts.map +0 -1
  163. package/dist/modifiers/border.d.ts +0 -217
  164. package/dist/modifiers/border.d.ts.map +0 -1
  165. package/dist/modifiers/effects.d.ts +0 -159
  166. package/dist/modifiers/effects.d.ts.map +0 -1
  167. package/dist/modifiers/elements.d.ts +0 -240
  168. package/dist/modifiers/elements.d.ts.map +0 -1
  169. package/dist/modifiers/filters.d.ts +0 -275
  170. package/dist/modifiers/filters.d.ts.map +0 -1
  171. package/dist/modifiers/flexbox.d.ts +0 -82
  172. package/dist/modifiers/flexbox.d.ts.map +0 -1
  173. package/dist/modifiers/font.d.ts +0 -71
  174. package/dist/modifiers/font.d.ts.map +0 -1
  175. package/dist/modifiers/grid.d.ts +0 -92
  176. package/dist/modifiers/grid.d.ts.map +0 -1
  177. package/dist/modifiers/margin.d.ts +0 -128
  178. package/dist/modifiers/margin.d.ts.map +0 -1
  179. package/dist/modifiers/padding.d.ts +0 -204
  180. package/dist/modifiers/padding.d.ts.map +0 -1
  181. package/dist/modifiers/responsive/advanced-utilities.d.ts +0 -118
  182. package/dist/modifiers/responsive/advanced-utilities.d.ts.map +0 -1
  183. package/dist/modifiers/responsive/breakpoints.d.ts +0 -81
  184. package/dist/modifiers/responsive/breakpoints.d.ts.map +0 -1
  185. package/dist/modifiers/responsive/css-generator.d.ts +0 -100
  186. package/dist/modifiers/responsive/css-generator.d.ts.map +0 -1
  187. package/dist/modifiers/responsive/dev-tools.d.ts +0 -107
  188. package/dist/modifiers/responsive/dev-tools.d.ts.map +0 -1
  189. package/dist/modifiers/responsive/index.d.ts +0 -29
  190. package/dist/modifiers/responsive/index.d.ts.map +0 -1
  191. package/dist/modifiers/responsive/layout-patterns.d.ts +0 -230
  192. package/dist/modifiers/responsive/layout-patterns.d.ts.map +0 -1
  193. package/dist/modifiers/responsive/performance.d.ts +0 -130
  194. package/dist/modifiers/responsive/performance.d.ts.map +0 -1
  195. package/dist/modifiers/responsive/responsive-builder.d.ts +0 -133
  196. package/dist/modifiers/responsive/responsive-builder.d.ts.map +0 -1
  197. package/dist/modifiers/responsive/responsive-modifier.d.ts +0 -123
  198. package/dist/modifiers/responsive/responsive-modifier.d.ts.map +0 -1
  199. package/dist/modifiers/responsive/types.d.ts +0 -183
  200. package/dist/modifiers/responsive/types.d.ts.map +0 -1
  201. package/dist/modifiers/responsive/utilities.d.ts +0 -149
  202. package/dist/modifiers/responsive/utilities.d.ts.map +0 -1
  203. package/dist/modifiers/scroll.d.ts +0 -143
  204. package/dist/modifiers/scroll.d.ts.map +0 -1
  205. package/dist/modifiers/shadows.d.ts +0 -114
  206. package/dist/modifiers/shadows.d.ts.map +0 -1
  207. package/dist/modifiers/size.d.ts +0 -113
  208. package/dist/modifiers/size.d.ts.map +0 -1
  209. package/dist/modifiers/text.d.ts +0 -147
  210. package/dist/modifiers/text.d.ts.map +0 -1
  211. package/dist/modifiers/transformations.d.ts +0 -329
  212. package/dist/modifiers/transformations.d.ts.map +0 -1
  213. package/dist/modifiers/transitions.d.ts +0 -98
  214. package/dist/modifiers/transitions.d.ts.map +0 -1
  215. package/dist/modifiers/typography.d.ts +0 -192
  216. package/dist/modifiers/typography.d.ts.map +0 -1
  217. package/dist/modifiers/utility.d.ts +0 -69
  218. package/dist/modifiers/utility.d.ts.map +0 -1
  219. package/dist/modifiers/utils.d.ts.map +0 -1
  220. package/dist/plugins/simplified-error-handler.d.ts +0 -83
  221. package/dist/plugins/simplified-error-handler.d.ts.map +0 -1
  222. package/dist/runtime/dev-tools.d.ts +0 -240
  223. package/dist/runtime/dev-tools.d.ts.map +0 -1
  224. package/dist/runtime/development-warnings.d.ts +0 -42
  225. package/dist/runtime/development-warnings.d.ts.map +0 -1
  226. package/dist/runtime/error-boundary.d.ts +0 -302
  227. package/dist/runtime/error-boundary.d.ts.map +0 -1
  228. package/dist/runtime/error-recovery.d.ts +0 -267
  229. package/dist/runtime/error-recovery.d.ts.map +0 -1
  230. package/dist/runtime/error-reporting.d.ts +0 -287
  231. package/dist/runtime/error-reporting.d.ts.map +0 -1
  232. package/dist/runtime/error-utils.d.ts +0 -204
  233. package/dist/runtime/error-utils.d.ts.map +0 -1
  234. package/dist/runtime/performance.d.ts +0 -217
  235. package/dist/runtime/performance.d.ts.map +0 -1
  236. package/dist/sui-compat.d.ts +0 -110
  237. package/dist/sui-compat.d.ts.map +0 -1
  238. package/dist/validation/advanced-debugging.d.ts +0 -319
  239. package/dist/validation/advanced-debugging.d.ts.map +0 -1
  240. package/dist/validation/build-time/detection.d.ts +0 -32
  241. package/dist/validation/build-time/detection.d.ts.map +0 -1
  242. package/dist/validation/build-time/index.d.ts +0 -84
  243. package/dist/validation/build-time/index.d.ts.map +0 -1
  244. package/dist/validation/build-time/plugins.d.ts +0 -75
  245. package/dist/validation/build-time/plugins.d.ts.map +0 -1
  246. package/dist/validation/build-time/rules.d.ts +0 -73
  247. package/dist/validation/build-time/rules.d.ts.map +0 -1
  248. package/dist/validation/build-time/transformer.d.ts +0 -23
  249. package/dist/validation/build-time/transformer.d.ts.map +0 -1
  250. package/dist/validation/build-time/types.d.ts +0 -212
  251. package/dist/validation/build-time/types.d.ts.map +0 -1
  252. package/dist/validation/comprehensive.d.ts +0 -160
  253. package/dist/validation/comprehensive.d.ts.map +0 -1
  254. package/dist/validation/debug-tools.d.ts +0 -251
  255. package/dist/validation/debug-tools.d.ts.map +0 -1
  256. package/dist/validation/developer-experience.d.ts +0 -243
  257. package/dist/validation/developer-experience.d.ts.map +0 -1
  258. package/dist/validation/documentation-integration.d.ts +0 -269
  259. package/dist/validation/documentation-integration.d.ts.map +0 -1
  260. package/dist/validation/enhanced-runtime.d.ts +0 -279
  261. package/dist/validation/enhanced-runtime.d.ts.map +0 -1
  262. package/dist/validation/error-reporting.d.ts +0 -186
  263. package/dist/validation/error-reporting.d.ts.map +0 -1
  264. package/dist/validation/ide-integration.d.ts +0 -328
  265. package/dist/validation/ide-integration.d.ts.map +0 -1
  266. package/dist/validation/performance-optimizer.d.ts +0 -218
  267. package/dist/validation/performance-optimizer.d.ts.map +0 -1
  268. package/dist/validation/production-bypass.d.ts +0 -175
  269. package/dist/validation/production-bypass.d.ts.map +0 -1
  270. package/dist/validation/simple.d.ts +0 -111
  271. package/dist/validation/simple.d.ts.map +0 -1
  272. package/dist/viewport/adapters/web-adapter.d.ts +0 -227
  273. package/dist/viewport/adapters/web-adapter.d.ts.map +0 -1
  274. package/dist/viewport/components.d.ts +0 -131
  275. package/dist/viewport/components.d.ts.map +0 -1
  276. package/dist/viewport/environment.d.ts +0 -75
  277. package/dist/viewport/environment.d.ts.map +0 -1
  278. package/dist/viewport/index.d.ts +0 -138
  279. package/dist/viewport/index.d.ts.map +0 -1
  280. package/dist/viewport/index.js +0 -2085
  281. package/dist/viewport/platform-detection.d.ts +0 -59
  282. package/dist/viewport/platform-detection.d.ts.map +0 -1
  283. package/dist/viewport/types.d.ts +0 -301
  284. package/dist/viewport/types.d.ts.map +0 -1
  285. package/dist/viewport/viewport-manager.d.ts +0 -118
  286. package/dist/viewport/viewport-manager.d.ts.map +0 -1
@@ -62,12 +62,7 @@ export declare class LayoutModifier extends BaseModifier {
62
62
  readonly type = "layout";
63
63
  readonly priority = ModifierPriority.LAYOUT;
64
64
  apply(node: DOMNode, context: ModifierContext): DOMNode | undefined;
65
- private applyOffsetTransform;
66
- private applyAspectRatio;
67
- private applyScaleTransform;
68
65
  private applyAbsolutePosition;
69
- private applyZIndex;
70
- private getTransformOrigin;
71
66
  private computeLayoutStyles;
72
67
  }
73
68
  /**
@@ -86,6 +81,11 @@ export declare class AppearanceModifier extends BaseModifier {
86
81
  */
87
82
  private isAsset;
88
83
  private computeAppearanceStyles;
84
+ /**
85
+ * Apply HTML attributes (ARIA, role, data attributes, etc.)
86
+ */
87
+ private applyAttributes;
88
+ private findComponentFromElement;
89
89
  }
90
90
  /**
91
91
  * Interaction modifier for events and accessibility
@@ -94,30 +94,6 @@ export declare class InteractionModifier extends BaseModifier {
94
94
  readonly type = "interaction";
95
95
  readonly priority = ModifierPriority.INTERACTION;
96
96
  apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
97
- /**
98
- * Setup long press gesture with timing and distance constraints
99
- */
100
- private setupLongPressGesture;
101
- /**
102
- * Setup keyboard shortcut handling
103
- */
104
- private setupKeyboardShortcut;
105
- /**
106
- * Setup focus management with reactive binding
107
- */
108
- private setupFocusManagement;
109
- /**
110
- * Setup focusable behavior
111
- */
112
- private setupFocusable;
113
- /**
114
- * Setup continuous hover tracking with coordinates
115
- */
116
- private setupContinuousHover;
117
- /**
118
- * Setup hit testing control
119
- */
120
- private setupHitTesting;
121
97
  }
122
98
  /**
123
99
  * Animation modifier for transitions and animations
@@ -126,8 +102,6 @@ export declare class AnimationModifier extends BaseModifier {
126
102
  readonly type = "animation";
127
103
  readonly priority = ModifierPriority.ANIMATION;
128
104
  apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
129
- private applyOverlay;
130
- private getOverlayAlignment;
131
105
  private createKeyframeRule;
132
106
  private addKeyframesToStylesheet;
133
107
  }
@@ -139,9 +113,8 @@ export declare class LifecycleModifier extends BaseModifier {
139
113
  readonly priority = ModifierPriority.CUSTOM;
140
114
  private activeAbortController?;
141
115
  apply(_node: DOMNode, context: ModifierContext): DOMNode | undefined;
142
- private setupLifecycleObserver;
143
116
  private setupTask;
144
- private setupRefreshable;
117
+ private setupViewportObserver;
145
118
  private addCleanup;
146
119
  }
147
120
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base.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KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CA8NrE;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,eAAc;IAC3B,QAAQ,CAAC,QAAQ,8BAA6B;IAE9C,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;IAqGpE,OAAO,CAAC,kBAAkB;IAmB1B,OAAO,CAAC,wBAAwB;CAajC;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,eAAc;IAC3B,QAAQ,CAAC,QAAQ,2BAA0B;IAE3C,OAAO,CAAC,qBAAqB,CAAC,CAAiB;IAE/C,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;IAuBpE,OAAO,CAAC,SAAS;IAsCjB,OAAO,CAAC,qBAAqB;IAwB7B,OAAO,CAAC,UAAU;CAOnB;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,eAAc;IAC3B,QAAQ,CAAC,QAAQ,+BAA8B;IAE/C,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAWrE"}
@@ -0,0 +1,487 @@
1
+ import { J as p, i as v, M as E } from "../scheduler-BKeqwrYE.js";
2
+ import { c as h } from "../effect-B9Knft0b.js";
3
+ import { ModifierPriority as g } from "./types.js";
4
+ import { shouldExpandForInfinity as L, dimensionToCSS as u, isInfinity as m } from "../constants/layout.js";
5
+ var A = Object.defineProperty, T = (d, i, t) => i in d ? A(d, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[i] = t, l = (d, i, t) => T(d, typeof i != "symbol" ? i + "" : i, t);
6
+ class y {
7
+ constructor(i) {
8
+ this.properties = i;
9
+ }
10
+ /**
11
+ * Helper to resolve reactive properties
12
+ */
13
+ resolveReactiveProps(i, t) {
14
+ const e = {};
15
+ for (const [n, r] of Object.entries(i))
16
+ p(r) || v(r), e[n] = r;
17
+ return e;
18
+ }
19
+ /**
20
+ * Apply a single style change to an element with reactive support
21
+ */
22
+ applyStyleChange(i, t, e) {
23
+ if (i instanceof HTMLElement) {
24
+ const n = this.toCSSProperty(t);
25
+ if (p(e) || v(e))
26
+ h(() => {
27
+ const r = e(), o = String(r);
28
+ if (o.includes("!important")) {
29
+ const a = o.replace(/\s*!important\s*$/, "").trim();
30
+ i.style.setProperty(n, a, "important");
31
+ } else
32
+ i.style.setProperty(n, o);
33
+ });
34
+ else {
35
+ const r = String(e);
36
+ if (r.includes("!important")) {
37
+ const o = r.replace(/\s*!important\s*$/, "").trim();
38
+ i.style.setProperty(n, o, "important");
39
+ } else
40
+ i.style.setProperty(n, r);
41
+ }
42
+ }
43
+ }
44
+ /**
45
+ * Convert camelCase property to CSS kebab-case
46
+ */
47
+ toCSSProperty(i) {
48
+ return i.replace(/([A-Z])/g, "-$1").toLowerCase();
49
+ }
50
+ /**
51
+ * Convert value to CSS value string
52
+ */
53
+ toCSSValue(i) {
54
+ return typeof i == "number" ? `${i}px` : String(i);
55
+ }
56
+ /**
57
+ * Convert value to CSS value string with property-specific handling
58
+ */
59
+ toCSSValueForProperty(i, t) {
60
+ return typeof t == "number" ? [
61
+ "opacity",
62
+ "z-index",
63
+ "line-height",
64
+ "flex-grow",
65
+ "flex-shrink",
66
+ "order",
67
+ "column-count",
68
+ "font-weight"
69
+ ].includes(i) ? String(t) : `${t}px` : ([
70
+ "filter",
71
+ // CSS filter strings should not be processed
72
+ "transform",
73
+ // CSS transform strings
74
+ "clip-path"
75
+ // CSS clip-path strings
76
+ ].includes(i), String(t));
77
+ }
78
+ /**
79
+ * Apply multiple CSS properties to an element with reactive support
80
+ */
81
+ applyStyles(i, t) {
82
+ if (i instanceof HTMLElement || i.style) {
83
+ const e = (i instanceof HTMLElement, i.style);
84
+ for (const [n, r] of Object.entries(t))
85
+ if (r !== void 0) {
86
+ const o = this.toCSSProperty(n);
87
+ if (p(r) || v(r))
88
+ h(() => {
89
+ const a = r(), s = this.toCSSValueForProperty(
90
+ o,
91
+ a
92
+ );
93
+ if (e.setProperty)
94
+ if (typeof s == "string" && s.includes("!important")) {
95
+ const f = s.replace(/\s*!important\s*$/, "").trim();
96
+ e.setProperty(o, f, "important");
97
+ } else
98
+ e.setProperty(o, s);
99
+ else
100
+ e[o] = s;
101
+ });
102
+ else {
103
+ const a = this.toCSSValueForProperty(o, r);
104
+ if (e.setProperty)
105
+ if (typeof a == "string" && a.includes("!important")) {
106
+ const s = a.replace(/\s*!important\s*$/, "").trim();
107
+ e.setProperty(o, s, "important");
108
+ } else
109
+ e.setProperty(o, a);
110
+ else
111
+ e[o] = a;
112
+ }
113
+ }
114
+ }
115
+ }
116
+ /**
117
+ * Add CSS classes to an element
118
+ */
119
+ addClasses(i, t) {
120
+ i instanceof HTMLElement && i.classList.add(...t);
121
+ }
122
+ /**
123
+ * Remove CSS classes from an element
124
+ */
125
+ removeClasses(i, t) {
126
+ i instanceof HTMLElement && i.classList.remove(...t);
127
+ }
128
+ /**
129
+ * Create a style computation context
130
+ */
131
+ createStyleContext(i, t, e) {
132
+ return {
133
+ componentId: i,
134
+ element: t,
135
+ modifiers: e,
136
+ signals: /* @__PURE__ */ new Set(),
137
+ cleanup: []
138
+ };
139
+ }
140
+ }
141
+ class k extends y {
142
+ constructor() {
143
+ super(...arguments), l(this, "type", "layout"), l(this, "priority", g.LAYOUT);
144
+ }
145
+ apply(i, t) {
146
+ if (!i.element || !t.element) return;
147
+ const e = this.createStyleContext(
148
+ t.componentId,
149
+ t.element,
150
+ []
151
+ ), n = this.computeLayoutStyles(
152
+ this.properties,
153
+ e
154
+ );
155
+ this.applyStyles(t.element, n);
156
+ const r = this.properties;
157
+ r.position && t.element instanceof HTMLElement && this.applyAbsolutePosition(t.element, r.position);
158
+ }
159
+ // Layout modifier implementations have been migrated to @tachui/modifiers/layout
160
+ applyAbsolutePosition(i, t) {
161
+ const { x: e, y: n } = t, r = e ?? "auto", o = n ?? "auto";
162
+ i.style.left = this.toCSSValue(r), i.style.top = this.toCSSValue(o);
163
+ }
164
+ computeLayoutStyles(i, t) {
165
+ const e = {};
166
+ if (i.frame) {
167
+ const n = i.frame, r = L(n);
168
+ if (Object.assign(e, r.cssProps), n.width !== void 0) {
169
+ const o = u(n.width);
170
+ o !== void 0 && !m(n.width) && !r.expandWidth && (e.width = o);
171
+ }
172
+ if (n.height !== void 0) {
173
+ const o = u(n.height);
174
+ o !== void 0 && !m(n.height) && !r.expandHeight && (e.height = o);
175
+ }
176
+ if (n.minWidth !== void 0) {
177
+ const o = u(n.minWidth);
178
+ o !== void 0 && (e.minWidth = o);
179
+ }
180
+ if (n.maxWidth !== void 0 && !m(n.maxWidth)) {
181
+ const o = u(n.maxWidth);
182
+ o !== void 0 && (e.maxWidth = o);
183
+ } else m(n.maxWidth) && (e.maxWidth = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
184
+ if (n.minHeight !== void 0) {
185
+ const o = u(n.minHeight);
186
+ o !== void 0 && (e.minHeight = o);
187
+ }
188
+ if (n.maxHeight !== void 0 && !m(n.maxHeight)) {
189
+ const o = u(n.maxHeight);
190
+ o !== void 0 && (e.maxHeight = o);
191
+ } else m(n.maxHeight) && (e.maxHeight = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
192
+ }
193
+ if (i.padding !== void 0)
194
+ if (typeof i.padding == "number")
195
+ e.padding = this.toCSSValue(i.padding);
196
+ else {
197
+ const n = i.padding;
198
+ n.top !== void 0 && (e.paddingTop = this.toCSSValue(n.top)), n.right !== void 0 && (e.paddingRight = this.toCSSValue(n.right)), n.bottom !== void 0 && (e.paddingBottom = this.toCSSValue(n.bottom)), n.left !== void 0 && (e.paddingLeft = this.toCSSValue(n.left));
199
+ }
200
+ if (i.margin !== void 0)
201
+ if (typeof i.margin == "number")
202
+ e.margin = this.toCSSValue(i.margin);
203
+ else {
204
+ const n = i.margin;
205
+ n.top !== void 0 && (e.marginTop = this.toCSSValue(n.top)), n.right !== void 0 && (e.marginRight = this.toCSSValue(n.right)), n.bottom !== void 0 && (e.marginBottom = this.toCSSValue(n.bottom)), n.left !== void 0 && (e.marginLeft = this.toCSSValue(n.left));
206
+ }
207
+ if (i.alignment)
208
+ switch (i.alignment) {
209
+ case "leading":
210
+ e.textAlign = "left", e.alignItems = "flex-start";
211
+ break;
212
+ case "center":
213
+ e.textAlign = "center", e.alignItems = "center";
214
+ break;
215
+ case "trailing":
216
+ e.textAlign = "right", e.alignItems = "flex-end";
217
+ break;
218
+ case "top":
219
+ e.alignItems = "flex-start";
220
+ break;
221
+ case "bottom":
222
+ e.alignItems = "flex-end";
223
+ break;
224
+ }
225
+ if (i.layoutPriority !== void 0) {
226
+ const n = Number(i.layoutPriority);
227
+ n > 0 ? (e.flexShrink = "0", e.flexGrow = String(Math.max(1, n / 10)), e.zIndex = String(n), e.gridRowEnd = `span ${String(Math.min(10, Math.max(1, Math.ceil(n / 10))))}`, e.gridColumnEnd = `span ${String(Math.min(10, Math.max(1, Math.ceil(n / 10))))}`) : n === 0 ? (e.flexShrink = "1", e.flexGrow = "1") : (e.flexShrink = String(Math.abs(n)), e.flexGrow = "0", e.zIndex = String(n)), e && typeof e == "object" && "setProperty" in e && e.setProperty("--layout-priority", String(n));
228
+ }
229
+ if (i.offset, i.aspectRatio) {
230
+ const { ratio: n, contentMode: r } = i.aspectRatio;
231
+ n !== void 0 && (e.aspectRatio = typeof n == "number" ? String(n) : n, r === "fill" ? e.objectFit = "cover" : e.objectFit = "contain");
232
+ }
233
+ if (i.fixedSize) {
234
+ const { horizontal: n, vertical: r } = i.fixedSize;
235
+ n && (e.flexShrink = "0", e.width = "max-content"), r && (e.flexShrink = "0", e.height = "max-content");
236
+ }
237
+ return e;
238
+ }
239
+ }
240
+ class $ extends y {
241
+ constructor() {
242
+ super(...arguments), l(this, "type", "appearance"), l(this, "priority", g.APPEARANCE);
243
+ }
244
+ apply(i, t) {
245
+ if (!i.element || !t.element)
246
+ return;
247
+ const e = this.createStyleContext(
248
+ t.componentId,
249
+ t.element,
250
+ []
251
+ ), n = this.resolveReactiveProps(
252
+ this.properties,
253
+ e
254
+ );
255
+ this.applyAssetBasedStyles(t.element, n);
256
+ const r = this.computeAppearanceStyles(n);
257
+ this.applyStyles(t.element, r), this.applyAttributes(t.element, n);
258
+ }
259
+ /**
260
+ * Apply Asset-based styles with theme reactivity
261
+ */
262
+ applyAssetBasedStyles(i, t) {
263
+ const e = E();
264
+ t.foregroundColor && this.isAsset(t.foregroundColor) && h(() => {
265
+ e();
266
+ const n = t.foregroundColor.resolve();
267
+ this.applyStyleChange(i, "color", n);
268
+ }), t.backgroundColor && this.isAsset(t.backgroundColor) && h(() => {
269
+ e();
270
+ const n = t.backgroundColor.resolve();
271
+ this.applyStyleChange(i, "backgroundColor", n);
272
+ }), t.border?.color && this.isAsset(t.border.color) && h(() => {
273
+ e();
274
+ const n = t.border.color.resolve();
275
+ this.applyStyleChange(i, "borderColor", n);
276
+ });
277
+ }
278
+ /**
279
+ * Check if a value is an Asset object (including Asset proxies)
280
+ */
281
+ isAsset(i) {
282
+ return i != null && typeof i == "object" && "resolve" in i && typeof i.resolve == "function";
283
+ }
284
+ computeAppearanceStyles(i) {
285
+ const t = {};
286
+ if (i.foregroundColor && !this.isAsset(i.foregroundColor) && (t.color = i.foregroundColor), i.backgroundColor && !this.isAsset(i.backgroundColor) && (t.backgroundColor = i.backgroundColor), i.opacity !== void 0 && (t.opacity = i.opacity), i.font) {
287
+ const n = i.font;
288
+ n.family && (typeof n.family == "object" && n.family !== null && "resolve" in n.family ? t.fontFamily = n.family.resolve() : t.fontFamily = n.family), n.size && (t.fontSize = this.toCSSValue(n.size)), n.weight && (t.fontWeight = String(n.weight)), n.style && (t.fontStyle = n.style);
289
+ }
290
+ if (i.cornerRadius !== void 0 && (t.borderRadius = this.toCSSValue(i.cornerRadius)), i.border) {
291
+ const n = i.border;
292
+ n.width !== void 0 && (t.borderWidth = this.toCSSValue(n.width)), n.color && !this.isAsset(n.color) && (t.borderColor = n.color), n.style && (t.borderStyle = n.style);
293
+ }
294
+ const e = [];
295
+ return i.blur !== void 0 && e.push(`blur(${i.blur}px)`), i.brightness !== void 0 && e.push(`brightness(${i.brightness})`), i.contrast !== void 0 && e.push(`contrast(${i.contrast})`), i.saturation !== void 0 && e.push(`saturate(${i.saturation})`), i.hueRotation !== void 0 && e.push(`hue-rotate(${i.hueRotation}deg)`), i.grayscale !== void 0 && e.push(`grayscale(${i.grayscale})`), i.colorInvert !== void 0 && e.push(`invert(${i.colorInvert})`), e.length > 0 && (t.filter = e.join(" ")), t;
296
+ }
297
+ /**
298
+ * Apply HTML attributes (ARIA, role, data attributes, etc.)
299
+ */
300
+ applyAttributes(i, t) {
301
+ if (!i) return;
302
+ const e = this.findComponentFromElement(i);
303
+ t.role !== void 0 && (i.setAttribute("role", String(t.role)), e?.props && (e.props.role = String(t.role))), t["aria-label"] !== void 0 && (i.setAttribute("aria-label", String(t["aria-label"])), e?.props && (e.props["aria-label"] = String(t["aria-label"]))), t["aria-live"] !== void 0 && (i.setAttribute("aria-live", String(t["aria-live"])), e?.props && (e.props["aria-live"] = String(t["aria-live"]))), t["aria-describedby"] !== void 0 && (i.setAttribute(
304
+ "aria-describedby",
305
+ String(t["aria-describedby"])
306
+ ), e?.props && (e.props["aria-describedby"] = String(t["aria-describedby"]))), t["aria-modal"] !== void 0 && (i.setAttribute("aria-modal", String(t["aria-modal"])), e?.props && (e.props["aria-modal"] = String(t["aria-modal"]))), t["aria-hidden"] !== void 0 && (i.setAttribute("aria-hidden", String(t["aria-hidden"])), e?.props && (e.props["aria-hidden"] = String(t["aria-hidden"]))), t.navigationTitle !== void 0 && (i.setAttribute(
307
+ "data-navigation-title",
308
+ String(t.navigationTitle)
309
+ ), e?.props && (e.props.navigationTitle = String(t.navigationTitle))), t.navigationBarHidden !== void 0 && (i.setAttribute(
310
+ "data-navigation-bar-hidden",
311
+ String(t.navigationBarHidden)
312
+ ), e?.props && (e.props.navigationBarHidden = t.navigationBarHidden), t.navigationBarHidden && (i.setAttribute("aria-hidden", "true"), e?.props && (e.props["aria-hidden"] = "true"))), t.navigationBarItems !== void 0 && (i.setAttribute(
313
+ "data-navigation-bar-items",
314
+ JSON.stringify(t.navigationBarItems)
315
+ ), e?.props && (e.props.navigationBarItems = t.navigationBarItems));
316
+ }
317
+ findComponentFromElement(i) {
318
+ return i._tachui_component || null;
319
+ }
320
+ }
321
+ class H extends y {
322
+ constructor() {
323
+ super(...arguments), l(this, "type", "interaction"), l(this, "priority", g.INTERACTION);
324
+ }
325
+ apply(i, t) {
326
+ if (!t.element) return;
327
+ const e = this.properties;
328
+ if (e.onTap && t.element.addEventListener("click", e.onTap), e.onHover && (t.element.addEventListener("mouseenter", () => e.onHover(!0)), t.element.addEventListener("mouseleave", () => e.onHover(!1))), e.onMouseEnter && t.element.addEventListener("mouseenter", e.onMouseEnter), e.onMouseLeave && t.element.addEventListener("mouseleave", e.onMouseLeave), e.onMouseDown && t.element.addEventListener("mousedown", e.onMouseDown), e.onMouseUp && t.element.addEventListener("mouseup", e.onMouseUp), e.onDragStart && t.element.addEventListener("dragstart", e.onDragStart), e.onDragOver && t.element.addEventListener("dragover", e.onDragOver), e.onDragLeave && t.element.addEventListener("dragleave", e.onDragLeave), e.onDrop && t.element.addEventListener("drop", e.onDrop), e.onDoubleClick && t.element.addEventListener("dblclick", e.onDoubleClick), e.onContextMenu && t.element.addEventListener("contextmenu", e.onContextMenu), e.onFocus && (t.element.addEventListener("focus", () => e.onFocus(!0)), t.element.addEventListener("blur", () => e.onFocus(!1))), e.onBlur && t.element.addEventListener("blur", () => e.onBlur(!1)), e.onKeyPress && t.element.addEventListener("keypress", e.onKeyPress), e.onKeyDown && t.element.addEventListener("keydown", e.onKeyDown), e.onKeyUp && t.element.addEventListener("keyup", e.onKeyUp), e.onTouchStart && t.element.addEventListener("touchstart", e.onTouchStart, {
329
+ passive: !0
330
+ }), e.onTouchMove && t.element.addEventListener("touchmove", e.onTouchMove, {
331
+ passive: !0
332
+ }), e.onTouchEnd && t.element.addEventListener("touchend", e.onTouchEnd, {
333
+ passive: !0
334
+ }), e.onTouchCancel && t.element.addEventListener("touchcancel", e.onTouchCancel, {
335
+ passive: !0
336
+ }), e.onSwipeLeft || e.onSwipeRight) {
337
+ let n = 0, r = 0;
338
+ t.element.addEventListener(
339
+ "touchstart",
340
+ (o) => {
341
+ const s = o.touches[0];
342
+ n = s.clientX, r = s.clientY;
343
+ },
344
+ { passive: !0 }
345
+ ), t.element.addEventListener(
346
+ "touchend",
347
+ (o) => {
348
+ const s = o.changedTouches[0], f = s.clientX - n, c = s.clientY - r;
349
+ Math.abs(f) > Math.abs(c) && Math.abs(f) > 50 && (f < 0 && e.onSwipeLeft ? e.onSwipeLeft() : f > 0 && e.onSwipeRight && e.onSwipeRight());
350
+ },
351
+ { passive: !0 }
352
+ );
353
+ }
354
+ e.onScroll && t.element.addEventListener("scroll", e.onScroll, {
355
+ passive: !0
356
+ }), e.onWheel && t.element.addEventListener("wheel", e.onWheel, {
357
+ passive: !1
358
+ }), e.onInput && t.element.addEventListener("input", e.onInput), e.onChange && t.element.addEventListener("change", (n) => {
359
+ const r = n.target, o = r.value || r.textContent || "";
360
+ e.onChange(o, n);
361
+ }), e.onCopy && t.element.addEventListener("copy", e.onCopy), e.onCut && t.element.addEventListener("cut", e.onCut), e.onPaste && t.element.addEventListener("paste", e.onPaste), e.onSelect && t.element.addEventListener("select", e.onSelect), e.disabled !== void 0 && t.element instanceof HTMLElement && (e.disabled ? (t.element.setAttribute("disabled", "true"), t.element.style.pointerEvents = "none", t.element.style.opacity = "0.6") : (t.element.removeAttribute("disabled"), t.element.style.pointerEvents = "", t.element.style.opacity = "")), e.draggable !== void 0 && t.element instanceof HTMLElement && (t.element.draggable = e.draggable), e.accessibilityLabel && t.element.setAttribute("aria-label", e.accessibilityLabel), e.accessibilityHint && t.element.setAttribute("aria-describedby", e.accessibilityHint);
362
+ }
363
+ }
364
+ class I extends y {
365
+ constructor() {
366
+ super(...arguments), l(this, "type", "animation"), l(this, "priority", g.ANIMATION);
367
+ }
368
+ apply(i, t) {
369
+ if (!t.element) return;
370
+ const e = this.properties;
371
+ if (e.transition) {
372
+ const n = e.transition, r = n.property || "all", o = n.duration || 300, a = n.easing || "ease", s = n.delay || 0;
373
+ t.element instanceof HTMLElement && (t.element.style.transition = `${r} ${o}ms ${a} ${s}ms`);
374
+ }
375
+ if (e.animation && t.element instanceof HTMLElement) {
376
+ const n = e.animation;
377
+ if (n.keyframes) {
378
+ const r = `tachui-animation-${t.componentId}-${Date.now()}`, o = this.createKeyframeRule(
379
+ r,
380
+ n.keyframes
381
+ );
382
+ this.addKeyframesToStylesheet(o);
383
+ const a = n.duration || 1e3, s = n.easing || "ease", f = n.iterations || 1, c = n.direction || "normal";
384
+ t.element.style.animation = `${r} ${a}ms ${s} ${f} ${c}`;
385
+ }
386
+ }
387
+ if (e.transform && t.element instanceof HTMLElement && (p(e.transform) || v(e.transform) ? h(() => {
388
+ const n = e.transform();
389
+ t.element instanceof HTMLElement && (t.element.style.transform = n);
390
+ }) : t.element.style.transform = e.transform), e.scaleEffect && t.element instanceof HTMLElement) {
391
+ const { x: n, y: r, anchor: o } = e.scaleEffect, a = r ?? n, f = {
392
+ center: "50% 50%",
393
+ top: "50% 0%",
394
+ topLeading: "0% 0%",
395
+ topTrailing: "100% 0%",
396
+ bottom: "50% 100%",
397
+ bottomLeading: "0% 100%",
398
+ bottomTrailing: "100% 100%",
399
+ leading: "0% 50%",
400
+ trailing: "100% 50%"
401
+ }[o || "center"] || "50% 50%";
402
+ t.element.style.transformOrigin = f;
403
+ const c = `scale(${n}, ${a})`, b = (t.element.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), C = b ? `${b} ${c}`.trim() : c;
404
+ t.element.style.transform = C;
405
+ }
406
+ }
407
+ createKeyframeRule(i, t) {
408
+ let e = `@keyframes ${i} {
409
+ `;
410
+ for (const [n, r] of Object.entries(t)) {
411
+ e += ` ${n} {
412
+ `;
413
+ for (const [o, a] of Object.entries(r)) {
414
+ const s = this.toCSSProperty(o);
415
+ e += ` ${s}: ${a};
416
+ `;
417
+ }
418
+ e += ` }
419
+ `;
420
+ }
421
+ return e += "}", e;
422
+ }
423
+ addKeyframesToStylesheet(i) {
424
+ let t = document.querySelector(
425
+ "#tachui-animations"
426
+ );
427
+ t || (t = document.createElement("style"), t.id = "tachui-animations", document.head.appendChild(t)), t.appendChild(document.createTextNode(i));
428
+ }
429
+ }
430
+ class R extends y {
431
+ constructor() {
432
+ super(...arguments), l(this, "type", "lifecycle"), l(this, "priority", g.CUSTOM), l(this, "activeAbortController");
433
+ }
434
+ apply(i, t) {
435
+ if (!t.element) return;
436
+ const e = this.properties;
437
+ this.activeAbortController && this.activeAbortController.abort(), e.task && this.setupTask(t, e.task), (e.onAppear || e.onDisappear) && this.setupViewportObserver(t, e);
438
+ }
439
+ setupTask(i, t) {
440
+ if (!t) return;
441
+ this.activeAbortController = new AbortController();
442
+ const { signal: e } = this.activeAbortController;
443
+ (async () => {
444
+ try {
445
+ if (e.aborted) return;
446
+ const r = t.operation();
447
+ r instanceof Promise && await r;
448
+ } catch (r) {
449
+ if (e.aborted) return;
450
+ console.error("TachUI Task Error:", r);
451
+ }
452
+ })(), this.addCleanup(() => {
453
+ this.activeAbortController && this.activeAbortController.abort();
454
+ });
455
+ }
456
+ setupViewportObserver(i, t) {
457
+ if (!i.element) return;
458
+ const e = new IntersectionObserver((n) => {
459
+ n.forEach((r) => {
460
+ r.isIntersecting && t.onAppear ? t.onAppear() : !r.isIntersecting && t.onDisappear && t.onDisappear();
461
+ });
462
+ });
463
+ e.observe(i.element), this.addCleanup(() => {
464
+ e.disconnect();
465
+ });
466
+ }
467
+ addCleanup(i) {
468
+ this.properties._cleanupFunctions || (this.properties._cleanupFunctions = []), this.properties._cleanupFunctions.push(i);
469
+ }
470
+ }
471
+ class D extends y {
472
+ constructor() {
473
+ super(...arguments), l(this, "type", "resizable"), l(this, "priority", g.APPEARANCE);
474
+ }
475
+ apply(i, t) {
476
+ t.element && t.element instanceof HTMLImageElement && (t.element.style.objectFit = "fill");
477
+ }
478
+ }
479
+ export {
480
+ I as AnimationModifier,
481
+ $ as AppearanceModifier,
482
+ y as BaseModifier,
483
+ H as InteractionModifier,
484
+ k as LayoutModifier,
485
+ R as LifecycleModifier,
486
+ D as ResizableModifier
487
+ };