@tachui/core 0.8.24 → 0.8.25
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/common.js +1 -1
- package/dist/essential.js +1 -1
- package/dist/{factories-B05hE6kc.js → factories-Bz6LZlk6.js} +108 -99
- package/dist/full.js +1 -1
- package/dist/index.js +1 -1
- package/dist/minimal-prod.js +1 -1
- package/dist/minimal.js +1 -1
- package/dist/modifiers/base.d.ts.map +1 -1
- package/dist/modifiers/base.js +134 -128
- package/dist/modifiers/factories.d.ts.map +1 -1
- package/dist/modifiers/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
package/dist/common.js
CHANGED
|
@@ -11,7 +11,7 @@ import { TACHUI_PACKAGE as bt, TACHUI_PACKAGE_VERSION as Et, VERSION as xt } fro
|
|
|
11
11
|
import { AnimationModifier as yt, AppearanceModifier as Gt, BaseModifier as Rt, InteractionModifier as At, LayoutModifier as Ot, LifecycleModifier as It, ResizableModifier as Pt } from "./modifiers/base.js";
|
|
12
12
|
import { ModifierPriority as Tt } from "@tachui/types/modifiers";
|
|
13
13
|
import { c as wt, a as Bt, g as Ut, i as Ft, r as jt } from "./proxy-B7ZIqGd0.js";
|
|
14
|
-
import { a as kt, b as zt, d as Nt, e as Wt, f as qt, c as Ht, g as _t, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-
|
|
14
|
+
import { a as kt, b as zt, d as Nt, e as Wt, f as qt, c as Ht, g as _t, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-Bz6LZlk6.js";
|
|
15
15
|
import { r as ss } from "./registration-utils-CNsN4eoU.js";
|
|
16
16
|
export * from "@tachui/types/gradients";
|
|
17
17
|
import { generateAngularGradientCSS as is, generateConicGradientCSS as os, generateEllipticalGradientCSS as cs, generateLinearGradientCSS as ds, generateRadialGradientCSS as ls, generateRepeatingLinearGradientCSS as ms, generateRepeatingRadialGradientCSS as gs, gradientToCSS as ps } from "./gradients/css-generator.js";
|
package/dist/essential.js
CHANGED
|
@@ -11,7 +11,7 @@ import { TACHUI_PACKAGE as Et, TACHUI_PACKAGE_VERSION as xt, VERSION as bt } fro
|
|
|
11
11
|
import { AnimationModifier as yt, AppearanceModifier as Gt, BaseModifier as Rt, InteractionModifier as At, LayoutModifier as Ot, LifecycleModifier as Pt, ResizableModifier as It } from "./modifiers/base.js";
|
|
12
12
|
import { ModifierPriority as Tt } from "@tachui/types/modifiers";
|
|
13
13
|
import { c as Ut, a as wt, g as Bt, i as jt, r as Ft } from "./proxy-B7ZIqGd0.js";
|
|
14
|
-
import { a as zt, b as kt, d as Nt, e as Wt, f as qt, c as Ht, g as _t, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-
|
|
14
|
+
import { a as zt, b as kt, d as Nt, e as Wt, f as qt, c as Ht, g as _t, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-Bz6LZlk6.js";
|
|
15
15
|
import { r as ss } from "./registration-utils-CNsN4eoU.js";
|
|
16
16
|
export * from "@tachui/types/gradients";
|
|
17
17
|
import { generateAngularGradientCSS as is, generateConicGradientCSS as os, generateEllipticalGradientCSS as cs, generateLinearGradientCSS as ls, generateRadialGradientCSS as ds, generateRepeatingLinearGradientCSS as ms, generateRepeatingRadialGradientCSS as gs, gradientToCSS as ps } from "./gradients/css-generator.js";
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { LayoutModifier as
|
|
2
|
-
import { ModifierPriority as
|
|
3
|
-
import { globalModifierRegistry as
|
|
1
|
+
import { LayoutModifier as S, AppearanceModifier as F, AnimationModifier as y, LifecycleModifier as C, InteractionModifier as g, BaseModifier as z } from "./modifiers/base.js";
|
|
2
|
+
import { ModifierPriority as v } from "@tachui/types/modifiers";
|
|
3
|
+
import { globalModifierRegistry as j } from "@tachui/registry";
|
|
4
4
|
import { c as w } from "./effect-DgNm6jk9.js";
|
|
5
5
|
import { i as b } from "./signal-BRoiFOO7.js";
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
function H(e) {
|
|
9
|
-
return z(e);
|
|
10
|
-
}
|
|
11
|
-
h.LAYOUT;
|
|
12
|
-
const O = (e) => new P({ layoutPriority: e });
|
|
6
|
+
v.LAYOUT;
|
|
7
|
+
const O = (e) => new S({ alignment: e });
|
|
13
8
|
function T(e) {
|
|
14
9
|
return O(e);
|
|
15
10
|
}
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
function
|
|
19
|
-
return
|
|
11
|
+
v.LAYOUT;
|
|
12
|
+
const D = (e) => new S({ layoutPriority: e });
|
|
13
|
+
function $(e) {
|
|
14
|
+
return D(e);
|
|
20
15
|
}
|
|
21
|
-
|
|
22
|
-
const
|
|
16
|
+
v.APPEARANCE;
|
|
17
|
+
const H = (e) => new F({ opacity: e });
|
|
23
18
|
function V(e) {
|
|
24
|
-
return
|
|
19
|
+
return H(e);
|
|
20
|
+
}
|
|
21
|
+
v.APPEARANCE;
|
|
22
|
+
const W = (e) => new F({ cornerRadius: e });
|
|
23
|
+
function Y(e) {
|
|
24
|
+
return W(e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
26
|
+
function u(e, ...r) {
|
|
27
|
+
const t = j.get(e);
|
|
28
28
|
if (!t)
|
|
29
29
|
throw new Error(
|
|
30
30
|
`Modifier '${e}' not found in registry. Import '@tachui/modifiers' or the relevant segmented bundle before using preset helpers.`
|
|
31
31
|
);
|
|
32
32
|
return t(...r);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const h = {
|
|
35
35
|
/**
|
|
36
36
|
* Set foreground (text) color
|
|
37
37
|
*/
|
|
38
38
|
foregroundColor(e) {
|
|
39
|
-
return
|
|
39
|
+
return u("foregroundColor", e);
|
|
40
40
|
},
|
|
41
41
|
/**
|
|
42
42
|
* Set frame dimensions with support for infinity
|
|
@@ -47,99 +47,99 @@ const v = {
|
|
|
47
47
|
...i,
|
|
48
48
|
...e !== void 0 ? { width: e } : {},
|
|
49
49
|
...r !== void 0 ? { height: r } : {}
|
|
50
|
-
}), new
|
|
50
|
+
}), new S({ frame: i });
|
|
51
51
|
},
|
|
52
52
|
/**
|
|
53
53
|
* Set padding on all sides
|
|
54
54
|
*/
|
|
55
55
|
padding(e) {
|
|
56
|
-
return
|
|
56
|
+
return u("padding", e);
|
|
57
57
|
},
|
|
58
58
|
/**
|
|
59
59
|
* Set margin on all sides
|
|
60
60
|
*/
|
|
61
61
|
margin(e) {
|
|
62
|
-
return
|
|
62
|
+
return u("margin", e);
|
|
63
63
|
},
|
|
64
64
|
/**
|
|
65
65
|
* Set content alignment
|
|
66
66
|
*/
|
|
67
67
|
alignment(e) {
|
|
68
|
-
return
|
|
68
|
+
return T(e);
|
|
69
69
|
},
|
|
70
70
|
/**
|
|
71
71
|
* Set layout priority for ZStack container sizing and flexible layout
|
|
72
72
|
* Higher priority views determine container size in ZStack
|
|
73
73
|
*/
|
|
74
74
|
layoutPriority(e) {
|
|
75
|
-
return
|
|
75
|
+
return $(e);
|
|
76
76
|
}
|
|
77
77
|
}, p = {
|
|
78
78
|
/**
|
|
79
79
|
* Set foreground (text) color
|
|
80
80
|
*/
|
|
81
81
|
foregroundColor(e) {
|
|
82
|
-
return
|
|
82
|
+
return u("foregroundColor", e);
|
|
83
83
|
},
|
|
84
84
|
/**
|
|
85
85
|
* Set background color
|
|
86
86
|
*/
|
|
87
87
|
backgroundColor(e) {
|
|
88
|
-
return
|
|
88
|
+
return u("backgroundColor", e);
|
|
89
89
|
},
|
|
90
90
|
/**
|
|
91
91
|
* Set background (supports gradients)
|
|
92
92
|
*/
|
|
93
93
|
background(e) {
|
|
94
|
-
return
|
|
94
|
+
return u("background", e);
|
|
95
95
|
},
|
|
96
96
|
/**
|
|
97
97
|
* Set font properties
|
|
98
98
|
*/
|
|
99
99
|
font(e) {
|
|
100
|
-
return
|
|
100
|
+
return u("font", e);
|
|
101
101
|
},
|
|
102
102
|
/**
|
|
103
103
|
* Set font size
|
|
104
104
|
*/
|
|
105
105
|
fontSize(e) {
|
|
106
|
-
return
|
|
106
|
+
return u("fontSize", e);
|
|
107
107
|
},
|
|
108
108
|
/**
|
|
109
109
|
* Set font weight
|
|
110
110
|
*/
|
|
111
111
|
fontWeight(e) {
|
|
112
|
-
return
|
|
112
|
+
return u("fontWeight", e);
|
|
113
113
|
},
|
|
114
114
|
/**
|
|
115
115
|
* Set font family
|
|
116
116
|
*/
|
|
117
117
|
fontFamily(e) {
|
|
118
|
-
return
|
|
118
|
+
return u("fontFamily", e);
|
|
119
119
|
},
|
|
120
120
|
/**
|
|
121
121
|
* Set opacity
|
|
122
122
|
*/
|
|
123
123
|
opacity(e) {
|
|
124
|
-
return
|
|
124
|
+
return V(e);
|
|
125
125
|
},
|
|
126
126
|
/**
|
|
127
127
|
* Set corner radius (enhanced)
|
|
128
128
|
*/
|
|
129
129
|
cornerRadius(e) {
|
|
130
|
-
return
|
|
130
|
+
return Y(e);
|
|
131
131
|
},
|
|
132
132
|
/**
|
|
133
133
|
* Set border
|
|
134
134
|
*/
|
|
135
135
|
border(e, r = "#000000", t = "solid") {
|
|
136
|
-
return
|
|
136
|
+
return u("border", e, r, t);
|
|
137
137
|
},
|
|
138
138
|
/**
|
|
139
139
|
* Set detailed border properties
|
|
140
140
|
*/
|
|
141
141
|
borderDetailed(e) {
|
|
142
|
-
return
|
|
142
|
+
return u("border", e);
|
|
143
143
|
}
|
|
144
144
|
// Shadow functionality moved to @tachui/modifiers/effects entry point
|
|
145
145
|
}, A = {
|
|
@@ -266,7 +266,7 @@ const v = {
|
|
|
266
266
|
}
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
|
-
},
|
|
269
|
+
}, I = {
|
|
270
270
|
/**
|
|
271
271
|
* Execute handler when component appears in viewport
|
|
272
272
|
*/
|
|
@@ -302,7 +302,7 @@ const v = {
|
|
|
302
302
|
}
|
|
303
303
|
});
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, B = {
|
|
306
306
|
/**
|
|
307
307
|
* Card-like appearance
|
|
308
308
|
*/
|
|
@@ -311,7 +311,7 @@ const v = {
|
|
|
311
311
|
p.backgroundColor("#ffffff"),
|
|
312
312
|
p.cornerRadius(8),
|
|
313
313
|
// shadow moved to @tachui/modifiers/effects entry point
|
|
314
|
-
|
|
314
|
+
h.padding(e)
|
|
315
315
|
];
|
|
316
316
|
},
|
|
317
317
|
/**
|
|
@@ -322,7 +322,7 @@ const v = {
|
|
|
322
322
|
p.backgroundColor(e),
|
|
323
323
|
p.foregroundColor(r),
|
|
324
324
|
p.cornerRadius(6),
|
|
325
|
-
|
|
325
|
+
h.padding(12),
|
|
326
326
|
// Simplified to single value for now
|
|
327
327
|
A.onHover((t) => {
|
|
328
328
|
}),
|
|
@@ -336,7 +336,7 @@ const v = {
|
|
|
336
336
|
return [
|
|
337
337
|
p.border(1, "#d1d5db"),
|
|
338
338
|
p.cornerRadius(4),
|
|
339
|
-
|
|
339
|
+
h.padding(8),
|
|
340
340
|
L.transition("border-color", 150),
|
|
341
341
|
A.onFocus((e) => {
|
|
342
342
|
})
|
|
@@ -364,16 +364,25 @@ const v = {
|
|
|
364
364
|
p.opacity(0.7)
|
|
365
365
|
]
|
|
366
366
|
}
|
|
367
|
-
},
|
|
368
|
-
...
|
|
367
|
+
}, J = {
|
|
368
|
+
...h,
|
|
369
369
|
...p,
|
|
370
370
|
...A,
|
|
371
371
|
...L,
|
|
372
|
-
...
|
|
373
|
-
presets:
|
|
372
|
+
...I,
|
|
373
|
+
presets: B
|
|
374
374
|
};
|
|
375
|
-
var
|
|
376
|
-
|
|
375
|
+
var N = Object.defineProperty, X = (e, r, t) => r in e ? N(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, E = (e, r, t) => X(e, typeof r != "symbol" ? r + "" : r, t);
|
|
376
|
+
function R(e) {
|
|
377
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
378
|
+
}
|
|
379
|
+
function _(e) {
|
|
380
|
+
return typeof e == "object" && e !== null && "style" in e && !!e.style;
|
|
381
|
+
}
|
|
382
|
+
function U(e) {
|
|
383
|
+
return _(e) && typeof e.style.setProperty == "function";
|
|
384
|
+
}
|
|
385
|
+
const P = {
|
|
377
386
|
/**
|
|
378
387
|
* Check if a value is a reactive signal
|
|
379
388
|
*/
|
|
@@ -430,10 +439,10 @@ const E = {
|
|
|
430
439
|
return typeof e == "number" ? `${e}px` : typeof e == "string" ? e : String(e);
|
|
431
440
|
}
|
|
432
441
|
};
|
|
433
|
-
function
|
|
434
|
-
class i extends
|
|
442
|
+
function c(e, r, t) {
|
|
443
|
+
class i extends z {
|
|
435
444
|
constructor() {
|
|
436
|
-
super(...arguments),
|
|
445
|
+
super(...arguments), E(this, "type", e), E(this, "priority", r);
|
|
437
446
|
}
|
|
438
447
|
apply(o, n) {
|
|
439
448
|
return t(o, n, this.properties);
|
|
@@ -441,23 +450,23 @@ function l(e, r, t) {
|
|
|
441
450
|
}
|
|
442
451
|
return (s) => new i(s);
|
|
443
452
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
446
|
-
if (s.element
|
|
453
|
+
function Q(e, r, t = 100) {
|
|
454
|
+
return c(e, t, (i, s, o) => {
|
|
455
|
+
if (_(s.element)) {
|
|
447
456
|
const n = r(o);
|
|
448
457
|
Object.assign(s.element.style, n);
|
|
449
458
|
}
|
|
450
459
|
return i;
|
|
451
460
|
});
|
|
452
461
|
}
|
|
453
|
-
function
|
|
454
|
-
return () =>
|
|
462
|
+
function ee(e, r, t = 100) {
|
|
463
|
+
return () => c(e, t, (i, s) => (_(s.element) && Object.assign(s.element.style, r), i))({});
|
|
455
464
|
}
|
|
456
|
-
function
|
|
465
|
+
function re(e, ...r) {
|
|
457
466
|
return console.warn("createComponentVariant is not yet implemented"), e;
|
|
458
467
|
}
|
|
459
|
-
function
|
|
460
|
-
return
|
|
468
|
+
function te(e, r = "combined", t = 999) {
|
|
469
|
+
return c(r, t, (i, s, o) => {
|
|
461
470
|
let n = i;
|
|
462
471
|
for (const a of e) {
|
|
463
472
|
const f = a.apply(n, s);
|
|
@@ -466,12 +475,12 @@ function Q(e, r = "combined", t = 999) {
|
|
|
466
475
|
return n;
|
|
467
476
|
})({});
|
|
468
477
|
}
|
|
469
|
-
function
|
|
470
|
-
return
|
|
478
|
+
function ne(e, r) {
|
|
479
|
+
return c(
|
|
471
480
|
`conditional-${r.type}`,
|
|
472
481
|
r.priority,
|
|
473
482
|
(t, i, s) => {
|
|
474
|
-
if (
|
|
483
|
+
if (P.resolveValue(e))
|
|
475
484
|
return r.apply(t, i);
|
|
476
485
|
if (b(e)) {
|
|
477
486
|
const n = w(() => {
|
|
@@ -491,14 +500,14 @@ function ee(e, r) {
|
|
|
491
500
|
}
|
|
492
501
|
)({});
|
|
493
502
|
}
|
|
494
|
-
function
|
|
495
|
-
return
|
|
503
|
+
function ie(e, r) {
|
|
504
|
+
return c("state", 500, (t, i, s) => {
|
|
496
505
|
let o = t;
|
|
497
506
|
const n = (f) => {
|
|
498
507
|
const d = r[f] || [];
|
|
499
508
|
for (const M of d) {
|
|
500
|
-
const
|
|
501
|
-
|
|
509
|
+
const l = M.apply(o, i);
|
|
510
|
+
l && typeof l == "object" && "type" in l && (o = l);
|
|
502
511
|
}
|
|
503
512
|
};
|
|
504
513
|
n(e());
|
|
@@ -517,18 +526,18 @@ function re(e, r) {
|
|
|
517
526
|
return o;
|
|
518
527
|
})({});
|
|
519
528
|
}
|
|
520
|
-
function
|
|
521
|
-
return
|
|
529
|
+
function oe(e, r = []) {
|
|
530
|
+
return c("responsive", 100, (t, i, s) => {
|
|
522
531
|
let o = t;
|
|
523
532
|
const n = () => {
|
|
524
533
|
const d = window.innerWidth;
|
|
525
534
|
let M = r;
|
|
526
|
-
for (const [
|
|
527
|
-
const
|
|
528
|
-
d >=
|
|
535
|
+
for (const [l, m] of Object.entries(e)) {
|
|
536
|
+
const k = parseInt(l);
|
|
537
|
+
d >= k && (M = m);
|
|
529
538
|
}
|
|
530
|
-
for (const
|
|
531
|
-
const m =
|
|
539
|
+
for (const l of M) {
|
|
540
|
+
const m = l.apply(o, i);
|
|
532
541
|
m && typeof m == "object" && "type" in m && (o = m);
|
|
533
542
|
}
|
|
534
543
|
};
|
|
@@ -547,18 +556,18 @@ function te(e, r = []) {
|
|
|
547
556
|
return o;
|
|
548
557
|
})({});
|
|
549
558
|
}
|
|
550
|
-
function
|
|
551
|
-
return
|
|
559
|
+
function se(e) {
|
|
560
|
+
return c("class", 50, (r, t, i) => {
|
|
552
561
|
if (!t.element) return r;
|
|
553
562
|
const s = (o) => {
|
|
554
563
|
const n = Array.isArray(o) ? o : o.split(" ").filter(Boolean);
|
|
555
|
-
t.element
|
|
564
|
+
R(t.element) && t.element.classList.add(...n);
|
|
556
565
|
};
|
|
557
566
|
if (b(e)) {
|
|
558
567
|
let o = [];
|
|
559
568
|
const n = w(() => {
|
|
560
569
|
const a = e(), f = Array.isArray(a) ? a : a.split(" ").filter(Boolean);
|
|
561
|
-
t.element
|
|
570
|
+
R(t.element) && (t.element.classList.remove(...o), t.element.classList.add(...f), o = f);
|
|
562
571
|
});
|
|
563
572
|
if (!r.dispose)
|
|
564
573
|
r.dispose = () => n.dispose();
|
|
@@ -573,13 +582,13 @@ function ne(e) {
|
|
|
573
582
|
return r;
|
|
574
583
|
})({});
|
|
575
584
|
}
|
|
576
|
-
function
|
|
577
|
-
return
|
|
585
|
+
function ae(e) {
|
|
586
|
+
return c("style", 200, (r, t, i) => {
|
|
578
587
|
if (!t.element) return r;
|
|
579
588
|
const s = (o) => {
|
|
580
|
-
if (t.element
|
|
589
|
+
if (U(t.element))
|
|
581
590
|
for (const [n, a] of Object.entries(o)) {
|
|
582
|
-
const f =
|
|
591
|
+
const f = P.toKebabCase(n), d = P.normalizeCSSValue(a);
|
|
583
592
|
t.element.style.setProperty(f, d);
|
|
584
593
|
}
|
|
585
594
|
};
|
|
@@ -601,8 +610,8 @@ function ie(e) {
|
|
|
601
610
|
return r;
|
|
602
611
|
})({});
|
|
603
612
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
613
|
+
function fe(e) {
|
|
614
|
+
return c("event", 300, (r, t, i) => {
|
|
606
615
|
if (!t.element) return r;
|
|
607
616
|
const s = [];
|
|
608
617
|
for (const [n, a] of Object.entries(e))
|
|
@@ -624,21 +633,21 @@ function oe(e) {
|
|
|
624
633
|
export {
|
|
625
634
|
L as a,
|
|
626
635
|
p as b,
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
636
|
+
J as c,
|
|
637
|
+
se as d,
|
|
638
|
+
te as e,
|
|
639
|
+
ne as f,
|
|
640
|
+
c as g,
|
|
641
|
+
Q as h,
|
|
633
642
|
A as i,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
643
|
+
fe as j,
|
|
644
|
+
ae as k,
|
|
645
|
+
h as l,
|
|
646
|
+
P as m,
|
|
647
|
+
I as n,
|
|
648
|
+
ee as o,
|
|
649
|
+
B as p,
|
|
650
|
+
re as q,
|
|
651
|
+
oe as r,
|
|
652
|
+
ie as s
|
|
644
653
|
};
|
package/dist/full.js
CHANGED
|
@@ -12,7 +12,7 @@ import { TACHUI_PACKAGE as Gt, TACHUI_PACKAGE_VERSION as Rt, VERSION as At } fro
|
|
|
12
12
|
import { AnimationModifier as Pt, AppearanceModifier as It, BaseModifier as Lt, InteractionModifier as Tt, LayoutModifier as Dt, LifecycleModifier as wt, ResizableModifier as Ut } from "./modifiers/base.js";
|
|
13
13
|
import { ModifierPriority as jt } from "@tachui/types/modifiers";
|
|
14
14
|
import { c as Vt, a as zt, g as Wt, i as kt, r as qt } from "./proxy-B7ZIqGd0.js";
|
|
15
|
-
import { a as Ht, b as _t, d as Kt, e as Jt, f as Yt, c as Qt, g as Xt, h as Zt, j as $t, i as es, l as as, m as ts, p as ss, r as rs, s as ns, k as is } from "./factories-
|
|
15
|
+
import { a as Ht, b as _t, d as Kt, e as Jt, f as Yt, c as Qt, g as Xt, h as Zt, j as $t, i as es, l as as, m as ts, p as ss, r as rs, s as ns, k as is } from "./factories-Bz6LZlk6.js";
|
|
16
16
|
import { r as cs } from "./registration-utils-CNsN4eoU.js";
|
|
17
17
|
export * from "@tachui/types/gradients";
|
|
18
18
|
import { generateAngularGradientCSS as gs, generateConicGradientCSS as ms, generateEllipticalGradientCSS as ps, generateLinearGradientCSS as fs, generateRadialGradientCSS as Cs, generateRepeatingLinearGradientCSS as us, generateRepeatingRadialGradientCSS as Ss, gradientToCSS as Ms } from "./gradients/css-generator.js";
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { TACHUI_PACKAGE as Et, TACHUI_PACKAGE_VERSION as bt, VERSION as xt } fro
|
|
|
11
11
|
import { AnimationModifier as yt, AppearanceModifier as Rt, BaseModifier as Gt, InteractionModifier as At, LayoutModifier as Ot, LifecycleModifier as Lt, ResizableModifier as It } from "./modifiers/base.js";
|
|
12
12
|
import { ModifierPriority as Tt } from "@tachui/types/modifiers";
|
|
13
13
|
import { c as wt, a as Ut, g as Bt, i as Ft, r as jt } from "./proxy-B7ZIqGd0.js";
|
|
14
|
-
import { a as Nt, b as kt, d as zt, e as Wt, f as qt, c as _t, g as Ht, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-
|
|
14
|
+
import { a as Nt, b as kt, d as zt, e as Wt, f as qt, c as _t, g as Ht, h as Kt, j as Jt, i as Yt, l as Qt, m as Xt, p as Zt, r as $t, s as es, k as as } from "./factories-Bz6LZlk6.js";
|
|
15
15
|
import { r as ss } from "./registration-utils-CNsN4eoU.js";
|
|
16
16
|
export * from "@tachui/types/gradients";
|
|
17
17
|
import { generateAngularGradientCSS as is, generateConicGradientCSS as os, generateEllipticalGradientCSS as cs, generateLinearGradientCSS as ls, generateRadialGradientCSS as ds, generateRepeatingLinearGradientCSS as ms, generateRepeatingRadialGradientCSS as gs, gradientToCSS as ps } from "./gradients/css-generator.js";
|
package/dist/minimal-prod.js
CHANGED
|
@@ -8,7 +8,7 @@ import { S as le, c as Ce, i as ge, f as Me, u as he } from "./binding-DCr-JHsC.
|
|
|
8
8
|
import { Assets as ye, ColorAsset as Ae, FontAsset as Ee, ImageAsset as Re, createColorAsset as Se, createFontAsset as be, createImageAsset as Ie, registerAsset as ve } from "./assets/index.js";
|
|
9
9
|
import { A as Be, L as De } from "./index-7vhCZc7g.js";
|
|
10
10
|
import { Layout as ke, infinity as Le, isInfinity as Oe } from "./constants/layout.js";
|
|
11
|
-
import { a as Ue, b as je, d as Ge, e as He, f as Ve, c as We, q as qe, g as Te, o as ze, h as Je, j as Ke, i as Ne, l as Qe, n as Xe, m as Ye, p as Ze, r as _e, s as $e, k as ea } from "./factories-
|
|
11
|
+
import { a as Ue, b as je, d as Ge, e as He, f as Ve, c as We, q as qe, g as Te, o as ze, h as Je, j as Ke, i as Ne, l as Qe, n as Xe, m as Ye, p as Ze, r as _e, s as $e, k as ea } from "./factories-Bz6LZlk6.js";
|
|
12
12
|
export {
|
|
13
13
|
Be as Asset,
|
|
14
14
|
ye as Assets,
|
package/dist/minimal.js
CHANGED
|
@@ -12,7 +12,7 @@ import { Assets as De, ColorAsset as Ge, FontAsset as je, ImageAsset as He, crea
|
|
|
12
12
|
import { A as We, L as qe, k as ze } from "./index-7vhCZc7g.js";
|
|
13
13
|
import { TACHUI_PACKAGE as Qe, TACHUI_PACKAGE_VERSION as Xe, VERSION as Ye } from "./version.js";
|
|
14
14
|
import { Layout as $e, infinity as ea, isInfinity as aa } from "./constants/layout.js";
|
|
15
|
-
import { a as sa, b as oa, d as ra, e as na, f as ia, c as ca, q as ma, g as pa, o as da, h as fa, j as Ca, i as la, l as ua, n as ga, m as Ma, p as xa, r as ha, s as Ea, k as Sa } from "./factories-
|
|
15
|
+
import { a as sa, b as oa, d as ra, e as na, f as ia, c as ca, q as ma, g as pa, o as da, h as fa, j as Ca, i as la, l as ua, n as ga, m as Ma, p as xa, r as ha, s as Ea, k as Sa } from "./factories-Bz6LZlk6.js";
|
|
16
16
|
const e = {
|
|
17
17
|
name: "@tachui/core/minimal",
|
|
18
18
|
version: "0.1.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/modifiers/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EACV,kBAAkB,EAElB,QAAQ,EACR,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAQhB,OAAO,EACL,iBAAiB,EACjB,mCAAmC,EACnC,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,GACtC,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/modifiers/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EACV,kBAAkB,EAElB,QAAQ,EACR,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAQhB,OAAO,EACL,iBAAiB,EACjB,mCAAmC,EACnC,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,GACtC,MAAM,2BAA2B,CAAA;AAoClC;;GAEG;AACH,8BAAsB,YAAY,CAAC,MAAM,GAAG,EAAE,CAAE,YAAW,QAAQ,CAAC,MAAM,CAAC;aAI7C,UAAU,EAAE,MAAM;IAH9C,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,Q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Q,CAAC,IAAI,eAAc;IAC3B,QAAQ,CAAC,QAAQ,MAA0B;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,MAA8B;IAE/C,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS;CAWrE"}
|
package/dist/modifiers/base.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { i as m, r as
|
|
1
|
+
import { i as m, r as D } from "../computed-CA4Cgtoe.js";
|
|
2
2
|
import { c as b } from "../effect-DgNm6jk9.js";
|
|
3
|
-
import { g as
|
|
4
|
-
import { a as
|
|
3
|
+
import { g as B, i as S } from "../signal-BRoiFOO7.js";
|
|
4
|
+
import { a as _ } from "../theme-D5-09a8N.js";
|
|
5
5
|
import { ModifierPriority as C } from "@tachui/types/modifiers";
|
|
6
|
-
import { shouldExpandForInfinity as
|
|
7
|
-
import { o as
|
|
6
|
+
import { shouldExpandForInfinity as z, 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
|
|
11
|
-
if (
|
|
10
|
+
function ne(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),
|
|
16
|
+
i?.(t, e), o(t, e);
|
|
17
17
|
}, () => {
|
|
18
18
|
y = i;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function I(o, i, t) {
|
|
22
22
|
try {
|
|
23
|
-
|
|
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
|
|
33
|
-
let
|
|
34
|
-
function
|
|
35
|
-
|
|
32
|
+
const P = 200, c = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new Set();
|
|
33
|
+
let $ = !1, k = !1;
|
|
34
|
+
function W(o) {
|
|
35
|
+
c.get(o)?.forEach((t) => t()), c.delete(o), M.delete(o);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const
|
|
37
|
+
function R() {
|
|
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 =
|
|
45
|
+
const e = M.get(t), n = c.get(t);
|
|
46
46
|
if (!e || !n || n.size === 0) {
|
|
47
47
|
v.delete(i);
|
|
48
48
|
continue;
|
|
@@ -51,75 +51,81 @@ function $() {
|
|
|
51
51
|
e.wasConnected = !0;
|
|
52
52
|
continue;
|
|
53
53
|
}
|
|
54
|
-
(e.wasConnected ||
|
|
54
|
+
(e.wasConnected || o - e.trackedAt >= P) && (W(t), v.delete(i));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
if (
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
|
|
57
|
+
function U() {
|
|
58
|
+
if (k || typeof setTimeout != "function") return;
|
|
59
|
+
k = !0;
|
|
60
|
+
const o = () => {
|
|
61
|
+
if (R(), v.size === 0) {
|
|
62
|
+
k = !1;
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
setTimeout(
|
|
65
|
+
setTimeout(o, P);
|
|
66
66
|
};
|
|
67
|
-
setTimeout(
|
|
67
|
+
setTimeout(o, P);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
if (
|
|
69
|
+
function j() {
|
|
70
|
+
if ($ || typeof document > "u" || !document.documentElement || typeof MutationObserver > "u")
|
|
71
71
|
return;
|
|
72
72
|
new MutationObserver(() => {
|
|
73
|
-
|
|
74
|
-
}).observe(document.documentElement, { childList: !0, subtree: !0 }),
|
|
73
|
+
R();
|
|
74
|
+
}).observe(document.documentElement, { childList: !0, subtree: !0 }), $ = !0;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
78
|
-
const t =
|
|
79
|
-
return t.add(i),
|
|
76
|
+
function N(o, i) {
|
|
77
|
+
j(), U();
|
|
78
|
+
const t = c.get(o) ?? /* @__PURE__ */ new Set(), e = t.size > 0;
|
|
79
|
+
return t.add(i), c.set(o, t), e || (M.set(o, {
|
|
80
80
|
trackedAt: Date.now(),
|
|
81
|
-
wasConnected:
|
|
82
|
-
}), v.add(new WeakRef(
|
|
83
|
-
const n =
|
|
84
|
-
n && (n.delete(i), n.size === 0 && (
|
|
81
|
+
wasConnected: o.isConnected
|
|
82
|
+
}), v.add(new WeakRef(o))), () => {
|
|
83
|
+
const n = c.get(o);
|
|
84
|
+
n && (n.delete(i), n.size === 0 && (c.delete(o), M.delete(o)));
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
element:
|
|
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(
|
|
94
|
-
L.has(
|
|
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
98
|
r = { effect: b(() => {
|
|
99
|
-
const
|
|
99
|
+
const u = i();
|
|
100
100
|
a.forEach(
|
|
101
|
-
(w, h) =>
|
|
101
|
+
(w, h) => I(w, u, h)
|
|
102
102
|
);
|
|
103
103
|
}), updaters: a }, n.set(i, r);
|
|
104
104
|
}
|
|
105
|
-
r.updaters.set(e, t),
|
|
106
|
-
let
|
|
105
|
+
r.updaters.set(e, t), I(t, i(), e);
|
|
106
|
+
let s = null;
|
|
107
107
|
const l = () => {
|
|
108
|
-
|
|
109
|
-
const a = L.get(
|
|
110
|
-
d && (d.updaters.delete(e), d.updaters.size === 0 && (d.effect.dispose(), a?.delete(i), m(i) &&
|
|
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
|
-
|
|
112
|
+
B() ? F(l) : s = N(o, l);
|
|
113
113
|
}
|
|
114
|
-
var
|
|
115
|
-
const
|
|
116
|
-
let
|
|
117
|
-
function
|
|
118
|
-
|
|
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 V = 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
|
-
|
|
121
|
-
const t =
|
|
122
|
-
return Object.defineProperty(
|
|
126
|
+
V += 1;
|
|
127
|
+
const t = V;
|
|
128
|
+
return Object.defineProperty(o, H, {
|
|
123
129
|
value: t,
|
|
124
130
|
enumerable: !1,
|
|
125
131
|
configurable: !1,
|
|
@@ -146,13 +152,13 @@ class E {
|
|
|
146
152
|
const n = typeof HTMLElement < "u" && i instanceof HTMLElement;
|
|
147
153
|
if (!n && !i.style)
|
|
148
154
|
return;
|
|
149
|
-
const r = this.toCSSProperty(t),
|
|
155
|
+
const r = this.toCSSProperty(t), s = i.style, l = (a) => {
|
|
150
156
|
if (a.includes("!important")) {
|
|
151
157
|
const d = a.replace(/\s*!important\s*$/, "").trim();
|
|
152
|
-
|
|
158
|
+
s.setProperty(r, d, "important");
|
|
153
159
|
return;
|
|
154
160
|
}
|
|
155
|
-
|
|
161
|
+
s.setProperty(r, a);
|
|
156
162
|
};
|
|
157
163
|
if (S(e) || m(e)) {
|
|
158
164
|
b(() => {
|
|
@@ -209,25 +215,25 @@ class E {
|
|
|
209
215
|
applyStyles(i, t) {
|
|
210
216
|
const e = typeof HTMLElement < "u" && i instanceof HTMLElement;
|
|
211
217
|
if (e || i.style) {
|
|
212
|
-
const n = i.style, r = (
|
|
218
|
+
const n = i.style, r = (s, l) => {
|
|
213
219
|
if (n.setProperty)
|
|
214
220
|
if (typeof l == "string" && l.includes("!important")) {
|
|
215
221
|
const a = l.replace(/\s*!important\s*$/, "").trim();
|
|
216
|
-
n.setProperty(
|
|
222
|
+
n.setProperty(s, a, "important");
|
|
217
223
|
} else
|
|
218
|
-
n.setProperty(
|
|
224
|
+
n.setProperty(s, l);
|
|
219
225
|
else
|
|
220
|
-
n[
|
|
226
|
+
n[s] = l;
|
|
221
227
|
};
|
|
222
|
-
for (const [
|
|
228
|
+
for (const [s, l] of Object.entries(t))
|
|
223
229
|
if (l !== void 0) {
|
|
224
|
-
const a = this.toCSSProperty(
|
|
230
|
+
const a = this.toCSSProperty(s);
|
|
225
231
|
if (S(l) || m(l)) {
|
|
226
|
-
const d = l,
|
|
227
|
-
|
|
232
|
+
const d = l, u = X(this);
|
|
233
|
+
K({
|
|
228
234
|
element: i,
|
|
229
235
|
accessor: d,
|
|
230
|
-
updaterId: `${
|
|
236
|
+
updaterId: `${G}:${u}:${a}`,
|
|
231
237
|
updater: (w) => {
|
|
232
238
|
const h = this.toCSSValueForProperty(a, w);
|
|
233
239
|
r(a, h);
|
|
@@ -244,13 +250,13 @@ class E {
|
|
|
244
250
|
* Add CSS classes to an element
|
|
245
251
|
*/
|
|
246
252
|
addClasses(i, t) {
|
|
247
|
-
i
|
|
253
|
+
T(i) && i.classList.add(...t);
|
|
248
254
|
}
|
|
249
255
|
/**
|
|
250
256
|
* Remove CSS classes from an element
|
|
251
257
|
*/
|
|
252
258
|
removeClasses(i, t) {
|
|
253
|
-
i
|
|
259
|
+
T(i) && i.classList.remove(...t);
|
|
254
260
|
}
|
|
255
261
|
/**
|
|
256
262
|
* Create a style computation context
|
|
@@ -265,7 +271,7 @@ class E {
|
|
|
265
271
|
};
|
|
266
272
|
}
|
|
267
273
|
}
|
|
268
|
-
class
|
|
274
|
+
class re extends E {
|
|
269
275
|
constructor() {
|
|
270
276
|
super(...arguments), f(this, "type", "layout"), f(this, "priority", C.LAYOUT);
|
|
271
277
|
}
|
|
@@ -281,40 +287,40 @@ class ie extends E {
|
|
|
281
287
|
);
|
|
282
288
|
this.applyStyles(t.element, n);
|
|
283
289
|
const r = this.properties;
|
|
284
|
-
r.position && t.element
|
|
290
|
+
r.position && T(t.element) && this.applyAbsolutePosition(t.element, r.position);
|
|
285
291
|
}
|
|
286
292
|
// Layout modifier implementations have been migrated to @tachui/modifiers/layout
|
|
287
293
|
applyAbsolutePosition(i, t) {
|
|
288
|
-
const { x: e, y: n } = t, r = e ?? "auto",
|
|
289
|
-
i.style.left = this.toCSSValue(r), i.style.top = this.toCSSValue(
|
|
294
|
+
const { x: e, y: n } = t, r = e ?? "auto", s = n ?? "auto";
|
|
295
|
+
i.style.left = this.toCSSValue(r), i.style.top = this.toCSSValue(s);
|
|
290
296
|
}
|
|
291
297
|
computeLayoutStyles(i, t) {
|
|
292
298
|
const e = {};
|
|
293
299
|
if (i.frame) {
|
|
294
|
-
const n = i.frame, r =
|
|
300
|
+
const n = i.frame, r = z(n);
|
|
295
301
|
if (Object.assign(e, r.cssProps), n.width !== void 0) {
|
|
296
|
-
const
|
|
297
|
-
|
|
302
|
+
const s = g(n.width);
|
|
303
|
+
s !== void 0 && !p(n.width) && !r.expandWidth && (e.width = s);
|
|
298
304
|
}
|
|
299
305
|
if (n.height !== void 0) {
|
|
300
|
-
const
|
|
301
|
-
|
|
306
|
+
const s = g(n.height);
|
|
307
|
+
s !== void 0 && !p(n.height) && !r.expandHeight && (e.height = s);
|
|
302
308
|
}
|
|
303
309
|
if (n.minWidth !== void 0) {
|
|
304
|
-
const
|
|
305
|
-
|
|
310
|
+
const s = g(n.minWidth);
|
|
311
|
+
s !== void 0 && (e.minWidth = s);
|
|
306
312
|
}
|
|
307
313
|
if (n.maxWidth !== void 0 && !p(n.maxWidth)) {
|
|
308
|
-
const
|
|
309
|
-
|
|
314
|
+
const s = g(n.maxWidth);
|
|
315
|
+
s !== void 0 && (e.maxWidth = s);
|
|
310
316
|
} else p(n.maxWidth) && (e.maxWidth = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
|
|
311
317
|
if (n.minHeight !== void 0) {
|
|
312
|
-
const
|
|
313
|
-
|
|
318
|
+
const s = g(n.minHeight);
|
|
319
|
+
s !== void 0 && (e.minHeight = s);
|
|
314
320
|
}
|
|
315
321
|
if (n.maxHeight !== void 0 && !p(n.maxHeight)) {
|
|
316
|
-
const
|
|
317
|
-
|
|
322
|
+
const s = g(n.maxHeight);
|
|
323
|
+
s !== void 0 && (e.maxHeight = s);
|
|
318
324
|
} else p(n.maxHeight) && (e.maxHeight = "none", e.flexGrow = "1 !important", e.flexShrink = "1 !important", e.flexBasis = "0% !important", e.alignSelf = "stretch !important");
|
|
319
325
|
}
|
|
320
326
|
if (i.padding !== void 0)
|
|
@@ -364,7 +370,7 @@ class ie extends E {
|
|
|
364
370
|
return e;
|
|
365
371
|
}
|
|
366
372
|
}
|
|
367
|
-
class
|
|
373
|
+
class oe extends E {
|
|
368
374
|
constructor() {
|
|
369
375
|
super(...arguments), f(this, "type", "appearance"), f(this, "priority", C.APPEARANCE);
|
|
370
376
|
}
|
|
@@ -387,7 +393,7 @@ class ne extends E {
|
|
|
387
393
|
* Apply Asset-based styles with theme reactivity
|
|
388
394
|
*/
|
|
389
395
|
applyAssetBasedStyles(i, t) {
|
|
390
|
-
const e =
|
|
396
|
+
const e = _();
|
|
391
397
|
t.foregroundColor && this.isAsset(t.foregroundColor) && b(() => {
|
|
392
398
|
e();
|
|
393
399
|
const n = t.foregroundColor.resolve();
|
|
@@ -451,7 +457,7 @@ class ne extends E {
|
|
|
451
457
|
return i._tachui_component || null;
|
|
452
458
|
}
|
|
453
459
|
}
|
|
454
|
-
class
|
|
460
|
+
class se extends E {
|
|
455
461
|
constructor() {
|
|
456
462
|
super(...arguments), f(this, "type", "interaction"), f(this, "priority", C.INTERACTION);
|
|
457
463
|
}
|
|
@@ -470,16 +476,16 @@ class re extends E {
|
|
|
470
476
|
let n = 0, r = 0;
|
|
471
477
|
t.element.addEventListener(
|
|
472
478
|
"touchstart",
|
|
473
|
-
(
|
|
474
|
-
const a =
|
|
479
|
+
(s) => {
|
|
480
|
+
const a = s.touches[0];
|
|
475
481
|
n = a.clientX, r = a.clientY;
|
|
476
482
|
},
|
|
477
483
|
{ passive: !0 }
|
|
478
484
|
), t.element.addEventListener(
|
|
479
485
|
"touchend",
|
|
480
|
-
(
|
|
481
|
-
const a =
|
|
482
|
-
Math.abs(d) > Math.abs(
|
|
486
|
+
(s) => {
|
|
487
|
+
const a = s.changedTouches[0], d = a.clientX - n, u = a.clientY - r;
|
|
488
|
+
Math.abs(d) > Math.abs(u) && Math.abs(d) > 50 && (d < 0 && e.onSwipeLeft ? e.onSwipeLeft() : d > 0 && e.onSwipeRight && e.onSwipeRight());
|
|
483
489
|
},
|
|
484
490
|
{ passive: !0 }
|
|
485
491
|
);
|
|
@@ -489,12 +495,12 @@ class re extends E {
|
|
|
489
495
|
}), e.onWheel && t.element.addEventListener("wheel", e.onWheel, {
|
|
490
496
|
passive: !1
|
|
491
497
|
}), e.onInput && t.element.addEventListener("input", e.onInput), e.onChange && t.element.addEventListener("change", (n) => {
|
|
492
|
-
const r = n.target,
|
|
493
|
-
e.onChange(
|
|
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
|
|
498
|
+
const r = n.target, s = r.value || r.textContent || "";
|
|
499
|
+
e.onChange(s, n);
|
|
500
|
+
}), 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
501
|
}
|
|
496
502
|
}
|
|
497
|
-
class
|
|
503
|
+
class ae extends E {
|
|
498
504
|
constructor() {
|
|
499
505
|
super(...arguments), f(this, "type", "animation"), f(this, "priority", C.ANIMATION);
|
|
500
506
|
}
|
|
@@ -502,26 +508,26 @@ class oe extends E {
|
|
|
502
508
|
if (!t.element) return;
|
|
503
509
|
const e = this.properties;
|
|
504
510
|
if (e.transition) {
|
|
505
|
-
const n = e.transition, r = n.property || "all",
|
|
506
|
-
t.element
|
|
511
|
+
const n = e.transition, r = n.property || "all", s = n.duration || 300, l = n.easing || "ease", a = n.delay || 0;
|
|
512
|
+
A(t.element) && (t.element.style.transition = `${r} ${s}ms ${l} ${a}ms`);
|
|
507
513
|
}
|
|
508
|
-
if (e.animation && t.element
|
|
514
|
+
if (e.animation && A(t.element)) {
|
|
509
515
|
const n = e.animation;
|
|
510
|
-
if (n.keyframes) {
|
|
511
|
-
const r = `tachui-animation-${t.componentId}-${Date.now()}`,
|
|
516
|
+
if (n.keyframes && typeof document < "u") {
|
|
517
|
+
const r = `tachui-animation-${t.componentId}-${Date.now()}`, s = this.createKeyframeRule(
|
|
512
518
|
r,
|
|
513
519
|
n.keyframes
|
|
514
520
|
);
|
|
515
|
-
this.addKeyframesToStylesheet(
|
|
516
|
-
const l = n.duration || 1e3, a = n.easing || "ease", d = n.iterations || 1,
|
|
517
|
-
t.element.style.animation = `${r} ${l}ms ${a} ${d} ${
|
|
521
|
+
this.addKeyframesToStylesheet(s);
|
|
522
|
+
const l = n.duration || 1e3, a = n.easing || "ease", d = n.iterations || 1, u = n.direction || "normal";
|
|
523
|
+
t.element.style.animation = `${r} ${l}ms ${a} ${d} ${u}`;
|
|
518
524
|
}
|
|
519
525
|
}
|
|
520
|
-
if (e.transform && t.element
|
|
526
|
+
if (e.transform && A(t.element) && (S(e.transform) || m(e.transform) ? b(() => {
|
|
521
527
|
const n = e.transform();
|
|
522
|
-
t.element
|
|
523
|
-
}) : t.element.style.transform = e.transform), e.scaleEffect && t.element
|
|
524
|
-
const { x: n, y: r, anchor:
|
|
528
|
+
A(t.element) && (t.element.style.transform = n);
|
|
529
|
+
}) : t.element.style.transform = e.transform), e.scaleEffect && A(t.element)) {
|
|
530
|
+
const { x: n, y: r, anchor: s } = e.scaleEffect, l = r ?? n, d = {
|
|
525
531
|
center: "50% 50%",
|
|
526
532
|
top: "50% 0%",
|
|
527
533
|
topLeading: "0% 0%",
|
|
@@ -531,10 +537,10 @@ class oe extends E {
|
|
|
531
537
|
bottomTrailing: "100% 100%",
|
|
532
538
|
leading: "0% 50%",
|
|
533
539
|
trailing: "100% 50%"
|
|
534
|
-
}[
|
|
540
|
+
}[s || "center"] || "50% 50%";
|
|
535
541
|
t.element.style.transformOrigin = d;
|
|
536
|
-
const
|
|
537
|
-
t.element.style.transform =
|
|
542
|
+
const u = `scale(${n}, ${l})`, h = (t.element.style.transform || "").replace(/\s*scale[XYZ3d]*\([^)]*\)\s*/g, " ").replace(/\s+/g, " ").trim(), O = h ? `${h} ${u}`.trim() : u;
|
|
543
|
+
t.element.style.transform = O;
|
|
538
544
|
}
|
|
539
545
|
}
|
|
540
546
|
createKeyframeRule(i, t) {
|
|
@@ -543,8 +549,8 @@ class oe extends E {
|
|
|
543
549
|
for (const [n, r] of Object.entries(t)) {
|
|
544
550
|
e += ` ${n} {
|
|
545
551
|
`;
|
|
546
|
-
for (const [
|
|
547
|
-
const a = this.toCSSProperty(
|
|
552
|
+
for (const [s, l] of Object.entries(r)) {
|
|
553
|
+
const a = this.toCSSProperty(s);
|
|
548
554
|
e += ` ${a}: ${l};
|
|
549
555
|
`;
|
|
550
556
|
}
|
|
@@ -560,7 +566,7 @@ class oe extends E {
|
|
|
560
566
|
t || (t = document.createElement("style"), t.id = "tachui-animations", document.head.appendChild(t)), t.appendChild(document.createTextNode(i));
|
|
561
567
|
}
|
|
562
568
|
}
|
|
563
|
-
class
|
|
569
|
+
class le extends E {
|
|
564
570
|
constructor() {
|
|
565
571
|
super(...arguments), f(this, "type", "lifecycle"), f(this, "priority", C.CUSTOM), f(this, "activeAbortController");
|
|
566
572
|
}
|
|
@@ -601,7 +607,7 @@ class se extends E {
|
|
|
601
607
|
this.properties._cleanupFunctions || (this.properties._cleanupFunctions = []), this.properties._cleanupFunctions.push(i);
|
|
602
608
|
}
|
|
603
609
|
}
|
|
604
|
-
class
|
|
610
|
+
class de extends E {
|
|
605
611
|
constructor() {
|
|
606
612
|
super(...arguments), f(this, "type", "resizable"), f(this, "priority", C.APPEARANCE);
|
|
607
613
|
}
|
|
@@ -610,13 +616,13 @@ class ae extends E {
|
|
|
610
616
|
}
|
|
611
617
|
}
|
|
612
618
|
export {
|
|
613
|
-
|
|
614
|
-
|
|
619
|
+
ae as AnimationModifier,
|
|
620
|
+
oe as AppearanceModifier,
|
|
615
621
|
E as BaseModifier,
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
+
se as InteractionModifier,
|
|
623
|
+
re as LayoutModifier,
|
|
624
|
+
le as LifecycleModifier,
|
|
625
|
+
de as ResizableModifier,
|
|
626
|
+
K as bindReactiveStyle,
|
|
627
|
+
ne as setReactiveStyleUpdaterErrorHandler
|
|
622
628
|
};
|
|
@@ -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,CAAA;
|
|
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,K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GAC1C,QAAQ,CAsCV;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,QAAQ,CA2B7E"}
|
package/dist/modifiers/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { AnimationModifier as r, AppearanceModifier as o, BaseModifier as a, Int
|
|
|
2
2
|
import { ModifierPriority as p } from "@tachui/types/modifiers";
|
|
3
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
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-
|
|
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,
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachui/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.25",
|
|
4
4
|
"description": "tachUI core framework with reactive system and compiler",
|
|
5
5
|
"homepage": "https://tachui.dev/",
|
|
6
6
|
"type": "module",
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
"dist"
|
|
155
155
|
],
|
|
156
156
|
"dependencies": {
|
|
157
|
-
"@tachui/types": "0.8.
|
|
158
|
-
"@tachui/registry": "0.8.
|
|
157
|
+
"@tachui/types": "0.8.25",
|
|
158
|
+
"@tachui/registry": "0.8.25"
|
|
159
159
|
},
|
|
160
160
|
"devDependencies": {
|
|
161
161
|
"@types/jsdom": "^21.1.6",
|