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