@mt-gloss/ui 0.1.87 → 0.1.88
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.
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as i, jsxs as f, Fragment as v } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const e = p(
|
|
2
|
+
import { createContext as _, useContext as p, useReducer as h, useRef as u, useEffect as s, useMemo as E, useCallback as g, useState as P, useLayoutEffect as C } from "react";
|
|
3
|
+
const d = _(null);
|
|
4
|
+
function S() {
|
|
5
|
+
const e = p(d);
|
|
6
6
|
if (!e)
|
|
7
7
|
throw new Error(
|
|
8
8
|
"[panels] usePanelContext must be used inside <PanelProvider>. See @mt-gloss/ui/composites/panels."
|
|
9
9
|
);
|
|
10
10
|
return e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return p(
|
|
12
|
+
function F() {
|
|
13
|
+
return p(d);
|
|
14
14
|
}
|
|
15
|
-
const
|
|
15
|
+
const m = {
|
|
16
16
|
activePanelId: null,
|
|
17
17
|
activeTrigger: null,
|
|
18
18
|
bellCutoutOpen: !1,
|
|
@@ -20,11 +20,21 @@ const y = {
|
|
|
20
20
|
lockHint: null,
|
|
21
21
|
lastClose: null,
|
|
22
22
|
pendingSideEffects: []
|
|
23
|
-
},
|
|
23
|
+
}, y = /* @__PURE__ */ new Set(["settings"]);
|
|
24
24
|
function O(e, n) {
|
|
25
|
-
|
|
25
|
+
if (e == null || e.kind !== n.kind) return !1;
|
|
26
|
+
switch (e.kind) {
|
|
27
|
+
case "bell":
|
|
28
|
+
return !0;
|
|
29
|
+
case "card-overflow":
|
|
30
|
+
return e.cardId === n.cardId && e.sectionIndex === n.sectionIndex && e.action === n.action;
|
|
31
|
+
case "empty-cell":
|
|
32
|
+
return e.sectionIndex === n.sectionIndex && e.cellPosition.row === n.cellPosition.row && e.cellPosition.col === n.cellPosition.col;
|
|
33
|
+
case "manage-pages-action":
|
|
34
|
+
return e.global === n.global && e.align === n.align;
|
|
35
|
+
}
|
|
26
36
|
}
|
|
27
|
-
function
|
|
37
|
+
function L(e, n) {
|
|
28
38
|
switch (n.type) {
|
|
29
39
|
case "OPEN_PANEL": {
|
|
30
40
|
if (e.activePanelId && e.isDirty)
|
|
@@ -91,7 +101,7 @@ function m(e, n) {
|
|
|
91
101
|
case "CLOSE_BELL_CUTOUT":
|
|
92
102
|
return e.bellCutoutOpen ? { ...e, bellCutoutOpen: !1 } : e;
|
|
93
103
|
case "BUFFER_BECOMES_DIRTY":
|
|
94
|
-
return e.activePanelId == null || !
|
|
104
|
+
return e.activePanelId == null || !y.has(e.activePanelId) ? {
|
|
95
105
|
...e,
|
|
96
106
|
pendingSideEffects: [
|
|
97
107
|
...e.pendingSideEffects,
|
|
@@ -124,12 +134,14 @@ function m(e, n) {
|
|
|
124
134
|
return e;
|
|
125
135
|
}
|
|
126
136
|
}
|
|
127
|
-
function
|
|
137
|
+
function T(e) {
|
|
128
138
|
return e.activePanelId === "notification-center" ? "notif-center" : e.activePanelId != null && e.bellCutoutOpen ? e.isDirty ? "panel-dirty+cutout" : "panel-clean+cutout" : e.activePanelId != null ? e.isDirty ? "panel-dirty" : "panel-clean" : e.bellCutoutOpen ? "bell-cutout-only" : "idle";
|
|
129
139
|
}
|
|
130
|
-
function
|
|
131
|
-
const [e, n] =
|
|
132
|
-
|
|
140
|
+
function D() {
|
|
141
|
+
const [e, n] = h(L, m), t = u([]), l = u(null);
|
|
142
|
+
s(() => () => {
|
|
143
|
+
l.current != null && (window.clearTimeout(l.current), l.current = null);
|
|
144
|
+
}, []), s(() => {
|
|
133
145
|
if (e.pendingSideEffects.length !== 0) {
|
|
134
146
|
for (const r of e.pendingSideEffects)
|
|
135
147
|
r.type === "SCHEDULE_TIMER" ? (l.current != null && window.clearTimeout(l.current), l.current = window.setTimeout(() => {
|
|
@@ -145,7 +157,7 @@ function N() {
|
|
|
145
157
|
] : r.type === "INVALID_DISPATCH" && process.env.NODE_ENV !== "production" && console.warn("[panels] INVALID_DISPATCH:", r.reason);
|
|
146
158
|
n({ type: "DRAIN_SIDE_EFFECTS" });
|
|
147
159
|
}
|
|
148
|
-
}, [e.pendingSideEffects]),
|
|
160
|
+
}, [e.pendingSideEffects, n]), s(() => {
|
|
149
161
|
if (!e.lastClose) return;
|
|
150
162
|
const r = {
|
|
151
163
|
panelId: e.lastClose.panelId,
|
|
@@ -159,35 +171,39 @@ function N() {
|
|
|
159
171
|
];
|
|
160
172
|
}, [e.lastClose]);
|
|
161
173
|
const o = E(
|
|
162
|
-
() =>
|
|
174
|
+
() => T(e),
|
|
163
175
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
164
176
|
[e.activePanelId, e.bellCutoutOpen, e.isDirty]
|
|
165
|
-
), a =
|
|
177
|
+
), a = g(() => t.current.slice(), []);
|
|
166
178
|
return { state: e, surfaceState: o, dispatch: n, getCloseLog: a };
|
|
167
179
|
}
|
|
168
|
-
function
|
|
169
|
-
const n =
|
|
180
|
+
function k({ children: e }) {
|
|
181
|
+
const n = D(), t = E(
|
|
170
182
|
() => n,
|
|
171
183
|
// Re-publish only when one of the four coordinator fields changes identity.
|
|
172
184
|
// dispatch + getCloseLog are stable. state + surfaceState change on dispatch.
|
|
173
185
|
[n.state, n.surfaceState, n.dispatch, n.getCloseLog]
|
|
174
186
|
);
|
|
175
|
-
return /* @__PURE__ */ i(
|
|
187
|
+
return /* @__PURE__ */ i(d.Provider, { value: t, children: e });
|
|
176
188
|
}
|
|
177
|
-
const
|
|
189
|
+
const N = {
|
|
178
190
|
position: "relative",
|
|
179
191
|
pointerEvents: "auto"
|
|
180
192
|
};
|
|
181
|
-
function
|
|
182
|
-
|
|
193
|
+
function x({ children: e, onClose: n, isOpen: t = !0, footer: l }) {
|
|
194
|
+
const [o, a] = P(!1);
|
|
195
|
+
return C(() => {
|
|
196
|
+
const r = requestAnimationFrame(() => a(t));
|
|
197
|
+
return () => cancelAnimationFrame(r);
|
|
198
|
+
}, [t]), /* @__PURE__ */ f(
|
|
183
199
|
"div",
|
|
184
200
|
{
|
|
185
201
|
"data-chrome": "panel",
|
|
186
|
-
"data-open":
|
|
202
|
+
"data-open": o ? "true" : "false",
|
|
187
203
|
role: "dialog",
|
|
188
204
|
"aria-modal": "true",
|
|
189
205
|
className: "gloss-panel-chrome",
|
|
190
|
-
style:
|
|
206
|
+
style: N,
|
|
191
207
|
children: [
|
|
192
208
|
/* @__PURE__ */ i("div", { className: "gloss-panel-chrome__header", children: /* @__PURE__ */ i(
|
|
193
209
|
"button",
|
|
@@ -206,7 +222,7 @@ function D({ children: e, onClose: n, isOpen: t = !0, footer: l }) {
|
|
|
206
222
|
}
|
|
207
223
|
);
|
|
208
224
|
}
|
|
209
|
-
const
|
|
225
|
+
const H = {
|
|
210
226
|
position: "fixed",
|
|
211
227
|
top: 0,
|
|
212
228
|
left: 0,
|
|
@@ -217,57 +233,64 @@ const b = {
|
|
|
217
233
|
overflow: "visible",
|
|
218
234
|
pointerEvents: "none",
|
|
219
235
|
zIndex: 55
|
|
220
|
-
},
|
|
236
|
+
}, b = {
|
|
221
237
|
position: "fixed",
|
|
222
238
|
top: "var(--tb-h, 60px)",
|
|
223
239
|
left: 0,
|
|
224
240
|
right: 0,
|
|
225
241
|
bottom: 0,
|
|
226
242
|
zIndex: 1,
|
|
227
|
-
|
|
243
|
+
// CR-03 fix: pass-through tint — scrim is visual-only and must not intercept
|
|
244
|
+
// grid card clicks. Click-outside / scrim-dismiss is handled via the onClick
|
|
245
|
+
// on the div below, which still fires because pointer events on the element
|
|
246
|
+
// itself are honoured when explicitly set; using 'none' prevents the invisible
|
|
247
|
+
// overlay from swallowing clicks on underlying controls (same class as the
|
|
248
|
+
// panel-wrapper-covers-grid-cards bug fixed at V2FeedbackSurface).
|
|
249
|
+
pointerEvents: "none",
|
|
228
250
|
background: "rgba(0, 0, 0, 0.04)"
|
|
229
251
|
};
|
|
230
252
|
function R({ panelComponents: e }) {
|
|
231
|
-
const { state: n, dispatch: t, getCloseLog: l } =
|
|
253
|
+
const { state: n, dispatch: t, getCloseLog: l } = S(), o = n.activePanelId ? e[n.activePanelId] : null;
|
|
232
254
|
n.activePanelId && !o && process.env.NODE_ENV !== "production" && console.error(
|
|
233
255
|
"[panels] No panel component registered for activePanelId:",
|
|
234
256
|
n.activePanelId
|
|
235
|
-
),
|
|
257
|
+
), s(() => {
|
|
236
258
|
if (n.activePanelId == null) return;
|
|
237
|
-
function
|
|
238
|
-
|
|
259
|
+
function c(I) {
|
|
260
|
+
I.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
239
261
|
}
|
|
240
|
-
return document.addEventListener("keydown",
|
|
241
|
-
document.removeEventListener("keydown",
|
|
262
|
+
return document.addEventListener("keydown", c), () => {
|
|
263
|
+
document.removeEventListener("keydown", c);
|
|
242
264
|
};
|
|
243
265
|
}, [n.activePanelId, t]);
|
|
244
|
-
const a =
|
|
245
|
-
|
|
266
|
+
const a = u(n);
|
|
267
|
+
C(() => {
|
|
246
268
|
a.current = n;
|
|
247
|
-
}),
|
|
248
|
-
if (process.env.NODE_ENV
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
269
|
+
}), s(() => {
|
|
270
|
+
if (process.env.NODE_ENV === "production") return;
|
|
271
|
+
const c = window;
|
|
272
|
+
return c.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), c.__panelsHostHandle = {
|
|
273
|
+
dispatch: t,
|
|
274
|
+
getState: () => a.current,
|
|
275
|
+
getCloseLog: l
|
|
276
|
+
}, () => {
|
|
277
|
+
c.__panelsHostHandle?.dispatch === t && delete c.__panelsHostHandle;
|
|
278
|
+
};
|
|
256
279
|
}, [t, l]);
|
|
257
|
-
const r =
|
|
280
|
+
const r = g(() => {
|
|
258
281
|
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
259
282
|
}, [t]);
|
|
260
|
-
return /* @__PURE__ */ i("div", { "data-panel-host": "true", style:
|
|
283
|
+
return /* @__PURE__ */ i("div", { "data-panel-host": "true", style: H, children: n.activePanelId != null && o != null && /* @__PURE__ */ f(v, { children: [
|
|
261
284
|
/* @__PURE__ */ i(
|
|
262
285
|
"div",
|
|
263
286
|
{
|
|
264
287
|
"data-panel-scrim": "true",
|
|
265
|
-
style:
|
|
288
|
+
style: b,
|
|
266
289
|
onClick: r
|
|
267
290
|
}
|
|
268
291
|
),
|
|
269
292
|
/* @__PURE__ */ i(
|
|
270
|
-
|
|
293
|
+
x,
|
|
271
294
|
{
|
|
272
295
|
isOpen: !0,
|
|
273
296
|
onClose: () => t({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
@@ -276,7 +299,7 @@ function R({ panelComponents: e }) {
|
|
|
276
299
|
)
|
|
277
300
|
] }) });
|
|
278
301
|
}
|
|
279
|
-
const
|
|
302
|
+
const U = {
|
|
280
303
|
"apply-button": !0,
|
|
281
304
|
// the ONLY commit reason
|
|
282
305
|
"cancel-button": !1,
|
|
@@ -290,14 +313,14 @@ const k = {
|
|
|
290
313
|
"nav-escape-hatch": !1
|
|
291
314
|
};
|
|
292
315
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
316
|
+
U as C,
|
|
317
|
+
k as P,
|
|
318
|
+
F as a,
|
|
296
319
|
R as b,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
320
|
+
x as c,
|
|
321
|
+
D as d,
|
|
322
|
+
T as e,
|
|
323
|
+
m as i,
|
|
324
|
+
L as r,
|
|
325
|
+
S as u
|
|
303
326
|
};
|
|
@@ -4710,11 +4710,12 @@ const ot = function({
|
|
|
4710
4710
|
backfaceVisibility: "hidden",
|
|
4711
4711
|
WebkitBackfaceVisibility: "hidden",
|
|
4712
4712
|
transform: fe ? "rotateY(180deg)" : "rotateY(0deg)",
|
|
4713
|
-
transition: "transform 500ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
4713
|
+
transition: "transform 500ms cubic-bezier(0.22, 1, 0.36, 1)",
|
|
4714
|
+
pointerEvents: "none"
|
|
4714
4715
|
},
|
|
4715
4716
|
"data-resize-phase": F,
|
|
4716
4717
|
children: [
|
|
4717
|
-
_e,
|
|
4718
|
+
/* @__PURE__ */ e("div", { style: { pointerEvents: "auto", display: "flex", flexDirection: "column", flex: "1 1 auto", minHeight: 0 }, children: _e }),
|
|
4718
4719
|
/* @__PURE__ */ e("div", { className: "gloss-card-shell__resize-outgoing", "aria-hidden": "true", children: X })
|
|
4719
4720
|
]
|
|
4720
4721
|
}
|
package/catalog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as I, Q as N, E as B, J as x, L as D, D as F, F as A, H as M, K as v, T as R, U as W, V as H, b1 as _, W as k, b2 as L, b3 as z, b4 as E, X as G, Y as $, Z as O } from "./Expandable-
|
|
2
|
-
import { a5 as Ne, b8 as Be, aB as xe, aj as De, $ as Fe, ap as Ae, bV as Me, N as ve, aa as Re, bo as We, P as He, B as _e, bj as ke, C as Le, by as ze, b as Ee, c as Ge, O as $e, q as Oe, af as Ve, aP as we, aE as Xe, as as je, m as Ue, o as Ze, aH as qe, ad as Je, ba as Ke, ab as Qe, bp as Ye, _ as ea, ar as aa, aS as sa, bc as ta, p as ra, ao as oa, a2 as ia, at as na, a4 as la, ac as da, bK as ca, aV as ga, t as ma, I as pa, i as ua, ay as ba, M as fa, y as ha, au as ya, bi as Ta, bQ as Sa, aq as Pa, w as Ca, bq as Ia, aU as Na, b5 as Ba, al as xa, aM as Da, ai as Fa, an as Aa, aw as Ma, bX as va, aT as Ra, bW as Wa, ae as Ha, e as _a, R as ka, l as La, r as za, aJ as Ea, ak as Ga, ag as $a, j as Oa, z as Va, b9 as wa, ah as Xa, be as ja, bh as Ua, bf as Za, bg as qa, k as Ja, bb as Ka, bn as Qa, S as Ya, bl as es, ax as as, bd as ss, bR as ts, am as rs, bU as os, v as is, bL as ns, n as ls, h as ds, s as cs, a0 as gs, a9 as ms, bk as ps, bx as us, bE as bs, aD as fs, a8 as hs, aR as ys, aG as Ts, aA as Ss, aO as Ps, aL as Cs, a3 as Is } from "./Expandable-
|
|
1
|
+
import { A as I, Q as N, E as B, J as x, L as D, D as F, F as A, H as M, K as v, T as R, U as W, V as H, b1 as _, W as k, b2 as L, b3 as z, b4 as E, X as G, Y as $, Z as O } from "./Expandable-D4ZdxEEQ.js";
|
|
2
|
+
import { a5 as Ne, b8 as Be, aB as xe, aj as De, $ as Fe, ap as Ae, bV as Me, N as ve, aa as Re, bo as We, P as He, B as _e, bj as ke, C as Le, by as ze, b as Ee, c as Ge, O as $e, q as Oe, af as Ve, aP as we, aE as Xe, as as je, m as Ue, o as Ze, aH as qe, ad as Je, ba as Ke, ab as Qe, bp as Ye, _ as ea, ar as aa, aS as sa, bc as ta, p as ra, ao as oa, a2 as ia, at as na, a4 as la, ac as da, bK as ca, aV as ga, t as ma, I as pa, i as ua, ay as ba, M as fa, y as ha, au as ya, bi as Ta, bQ as Sa, aq as Pa, w as Ca, bq as Ia, aU as Na, b5 as Ba, al as xa, aM as Da, ai as Fa, an as Aa, aw as Ma, bX as va, aT as Ra, bW as Wa, ae as Ha, e as _a, R as ka, l as La, r as za, aJ as Ea, ak as Ga, ag as $a, j as Oa, z as Va, b9 as wa, ah as Xa, be as ja, bh as Ua, bf as Za, bg as qa, k as Ja, bb as Ka, bn as Qa, S as Ya, bl as es, ax as as, bd as ss, bR as ts, am as rs, bU as os, v as is, bL as ns, n as ls, h as ds, s as cs, a0 as gs, a9 as ms, bk as ps, bx as us, bE as bs, aD as fs, a8 as hs, aR as ys, aG as Ts, aA as Ss, aO as Ps, aL as Cs, a3 as Is } from "./Expandable-D4ZdxEEQ.js";
|
|
3
3
|
import { jsx as c, jsxs as S } from "react/jsx-runtime";
|
|
4
4
|
import { C as e, T as a, ae as V, S as s, E as u, R as m, f as w, Z as X } from "./UIContext-DP6JGCto.js";
|
|
5
5
|
import { B as j, a as U, e as Z, c as q, d as J, b as K } from "./BaseAsyncButton-Cq_l7clO.js";
|
package/composites-panels.js
CHANGED
|
@@ -1,73 +1,76 @@
|
|
|
1
|
-
import { a as i, u, c as p } from "./COMMITS-
|
|
2
|
-
import { C as I, b as
|
|
3
|
-
import { jsxs as c, jsx as
|
|
4
|
-
import { useEffect as
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
return
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
] })
|
|
1
|
+
import { a as i, u, c as p } from "./COMMITS-CoGFzpf4.js";
|
|
2
|
+
import { C as I, b as H, P as N, e as k, i as O, r as w, d as A } from "./COMMITS-CoGFzpf4.js";
|
|
3
|
+
import { jsxs as c, jsx as s, Fragment as f } from "react/jsx-runtime";
|
|
4
|
+
import { useEffect as r, useRef as m, useLayoutEffect as h, useCallback as P } from "react";
|
|
5
|
+
function E({ isOpen: t }) {
|
|
6
|
+
const n = i()?.state.activeTrigger, o = n?.kind === "card-overflow" ? n.cardId : null;
|
|
7
|
+
return /* @__PURE__ */ c("div", { "data-shell": "settings", "aria-hidden": !t, children: [
|
|
8
|
+
/* @__PURE__ */ s("p", { style: { margin: 0, fontSize: 14, color: "#495057" }, children: o ? `Settings for card: ${o}` : "Settings" }),
|
|
9
|
+
/* @__PURE__ */ s("p", { style: { margin: "8px 0 0", fontSize: 12, color: "#adb5bd" }, children: "Configuration options coming soon." })
|
|
10
|
+
] });
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const g = {
|
|
13
13
|
position: "fixed",
|
|
14
14
|
inset: 0,
|
|
15
15
|
pointerEvents: "none",
|
|
16
16
|
zIndex: 55
|
|
17
|
-
},
|
|
17
|
+
}, v = {
|
|
18
18
|
position: "absolute",
|
|
19
19
|
inset: 0,
|
|
20
20
|
zIndex: 1,
|
|
21
|
-
|
|
21
|
+
// CR-03 fix: pass-through tint — scrim is visual-only and must not intercept
|
|
22
|
+
// grid card clicks. See PanelHost.tsx CR-03 comment for full rationale.
|
|
23
|
+
pointerEvents: "none",
|
|
22
24
|
background: "rgba(0, 0, 0, 0.04)"
|
|
23
25
|
};
|
|
24
26
|
function _() {
|
|
25
|
-
const { state:
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
function
|
|
27
|
+
const { state: t, dispatch: e, getCloseLog: n } = u();
|
|
28
|
+
r(() => {
|
|
29
|
+
if (t.activePanelId == null) return;
|
|
30
|
+
function a(d) {
|
|
29
31
|
d.key === "Escape" && e({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
30
32
|
}
|
|
31
|
-
return document.addEventListener("keydown",
|
|
32
|
-
}, [
|
|
33
|
-
const o = m(
|
|
34
|
-
|
|
35
|
-
o.current =
|
|
36
|
-
}),
|
|
37
|
-
if (process.env.NODE_ENV
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
34
|
+
}, [t.activePanelId, e]);
|
|
35
|
+
const o = m(t);
|
|
36
|
+
h(() => {
|
|
37
|
+
o.current = t;
|
|
38
|
+
}), r(() => {
|
|
39
|
+
if (process.env.NODE_ENV === "production") return;
|
|
40
|
+
const a = window;
|
|
41
|
+
return a.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), a.__panelsHostHandle = {
|
|
42
|
+
dispatch: e,
|
|
43
|
+
getState: () => o.current,
|
|
44
|
+
getCloseLog: n
|
|
45
|
+
}, () => {
|
|
46
|
+
a.__panelsHostHandle?.dispatch === e && delete window.__panelsHostHandle;
|
|
47
|
+
};
|
|
48
|
+
}, [e, n]);
|
|
49
|
+
const l = P(() => {
|
|
47
50
|
e({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
48
51
|
}, [e]);
|
|
49
|
-
return /* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: g, children: t.activePanelId != null && /* @__PURE__ */ s(
|
|
50
53
|
"div",
|
|
51
54
|
{
|
|
52
55
|
"data-panel-scrim": "true",
|
|
53
|
-
style:
|
|
54
|
-
onClick:
|
|
56
|
+
style: v,
|
|
57
|
+
onClick: l
|
|
55
58
|
}
|
|
56
59
|
) });
|
|
57
60
|
}
|
|
58
|
-
function b({ panelComponents:
|
|
61
|
+
function b({ panelComponents: t }) {
|
|
59
62
|
const e = i();
|
|
60
63
|
if (e == null) return null;
|
|
61
|
-
const { state:
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
if (
|
|
64
|
+
const { state: n, dispatch: o } = e;
|
|
65
|
+
if (n.activePanelId == null) return null;
|
|
66
|
+
const l = t[n.activePanelId];
|
|
67
|
+
if (l == null)
|
|
65
68
|
return process.env.NODE_ENV !== "production" && console.error(
|
|
66
69
|
"[panels] No panel component registered for activePanelId:",
|
|
67
|
-
|
|
70
|
+
n.activePanelId
|
|
68
71
|
), null;
|
|
69
|
-
const
|
|
70
|
-
/* @__PURE__ */
|
|
72
|
+
const a = n.activePanelId === "settings" ? /* @__PURE__ */ c(f, { children: [
|
|
73
|
+
/* @__PURE__ */ s(
|
|
71
74
|
"button",
|
|
72
75
|
{
|
|
73
76
|
id: "settings-cancel",
|
|
@@ -77,7 +80,7 @@ function b({ panelComponents: n }) {
|
|
|
77
80
|
children: "Cancel"
|
|
78
81
|
}
|
|
79
82
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ s(
|
|
81
84
|
"button",
|
|
82
85
|
{
|
|
83
86
|
id: "settings-apply",
|
|
@@ -88,28 +91,28 @@ function b({ panelComponents: n }) {
|
|
|
88
91
|
}
|
|
89
92
|
)
|
|
90
93
|
] }) : null;
|
|
91
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ s(
|
|
92
95
|
p,
|
|
93
96
|
{
|
|
94
97
|
isOpen: !0,
|
|
95
98
|
onClose: () => o({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
96
|
-
footer:
|
|
97
|
-
children: /* @__PURE__ */
|
|
99
|
+
footer: a,
|
|
100
|
+
children: /* @__PURE__ */ s(l, { isOpen: !0 })
|
|
98
101
|
}
|
|
99
102
|
);
|
|
100
103
|
}
|
|
101
104
|
export {
|
|
102
105
|
I as COMMITS,
|
|
103
106
|
p as PanelChrome,
|
|
104
|
-
|
|
107
|
+
H as PanelHost,
|
|
105
108
|
_ as PanelHostShell,
|
|
106
|
-
|
|
109
|
+
N as PanelProvider,
|
|
107
110
|
b as PanelSlot,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
E as SettingsShell,
|
|
112
|
+
k as deriveSurfaceState,
|
|
113
|
+
O as initialState,
|
|
114
|
+
w as reducer,
|
|
112
115
|
u as usePanelContext,
|
|
113
116
|
i as usePanelContextOptional,
|
|
114
|
-
|
|
117
|
+
A as usePanelCoordinator
|
|
115
118
|
};
|
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { u as Ze, C as qe } from "./Expandable-
|
|
2
|
-
import { Q as Sr, V as kr, T as Dr, U as xr, a5 as Tr, b8 as Rr, aB as Mr, aj as Pr, $ as Ir, ap as Er, N as Ar, aa as Fr, bo as Or, P as Lr, B as $r, a as zr, A as Br, K as Kr, bj as Gr, J as Hr, L as Wr, E as Vr, D as jr, H as Ur, F as Yr, by as Zr, b as qr, c as Qr, O as Xr, q as Jr, af as es, aP as ts, A as as, K as ns, J as rs, L as ss, E as is, D as os, H as ls, F as cs, b1 as ds, b4 as us, b3 as ms, b2 as gs, b5 as ps, aE as hs, a7 as fs, a6 as bs, as as vs, m as ys, o as ws, aH as _s, ad as Cs, ba as Ns, ab as Ss, bp as ks, _ as Ds, bI as xs, bH as Ts, bJ as Rs, ar as Ms, aS as Ps, bc as Is, bN as Es, bw as As, p as Fs, ao as Os, bC as Ls, bt as $s, a2 as zs, at as Bs, a4 as Ks, bB as Gs, bS as Hs, G as Ws, f as Vs, ac as js, bK as Us, aV as Ys, t as Zs, x as qs, I as Qs, i as Xs, ay as Js, bO as ei, M as ti, y as ai, W as ni, Z as ri, X as si, Y as ii, au as oi, bi as li, bQ as ci, bM as di, aq as ui, w as mi, bq as gi, aU as pi, al as hi, aM as fi, ai as bi, an as vi, aw as yi, aT as wi, ae as _i, av as Ci, e as Ni, R as Si, l as ki, r as Di, aJ as xi, bz as Ti, bA as Ri, ak as Mi, ag as Pi, j as Ii, z as Ei, b9 as Ai, ah as Fi, bP as Oi, be as Li, bh as $i, bf as zi, bg as Bi, k as Ki, bb as Gi, bn as Hi, S as Wi, bl as Vi, bm as ji, ax as Ui, bd as Yi, bR as Zi, am as qi, v as Qi, bL as Xi, n as Ji, h as eo, s as to, a0 as ao, a1 as no, a9 as ro, bk as so, bx as io, bE as oo, aC as lo, aD as co, a8 as uo, aQ as mo, aR as go, aF as po, aG as ho, aI as fo, aX as bo, aY as vo, br as yo, bG as wo, bF as _o, a_ as Co, a$ as No, az as So, aA as ko, b7 as Do, b6 as xo, b0 as To, aN as Ro, aO as Mo, aZ as Po, aK as Io, aL as Eo, d as Ao, bD as Fo, bs as Oo, bu as Lo, bv as $o, aW as zo, a3 as Bo, bT as Ko, g as Go } from "./Expandable-
|
|
1
|
+
import { u as Ze, C as qe } from "./Expandable-D4ZdxEEQ.js";
|
|
2
|
+
import { Q as Sr, V as kr, T as Dr, U as xr, a5 as Tr, b8 as Rr, aB as Mr, aj as Pr, $ as Ir, ap as Er, N as Ar, aa as Fr, bo as Or, P as Lr, B as $r, a as zr, A as Br, K as Kr, bj as Gr, J as Hr, L as Wr, E as Vr, D as jr, H as Ur, F as Yr, by as Zr, b as qr, c as Qr, O as Xr, q as Jr, af as es, aP as ts, A as as, K as ns, J as rs, L as ss, E as is, D as os, H as ls, F as cs, b1 as ds, b4 as us, b3 as ms, b2 as gs, b5 as ps, aE as hs, a7 as fs, a6 as bs, as as vs, m as ys, o as ws, aH as _s, ad as Cs, ba as Ns, ab as Ss, bp as ks, _ as Ds, bI as xs, bH as Ts, bJ as Rs, ar as Ms, aS as Ps, bc as Is, bN as Es, bw as As, p as Fs, ao as Os, bC as Ls, bt as $s, a2 as zs, at as Bs, a4 as Ks, bB as Gs, bS as Hs, G as Ws, f as Vs, ac as js, bK as Us, aV as Ys, t as Zs, x as qs, I as Qs, i as Xs, ay as Js, bO as ei, M as ti, y as ai, W as ni, Z as ri, X as si, Y as ii, au as oi, bi as li, bQ as ci, bM as di, aq as ui, w as mi, bq as gi, aU as pi, al as hi, aM as fi, ai as bi, an as vi, aw as yi, aT as wi, ae as _i, av as Ci, e as Ni, R as Si, l as ki, r as Di, aJ as xi, bz as Ti, bA as Ri, ak as Mi, ag as Pi, j as Ii, z as Ei, b9 as Ai, ah as Fi, bP as Oi, be as Li, bh as $i, bf as zi, bg as Bi, k as Ki, bb as Gi, bn as Hi, S as Wi, bl as Vi, bm as ji, ax as Ui, bd as Yi, bR as Zi, am as qi, v as Qi, bL as Xi, n as Ji, h as eo, s as to, a0 as ao, a1 as no, a9 as ro, bk as so, bx as io, bE as oo, aC as lo, aD as co, a8 as uo, aQ as mo, aR as go, aF as po, aG as ho, aI as fo, aX as bo, aY as vo, br as yo, bG as wo, bF as _o, a_ as Co, a$ as No, az as So, aA as ko, b7 as Do, b6 as xo, b0 as To, aN as Ro, aO as Mo, aZ as Po, aK as Io, aL as Eo, d as Ao, bD as Fo, bs as Oo, bu as Lo, bv as $o, aW as zo, a3 as Bo, bT as Ko, g as Go } from "./Expandable-D4ZdxEEQ.js";
|
|
3
3
|
import { jsxs as w, jsx as r, Fragment as $ } from "react/jsx-runtime";
|
|
4
4
|
import * as B from "react";
|
|
5
5
|
import F, { useRef as P, useEffect as A, useState as E, useCallback as C, useId as Qe, forwardRef as Xe, useMemo as re, createContext as Je, useContext as et } from "react";
|
|
6
6
|
import { motion as G, useMotionValue as tt, AnimatePresence as at, useDragControls as nt } from "framer-motion";
|
|
7
7
|
import { B as rt, a as X, b as ce, U as fe } from "./UIContext-DP6JGCto.js";
|
|
8
8
|
import { c as Wo, u as Vo } from "./UIContext-DP6JGCto.js";
|
|
9
|
-
import { C as Uo, c as Yo, b as Zo, P as qo, e as Qo, i as Xo, r as Jo, u as el, a as tl, d as al } from "./COMMITS-
|
|
9
|
+
import { C as Uo, c as Yo, b as Zo, P as qo, e as Qo, i as Xo, r as Jo, u as el, a as tl, d as al } from "./COMMITS-CoGFzpf4.js";
|
|
10
10
|
import { createPortal as st } from "react-dom";
|
|
11
11
|
import { DEFAULT_MARKET_PRESETS as rl, DEFAULT_PINNED as sl, PERIOD_OPTIONS as il, ROLLING_OPTIONS as ol, TODAY_PRESET as ll, findPreset as cl, formatDateRange as dl, formatMarketDates as ul, formatTrend as ml, formatValue as gl, generateMarketId as pl, getAllPresets as hl, getDateRangeForPreset as fl, getPresetLabel as bl, isInRange as vl, isMarketActive as yl, isSameDay as wl, normalizePresetId as _l, toUppercasePresetId as Cl } from "@mt-gloss/utils";
|
|
12
12
|
import it from "@mui/icons-material/AccessTime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PanelShellProps } from '../PanelHost';
|
|
2
|
-
export declare function SettingsShell({ isOpen }: PanelShellProps): import("react/jsx-runtime").JSX.Element
|
|
2
|
+
export declare function SettingsShell({ isOpen }: PanelShellProps): import("react/jsx-runtime").JSX.Element;
|