@oxy.so/bloom 4.1.0 → 4.3.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/docs/adoption-matrix.mdx +7 -7
- package/docs/ai-chat.mdx +8 -0
- package/docs/app-shell.mdx +7 -0
- package/docs/bottom-bar.mdx +6 -0
- package/docs/settings-modal.mdx +14 -5
- package/docs/sidebar.mdx +11 -0
- package/lib/commonjs/ai-chat/AiChatContainer.js +8 -8
- package/lib/commonjs/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellBars.js +8 -2
- package/lib/commonjs/app-shell/AppShellBars.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellEngine.js +29 -6
- package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
- package/lib/commonjs/bottom-bar/BottomBarBase.js +10 -2
- package/lib/commonjs/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/commonjs/layout/bottom-bar-slot.js +10 -0
- package/lib/commonjs/layout/bottom-bar-slot.js.map +1 -0
- package/lib/commonjs/settings-modal/SettingsModal.js +153 -230
- package/lib/commonjs/settings-modal/SettingsModal.js.map +1 -1
- package/lib/commonjs/sidebar/Sidebar.js +35 -5
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/module/ai-chat/AiChatContainer.js +8 -8
- package/lib/module/ai-chat/AiChatContainer.js.map +1 -1
- package/lib/module/app-shell/AppShellBars.js +8 -2
- package/lib/module/app-shell/AppShellBars.js.map +1 -1
- package/lib/module/app-shell/AppShellEngine.js +30 -7
- package/lib/module/app-shell/AppShellEngine.js.map +1 -1
- package/lib/module/bottom-bar/BottomBarBase.js +11 -3
- package/lib/module/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/module/layout/bottom-bar-slot.js +7 -0
- package/lib/module/layout/bottom-bar-slot.js.map +1 -0
- package/lib/module/settings-modal/SettingsModal.js +150 -227
- package/lib/module/settings-modal/SettingsModal.js.map +1 -1
- package/lib/module/sidebar/Sidebar.js +35 -5
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/typescript/commonjs/ai-chat/types.d.ts +2 -2
- package/lib/typescript/commonjs/ai-chat/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellBars.d.ts +1 -0
- package/lib/typescript/commonjs/app-shell/AppShellBars.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/types.d.ts +4 -0
- package/lib/typescript/commonjs/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/bottom-bar-slot.d.ts +3 -0
- package/lib/typescript/commonjs/layout/bottom-bar-slot.d.ts.map +1 -0
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts +1 -1
- package/lib/typescript/commonjs/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/types.d.ts +7 -2
- package/lib/typescript/commonjs/settings-modal/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts +12 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/module/ai-chat/types.d.ts +2 -2
- package/lib/typescript/module/ai-chat/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellBars.d.ts +1 -0
- package/lib/typescript/module/app-shell/AppShellBars.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/types.d.ts +4 -0
- package/lib/typescript/module/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/layout/bottom-bar-slot.d.ts +3 -0
- package/lib/typescript/module/layout/bottom-bar-slot.d.ts.map +1 -0
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts +1 -1
- package/lib/typescript/module/settings-modal/SettingsModal.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/types.d.ts +7 -2
- package/lib/typescript/module/settings-modal/types.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/types.d.ts +12 -1
- package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +703 -0
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/commerce-harness.tsx +97 -0
- package/src/__tests__/support/composite.ts +68 -0
- package/src/__tests__/support/constructed-style-sheets.ts +68 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/ai-chat/AiChatContainer.tsx +7 -7
- package/src/ai-chat/types.ts +2 -2
- package/src/app-shell/AppShellBars.tsx +5 -3
- package/src/app-shell/AppShellEngine.tsx +23 -8
- package/src/bottom-bar/BottomBarBase.tsx +7 -4
- package/src/bottom-bar/types.ts +4 -0
- package/src/layout/bottom-bar-slot.ts +4 -0
- package/src/settings-modal/SettingsModal.tsx +180 -250
- package/src/settings-modal/types.ts +7 -2
- package/src/sidebar/Sidebar.tsx +26 -5
- package/src/sidebar/types.ts +12 -1
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
- package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
- package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
package/docs/adoption-matrix.mdx
CHANGED
|
@@ -165,7 +165,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
165
165
|
| `connection-dots` | `@oxy.so/bloom/connection-dots` + barrel | web fork | `connection-dots.mdx` | yes | 1 | | | | |
|
|
166
166
|
| `connection-status` | `@oxy.so/bloom/connection-status` + barrel | web fork | `connection-status.mdx` | yes | 1 | | | | |
|
|
167
167
|
| `contact-card` | `@oxy.so/bloom/contact-card` + barrel | universal | `contact-card.mdx` | yes | 1 | | | | |
|
|
168
|
-
| `content-panel` | `@oxy.so/bloom/content-panel` + barrel | web fork | `content-panel.mdx` | yes |
|
|
168
|
+
| `content-panel` | `@oxy.so/bloom/content-panel` + barrel | web fork | `content-panel.mdx` | yes | 8 | | | | |
|
|
169
169
|
| `context-menu` | `@oxy.so/bloom/context-menu` + barrel | web fork | `context-menu.mdx` | yes | 2 | | | reads | |
|
|
170
170
|
| `control-surface` | `@oxy.so/bloom/control-surface` + barrel | universal | `composition.mdx` | yes | 3 | | reads | | |
|
|
171
171
|
| `creator-studio` | `@oxy.so/bloom/creator-studio` + barrel | universal | `creator-studio.mdx` | yes | 3 | | n/a¹ | | **adaptation** |
|
|
@@ -173,7 +173,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
173
173
|
| `date-picker` | `@oxy.so/bloom/date-picker` + barrel | universal | `date-picker.mdx` | yes | 4 | reads | reads | | reads |
|
|
174
174
|
| `delivery-slot` | `@oxy.so/bloom/delivery-slot` + barrel | universal | `delivery-slot.mdx` | yes | 2 | reads | | | |
|
|
175
175
|
| `design-tokens` | `@oxy.so/bloom/design-tokens` + barrel | universal | `design-tokens.mdx` | yes | 3 | | | | |
|
|
176
|
-
| `dialog` | `@oxy.so/bloom/dialog` + barrel | web fork | `dialog.mdx` | yes |
|
|
176
|
+
| `dialog` | `@oxy.so/bloom/dialog` + barrel | web fork | `dialog.mdx` | yes | 14 | | | | |
|
|
177
177
|
| `directions` | `@oxy.so/bloom/directions` + barrel | universal | `directions.mdx` | yes | 2 | | | | |
|
|
178
178
|
| `divider` | `@oxy.so/bloom/divider` + barrel | universal | `divider.mdx` | yes | 1 | | | | |
|
|
179
179
|
| `dot-grid-meter` | `@oxy.so/bloom/dot-grid-meter` + barrel | universal | `dot-grid-meter.mdx` | yes | 2 | | | | |
|
|
@@ -195,7 +195,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
195
195
|
| `hooks` | `@oxy.so/bloom/hooks` + barrel | universal | `hooks.mdx` | yes | 9 | | | | reads |
|
|
196
196
|
| `hover-card` | `@oxy.so/bloom/hover-card` + barrel | web fork | `hover-card.mdx` | yes | 2 | | | reads | reads |
|
|
197
197
|
| `icon-circle` | `@oxy.so/bloom/icon-circle` + barrel | universal | `icon-circle.mdx` | yes | 1 | | | | |
|
|
198
|
-
| `icons` | `@oxy.so/bloom/icons` + barrel | universal | `icons.mdx` | yes |
|
|
198
|
+
| `icons` | `@oxy.so/bloom/icons` + barrel | universal | `icons.mdx` | yes | 48 | | | | |
|
|
199
199
|
| `image-aspect-ratio-cache` | `@oxy.so/bloom/image-aspect-ratio-cache` + barrel | universal | `image-aspect-ratio-cache.mdx` | yes | 1 | | | | |
|
|
200
200
|
| `image-resolver` | `@oxy.so/bloom/image-resolver` + barrel | universal | `image-resolver.mdx` | yes | 7 | | | | |
|
|
201
201
|
| `important-alerts-card` | `@oxy.so/bloom/important-alerts-card` + barrel | universal | `important-alerts-card.mdx` | yes | 1 | | | | |
|
|
@@ -205,7 +205,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
205
205
|
| `job-board` | `@oxy.so/bloom/job-board` + barrel | universal | `job-board.mdx` | yes | 1 | n/a¹ | | | reads |
|
|
206
206
|
| `kbd` | `@oxy.so/bloom/kbd` + barrel | universal | `kbd.mdx` | yes | 1 | | | | |
|
|
207
207
|
| `label` | `@oxy.so/bloom/label` + barrel | universal | `label.mdx` | yes | 1 | | | | |
|
|
208
|
-
| `layout` | `@oxy.so/bloom/layout` + barrel | universal | `layout.mdx` | yes |
|
|
208
|
+
| `layout` | `@oxy.so/bloom/layout` + barrel | universal | `layout.mdx` | yes | 7 | | | | |
|
|
209
209
|
| `lead-score` | `@oxy.so/bloom/lead-score` + barrel | universal | `lead-score.mdx` | yes | 1 | | | | |
|
|
210
210
|
| `link-preview` | `@oxy.so/bloom/link-preview` + barrel | universal | `link-preview.mdx` | yes | 2 | | | | |
|
|
211
211
|
| `list` | `@oxy.so/bloom/list` + barrel | web fork | `list.mdx` | yes | 2 | | | | |
|
|
@@ -278,9 +278,9 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
278
278
|
| `segmented-control` | `@oxy.so/bloom/segmented-control` + barrel | universal | `segmented-control.mdx` | yes | 3 | reads | | | |
|
|
279
279
|
| `select` | `@oxy.so/bloom/select` + barrel | web fork | `select.mdx` | yes | 6 | reads | | reads | |
|
|
280
280
|
| `settings-list` | `@oxy.so/bloom/settings-list` + barrel | universal | `settings-list.mdx` | yes | 5 | | | | |
|
|
281
|
-
| `settings-modal` | `@oxy.so/bloom/settings-modal` + barrel | universal | `settings-modal.mdx` | yes |
|
|
281
|
+
| `settings-modal` | `@oxy.so/bloom/settings-modal` + barrel | universal | `settings-modal.mdx` | yes | 2 | | | | reads |
|
|
282
282
|
| `shipment-request` | `@oxy.so/bloom/shipment-request` + barrel | universal | `shipment-request.mdx` | yes | 1 | **adaptation** | | | |
|
|
283
|
-
| `sidebar` | `@oxy.so/bloom/sidebar` + barrel | universal | `sidebar.mdx` | yes |
|
|
283
|
+
| `sidebar` | `@oxy.so/bloom/sidebar` + barrel | universal | `sidebar.mdx` | yes | 6 | n/a¹ | | | reads |
|
|
284
284
|
| `skeleton` | `@oxy.so/bloom/skeleton` + barrel | universal | `skeleton.mdx` | yes | 1 | | | | |
|
|
285
285
|
| `slider` | `@oxy.so/bloom/slider` + barrel | universal | `slider.mdx` | yes | 4 | reads | | | |
|
|
286
286
|
| `social-button` | `@oxy.so/bloom/social-button` + barrel | universal | `social-button.mdx` | yes | 1 | | | | |
|
|
@@ -304,7 +304,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
304
304
|
| `tenancy` | `@oxy.so/bloom/tenancy` + barrel | universal | `tenancy.mdx` | yes | 3 | | n/a¹ | | |
|
|
305
305
|
| `text-field` | `@oxy.so/bloom/text-field` + barrel | universal | `text-field.mdx` | yes | 13 | reads | reads | | |
|
|
306
306
|
| `textarea` | `@oxy.so/bloom/textarea` + barrel | universal | `textarea.mdx` | yes | 4 | reads | reads | | n/a¹ |
|
|
307
|
-
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes |
|
|
307
|
+
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes | 289 | | | n/a¹ | reads |
|
|
308
308
|
| `theme-toggle` | `@oxy.so/bloom/theme-toggle` + barrel | universal | `theme-toggle.mdx` | yes | 1 | n/a¹ | | | |
|
|
309
309
|
| `toast` | `@oxy.so/bloom/toast` + barrel | universal | `toast.mdx` | yes | 17 | | | | |
|
|
310
310
|
| `tooltip` | `@oxy.so/bloom/tooltip` + barrel | web fork | `tooltip.mdx` | yes | 1 | | | | |
|
package/docs/ai-chat.mdx
CHANGED
|
@@ -130,3 +130,11 @@ Semantic tokens resolved onto Bloom's ramps (`ai-chat/shared.ts`): background-fu
|
|
|
130
130
|
- **The glass chips** are frost + tint + sheen + rim; the SVG refraction layer of the reference material is not reproduced.
|
|
131
131
|
- **Effort at Max** has no flame / starfield flourish (see `composer-panel`).
|
|
132
132
|
- The gallery re-baselines rather than animating when the panel's own width changes during a resize drag.
|
|
133
|
+
|
|
134
|
+
### Custom chat header
|
|
135
|
+
|
|
136
|
+
`AiChatContainer` can receive a `header` such as Bloom's `PageHeader` with the
|
|
137
|
+
application's real actions. Omit `title` and `project` to omit its breadcrumb;
|
|
138
|
+
without breadcrumb or action handlers no extra header row is reserved. Share
|
|
139
|
+
and more controls render only when `onShare` and `onMore` are supplied. This
|
|
140
|
+
keeps applications without public sharing from presenting a dead share action.
|
package/docs/app-shell.mdx
CHANGED
|
@@ -78,6 +78,13 @@ keeps the same content node mounted and does not replace the document scroller.
|
|
|
78
78
|
|
|
79
79
|
**The panel occupies the screen either way — what differs is what scrolls.**
|
|
80
80
|
|
|
81
|
+
In document mode the painted surface has a viewport minimum height, subtracting
|
|
82
|
+
the shell insets and any measured external top bar. Short pages fill the frame;
|
|
83
|
+
long pages keep growing with the document. Header and bottom-bar clearance inside
|
|
84
|
+
the surface count toward that minimum, so empty pages do not gain extra scroll.
|
|
85
|
+
Reveal drawers move the bottom-bar and FAB slots with the page in both document
|
|
86
|
+
and fixed modes; the shell remains their sole safe-area and measurement owner.
|
|
87
|
+
|
|
81
88
|
- `scroll="document"` (the default): the page scrolls, and the panel's frame is
|
|
82
89
|
a screen-tall sticky rectangle pinned at the shell's own `gutter`, so the
|
|
83
90
|
panel reads as a surface filling the window while the content moves inside
|
package/docs/bottom-bar.mdx
CHANGED
|
@@ -33,3 +33,9 @@ The universal entry uses no Apple-only peers. The specialized `tab-bar` subpath
|
|
|
33
33
|
continues to provide its native enhancements independently.
|
|
34
34
|
|
|
35
35
|
`actionPlacement="auto"` (default) moves the action above and to the right when placing it beside the tabs would leave less than 56 points per destination. `beside` retains the horizontal arrangement; `above` always lifts it. The action uses the same scroll-driven visibility in both placements. Its measured height plus a 10-point gap joins the reserved footprint, so the final content remains reachable.
|
|
36
|
+
|
|
37
|
+
## Pager and shell composition
|
|
38
|
+
|
|
39
|
+
`activeProgress` accepts a shared continuous item index from a swipe pager. `value` remains the settled semantic destination; use an unmatched value when a pushed route has no selection. `onValueLongPress(value)` handles destination actions such as account switching.
|
|
40
|
+
|
|
41
|
+
Inside an `AppShell` bottom-bar slot, the shell owns measurement and the bottom safe area. `BottomBar` automatically consumes that ownership, so the inset is applied once. Standalone bars retain their own edge claim and inset.
|
package/docs/settings-modal.mdx
CHANGED
|
@@ -6,7 +6,7 @@ order: 97
|
|
|
6
6
|
|
|
7
7
|
# SettingsModal
|
|
8
8
|
|
|
9
|
-
An 871×614 panel with a 274px navigation rail on the left and a titled, scrolling page on the right, plus the row chrome and the four pages it ships (General, Profile, Tools, Storage). Everything the demo hardcodes — rail groups, plan, servers, files — comes in as props.
|
|
9
|
+
An 871×614 panel with a 274px navigation rail on the left and a titled, scrolling page on the right, using the shared floating `PageHeader` for its title, back and close controls, plus the row chrome and the four pages it ships (General, Profile, Tools, Storage). Everything the demo hardcodes — rail groups, plan, servers, files — comes in as props.
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
12
|
import { useDialogControl } from '@oxy.so/bloom/dialog';
|
|
@@ -59,9 +59,9 @@ const control = useDialogControl();
|
|
|
59
59
|
|
|
60
60
|
## Driving it
|
|
61
61
|
|
|
62
|
-
Drive it like `Dialog`: **`control` from `useDialogControl()`** is the preferred path (`control.open()` / `control.close()`), and `open` + `onClose` is the controlled alternative (in controlled mode `onClose` is a close *request* — backdrop, close button, Escape, Android back — and you flip `open`). The page shown on every open is `defaultPage` (or the first rail row with a `page`); `page` + `onPageChange` control it.
|
|
62
|
+
Drive it like `Dialog`: **`control` from `useDialogControl()`** is the preferred path (`control.open()` / `control.close()`), and `open` + `onClose` is the controlled alternative (in controlled mode `onClose` is a close *request* — backdrop, close button, Escape, Android back — and you flip `open`). On compact screens, `initialView="page"` opens the selected page directly (useful for deep links); the default `"navigation"` opens the section list. Back returns to the list in either case. The choice resets on each open and leaves desktop navigation unchanged. The page shown on every open is `defaultPage` (or the first rail row with a `page`); `page` + `onPageChange` control it.
|
|
63
63
|
|
|
64
|
-
Rail rows with a `page` navigate; rows without one call their `onPress` (or are static). The Storage page sets `compactTitle` — its page already reserves headroom for the upload badge, so the
|
|
64
|
+
Rail rows with a `page` navigate; rows without one call their `onPress` (or are static). The Storage page sets `compactTitle` — its page already reserves headroom for the upload badge, so the content's gap below the shared header drops from 12 to 6.
|
|
65
65
|
|
|
66
66
|
## Responsive layout
|
|
67
67
|
|
|
@@ -71,10 +71,14 @@ The modal's base size is a fixed 871×614 panel. Bloom adapts it to the window w
|
|
|
71
71
|
|---|---|---|
|
|
72
72
|
| `regular` | ≥ 900px | The base panel: 274px rail, 32px insets, radius 24. |
|
|
73
73
|
| `medium` | 640–899px | Same panel inside a 16px gutter; rail 220px, insets 24px. |
|
|
74
|
-
| `compact` | < 640px | Full screen (no radius or gutter, content inside the safe area). Two levels: the section list with chevrons, then the page pushed over it with
|
|
74
|
+
| `compact` | < 640px | Full screen (no radius or gutter, content inside the safe area). Two levels: the section list with chevrons, then the page pushed over it with the shared `PageHeader` back island. Android's back button returns to the list before it closes. The panel rises 16px instead of scaling from .85. |
|
|
75
75
|
|
|
76
76
|
In `compact`, `SettingsRow` lets its control wrap under the label when both do not fit (a switch stays beside it, a `SettingsValueField` drops below and fills the row), and the Storage table keeps the file name and actions while the date and size columns drop and its toolbar wraps. `labels.back` names the back button (default `Back`).
|
|
77
77
|
|
|
78
|
+
## Shared header
|
|
79
|
+
|
|
80
|
+
Every layout uses `PageHeader` with its floating islands. A `ButtonGroupItem` supplies the close action; compact pages use its native back action to return to sections. The modal owns safe-area padding once, so the header uses `safeArea={false}`. The page viewport fills the entire content panel: its first child is the sticky header, followed by the padded page body. Native uses `stickyHeaderIndices`; web uses the header’s CSS sticky positioning. The viewport’s own Reanimated scroll offset drives `PageHeader`’s automatic scrim in the modal surface color, independently of the document beneath it. There is no second body viewport or separate fade. Compact section navigation uses the same structure in its rail viewport. Changing pages remounts the page viewport and resets its scroll offset. `PageHeader` owns header metrics; only the page body owns content padding.
|
|
81
|
+
|
|
78
82
|
## Why it is not a `Dialog`
|
|
79
83
|
|
|
80
84
|
This shell differs from `Dialog`'s centered card in every load-bearing way: black 70% backdrop with no blur, 24px radius on `background/full`, a fixed 871×614 size, a fade + scale-from-0.85 + 4px blur on `cubic-bezier(0.32, 0.72, 0, 1)`, and a **Saved toast that straddles the panel's bottom edge** — outside the panel's clip, which `Dialog`'s card owns. So the shell is built from the same authorities `Dialog` uses — `Portal`, `OverlayRoot` (the one stacking rank) and `Backdrop` (the pointer-events contract) — and accepts `Dialog`'s `control`.
|
|
@@ -112,7 +116,12 @@ All surfaces come from the theme ramps (`button/shared`): background/secondary i
|
|
|
112
116
|
|
|
113
117
|
## Known gaps
|
|
114
118
|
|
|
115
|
-
- The 871px panel does not reflow on phones; it caps at the viewport minus 32.
|
|
116
119
|
- Bespoke file-type illustrations aren't included; the default is the Remix document / spreadsheet / video glyph. Pass `renderFileIcon` for artwork.
|
|
117
120
|
- The Storage search uses `TextField`'s own tertiary fill — `TextField` owns its shell paint.
|
|
118
121
|
- The panel's 4px blur during open/close is web-only; native fades and scales.
|
|
122
|
+
|
|
123
|
+
### Preventing unfinished work from being discarded
|
|
124
|
+
|
|
125
|
+
`onBeforeLeave(reason)` synchronously returns `false` to keep the current content mounted, with no exit animation. Reasons are `close` (close action, backdrop, Escape, Android back from navigation, or `control.close()`), `navigation` (compact back to sections, including Android back), and `page` (selecting a different page). It runs once per intention with the latest callback; selecting the same page does not invoke it. An imperative close callback runs only if the close was accepted.
|
|
126
|
+
|
|
127
|
+
Use the imperative control for guarded flows. External changes to controlled `open` or `page`, and parent unmounts, remain the caller's authority and are not vetoed. Preserve the application's router leave guard as well when navigation can unmount the modal. The guard should read the application's completion state; the modal never stores recovery phrases or other sensitive content.
|
package/docs/sidebar.mdx
CHANGED
|
@@ -232,3 +232,14 @@ The panel scroll viewport extends behind the bottom half of the last fixed heade
|
|
|
232
232
|
`ProfileButton` above is an application component: the app retains authentication, account selection and menu behavior. The slot adds no account behavior and does not replace `account`, theme, secondary navigation, team or plan controls. Omit `account` if your footer replaces the built-in account switcher. Footer content should fit the compact rail width and provide an accessible name when it hides its label.
|
|
233
233
|
|
|
234
234
|
Navigation items accept `onLongPress` for secondary touch actions, in both panel and rail. Keep the same action available in a keyboard-accessible menu; long press alone is not discoverable or keyboard accessible.
|
|
235
|
+
|
|
236
|
+
## App-owned history
|
|
237
|
+
|
|
238
|
+
Use `content` for conversation history or other application-owned rows. It follows
|
|
239
|
+
items/tree inside Sidebar's existing scroll viewport; `onScroll` observes that
|
|
240
|
+
viewport after its edge fades update. Compose `SidebarItem`/`SidebarFolder` here,
|
|
241
|
+
not another scroller. Header, primary action and footer stay fixed. Content remains
|
|
242
|
+
mounted while collapsed, but is hidden from focus, pointers and accessibility and
|
|
243
|
+
contracts with the panel's animation. `variant="rail"` omits this expanded content.
|
|
244
|
+
Quick search only filters built-in rows/tree; use `showSearch={false}` when the
|
|
245
|
+
application supplies its own search destination.
|
|
@@ -85,7 +85,7 @@ function AiChatContainer({
|
|
|
85
85
|
bottom: 0
|
|
86
86
|
},
|
|
87
87
|
children: background
|
|
88
|
-
}) : null, header, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
88
|
+
}) : null, header, title != null || project != null || onShare || onMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
89
89
|
style: {
|
|
90
90
|
width: '100%',
|
|
91
91
|
flexDirection: 'row',
|
|
@@ -101,17 +101,17 @@ function AiChatContainer({
|
|
|
101
101
|
minWidth: 0,
|
|
102
102
|
flex: 1
|
|
103
103
|
},
|
|
104
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index2.Breadcrumb, {
|
|
104
|
+
children: title != null || project != null ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index2.Breadcrumb, {
|
|
105
105
|
accessibilityLabel: l.breadcrumb,
|
|
106
106
|
children: [project === undefined ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.BreadcrumbItem, {
|
|
107
107
|
icon: projectIcon,
|
|
108
108
|
onPress: onProjectPress,
|
|
109
109
|
children: project
|
|
110
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.BreadcrumbItem, {
|
|
110
|
+
}), title == null ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.BreadcrumbItem, {
|
|
111
111
|
current: true,
|
|
112
112
|
children: title
|
|
113
113
|
})]
|
|
114
|
-
})
|
|
114
|
+
}) : null
|
|
115
115
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
116
116
|
style: {
|
|
117
117
|
flexShrink: 0,
|
|
@@ -119,19 +119,19 @@ function AiChatContainer({
|
|
|
119
119
|
alignItems: 'center',
|
|
120
120
|
gap: 8
|
|
121
121
|
},
|
|
122
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AiChatControls.GlyphAction, {
|
|
122
|
+
children: [onShare ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AiChatControls.GlyphAction, {
|
|
123
123
|
icon: _RiShare2Line.RiShare2Line,
|
|
124
124
|
label: l.share,
|
|
125
125
|
onPress: onShare,
|
|
126
126
|
palette: palette
|
|
127
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AiChatControls.GlyphAction, {
|
|
127
|
+
}) : null, onMore ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AiChatControls.GlyphAction, {
|
|
128
128
|
icon: _RiMoreFill.RiMoreFill,
|
|
129
129
|
label: l.more,
|
|
130
130
|
onPress: onMore,
|
|
131
131
|
palette: palette
|
|
132
|
-
})]
|
|
132
|
+
}) : null]
|
|
133
133
|
})]
|
|
134
|
-
}), children, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
134
|
+
}) : null, children, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
135
135
|
style: {
|
|
136
136
|
width: '100%',
|
|
137
137
|
flexDirection: 'column',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_RiFolderLine","_RiMoreFill","_RiShare2Line","_AiChatControls","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_LABELS","breadcrumb","share","more","AiChatContainer","project","title","projectIcon","RiFolderLine","onProjectPress","onShare","onMore","header","children","composer","working","workingLabel","background","surface","labels","style","testID","useAiChatWebCss","palette","useAiChatPalette","l","useMemo","jsxs","View","height","minWidth","flex","flexDirection","overflow","borderRadius","CONTAINER_RADIUS","backgroundColor","secondary","jsx","pointerEvents","position","top","left","right","bottom","width","alignItems","justifyContent","gap","paddingLeft","paddingRight","paddingTop","Breadcrumb","accessibilityLabel","undefined","BreadcrumbItem","icon","onPress","current","flexShrink","GlyphAction","RiShare2Line","label","RiMoreFill","paddingBottom","AgentThinking","variant","AiChatThread","exports","forwardRef","autoFollow","followAnimated","followThreshold","onStartReached","onStartReachedThreshold","maintainStartPosition","onScroll","scrollEventThrottle","ref","scrollRef","useRef","lastHeight","offset","viewport","pageOut","startArmed","useImperativeHandle","scrollToEnd","options","animated","scrollToOffset","y","scrollTo","getScrollView","listening","handleScroll","useCallback","event","contentOffset","layoutMeasurement","nativeEvent","onLayout","layout","onContentSizeChange","_width","previous","grew","first","fromBottom","ScrollView","dataHook","minHeight","contentContainerStyle","IS_WEB","flexGrow"],"sourceRoot":"../../../src","sources":["ai-chat/AiChatContainer.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAiG,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAW,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK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uBAAe,EAAC,CAAC;EACjB,MAAMC,OAAO,GAAG,IAAAC,wBAAgB,EAAC,CAAC;EAClC,MAAMC,CAAC,GAAG,IAAAC,cAAO,EAAC,OAAO;IAAE,GAAG1B,cAAc;IAAE,GAAGmB;EAAO,CAAC,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EACrE,oBACE,IAAAvC,WAAA,CAAA+C,IAAA,EAACvD,YAAA,CAAAwD,IAAI;IACHP,MAAM,EAAEA,MAAO;IACfD,KAAK,EAAE,CACL;MACES,MAAM,EAAE,MAAM;MACdC,QAAQ,EAAE,CAAC;MACXC,IAAI,EAAE,CAAC;MACPC,aAAa,EAAE,QAAQ;MACvBC,QAAQ,EAAE,QAAQ;MAClBC,YAAY,EAAEC,wBAAgB;MAC9BC,eAAe,EAAElB,OAAO,GAAGK,OAAO,CAACc,SAAS,GAAG;IACjD,CAAC,EACDjB,KAAK,CACL;IAAAP,QAAA,GACDI,UAAU,gBACT,IAAArC,WAAA,CAAA0D,GAAA,EAAClE,YAAA,CAAAwD,IAAI;MAACW,aAAa,EAAC,MAAM;MAACnB,KAAK,EAAE;QAAEoB,QAAQ,EAAE,UAAU;QAAEC,GAAG,EAAE,CAAC;QAAEC,IAAI,EAAE,CAAC;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE;MAAE,CAAE;MAAA/B,QAAA,EAC9FI;IAAU,CACP,CAAC,GACL,IAAI,EACPL,MAAM,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_index","_index2","_RiFolderLine","_RiMoreFill","_RiShare2Line","_AiChatControls","_shared","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_LABELS","breadcrumb","share","more","AiChatContainer","project","title","projectIcon","RiFolderLine","onProjectPress","onShare","onMore","header","children","composer","working","workingLabel","background","surface","labels","style","testID","useAiChatWebCss","palette","useAiChatPalette","l","useMemo","jsxs","View","height","minWidth","flex","flexDirection","overflow","borderRadius","CONTAINER_RADIUS","backgroundColor","secondary","jsx","pointerEvents","position","top","left","right","bottom","width","alignItems","justifyContent","gap","paddingLeft","paddingRight","paddingTop","Breadcrumb","accessibilityLabel","undefined","BreadcrumbItem","icon","onPress","current","flexShrink","GlyphAction","RiShare2Line","label","RiMoreFill","paddingBottom","AgentThinking","variant","AiChatThread","exports","forwardRef","autoFollow","followAnimated","followThreshold","onStartReached","onStartReachedThreshold","maintainStartPosition","onScroll","scrollEventThrottle","ref","scrollRef","useRef","lastHeight","offset","viewport","pageOut","startArmed","useImperativeHandle","scrollToEnd","options","animated","scrollToOffset","y","scrollTo","getScrollView","listening","handleScroll","useCallback","event","contentOffset","layoutMeasurement","nativeEvent","onLayout","layout","onContentSizeChange","_width","previous","grew","first","fromBottom","ScrollView","dataHook","minHeight","contentContainerStyle","IS_WEB","flexGrow"],"sourceRoot":"../../../src","sources":["ai-chat/AiChatContainer.tsx"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAiG,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAW,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,K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OAAO,GAAGyB,QAAQ,CAACzB,OAAO;MAC/D,IAAIkD,UAAU,GAAGpC,eAAe,EAAE;IACpC;IACAO,SAAS,CAACrB,OAAO,EAAE6B,WAAW,CAAC;MAAEE,QAAQ,EAAElB;IAAe,CAAC,CAAC;EAC9D,CAAC,EACD,CAACD,UAAU,EAAEC,cAAc,EAAEC,eAAe,EAAEG,qBAAqB,CACrE,CAAC;EAED,oBACE,IAAA/F,WAAA,CAAA0D,GAAA,EAAClE,YAAA,CAAAyI,UAAU;IACT/B,GAAG,EAAEC,SAAU;IACf1D,MAAM,EAAEA,MAAO;IAAA,GACX,IAAAyF,gBAAQ,EAAC,mBAAmB,EAAE,MAAM,CAAC;IACzCP,mBAAmB,EAAEA,mBAAoB;IACzCF,QAAQ,EAAEA,QAAS;IACnBzB,QAAQ,EAAEkB,SAAS,GAAGC,YAAY,GAAGzC,SAAU;IAC/CuB,mBAAmB,EAAEiB,SAAS,GAAGjB,mBAAmB,GAAGvB,SAAU;IACjElC,KAAK,EAAE,CAAC;MAAE2F,SAAS,EAAE,CAAC;MAAElE,KAAK,EAAE,MAAM;MAAEd,IAAI,EAAE;IAAE,CAAC,EAAEX,KAAK,CAAE;IACzD4F,qBAAqB,EAAE;MACrB;MACA;MACA;MACA,IAAIC,cAAM,GAAG;QAAEF,SAAS,EAAE,MAAM;QAAEpD,UAAU,EAAE;MAAE,CAAC,GAAG;QAAEuD,QAAQ,EAAE;MAAE,CAAC,CAAC;MACpElF,aAAa,EAAE,QAAQ;MACvBe,cAAc,EAAE,UAAU;MAC1BC,GAAG,EAAE,EAAE;MACPC,WAAW,EAAE,EAAE;MACfC,YAAY,EAAE,EAAE;MAChBC,UAAU,EAAE;IACd,CAAE;IAAAtC,QAAA,EACDA;EAAQ,CACC,CAAC;AAEjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _reactNative = require("react-native");
|
|
10
10
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
11
11
|
var _webViewStyle = require("../styles/web-view-style.js");
|
|
12
|
+
var _bottomBarSlot = require("../layout/bottom-bar-slot.js");
|
|
12
13
|
var _bottomEdge = require("../layout/bottom-edge.js");
|
|
13
14
|
var _zIndex = require("../styles/z-index.js");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -99,7 +100,10 @@ const AppShellBottomBarComponent = ({
|
|
|
99
100
|
style: [anchorBottom(doc), {
|
|
100
101
|
paddingBottom: insets.bottom
|
|
101
102
|
}],
|
|
102
|
-
children:
|
|
103
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomBarSlot.BottomBarSlotContext.Provider, {
|
|
104
|
+
value: insets.bottom,
|
|
105
|
+
children: children
|
|
106
|
+
})
|
|
103
107
|
});
|
|
104
108
|
};
|
|
105
109
|
const AppShellBottomBar = exports.AppShellBottomBar = /*#__PURE__*/(0, _react.memo)(AppShellBottomBarComponent);
|
|
@@ -143,7 +147,8 @@ AppShellFloatingAction.displayName = 'AppShellFloatingAction';
|
|
|
143
147
|
const AppShellTopBarComponent = ({
|
|
144
148
|
children,
|
|
145
149
|
doc,
|
|
146
|
-
testID
|
|
150
|
+
testID,
|
|
151
|
+
onHeightChange
|
|
147
152
|
}) => {
|
|
148
153
|
const insets = useShellInsets();
|
|
149
154
|
const pinned = doc ? {
|
|
@@ -152,6 +157,7 @@ const AppShellTopBarComponent = ({
|
|
|
152
157
|
} : {};
|
|
153
158
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
154
159
|
testID: testID,
|
|
160
|
+
onLayout: event => onHeightChange?.(event.nativeEvent.layout.height),
|
|
155
161
|
style: [{
|
|
156
162
|
zIndex: _zIndex.Z_INDEX.floating,
|
|
157
163
|
paddingTop: insets.top
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_webViewStyle","_bottomEdge","_zIndex","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useShellInsets","insets","useContext","SafeAreaInsetsContext","top","bottom","anchorBottom","doc","position","WEB_POSITION_FIXED","left","right","zIndex","Z_INDEX","floating","AppShellBottomBarComponent","children","onHeightChange","testID","height","setHeight","useState","measuredHeight","useRef","useClaimBottomEdge","onLayout","useCallback","event","rawHeight","nativeEvent","layout","Number","isFinite","next","Math","max","round","current","jsx","View","pointerEvents","style","paddingBottom","AppShellBottomBar","exports","memo","displayName","AppShellFloatingActionComponent","offset","gutter","placement","paddingLeft","paddingRight","alignItems","AppShellFloatingAction","AppShellTopBarComponent","pinned","WEB_POSITION_STICKY","paddingTop","AppShellTopBar"],"sourceRoot":"../../../src","sources":["app-shell/AppShellBars.tsx"],"mappings":";;;;;;;AA4BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_webViewStyle","_bottomBarSlot","_bottomEdge","_zIndex","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useShellInsets","insets","useContext","SafeAreaInsetsContext","top","bottom","anchorBottom","doc","position","WEB_POSITION_FIXED","left","right","zIndex","Z_INDEX","floating","AppShellBottomBarComponent","children","onHeightChange","testID","height","setHeight","useState","measuredHeight","useRef","useClaimBottomEdge","onLayout","useCallback","event","rawHeight","nativeEvent","layout","Number","isFinite","next","Math","max","round","current","jsx","View","pointerEvents","style","paddingBottom","BottomBarSlotContext","Provider","value","AppShellBottomBar","exports","memo","displayName","AppShellFloatingActionComponent","offset","gutter","placement","paddingLeft","paddingRight","alignItems","AppShellFloatingAction","AppShellTopBarComponent","pinned","WEB_POSITION_STICKY","paddingTop","AppShellTopBar"],"sourceRoot":"../../../src","sources":["app-shell/AppShellBars.tsx"],"mappings":";;;;;;;AA4BA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA4C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,C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;AACM,MAAM8C,cAAc,GAAAf,OAAA,CAAAe,cAAA,gBAAG,IAAAd,WAAI,EAACU,uBAAuB,CAAC;AAC3DI,cAAc,CAACb,WAAW,GAAG,gBAAgB","ignoreList":[]}
|
|
@@ -227,7 +227,8 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
227
227
|
document.addEventListener('keydown', dismiss);
|
|
228
228
|
return () => document.removeEventListener('keydown', dismiss);
|
|
229
229
|
}, [isOpen, drawerStyle, setOpen]);
|
|
230
|
-
const
|
|
230
|
+
const revealAvailable = drawerStyle === 'reveal' && drawerAvailable;
|
|
231
|
+
const feedRevealAvailable = variant === 'feed' && revealAvailable;
|
|
231
232
|
const feedRevealed = feedRevealAvailable && isOpen;
|
|
232
233
|
const shell = (0, _react.useMemo)(() => ({
|
|
233
234
|
drawerAvailable,
|
|
@@ -272,6 +273,7 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
272
273
|
const showTopBar = topBar != null && barActive(topBarVisibility);
|
|
273
274
|
const showBottomBar = bottomBar != null && barActive(bottomBarVisibility);
|
|
274
275
|
const showFloatingAction = floatingAction != null;
|
|
276
|
+
const [topBarHeight, setTopBarHeight] = (0, _react.useState)(0);
|
|
275
277
|
const [bottomBarHeight, setBottomBarHeight] = (0, _react.useState)(0);
|
|
276
278
|
const [floatingActionHeight, setFloatingActionHeight] = (0, _react.useState)(0);
|
|
277
279
|
// Both slots are MEASURED rather than assumed: a bar's height is its
|
|
@@ -282,12 +284,12 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
282
284
|
level: compactPanel ? 1 : 0,
|
|
283
285
|
fill: compactPanel ? theme.colors.card : background,
|
|
284
286
|
children: [showBottomBar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppShellBars.AppShellBottomBar, {
|
|
285
|
-
doc: doc && !
|
|
287
|
+
doc: doc && !revealAvailable,
|
|
286
288
|
onHeightChange: setBottomBarHeight,
|
|
287
289
|
testID: testID ? `${testID}-bottom-bar` : undefined,
|
|
288
290
|
children: bottomBar
|
|
289
291
|
}) : null, showFloatingAction ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppShellBars.AppShellFloatingAction, {
|
|
290
|
-
doc: doc && !
|
|
292
|
+
doc: doc && !revealAvailable,
|
|
291
293
|
offset: bottomEdge + gutter,
|
|
292
294
|
gutter: gutter,
|
|
293
295
|
placement: floatingActionPlacement,
|
|
@@ -298,6 +300,7 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
298
300
|
});
|
|
299
301
|
const topBarNode = showTopBar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppShellBars.AppShellTopBar, {
|
|
300
302
|
doc: doc,
|
|
303
|
+
onHeightChange: setTopBarHeight,
|
|
301
304
|
testID: testID ? `${testID}-top-bar` : undefined,
|
|
302
305
|
children: topBar
|
|
303
306
|
}) : null;
|
|
@@ -528,7 +531,19 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
528
531
|
testID: testID ? `${testID}-veil` : undefined
|
|
529
532
|
})
|
|
530
533
|
}) : null]
|
|
531
|
-
}), overlay,
|
|
534
|
+
}), overlay, drawerAvailable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
535
|
+
testID: testID ? `${testID}-reveal-bars` : undefined,
|
|
536
|
+
pointerEvents: isOpen ? 'none' : 'box-none',
|
|
537
|
+
style: [{
|
|
538
|
+
position: doc ? _webViewStyle.WEB_POSITION_FIXED : 'absolute',
|
|
539
|
+
top: 0,
|
|
540
|
+
bottom: 0,
|
|
541
|
+
left: 0,
|
|
542
|
+
right: 0,
|
|
543
|
+
overflow: 'hidden'
|
|
544
|
+
}, pageStyle],
|
|
545
|
+
children: bars
|
|
546
|
+
}) : bars]
|
|
532
547
|
})
|
|
533
548
|
});
|
|
534
549
|
}
|
|
@@ -547,6 +562,8 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
547
562
|
/** `feed` / `focus`: a fixed reading column, centred in what the nav leaves. */
|
|
548
563
|
const contentAligned = navigationAlign === 'content' && centred;
|
|
549
564
|
// Plain navigation belongs to the viewport; only the reading surfaces are inset.
|
|
565
|
+
const documentPanelInset = feedRevealed ? 12 : compactPanel ? 0 : gutter;
|
|
566
|
+
const externalTopHeight = showTopBar ? topBarHeight : 0;
|
|
550
567
|
const plainDocumentFrame = doc && contentAligned && flowSidebar?.surface === 'plain' && !topBarNode;
|
|
551
568
|
const readingGap = Math.max(0, asideGap ?? columnGap);
|
|
552
569
|
const readingGroupWidth = contentWidth + (asideBeside ? asideWidth + readingGap : 0);
|
|
@@ -656,14 +673,20 @@ function createAppShellEngine(ContentPanel, BloomColorScope) {
|
|
|
656
673
|
// would sit 8px above the panel's real top edge and snap down on
|
|
657
674
|
// the first scroll — the panel appearing to breathe.
|
|
658
675
|
,
|
|
659
|
-
overlayInset:
|
|
676
|
+
overlayInset: {
|
|
677
|
+
top: externalTopHeight + documentPanelInset,
|
|
678
|
+
bottom: documentPanelInset
|
|
679
|
+
}
|
|
660
680
|
// The panel's own `flex-1` (basis 0) would collapse to nothing in
|
|
661
681
|
// a document-flow column, which has no free space to distribute.
|
|
662
682
|
,
|
|
663
683
|
surfaceStyle: {
|
|
664
684
|
flexGrow: 1,
|
|
665
685
|
flexShrink: 1,
|
|
666
|
-
flexBasis: 'auto'
|
|
686
|
+
flexBasis: 'auto',
|
|
687
|
+
// The viewport frame must have a painted surface even when the
|
|
688
|
+
// page is short. A minimum still lets long documents grow.
|
|
689
|
+
minHeight: (0, _webViewStyle.webViewportHeightMinus)(externalTopHeight + documentPanelInset * 2)
|
|
667
690
|
},
|
|
668
691
|
contentStyle: {
|
|
669
692
|
flexGrow: 1,
|