@tachui/core 0.8.24 → 0.8.26

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 (47) hide show
  1. package/dist/assets/ColorAsset.d.ts +1 -0
  2. package/dist/assets/ColorAsset.d.ts.map +1 -1
  3. package/dist/assets/FontAsset.d.ts +3 -0
  4. package/dist/assets/FontAsset.d.ts.map +1 -1
  5. package/dist/assets/ImageAsset.d.ts.map +1 -1
  6. package/dist/assets/index.d.ts +1 -0
  7. package/dist/assets/index.d.ts.map +1 -1
  8. package/dist/assets/index.js +196 -132
  9. package/dist/assets/ssr-context.d.ts +8 -0
  10. package/dist/assets/ssr-context.d.ts.map +1 -0
  11. package/dist/{binding-DCr-JHsC.js → binding-DNl4QUbT.js} +1 -1
  12. package/dist/common.js +388 -386
  13. package/dist/{component-BzvSm8rM.js → component-DR1wgdPH.js} +66 -69
  14. package/dist/{component-context-C7Y6Xu6h.js → component-context-BB80qzyZ.js} +66 -44
  15. package/dist/components/index.js +1 -1
  16. package/dist/{concatenated-component-CA54ng_j.js → concatenated-component-DisxEqg6.js} +123 -113
  17. package/dist/essential.js +390 -388
  18. package/dist/{factories-B05hE6kc.js → factories-Bz6LZlk6.js} +108 -99
  19. package/dist/{factory-B1YXfgU1.js → factory-C2LUc2BF.js} +2 -2
  20. package/dist/full.js +390 -388
  21. package/dist/{index-CmQmIgPK.js → index-B1zQAJuG.js} +91 -89
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +390 -388
  25. package/dist/minimal-prod.js +3 -3
  26. package/dist/minimal.js +5 -5
  27. package/dist/modifiers/base.d.ts +17 -0
  28. package/dist/modifiers/base.d.ts.map +1 -1
  29. package/dist/modifiers/base.js +169 -133
  30. package/dist/modifiers/builder.js +1 -1
  31. package/dist/modifiers/factories.d.ts.map +1 -1
  32. package/dist/modifiers/index.js +3 -3
  33. package/dist/modifiers/registry.js +1 -1
  34. package/dist/{observed-object-DCoyucmV.js → observed-object-gKl1Kk85.js} +1 -1
  35. package/dist/{optimization-D9t53vNJ.js → optimization-CnRxoggr.js} +1 -1
  36. package/dist/{proxy-B7ZIqGd0.js → proxy-B6FFddJq.js} +1 -1
  37. package/dist/runtime/component-context.d.ts +2 -0
  38. package/dist/runtime/component-context.d.ts.map +1 -1
  39. package/dist/runtime/component.d.ts.map +1 -1
  40. package/dist/runtime/dom-bridge.js +2 -2
  41. package/dist/runtime/index.js +4 -4
  42. package/dist/runtime/lazy-component.d.ts.map +1 -1
  43. package/dist/runtime/renderer.d.ts.map +1 -1
  44. package/dist/runtime/renderer.js +1 -1
  45. package/dist/state/index.js +5 -5
  46. package/dist/version.js +1 -1
  47. package/package.json +3 -3
@@ -1,26 +1,26 @@
1
- import { i as m, r as R } from "../computed-CA4Cgtoe.js";
2
- import { c as b } from "../effect-DgNm6jk9.js";
3
- import { g as O, i as S } from "../signal-BRoiFOO7.js";
4
- import { a as D } from "../theme-D5-09a8N.js";
1
+ import { i as m, r as D } from "../computed-CA4Cgtoe.js";
2
+ import { c as S } from "../effect-DgNm6jk9.js";
3
+ import { g as z, i as b } from "../signal-BRoiFOO7.js";
4
+ import { a as B } from "../theme-D5-09a8N.js";
5
5
  import { ModifierPriority as C } from "@tachui/types/modifiers";
6
- import { shouldExpandForInfinity as B, dimensionToCSS as g, isInfinity as p } from "../constants/layout.js";
7
- import { o as _ } from "../cleanup-BR8UpYPX.js";
6
+ import { shouldExpandForInfinity as _, dimensionToCSS as g, isInfinity as p } from "../constants/layout.js";
7
+ import { o as F } from "../cleanup-BR8UpYPX.js";
8
8
  const L = /* @__PURE__ */ new WeakMap();
