@mt-gloss/ui 0.1.105 → 0.1.106
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/composites-panels.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { C as
|
|
1
|
+
import { u as I, f as q, S as se, a as oe, g as E, c as A } from "./COMMITS-kaUvc5jL.js";
|
|
2
|
+
import { C as Je, b as Ze, P as et, e as tt, i as nt, r as st, d as ot } from "./COMMITS-kaUvc5jL.js";
|
|
3
3
|
import { jsx as s, jsxs as p, Fragment as ae } from "react/jsx-runtime";
|
|
4
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 Be() {
|
|
6
|
+
const e = I();
|
|
7
|
+
if (e?.state.activePanelId !== "settings") return null;
|
|
8
|
+
const t = e.state.activeTrigger;
|
|
9
|
+
return t?.kind === "card-overflow" ? t.cardId : null;
|
|
10
|
+
}
|
|
5
11
|
function le({ children: e }) {
|
|
6
12
|
return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
|
|
7
13
|
}
|
|
@@ -92,7 +98,7 @@ function he({ value: e, onSelect: t }) {
|
|
|
92
98
|
] });
|
|
93
99
|
}
|
|
94
100
|
const fe = ["threshold", "timeframe", "color"];
|
|
95
|
-
function
|
|
101
|
+
function He({
|
|
96
102
|
isOpen: e,
|
|
97
103
|
cardSpan: t,
|
|
98
104
|
cardLabel: o = "Metric",
|
|
@@ -100,7 +106,7 @@ function Be({
|
|
|
100
106
|
dimensions: r = fe,
|
|
101
107
|
initialTab: l
|
|
102
108
|
}) {
|
|
103
|
-
const d =
|
|
109
|
+
const d = I(), 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
110
|
z.useEffect(() => {
|
|
105
111
|
r.includes(f) || y(g);
|
|
106
112
|
}, [r, f, g]);
|
|
@@ -328,7 +334,7 @@ const Q = [
|
|
|
328
334
|
{ id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
|
|
329
335
|
]
|
|
330
336
|
};
|
|
331
|
-
function
|
|
337
|
+
function qe({
|
|
332
338
|
isOpen: e,
|
|
333
339
|
lenses: t = Q,
|
|
334
340
|
defaultLens: o = X,
|
|
@@ -369,7 +375,7 @@ function He({
|
|
|
369
375
|
}
|
|
370
376
|
);
|
|
371
377
|
}
|
|
372
|
-
function
|
|
378
|
+
function Ue({
|
|
373
379
|
isOpen: e,
|
|
374
380
|
replacingLabel: t,
|
|
375
381
|
lenses: o = Q,
|
|
@@ -478,7 +484,7 @@ const _e = [
|
|
|
478
484
|
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
479
485
|
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
480
486
|
];
|
|
481
|
-
function
|
|
487
|
+
function Ye({
|
|
482
488
|
isOpen: e,
|
|
483
489
|
pages: t = _e,
|
|
484
490
|
footerSlot: o
|
|
@@ -492,7 +498,7 @@ function Ue({
|
|
|
492
498
|
o
|
|
493
499
|
] });
|
|
494
500
|
}
|
|
495
|
-
const
|
|
501
|
+
const Ke = {
|
|
496
502
|
SETTINGS: "settings",
|
|
497
503
|
CATALOG_ADD: "catalog-add",
|
|
498
504
|
CATALOG_REPLACE: "catalog-replace",
|
|
@@ -512,7 +518,7 @@ const Ye = {
|
|
|
512
518
|
pointerEvents: "none",
|
|
513
519
|
background: "rgba(0, 0, 0, 0.04)"
|
|
514
520
|
};
|
|
515
|
-
function
|
|
521
|
+
function We() {
|
|
516
522
|
const { state: e, dispatch: t, getCloseLog: o } = oe();
|
|
517
523
|
V(() => {
|
|
518
524
|
if (e.activePanelId == null) return;
|
|
@@ -547,8 +553,8 @@ function Ke() {
|
|
|
547
553
|
}
|
|
548
554
|
) });
|
|
549
555
|
}
|
|
550
|
-
function
|
|
551
|
-
const o =
|
|
556
|
+
function je({ panelComponents: e, children: t }) {
|
|
557
|
+
const o = I();
|
|
552
558
|
if (o == null) return null;
|
|
553
559
|
const { state: n, dispatch: r } = o;
|
|
554
560
|
if (n.activePanelId == null) return null;
|
|
@@ -688,7 +694,7 @@ function Te(e) {
|
|
|
688
694
|
{ once: !0 }
|
|
689
695
|
);
|
|
690
696
|
}
|
|
691
|
-
function
|
|
697
|
+
function Ie(e) {
|
|
692
698
|
const { mountEl: t, onAssert: o } = e;
|
|
693
699
|
if (t == null) {
|
|
694
700
|
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => x(e), H), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
@@ -703,7 +709,7 @@ function Le(e) {
|
|
|
703
709
|
};
|
|
704
710
|
t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), l = setTimeout(i, n + Ae);
|
|
705
711
|
}
|
|
706
|
-
function
|
|
712
|
+
function Le(e) {
|
|
707
713
|
const { state: t, onAssert: o } = e;
|
|
708
714
|
if (t.activePanelId && t.isDirty) {
|
|
709
715
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
@@ -715,17 +721,17 @@ function Oe(e) {
|
|
|
715
721
|
return;
|
|
716
722
|
}
|
|
717
723
|
if (t.activePanelId) {
|
|
718
|
-
|
|
724
|
+
Ie(e);
|
|
719
725
|
return;
|
|
720
726
|
}
|
|
721
727
|
x(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
722
728
|
}
|
|
723
|
-
function
|
|
729
|
+
function Oe() {
|
|
724
730
|
if (!(typeof window > "u"))
|
|
725
731
|
return window.__panelsAsserter;
|
|
726
732
|
}
|
|
727
|
-
function
|
|
728
|
-
const e =
|
|
733
|
+
function Ge() {
|
|
734
|
+
const e = I(), t = q();
|
|
729
735
|
return W(
|
|
730
736
|
(o, n) => {
|
|
731
737
|
if (!e)
|
|
@@ -739,16 +745,16 @@ function je() {
|
|
|
739
745
|
chromeEl: l,
|
|
740
746
|
reducedMotion: t,
|
|
741
747
|
onAssert: (i) => {
|
|
742
|
-
|
|
748
|
+
Oe()?.recordTransition?.(i);
|
|
743
749
|
}
|
|
744
750
|
};
|
|
745
|
-
|
|
751
|
+
Le(d);
|
|
746
752
|
},
|
|
747
753
|
[e, t]
|
|
748
754
|
);
|
|
749
755
|
}
|
|
750
756
|
let T = !1, L = null;
|
|
751
|
-
function
|
|
757
|
+
function $() {
|
|
752
758
|
const e = [];
|
|
753
759
|
let t = "cleaned";
|
|
754
760
|
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
@@ -771,7 +777,7 @@ function D() {
|
|
|
771
777
|
timestamp: Date.now()
|
|
772
778
|
};
|
|
773
779
|
}
|
|
774
|
-
const O = "8px 8px 0px",
|
|
780
|
+
const O = "8px 8px 0px", k = "64px", M = "inset(0px 0px 60px 0px)", D = "inset(0px -40px -40px -40px)";
|
|
775
781
|
function m(e, t, o, n, r) {
|
|
776
782
|
return { id: e, constraint: t, expected: o, actual: n, pass: r };
|
|
777
783
|
}
|
|
@@ -802,10 +808,10 @@ function F() {
|
|
|
802
808
|
e.push(m("C2", "mount padding constant", O, c || "n/a", u));
|
|
803
809
|
}
|
|
804
810
|
if (!t)
|
|
805
|
-
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px",
|
|
811
|
+
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", k, "absent", !1));
|
|
806
812
|
else {
|
|
807
|
-
const a = getComputedStyle(t).bottom || t.style.bottom || "", c = a ===
|
|
808
|
-
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px",
|
|
813
|
+
const a = getComputedStyle(t).bottom || t.style.bottom || "", c = a === k;
|
|
814
|
+
e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", k, a || "n/a", c));
|
|
809
815
|
}
|
|
810
816
|
if (!o)
|
|
811
817
|
e.push(m("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
|
|
@@ -899,10 +905,10 @@ function F() {
|
|
|
899
905
|
);
|
|
900
906
|
}
|
|
901
907
|
if (!t)
|
|
902
|
-
e.push(m("C9", "mount closed-state clipPath",
|
|
908
|
+
e.push(m("C9", "mount closed-state clipPath", M, "absent", !1));
|
|
903
909
|
else {
|
|
904
|
-
const i = t.style.clipPath, a = getComputedStyle(t), c = i || a.clipPath || "", u = c ===
|
|
905
|
-
e.push(m("C9", "mount closed-state clipPath",
|
|
910
|
+
const i = t.style.clipPath, a = getComputedStyle(t), c = i || a.clipPath || "", u = c === M;
|
|
911
|
+
e.push(m("C9", "mount closed-state clipPath", M, c || "n/a", u));
|
|
906
912
|
}
|
|
907
913
|
if (!l)
|
|
908
914
|
e.push(m("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
|
|
@@ -925,10 +931,10 @@ function F() {
|
|
|
925
931
|
e.push(m("C11", "coordinator overflow === visible", "visible", a || "n/a", c));
|
|
926
932
|
}
|
|
927
933
|
if (!d)
|
|
928
|
-
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)",
|
|
934
|
+
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", D, "absent", !1));
|
|
929
935
|
else {
|
|
930
|
-
const i = d.style.clipPath, a = getComputedStyle(d), c = i || a.clipPath || "", u = c ===
|
|
931
|
-
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)",
|
|
936
|
+
const i = d.style.clipPath, a = getComputedStyle(d), c = i || a.clipPath || "", u = c === D;
|
|
937
|
+
e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", D, c || "n/a", u));
|
|
932
938
|
}
|
|
933
939
|
return e.push(
|
|
934
940
|
m(
|
|
@@ -952,7 +958,7 @@ function ke(e) {
|
|
|
952
958
|
return F().find((t) => t.id === e);
|
|
953
959
|
}
|
|
954
960
|
function Me() {
|
|
955
|
-
const e =
|
|
961
|
+
const e = $();
|
|
956
962
|
return { q12: [
|
|
957
963
|
{
|
|
958
964
|
id: "Q12-12",
|
|
@@ -970,10 +976,10 @@ function De() {
|
|
|
970
976
|
isEnabled: () => T,
|
|
971
977
|
getLastReport: () => L,
|
|
972
978
|
recordTransition: (e) => {
|
|
973
|
-
T && (L = { ...e,
|
|
979
|
+
T && (L = { ...e, ...$() });
|
|
974
980
|
},
|
|
975
981
|
assertOnce: () => {
|
|
976
|
-
const e =
|
|
982
|
+
const e = $();
|
|
977
983
|
return L = e, e;
|
|
978
984
|
},
|
|
979
985
|
assertCcOnly: F,
|
|
@@ -991,10 +997,10 @@ function Re() {
|
|
|
991
997
|
T = !1;
|
|
992
998
|
}
|
|
993
999
|
export {
|
|
994
|
-
|
|
995
|
-
|
|
1000
|
+
Je as COMMITS,
|
|
1001
|
+
qe as CatalogAddShell,
|
|
996
1002
|
be as CatalogFooter,
|
|
997
|
-
|
|
1003
|
+
Ue as CatalogReplaceShell,
|
|
998
1004
|
R as CatalogStateContext,
|
|
999
1005
|
ie as CloneCard,
|
|
1000
1006
|
le as CloneStage,
|
|
@@ -1002,33 +1008,34 @@ export {
|
|
|
1002
1008
|
Q as MOCK_LENSES,
|
|
1003
1009
|
_e as MOCK_PAGES,
|
|
1004
1010
|
J as MOCK_TILES_BY_LENS,
|
|
1005
|
-
|
|
1011
|
+
Ke as PANEL_IDS,
|
|
1006
1012
|
Pe as PageMgmtFooter,
|
|
1007
|
-
|
|
1013
|
+
Ye as PageMgmtShell,
|
|
1008
1014
|
Z as PageMgmtStateContext,
|
|
1009
1015
|
A as PanelChrome,
|
|
1010
|
-
|
|
1011
|
-
|
|
1016
|
+
Ze as PanelHost,
|
|
1017
|
+
We as PanelHostShell,
|
|
1012
1018
|
E as PanelMount,
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1019
|
+
et as PanelProvider,
|
|
1020
|
+
je as PanelSlot,
|
|
1021
|
+
He as SettingsShell,
|
|
1016
1022
|
F as assertCcOnly,
|
|
1017
|
-
|
|
1023
|
+
$ as assertPanelDomShape,
|
|
1018
1024
|
Me as assertPanelTruths,
|
|
1019
|
-
|
|
1025
|
+
tt as deriveSurfaceState,
|
|
1020
1026
|
Re as disablePanelAsserter,
|
|
1021
1027
|
$e as enablePanelAsserter,
|
|
1022
1028
|
ke as getCcRowById,
|
|
1023
|
-
|
|
1029
|
+
nt as initialState,
|
|
1024
1030
|
B as positionKey,
|
|
1025
|
-
|
|
1026
|
-
|
|
1031
|
+
st as reducer,
|
|
1032
|
+
Le as transitionToPanel,
|
|
1027
1033
|
ve as useCatalogState,
|
|
1034
|
+
Be as useEditingCardId,
|
|
1028
1035
|
Ce as usePageMgmtState,
|
|
1029
1036
|
oe as usePanelContext,
|
|
1030
|
-
|
|
1031
|
-
|
|
1037
|
+
I as usePanelContextOptional,
|
|
1038
|
+
ot as usePanelCoordinator,
|
|
1032
1039
|
q as useReducedMotionPanel,
|
|
1033
|
-
|
|
1040
|
+
Ge as useTransitionToPanel
|
|
1034
1041
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useEditingCardId — derives the currently-editing card ID from coordinator state.
|
|
3
|
+
*
|
|
4
|
+
* Returns the cardId when activePanelId === 'settings' AND the trigger is a card-overflow.
|
|
5
|
+
* Returns null otherwise.
|
|
6
|
+
*
|
|
7
|
+
* Phase 16 D-05: pure derivation — zero new state slice. Supersedes PHASE-C editingCardId slice proposal.
|
|
8
|
+
*
|
|
9
|
+
* Consumers (Phase 16):
|
|
10
|
+
* - reptime MetricCardSlot — useSortable({ disabled: ... || !!editingCardId })
|
|
11
|
+
* - reptime MetricCardSlot — useDraggable({ disabled: ... || !!editingCardId })
|
|
12
|
+
* - reptime useEdgeHoverResize — enabled: !editingCardId
|
|
13
|
+
* - reptime EmptyCellPackAffordance.onClick — early-return + dispatch SET_LOCK_HINT
|
|
14
|
+
* - reptime toolbar `+` button — disabled attribute
|
|
15
|
+
*/
|
|
16
|
+
export declare function useEditingCardId(): string | null;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* `composites-panels.js` matching existing `internals` + `catalog` pattern.
|
|
9
9
|
*/
|
|
10
10
|
export { PanelProvider, usePanelContext, usePanelContextOptional } from './PanelProvider';
|
|
11
|
+
export { useEditingCardId } from './hooks/useEditingCardId';
|
|
11
12
|
export { SettingsShell } from './shells/SettingsShell';
|
|
12
13
|
export { CatalogAddShell } from './shells/CatalogAddShell';
|
|
13
14
|
export type { CatalogAddShellProps } from './shells/CatalogAddShell';
|