@tachui/core 0.8.1-alpha → 0.8.8

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 (163) hide show
  1. package/README.md +41 -3
  2. package/dist/assets/AssetCollection.d.ts.map +1 -1
  3. package/dist/assets/ColorAsset.d.ts.map +1 -1
  4. package/dist/assets/index.d.ts +1 -0
  5. package/dist/assets/index.d.ts.map +1 -1
  6. package/dist/assets/index.js +486 -0
  7. package/dist/assets/types.d.ts +8 -68
  8. package/dist/assets/types.d.ts.map +1 -1
  9. package/dist/binding-DCV5PKkK.js +308 -0
  10. package/dist/build-plugins/index.d.ts +3 -0
  11. package/dist/build-plugins/index.d.ts.map +1 -0
  12. package/dist/build-plugins/modifier-types.d.ts +12 -0
  13. package/dist/build-plugins/modifier-types.d.ts.map +1 -0
  14. package/dist/build-tools/typegen-runner.d.ts +29 -0
  15. package/dist/build-tools/typegen-runner.d.ts.map +1 -0
  16. package/dist/bundles/minimal.d.ts +2 -0
  17. package/dist/bundles/minimal.d.ts.map +1 -1
  18. package/dist/common.js +427 -394
  19. package/dist/{component-XAzF1xqs.js → component-D-O9yq0P.js} +80 -68
  20. package/dist/{component-base-x2XmHFjy.js → component-base-C41K3NTe.js} +9 -7
  21. package/dist/component-context-B9HI2nZH.js +176 -0
  22. package/dist/components/factory.d.ts +24 -0
  23. package/dist/components/factory.d.ts.map +1 -0
  24. package/dist/components/index.d.ts +3 -2
  25. package/dist/components/index.d.ts.map +1 -1
  26. package/dist/components/index.js +8 -6
  27. package/dist/components/wrapper.d.ts +70 -30
  28. package/dist/components/wrapper.d.ts.map +1 -1
  29. package/dist/concatenated-component-CP81AwgI.js +2288 -0
  30. package/dist/concatenation/concatenated-component.d.ts +16 -2
  31. package/dist/concatenation/concatenated-component.d.ts.map +1 -1
  32. package/dist/concatenation/text-optimizer.d.ts.map +1 -1
  33. package/dist/config.d.ts +7 -0
  34. package/dist/config.d.ts.map +1 -0
  35. package/dist/constants/layout.d.ts +2 -9
  36. package/dist/constants/layout.d.ts.map +1 -1
  37. package/dist/css-classes/index.js +15 -173
  38. package/dist/{effect-B9Knft0b.js → effect-BsW3fy1q.js} +3 -3
  39. package/dist/enhanced-renderer-BXwg8n7F.js +172 -0
  40. package/dist/essential.js +427 -394
  41. package/dist/{index-DIvMCJQO.js → factories-B3-rmvkB.js} +13 -13
  42. package/dist/factory-BgnjJRGE.js +485 -0
  43. package/dist/gradients/css-generator.js +99 -0
  44. package/dist/gradients/index.js +56 -0
  45. package/dist/gradients/reactive.d.ts.map +1 -1
  46. package/dist/gradients/types.d.ts +3 -91
  47. package/dist/gradients/types.d.ts.map +1 -1
  48. package/dist/hooks-WGmpzYgD.js +446 -0
  49. package/dist/index-JQ1sW1SK.js +2049 -0
  50. package/dist/index-ykdS-3xs.js +618 -0
  51. package/dist/index.d.ts +8 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +427 -394
  54. package/dist/minimal-prod.js +100 -98
  55. package/dist/minimal.js +116 -109
  56. package/dist/modifiers/alignment.d.ts +5 -0
  57. package/dist/modifiers/alignment.d.ts.map +1 -0
  58. package/dist/modifiers/base.d.ts +7 -7
  59. package/dist/modifiers/base.d.ts.map +1 -1
  60. package/dist/modifiers/base.js +220 -92
  61. package/dist/modifiers/builder.d.ts +28 -165
  62. package/dist/modifiers/builder.d.ts.map +1 -1
  63. package/dist/modifiers/builder.js +7 -7
  64. package/dist/modifiers/core.d.ts +0 -1
  65. package/dist/modifiers/core.d.ts.map +1 -1
  66. package/dist/modifiers/corner-radius.d.ts +8 -0
  67. package/dist/modifiers/corner-radius.d.ts.map +1 -0
  68. package/dist/modifiers/index.d.ts +9 -6
  69. package/dist/modifiers/index.d.ts.map +1 -1
  70. package/dist/modifiers/index.js +36 -30
  71. package/dist/modifiers/layout-priority.d.ts +8 -0
  72. package/dist/modifiers/layout-priority.d.ts.map +1 -0
  73. package/dist/modifiers/opacity.d.ts +8 -0
  74. package/dist/modifiers/opacity.d.ts.map +1 -0
  75. package/dist/modifiers/presets.d.ts.map +1 -1
  76. package/dist/modifiers/proxy.d.ts +4 -0
  77. package/dist/modifiers/proxy.d.ts.map +1 -0
  78. package/dist/modifiers/reactive-style-bindings.d.ts +22 -0
  79. package/dist/modifiers/reactive-style-bindings.d.ts.map +1 -0
  80. package/dist/modifiers/registration-utils.d.ts +7 -0
  81. package/dist/modifiers/registration-utils.d.ts.map +1 -0
  82. package/dist/modifiers/registry.d.ts +18 -9
  83. package/dist/modifiers/registry.d.ts.map +1 -1
  84. package/dist/modifiers/registry.js +2 -2
  85. package/dist/modifiers/type-generator.d.ts +82 -0
  86. package/dist/modifiers/type-generator.d.ts.map +1 -0
  87. package/dist/modifiers/types.d.ts +2 -479
  88. package/dist/modifiers/types.d.ts.map +1 -1
  89. package/dist/modifiers/types.js +1 -4
  90. package/dist/{observed-object-Cos-FtjP.js → observed-object-p1CLdrFm.js} +3 -3
  91. package/dist/optimization-CbKNA9w4.js +21 -0
  92. package/dist/plugins/index.js +28 -8
  93. package/dist/plugins/simplified-lazy-loader.d.ts.map +1 -1
  94. package/dist/presets-B9x94uRn.js +381 -0
  95. package/dist/proxy-522Jjabr.js +188 -0
  96. package/dist/reactive/cleanup.d.ts.map +1 -1
  97. package/dist/reactive/computed.d.ts +4 -1
  98. package/dist/reactive/computed.d.ts.map +1 -1
  99. package/dist/reactive/context.d.ts +4 -3
  100. package/dist/reactive/context.d.ts.map +1 -1
  101. package/dist/reactive/index.d.ts +1 -0
  102. package/dist/reactive/index.d.ts.map +1 -1
  103. package/dist/reactive/index.js +84 -490
  104. package/dist/reactive/signal-list.d.ts +100 -0
  105. package/dist/reactive/signal-list.d.ts.map +1 -0
  106. package/dist/reactive/signal.d.ts.map +1 -1
  107. package/dist/reactive/types.d.ts +2 -89
  108. package/dist/reactive/types.d.ts.map +1 -1
  109. package/dist/reactive/types.js +1 -4
  110. package/dist/registration-utils-CNsN4eoU.js +27 -0
  111. package/dist/runtime/component.d.ts.map +1 -1
  112. package/dist/runtime/concatenation-aria.d.ts.map +1 -1
  113. package/dist/runtime/concatenation-aria.js +18 -13
  114. package/dist/runtime/concatenation-full.d.ts.map +1 -1
  115. package/dist/runtime/concatenation-full.js +42 -34
  116. package/dist/runtime/concatenation-minimal.d.ts.map +1 -1
  117. package/dist/runtime/concatenation-minimal.js +13 -8
  118. package/dist/runtime/context.d.ts.map +1 -1
  119. package/dist/runtime/dom-bridge.d.ts +1 -1
  120. package/dist/runtime/dom-bridge.d.ts.map +1 -1
  121. package/dist/runtime/dom-bridge.js +239 -12
  122. package/dist/runtime/event-delegation.d.ts +59 -0
  123. package/dist/runtime/event-delegation.d.ts.map +1 -0
  124. package/dist/runtime/index.d.ts +3 -1
  125. package/dist/runtime/index.d.ts.map +1 -1
  126. package/dist/runtime/index.js +96 -0
  127. package/dist/runtime/layout-scheduler.d.ts +89 -0
  128. package/dist/runtime/layout-scheduler.d.ts.map +1 -0
  129. package/dist/runtime/props.d.ts.map +1 -1
  130. package/dist/runtime/renderer.d.ts +54 -2
  131. package/dist/runtime/renderer.d.ts.map +1 -1
  132. package/dist/runtime/renderer.js +11 -7
  133. package/dist/runtime/semantic-role-manager.d.ts.map +1 -1
  134. package/dist/runtime/types.d.ts +2 -226
  135. package/dist/runtime/types.d.ts.map +1 -1
  136. package/dist/runtime/types.js +1 -1
  137. package/dist/scheduler-DppMK9mR.js +169 -0
  138. package/dist/signal-list-07gNXGiW.js +525 -0
  139. package/dist/state/index.js +319 -0
  140. package/dist/theme-CRLPHryV.js +687 -0
  141. package/dist/utils/clone-helpers.d.ts +11 -0
  142. package/dist/utils/clone-helpers.d.ts.map +1 -0
  143. package/dist/validation/index.js +28 -26
  144. package/dist/version.d.ts +19 -0
  145. package/dist/version.d.ts.map +1 -0
  146. package/dist/version.js +6 -0
  147. package/package.json +52 -11
  148. package/dist/concatenated-component-ByPl3_FF.js +0 -2933
  149. package/dist/dom-bridge-CAa1N2zX.js +0 -406
  150. package/dist/index-DEBd8cq7.js +0 -1144
  151. package/dist/index-vdsiw6gQ.js +0 -777
  152. package/dist/modifiers/as-html-validator.d.ts +0 -20
  153. package/dist/modifiers/as-html-validator.d.ts.map +0 -1
  154. package/dist/modifiers/as-html.d.ts +0 -65
  155. package/dist/modifiers/as-html.d.ts.map +0 -1
  156. package/dist/modifiers/background.d.ts +0 -51
  157. package/dist/modifiers/background.d.ts.map +0 -1
  158. package/dist/modifiers/basic-sanitizer.d.ts +0 -54
  159. package/dist/modifiers/basic-sanitizer.d.ts.map +0 -1
  160. package/dist/modifiers/css.d.ts +0 -86
  161. package/dist/modifiers/css.d.ts.map +0 -1
  162. package/dist/production-minimal-BY_gMc-l.js +0 -2532
  163. package/dist/scheduler-BKeqwrYE.js +0 -814
