@mt-gloss/ui 0.1.103 → 0.1.105
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-Dm8qIHaq.js → COMMITS-kaUvc5jL.js} +227 -141
- package/composites-panels.js +462 -368
- package/index.js +31 -30
- package/lib/composites/panels/PanelSlot.d.ts +14 -3
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +13 -0
- package/lib/composites/panels/coordinator/types.d.ts +6 -0
- package/lib/composites/panels/shells/SettingsShell.d.ts +6 -1
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +9 -0
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +2 -0
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +6 -0
- package/lib/composites/panels/shells/settings/TimeframeControls.d.ts +6 -0
- package/lib/composites/panels/shells/settings/index.d.ts +12 -0
- package/lib/primitives/dashboard/SettingsTabStrip/SettingsTabStrip.d.ts +17 -0
- package/lib/primitives/dashboard/SettingsTabStrip/index.d.ts +6 -0
- package/lib/primitives/dashboard/SettingsTabStrip/types.d.ts +12 -0
- package/lib/primitives/dashboard/index.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
package/composites-panels.js
CHANGED
|
@@ -1,79 +1,155 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as s, jsxs as
|
|
4
|
-
import { useState as
|
|
5
|
-
function
|
|
1
|
+
import { u as $, f as q, S as se, a as oe, g as E, c as A } from "./COMMITS-kaUvc5jL.js";
|
|
2
|
+
import { C as Xe, b as Je, P as Ze, e as et, i as tt, r as nt, d as st } from "./COMMITS-kaUvc5jL.js";
|
|
3
|
+
import { jsx as s, jsxs as p, Fragment as ae } from "react/jsx-runtime";
|
|
4
|
+
import z, { useState as b, useRef as U, createContext as Y, useContext as K, useEffect as V, useLayoutEffect as re, useCallback as W } from "react";
|
|
5
|
+
function le({ children: e }) {
|
|
6
6
|
return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function ie({ span: e, rotating: t = !0, children: o }) {
|
|
9
9
|
const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" ");
|
|
10
10
|
return /* @__PURE__ */ s("div", { className: n, children: o });
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
function ce({ value: e, onChange: t }) {
|
|
13
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
|
|
14
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
|
|
15
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
|
|
16
|
+
/* @__PURE__ */ s(
|
|
17
|
+
"input",
|
|
18
|
+
{
|
|
19
|
+
id: "settings-threshold-input",
|
|
20
|
+
type: "range",
|
|
21
|
+
min: 0,
|
|
22
|
+
max: 100,
|
|
23
|
+
value: e,
|
|
24
|
+
onChange: t,
|
|
25
|
+
"aria-label": "Threshold",
|
|
26
|
+
"aria-valuenow": e,
|
|
27
|
+
"aria-valuemin": 0,
|
|
28
|
+
"aria-valuemax": 100,
|
|
29
|
+
className: "settings-shell__slider"
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
33
|
+
e,
|
|
34
|
+
"%"
|
|
35
|
+
] })
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function de({ value: e, onChange: t }) {
|
|
40
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
|
|
41
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
|
|
42
|
+
/* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
|
|
43
|
+
/* @__PURE__ */ s(
|
|
44
|
+
"input",
|
|
45
|
+
{
|
|
46
|
+
id: "settings-timeframe-input",
|
|
47
|
+
type: "range",
|
|
48
|
+
min: 7,
|
|
49
|
+
max: 90,
|
|
50
|
+
value: e,
|
|
51
|
+
onChange: t,
|
|
52
|
+
"aria-label": "Timeframe",
|
|
53
|
+
"aria-valuenow": e,
|
|
54
|
+
"aria-valuemin": 7,
|
|
55
|
+
"aria-valuemax": 90,
|
|
56
|
+
className: "settings-shell__slider"
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
|
|
60
|
+
e,
|
|
61
|
+
" days"
|
|
62
|
+
] })
|
|
63
|
+
] })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
const ue = ["Orders", "Quota", "Unassigned"];
|
|
67
|
+
function pe() {
|
|
68
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots (display only)", children: [
|
|
69
|
+
/* @__PURE__ */ s("p", { className: "settings-shell__help", children: "Slots are currently fixed. Drag-to-reorder is coming in a later phase." }),
|
|
70
|
+
/* @__PURE__ */ s("ul", { className: "settings-shell__slots-list", children: ue.map((e) => /* @__PURE__ */ s("li", { className: "settings-shell__slot-pill", children: e }, e)) })
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
const me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
74
|
+
function he({ value: e, onSelect: t }) {
|
|
75
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
|
|
76
|
+
/* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent color" }),
|
|
77
|
+
/* @__PURE__ */ s("div", { className: "settings-shell__swatch-row", children: me.map((o) => {
|
|
78
|
+
const n = e === o;
|
|
79
|
+
return /* @__PURE__ */ s(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
"aria-pressed": n,
|
|
84
|
+
"aria-label": `Accent ${o}`,
|
|
85
|
+
className: `settings-shell__swatch${n ? " settings-shell__swatch--active" : ""}`,
|
|
86
|
+
style: { backgroundColor: o },
|
|
87
|
+
onClick: () => t(o)
|
|
88
|
+
},
|
|
89
|
+
o
|
|
90
|
+
);
|
|
91
|
+
}) })
|
|
92
|
+
] });
|
|
93
|
+
}
|
|
94
|
+
const fe = ["threshold", "timeframe", "color"];
|
|
95
|
+
function Be({
|
|
14
96
|
isOpen: e,
|
|
15
97
|
cardSpan: t,
|
|
16
98
|
cardLabel: o = "Metric",
|
|
17
|
-
cardValue: n = "—"
|
|
99
|
+
cardValue: n = "—",
|
|
100
|
+
dimensions: r = fe,
|
|
101
|
+
initialTab: l
|
|
18
102
|
}) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
103
|
+
const d = $(), i = d?.state.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null, c = q(), u = i?.span, h = t ?? u ?? 1, g = r[0] ?? "threshold", [f, y] = z.useState(l ?? g);
|
|
104
|
+
z.useEffect(() => {
|
|
105
|
+
r.includes(f) || y(g);
|
|
106
|
+
}, [r, f, g]);
|
|
107
|
+
const v = a != null ? d?.state?.bufferByCard?.[a]?.changes ?? {} : {}, N = typeof v.threshold == "number" ? v.threshold : 80, S = typeof v.timeframe == "number" ? v.timeframe : 30, w = typeof v.accent == "string" ? v.accent : null, C = (_) => {
|
|
108
|
+
a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "threshold", value: Number(_.target.value) });
|
|
109
|
+
}, te = (_) => {
|
|
110
|
+
a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "timeframe", value: Number(_.target.value) });
|
|
111
|
+
}, ne = (_) => {
|
|
112
|
+
a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "accent", value: _ });
|
|
23
113
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */ s(
|
|
114
|
+
return /* @__PURE__ */ p("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
|
|
115
|
+
/* @__PURE__ */ s("div", { "aria-hidden": "true", children: /* @__PURE__ */ s(le, { children: /* @__PURE__ */ p(ie, { span: h, rotating: !c, children: [
|
|
26
116
|
/* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: o }),
|
|
27
117
|
/* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
|
|
28
|
-
] }) }),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
type: "button",
|
|
55
|
-
role: "radio",
|
|
56
|
-
"aria-pressed": f === g,
|
|
57
|
-
"aria-checked": f === g,
|
|
58
|
-
"aria-label": `Accent ${g}`,
|
|
59
|
-
className: "settings-shell__swatch",
|
|
60
|
-
style: { backgroundColor: g },
|
|
61
|
-
onClick: () => b(g),
|
|
62
|
-
"data-testid": `settings-swatch-${g}`
|
|
63
|
-
},
|
|
64
|
-
g
|
|
65
|
-
)) })
|
|
66
|
-
] })
|
|
67
|
-
] })
|
|
118
|
+
] }) }) }),
|
|
119
|
+
/* @__PURE__ */ s(
|
|
120
|
+
se,
|
|
121
|
+
{
|
|
122
|
+
dimensions: r,
|
|
123
|
+
activeTab: f,
|
|
124
|
+
onSelect: y,
|
|
125
|
+
reduced: c
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ p(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
role: "tabpanel",
|
|
132
|
+
id: `settings-tabpanel-${f}`,
|
|
133
|
+
"aria-label": "Settings dimension controls",
|
|
134
|
+
tabIndex: 0,
|
|
135
|
+
className: "settings-shell__tabpanel",
|
|
136
|
+
children: [
|
|
137
|
+
f === "threshold" && /* @__PURE__ */ s(ce, { value: N, onChange: C }),
|
|
138
|
+
f === "timeframe" && /* @__PURE__ */ s(de, { value: S, onChange: te }),
|
|
139
|
+
f === "slots" && /* @__PURE__ */ s(pe, {}),
|
|
140
|
+
f === "color" && /* @__PURE__ */ s(he, { value: w, onSelect: ne })
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
68
144
|
] });
|
|
69
145
|
}
|
|
70
|
-
function
|
|
71
|
-
const [n,
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
d(),
|
|
75
|
-
},
|
|
76
|
-
return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */
|
|
146
|
+
function j({ lenses: e, activeLens: t, onLensChange: o }) {
|
|
147
|
+
const [n, r] = b(!1), l = U(null), d = () => {
|
|
148
|
+
l.current != null && (window.clearTimeout(l.current), l.current = null);
|
|
149
|
+
}, i = () => {
|
|
150
|
+
d(), l.current = window.setTimeout(() => r(!1), 100);
|
|
151
|
+
}, a = e.filter((c) => c !== t);
|
|
152
|
+
return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ p("div", { className: "cat-segmented", children: [
|
|
77
153
|
/* @__PURE__ */ s(
|
|
78
154
|
"button",
|
|
79
155
|
{
|
|
@@ -84,14 +160,14 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
|
|
|
84
160
|
children: t
|
|
85
161
|
}
|
|
86
162
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ p(
|
|
88
164
|
"div",
|
|
89
165
|
{
|
|
90
166
|
className: "cat-seg-more",
|
|
91
167
|
onMouseEnter: () => {
|
|
92
|
-
d(),
|
|
168
|
+
d(), r(!0);
|
|
93
169
|
},
|
|
94
|
-
onMouseLeave:
|
|
170
|
+
onMouseLeave: i,
|
|
95
171
|
children: [
|
|
96
172
|
/* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
|
|
97
173
|
n && /* @__PURE__ */ s(
|
|
@@ -100,15 +176,15 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
|
|
|
100
176
|
className: "cat-seg-overflow",
|
|
101
177
|
role: "menu",
|
|
102
178
|
onMouseEnter: d,
|
|
103
|
-
onMouseLeave:
|
|
104
|
-
children:
|
|
179
|
+
onMouseLeave: i,
|
|
180
|
+
children: a.map((c) => /* @__PURE__ */ s(
|
|
105
181
|
"button",
|
|
106
182
|
{
|
|
107
183
|
type: "button",
|
|
108
184
|
"data-lens": c,
|
|
109
185
|
role: "menuitem",
|
|
110
186
|
onClick: () => {
|
|
111
|
-
o(c),
|
|
187
|
+
o(c), r(!1);
|
|
112
188
|
},
|
|
113
189
|
children: c
|
|
114
190
|
},
|
|
@@ -121,48 +197,48 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
|
|
|
121
197
|
)
|
|
122
198
|
] }) });
|
|
123
199
|
}
|
|
124
|
-
function
|
|
200
|
+
function ge(e) {
|
|
125
201
|
return e.split("·").map((t, o) => {
|
|
126
|
-
const n = t.trim(),
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */ s("strong", { children:
|
|
202
|
+
const n = t.trim(), r = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), l = r ? r[1] : "", d = r ? r[2] : n;
|
|
203
|
+
return /* @__PURE__ */ p("span", { children: [
|
|
204
|
+
/* @__PURE__ */ s("strong", { children: l }),
|
|
129
205
|
/* @__PURE__ */ s("small", { children: d })
|
|
130
206
|
] }, o);
|
|
131
207
|
});
|
|
132
208
|
}
|
|
133
|
-
function
|
|
209
|
+
function G({ tiles: e, selectedTileId: t, onSelectTile: o }) {
|
|
134
210
|
return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
|
|
135
|
-
const
|
|
136
|
-
return
|
|
211
|
+
const r = n.id === t, l = n.stack === !0, d = ["cat-tile"];
|
|
212
|
+
return l && d.push("span-2"), r && d.push("selected"), /* @__PURE__ */ p(
|
|
137
213
|
"button",
|
|
138
214
|
{
|
|
139
215
|
type: "button",
|
|
140
216
|
className: d.join(" "),
|
|
141
217
|
"data-metric": n.id,
|
|
142
218
|
"data-desc": n.desc,
|
|
143
|
-
"aria-pressed":
|
|
219
|
+
"aria-pressed": r,
|
|
144
220
|
onClick: () => o(n.id, n.desc),
|
|
145
221
|
children: [
|
|
146
222
|
/* @__PURE__ */ s("span", { className: "cat-tile-label", children: n.label }),
|
|
147
|
-
/* @__PURE__ */ s("span", { className: "cat-tile-value", children:
|
|
148
|
-
n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((
|
|
223
|
+
/* @__PURE__ */ s("span", { className: "cat-tile-value", children: l ? ge(n.value) : n.value }),
|
|
224
|
+
n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((i) => /* @__PURE__ */ s("span", { children: i }, i)) })
|
|
149
225
|
]
|
|
150
226
|
},
|
|
151
227
|
n.id
|
|
152
228
|
);
|
|
153
229
|
}) });
|
|
154
230
|
}
|
|
155
|
-
const
|
|
156
|
-
function
|
|
157
|
-
return
|
|
231
|
+
const R = Y(null);
|
|
232
|
+
function ve() {
|
|
233
|
+
return K(R);
|
|
158
234
|
}
|
|
159
|
-
function
|
|
160
|
-
const o =
|
|
235
|
+
function be({ mode: e, dispatch: t }) {
|
|
236
|
+
const o = ve();
|
|
161
237
|
if (o == null && e == null) return null;
|
|
162
|
-
const n = o?.mode ?? e ?? "add",
|
|
163
|
-
return /* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children:
|
|
165
|
-
/* @__PURE__ */
|
|
238
|
+
const n = o?.mode ?? e ?? "add", r = o?.selectedTileId ?? null, l = o?.description ?? null, d = r == null;
|
|
239
|
+
return /* @__PURE__ */ p("div", { className: "panel-footer catalog", children: [
|
|
240
|
+
/* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: l ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
|
|
241
|
+
/* @__PURE__ */ p("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
166
242
|
/* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
|
|
167
243
|
/* @__PURE__ */ s(
|
|
168
244
|
"button",
|
|
@@ -199,14 +275,14 @@ function le({ mode: e, dispatch: t }) {
|
|
|
199
275
|
] })
|
|
200
276
|
] });
|
|
201
277
|
}
|
|
202
|
-
const
|
|
278
|
+
const Q = [
|
|
203
279
|
"Revenue",
|
|
204
280
|
"Order flow",
|
|
205
281
|
"Rep performance",
|
|
206
282
|
"Brand portfolio",
|
|
207
283
|
"Account coverage",
|
|
208
284
|
"Commission"
|
|
209
|
-
],
|
|
285
|
+
], X = "Order flow", J = {
|
|
210
286
|
Revenue: [
|
|
211
287
|
{ id: "rev-mtd", label: "Revenue MTD", value: "$184K", desc: "Month-to-date revenue across all manufacturers and territories." },
|
|
212
288
|
{ id: "rev-ytd", label: "Revenue YTD", value: "$2.1M", desc: "Year-to-date revenue including pending and posted orders.", variants: ["1×1", "1×3"] },
|
|
@@ -252,96 +328,96 @@ const W = [
|
|
|
252
328
|
{ id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
|
|
253
329
|
]
|
|
254
330
|
};
|
|
255
|
-
function
|
|
331
|
+
function He({
|
|
256
332
|
isOpen: e,
|
|
257
|
-
lenses: t =
|
|
258
|
-
defaultLens: o =
|
|
259
|
-
tilesByLens: n =
|
|
260
|
-
footerSlot:
|
|
333
|
+
lenses: t = Q,
|
|
334
|
+
defaultLens: o = X,
|
|
335
|
+
tilesByLens: n = J,
|
|
336
|
+
footerSlot: r
|
|
261
337
|
}) {
|
|
262
|
-
const [
|
|
263
|
-
return /* @__PURE__ */
|
|
264
|
-
|
|
338
|
+
const [l, d] = b(o), [i, a] = b(null), [c, u] = b(null), h = n[l] ?? [];
|
|
339
|
+
return /* @__PURE__ */ p(
|
|
340
|
+
R.Provider,
|
|
265
341
|
{
|
|
266
|
-
value: { mode: "add", selectedTileId:
|
|
342
|
+
value: { mode: "add", selectedTileId: i, description: c },
|
|
267
343
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ p("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
269
345
|
/* @__PURE__ */ s("h3", { children: "Add a metric" }),
|
|
270
346
|
/* @__PURE__ */ s(
|
|
271
|
-
|
|
347
|
+
j,
|
|
272
348
|
{
|
|
273
349
|
lenses: t,
|
|
274
|
-
activeLens:
|
|
275
|
-
onLensChange: (
|
|
276
|
-
d(
|
|
350
|
+
activeLens: l,
|
|
351
|
+
onLensChange: (g) => {
|
|
352
|
+
d(g), a(null), u(null);
|
|
277
353
|
}
|
|
278
354
|
}
|
|
279
355
|
),
|
|
280
356
|
/* @__PURE__ */ s(
|
|
281
|
-
|
|
357
|
+
G,
|
|
282
358
|
{
|
|
283
|
-
tiles:
|
|
284
|
-
selectedTileId:
|
|
285
|
-
onSelectTile: (
|
|
286
|
-
|
|
359
|
+
tiles: h,
|
|
360
|
+
selectedTileId: i,
|
|
361
|
+
onSelectTile: (g, f) => {
|
|
362
|
+
a(g), u(f);
|
|
287
363
|
}
|
|
288
364
|
}
|
|
289
365
|
)
|
|
290
366
|
] }),
|
|
291
|
-
|
|
367
|
+
r
|
|
292
368
|
]
|
|
293
369
|
}
|
|
294
370
|
);
|
|
295
371
|
}
|
|
296
|
-
function
|
|
372
|
+
function qe({
|
|
297
373
|
isOpen: e,
|
|
298
374
|
replacingLabel: t,
|
|
299
|
-
lenses: o =
|
|
300
|
-
defaultLens: n =
|
|
301
|
-
tilesByLens:
|
|
302
|
-
footerSlot:
|
|
375
|
+
lenses: o = Q,
|
|
376
|
+
defaultLens: n = X,
|
|
377
|
+
tilesByLens: r = J,
|
|
378
|
+
footerSlot: l
|
|
303
379
|
}) {
|
|
304
|
-
const [d,
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
-
|
|
380
|
+
const [d, i] = b(n), [a, c] = b(null), [u, h] = b(null), g = r[d] ?? [];
|
|
381
|
+
return /* @__PURE__ */ p(
|
|
382
|
+
R.Provider,
|
|
307
383
|
{
|
|
308
|
-
value: { mode: "replace", selectedTileId:
|
|
384
|
+
value: { mode: "replace", selectedTileId: a, description: u },
|
|
309
385
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ p("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
311
387
|
/* @__PURE__ */ s("h3", { children: "Replace metric" }),
|
|
312
|
-
t && /* @__PURE__ */
|
|
388
|
+
t && /* @__PURE__ */ p("p", { className: "cat-subtitle", children: [
|
|
313
389
|
"replacing ",
|
|
314
390
|
t
|
|
315
391
|
] }),
|
|
316
392
|
/* @__PURE__ */ s(
|
|
317
|
-
|
|
393
|
+
j,
|
|
318
394
|
{
|
|
319
395
|
lenses: o,
|
|
320
396
|
activeLens: d,
|
|
321
|
-
onLensChange: (
|
|
322
|
-
|
|
397
|
+
onLensChange: (f) => {
|
|
398
|
+
i(f), c(null), h(null);
|
|
323
399
|
}
|
|
324
400
|
}
|
|
325
401
|
),
|
|
326
402
|
/* @__PURE__ */ s(
|
|
327
|
-
|
|
403
|
+
G,
|
|
328
404
|
{
|
|
329
|
-
tiles:
|
|
330
|
-
selectedTileId:
|
|
331
|
-
onSelectTile: (
|
|
332
|
-
c(
|
|
405
|
+
tiles: g,
|
|
406
|
+
selectedTileId: a,
|
|
407
|
+
onSelectTile: (f, y) => {
|
|
408
|
+
c(f), h(y);
|
|
333
409
|
}
|
|
334
410
|
}
|
|
335
411
|
)
|
|
336
412
|
] }),
|
|
337
|
-
|
|
413
|
+
l
|
|
338
414
|
]
|
|
339
415
|
}
|
|
340
416
|
);
|
|
341
417
|
}
|
|
342
|
-
function
|
|
343
|
-
const
|
|
344
|
-
return e.active &&
|
|
418
|
+
function ye({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
|
|
419
|
+
const r = ["pm-row"];
|
|
420
|
+
return e.active && r.push("active"), /* @__PURE__ */ p("div", { className: r.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
345
421
|
/* @__PURE__ */ s(
|
|
346
422
|
"div",
|
|
347
423
|
{
|
|
@@ -364,13 +440,13 @@ function ie({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
|
|
|
364
440
|
)
|
|
365
441
|
] });
|
|
366
442
|
}
|
|
367
|
-
const
|
|
368
|
-
function
|
|
369
|
-
return
|
|
443
|
+
const Z = Y(null);
|
|
444
|
+
function Ce() {
|
|
445
|
+
return K(Z);
|
|
370
446
|
}
|
|
371
|
-
function
|
|
372
|
-
const o =
|
|
373
|
-
return /* @__PURE__ */
|
|
447
|
+
function Pe(e = {}) {
|
|
448
|
+
const o = Ce()?.setPages;
|
|
449
|
+
return /* @__PURE__ */ p(
|
|
374
450
|
"div",
|
|
375
451
|
{
|
|
376
452
|
className: "panel-footer pm",
|
|
@@ -396,38 +472,38 @@ function de(e = {}) {
|
|
|
396
472
|
}
|
|
397
473
|
);
|
|
398
474
|
}
|
|
399
|
-
const
|
|
475
|
+
const _e = [
|
|
400
476
|
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
401
477
|
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
402
478
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
403
479
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
404
480
|
];
|
|
405
|
-
function
|
|
481
|
+
function Ue({
|
|
406
482
|
isOpen: e,
|
|
407
|
-
pages: t =
|
|
483
|
+
pages: t = _e,
|
|
408
484
|
footerSlot: o
|
|
409
485
|
}) {
|
|
410
|
-
const [n,
|
|
411
|
-
return /* @__PURE__ */
|
|
412
|
-
/* @__PURE__ */
|
|
486
|
+
const [n, r] = b(() => [...t]);
|
|
487
|
+
return /* @__PURE__ */ p(Z.Provider, { value: { pages: n, setPages: r }, children: [
|
|
488
|
+
/* @__PURE__ */ p("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
|
|
413
489
|
/* @__PURE__ */ s("h3", { children: "Manage pages" }),
|
|
414
|
-
/* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((
|
|
490
|
+
/* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((l) => /* @__PURE__ */ s(ye, { page: l }, l.id)) })
|
|
415
491
|
] }),
|
|
416
492
|
o
|
|
417
493
|
] });
|
|
418
494
|
}
|
|
419
|
-
const
|
|
495
|
+
const Ye = {
|
|
420
496
|
SETTINGS: "settings",
|
|
421
497
|
CATALOG_ADD: "catalog-add",
|
|
422
498
|
CATALOG_REPLACE: "catalog-replace",
|
|
423
499
|
PAGE_MGMT: "page-management",
|
|
424
500
|
NOTIFICATION_CENTER: "notification-center"
|
|
425
|
-
},
|
|
501
|
+
}, Ne = {
|
|
426
502
|
position: "fixed",
|
|
427
503
|
inset: 0,
|
|
428
504
|
pointerEvents: "none",
|
|
429
505
|
zIndex: 55
|
|
430
|
-
},
|
|
506
|
+
}, Se = {
|
|
431
507
|
position: "absolute",
|
|
432
508
|
inset: 0,
|
|
433
509
|
zIndex: 1,
|
|
@@ -436,66 +512,81 @@ const Me = {
|
|
|
436
512
|
pointerEvents: "none",
|
|
437
513
|
background: "rgba(0, 0, 0, 0.04)"
|
|
438
514
|
};
|
|
439
|
-
function
|
|
440
|
-
const { state: e, dispatch: t, getCloseLog: o } =
|
|
441
|
-
|
|
515
|
+
function Ke() {
|
|
516
|
+
const { state: e, dispatch: t, getCloseLog: o } = oe();
|
|
517
|
+
V(() => {
|
|
442
518
|
if (e.activePanelId == null) return;
|
|
443
|
-
function
|
|
519
|
+
function l(d) {
|
|
444
520
|
d.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
445
521
|
}
|
|
446
|
-
return document.addEventListener("keydown",
|
|
522
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
447
523
|
}, [e.activePanelId, t]);
|
|
448
|
-
const n =
|
|
449
|
-
|
|
524
|
+
const n = U(e);
|
|
525
|
+
re(() => {
|
|
450
526
|
n.current = e;
|
|
451
|
-
}),
|
|
527
|
+
}), V(() => {
|
|
452
528
|
if (process.env.NODE_ENV === "production") return;
|
|
453
|
-
const
|
|
454
|
-
return
|
|
529
|
+
const l = window;
|
|
530
|
+
return l.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), l.__panelsHostHandle = {
|
|
455
531
|
dispatch: t,
|
|
456
532
|
getState: () => n.current,
|
|
457
533
|
getCloseLog: o
|
|
458
534
|
}, () => {
|
|
459
|
-
|
|
535
|
+
l.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
460
536
|
};
|
|
461
537
|
}, [t, o]);
|
|
462
|
-
const
|
|
538
|
+
const r = W(() => {
|
|
463
539
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
464
540
|
}, [t]);
|
|
465
|
-
return /* @__PURE__ */ s("div", { "data-panel-host": "true", style:
|
|
541
|
+
return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: Ne, children: e.activePanelId != null && /* @__PURE__ */ s(
|
|
466
542
|
"div",
|
|
467
543
|
{
|
|
468
544
|
"data-panel-scrim": "true",
|
|
469
|
-
style:
|
|
470
|
-
onClick:
|
|
545
|
+
style: Se,
|
|
546
|
+
onClick: r
|
|
471
547
|
}
|
|
472
548
|
) });
|
|
473
549
|
}
|
|
474
|
-
function
|
|
475
|
-
const
|
|
476
|
-
if (
|
|
477
|
-
const { state:
|
|
478
|
-
if (
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
550
|
+
function We({ panelComponents: e, children: t }) {
|
|
551
|
+
const o = $();
|
|
552
|
+
if (o == null) return null;
|
|
553
|
+
const { state: n, dispatch: r } = o;
|
|
554
|
+
if (n.activePanelId == null) return null;
|
|
555
|
+
const l = e?.[n.activePanelId];
|
|
556
|
+
if (l == null && t == null)
|
|
481
557
|
return process.env.NODE_ENV !== "production" && console.error(
|
|
482
558
|
"[panels] No panel component registered for activePanelId:",
|
|
483
|
-
|
|
559
|
+
n.activePanelId
|
|
484
560
|
), null;
|
|
485
|
-
if (
|
|
486
|
-
|
|
487
|
-
|
|
561
|
+
if (n.activePanelId === "settings") {
|
|
562
|
+
const d = n.isDirty, i = n.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null;
|
|
563
|
+
return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
564
|
+
A,
|
|
488
565
|
{
|
|
489
566
|
isOpen: !0,
|
|
490
|
-
onClose: () =>
|
|
491
|
-
footer: /* @__PURE__ */
|
|
567
|
+
onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
568
|
+
footer: /* @__PURE__ */ p(ae, { children: [
|
|
569
|
+
/* @__PURE__ */ s(
|
|
570
|
+
"button",
|
|
571
|
+
{
|
|
572
|
+
id: "btn-reset",
|
|
573
|
+
type: "button",
|
|
574
|
+
className: "gloss-panel-chrome__footer-btn",
|
|
575
|
+
disabled: !d,
|
|
576
|
+
onClick: () => {
|
|
577
|
+
a != null && r({ type: "CLEAR_BUFFER", cardId: a });
|
|
578
|
+
},
|
|
579
|
+
children: "Reset"
|
|
580
|
+
}
|
|
581
|
+
),
|
|
582
|
+
/* @__PURE__ */ s("span", { style: { flex: 1 } }),
|
|
492
583
|
/* @__PURE__ */ s(
|
|
493
584
|
"button",
|
|
494
585
|
{
|
|
495
586
|
id: "settings-cancel",
|
|
496
587
|
type: "button",
|
|
497
588
|
className: "gloss-panel-chrome__footer-btn",
|
|
498
|
-
onClick: () =>
|
|
589
|
+
onClick: () => r({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
499
590
|
children: "Cancel"
|
|
500
591
|
}
|
|
501
592
|
),
|
|
@@ -505,235 +596,238 @@ function De({ panelComponents: e }) {
|
|
|
505
596
|
id: "settings-apply",
|
|
506
597
|
type: "button",
|
|
507
598
|
className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
|
|
508
|
-
|
|
599
|
+
disabled: !d,
|
|
600
|
+
onClick: () => r({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
509
601
|
children: "Apply"
|
|
510
602
|
}
|
|
511
603
|
)
|
|
512
604
|
] }),
|
|
513
|
-
children: /* @__PURE__ */ s(
|
|
605
|
+
children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
|
|
514
606
|
}
|
|
515
607
|
) });
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
608
|
+
}
|
|
609
|
+
if (n.activePanelId === "catalog-add" || n.activePanelId === "catalog-replace") {
|
|
610
|
+
if (l == null) return null;
|
|
611
|
+
const d = n.activePanelId === "catalog-replace" ? "replace" : "add";
|
|
612
|
+
return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
613
|
+
A,
|
|
520
614
|
{
|
|
521
615
|
isOpen: !0,
|
|
522
|
-
onClose: () =>
|
|
616
|
+
onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
523
617
|
footer: null,
|
|
524
618
|
children: /* @__PURE__ */ s(
|
|
525
|
-
|
|
619
|
+
l,
|
|
526
620
|
{
|
|
527
621
|
isOpen: !0,
|
|
528
|
-
footerSlot: /* @__PURE__ */ s(
|
|
622
|
+
footerSlot: /* @__PURE__ */ s(be, { mode: d, dispatch: r })
|
|
529
623
|
}
|
|
530
624
|
)
|
|
531
625
|
}
|
|
532
626
|
) });
|
|
533
627
|
}
|
|
534
|
-
return
|
|
535
|
-
|
|
628
|
+
return n.activePanelId === "page-management" ? l == null ? null : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
629
|
+
A,
|
|
536
630
|
{
|
|
537
631
|
isOpen: !0,
|
|
538
|
-
onClose: () =>
|
|
632
|
+
onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
539
633
|
footer: null,
|
|
540
|
-
children: /* @__PURE__ */ s(
|
|
634
|
+
children: /* @__PURE__ */ s(l, { isOpen: !0, footerSlot: /* @__PURE__ */ s(Pe, {}) })
|
|
541
635
|
}
|
|
542
|
-
) }) : /* @__PURE__ */ s(
|
|
543
|
-
|
|
636
|
+
) }) : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
|
|
637
|
+
A,
|
|
544
638
|
{
|
|
545
639
|
isOpen: !0,
|
|
546
|
-
onClose: () =>
|
|
640
|
+
onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
547
641
|
footer: null,
|
|
548
|
-
children: /* @__PURE__ */ s(
|
|
642
|
+
children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
|
|
549
643
|
}
|
|
550
644
|
) });
|
|
551
645
|
}
|
|
552
|
-
function
|
|
646
|
+
function B(e) {
|
|
553
647
|
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;
|
|
554
648
|
}
|
|
555
|
-
const
|
|
556
|
-
function
|
|
649
|
+
const we = 685, H = 627, Ee = "cubic-bezier(0.22, 1, 0.36, 1)", Ae = 200;
|
|
650
|
+
function ee(e, t) {
|
|
557
651
|
if (typeof window > "u") return t;
|
|
558
652
|
const o = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
559
653
|
if (!o) return t;
|
|
560
654
|
const n = parseFloat(o);
|
|
561
655
|
return Number.isNaN(n) ? t : o.endsWith("s") && !o.endsWith("ms") ? n * 1e3 : n;
|
|
562
656
|
}
|
|
563
|
-
function
|
|
657
|
+
function xe(e, t) {
|
|
564
658
|
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
565
659
|
}
|
|
566
|
-
function
|
|
660
|
+
function x(e) {
|
|
567
661
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
568
662
|
}
|
|
569
|
-
function
|
|
570
|
-
const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert:
|
|
663
|
+
function Te(e) {
|
|
664
|
+
const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert: r } = e;
|
|
571
665
|
if (t == null || o == null) {
|
|
572
|
-
|
|
666
|
+
x(e), r?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
573
667
|
return;
|
|
574
668
|
}
|
|
575
669
|
if (n) {
|
|
576
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
670
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
577
671
|
return;
|
|
578
672
|
}
|
|
579
673
|
if (typeof o.animate != "function") {
|
|
580
|
-
|
|
674
|
+
x(e), r?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
581
675
|
return;
|
|
582
676
|
}
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
const d =
|
|
677
|
+
const l = o.cloneNode(!0);
|
|
678
|
+
l.id = "panel-chrome-frozen", l.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(l), o.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
679
|
+
const d = ee("--panel-open-dur", we), i = xe("--panel-easing", Ee), a = o.animate(
|
|
586
680
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
587
|
-
{ duration: d, easing:
|
|
681
|
+
{ duration: d, easing: i, fill: "forwards" }
|
|
588
682
|
);
|
|
589
|
-
|
|
683
|
+
a.addEventListener(
|
|
590
684
|
"finish",
|
|
591
685
|
() => {
|
|
592
|
-
|
|
686
|
+
l.remove(), o.style.zIndex = "", a.cancel(), r?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
593
687
|
},
|
|
594
688
|
{ once: !0 }
|
|
595
689
|
);
|
|
596
690
|
}
|
|
597
|
-
function
|
|
691
|
+
function Le(e) {
|
|
598
692
|
const { mountEl: t, onAssert: o } = e;
|
|
599
693
|
if (t == null) {
|
|
600
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
694
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => x(e), H), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
601
695
|
return;
|
|
602
696
|
}
|
|
603
|
-
const n =
|
|
604
|
-
let
|
|
605
|
-
const d = (
|
|
606
|
-
|
|
607
|
-
},
|
|
608
|
-
|
|
697
|
+
const n = ee("--panel-close-dur", H);
|
|
698
|
+
let r = !1, l = null;
|
|
699
|
+
const d = (a) => {
|
|
700
|
+
a.target !== t || a.propertyName !== "max-height" || r || (r = !0, l != null && clearTimeout(l), t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
701
|
+
}, i = () => {
|
|
702
|
+
r || (r = !0, t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
609
703
|
};
|
|
610
|
-
t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }),
|
|
704
|
+
t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), l = setTimeout(i, n + Ae);
|
|
611
705
|
}
|
|
612
|
-
function
|
|
706
|
+
function Oe(e) {
|
|
613
707
|
const { state: t, onAssert: o } = e;
|
|
614
708
|
if (t.activePanelId && t.isDirty) {
|
|
615
709
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
616
710
|
return;
|
|
617
711
|
}
|
|
618
|
-
const n =
|
|
619
|
-
if (!!t.activePanelId && n != null && n ===
|
|
620
|
-
|
|
712
|
+
const n = B(t.activeTrigger), r = B(e.trigger);
|
|
713
|
+
if (!!t.activePanelId && n != null && n === r) {
|
|
714
|
+
Te(e);
|
|
621
715
|
return;
|
|
622
716
|
}
|
|
623
717
|
if (t.activePanelId) {
|
|
624
|
-
|
|
718
|
+
Le(e);
|
|
625
719
|
return;
|
|
626
720
|
}
|
|
627
|
-
|
|
721
|
+
x(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
628
722
|
}
|
|
629
|
-
function
|
|
723
|
+
function Ie() {
|
|
630
724
|
if (!(typeof window > "u"))
|
|
631
725
|
return window.__panelsAsserter;
|
|
632
726
|
}
|
|
633
|
-
function
|
|
634
|
-
const e =
|
|
635
|
-
return
|
|
727
|
+
function je() {
|
|
728
|
+
const e = $(), t = q();
|
|
729
|
+
return W(
|
|
636
730
|
(o, n) => {
|
|
637
731
|
if (!e)
|
|
638
732
|
return;
|
|
639
|
-
const
|
|
733
|
+
const r = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, l = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, d = {
|
|
640
734
|
panelId: o,
|
|
641
735
|
trigger: n,
|
|
642
736
|
state: e.state,
|
|
643
737
|
dispatch: e.dispatch,
|
|
644
|
-
mountEl:
|
|
645
|
-
chromeEl:
|
|
738
|
+
mountEl: r,
|
|
739
|
+
chromeEl: l,
|
|
646
740
|
reducedMotion: t,
|
|
647
|
-
onAssert: (
|
|
648
|
-
|
|
741
|
+
onAssert: (i) => {
|
|
742
|
+
Ie()?.recordTransition?.(i);
|
|
649
743
|
}
|
|
650
744
|
};
|
|
651
|
-
|
|
745
|
+
Oe(d);
|
|
652
746
|
},
|
|
653
747
|
[e, t]
|
|
654
748
|
);
|
|
655
749
|
}
|
|
656
|
-
let
|
|
657
|
-
function
|
|
750
|
+
let T = !1, L = null;
|
|
751
|
+
function D() {
|
|
658
752
|
const e = [];
|
|
659
753
|
let t = "cleaned";
|
|
660
754
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
661
755
|
const n = document.querySelectorAll(".gloss-panel-mount");
|
|
662
756
|
n.length > 1 && e.push(`mount-count=${n.length}`);
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
const d =
|
|
757
|
+
const r = n[0] ?? null, l = r ? r.querySelectorAll(".gloss-panel-chrome") : [];
|
|
758
|
+
l.length > 1 && e.push(`chrome-count=${l.length}`);
|
|
759
|
+
const d = l[0] ?? null;
|
|
666
760
|
if (d) {
|
|
667
761
|
const u = d.style.zIndex;
|
|
668
762
|
u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
|
|
669
763
|
}
|
|
670
|
-
const
|
|
764
|
+
const i = r ? "present" : "absent", a = d ? "present" : "absent";
|
|
671
765
|
return {
|
|
672
766
|
valid: e.length === 0,
|
|
673
|
-
mount:
|
|
674
|
-
chrome:
|
|
767
|
+
mount: i,
|
|
768
|
+
chrome: a,
|
|
675
769
|
frozen: t,
|
|
676
770
|
orphans: e,
|
|
677
771
|
timestamp: Date.now()
|
|
678
772
|
};
|
|
679
773
|
}
|
|
680
|
-
const
|
|
681
|
-
function
|
|
682
|
-
return { id: e, constraint: t, expected: o, actual: n, pass:
|
|
774
|
+
const O = "8px 8px 0px", I = "64px", k = "inset(0px 0px 60px 0px)", M = "inset(0px -40px -40px -40px)";
|
|
775
|
+
function m(e, t, o, n, r) {
|
|
776
|
+
return { id: e, constraint: t, expected: o, actual: n, pass: r };
|
|
683
777
|
}
|
|
684
778
|
function P(e) {
|
|
685
779
|
const t = parseInt(e, 10);
|
|
686
780
|
return Number.isFinite(t) ? t : NaN;
|
|
687
781
|
}
|
|
688
|
-
function
|
|
689
|
-
const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"),
|
|
782
|
+
function F() {
|
|
783
|
+
const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), r = document.querySelector(".bell-cutout"), l = document.querySelector(".bell-popover"), d = document.querySelector(".gloss-bottom-toolbar");
|
|
690
784
|
if (!t)
|
|
691
|
-
e.push(
|
|
785
|
+
e.push(m("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
|
|
692
786
|
else {
|
|
693
|
-
const
|
|
787
|
+
const i = getComputedStyle(t), a = i.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = i.clipPath || t.style.clipPath || "", u = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), h = u ? parseInt(u[1], 10) : NaN, g = P(a), f = Number.isFinite(h) && Number.isFinite(g) && h === g;
|
|
694
788
|
e.push(
|
|
695
|
-
|
|
789
|
+
m(
|
|
696
790
|
"C1",
|
|
697
791
|
"mount --reveal-y matches clip-path inset-bottom Npx",
|
|
698
|
-
`inset(0 0 ${
|
|
699
|
-
`--reveal-y=${
|
|
700
|
-
|
|
792
|
+
`inset(0 0 ${g}px 0) === --reveal-y(${g}px)`,
|
|
793
|
+
`--reveal-y=${a || "n/a"} clip-path=${c || "n/a"}`,
|
|
794
|
+
f
|
|
701
795
|
)
|
|
702
796
|
);
|
|
703
797
|
}
|
|
704
798
|
if (!t)
|
|
705
|
-
e.push(
|
|
799
|
+
e.push(m("C2", "mount padding constant", O, "absent", !1));
|
|
706
800
|
else {
|
|
707
|
-
const
|
|
708
|
-
e.push(
|
|
801
|
+
const i = t.style.padding, a = getComputedStyle(t), c = i || a.padding || "", u = c === O || c === "8px 8px 0px 8px";
|
|
802
|
+
e.push(m("C2", "mount padding constant", O, c || "n/a", u));
|
|
709
803
|
}
|
|
710
804
|
if (!t)
|
|
711
|
-
e.push(
|
|
805
|
+
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", I, "absent", !1));
|
|
712
806
|
else {
|
|
713
|
-
const
|
|
714
|
-
e.push(
|
|
807
|
+
const a = getComputedStyle(t).bottom || t.style.bottom || "", c = a === I;
|
|
808
|
+
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", I, a || "n/a", c));
|
|
715
809
|
}
|
|
716
810
|
if (!o)
|
|
717
|
-
e.push(
|
|
811
|
+
e.push(m("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
718
812
|
else {
|
|
719
|
-
const
|
|
720
|
-
|
|
813
|
+
const i = getComputedStyle(o), a = P(
|
|
814
|
+
i.getPropertyValue("--row-h").trim() || o.style.getPropertyValue("--row-h").trim() || "0"
|
|
721
815
|
), c = P(
|
|
722
|
-
|
|
723
|
-
), u =
|
|
816
|
+
i.getPropertyValue("--row-gap").trim() || o.style.getPropertyValue("--row-gap").trim() || "0"
|
|
817
|
+
), u = a * 3 + c * 3 - 8, h = P(i.height || o.style.height || ""), g = Number.isFinite(a) && Number.isFinite(c) && Number.isFinite(h) && Number.isFinite(u) && h === u;
|
|
724
818
|
e.push(
|
|
725
|
-
|
|
819
|
+
m(
|
|
726
820
|
"C4",
|
|
727
821
|
"panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
|
|
728
|
-
`${u}px (rh=${
|
|
729
|
-
`${
|
|
730
|
-
|
|
822
|
+
`${u}px (rh=${a} rg=${c})`,
|
|
823
|
+
`${h}px`,
|
|
824
|
+
g
|
|
731
825
|
)
|
|
732
826
|
);
|
|
733
827
|
}
|
|
734
828
|
if (!n || !o)
|
|
735
829
|
e.push(
|
|
736
|
-
|
|
830
|
+
m(
|
|
737
831
|
"C5",
|
|
738
832
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
739
833
|
"present",
|
|
@@ -742,19 +836,19 @@ function M() {
|
|
|
742
836
|
)
|
|
743
837
|
);
|
|
744
838
|
else {
|
|
745
|
-
const
|
|
839
|
+
const i = getComputedStyle(n), a = getComputedStyle(o), c = i.perspective || n.style.perspective || "", u = (i.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), h = a.perspectiveStyle || o.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (u === "center bottom" || u === "50% 100%") && h === "flat";
|
|
746
840
|
e.push(
|
|
747
|
-
|
|
841
|
+
m(
|
|
748
842
|
"C5",
|
|
749
843
|
'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
|
|
750
844
|
"perspective:not-none, origin:center bottom, chrome-style:flat",
|
|
751
|
-
`perspective=${c} origin=${u} chrome-style=${
|
|
752
|
-
|
|
845
|
+
`perspective=${c} origin=${u} chrome-style=${h}`,
|
|
846
|
+
v
|
|
753
847
|
)
|
|
754
848
|
);
|
|
755
849
|
}
|
|
756
850
|
{
|
|
757
|
-
let
|
|
851
|
+
let i = !1, a = "absent";
|
|
758
852
|
try {
|
|
759
853
|
for (const c of Array.from(document.styleSheets)) {
|
|
760
854
|
let u = [];
|
|
@@ -763,81 +857,81 @@ function M() {
|
|
|
763
857
|
} catch {
|
|
764
858
|
continue;
|
|
765
859
|
}
|
|
766
|
-
for (const
|
|
767
|
-
if (
|
|
768
|
-
const
|
|
769
|
-
|
|
860
|
+
for (const h of u)
|
|
861
|
+
if (h.name === "stage-spin") {
|
|
862
|
+
const f = Array.from(h.cssRules), y = f.find((C) => C.keyText === "0%" || C.keyText === "from"), v = f.find((C) => C.keyText === "100%" || C.keyText === "to"), N = y?.style.transform ?? "", S = v?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
|
|
863
|
+
i = w.test(N) && w.test(S), a = `0%=${N || "n/a"} 100%=${S || "n/a"}`;
|
|
770
864
|
break;
|
|
771
865
|
}
|
|
772
|
-
if (
|
|
866
|
+
if (a !== "absent") break;
|
|
773
867
|
}
|
|
774
868
|
} catch {
|
|
775
|
-
|
|
869
|
+
a = "inspection-error";
|
|
776
870
|
}
|
|
777
871
|
e.push(
|
|
778
|
-
|
|
872
|
+
m(
|
|
779
873
|
"C6",
|
|
780
874
|
"@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
|
|
781
875
|
"both frames rotateY(0)",
|
|
782
|
-
|
|
783
|
-
|
|
876
|
+
a,
|
|
877
|
+
i
|
|
784
878
|
)
|
|
785
879
|
);
|
|
786
880
|
}
|
|
787
881
|
{
|
|
788
|
-
const
|
|
882
|
+
const i = document.documentElement, a = getComputedStyle(i), c = a.getPropertyValue("--panel-open-dur").trim() || i.style.getPropertyValue("--panel-open-dur").trim(), u = a.getPropertyValue("--panel-close-dur").trim() || i.style.getPropertyValue("--panel-close-dur").trim(), h = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), g = P(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), f = Number.isFinite(h) && Number.isFinite(g) && h > g;
|
|
789
883
|
e.push(
|
|
790
|
-
|
|
884
|
+
m("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${u || "n/a"}`, f)
|
|
791
885
|
);
|
|
792
886
|
}
|
|
793
|
-
if (!
|
|
794
|
-
e.push(
|
|
887
|
+
if (!r)
|
|
888
|
+
e.push(m("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
|
|
795
889
|
else {
|
|
796
|
-
const
|
|
890
|
+
const i = getComputedStyle(r), a = i.animationName || "", c = i.transitionProperty || "", u = (a === "" || a === "none") && (c === "" || c === "none" || c === "all");
|
|
797
891
|
e.push(
|
|
798
|
-
|
|
892
|
+
m(
|
|
799
893
|
"C8",
|
|
800
894
|
"BellCutout zero computed animation/transition",
|
|
801
895
|
"animation:none AND transition:none",
|
|
802
|
-
`animation=${
|
|
896
|
+
`animation=${a || "n/a"} transition=${c || "n/a"}`,
|
|
803
897
|
u
|
|
804
898
|
)
|
|
805
899
|
);
|
|
806
900
|
}
|
|
807
901
|
if (!t)
|
|
808
|
-
e.push(
|
|
902
|
+
e.push(m("C9", "mount closed-state clipPath", k, "absent", !1));
|
|
809
903
|
else {
|
|
810
|
-
const
|
|
811
|
-
e.push(
|
|
904
|
+
const i = t.style.clipPath, a = getComputedStyle(t), c = i || a.clipPath || "", u = c === k;
|
|
905
|
+
e.push(m("C9", "mount closed-state clipPath", k, c || "n/a", u));
|
|
812
906
|
}
|
|
813
|
-
if (!
|
|
814
|
-
e.push(
|
|
907
|
+
if (!l)
|
|
908
|
+
e.push(m("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
815
909
|
else {
|
|
816
|
-
const
|
|
910
|
+
const i = l.parentElement, a = i === document.body;
|
|
817
911
|
e.push(
|
|
818
|
-
|
|
912
|
+
m(
|
|
819
913
|
"C10",
|
|
820
914
|
"bell-popover parentElement === document.body (open)",
|
|
821
915
|
"body",
|
|
822
|
-
|
|
823
|
-
|
|
916
|
+
i === document.body ? "body" : i?.tagName ?? "n/a",
|
|
917
|
+
a
|
|
824
918
|
)
|
|
825
919
|
);
|
|
826
920
|
}
|
|
827
921
|
if (!n)
|
|
828
|
-
e.push(
|
|
922
|
+
e.push(m("C11", "coordinator overflow === visible", "visible", "absent", !1));
|
|
829
923
|
else {
|
|
830
|
-
const
|
|
831
|
-
e.push(
|
|
924
|
+
const a = getComputedStyle(n).overflow || n.style.overflow || "", c = a === "visible";
|
|
925
|
+
e.push(m("C11", "coordinator overflow === visible", "visible", a || "n/a", c));
|
|
832
926
|
}
|
|
833
927
|
if (!d)
|
|
834
|
-
e.push(
|
|
928
|
+
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", M, "absent", !1));
|
|
835
929
|
else {
|
|
836
|
-
const
|
|
837
|
-
e.push(
|
|
930
|
+
const i = d.style.clipPath, a = getComputedStyle(d), c = i || a.clipPath || "", u = c === M;
|
|
931
|
+
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", M, c || "n/a", u));
|
|
838
932
|
}
|
|
839
933
|
return e.push(
|
|
840
|
-
|
|
934
|
+
m(
|
|
841
935
|
"C13",
|
|
842
936
|
"same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
|
|
843
937
|
"WAAPI driver wired in orchestrator (source-proof)",
|
|
@@ -845,7 +939,7 @@ function M() {
|
|
|
845
939
|
"wiring_only"
|
|
846
940
|
)
|
|
847
941
|
), e.push(
|
|
848
|
-
|
|
942
|
+
m(
|
|
849
943
|
"C14",
|
|
850
944
|
'cross-position handoff transitionend filtered by propertyName="max-height"',
|
|
851
945
|
"transitionend filter wired in orchestrator (source-proof)",
|
|
@@ -854,11 +948,11 @@ function M() {
|
|
|
854
948
|
)
|
|
855
949
|
), e;
|
|
856
950
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
951
|
+
function ke(e) {
|
|
952
|
+
return F().find((t) => t.id === e);
|
|
859
953
|
}
|
|
860
|
-
function
|
|
861
|
-
const e =
|
|
954
|
+
function Me() {
|
|
955
|
+
const e = D();
|
|
862
956
|
return { q12: [
|
|
863
957
|
{
|
|
864
958
|
id: "Q12-12",
|
|
@@ -867,74 +961,74 @@ function we() {
|
|
|
867
961
|
actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
|
|
868
962
|
pass: e.valid
|
|
869
963
|
}
|
|
870
|
-
], cc:
|
|
964
|
+
], cc: F() };
|
|
871
965
|
}
|
|
872
|
-
function
|
|
966
|
+
function De() {
|
|
873
967
|
return {
|
|
874
|
-
enable:
|
|
875
|
-
disable:
|
|
876
|
-
isEnabled: () =>
|
|
877
|
-
getLastReport: () =>
|
|
968
|
+
enable: $e,
|
|
969
|
+
disable: Re,
|
|
970
|
+
isEnabled: () => T,
|
|
971
|
+
getLastReport: () => L,
|
|
878
972
|
recordTransition: (e) => {
|
|
879
|
-
|
|
973
|
+
T && (L = { ...e, ...D() });
|
|
880
974
|
},
|
|
881
975
|
assertOnce: () => {
|
|
882
|
-
const e =
|
|
883
|
-
return
|
|
976
|
+
const e = D();
|
|
977
|
+
return L = e, e;
|
|
884
978
|
},
|
|
885
|
-
assertCcOnly:
|
|
886
|
-
getCcRowById:
|
|
887
|
-
assertPanelTruths:
|
|
979
|
+
assertCcOnly: F,
|
|
980
|
+
getCcRowById: ke,
|
|
981
|
+
assertPanelTruths: Me
|
|
888
982
|
};
|
|
889
983
|
}
|
|
890
|
-
function
|
|
891
|
-
if (
|
|
892
|
-
window.__panelsAsserter || (window.__panelsAsserter =
|
|
984
|
+
function $e() {
|
|
985
|
+
if (T = !0, typeof window > "u") return;
|
|
986
|
+
window.__panelsAsserter || (window.__panelsAsserter = De(), console.info(
|
|
893
987
|
"[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
|
|
894
988
|
));
|
|
895
989
|
}
|
|
896
|
-
function
|
|
897
|
-
|
|
990
|
+
function Re() {
|
|
991
|
+
T = !1;
|
|
898
992
|
}
|
|
899
993
|
export {
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
994
|
+
Xe as COMMITS,
|
|
995
|
+
He as CatalogAddShell,
|
|
996
|
+
be as CatalogFooter,
|
|
997
|
+
qe as CatalogReplaceShell,
|
|
998
|
+
R as CatalogStateContext,
|
|
999
|
+
ie as CloneCard,
|
|
1000
|
+
le as CloneStage,
|
|
1001
|
+
X as MOCK_DEFAULT_LENS,
|
|
1002
|
+
Q as MOCK_LENSES,
|
|
1003
|
+
_e as MOCK_PAGES,
|
|
1004
|
+
J as MOCK_TILES_BY_LENS,
|
|
1005
|
+
Ye as PANEL_IDS,
|
|
1006
|
+
Pe as PageMgmtFooter,
|
|
1007
|
+
Ue as PageMgmtShell,
|
|
1008
|
+
Z as PageMgmtStateContext,
|
|
1009
|
+
A as PanelChrome,
|
|
1010
|
+
Je as PanelHost,
|
|
1011
|
+
Ke as PanelHostShell,
|
|
1012
|
+
E as PanelMount,
|
|
1013
|
+
Ze as PanelProvider,
|
|
1014
|
+
We as PanelSlot,
|
|
1015
|
+
Be as SettingsShell,
|
|
1016
|
+
F as assertCcOnly,
|
|
1017
|
+
D as assertPanelDomShape,
|
|
1018
|
+
Me as assertPanelTruths,
|
|
1019
|
+
et as deriveSurfaceState,
|
|
1020
|
+
Re as disablePanelAsserter,
|
|
1021
|
+
$e as enablePanelAsserter,
|
|
1022
|
+
ke as getCcRowById,
|
|
1023
|
+
tt as initialState,
|
|
1024
|
+
B as positionKey,
|
|
1025
|
+
nt as reducer,
|
|
1026
|
+
Oe as transitionToPanel,
|
|
1027
|
+
ve as useCatalogState,
|
|
1028
|
+
Ce as usePageMgmtState,
|
|
1029
|
+
oe as usePanelContext,
|
|
1030
|
+
$ as usePanelContextOptional,
|
|
1031
|
+
st as usePanelCoordinator,
|
|
938
1032
|
q as useReducedMotionPanel,
|
|
939
|
-
|
|
1033
|
+
je as useTransitionToPanel
|
|
940
1034
|
};
|