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