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