@charcuterie/ui 4.5.1 → 4.7.0
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/README.md +12 -0
- package/dist/LaneTimeline/LaneTimeline.d.ts +132 -0
- package/dist/LaneTimeline/LaneTimeline.d.ts.map +1 -0
- package/dist/LaneTimeline/LaneTimeline.js +165 -0
- package/dist/LaneTimeline/LaneTimeline.js.map +1 -0
- package/dist/LaneTimeline/LaneTimelineBar.d.ts +97 -0
- package/dist/LaneTimeline/LaneTimelineBar.d.ts.map +1 -0
- package/dist/LaneTimeline/LaneTimelineBar.js +69 -0
- package/dist/LaneTimeline/LaneTimelineBar.js.map +1 -0
- package/dist/LaneTimeline/LaneTimelineLane.d.ts +84 -0
- package/dist/LaneTimeline/LaneTimelineLane.d.ts.map +1 -0
- package/dist/LaneTimeline/LaneTimelineLane.js +109 -0
- package/dist/LaneTimeline/LaneTimelineLane.js.map +1 -0
- package/dist/LaneTimeline/laneTimelineGeometry.d.ts +268 -0
- package/dist/LaneTimeline/laneTimelineGeometry.d.ts.map +1 -0
- package/dist/LaneTimeline/laneTimelineGeometry.js +277 -0
- package/dist/LaneTimeline/laneTimelineGeometry.js.map +1 -0
- package/dist/LaneTimeline/useTrackMeasurements.d.ts +69 -0
- package/dist/LaneTimeline/useTrackMeasurements.d.ts.map +1 -0
- package/dist/LaneTimeline/useTrackMeasurements.js +134 -0
- package/dist/LaneTimeline/useTrackMeasurements.js.map +1 -0
- package/dist/Overlay/OverlayPanel.d.ts.map +1 -1
- package/dist/Overlay/OverlayPanel.js +54 -2
- package/dist/Overlay/OverlayPanel.js.map +1 -1
- package/dist/Overlay/OverlayStack.d.ts +5 -0
- package/dist/Overlay/OverlayStack.d.ts.map +1 -1
- package/dist/Overlay/OverlayStack.js +2 -0
- package/dist/Overlay/OverlayStack.js.map +1 -1
- package/dist/Toast/ToastRegion.d.ts +61 -0
- package/dist/Toast/ToastRegion.d.ts.map +1 -1
- package/dist/Toast/ToastRegion.js +80 -3
- package/dist/Toast/ToastRegion.js.map +1 -1
- package/dist/Toolbar/useToolbarOverflow.d.ts.map +1 -1
- package/dist/Toolbar/useToolbarOverflow.js +39 -0
- package/dist/Toolbar/useToolbarOverflow.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/LaneTimeline/LaneTimeline.mdx +191 -0
- package/src/LaneTimeline/LaneTimeline.stories.tsx +561 -0
- package/src/LaneTimeline/LaneTimeline.test.tsx +330 -0
- package/src/LaneTimeline/LaneTimeline.tsx +381 -0
- package/src/LaneTimeline/LaneTimelineBar.tsx +237 -0
- package/src/LaneTimeline/LaneTimelineLane.tsx +332 -0
- package/src/LaneTimeline/laneTimelineGeometry.test.ts +429 -0
- package/src/LaneTimeline/laneTimelineGeometry.ts +476 -0
- package/src/LaneTimeline/useTrackMeasurements.ts +165 -0
- package/src/Overlay/OverlayPanel.tsx +63 -2
- package/src/Overlay/OverlayStack.tsx +7 -1
- package/src/Toast/Toast.stories.tsx +154 -0
- package/src/Toast/ToastRegion.test.tsx +172 -0
- package/src/Toast/ToastRegion.tsx +120 -32
- package/src/Toolbar/Toolbar.test.tsx +84 -0
- package/src/Toolbar/useToolbarOverflow.ts +43 -0
- package/src/index.ts +13 -0
- package/src/sourceRules.test.ts +22 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"laneTimelineGeometry.js","sourceRoot":"","sources":["../../src/LaneTimeline/laneTimelineGeometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,YAAY,GACb,MAAM,4BAA4B,CAAA;AAyFnC,MAAM,WAAW,GAAG,CAAC,OAAe,EAAiB,EAAE;IACrD,MAAM,IAAI,GAAqB,YAAY,CAAC,OAAO,CAAC,CAAA;IAEpD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AC,EAAE;KACP;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,IAAI,CAAC,CAAA;AACf,CAAC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,IAAI,EACJ,MAAM,GAIP,EAAU,EAAE,CACX,eAAe,CAAC,IAAI,EAAE;IACpB,GAAG,EAAE,SAAS;IACd,MAAM;IACN,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,OAAO;CACjB,CAAC,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The track's width, and the font size it is drawn in.
|
|
4
|
+
*
|
|
5
|
+
* ## Measured, because no breakpoint can answer this
|
|
6
|
+
*
|
|
7
|
+
* `Nav` folds its bar on a measured width and
|
|
8
|
+
* `useToolbarOverflow.ts` writes down the general form of the
|
|
9
|
+
* argument: mux-magic collapses at a hardcoded `480px`, plex-channels
|
|
10
|
+
* at `760px`, and neither number has a reason. A timeline has the
|
|
11
|
+
* same problem one level worse, because the question is not "how
|
|
12
|
+
* wide is the box" but **"how wide is one day"** — and that is the
|
|
13
|
+
* width divided by a number that lives in the data. Thirty columns
|
|
14
|
+
* in 900px is a readable month; three hundred and sixty five columns
|
|
15
|
+
* in the same 900px is a grey smear. A media query sees the first
|
|
16
|
+
* number and a container query sees the first number, so neither can
|
|
17
|
+
* decide this.
|
|
18
|
+
*
|
|
19
|
+
* ## Why the font size comes back too
|
|
20
|
+
*
|
|
21
|
+
* The minimum readable column is a multiple of the **type**, not a
|
|
22
|
+
* count of pixels. Every length in this token set moves with the
|
|
23
|
+
* density axis — `--font-size-md` is one thing on a desktop and
|
|
24
|
+
* another on the kiosk — so a column floor pinned at 20px is
|
|
25
|
+
* generous at one density and clips a two-digit date at the next.
|
|
26
|
+
* `Avatar` makes the same argument about a chip that stays 20px
|
|
27
|
+
* while the prose around it scales, and it is the same mistake.
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ **The measured element must not be sized by its own contents.**
|
|
30
|
+
* The timeline reads its own box to decide what to draw in it, so a
|
|
31
|
+
* shrink-wrapping parent makes the answer its own input: fewer
|
|
32
|
+
* columns, narrower box, fewer columns. `LaneTimeline`'s root
|
|
33
|
+
* declares `container-type: inline-size`, which forbids exactly that
|
|
34
|
+
* — the same reason `Main` declares one — so the loop cannot form
|
|
35
|
+
* even when a caller drops the component into a `inline-flex` cell.
|
|
36
|
+
*
|
|
37
|
+
* ## The first paint
|
|
38
|
+
*
|
|
39
|
+
* `useLayoutEffect`, so the measurement lands **before the browser
|
|
40
|
+
* paints** and a timeline that has to fall back to the Narrow View
|
|
41
|
+
* never flashes an unreadable axis first. Same reasoning as
|
|
42
|
+
* `useToolbarOverflow`; the failure it prevents was visible on a
|
|
43
|
+
* kiosk Pi, where a slow first frame is on screen long enough to
|
|
44
|
+
* read.
|
|
45
|
+
*
|
|
46
|
+
* ## ⚠️ `trackRef` goes on a PROBE, never on the real track
|
|
47
|
+
*
|
|
48
|
+
* The one-way trap, and it is not hypothetical — the first draft
|
|
49
|
+
* had it. Attach this to the axis track itself and the Narrow View
|
|
50
|
+
* unmounts the element being measured, so the width never updates
|
|
51
|
+
* again and the timeline can never come back when the window
|
|
52
|
+
* widens. Hiding the track with `display: none` instead is worse: a
|
|
53
|
+
* hidden box measures 0, 0 reads as *unmeasured*, unmeasured shows
|
|
54
|
+
* the axis, the axis hides the fallback, and the component
|
|
55
|
+
* oscillates every frame.
|
|
56
|
+
*
|
|
57
|
+
* So the ref belongs to a zero-height `aria-hidden` cell that sits
|
|
58
|
+
* in the **same grid track** the axis would occupy and is rendered
|
|
59
|
+
* in both layouts. It answers the question actually being asked —
|
|
60
|
+
* *how wide would a day column be if I drew one* — in the layout
|
|
61
|
+
* where no day column exists.
|
|
62
|
+
*/
|
|
63
|
+
export declare const useTrackMeasurements: () => {
|
|
64
|
+
fontSize: number;
|
|
65
|
+
inlineSize: number;
|
|
66
|
+
isMeasured: boolean;
|
|
67
|
+
trackRef: RefObject<HTMLDivElement | null>;
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=useTrackMeasurements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTrackMeasurements.d.ts","sourceRoot":"","sources":["../../src/LaneTimeline/useTrackMeasurements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,oBAAoB,QAAO;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;CA2F3C,CAAA"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { useCallback, useLayoutEffect, useRef, useState, } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* The track's width, and the font size it is drawn in.
|
|
4
|
+
*
|
|
5
|
+
* ## Measured, because no breakpoint can answer this
|
|
6
|
+
*
|
|
7
|
+
* `Nav` folds its bar on a measured width and
|
|
8
|
+
* `useToolbarOverflow.ts` writes down the general form of the
|
|
9
|
+
* argument: mux-magic collapses at a hardcoded `480px`, plex-channels
|
|
10
|
+
* at `760px`, and neither number has a reason. A timeline has the
|
|
11
|
+
* same problem one level worse, because the question is not "how
|
|
12
|
+
* wide is the box" but **"how wide is one day"** — and that is the
|
|
13
|
+
* width divided by a number that lives in the data. Thirty columns
|
|
14
|
+
* in 900px is a readable month; three hundred and sixty five columns
|
|
15
|
+
* in the same 900px is a grey smear. A media query sees the first
|
|
16
|
+
* number and a container query sees the first number, so neither can
|
|
17
|
+
* decide this.
|
|
18
|
+
*
|
|
19
|
+
* ## Why the font size comes back too
|
|
20
|
+
*
|
|
21
|
+
* The minimum readable column is a multiple of the **type**, not a
|
|
22
|
+
* count of pixels. Every length in this token set moves with the
|
|
23
|
+
* density axis — `--font-size-md` is one thing on a desktop and
|
|
24
|
+
* another on the kiosk — so a column floor pinned at 20px is
|
|
25
|
+
* generous at one density and clips a two-digit date at the next.
|
|
26
|
+
* `Avatar` makes the same argument about a chip that stays 20px
|
|
27
|
+
* while the prose around it scales, and it is the same mistake.
|
|
28
|
+
*
|
|
29
|
+
* ⚠️ **The measured element must not be sized by its own contents.**
|
|
30
|
+
* The timeline reads its own box to decide what to draw in it, so a
|
|
31
|
+
* shrink-wrapping parent makes the answer its own input: fewer
|
|
32
|
+
* columns, narrower box, fewer columns. `LaneTimeline`'s root
|
|
33
|
+
* declares `container-type: inline-size`, which forbids exactly that
|
|
34
|
+
* — the same reason `Main` declares one — so the loop cannot form
|
|
35
|
+
* even when a caller drops the component into a `inline-flex` cell.
|
|
36
|
+
*
|
|
37
|
+
* ## The first paint
|
|
38
|
+
*
|
|
39
|
+
* `useLayoutEffect`, so the measurement lands **before the browser
|
|
40
|
+
* paints** and a timeline that has to fall back to the Narrow View
|
|
41
|
+
* never flashes an unreadable axis first. Same reasoning as
|
|
42
|
+
* `useToolbarOverflow`; the failure it prevents was visible on a
|
|
43
|
+
* kiosk Pi, where a slow first frame is on screen long enough to
|
|
44
|
+
* read.
|
|
45
|
+
*
|
|
46
|
+
* ## ⚠️ `trackRef` goes on a PROBE, never on the real track
|
|
47
|
+
*
|
|
48
|
+
* The one-way trap, and it is not hypothetical — the first draft
|
|
49
|
+
* had it. Attach this to the axis track itself and the Narrow View
|
|
50
|
+
* unmounts the element being measured, so the width never updates
|
|
51
|
+
* again and the timeline can never come back when the window
|
|
52
|
+
* widens. Hiding the track with `display: none` instead is worse: a
|
|
53
|
+
* hidden box measures 0, 0 reads as *unmeasured*, unmeasured shows
|
|
54
|
+
* the axis, the axis hides the fallback, and the component
|
|
55
|
+
* oscillates every frame.
|
|
56
|
+
*
|
|
57
|
+
* So the ref belongs to a zero-height `aria-hidden` cell that sits
|
|
58
|
+
* in the **same grid track** the axis would occupy and is rendered
|
|
59
|
+
* in both layouts. It answers the question actually being asked —
|
|
60
|
+
* *how wide would a day column be if I drew one* — in the layout
|
|
61
|
+
* where no day column exists.
|
|
62
|
+
*/
|
|
63
|
+
export const useTrackMeasurements = () => {
|
|
64
|
+
const trackRef = useRef(null);
|
|
65
|
+
const [measurements, setMeasurements] = useState({
|
|
66
|
+
fontSize: 0,
|
|
67
|
+
inlineSize: 0,
|
|
68
|
+
/**
|
|
69
|
+
* Its own flag rather than `inlineSize > 0`, and the reason is
|
|
70
|
+
* written out on `getIsAxisReadable`: **zero is a real width
|
|
71
|
+
* here.** The track is a `minmax(0, 1fr)` column beside a fixed
|
|
72
|
+
* label rail, so any container narrower than the rail resolves
|
|
73
|
+
* it to exactly 0px — and reading that as "not measured yet"
|
|
74
|
+
* puts a thirty-column axis into a phone and calls it readable.
|
|
75
|
+
*/
|
|
76
|
+
isMeasured: false,
|
|
77
|
+
});
|
|
78
|
+
const measure = useCallback(() => {
|
|
79
|
+
const track = trackRef.current;
|
|
80
|
+
if (!track) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const style = getComputedStyle(track);
|
|
84
|
+
const next = {
|
|
85
|
+
fontSize: Number.parseFloat(style.fontSize) || 0,
|
|
86
|
+
inlineSize: track.clientWidth,
|
|
87
|
+
isMeasured: true,
|
|
88
|
+
};
|
|
89
|
+
setMeasurements((current) => current.fontSize === next.fontSize &&
|
|
90
|
+
current.inlineSize === next.inlineSize &&
|
|
91
|
+
current.isMeasured
|
|
92
|
+
? current
|
|
93
|
+
: next);
|
|
94
|
+
}, []);
|
|
95
|
+
useLayoutEffect(measure);
|
|
96
|
+
useLayoutEffect(() => {
|
|
97
|
+
const track = trackRef.current;
|
|
98
|
+
if (!track) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Only when the **box** changed.
|
|
103
|
+
*
|
|
104
|
+
* A `ResizeObserver` delivers a record on observe and again for
|
|
105
|
+
* every reflow inside the frame it fired in, and measuring from
|
|
106
|
+
* each one is what raises chromium's "ResizeObserver loop
|
|
107
|
+
* completed with undelivered notifications". The same guard
|
|
108
|
+
* `useToolbarOverflow` carries, for the same reason: this
|
|
109
|
+
* callback's own `setState` can reflow the element it is
|
|
110
|
+
* watching.
|
|
111
|
+
*/
|
|
112
|
+
let lastInlineSize = -1;
|
|
113
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
114
|
+
const inlineSize = entry?.contentRect.width ??
|
|
115
|
+
track.getBoundingClientRect().width;
|
|
116
|
+
if (inlineSize === lastInlineSize) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
lastInlineSize = inlineSize;
|
|
120
|
+
measure();
|
|
121
|
+
});
|
|
122
|
+
observer.observe(track);
|
|
123
|
+
return () => {
|
|
124
|
+
observer.disconnect();
|
|
125
|
+
};
|
|
126
|
+
}, [measure]);
|
|
127
|
+
return {
|
|
128
|
+
fontSize: measurements.fontSize,
|
|
129
|
+
inlineSize: measurements.inlineSize,
|
|
130
|
+
isMeasured: measurements.isMeasured,
|
|
131
|
+
trackRef,
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=useTrackMeasurements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTrackMeasurements.js","sourceRoot":"","sources":["../../src/LaneTimeline/useTrackMeasurements.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAA;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAKlC,EAAE;IACF,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAE7C,MAAM,CAAC,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OverlayPanel.d.ts","sourceRoot":"","sources":["../../src/Overlay/OverlayPanel.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAC5C,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,IAAI,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAA;CAChC,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,6IAU1B,iBAAiB,KAAG,SAuLtB,CAAA"}
|
|
@@ -30,11 +30,46 @@ export const OverlayPanel = ({ "aria-label": ariaLabel, "aria-labelledby": ariaL
|
|
|
30
30
|
// `outsidePress` on a *lower* modal would close it too, so it is
|
|
31
31
|
// scoped to the top — which is also why the scrim needs no click
|
|
32
32
|
// handler of its own.
|
|
33
|
-
outsidePress:
|
|
33
|
+
outsidePress: (event) => {
|
|
34
|
+
if (!isDismissable || !isTop)
|
|
35
|
+
return false;
|
|
36
|
+
/*
|
|
37
|
+
* ⚠️ A press on a toast is NOT an outside press.
|
|
38
|
+
*
|
|
39
|
+
* A `ToastRegion` renders in the page, so floating-ui sees a
|
|
40
|
+
* press on its Undo as a press outside the floating element
|
|
41
|
+
* — and closing the modal on the way to taking an action
|
|
42
|
+
* back is the opposite of what the button says. The region
|
|
43
|
+
* marks itself with `data-charcuterie-toast-region`; nothing
|
|
44
|
+
* else in the fleet carries that attribute.
|
|
45
|
+
*
|
|
46
|
+
* ⚠️ Do not delete this on the evidence of a small story.
|
|
47
|
+
* floating-ui has a *second*, accidental guard that hides
|
|
48
|
+
* this one: `closeOnPressOutside` bails out early when the
|
|
49
|
+
* press target's body-level ancestor contains none of the
|
|
50
|
+
* `[data-floating-ui-inert]` markers `markOthers` left
|
|
51
|
+
* behind, on the theory that such an element was injected
|
|
52
|
+
* after the panel opened. A page that is nothing but a
|
|
53
|
+
* region takes that branch and never reaches this predicate
|
|
54
|
+
* at all. A page with content beside the region — every real
|
|
55
|
+
* app — does reach it. `Toast.stories.tsx`'s
|
|
56
|
+
* `OverStackedModals` carries a heading and a paragraph for
|
|
57
|
+
* exactly that reason, and `ToastRegion.test.tsx` fails
|
|
58
|
+
* without this predicate only because they are there.
|
|
59
|
+
*/
|
|
60
|
+
const target = event.target;
|
|
61
|
+
return (target?.closest?.("[data-charcuterie-toast-region]") == null);
|
|
62
|
+
},
|
|
34
63
|
}),
|
|
35
64
|
useRole(context, { role }),
|
|
36
65
|
]);
|
|
37
66
|
const { register, unregister } = stack;
|
|
67
|
+
/**
|
|
68
|
+
* Where this panel sits in the stack, and therefore how far above
|
|
69
|
+
* `--layer-modal` it paints. `0` when unprovided — a lone `Modal`
|
|
70
|
+
* is the only thing open.
|
|
71
|
+
*/
|
|
72
|
+
const stackIndex = Math.max(stack.orderedIds.indexOf(id), 0);
|
|
38
73
|
useEffect(() => {
|
|
39
74
|
if (!isVisible) {
|
|
40
75
|
return;
|
|
@@ -58,7 +93,24 @@ export const OverlayPanel = ({ "aria-label": ariaLabel, "aria-labelledby": ariaL
|
|
|
58
93
|
if (!isVisible) {
|
|
59
94
|
return null;
|
|
60
95
|
}
|
|
61
|
-
return (_jsxs(_Fragment, { children: [stack.isProvided ? null : (_jsx(SharedBackdrop, { isVisible: true })), _jsx(FloatingPortal, { children: _jsx("div", { className: "fixed inset-0
|
|
96
|
+
return (_jsxs(_Fragment, { children: [stack.isProvided ? null : (_jsx(SharedBackdrop, { isVisible: true })), _jsx(FloatingPortal, { children: _jsx("div", { className: "fixed inset-0 flex items-center justify-center",
|
|
97
|
+
/*
|
|
98
|
+
* ⚠️ Cascading, not one shared layer.
|
|
99
|
+
*
|
|
100
|
+
* Every panel used to render at the one `--layer-modal`, and
|
|
101
|
+
* which of two open modals painted on top fell out of the
|
|
102
|
+
* order their portals happened to be appended in. A modal
|
|
103
|
+
* opened from inside another is the case that made this
|
|
104
|
+
* visible. The index in the stack is the answer the stack
|
|
105
|
+
* already knows.
|
|
106
|
+
*
|
|
107
|
+
* The scale's gaps are 100, so a cascade this deep is
|
|
108
|
+
* arithmetic nobody has to think about — and the toast sits
|
|
109
|
+
* at `--layer-toast` plus the same depth, above all of it.
|
|
110
|
+
*/
|
|
111
|
+
style: {
|
|
112
|
+
zIndex: `calc(var(--layer-modal) + ${stackIndex})`,
|
|
113
|
+
}, children: _jsx(FloatingFocusManager, { context: context,
|
|
62
114
|
// `undefined` keeps the manager's own default (the first
|
|
63
115
|
// tabbable), so nothing changes for a panel that does not
|
|
64
116
|
// ask.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayPanel.js","sourceRoot":"","sources":["../../src/Overlay/OverlayPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,YAAY,EACZ,WAAW,GACZ,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,OAAO,GACR,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAoB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AA6DrD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B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AC;YACD,OAAO,CAAC,IAAI,CACV,2KAA2K,CAC5K,CAAA;QACH,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,CAAA;IAE1C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,CACL,8BAGG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACzB,KAAC,cAAc,IAAC,SAAS,SAAG,CAC7B,EAED,KAAC,cAAc,cACb,cACE,SAAS,EAAC,gDAAgD;oBAC1D;;;;;;;;;;;;;uBAaG;oBACH,KAAK,EAAE;wBACL,MAAM,EAAE,6BAA6B,UAAU,GAAG;qBACnD,YAED,KAAC,oBAAoB,IACnB,OAAO,EAAE,OAAO;wBAChB,yDAAyD;wBACzD,0DAA0D;wBAC1D,OAAO;wBACP,YAAY,EAAE,YAAY,IAAI,SAAS;wBACvC,qDAAqD;wBACrD,mDAAmD;wBACnD,QAAQ,EAAE,CAAC,KAAK,EAChB,KAAK,kBAEL,iBACM,gBAAgB,EAAE,EAOpB,YAAY,EAAE,SAAS;4BACvB,iBAAiB,EAAE,cAAc,EAEnC,SAAS,EAAE,SAAS;4BACpB,0DAA0D;4BAC1D,0DAA0D;4BAC1D,sDAAsD;4BACtD,kDAAkD;4BAClD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC/B,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,IAAI,EAAE,IAAI,YAET,QAAQ,GACL,GACe,GACnB,GACS,IAChB,CACJ,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -28,6 +28,11 @@ export type OverlayStackEntry = {
|
|
|
28
28
|
};
|
|
29
29
|
export type OverlayStackValue = {
|
|
30
30
|
depth: number;
|
|
31
|
+
/**
|
|
32
|
+
* The open ids, oldest first. A panel reads its own index out of
|
|
33
|
+
* this to cascade its z-index above the one below it.
|
|
34
|
+
*/
|
|
35
|
+
orderedIds: string[];
|
|
31
36
|
/**
|
|
32
37
|
* `false` in the context default. An `OverlayPanel` reads this to
|
|
33
38
|
* decide whether to render its own scrim (unprovided) or defer to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayStack.d.ts","sourceRoot":"","sources":["../../src/Overlay/OverlayStack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC5C,sEAAsE;IACtE,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;IACpB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,CAAA;
|
|
1
|
+
{"version":3,"file":"OverlayStack.d.ts","sourceRoot":"","sources":["../../src/Overlay/OverlayStack.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC5C,sEAAsE;IACtE,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;IACpB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,CAAA;AAeD,eAAO,MAAM,eAAe,QAAO,iBACF,CAAA;AAEjC,eAAO,MAAM,oBAAoB,GAAI,eAElC;IACD,QAAQ,EAAE,SAAS,CAAA;CACpB,KAAG,SAyDH,CAAA"}
|
|
@@ -5,6 +5,7 @@ import { SharedBackdrop } from "./SharedBackdrop.js";
|
|
|
5
5
|
const DEFAULT_STACK = {
|
|
6
6
|
depth: 0,
|
|
7
7
|
isProvided: false,
|
|
8
|
+
orderedIds: [],
|
|
8
9
|
register: () => { },
|
|
9
10
|
requestCloseTop: () => { },
|
|
10
11
|
topId: null,
|
|
@@ -36,6 +37,7 @@ export const OverlayStackProvider = ({ children, }) => {
|
|
|
36
37
|
const value = useMemo(() => ({
|
|
37
38
|
depth: entries.length,
|
|
38
39
|
isProvided: true,
|
|
40
|
+
orderedIds: entries.map((one) => one.id),
|
|
39
41
|
register,
|
|
40
42
|
requestCloseTop,
|
|
41
43
|
topId: entries.at(-1)?.id ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayStack.js","sourceRoot":"","sources":["../../src/Overlay/OverlayStack.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"OverlayStack.js","sourceRoot":"","sources":["../../src/Overlay/OverlayStack.tsx"],"names":[],"mappings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|
|
|
46
46
|
* sync. The lifecycle *inside* one toast is state a store cannot
|
|
47
47
|
* see, which is why `Toast` owns that and nothing more.
|
|
48
48
|
*
|
|
49
|
+
* ### It is the top of the layer scale, and it moves to stay there
|
|
50
|
+
*
|
|
51
|
+
* ⚠️ The container was `z-50` — a hand-picked number, in the library
|
|
52
|
+
* whose whole point is that nobody picks one. It is
|
|
53
|
+
* `--layer-toast` now, the top of the scale, above `--layer-tooltip`.
|
|
54
|
+
* The owner's rule: *"I think toast should always exist on top of
|
|
55
|
+
* everything."*
|
|
56
|
+
*
|
|
57
|
+
* The open panels cascade — a modal over a modal paints at
|
|
58
|
+
* `--layer-modal + n` — so the depth is added here too, and the
|
|
59
|
+
* toast clears the whole stack rather than only its first floor.
|
|
60
|
+
* Both numbers come off `useOverlayStack`, so the ordering is
|
|
61
|
+
* arithmetic rather than portal-append order.
|
|
62
|
+
*
|
|
63
|
+
* ### Painting on top is only half of "on top"
|
|
64
|
+
*
|
|
65
|
+
* ⚠️ A press on a toast while a `Modal` is open is an **outside**
|
|
66
|
+
* press as far as floating-ui is concerned, and `useDismiss` would
|
|
67
|
+
* close the modal on the way to taking an action back. That is why
|
|
68
|
+
* the container carries `data-charcuterie-toast-region`:
|
|
69
|
+
* `OverlayPanel`'s `outsidePress` reads it and lets the press
|
|
70
|
+
* through. Nothing else in the fleet carries that attribute.
|
|
71
|
+
*
|
|
72
|
+
* ⚠️ Do **not** move this region inside the panel's portal to solve
|
|
73
|
+
* that. Two reasons, both measured. `FloatingFocusManager`'s `modal`
|
|
74
|
+
* already leaves it alone — `markOthers` concatenates
|
|
75
|
+
* `body.querySelectorAll('[aria-live],[role="status"],output')` onto
|
|
76
|
+
* its keep-list, and this region is a `role="status"`, so it is
|
|
77
|
+
* never marked `aria-hidden` where it stands. And the panel's
|
|
78
|
+
* container sets a z-index, so a region nested inside it would be
|
|
79
|
+
* trapped in that stacking context and lose to the *next* modal
|
|
80
|
+
* however high `--layer-toast` climbs.
|
|
81
|
+
*
|
|
49
82
|
* ### `pointer-events-none` on the container, `auto` on each toast
|
|
50
83
|
*
|
|
51
84
|
* A fixed overlay across the bottom of the viewport swallows every
|
|
52
85
|
* click in that band, including on the app behind it, and it does so
|
|
53
86
|
* invisibly. The container passes clicks through and each toast
|
|
54
87
|
* takes them back.
|
|
88
|
+
*
|
|
89
|
+
* The list keeps `pointer-events: none` and still scrolls: a wheel
|
|
90
|
+
* event over a toast chains to the nearest scrollable **ancestor**,
|
|
91
|
+
* which is the list, and hit-testing never has to reach it.
|
|
92
|
+
*
|
|
93
|
+
* ### Many at once, and the newest is the one you can see
|
|
94
|
+
*
|
|
95
|
+
* The column grows upward from the bottom of the viewport, so
|
|
96
|
+
* without a bound the oldest toasts climb off the top of the page —
|
|
97
|
+
* clipped by the viewport, and unreachable, because a fixed element
|
|
98
|
+
* is not something the page can scroll to. The list is capped at
|
|
99
|
+
* `min(60dvh, 32rem)` and scrolls `overscroll-contain`, so the page
|
|
100
|
+
* behind never moves because a notification arrived. The owner's
|
|
101
|
+
* rule: *"if you have multiple toasts, it should accomodate them
|
|
102
|
+
* somehow."*
|
|
103
|
+
*
|
|
104
|
+
* ⚠️ Bottom-pinned with `margin-block-start: auto` on the first
|
|
105
|
+
* toast, **not** `justify-content: flex-end`. Measured in chromium:
|
|
106
|
+
* with `justify-end` an overflowing list reports
|
|
107
|
+
* `scrollHeight === clientHeight` and the toasts above the fold
|
|
108
|
+
* cannot be scrolled to at all — content overflowing a flex
|
|
109
|
+
* container's *start* edge is not reachable overflow. An auto margin
|
|
110
|
+
* resolves to `0` the moment the free space runs out, so the same
|
|
111
|
+
* rule pins a short list and scrolls a long one.
|
|
112
|
+
*
|
|
113
|
+
* The scroll is taken to the bottom whenever the count changes,
|
|
114
|
+
* because the newest toast is the one with the action on it and it
|
|
115
|
+
* is the one at the far end.
|
|
55
116
|
*/
|
|
56
117
|
export declare const ToastRegion: ({ className, label, onDismiss, toasts, }: ToastRegionProps) => ReactNode;
|
|
57
118
|
//# sourceMappingURL=ToastRegion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastRegion.d.ts","sourceRoot":"","sources":["../../src/Toast/ToastRegion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ToastRegion.d.ts","sourceRoot":"","sources":["../../src/Toast/ToastRegion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8FG;AACH,eAAO,MAAM,WAAW,GAAI,0CAKzB,gBAAgB,KAAG,SAwDrB,CAAA"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { useOverlayStack } from "../Overlay/OverlayStack.js";
|
|
2
4
|
import { toClassName } from "../toClassName.js";
|
|
3
5
|
import { Toast } from "./Toast.js";
|
|
4
6
|
/**
|
|
@@ -28,14 +30,89 @@ import { Toast } from "./Toast.js";
|
|
|
28
30
|
* sync. The lifecycle *inside* one toast is state a store cannot
|
|
29
31
|
* see, which is why `Toast` owns that and nothing more.
|
|
30
32
|
*
|
|
33
|
+
* ### It is the top of the layer scale, and it moves to stay there
|
|
34
|
+
*
|
|
35
|
+
* ⚠️ The container was `z-50` — a hand-picked number, in the library
|
|
36
|
+
* whose whole point is that nobody picks one. It is
|
|
37
|
+
* `--layer-toast` now, the top of the scale, above `--layer-tooltip`.
|
|
38
|
+
* The owner's rule: *"I think toast should always exist on top of
|
|
39
|
+
* everything."*
|
|
40
|
+
*
|
|
41
|
+
* The open panels cascade — a modal over a modal paints at
|
|
42
|
+
* `--layer-modal + n` — so the depth is added here too, and the
|
|
43
|
+
* toast clears the whole stack rather than only its first floor.
|
|
44
|
+
* Both numbers come off `useOverlayStack`, so the ordering is
|
|
45
|
+
* arithmetic rather than portal-append order.
|
|
46
|
+
*
|
|
47
|
+
* ### Painting on top is only half of "on top"
|
|
48
|
+
*
|
|
49
|
+
* ⚠️ A press on a toast while a `Modal` is open is an **outside**
|
|
50
|
+
* press as far as floating-ui is concerned, and `useDismiss` would
|
|
51
|
+
* close the modal on the way to taking an action back. That is why
|
|
52
|
+
* the container carries `data-charcuterie-toast-region`:
|
|
53
|
+
* `OverlayPanel`'s `outsidePress` reads it and lets the press
|
|
54
|
+
* through. Nothing else in the fleet carries that attribute.
|
|
55
|
+
*
|
|
56
|
+
* ⚠️ Do **not** move this region inside the panel's portal to solve
|
|
57
|
+
* that. Two reasons, both measured. `FloatingFocusManager`'s `modal`
|
|
58
|
+
* already leaves it alone — `markOthers` concatenates
|
|
59
|
+
* `body.querySelectorAll('[aria-live],[role="status"],output')` onto
|
|
60
|
+
* its keep-list, and this region is a `role="status"`, so it is
|
|
61
|
+
* never marked `aria-hidden` where it stands. And the panel's
|
|
62
|
+
* container sets a z-index, so a region nested inside it would be
|
|
63
|
+
* trapped in that stacking context and lose to the *next* modal
|
|
64
|
+
* however high `--layer-toast` climbs.
|
|
65
|
+
*
|
|
31
66
|
* ### `pointer-events-none` on the container, `auto` on each toast
|
|
32
67
|
*
|
|
33
68
|
* A fixed overlay across the bottom of the viewport swallows every
|
|
34
69
|
* click in that band, including on the app behind it, and it does so
|
|
35
70
|
* invisibly. The container passes clicks through and each toast
|
|
36
71
|
* takes them back.
|
|
72
|
+
*
|
|
73
|
+
* The list keeps `pointer-events: none` and still scrolls: a wheel
|
|
74
|
+
* event over a toast chains to the nearest scrollable **ancestor**,
|
|
75
|
+
* which is the list, and hit-testing never has to reach it.
|
|
76
|
+
*
|
|
77
|
+
* ### Many at once, and the newest is the one you can see
|
|
78
|
+
*
|
|
79
|
+
* The column grows upward from the bottom of the viewport, so
|
|
80
|
+
* without a bound the oldest toasts climb off the top of the page —
|
|
81
|
+
* clipped by the viewport, and unreachable, because a fixed element
|
|
82
|
+
* is not something the page can scroll to. The list is capped at
|
|
83
|
+
* `min(60dvh, 32rem)` and scrolls `overscroll-contain`, so the page
|
|
84
|
+
* behind never moves because a notification arrived. The owner's
|
|
85
|
+
* rule: *"if you have multiple toasts, it should accomodate them
|
|
86
|
+
* somehow."*
|
|
87
|
+
*
|
|
88
|
+
* ⚠️ Bottom-pinned with `margin-block-start: auto` on the first
|
|
89
|
+
* toast, **not** `justify-content: flex-end`. Measured in chromium:
|
|
90
|
+
* with `justify-end` an overflowing list reports
|
|
91
|
+
* `scrollHeight === clientHeight` and the toasts above the fold
|
|
92
|
+
* cannot be scrolled to at all — content overflowing a flex
|
|
93
|
+
* container's *start* edge is not reachable overflow. An auto margin
|
|
94
|
+
* resolves to `0` the moment the free space runs out, so the same
|
|
95
|
+
* rule pins a short list and scrolls a long one.
|
|
96
|
+
*
|
|
97
|
+
* The scroll is taken to the bottom whenever the count changes,
|
|
98
|
+
* because the newest toast is the one with the action on it and it
|
|
99
|
+
* is the one at the far end.
|
|
37
100
|
*/
|
|
38
|
-
export const ToastRegion = ({ className, label = "Notifications", onDismiss, toasts, }) =>
|
|
39
|
-
|
|
40
|
-
|
|
101
|
+
export const ToastRegion = ({ className, label = "Notifications", onDismiss, toasts, }) => {
|
|
102
|
+
const { depth } = useOverlayStack();
|
|
103
|
+
const listRef = useRef(null);
|
|
104
|
+
const _toastCount = toasts.length;
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const list = listRef.current;
|
|
107
|
+
if (!list) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
list.scrollTop = list.scrollHeight;
|
|
111
|
+
}, []);
|
|
112
|
+
return (_jsx("div", { "aria-label": label, "data-charcuterie-toast-region": "", "aria-atomic": "false", className: toClassName("pointer-events-none fixed inset-x-0 bottom-0 flex flex-col items-center gap-2 p-4", className), role: "status", style: {
|
|
113
|
+
zIndex: `calc(var(--layer-toast) + ${depth})`,
|
|
114
|
+
}, children: _jsx("ul", { ref: listRef, className: "charcuterie-scrollbar pointer-events-none flex max-h-[min(60dvh,32rem)] w-full max-w-sm list-none flex-col gap-2 overflow-y-auto overscroll-contain p-0 [&>li]:shrink-0 [&>li:first-child]:mt-auto", children: toasts.map((toast) => (_jsx(Toast, { duration: toast.duration, intent: toast.intent, onRemove: () => {
|
|
115
|
+
onDismiss(toast.key);
|
|
116
|
+
}, title: toast.title, children: toast.description }, toast.key))) }) }));
|
|
117
|
+
};
|
|
41
118
|
//# sourceMappingURL=ToastRegion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastRegion.js","sourceRoot":"","sources":["../../src/Toast/ToastRegion.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ToastRegion.js","sourceRoot":"","sources":["../../src/Toast/ToastRegion.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAA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,GAAG,CAAC,CAAA;gBACtB,CAAC,EACD,KAAK,EAAE,KAAK,CAAC,KAAK,YAEjB,KAAK,CAAC,WAAW,IANb,KAAK,CAAC,GAAG,CAOR,CACT,CAAC,GACC,GACD,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolbarOverflow.d.ts","sourceRoot":"","sources":["../../src/Toolbar/useToolbarOverflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,kBAAkB,GAAI,eAEhC;IACD,qCAAqC;IACrC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B,KAAG;IACF,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,2DAA2D;IAC3D,SAAS,EAAE,CACT,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,WAAW,GAAG,IAAI,KACxB,IAAI,CAAA;IACT,mDAAmD;IACnD,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"useToolbarOverflow.d.ts","sourceRoot":"","sources":["../../src/Toolbar/useToolbarOverflow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,kBAAkB,GAAI,eAEhC;IACD,qCAAqC;IACrC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAC5B,KAAG;IACF,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAC9C,2DAA2D;IAC3D,SAAS,EAAE,CACT,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,WAAW,GAAG,IAAI,KACxB,IAAI,CAAA;IACT,mDAAmD;IACnD,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,YAAY,EAAE,MAAM,CAAA;CAmNrB,CAAA"}
|
|
@@ -103,6 +103,45 @@ export const useToolbarOverflow = ({ itemKeys, }) => {
|
|
|
103
103
|
* answer, so a stable bar renders once and stops.
|
|
104
104
|
*/
|
|
105
105
|
useLayoutEffect(measure);
|
|
106
|
+
/**
|
|
107
|
+
* Measure again once the webfont has actually arrived.
|
|
108
|
+
*
|
|
109
|
+
* Every width above is a **text** width, so it is only as correct
|
|
110
|
+
* as the font that was loaded when it was read. On a cold cache
|
|
111
|
+
* the first measurement happens in the fallback face, the items
|
|
112
|
+
* come out a few pixels off, and `chooseVisibleCount` keeps or
|
|
113
|
+
* drops one action it should not have — then never revisits it,
|
|
114
|
+
* because swapping a font changes no box the `ResizeObserver`
|
|
115
|
+
* watches and triggers no render.
|
|
116
|
+
*
|
|
117
|
+
* The user-visible symptom is a bar that settles one button wrong
|
|
118
|
+
* and stays there. It needs the two faces to disagree across a
|
|
119
|
+
* collapse boundary, so it is latent rather than observed: no
|
|
120
|
+
* story in the library crosses one today, which is why `vrt`
|
|
121
|
+
* reports nothing either way. That makes it a gap to close, not a
|
|
122
|
+
* regression to chase — the bar is supposed to measure what is on
|
|
123
|
+
* screen, and until now it could not.
|
|
124
|
+
*
|
|
125
|
+
* `document.fonts.ready` resolves immediately when the fonts are
|
|
126
|
+
* already in, so a warm load pays one microtask and
|
|
127
|
+
* `setVisibleCount` bails on the unchanged answer.
|
|
128
|
+
*/
|
|
129
|
+
useLayoutEffect(() => {
|
|
130
|
+
// jsdom has no `document.fonts`, and neither does a very old
|
|
131
|
+
// browser. Nothing to wait for is not an error.
|
|
132
|
+
if (!document.fonts) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
let isActive = true;
|
|
136
|
+
document.fonts.ready.then(() => {
|
|
137
|
+
if (isActive) {
|
|
138
|
+
measure();
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
return () => {
|
|
142
|
+
isActive = false;
|
|
143
|
+
};
|
|
144
|
+
}, [measure]);
|
|
106
145
|
useLayoutEffect(() => {
|
|
107
146
|
const container = containerRef.current;
|
|
108
147
|
if (!container) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToolbarOverflow.js","sourceRoot":"","sources":["../../src/Toolbar/useToolbarOverflow.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,GAIT,EAUC,EAAE;IACF,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAEjD,MAAM,YAAY,GAAG,MAAM,CACzB,IAAI,GAAG,EAAuB,CAC/B,CAAA;IAED,MAAM,cAAc,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAA;IAEvD,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,GAAG,EAAkB,CAAC,CAAA;IAEzD;;;;;;;;OAQG;IACH,MAAM,iBAAiB,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;IAEnC,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAC9C,QAAQ,CAAC,MAAM,CAChB,CAAA;IAED;;;;;;;;;OASG;IACH,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IAEpC,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAA;IAE9B,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;QAC/B,MAAM,SAAS,GAAG,YAAY,CAAC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