@@ -1,9 +1,131 @@
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 {
1
+ import { o as R } from "../scheduler-DppMK9mR.js";
2
+ import { p as O, d as m, r as D, i as v, K as B } from "../theme-CRLPHryV.js";
3
+ import { c as b } from "../effect-BsW3fy1q.js";
4
+ import "@tachui/types/reactive";
5
+ import { ModifierPriority as S } from "@tachui/types/modifiers";
6
+ import { shouldExpandForInfinity as _, dimensionToCSS as h, isInfinity as g } from "../constants/layout.js";
7
+ const w = /* @__PURE__ */ new WeakMap();
8
+ let p = null;
9
+ function ee(s) {
10
+ if (s === null)
11
+ return p = null, () => {
12
+ };
13
+ const i = p;
14
+ return p = (t, e) => {
15
+ i?.(t, e), s(t, e);
16
+ }, () => {
17
+ p = i;
18
+ };
19
+ }
20
+ function k(s, i, t) {
21
+ try {
22
+ s(i);
23
+ } catch (e) {
24
+ if (p) {
25
+ p(e, { updaterId: t, value: i });
26
+ return;
27
+ }
28
+ console.error(`Reactive style updater failed (${t}):`, e);
29
+ }
30
+ }
31
+ const M = 200, u = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new Set();
32
+ let P = !1, A = !1;
33
+ function z(s) {
34
+ u.get(s)?.forEach((t) => t()), u.delete(s), T.delete(s);
35
+ }
36
+ function H() {
37
+ const s = Date.now();
38
+ for (const i of Array.from(y)) {
39
+ const t = i.deref();
40
+ if (!t) {
41
+ y.delete(i);
42
+ continue;
43
+ }
44
+ const e = T.get(t), n = u.get(t);
45
+ if (!e || !n || n.size === 0) {
46
+ y.delete(i);
47
+ continue;
48
+ }
49
+ if (t.isConnected) {
50
+ e.wasConnected = !0;
51
+ continue;
52
+ }
53
+ (e.wasConnected || s - e.trackedAt >= M) && (z(t), y.delete(i));
54
+ }
55
+ }
56
+ function F() {
57
+ if (A || typeof setTimeout != "function") return;
58
+ A = !0;
59
+ const s = () => {
60
+ if (H(), y.size === 0) {
61
+ A = !1;
62
+ return;
63
+ }
64
+ setTimeout(s, M);
65
+ };
66
+ setTimeout(s, M);
67
+ }
68
+ function W() {
69
+ if (P || typeof document > "u" || !document.documentElement || typeof MutationObserver > "u")
70
+ return;
71
+ new MutationObserver(() => {
72
+ H();
73
+ }).observe(document.documentElement, { childList: !0, subtree: !0 }), P = !0;
74
+ }
75
+ function U(s, i) {
76
+ W(), F();
77
+ const t = u.get(s) ?? /* @__PURE__ */ new Set(), e = t.size > 0;
78
+ return t.add(i), u.set(s, t), e || (T.set(s, {
79
+ trackedAt: Date.now(),
80
+ wasConnected: s.isConnected
81
+ }), y.add(new WeakRef(s))), () => {
82
+ const n = u.get(s);
83
+ n && (n.delete(i), n.size === 0 && (u.delete(s), T.delete(s)));
84
+ };
85
+ }
86
+ function N({
87
+ element: s,
88
+ accessor: i,
89
+ updater: t,
90
+ updaterId: e
91
+ }) {
92
+ const n = w.get(s) ?? /* @__PURE__ */ new Map();
93
+ w.has(s) || w.set(s, n);
94
+ let r = n.get(i);
95
+ if (!r) {
96
+ const a = /* @__PURE__ */ new Map();
97
+ r = { effect: b(() => {
98
+ const c = i();
99
+ a.forEach(
100
+ (E, L) => k(E, c, L)
101
+ );
102
+ }), updaters: a }, n.set(i, r);
103
+ }
104
+ r.updaters.set(e, t), k(t, i(), e);
105
+ let o = null;
106
+ const l = () => {
107
+ o && (o(), o = null);
108
+ const a = w.get(s), d = a?.get(i);
109
+ d && (d.updaters.delete(e), d.updaters.size === 0 && (d.effect.dispose(), a?.delete(i), m(i) && D(i)), a && a.size === 0 && w.delete(s));
110
+ };
111
+ O() ? R(l) : o = U(s, l);
112
+ }
113
+ var j = Object.defineProperty, K = (s, i, t) => i in s ? j(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, f = (s, i, t) => K(s, typeof i != "symbol" ? i + "" : i, t);
114
+ const I = Symbol.for("tachui.modifier.instanceId"), x = "core";
115
+ let $ = 0;
116
+ function Y(s) {
117
+ const i = s[I];
118
+ if (typeof i == "number") return i;
119
+ $ += 1;
120
+ const t = $;
121
+ return Object.defineProperty(s, I, {
122
+ value: t,
123
+ enumerable: !1,
124
+ configurable: !1,
125
+ writable: !1
126
+ }), t;
127
+ }
128
+ class C {
7
129
  constructor(i) {
8
130
  this.properties = i;
9
131
  }
@@ -13,7 +135,7 @@ class y {
13
135
  resolveReactiveProps(i, t) {
14
136
  const e = {};
15
137
  for (const [n, r] of Object.entries(i))
16
- p(r) || v(r), e[n] = r;
138
+ v(r) || m(r), e[n] = r;
17
139
  return e;
18
140
  }
19
141
  /**
@@ -22,12 +144,12 @@ class y {
22
144
  applyStyleChange(i, t, e) {
23
145
  if (i instanceof HTMLElement) {
24
146
  const n = this.toCSSProperty(t);
25
- if (p(e) || v(e))
26
- h(() => {
147
+ if (v(e) || m(e))
148
+ b(() => {
27
149
  const r = e(), o = String(r);
28
150
  if (o.includes("!important")) {
29
- const a = o.replace(/\s*!important\s*$/, "").trim();
30
- i.style.setProperty(n, a, "important");
151
+ const l = o.replace(/\s*!important\s*$/, "").trim();
152
+ i.style.setProperty(n, l, "important");
31
153
  } else
32
154
  i.style.setProperty(n, o);
33
155
  });
@@ -80,35 +202,33 @@ class y {
80
202
  */
81
203
  applyStyles(i, t) {
82
204
  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;
205
+ const e = (i instanceof HTMLElement, i.style), n = (r, o) => {
206
+ if (e.setProperty)
207
+ if (typeof o == "string" && o.includes("!important")) {
208
+ const l = o.replace(/\s*!important\s*$/, "").trim();
209
+ e.setProperty(r, l, "important");
210
+ } else
211
+ e.setProperty(r, o);
212
+ else
213
+ e[r] = o;
214
+ };
215
+ for (const [r, o] of Object.entries(t))
216
+ if (o !== void 0) {
217
+ const l = this.toCSSProperty(r);
218
+ if (v(o) || m(o)) {
219
+ const a = o, d = Y(this);
220
+ N({
221
+ element: i,
222
+ accessor: a,
223
+ updaterId: `${x}:${d}:${l}`,
224
+ updater: (c) => {
225
+ const E = this.toCSSValueForProperty(l, c);
226
+ n(l, E);
227
+ }
101
228
  });
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;
229
+ } else {
230
+ const a = this.toCSSValueForProperty(l, o);
231
+ n(l, a);
112
232
  }
113
233
  }
114
234
  }
@@ -138,9 +258,9 @@ class y {
138
258
  };
139
259
  }
140
260
  }
141
- class k extends y {
261
+ class te extends C {
142
262
  constructor() {
143
- super(...arguments), l(this, "type", "layout"), l(this, "priority", g.LAYOUT);
263
+ super(...arguments), f(this, "type", "layout"), f(this, "priority", S.LAYOUT);
144
264
  }
145
265
  apply(i, t) {
146
266
  if (!i.element || !t.element) return;
@@ -164,31 +284,31 @@ class k extends y {
164
284
  computeLayoutStyles(i, t) {
165
285
  const e = {};
166
286
  if (i.frame) {
167
- const n = i.frame, r = L(n);
287
+ const n = i.frame, r = _(n);
168
288
  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);
289
+ const o = h(n.width);
290
+ o !== void 0 && !g(n.width) && !r.expandWidth && (e.width = o);
171
291
  }
172
292
  if (n.height !== void 0) {
173
- const o = u(n.height);
174
- o !== void 0 && !m(n.height) && !r.expandHeight && (e.height = o);
293
+ const o = h(n.height);
294
+ o !== void 0 && !g(n.height) && !r.expandHeight && (e.height = o);
175
295
  }
176
296
  if (n.minWidth !== void 0) {
177
- const o = u(n.minWidth);
297
+ const o = h(n.minWidth);
178
298
  o !== void 0 && (e.minWidth = o);
179
299
  }
180
- if (n.maxWidth !== void 0 && !m(n.maxWidth)) {
181
- const o = u(n.maxWidth);
300
+ if (n.maxWidth !== void 0 && !g(n.maxWidth)) {
301
+ const o = h(n.maxWidth);
182
302
  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");
303
+ } else g(n.maxWidth) && (e.maxWidth = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
184
304
  if (n.minHeight !== void 0) {
185
- const o = u(n.minHeight);
305
+ const o = h(n.minHeight);
186
306
  o !== void 0 && (e.minHeight = o);
187
307
  }
188
- if (n.maxHeight !== void 0 && !m(n.maxHeight)) {
189
- const o = u(n.maxHeight);
308
+ if (n.maxHeight !== void 0 && !g(n.maxHeight)) {
309
+ const o = h(n.maxHeight);
190
310
  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");
311
+ } else g(n.maxHeight) && (e.maxHeight = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
192
312
  }
193
313
  if (i.padding !== void 0)
194
314
  if (typeof i.padding == "number")
@@ -237,9 +357,9 @@ class k extends y {
237
357
  return e;
238
358
  }
239
359
  }
240
- class $ extends y {
360
+ class ie extends C {
241
361
  constructor() {
242
- super(...arguments), l(this, "type", "appearance"), l(this, "priority", g.APPEARANCE);
362
+ super(...arguments), f(this, "type", "appearance"), f(this, "priority", S.APPEARANCE);
243
363
  }
244
364
  apply(i, t) {
245
365
  if (!i.element || !t.element)
@@ -260,16 +380,16 @@ class $ extends y {
260
380
  * Apply Asset-based styles with theme reactivity
261
381
  */
262
382
  applyAssetBasedStyles(i, t) {
263
- const e = E();
264
- t.foregroundColor && this.isAsset(t.foregroundColor) && h(() => {
383
+ const e = B();
384
+ t.foregroundColor && this.isAsset(t.foregroundColor) && b(() => {
265
385
  e();
266
386
  const n = t.foregroundColor.resolve();
267
387
  this.applyStyleChange(i, "color", n);
268
- }), t.backgroundColor && this.isAsset(t.backgroundColor) && h(() => {
388
+ }), t.backgroundColor && this.isAsset(t.backgroundColor) && b(() => {
269
389
  e();
270
390
  const n = t.backgroundColor.resolve();
271
391
  this.applyStyleChange(i, "backgroundColor", n);
272
- }), t.border?.color && this.isAsset(t.border.color) && h(() => {
392
+ }), t.border?.color && this.isAsset(t.border.color) && b(() => {
273
393
  e();
274
394
  const n = t.border.color.resolve();
275
395
  this.applyStyleChange(i, "borderColor", n);
@@ -285,7 +405,13 @@ class $ extends y {
285
405
  const t = {};
286
406
  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
407
  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);
408
+ if (n.family)
409
+ if (typeof n.family == "object" && n.family !== null && typeof n.family.resolve == "function") {
410
+ const r = n.family.resolve();
411
+ t.fontFamily = r;
412
+ } else
413
+ t.fontFamily = n.family;
414
+ n.size !== void 0 && (t.fontSize = v(n.size) || m(n.size) ? n.size : this.toCSSValue(n.size)), n.weight !== void 0 && (t.fontWeight = v(n.weight) || m(n.weight) ? n.weight : String(n.weight)), n.style && (t.fontStyle = n.style);
289
415
  }
290
416
  if (i.cornerRadius !== void 0 && (t.borderRadius = this.toCSSValue(i.cornerRadius)), i.border) {
291
417
  const n = i.border;
@@ -318,9 +444,9 @@ class $ extends y {
318
444
  return i._tachui_component || null;
319
445
  }
320
446
  }
321
- class H extends y {
447
+ class ne extends C {
322
448
  constructor() {
323
- super(...arguments), l(this, "type", "interaction"), l(this, "priority", g.INTERACTION);
449
+ super(...arguments), f(this, "type", "interaction"), f(this, "priority", S.INTERACTION);
324
450
  }
325
451
  apply(i, t) {
326
452
  if (!t.element) return;
@@ -338,15 +464,15 @@ class H extends y {
338
464
  t.element.addEventListener(
339
465
  "touchstart",
340
466
  (o) => {
341
- const s = o.touches[0];
342
- n = s.clientX, r = s.clientY;
467
+ const a = o.touches[0];
468
+ n = a.clientX, r = a.clientY;
343
469
  },
344
470
  { passive: !0 }
345
471
  ), t.element.addEventListener(
346
472
  "touchend",
347
473
  (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());
474
+ const a = o.changedTouches[0], d = a.clientX - n, c = a.clientY - r;
475
+ Math.abs(d) > Math.abs(c) && Math.abs(d) > 50 && (d < 0 && e.onSwipeLeft ? e.onSwipeLeft() : d > 0 && e.onSwipeRight && e.onSwipeRight());
350
476
  },
351
477
  { passive: !0 }
352
478
  );
@@ -361,16 +487,16 @@ class H extends y {
361
487
  }), 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
488
  }
363
489
  }
364
- class I extends y {
490
+ class re extends C {
365
491
  constructor() {
366
- super(...arguments), l(this, "type", "animation"), l(this, "priority", g.ANIMATION);
492
+ super(...arguments), f(this, "type", "animation"), f(this, "priority", S.ANIMATION);
367
493
  }
368
494
  apply(i, t) {
369
495
  if (!t.element) return;
370
496
  const e = this.properties;
371
497
  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`);
498
+ const n = e.transition, r = n.property || "all", o = n.duration || 300, l = n.easing || "ease", a = n.delay || 0;
499
+ t.element instanceof HTMLElement && (t.element.style.transition = `${r} ${o}ms ${l} ${a}ms`);
374
500
  }
375
501
  if (e.animation && t.element instanceof HTMLElement) {
376
502
  const n = e.animation;
@@ -380,15 +506,15 @@ class I extends y {
380
506
  n.keyframes
381
507
  );
382
508
  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}`;
509
+ const l = n.duration || 1e3, a = n.easing || "ease", d = n.iterations || 1, c = n.direction || "normal";
510
+ t.element.style.animation = `${r} ${l}ms ${a} ${d} ${c}`;
385
511
  }
386
512
  }
387
- if (e.transform && t.element instanceof HTMLElement && (p(e.transform) || v(e.transform) ? h(() => {
513
+ if (e.transform && t.element instanceof HTMLElement && (v(e.transform) || m(e.transform) ? b(() => {
388
514
  const n = e.transform();
389
515
  t.element instanceof HTMLElement && (t.element.style.transform = n);
390
516
  }) : 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 = {
517
+ const { x: n, y: r, anchor: o } = e.scaleEffect, l = r ?? n, d = {
392
518
  center: "50% 50%",
393
519
  top: "50% 0%",
394
520
  topLeading: "0% 0%",
@@ -399,9 +525,9 @@ class I extends y {
399
525
  leading: "0% 50%",
400
526
  trailing: "100% 50%"
401
527
  }[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;
528
+ t.element.style.transformOrigin = d;
529
+ const c = `scale(${n}, ${l})`, L = (t.element.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), V = L ? `${L} ${c}`.trim() : c;
530
+ t.element.style.transform = V;
405
531
  }
406
532
  }
407
533
  createKeyframeRule(i, t) {
@@ -410,9 +536,9 @@ class I extends y {
410
536
  for (const [n, r] of Object.entries(t)) {
411
537
  e += ` ${n} {
412
538
  `;
413
- for (const [o, a] of Object.entries(r)) {
414
- const s = this.toCSSProperty(o);
415
- e += ` ${s}: ${a};
539
+ for (const [o, l] of Object.entries(r)) {
540
+ const a = this.toCSSProperty(o);
541
+ e += ` ${a}: ${l};
416
542
  `;
417
543
  }
418
544
  e += ` }
@@ -427,9 +553,9 @@ class I extends y {
427
553
  t || (t = document.createElement("style"), t.id = "tachui-animations", document.head.appendChild(t)), t.appendChild(document.createTextNode(i));
428
554
  }
429
555
  }
430
- class R extends y {
556
+ class oe extends C {
431
557
  constructor() {
432
- super(...arguments), l(this, "type", "lifecycle"), l(this, "priority", g.CUSTOM), l(this, "activeAbortController");
558
+ super(...arguments), f(this, "type", "lifecycle"), f(this, "priority", S.CUSTOM), f(this, "activeAbortController");
433
559
  }
434
560
  apply(i, t) {
435
561
  if (!t.element) return;
@@ -468,20 +594,22 @@ class R extends y {
468
594
  this.properties._cleanupFunctions || (this.properties._cleanupFunctions = []), this.properties._cleanupFunctions.push(i);
469
595
  }
470
596
  }
471
- class D extends y {
597
+ class se extends C {
472
598
  constructor() {
473
- super(...arguments), l(this, "type", "resizable"), l(this, "priority", g.APPEARANCE);
599
+ super(...arguments), f(this, "type", "resizable"), f(this, "priority", S.APPEARANCE);
474
600
  }
475
601
  apply(i, t) {
476
602
  t.element && t.element instanceof HTMLImageElement && (t.element.style.objectFit = "fill");
477
603
  }
478
604
  }
479
605
  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
606
+ re as AnimationModifier,
607
+ ie as AppearanceModifier,
608
+ C as BaseModifier,
609
+ ne as InteractionModifier,
610
+ te as LayoutModifier,
611
+ oe as LifecycleModifier,
612
+ se as ResizableModifier,
613
+ N as bindReactiveStyle,
614
+ ee as setReactiveStyleUpdaterErrorHandler
487
615
  };