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