@oxyhq/bloom 0.72.2 → 0.73.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/lib/commonjs/avatar-group/AvatarGroup.web.js +22 -21
- package/lib/commonjs/avatar-group/AvatarGroup.web.js.map +1 -1
- package/lib/commonjs/bottom-sheet/index.web.js +11 -6
- package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
- package/lib/commonjs/context-menu/index.web.js +20 -22
- package/lib/commonjs/context-menu/index.web.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +66 -70
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +49 -51
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/fonts/font-data.web.js +22 -0
- package/lib/commonjs/fonts/font-data.web.js.map +1 -0
- package/lib/commonjs/menu/index.web.js +15 -11
- package/lib/commonjs/menu/index.web.js.map +1 -1
- package/lib/commonjs/overlay/index.js +133 -7
- package/lib/commonjs/overlay/index.js.map +1 -1
- package/lib/commonjs/overlay/stack.js +170 -0
- package/lib/commonjs/overlay/stack.js.map +1 -0
- package/lib/commonjs/overlay/use-overlay-layer.js +37 -0
- package/lib/commonjs/overlay/use-overlay-layer.js.map +1 -0
- package/lib/commonjs/popover/index.web.js +31 -34
- package/lib/commonjs/popover/index.web.js.map +1 -1
- package/lib/commonjs/prompt-input/PromptInput.js +33 -29
- package/lib/commonjs/prompt-input/PromptInput.js.map +1 -1
- package/lib/commonjs/select/index.web.js +20 -22
- package/lib/commonjs/select/index.web.js.map +1 -1
- package/lib/commonjs/styles/z-index.js +33 -34
- package/lib/commonjs/styles/z-index.js.map +1 -1
- package/lib/commonjs/surfaces/SurfaceHost.js +3 -6
- package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -1
- package/lib/commonjs/toast/ToastHost.js +9 -5
- package/lib/commonjs/toast/ToastHost.js.map +1 -1
- package/lib/commonjs/tooltip/index.js +9 -6
- package/lib/commonjs/tooltip/index.js.map +1 -1
- package/lib/commonjs/tooltip/index.web.js +8 -2
- package/lib/commonjs/tooltip/index.web.js.map +1 -1
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +5 -5
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/module/avatar-group/AvatarGroup.web.js +21 -20
- package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
- package/lib/module/bottom-sheet/index.web.js +11 -6
- package/lib/module/bottom-sheet/index.web.js.map +1 -1
- package/lib/module/context-menu/index.web.js +21 -23
- package/lib/module/context-menu/index.web.js.map +1 -1
- package/lib/module/dialog/Dialog.js +67 -71
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +50 -52
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/fonts/font-data.web.js +18 -0
- package/lib/module/fonts/font-data.web.js.map +1 -0
- package/lib/module/menu/index.web.js +16 -12
- package/lib/module/menu/index.web.js.map +1 -1
- package/lib/module/overlay/index.js +99 -8
- package/lib/module/overlay/index.js.map +1 -1
- package/lib/module/overlay/stack.js +161 -0
- package/lib/module/overlay/stack.js.map +1 -0
- package/lib/module/overlay/use-overlay-layer.js +33 -0
- package/lib/module/overlay/use-overlay-layer.js.map +1 -0
- package/lib/module/popover/index.web.js +32 -34
- package/lib/module/popover/index.web.js.map +1 -1
- package/lib/module/prompt-input/PromptInput.js +33 -29
- package/lib/module/prompt-input/PromptInput.js.map +1 -1
- package/lib/module/select/index.web.js +21 -23
- package/lib/module/select/index.web.js.map +1 -1
- package/lib/module/styles/z-index.js +32 -30
- package/lib/module/styles/z-index.js.map +1 -1
- package/lib/module/surfaces/SurfaceHost.js +3 -6
- package/lib/module/surfaces/SurfaceHost.js.map +1 -1
- package/lib/module/toast/ToastHost.js +10 -6
- package/lib/module/toast/ToastHost.js.map +1 -1
- package/lib/module/tooltip/index.js +9 -6
- package/lib/module/tooltip/index.js.map +1 -1
- package/lib/module/tooltip/index.web.js +8 -2
- package/lib/module/tooltip/index.web.js.map +1 -1
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +5 -5
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
- package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +0 -10
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/fonts/font-data.web.d.ts +5 -0
- package/lib/typescript/commonjs/fonts/font-data.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/index.d.ts +31 -6
- package/lib/typescript/commonjs/overlay/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/overlay/stack.d.ts +122 -0
- package/lib/typescript/commonjs/overlay/stack.d.ts.map +1 -0
- package/lib/typescript/commonjs/overlay/use-overlay-layer.d.ts +7 -0
- package/lib/typescript/commonjs/overlay/use-overlay-layer.d.ts.map +1 -0
- package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/prompt-input/PromptInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles/z-index.d.ts +42 -29
- package/lib/typescript/commonjs/styles/z-index.d.ts.map +1 -1
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/tooltip/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
- package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +0 -10
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/fonts/font-data.web.d.ts +5 -0
- package/lib/typescript/module/fonts/font-data.web.d.ts.map +1 -0
- package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
- package/lib/typescript/module/overlay/index.d.ts +31 -6
- package/lib/typescript/module/overlay/index.d.ts.map +1 -1
- package/lib/typescript/module/overlay/stack.d.ts +122 -0
- package/lib/typescript/module/overlay/stack.d.ts.map +1 -0
- package/lib/typescript/module/overlay/use-overlay-layer.d.ts +7 -0
- package/lib/typescript/module/overlay/use-overlay-layer.d.ts.map +1 -0
- package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
- package/lib/typescript/module/prompt-input/PromptInput.d.ts.map +1 -1
- package/lib/typescript/module/select/index.web.d.ts.map +1 -1
- package/lib/typescript/module/styles/z-index.d.ts +42 -29
- package/lib/typescript/module/styles/z-index.d.ts.map +1 -1
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -1
- package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -1
- package/lib/typescript/module/tooltip/index.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/__tests__/ToastHostWebFork.test.ts +11 -3
- package/src/__tests__/overlay-stack-order.test.tsx +270 -0
- package/src/avatar-group/AvatarGroup.web.tsx +35 -31
- package/src/bottom-sheet/index.web.tsx +10 -5
- package/src/context-menu/index.web.tsx +33 -30
- package/src/dialog/Dialog.tsx +9 -18
- package/src/dialog/Dialog.web.tsx +62 -60
- package/src/dialog/types.ts +0 -10
- package/src/fonts/font-data.web.ts +15 -0
- package/src/menu/index.web.tsx +33 -22
- package/src/overlay/OverlayStacking.stories.tsx +207 -0
- package/src/overlay/index.tsx +114 -9
- package/src/overlay/stack.ts +166 -0
- package/src/overlay/use-overlay-layer.ts +39 -0
- package/src/popover/index.web.tsx +47 -44
- package/src/prompt-input/PromptInput.tsx +36 -29
- package/src/select/index.web.tsx +35 -32
- package/src/styles/z-index.ts +32 -34
- package/src/surfaces/SurfaceHost.tsx +3 -10
- package/src/toast/ToastHost.tsx +9 -6
- package/src/tooltip/index.tsx +14 -7
- package/src/tooltip/index.web.tsx +8 -2
- package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +4 -4
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overlay stacking authority.
|
|
3
|
+
*
|
|
4
|
+
* ## The rule
|
|
5
|
+
*
|
|
6
|
+
* An overlay opened LATER paints above one opened earlier. That is the whole
|
|
7
|
+
* contract, and it is decided here, once, for every Bloom overlay surface —
|
|
8
|
+
* never by a per-component constant.
|
|
9
|
+
*
|
|
10
|
+
* ## Why this module exists
|
|
11
|
+
*
|
|
12
|
+
* Stacking used to be a set of hand-picked rungs on a shared scale: menus at
|
|
13
|
+
* 40, dialogs at 50/60, tooltips at 70, sheets at 999999. Because those numbers
|
|
14
|
+
* are fixed per COMPONENT KIND, the answer to "which surface is on top" was
|
|
15
|
+
* decided by what each surface WAS rather than by when the user opened it — so
|
|
16
|
+
* some pairings were permanently inverted no matter the order:
|
|
17
|
+
*
|
|
18
|
+
* - A confirm dialog (50/60) opened from inside an open bottom sheet (999999)
|
|
19
|
+
* rendered fully, interactively, and completely underneath the sheet. It
|
|
20
|
+
* could be neither pressed nor dismissed.
|
|
21
|
+
* - A menu (40/41) opened from inside a dialog (50/60) landed behind the very
|
|
22
|
+
* dialog that launched it.
|
|
23
|
+
*
|
|
24
|
+
* Both failed silently: correct markup, correct styles, nothing in the console.
|
|
25
|
+
* Only a hit test in a real browser tells the difference, which is why
|
|
26
|
+
* `scripts/verify-overlay-stacking.mjs` exists alongside the unit tests here.
|
|
27
|
+
*
|
|
28
|
+
* ## How a rank is acquired
|
|
29
|
+
*
|
|
30
|
+
* `useOverlayLayer()` takes a rank on MOUNT and releases it on unmount, so the
|
|
31
|
+
* caller must be a component that mounts when the surface OPENS — which is how
|
|
32
|
+
* every Bloom surface is already built (`Dialog.web` returns null while closed;
|
|
33
|
+
* `BottomSheetBase` returns null until `rendered`). Acquiring per mount, in a
|
|
34
|
+
* `useState` initializer, is what makes the rank correct on the surface's FIRST
|
|
35
|
+
* paint: an effect-assigned z would leave one frame at the wrong depth, which
|
|
36
|
+
* on a 200ms fade-in is a visible flash of the surface behind its neighbour.
|
|
37
|
+
*
|
|
38
|
+
* It also keeps the acquisition out of any position the React Compiler may
|
|
39
|
+
* memoize. A counter read during render is exactly the external-mutable-state
|
|
40
|
+
* hazard the compiler mangles; a state initializer is not memoizable that way.
|
|
41
|
+
* (React StrictMode double-invokes initializers in development, so a rank can
|
|
42
|
+
* be consumed and dropped. That is harmless: only the ORDER of the numbers
|
|
43
|
+
* matters, never their density.)
|
|
44
|
+
*
|
|
45
|
+
* ## Toasts are deliberately not in this stack
|
|
46
|
+
*
|
|
47
|
+
* A toast is a notification, not a modal surface: it must stay visible over
|
|
48
|
+
* whatever is open, including a surface opened after it. It is pinned above the
|
|
49
|
+
* whole stack at `TOAST_LAYER_Z` instead of taking a rank. (Under the old
|
|
50
|
+
* scale a toast at 80 was already lost behind any open bottom sheet at 999999.)
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* First z-index handed to an overlay. Comfortably above app content while
|
|
54
|
+
* staying far below `TOAST_LAYER_Z`.
|
|
55
|
+
*/
|
|
56
|
+
export declare const OVERLAY_STACK_BASE = 1000;
|
|
57
|
+
/**
|
|
58
|
+
* Z-index distance between consecutive overlays. A surface owns its whole band,
|
|
59
|
+
* so it can order its own parts (backdrop, panel, a floating control) without
|
|
60
|
+
* ever reaching the next surface's floor.
|
|
61
|
+
*/
|
|
62
|
+
export declare const OVERLAY_STACK_BAND = 10;
|
|
63
|
+
/**
|
|
64
|
+
* Ceiling on simultaneously open overlays. Beyond this, ranks saturate and the
|
|
65
|
+
* topmost surfaces tie (falling back to DOM order) rather than climbing into
|
|
66
|
+
* the toast layer. Nothing in the ecosystem stacks remotely this deep; the
|
|
67
|
+
* clamp exists so a runaway caller degrades instead of breaking the toast
|
|
68
|
+
* layer's guarantee.
|
|
69
|
+
*/
|
|
70
|
+
export declare const OVERLAY_STACK_MAX_RANK = 500;
|
|
71
|
+
/**
|
|
72
|
+
* The toast layer, pinned above every overlay rank (see the note above on why
|
|
73
|
+
* toasts are not part of the stack).
|
|
74
|
+
*/
|
|
75
|
+
export declare const TOAST_LAYER_Z: number;
|
|
76
|
+
/** The z-indices one overlay surface may use, all within its own band. */
|
|
77
|
+
export interface OverlayLayer {
|
|
78
|
+
/** The surface's outermost node — everything it renders is inside this. */
|
|
79
|
+
root: number;
|
|
80
|
+
/** Its dimming layer. */
|
|
81
|
+
backdrop: number;
|
|
82
|
+
/** Its panel, above its own backdrop. */
|
|
83
|
+
surface: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Registry state.
|
|
87
|
+
*
|
|
88
|
+
* `sequence` only ever moves forward while anything is open, which is what
|
|
89
|
+
* guarantees the ordering. It resets once the last overlay closes so the
|
|
90
|
+
* numbers stay small over a long session.
|
|
91
|
+
*/
|
|
92
|
+
interface Registry {
|
|
93
|
+
sequence: number;
|
|
94
|
+
live: Set<number>;
|
|
95
|
+
}
|
|
96
|
+
declare global {
|
|
97
|
+
var __oxyhq_bloom_overlay_stack__: Registry | undefined;
|
|
98
|
+
}
|
|
99
|
+
/** Z-indices for a given rank. Exported for tests and for the native surfaces. */
|
|
100
|
+
export declare function layerForRank(rank: number): OverlayLayer;
|
|
101
|
+
/**
|
|
102
|
+
* Take the next rank. Exported for tests; components use `useOverlayLayer`.
|
|
103
|
+
*/
|
|
104
|
+
export declare function acquireOverlayRank(): number;
|
|
105
|
+
/**
|
|
106
|
+
* Mark a rank as live. Called from an effect, which React balances against
|
|
107
|
+
* `releaseOverlayRank` even under StrictMode's mount/unmount/remount.
|
|
108
|
+
*
|
|
109
|
+
* It also re-floors `sequence` to at least this rank. That closes the only race
|
|
110
|
+
* the reset below could otherwise open: a surface takes rank N during render,
|
|
111
|
+
* and before its effect runs, the last previously-open surface unmounts and
|
|
112
|
+
* resets the counter to 0 — the next surface would then take rank 1 and sit
|
|
113
|
+
* BELOW the one still coming up at N. Re-flooring on register makes the reset
|
|
114
|
+
* unable to lose a rank that has been handed out.
|
|
115
|
+
*/
|
|
116
|
+
export declare function registerOverlayRank(rank: number): void;
|
|
117
|
+
/** Release a rank; resets the counter once nothing is open. */
|
|
118
|
+
export declare function releaseOverlayRank(rank: number): void;
|
|
119
|
+
/** Test seam — drops all registry state. */
|
|
120
|
+
export declare function resetOverlayStack(): void;
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/overlay/stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,aAAa,QAC8C,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,UAAU,QAAQ;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,6BAA6B,EAAE,QAAQ,GAAG,SAAS,CAAC;CACzD;AAgBD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAIvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAItD;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type OverlayLayer } from './stack';
|
|
2
|
+
/**
|
|
3
|
+
* Reserve this surface's place in the overlay stack for as long as it is
|
|
4
|
+
* mounted. Returns the z-indices it should paint with.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOverlayLayer(): OverlayLayer;
|
|
7
|
+
//# sourceMappingURL=use-overlay-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-overlay-layer.d.ts","sourceRoot":"","sources":["../../../../src/overlay/use-overlay-layer.ts"],"names":[],"mappings":"AAYA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAc9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/popover/index.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/popover/index.web.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EAEnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,CAoBvD;AASD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CAkD1D;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CA+BtE;AAuCD,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAiB,EACjB,SAA0B,EAC1B,MAAU,EACV,QAAQ,EACR,QAAc,EACd,WAAkB,EAClB,KAAK,EACL,MAAM,GACP,EAAE,mBAAmB,kDA0GrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/PromptInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/PromptInput.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAgB,WAAW,CAAC,EAC1B,SAAiB,EACjB,SAAe,EACf,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,MAAM,EACN,WAAW,EACX,WAAW,EAAE,qBAAqB,EAClC,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,wBAAgC,EAChC,UAAU,EACV,YAAY,EACZ,MAAM,GACP,EAAE,gBAAgB,2CAqOlB;yBA3Pe,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/select/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/select/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAA0C,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,WAAW,EAEX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAgChC,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAkB/E;AAMD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB,yTAyDpE;AAMD,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EACX,KAAK,GACN,EAAE,gBAAgB,2CAkBlB;AAMD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,2CAGpD;AAMD,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAC/B,KAAK,EACL,UAAU,EACV,KAA0B,EAC1B,cAA0C,GAC3C,EAAE,kBAAkB,CAAC,CAAC,CAAC,kDAgGvB;AAMD,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,2CA6CjF;AAMD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAMtE;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,aAAyB,EAAE,EAAE,wBAAwB,2CAYhG;AAMD,wBAAgB,eAAe,4CAW9B"}
|
|
@@ -1,49 +1,62 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Stacking scale for stacking WITHIN a single context.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* ## What belongs here, and what does not
|
|
5
|
+
*
|
|
6
|
+
* These values order elements against their own siblings — a badge over its
|
|
7
|
+
* avatar, a floating control over the panel it sits on, a sheet's drag handle
|
|
8
|
+
* over the sheet body. That is a local decision with a local answer, so a
|
|
9
|
+
* constant is the right tool.
|
|
10
|
+
*
|
|
11
|
+
* **Which OVERLAY SURFACE is on top of which is NOT on this scale**, and must
|
|
12
|
+
* never be added back to it. That question is answered by open order — the
|
|
13
|
+
* surface the user opened last wins — and is owned by `src/overlay/stack.ts`.
|
|
14
|
+
*
|
|
15
|
+
* This file used to carry rungs for that too (`dropdown` 40/41, `overlay`
|
|
16
|
+
* 50/60, `tooltip` 70, `toast` 80, `fullscreen` 90/91), plus
|
|
17
|
+
* `createOverlayZIndex` / `createDropdownZIndex` / `Z_INDEX_LAYER_STEP` to
|
|
18
|
+
* offset them. Because a rung is fixed per COMPONENT KIND, it decided stacking
|
|
19
|
+
* by what a surface WAS rather than by when it opened, so some pairings were
|
|
20
|
+
* permanently inverted: a confirm dialog (50/60) opened from inside an open
|
|
21
|
+
* bottom sheet (999999) rendered underneath it and could not be pressed or
|
|
22
|
+
* dismissed, and a menu (40/41) opened from inside a dialog landed behind that
|
|
23
|
+
* dialog. Those rungs and helpers are gone; reintroducing one reintroduces the
|
|
24
|
+
* bug.
|
|
7
25
|
*/
|
|
8
26
|
export declare const Z_INDEX: {
|
|
27
|
+
/** Default resting level. */
|
|
9
28
|
readonly base: 0;
|
|
29
|
+
/** One step above an immediate sibling — a badge over its avatar. */
|
|
10
30
|
readonly raised: 1;
|
|
31
|
+
/** A control floating over the content it belongs to. */
|
|
11
32
|
readonly floating: 10;
|
|
12
|
-
|
|
33
|
+
/** A dropdown's INLINE trigger wrapper, still in the app's document flow. */
|
|
13
34
|
readonly dropdown: 40;
|
|
14
|
-
|
|
15
|
-
readonly overlayBackdrop: 50;
|
|
16
|
-
readonly overlaySurface: 60;
|
|
17
|
-
readonly tooltip: 70;
|
|
18
|
-
readonly toast: 80;
|
|
19
|
-
readonly fullscreen: 90;
|
|
20
|
-
readonly fullscreenControl: 91;
|
|
35
|
+
/** A bottom sheet's drag handle, over the sheet's own body. */
|
|
21
36
|
readonly sheetHandle: 100;
|
|
37
|
+
/**
|
|
38
|
+
* The document-level portal container itself (`#bloom-portal-root`). Overlay
|
|
39
|
+
* surfaces render INSIDE it and order among themselves by open order — none
|
|
40
|
+
* of them may claim this value, which is what made the sheet unbeatable.
|
|
41
|
+
*/
|
|
22
42
|
readonly portalRoot: 999999;
|
|
23
43
|
};
|
|
24
|
-
export declare const Z_INDEX_LAYER_STEP = 10;
|
|
25
|
-
export declare function createDropdownZIndex(layer?: number): {
|
|
26
|
-
readonly root: number;
|
|
27
|
-
readonly surface: number;
|
|
28
|
-
};
|
|
29
|
-
export declare function createOverlayZIndex(layer?: number): {
|
|
30
|
-
readonly backdrop: number;
|
|
31
|
-
readonly surface: number;
|
|
32
|
-
};
|
|
33
44
|
export declare const zIndex: {
|
|
45
|
+
/** Default resting level. */
|
|
34
46
|
readonly base: 0;
|
|
47
|
+
/** One step above an immediate sibling — a badge over its avatar. */
|
|
35
48
|
readonly raised: 1;
|
|
49
|
+
/** A control floating over the content it belongs to. */
|
|
36
50
|
readonly floating: 10;
|
|
37
|
-
|
|
51
|
+
/** A dropdown's INLINE trigger wrapper, still in the app's document flow. */
|
|
38
52
|
readonly dropdown: 40;
|
|
39
|
-
|
|
40
|
-
readonly overlayBackdrop: 50;
|
|
41
|
-
readonly overlaySurface: 60;
|
|
42
|
-
readonly tooltip: 70;
|
|
43
|
-
readonly toast: 80;
|
|
44
|
-
readonly fullscreen: 90;
|
|
45
|
-
readonly fullscreenControl: 91;
|
|
53
|
+
/** A bottom sheet's drag handle, over the sheet's own body. */
|
|
46
54
|
readonly sheetHandle: 100;
|
|
55
|
+
/**
|
|
56
|
+
* The document-level portal container itself (`#bloom-portal-root`). Overlay
|
|
57
|
+
* surfaces render INSIDE it and order among themselves by open order — none
|
|
58
|
+
* of them may claim this value, which is what made the sheet unbeatable.
|
|
59
|
+
*/
|
|
47
60
|
readonly portalRoot: 999999;
|
|
48
61
|
};
|
|
49
62
|
//# sourceMappingURL=z-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-index.d.ts","sourceRoot":"","sources":["../../../../src/styles/z-index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"z-index.d.ts","sourceRoot":"","sources":["../../../../src/styles/z-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO;IAClB,6BAA6B;;IAE7B,qEAAqE;;IAErE,yDAAyD;;IAEzD,6EAA6E;;IAE7E,+DAA+D;;IAE/D;;;;OAIG;;CAEK,CAAC;AAEX,eAAO,MAAM,MAAM;IAlBjB,6BAA6B;;IAE7B,qEAAqE;;IAErE,yDAAyD;;IAEzD,6EAA6E;;IAE7E,+DAA+D;;IAE/D;;;;OAIG;;CAIwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurfaceHost.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/SurfaceHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD,KAAK,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AAgCxD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe;;;;;;
|
|
1
|
+
{"version":3,"file":"SurfaceHost.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/SurfaceHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD,KAAK,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AAgCxD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe;;;;;;uBA8FhB;YAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;SAAE;;;EAcrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastHost.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastHost.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToastHost.d.ts","sourceRoot":"","sources":["../../../../src/toast/ToastHost.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,qBAAqB,EAAE,EAAE,cAAc,2CAwB5E;yBAxBe,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tooltip/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tooltip/index.tsx"],"names":[],"mappings":"AAqEA;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,2CAEA;yBANe,0BAA0B;;;AAS1C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,QAAmB,EACnB,OAAO,EAAE,cAAc,EACvB,eAAe,GAChB,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,2CAsCA;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAuBzE;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,kDA0BA;AAgND,eAAO,MAAM,iBAAiB;;6CAAmC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoomableImageGallery.d.ts","sourceRoot":"","sources":["../../../../src/zoomable-image-gallery/ZoomableImageGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ZoomableImageGallery.d.ts","sourceRoot":"","sources":["../../../../src/zoomable-image-gallery/ZoomableImageGallery.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6E,MAAM,OAAO,CAAC;AAmElG,OAAO,KAAK,EAGV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AA87BjB,eAAO,MAAM,oBAAoB,8GAA4B,CAAC;AA0K9D,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.web.d.ts","sourceRoot":"","sources":["../../../../src/avatar-group/AvatarGroup.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroup.web.d.ts","sourceRoot":"","sources":["../../../../src/avatar-group/AvatarGroup.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAW5E,OAAO,KAAK,EAAmB,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAyIjE,eAAO,MAAM,WAAW,8CAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/bottom-sheet/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAEH,KAAK,gBAAgB,EACrB,KAAK,cAAc,EAEtB,MAAM,mBAAmB,CAAC;AAoC3B,QAAA,MAAM,WAAW,yFAEf,CAAC;AAwBH,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AACjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/context-menu/index.web.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KASN,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAEV,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EAExB,MAAM,SAAS,CAAC;AA+BjB,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CA2BtE;AAWD,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,uBAAuB,2CA4C3F;AAMD,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,uBAAuB,kDAuF9E;AAMD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAgB,EAChB,KAAK,GACN,EAAE,oBAAoB,2CA+CtB;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,wBAAwB,2CAiBhF;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,wBAAwB,2CAU3E;AAMD,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE,qBAAqB,2CAEnE;AAMD,wBAAgB,kBAAkB,4CAWjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AA0CA,OAAO,EAIL,4BAA4B,EAI7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,2CAab;AA8eD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAoBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AA2CA,OAAO,EAOL,4BAA4B,EAK7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAwDjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAazD;AAobD,OAAO,EAAE,4BAA4B,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AA2CA,OAAO,EAOL,4BAA4B,EAK7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAwDjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAazD;AAobD,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAkPxC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAgBA;AAkCD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,gBAAgB,8PAG5B,CAAC"}
|
|
@@ -326,16 +326,6 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
326
326
|
containerClassName?: string;
|
|
327
327
|
/** Accessibility label, applied to the dialog role on web. */
|
|
328
328
|
label?: string;
|
|
329
|
-
/**
|
|
330
|
-
* Stacking layer index within a coordinated surface stack. Multiplies
|
|
331
|
-
* `Z_INDEX_LAYER_STEP` onto this dialog's overlay z-indices (backdrop +
|
|
332
|
-
* panel) so a dialog presented on top of another paints above it. Defaults to
|
|
333
|
-
* `0` — the single-dialog case, byte-for-byte unchanged. Set by the shared
|
|
334
|
-
* surface stack (`src/surfaces`); direct consumers rarely need it. No-op for
|
|
335
|
-
* the `bottom` placement, which already stacks in mount order (native RN
|
|
336
|
-
* `<Modal>` / the web portal), so `layer` is harmless there.
|
|
337
|
-
*/
|
|
338
|
-
layer?: number;
|
|
339
329
|
}>;
|
|
340
330
|
/**
|
|
341
331
|
* Web-only options. Native uses bloom's `BottomSheet` underneath which has
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,2EAA2E;IAC3E,QAAQ,CAAC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M,iBAAiB,EAAE,MAA09tC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/menu/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAWN,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/menu/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAWN,MAAM,OAAO,CAAC;AACf,OAAO,EAA+B,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAW3F,OAAO,EAGL,cAAc,EAEf,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAEV,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,CAAC;AAK1B,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,wBAAgB,cAAc,IAAI,gBAAgB,CAiBjD;AA8BD,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,OAAO,GACR,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACzB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC,2CA0DD;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,KAAK,EACL,IAAe,EACf,IAAI,GACL,EAAE,gBAAgB,mBAsBlB;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,KAAK,GACN,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC,kDAoGD;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,2CAmDnF;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAelE;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAiB,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAuBtF;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAErD;AAED,wBAAgB,WAAW,4CAW1B"}
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
import { type ReactNode } from 'react';
|
|
43
43
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
44
44
|
import { type SharedValue } from 'react-native-reanimated';
|
|
45
|
+
import { type OverlayLayer } from './stack';
|
|
46
|
+
/** Z-indices of the enclosing overlay surface. See `OverlayRoot`. */
|
|
47
|
+
export declare function useOverlayLayerContext(): OverlayLayer;
|
|
45
48
|
/**
|
|
46
49
|
* One blur radius for every Bloom overlay. Surfaces differ in what they show,
|
|
47
50
|
* not in how the app behind them recedes.
|
|
@@ -60,14 +63,31 @@ export interface OverlayRootProps {
|
|
|
60
63
|
children?: ReactNode;
|
|
61
64
|
style?: StyleProp<ViewStyle>;
|
|
62
65
|
testID?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Opt OUT of the open-order stack and pin to a fixed depth. Only the toast
|
|
68
|
+
* layer does this — a notification has to stay visible over whatever is open,
|
|
69
|
+
* including a surface opened after it. Everything else must leave this unset
|
|
70
|
+
* so it stacks by open order; a hand-picked number here is precisely the bug
|
|
71
|
+
* `./stack.ts` exists to remove.
|
|
72
|
+
*/
|
|
73
|
+
zIndex?: number;
|
|
63
74
|
}
|
|
64
75
|
/**
|
|
65
|
-
* Outermost node of a portaled surface.
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
76
|
+
* Outermost node of a portaled surface. Three jobs:
|
|
77
|
+
*
|
|
78
|
+
* - Fills the viewport.
|
|
79
|
+
* - Re-enables pointer events for its own children while empty gaps stay
|
|
80
|
+
* click-through (`box-none`), so a surface that only covers part of the
|
|
81
|
+
* screen never steals clicks from the app behind it.
|
|
82
|
+
* - Takes this surface's place in the overlay stack, so a surface opened later
|
|
83
|
+
* paints above one opened earlier (see `./stack.ts`).
|
|
84
|
+
*
|
|
85
|
+
* Because the rank is taken on MOUNT, this must be rendered inside whatever
|
|
86
|
+
* guard makes the surface appear (`if (!isOpen) return null`), which is where
|
|
87
|
+
* every Bloom surface already puts it. Descendants that need to order
|
|
88
|
+
* themselves within the surface read `useOverlayLayerContext()`.
|
|
69
89
|
*/
|
|
70
|
-
export declare function OverlayRoot({ children, style, testID }: OverlayRootProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
export declare function OverlayRoot({ children, style, testID, zIndex }: OverlayRootProps): import("react/jsx-runtime").JSX.Element;
|
|
71
91
|
export declare namespace OverlayRoot {
|
|
72
92
|
var displayName: string;
|
|
73
93
|
}
|
|
@@ -91,7 +111,10 @@ export interface BackdropProps {
|
|
|
91
111
|
/** Dim opacity, 0–1. */
|
|
92
112
|
dimOpacity?: number;
|
|
93
113
|
/**
|
|
94
|
-
* Geometry for the press target: insets,
|
|
114
|
+
* Geometry for the press target: insets, layout. NOT a z-index — where this
|
|
115
|
+
* surface sits relative to others is `OverlayRoot`'s call (see `./stack.ts`),
|
|
116
|
+
* and within the surface the panel is simply rendered after this. NOT opacity
|
|
117
|
+
* either —
|
|
95
118
|
* `backdrop-filter` samples nothing under an ancestor with `opacity < 1`
|
|
96
119
|
* (the group composites in isolation), so a fade applied here silently kills
|
|
97
120
|
* the blur. An `opacity` found in this style is redirected onto the layers;
|
|
@@ -126,4 +149,6 @@ export interface BackdropProps {
|
|
|
126
149
|
* centred dialog) keeps doing so.
|
|
127
150
|
*/
|
|
128
151
|
export declare const Backdrop: import("react").NamedExoticComponent<BackdropProps>;
|
|
152
|
+
export { layerForRank, OVERLAY_STACK_BAND, OVERLAY_STACK_BASE, OVERLAY_STACK_MAX_RANK, TOAST_LAYER_Z, type OverlayLayer, } from './stack';
|
|
153
|
+
export { useOverlayLayer } from './use-overlay-layer';
|
|
129
154
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/overlay/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjF,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAiB,EAAoB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGvF,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAiB1D,qEAAqE;AACrE,wBAAgB,sBAAsB,IAAI,YAAY,CAErD;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;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An overlay opened LATER paints above one opened earlier. That is the whole
|
|
7
|
+
* contract, and it is decided here, once, for every Bloom overlay surface —
|
|
8
|
+
* never by a per-component constant.
|
|
9
|
+
*
|
|
10
|
+
* ## Why this module exists
|
|
11
|
+
*
|
|
12
|
+
* Stacking used to be a set of hand-picked rungs on a shared scale: menus at
|
|
13
|
+
* 40, dialogs at 50/60, tooltips at 70, sheets at 999999. Because those numbers
|
|
14
|
+
* are fixed per COMPONENT KIND, the answer to "which surface is on top" was
|
|
15
|
+
* decided by what each surface WAS rather than by when the user opened it — so
|
|
16
|
+
* some pairings were permanently inverted no matter the order:
|
|
17
|
+
*
|
|
18
|
+
* - A confirm dialog (50/60) opened from inside an open bottom sheet (999999)
|
|
19
|
+
* rendered fully, interactively, and completely underneath the sheet. It
|
|
20
|
+
* could be neither pressed nor dismissed.
|
|
21
|
+
* - A menu (40/41) opened from inside a dialog (50/60) landed behind the very
|
|
22
|
+
* dialog that launched it.
|
|
23
|
+
*
|
|
24
|
+
* Both failed silently: correct markup, correct styles, nothing in the console.
|
|
25
|
+
* Only a hit test in a real browser tells the difference, which is why
|
|
26
|
+
* `scripts/verify-overlay-stacking.mjs` exists alongside the unit tests here.
|
|
27
|
+
*
|
|
28
|
+
* ## How a rank is acquired
|
|
29
|
+
*
|
|
30
|
+
* `useOverlayLayer()` takes a rank on MOUNT and releases it on unmount, so the
|
|
31
|
+
* caller must be a component that mounts when the surface OPENS — which is how
|
|
32
|
+
* every Bloom surface is already built (`Dialog.web` returns null while closed;
|
|
33
|
+
* `BottomSheetBase` returns null until `rendered`). Acquiring per mount, in a
|
|
34
|
+
* `useState` initializer, is what makes the rank correct on the surface's FIRST
|
|
35
|
+
* paint: an effect-assigned z would leave one frame at the wrong depth, which
|
|
36
|
+
* on a 200ms fade-in is a visible flash of the surface behind its neighbour.
|
|
37
|
+
*
|
|
38
|
+
* It also keeps the acquisition out of any position the React Compiler may
|
|
39
|
+
* memoize. A counter read during render is exactly the external-mutable-state
|
|
40
|
+
* hazard the compiler mangles; a state initializer is not memoizable that way.
|
|
41
|
+
* (React StrictMode double-invokes initializers in development, so a rank can
|
|
42
|
+
* be consumed and dropped. That is harmless: only the ORDER of the numbers
|
|
43
|
+
* matters, never their density.)
|
|
44
|
+
*
|
|
45
|
+
* ## Toasts are deliberately not in this stack
|
|
46
|
+
*
|
|
47
|
+
* A toast is a notification, not a modal surface: it must stay visible over
|
|
48
|
+
* whatever is open, including a surface opened after it. It is pinned above the
|
|
49
|
+
* whole stack at `TOAST_LAYER_Z` instead of taking a rank. (Under the old
|
|
50
|
+
* scale a toast at 80 was already lost behind any open bottom sheet at 999999.)
|
|
51
|
+
*/
|
|
52
|
+
/**
|
|
53
|
+
* First z-index handed to an overlay. Comfortably above app content while
|
|
54
|
+
* staying far below `TOAST_LAYER_Z`.
|
|
55
|
+
*/
|
|
56
|
+
export declare const OVERLAY_STACK_BASE = 1000;
|
|
57
|
+
/**
|
|
58
|
+
* Z-index distance between consecutive overlays. A surface owns its whole band,
|
|
59
|
+
* so it can order its own parts (backdrop, panel, a floating control) without
|
|
60
|
+
* ever reaching the next surface's floor.
|
|
61
|
+
*/
|
|
62
|
+
export declare const OVERLAY_STACK_BAND = 10;
|
|
63
|
+
/**
|
|
64
|
+
* Ceiling on simultaneously open overlays. Beyond this, ranks saturate and the
|
|
65
|
+
* topmost surfaces tie (falling back to DOM order) rather than climbing into
|
|
66
|
+
* the toast layer. Nothing in the ecosystem stacks remotely this deep; the
|
|
67
|
+
* clamp exists so a runaway caller degrades instead of breaking the toast
|
|
68
|
+
* layer's guarantee.
|
|
69
|
+
*/
|
|
70
|
+
export declare const OVERLAY_STACK_MAX_RANK = 500;
|
|
71
|
+
/**
|
|
72
|
+
* The toast layer, pinned above every overlay rank (see the note above on why
|
|
73
|
+
* toasts are not part of the stack).
|
|
74
|
+
*/
|
|
75
|
+
export declare const TOAST_LAYER_Z: number;
|
|
76
|
+
/** The z-indices one overlay surface may use, all within its own band. */
|
|
77
|
+
export interface OverlayLayer {
|
|
78
|
+
/** The surface's outermost node — everything it renders is inside this. */
|
|
79
|
+
root: number;
|
|
80
|
+
/** Its dimming layer. */
|
|
81
|
+
backdrop: number;
|
|
82
|
+
/** Its panel, above its own backdrop. */
|
|
83
|
+
surface: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Registry state.
|
|
87
|
+
*
|
|
88
|
+
* `sequence` only ever moves forward while anything is open, which is what
|
|
89
|
+
* guarantees the ordering. It resets once the last overlay closes so the
|
|
90
|
+
* numbers stay small over a long session.
|
|
91
|
+
*/
|
|
92
|
+
interface Registry {
|
|
93
|
+
sequence: number;
|
|
94
|
+
live: Set<number>;
|
|
95
|
+
}
|
|
96
|
+
declare global {
|
|
97
|
+
var __oxyhq_bloom_overlay_stack__: Registry | undefined;
|
|
98
|
+
}
|
|
99
|
+
/** Z-indices for a given rank. Exported for tests and for the native surfaces. */
|
|
100
|
+
export declare function layerForRank(rank: number): OverlayLayer;
|
|
101
|
+
/**
|
|
102
|
+
* Take the next rank. Exported for tests; components use `useOverlayLayer`.
|
|
103
|
+
*/
|
|
104
|
+
export declare function acquireOverlayRank(): number;
|
|
105
|
+
/**
|
|
106
|
+
* Mark a rank as live. Called from an effect, which React balances against
|
|
107
|
+
* `releaseOverlayRank` even under StrictMode's mount/unmount/remount.
|
|
108
|
+
*
|
|
109
|
+
* It also re-floors `sequence` to at least this rank. That closes the only race
|
|
110
|
+
* the reset below could otherwise open: a surface takes rank N during render,
|
|
111
|
+
* and before its effect runs, the last previously-open surface unmounts and
|
|
112
|
+
* resets the counter to 0 — the next surface would then take rank 1 and sit
|
|
113
|
+
* BELOW the one still coming up at N. Re-flooring on register makes the reset
|
|
114
|
+
* unable to lose a rank that has been handed out.
|
|
115
|
+
*/
|
|
116
|
+
export declare function registerOverlayRank(rank: number): void;
|
|
117
|
+
/** Release a rank; resets the counter once nothing is open. */
|
|
118
|
+
export declare function releaseOverlayRank(rank: number): void;
|
|
119
|
+
/** Test seam — drops all registry state. */
|
|
120
|
+
export declare function resetOverlayStack(): void;
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/overlay/stack.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,aAAa,QAC8C,CAAC;AAEzE,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,UAAU,QAAQ;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,6BAA6B,EAAE,QAAQ,GAAG,SAAS,CAAC;CACzD;AAgBD,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAIvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAItD;AAED,+DAA+D;AAC/D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAIrD;AAED,4CAA4C;AAC5C,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type OverlayLayer } from './stack';
|
|
2
|
+
/**
|
|
3
|
+
* Reserve this surface's place in the overlay stack for as long as it is
|
|
4
|
+
* mounted. Returns the z-indices it should paint with.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOverlayLayer(): OverlayLayer;
|
|
7
|
+
//# sourceMappingURL=use-overlay-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-overlay-layer.d.ts","sourceRoot":"","sources":["../../../../src/overlay/use-overlay-layer.ts"],"names":[],"mappings":"AAYA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAc9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/popover/index.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/popover/index.web.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAkB,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EAEnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,CAoBvD;AASD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CAkD1D;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CA+BtE;AAuCD,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAiB,EACjB,SAA0B,EAC1B,MAAU,EACV,QAAQ,EACR,QAAc,EACd,WAAkB,EAClB,KAAK,EACL,MAAM,GACP,EAAE,mBAAmB,kDA0GrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/PromptInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/PromptInput.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAgB,WAAW,CAAC,EAC1B,SAAiB,EACjB,SAAe,EACf,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,QAAgB,EAChB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,MAAM,EACN,WAAW,EACX,WAAW,EAAE,qBAAqB,EAClC,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,wBAAgC,EAChC,UAAU,EACV,YAAY,EACZ,MAAM,GACP,EAAE,gBAAgB,2CAqOlB;yBA3Pe,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/select/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/select/index.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAgBf,OAAO,EAA0C,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACxF,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,WAAW,EAEX,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAgChC,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAkB/E;AAMD,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,kBAAkB,yTAyDpE;AAMD,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EAAE,YAAY,EACtB,WAAW,EACX,KAAK,GACN,EAAE,gBAAgB,2CAkBlB;AAMD,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE,eAAe,2CAGpD;AAMD,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAC/B,KAAK,EACL,UAAU,EACV,KAA0B,EAC1B,cAA0C,GAC3C,EAAE,kBAAkB,CAAC,CAAC,CAAC,kDAgGvB;AAMD,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,2CA6CjF;AAMD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAMtE;AAMD,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,aAAyB,EAAE,EAAE,wBAAwB,2CAYhG;AAMD,wBAAgB,eAAe,4CAW9B"}
|