@tachui/core 0.8.11 → 0.8.13
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/README.md +6 -6
- package/dist/assets/ColorAsset.d.ts +27 -0
- package/dist/assets/ColorAsset.d.ts.map +1 -1
- package/dist/assets/index.d.ts +1 -0
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js +437 -198
- package/dist/common.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/{concatenated-component-CP81AwgI.js → concatenated-component-BCrw_7cC.js} +160 -157
- package/dist/essential.js +4 -4
- package/dist/{factory-BgnjJRGE.js → factory-wYm7L3JT.js} +2 -2
- package/dist/{index-ykdS-3xs.js → index-BaBj0d3d.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/modifiers/builder.js +1 -1
- package/dist/modifiers/index.js +2 -2
- package/dist/modifiers/registry.js +1 -1
- package/dist/{proxy-522Jjabr.js → proxy-gO-vDCUZ.js} +1 -1
- package/dist/runtime/dom-bridge.d.ts.map +1 -1
- package/dist/runtime/dom-bridge.js +59 -79
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/renderer.d.ts.map +1 -1
- package/dist/runtime/renderer.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { globalModifierRegistry as
|
|
1
|
+
import { globalModifierRegistry as A } from "@tachui/registry";
|
|
2
2
|
import "./scheduler-DppMK9mR.js";
|
|
3
|
-
import { i as w, d as
|
|
3
|
+
import { i as w, d as N, n as U, u as F } from "./theme-CRLPHryV.js";
|
|
4
4
|
import { c as E } from "./effect-BsW3fy1q.js";
|
|
5
5
|
import "@tachui/types/reactive";
|
|
6
|
-
var
|
|
7
|
-
const
|
|
6
|
+
var G = Object.defineProperty, z = (n, e, t) => e in n ? G(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, K = (n, e, t) => z(n, e + "", t);
|
|
7
|
+
const q = /* @__PURE__ */ new Set([
|
|
8
8
|
"onFocus",
|
|
9
9
|
"onBlur",
|
|
10
10
|
"onKeyDown",
|
|
@@ -24,16 +24,16 @@ const K = /* @__PURE__ */ new Set([
|
|
|
24
24
|
"onSwipeLeft",
|
|
25
25
|
"onSwipeRight"
|
|
26
26
|
]);
|
|
27
|
-
let
|
|
28
|
-
function
|
|
29
|
-
|
|
27
|
+
let k = null;
|
|
28
|
+
function xe(n) {
|
|
29
|
+
k = n, console.debug(
|
|
30
30
|
"[RegistryBridge] External modifier registry set with",
|
|
31
31
|
n?.list()?.length || 0,
|
|
32
32
|
"modifiers"
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
function B() {
|
|
36
|
-
return
|
|
36
|
+
return k || A;
|
|
37
37
|
}
|
|
38
38
|
function l(n, ...e) {
|
|
39
39
|
const i = B().get(n);
|
|
@@ -47,9 +47,9 @@ function l(n, ...e) {
|
|
|
47
47
|
`Modifier '${n}' not found in registry. Import @tachui/modifiers or @tachui/modifiers/effects to register modifiers.`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
class
|
|
50
|
+
class Z {
|
|
51
51
|
constructor(e) {
|
|
52
|
-
this.component = e,
|
|
52
|
+
this.component = e, K(this, "modifiers", []);
|
|
53
53
|
}
|
|
54
54
|
frame(e, t) {
|
|
55
55
|
let i;
|
|
@@ -346,7 +346,7 @@ This method is for internal framework use only.`
|
|
|
346
346
|
const d = r && Object.getPrototypeOf(r) || Object.prototype;
|
|
347
347
|
o = Object.create(d), Object.assign(o, r), o.props = { ...r.props }, o.cleanup = Array.isArray(r.cleanup) ? [...r.cleanup] : [], o.mounted = r.mounted ?? !1, o.id = r.id, o.type = r.type, o.render = typeof r.render == "function" ? r.render.bind(r) : () => [];
|
|
348
348
|
}
|
|
349
|
-
const a =
|
|
349
|
+
const a = L(
|
|
350
350
|
o,
|
|
351
351
|
s
|
|
352
352
|
);
|
|
@@ -355,7 +355,7 @@ This method is for internal framework use only.`
|
|
|
355
355
|
s
|
|
356
356
|
), a;
|
|
357
357
|
} else {
|
|
358
|
-
const e =
|
|
358
|
+
const e = L(
|
|
359
359
|
this.component,
|
|
360
360
|
this.modifiers
|
|
361
361
|
);
|
|
@@ -378,7 +378,7 @@ This method is for internal framework use only.`
|
|
|
378
378
|
e.props[d] = typeof a == "boolean" ? a : String(a);
|
|
379
379
|
}
|
|
380
380
|
});
|
|
381
|
-
} else if (
|
|
381
|
+
} else if (q.has(i.type)) {
|
|
382
382
|
const r = i.properties || {};
|
|
383
383
|
Object.entries(r).forEach(([o, a]) => {
|
|
384
384
|
typeof a == "function" && (e.props[o] = a);
|
|
@@ -513,8 +513,8 @@ This method is for internal framework use only.`
|
|
|
513
513
|
// Available via Proxy when @tachui/modifiers is imported:
|
|
514
514
|
// - shadow(), textShadow(), shadows(), shadowPreset(), clipped()
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
const e = new
|
|
516
|
+
function H(n) {
|
|
517
|
+
const e = new Z(n);
|
|
518
518
|
return new Proxy(e, {
|
|
519
519
|
get(t, i, s) {
|
|
520
520
|
if (i in t) {
|
|
@@ -554,14 +554,14 @@ function O(n) {
|
|
|
554
554
|
}
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
function
|
|
557
|
+
function Te(n, e) {
|
|
558
558
|
return {
|
|
559
559
|
...n,
|
|
560
560
|
modifiers: e,
|
|
561
|
-
modifierBuilder:
|
|
561
|
+
modifierBuilder: H(n)
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
const
|
|
564
|
+
const Re = {
|
|
565
565
|
/**
|
|
566
566
|
* Create a padding modifier with all sides
|
|
567
567
|
*/
|
|
@@ -569,35 +569,35 @@ const Te = {
|
|
|
569
569
|
return l("padding", { all: n });
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
|
-
class
|
|
572
|
+
class J {
|
|
573
573
|
register(e, t) {
|
|
574
|
-
|
|
574
|
+
A.register(e, t);
|
|
575
575
|
}
|
|
576
576
|
get(e) {
|
|
577
|
-
return
|
|
577
|
+
return A.get(e);
|
|
578
578
|
}
|
|
579
579
|
has(e) {
|
|
580
|
-
return
|
|
580
|
+
return A.has(e);
|
|
581
581
|
}
|
|
582
582
|
list() {
|
|
583
|
-
return
|
|
583
|
+
return A.list();
|
|
584
584
|
}
|
|
585
585
|
clear() {
|
|
586
|
-
|
|
586
|
+
A.clear();
|
|
587
587
|
}
|
|
588
588
|
validateRegistry() {
|
|
589
|
-
return
|
|
589
|
+
return A.validateRegistry();
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
const
|
|
592
|
+
const Y = new J();
|
|
593
593
|
process.env.NODE_ENV === "development" && console.log("📤 Created RegistryAdapter for globalModifierRegistry", {
|
|
594
|
-
registryId:
|
|
595
|
-
currentSize:
|
|
594
|
+
registryId: A.instanceId,
|
|
595
|
+
currentSize: A.list().length
|
|
596
596
|
});
|
|
597
|
-
function
|
|
598
|
-
return
|
|
597
|
+
function Ie() {
|
|
598
|
+
return Y;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function V(n, e, t = {}, i = {}) {
|
|
601
601
|
if (!e.length) return n;
|
|
602
602
|
const s = {
|
|
603
603
|
componentId: t.componentId || "unknown",
|
|
@@ -613,12 +613,12 @@ function H(n, e, t = {}, i = {}) {
|
|
|
613
613
|
};
|
|
614
614
|
switch (i.batch ? "batch" : "sequential") {
|
|
615
615
|
case "batch":
|
|
616
|
-
return
|
|
616
|
+
return X(n, e, s, i);
|
|
617
617
|
default:
|
|
618
|
-
return
|
|
618
|
+
return Q(n, e, s, i);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function Q(n, e, t, i) {
|
|
622
622
|
const s = [...e].sort(
|
|
623
623
|
(d, u) => d.priority - u.priority
|
|
624
624
|
);
|
|
@@ -639,13 +639,13 @@ function Y(n, e, t, i) {
|
|
|
639
639
|
}
|
|
640
640
|
return r;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
const s =
|
|
642
|
+
function X(n, e, t, i) {
|
|
643
|
+
const s = ee(e);
|
|
644
644
|
let r = n;
|
|
645
645
|
const o = [], a = [];
|
|
646
646
|
for (const [d, u] of s)
|
|
647
647
|
try {
|
|
648
|
-
r =
|
|
648
|
+
r = te(r, u, t);
|
|
649
649
|
} catch (b) {
|
|
650
650
|
(typeof process > "u" || process.env.NODE_ENV !== "test") && console.error(`Failed to apply modifier group ${d}:`, b);
|
|
651
651
|
}
|
|
@@ -657,7 +657,7 @@ function Q(n, e, t, i) {
|
|
|
657
657
|
}
|
|
658
658
|
return r;
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function ee(n) {
|
|
661
661
|
const e = /* @__PURE__ */ new Map();
|
|
662
662
|
for (const t of n) {
|
|
663
663
|
const i = e.get(t.type) || [];
|
|
@@ -665,7 +665,7 @@ function X(n) {
|
|
|
665
665
|
}
|
|
666
666
|
return e;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function te(n, e, t) {
|
|
669
669
|
const i = [...e].sort(
|
|
670
670
|
(r, o) => r.priority - o.priority
|
|
671
671
|
);
|
|
@@ -679,10 +679,10 @@ function ee(n, e, t) {
|
|
|
679
679
|
}
|
|
680
680
|
return s;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function ie(n) {
|
|
683
683
|
return n && typeof n.concat == "function" && typeof n.toSegment == "function" && typeof n.isConcatenatable == "function";
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function L(n, e = []) {
|
|
686
686
|
const t = {
|
|
687
687
|
type: n.type,
|
|
688
688
|
id: n.id,
|
|
@@ -697,7 +697,7 @@ function k(n, e = []) {
|
|
|
697
697
|
// Store reference to original component for modifier context
|
|
698
698
|
_originalComponent: n
|
|
699
699
|
};
|
|
700
|
-
t.modifierBuilder =
|
|
700
|
+
t.modifierBuilder = H(
|
|
701
701
|
t
|
|
702
702
|
), t.modifier = t.modifierBuilder, Object.prototype.hasOwnProperty.call(n, "modifier") || Object.defineProperty(n, "modifier", {
|
|
703
703
|
configurable: !0,
|
|
@@ -712,7 +712,7 @@ function k(n, e = []) {
|
|
|
712
712
|
return t.render = () => {
|
|
713
713
|
const r = s();
|
|
714
714
|
return (Array.isArray(r) ? r : [r]).map((a, d) => (a && typeof a == "object" && (d === 0 ? (a.modifiers = [...t.modifiers], a.componentId = n.id, a._originalComponent = t._originalComponent) : (a.modifiers && delete a.modifiers, a.componentId && a.componentId === n.id && delete a.componentId)), a));
|
|
715
|
-
},
|
|
715
|
+
}, ie(n) && (t.concat = function(r) {
|
|
716
716
|
const o = {
|
|
717
717
|
id: t.id,
|
|
718
718
|
component: t,
|
|
@@ -722,16 +722,16 @@ function k(n, e = []) {
|
|
|
722
722
|
return Array.isArray(u) ? u[0] : u;
|
|
723
723
|
}
|
|
724
724
|
}, a = r.toSegment(), d = {
|
|
725
|
-
totalSegments: r instanceof
|
|
725
|
+
totalSegments: r instanceof C ? r.segments.length + 1 : 2,
|
|
726
726
|
accessibilityRole: "text",
|
|
727
727
|
// Simplified for now
|
|
728
728
|
semanticStructure: "inline"
|
|
729
729
|
// Simplified for now
|
|
730
730
|
};
|
|
731
|
-
return r instanceof
|
|
731
|
+
return r instanceof C ? new C(
|
|
732
732
|
[o, ...r.segments],
|
|
733
733
|
d
|
|
734
|
-
) : new
|
|
734
|
+
) : new C([o, a], d);
|
|
735
735
|
}, t.toSegment = function() {
|
|
736
736
|
return {
|
|
737
737
|
id: t.id,
|
|
@@ -746,16 +746,16 @@ function k(n, e = []) {
|
|
|
746
746
|
return !0;
|
|
747
747
|
}), typeof n?.clone == "function" && (t.clone = (r) => {
|
|
748
748
|
const o = n.clone(r);
|
|
749
|
-
return
|
|
749
|
+
return L(
|
|
750
750
|
o,
|
|
751
751
|
[...t.modifiers]
|
|
752
752
|
);
|
|
753
753
|
}), t;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Pe(n, e, t = {}) {
|
|
756
756
|
n.modifiers = [...e], n.mounted && n.context;
|
|
757
757
|
}
|
|
758
|
-
const
|
|
758
|
+
const ke = {
|
|
759
759
|
/**
|
|
760
760
|
* Check if a component has specific modifier types
|
|
761
761
|
*/
|
|
@@ -802,7 +802,7 @@ const Pe = {
|
|
|
802
802
|
}
|
|
803
803
|
return !0;
|
|
804
804
|
}
|
|
805
|
-
},
|
|
805
|
+
}, re = /* @__PURE__ */ new Set([
|
|
806
806
|
// Container tags
|
|
807
807
|
"div",
|
|
808
808
|
"section",
|
|
@@ -911,7 +911,7 @@ const Pe = {
|
|
|
911
911
|
// Interactive elements
|
|
912
912
|
"menu",
|
|
913
913
|
"menuitem"
|
|
914
|
-
]),
|
|
914
|
+
]), _ = /* @__PURE__ */ new Map([
|
|
915
915
|
["nav", { role: "navigation", applyARIA: !0 }],
|
|
916
916
|
["main", { role: "main", applyARIA: !0 }],
|
|
917
917
|
["article", { role: "article", applyARIA: !0 }],
|
|
@@ -928,7 +928,7 @@ const Pe = {
|
|
|
928
928
|
// Usually implicit
|
|
929
929
|
["a", { role: "link", applyARIA: !1 }]
|
|
930
930
|
// Usually implicit
|
|
931
|
-
]),
|
|
931
|
+
]), se = /* @__PURE__ */ new Map([
|
|
932
932
|
// Layout Components - Ideal for semantic containers (Warning Level: None)
|
|
933
933
|
[
|
|
934
934
|
"HStack",
|
|
@@ -1002,16 +1002,16 @@ const Pe = {
|
|
|
1002
1002
|
]
|
|
1003
1003
|
// May break navigation
|
|
1004
1004
|
]);
|
|
1005
|
-
function
|
|
1006
|
-
const t =
|
|
1005
|
+
function ne(n, e) {
|
|
1006
|
+
const t = se.get(n);
|
|
1007
1007
|
return t ? t.warningLevel === "none" ? !1 : t.warningLevel === "warning" && t.problematicTags ? t.problematicTags.includes(e) : !(t.idealTags && t.idealTags.includes(e)) : !0;
|
|
1008
1008
|
}
|
|
1009
|
-
class
|
|
1009
|
+
class oe {
|
|
1010
1010
|
static validate(e, t) {
|
|
1011
|
-
return
|
|
1011
|
+
return re.has(e) ? {
|
|
1012
1012
|
valid: !0,
|
|
1013
1013
|
warnings: this.checkSemanticWarnings(e, t),
|
|
1014
|
-
semanticRole:
|
|
1014
|
+
semanticRole: _.get(e)
|
|
1015
1015
|
} : (process.env.NODE_ENV !== "production" && console.error(
|
|
1016
1016
|
`Invalid tag '${e}' for component type '${t}'`
|
|
1017
1017
|
), {
|
|
@@ -1045,43 +1045,43 @@ class ne {
|
|
|
1045
1045
|
return i;
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
let
|
|
1048
|
+
let $ = {
|
|
1049
1049
|
autoApplySemanticRoles: !0,
|
|
1050
1050
|
warnOnOverrides: process.env.NODE_ENV !== "production",
|
|
1051
1051
|
warnOnSemanticIssues: process.env.NODE_ENV !== "production",
|
|
1052
1052
|
validateTags: !0,
|
|
1053
1053
|
allowInvalidTags: !0
|
|
1054
1054
|
};
|
|
1055
|
-
function
|
|
1056
|
-
|
|
1055
|
+
function Le(n) {
|
|
1056
|
+
$ = { ...$, ...n };
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return {
|
|
1058
|
+
function W() {
|
|
1059
|
+
return { ...$ };
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
const i = t || e, s =
|
|
1061
|
+
function ae(n, e, t) {
|
|
1062
|
+
const i = t || e, s = W();
|
|
1063
1063
|
let r = { valid: !0 };
|
|
1064
|
-
return t && (s.warnOnOverrides &&
|
|
1064
|
+
return t && (s.warnOnOverrides && ne(n, t) && process.env.NODE_ENV !== "production" && console.warn(
|
|
1065
1065
|
`Element override: ${n} changed from '${e}' to '${t}'`
|
|
1066
|
-
), s.validateTags && (r =
|
|
1066
|
+
), s.validateTags && (r = oe.validate(t, n), !r.valid && !s.allowInvalidTags)) ? (process.env.NODE_ENV !== "production" && console.warn(
|
|
1067
1067
|
`Invalid tag '${t}' rejected for '${n}', using default '${e}' instead`
|
|
1068
1068
|
), { tag: e, validation: r }) : { tag: i, validation: r };
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1071
|
-
return (t) =>
|
|
1070
|
+
function $e(n, e) {
|
|
1071
|
+
return (t) => ae(n, e, t);
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1074
|
-
const
|
|
1073
|
+
var ce = Object.defineProperty, le = (n, e, t) => e in n ? ce(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, de = (n, e, t) => le(n, e + "", t);
|
|
1074
|
+
const j = class x {
|
|
1075
1075
|
static getInstance() {
|
|
1076
|
-
return
|
|
1076
|
+
return x.instance || (x.instance = new x()), x.instance;
|
|
1077
1077
|
}
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Apply semantic ARIA attributes to an element based on its tag
|
|
1080
1080
|
*/
|
|
1081
1081
|
applySemanticAttributes(e, t, i) {
|
|
1082
|
-
const s =
|
|
1082
|
+
const s = W();
|
|
1083
1083
|
if (!s.autoApplySemanticRoles) return;
|
|
1084
|
-
const r =
|
|
1084
|
+
const r = _.get(t);
|
|
1085
1085
|
if (!(!r || !r.applyARIA)) {
|
|
1086
1086
|
if (i?.role) {
|
|
1087
1087
|
s.warnOnSemanticIssues && process.env.NODE_ENV !== "production" && console.warn(
|
|
@@ -1102,20 +1102,20 @@ const W = class _ {
|
|
|
1102
1102
|
* Get semantic role information for a tag
|
|
1103
1103
|
*/
|
|
1104
1104
|
getSemanticRole(e) {
|
|
1105
|
-
return
|
|
1105
|
+
return _.get(e);
|
|
1106
1106
|
}
|
|
1107
1107
|
/**
|
|
1108
1108
|
* Check if a tag has automatic ARIA role application enabled
|
|
1109
1109
|
*/
|
|
1110
1110
|
hasAutoARIA(e) {
|
|
1111
|
-
const t =
|
|
1111
|
+
const t = _.get(e);
|
|
1112
1112
|
return t ? t.applyARIA : !1;
|
|
1113
1113
|
}
|
|
1114
1114
|
/**
|
|
1115
1115
|
* Get all tags that support automatic ARIA roles
|
|
1116
1116
|
*/
|
|
1117
1117
|
getAutoARIATags() {
|
|
1118
|
-
return Array.from(
|
|
1118
|
+
return Array.from(_.entries()).filter(([, e]) => e.applyARIA).map(([e]) => e);
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
* Apply semantic attributes during DOM node creation
|
|
@@ -1136,11 +1136,11 @@ const W = class _ {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
}
|
|
1138
1138
|
};
|
|
1139
|
-
|
|
1140
|
-
let
|
|
1141
|
-
const R =
|
|
1142
|
-
var
|
|
1143
|
-
const
|
|
1139
|
+
de(j, "instance");
|
|
1140
|
+
let ue = j;
|
|
1141
|
+
const R = ue.getInstance(), De = (n, e, t) => R.applySemanticAttributes(n, e, t), Oe = (n) => R.getSemanticRole(n), Be = (n) => R.hasAutoARIA(n);
|
|
1142
|
+
var pe = Object.defineProperty, fe = (n, e, t) => e in n ? pe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, I = (n, e, t) => fe(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1143
|
+
const he = /* @__PURE__ */ new Set([
|
|
1144
1144
|
"click",
|
|
1145
1145
|
"dblclick",
|
|
1146
1146
|
"mousedown",
|
|
@@ -1159,14 +1159,14 @@ const fe = /* @__PURE__ */ new Set([
|
|
|
1159
1159
|
"keydown",
|
|
1160
1160
|
"keyup",
|
|
1161
1161
|
"keypress"
|
|
1162
|
-
]),
|
|
1162
|
+
]), O = /* @__PURE__ */ new Set([
|
|
1163
1163
|
"scroll",
|
|
1164
1164
|
"wheel",
|
|
1165
1165
|
"touchstart",
|
|
1166
1166
|
"touchmove",
|
|
1167
1167
|
"touchend"
|
|
1168
1168
|
]);
|
|
1169
|
-
class
|
|
1169
|
+
class me {
|
|
1170
1170
|
constructor() {
|
|
1171
1171
|
I(this, "containerListeners", /* @__PURE__ */ new WeakMap()), I(this, "elementHandlers", /* @__PURE__ */ new WeakMap()), I(this, "handlerCounts", /* @__PURE__ */ new WeakMap());
|
|
1172
1172
|
}
|
|
@@ -1204,7 +1204,7 @@ class he {
|
|
|
1204
1204
|
return;
|
|
1205
1205
|
const s = (o) => {
|
|
1206
1206
|
this.handleDelegatedEvent(e, t, o);
|
|
1207
|
-
}, r =
|
|
1207
|
+
}, r = O.has(t) ? { passive: !0 } : { passive: !1 };
|
|
1208
1208
|
e.addEventListener(t, s, r), i.set(t, s);
|
|
1209
1209
|
}
|
|
1210
1210
|
/**
|
|
@@ -1243,13 +1243,13 @@ class he {
|
|
|
1243
1243
|
* Check if event type should use delegation
|
|
1244
1244
|
*/
|
|
1245
1245
|
shouldDelegate(e) {
|
|
1246
|
-
return
|
|
1246
|
+
return he.has(e);
|
|
1247
1247
|
}
|
|
1248
1248
|
/**
|
|
1249
1249
|
* Check if event type should use passive listeners
|
|
1250
1250
|
*/
|
|
1251
1251
|
shouldBePassive(e) {
|
|
1252
|
-
return
|
|
1252
|
+
return O.has(e);
|
|
1253
1253
|
}
|
|
1254
1254
|
/**
|
|
1255
1255
|
* Get metrics for debugging
|
|
@@ -1278,9 +1278,10 @@ class he {
|
|
|
1278
1278
|
}), this.containerListeners.delete(e)), this.handlerCounts.delete(e);
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
const T = new
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1281
|
+
const T = new me();
|
|
1282
|
+
var ge = Object.defineProperty, ye = (n, e, t) => e in n ? ge(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, S = (n, e, t) => ye(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1283
|
+
const P = "__tachuiManagedComponentId";
|
|
1284
|
+
class be {
|
|
1284
1285
|
constructor() {
|
|
1285
1286
|
S(this, "nodeMap", /* @__PURE__ */ new WeakMap()), S(this, "cleanupMap", /* @__PURE__ */ new WeakMap()), S(this, "renderedNodes", /* @__PURE__ */ new Set()), S(this, "elementToContainer", /* @__PURE__ */ new WeakMap()), S(this, "metrics", {
|
|
1286
1287
|
created: 0,
|
|
@@ -1364,26 +1365,28 @@ class ye {
|
|
|
1364
1365
|
}
|
|
1365
1366
|
updateProps(e, t, i) {
|
|
1366
1367
|
const s = t.props || {}, r = t.__appliedProps || {};
|
|
1367
|
-
|
|
1368
|
-
if (!(
|
|
1369
|
-
if (
|
|
1368
|
+
Object.keys(r).forEach((a) => {
|
|
1369
|
+
if (!(a in s)) {
|
|
1370
|
+
if (a === "key" || a === "children" || a.startsWith("on"))
|
|
1370
1371
|
return;
|
|
1371
|
-
this.setElementProp(e,
|
|
1372
|
+
this.setElementProp(e, a, void 0);
|
|
1372
1373
|
}
|
|
1373
|
-
}), Object.entries(s).forEach(([
|
|
1374
|
-
|
|
1375
|
-
})
|
|
1376
|
-
|
|
1377
|
-
|
|
1374
|
+
}), Object.entries(s).forEach(([a, d]) => {
|
|
1375
|
+
a === "key" || a === "children" || r && r[a] === d || this.applyProp(e, a, d, i);
|
|
1376
|
+
});
|
|
1377
|
+
const o = t.componentId;
|
|
1378
|
+
if (o ? (e.getAttribute("data-component-id") !== String(o) && (e.setAttribute("data-component-id", String(o)), this.recordAttributeWrite()), e[P] = !0) : e.hasAttribute("data-component-id") && e[P] === !0 && (e.removeAttribute("data-component-id"), this.recordAttributeRemoval(), e[P] = !1), t.__appliedProps = { ...s }, "componentMetadata" in t && t.componentMetadata) {
|
|
1379
|
+
const a = t.componentMetadata;
|
|
1380
|
+
if (a.overriddenTo && a.originalType && t.tag)
|
|
1378
1381
|
try {
|
|
1379
1382
|
R.processElementNode(
|
|
1380
1383
|
e,
|
|
1381
1384
|
t.tag,
|
|
1382
|
-
|
|
1385
|
+
a,
|
|
1383
1386
|
s?.aria || void 0
|
|
1384
1387
|
);
|
|
1385
|
-
} catch (
|
|
1386
|
-
console.warn("[tachUI] Could not process semantic attributes:",
|
|
1388
|
+
} catch (d) {
|
|
1389
|
+
console.warn("[tachUI] Could not process semantic attributes:", d);
|
|
1387
1390
|
}
|
|
1388
1391
|
}
|
|
1389
1392
|
}
|
|
@@ -1529,7 +1532,7 @@ class ye {
|
|
|
1529
1532
|
this.applyEventListener(e, t, i, s);
|
|
1530
1533
|
return;
|
|
1531
1534
|
}
|
|
1532
|
-
if (w(i) ||
|
|
1535
|
+
if (w(i) || N(i)) {
|
|
1533
1536
|
const r = E(() => {
|
|
1534
1537
|
const o = i();
|
|
1535
1538
|
this.setElementProp(e, t, o);
|
|
@@ -1565,7 +1568,7 @@ class ye {
|
|
|
1565
1568
|
* Apply className with reactive updates
|
|
1566
1569
|
*/
|
|
1567
1570
|
applyClassName(e, t) {
|
|
1568
|
-
if (w(t) ||
|
|
1571
|
+
if (w(t) || N(t)) {
|
|
1569
1572
|
const i = E(() => {
|
|
1570
1573
|
const s = t(), r = this.normalizeClassName(s);
|
|
1571
1574
|
e.className !== r && (e.className = r, this.recordAttributeWrite());
|
|
@@ -1589,7 +1592,7 @@ class ye {
|
|
|
1589
1592
|
*/
|
|
1590
1593
|
applyStyle(e, t) {
|
|
1591
1594
|
const i = e;
|
|
1592
|
-
if (w(t) ||
|
|
1595
|
+
if (w(t) || N(t)) {
|
|
1593
1596
|
const s = E(() => {
|
|
1594
1597
|
const r = t();
|
|
1595
1598
|
this.setElementStyles(i, r);
|
|
@@ -1613,7 +1616,7 @@ class ye {
|
|
|
1613
1616
|
Object.keys(i).forEach((s) => {
|
|
1614
1617
|
s in t || (e.style.removeProperty(s.replace(/[A-Z]/g, (r) => `-${r.toLowerCase()}`)), this.recordAttributeRemoval());
|
|
1615
1618
|
}), Object.entries(t).forEach(([s, r]) => {
|
|
1616
|
-
if (w(r) ||
|
|
1619
|
+
if (w(r) || N(r)) {
|
|
1617
1620
|
const o = E(() => {
|
|
1618
1621
|
const a = r(), d = s.replace(/[A-Z]/g, (u) => `-${u.toLowerCase()}`);
|
|
1619
1622
|
if (a == null)
|
|
@@ -1736,7 +1739,7 @@ class ye {
|
|
|
1736
1739
|
t.length > 0 && this.recordModifierApplications(t.length);
|
|
1737
1740
|
const s = i.componentInstance || i.componentMetadata && i.componentMetadata.componentInstance || i._originalComponent || // Use original component if available
|
|
1738
1741
|
i;
|
|
1739
|
-
|
|
1742
|
+
V(
|
|
1740
1743
|
i,
|
|
1741
1744
|
t,
|
|
1742
1745
|
{
|
|
@@ -1825,15 +1828,15 @@ class ye {
|
|
|
1825
1828
|
this.metrics.modifierApplications += e;
|
|
1826
1829
|
}
|
|
1827
1830
|
}
|
|
1828
|
-
const h = new
|
|
1829
|
-
function
|
|
1831
|
+
const h = new be();
|
|
1832
|
+
function He() {
|
|
1830
1833
|
h.resetMetrics();
|
|
1831
1834
|
}
|
|
1832
|
-
function
|
|
1835
|
+
function Ve() {
|
|
1833
1836
|
return h.getMetrics();
|
|
1834
1837
|
}
|
|
1835
|
-
function
|
|
1836
|
-
return
|
|
1838
|
+
function We(n, e) {
|
|
1839
|
+
return U(() => {
|
|
1837
1840
|
let t = [];
|
|
1838
1841
|
const i = /* @__PURE__ */ new Map(), s = (o) => {
|
|
1839
1842
|
if (o.key != null) {
|
|
@@ -1900,10 +1903,10 @@ function Ve(n, e) {
|
|
|
1900
1903
|
y.forEach((c) => {
|
|
1901
1904
|
c && c.parentNode !== e && h.appendNode(e, c);
|
|
1902
1905
|
});
|
|
1903
|
-
const
|
|
1904
|
-
c.key != null && c.element && i.set(c.key, c), c.children && c.children.forEach(
|
|
1906
|
+
const D = (c) => {
|
|
1907
|
+
c.key != null && c.element && i.set(c.key, c), c.children && c.children.forEach(D);
|
|
1905
1908
|
};
|
|
1906
|
-
d.forEach(
|
|
1909
|
+
d.forEach(D), t = d;
|
|
1907
1910
|
});
|
|
1908
1911
|
return () => {
|
|
1909
1912
|
r.dispose(), t.forEach((o) => {
|
|
@@ -1912,7 +1915,7 @@ function Ve(n, e) {
|
|
|
1912
1915
|
};
|
|
1913
1916
|
});
|
|
1914
1917
|
}
|
|
1915
|
-
function
|
|
1918
|
+
function ve(n, e, ...t) {
|
|
1916
1919
|
const i = t.flat().filter((r) => r != null).map((r) => typeof r == "string" || typeof r == "number" ? { type: "text", text: String(r) } : r), s = {
|
|
1917
1920
|
type: "element",
|
|
1918
1921
|
tag: n,
|
|
@@ -1922,14 +1925,14 @@ function be(n, e, ...t) {
|
|
|
1922
1925
|
};
|
|
1923
1926
|
return e && "componentMetadata" in e && (s.componentMetadata = e.componentMetadata), s;
|
|
1924
1927
|
}
|
|
1925
|
-
function
|
|
1926
|
-
if (w(n) ||
|
|
1928
|
+
function je(n) {
|
|
1929
|
+
if (w(n) || N(n) || typeof n == "function") {
|
|
1927
1930
|
const e = {
|
|
1928
1931
|
type: "text",
|
|
1929
1932
|
text: "",
|
|
1930
1933
|
reactiveContent: n
|
|
1931
1934
|
// Store the reactive content function
|
|
1932
|
-
}, t =
|
|
1935
|
+
}, t = F(() => n());
|
|
1933
1936
|
e.text = String(t);
|
|
1934
1937
|
const i = E(() => {
|
|
1935
1938
|
const s = n();
|
|
@@ -1942,11 +1945,11 @@ function We(n) {
|
|
|
1942
1945
|
text: n
|
|
1943
1946
|
};
|
|
1944
1947
|
}
|
|
1945
|
-
var
|
|
1946
|
-
class
|
|
1948
|
+
var Ee = Object.defineProperty, Ae = (n, e, t) => e in n ? Ee(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, M = (n, e, t) => Ae(n, typeof e != "symbol" ? e + "" : e, t);
|
|
1949
|
+
class C {
|
|
1947
1950
|
// Required by ModifiableComponent interface
|
|
1948
1951
|
constructor(e, t, i = !0) {
|
|
1949
|
-
this.metadata = t,
|
|
1952
|
+
this.metadata = t, M(this, "type", "component"), M(this, "id"), M(this, "mounted", !1), M(this, "cleanup", []), M(this, "props", {}), M(this, "segments"), M(this, "modifiers", []), this.id = `concat-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, this.segments = e;
|
|
1950
1953
|
}
|
|
1951
1954
|
/**
|
|
1952
1955
|
* Render the concatenated component to DOM nodes (Enhanced - Phase 4.2)
|
|
@@ -1954,7 +1957,7 @@ class M {
|
|
|
1954
1957
|
render() {
|
|
1955
1958
|
const e = this.determineContainerClass(), t = this.buildAccessibilityLabel(), i = this.buildAccessibilityAttributes(), s = this.modifiers && this.modifiers.some((a) => a.type === "asHTML");
|
|
1956
1959
|
let r;
|
|
1957
|
-
return s ? r = this.renderSegmentsWithAsHTML() : r = this.segments.map((a) => a.render()).flat(), [
|
|
1960
|
+
return s ? r = this.renderSegmentsWithAsHTML() : r = this.segments.map((a) => a.render()).flat(), [ve("span", {
|
|
1958
1961
|
class: `tachui-concatenated ${e}`,
|
|
1959
1962
|
...i,
|
|
1960
1963
|
"aria-label": t || void 0,
|
|
@@ -2035,7 +2038,7 @@ class M {
|
|
|
2035
2038
|
*/
|
|
2036
2039
|
concat(e) {
|
|
2037
2040
|
let t, i;
|
|
2038
|
-
return e instanceof
|
|
2041
|
+
return e instanceof C ? (t = [...this.segments, ...e.segments], i = this.mergeMetadata(this.metadata, e.metadata, t.length)) : (t = [...this.segments, e.toSegment()], i = this.mergeMetadata(
|
|
2039
2042
|
this.metadata,
|
|
2040
2043
|
{
|
|
2041
2044
|
totalSegments: 1,
|
|
@@ -2043,7 +2046,7 @@ class M {
|
|
|
2043
2046
|
semanticStructure: this.determineComponentSemanticStructure(e)
|
|
2044
2047
|
},
|
|
2045
2048
|
t.length
|
|
2046
|
-
)), new
|
|
2049
|
+
)), new C(t, i);
|
|
2047
2050
|
}
|
|
2048
2051
|
/**
|
|
2049
2052
|
* Convert this concatenated component to a segment (for further concatenation)
|
|
@@ -2226,7 +2229,7 @@ class M {
|
|
|
2226
2229
|
componentInstance: i.component
|
|
2227
2230
|
// Pass the original component
|
|
2228
2231
|
};
|
|
2229
|
-
return
|
|
2232
|
+
return V(e, t, s, { batch: !0 });
|
|
2230
2233
|
}
|
|
2231
2234
|
/**
|
|
2232
2235
|
* Generate comprehensive accessibility tree for this concatenated component
|
|
@@ -2246,43 +2249,43 @@ class M {
|
|
|
2246
2249
|
return {
|
|
2247
2250
|
role: this.determineComponentAccessibilityRole(t),
|
|
2248
2251
|
label: this.extractAccessibilityText(e),
|
|
2249
|
-
children: t instanceof
|
|
2252
|
+
children: t instanceof C ? t.generateAccessibilityTree().children : void 0
|
|
2250
2253
|
};
|
|
2251
2254
|
}
|
|
2252
2255
|
}
|
|
2253
2256
|
export {
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2257
|
+
Pe as A,
|
|
2258
|
+
ke as B,
|
|
2259
|
+
se as C,
|
|
2260
|
+
be as D,
|
|
2261
|
+
me as E,
|
|
2262
|
+
Z as M,
|
|
2263
|
+
_ as S,
|
|
2264
|
+
re as V,
|
|
2265
|
+
Te as a,
|
|
2266
|
+
V as b,
|
|
2267
|
+
H as c,
|
|
2268
|
+
L as d,
|
|
2269
|
+
Ie as e,
|
|
2270
|
+
He as f,
|
|
2271
|
+
Ve as g,
|
|
2272
|
+
ve as h,
|
|
2270
2273
|
T as i,
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2274
|
+
ne as j,
|
|
2275
|
+
oe as k,
|
|
2276
|
+
Le as l,
|
|
2277
|
+
Re as m,
|
|
2278
|
+
W as n,
|
|
2279
|
+
$e as o,
|
|
2280
|
+
ae as p,
|
|
2281
|
+
ue as q,
|
|
2282
|
+
We as r,
|
|
2283
|
+
xe as s,
|
|
2284
|
+
je as t,
|
|
2282
2285
|
R as u,
|
|
2283
|
-
|
|
2284
|
-
|
|
2286
|
+
De as v,
|
|
2287
|
+
Oe as w,
|
|
2285
2288
|
Be as x,
|
|
2286
|
-
|
|
2287
|
-
|
|
2289
|
+
C as y,
|
|
2290
|
+
Y as z
|
|
2288
2291
|
};
|