9
9
  let y = null;
10
- function te(s) {
11
- if (s === null)
10
+ function re(o) {
11
+ if (o === null)
12
12
  return y = null, () => {
13
13
  };
14
14
  const i = y;
15
15
  return y = (t, e) => {
16
- i?.(t, e), s(t, e);
16
+ i?.(t, e), o(t, e);
17
17
  }, () => {
18
18
  y = i;
19
19
  };
20
20
  }
21
- function k(s, i, t) {
21
+ function I(o, i, t) {
22
22
  try {
23
- s(i);
23
+ o(i);
24
24
  } catch (e) {
25
25
  if (y) {
26
26
  y(e, { updaterId: t, value: i });
@@ -29,20 +29,20 @@ function k(s, i, t) {
29
29
  console.error(`Reactive style updater failed (${t}):`, e);
30
30
  }
31
31
  }
32
- const A = 200, u = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set();
33
- let P = !1, M = !1;
34
- function z(s) {
35
- u.get(s)?.forEach((t) => t()), u.delete(s), T.delete(s);
32
+ const k = 200, u = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set();
33
+ let P = !1, $ = !1;
34
+ function W(o) {
35
+ u.get(o)?.forEach((t) => t()), u.delete(o), M.delete(o);
36
36
  }
37
- function $() {
38
- const s = Date.now();
37
+ function V() {
38
+ const o = Date.now();
39
39
  for (const i of Array.from(v)) {
40
40
  const t = i.deref();
41
41
  if (!t) {
42
42
  v.delete(i);
43
43
  continue;
44
44
  }
45
- const e = T.get(t), n = u.get(t);
45
+ const e = M.get(t), n = u.get(t);
46
46
  if (!e || !n || n.size === 0) {
47
47
  v.delete(i);
48
48
  continue;
@@ -51,92 +51,120 @@ function $() {
51
51
  e.wasConnected = !0;
52
52
  continue;
53
53
  }
54
- (e.wasConnected || s - e.trackedAt >= A) && (z(t), v.delete(i));
54
+ (e.wasConnected || o - e.trackedAt >= k) && (W(t), v.delete(i));
55
55
  }
56
56
  }
57
- function F() {
58
- if (M || typeof setTimeout != "function") return;
59
- M = !0;
60
- const s = () => {
61
- if ($(), v.size === 0) {
62
- M = !1;
57
+ function U() {
58
+ if ($ || typeof setTimeout != "function") return;
59
+ $ = !0;
60
+ const o = () => {
61
+ if (V(), v.size === 0) {
62
+ $ = !1;
63
63
  return;
64
64
  }
65
- setTimeout(s, A);
65
+ setTimeout(o, k);
66
66
  };
67
- setTimeout(s, A);
67
+ setTimeout(o, k);
68
68
  }
69
- function W() {
69
+ function N() {
70
70
  if (P || typeof document > "u" || !document.documentElement || typeof MutationObserver > "u")
71
71
  return;
72
72
  new MutationObserver(() => {
73
- $();
73
+ V();
74
74
  }).observe(document.documentElement, { childList: !0, subtree: !0 }), P = !0;
75
75
  }
76
- function U(s, i) {
77
- W(), F();
78
- const t = u.get(s) ?? /* @__PURE__ */ new Set(), e = t.size > 0;
79
- return t.add(i), u.set(s, t), e || (T.set(s, {
76
+ function j(o, i) {
77
+ N(), U();
78
+ const t = u.get(o) ?? /* @__PURE__ */ new Set(), e = t.size > 0;
79
+ return t.add(i), u.set(o, t), e || (M.set(o, {
80
80
  trackedAt: Date.now(),
81
- wasConnected: s.isConnected
82
- }), v.add(new WeakRef(s))), () => {
83
- const n = u.get(s);
84
- n && (n.delete(i), n.size === 0 && (u.delete(s), T.delete(s)));
81
+ wasConnected: o.isConnected
82
+ }), v.add(new WeakRef(o))), () => {
83
+ const n = u.get(o);
84
+ n && (n.delete(i), n.size === 0 && (u.delete(o), M.delete(o)));
85
85
  };
86
86
  }
87
- function N({
88
- element: s,
87
+ function K({
88
+ element: o,
89
89
  accessor: i,
90
90
  updater: t,
91
91
  updaterId: e
92
92
  }) {
93
- const n = L.get(s) ?? /* @__PURE__ */ new Map();
94
- L.has(s) || L.set(s, n);
93
+ const n = L.get(o) ?? /* @__PURE__ */ new Map();
94
+ L.has(o) || L.set(o, n);
95
95
  let r = n.get(i);
96
96
  if (!r) {
97
97
  const a = /* @__PURE__ */ new Map();
98
- r = { effect: b(() => {
98
+ r = { effect: S(() => {
99
99
  const c = i();
100
100
  a.forEach(
101
- (w, h) => k(w, c, h)
101
+ (w, h) => I(w, c, h)
102
102
  );
103
103
  }), updaters: a }, n.set(i, r);
104
104
  }
105
- r.updaters.set(e, t), k(t, i(), e);
106
- let o = null;
105
+ r.updaters.set(e, t), I(t, i(), e);
106
+ let s = null;
107
107
  const l = () => {
108
- o && (o(), o = null);
109
- const a = L.get(s), d = a?.get(i);
110
- d && (d.updaters.delete(e), d.updaters.size === 0 && (d.effect.dispose(), a?.delete(i), m(i) && R(i)), a && a.size === 0 && L.delete(s));
108
+ s && (s(), s = null);
109
+ const a = L.get(o), d = a?.get(i);
110
+ d && (d.updaters.delete(e), d.updaters.size === 0 && (d.effect.dispose(), a?.delete(i), m(i) && D(i)), a && a.size === 0 && L.delete(o));
111
111
  };
112
- O() ? _(l) : o = U(s, l);
112
+ z() ? F(l) : s = j(o, l);
113
113
  }
114
- 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);
115
- const I = Symbol.for("tachui.modifier.instanceId"), x = "core";
116
- let H = 0;
117
- function Y(s) {
118
- const i = s[I];
114
+ var x = Object.defineProperty, Y = (o, i, t) => i in o ? x(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t, f = (o, i, t) => Y(o, typeof i != "symbol" ? i + "" : i, t);
115
+ const H = Symbol.for("tachui.modifier.instanceId"), G = "core";
116
+ let R = 0;
117
+ function T(o) {
118
+ return typeof HTMLElement < "u" && o instanceof HTMLElement;
119
+ }
120
+ function A(o) {
121
+ return typeof o == "object" && o !== null && "style" in o && !!o.style;
122
+ }
123
+ function X(o) {
124
+ const i = o[H];
119
125
  if (typeof i == "number") return i;
120
- H += 1;
121
- const t = H;
122
- return Object.defineProperty(s, I, {
126
+ R += 1;
127
+ const t = R;
128
+ return Object.defineProperty(o, H, {
123
129
  value: t,
124
130
  enumerable: !1,
125
131
  configurable: !1,
126
132
  writable: !1
127
133
  }), t;
128
134
  }
135
+ function Z(o, i, t) {
136
+ const e = [];
137
+ if (i.transition) {
138
+ const r = i.transition, s = r.property || "all", l = r.duration || 300, a = r.easing || "ease", d = r.delay || 0;
139
+ s === "none" ? e.push(`${o} { transition: none; }`) : e.push(
140
+ `${o} { transition: ${s} ${l}ms ${a} ${d}ms; }`
141
+ );
142
+ }
143
+ const n = i.animation;
144
+ if (n?.keyframes) {
145
+ const s = `tachui-animation-${o.replace(/[^a-zA-Z0-9_-]/g, "") || "component"}`;
146
+ e.push(t(s, n.keyframes));
147
+ const l = n.duration || 1e3, a = n.easing || "ease", d = n.iterations || 1, c = n.direction || "normal";
148
+ e.push(
149
+ `${o} { animation: ${s} ${l}ms ${a} ${d} ${c}; }`
150
+ );
151
+ }
152
+ return e;
153
+ }
129
154
  class E {
130
155
  constructor(i) {
131
156
  this.properties = i;
132
157
  }
158
+ getStaticCSS(i) {
159
+ return [];
160
+ }
133
161
  /**
134
162
  * Helper to resolve reactive properties
135
163
  */
136
164
  resolveReactiveProps(i, t) {
137
165
  const e = {};
138
166
  for (const [n, r] of Object.entries(i))
139
- S(r) || m(r), e[n] = r;
167
+ b(r) || m(r), e[n] = r;
140
168
  return e;
141
169
  }
142
170
  /**
@@ -146,16 +174,16 @@ class E {
146
174
  const n = typeof HTMLElement < "u" && i instanceof HTMLElement;
147
175
  if (!n && !i.style)
148
176
  return;
149
- const r = this.toCSSProperty(t), o = i.style, l = (a) => {
177
+ const r = this.toCSSProperty(t), s = i.style, l = (a) => {
150
178
  if (a.includes("!important")) {
151
179
  const d = a.replace(/\s*!important\s*$/, "").trim();
152
- o.setProperty(r, d, "important");
180
+ s.setProperty(r, d, "important");
153
181
  return;
154
182
  }
155
- o.setProperty(r, a);
183
+ s.setProperty(r, a);
156
184
  };
157
- if (S(e) || m(e)) {
158
- b(() => {
185
+ if (b(e) || m(e)) {
186
+ S(() => {
159
187
  const a = e();
160
188
  l(String(a));
161
189
  });
@@ -209,25 +237,25 @@ class E {
209
237
  applyStyles(i, t) {
210
238
  const e = typeof HTMLElement < "u" && i instanceof HTMLElement;
211
239
  if (e || i.style) {
212
- const n = i.style, r = (o, l) => {
240
+ const n = i.style, r = (s, l) => {
213
241
  if (n.setProperty)
214
242
  if (typeof l == "string" && l.includes("!important")) {
215
243
  const a = l.replace(/\s*!important\s*$/, "").trim();
216
- n.setProperty(o, a, "important");
244
+ n.setProperty(s, a, "important");
217
245
  } else
218
- n.setProperty(o, l);
246
+ n.setProperty(s, l);
219
247
  else
220
- n[o] = l;
248
+ n[s] = l;
221
249
  };
222
- for (const [o, l] of Object.entries(t))
250
+ for (const [s, l] of Object.entries(t))
223
251
  if (l !== void 0) {
224
- const a = this.toCSSProperty(o);
225
- if (S(l) || m(l)) {
226
- const d = l, c = Y(this);
227
- N({
252
+ const a = this.toCSSProperty(s);
253
+ if (b(l) || m(l)) {
254
+ const d = l, c = X(this);
255
+ K({
228
256
  element: i,
229
257
  accessor: d,
230
- updaterId: `${x}:${c}:${a}`,
258
+ updaterId: `${G}:${c}:${a}`,
231
259
  updater: (w) => {
232
260
  const h = this.toCSSValueForProperty(a, w);
233
261
  r(a, h);
@@ -244,13 +272,13 @@ class E {
244
272
  * Add CSS classes to an element
245
273
  */
246
274
  addClasses(i, t) {
247
- i instanceof HTMLElement && i.classList.add(...t);
275
+ T(i) && i.classList.add(...t);
248
276
  }
249
277
  /**
250
278
  * Remove CSS classes from an element
251
279
  */
252
280
  removeClasses(i, t) {
253
- i instanceof HTMLElement && i.classList.remove(...t);
281
+ T(i) && i.classList.remove(...t);
254
282
  }
255
283
  /**
256
284
  * Create a style computation context
@@ -265,7 +293,7 @@ class E {
265
293
  };
266
294
  }
267
295
  }
268
- class ie extends E {
296
+ class oe extends E {
269
297
  constructor() {
270
298
  super(...arguments), f(this, "type", "layout"), f(this, "priority", C.LAYOUT);
271
299
  }
@@ -281,40 +309,40 @@ class ie extends E {
281
309
  );
282
310
  this.applyStyles(t.element, n);
283
311
  const r = this.properties;
284
- r.position && t.element instanceof HTMLElement && this.applyAbsolutePosition(t.element, r.position);
312
+ r.position && T(t.element) && this.applyAbsolutePosition(t.element, r.position);
285
313
  }
286
314
  // Layout modifier implementations have been migrated to @tachui/modifiers/layout
287
315
  applyAbsolutePosition(i, t) {
288
- const { x: e, y: n } = t, r = e ?? "auto", o = n ?? "auto";
289
- i.style.left = this.toCSSValue(r), i.style.top = this.toCSSValue(o);
316
+ const { x: e, y: n } = t, r = e ?? "auto", s = n ?? "auto";
317
+ i.style.left = this.toCSSValue(r), i.style.top = this.toCSSValue(s);
290
318
  }
291
319
  computeLayoutStyles(i, t) {
292
320
  const e = {};
293
321
  if (i.frame) {
294
- const n = i.frame, r = B(n);
322
+ const n = i.frame, r = _(n);
295
323
  if (Object.assign(e, r.cssProps), n.width !== void 0) {
296
- const o = g(n.width);
297
- o !== void 0 && !p(n.width) && !r.expandWidth && (e.width = o);
324
+ const s = g(n.width);
325
+ s !== void 0 && !p(n.width) && !r.expandWidth && (e.width = s);
298
326
  }
299
327
  if (n.height !== void 0) {
300
- const o = g(n.height);
301
- o !== void 0 && !p(n.height) && !r.expandHeight && (e.height = o);
328
+ const s = g(n.height);
329
+ s !== void 0 && !p(n.height) && !r.expandHeight && (e.height = s);
302
330
  }
303
331
  if (n.minWidth !== void 0) {
304
- const o = g(n.minWidth);
305
- o !== void 0 && (e.minWidth = o);
332
+ const s = g(n.minWidth);
333
+ s !== void 0 && (e.minWidth = s);
306
334
  }
307
335
  if (n.maxWidth !== void 0 && !p(n.maxWidth)) {
308
- const o = g(n.maxWidth);
309
- o !== void 0 && (e.maxWidth = o);
336
+ const s = g(n.maxWidth);
337
+ s !== void 0 && (e.maxWidth = s);
310
338
  } else p(n.maxWidth) && (e.maxWidth = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
311
339
  if (n.minHeight !== void 0) {
312
- const o = g(n.minHeight);
313
- o !== void 0 && (e.minHeight = o);
340
+ const s = g(n.minHeight);
341
+ s !== void 0 && (e.minHeight = s);
314
342
  }
315
343
  if (n.maxHeight !== void 0 && !p(n.maxHeight)) {
316
- const o = g(n.maxHeight);
317
- o !== void 0 && (e.maxHeight = o);
344
+ const s = g(n.maxHeight);
345
+ s !== void 0 && (e.maxHeight = s);
318
346
  } else p(n.maxHeight) && (e.maxHeight = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
319
347
  }
320
348
  if (i.padding !== void 0)
@@ -351,7 +379,7 @@ class ie extends E {
351
379
  }
352
380
  if (i.layoutPriority !== void 0) {
353
381
  const n = Number(i.layoutPriority);
354
- 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));
382
+ 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["--layout-priority"] = String(n);
355
383
  }
356
384
  if (i.offset, i.aspectRatio) {
357
385
  const { ratio: n, contentMode: r } = i.aspectRatio;
@@ -364,7 +392,7 @@ class ie extends E {
364
392
  return e;
365
393
  }
366
394
  }
367
- class ne extends E {
395
+ class se extends E {
368
396
  constructor() {
369
397
  super(...arguments), f(this, "type", "appearance"), f(this, "priority", C.APPEARANCE);
370
398
  }
@@ -387,16 +415,16 @@ class ne extends E {
387
415
  * Apply Asset-based styles with theme reactivity
388
416
  */
389
417
  applyAssetBasedStyles(i, t) {
390
- const e = D();
391
- t.foregroundColor && this.isAsset(t.foregroundColor) && b(() => {
418
+ const e = B();
419
+ t.foregroundColor && this.isAsset(t.foregroundColor) && S(() => {
392
420
  e();
393
421
  const n = t.foregroundColor.resolve();
394
422
  this.applyStyleChange(i, "color", n);
395
- }), t.backgroundColor && this.isAsset(t.backgroundColor) && b(() => {
423
+ }), t.backgroundColor && this.isAsset(t.backgroundColor) && S(() => {
396
424
  e();
397
425
  const n = t.backgroundColor.resolve();
398
426
  this.applyStyleChange(i, "backgroundColor", n);
399
- }), t.border?.color && this.isAsset(t.border.color) && b(() => {
427
+ }), t.border?.color && this.isAsset(t.border.color) && S(() => {
400
428
  e();
401
429
  const n = t.border.color.resolve();
402
430
  this.applyStyleChange(i, "borderColor", n);
@@ -418,7 +446,7 @@ class ne extends E {
418
446
  t.fontFamily = r;
419
447
  } else
420
448
  t.fontFamily = n.family;
421
- n.size !== void 0 && (t.fontSize = S(n.size) || m(n.size) ? n.size : this.toCSSValue(n.size)), n.weight !== void 0 && (t.fontWeight = S(n.weight) || m(n.weight) ? n.weight : String(n.weight)), n.style && (t.fontStyle = n.style);
449
+ n.size !== void 0 && (t.fontSize = b(n.size) || m(n.size) ? n.size : this.toCSSValue(n.size)), n.weight !== void 0 && (t.fontWeight = b(n.weight) || m(n.weight) ? n.weight : String(n.weight)), n.style && (t.fontStyle = n.style);
422
450
  }
423
451
  if (i.cornerRadius !== void 0 && (t.borderRadius = this.toCSSValue(i.cornerRadius)), i.border) {
424
452
  const n = i.border;
@@ -451,7 +479,7 @@ class ne extends E {
451
479
  return i._tachui_component || null;
452
480
  }
453
481
  }
454
- class re extends E {
482
+ class ae extends E {
455
483
  constructor() {
456
484
  super(...arguments), f(this, "type", "interaction"), f(this, "priority", C.INTERACTION);
457
485
  }
@@ -470,15 +498,15 @@ class re extends E {
470
498
  let n = 0, r = 0;
471
499
  t.element.addEventListener(
472
500
  "touchstart",
473
- (o) => {
474
- const a = o.touches[0];
501
+ (s) => {
502
+ const a = s.touches[0];
475
503
  n = a.clientX, r = a.clientY;
476
504
  },
477
505
  { passive: !0 }
478
506
  ), t.element.addEventListener(
479
507
  "touchend",
480
- (o) => {
481
- const a = o.changedTouches[0], d = a.clientX - n, c = a.clientY - r;
508
+ (s) => {
509
+ const a = s.changedTouches[0], d = a.clientX - n, c = a.clientY - r;
482
510
  Math.abs(d) > Math.abs(c) && Math.abs(d) > 50 && (d < 0 && e.onSwipeLeft ? e.onSwipeLeft() : d > 0 && e.onSwipeRight && e.onSwipeRight());
483
511
  },
484
512
  { passive: !0 }
@@ -489,12 +517,12 @@ class re extends E {
489
517
  }), e.onWheel && t.element.addEventListener("wheel", e.onWheel, {
490
518
  passive: !1
491
519
  }), e.onInput && t.element.addEventListener("input", e.onInput), e.onChange && t.element.addEventListener("change", (n) => {
492
- const r = n.target, o = r.value || r.textContent || "";
493
- e.onChange(o, n);
494
- }), 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);
520
+ const r = n.target, s = r.value || r.textContent || "";
521
+ e.onChange(s, n);
522
+ }), 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(t.element) && (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(t.element) && (t.element.draggable = e.draggable), e.accessibilityLabel && t.element.setAttribute("aria-label", e.accessibilityLabel), e.accessibilityHint && t.element.setAttribute("aria-describedby", e.accessibilityHint);
495
523
  }
496
524
  }
497
- class oe extends E {
525
+ class le extends E {
498
526
  constructor() {
499
527
  super(...arguments), f(this, "type", "animation"), f(this, "priority", C.ANIMATION);
500
528
  }
@@ -502,26 +530,26 @@ class oe extends E {
502
530
  if (!t.element) return;
503
531
  const e = this.properties;
504
532
  if (e.transition) {
505
- const n = e.transition, r = n.property || "all", o = n.duration || 300, l = n.easing || "ease", a = n.delay || 0;
506
- t.element instanceof HTMLElement && (t.element.style.transition = `${r} ${o}ms ${l} ${a}ms`);
533
+ const n = e.transition, r = n.property || "all", s = n.duration || 300, l = n.easing || "ease", a = n.delay || 0;
534
+ A(t.element) && (r === "none" ? t.element.style.transition = "none" : t.element.style.transition = `${r} ${s}ms ${l} ${a}ms`);
507
535
  }
508
- if (e.animation && t.element instanceof HTMLElement) {
536
+ if (e.animation && A(t.element)) {
509
537
  const n = e.animation;
510
- if (n.keyframes) {
511
- const r = `tachui-animation-${t.componentId}-${Date.now()}`, o = this.createKeyframeRule(
538
+ if (n.keyframes && typeof document < "u") {
539
+ const r = `tachui-animation-${t.componentId}-${Date.now()}`, s = this.createKeyframeRule(
512
540
  r,
513
541
  n.keyframes
514
542
  );
515
- this.addKeyframesToStylesheet(o);
543
+ this.addKeyframesToStylesheet(s);
516
544
  const l = n.duration || 1e3, a = n.easing || "ease", d = n.iterations || 1, c = n.direction || "normal";
517
545
  t.element.style.animation = `${r} ${l}ms ${a} ${d} ${c}`;
518
546
  }
519
547
  }
520
- if (e.transform && t.element instanceof HTMLElement && (S(e.transform) || m(e.transform) ? b(() => {
548
+ if (e.transform && A(t.element) && (b(e.transform) || m(e.transform) ? S(() => {
521
549
  const n = e.transform();
522
- t.element instanceof HTMLElement && (t.element.style.transform = n);
523
- }) : t.element.style.transform = e.transform), e.scaleEffect && t.element instanceof HTMLElement) {
524
- const { x: n, y: r, anchor: o } = e.scaleEffect, l = r ?? n, d = {
550
+ A(t.element) && (t.element.style.transform = n);
551
+ }) : t.element.style.transform = e.transform), e.scaleEffect && A(t.element)) {
552
+ const { x: n, y: r, anchor: s } = e.scaleEffect, l = r ?? n, d = {
525
553
  center: "50% 50%",
526
554
  top: "50% 0%",
527
555
  topLeading: "0% 0%",
@@ -531,20 +559,27 @@ class oe extends E {
531
559
  bottomTrailing: "100% 100%",
532
560
  leading: "0% 50%",
533
561
  trailing: "100% 50%"
534
- }[o || "center"] || "50% 50%";
562
+ }[s || "center"] || "50% 50%";
535
563
  t.element.style.transformOrigin = d;
536
- const c = `scale(${n}, ${l})`, h = (t.element.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), V = h ? `${h} ${c}`.trim() : c;
537
- t.element.style.transform = V;
564
+ const c = `scale(${n}, ${l})`, h = (t.element.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), O = h ? `${h} ${c}`.trim() : c;
565
+ t.element.style.transform = O;
538
566
  }
539
567
  }
568
+ getStaticCSS(i) {
569
+ return Z(
570
+ i,
571
+ this.properties,
572
+ this.createKeyframeRule.bind(this)
573
+ );
574
+ }
540
575
  createKeyframeRule(i, t) {
541
576
  let e = `@keyframes ${i} {
542
577
  `;
543
578
  for (const [n, r] of Object.entries(t)) {
544
579
  e += ` ${n} {
545
580
  `;
546
- for (const [o, l] of Object.entries(r)) {
547
- const a = this.toCSSProperty(o);
581
+ for (const [s, l] of Object.entries(r)) {
582
+ const a = this.toCSSProperty(s);
548
583
  e += ` ${a}: ${l};
549
584
  `;
550
585
  }
@@ -560,7 +595,7 @@ class oe extends E {
560
595
  t || (t = document.createElement("style"), t.id = "tachui-animations", document.head.appendChild(t)), t.appendChild(document.createTextNode(i));
561
596
  }
562
597
  }
563
- class se extends E {
598
+ class de extends E {
564
599
  constructor() {
565
600
  super(...arguments), f(this, "type", "lifecycle"), f(this, "priority", C.CUSTOM), f(this, "activeAbortController");
566
601
  }
@@ -601,7 +636,7 @@ class se extends E {
601
636
  this.properties._cleanupFunctions || (this.properties._cleanupFunctions = []), this.properties._cleanupFunctions.push(i);
602
637
  }
603
638
  }
604
- class ae extends E {
639
+ class fe extends E {
605
640
  constructor() {
606
641
  super(...arguments), f(this, "type", "resizable"), f(this, "priority", C.APPEARANCE);
607
642
  }
@@ -610,13 +645,14 @@ class ae extends E {
610
645
  }
611
646
  }
612
647
  export {
613
- oe as AnimationModifier,
614
- ne as AppearanceModifier,
648
+ le as AnimationModifier,
649
+ se as AppearanceModifier,
615
650
  E as BaseModifier,
616
- re as InteractionModifier,
617
- ie as LayoutModifier,
618
- se as LifecycleModifier,
619
- ae as ResizableModifier,
620
- N as bindReactiveStyle,
621
- te as setReactiveStyleUpdaterErrorHandler
651
+ ae as InteractionModifier,
652
+ oe as LayoutModifier,
653
+ de as LifecycleModifier,
654
+ fe as ResizableModifier,
655
+ K as bindReactiveStyle,
656
+ Z as collectStaticAnimationCSSRules,
657
+ re as setReactiveStyleUpdaterErrorHandler
622
658
  };
@@ -1,5 +1,5 @@
1
1
  import "@tachui/registry";
2
- import { M as s, a, c as o, m as d, s as t } from "../concatenated-component-CA54ng_j.js";
2
+ import { M as s, a, c as o, m as d, s as t } from "../concatenated-component-DisxEqg6.js";
3
3
  export {
4
4
  s as ModifierBuilderImpl,
5
5
  a as applyModifiers,
@@ -1 +1 @@
1
- {"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../src/modifiers/factories.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAElE,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,eAAe,EAEhB,MAAM,SAAS,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AEG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,GACrD,QAAQ,CAkDV;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EACF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,GAC1C,QAAQ,CAsCV;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,QAAQ,CA2B7E"}
@@ -1,8 +1,8 @@
1
1
  import { AnimationModifier as r, AppearanceModifier as o, BaseModifier as a, InteractionModifier as s, LayoutModifier as f, LifecycleModifier as t, ResizableModifier as d } from "./base.js";
2
2
  import { ModifierPriority as p } from "@tachui/types/modifiers";
3
- import { M as c, a as l, b as m, d as y, c as x, e as b, m as u, s as g } from "../concatenated-component-CA54ng_j.js";
4
- import { a as h, r as B } from "../proxy-B7ZIqGd0.js";
5
- import { a as R, b as v, d as A, e as I, f as L, c as j, g as k, h as z, j as E, i as H, l as N, m as S, p as T, r as U, s as W, k as q } from "../factories-B05hE6kc.js";
3
+ import { M as c, a as l, b as m, d as y, c as x, e as b, m as u, s as g } from "../concatenated-component-DisxEqg6.js";
4
+ import { a as h, r as B } from "../proxy-B6FFddJq.js";
5
+ import { a as R, b as v, d as A, e as I, f as L, c as j, g as k, h as z, j as E, i as H, l as N, m as S, p as T, r as U, s as W, k as q } from "../factories-Bz6LZlk6.js";
6
6
  import { r as D } from "../registration-utils-CNsN4eoU.js";
7
7
  export {
8
8
  r as AnimationModifier,
@@ -1,4 +1,4 @@
1
- import { b as a, d as r, e as s, z as t, B as d, A as p } from "../concatenated-component-CA54ng_j.js";
1
+ import { b as a, d as r, e as s, z as t, B as d, A as p } from "../concatenated-component-DisxEqg6.js";
2
2
  import "@tachui/registry";
3
3
  export {
4
4
  a as applyModifiersToNode,
@@ -1,6 +1,6 @@
1
1
  import { c as l } from "./effect-DgNm6jk9.js";
2
2
  import { d as f, j as p } from "./signal-BRoiFOO7.js";
3
- import { d as a, g as d, p as g, c as y } from "./component-context-C7Y6Xu6h.js";
3
+ import { d as a, g as d, p as g, c as y } from "./component-context-BB80qzyZ.js";
4
4
  var j = Object.defineProperty, O = (e, t, n) => t in e ? j(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, s = (e, t, n) => O(e, typeof t != "symbol" ? t + "" : t, n);
5
5
  class v {
6
6
  constructor(t) {
@@ -1,6 +1,6 @@
1
1
  import { c as v } from "./computed-CA4Cgtoe.js";
2
2
  import { d as p } from "./signal-BRoiFOO7.js";
3
- import { b as C } from "./component-context-C7Y6Xu6h.js";
3
+ import { b as C } from "./component-context-BB80qzyZ.js";
4
4
  var x = Object.defineProperty, b = (s, e, t) => e in s ? x(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, c = (s, e, t) => b(s, typeof e != "symbol" ? e + "" : e, t);
5
5
  const f = class l {
6
6
  constructor() {
@@ -1,4 +1,4 @@
1
- import { z as h, d as R } from "./concatenated-component-CA54ng_j.js";
1
+ import { z as h, d as R } from "./concatenated-component-DisxEqg6.js";
2
2
  const k = {
3
3
  proxyModifiers: !0
4
4
  };
@@ -18,6 +18,8 @@ export declare const EnvironmentSymbol: unique symbol;
18
18
  * Create a new component context
19
19
  */
20
20
  export declare function createComponentContext(componentId: string, parent?: ComponentContext): ComponentContext;
21
+ export declare function getCurrentComponentContextOrNull(): ComponentContext | null;
22
+ export declare function createDeterministicComponentId(componentName: string, parentContext?: ComponentContext): string;
21
23
  /**
22
24
  * Get the current component context
23
25
  */