@mt-gloss/ui 0.1.137 → 0.1.138
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/{COMMITS-B7dc_-m8.js → COMMITS-aGwevMtR.js} +254 -186
- package/{Expandable-DA4NFzCR.js → Expandable-G7SCUlMb.js} +740 -738
- package/catalog.js +2 -2
- package/composites-panels.js +786 -668
- package/index.js +804 -852
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +9 -4
- package/lib/composites/panels/index.d.ts +0 -2
- package/lib/composites/panels/shells/SettingsShell.d.ts +14 -16
- package/lib/composites/panels/shells/index.d.ts +0 -2
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +13 -0
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +1 -6
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +10 -0
- package/lib/composites/panels/shells/settings/index.d.ts +4 -6
- package/lib/composites/panels/stage3d/CloneStage.d.ts +11 -1
- package/lib/facade/index.d.ts +0 -2
- package/lib/presets/PresetMenu/PresetMenu.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
- package/lib/composites/panels/shells/MetricInfoShell.d.ts +0 -29
- package/lib/composites/panels/shells/settings/GhostSlotPill.d.ts +0 -7
package/composites-panels.js
CHANGED
|
@@ -1,31 +1,153 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as a, jsxs as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { u as O, g as ke, m as be, n as K, l as De, S as Le, e as Me, o as Oe } from "./COMMITS-aGwevMtR.js";
|
|
2
|
+
import { C as en, N as tn, w as nn, x as an, q as sn, f as rn, v as on, P as ln, t as cn, k as dn, j as un, i as pn, h as mn } from "./COMMITS-aGwevMtR.js";
|
|
3
|
+
import { jsx as a, jsxs as f, Fragment as q } from "react/jsx-runtime";
|
|
4
|
+
import * as H from "react";
|
|
5
|
+
import R, { useState as A, useRef as Q, createContext as ye, useContext as ve, useMemo as ce, useEffect as z, useCallback as M, useLayoutEffect as Ie } from "react";
|
|
6
|
+
import { SPIN_COMMIT_REDUCED as Re, SPIN_COMMIT_FULL as $e } from "@mt-gloss/motion";
|
|
7
|
+
import { useMotionValue as de, animate as B, motion as Fe } from "framer-motion";
|
|
8
|
+
import { useSensors as Ue, useSensor as ue, PointerSensor as ze, KeyboardSensor as He, DndContext as Be, closestCenter as Ye } from "@dnd-kit/core";
|
|
9
|
+
import { sortableKeyboardCoordinates as Ve, SortableContext as Ke, horizontalListSortingStrategy as qe, arrayMove as Qe, useSortable as We } from "@dnd-kit/sortable";
|
|
10
|
+
import { CSS as Ge } from "@dnd-kit/utilities";
|
|
11
|
+
import { M as pe } from "./MetricCard-DOPtBpek.js";
|
|
12
|
+
function Ht() {
|
|
13
|
+
const e = O();
|
|
11
14
|
if (e?.state.activePanelId !== "settings") return null;
|
|
12
15
|
const t = e.state.activeTrigger;
|
|
13
16
|
return t?.kind === "card-overflow" ? t.cardId : null;
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */ a("div", { className:
|
|
18
|
+
function je({ span: e, rotating: t = !0, children: r }) {
|
|
19
|
+
const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = r != null ? "full" : "fallback";
|
|
20
|
+
return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: r });
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
const Ze = 500, Xe = 1, Je = "var(--gloss-color-primary, #6366f1)";
|
|
23
|
+
function et({
|
|
24
|
+
children: e,
|
|
25
|
+
spinTrigger: t,
|
|
26
|
+
onSpinComplete: r,
|
|
27
|
+
spinDuration: l,
|
|
28
|
+
spinRotations: n,
|
|
29
|
+
accentColor: i
|
|
30
|
+
}) {
|
|
31
|
+
const u = de(0), o = de(1), s = H.useRef(null), c = H.useMemo(() => ke() === "reduced", []), d = H.useRef(t);
|
|
32
|
+
return H.useEffect(() => {
|
|
33
|
+
if (t === void 0 || t === d.current) return;
|
|
34
|
+
d.current = t;
|
|
35
|
+
const h = (l ?? Ze) / 1e3, y = n ?? Xe, p = s.current;
|
|
36
|
+
if (c) {
|
|
37
|
+
const _ = [];
|
|
38
|
+
if (p) {
|
|
39
|
+
const x = B(
|
|
40
|
+
p,
|
|
41
|
+
{ opacity: [0, 0.4, 0] },
|
|
42
|
+
Re
|
|
43
|
+
);
|
|
44
|
+
_.push(x), x.then(() => {
|
|
45
|
+
r?.();
|
|
46
|
+
});
|
|
47
|
+
} else
|
|
48
|
+
Promise.resolve().then(() => {
|
|
49
|
+
r?.();
|
|
50
|
+
});
|
|
51
|
+
return () => {
|
|
52
|
+
_.forEach((x) => x.stop());
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const v = { ...$e, duration: h }, T = B(u, [0, 360 * y], v), S = B(o, [1, 1.03, 1], v), b = [T, S];
|
|
56
|
+
if (p) {
|
|
57
|
+
const _ = B(
|
|
58
|
+
p,
|
|
59
|
+
{ opacity: [0, 0.6, 0, 0] },
|
|
60
|
+
{ ...v, times: [0, 0.3, 0.8, 1] }
|
|
61
|
+
);
|
|
62
|
+
b.push(_);
|
|
63
|
+
}
|
|
64
|
+
return T.then(() => {
|
|
65
|
+
r?.();
|
|
66
|
+
}), () => {
|
|
67
|
+
b.forEach((_) => _.stop());
|
|
68
|
+
};
|
|
69
|
+
}, [t, l, n, c, r, u, o]), /* @__PURE__ */ f(
|
|
70
|
+
Fe.div,
|
|
71
|
+
{
|
|
72
|
+
className: "clone-stage",
|
|
73
|
+
style: { rotateY: u, scale: o },
|
|
74
|
+
children: [
|
|
75
|
+
e,
|
|
76
|
+
/* @__PURE__ */ a(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
ref: s,
|
|
80
|
+
className: "clone-stage__accent",
|
|
81
|
+
style: {
|
|
82
|
+
"--spin-accent-color": i ?? Je
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function Bt({ primary: e, secondary: t }) {
|
|
91
|
+
return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
|
|
21
92
|
/* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
|
|
22
93
|
t != null && /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
|
|
23
94
|
] });
|
|
24
95
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
96
|
+
function tt({
|
|
97
|
+
value: e,
|
|
98
|
+
onChange: t,
|
|
99
|
+
enabled: r = !1,
|
|
100
|
+
onToggleEnabled: l
|
|
101
|
+
}) {
|
|
102
|
+
const n = "settings-threshold-enabled";
|
|
103
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
|
|
104
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
|
|
105
|
+
/* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
|
|
106
|
+
/* @__PURE__ */ a(
|
|
107
|
+
"input",
|
|
108
|
+
{
|
|
109
|
+
id: n,
|
|
110
|
+
type: "checkbox",
|
|
111
|
+
role: "switch",
|
|
112
|
+
"aria-label": "Enable threshold indicator",
|
|
113
|
+
"aria-checked": r,
|
|
114
|
+
checked: r,
|
|
115
|
+
onChange: (i) => l?.(i.target.checked),
|
|
116
|
+
className: "settings-shell__toggle"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
] }),
|
|
120
|
+
r ? /* @__PURE__ */ f(q, { children: [
|
|
121
|
+
/* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
122
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
123
|
+
/* @__PURE__ */ a(
|
|
124
|
+
"input",
|
|
125
|
+
{
|
|
126
|
+
id: "settings-threshold-input",
|
|
127
|
+
type: "range",
|
|
128
|
+
min: 0,
|
|
129
|
+
max: 100,
|
|
130
|
+
value: e,
|
|
131
|
+
onChange: t,
|
|
132
|
+
"aria-label": "Threshold",
|
|
133
|
+
"aria-valuenow": e,
|
|
134
|
+
"aria-valuemin": 0,
|
|
135
|
+
"aria-valuemax": 100,
|
|
136
|
+
className: "settings-shell__slider"
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
140
|
+
e,
|
|
141
|
+
"%"
|
|
142
|
+
] })
|
|
143
|
+
] })
|
|
144
|
+
] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
|
|
145
|
+
] });
|
|
146
|
+
}
|
|
147
|
+
function nt({ value: e, onChange: t }) {
|
|
148
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
27
149
|
/* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
28
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
|
|
29
151
|
/* @__PURE__ */ a(
|
|
30
152
|
"input",
|
|
31
153
|
{
|
|
@@ -42,47 +164,25 @@ function Be({ value: e, onChange: t }) {
|
|
|
42
164
|
className: "settings-shell__slider"
|
|
43
165
|
}
|
|
44
166
|
),
|
|
45
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
46
168
|
e,
|
|
47
169
|
" days"
|
|
48
170
|
] })
|
|
49
171
|
] })
|
|
50
172
|
] });
|
|
51
173
|
}
|
|
52
|
-
function
|
|
53
|
-
id: e,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const o = "settings-shell__slot-pill settings-shell__slot-pill--ghost" + (s ? " settings-shell__slot-pill--ghost-disabled" : "");
|
|
58
|
-
return /* @__PURE__ */ a("li", { className: o, "data-ghost": "true", children: /* @__PURE__ */ a(
|
|
59
|
-
"button",
|
|
60
|
-
{
|
|
61
|
-
type: "button",
|
|
62
|
-
className: "settings-shell__slot-pill__ghost-activate",
|
|
63
|
-
"aria-label": `Restore ${e}`,
|
|
64
|
-
"aria-disabled": s ? "true" : void 0,
|
|
65
|
-
onClick: s ? void 0 : t,
|
|
66
|
-
children: /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e })
|
|
67
|
-
}
|
|
68
|
-
) });
|
|
69
|
-
}
|
|
70
|
-
function Ve({
|
|
71
|
-
id: e,
|
|
72
|
-
onRemove: t,
|
|
73
|
-
removeDisabled: s
|
|
74
|
-
}) {
|
|
75
|
-
const { attributes: o, listeners: n, setNodeRef: c, transform: p, transition: r, isDragging: i } = ze({ id: e }), l = {
|
|
76
|
-
transform: He.Transform.toString(p),
|
|
77
|
-
transition: r,
|
|
78
|
-
opacity: i ? 0.6 : 1
|
|
174
|
+
function at({ id: e, onRemove: t }) {
|
|
175
|
+
const { attributes: r, listeners: l, setNodeRef: n, transform: i, transition: u, isDragging: o } = We({ id: e }), s = {
|
|
176
|
+
transform: Ge.Transform.toString(i),
|
|
177
|
+
transition: u,
|
|
178
|
+
opacity: o ? 0.6 : 1
|
|
79
179
|
};
|
|
80
|
-
return /* @__PURE__ */
|
|
180
|
+
return /* @__PURE__ */ f(
|
|
81
181
|
"li",
|
|
82
182
|
{
|
|
83
|
-
ref:
|
|
84
|
-
style:
|
|
85
|
-
className: `settings-shell__slot-pill${
|
|
183
|
+
ref: n,
|
|
184
|
+
style: s,
|
|
185
|
+
className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
|
|
86
186
|
children: [
|
|
87
187
|
/* @__PURE__ */ a(
|
|
88
188
|
"button",
|
|
@@ -90,8 +190,8 @@ function Ve({
|
|
|
90
190
|
type: "button",
|
|
91
191
|
className: "settings-shell__slot-pill__handle",
|
|
92
192
|
"aria-label": `Reorder ${e}`,
|
|
93
|
-
...
|
|
94
|
-
...
|
|
193
|
+
...r,
|
|
194
|
+
...l,
|
|
95
195
|
children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
|
|
96
196
|
}
|
|
97
197
|
),
|
|
@@ -100,10 +200,9 @@ function Ve({
|
|
|
100
200
|
"button",
|
|
101
201
|
{
|
|
102
202
|
type: "button",
|
|
103
|
-
className: "settings-shell__slot-pill__remove"
|
|
203
|
+
className: "settings-shell__slot-pill__remove",
|
|
104
204
|
"aria-label": `Remove ${e}`,
|
|
105
|
-
|
|
106
|
-
onClick: s ? void 0 : t,
|
|
205
|
+
onClick: t,
|
|
107
206
|
children: "×"
|
|
108
207
|
}
|
|
109
208
|
)
|
|
@@ -111,88 +210,124 @@ function Ve({
|
|
|
111
210
|
}
|
|
112
211
|
);
|
|
113
212
|
}
|
|
114
|
-
function
|
|
213
|
+
function st({ value: e, onChange: t }) {
|
|
214
|
+
const r = Ue(
|
|
215
|
+
ue(ze, { activationConstraint: { distance: 4 } }),
|
|
216
|
+
ue(He, { coordinateGetter: Ve })
|
|
217
|
+
), l = R.useRef(!1), [n, i] = R.useState(!1), u = (s) => {
|
|
218
|
+
const { active: c, over: d } = s;
|
|
219
|
+
if (!d || c.id === d.id) return;
|
|
220
|
+
const m = e.findIndex((y) => y === c.id), h = e.findIndex((y) => y === d.id);
|
|
221
|
+
m === -1 || h === -1 || t(Qe([...e], m, h));
|
|
222
|
+
}, o = (s) => {
|
|
223
|
+
l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
|
|
224
|
+
};
|
|
225
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
226
|
+
/* @__PURE__ */ a(Be, { sensors: r, collisionDetection: Ye, onDragEnd: u, children: /* @__PURE__ */ a(Ke, { items: [...e], strategy: qe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ a(at, { id: s, onRemove: () => o(s) }, s)) }) }) }),
|
|
227
|
+
e.length === 0 && n && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
|
|
228
|
+
/* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
|
|
229
|
+
] });
|
|
230
|
+
}
|
|
231
|
+
const rt = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
232
|
+
function ot({
|
|
115
233
|
value: e,
|
|
116
|
-
|
|
117
|
-
|
|
234
|
+
onSelect: t,
|
|
235
|
+
enabled: r = !1,
|
|
236
|
+
onToggleEnabled: l
|
|
118
237
|
}) {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const m = e.findIndex((v) => v === h.id), _ = e.findIndex((v) => v === g.id);
|
|
126
|
-
m === -1 || _ === -1 || t(Fe([...e], m, _));
|
|
127
|
-
}, c = e.length === 1, p = (d) => {
|
|
128
|
-
c || t(e.filter((h) => h !== d));
|
|
129
|
-
}, r = B.useMemo(() => new Set(e), [e]), i = B.useMemo(
|
|
130
|
-
() => (s ?? []).filter((d) => !r.has(d)),
|
|
131
|
-
[s, r]
|
|
132
|
-
), l = !1, u = (d) => {
|
|
133
|
-
t([...e, d]);
|
|
134
|
-
};
|
|
135
|
-
return /* @__PURE__ */ y("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
136
|
-
/* @__PURE__ */ a(Me, { sensors: o, collisionDetection: Oe, onDragEnd: n, children: /* @__PURE__ */ a($e, { items: [...e], strategy: Re, children: /* @__PURE__ */ y("ul", { className: "settings-shell__slots-list", role: "list", children: [
|
|
137
|
-
e.map((d) => /* @__PURE__ */ a(
|
|
138
|
-
Ve,
|
|
139
|
-
{
|
|
140
|
-
id: d,
|
|
141
|
-
onRemove: () => p(d),
|
|
142
|
-
removeDisabled: c
|
|
143
|
-
},
|
|
144
|
-
d
|
|
145
|
-
)),
|
|
146
|
-
i.map((d) => /* @__PURE__ */ a(
|
|
147
|
-
Ye,
|
|
238
|
+
const n = "settings-accent-enabled";
|
|
239
|
+
return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
240
|
+
/* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
|
|
241
|
+
/* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Override default accent" }),
|
|
242
|
+
/* @__PURE__ */ a(
|
|
243
|
+
"input",
|
|
148
244
|
{
|
|
149
|
-
id:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
245
|
+
id: n,
|
|
246
|
+
type: "checkbox",
|
|
247
|
+
role: "switch",
|
|
248
|
+
"aria-label": "Enable accent override",
|
|
249
|
+
"aria-checked": r,
|
|
250
|
+
checked: r,
|
|
251
|
+
onChange: (i) => l?.(i.target.checked),
|
|
252
|
+
className: "settings-shell__toggle"
|
|
253
|
+
}
|
|
254
|
+
)
|
|
255
|
+
] }),
|
|
256
|
+
r ? /* @__PURE__ */ f(q, { children: [
|
|
257
|
+
/* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
258
|
+
/* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: rt.map((i) => {
|
|
259
|
+
const u = e === i;
|
|
260
|
+
return /* @__PURE__ */ a(
|
|
261
|
+
"button",
|
|
262
|
+
{
|
|
263
|
+
type: "button",
|
|
264
|
+
"aria-pressed": u,
|
|
265
|
+
"aria-label": `Accent ${i}`,
|
|
266
|
+
className: `settings-shell__swatch${u ? " settings-shell__swatch--active" : ""}`,
|
|
267
|
+
style: { backgroundColor: i },
|
|
268
|
+
onClick: () => t(i)
|
|
269
|
+
},
|
|
270
|
+
i
|
|
271
|
+
);
|
|
272
|
+
}) })
|
|
273
|
+
] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
|
|
157
274
|
] });
|
|
158
275
|
}
|
|
159
|
-
const
|
|
160
|
-
function
|
|
276
|
+
const lt = ["Orders", "Quota", "Unassigned"], it = ["threshold", "timeframe", "color"];
|
|
277
|
+
function Yt({
|
|
161
278
|
isOpen: e,
|
|
162
279
|
cardSpan: t,
|
|
163
|
-
cardLabel:
|
|
164
|
-
cardValue:
|
|
280
|
+
cardLabel: r = "Metric",
|
|
281
|
+
cardValue: l = "—",
|
|
165
282
|
previewSlot: n,
|
|
166
|
-
dimensions:
|
|
167
|
-
initialTab:
|
|
168
|
-
initialValues:
|
|
169
|
-
naturalSlots: i
|
|
283
|
+
dimensions: i = it,
|
|
284
|
+
initialTab: u,
|
|
285
|
+
initialValues: o
|
|
170
286
|
}) {
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, [
|
|
175
|
-
const
|
|
176
|
-
d == null ||
|
|
177
|
-
},
|
|
178
|
-
d == null ||
|
|
179
|
-
},
|
|
287
|
+
const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = be(), h = c?.span, y = t ?? h ?? 1, p = i[0] ?? "threshold", [v, T] = R.useState(u ?? p);
|
|
288
|
+
R.useEffect(() => {
|
|
289
|
+
i.includes(v) || T(p);
|
|
290
|
+
}, [i, v, p]);
|
|
291
|
+
const b = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, _ = typeof b.threshold == "number" ? b.threshold : typeof o?.threshold == "number" ? o.threshold : 80, x = typeof b.timeframe == "number" ? b.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof b.accent == "string" ? b.accent : typeof o?.accent == "string" ? o.accent : null, F = Array.isArray(b.slots) ? b.slots : Array.isArray(o?.slots) ? o.slots : lt, E = typeof b.thresholdEnabled == "boolean" ? b.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, L = typeof b.accentEnabled == "boolean" ? b.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (w) => {
|
|
292
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(w.target.value) });
|
|
293
|
+
}, G = (w) => {
|
|
294
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(w.target.value) });
|
|
295
|
+
}, ie = (w) => {
|
|
296
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: w });
|
|
297
|
+
}, j = (w) => {
|
|
298
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: w });
|
|
299
|
+
}, Z = (w) => {
|
|
300
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: w });
|
|
301
|
+
}, g = (w) => {
|
|
302
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: w });
|
|
303
|
+
}, N = s?.state.isDirty ?? !1, P = d, k = () => {
|
|
304
|
+
P != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: P });
|
|
305
|
+
}, [D, U] = R.useState(0), Ae = () => {
|
|
306
|
+
U((w) => w + 1), s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
|
|
307
|
+
}, xe = R.useCallback(() => {
|
|
308
|
+
}, []);
|
|
180
309
|
return /* @__PURE__ */ a(
|
|
181
|
-
|
|
310
|
+
K,
|
|
182
311
|
{
|
|
183
312
|
variant: "with-stage",
|
|
184
|
-
onClose: () =>
|
|
185
|
-
stage:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
313
|
+
onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
314
|
+
stage: (
|
|
315
|
+
// M003-S004-MOT-02 — CloneStage wraps CloneCard so the spin-commit
|
|
316
|
+
// gesture has a transform host that does NOT disturb the inner
|
|
317
|
+
// CloneCard's existing sway / span-N geometry. Counter is owned here
|
|
318
|
+
// (Option 3); reptime sees no spinTrigger plumbing.
|
|
319
|
+
/* @__PURE__ */ a(et, { spinTrigger: D, onSpinComplete: xe, children: /* @__PURE__ */ a(je, { span: y, rotating: !m, children: n ?? /* @__PURE__ */ f(q, { children: [
|
|
320
|
+
/* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
|
|
321
|
+
/* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
|
|
322
|
+
] }) }) })
|
|
323
|
+
),
|
|
189
324
|
navigation: /* @__PURE__ */ a(
|
|
190
|
-
|
|
325
|
+
De,
|
|
191
326
|
{
|
|
192
|
-
dimensions:
|
|
327
|
+
dimensions: i,
|
|
193
328
|
activeTab: v,
|
|
194
|
-
onSelect:
|
|
195
|
-
reduced:
|
|
329
|
+
onSelect: T,
|
|
330
|
+
reduced: m
|
|
196
331
|
}
|
|
197
332
|
),
|
|
198
333
|
footer: {
|
|
@@ -202,10 +337,8 @@ function wt({
|
|
|
202
337
|
id: "btn-reset",
|
|
203
338
|
type: "button",
|
|
204
339
|
className: "gloss-panel-chrome-v2__footer-btn",
|
|
205
|
-
disabled: !
|
|
206
|
-
onClick:
|
|
207
|
-
H != null && l?.dispatch({ type: "CLEAR_BUFFER", cardId: H });
|
|
208
|
-
},
|
|
340
|
+
disabled: !N,
|
|
341
|
+
onClick: k,
|
|
209
342
|
children: "Reset"
|
|
210
343
|
}
|
|
211
344
|
),
|
|
@@ -215,13 +348,13 @@ function wt({
|
|
|
215
348
|
id: "settings-apply",
|
|
216
349
|
type: "button",
|
|
217
350
|
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
218
|
-
disabled: !
|
|
219
|
-
onClick:
|
|
351
|
+
disabled: !N,
|
|
352
|
+
onClick: Ae,
|
|
220
353
|
children: "Apply"
|
|
221
354
|
}
|
|
222
355
|
)
|
|
223
356
|
},
|
|
224
|
-
children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
|
|
225
358
|
"div",
|
|
226
359
|
{
|
|
227
360
|
role: "tabpanel",
|
|
@@ -230,51 +363,40 @@ function wt({
|
|
|
230
363
|
tabIndex: 0,
|
|
231
364
|
className: "settings-shell__tabpanel",
|
|
232
365
|
children: [
|
|
233
|
-
v === "
|
|
234
|
-
|
|
366
|
+
v === "threshold" && /* @__PURE__ */ a(
|
|
367
|
+
tt,
|
|
368
|
+
{
|
|
369
|
+
value: _,
|
|
370
|
+
onChange: W,
|
|
371
|
+
enabled: E,
|
|
372
|
+
onToggleEnabled: Z
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
v === "timeframe" && /* @__PURE__ */ a(nt, { value: x, onChange: G }),
|
|
376
|
+
v === "slots" && /* @__PURE__ */ a(st, { value: F, onChange: j }),
|
|
377
|
+
v === "color" && /* @__PURE__ */ a(
|
|
378
|
+
ot,
|
|
379
|
+
{
|
|
380
|
+
value: $,
|
|
381
|
+
onSelect: ie,
|
|
382
|
+
enabled: L,
|
|
383
|
+
onToggleEnabled: g
|
|
384
|
+
}
|
|
385
|
+
)
|
|
235
386
|
]
|
|
236
387
|
}
|
|
237
388
|
) })
|
|
238
389
|
}
|
|
239
390
|
);
|
|
240
391
|
}
|
|
241
|
-
|
|
242
|
-
isOpen: e,
|
|
243
|
-
cardSpan: t,
|
|
244
|
-
previewSlot: s,
|
|
245
|
-
metricInfo: o
|
|
246
|
-
}) {
|
|
247
|
-
const n = D(), c = n?.state.activeTrigger, p = J(), r = c?.span;
|
|
248
|
-
return /* @__PURE__ */ a(
|
|
249
|
-
z,
|
|
250
|
-
{
|
|
251
|
-
variant: "with-stage",
|
|
252
|
-
onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
253
|
-
stage: /* @__PURE__ */ a(fe, { span: t ?? r ?? 1, rotating: !p, children: s }),
|
|
254
|
-
children: /* @__PURE__ */ y(
|
|
255
|
-
"div",
|
|
256
|
-
{
|
|
257
|
-
className: "metric-info-shell",
|
|
258
|
-
"data-shell": "metric-info",
|
|
259
|
-
"aria-hidden": !e,
|
|
260
|
-
children: [
|
|
261
|
-
/* @__PURE__ */ a("h2", { className: "metric-info-shell__title", children: o.title }),
|
|
262
|
-
/* @__PURE__ */ a("p", { className: "metric-info-shell__description", children: o.description })
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
)
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
Ge.displayName = "MetricInfoShell";
|
|
270
|
-
const ge = [
|
|
392
|
+
const _e = [
|
|
271
393
|
"Revenue",
|
|
272
394
|
"Order flow",
|
|
273
395
|
"Rep performance",
|
|
274
396
|
"Brand portfolio",
|
|
275
397
|
"Account coverage",
|
|
276
398
|
"Commission"
|
|
277
|
-
],
|
|
399
|
+
], Ce = "Revenue", Ne = {
|
|
278
400
|
Revenue: {
|
|
279
401
|
headline: "Are we hitting our number?",
|
|
280
402
|
helper: "Top-line sales, growth, average order value, and pace-to-plan signals."
|
|
@@ -299,7 +421,7 @@ const ge = [
|
|
|
299
421
|
headline: "What's our commission rate?",
|
|
300
422
|
helper: "Outstanding balances, aging buckets, and effective commission yield."
|
|
301
423
|
}
|
|
302
|
-
},
|
|
424
|
+
}, Se = {
|
|
303
425
|
Revenue: {
|
|
304
426
|
primary: [
|
|
305
427
|
{
|
|
@@ -584,46 +706,46 @@ const ge = [
|
|
|
584
706
|
]
|
|
585
707
|
}
|
|
586
708
|
};
|
|
587
|
-
function
|
|
709
|
+
function Ee({
|
|
588
710
|
lenses: e,
|
|
589
711
|
activeLens: t,
|
|
590
|
-
onLensChange:
|
|
591
|
-
variant:
|
|
592
|
-
lensMeta: n =
|
|
712
|
+
onLensChange: r,
|
|
713
|
+
variant: l = "pills",
|
|
714
|
+
lensMeta: n = Ne
|
|
593
715
|
}) {
|
|
594
|
-
return
|
|
595
|
-
const
|
|
596
|
-
return
|
|
716
|
+
return l === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
|
|
717
|
+
const u = i === t, o = n[i], s = ["cat-pill"];
|
|
718
|
+
return u && s.push("active"), /* @__PURE__ */ f(
|
|
597
719
|
"button",
|
|
598
720
|
{
|
|
599
721
|
type: "button",
|
|
600
722
|
role: "tab",
|
|
601
|
-
"aria-selected":
|
|
602
|
-
className:
|
|
603
|
-
"data-lens":
|
|
723
|
+
"aria-selected": u,
|
|
724
|
+
className: s.join(" "),
|
|
725
|
+
"data-lens": i,
|
|
604
726
|
onClick: () => {
|
|
605
|
-
|
|
727
|
+
u || r(i);
|
|
606
728
|
},
|
|
607
729
|
children: [
|
|
608
|
-
|
|
609
|
-
|
|
730
|
+
i,
|
|
731
|
+
o?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
|
|
610
732
|
]
|
|
611
733
|
},
|
|
612
|
-
|
|
734
|
+
i
|
|
613
735
|
);
|
|
614
|
-
}) }) }) : /* @__PURE__ */ a(
|
|
736
|
+
}) }) }) : /* @__PURE__ */ a(ct, { lenses: e, activeLens: t, onLensChange: r });
|
|
615
737
|
}
|
|
616
|
-
function
|
|
738
|
+
function ct({
|
|
617
739
|
lenses: e,
|
|
618
740
|
activeLens: t,
|
|
619
|
-
onLensChange:
|
|
741
|
+
onLensChange: r
|
|
620
742
|
}) {
|
|
621
|
-
const [
|
|
622
|
-
|
|
623
|
-
},
|
|
624
|
-
|
|
625
|
-
},
|
|
626
|
-
return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */
|
|
743
|
+
const [l, n] = A(!1), i = Q(null), u = () => {
|
|
744
|
+
i.current != null && (window.clearTimeout(i.current), i.current = null);
|
|
745
|
+
}, o = () => {
|
|
746
|
+
u(), i.current = window.setTimeout(() => n(!1), 100);
|
|
747
|
+
}, s = e.filter((c) => c !== t);
|
|
748
|
+
return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
|
|
627
749
|
/* @__PURE__ */ a(
|
|
628
750
|
"button",
|
|
629
751
|
{
|
|
@@ -634,35 +756,35 @@ function Qe({
|
|
|
634
756
|
children: t
|
|
635
757
|
}
|
|
636
758
|
),
|
|
637
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ f(
|
|
638
760
|
"div",
|
|
639
761
|
{
|
|
640
762
|
className: "cat-seg-more",
|
|
641
763
|
onMouseEnter: () => {
|
|
642
|
-
|
|
764
|
+
u(), n(!0);
|
|
643
765
|
},
|
|
644
|
-
onMouseLeave:
|
|
766
|
+
onMouseLeave: o,
|
|
645
767
|
children: [
|
|
646
|
-
/* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded":
|
|
647
|
-
|
|
768
|
+
/* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
|
|
769
|
+
l && /* @__PURE__ */ a(
|
|
648
770
|
"div",
|
|
649
771
|
{
|
|
650
772
|
className: "cat-seg-overflow",
|
|
651
773
|
role: "menu",
|
|
652
|
-
onMouseEnter:
|
|
653
|
-
onMouseLeave:
|
|
654
|
-
children:
|
|
774
|
+
onMouseEnter: u,
|
|
775
|
+
onMouseLeave: o,
|
|
776
|
+
children: s.map((c) => /* @__PURE__ */ a(
|
|
655
777
|
"button",
|
|
656
778
|
{
|
|
657
779
|
type: "button",
|
|
658
|
-
"data-lens":
|
|
780
|
+
"data-lens": c,
|
|
659
781
|
role: "menuitem",
|
|
660
782
|
onClick: () => {
|
|
661
|
-
|
|
783
|
+
r(c), n(!1);
|
|
662
784
|
},
|
|
663
|
-
children:
|
|
785
|
+
children: c
|
|
664
786
|
},
|
|
665
|
-
|
|
787
|
+
c
|
|
666
788
|
))
|
|
667
789
|
}
|
|
668
790
|
)
|
|
@@ -671,38 +793,38 @@ function Qe({
|
|
|
671
793
|
)
|
|
672
794
|
] }) });
|
|
673
795
|
}
|
|
674
|
-
function
|
|
796
|
+
function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
|
|
675
797
|
return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
|
|
676
|
-
const
|
|
677
|
-
let
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
const
|
|
682
|
-
let
|
|
798
|
+
const i = n.id === t, u = n.subStats != null && n.subStats.length > 0;
|
|
799
|
+
let o = null;
|
|
800
|
+
u ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
|
|
801
|
+
const s = ["cat-tile"];
|
|
802
|
+
o && s.push(o), i && s.push("selected"), n.isNew && s.push("is-new"), n.startHere && s.push("start-here"), n.donut && s.push("has-donut");
|
|
803
|
+
const c = 1;
|
|
804
|
+
let d = 0.7;
|
|
683
805
|
if (n.donut) {
|
|
684
|
-
const
|
|
685
|
-
if (
|
|
686
|
-
const h = parseFloat(
|
|
687
|
-
Number.isFinite(h) && (
|
|
806
|
+
const m = /([\d.]+)\s*%/.exec(n.value);
|
|
807
|
+
if (m) {
|
|
808
|
+
const h = parseFloat(m[1]);
|
|
809
|
+
Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
|
|
688
810
|
}
|
|
689
811
|
}
|
|
690
|
-
return /* @__PURE__ */
|
|
812
|
+
return /* @__PURE__ */ f(
|
|
691
813
|
"button",
|
|
692
814
|
{
|
|
693
815
|
type: "button",
|
|
694
|
-
className:
|
|
816
|
+
className: s.join(" "),
|
|
695
817
|
"data-metric": n.id,
|
|
696
818
|
"data-desc": n.desc,
|
|
697
|
-
"data-col-span": String(
|
|
819
|
+
"data-col-span": String(c),
|
|
698
820
|
"data-donut": n.donut ? "true" : void 0,
|
|
699
821
|
"data-accent": n.accent,
|
|
700
|
-
"aria-pressed":
|
|
701
|
-
onClick: () =>
|
|
822
|
+
"aria-pressed": i,
|
|
823
|
+
onClick: () => r(n.id, n.desc),
|
|
702
824
|
style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
|
|
703
825
|
children: [
|
|
704
826
|
n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
|
|
705
|
-
|
|
827
|
+
l ? l(n) : /* @__PURE__ */ a(
|
|
706
828
|
"div",
|
|
707
829
|
{
|
|
708
830
|
className: "cat-tile-primitive-wrapper gloss-metric-card",
|
|
@@ -710,28 +832,28 @@ function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: o }) {
|
|
|
710
832
|
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
711
833
|
"aria-hidden": "true",
|
|
712
834
|
children: n.donut ? /* @__PURE__ */ a(
|
|
713
|
-
|
|
835
|
+
pe,
|
|
714
836
|
{
|
|
715
837
|
variant: "donut",
|
|
716
838
|
label: n.label,
|
|
717
839
|
value: n.value,
|
|
718
|
-
donutValue:
|
|
840
|
+
donutValue: d,
|
|
719
841
|
donutMax: 1,
|
|
720
842
|
accentColor: n.accent,
|
|
721
|
-
colSpan:
|
|
843
|
+
colSpan: c
|
|
722
844
|
}
|
|
723
845
|
) : /* @__PURE__ */ a(
|
|
724
|
-
|
|
846
|
+
pe,
|
|
725
847
|
{
|
|
726
848
|
variant: "standard",
|
|
727
849
|
label: n.label,
|
|
728
850
|
value: n.value,
|
|
729
|
-
colSpan:
|
|
851
|
+
colSpan: c
|
|
730
852
|
}
|
|
731
853
|
)
|
|
732
854
|
}
|
|
733
855
|
),
|
|
734
|
-
n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((
|
|
856
|
+
n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((m) => /* @__PURE__ */ a("span", { children: m }, m)) }),
|
|
735
857
|
n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
|
|
736
858
|
]
|
|
737
859
|
},
|
|
@@ -739,17 +861,17 @@ function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: o }) {
|
|
|
739
861
|
);
|
|
740
862
|
}) });
|
|
741
863
|
}
|
|
742
|
-
const
|
|
743
|
-
function
|
|
744
|
-
return
|
|
864
|
+
const re = ye(null);
|
|
865
|
+
function oe() {
|
|
866
|
+
return ve(re);
|
|
745
867
|
}
|
|
746
|
-
function
|
|
747
|
-
const
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
return /* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children:
|
|
752
|
-
/* @__PURE__ */
|
|
868
|
+
function Vt({ mode: e, dispatch: t }) {
|
|
869
|
+
const r = oe();
|
|
870
|
+
if (r == null && e == null) return null;
|
|
871
|
+
const l = r?.mode ?? e ?? "add", n = r?.selectedTileId ?? null, i = r?.description ?? null, u = n == null;
|
|
872
|
+
return /* @__PURE__ */ f("div", { className: "panel-footer catalog", children: [
|
|
873
|
+
/* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
|
|
874
|
+
/* @__PURE__ */ f("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
753
875
|
/* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
|
|
754
876
|
/* @__PURE__ */ a(
|
|
755
877
|
"button",
|
|
@@ -761,24 +883,24 @@ function Tt({ mode: e, dispatch: t }) {
|
|
|
761
883
|
children: "Cancel"
|
|
762
884
|
}
|
|
763
885
|
),
|
|
764
|
-
|
|
886
|
+
l === "add" && /* @__PURE__ */ a(
|
|
765
887
|
"button",
|
|
766
888
|
{
|
|
767
889
|
id: "btn-cat-add",
|
|
768
890
|
type: "button",
|
|
769
891
|
className: "btn btn-primary",
|
|
770
|
-
disabled:
|
|
892
|
+
disabled: u,
|
|
771
893
|
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
772
894
|
children: "Add metric"
|
|
773
895
|
}
|
|
774
896
|
),
|
|
775
|
-
|
|
897
|
+
l === "replace" && /* @__PURE__ */ a(
|
|
776
898
|
"button",
|
|
777
899
|
{
|
|
778
900
|
id: "btn-cat-replace",
|
|
779
901
|
type: "button",
|
|
780
902
|
className: "btn btn-primary",
|
|
781
|
-
disabled:
|
|
903
|
+
disabled: u,
|
|
782
904
|
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
783
905
|
children: "Replace metric"
|
|
784
906
|
}
|
|
@@ -786,63 +908,63 @@ function Tt({ mode: e, dispatch: t }) {
|
|
|
786
908
|
] })
|
|
787
909
|
] });
|
|
788
910
|
}
|
|
789
|
-
function
|
|
911
|
+
function me(e, t) {
|
|
790
912
|
if (t.length === 0) return !0;
|
|
791
|
-
const
|
|
792
|
-
if (e.label.toLowerCase().includes(
|
|
913
|
+
const r = t.toLowerCase();
|
|
914
|
+
if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
|
|
793
915
|
if (e.subStats) {
|
|
794
|
-
for (const
|
|
795
|
-
if (
|
|
916
|
+
for (const l of e.subStats)
|
|
917
|
+
if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
|
|
796
918
|
}
|
|
797
919
|
return !1;
|
|
798
920
|
}
|
|
799
|
-
function
|
|
800
|
-
const t =
|
|
921
|
+
function dt() {
|
|
922
|
+
const t = oe()?.description ?? null;
|
|
801
923
|
return t == null ? /* @__PURE__ */ a("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ a("span", { children: t });
|
|
802
924
|
}
|
|
803
|
-
function
|
|
925
|
+
function Kt({
|
|
804
926
|
isOpen: e,
|
|
805
|
-
lenses: t =
|
|
806
|
-
defaultLens:
|
|
807
|
-
tilesByLens:
|
|
808
|
-
lensMeta: n =
|
|
809
|
-
renderTile:
|
|
810
|
-
onAdd:
|
|
927
|
+
lenses: t = _e,
|
|
928
|
+
defaultLens: r = Ce,
|
|
929
|
+
tilesByLens: l = Se,
|
|
930
|
+
lensMeta: n = Ne,
|
|
931
|
+
renderTile: i,
|
|
932
|
+
onAdd: u
|
|
811
933
|
}) {
|
|
812
|
-
const
|
|
813
|
-
() =>
|
|
814
|
-
[
|
|
815
|
-
),
|
|
816
|
-
() => (
|
|
817
|
-
[
|
|
818
|
-
),
|
|
819
|
-
|
|
820
|
-
},
|
|
934
|
+
const o = O(), [s, c] = A(r), [d, m] = A(null), [h, y] = A(null), [p, v] = A(""), T = l[s] ?? { primary: [] }, S = n[s], b = ce(
|
|
935
|
+
() => T.primary.filter((E) => me(E, p)),
|
|
936
|
+
[T.primary, p]
|
|
937
|
+
), _ = ce(
|
|
938
|
+
() => (T.secondary ?? []).filter((E) => me(E, p)),
|
|
939
|
+
[T.secondary, p]
|
|
940
|
+
), x = () => {
|
|
941
|
+
d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
|
|
942
|
+
}, $ = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), F = d == null;
|
|
821
943
|
return /* @__PURE__ */ a(
|
|
822
|
-
|
|
944
|
+
re.Provider,
|
|
823
945
|
{
|
|
824
|
-
value: { mode: "add", selectedTileId:
|
|
946
|
+
value: { mode: "add", selectedTileId: d, description: h },
|
|
825
947
|
children: /* @__PURE__ */ a(
|
|
826
|
-
|
|
948
|
+
K,
|
|
827
949
|
{
|
|
828
950
|
variant: "no-stage",
|
|
829
951
|
title: "Add a metric",
|
|
830
|
-
onClose:
|
|
952
|
+
onClose: $,
|
|
831
953
|
footer: {
|
|
832
|
-
left: /* @__PURE__ */ a(
|
|
954
|
+
left: /* @__PURE__ */ a(dt, {}),
|
|
833
955
|
right: /* @__PURE__ */ a(
|
|
834
956
|
"button",
|
|
835
957
|
{
|
|
836
958
|
id: "btn-cat-add",
|
|
837
959
|
type: "button",
|
|
838
960
|
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
839
|
-
disabled:
|
|
840
|
-
onClick:
|
|
961
|
+
disabled: F,
|
|
962
|
+
onClick: x,
|
|
841
963
|
children: "Add metric"
|
|
842
964
|
}
|
|
843
965
|
)
|
|
844
966
|
},
|
|
845
|
-
children: /* @__PURE__ */
|
|
967
|
+
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
846
968
|
/* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
|
|
847
969
|
"input",
|
|
848
970
|
{
|
|
@@ -850,54 +972,54 @@ function xt({
|
|
|
850
972
|
className: "cat-search-input",
|
|
851
973
|
placeholder: "Search metrics",
|
|
852
974
|
"aria-label": "Search metrics",
|
|
853
|
-
value:
|
|
854
|
-
onChange: (
|
|
975
|
+
value: p,
|
|
976
|
+
onChange: (E) => v(E.target.value)
|
|
855
977
|
}
|
|
856
978
|
) }),
|
|
857
979
|
/* @__PURE__ */ a(
|
|
858
|
-
|
|
980
|
+
Ee,
|
|
859
981
|
{
|
|
860
982
|
lenses: t,
|
|
861
|
-
activeLens:
|
|
983
|
+
activeLens: s,
|
|
862
984
|
lensMeta: n,
|
|
863
985
|
variant: "pills",
|
|
864
|
-
onLensChange: (
|
|
865
|
-
|
|
986
|
+
onLensChange: (E) => {
|
|
987
|
+
c(E), m(null), y(null), v("");
|
|
866
988
|
}
|
|
867
989
|
}
|
|
868
990
|
),
|
|
869
|
-
|
|
870
|
-
/* @__PURE__ */ a("h3", { className: "cat-lens-headline", children:
|
|
871
|
-
/* @__PURE__ */ a("p", { className: "cat-lens-helper", children:
|
|
991
|
+
S && /* @__PURE__ */ f("div", { className: "cat-lens-meta", children: [
|
|
992
|
+
/* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: S.headline }),
|
|
993
|
+
/* @__PURE__ */ a("p", { className: "cat-lens-helper", children: S.helper })
|
|
872
994
|
] }),
|
|
873
995
|
/* @__PURE__ */ a(
|
|
874
|
-
|
|
996
|
+
ae,
|
|
875
997
|
{
|
|
876
|
-
tiles:
|
|
877
|
-
selectedTileId:
|
|
878
|
-
onSelectTile: (
|
|
879
|
-
|
|
998
|
+
tiles: b,
|
|
999
|
+
selectedTileId: d,
|
|
1000
|
+
onSelectTile: (E, L) => {
|
|
1001
|
+
m(E), y(L);
|
|
880
1002
|
},
|
|
881
|
-
renderTile:
|
|
1003
|
+
renderTile: i
|
|
882
1004
|
}
|
|
883
1005
|
),
|
|
884
|
-
|
|
1006
|
+
_.length > 0 && /* @__PURE__ */ f("div", { className: "cat-more-in-lens", children: [
|
|
885
1007
|
/* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
|
|
886
1008
|
/* @__PURE__ */ a(
|
|
887
|
-
|
|
1009
|
+
ae,
|
|
888
1010
|
{
|
|
889
|
-
tiles:
|
|
890
|
-
selectedTileId:
|
|
891
|
-
onSelectTile: (
|
|
892
|
-
|
|
1011
|
+
tiles: _,
|
|
1012
|
+
selectedTileId: d,
|
|
1013
|
+
onSelectTile: (E, L) => {
|
|
1014
|
+
m(E), y(L);
|
|
893
1015
|
},
|
|
894
|
-
renderTile:
|
|
1016
|
+
renderTile: i
|
|
895
1017
|
}
|
|
896
1018
|
)
|
|
897
1019
|
] }),
|
|
898
|
-
|
|
1020
|
+
b.length === 0 && _.length === 0 && p.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
|
|
899
1021
|
'No metrics match "',
|
|
900
|
-
|
|
1022
|
+
p,
|
|
901
1023
|
'".'
|
|
902
1024
|
] })
|
|
903
1025
|
] })
|
|
@@ -906,67 +1028,67 @@ function xt({
|
|
|
906
1028
|
}
|
|
907
1029
|
);
|
|
908
1030
|
}
|
|
909
|
-
function
|
|
910
|
-
const t =
|
|
911
|
-
return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(
|
|
1031
|
+
function ut() {
|
|
1032
|
+
const t = oe()?.description ?? null;
|
|
1033
|
+
return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(q, { children: t });
|
|
912
1034
|
}
|
|
913
|
-
function
|
|
1035
|
+
function qt({
|
|
914
1036
|
isOpen: e,
|
|
915
1037
|
replacingLabel: t,
|
|
916
|
-
lenses:
|
|
917
|
-
defaultLens:
|
|
918
|
-
tilesByLens: n =
|
|
919
|
-
renderTile:
|
|
1038
|
+
lenses: r = _e,
|
|
1039
|
+
defaultLens: l = Ce,
|
|
1040
|
+
tilesByLens: n = Se,
|
|
1041
|
+
renderTile: i
|
|
920
1042
|
}) {
|
|
921
|
-
const
|
|
1043
|
+
const u = O(), [o, s] = A(l), [c, d] = A(null), [m, h] = A(null), y = n[o] ?? { primary: [] }, p = [...y.primary, ...y.secondary ?? []], v = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), T = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), S = c == null;
|
|
922
1044
|
return /* @__PURE__ */ a(
|
|
923
|
-
|
|
1045
|
+
re.Provider,
|
|
924
1046
|
{
|
|
925
|
-
value: { mode: "replace", selectedTileId:
|
|
1047
|
+
value: { mode: "replace", selectedTileId: c, description: m },
|
|
926
1048
|
children: /* @__PURE__ */ a(
|
|
927
|
-
|
|
1049
|
+
K,
|
|
928
1050
|
{
|
|
929
1051
|
variant: "no-stage",
|
|
930
1052
|
title: "Replace metric",
|
|
931
|
-
onClose:
|
|
1053
|
+
onClose: T,
|
|
932
1054
|
footer: {
|
|
933
|
-
left: /* @__PURE__ */ a(
|
|
1055
|
+
left: /* @__PURE__ */ a(ut, {}),
|
|
934
1056
|
right: /* @__PURE__ */ a(
|
|
935
1057
|
"button",
|
|
936
1058
|
{
|
|
937
1059
|
id: "btn-cat-replace",
|
|
938
1060
|
type: "button",
|
|
939
1061
|
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
940
|
-
disabled:
|
|
941
|
-
onClick:
|
|
1062
|
+
disabled: S,
|
|
1063
|
+
onClick: v,
|
|
942
1064
|
children: "Replace metric"
|
|
943
1065
|
}
|
|
944
1066
|
)
|
|
945
1067
|
},
|
|
946
|
-
children: /* @__PURE__ */
|
|
947
|
-
t && /* @__PURE__ */
|
|
1068
|
+
children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
1069
|
+
t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
|
|
948
1070
|
"replacing ",
|
|
949
1071
|
t
|
|
950
1072
|
] }),
|
|
951
1073
|
/* @__PURE__ */ a(
|
|
952
|
-
|
|
1074
|
+
Ee,
|
|
953
1075
|
{
|
|
954
|
-
lenses:
|
|
955
|
-
activeLens:
|
|
956
|
-
onLensChange: (
|
|
957
|
-
|
|
1076
|
+
lenses: r,
|
|
1077
|
+
activeLens: o,
|
|
1078
|
+
onLensChange: (b) => {
|
|
1079
|
+
s(b), d(null), h(null);
|
|
958
1080
|
}
|
|
959
1081
|
}
|
|
960
1082
|
),
|
|
961
1083
|
/* @__PURE__ */ a(
|
|
962
|
-
|
|
1084
|
+
ae,
|
|
963
1085
|
{
|
|
964
|
-
tiles:
|
|
965
|
-
selectedTileId:
|
|
966
|
-
onSelectTile: (
|
|
967
|
-
|
|
1086
|
+
tiles: p,
|
|
1087
|
+
selectedTileId: c,
|
|
1088
|
+
onSelectTile: (b, _) => {
|
|
1089
|
+
d(b), h(_);
|
|
968
1090
|
},
|
|
969
|
-
renderTile:
|
|
1091
|
+
renderTile: i
|
|
970
1092
|
}
|
|
971
1093
|
)
|
|
972
1094
|
] })
|
|
@@ -975,13 +1097,13 @@ function Et({
|
|
|
975
1097
|
}
|
|
976
1098
|
);
|
|
977
1099
|
}
|
|
978
|
-
const
|
|
979
|
-
function
|
|
980
|
-
return
|
|
1100
|
+
const Te = ye(null);
|
|
1101
|
+
function Pe() {
|
|
1102
|
+
return ve(Te);
|
|
981
1103
|
}
|
|
982
|
-
function
|
|
983
|
-
const t =
|
|
984
|
-
return /* @__PURE__ */
|
|
1104
|
+
function pt(e = {}) {
|
|
1105
|
+
const t = Pe(), r = t?.createPage, l = t?.setPages;
|
|
1106
|
+
return /* @__PURE__ */ f(
|
|
985
1107
|
"div",
|
|
986
1108
|
{
|
|
987
1109
|
className: "panel-footer pm",
|
|
@@ -995,11 +1117,11 @@ function Ze(e = {}) {
|
|
|
995
1117
|
type: "button",
|
|
996
1118
|
className: "btn btn-primary",
|
|
997
1119
|
onClick: () => {
|
|
998
|
-
if (
|
|
999
|
-
|
|
1120
|
+
if (r) {
|
|
1121
|
+
r();
|
|
1000
1122
|
return;
|
|
1001
1123
|
}
|
|
1002
|
-
|
|
1124
|
+
l && l((n) => [
|
|
1003
1125
|
...n,
|
|
1004
1126
|
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
1005
1127
|
]);
|
|
@@ -1011,34 +1133,34 @@ function Ze(e = {}) {
|
|
|
1011
1133
|
}
|
|
1012
1134
|
);
|
|
1013
1135
|
}
|
|
1014
|
-
function
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
-
if (!
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1136
|
+
function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n }) {
|
|
1137
|
+
const i = Pe(), [u, o] = A(!1), s = Q(null);
|
|
1138
|
+
z(() => {
|
|
1139
|
+
if (!u) return;
|
|
1140
|
+
const p = (v) => {
|
|
1141
|
+
s.current && (s.current.contains(v.target) || o(!1));
|
|
1020
1142
|
};
|
|
1021
|
-
return document.addEventListener("mousedown",
|
|
1022
|
-
}, [
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
if (!
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
}, u = () => {
|
|
1029
|
-
r(!1), c?.duplicatePage?.(e.id);
|
|
1143
|
+
return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
|
|
1144
|
+
}, [u]);
|
|
1145
|
+
const c = () => {
|
|
1146
|
+
if (o(!1), t) return t(e.id);
|
|
1147
|
+
if (!i?.renamePage) return;
|
|
1148
|
+
const p = window.prompt("Rename page", e.name);
|
|
1149
|
+
p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
|
|
1030
1150
|
}, d = () => {
|
|
1031
|
-
|
|
1032
|
-
},
|
|
1033
|
-
|
|
1034
|
-
},
|
|
1035
|
-
|
|
1151
|
+
o(!1), i?.duplicatePage?.(e.id);
|
|
1152
|
+
}, m = () => {
|
|
1153
|
+
o(!1), i?.deletePage?.(e.id);
|
|
1154
|
+
}, h = (p) => {
|
|
1155
|
+
p.stopPropagation(), n && !e.active && n(e.id);
|
|
1156
|
+
}, y = ["pm-row"];
|
|
1157
|
+
return e.active && y.push("active"), /* @__PURE__ */ f("div", { ref: s, className: y.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
1036
1158
|
/* @__PURE__ */ a(
|
|
1037
1159
|
"div",
|
|
1038
1160
|
{
|
|
1039
1161
|
className: "pm-handle",
|
|
1040
1162
|
"aria-hidden": "true",
|
|
1041
|
-
onMouseDown: () =>
|
|
1163
|
+
onMouseDown: () => l?.(e.id),
|
|
1042
1164
|
children: "⋮⋮"
|
|
1043
1165
|
}
|
|
1044
1166
|
),
|
|
@@ -1049,8 +1171,8 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: o, onSwitchPage: n
|
|
|
1049
1171
|
role: n && !e.active ? "button" : void 0,
|
|
1050
1172
|
tabIndex: n && !e.active ? 0 : void 0,
|
|
1051
1173
|
onClick: n ? h : void 0,
|
|
1052
|
-
onKeyDown: (
|
|
1053
|
-
!n || e.active || (
|
|
1174
|
+
onKeyDown: (p) => {
|
|
1175
|
+
!n || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), n(e.id));
|
|
1054
1176
|
},
|
|
1055
1177
|
"aria-label": n && !e.active ? `Switch to ${e.name}` : void 0,
|
|
1056
1178
|
children: e.name
|
|
@@ -1063,34 +1185,34 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: o, onSwitchPage: n
|
|
|
1063
1185
|
className: "pm-kebab",
|
|
1064
1186
|
"aria-label": "Page options",
|
|
1065
1187
|
"aria-haspopup": "menu",
|
|
1066
|
-
"aria-expanded":
|
|
1067
|
-
onPointerDown: (
|
|
1068
|
-
onMouseDown: (
|
|
1069
|
-
onClick: (
|
|
1070
|
-
if (
|
|
1071
|
-
|
|
1188
|
+
"aria-expanded": u,
|
|
1189
|
+
onPointerDown: (p) => p.stopPropagation(),
|
|
1190
|
+
onMouseDown: (p) => p.stopPropagation(),
|
|
1191
|
+
onClick: (p) => {
|
|
1192
|
+
if (p.stopPropagation(), r) return r(e.id);
|
|
1193
|
+
o((v) => !v);
|
|
1072
1194
|
},
|
|
1073
1195
|
children: "⋯"
|
|
1074
1196
|
}
|
|
1075
1197
|
),
|
|
1076
|
-
|
|
1198
|
+
u && /* @__PURE__ */ f(
|
|
1077
1199
|
"div",
|
|
1078
1200
|
{
|
|
1079
1201
|
className: "pm-kebab-menu",
|
|
1080
1202
|
role: "menu",
|
|
1081
1203
|
"data-page-id": e.id,
|
|
1082
|
-
onPointerDown: (
|
|
1083
|
-
onMouseDown: (
|
|
1204
|
+
onPointerDown: (p) => p.stopPropagation(),
|
|
1205
|
+
onMouseDown: (p) => p.stopPropagation(),
|
|
1084
1206
|
children: [
|
|
1085
|
-
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick:
|
|
1086
|
-
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick:
|
|
1207
|
+
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
|
|
1208
|
+
/* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
|
|
1087
1209
|
/* @__PURE__ */ a(
|
|
1088
1210
|
"button",
|
|
1089
1211
|
{
|
|
1090
1212
|
type: "button",
|
|
1091
1213
|
role: "menuitem",
|
|
1092
1214
|
className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
|
|
1093
|
-
onClick:
|
|
1215
|
+
onClick: m,
|
|
1094
1216
|
children: "Delete"
|
|
1095
1217
|
}
|
|
1096
1218
|
)
|
|
@@ -1099,121 +1221,121 @@ function ce({ page: e, onRename: t, onKebab: s, onDragStart: o, onSwitchPage: n
|
|
|
1099
1221
|
)
|
|
1100
1222
|
] });
|
|
1101
1223
|
}
|
|
1102
|
-
const
|
|
1224
|
+
const mt = [
|
|
1103
1225
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
1104
1226
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
1105
1227
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
1106
1228
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
1107
1229
|
];
|
|
1108
|
-
function
|
|
1230
|
+
function Qt({
|
|
1109
1231
|
isOpen: e,
|
|
1110
|
-
pages: t =
|
|
1111
|
-
externalPages:
|
|
1112
|
-
activePageId:
|
|
1232
|
+
pages: t = mt,
|
|
1233
|
+
externalPages: r,
|
|
1234
|
+
activePageId: l,
|
|
1113
1235
|
onRename: n,
|
|
1114
|
-
onDuplicate:
|
|
1115
|
-
onDelete:
|
|
1116
|
-
onReorder:
|
|
1117
|
-
onCreatePage:
|
|
1118
|
-
onSwitchPage:
|
|
1236
|
+
onDuplicate: i,
|
|
1237
|
+
onDelete: u,
|
|
1238
|
+
onReorder: o,
|
|
1239
|
+
onCreatePage: s,
|
|
1240
|
+
onSwitchPage: c
|
|
1119
1241
|
}) {
|
|
1120
|
-
const
|
|
1121
|
-
h((
|
|
1122
|
-
}, []),
|
|
1123
|
-
h((
|
|
1124
|
-
const
|
|
1125
|
-
if (!
|
|
1126
|
-
const
|
|
1127
|
-
id: `${
|
|
1128
|
-
name: `${
|
|
1242
|
+
const d = O(), [m, h] = A(() => [...t]), y = M((g, N) => {
|
|
1243
|
+
h((P) => P.map((k) => k.id === g ? { ...k, name: N } : k));
|
|
1244
|
+
}, []), p = M((g) => {
|
|
1245
|
+
h((N) => {
|
|
1246
|
+
const P = N.find((U) => U.id === g);
|
|
1247
|
+
if (!P) return N;
|
|
1248
|
+
const k = {
|
|
1249
|
+
id: `${P.id}-copy-${Date.now()}`,
|
|
1250
|
+
name: `${P.name} copy`,
|
|
1129
1251
|
active: !1
|
|
1130
|
-
},
|
|
1131
|
-
return [...
|
|
1252
|
+
}, D = N.findIndex((U) => U.id === g);
|
|
1253
|
+
return [...N.slice(0, D + 1), k, ...N.slice(D + 1)];
|
|
1132
1254
|
});
|
|
1133
|
-
}, []),
|
|
1134
|
-
h((
|
|
1135
|
-
}, []),
|
|
1136
|
-
h((
|
|
1137
|
-
const
|
|
1138
|
-
return
|
|
1255
|
+
}, []), v = M((g) => {
|
|
1256
|
+
h((N) => N.filter((P) => P.id !== g));
|
|
1257
|
+
}, []), T = M((g) => {
|
|
1258
|
+
h((N) => {
|
|
1259
|
+
const P = new Map(N.map((D) => [D.id, D])), k = g.map((D) => P.get(D)).filter(Boolean);
|
|
1260
|
+
return k.length === N.length ? k : N;
|
|
1139
1261
|
});
|
|
1140
|
-
}, []),
|
|
1141
|
-
(
|
|
1142
|
-
|
|
1143
|
-
},
|
|
1144
|
-
[N]
|
|
1145
|
-
), H = L(
|
|
1146
|
-
(f) => {
|
|
1147
|
-
const P = f[0]?.items.map((T) => T.id) ?? [];
|
|
1148
|
-
P.length > 0 && S && S(P);
|
|
1262
|
+
}, []), S = r != null, b = S ? r : m, _ = l != null ? b.map((g) => ({ ...g, active: g.id === l })) : [...b], x = n ?? (S ? void 0 : y), $ = i ?? (S ? void 0 : p), F = u ?? (S ? void 0 : v), E = o ?? (S ? void 0 : T), L = M(
|
|
1263
|
+
(g) => {
|
|
1264
|
+
S || h(g);
|
|
1149
1265
|
},
|
|
1150
1266
|
[S]
|
|
1151
|
-
),
|
|
1152
|
-
|
|
1267
|
+
), W = M(
|
|
1268
|
+
(g) => {
|
|
1269
|
+
const N = g[0]?.items.map((P) => P.id) ?? [];
|
|
1270
|
+
N.length > 0 && E && E(N);
|
|
1271
|
+
},
|
|
1272
|
+
[E]
|
|
1273
|
+
), G = _.map((g) => `${g.id}:${g.name}`).join("|"), j = E != null && _.length > 1 ? /* @__PURE__ */ a(
|
|
1274
|
+
Le,
|
|
1153
1275
|
{
|
|
1154
1276
|
zones: [
|
|
1155
1277
|
{
|
|
1156
1278
|
zoneKey: "pm-pages",
|
|
1157
|
-
items:
|
|
1279
|
+
items: _.map((g) => ({ ...g, id: g.id }))
|
|
1158
1280
|
}
|
|
1159
1281
|
],
|
|
1160
|
-
onZoneChange:
|
|
1161
|
-
renderZone: (
|
|
1162
|
-
renderItem: (
|
|
1163
|
-
|
|
1282
|
+
onZoneChange: W,
|
|
1283
|
+
renderZone: (g, N, P) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: P }),
|
|
1284
|
+
renderItem: (g) => /* @__PURE__ */ a(
|
|
1285
|
+
he,
|
|
1164
1286
|
{
|
|
1165
|
-
page:
|
|
1166
|
-
onSwitchPage:
|
|
1287
|
+
page: g,
|
|
1288
|
+
onSwitchPage: c
|
|
1167
1289
|
},
|
|
1168
|
-
|
|
1290
|
+
g.id
|
|
1169
1291
|
)
|
|
1170
1292
|
},
|
|
1171
|
-
|
|
1172
|
-
) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children:
|
|
1173
|
-
|
|
1293
|
+
G
|
|
1294
|
+
) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: _.map((g) => /* @__PURE__ */ a(
|
|
1295
|
+
he,
|
|
1174
1296
|
{
|
|
1175
|
-
page:
|
|
1176
|
-
onSwitchPage:
|
|
1297
|
+
page: g,
|
|
1298
|
+
onSwitchPage: c
|
|
1177
1299
|
},
|
|
1178
|
-
|
|
1179
|
-
)) }),
|
|
1300
|
+
g.id
|
|
1301
|
+
)) }), Z = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
|
|
1180
1302
|
return /* @__PURE__ */ a(
|
|
1181
|
-
|
|
1303
|
+
Te.Provider,
|
|
1182
1304
|
{
|
|
1183
1305
|
value: {
|
|
1184
|
-
pages:
|
|
1185
|
-
setPages:
|
|
1186
|
-
renamePage:
|
|
1187
|
-
duplicatePage:
|
|
1188
|
-
deletePage:
|
|
1306
|
+
pages: _,
|
|
1307
|
+
setPages: L,
|
|
1308
|
+
renamePage: x,
|
|
1309
|
+
duplicatePage: $,
|
|
1310
|
+
deletePage: F,
|
|
1189
1311
|
// Sprint 2026-05-20 — propagate live create binding for footer.
|
|
1190
|
-
createPage:
|
|
1312
|
+
createPage: s
|
|
1191
1313
|
},
|
|
1192
1314
|
children: /* @__PURE__ */ a(
|
|
1193
|
-
|
|
1315
|
+
K,
|
|
1194
1316
|
{
|
|
1195
1317
|
variant: "no-stage",
|
|
1196
1318
|
title: "Manage pages",
|
|
1197
|
-
onClose:
|
|
1198
|
-
footer: { right: /* @__PURE__ */ a(
|
|
1199
|
-
children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children:
|
|
1319
|
+
onClose: Z,
|
|
1320
|
+
footer: { right: /* @__PURE__ */ a(pt, {}) },
|
|
1321
|
+
children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: j })
|
|
1200
1322
|
}
|
|
1201
1323
|
)
|
|
1202
1324
|
}
|
|
1203
1325
|
);
|
|
1204
1326
|
}
|
|
1205
|
-
const
|
|
1327
|
+
const Wt = {
|
|
1206
1328
|
SETTINGS: "settings",
|
|
1207
1329
|
CATALOG_ADD: "catalog-add",
|
|
1208
1330
|
CATALOG_REPLACE: "catalog-replace",
|
|
1209
1331
|
PAGE_MGMT: "page-management",
|
|
1210
1332
|
NOTIFICATION_CENTER: "notification-center"
|
|
1211
|
-
},
|
|
1333
|
+
}, ht = {
|
|
1212
1334
|
position: "fixed",
|
|
1213
1335
|
inset: 0,
|
|
1214
1336
|
pointerEvents: "none",
|
|
1215
1337
|
zIndex: 55
|
|
1216
|
-
},
|
|
1338
|
+
}, ft = {
|
|
1217
1339
|
position: "absolute",
|
|
1218
1340
|
inset: 0,
|
|
1219
1341
|
zIndex: 1,
|
|
@@ -1222,358 +1344,355 @@ const Dt = {
|
|
|
1222
1344
|
pointerEvents: "none",
|
|
1223
1345
|
background: "rgba(0, 0, 0, 0.04)"
|
|
1224
1346
|
};
|
|
1225
|
-
function
|
|
1226
|
-
const { state: e, dispatch: t, getCloseLog:
|
|
1227
|
-
|
|
1347
|
+
function Gt() {
|
|
1348
|
+
const { state: e, dispatch: t, getCloseLog: r } = Me();
|
|
1349
|
+
z(() => {
|
|
1228
1350
|
if (e.activePanelId == null) return;
|
|
1229
|
-
function n(
|
|
1230
|
-
|
|
1351
|
+
function n(i) {
|
|
1352
|
+
i.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
1231
1353
|
}
|
|
1232
1354
|
return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
|
|
1233
1355
|
}, [e.activePanelId, t]);
|
|
1234
|
-
const
|
|
1235
|
-
return
|
|
1236
|
-
|
|
1237
|
-
}),
|
|
1356
|
+
const l = Q(e);
|
|
1357
|
+
return Ie(() => {
|
|
1358
|
+
l.current = e;
|
|
1359
|
+
}), z(() => {
|
|
1238
1360
|
if (process.env.NODE_ENV === "production") return;
|
|
1239
1361
|
const n = window;
|
|
1240
1362
|
return n.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), n.__panelsHostHandle = {
|
|
1241
1363
|
dispatch: t,
|
|
1242
|
-
getState: () =>
|
|
1243
|
-
getCloseLog:
|
|
1364
|
+
getState: () => l.current,
|
|
1365
|
+
getCloseLog: r
|
|
1244
1366
|
}, () => {
|
|
1245
1367
|
n.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
1246
1368
|
};
|
|
1247
|
-
}, [t,
|
|
1369
|
+
}, [t, r]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: ht, children: e.activePanelId != null && /* @__PURE__ */ a(
|
|
1248
1370
|
"div",
|
|
1249
1371
|
{
|
|
1250
1372
|
"data-panel-scrim": "true",
|
|
1251
|
-
style:
|
|
1373
|
+
style: ft
|
|
1252
1374
|
}
|
|
1253
1375
|
) });
|
|
1254
1376
|
}
|
|
1255
|
-
const
|
|
1256
|
-
function
|
|
1257
|
-
const [
|
|
1258
|
-
return
|
|
1377
|
+
const gt = 700;
|
|
1378
|
+
function bt(e, t) {
|
|
1379
|
+
const [r, l] = A(null), n = Q(null);
|
|
1380
|
+
return z(() => {
|
|
1259
1381
|
if (e != null) {
|
|
1260
|
-
n.current != null && (clearTimeout(n.current), n.current = null),
|
|
1382
|
+
n.current != null && (clearTimeout(n.current), n.current = null), l(null);
|
|
1261
1383
|
return;
|
|
1262
1384
|
}
|
|
1263
1385
|
if (t) {
|
|
1264
|
-
n.current != null && (clearTimeout(n.current), n.current = null),
|
|
1386
|
+
n.current != null && (clearTimeout(n.current), n.current = null), l(null);
|
|
1265
1387
|
return;
|
|
1266
1388
|
}
|
|
1267
1389
|
return n.current = setTimeout(() => {
|
|
1268
|
-
|
|
1269
|
-
},
|
|
1390
|
+
l(null), n.current = null;
|
|
1391
|
+
}, gt), () => {
|
|
1270
1392
|
n.current != null && (clearTimeout(n.current), n.current = null);
|
|
1271
1393
|
};
|
|
1272
|
-
}, [e, t]),
|
|
1273
|
-
e != null &&
|
|
1274
|
-
}, [e]), e != null ? { panelId: e, isOpen: !0 } :
|
|
1394
|
+
}, [e, t]), z(() => {
|
|
1395
|
+
e != null && l(e);
|
|
1396
|
+
}, [e]), e != null ? { panelId: e, isOpen: !0 } : r != null ? { panelId: r, isOpen: !1 } : { panelId: null, isOpen: !1 };
|
|
1275
1397
|
}
|
|
1276
|
-
function
|
|
1277
|
-
const
|
|
1278
|
-
if (
|
|
1279
|
-
const
|
|
1280
|
-
return
|
|
1398
|
+
function jt({ panelComponents: e, children: t }) {
|
|
1399
|
+
const r = O(), l = r?.state.lastClose?.reason === "section-hidden", n = bt(r?.state.activePanelId ?? null, l);
|
|
1400
|
+
if (r == null || n.panelId == null) return null;
|
|
1401
|
+
const i = n.panelId, u = n.isOpen, o = e?.[i];
|
|
1402
|
+
return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
|
|
1281
1403
|
"[panels] No panel component registered for activePanelId:",
|
|
1282
|
-
|
|
1283
|
-
), null) : /* @__PURE__ */ a(
|
|
1404
|
+
i
|
|
1405
|
+
), null) : /* @__PURE__ */ a(Oe, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
|
|
1284
1406
|
}
|
|
1285
|
-
function
|
|
1407
|
+
function fe(e) {
|
|
1286
1408
|
return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
|
|
1287
1409
|
}
|
|
1288
|
-
const
|
|
1289
|
-
function
|
|
1410
|
+
const yt = 685, ge = 627, vt = "cubic-bezier(0.22, 1, 0.36, 1)", _t = 200;
|
|
1411
|
+
function we(e, t) {
|
|
1290
1412
|
if (typeof window > "u") return t;
|
|
1291
|
-
const
|
|
1292
|
-
if (!
|
|
1293
|
-
const
|
|
1294
|
-
return Number.isNaN(
|
|
1413
|
+
const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
1414
|
+
if (!r) return t;
|
|
1415
|
+
const l = parseFloat(r);
|
|
1416
|
+
return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
|
|
1295
1417
|
}
|
|
1296
|
-
function
|
|
1418
|
+
function Ct(e, t) {
|
|
1297
1419
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1298
1420
|
}
|
|
1299
1421
|
function Y(e) {
|
|
1300
1422
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1301
1423
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const { mountEl: t, chromeEl:
|
|
1304
|
-
if (t == null ||
|
|
1424
|
+
function Nt(e) {
|
|
1425
|
+
const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: n } = e;
|
|
1426
|
+
if (t == null || r == null) {
|
|
1305
1427
|
Y(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
1306
1428
|
return;
|
|
1307
1429
|
}
|
|
1308
|
-
if (
|
|
1430
|
+
if (l) {
|
|
1309
1431
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
1310
1432
|
return;
|
|
1311
1433
|
}
|
|
1312
|
-
if (typeof
|
|
1434
|
+
if (typeof r.animate != "function") {
|
|
1313
1435
|
Y(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
1314
1436
|
return;
|
|
1315
1437
|
}
|
|
1316
|
-
const
|
|
1317
|
-
|
|
1318
|
-
const
|
|
1438
|
+
const i = r.cloneNode(!0);
|
|
1439
|
+
i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1440
|
+
const u = we("--panel-open-dur", yt), o = Ct("--panel-easing", vt), s = r.animate(
|
|
1319
1441
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
1320
|
-
{ duration:
|
|
1442
|
+
{ duration: u, easing: o, fill: "forwards" }
|
|
1321
1443
|
);
|
|
1322
|
-
|
|
1444
|
+
s.addEventListener(
|
|
1323
1445
|
"finish",
|
|
1324
1446
|
() => {
|
|
1325
|
-
|
|
1447
|
+
i.remove(), r.style.zIndex = "", s.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
1326
1448
|
},
|
|
1327
1449
|
{ once: !0 }
|
|
1328
1450
|
);
|
|
1329
1451
|
}
|
|
1330
|
-
function
|
|
1331
|
-
const { mountEl: t, onAssert:
|
|
1452
|
+
function St(e) {
|
|
1453
|
+
const { mountEl: t, onAssert: r } = e;
|
|
1332
1454
|
if (t == null) {
|
|
1333
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e),
|
|
1455
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), ge), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
1334
1456
|
return;
|
|
1335
1457
|
}
|
|
1336
|
-
const
|
|
1337
|
-
let n = !1,
|
|
1338
|
-
const
|
|
1339
|
-
|
|
1340
|
-
},
|
|
1341
|
-
n || (n = !0, t.removeEventListener("transitionend",
|
|
1458
|
+
const l = we("--panel-close-dur", ge);
|
|
1459
|
+
let n = !1, i = null;
|
|
1460
|
+
const u = (s) => {
|
|
1461
|
+
s.target !== t || s.propertyName !== "max-height" || n || (n = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
1462
|
+
}, o = () => {
|
|
1463
|
+
n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
1342
1464
|
};
|
|
1343
|
-
t.addEventListener("transitionend",
|
|
1465
|
+
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(o, l + _t);
|
|
1344
1466
|
}
|
|
1345
|
-
function
|
|
1346
|
-
const { state: t, onAssert:
|
|
1467
|
+
function Et(e) {
|
|
1468
|
+
const { state: t, onAssert: r } = e;
|
|
1347
1469
|
if (t.activePanelId && t.isDirty) {
|
|
1348
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1470
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
1349
1471
|
return;
|
|
1350
1472
|
}
|
|
1351
|
-
const
|
|
1352
|
-
if (!!t.activePanelId &&
|
|
1353
|
-
|
|
1473
|
+
const l = fe(t.activeTrigger), n = fe(e.trigger);
|
|
1474
|
+
if (!!t.activePanelId && l != null && l === n) {
|
|
1475
|
+
Nt(e);
|
|
1354
1476
|
return;
|
|
1355
1477
|
}
|
|
1356
1478
|
if (t.activePanelId) {
|
|
1357
|
-
|
|
1479
|
+
St(e);
|
|
1358
1480
|
return;
|
|
1359
1481
|
}
|
|
1360
|
-
Y(e),
|
|
1482
|
+
Y(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
1361
1483
|
}
|
|
1362
|
-
function
|
|
1484
|
+
function Tt() {
|
|
1363
1485
|
if (!(typeof window > "u"))
|
|
1364
1486
|
return window.__panelsAsserter;
|
|
1365
1487
|
}
|
|
1366
|
-
function
|
|
1367
|
-
const e =
|
|
1368
|
-
return
|
|
1369
|
-
(
|
|
1488
|
+
function Zt() {
|
|
1489
|
+
const e = O(), t = be();
|
|
1490
|
+
return M(
|
|
1491
|
+
(r, l) => {
|
|
1370
1492
|
if (!e)
|
|
1371
1493
|
return;
|
|
1372
|
-
const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null,
|
|
1373
|
-
panelId:
|
|
1374
|
-
trigger:
|
|
1494
|
+
const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
|
|
1495
|
+
panelId: r,
|
|
1496
|
+
trigger: l,
|
|
1375
1497
|
state: e.state,
|
|
1376
1498
|
dispatch: e.dispatch,
|
|
1377
1499
|
mountEl: n,
|
|
1378
|
-
chromeEl:
|
|
1500
|
+
chromeEl: i,
|
|
1379
1501
|
reducedMotion: t,
|
|
1380
|
-
onAssert: (
|
|
1381
|
-
|
|
1502
|
+
onAssert: (o) => {
|
|
1503
|
+
Tt()?.recordTransition?.(o);
|
|
1382
1504
|
}
|
|
1383
1505
|
};
|
|
1384
|
-
|
|
1506
|
+
Et(u);
|
|
1385
1507
|
},
|
|
1386
1508
|
[e, t]
|
|
1387
1509
|
);
|
|
1388
1510
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
}
|
|
1392
|
-
let V = !1, q = null;
|
|
1393
|
-
function X() {
|
|
1511
|
+
let V = !1, X = null;
|
|
1512
|
+
function se() {
|
|
1394
1513
|
const e = [];
|
|
1395
1514
|
let t = "cleaned";
|
|
1396
1515
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
1397
|
-
const
|
|
1398
|
-
|
|
1399
|
-
const n =
|
|
1400
|
-
|
|
1401
|
-
const
|
|
1402
|
-
if (
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1516
|
+
const l = document.querySelectorAll(".gloss-panel-mount");
|
|
1517
|
+
l.length > 1 && e.push(`mount-count=${l.length}`);
|
|
1518
|
+
const n = l[0] ?? null, i = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
|
|
1519
|
+
i.length > 1 && e.push(`chrome-count=${i.length}`);
|
|
1520
|
+
const u = i[0] ?? null;
|
|
1521
|
+
if (u) {
|
|
1522
|
+
const d = u.style.zIndex;
|
|
1523
|
+
d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
|
|
1405
1524
|
}
|
|
1406
|
-
const
|
|
1525
|
+
const o = n ? "present" : "absent", s = u ? "present" : "absent";
|
|
1407
1526
|
return {
|
|
1408
1527
|
valid: e.length === 0,
|
|
1409
|
-
mount:
|
|
1410
|
-
chrome:
|
|
1528
|
+
mount: o,
|
|
1529
|
+
chrome: s,
|
|
1411
1530
|
frozen: t,
|
|
1412
1531
|
orphans: e,
|
|
1413
1532
|
timestamp: Date.now()
|
|
1414
1533
|
};
|
|
1415
1534
|
}
|
|
1416
|
-
const
|
|
1417
|
-
function
|
|
1418
|
-
return { id: e, constraint: t, expected:
|
|
1535
|
+
const J = "8px 8px 0px", ee = "64px", te = "inset(0px 0px 60px 0px)", ne = "inset(0px -40px -40px -40px)";
|
|
1536
|
+
function C(e, t, r, l, n) {
|
|
1537
|
+
return { id: e, constraint: t, expected: r, actual: l, pass: n };
|
|
1419
1538
|
}
|
|
1420
|
-
function
|
|
1539
|
+
function I(e) {
|
|
1421
1540
|
const t = parseInt(e, 10);
|
|
1422
1541
|
return Number.isFinite(t) ? t : NaN;
|
|
1423
1542
|
}
|
|
1424
|
-
function
|
|
1425
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"),
|
|
1543
|
+
function le() {
|
|
1544
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
|
|
1426
1545
|
if (!t)
|
|
1427
|
-
e.push(
|
|
1546
|
+
e.push(C("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
1428
1547
|
else {
|
|
1429
|
-
const
|
|
1548
|
+
const o = getComputedStyle(t), s = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = o.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = d ? parseInt(d[1], 10) : NaN, h = I(s), y = Number.isFinite(m) && Number.isFinite(h) && m === h;
|
|
1430
1549
|
e.push(
|
|
1431
|
-
|
|
1550
|
+
C(
|
|
1432
1551
|
"C1",
|
|
1433
1552
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
1434
1553
|
`inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
|
|
1435
|
-
`--reveal-y=${
|
|
1436
|
-
|
|
1554
|
+
`--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
|
|
1555
|
+
y
|
|
1437
1556
|
)
|
|
1438
1557
|
);
|
|
1439
1558
|
}
|
|
1440
1559
|
if (!t)
|
|
1441
|
-
e.push(
|
|
1560
|
+
e.push(C("C2", "mount padding constant", J, "absent", !1));
|
|
1442
1561
|
else {
|
|
1443
|
-
const
|
|
1444
|
-
e.push(
|
|
1562
|
+
const o = t.style.padding, s = getComputedStyle(t), c = o || s.padding || "", d = c === J || c === "8px 8px 0px 8px";
|
|
1563
|
+
e.push(C("C2", "mount padding constant", J, c || "n/a", d));
|
|
1445
1564
|
}
|
|
1446
1565
|
if (!t)
|
|
1447
|
-
e.push(
|
|
1566
|
+
e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, "absent", !1));
|
|
1448
1567
|
else {
|
|
1449
|
-
const
|
|
1450
|
-
e.push(
|
|
1568
|
+
const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === ee;
|
|
1569
|
+
e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, s || "n/a", c));
|
|
1451
1570
|
}
|
|
1452
|
-
if (!
|
|
1453
|
-
e.push(
|
|
1571
|
+
if (!r)
|
|
1572
|
+
e.push(C("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
1454
1573
|
else {
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1457
|
-
),
|
|
1458
|
-
|
|
1459
|
-
),
|
|
1574
|
+
const o = getComputedStyle(r), s = I(
|
|
1575
|
+
o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
|
|
1576
|
+
), c = I(
|
|
1577
|
+
o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
|
|
1578
|
+
), d = s * 3 + c * 3 - 8, m = I(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(d) && m === d;
|
|
1460
1579
|
e.push(
|
|
1461
|
-
|
|
1580
|
+
C(
|
|
1462
1581
|
"C4",
|
|
1463
1582
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
1464
|
-
`${
|
|
1465
|
-
`${
|
|
1583
|
+
`${d}px (rh=${s} rg=${c})`,
|
|
1584
|
+
`${m}px`,
|
|
1466
1585
|
h
|
|
1467
1586
|
)
|
|
1468
1587
|
);
|
|
1469
1588
|
}
|
|
1470
|
-
if (!
|
|
1589
|
+
if (!l || !r)
|
|
1471
1590
|
e.push(
|
|
1472
|
-
|
|
1591
|
+
C(
|
|
1473
1592
|
"C5",
|
|
1474
1593
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1475
1594
|
"present",
|
|
1476
|
-
`coordinator=${
|
|
1595
|
+
`coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
|
|
1477
1596
|
!1
|
|
1478
1597
|
)
|
|
1479
1598
|
);
|
|
1480
1599
|
else {
|
|
1481
|
-
const
|
|
1600
|
+
const o = getComputedStyle(l), s = getComputedStyle(r), c = o.perspective || l.style.perspective || "", d = (o.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), m = s.perspectiveStyle || r.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
|
|
1482
1601
|
e.push(
|
|
1483
|
-
|
|
1602
|
+
C(
|
|
1484
1603
|
"C5",
|
|
1485
1604
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1486
1605
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
1487
|
-
`perspective=${
|
|
1488
|
-
|
|
1606
|
+
`perspective=${c} origin=${d} chrome-style=${m}`,
|
|
1607
|
+
v
|
|
1489
1608
|
)
|
|
1490
1609
|
);
|
|
1491
1610
|
}
|
|
1492
1611
|
{
|
|
1493
|
-
let
|
|
1612
|
+
let o = !1, s = "absent";
|
|
1494
1613
|
try {
|
|
1495
|
-
for (const
|
|
1496
|
-
let
|
|
1614
|
+
for (const c of Array.from(document.styleSheets)) {
|
|
1615
|
+
let d = [];
|
|
1497
1616
|
try {
|
|
1498
|
-
|
|
1617
|
+
d = Array.from(c.cssRules ?? []);
|
|
1499
1618
|
} catch {
|
|
1500
1619
|
continue;
|
|
1501
1620
|
}
|
|
1502
|
-
for (const
|
|
1503
|
-
if (
|
|
1504
|
-
const
|
|
1505
|
-
|
|
1621
|
+
for (const m of d)
|
|
1622
|
+
if (m.name === "stage-spin") {
|
|
1623
|
+
const y = Array.from(m.cssRules), p = y.find((_) => _.keyText === "0%" || _.keyText === "from"), v = y.find((_) => _.keyText === "100%" || _.keyText === "to"), T = p?.style.transform ?? "", S = v?.style.transform ?? "", b = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
1624
|
+
o = b.test(T) && b.test(S), s = `0%=${T || "n/a"} 100%=${S || "n/a"}`;
|
|
1506
1625
|
break;
|
|
1507
1626
|
}
|
|
1508
|
-
if (
|
|
1627
|
+
if (s !== "absent") break;
|
|
1509
1628
|
}
|
|
1510
1629
|
} catch {
|
|
1511
|
-
|
|
1630
|
+
s = "inspection-error";
|
|
1512
1631
|
}
|
|
1513
1632
|
e.push(
|
|
1514
|
-
|
|
1633
|
+
C(
|
|
1515
1634
|
"C6",
|
|
1516
1635
|
"@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
|
|
1517
1636
|
"both frames rotateY(0)",
|
|
1518
|
-
|
|
1519
|
-
|
|
1637
|
+
s,
|
|
1638
|
+
o
|
|
1520
1639
|
)
|
|
1521
1640
|
);
|
|
1522
1641
|
}
|
|
1523
1642
|
{
|
|
1524
|
-
const
|
|
1643
|
+
const o = document.documentElement, s = getComputedStyle(o), c = s.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), m = I(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), h = I(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), y = Number.isFinite(m) && Number.isFinite(h) && m > h;
|
|
1525
1644
|
e.push(
|
|
1526
|
-
|
|
1645
|
+
C("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, y)
|
|
1527
1646
|
);
|
|
1528
1647
|
}
|
|
1529
1648
|
if (!n)
|
|
1530
|
-
e.push(
|
|
1649
|
+
e.push(C("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
1531
1650
|
else {
|
|
1532
|
-
const
|
|
1651
|
+
const o = getComputedStyle(n), s = o.animationName || "", c = o.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
|
|
1533
1652
|
e.push(
|
|
1534
|
-
|
|
1653
|
+
C(
|
|
1535
1654
|
"C8",
|
|
1536
1655
|
"BellCutout zero computed animation/transition",
|
|
1537
1656
|
"animation:none AND transition:none",
|
|
1538
|
-
`animation=${
|
|
1539
|
-
|
|
1657
|
+
`animation=${s || "n/a"} transition=${c || "n/a"}`,
|
|
1658
|
+
d
|
|
1540
1659
|
)
|
|
1541
1660
|
);
|
|
1542
1661
|
}
|
|
1543
1662
|
if (!t)
|
|
1544
|
-
e.push(
|
|
1663
|
+
e.push(C("C9", "mount closed-state clipPath", te, "absent", !1));
|
|
1545
1664
|
else {
|
|
1546
|
-
const
|
|
1547
|
-
e.push(
|
|
1665
|
+
const o = t.style.clipPath, s = getComputedStyle(t), c = o || s.clipPath || "", d = c === te;
|
|
1666
|
+
e.push(C("C9", "mount closed-state clipPath", te, c || "n/a", d));
|
|
1548
1667
|
}
|
|
1549
|
-
if (!
|
|
1550
|
-
e.push(
|
|
1668
|
+
if (!i)
|
|
1669
|
+
e.push(C("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
1551
1670
|
else {
|
|
1552
|
-
const
|
|
1671
|
+
const o = i.parentElement, s = o === document.body;
|
|
1553
1672
|
e.push(
|
|
1554
|
-
|
|
1673
|
+
C(
|
|
1555
1674
|
"C10",
|
|
1556
1675
|
"bell-popover parentElement === document.body (open)",
|
|
1557
1676
|
"body",
|
|
1558
|
-
|
|
1559
|
-
|
|
1677
|
+
o === document.body ? "body" : o?.tagName ?? "n/a",
|
|
1678
|
+
s
|
|
1560
1679
|
)
|
|
1561
1680
|
);
|
|
1562
1681
|
}
|
|
1563
|
-
if (!
|
|
1564
|
-
e.push(
|
|
1682
|
+
if (!l)
|
|
1683
|
+
e.push(C("C11", "coordinator overflow === visible", "visible", "absent", !1));
|
|
1565
1684
|
else {
|
|
1566
|
-
const
|
|
1567
|
-
e.push(
|
|
1685
|
+
const s = getComputedStyle(l).overflow || l.style.overflow || "", c = s === "visible";
|
|
1686
|
+
e.push(C("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
|
|
1568
1687
|
}
|
|
1569
|
-
if (!
|
|
1570
|
-
e.push(
|
|
1688
|
+
if (!u)
|
|
1689
|
+
e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, "absent", !1));
|
|
1571
1690
|
else {
|
|
1572
|
-
const
|
|
1573
|
-
e.push(
|
|
1691
|
+
const o = u.style.clipPath, s = getComputedStyle(u), c = o || s.clipPath || "", d = c === ne;
|
|
1692
|
+
e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, c || "n/a", d));
|
|
1574
1693
|
}
|
|
1575
1694
|
return e.push(
|
|
1576
|
-
|
|
1695
|
+
C(
|
|
1577
1696
|
"C13",
|
|
1578
1697
|
"same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
|
|
1579
1698
|
"WAAPI driver wired in orchestrator (source-proof)",
|
|
@@ -1581,7 +1700,7 @@ function ne() {
|
|
|
1581
1700
|
"wiring_only"
|
|
1582
1701
|
)
|
|
1583
1702
|
), e.push(
|
|
1584
|
-
|
|
1703
|
+
C(
|
|
1585
1704
|
"C14",
|
|
1586
1705
|
'cross-position handoff transitionend filtered by propertyName="max-height"',
|
|
1587
1706
|
"transitionend filter wired in orchestrator (source-proof)",
|
|
@@ -1590,11 +1709,11 @@ function ne() {
|
|
|
1590
1709
|
)
|
|
1591
1710
|
), e;
|
|
1592
1711
|
}
|
|
1593
|
-
function
|
|
1594
|
-
return
|
|
1712
|
+
function Pt(e) {
|
|
1713
|
+
return le().find((t) => t.id === e);
|
|
1595
1714
|
}
|
|
1596
|
-
function
|
|
1597
|
-
const e =
|
|
1715
|
+
function wt() {
|
|
1716
|
+
const e = se();
|
|
1598
1717
|
return { q12: [
|
|
1599
1718
|
{
|
|
1600
1719
|
id: "Q12-12",
|
|
@@ -1603,84 +1722,83 @@ function pt() {
|
|
|
1603
1722
|
actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
|
|
1604
1723
|
pass: e.valid
|
|
1605
1724
|
}
|
|
1606
|
-
], cc:
|
|
1725
|
+
], cc: le() };
|
|
1607
1726
|
}
|
|
1608
|
-
function
|
|
1727
|
+
function At() {
|
|
1609
1728
|
return {
|
|
1610
|
-
enable:
|
|
1611
|
-
disable:
|
|
1729
|
+
enable: xt,
|
|
1730
|
+
disable: kt,
|
|
1612
1731
|
isEnabled: () => V,
|
|
1613
|
-
getLastReport: () =>
|
|
1732
|
+
getLastReport: () => X,
|
|
1614
1733
|
recordTransition: (e) => {
|
|
1615
|
-
V && (
|
|
1734
|
+
V && (X = { ...e, ...se() });
|
|
1616
1735
|
},
|
|
1617
1736
|
assertOnce: () => {
|
|
1618
|
-
const e =
|
|
1619
|
-
return
|
|
1737
|
+
const e = se();
|
|
1738
|
+
return X = e, e;
|
|
1620
1739
|
},
|
|
1621
|
-
assertCcOnly:
|
|
1622
|
-
getCcRowById:
|
|
1623
|
-
assertPanelTruths:
|
|
1740
|
+
assertCcOnly: le,
|
|
1741
|
+
getCcRowById: Pt,
|
|
1742
|
+
assertPanelTruths: wt
|
|
1624
1743
|
};
|
|
1625
1744
|
}
|
|
1626
|
-
function
|
|
1745
|
+
function xt() {
|
|
1627
1746
|
if (V = !0, typeof window > "u") return;
|
|
1628
|
-
window.__panelsAsserter || (window.__panelsAsserter =
|
|
1747
|
+
window.__panelsAsserter || (window.__panelsAsserter = At(), console.info(
|
|
1629
1748
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
1630
1749
|
));
|
|
1631
1750
|
}
|
|
1632
|
-
function
|
|
1751
|
+
function kt() {
|
|
1633
1752
|
V = !1;
|
|
1634
1753
|
}
|
|
1635
1754
|
export {
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
Mt as useTransitionToPanel
|
|
1755
|
+
en as COMMITS,
|
|
1756
|
+
Kt as CatalogAddShell,
|
|
1757
|
+
Vt as CatalogFooter,
|
|
1758
|
+
qt as CatalogReplaceShell,
|
|
1759
|
+
re as CatalogStateContext,
|
|
1760
|
+
je as CloneCard,
|
|
1761
|
+
et as CloneStage,
|
|
1762
|
+
Ce as MOCK_DEFAULT_LENS,
|
|
1763
|
+
_e as MOCK_LENSES,
|
|
1764
|
+
Ne as MOCK_LENS_META,
|
|
1765
|
+
mt as MOCK_PAGES,
|
|
1766
|
+
Se as MOCK_TILES_BY_LENS,
|
|
1767
|
+
tn as NotificationCenterShell,
|
|
1768
|
+
Wt as PANEL_IDS,
|
|
1769
|
+
pt as PageMgmtFooter,
|
|
1770
|
+
Qt as PageMgmtShell,
|
|
1771
|
+
Te as PageMgmtStateContext,
|
|
1772
|
+
nn as PanelBody,
|
|
1773
|
+
K as PanelChromeV2,
|
|
1774
|
+
an as PanelFooter,
|
|
1775
|
+
Bt as PanelFooterMessage,
|
|
1776
|
+
sn as PanelHeader,
|
|
1777
|
+
rn as PanelHost,
|
|
1778
|
+
Gt as PanelHostShell,
|
|
1779
|
+
Oe as PanelMount,
|
|
1780
|
+
on as PanelNavigation,
|
|
1781
|
+
ln as PanelProvider,
|
|
1782
|
+
jt as PanelSlot,
|
|
1783
|
+
cn as PanelStage,
|
|
1784
|
+
Yt as SettingsShell,
|
|
1785
|
+
le as assertCcOnly,
|
|
1786
|
+
se as assertPanelDomShape,
|
|
1787
|
+
wt as assertPanelTruths,
|
|
1788
|
+
dn as deriveSurfaceState,
|
|
1789
|
+
kt as disablePanelAsserter,
|
|
1790
|
+
xt as enablePanelAsserter,
|
|
1791
|
+
Pt as getCcRowById,
|
|
1792
|
+
un as initialState,
|
|
1793
|
+
fe as positionKey,
|
|
1794
|
+
pn as reducer,
|
|
1795
|
+
Et as transitionToPanel,
|
|
1796
|
+
oe as useCatalogState,
|
|
1797
|
+
Ht as useEditingCardId,
|
|
1798
|
+
Pe as usePageMgmtState,
|
|
1799
|
+
Me as usePanelContext,
|
|
1800
|
+
O as usePanelContextOptional,
|
|
1801
|
+
mn as usePanelCoordinator,
|
|
1802
|
+
be as useReducedMotionPanel,
|
|
1803
|
+
Zt as useTransitionToPanel
|
|
1686
1804
|
};
|