@mt-gloss/ui 0.1.116 → 0.1.118
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-CeuMPpjt.js → COMMITS-BxJQwv4H.js} +3 -1
- package/composites-panels.js +608 -533
- package/index.js +2 -2
- package/lib/composites/panels/PanelChrome.d.ts +8 -0
- package/lib/composites/panels/chrome-v2/PanelBody.d.ts +5 -0
- package/lib/composites/panels/chrome-v2/PanelChromeV2.d.ts +18 -0
- package/lib/composites/panels/chrome-v2/PanelFooter.d.ts +6 -0
- package/lib/composites/panels/chrome-v2/PanelFooterMessage.d.ts +6 -0
- package/lib/composites/panels/chrome-v2/PanelHeader.d.ts +6 -0
- package/lib/composites/panels/chrome-v2/PanelNavigation.d.ts +5 -0
- package/lib/composites/panels/chrome-v2/PanelStage.d.ts +5 -0
- package/lib/composites/panels/chrome-v2/index.d.ts +17 -0
- package/lib/composites/panels/coordinator/types.d.ts +6 -1
- package/lib/composites/panels/index.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
package/composites-panels.js
CHANGED
|
@@ -1,38 +1,107 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
5
|
-
import { useSensors as
|
|
6
|
-
import { sortableKeyboardCoordinates as
|
|
7
|
-
import { CSS as
|
|
8
|
-
import { M as
|
|
9
|
-
function
|
|
10
|
-
const e =
|
|
1
|
+
import { u as H, h as he, g as Se, S as we, b as Ee, j as $, d as q } from "./COMMITS-BxJQwv4H.js";
|
|
2
|
+
import { C as Kt, c as Yt, P as Wt, f as Gt, i as Qt, r as qt, e as jt } from "./COMMITS-BxJQwv4H.js";
|
|
3
|
+
import { jsx as n, jsxs as p, Fragment as R } from "react/jsx-runtime";
|
|
4
|
+
import F, { useState as x, useRef as V, createContext as fe, useContext as ge, useMemo as oe, useEffect as I, useCallback as k, useLayoutEffect as Pe } from "react";
|
|
5
|
+
import { useSensors as xe, useSensor as ie, PointerSensor as Ae, KeyboardSensor as ke, DndContext as De, closestCenter as Oe } from "@dnd-kit/core";
|
|
6
|
+
import { sortableKeyboardCoordinates as Le, SortableContext as Ie, horizontalListSortingStrategy as Me, arrayMove as $e, useSortable as Re } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS as Fe } from "@dnd-kit/utilities";
|
|
8
|
+
import { M as ce } from "./MetricCard-Cyoxhb_S.js";
|
|
9
|
+
function Dt() {
|
|
10
|
+
const e = H();
|
|
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 Fe({ children: e }) {
|
|
16
|
-
return /* @__PURE__ */ a("div", { className: "clone-stage", children: e });
|
|
17
|
-
}
|
|
18
15
|
function Ue({ span: e, rotating: t = !0, children: l }) {
|
|
19
|
-
const o = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "),
|
|
20
|
-
return /* @__PURE__ */
|
|
16
|
+
const o = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), a = l != null ? "full" : "fallback";
|
|
17
|
+
return /* @__PURE__ */ n("div", { className: o, "data-clone-fidelity": a, children: l });
|
|
18
|
+
}
|
|
19
|
+
function ze({ title: e, onClose: t }) {
|
|
20
|
+
return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__header", children: [
|
|
21
|
+
e != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__title", children: e }),
|
|
22
|
+
/* @__PURE__ */ n(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
id: "panel-close",
|
|
26
|
+
type: "button",
|
|
27
|
+
"aria-label": "Close panel",
|
|
28
|
+
className: "gloss-panel-chrome-v2__close",
|
|
29
|
+
onClick: t,
|
|
30
|
+
children: "×"
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
function He({ children: e }) {
|
|
36
|
+
return /* @__PURE__ */ n(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
"data-panel-stage": !0,
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
className: "gloss-panel-chrome-v2__stage",
|
|
42
|
+
children: e
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
function Ve({ children: e }) {
|
|
47
|
+
return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
|
|
48
|
+
}
|
|
49
|
+
function Be({ children: e }) {
|
|
50
|
+
return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__body", children: e });
|
|
51
|
+
}
|
|
52
|
+
function Ke({ left: e, right: t }) {
|
|
53
|
+
return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer", children: [
|
|
54
|
+
/* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
|
|
55
|
+
/* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-right", children: t })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
function Ye({
|
|
59
|
+
children: e,
|
|
60
|
+
onClose: t,
|
|
61
|
+
title: l,
|
|
62
|
+
variant: o = "no-stage",
|
|
63
|
+
stage: a,
|
|
64
|
+
navigation: i,
|
|
65
|
+
footer: u
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ p(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
"data-chrome": "panel-v2",
|
|
71
|
+
"data-chrome-variant": o,
|
|
72
|
+
role: "dialog",
|
|
73
|
+
"aria-modal": "true",
|
|
74
|
+
className: `gloss-panel-chrome-v2 gloss-panel-chrome-v2--${o}`,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ n(ze, { title: l, onClose: t }),
|
|
77
|
+
o === "with-stage" && /* @__PURE__ */ n(He, { children: a }),
|
|
78
|
+
i != null && /* @__PURE__ */ n(Ve, { children: i }),
|
|
79
|
+
/* @__PURE__ */ n(Be, { children: e }),
|
|
80
|
+
u != null && /* @__PURE__ */ n(Ke, { left: u.left, right: u.right })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
function Ot({ primary: e, secondary: t }) {
|
|
86
|
+
return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
|
|
87
|
+
/* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
|
|
88
|
+
t != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
|
|
89
|
+
] });
|
|
21
90
|
}
|
|
22
|
-
function
|
|
91
|
+
function We({
|
|
23
92
|
value: e,
|
|
24
93
|
onChange: t,
|
|
25
94
|
enabled: l = !1,
|
|
26
95
|
onToggleEnabled: o
|
|
27
96
|
}) {
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
97
|
+
const a = "settings-threshold-enabled";
|
|
98
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
|
|
99
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__toggle-row", children: [
|
|
100
|
+
/* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
|
|
101
|
+
/* @__PURE__ */ n(
|
|
33
102
|
"input",
|
|
34
103
|
{
|
|
35
|
-
id:
|
|
104
|
+
id: a,
|
|
36
105
|
type: "checkbox",
|
|
37
106
|
role: "switch",
|
|
38
107
|
"aria-label": "Enable threshold indicator",
|
|
@@ -43,10 +112,10 @@ function ze({
|
|
|
43
112
|
}
|
|
44
113
|
)
|
|
45
114
|
] }),
|
|
46
|
-
l ? /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
115
|
+
l ? /* @__PURE__ */ p(R, { children: [
|
|
116
|
+
/* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
117
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
|
|
118
|
+
/* @__PURE__ */ n(
|
|
50
119
|
"input",
|
|
51
120
|
{
|
|
52
121
|
id: "settings-threshold-input",
|
|
@@ -62,19 +131,19 @@ function ze({
|
|
|
62
131
|
className: "settings-shell__slider"
|
|
63
132
|
}
|
|
64
133
|
),
|
|
65
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
66
135
|
e,
|
|
67
136
|
"%"
|
|
68
137
|
] })
|
|
69
138
|
] })
|
|
70
|
-
] }) : /* @__PURE__ */
|
|
139
|
+
] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
|
|
71
140
|
] });
|
|
72
141
|
}
|
|
73
|
-
function
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
142
|
+
function Ge({ value: e, onChange: t }) {
|
|
143
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
144
|
+
/* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
145
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
|
|
146
|
+
/* @__PURE__ */ n(
|
|
78
147
|
"input",
|
|
79
148
|
{
|
|
80
149
|
id: "settings-timeframe-input",
|
|
@@ -90,27 +159,27 @@ function He({ value: e, onChange: t }) {
|
|
|
90
159
|
className: "settings-shell__slider"
|
|
91
160
|
}
|
|
92
161
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
94
163
|
e,
|
|
95
164
|
" days"
|
|
96
165
|
] })
|
|
97
166
|
] })
|
|
98
167
|
] });
|
|
99
168
|
}
|
|
100
|
-
function
|
|
101
|
-
const { attributes: l, listeners: o, setNodeRef:
|
|
102
|
-
transform:
|
|
169
|
+
function Qe({ id: e, onRemove: t }) {
|
|
170
|
+
const { attributes: l, listeners: o, setNodeRef: a, transform: i, transition: u, isDragging: r } = Re({ id: e }), s = {
|
|
171
|
+
transform: Fe.Transform.toString(i),
|
|
103
172
|
transition: u,
|
|
104
173
|
opacity: r ? 0.6 : 1
|
|
105
174
|
};
|
|
106
|
-
return /* @__PURE__ */
|
|
175
|
+
return /* @__PURE__ */ p(
|
|
107
176
|
"li",
|
|
108
177
|
{
|
|
109
|
-
ref:
|
|
178
|
+
ref: a,
|
|
110
179
|
style: s,
|
|
111
180
|
className: `settings-shell__slot-pill${r ? " settings-shell__slot-pill--dragging" : ""}`,
|
|
112
181
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ n(
|
|
114
183
|
"button",
|
|
115
184
|
{
|
|
116
185
|
type: "button",
|
|
@@ -118,11 +187,11 @@ function Ve({ id: e, onRemove: t }) {
|
|
|
118
187
|
"aria-label": `Reorder ${e}`,
|
|
119
188
|
...l,
|
|
120
189
|
...o,
|
|
121
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ n("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
|
|
122
191
|
}
|
|
123
192
|
),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ n("span", { className: "settings-shell__slot-pill__label", children: e }),
|
|
194
|
+
/* @__PURE__ */ n(
|
|
126
195
|
"button",
|
|
127
196
|
{
|
|
128
197
|
type: "button",
|
|
@@ -136,40 +205,40 @@ function Ve({ id: e, onRemove: t }) {
|
|
|
136
205
|
}
|
|
137
206
|
);
|
|
138
207
|
}
|
|
139
|
-
function
|
|
140
|
-
const l =
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
), o =
|
|
208
|
+
function qe({ value: e, onChange: t }) {
|
|
209
|
+
const l = xe(
|
|
210
|
+
ie(Ae, { activationConstraint: { distance: 4 } }),
|
|
211
|
+
ie(ke, { coordinateGetter: Le })
|
|
212
|
+
), o = F.useRef(!1), [a, i] = F.useState(!1), u = (s) => {
|
|
144
213
|
const { active: c, over: d } = s;
|
|
145
214
|
if (!d || c.id === d.id) return;
|
|
146
|
-
const
|
|
147
|
-
|
|
215
|
+
const h = e.findIndex((b) => b === c.id), f = e.findIndex((b) => b === d.id);
|
|
216
|
+
h === -1 || f === -1 || t($e([...e], h, f));
|
|
148
217
|
}, r = (s) => {
|
|
149
218
|
o.current || (o.current = !0, i(!0)), t(e.filter((c) => c !== s));
|
|
150
219
|
};
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
e.length === 0 &&
|
|
155
|
-
/* @__PURE__ */
|
|
220
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
|
|
221
|
+
/* @__PURE__ */ n("span", { className: "settings-shell__label", children: "Stack slots" }),
|
|
222
|
+
/* @__PURE__ */ n(De, { sensors: l, collisionDetection: Oe, onDragEnd: u, children: /* @__PURE__ */ n(Ie, { items: [...e], strategy: Me, children: /* @__PURE__ */ n("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ n(Qe, { id: s, onRemove: () => r(s) }, s)) }) }) }),
|
|
223
|
+
e.length === 0 && a && /* @__PURE__ */ n("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
|
|
224
|
+
/* @__PURE__ */ n("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
|
|
156
225
|
] });
|
|
157
226
|
}
|
|
158
|
-
const
|
|
159
|
-
function
|
|
227
|
+
const je = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
228
|
+
function Ze({
|
|
160
229
|
value: e,
|
|
161
230
|
onSelect: t,
|
|
162
231
|
enabled: l = !1,
|
|
163
232
|
onToggleEnabled: o
|
|
164
233
|
}) {
|
|
165
|
-
const
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
234
|
+
const a = "settings-accent-enabled";
|
|
235
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
236
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__toggle-row", children: [
|
|
237
|
+
/* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Override default accent" }),
|
|
238
|
+
/* @__PURE__ */ n(
|
|
170
239
|
"input",
|
|
171
240
|
{
|
|
172
|
-
id:
|
|
241
|
+
id: a,
|
|
173
242
|
type: "checkbox",
|
|
174
243
|
role: "switch",
|
|
175
244
|
"aria-label": "Enable accent override",
|
|
@@ -180,11 +249,11 @@ function Be({
|
|
|
180
249
|
}
|
|
181
250
|
)
|
|
182
251
|
] }),
|
|
183
|
-
l ? /* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
252
|
+
l ? /* @__PURE__ */ p(R, { children: [
|
|
253
|
+
/* @__PURE__ */ n("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
254
|
+
/* @__PURE__ */ n("div", { className: "settings-shell__swatch-row", children: je.map((i) => {
|
|
186
255
|
const u = e === i;
|
|
187
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ n(
|
|
188
257
|
"button",
|
|
189
258
|
{
|
|
190
259
|
type: "button",
|
|
@@ -197,86 +266,130 @@ function Be({
|
|
|
197
266
|
i
|
|
198
267
|
);
|
|
199
268
|
}) })
|
|
200
|
-
] }) : /* @__PURE__ */
|
|
269
|
+
] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
|
|
201
270
|
] });
|
|
202
271
|
}
|
|
203
|
-
const
|
|
204
|
-
function
|
|
272
|
+
const Xe = ["Orders", "Quota", "Unassigned"], Je = ["threshold", "timeframe", "color"];
|
|
273
|
+
function Lt({
|
|
205
274
|
isOpen: e,
|
|
206
275
|
cardSpan: t,
|
|
207
276
|
cardLabel: l = "Metric",
|
|
208
277
|
cardValue: o = "—",
|
|
209
|
-
previewSlot:
|
|
210
|
-
dimensions: i =
|
|
278
|
+
previewSlot: a,
|
|
279
|
+
dimensions: i = Je,
|
|
211
280
|
initialTab: u,
|
|
212
281
|
initialValues: r
|
|
213
282
|
}) {
|
|
214
|
-
const s =
|
|
215
|
-
|
|
283
|
+
const s = H(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, h = he(), f = c?.span, b = t ?? f ?? 1, m = i[0] ?? "threshold", [v, w] = F.useState(u ?? m);
|
|
284
|
+
F.useEffect(() => {
|
|
216
285
|
i.includes(v) || w(m);
|
|
217
286
|
}, [i, v, m]);
|
|
218
|
-
const
|
|
219
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(
|
|
220
|
-
},
|
|
221
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(
|
|
222
|
-
},
|
|
223
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value:
|
|
224
|
-
},
|
|
225
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value:
|
|
226
|
-
}, g = (
|
|
227
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value:
|
|
228
|
-
}, N = (
|
|
229
|
-
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value:
|
|
230
|
-
};
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
287
|
+
const C = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, y = typeof C.threshold == "number" ? C.threshold : typeof r?.threshold == "number" ? r.threshold : 80, D = typeof C.timeframe == "number" ? C.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, B = typeof C.accent == "string" ? C.accent : typeof r?.accent == "string" ? r.accent : null, K = Array.isArray(C.slots) ? C.slots : Array.isArray(r?.slots) ? r.slots : Xe, O = typeof C.thresholdEnabled == "boolean" ? C.thresholdEnabled : typeof r?.thresholdEnabled == "boolean" ? r.thresholdEnabled : !1, Y = typeof C.accentEnabled == "boolean" ? C.accentEnabled : typeof r?.accentEnabled == "boolean" ? r.accentEnabled : !1, W = (P) => {
|
|
288
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(P.target.value) });
|
|
289
|
+
}, G = (P) => {
|
|
290
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(P.target.value) });
|
|
291
|
+
}, le = (P) => {
|
|
292
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: P });
|
|
293
|
+
}, Q = (P) => {
|
|
294
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: P });
|
|
295
|
+
}, g = (P) => {
|
|
296
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: P });
|
|
297
|
+
}, N = (P) => {
|
|
298
|
+
d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: P });
|
|
299
|
+
}, T = s?.state.isDirty ?? !1, E = d;
|
|
300
|
+
return /* @__PURE__ */ n(
|
|
301
|
+
Ye,
|
|
302
|
+
{
|
|
303
|
+
variant: "with-stage",
|
|
304
|
+
title: "Configure metric",
|
|
305
|
+
onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
306
|
+
stage: /* @__PURE__ */ n(Ue, { span: b, rotating: !h, children: a ?? /* @__PURE__ */ p(R, { children: [
|
|
307
|
+
/* @__PURE__ */ n("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: l }),
|
|
308
|
+
/* @__PURE__ */ n("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: o })
|
|
309
|
+
] }) }),
|
|
310
|
+
navigation: /* @__PURE__ */ n(
|
|
311
|
+
Se,
|
|
312
|
+
{
|
|
313
|
+
dimensions: i,
|
|
314
|
+
activeTab: v,
|
|
315
|
+
onSelect: w,
|
|
316
|
+
reduced: h
|
|
317
|
+
}
|
|
318
|
+
),
|
|
319
|
+
footer: {
|
|
320
|
+
left: /* @__PURE__ */ n(
|
|
321
|
+
"button",
|
|
322
|
+
{
|
|
323
|
+
id: "btn-reset",
|
|
324
|
+
type: "button",
|
|
325
|
+
className: "gloss-panel-chrome-v2__footer-btn",
|
|
326
|
+
disabled: !T,
|
|
327
|
+
onClick: () => {
|
|
328
|
+
E != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: E });
|
|
329
|
+
},
|
|
330
|
+
children: "Reset"
|
|
331
|
+
}
|
|
332
|
+
),
|
|
333
|
+
right: /* @__PURE__ */ p(R, { children: [
|
|
334
|
+
/* @__PURE__ */ n(
|
|
335
|
+
"button",
|
|
256
336
|
{
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
337
|
+
id: "settings-cancel",
|
|
338
|
+
type: "button",
|
|
339
|
+
className: "gloss-panel-chrome-v2__footer-btn",
|
|
340
|
+
onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
341
|
+
children: "Cancel"
|
|
261
342
|
}
|
|
262
343
|
),
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
v === "color" && /* @__PURE__ */ a(
|
|
266
|
-
Be,
|
|
344
|
+
/* @__PURE__ */ n(
|
|
345
|
+
"button",
|
|
267
346
|
{
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
347
|
+
id: "settings-apply",
|
|
348
|
+
type: "button",
|
|
349
|
+
className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
|
|
350
|
+
disabled: !T,
|
|
351
|
+
onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
352
|
+
children: "Apply"
|
|
272
353
|
}
|
|
273
354
|
)
|
|
274
|
-
]
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
|
|
355
|
+
] })
|
|
356
|
+
},
|
|
357
|
+
children: /* @__PURE__ */ n("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ p(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
role: "tabpanel",
|
|
361
|
+
id: `settings-tabpanel-${v}`,
|
|
362
|
+
"aria-label": "Settings dimension controls",
|
|
363
|
+
tabIndex: 0,
|
|
364
|
+
className: "settings-shell__tabpanel",
|
|
365
|
+
children: [
|
|
366
|
+
v === "threshold" && /* @__PURE__ */ n(
|
|
367
|
+
We,
|
|
368
|
+
{
|
|
369
|
+
value: y,
|
|
370
|
+
onChange: W,
|
|
371
|
+
enabled: O,
|
|
372
|
+
onToggleEnabled: g
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
v === "timeframe" && /* @__PURE__ */ n(Ge, { value: D, onChange: G }),
|
|
376
|
+
v === "slots" && /* @__PURE__ */ n(qe, { value: K, onChange: Q }),
|
|
377
|
+
v === "color" && /* @__PURE__ */ n(
|
|
378
|
+
Ze,
|
|
379
|
+
{
|
|
380
|
+
value: B,
|
|
381
|
+
onSelect: le,
|
|
382
|
+
enabled: Y,
|
|
383
|
+
onToggleEnabled: N
|
|
384
|
+
}
|
|
385
|
+
)
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
) })
|
|
389
|
+
}
|
|
390
|
+
);
|
|
278
391
|
}
|
|
279
|
-
const
|
|
392
|
+
const be = [
|
|
280
393
|
"Overbought",
|
|
281
394
|
"What's selling",
|
|
282
395
|
"On track vs plan",
|
|
@@ -284,7 +397,7 @@ const ge = [
|
|
|
284
397
|
"Vendor performance",
|
|
285
398
|
"Assortment mix",
|
|
286
399
|
"Customer retention"
|
|
287
|
-
],
|
|
400
|
+
], ve = "Overbought", ae = {
|
|
288
401
|
Overbought: {
|
|
289
402
|
headline: "Am I overbought?",
|
|
290
403
|
helper: "Find slow-moving inventory before discount cycles eat margin."
|
|
@@ -314,8 +427,8 @@ const ge = [
|
|
|
314
427
|
helper: "Repeat-rate and lapsed-account signals from the buyer file."
|
|
315
428
|
}
|
|
316
429
|
};
|
|
317
|
-
|
|
318
|
-
const
|
|
430
|
+
ae["Customer retention"].beta = !0;
|
|
431
|
+
const ye = {
|
|
319
432
|
Overbought: {
|
|
320
433
|
primary: [
|
|
321
434
|
{
|
|
@@ -780,16 +893,16 @@ const ve = {
|
|
|
780
893
|
]
|
|
781
894
|
}
|
|
782
895
|
};
|
|
783
|
-
function
|
|
896
|
+
function _e({
|
|
784
897
|
lenses: e,
|
|
785
898
|
activeLens: t,
|
|
786
899
|
onLensChange: l,
|
|
787
900
|
variant: o = "pills",
|
|
788
|
-
lensMeta:
|
|
901
|
+
lensMeta: a = ae
|
|
789
902
|
}) {
|
|
790
|
-
return o === "pills" ? /* @__PURE__ */
|
|
791
|
-
const u = i === t, r =
|
|
792
|
-
return u && s.push("active"), /* @__PURE__ */
|
|
903
|
+
return o === "pills" ? /* @__PURE__ */ n("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ n("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
|
|
904
|
+
const u = i === t, r = a[i], s = ["cat-pill"];
|
|
905
|
+
return u && s.push("active"), /* @__PURE__ */ p(
|
|
793
906
|
"button",
|
|
794
907
|
{
|
|
795
908
|
type: "button",
|
|
@@ -802,25 +915,25 @@ function ye({
|
|
|
802
915
|
},
|
|
803
916
|
children: [
|
|
804
917
|
i,
|
|
805
|
-
r?.beta && /* @__PURE__ */
|
|
918
|
+
r?.beta && /* @__PURE__ */ n("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
|
|
806
919
|
]
|
|
807
920
|
},
|
|
808
921
|
i
|
|
809
922
|
);
|
|
810
|
-
}) }) }) : /* @__PURE__ */
|
|
923
|
+
}) }) }) : /* @__PURE__ */ n(et, { lenses: e, activeLens: t, onLensChange: l });
|
|
811
924
|
}
|
|
812
|
-
function
|
|
925
|
+
function et({
|
|
813
926
|
lenses: e,
|
|
814
927
|
activeLens: t,
|
|
815
928
|
onLensChange: l
|
|
816
929
|
}) {
|
|
817
|
-
const [o,
|
|
930
|
+
const [o, a] = x(!1), i = V(null), u = () => {
|
|
818
931
|
i.current != null && (window.clearTimeout(i.current), i.current = null);
|
|
819
932
|
}, r = () => {
|
|
820
|
-
u(), i.current = window.setTimeout(() =>
|
|
933
|
+
u(), i.current = window.setTimeout(() => a(!1), 100);
|
|
821
934
|
}, s = e.filter((c) => c !== t);
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
/* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ n("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ p("div", { className: "cat-segmented", children: [
|
|
936
|
+
/* @__PURE__ */ n(
|
|
824
937
|
"button",
|
|
825
938
|
{
|
|
826
939
|
type: "button",
|
|
@@ -830,31 +943,31 @@ function Qe({
|
|
|
830
943
|
children: t
|
|
831
944
|
}
|
|
832
945
|
),
|
|
833
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ p(
|
|
834
947
|
"div",
|
|
835
948
|
{
|
|
836
949
|
className: "cat-seg-more",
|
|
837
950
|
onMouseEnter: () => {
|
|
838
|
-
u(),
|
|
951
|
+
u(), a(!0);
|
|
839
952
|
},
|
|
840
953
|
onMouseLeave: r,
|
|
841
954
|
children: [
|
|
842
|
-
/* @__PURE__ */
|
|
843
|
-
o && /* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ n("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": o, children: "More ▾" }),
|
|
956
|
+
o && /* @__PURE__ */ n(
|
|
844
957
|
"div",
|
|
845
958
|
{
|
|
846
959
|
className: "cat-seg-overflow",
|
|
847
960
|
role: "menu",
|
|
848
961
|
onMouseEnter: u,
|
|
849
962
|
onMouseLeave: r,
|
|
850
|
-
children: s.map((c) => /* @__PURE__ */
|
|
963
|
+
children: s.map((c) => /* @__PURE__ */ n(
|
|
851
964
|
"button",
|
|
852
965
|
{
|
|
853
966
|
type: "button",
|
|
854
967
|
"data-lens": c,
|
|
855
968
|
role: "menuitem",
|
|
856
969
|
onClick: () => {
|
|
857
|
-
l(c),
|
|
970
|
+
l(c), a(!1);
|
|
858
971
|
},
|
|
859
972
|
children: c
|
|
860
973
|
},
|
|
@@ -867,87 +980,87 @@ function Qe({
|
|
|
867
980
|
)
|
|
868
981
|
] }) });
|
|
869
982
|
}
|
|
870
|
-
function
|
|
871
|
-
return /* @__PURE__ */
|
|
872
|
-
const i =
|
|
983
|
+
function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
|
|
984
|
+
return /* @__PURE__ */ n("div", { className: "cat-tiles", children: e.map((a) => {
|
|
985
|
+
const i = a.id === t, u = a.subStats != null && a.subStats.length > 0;
|
|
873
986
|
let r = null;
|
|
874
|
-
u ?
|
|
987
|
+
u ? a.subStats.length === 5 ? r = "span-5" : a.subStats.length === 3 ? r = "span-3" : r = "span-2" : a.stack === !0 && (r = "span-2");
|
|
875
988
|
const s = ["cat-tile"];
|
|
876
|
-
r && s.push(r), i && s.push("selected"),
|
|
989
|
+
r && s.push(r), i && s.push("selected"), a.isNew && s.push("is-new"), a.startHere && s.push("start-here"), a.donut && s.push("has-donut");
|
|
877
990
|
const c = 1;
|
|
878
991
|
let d = 0.7;
|
|
879
|
-
if (
|
|
880
|
-
const
|
|
881
|
-
if (
|
|
882
|
-
const
|
|
883
|
-
Number.isFinite(
|
|
992
|
+
if (a.donut) {
|
|
993
|
+
const h = /([\d.]+)\s*%/.exec(a.value);
|
|
994
|
+
if (h) {
|
|
995
|
+
const f = parseFloat(h[1]);
|
|
996
|
+
Number.isFinite(f) && (d = Math.max(0, Math.min(1, f / 100)));
|
|
884
997
|
}
|
|
885
998
|
}
|
|
886
|
-
return /* @__PURE__ */
|
|
999
|
+
return /* @__PURE__ */ p(
|
|
887
1000
|
"button",
|
|
888
1001
|
{
|
|
889
1002
|
type: "button",
|
|
890
1003
|
className: s.join(" "),
|
|
891
|
-
"data-metric":
|
|
892
|
-
"data-desc":
|
|
1004
|
+
"data-metric": a.id,
|
|
1005
|
+
"data-desc": a.desc,
|
|
893
1006
|
"data-col-span": String(c),
|
|
894
|
-
"data-donut":
|
|
895
|
-
"data-accent":
|
|
1007
|
+
"data-donut": a.donut ? "true" : void 0,
|
|
1008
|
+
"data-accent": a.accent,
|
|
896
1009
|
"aria-pressed": i,
|
|
897
|
-
onClick: () => l(
|
|
898
|
-
style:
|
|
1010
|
+
onClick: () => l(a.id, a.desc),
|
|
1011
|
+
style: a.accent ? { "--cat-tile-accent": a.accent } : void 0,
|
|
899
1012
|
children: [
|
|
900
|
-
|
|
901
|
-
o ? o(
|
|
1013
|
+
a.startHere && /* @__PURE__ */ n("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
|
|
1014
|
+
o ? o(a) : /* @__PURE__ */ n(
|
|
902
1015
|
"div",
|
|
903
1016
|
{
|
|
904
1017
|
className: "cat-tile-primitive-wrapper gloss-metric-card",
|
|
905
1018
|
"data-col-span": "1",
|
|
906
1019
|
style: { pointerEvents: "none", width: "100%", height: "100%" },
|
|
907
1020
|
"aria-hidden": "true",
|
|
908
|
-
children:
|
|
909
|
-
|
|
1021
|
+
children: a.donut ? /* @__PURE__ */ n(
|
|
1022
|
+
ce,
|
|
910
1023
|
{
|
|
911
1024
|
variant: "donut",
|
|
912
|
-
label:
|
|
913
|
-
value:
|
|
1025
|
+
label: a.label,
|
|
1026
|
+
value: a.value,
|
|
914
1027
|
donutValue: d,
|
|
915
1028
|
donutMax: 1,
|
|
916
|
-
accentColor:
|
|
1029
|
+
accentColor: a.accent,
|
|
917
1030
|
colSpan: c
|
|
918
1031
|
}
|
|
919
|
-
) : /* @__PURE__ */
|
|
920
|
-
|
|
1032
|
+
) : /* @__PURE__ */ n(
|
|
1033
|
+
ce,
|
|
921
1034
|
{
|
|
922
1035
|
variant: "standard",
|
|
923
|
-
label:
|
|
924
|
-
value:
|
|
1036
|
+
label: a.label,
|
|
1037
|
+
value: a.value,
|
|
925
1038
|
colSpan: c
|
|
926
1039
|
}
|
|
927
1040
|
)
|
|
928
1041
|
}
|
|
929
1042
|
),
|
|
930
|
-
|
|
931
|
-
|
|
1043
|
+
a.variants && a.variants.length > 0 && /* @__PURE__ */ n("span", { className: "cat-tile-variants", "aria-hidden": "true", children: a.variants.map((h) => /* @__PURE__ */ n("span", { children: h }, h)) }),
|
|
1044
|
+
a.isNew && /* @__PURE__ */ n("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
|
|
932
1045
|
]
|
|
933
1046
|
},
|
|
934
|
-
|
|
1047
|
+
a.id
|
|
935
1048
|
);
|
|
936
1049
|
}) });
|
|
937
1050
|
}
|
|
938
|
-
const
|
|
939
|
-
function
|
|
940
|
-
return
|
|
1051
|
+
const se = fe(null);
|
|
1052
|
+
function tt() {
|
|
1053
|
+
return ge(se);
|
|
941
1054
|
}
|
|
942
|
-
function
|
|
943
|
-
const l =
|
|
1055
|
+
function nt({ mode: e, dispatch: t }) {
|
|
1056
|
+
const l = tt();
|
|
944
1057
|
if (l == null && e == null) return null;
|
|
945
|
-
const o = l?.mode ?? e ?? "add",
|
|
946
|
-
return /* @__PURE__ */
|
|
947
|
-
/* @__PURE__ */
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
1058
|
+
const o = l?.mode ?? e ?? "add", a = l?.selectedTileId ?? null, i = l?.description ?? null, u = a == null;
|
|
1059
|
+
return /* @__PURE__ */ p("div", { className: "panel-footer catalog", children: [
|
|
1060
|
+
/* @__PURE__ */ n("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ n("em", { children: "Tap a metric to see its description" }) }),
|
|
1061
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
1062
|
+
/* @__PURE__ */ n("div", { className: "spacer", style: { flex: 1 } }),
|
|
1063
|
+
/* @__PURE__ */ n(
|
|
951
1064
|
"button",
|
|
952
1065
|
{
|
|
953
1066
|
id: "btn-cat-cancel",
|
|
@@ -957,7 +1070,7 @@ function je({ mode: e, dispatch: t }) {
|
|
|
957
1070
|
children: "Cancel"
|
|
958
1071
|
}
|
|
959
1072
|
),
|
|
960
|
-
o === "add" && /* @__PURE__ */
|
|
1073
|
+
o === "add" && /* @__PURE__ */ n(
|
|
961
1074
|
"button",
|
|
962
1075
|
{
|
|
963
1076
|
id: "btn-cat-add",
|
|
@@ -968,7 +1081,7 @@ function je({ mode: e, dispatch: t }) {
|
|
|
968
1081
|
children: "Add metric"
|
|
969
1082
|
}
|
|
970
1083
|
),
|
|
971
|
-
o === "replace" && /* @__PURE__ */
|
|
1084
|
+
o === "replace" && /* @__PURE__ */ n(
|
|
972
1085
|
"button",
|
|
973
1086
|
{
|
|
974
1087
|
id: "btn-cat-replace",
|
|
@@ -982,7 +1095,7 @@ function je({ mode: e, dispatch: t }) {
|
|
|
982
1095
|
] })
|
|
983
1096
|
] });
|
|
984
1097
|
}
|
|
985
|
-
function
|
|
1098
|
+
function de(e, t) {
|
|
986
1099
|
if (t.length === 0) return !0;
|
|
987
1100
|
const l = t.toLowerCase();
|
|
988
1101
|
if (e.label.toLowerCase().includes(l) || e.value.toLowerCase().includes(l)) return !0;
|
|
@@ -992,29 +1105,29 @@ function ce(e, t) {
|
|
|
992
1105
|
}
|
|
993
1106
|
return !1;
|
|
994
1107
|
}
|
|
995
|
-
function
|
|
1108
|
+
function It({
|
|
996
1109
|
isOpen: e,
|
|
997
|
-
lenses: t =
|
|
998
|
-
defaultLens: l =
|
|
999
|
-
tilesByLens: o =
|
|
1000
|
-
lensMeta:
|
|
1110
|
+
lenses: t = be,
|
|
1111
|
+
defaultLens: l = ve,
|
|
1112
|
+
tilesByLens: o = ye,
|
|
1113
|
+
lensMeta: a = ae,
|
|
1001
1114
|
footerSlot: i,
|
|
1002
1115
|
renderTile: u
|
|
1003
1116
|
}) {
|
|
1004
|
-
const [r, s] =
|
|
1005
|
-
() => v.primary.filter((y) =>
|
|
1117
|
+
const [r, s] = x(l), [c, d] = x(null), [h, f] = x(null), [b, m] = x(""), v = o[r] ?? { primary: [] }, w = a[r], S = oe(
|
|
1118
|
+
() => v.primary.filter((y) => de(y, b)),
|
|
1006
1119
|
[v.primary, b]
|
|
1007
|
-
),
|
|
1008
|
-
() => (v.secondary ?? []).filter((y) =>
|
|
1120
|
+
), C = oe(
|
|
1121
|
+
() => (v.secondary ?? []).filter((y) => de(y, b)),
|
|
1009
1122
|
[v.secondary, b]
|
|
1010
1123
|
);
|
|
1011
|
-
return /* @__PURE__ */
|
|
1012
|
-
|
|
1124
|
+
return /* @__PURE__ */ p(
|
|
1125
|
+
se.Provider,
|
|
1013
1126
|
{
|
|
1014
|
-
value: { mode: "add", selectedTileId: c, description:
|
|
1127
|
+
value: { mode: "add", selectedTileId: c, description: h },
|
|
1015
1128
|
children: [
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ p("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
1130
|
+
/* @__PURE__ */ n("div", { className: "cat-search", children: /* @__PURE__ */ n(
|
|
1018
1131
|
"input",
|
|
1019
1132
|
{
|
|
1020
1133
|
type: "search",
|
|
@@ -1025,48 +1138,48 @@ function wt({
|
|
|
1025
1138
|
onChange: (y) => m(y.target.value)
|
|
1026
1139
|
}
|
|
1027
1140
|
) }),
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
|
|
1141
|
+
/* @__PURE__ */ n(
|
|
1142
|
+
_e,
|
|
1030
1143
|
{
|
|
1031
1144
|
lenses: t,
|
|
1032
1145
|
activeLens: r,
|
|
1033
|
-
lensMeta:
|
|
1146
|
+
lensMeta: a,
|
|
1034
1147
|
variant: "pills",
|
|
1035
1148
|
onLensChange: (y) => {
|
|
1036
|
-
s(y), d(null),
|
|
1149
|
+
s(y), d(null), f(null), m("");
|
|
1037
1150
|
}
|
|
1038
1151
|
}
|
|
1039
1152
|
),
|
|
1040
|
-
w && /* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1153
|
+
w && /* @__PURE__ */ p("div", { className: "cat-lens-meta", children: [
|
|
1154
|
+
/* @__PURE__ */ n("h3", { className: "cat-lens-headline", children: w.headline }),
|
|
1155
|
+
/* @__PURE__ */ n("p", { className: "cat-lens-helper", children: w.helper })
|
|
1043
1156
|
] }),
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
|
|
1157
|
+
/* @__PURE__ */ n(
|
|
1158
|
+
te,
|
|
1046
1159
|
{
|
|
1047
1160
|
tiles: S,
|
|
1048
1161
|
selectedTileId: c,
|
|
1049
|
-
onSelectTile: (y,
|
|
1050
|
-
d(y),
|
|
1162
|
+
onSelectTile: (y, D) => {
|
|
1163
|
+
d(y), f(D);
|
|
1051
1164
|
},
|
|
1052
1165
|
renderTile: u
|
|
1053
1166
|
}
|
|
1054
1167
|
),
|
|
1055
|
-
|
|
1056
|
-
/* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
|
|
1168
|
+
C.length > 0 && /* @__PURE__ */ p("div", { className: "cat-more-in-lens", children: [
|
|
1169
|
+
/* @__PURE__ */ n("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
|
|
1170
|
+
/* @__PURE__ */ n(
|
|
1171
|
+
te,
|
|
1059
1172
|
{
|
|
1060
|
-
tiles:
|
|
1173
|
+
tiles: C,
|
|
1061
1174
|
selectedTileId: c,
|
|
1062
|
-
onSelectTile: (y,
|
|
1063
|
-
d(y),
|
|
1175
|
+
onSelectTile: (y, D) => {
|
|
1176
|
+
d(y), f(D);
|
|
1064
1177
|
},
|
|
1065
1178
|
renderTile: u
|
|
1066
1179
|
}
|
|
1067
1180
|
)
|
|
1068
1181
|
] }),
|
|
1069
|
-
S.length === 0 &&
|
|
1182
|
+
S.length === 0 && C.length === 0 && b.length > 0 && /* @__PURE__ */ p("div", { className: "cat-empty", children: [
|
|
1070
1183
|
'No metrics match "',
|
|
1071
1184
|
b,
|
|
1072
1185
|
'".'
|
|
@@ -1077,43 +1190,43 @@ function wt({
|
|
|
1077
1190
|
}
|
|
1078
1191
|
);
|
|
1079
1192
|
}
|
|
1080
|
-
function
|
|
1193
|
+
function Mt({
|
|
1081
1194
|
isOpen: e,
|
|
1082
1195
|
replacingLabel: t,
|
|
1083
|
-
lenses: l =
|
|
1084
|
-
defaultLens: o =
|
|
1085
|
-
tilesByLens:
|
|
1196
|
+
lenses: l = be,
|
|
1197
|
+
defaultLens: o = ve,
|
|
1198
|
+
tilesByLens: a = ye,
|
|
1086
1199
|
footerSlot: i,
|
|
1087
1200
|
renderTile: u
|
|
1088
1201
|
}) {
|
|
1089
|
-
const [r, s] =
|
|
1090
|
-
return /* @__PURE__ */
|
|
1091
|
-
|
|
1202
|
+
const [r, s] = x(o), [c, d] = x(null), [h, f] = x(null), b = a[r] ?? { primary: [] }, m = [...b.primary, ...b.secondary ?? []];
|
|
1203
|
+
return /* @__PURE__ */ p(
|
|
1204
|
+
se.Provider,
|
|
1092
1205
|
{
|
|
1093
|
-
value: { mode: "replace", selectedTileId: c, description:
|
|
1206
|
+
value: { mode: "replace", selectedTileId: c, description: h },
|
|
1094
1207
|
children: [
|
|
1095
|
-
/* @__PURE__ */
|
|
1096
|
-
t && /* @__PURE__ */
|
|
1208
|
+
/* @__PURE__ */ p("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
1209
|
+
t && /* @__PURE__ */ p("p", { className: "cat-subtitle", children: [
|
|
1097
1210
|
"replacing ",
|
|
1098
1211
|
t
|
|
1099
1212
|
] }),
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
|
|
1213
|
+
/* @__PURE__ */ n(
|
|
1214
|
+
_e,
|
|
1102
1215
|
{
|
|
1103
1216
|
lenses: l,
|
|
1104
1217
|
activeLens: r,
|
|
1105
1218
|
onLensChange: (v) => {
|
|
1106
|
-
s(v), d(null),
|
|
1219
|
+
s(v), d(null), f(null);
|
|
1107
1220
|
}
|
|
1108
1221
|
}
|
|
1109
1222
|
),
|
|
1110
|
-
/* @__PURE__ */
|
|
1111
|
-
|
|
1223
|
+
/* @__PURE__ */ n(
|
|
1224
|
+
te,
|
|
1112
1225
|
{
|
|
1113
1226
|
tiles: m,
|
|
1114
1227
|
selectedTileId: c,
|
|
1115
1228
|
onSelectTile: (v, w) => {
|
|
1116
|
-
d(v),
|
|
1229
|
+
d(v), f(w);
|
|
1117
1230
|
},
|
|
1118
1231
|
renderTile: u
|
|
1119
1232
|
}
|
|
@@ -1124,20 +1237,20 @@ function Et({
|
|
|
1124
1237
|
}
|
|
1125
1238
|
);
|
|
1126
1239
|
}
|
|
1127
|
-
const Ce =
|
|
1128
|
-
function
|
|
1129
|
-
return
|
|
1240
|
+
const Ce = fe(null);
|
|
1241
|
+
function Ne() {
|
|
1242
|
+
return ge(Ce);
|
|
1130
1243
|
}
|
|
1131
|
-
function
|
|
1132
|
-
const t =
|
|
1133
|
-
return /* @__PURE__ */
|
|
1244
|
+
function at(e = {}) {
|
|
1245
|
+
const t = Ne(), l = t?.createPage, o = t?.setPages;
|
|
1246
|
+
return /* @__PURE__ */ p(
|
|
1134
1247
|
"div",
|
|
1135
1248
|
{
|
|
1136
1249
|
className: "panel-footer pm",
|
|
1137
1250
|
style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
|
|
1138
1251
|
children: [
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ n("div", { className: "spacer", style: { flex: 1 } }),
|
|
1253
|
+
/* @__PURE__ */ n(
|
|
1141
1254
|
"button",
|
|
1142
1255
|
{
|
|
1143
1256
|
id: "btn-new-page",
|
|
@@ -1148,8 +1261,8 @@ function Ze(e = {}) {
|
|
|
1148
1261
|
l();
|
|
1149
1262
|
return;
|
|
1150
1263
|
}
|
|
1151
|
-
o && o((
|
|
1152
|
-
...
|
|
1264
|
+
o && o((a) => [
|
|
1265
|
+
...a,
|
|
1153
1266
|
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
1154
1267
|
]);
|
|
1155
1268
|
},
|
|
@@ -1160,9 +1273,9 @@ function Ze(e = {}) {
|
|
|
1160
1273
|
}
|
|
1161
1274
|
);
|
|
1162
1275
|
}
|
|
1163
|
-
function
|
|
1164
|
-
const i =
|
|
1165
|
-
|
|
1276
|
+
function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a }) {
|
|
1277
|
+
const i = Ne(), [u, r] = x(!1), s = V(null);
|
|
1278
|
+
I(() => {
|
|
1166
1279
|
if (!u) return;
|
|
1167
1280
|
const m = (v) => {
|
|
1168
1281
|
s.current && (s.current.contains(v.target) || r(!1));
|
|
@@ -1176,13 +1289,13 @@ function de({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: n
|
|
|
1176
1289
|
m != null && m.trim().length > 0 && i.renamePage(e.id, m.trim());
|
|
1177
1290
|
}, d = () => {
|
|
1178
1291
|
r(!1), i?.duplicatePage?.(e.id);
|
|
1179
|
-
},
|
|
1292
|
+
}, h = () => {
|
|
1180
1293
|
r(!1), i?.deletePage?.(e.id);
|
|
1181
|
-
},
|
|
1182
|
-
m.stopPropagation(),
|
|
1294
|
+
}, f = (m) => {
|
|
1295
|
+
m.stopPropagation(), a && !e.active && a(e.id);
|
|
1183
1296
|
}, b = ["pm-row"];
|
|
1184
|
-
return e.active && b.push("active"), /* @__PURE__ */
|
|
1185
|
-
/* @__PURE__ */
|
|
1297
|
+
return e.active && b.push("active"), /* @__PURE__ */ p("div", { ref: s, className: b.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
1298
|
+
/* @__PURE__ */ n(
|
|
1186
1299
|
"div",
|
|
1187
1300
|
{
|
|
1188
1301
|
className: "pm-handle",
|
|
@@ -1191,21 +1304,21 @@ function de({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: n
|
|
|
1191
1304
|
children: "⋮⋮"
|
|
1192
1305
|
}
|
|
1193
1306
|
),
|
|
1194
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ n(
|
|
1195
1308
|
"div",
|
|
1196
1309
|
{
|
|
1197
1310
|
className: "pm-name",
|
|
1198
|
-
role:
|
|
1199
|
-
tabIndex:
|
|
1200
|
-
onClick:
|
|
1311
|
+
role: a && !e.active ? "button" : void 0,
|
|
1312
|
+
tabIndex: a && !e.active ? 0 : void 0,
|
|
1313
|
+
onClick: a ? f : void 0,
|
|
1201
1314
|
onKeyDown: (m) => {
|
|
1202
|
-
!
|
|
1315
|
+
!a || e.active || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), a(e.id));
|
|
1203
1316
|
},
|
|
1204
|
-
"aria-label":
|
|
1317
|
+
"aria-label": a && !e.active ? `Switch to ${e.name}` : void 0,
|
|
1205
1318
|
children: e.name
|
|
1206
1319
|
}
|
|
1207
1320
|
),
|
|
1208
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ n(
|
|
1209
1322
|
"button",
|
|
1210
1323
|
{
|
|
1211
1324
|
type: "button",
|
|
@@ -1222,7 +1335,7 @@ function de({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: n
|
|
|
1222
1335
|
children: "⋯"
|
|
1223
1336
|
}
|
|
1224
1337
|
),
|
|
1225
|
-
u && /* @__PURE__ */
|
|
1338
|
+
u && /* @__PURE__ */ p(
|
|
1226
1339
|
"div",
|
|
1227
1340
|
{
|
|
1228
1341
|
className: "pm-kebab-menu",
|
|
@@ -1231,15 +1344,15 @@ function de({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: n
|
|
|
1231
1344
|
onPointerDown: (m) => m.stopPropagation(),
|
|
1232
1345
|
onMouseDown: (m) => m.stopPropagation(),
|
|
1233
1346
|
children: [
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
/* @__PURE__ */
|
|
1236
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
|
|
1348
|
+
/* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
|
|
1349
|
+
/* @__PURE__ */ n(
|
|
1237
1350
|
"button",
|
|
1238
1351
|
{
|
|
1239
1352
|
type: "button",
|
|
1240
1353
|
role: "menuitem",
|
|
1241
1354
|
className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
|
|
1242
|
-
onClick:
|
|
1355
|
+
onClick: h,
|
|
1243
1356
|
children: "Delete"
|
|
1244
1357
|
}
|
|
1245
1358
|
)
|
|
@@ -1248,18 +1361,18 @@ function de({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: n
|
|
|
1248
1361
|
)
|
|
1249
1362
|
] });
|
|
1250
1363
|
}
|
|
1251
|
-
const
|
|
1364
|
+
const st = [
|
|
1252
1365
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
1253
1366
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
1254
1367
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
1255
1368
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
1256
1369
|
];
|
|
1257
|
-
function
|
|
1370
|
+
function $t({
|
|
1258
1371
|
isOpen: e,
|
|
1259
|
-
pages: t =
|
|
1372
|
+
pages: t = st,
|
|
1260
1373
|
footerSlot: l,
|
|
1261
1374
|
externalPages: o,
|
|
1262
|
-
activePageId:
|
|
1375
|
+
activePageId: a,
|
|
1263
1376
|
onRename: i,
|
|
1264
1377
|
onDuplicate: u,
|
|
1265
1378
|
onDelete: r,
|
|
@@ -1267,39 +1380,39 @@ function Pt({
|
|
|
1267
1380
|
onCreatePage: c,
|
|
1268
1381
|
onSwitchPage: d
|
|
1269
1382
|
}) {
|
|
1270
|
-
const [
|
|
1271
|
-
|
|
1272
|
-
}, []), m =
|
|
1273
|
-
|
|
1274
|
-
const
|
|
1275
|
-
if (!
|
|
1276
|
-
const
|
|
1277
|
-
id: `${
|
|
1278
|
-
name: `${
|
|
1383
|
+
const [h, f] = x(() => [...t]), b = k((g, N) => {
|
|
1384
|
+
f((T) => T.map((E) => E.id === g ? { ...E, name: N } : E));
|
|
1385
|
+
}, []), m = k((g) => {
|
|
1386
|
+
f((N) => {
|
|
1387
|
+
const T = N.find((M) => M.id === g);
|
|
1388
|
+
if (!T) return N;
|
|
1389
|
+
const E = {
|
|
1390
|
+
id: `${T.id}-copy-${Date.now()}`,
|
|
1391
|
+
name: `${T.name} copy`,
|
|
1279
1392
|
active: !1
|
|
1280
|
-
},
|
|
1281
|
-
return [...N.slice(0,
|
|
1393
|
+
}, A = N.findIndex((M) => M.id === g);
|
|
1394
|
+
return [...N.slice(0, A + 1), E, ...N.slice(A + 1)];
|
|
1282
1395
|
});
|
|
1283
|
-
}, []), v =
|
|
1284
|
-
|
|
1285
|
-
}, []), w =
|
|
1286
|
-
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1396
|
+
}, []), v = k((g) => {
|
|
1397
|
+
f((N) => N.filter((T) => T.id !== g));
|
|
1398
|
+
}, []), w = k((g) => {
|
|
1399
|
+
f((N) => {
|
|
1400
|
+
const T = new Map(N.map((A) => [A.id, A])), E = g.map((A) => T.get(A)).filter(Boolean);
|
|
1401
|
+
return E.length === N.length ? E : N;
|
|
1289
1402
|
});
|
|
1290
|
-
}, []), S = o != null,
|
|
1403
|
+
}, []), S = o != null, C = S ? o : h, y = a != null ? C.map((g) => ({ ...g, active: g.id === a })) : [...C], D = i ?? (S ? void 0 : b), B = u ?? (S ? void 0 : m), K = r ?? (S ? void 0 : v), O = s ?? (S ? void 0 : w), Y = k(
|
|
1291
1404
|
(g) => {
|
|
1292
|
-
S ||
|
|
1405
|
+
S || f(g);
|
|
1293
1406
|
},
|
|
1294
1407
|
[S]
|
|
1295
|
-
),
|
|
1408
|
+
), W = k(
|
|
1296
1409
|
(g) => {
|
|
1297
|
-
const N = g[0]?.items.map((
|
|
1298
|
-
N.length > 0 &&
|
|
1410
|
+
const N = g[0]?.items.map((T) => T.id) ?? [];
|
|
1411
|
+
N.length > 0 && O && O(N);
|
|
1299
1412
|
},
|
|
1300
|
-
[
|
|
1301
|
-
),
|
|
1302
|
-
|
|
1413
|
+
[O]
|
|
1414
|
+
), G = y.map((g) => `${g.id}:${g.name}`).join("|"), Q = O != null && y.length > 1 ? /* @__PURE__ */ n(
|
|
1415
|
+
we,
|
|
1303
1416
|
{
|
|
1304
1417
|
zones: [
|
|
1305
1418
|
{
|
|
@@ -1307,10 +1420,10 @@ function Pt({
|
|
|
1307
1420
|
items: y.map((g) => ({ ...g, id: g.id }))
|
|
1308
1421
|
}
|
|
1309
1422
|
],
|
|
1310
|
-
onZoneChange:
|
|
1311
|
-
renderZone: (g, N,
|
|
1312
|
-
renderItem: (g) => /* @__PURE__ */
|
|
1313
|
-
|
|
1423
|
+
onZoneChange: W,
|
|
1424
|
+
renderZone: (g, N, T) => /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: T }),
|
|
1425
|
+
renderItem: (g) => /* @__PURE__ */ n(
|
|
1426
|
+
ue,
|
|
1314
1427
|
{
|
|
1315
1428
|
page: g,
|
|
1316
1429
|
onSwitchPage: d
|
|
@@ -1318,46 +1431,46 @@ function Pt({
|
|
|
1318
1431
|
g.id
|
|
1319
1432
|
)
|
|
1320
1433
|
},
|
|
1321
|
-
|
|
1322
|
-
) : /* @__PURE__ */
|
|
1323
|
-
|
|
1434
|
+
G
|
|
1435
|
+
) : /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: y.map((g) => /* @__PURE__ */ n(
|
|
1436
|
+
ue,
|
|
1324
1437
|
{
|
|
1325
1438
|
page: g,
|
|
1326
1439
|
onSwitchPage: d
|
|
1327
1440
|
},
|
|
1328
1441
|
g.id
|
|
1329
1442
|
)) });
|
|
1330
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ n(
|
|
1331
1444
|
Ce.Provider,
|
|
1332
1445
|
{
|
|
1333
1446
|
value: {
|
|
1334
1447
|
pages: y,
|
|
1335
1448
|
setPages: Y,
|
|
1336
|
-
renamePage:
|
|
1337
|
-
duplicatePage:
|
|
1449
|
+
renamePage: D,
|
|
1450
|
+
duplicatePage: B,
|
|
1338
1451
|
deletePage: K,
|
|
1339
1452
|
// Sprint 2026-05-20 — propagate live create binding for footer.
|
|
1340
1453
|
createPage: c
|
|
1341
1454
|
},
|
|
1342
|
-
children: /* @__PURE__ */
|
|
1343
|
-
|
|
1344
|
-
l != null && /* @__PURE__ */
|
|
1455
|
+
children: /* @__PURE__ */ p("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
|
|
1456
|
+
Q,
|
|
1457
|
+
l != null && /* @__PURE__ */ n("div", { className: "pm-footer-pin", children: l })
|
|
1345
1458
|
] })
|
|
1346
1459
|
}
|
|
1347
1460
|
);
|
|
1348
1461
|
}
|
|
1349
|
-
const
|
|
1462
|
+
const Rt = {
|
|
1350
1463
|
SETTINGS: "settings",
|
|
1351
1464
|
CATALOG_ADD: "catalog-add",
|
|
1352
1465
|
CATALOG_REPLACE: "catalog-replace",
|
|
1353
1466
|
PAGE_MGMT: "page-management",
|
|
1354
1467
|
NOTIFICATION_CENTER: "notification-center"
|
|
1355
|
-
},
|
|
1468
|
+
}, rt = {
|
|
1356
1469
|
position: "fixed",
|
|
1357
1470
|
inset: 0,
|
|
1358
1471
|
pointerEvents: "none",
|
|
1359
1472
|
zIndex: 55
|
|
1360
|
-
},
|
|
1473
|
+
}, lt = {
|
|
1361
1474
|
position: "absolute",
|
|
1362
1475
|
inset: 0,
|
|
1363
1476
|
zIndex: 1,
|
|
@@ -1366,19 +1479,19 @@ const xt = {
|
|
|
1366
1479
|
pointerEvents: "none",
|
|
1367
1480
|
background: "rgba(0, 0, 0, 0.04)"
|
|
1368
1481
|
};
|
|
1369
|
-
function
|
|
1370
|
-
const { state: e, dispatch: t, getCloseLog: l } =
|
|
1371
|
-
|
|
1482
|
+
function Ft() {
|
|
1483
|
+
const { state: e, dispatch: t, getCloseLog: l } = Ee();
|
|
1484
|
+
I(() => {
|
|
1372
1485
|
if (e.activePanelId == null) return;
|
|
1373
1486
|
function i(u) {
|
|
1374
1487
|
u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
1375
1488
|
}
|
|
1376
1489
|
return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
|
|
1377
1490
|
}, [e.activePanelId, t]);
|
|
1378
|
-
const o =
|
|
1379
|
-
|
|
1491
|
+
const o = V(e);
|
|
1492
|
+
Pe(() => {
|
|
1380
1493
|
o.current = e;
|
|
1381
|
-
}),
|
|
1494
|
+
}), I(() => {
|
|
1382
1495
|
if (process.env.NODE_ENV === "production") return;
|
|
1383
1496
|
const i = window;
|
|
1384
1497
|
return i.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), i.__panelsHostHandle = {
|
|
@@ -1389,39 +1502,39 @@ function At() {
|
|
|
1389
1502
|
i.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
1390
1503
|
};
|
|
1391
1504
|
}, [t, l]);
|
|
1392
|
-
const
|
|
1505
|
+
const a = k(() => {
|
|
1393
1506
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
1394
1507
|
}, [t]);
|
|
1395
|
-
return /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ n("div", { "data-panel-host": "true", style: rt, children: e.activePanelId != null && /* @__PURE__ */ n(
|
|
1396
1509
|
"div",
|
|
1397
1510
|
{
|
|
1398
1511
|
"data-panel-scrim": "true",
|
|
1399
|
-
style:
|
|
1400
|
-
onClick:
|
|
1512
|
+
style: lt,
|
|
1513
|
+
onClick: a
|
|
1401
1514
|
}
|
|
1402
1515
|
) });
|
|
1403
1516
|
}
|
|
1404
|
-
const
|
|
1405
|
-
function
|
|
1406
|
-
const [t, l] =
|
|
1407
|
-
return
|
|
1517
|
+
const ot = 700;
|
|
1518
|
+
function it(e) {
|
|
1519
|
+
const [t, l] = x(null), o = V(null);
|
|
1520
|
+
return I(() => {
|
|
1408
1521
|
if (e != null) {
|
|
1409
1522
|
o.current != null && (clearTimeout(o.current), o.current = null), l(null);
|
|
1410
1523
|
return;
|
|
1411
1524
|
}
|
|
1412
|
-
return l((
|
|
1525
|
+
return l((a) => a), o.current = setTimeout(() => {
|
|
1413
1526
|
l(null), o.current = null;
|
|
1414
|
-
},
|
|
1527
|
+
}, ot), () => {
|
|
1415
1528
|
o.current != null && (clearTimeout(o.current), o.current = null);
|
|
1416
1529
|
};
|
|
1417
|
-
}, [e]),
|
|
1530
|
+
}, [e]), I(() => {
|
|
1418
1531
|
e != null && l(e);
|
|
1419
1532
|
}, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
|
|
1420
1533
|
}
|
|
1421
|
-
function
|
|
1422
|
-
const l =
|
|
1534
|
+
function Ut({ panelComponents: e, children: t }) {
|
|
1535
|
+
const l = H();
|
|
1423
1536
|
if (l == null) return null;
|
|
1424
|
-
const { state: o, dispatch:
|
|
1537
|
+
const { state: o, dispatch: a } = l, i = it(o.activePanelId);
|
|
1425
1538
|
if (i.panelId == null) return null;
|
|
1426
1539
|
const u = i.panelId, r = i.isOpen, s = e?.[u];
|
|
1427
1540
|
if (s == null && t == null)
|
|
@@ -1429,99 +1542,51 @@ function kt({ panelComponents: e, children: t }) {
|
|
|
1429
1542
|
"[panels] No panel component registered for activePanelId:",
|
|
1430
1543
|
u
|
|
1431
1544
|
), null;
|
|
1432
|
-
if (u === "settings")
|
|
1433
|
-
|
|
1434
|
-
return /* @__PURE__ */ a(I, { isOpen: r, children: /* @__PURE__ */ a(
|
|
1435
|
-
M,
|
|
1436
|
-
{
|
|
1437
|
-
isOpen: r,
|
|
1438
|
-
title: "Configure metric",
|
|
1439
|
-
variant: "merged-stage",
|
|
1440
|
-
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1441
|
-
footer: /* @__PURE__ */ f(z, { children: [
|
|
1442
|
-
/* @__PURE__ */ a(
|
|
1443
|
-
"button",
|
|
1444
|
-
{
|
|
1445
|
-
id: "btn-reset",
|
|
1446
|
-
type: "button",
|
|
1447
|
-
className: "gloss-panel-chrome__footer-btn",
|
|
1448
|
-
disabled: !c,
|
|
1449
|
-
onClick: () => {
|
|
1450
|
-
p != null && n({ type: "CLEAR_BUFFER", cardId: p });
|
|
1451
|
-
},
|
|
1452
|
-
children: "Reset"
|
|
1453
|
-
}
|
|
1454
|
-
),
|
|
1455
|
-
/* @__PURE__ */ a("span", { style: { flex: 1 } }),
|
|
1456
|
-
/* @__PURE__ */ a(
|
|
1457
|
-
"button",
|
|
1458
|
-
{
|
|
1459
|
-
id: "settings-cancel",
|
|
1460
|
-
type: "button",
|
|
1461
|
-
className: "gloss-panel-chrome__footer-btn",
|
|
1462
|
-
onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
1463
|
-
children: "Cancel"
|
|
1464
|
-
}
|
|
1465
|
-
),
|
|
1466
|
-
/* @__PURE__ */ a(
|
|
1467
|
-
"button",
|
|
1468
|
-
{
|
|
1469
|
-
id: "settings-apply",
|
|
1470
|
-
type: "button",
|
|
1471
|
-
className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
|
|
1472
|
-
disabled: !c,
|
|
1473
|
-
onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
1474
|
-
children: "Apply"
|
|
1475
|
-
}
|
|
1476
|
-
)
|
|
1477
|
-
] }),
|
|
1478
|
-
children: s != null ? /* @__PURE__ */ a(s, { isOpen: r }) : t
|
|
1479
|
-
}
|
|
1480
|
-
) });
|
|
1481
|
-
}
|
|
1545
|
+
if (u === "settings")
|
|
1546
|
+
return /* @__PURE__ */ n($, { isOpen: r, children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t });
|
|
1482
1547
|
if (u === "catalog-add" || u === "catalog-replace") {
|
|
1483
1548
|
if (s == null) return null;
|
|
1484
1549
|
const c = u === "catalog-replace" ? "replace" : "add";
|
|
1485
|
-
return /* @__PURE__ */
|
|
1486
|
-
|
|
1550
|
+
return /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1551
|
+
q,
|
|
1487
1552
|
{
|
|
1488
1553
|
isOpen: r,
|
|
1489
|
-
onClose: () =>
|
|
1554
|
+
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1490
1555
|
footer: null,
|
|
1491
1556
|
title: c === "replace" ? "Replace metric" : "Add a metric",
|
|
1492
|
-
children: /* @__PURE__ */
|
|
1557
|
+
children: /* @__PURE__ */ n(
|
|
1493
1558
|
s,
|
|
1494
1559
|
{
|
|
1495
1560
|
isOpen: r,
|
|
1496
|
-
footerSlot: /* @__PURE__ */
|
|
1561
|
+
footerSlot: /* @__PURE__ */ n(nt, { mode: c, dispatch: a })
|
|
1497
1562
|
}
|
|
1498
1563
|
)
|
|
1499
1564
|
}
|
|
1500
1565
|
) });
|
|
1501
1566
|
}
|
|
1502
|
-
return u === "page-management" ? s == null ? null : /* @__PURE__ */
|
|
1503
|
-
|
|
1567
|
+
return u === "page-management" ? s == null ? null : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1568
|
+
q,
|
|
1504
1569
|
{
|
|
1505
1570
|
isOpen: r,
|
|
1506
|
-
onClose: () =>
|
|
1571
|
+
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1507
1572
|
footer: null,
|
|
1508
1573
|
title: "Manage pages",
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1574
|
+
children: /* @__PURE__ */ n(s, { isOpen: r, footerSlot: /* @__PURE__ */ n(at, {}) })
|
|
1510
1575
|
}
|
|
1511
|
-
) }) : /* @__PURE__ */
|
|
1512
|
-
|
|
1576
|
+
) }) : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
|
|
1577
|
+
q,
|
|
1513
1578
|
{
|
|
1514
1579
|
isOpen: !0,
|
|
1515
|
-
onClose: () =>
|
|
1580
|
+
onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
1516
1581
|
footer: null,
|
|
1517
|
-
children: s != null ? /* @__PURE__ */
|
|
1582
|
+
children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t
|
|
1518
1583
|
}
|
|
1519
1584
|
) });
|
|
1520
1585
|
}
|
|
1521
|
-
function
|
|
1586
|
+
function pe(e) {
|
|
1522
1587
|
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;
|
|
1523
1588
|
}
|
|
1524
|
-
const
|
|
1589
|
+
const ct = 685, me = 627, dt = "cubic-bezier(0.22, 1, 0.36, 1)", ut = 200;
|
|
1525
1590
|
function Te(e, t) {
|
|
1526
1591
|
if (typeof window > "u") return t;
|
|
1527
1592
|
const l = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
@@ -1529,114 +1594,117 @@ function Te(e, t) {
|
|
|
1529
1594
|
const o = parseFloat(l);
|
|
1530
1595
|
return Number.isNaN(o) ? t : l.endsWith("s") && !l.endsWith("ms") ? o * 1e3 : o;
|
|
1531
1596
|
}
|
|
1532
|
-
function
|
|
1597
|
+
function pt(e, t) {
|
|
1533
1598
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1534
1599
|
}
|
|
1535
|
-
function
|
|
1600
|
+
function U(e) {
|
|
1536
1601
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1537
1602
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const { mountEl: t, chromeEl: l, reducedMotion: o, onAssert:
|
|
1603
|
+
function mt(e) {
|
|
1604
|
+
const { mountEl: t, chromeEl: l, reducedMotion: o, onAssert: a } = e;
|
|
1540
1605
|
if (t == null || l == null) {
|
|
1541
|
-
|
|
1606
|
+
U(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
1542
1607
|
return;
|
|
1543
1608
|
}
|
|
1544
1609
|
if (o) {
|
|
1545
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
1610
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
1546
1611
|
return;
|
|
1547
1612
|
}
|
|
1548
1613
|
if (typeof l.animate != "function") {
|
|
1549
|
-
|
|
1614
|
+
U(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
1550
1615
|
return;
|
|
1551
1616
|
}
|
|
1552
1617
|
const i = l.cloneNode(!0);
|
|
1553
1618
|
i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), l.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
1554
|
-
const u = Te("--panel-open-dur",
|
|
1619
|
+
const u = Te("--panel-open-dur", ct), r = pt("--panel-easing", dt), s = l.animate(
|
|
1555
1620
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
1556
1621
|
{ duration: u, easing: r, fill: "forwards" }
|
|
1557
1622
|
);
|
|
1558
1623
|
s.addEventListener(
|
|
1559
1624
|
"finish",
|
|
1560
1625
|
() => {
|
|
1561
|
-
i.remove(), l.style.zIndex = "", s.cancel(),
|
|
1626
|
+
i.remove(), l.style.zIndex = "", s.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
1562
1627
|
},
|
|
1563
1628
|
{ once: !0 }
|
|
1564
1629
|
);
|
|
1565
1630
|
}
|
|
1566
|
-
function
|
|
1631
|
+
function ht(e) {
|
|
1567
1632
|
const { mountEl: t, onAssert: l } = e;
|
|
1568
1633
|
if (t == null) {
|
|
1569
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
1634
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => U(e), me), l?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
1570
1635
|
return;
|
|
1571
1636
|
}
|
|
1572
|
-
const o = Te("--panel-close-dur",
|
|
1573
|
-
let
|
|
1637
|
+
const o = Te("--panel-close-dur", me);
|
|
1638
|
+
let a = !1, i = null;
|
|
1574
1639
|
const u = (s) => {
|
|
1575
|
-
s.target !== t || s.propertyName !== "max-height" ||
|
|
1640
|
+
s.target !== t || s.propertyName !== "max-height" || a || (a = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
1576
1641
|
}, r = () => {
|
|
1577
|
-
|
|
1642
|
+
a || (a = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
1578
1643
|
};
|
|
1579
|
-
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(r, o +
|
|
1644
|
+
t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(r, o + ut);
|
|
1580
1645
|
}
|
|
1581
|
-
function
|
|
1646
|
+
function ft(e) {
|
|
1582
1647
|
const { state: t, onAssert: l } = e;
|
|
1583
1648
|
if (t.activePanelId && t.isDirty) {
|
|
1584
1649
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
1585
1650
|
return;
|
|
1586
1651
|
}
|
|
1587
|
-
const o =
|
|
1588
|
-
if (!!t.activePanelId && o != null && o ===
|
|
1589
|
-
|
|
1652
|
+
const o = pe(t.activeTrigger), a = pe(e.trigger);
|
|
1653
|
+
if (!!t.activePanelId && o != null && o === a) {
|
|
1654
|
+
mt(e);
|
|
1590
1655
|
return;
|
|
1591
1656
|
}
|
|
1592
1657
|
if (t.activePanelId) {
|
|
1593
|
-
|
|
1658
|
+
ht(e);
|
|
1594
1659
|
return;
|
|
1595
1660
|
}
|
|
1596
|
-
|
|
1661
|
+
U(e), l?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
1597
1662
|
}
|
|
1598
|
-
function
|
|
1663
|
+
function gt() {
|
|
1599
1664
|
if (!(typeof window > "u"))
|
|
1600
1665
|
return window.__panelsAsserter;
|
|
1601
1666
|
}
|
|
1602
|
-
function
|
|
1603
|
-
const e =
|
|
1604
|
-
return
|
|
1667
|
+
function zt() {
|
|
1668
|
+
const e = H(), t = he();
|
|
1669
|
+
return k(
|
|
1605
1670
|
(l, o) => {
|
|
1606
1671
|
if (!e)
|
|
1607
1672
|
return;
|
|
1608
|
-
const
|
|
1673
|
+
const a = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
|
|
1609
1674
|
panelId: l,
|
|
1610
1675
|
trigger: o,
|
|
1611
1676
|
state: e.state,
|
|
1612
1677
|
dispatch: e.dispatch,
|
|
1613
|
-
mountEl:
|
|
1678
|
+
mountEl: a,
|
|
1614
1679
|
chromeEl: i,
|
|
1615
1680
|
reducedMotion: t,
|
|
1616
1681
|
onAssert: (r) => {
|
|
1617
|
-
|
|
1682
|
+
gt()?.recordTransition?.(r);
|
|
1618
1683
|
}
|
|
1619
1684
|
};
|
|
1620
|
-
|
|
1685
|
+
ft(u);
|
|
1621
1686
|
},
|
|
1622
1687
|
[e, t]
|
|
1623
1688
|
);
|
|
1624
1689
|
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1690
|
+
function Ht({ children: e }) {
|
|
1691
|
+
return /* @__PURE__ */ n("div", { className: "clone-stage", children: e });
|
|
1692
|
+
}
|
|
1693
|
+
let z = !1, j = null;
|
|
1694
|
+
function ne() {
|
|
1627
1695
|
const e = [];
|
|
1628
1696
|
let t = "cleaned";
|
|
1629
1697
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
1630
1698
|
const o = document.querySelectorAll(".gloss-panel-mount");
|
|
1631
1699
|
o.length > 1 && e.push(`mount-count=${o.length}`);
|
|
1632
|
-
const
|
|
1700
|
+
const a = o[0] ?? null, i = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
|
|
1633
1701
|
i.length > 1 && e.push(`chrome-count=${i.length}`);
|
|
1634
1702
|
const u = i[0] ?? null;
|
|
1635
1703
|
if (u) {
|
|
1636
1704
|
const d = u.style.zIndex;
|
|
1637
1705
|
d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
|
|
1638
1706
|
}
|
|
1639
|
-
const r =
|
|
1707
|
+
const r = a ? "present" : "absent", s = u ? "present" : "absent";
|
|
1640
1708
|
return {
|
|
1641
1709
|
valid: e.length === 0,
|
|
1642
1710
|
mount: r,
|
|
@@ -1646,57 +1714,57 @@ function te() {
|
|
|
1646
1714
|
timestamp: Date.now()
|
|
1647
1715
|
};
|
|
1648
1716
|
}
|
|
1649
|
-
const
|
|
1650
|
-
function _(e, t, l, o,
|
|
1651
|
-
return { id: e, constraint: t, expected: l, actual: o, pass:
|
|
1717
|
+
const Z = "8px 8px 0px", X = "64px", J = "inset(0px 0px 60px 0px)", ee = "inset(0px -40px -40px -40px)";
|
|
1718
|
+
function _(e, t, l, o, a) {
|
|
1719
|
+
return { id: e, constraint: t, expected: l, actual: o, pass: a };
|
|
1652
1720
|
}
|
|
1653
|
-
function
|
|
1721
|
+
function L(e) {
|
|
1654
1722
|
const t = parseInt(e, 10);
|
|
1655
1723
|
return Number.isFinite(t) ? t : NaN;
|
|
1656
1724
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"), l = t?.querySelector(".gloss-panel-chrome") ?? null, o = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"),
|
|
1725
|
+
function re() {
|
|
1726
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), l = t?.querySelector(".gloss-panel-chrome") ?? null, o = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), a = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
|
|
1659
1727
|
if (!t)
|
|
1660
1728
|
e.push(_("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
1661
1729
|
else {
|
|
1662
|
-
const r = getComputedStyle(t), s = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = r.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/),
|
|
1730
|
+
const r = getComputedStyle(t), s = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = r.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), h = d ? parseInt(d[1], 10) : NaN, f = L(s), b = Number.isFinite(h) && Number.isFinite(f) && h === f;
|
|
1663
1731
|
e.push(
|
|
1664
1732
|
_(
|
|
1665
1733
|
"C1",
|
|
1666
1734
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
1667
|
-
`inset(0 0 ${
|
|
1735
|
+
`inset(0 0 ${f}px 0) === --reveal-y(${f}px)`,
|
|
1668
1736
|
`--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
|
|
1669
1737
|
b
|
|
1670
1738
|
)
|
|
1671
1739
|
);
|
|
1672
1740
|
}
|
|
1673
1741
|
if (!t)
|
|
1674
|
-
e.push(_("C2", "mount padding constant",
|
|
1742
|
+
e.push(_("C2", "mount padding constant", Z, "absent", !1));
|
|
1675
1743
|
else {
|
|
1676
|
-
const r = t.style.padding, s = getComputedStyle(t), c = r || s.padding || "", d = c ===
|
|
1677
|
-
e.push(_("C2", "mount padding constant",
|
|
1744
|
+
const r = t.style.padding, s = getComputedStyle(t), c = r || s.padding || "", d = c === Z || c === "8px 8px 0px 8px";
|
|
1745
|
+
e.push(_("C2", "mount padding constant", Z, c || "n/a", d));
|
|
1678
1746
|
}
|
|
1679
1747
|
if (!t)
|
|
1680
|
-
e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px",
|
|
1748
|
+
e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px", X, "absent", !1));
|
|
1681
1749
|
else {
|
|
1682
|
-
const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s ===
|
|
1683
|
-
e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px",
|
|
1750
|
+
const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === X;
|
|
1751
|
+
e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px", X, s || "n/a", c));
|
|
1684
1752
|
}
|
|
1685
1753
|
if (!l)
|
|
1686
1754
|
e.push(_("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
1687
1755
|
else {
|
|
1688
|
-
const r = getComputedStyle(l), s =
|
|
1756
|
+
const r = getComputedStyle(l), s = L(
|
|
1689
1757
|
r.getPropertyValue("--row-h").trim() || l.style.getPropertyValue("--row-h").trim() || "0"
|
|
1690
|
-
), c =
|
|
1758
|
+
), c = L(
|
|
1691
1759
|
r.getPropertyValue("--row-gap").trim() || l.style.getPropertyValue("--row-gap").trim() || "0"
|
|
1692
|
-
), d = s * 3 + c * 3 - 8,
|
|
1760
|
+
), d = s * 3 + c * 3 - 8, h = L(r.height || l.style.height || ""), f = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(h) && Number.isFinite(d) && h === d;
|
|
1693
1761
|
e.push(
|
|
1694
1762
|
_(
|
|
1695
1763
|
"C4",
|
|
1696
1764
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
1697
1765
|
`${d}px (rh=${s} rg=${c})`,
|
|
1698
|
-
`${
|
|
1699
|
-
|
|
1766
|
+
`${h}px`,
|
|
1767
|
+
f
|
|
1700
1768
|
)
|
|
1701
1769
|
);
|
|
1702
1770
|
}
|
|
@@ -1711,13 +1779,13 @@ function se() {
|
|
|
1711
1779
|
)
|
|
1712
1780
|
);
|
|
1713
1781
|
else {
|
|
1714
|
-
const r = getComputedStyle(o), s = getComputedStyle(l), c = r.perspective || o.style.perspective || "", d = (r.perspectiveOrigin || o.style.perspectiveOrigin || "").trim(),
|
|
1782
|
+
const r = getComputedStyle(o), s = getComputedStyle(l), c = r.perspective || o.style.perspective || "", d = (r.perspectiveOrigin || o.style.perspectiveOrigin || "").trim(), h = s.perspectiveStyle || l.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && h === "flat";
|
|
1715
1783
|
e.push(
|
|
1716
1784
|
_(
|
|
1717
1785
|
"C5",
|
|
1718
1786
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
1719
1787
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
1720
|
-
`perspective=${c} origin=${d} chrome-style=${
|
|
1788
|
+
`perspective=${c} origin=${d} chrome-style=${h}`,
|
|
1721
1789
|
v
|
|
1722
1790
|
)
|
|
1723
1791
|
);
|
|
@@ -1732,10 +1800,10 @@ function se() {
|
|
|
1732
1800
|
} catch {
|
|
1733
1801
|
continue;
|
|
1734
1802
|
}
|
|
1735
|
-
for (const
|
|
1736
|
-
if (
|
|
1737
|
-
const b = Array.from(
|
|
1738
|
-
r =
|
|
1803
|
+
for (const h of d)
|
|
1804
|
+
if (h.name === "stage-spin") {
|
|
1805
|
+
const b = Array.from(h.cssRules), m = b.find((y) => y.keyText === "0%" || y.keyText === "from"), v = b.find((y) => y.keyText === "100%" || y.keyText === "to"), w = m?.style.transform ?? "", S = v?.style.transform ?? "", C = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
1806
|
+
r = C.test(w) && C.test(S), s = `0%=${w || "n/a"} 100%=${S || "n/a"}`;
|
|
1739
1807
|
break;
|
|
1740
1808
|
}
|
|
1741
1809
|
if (s !== "absent") break;
|
|
@@ -1754,15 +1822,15 @@ function se() {
|
|
|
1754
1822
|
);
|
|
1755
1823
|
}
|
|
1756
1824
|
{
|
|
1757
|
-
const r = document.documentElement, s = getComputedStyle(r), c = s.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(),
|
|
1825
|
+
const r = document.documentElement, s = getComputedStyle(r), c = s.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), h = L(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), f = L(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), b = Number.isFinite(h) && Number.isFinite(f) && h > f;
|
|
1758
1826
|
e.push(
|
|
1759
1827
|
_("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, b)
|
|
1760
1828
|
);
|
|
1761
1829
|
}
|
|
1762
|
-
if (!
|
|
1830
|
+
if (!a)
|
|
1763
1831
|
e.push(_("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
1764
1832
|
else {
|
|
1765
|
-
const r = getComputedStyle(
|
|
1833
|
+
const r = getComputedStyle(a), s = r.animationName || "", c = r.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
|
|
1766
1834
|
e.push(
|
|
1767
1835
|
_(
|
|
1768
1836
|
"C8",
|
|
@@ -1774,10 +1842,10 @@ function se() {
|
|
|
1774
1842
|
);
|
|
1775
1843
|
}
|
|
1776
1844
|
if (!t)
|
|
1777
|
-
e.push(_("C9", "mount closed-state clipPath",
|
|
1845
|
+
e.push(_("C9", "mount closed-state clipPath", J, "absent", !1));
|
|
1778
1846
|
else {
|
|
1779
|
-
const r = t.style.clipPath, s = getComputedStyle(t), c = r || s.clipPath || "", d = c ===
|
|
1780
|
-
e.push(_("C9", "mount closed-state clipPath",
|
|
1847
|
+
const r = t.style.clipPath, s = getComputedStyle(t), c = r || s.clipPath || "", d = c === J;
|
|
1848
|
+
e.push(_("C9", "mount closed-state clipPath", J, c || "n/a", d));
|
|
1781
1849
|
}
|
|
1782
1850
|
if (!i)
|
|
1783
1851
|
e.push(_("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
@@ -1800,10 +1868,10 @@ function se() {
|
|
|
1800
1868
|
e.push(_("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
|
|
1801
1869
|
}
|
|
1802
1870
|
if (!u)
|
|
1803
|
-
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)",
|
|
1871
|
+
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, "absent", !1));
|
|
1804
1872
|
else {
|
|
1805
|
-
const r = u.style.clipPath, s = getComputedStyle(u), c = r || s.clipPath || "", d = c ===
|
|
1806
|
-
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)",
|
|
1873
|
+
const r = u.style.clipPath, s = getComputedStyle(u), c = r || s.clipPath || "", d = c === ee;
|
|
1874
|
+
e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, c || "n/a", d));
|
|
1807
1875
|
}
|
|
1808
1876
|
return e.push(
|
|
1809
1877
|
_(
|
|
@@ -1823,11 +1891,11 @@ function se() {
|
|
|
1823
1891
|
)
|
|
1824
1892
|
), e;
|
|
1825
1893
|
}
|
|
1826
|
-
function
|
|
1827
|
-
return
|
|
1894
|
+
function bt(e) {
|
|
1895
|
+
return re().find((t) => t.id === e);
|
|
1828
1896
|
}
|
|
1829
|
-
function
|
|
1830
|
-
const e =
|
|
1897
|
+
function vt() {
|
|
1898
|
+
const e = ne();
|
|
1831
1899
|
return { q12: [
|
|
1832
1900
|
{
|
|
1833
1901
|
id: "Q12-12",
|
|
@@ -1836,76 +1904,83 @@ function pt() {
|
|
|
1836
1904
|
actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
|
|
1837
1905
|
pass: e.valid
|
|
1838
1906
|
}
|
|
1839
|
-
], cc:
|
|
1907
|
+
], cc: re() };
|
|
1840
1908
|
}
|
|
1841
|
-
function
|
|
1909
|
+
function yt() {
|
|
1842
1910
|
return {
|
|
1843
|
-
enable:
|
|
1844
|
-
disable:
|
|
1845
|
-
isEnabled: () =>
|
|
1846
|
-
getLastReport: () =>
|
|
1911
|
+
enable: _t,
|
|
1912
|
+
disable: Ct,
|
|
1913
|
+
isEnabled: () => z,
|
|
1914
|
+
getLastReport: () => j,
|
|
1847
1915
|
recordTransition: (e) => {
|
|
1848
|
-
|
|
1916
|
+
z && (j = { ...e, ...ne() });
|
|
1849
1917
|
},
|
|
1850
1918
|
assertOnce: () => {
|
|
1851
|
-
const e =
|
|
1852
|
-
return
|
|
1919
|
+
const e = ne();
|
|
1920
|
+
return j = e, e;
|
|
1853
1921
|
},
|
|
1854
|
-
assertCcOnly:
|
|
1855
|
-
getCcRowById:
|
|
1856
|
-
assertPanelTruths:
|
|
1922
|
+
assertCcOnly: re,
|
|
1923
|
+
getCcRowById: bt,
|
|
1924
|
+
assertPanelTruths: vt
|
|
1857
1925
|
};
|
|
1858
1926
|
}
|
|
1859
|
-
function
|
|
1860
|
-
if (
|
|
1861
|
-
window.__panelsAsserter || (window.__panelsAsserter =
|
|
1927
|
+
function _t() {
|
|
1928
|
+
if (z = !0, typeof window > "u") return;
|
|
1929
|
+
window.__panelsAsserter || (window.__panelsAsserter = yt(), console.info(
|
|
1862
1930
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
1863
1931
|
));
|
|
1864
1932
|
}
|
|
1865
|
-
function
|
|
1866
|
-
|
|
1933
|
+
function Ct() {
|
|
1934
|
+
z = !1;
|
|
1867
1935
|
}
|
|
1868
1936
|
export {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1937
|
+
Kt as COMMITS,
|
|
1938
|
+
It as CatalogAddShell,
|
|
1939
|
+
nt as CatalogFooter,
|
|
1940
|
+
Mt as CatalogReplaceShell,
|
|
1941
|
+
se as CatalogStateContext,
|
|
1874
1942
|
Ue as CloneCard,
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1943
|
+
Ht as CloneStage,
|
|
1944
|
+
ve as MOCK_DEFAULT_LENS,
|
|
1945
|
+
be as MOCK_LENSES,
|
|
1946
|
+
ae as MOCK_LENS_META,
|
|
1947
|
+
st as MOCK_PAGES,
|
|
1948
|
+
ye as MOCK_TILES_BY_LENS,
|
|
1949
|
+
Rt as PANEL_IDS,
|
|
1950
|
+
at as PageMgmtFooter,
|
|
1951
|
+
$t as PageMgmtShell,
|
|
1884
1952
|
Ce as PageMgmtStateContext,
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1953
|
+
Be as PanelBody,
|
|
1954
|
+
q as PanelChrome,
|
|
1955
|
+
Ye as PanelChromeV2,
|
|
1956
|
+
Ke as PanelFooter,
|
|
1957
|
+
Ot as PanelFooterMessage,
|
|
1958
|
+
ze as PanelHeader,
|
|
1959
|
+
Yt as PanelHost,
|
|
1960
|
+
Ft as PanelHostShell,
|
|
1961
|
+
$ as PanelMount,
|
|
1962
|
+
Ve as PanelNavigation,
|
|
1963
|
+
Wt as PanelProvider,
|
|
1964
|
+
Ut as PanelSlot,
|
|
1965
|
+
He as PanelStage,
|
|
1966
|
+
Lt as SettingsShell,
|
|
1967
|
+
re as assertCcOnly,
|
|
1968
|
+
ne as assertPanelDomShape,
|
|
1969
|
+
vt as assertPanelTruths,
|
|
1970
|
+
Gt as deriveSurfaceState,
|
|
1971
|
+
Ct as disablePanelAsserter,
|
|
1972
|
+
_t as enablePanelAsserter,
|
|
1973
|
+
bt as getCcRowById,
|
|
1974
|
+
Qt as initialState,
|
|
1975
|
+
pe as positionKey,
|
|
1976
|
+
qt as reducer,
|
|
1977
|
+
ft as transitionToPanel,
|
|
1978
|
+
tt as useCatalogState,
|
|
1979
|
+
Dt as useEditingCardId,
|
|
1980
|
+
Ne as usePageMgmtState,
|
|
1981
|
+
Ee as usePanelContext,
|
|
1982
|
+
H as usePanelContextOptional,
|
|
1983
|
+
jt as usePanelCoordinator,
|
|
1984
|
+
he as useReducedMotionPanel,
|
|
1985
|
+
zt as useTransitionToPanel
|
|
1911
1986
|
};
|