@tachui/core 0.8.22 → 0.8.24
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.
- package/dist/assets/FontAsset.d.ts.map +1 -1
- package/dist/assets/index.js +42 -41
- package/dist/{binding-DCV5PKkK.js → binding-DCr-JHsC.js} +9 -9
- package/dist/build-tools/typegen-runner.d.ts +4 -0
- package/dist/build-tools/typegen-runner.d.ts.map +1 -1
- package/dist/cleanup-BR8UpYPX.js +61 -0
- package/dist/common.js +272 -277
- package/dist/{component-D-O9yq0P.js → component-BzvSm8rM.js} +19 -19
- package/dist/{component-base-C41K3NTe.js → component-base-Do2EdQkr.js} +32 -33
- package/dist/{component-context-B9HI2nZH.js → component-context-C7Y6Xu6h.js} +1 -1
- package/dist/components/index.js +1 -1
- package/dist/computed-CA4Cgtoe.js +407 -0
- package/dist/{concatenated-component-2Gzy5e2c.js → concatenated-component-CA54ng_j.js} +43 -44
- package/dist/css-classes/index.js +2 -2
- package/dist/{effect-BsW3fy1q.js → effect-DgNm6jk9.js} +3 -3
- package/dist/{enhanced-renderer-t9Ni2EEG.js → enhanced-renderer-D05CCloF.js} +26 -28
- package/dist/essential.js +276 -281
- package/dist/factories-B05hE6kc.js +644 -0
- package/dist/{factory-gqfMcmOy.js → factory-B1YXfgU1.js} +23 -29
- package/dist/full.d.ts +12 -0
- package/dist/full.d.ts.map +1 -0
- package/dist/full.js +436 -0
- package/dist/gradients/index.js +53 -53
- package/dist/hooks-w_FYPLjI.js +158 -0
- package/dist/{index-DL9Cys3t.js → index-CmQmIgPK.js} +220 -233
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +295 -300
- package/dist/minimal-prod.js +106 -108
- package/dist/minimal.js +97 -98
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +121 -120
- package/dist/modifiers/builder.js +1 -1
- package/dist/modifiers/index.js +22 -23
- package/dist/modifiers/registry.js +1 -1
- package/dist/{observed-object-p1CLdrFm.js → observed-object-DCoyucmV.js} +3 -3
- package/dist/optimization-D9t53vNJ.js +308 -0
- package/dist/{proxy-Cp0QUXME.js → proxy-B7ZIqGd0.js} +3 -3
- package/dist/reactive/index.js +87 -85
- package/dist/runtime/dom-bridge.js +15 -17
- package/dist/runtime/index.js +71 -71
- package/dist/runtime/renderer.js +10 -11
- package/dist/signal-BRoiFOO7.js +262 -0
- package/dist/{signal-list-07gNXGiW.js → signal-list-_Eid-N7_.js} +285 -176
- package/dist/state/index.js +43 -44
- package/dist/theme-D5-09a8N.js +26 -0
- package/dist/validation/index.js +24 -26
- package/dist/version.js +1 -1
- package/package.json +16 -3
- package/dist/factories-B3-rmvkB.js +0 -268
- package/dist/hooks-WGmpzYgD.js +0 -446
- package/dist/optimization-CbKNA9w4.js +0 -21
- package/dist/presets-B9x94uRn.js +0 -381
- package/dist/scheduler-DppMK9mR.js +0 -169
- package/dist/theme-CRLPHryV.js +0 -687
- package/dist/{index-JQ1sW1SK.js → index-7vhCZc7g.js} +1 -1
package/dist/modifiers/base.js
CHANGED
|
@@ -1,86 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { ModifierPriority as
|
|
6
|
-
import { shouldExpandForInfinity as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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";
|
|
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";
|
|
8
|
+
const L = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
let y = null;
|
|
10
|
+
function te(s) {
|
|
10
11
|
if (s === null)
|
|
11
|
-
return
|
|
12
|
+
return y = null, () => {
|
|
12
13
|
};
|
|
13
|
-
const i =
|
|
14
|
-
return
|
|
14
|
+
const i = y;
|
|
15
|
+
return y = (t, e) => {
|
|
15
16
|
i?.(t, e), s(t, e);
|
|
16
17
|
}, () => {
|
|
17
|
-
|
|
18
|
+
y = i;
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
function k(s, i, t) {
|
|
21
22
|
try {
|
|
22
23
|
s(i);
|
|
23
24
|
} catch (e) {
|
|
24
|
-
if (
|
|
25
|
-
|
|
25
|
+
if (y) {
|
|
26
|
+
y(e, { updaterId: t, value: i });
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
29
|
console.error(`Reactive style updater failed (${t}):`, e);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
const
|
|
32
|
-
let P = !1,
|
|
32
|
+
const A = 200, u = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set();
|
|
33
|
+
let P = !1, M = !1;
|
|
33
34
|
function z(s) {
|
|
34
|
-
u.get(s)?.forEach((t) => t()), u.delete(s),
|
|
35
|
+
u.get(s)?.forEach((t) => t()), u.delete(s), T.delete(s);
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
+
function $() {
|
|
37
38
|
const s = Date.now();
|
|
38
|
-
for (const i of Array.from(
|
|
39
|
+
for (const i of Array.from(v)) {
|
|
39
40
|
const t = i.deref();
|
|
40
41
|
if (!t) {
|
|
41
|
-
|
|
42
|
+
v.delete(i);
|
|
42
43
|
continue;
|
|
43
44
|
}
|
|
44
|
-
const e =
|
|
45
|
+
const e = T.get(t), n = u.get(t);
|
|
45
46
|
if (!e || !n || n.size === 0) {
|
|
46
|
-
|
|
47
|
+
v.delete(i);
|
|
47
48
|
continue;
|
|
48
49
|
}
|
|
49
50
|
if (t.isConnected) {
|
|
50
51
|
e.wasConnected = !0;
|
|
51
52
|
continue;
|
|
52
53
|
}
|
|
53
|
-
(e.wasConnected || s - e.trackedAt >=
|
|
54
|
+
(e.wasConnected || s - e.trackedAt >= A) && (z(t), v.delete(i));
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
function F() {
|
|
57
|
-
if (
|
|
58
|
-
|
|
58
|
+
if (M || typeof setTimeout != "function") return;
|
|
59
|
+
M = !0;
|
|
59
60
|
const s = () => {
|
|
60
|
-
if (
|
|
61
|
-
|
|
61
|
+
if ($(), v.size === 0) {
|
|
62
|
+
M = !1;
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
setTimeout(s,
|
|
65
|
+
setTimeout(s, A);
|
|
65
66
|
};
|
|
66
|
-
setTimeout(s,
|
|
67
|
+
setTimeout(s, A);
|
|
67
68
|
}
|
|
68
69
|
function W() {
|
|
69
70
|
if (P || typeof document > "u" || !document.documentElement || typeof MutationObserver > "u")
|
|
70
71
|
return;
|
|
71
72
|
new MutationObserver(() => {
|
|
72
|
-
|
|
73
|
+
$();
|
|
73
74
|
}).observe(document.documentElement, { childList: !0, subtree: !0 }), P = !0;
|
|
74
75
|
}
|
|
75
76
|
function U(s, i) {
|
|
76
77
|
W(), F();
|
|
77
78
|
const t = u.get(s) ?? /* @__PURE__ */ new Set(), e = t.size > 0;
|
|
78
|
-
return t.add(i), u.set(s, t), e || (
|
|
79
|
+
return t.add(i), u.set(s, t), e || (T.set(s, {
|
|
79
80
|
trackedAt: Date.now(),
|
|
80
81
|
wasConnected: s.isConnected
|
|
81
|
-
}),
|
|
82
|
+
}), v.add(new WeakRef(s))), () => {
|
|
82
83
|
const n = u.get(s);
|
|
83
|
-
n && (n.delete(i), n.size === 0 && (u.delete(s),
|
|
84
|
+
n && (n.delete(i), n.size === 0 && (u.delete(s), T.delete(s)));
|
|
84
85
|
};
|
|
85
86
|
}
|
|
86
87
|
function N({
|
|
@@ -89,15 +90,15 @@ function N({
|
|
|
89
90
|
updater: t,
|
|
90
91
|
updaterId: e
|
|
91
92
|
}) {
|
|
92
|
-
const n =
|
|
93
|
-
|
|
93
|
+
const n = L.get(s) ?? /* @__PURE__ */ new Map();
|
|
94
|
+
L.has(s) || L.set(s, n);
|
|
94
95
|
let r = n.get(i);
|
|
95
96
|
if (!r) {
|
|
96
97
|
const a = /* @__PURE__ */ new Map();
|
|
97
98
|
r = { effect: b(() => {
|
|
98
99
|
const c = i();
|
|
99
100
|
a.forEach(
|
|
100
|
-
(
|
|
101
|
+
(w, h) => k(w, c, h)
|
|
101
102
|
);
|
|
102
103
|
}), updaters: a }, n.set(i, r);
|
|
103
104
|
}
|
|
@@ -105,19 +106,19 @@ function N({
|
|
|
105
106
|
let o = null;
|
|
106
107
|
const l = () => {
|
|
107
108
|
o && (o(), o = null);
|
|
108
|
-
const a =
|
|
109
|
-
d && (d.updaters.delete(e), d.updaters.size === 0 && (d.effect.dispose(), a?.delete(i), m(i) &&
|
|
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));
|
|
110
111
|
};
|
|
111
|
-
O() ?
|
|
112
|
+
O() ? _(l) : o = U(s, l);
|
|
112
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);
|
|
114
115
|
const I = Symbol.for("tachui.modifier.instanceId"), x = "core";
|
|
115
|
-
let
|
|
116
|
+
let H = 0;
|
|
116
117
|
function Y(s) {
|
|
117
118
|
const i = s[I];
|
|
118
119
|
if (typeof i == "number") return i;
|
|
119
|
-
|
|
120
|
-
const t =
|
|
120
|
+
H += 1;
|
|
121
|
+
const t = H;
|
|
121
122
|
return Object.defineProperty(s, I, {
|
|
122
123
|
value: t,
|
|
123
124
|
enumerable: !1,
|
|
@@ -125,7 +126,7 @@ function Y(s) {
|
|
|
125
126
|
writable: !1
|
|
126
127
|
}), t;
|
|
127
128
|
}
|
|
128
|
-
class
|
|
129
|
+
class E {
|
|
129
130
|
constructor(i) {
|
|
130
131
|
this.properties = i;
|
|
131
132
|
}
|
|
@@ -135,33 +136,32 @@ class C {
|
|
|
135
136
|
resolveReactiveProps(i, t) {
|
|
136
137
|
const e = {};
|
|
137
138
|
for (const [n, r] of Object.entries(i))
|
|
138
|
-
|
|
139
|
+
S(r) || m(r), e[n] = r;
|
|
139
140
|
return e;
|
|
140
141
|
}
|
|
141
142
|
/**
|
|
142
143
|
* Apply a single style change to an element with reactive support
|
|
143
144
|
*/
|
|
144
145
|
applyStyleChange(i, t, e) {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
} else
|
|
154
|
-
i.style.setProperty(n, o);
|
|
155
|
-
});
|
|
156
|
-
else {
|
|
157
|
-
const r = String(e);
|
|
158
|
-
if (r.includes("!important")) {
|
|
159
|
-
const o = r.replace(/\s*!important\s*$/, "").trim();
|
|
160
|
-
i.style.setProperty(n, o, "important");
|
|
161
|
-
} else
|
|
162
|
-
i.style.setProperty(n, r);
|
|
146
|
+
const n = typeof HTMLElement < "u" && i instanceof HTMLElement;
|
|
147
|
+
if (!n && !i.style)
|
|
148
|
+
return;
|
|
149
|
+
const r = this.toCSSProperty(t), o = i.style, l = (a) => {
|
|
150
|
+
if (a.includes("!important")) {
|
|
151
|
+
const d = a.replace(/\s*!important\s*$/, "").trim();
|
|
152
|
+
o.setProperty(r, d, "important");
|
|
153
|
+
return;
|
|
163
154
|
}
|
|
155
|
+
o.setProperty(r, a);
|
|
156
|
+
};
|
|
157
|
+
if (S(e) || m(e)) {
|
|
158
|
+
b(() => {
|
|
159
|
+
const a = e();
|
|
160
|
+
l(String(a));
|
|
161
|
+
});
|
|
162
|
+
return;
|
|
164
163
|
}
|
|
164
|
+
l(String(e));
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Convert camelCase property to CSS kebab-case
|
|
@@ -207,34 +207,35 @@ class C {
|
|
|
207
207
|
* Apply multiple CSS properties to an element with reactive support
|
|
208
208
|
*/
|
|
209
209
|
applyStyles(i, t) {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
const e = typeof HTMLElement < "u" && i instanceof HTMLElement;
|
|
211
|
+
if (e || i.style) {
|
|
212
|
+
const n = i.style, r = (o, l) => {
|
|
213
|
+
if (n.setProperty)
|
|
214
|
+
if (typeof l == "string" && l.includes("!important")) {
|
|
215
|
+
const a = l.replace(/\s*!important\s*$/, "").trim();
|
|
216
|
+
n.setProperty(o, a, "important");
|
|
216
217
|
} else
|
|
217
|
-
|
|
218
|
+
n.setProperty(o, l);
|
|
218
219
|
else
|
|
219
|
-
|
|
220
|
+
n[o] = l;
|
|
220
221
|
};
|
|
221
|
-
for (const [
|
|
222
|
-
if (
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
const
|
|
222
|
+
for (const [o, l] of Object.entries(t))
|
|
223
|
+
if (l !== void 0) {
|
|
224
|
+
const a = this.toCSSProperty(o);
|
|
225
|
+
if (S(l) || m(l)) {
|
|
226
|
+
const d = l, c = Y(this);
|
|
226
227
|
N({
|
|
227
228
|
element: i,
|
|
228
|
-
accessor:
|
|
229
|
-
updaterId: `${x}:${
|
|
230
|
-
updater: (
|
|
231
|
-
const
|
|
232
|
-
|
|
229
|
+
accessor: d,
|
|
230
|
+
updaterId: `${x}:${c}:${a}`,
|
|
231
|
+
updater: (w) => {
|
|
232
|
+
const h = this.toCSSValueForProperty(a, w);
|
|
233
|
+
r(a, h);
|
|
233
234
|
}
|
|
234
235
|
});
|
|
235
236
|
} else {
|
|
236
|
-
const
|
|
237
|
-
|
|
237
|
+
const d = this.toCSSValueForProperty(a, l);
|
|
238
|
+
r(a, d);
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
241
|
}
|
|
@@ -264,9 +265,9 @@ class C {
|
|
|
264
265
|
};
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
class
|
|
268
|
+
class ie extends E {
|
|
268
269
|
constructor() {
|
|
269
|
-
super(...arguments), f(this, "type", "layout"), f(this, "priority",
|
|
270
|
+
super(...arguments), f(this, "type", "layout"), f(this, "priority", C.LAYOUT);
|
|
270
271
|
}
|
|
271
272
|
apply(i, t) {
|
|
272
273
|
if (!i.element || !t.element) return;
|
|
@@ -290,31 +291,31 @@ class te extends C {
|
|
|
290
291
|
computeLayoutStyles(i, t) {
|
|
291
292
|
const e = {};
|
|
292
293
|
if (i.frame) {
|
|
293
|
-
const n = i.frame, r =
|
|
294
|
+
const n = i.frame, r = B(n);
|
|
294
295
|
if (Object.assign(e, r.cssProps), n.width !== void 0) {
|
|
295
|
-
const o =
|
|
296
|
-
o !== void 0 && !
|
|
296
|
+
const o = g(n.width);
|
|
297
|
+
o !== void 0 && !p(n.width) && !r.expandWidth && (e.width = o);
|
|
297
298
|
}
|
|
298
299
|
if (n.height !== void 0) {
|
|
299
|
-
const o =
|
|
300
|
-
o !== void 0 && !
|
|
300
|
+
const o = g(n.height);
|
|
301
|
+
o !== void 0 && !p(n.height) && !r.expandHeight && (e.height = o);
|
|
301
302
|
}
|
|
302
303
|
if (n.minWidth !== void 0) {
|
|
303
|
-
const o =
|
|
304
|
+
const o = g(n.minWidth);
|
|
304
305
|
o !== void 0 && (e.minWidth = o);
|
|
305
306
|
}
|
|
306
|
-
if (n.maxWidth !== void 0 && !
|
|
307
|
-
const o =
|
|
307
|
+
if (n.maxWidth !== void 0 && !p(n.maxWidth)) {
|
|
308
|
+
const o = g(n.maxWidth);
|
|
308
309
|
o !== void 0 && (e.maxWidth = o);
|
|
309
|
-
} else
|
|
310
|
+
} else p(n.maxWidth) && (e.maxWidth = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
|
|
310
311
|
if (n.minHeight !== void 0) {
|
|
311
|
-
const o =
|
|
312
|
+
const o = g(n.minHeight);
|
|
312
313
|
o !== void 0 && (e.minHeight = o);
|
|
313
314
|
}
|
|
314
|
-
if (n.maxHeight !== void 0 && !
|
|
315
|
-
const o =
|
|
315
|
+
if (n.maxHeight !== void 0 && !p(n.maxHeight)) {
|
|
316
|
+
const o = g(n.maxHeight);
|
|
316
317
|
o !== void 0 && (e.maxHeight = o);
|
|
317
|
-
} else
|
|
318
|
+
} else p(n.maxHeight) && (e.maxHeight = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
|
|
318
319
|
}
|
|
319
320
|
if (i.padding !== void 0)
|
|
320
321
|
if (typeof i.padding == "number")
|
|
@@ -363,9 +364,9 @@ class te extends C {
|
|
|
363
364
|
return e;
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
|
-
class
|
|
367
|
+
class ne extends E {
|
|
367
368
|
constructor() {
|
|
368
|
-
super(...arguments), f(this, "type", "appearance"), f(this, "priority",
|
|
369
|
+
super(...arguments), f(this, "type", "appearance"), f(this, "priority", C.APPEARANCE);
|
|
369
370
|
}
|
|
370
371
|
apply(i, t) {
|
|
371
372
|
if (!i.element || !t.element)
|
|
@@ -386,7 +387,7 @@ class ie extends C {
|
|
|
386
387
|
* Apply Asset-based styles with theme reactivity
|
|
387
388
|
*/
|
|
388
389
|
applyAssetBasedStyles(i, t) {
|
|
389
|
-
const e =
|
|
390
|
+
const e = D();
|
|
390
391
|
t.foregroundColor && this.isAsset(t.foregroundColor) && b(() => {
|
|
391
392
|
e();
|
|
392
393
|
const n = t.foregroundColor.resolve();
|
|
@@ -417,7 +418,7 @@ class ie extends C {
|
|
|
417
418
|
t.fontFamily = r;
|
|
418
419
|
} else
|
|
419
420
|
t.fontFamily = n.family;
|
|
420
|
-
n.size !== void 0 && (t.fontSize =
|
|
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);
|
|
421
422
|
}
|
|
422
423
|
if (i.cornerRadius !== void 0 && (t.borderRadius = this.toCSSValue(i.cornerRadius)), i.border) {
|
|
423
424
|
const n = i.border;
|
|
@@ -450,9 +451,9 @@ class ie extends C {
|
|
|
450
451
|
return i._tachui_component || null;
|
|
451
452
|
}
|
|
452
453
|
}
|
|
453
|
-
class
|
|
454
|
+
class re extends E {
|
|
454
455
|
constructor() {
|
|
455
|
-
super(...arguments), f(this, "type", "interaction"), f(this, "priority",
|
|
456
|
+
super(...arguments), f(this, "type", "interaction"), f(this, "priority", C.INTERACTION);
|
|
456
457
|
}
|
|
457
458
|
apply(i, t) {
|
|
458
459
|
if (!t.element) return;
|
|
@@ -493,9 +494,9 @@ class ne extends C {
|
|
|
493
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);
|
|
494
495
|
}
|
|
495
496
|
}
|
|
496
|
-
class
|
|
497
|
+
class oe extends E {
|
|
497
498
|
constructor() {
|
|
498
|
-
super(...arguments), f(this, "type", "animation"), f(this, "priority",
|
|
499
|
+
super(...arguments), f(this, "type", "animation"), f(this, "priority", C.ANIMATION);
|
|
499
500
|
}
|
|
500
501
|
apply(i, t) {
|
|
501
502
|
if (!t.element) return;
|
|
@@ -516,7 +517,7 @@ class re extends C {
|
|
|
516
517
|
t.element.style.animation = `${r} ${l}ms ${a} ${d} ${c}`;
|
|
517
518
|
}
|
|
518
519
|
}
|
|
519
|
-
if (e.transform && t.element instanceof HTMLElement && (
|
|
520
|
+
if (e.transform && t.element instanceof HTMLElement && (S(e.transform) || m(e.transform) ? b(() => {
|
|
520
521
|
const n = e.transform();
|
|
521
522
|
t.element instanceof HTMLElement && (t.element.style.transform = n);
|
|
522
523
|
}) : t.element.style.transform = e.transform), e.scaleEffect && t.element instanceof HTMLElement) {
|
|
@@ -532,7 +533,7 @@ class re extends C {
|
|
|
532
533
|
trailing: "100% 50%"
|
|
533
534
|
}[o || "center"] || "50% 50%";
|
|
534
535
|
t.element.style.transformOrigin = d;
|
|
535
|
-
const c = `scale(${n}, ${l})`,
|
|
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;
|
|
536
537
|
t.element.style.transform = V;
|
|
537
538
|
}
|
|
538
539
|
}
|
|
@@ -559,9 +560,9 @@ class re extends C {
|
|
|
559
560
|
t || (t = document.createElement("style"), t.id = "tachui-animations", document.head.appendChild(t)), t.appendChild(document.createTextNode(i));
|
|
560
561
|
}
|
|
561
562
|
}
|
|
562
|
-
class
|
|
563
|
+
class se extends E {
|
|
563
564
|
constructor() {
|
|
564
|
-
super(...arguments), f(this, "type", "lifecycle"), f(this, "priority",
|
|
565
|
+
super(...arguments), f(this, "type", "lifecycle"), f(this, "priority", C.CUSTOM), f(this, "activeAbortController");
|
|
565
566
|
}
|
|
566
567
|
apply(i, t) {
|
|
567
568
|
if (!t.element) return;
|
|
@@ -600,22 +601,22 @@ class oe extends C {
|
|
|
600
601
|
this.properties._cleanupFunctions || (this.properties._cleanupFunctions = []), this.properties._cleanupFunctions.push(i);
|
|
601
602
|
}
|
|
602
603
|
}
|
|
603
|
-
class
|
|
604
|
+
class ae extends E {
|
|
604
605
|
constructor() {
|
|
605
|
-
super(...arguments), f(this, "type", "resizable"), f(this, "priority",
|
|
606
|
+
super(...arguments), f(this, "type", "resizable"), f(this, "priority", C.APPEARANCE);
|
|
606
607
|
}
|
|
607
608
|
apply(i, t) {
|
|
608
609
|
t.element && t.element instanceof HTMLImageElement && (t.element.style.objectFit = "fill");
|
|
609
610
|
}
|
|
610
611
|
}
|
|
611
612
|
export {
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
613
|
+
oe as AnimationModifier,
|
|
614
|
+
ne as AppearanceModifier,
|
|
615
|
+
E as BaseModifier,
|
|
616
|
+
re as InteractionModifier,
|
|
617
|
+
ie as LayoutModifier,
|
|
618
|
+
se as LifecycleModifier,
|
|
619
|
+
ae as ResizableModifier,
|
|
619
620
|
N as bindReactiveStyle,
|
|
620
|
-
|
|
621
|
+
te as setReactiveStyleUpdaterErrorHandler
|
|
621
622
|
};
|
|
@@ -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-
|
|
2
|
+
import { M as s, a, c as o, m as d, s as t } from "../concatenated-component-CA54ng_j.js";
|
|
3
3
|
export {
|
|
4
4
|
s as ModifierBuilderImpl,
|
|
5
5
|
a as applyModifiers,
|
package/dist/modifiers/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
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
|
|
4
|
-
import {
|
|
5
|
-
import { a as R, b as v,
|
|
6
|
-
import {
|
|
7
|
-
import { r as F } from "../registration-utils-CNsN4eoU.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-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";
|
|
6
|
+
import { r as D } from "../registration-utils-CNsN4eoU.js";
|
|
8
7
|
export {
|
|
9
8
|
r as AnimationModifier,
|
|
10
9
|
o as AppearanceModifier,
|
|
@@ -12,33 +11,33 @@ export {
|
|
|
12
11
|
s as InteractionModifier,
|
|
13
12
|
f as LayoutModifier,
|
|
14
13
|
t as LifecycleModifier,
|
|
15
|
-
|
|
14
|
+
c as ModifierBuilderImpl,
|
|
16
15
|
p as ModifierPriority,
|
|
17
16
|
d as ResizableModifier,
|
|
18
17
|
R as animationModifiers,
|
|
19
18
|
v as appearanceModifiers,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
l as applyModifiers,
|
|
20
|
+
m as applyModifiersToNode,
|
|
21
|
+
A as classModifier,
|
|
22
|
+
I as combineModifiers,
|
|
23
|
+
L as conditionalModifier,
|
|
24
|
+
j as coreModifiers,
|
|
26
25
|
h as createComponentProxy,
|
|
27
|
-
|
|
26
|
+
k as createCustomModifier,
|
|
28
27
|
y as createModifiableComponent,
|
|
29
28
|
x as createModifierBuilder,
|
|
30
29
|
b as createModifierRegistry,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
z as createStyleModifier,
|
|
31
|
+
E as eventModifier,
|
|
32
|
+
H as interactionModifiers,
|
|
33
|
+
N as layoutModifiers,
|
|
34
|
+
S as modifierHelpers,
|
|
36
35
|
u as modifierUtils,
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
T as presetModifiers,
|
|
37
|
+
D as registerModifierWithMetadata,
|
|
39
38
|
B as resetProxyCache,
|
|
40
|
-
|
|
39
|
+
U as responsiveModifier,
|
|
41
40
|
g as setExternalModifierRegistry,
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
W as stateModifier,
|
|
42
|
+
q as styleModifier
|
|
44
43
|
};
|
|
@@ -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-
|
|
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";
|
|
2
2
|
import "@tachui/registry";
|
|
3
3
|
export {
|
|
4
4
|
a as applyModifiersToNode,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as l } from "./effect-
|
|
2
|
-
import {
|
|
3
|
-
import { d as a, g as d, p as g, c as y } from "./component-context-
|
|
1
|
+
import { c as l } from "./effect-DgNm6jk9.js";
|
|
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";
|
|
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) {
|