@sylwellsoftware/fray 0.7.0 → 1.0.0
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 +264 -204
- package/colors/README.md +26 -23
- package/colors/gray/colors.css +1 -42
- package/colors/green/colors.css +1 -42
- package/colors/iceblue/colors.css +5 -43
- package/colors/ocean/colors.css +1 -42
- package/colors/orange/colors.css +1 -42
- package/colors/purple/colors.css +1 -42
- package/colors/red/colors.css +1 -42
- package/colors/yellow/colors.css +1 -42
- package/dist/Components/Placeholder.d.ts +1 -2
- package/dist/Components/Placeholder.d.ts.map +1 -1
- package/dist/Components/component.d.ts +15 -7
- package/dist/Components/component.d.ts.map +1 -1
- package/dist/Components/data/descriptionList.d.ts +3 -1
- package/dist/Components/data/descriptionList.d.ts.map +1 -1
- package/dist/Components/data/listview/listview.d.ts +1 -2
- package/dist/Components/data/listview/listview.d.ts.map +1 -1
- package/dist/Components/data/table/DataTable.d.ts +1 -1
- package/dist/Components/data/table/DataTable.d.ts.map +1 -1
- package/dist/Components/data/table/FilterPanel.d.ts +2 -4
- package/dist/Components/data/table/FilterPanel.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeader.d.ts +2 -0
- package/dist/Components/data/table/TableHeader.d.ts.map +1 -1
- package/dist/Components/data/table/TableHeaderCell.d.ts +1 -1
- package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeitem.d.ts +1 -0
- package/dist/Components/data/treeview/treeitem.d.ts.map +1 -1
- package/dist/Components/data/treeview/treeview.d.ts +2 -1
- package/dist/Components/data/treeview/treeview.d.ts.map +1 -1
- package/dist/Components/dialog/dialog.d.ts +6 -2
- package/dist/Components/dialog/dialog.d.ts.map +1 -1
- package/dist/Components/layout/header.d.ts +19 -0
- package/dist/Components/layout/header.d.ts.map +1 -0
- package/dist/Components/layout/panel.d.ts +7 -3
- package/dist/Components/layout/panel.d.ts.map +1 -1
- package/dist/Components/layout/sidebar.d.ts +4 -0
- package/dist/Components/layout/sidebar.d.ts.map +1 -1
- package/dist/Components/layout/splitView.d.ts +1 -1
- package/dist/Components/layout/splitView.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tab.d.ts +1 -0
- package/dist/Components/layout/tabpanel/tab.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tabline.d.ts +1 -2
- package/dist/Components/layout/tabpanel/tabline.d.ts.map +1 -1
- package/dist/Components/layout/tabpanel/tabpanel.d.ts +1 -1
- package/dist/Components/layout/tabpanel/tabpanel.d.ts.map +1 -1
- package/dist/Components/lineinputs/CheckableControl.d.ts +7 -0
- package/dist/Components/lineinputs/CheckableControl.d.ts.map +1 -0
- package/dist/Components/lineinputs/LabeledInputControl.d.ts +7 -0
- package/dist/Components/lineinputs/LabeledInputControl.d.ts.map +1 -0
- package/dist/Components/lineinputs/SelectControl.d.ts +7 -0
- package/dist/Components/lineinputs/SelectControl.d.ts.map +1 -0
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts +11 -5
- package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/QuadCheckbox.d.ts +1 -2
- package/dist/Components/lineinputs/checkbox/QuadCheckbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/checkbox/TriCheckbox.d.ts +1 -2
- package/dist/Components/lineinputs/checkbox/TriCheckbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/dropdown.d.ts +7 -6
- package/dist/Components/lineinputs/dropdown.d.ts.map +1 -1
- package/dist/Components/lineinputs/label.d.ts +14 -0
- package/dist/Components/lineinputs/label.d.ts.map +1 -0
- package/dist/Components/lineinputs/radio.d.ts +20 -7
- package/dist/Components/lineinputs/radio.d.ts.map +1 -1
- package/dist/Components/lineinputs/textbox.d.ts +7 -6
- package/dist/Components/lineinputs/textbox.d.ts.map +1 -1
- package/dist/Components/lineinputs/toggle.d.ts +10 -3
- package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
- package/dist/Components/menu/button.d.ts +6 -3
- package/dist/Components/menu/button.d.ts.map +1 -1
- package/dist/Components/menu/toolbar.d.ts +1 -1
- package/dist/Components/menu/toolbar.d.ts.map +1 -1
- package/dist/Components/status/progressBar.d.ts +1 -1
- package/dist/Components/status/progressBar.d.ts.map +1 -1
- package/dist/Components/theme/stylesheetPicker.d.ts +6 -7
- package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2539 -1839
- package/dist/index.js.map +1 -1
- package/dist/{jsx-dev-runtime-Kf1Dhu-y.js → jsx-dev-runtime-CRDpvXOH.js} +481 -472
- package/dist/jsx-dev-runtime-CRDpvXOH.js.map +1 -0
- package/dist/jsx-dev-runtime.js +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/dist/routing/RouteLink.d.ts +1 -0
- package/dist/routing/RouteLink.d.ts.map +1 -1
- package/dist/routing/RouteQuery.d.ts +1 -0
- package/dist/routing/RouteQuery.d.ts.map +1 -1
- package/dist/routing/RouteScope.d.ts +1 -0
- package/dist/routing/RouteScope.d.ts.map +1 -1
- package/dist/routing/RouteValue.d.ts +1 -0
- package/dist/routing/RouteValue.d.ts.map +1 -1
- package/dist/runtime.d.ts +5 -13
- package/dist/runtime.d.ts.map +1 -1
- package/dist/styling/styleRegistry.d.ts +0 -4
- package/dist/styling/styleRegistry.d.ts.map +1 -1
- package/dist/styling/theme.d.ts +14 -2
- package/dist/styling/theme.d.ts.map +1 -1
- package/package.json +5 -6
- package/styles/structural.css +888 -398
- package/themes/README.md +30 -72
- package/themes/base.css +311 -0
- package/themes/java/theme.css +14 -423
- package/themes/minimal/theme.css +3 -419
- package/themes/shiny/theme.css +127 -508
- package/dist/jsx-dev-runtime-Kf1Dhu-y.js.map +0 -1
- package/dist/styling/baseStyleDefinitions.d.ts +0 -75
- package/dist/styling/baseStyleDefinitions.d.ts.map +0 -1
- package/themes/dark.css +0 -98
- package/themes/light.css +0 -98
|
@@ -1,223 +1,155 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const D =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
left: "0",
|
|
11
|
-
width: "100%",
|
|
12
|
-
height: "100%",
|
|
13
|
-
"pointer-events": "none"
|
|
14
|
-
},
|
|
15
|
-
inputline: {
|
|
16
|
-
display: "flex",
|
|
17
|
-
"flex-flow": "row nowrap",
|
|
18
|
-
position: "relative",
|
|
19
|
-
"min-height": "var(--control-min-height, 2rem)",
|
|
20
|
-
"box-sizing": "border-box"
|
|
21
|
-
},
|
|
22
|
-
input: {
|
|
23
|
-
"pointer-events": "all",
|
|
24
|
-
width: "var(--input-width, 15rem)",
|
|
25
|
-
"box-sizing": "border-box",
|
|
26
|
-
"white-space": "nowrap"
|
|
27
|
-
},
|
|
28
|
-
inputlike: {
|
|
29
|
-
"pointer-events": "all",
|
|
30
|
-
"box-sizing": "border-box",
|
|
31
|
-
"white-space": "nowrap"
|
|
32
|
-
},
|
|
33
|
-
labeledinput: {
|
|
34
|
-
display: "flex",
|
|
35
|
-
"flex-flow": "row nowrap",
|
|
36
|
-
"align-items": "center",
|
|
37
|
-
gap: ".5em"
|
|
38
|
-
},
|
|
39
|
-
working: {
|
|
40
|
-
display: "inline",
|
|
41
|
-
position: "absolute",
|
|
42
|
-
"z-index": "1",
|
|
43
|
-
margin: "auto",
|
|
44
|
-
animation: "fray-placeholder-progress 0.8s linear infinite",
|
|
45
|
-
"background-repeat": "repeat",
|
|
46
|
-
"background-size": "2rem 2rem",
|
|
47
|
-
"background-image": "var(--working-background-image)",
|
|
48
|
-
border: "0 solid transparent",
|
|
49
|
-
"border-radius": "inherit",
|
|
50
|
-
"box-sizing": "border-box"
|
|
51
|
-
},
|
|
52
|
-
uiline: {
|
|
53
|
-
"box-sizing": "border-box",
|
|
54
|
-
"min-height": "var(--control-min-height, 2rem)",
|
|
55
|
-
cursor: "pointer",
|
|
56
|
-
"user-select": "none"
|
|
57
|
-
},
|
|
58
|
-
noselect: {
|
|
59
|
-
"user-select": "var(--noselect-user-select)",
|
|
60
|
-
cursor: "var(--noselect-cursor)"
|
|
61
|
-
},
|
|
62
|
-
button: {
|
|
63
|
-
"box-sizing": "border-box",
|
|
64
|
-
cursor: "default",
|
|
65
|
-
"user-select": "none",
|
|
66
|
-
variants: {
|
|
67
|
-
":disabled": {
|
|
68
|
-
cursor: "not-allowed",
|
|
69
|
-
"pointer-events": "none"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}, K = "data-fray-structural-styles";
|
|
74
|
-
let me = 1;
|
|
75
|
-
class Q {
|
|
76
|
-
constructor(t = `runtime-${me++}`) {
|
|
77
|
-
a(this, "id");
|
|
78
|
-
a(this, "cssFragments", /* @__PURE__ */ new Set());
|
|
79
|
-
a(this, "baseStyleMap", /* @__PURE__ */ new Map());
|
|
1
|
+
var ye = Object.defineProperty;
|
|
2
|
+
var be = (e, t, n) => t in e ? ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var l = (e, t, n) => be(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
const D = "data-fray-structural-styles";
|
|
5
|
+
let ge = 1;
|
|
6
|
+
class G {
|
|
7
|
+
constructor(t = `runtime-${ge++}`) {
|
|
8
|
+
l(this, "id");
|
|
9
|
+
l(this, "cssFragments", /* @__PURE__ */ new Map());
|
|
80
10
|
if (typeof t != "string") throw new TypeError("StyleRegistry id must be a string");
|
|
81
11
|
this.id = t;
|
|
82
12
|
}
|
|
83
13
|
registerCSS(t) {
|
|
84
14
|
if (typeof t != "string") throw new TypeError("Component CSS must be a string");
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
registerBaseStyle(t, n) {
|
|
88
|
-
if (typeof t != "string" || t.trim().length === 0)
|
|
89
|
-
throw new TypeError("Base style selector must be a non-empty string");
|
|
90
|
-
const r = typeof n == "string" ? [n] : n;
|
|
91
|
-
if (!Array.isArray(r))
|
|
92
|
-
throw new TypeError("Base style names must be a string or array");
|
|
93
|
-
for (const i of r) {
|
|
94
|
-
if (!Object.hasOwn(D, i))
|
|
95
|
-
throw new Error(`Unknown Fray base style: ${String(i)}`);
|
|
96
|
-
const s = i, o = this.baseStyleMap.get(s) ?? /* @__PURE__ */ new Set();
|
|
97
|
-
o.add(t.trim()), this.baseStyleMap.set(s, o);
|
|
98
|
-
}
|
|
99
|
-
return this;
|
|
15
|
+
const n = t.trim();
|
|
16
|
+
return n.length > 0 && this.cssFragments.set(`raw:${n}`, { kind: "raw", css: n }), this;
|
|
100
17
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
@media (forced-colors: active) {
|
|
116
|
-
:focus-visible {
|
|
117
|
-
outline: 2px solid Highlight !important;
|
|
118
|
-
outline-offset: 2px !important;
|
|
119
|
-
}
|
|
120
|
-
}`;
|
|
121
|
-
}
|
|
122
|
-
generateBaseStyleCSS() {
|
|
123
|
-
let t = "";
|
|
124
|
-
for (const [n, r] of this.baseStyleMap) {
|
|
125
|
-
const { properties: i, variants: s } = ge(D[n]), o = [...r];
|
|
126
|
-
t += U(n, o, i);
|
|
127
|
-
for (const [c, l] of Object.entries(s))
|
|
128
|
-
t += U(
|
|
129
|
-
`${n}${c}`,
|
|
130
|
-
o.map((u) => we(u, c)),
|
|
131
|
-
l
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
return t.trim();
|
|
18
|
+
/** @internal Collect a host-relative component template without resolving it yet. */
|
|
19
|
+
registerHostCSS(t, n) {
|
|
20
|
+
if (typeof t != "string") throw new TypeError("Component CSS must be a string");
|
|
21
|
+
if (typeof n != "string" || n.trim().length === 0)
|
|
22
|
+
throw new TypeError("Component CSS host must be a non-empty selector");
|
|
23
|
+
const r = t.trim();
|
|
24
|
+
if (r.length === 0) return this;
|
|
25
|
+
if (!r.includes("&")) return this.registerCSS(r);
|
|
26
|
+
const i = `host:${r}`, s = this.cssFragments.get(i);
|
|
27
|
+
return s == null ? this.cssFragments.set(i, {
|
|
28
|
+
kind: "host",
|
|
29
|
+
css: r,
|
|
30
|
+
hosts: /* @__PURE__ */ new Set([n.trim()])
|
|
31
|
+
}) : s.kind === "host" && s.hosts.add(n.trim()), this;
|
|
135
32
|
}
|
|
136
33
|
generateCSS() {
|
|
137
|
-
return [
|
|
138
|
-
this.generateRootCSS(),
|
|
139
|
-
this.generateBaseStyleCSS(),
|
|
140
|
-
[...this.cssFragments].join(`
|
|
141
|
-
|
|
142
|
-
`)
|
|
143
|
-
].filter(Boolean).join(`
|
|
34
|
+
return [...this.cssFragments.values()].map((t) => t.kind === "raw" ? t.css : J(t.css, [...t.hosts])).join(`
|
|
144
35
|
|
|
145
36
|
`);
|
|
146
37
|
}
|
|
147
38
|
injectAll(t = globalThis.document) {
|
|
148
39
|
if ((t == null ? void 0 : t.head) == null)
|
|
149
40
|
throw new TypeError("StyleRegistry.injectAll requires a document with a head");
|
|
150
|
-
const n = `style[${
|
|
41
|
+
const n = `style[${D}="${ve(this.id)}"]`;
|
|
151
42
|
let r = t.head.querySelector(n);
|
|
152
|
-
r == null && (r = t.createElement("style"), r.setAttribute(
|
|
43
|
+
r == null && (r = t.createElement("style"), r.setAttribute(D, this.id), t.head.prepend(r));
|
|
153
44
|
const i = this.generateCSS();
|
|
154
45
|
return r.textContent !== i && (r.textContent = i), r;
|
|
155
46
|
}
|
|
156
47
|
reset() {
|
|
157
|
-
this.cssFragments.clear()
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
function ye() {
|
|
161
|
-
return new Q();
|
|
162
|
-
}
|
|
163
|
-
const be = new Q("");
|
|
164
|
-
function ge(e) {
|
|
165
|
-
const t = {};
|
|
166
|
-
let n = {};
|
|
167
|
-
for (const [r, i] of Object.entries(e))
|
|
168
|
-
if (r === "variants") {
|
|
169
|
-
if (typeof i != "object")
|
|
170
|
-
throw new TypeError("Base style variants must be declaration maps");
|
|
171
|
-
n = i;
|
|
172
|
-
} else if (typeof i == "string")
|
|
173
|
-
t[r] = i;
|
|
174
|
-
else
|
|
175
|
-
throw new TypeError(`Base style property ${r} must be a string`);
|
|
176
|
-
return { properties: t, variants: n };
|
|
177
|
-
}
|
|
178
|
-
function U(e, t, n) {
|
|
179
|
-
if (t.length === 0 || Object.keys(n).length === 0) return "";
|
|
180
|
-
const r = Object.entries(n).map(([i, s]) => ` ${i}: ${s};`).join(`
|
|
181
|
-
`);
|
|
182
|
-
return `/* ${e} */
|
|
183
|
-
${t.join(`,
|
|
184
|
-
`)} {
|
|
185
|
-
${r}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
`;
|
|
48
|
+
this.cssFragments.clear();
|
|
49
|
+
}
|
|
189
50
|
}
|
|
190
|
-
function we(
|
|
191
|
-
|
|
192
|
-
return n < 0 ? `${e}${t}` : `${e.slice(0, n)}${t}${e.slice(n)}`;
|
|
51
|
+
function we() {
|
|
52
|
+
return new G();
|
|
193
53
|
}
|
|
194
|
-
|
|
54
|
+
const Se = new G("");
|
|
55
|
+
function ve(e) {
|
|
195
56
|
return e.replaceAll("\\", "\\\\").replaceAll('"', '\\"');
|
|
196
57
|
}
|
|
197
|
-
|
|
198
|
-
|
|
58
|
+
function J(e, t) {
|
|
59
|
+
let n = "", r = 0;
|
|
60
|
+
for (; r < e.length; ) {
|
|
61
|
+
const i = Re(e, r);
|
|
62
|
+
if (i < 0) return n + e.slice(r);
|
|
63
|
+
const s = Te(e, i);
|
|
64
|
+
if (s < 0) return n + e.slice(r);
|
|
65
|
+
const o = e.slice(r, i), a = e.slice(i + 1, s), c = o.trim();
|
|
66
|
+
n += c.startsWith("@") ? `${o}{${J(a, t)}}` : `${Ee(o, t)}{${a}}`, r = s + 1;
|
|
67
|
+
}
|
|
68
|
+
return n;
|
|
69
|
+
}
|
|
70
|
+
function Ee(e, t) {
|
|
71
|
+
var o, a, c;
|
|
72
|
+
if (t.length === 1 || !e.includes("&"))
|
|
73
|
+
return t.length === 1 ? e.replaceAll("&", t[0]) : e;
|
|
74
|
+
const n = ((o = e.match(/^\s*/)) == null ? void 0 : o[0]) ?? "", r = ((a = e.match(/\s*$/)) == null ? void 0 : a[0]) ?? "", i = Ce(e.trim()), s = ((c = n.match(/(?:^|\n)([ \t]*)$/)) == null ? void 0 : c[1]) ?? "";
|
|
75
|
+
return n + i.flatMap((u) => u.includes("&") ? t.map((p) => u.replaceAll("&", p)) : [u]).join(`,
|
|
76
|
+
${s}`) + r;
|
|
77
|
+
}
|
|
78
|
+
function Ce(e) {
|
|
79
|
+
const t = [];
|
|
80
|
+
let n = 0, r = 0, i = 0, s = null;
|
|
81
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
82
|
+
const a = e[o];
|
|
83
|
+
if (s != null) {
|
|
84
|
+
a === "\\" ? o += 1 : a === s && (s = null);
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
a === '"' || a === "'" ? s = a : a === "(" ? r += 1 : a === ")" ? r -= 1 : a === "[" ? i += 1 : a === "]" ? i -= 1 : a === "," && r === 0 && i === 0 && (t.push(e.slice(n, o).trim()), n = o + 1);
|
|
88
|
+
}
|
|
89
|
+
return t.push(e.slice(n).trim()), t.filter(Boolean);
|
|
90
|
+
}
|
|
91
|
+
function Re(e, t) {
|
|
92
|
+
for (let n = t; n < e.length; n += 1) {
|
|
93
|
+
const r = e[n];
|
|
94
|
+
if (r === '"' || r === "'")
|
|
95
|
+
n = Q(e, n);
|
|
96
|
+
else if (r === "/" && e[n + 1] === "*")
|
|
97
|
+
n = X(e, n);
|
|
98
|
+
else if (r === "{")
|
|
99
|
+
return n;
|
|
100
|
+
}
|
|
101
|
+
return -1;
|
|
102
|
+
}
|
|
103
|
+
function Te(e, t) {
|
|
104
|
+
let n = 1;
|
|
105
|
+
for (let r = t + 1; r < e.length; r += 1) {
|
|
106
|
+
const i = e[r];
|
|
107
|
+
if (i === '"' || i === "'")
|
|
108
|
+
r = Q(e, r);
|
|
109
|
+
else if (i === "/" && e[r + 1] === "*")
|
|
110
|
+
r = X(e, r);
|
|
111
|
+
else if (i === "{")
|
|
112
|
+
n += 1;
|
|
113
|
+
else if (i === "}" && --n === 0)
|
|
114
|
+
return r;
|
|
115
|
+
}
|
|
116
|
+
return -1;
|
|
117
|
+
}
|
|
118
|
+
function Q(e, t) {
|
|
119
|
+
const n = e[t];
|
|
120
|
+
for (let r = t + 1; r < e.length; r += 1)
|
|
121
|
+
if (e[r] === "\\") r += 1;
|
|
122
|
+
else if (e[r] === n) return r;
|
|
123
|
+
return e.length;
|
|
124
|
+
}
|
|
125
|
+
function X(e, t) {
|
|
126
|
+
const n = e.indexOf("*/", t + 2);
|
|
127
|
+
return n < 0 ? e.length : n + 1;
|
|
128
|
+
}
|
|
129
|
+
const ee = /* @__PURE__ */ new WeakSet(), te = /* @__PURE__ */ new WeakSet();
|
|
130
|
+
function et(e) {
|
|
199
131
|
if (typeof e != "string" || e.trim() === "")
|
|
200
132
|
throw new TypeError("Service name must be a non-empty string");
|
|
201
133
|
const t = Object.freeze({ name: e.trim() });
|
|
202
|
-
return
|
|
134
|
+
return ee.add(t), t;
|
|
203
135
|
}
|
|
204
|
-
function
|
|
205
|
-
if (
|
|
136
|
+
function tt(e, t) {
|
|
137
|
+
if (z(e), typeof t != "function")
|
|
206
138
|
throw new TypeError(`Service provider "${e.name}" requires a factory function`);
|
|
207
139
|
const n = Object.freeze({ key: e, create: t });
|
|
208
|
-
return
|
|
140
|
+
return te.add(n), n;
|
|
209
141
|
}
|
|
210
|
-
class
|
|
142
|
+
class ne {
|
|
211
143
|
constructor(t = []) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
144
|
+
l(this, "providers", /* @__PURE__ */ new Map());
|
|
145
|
+
l(this, "instances", /* @__PURE__ */ new Map());
|
|
146
|
+
l(this, "creationOrder", []);
|
|
147
|
+
l(this, "resolving", []);
|
|
148
|
+
l(this, "disposed", !1);
|
|
217
149
|
if (!Array.isArray(t))
|
|
218
150
|
throw new TypeError("ServiceScope providers must be an array");
|
|
219
151
|
for (const n of t) {
|
|
220
|
-
if (
|
|
152
|
+
if (Pe(n), this.providers.has(n.key))
|
|
221
153
|
throw new Error(`Service "${n.key.name}" is registered more than once`);
|
|
222
154
|
this.providers.set(n.key, n);
|
|
223
155
|
}
|
|
@@ -226,10 +158,10 @@ class te {
|
|
|
226
158
|
return this.disposed;
|
|
227
159
|
}
|
|
228
160
|
has(t) {
|
|
229
|
-
return this.assertActive(),
|
|
161
|
+
return this.assertActive(), z(t), this.providers.has(t);
|
|
230
162
|
}
|
|
231
163
|
require(t) {
|
|
232
|
-
if (this.assertActive(),
|
|
164
|
+
if (this.assertActive(), z(t), this.instances.has(t)) return this.instances.get(t);
|
|
233
165
|
const n = this.providers.get(t);
|
|
234
166
|
if (n == null) throw new Error(`Service "${t.name}" is not registered`);
|
|
235
167
|
const r = this.resolving.indexOf(t);
|
|
@@ -252,7 +184,7 @@ class te {
|
|
|
252
184
|
for (const n of [...this.creationOrder].reverse()) {
|
|
253
185
|
const r = this.instances.get(n);
|
|
254
186
|
try {
|
|
255
|
-
const i =
|
|
187
|
+
const i = Oe(r);
|
|
256
188
|
i != null && i.call(r);
|
|
257
189
|
} catch (i) {
|
|
258
190
|
t.push(i);
|
|
@@ -266,25 +198,25 @@ class te {
|
|
|
266
198
|
if (this.disposed) throw new Error("ServiceScope has been disposed");
|
|
267
199
|
}
|
|
268
200
|
}
|
|
269
|
-
function
|
|
270
|
-
return new
|
|
201
|
+
function je(e = []) {
|
|
202
|
+
return new ne(e);
|
|
271
203
|
}
|
|
272
|
-
function
|
|
273
|
-
return e != null && (typeof e == "object" || typeof e == "function") &&
|
|
204
|
+
function Ae(e) {
|
|
205
|
+
return e != null && (typeof e == "object" || typeof e == "function") && ee.has(e);
|
|
274
206
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!
|
|
207
|
+
function z(e) {
|
|
208
|
+
if (!Ae(e)) throw new TypeError("Expected a service key created by defineService()");
|
|
277
209
|
}
|
|
278
|
-
function
|
|
279
|
-
if (e == null || typeof e != "object" && typeof e != "function" || !
|
|
210
|
+
function Pe(e) {
|
|
211
|
+
if (e == null || typeof e != "object" && typeof e != "function" || !te.has(e))
|
|
280
212
|
throw new TypeError("Expected a service provider created by provideService()");
|
|
281
213
|
}
|
|
282
|
-
function
|
|
214
|
+
function Oe(e) {
|
|
283
215
|
if (e == null || typeof e != "object" && typeof e != "function") return null;
|
|
284
216
|
const t = Reflect.get(e, "dispose");
|
|
285
217
|
return typeof t == "function" ? t : null;
|
|
286
218
|
}
|
|
287
|
-
const
|
|
219
|
+
const _e = /* @__PURE__ */ new Set([
|
|
288
220
|
"annotation-xml",
|
|
289
221
|
"color-profile",
|
|
290
222
|
"font-face",
|
|
@@ -294,43 +226,34 @@ const je = /* @__PURE__ */ new Set([
|
|
|
294
226
|
"font-face-name",
|
|
295
227
|
"missing-glyph"
|
|
296
228
|
]);
|
|
297
|
-
class
|
|
298
|
-
constructor(t = {}, n =
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
a(this, "router");
|
|
304
|
-
a(this, "routedRoots", /* @__PURE__ */ new WeakSet());
|
|
229
|
+
class B {
|
|
230
|
+
constructor(t = {}, n = we()) {
|
|
231
|
+
l(this, "styleRegistry");
|
|
232
|
+
l(this, "services");
|
|
233
|
+
l(this, "router");
|
|
234
|
+
l(this, "routedRoots", /* @__PURE__ */ new WeakSet());
|
|
305
235
|
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
306
236
|
throw new TypeError("FrayRuntime options must be an object");
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
const i = r.prefix === void 0 ? "fray" : r.prefix;
|
|
311
|
-
i !== null && P(i, "Fray element prefix");
|
|
312
|
-
const s = r.overrides ?? {};
|
|
313
|
-
if (s == null || typeof s != "object" || Array.isArray(s))
|
|
314
|
-
throw new TypeError("Fray element-name overrides must be an object");
|
|
315
|
-
for (const [o, c] of Object.entries(s))
|
|
316
|
-
P(o, "Fray component host name"), Z(c);
|
|
317
|
-
if (this.elementPrefix = i, this.elementNameOverrides = Object.freeze({ ...s }), this.styleRegistry = n, this.services = t.services ?? ve(), !(this.services instanceof te))
|
|
237
|
+
if (Object.hasOwn(t, "elementNames"))
|
|
238
|
+
throw new TypeError("FrayRuntime no longer supports configurable element names");
|
|
239
|
+
if (this.styleRegistry = n, this.services = t.services ?? je(), !(this.services instanceof ne))
|
|
318
240
|
throw new TypeError("Fray services must be a ServiceScope");
|
|
319
241
|
if (this.router = t.router ?? null, this.router != null && (typeof this.router != "object" || typeof this.router.openScope != "function" || typeof this.router.completeScope != "function"))
|
|
320
242
|
throw new TypeError("Fray router must be a BrowserRouter");
|
|
321
243
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
244
|
+
/** Resolve a fixed one-hyphen public host name for a built-in component. */
|
|
245
|
+
resolveElementName(t) {
|
|
246
|
+
re(t, "Fray component host name");
|
|
247
|
+
const n = `fray-${t.replaceAll("-", "")}`;
|
|
248
|
+
return Fe(n), n;
|
|
326
249
|
}
|
|
327
|
-
resolveHostSelector(t, n
|
|
250
|
+
resolveHostSelector(t, n) {
|
|
328
251
|
if (typeof t != "string") throw new TypeError("Host selector must be a string");
|
|
329
|
-
return t.replaceAll("&", this.resolveElementName(n
|
|
252
|
+
return t.replaceAll("&", this.resolveElementName(n));
|
|
330
253
|
}
|
|
331
|
-
resolveHostCSS(t, n
|
|
254
|
+
resolveHostCSS(t, n) {
|
|
332
255
|
if (typeof t != "string") throw new TypeError("Host CSS must be a string");
|
|
333
|
-
return t.replaceAll("&", this.resolveElementName(n
|
|
256
|
+
return t.replaceAll("&", this.resolveElementName(n));
|
|
334
257
|
}
|
|
335
258
|
create(t, ...n) {
|
|
336
259
|
const r = new t(...n);
|
|
@@ -356,19 +279,19 @@ class L {
|
|
|
356
279
|
return this.styleRegistry.injectAll(t);
|
|
357
280
|
}
|
|
358
281
|
}
|
|
359
|
-
function
|
|
360
|
-
return new
|
|
282
|
+
function nt(e = {}) {
|
|
283
|
+
return new B(e);
|
|
361
284
|
}
|
|
362
|
-
const
|
|
363
|
-
function
|
|
285
|
+
const K = new B({}, Se);
|
|
286
|
+
function re(e, t) {
|
|
364
287
|
if (typeof e != "string" || !/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(e))
|
|
365
288
|
throw new TypeError(`${t} must be a lowercase kebab-case name`);
|
|
366
289
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
290
|
+
function Fe(e) {
|
|
291
|
+
if (re(e, "Fray element name"), !e.includes("-") || _e.has(e))
|
|
369
292
|
throw new TypeError(`Fray element name must be a non-reserved name containing a hyphen: ${e}`);
|
|
370
293
|
}
|
|
371
|
-
const
|
|
294
|
+
const P = Symbol.for("@sylwellsoftware/fray.Fragment"), ie = /* @__PURE__ */ new WeakSet(), Ne = /* @__PURE__ */ new Set([
|
|
372
295
|
"allowFullScreen",
|
|
373
296
|
"async",
|
|
374
297
|
"autoFocus",
|
|
@@ -392,7 +315,7 @@ const A = Symbol.for("@sylwellsoftware/fray.Fragment"), ne = /* @__PURE__ */ new
|
|
|
392
315
|
"required",
|
|
393
316
|
"reversed",
|
|
394
317
|
"selected"
|
|
395
|
-
]),
|
|
318
|
+
]), $e = /* @__PURE__ */ new Set([
|
|
396
319
|
"checked",
|
|
397
320
|
"defaultChecked",
|
|
398
321
|
"defaultValue",
|
|
@@ -406,11 +329,11 @@ const A = Symbol.for("@sylwellsoftware/fray.Fragment"), ne = /* @__PURE__ */ new
|
|
|
406
329
|
"selectedIndex",
|
|
407
330
|
"tabIndex",
|
|
408
331
|
"value"
|
|
409
|
-
]);
|
|
410
|
-
function
|
|
411
|
-
|
|
332
|
+
]), U = "data-fray";
|
|
333
|
+
function rt(e) {
|
|
334
|
+
H(e, "live");
|
|
412
335
|
const t = Object.freeze({ emitter: e });
|
|
413
|
-
return
|
|
336
|
+
return ie.add(t), t;
|
|
414
337
|
}
|
|
415
338
|
function O(e, t = null, ...n) {
|
|
416
339
|
const r = t ?? {};
|
|
@@ -426,36 +349,38 @@ function O(e, t = null, ...n) {
|
|
|
426
349
|
key: s,
|
|
427
350
|
props: {
|
|
428
351
|
...o,
|
|
429
|
-
children:
|
|
352
|
+
children: se([i, n])
|
|
430
353
|
}
|
|
431
354
|
};
|
|
432
355
|
}
|
|
433
|
-
function
|
|
356
|
+
function ke(e, ...t) {
|
|
434
357
|
return e.reduce((n, r, i) => n + r + String(t[i] ?? ""), "");
|
|
435
358
|
}
|
|
436
|
-
const
|
|
359
|
+
const m = class m {
|
|
437
360
|
constructor(t = {}) {
|
|
438
|
-
|
|
439
|
-
|
|
361
|
+
l(this, "props");
|
|
362
|
+
l(this, "dom", null);
|
|
440
363
|
/** @internal */
|
|
441
|
-
|
|
364
|
+
l(this, "_rendered", null);
|
|
442
365
|
/** @internal */
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
366
|
+
l(this, "_childComponents", /* @__PURE__ */ new Set());
|
|
367
|
+
/** @internal Component ancestry used to enforce structural invariants. */
|
|
368
|
+
l(this, "_parentComponent", null);
|
|
369
|
+
l(this, "initialized", !1);
|
|
370
|
+
l(this, "mounted", !1);
|
|
371
|
+
l(this, "destroyed", !1);
|
|
372
|
+
l(this, "updating", !1);
|
|
373
|
+
l(this, "updateRequested", !1);
|
|
374
|
+
l(this, "cleanupFunctions", /* @__PURE__ */ new Set());
|
|
375
|
+
l(this, "watched", /* @__PURE__ */ new Map());
|
|
376
|
+
l(this, "renderReadSubscriptions", /* @__PURE__ */ new Map());
|
|
377
|
+
l(this, "collectingRenderReads", null);
|
|
453
378
|
/** @internal */
|
|
454
|
-
|
|
379
|
+
l(this, "_runtime", K);
|
|
455
380
|
/** @internal Route lineage inherited by nested routed components. */
|
|
456
|
-
|
|
381
|
+
l(this, "_routeContext", null);
|
|
457
382
|
/** JSX component for this instance's runtime-configured custom host. */
|
|
458
|
-
|
|
383
|
+
l(this, "Host", ({
|
|
459
384
|
children: t = [],
|
|
460
385
|
...n
|
|
461
386
|
}) => this.host(n, t));
|
|
@@ -465,23 +390,23 @@ const d = class d {
|
|
|
465
390
|
}
|
|
466
391
|
static new(...t) {
|
|
467
392
|
const n = new this(...t);
|
|
468
|
-
if (!(n instanceof
|
|
393
|
+
if (!(n instanceof m))
|
|
469
394
|
throw new TypeError("Component.new() requires a Component constructor");
|
|
470
395
|
return n.mount();
|
|
471
396
|
}
|
|
472
|
-
static
|
|
473
|
-
return {};
|
|
474
|
-
}
|
|
475
|
-
static registerStyles(t = W, n = /* @__PURE__ */ new Set()) {
|
|
397
|
+
static registerStyles(t = K, n = /* @__PURE__ */ new Set()) {
|
|
476
398
|
if (n.has(this)) return;
|
|
477
399
|
n.add(this);
|
|
478
|
-
const r = this.hostName ?? null, i = this
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
400
|
+
const r = this.hostName ?? null, i = Je(this);
|
|
401
|
+
for (const s of i)
|
|
402
|
+
Object.hasOwn(s, "css") && s.css && (r == null ? t.styleRegistry.registerCSS(s.css) : t.styleRegistry.registerHostCSS(
|
|
403
|
+
s.css,
|
|
404
|
+
t.resolveElementName(r)
|
|
405
|
+
));
|
|
406
|
+
for (const s of i)
|
|
407
|
+
if (Object.hasOwn(s, "dependencies"))
|
|
408
|
+
for (const o of s.dependencies ?? [])
|
|
409
|
+
o.registerStyles(t, n);
|
|
485
410
|
}
|
|
486
411
|
/** One-time setup hook. Constructors must not subscribe or render. */
|
|
487
412
|
initialize() {
|
|
@@ -491,21 +416,24 @@ const d = class d {
|
|
|
491
416
|
}
|
|
492
417
|
/** Render this component's configured custom host element. */
|
|
493
418
|
host(t = null, ...n) {
|
|
494
|
-
const
|
|
419
|
+
const i = this.constructor.hostName;
|
|
495
420
|
if (i == null)
|
|
496
421
|
throw new Error(`${this.constructor.name} does not declare a custom host name`);
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
422
|
+
const {
|
|
423
|
+
class: s,
|
|
424
|
+
className: o,
|
|
425
|
+
...a
|
|
426
|
+
} = t ?? {}, c = o ?? s, u = this.props.island === !0 ? Qe(c, "island") : c;
|
|
427
|
+
return O(this._runtime.resolveElementName(i), {
|
|
428
|
+
...a,
|
|
429
|
+
...u == null ? {} : { className: u },
|
|
502
430
|
"data-fray-component": i
|
|
503
431
|
}, ...n);
|
|
504
432
|
}
|
|
505
433
|
/** @internal Assign an immutable application runtime before initialization or mounting. */
|
|
506
434
|
_setRuntime(t) {
|
|
507
435
|
var n;
|
|
508
|
-
if (!(t instanceof
|
|
436
|
+
if (!(t instanceof B))
|
|
509
437
|
throw new TypeError("Component runtime must be a FrayRuntime");
|
|
510
438
|
if (t === this._runtime) return this;
|
|
511
439
|
if (this.initialized || this.mounted || this._rendered != null)
|
|
@@ -522,10 +450,17 @@ const d = class d {
|
|
|
522
450
|
_routeContextForChildren() {
|
|
523
451
|
return this._routeContext;
|
|
524
452
|
}
|
|
453
|
+
/** @internal Assign the renderer-owned component ancestry. */
|
|
454
|
+
_setParentComponent(t) {
|
|
455
|
+
if (this._parentComponent != null && this._parentComponent !== t)
|
|
456
|
+
throw new Error("A component instance cannot move between component owners");
|
|
457
|
+
return this._parentComponent = t, this.validateIslandAncestry(this.props), this;
|
|
458
|
+
}
|
|
525
459
|
mount(t = null, n = null) {
|
|
526
460
|
if (this.destroyed) throw new Error("Cannot mount a destroyed component");
|
|
461
|
+
this.validateIslandAncestry(this.props);
|
|
527
462
|
let r = !1;
|
|
528
|
-
return this.initialized || (this.validateRequiredServices(), this.initialized = !0, this.initialize()), this.mounted || (this.mounted = !0, this.update(), r = !0), t != null && (
|
|
463
|
+
return this.initialized || (this.validateRequiredServices(), this.initialized = !0, this.initialize()), this.mounted || (this.mounted = !0, this.update(), r = !0), t != null && (Ge(t), V(t, this._rendered, n)), r && this.afterMount(this.dom), this;
|
|
529
464
|
}
|
|
530
465
|
attachTo(t) {
|
|
531
466
|
return this.mount(t), this;
|
|
@@ -547,7 +482,7 @@ const d = class d {
|
|
|
547
482
|
} finally {
|
|
548
483
|
this.collectingRenderReads = null;
|
|
549
484
|
}
|
|
550
|
-
this._rendered = M(this._rendered, r, this), this.dom =
|
|
485
|
+
this._rendered = M(this._rendered, r, this), this.dom = ue(this._rendered), this.reconcileRenderReads(n), this.afterUpdate(this.dom);
|
|
551
486
|
} while (this.updateRequested && !this.destroyed);
|
|
552
487
|
} finally {
|
|
553
488
|
this.updating = !1;
|
|
@@ -557,7 +492,7 @@ const d = class d {
|
|
|
557
492
|
setProps(t) {
|
|
558
493
|
if (t == null || typeof t != "object" || Array.isArray(t))
|
|
559
494
|
throw new TypeError(`${this.constructor.name} props must be an object`);
|
|
560
|
-
return this.props = t, this.mounted && this.update(), this;
|
|
495
|
+
return this.validateIslandAncestry(t), this.props = t, this.mounted && this.update(), this;
|
|
561
496
|
}
|
|
562
497
|
afterMount(t) {
|
|
563
498
|
}
|
|
@@ -621,7 +556,7 @@ const d = class d {
|
|
|
621
556
|
return t.addEventListener(n, s, i), this.onCleanup(() => t.removeEventListener(n, s, i)), this;
|
|
622
557
|
}
|
|
623
558
|
registerChild(t) {
|
|
624
|
-
if (!(t instanceof
|
|
559
|
+
if (!(t instanceof m))
|
|
625
560
|
throw new TypeError("registerChild requires a Component");
|
|
626
561
|
return this._childComponents.add(t), t;
|
|
627
562
|
}
|
|
@@ -640,10 +575,26 @@ const d = class d {
|
|
|
640
575
|
if (!this._runtime.services.has(n))
|
|
641
576
|
throw new Error(`${t.name} requires unregistered service "${n.name}"`);
|
|
642
577
|
}
|
|
578
|
+
validateIslandAncestry(t) {
|
|
579
|
+
if (!k(t)) return;
|
|
580
|
+
if (this.hasIslandDescendant())
|
|
581
|
+
throw new Error("An island component cannot contain another island");
|
|
582
|
+
let n = this._parentComponent;
|
|
583
|
+
for (; n != null; ) {
|
|
584
|
+
if (k(n.props))
|
|
585
|
+
throw new Error("An island component cannot be nested inside another island");
|
|
586
|
+
n = n._parentComponent;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
hasIslandDescendant() {
|
|
590
|
+
for (const t of this._childComponents)
|
|
591
|
+
if (k(t.props) || t.hasIslandDescendant()) return !0;
|
|
592
|
+
return !1;
|
|
593
|
+
}
|
|
643
594
|
onDestroy() {
|
|
644
595
|
}
|
|
645
596
|
trackRenderRead(t) {
|
|
646
|
-
if (
|
|
597
|
+
if (H(t, "Component.read"), this.collectingRenderReads == null)
|
|
647
598
|
throw new Error("Component.read() and snapshot() may only be called during render()");
|
|
648
599
|
this.collectingRenderReads.add(t);
|
|
649
600
|
}
|
|
@@ -659,12 +610,57 @@ const d = class d {
|
|
|
659
610
|
}
|
|
660
611
|
}
|
|
661
612
|
};
|
|
662
|
-
|
|
663
|
-
|
|
613
|
+
l(m, "dependencies", []), l(m, "requiredServices", []), /** Component `live()` bindings are opt-in; subclasses declare their allowlist. */
|
|
614
|
+
l(m, "liveProps", []), l(m, "css", ke`
|
|
615
|
+
.fray-fill-horizontal,
|
|
616
|
+
.fray-fill-vertical {
|
|
617
|
+
box-sizing: border-box;
|
|
618
|
+
background: var(--application-background);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.fray-fill-horizontal {
|
|
622
|
+
width: 100vw;
|
|
623
|
+
max-width: 100vw;
|
|
624
|
+
min-width: 0;
|
|
625
|
+
overflow-x: auto;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.fray-fill-vertical {
|
|
629
|
+
height: 100vh;
|
|
630
|
+
max-height: 100vh;
|
|
631
|
+
min-height: 0;
|
|
632
|
+
overflow-y: auto;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.island {
|
|
636
|
+
box-sizing: border-box;
|
|
637
|
+
min-width: 0;
|
|
638
|
+
min-height: 0;
|
|
639
|
+
margin: var(--island-margin);
|
|
640
|
+
padding: var(--island-padding);
|
|
641
|
+
background: var(--island-background);
|
|
642
|
+
border: var(--island-border);
|
|
643
|
+
border-radius: var(--island-radius);
|
|
644
|
+
box-shadow: var(--island-shadow);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.fray-fill-horizontal.island,
|
|
648
|
+
.fray-fill-horizontal .island {
|
|
649
|
+
max-width: calc(100% - (2 * var(--island-margin)));
|
|
650
|
+
overflow-x: auto;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.fray-fill-vertical.island,
|
|
654
|
+
.fray-fill-vertical .island {
|
|
655
|
+
max-height: calc(100% - (2 * var(--island-margin)));
|
|
656
|
+
overflow-y: auto;
|
|
657
|
+
}
|
|
658
|
+
`), l(m, "hostName", null);
|
|
659
|
+
let d = m;
|
|
664
660
|
function R(e) {
|
|
665
|
-
return Array.isArray(e) ? O(
|
|
661
|
+
return Array.isArray(e) ? O(P, null, e) : e == null || typeof e == "boolean" ? O(P) : e;
|
|
666
662
|
}
|
|
667
|
-
function
|
|
663
|
+
function se(e) {
|
|
668
664
|
const t = [], n = (r) => {
|
|
669
665
|
if (Array.isArray(r))
|
|
670
666
|
for (const i of r) n(i);
|
|
@@ -672,7 +668,7 @@ function re(e) {
|
|
|
672
668
|
};
|
|
673
669
|
return n(e), t;
|
|
674
670
|
}
|
|
675
|
-
function
|
|
671
|
+
function T(e, t) {
|
|
676
672
|
if (typeof e == "string" || typeof e == "number")
|
|
677
673
|
return {
|
|
678
674
|
kind: "text",
|
|
@@ -681,14 +677,14 @@ function C(e, t) {
|
|
|
681
677
|
node: document.createTextNode(String(e)),
|
|
682
678
|
owner: t
|
|
683
679
|
};
|
|
684
|
-
if (
|
|
685
|
-
const s = document.createComment("fray-emitter-start"), o = document.createComment("fray-emitter-end"),
|
|
686
|
-
if (Object.is(
|
|
680
|
+
if (N(e)) {
|
|
681
|
+
const s = document.createComment("fray-emitter-start"), o = document.createComment("fray-emitter-end"), a = e.get();
|
|
682
|
+
if (Object.is(a, e))
|
|
687
683
|
throw new TypeError("A Fray emitter child cannot render itself");
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
const u =
|
|
691
|
-
|
|
684
|
+
const c = document.createDocumentFragment();
|
|
685
|
+
c.append(s, o);
|
|
686
|
+
const u = T(R(a), t);
|
|
687
|
+
V(c, u, o);
|
|
692
688
|
const p = {
|
|
693
689
|
kind: "emitter",
|
|
694
690
|
key: null,
|
|
@@ -706,10 +702,10 @@ function C(e, t) {
|
|
|
706
702
|
p.child = M(p.child, R(b), t);
|
|
707
703
|
}, { emitCurrent: !1 }), p;
|
|
708
704
|
}
|
|
709
|
-
if (e instanceof
|
|
710
|
-
return e._setRuntime(t._runtime), e._setRouteContext(t._routeContextForChildren()), e.mount(), t.registerChild(e), {
|
|
705
|
+
if (e instanceof d)
|
|
706
|
+
return e._setRuntime(t._runtime), e._setRouteContext(t._routeContextForChildren()), e._setParentComponent(t), e.mount(), t.registerChild(e), {
|
|
711
707
|
kind: "component",
|
|
712
|
-
key:
|
|
708
|
+
key: fe(e.props),
|
|
713
709
|
type: e.constructor,
|
|
714
710
|
instance: e,
|
|
715
711
|
prebuilt: !0,
|
|
@@ -718,10 +714,10 @@ function C(e, t) {
|
|
|
718
714
|
owner: t
|
|
719
715
|
};
|
|
720
716
|
if (!y(e))
|
|
721
|
-
throw new TypeError(`Invalid Fray child: ${
|
|
717
|
+
throw new TypeError(`Invalid Fray child: ${Y(e)}`);
|
|
722
718
|
const { type: n, key: r = null, props: i } = e;
|
|
723
|
-
if (n ===
|
|
724
|
-
const s = document.createComment("fray-fragment-start"), o = document.createComment("fray-fragment-end"),
|
|
719
|
+
if (n === P) {
|
|
720
|
+
const s = document.createComment("fray-fragment-start"), o = document.createComment("fray-fragment-end"), a = {
|
|
725
721
|
kind: "fragment",
|
|
726
722
|
key: r,
|
|
727
723
|
type: n,
|
|
@@ -729,15 +725,15 @@ function C(e, t) {
|
|
|
729
725
|
end: o,
|
|
730
726
|
children: [],
|
|
731
727
|
owner: t
|
|
732
|
-
},
|
|
733
|
-
return
|
|
734
|
-
|
|
728
|
+
}, c = document.createDocumentFragment();
|
|
729
|
+
return c.append(s, o), a.children = _(
|
|
730
|
+
c,
|
|
735
731
|
[],
|
|
736
732
|
i.children,
|
|
737
733
|
t,
|
|
738
734
|
o,
|
|
739
735
|
s
|
|
740
|
-
),
|
|
736
|
+
), a;
|
|
741
737
|
}
|
|
742
738
|
if (typeof n == "string") {
|
|
743
739
|
const s = document.createElement(n), o = {
|
|
@@ -753,94 +749,108 @@ function C(e, t) {
|
|
|
753
749
|
children: [],
|
|
754
750
|
owner: t
|
|
755
751
|
};
|
|
756
|
-
return
|
|
757
|
-
}
|
|
758
|
-
if (
|
|
759
|
-
const s = i
|
|
760
|
-
|
|
761
|
-
const
|
|
752
|
+
return ce(o, i), o.children = _(s, [], i.children, t), o;
|
|
753
|
+
}
|
|
754
|
+
if (he(n)) {
|
|
755
|
+
const s = i;
|
|
756
|
+
le(n, s);
|
|
757
|
+
const o = W(s), a = new n(o);
|
|
758
|
+
a._setRuntime(t._runtime), a._setRouteContext(t._routeContextForChildren()), a._setParentComponent(t);
|
|
759
|
+
const c = {
|
|
762
760
|
kind: "component",
|
|
763
761
|
key: r,
|
|
764
762
|
type: n,
|
|
765
|
-
instance:
|
|
763
|
+
instance: a,
|
|
766
764
|
prebuilt: !1,
|
|
767
765
|
props: o,
|
|
768
766
|
liveProps: /* @__PURE__ */ new Map(),
|
|
769
767
|
owner: t
|
|
770
768
|
};
|
|
771
|
-
return
|
|
769
|
+
return ae(c, s), a.mount(), t.registerChild(a), c;
|
|
772
770
|
}
|
|
773
771
|
if (typeof n == "function") {
|
|
774
|
-
const s = n, o = i,
|
|
772
|
+
const s = n, o = i, a = W(o), c = R(s(a)), u = {
|
|
775
773
|
kind: "function",
|
|
776
774
|
key: r,
|
|
777
775
|
type: s,
|
|
778
|
-
props:
|
|
776
|
+
props: a,
|
|
779
777
|
sourceProps: o,
|
|
780
778
|
liveProps: /* @__PURE__ */ new Map(),
|
|
781
|
-
child:
|
|
779
|
+
child: T(c, t),
|
|
782
780
|
owner: t
|
|
783
781
|
};
|
|
784
|
-
return
|
|
782
|
+
return Le(u), u;
|
|
785
783
|
}
|
|
786
|
-
throw new TypeError(`Unsupported vnode type: ${
|
|
784
|
+
throw new TypeError(`Unsupported vnode type: ${Y(n)}`);
|
|
787
785
|
}
|
|
788
786
|
function M(e, t, n) {
|
|
789
|
-
if (e == null) return
|
|
790
|
-
if (
|
|
791
|
-
const r =
|
|
792
|
-
return s &&
|
|
787
|
+
if (e == null) return T(t, n);
|
|
788
|
+
if (pe(e, t)) return oe(e, t, n);
|
|
789
|
+
const r = T(t, n), i = ue(e), s = (i == null ? void 0 : i.parentNode) ?? null;
|
|
790
|
+
return s && V(s, r, i), g(e, !0), r;
|
|
793
791
|
}
|
|
794
|
-
function
|
|
795
|
-
return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!
|
|
792
|
+
function oe(e, t, n) {
|
|
793
|
+
return e.kind === "text" ? (typeof t != "string" && typeof t != "number" || Object.is(e.value, t) || (e.value = t, e.node.data = String(t)), e) : e.kind === "emitter" ? (!N(t) || e.source !== t, e) : e.kind === "component" ? (t instanceof d || y(t) && ze(e, t.props), e) : y(t) ? e.kind === "function" ? (qe(e, t.props), e) : e.kind === "fragment" ? (e.children = _(
|
|
796
794
|
e.start.parentNode,
|
|
797
795
|
e.children,
|
|
798
796
|
t.props.children,
|
|
799
797
|
n,
|
|
800
798
|
e.end,
|
|
801
799
|
e.start
|
|
802
|
-
), e) : (
|
|
800
|
+
), e) : (ce(e, t.props), e.children = _(
|
|
803
801
|
e.node,
|
|
804
802
|
e.children,
|
|
805
803
|
t.props.children,
|
|
806
804
|
n
|
|
807
805
|
), e) : e;
|
|
808
806
|
}
|
|
809
|
-
function
|
|
807
|
+
function W(e) {
|
|
810
808
|
return Object.fromEntries(Object.entries(e).map(([t, n]) => [
|
|
811
809
|
t,
|
|
812
|
-
|
|
810
|
+
v(n) ? n.emitter.get() : n
|
|
813
811
|
]));
|
|
814
812
|
}
|
|
815
|
-
function
|
|
816
|
-
|
|
813
|
+
function ae(e, t) {
|
|
814
|
+
x(e.liveProps, t, (n, r) => {
|
|
817
815
|
e.props = { ...e.props, [n]: r }, e.instance.setProps(e.props);
|
|
818
|
-
}), e.props =
|
|
816
|
+
}), e.props = I(e.liveProps, t), e.instance.setProps(e.props);
|
|
819
817
|
}
|
|
820
|
-
function
|
|
821
|
-
|
|
818
|
+
function ze(e, t) {
|
|
819
|
+
le(e.type, t), ae(e, t);
|
|
822
820
|
}
|
|
823
|
-
function
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
821
|
+
function le(e, t) {
|
|
822
|
+
const n = Reflect.get(e, "liveProps");
|
|
823
|
+
if (n == null) return;
|
|
824
|
+
if (!Array.isArray(n) || n.some((i) => typeof i != "string"))
|
|
825
|
+
throw new TypeError(`${e.name || "Component"}.liveProps must be an array`);
|
|
826
|
+
const r = new Set(n);
|
|
827
|
+
for (const [i, s] of Object.entries(t))
|
|
828
|
+
if (v(s) && !r.has(i))
|
|
829
|
+
throw new TypeError(
|
|
830
|
+
`${e.name || "Component"} prop "${i}" does not support live()`
|
|
831
|
+
);
|
|
827
832
|
}
|
|
828
|
-
function
|
|
829
|
-
e.
|
|
830
|
-
e.props = { ...e.props, [
|
|
831
|
-
}), e.props =
|
|
833
|
+
function Le(e) {
|
|
834
|
+
x(e.liveProps, e.sourceProps, (t, n) => {
|
|
835
|
+
e.props = { ...e.props, [t]: n }, L(e);
|
|
836
|
+
}), e.props = I(e.liveProps, e.sourceProps);
|
|
832
837
|
}
|
|
833
|
-
function
|
|
838
|
+
function qe(e, t) {
|
|
839
|
+
e.sourceProps = t, x(e.liveProps, t, (n, r) => {
|
|
840
|
+
e.props = { ...e.props, [n]: r }, L(e);
|
|
841
|
+
}), e.props = I(e.liveProps, t), L(e);
|
|
842
|
+
}
|
|
843
|
+
function L(e) {
|
|
834
844
|
const t = R(e.type(e.props));
|
|
835
845
|
e.child = M(e.child, t, e.owner);
|
|
836
846
|
}
|
|
837
|
-
function
|
|
847
|
+
function x(e, t, n) {
|
|
838
848
|
for (const [r, i] of e) {
|
|
839
849
|
const s = t[r];
|
|
840
|
-
|
|
850
|
+
v(s) && s.emitter === i.source || (i.unsubscribe(), e.delete(r));
|
|
841
851
|
}
|
|
842
852
|
for (const [r, i] of Object.entries(t)) {
|
|
843
|
-
if (!
|
|
853
|
+
if (!v(i) || e.has(r)) continue;
|
|
844
854
|
const s = {
|
|
845
855
|
source: i.emitter,
|
|
846
856
|
value: i.emitter.get(),
|
|
@@ -852,64 +862,66 @@ function q(e, t, n) {
|
|
|
852
862
|
}, { emitCurrent: !1 }), e.set(r, s);
|
|
853
863
|
}
|
|
854
864
|
}
|
|
855
|
-
function
|
|
865
|
+
function I(e, t) {
|
|
856
866
|
return Object.fromEntries(Object.entries(t).map(([n, r]) => {
|
|
857
867
|
var i;
|
|
858
868
|
return [
|
|
859
869
|
n,
|
|
860
|
-
|
|
870
|
+
v(r) ? ((i = e.get(n)) == null ? void 0 : i.value) ?? r.emitter.get() : r
|
|
861
871
|
];
|
|
862
872
|
}));
|
|
863
873
|
}
|
|
864
|
-
function
|
|
874
|
+
function _(e, t, n, r, i = null, s = null) {
|
|
865
875
|
if (e == null) throw new Error("Cannot patch a detached fragment range");
|
|
866
|
-
const o =
|
|
876
|
+
const o = se(n), a = /* @__PURE__ */ new Map(), c = [];
|
|
867
877
|
for (const f of t)
|
|
868
|
-
f.key == null ?
|
|
878
|
+
f.key == null ? c.push(f) : a.has(f.key) || a.set(f.key, f);
|
|
869
879
|
const u = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set(), b = [];
|
|
870
|
-
let
|
|
880
|
+
let me = 0;
|
|
871
881
|
for (const f of o) {
|
|
872
|
-
const h =
|
|
882
|
+
const h = C(f);
|
|
873
883
|
if (h != null) {
|
|
874
884
|
if (u.has(h)) throw new Error(`Duplicate sibling key: ${String(h)}`);
|
|
875
885
|
u.add(h);
|
|
876
886
|
}
|
|
877
|
-
const
|
|
878
|
-
|
|
887
|
+
const j = h == null ? c[me++] : a.get(h);
|
|
888
|
+
j && pe(j, f) ? (p.add(j), b.push(oe(j, f, r))) : b.push(T(f, r));
|
|
879
889
|
}
|
|
880
890
|
for (const f of t)
|
|
881
891
|
p.has(f) || g(f, !0);
|
|
882
|
-
let
|
|
892
|
+
let E = s ? s.nextSibling : e.firstChild;
|
|
883
893
|
for (const f of b)
|
|
884
894
|
for (const h of w(f))
|
|
885
|
-
h ===
|
|
895
|
+
h === E ? E = E.nextSibling : (e.insertBefore(h, E ?? i), E = h.nextSibling);
|
|
886
896
|
return b;
|
|
887
897
|
}
|
|
888
|
-
function
|
|
889
|
-
const
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
else if (
|
|
900
|
-
|
|
901
|
-
else if (
|
|
902
|
-
|
|
898
|
+
function ce(e, t) {
|
|
899
|
+
const n = Object.fromEntries(Object.entries(t).filter(
|
|
900
|
+
([s]) => s !== "children" && A(s) !== U
|
|
901
|
+
)), r = e.props, i = /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(n)]);
|
|
902
|
+
for (const s of ["value", "checked"])
|
|
903
|
+
if (Object.hasOwn(n, s) && Object.hasOwn(n, `bind:${s}`))
|
|
904
|
+
throw new Error(`${s} and bind:${s} cannot be used together`);
|
|
905
|
+
for (const s of i) {
|
|
906
|
+
const o = r[s], a = n[s];
|
|
907
|
+
if (Ue(s))
|
|
908
|
+
Me(e, s, a);
|
|
909
|
+
else if (s === "ref")
|
|
910
|
+
o !== a && Ie(e, a);
|
|
911
|
+
else if (Ke(s))
|
|
912
|
+
xe(e, s, a);
|
|
913
|
+
else if (v(a))
|
|
914
|
+
Be(e, s, a);
|
|
903
915
|
else {
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
const
|
|
907
|
-
Object.is(
|
|
916
|
+
const c = e.liveProps.get(s);
|
|
917
|
+
c && (c.unsubscribe(), e.liveProps.delete(s));
|
|
918
|
+
const u = (c == null ? void 0 : c.value) ?? o;
|
|
919
|
+
Object.is(u, a) || S(e.node, s, u, a);
|
|
908
920
|
}
|
|
909
921
|
}
|
|
910
|
-
e.props = { ...
|
|
922
|
+
e.node.setAttribute(U, ""), e.props = { ...n };
|
|
911
923
|
}
|
|
912
|
-
function
|
|
924
|
+
function Be(e, t, n) {
|
|
913
925
|
const r = e.liveProps.get(t);
|
|
914
926
|
if ((r == null ? void 0 : r.source) === n.emitter) return;
|
|
915
927
|
r == null || r.unsubscribe();
|
|
@@ -922,36 +934,36 @@ function Fe(e, t, n) {
|
|
|
922
934
|
}
|
|
923
935
|
};
|
|
924
936
|
s.unsubscribe = n.emitter.subscribe(({ value: o }) => {
|
|
925
|
-
const
|
|
926
|
-
s.value = o, Object.is(
|
|
937
|
+
const a = s.value;
|
|
938
|
+
s.value = o, Object.is(a, o) || S(e.node, t, a, o);
|
|
927
939
|
}, { emitCurrent: !1 }), e.liveProps.set(t, s);
|
|
928
940
|
}
|
|
929
|
-
function
|
|
941
|
+
function Me(e, t, n) {
|
|
930
942
|
const r = t.slice(5), i = e.nativeBindings.get(t);
|
|
931
943
|
if (n == null) {
|
|
932
944
|
i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener), e.nativeBindings.delete(t), S(e.node, r, i.value, void 0));
|
|
933
945
|
return;
|
|
934
946
|
}
|
|
935
|
-
if (
|
|
936
|
-
i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener)),
|
|
937
|
-
const s =
|
|
947
|
+
if (We(n, t), (i == null ? void 0 : i.source) === n) return;
|
|
948
|
+
i && (i.unsubscribe(), e.node.removeEventListener(i.eventName, i.listener)), Ze(e.node, r);
|
|
949
|
+
const s = Ye(e.node, r), o = n.get();
|
|
938
950
|
S(e.node, r, i == null ? void 0 : i.value, o);
|
|
939
|
-
const
|
|
951
|
+
const a = () => {
|
|
940
952
|
n.set(Reflect.get(e.node, r), `${t} changed`);
|
|
941
|
-
},
|
|
953
|
+
}, c = {
|
|
942
954
|
source: n,
|
|
943
955
|
value: o,
|
|
944
956
|
eventName: s,
|
|
945
|
-
listener:
|
|
957
|
+
listener: a,
|
|
946
958
|
unsubscribe: () => {
|
|
947
959
|
}
|
|
948
960
|
};
|
|
949
|
-
|
|
950
|
-
const p =
|
|
951
|
-
|
|
952
|
-
}, { emitCurrent: !1 }), e.node.addEventListener(s,
|
|
961
|
+
c.unsubscribe = n.subscribe(({ value: u }) => {
|
|
962
|
+
const p = c.value;
|
|
963
|
+
c.value = u, Object.is(p, u) || S(e.node, r, p, u);
|
|
964
|
+
}, { emitCurrent: !1 }), e.node.addEventListener(s, a), e.nativeBindings.set(t, c);
|
|
953
965
|
}
|
|
954
|
-
function
|
|
966
|
+
function xe(e, t, n) {
|
|
955
967
|
const r = t.slice(2).toLowerCase(), i = e.listeners.get(t);
|
|
956
968
|
if (i && i !== n && (e.node.removeEventListener(r, i), e.listeners.delete(t)), n != null && typeof n != "function")
|
|
957
969
|
throw new TypeError(`${t} must be a function or null`);
|
|
@@ -960,51 +972,51 @@ function Ne(e, t, n) {
|
|
|
960
972
|
e.node.addEventListener(r, s), e.listeners.set(t, s);
|
|
961
973
|
}
|
|
962
974
|
}
|
|
963
|
-
function
|
|
964
|
-
if (
|
|
975
|
+
function Ie(e, t) {
|
|
976
|
+
if (q(e.ref, null), t != null && typeof t != "function" && typeof t != "object")
|
|
965
977
|
throw new TypeError("ref must be a function, object, or null");
|
|
966
|
-
e.ref = t,
|
|
978
|
+
e.ref = t, q(e.ref, e.node);
|
|
967
979
|
}
|
|
968
980
|
function S(e, t, n, r) {
|
|
969
981
|
if (t === "class" || t === "className") {
|
|
970
|
-
|
|
982
|
+
$(e, "class", r);
|
|
971
983
|
return;
|
|
972
984
|
}
|
|
973
985
|
if (t === "for" || t === "htmlFor") {
|
|
974
|
-
|
|
986
|
+
$(e, "for", r);
|
|
975
987
|
return;
|
|
976
988
|
}
|
|
977
989
|
if (t === "dataset") {
|
|
978
|
-
|
|
990
|
+
Ve(e, n, r);
|
|
979
991
|
return;
|
|
980
992
|
}
|
|
981
993
|
if (t === "style") {
|
|
982
|
-
|
|
994
|
+
He(e, n, r);
|
|
983
995
|
return;
|
|
984
996
|
}
|
|
985
997
|
if (t === "dangerouslySetInnerHTML")
|
|
986
998
|
throw new Error("dangerouslySetInnerHTML is not supported");
|
|
987
|
-
const i =
|
|
988
|
-
if (
|
|
999
|
+
const i = De(t);
|
|
1000
|
+
if (Ne.has(i)) {
|
|
989
1001
|
const s = !!r;
|
|
990
|
-
i in e && Reflect.set(e, i, s), e.toggleAttribute(
|
|
1002
|
+
i in e && Reflect.set(e, i, s), e.toggleAttribute(A(t), s);
|
|
991
1003
|
return;
|
|
992
1004
|
}
|
|
993
|
-
if (
|
|
1005
|
+
if ($e.has(i) && i in e) {
|
|
994
1006
|
const s = r ?? (i === "value" ? "" : !1);
|
|
995
|
-
Object.is(Reflect.get(e, i), s) || Reflect.set(e, i, s), r == null && e.removeAttribute(
|
|
1007
|
+
Object.is(Reflect.get(e, i), s) || Reflect.set(e, i, s), r == null && e.removeAttribute(A(t));
|
|
996
1008
|
return;
|
|
997
1009
|
}
|
|
998
|
-
|
|
1010
|
+
$(e, A(t), r);
|
|
999
1011
|
}
|
|
1000
|
-
function
|
|
1012
|
+
function Ve(e, t, n) {
|
|
1001
1013
|
const r = F(t, "dataset"), i = F(n, "dataset");
|
|
1002
1014
|
for (const s of /* @__PURE__ */ new Set([...Object.keys(r), ...Object.keys(i)])) {
|
|
1003
1015
|
const o = i[s];
|
|
1004
1016
|
o == null ? delete e.dataset[s] : e.dataset[s] = String(o);
|
|
1005
1017
|
}
|
|
1006
1018
|
}
|
|
1007
|
-
function
|
|
1019
|
+
function He(e, t, n) {
|
|
1008
1020
|
if (typeof n == "string") {
|
|
1009
1021
|
e.style.cssText = n;
|
|
1010
1022
|
return;
|
|
@@ -1022,19 +1034,19 @@ function F(e, t) {
|
|
|
1022
1034
|
throw new TypeError(`${t} must be an object or null`);
|
|
1023
1035
|
return e;
|
|
1024
1036
|
}
|
|
1025
|
-
function
|
|
1037
|
+
function $(e, t, n) {
|
|
1026
1038
|
n == null || n === !1 ? e.removeAttribute(t) : n === !0 ? e.setAttribute(t, "") : e.setAttribute(t, String(n));
|
|
1027
1039
|
}
|
|
1028
|
-
function
|
|
1040
|
+
function De(e) {
|
|
1029
1041
|
return e === "readonly" ? "readOnly" : e === "autofocus" ? "autoFocus" : e;
|
|
1030
1042
|
}
|
|
1031
|
-
function
|
|
1032
|
-
return e === "className" ? "class" : e === "htmlFor" ? "for" : /^aria[A-Z]/.test(e) || /^data[A-Z]/.test(e) ?
|
|
1043
|
+
function A(e) {
|
|
1044
|
+
return e === "className" ? "class" : e === "htmlFor" ? "for" : e === "minLength" ? "minlength" : e === "maxLength" ? "maxlength" : e === "autoComplete" ? "autocomplete" : e === "inputMode" ? "inputmode" : /^aria[A-Z]/.test(e) || /^data[A-Z]/.test(e) ? Z(e) : e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1033
1045
|
}
|
|
1034
|
-
function
|
|
1046
|
+
function Z(e) {
|
|
1035
1047
|
return e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`);
|
|
1036
1048
|
}
|
|
1037
|
-
function
|
|
1049
|
+
function q(e, t) {
|
|
1038
1050
|
e != null && (typeof e == "function" ? e(t) : e.current = t);
|
|
1039
1051
|
}
|
|
1040
1052
|
function g(e, t) {
|
|
@@ -1054,7 +1066,7 @@ function g(e, t) {
|
|
|
1054
1066
|
return;
|
|
1055
1067
|
}
|
|
1056
1068
|
if (e.kind === "element") {
|
|
1057
|
-
|
|
1069
|
+
q(e.ref, null);
|
|
1058
1070
|
for (const [n, r] of e.listeners)
|
|
1059
1071
|
e.node.removeEventListener(n.slice(2).toLowerCase(), r);
|
|
1060
1072
|
e.listeners.clear();
|
|
@@ -1075,7 +1087,7 @@ function g(e, t) {
|
|
|
1075
1087
|
}
|
|
1076
1088
|
t && e.node.remove();
|
|
1077
1089
|
}
|
|
1078
|
-
function
|
|
1090
|
+
function V(e, t, n = null) {
|
|
1079
1091
|
if (t != null)
|
|
1080
1092
|
for (const r of w(t)) e.insertBefore(r, n);
|
|
1081
1093
|
}
|
|
@@ -1090,110 +1102,107 @@ function w(e) {
|
|
|
1090
1102
|
n = n.nextSibling;
|
|
1091
1103
|
return t;
|
|
1092
1104
|
}
|
|
1093
|
-
function
|
|
1105
|
+
function ue(e) {
|
|
1094
1106
|
return w(e)[0] ?? null;
|
|
1095
1107
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return e instanceof
|
|
1108
|
+
function C(e) {
|
|
1109
|
+
return e instanceof d ? fe(e.props) : y(e) ? e.key : null;
|
|
1098
1110
|
}
|
|
1099
|
-
function
|
|
1111
|
+
function fe(e) {
|
|
1100
1112
|
const t = e.key;
|
|
1101
1113
|
return typeof t == "string" || typeof t == "number" ? t : null;
|
|
1102
1114
|
}
|
|
1103
|
-
function
|
|
1104
|
-
return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ?
|
|
1115
|
+
function pe(e, t) {
|
|
1116
|
+
return e.kind === "text" ? typeof t == "string" || typeof t == "number" : e.kind === "emitter" ? N(t) && e.source === t : e.kind === "component" ? t instanceof d ? e.instance === t : y(t) && he(t.type) && e.type === t.type && e.key === C(t) : e.kind === "function" ? y(t) && e.type === t.type && e.key === C(t) : e.kind === "fragment" ? y(t) && t.type === P && e.key === C(t) : y(t) && typeof t.type == "string" && e.type === t.type && e.key === C(t);
|
|
1105
1117
|
}
|
|
1106
1118
|
function y(e) {
|
|
1107
1119
|
return e != null && typeof e == "object" && Object.hasOwn(e, "type");
|
|
1108
1120
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return typeof e == "function" && (e ===
|
|
1121
|
+
function he(e) {
|
|
1122
|
+
return typeof e == "function" && (e === d || e.prototype instanceof d);
|
|
1111
1123
|
}
|
|
1112
|
-
function
|
|
1124
|
+
function Ke(e) {
|
|
1113
1125
|
return /^on[A-Z]/.test(e);
|
|
1114
1126
|
}
|
|
1115
|
-
function
|
|
1127
|
+
function Ue(e) {
|
|
1116
1128
|
return e === "bind:value" || e === "bind:checked";
|
|
1117
1129
|
}
|
|
1118
|
-
function
|
|
1119
|
-
return e != null && typeof e == "object" &&
|
|
1130
|
+
function v(e) {
|
|
1131
|
+
return e != null && typeof e == "object" && ie.has(e);
|
|
1120
1132
|
}
|
|
1121
|
-
function
|
|
1133
|
+
function N(e) {
|
|
1122
1134
|
return (typeof e != "object" || e == null) && typeof e != "function" ? !1 : typeof Reflect.get(e, "get") == "function" && typeof Reflect.get(e, "getFetchState") == "function" && typeof Reflect.get(e, "getError") == "function" && typeof Reflect.get(e, "subscribe") == "function";
|
|
1123
1135
|
}
|
|
1124
|
-
function
|
|
1125
|
-
if (!
|
|
1136
|
+
function H(e, t) {
|
|
1137
|
+
if (!N(e)) throw new TypeError(`${t} requires a readable emitter`);
|
|
1126
1138
|
}
|
|
1127
|
-
function
|
|
1128
|
-
if (
|
|
1139
|
+
function We(e, t) {
|
|
1140
|
+
if (H(e, t), typeof Reflect.get(e, "set") != "function")
|
|
1129
1141
|
throw new TypeError(`${t} requires a writable emitter`);
|
|
1130
1142
|
}
|
|
1131
|
-
function
|
|
1143
|
+
function Ze(e, t) {
|
|
1132
1144
|
const n = e.localName;
|
|
1133
1145
|
if (!(t === "checked" ? n === "input" : n === "input" || n === "textarea" || n === "select")) throw new TypeError(`bind:${t} is not supported on ${n}`);
|
|
1134
1146
|
}
|
|
1135
|
-
function
|
|
1147
|
+
function Ye(e, t) {
|
|
1136
1148
|
return t === "value" && e.localName !== "select" ? "input" : "change";
|
|
1137
1149
|
}
|
|
1138
|
-
function
|
|
1150
|
+
function Ge(e) {
|
|
1139
1151
|
if (e == null || typeof e != "object" && typeof e != "function" || typeof Reflect.get(e, "insertBefore") != "function")
|
|
1140
1152
|
throw new TypeError("Component parent must be a DOM ParentNode");
|
|
1141
1153
|
}
|
|
1142
|
-
function
|
|
1154
|
+
function Y(e) {
|
|
1143
1155
|
try {
|
|
1144
1156
|
return String(e);
|
|
1145
1157
|
} catch {
|
|
1146
1158
|
return Object.prototype.toString.call(e);
|
|
1147
1159
|
}
|
|
1148
1160
|
}
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1162
|
-
return
|
|
1163
|
-
t,
|
|
1164
|
-
n
|
|
1165
|
-
]);
|
|
1161
|
+
function Je(e) {
|
|
1162
|
+
const t = [];
|
|
1163
|
+
let n = e;
|
|
1164
|
+
for (; n != null && typeof n == "function" && (t.unshift(n), n !== d); )
|
|
1165
|
+
n = Object.getPrototypeOf(n);
|
|
1166
|
+
return t;
|
|
1167
|
+
}
|
|
1168
|
+
function Qe(...e) {
|
|
1169
|
+
return [...new Set(e.flatMap((t) => typeof t == "string" ? t.split(/\s+/) : []).filter(Boolean))].join(" ");
|
|
1170
|
+
}
|
|
1171
|
+
function k(e) {
|
|
1172
|
+
if (e.island === !0) return !0;
|
|
1173
|
+
const t = e.className ?? e.class;
|
|
1174
|
+
return typeof t == "string" && t.split(/\s+/).includes("island");
|
|
1166
1175
|
}
|
|
1167
|
-
function
|
|
1176
|
+
function de(e, t, n) {
|
|
1168
1177
|
const r = t == null ? {} : { ...t };
|
|
1169
1178
|
return n !== void 0 && (r.key = n), O(e, r);
|
|
1170
1179
|
}
|
|
1171
|
-
const
|
|
1172
|
-
function
|
|
1173
|
-
if (!(e instanceof
|
|
1180
|
+
const it = de, st = de;
|
|
1181
|
+
function ot(e) {
|
|
1182
|
+
if (!(e instanceof d))
|
|
1174
1183
|
throw new TypeError("createPrebuiltElement requires a Component instance");
|
|
1175
1184
|
return e;
|
|
1176
1185
|
}
|
|
1177
1186
|
export {
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1187
|
+
d as C,
|
|
1188
|
+
P as F,
|
|
1189
|
+
ne as S,
|
|
1190
|
+
it as a,
|
|
1191
|
+
B as b,
|
|
1192
|
+
ke as c,
|
|
1193
|
+
G as d,
|
|
1194
|
+
nt as e,
|
|
1195
|
+
je as f,
|
|
1196
|
+
we as g,
|
|
1188
1197
|
O as h,
|
|
1189
1198
|
y as i,
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1199
|
+
de as j,
|
|
1200
|
+
K as k,
|
|
1201
|
+
et as l,
|
|
1202
|
+
st as m,
|
|
1203
|
+
rt as n,
|
|
1204
|
+
ot as o,
|
|
1205
|
+
tt as p,
|
|
1206
|
+
Se as s
|
|
1198
1207
|
};
|
|
1199
|
-
//# sourceMappingURL=jsx-dev-runtime-
|
|
1208
|
+
//# sourceMappingURL=jsx-dev-runtime-CRDpvXOH.js.map
|