@oxy.so/bloom 7.7.1 → 7.8.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 +2 -2
- package/docs/app-shell.mdx +34 -0
- package/docs/chat-composer.mdx +12 -0
- package/docs/motion.mdx +11 -0
- package/docs/page-footer.mdx +16 -2
- package/lib/commonjs/app-shell/AppShellSplit.js +52 -38
- package/lib/commonjs/app-shell/AppShellSplit.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellSplitMotion.js +199 -0
- package/lib/commonjs/app-shell/AppShellSplitMotion.js.map +1 -0
- package/lib/commonjs/app-shell/SplitPane.js +47 -0
- package/lib/commonjs/app-shell/SplitPane.js.map +1 -0
- package/lib/commonjs/app-shell/context.js +9 -1
- package/lib/commonjs/app-shell/context.js.map +1 -1
- package/lib/commonjs/app-shell/index.js +6 -0
- package/lib/commonjs/app-shell/index.js.map +1 -1
- package/lib/commonjs/app-shell/index.web.js +6 -0
- package/lib/commonjs/app-shell/index.web.js.map +1 -1
- package/lib/commonjs/chat-composer/create-chat-composer.js +8 -6
- package/lib/commonjs/chat-composer/create-chat-composer.js.map +1 -1
- package/lib/commonjs/chat-composer/create-suggestion-list.js +7 -0
- package/lib/commonjs/chat-composer/create-suggestion-list.js.map +1 -1
- package/lib/commonjs/hooks/use-prefers-reduced-motion.js +28 -0
- package/lib/commonjs/hooks/use-prefers-reduced-motion.js.map +1 -0
- package/lib/commonjs/page-footer/PageFooter.js +50 -36
- package/lib/commonjs/page-footer/PageFooter.js.map +1 -1
- package/lib/commonjs/page-footer/use-document-anchor.js +68 -0
- package/lib/commonjs/page-footer/use-document-anchor.js.map +1 -0
- package/lib/module/app-shell/AppShellSplit.js +50 -38
- package/lib/module/app-shell/AppShellSplit.js.map +1 -1
- package/lib/module/app-shell/AppShellSplitMotion.js +194 -0
- package/lib/module/app-shell/AppShellSplitMotion.js.map +1 -0
- package/lib/module/app-shell/SplitPane.js +42 -0
- package/lib/module/app-shell/SplitPane.js.map +1 -0
- package/lib/module/app-shell/context.js +7 -0
- package/lib/module/app-shell/context.js.map +1 -1
- package/lib/module/app-shell/index.js +1 -1
- package/lib/module/app-shell/index.js.map +1 -1
- package/lib/module/app-shell/index.web.js +1 -1
- package/lib/module/app-shell/index.web.js.map +1 -1
- package/lib/module/chat-composer/create-chat-composer.js +8 -6
- package/lib/module/chat-composer/create-chat-composer.js.map +1 -1
- package/lib/module/chat-composer/create-suggestion-list.js +7 -0
- package/lib/module/chat-composer/create-suggestion-list.js.map +1 -1
- package/lib/module/hooks/use-prefers-reduced-motion.js +25 -0
- package/lib/module/hooks/use-prefers-reduced-motion.js.map +1 -0
- package/lib/module/page-footer/PageFooter.js +51 -37
- package/lib/module/page-footer/PageFooter.js.map +1 -1
- package/lib/module/page-footer/use-document-anchor.js +65 -0
- package/lib/module/page-footer/use-document-anchor.js.map +1 -0
- package/lib/typescript/commonjs/app-shell/AppShellSplit.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellSplitMotion.d.ts +16 -0
- package/lib/typescript/commonjs/app-shell/AppShellSplitMotion.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/SplitPane.d.ts +12 -0
- package/lib/typescript/commonjs/app-shell/SplitPane.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/context.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/index.d.ts +1 -1
- package/lib/typescript/commonjs/app-shell/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/index.web.d.ts +1 -1
- package/lib/typescript/commonjs/app-shell/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +8 -0
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/create-chat-composer.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/create-suggestion-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/types.d.ts +2 -1
- package/lib/typescript/commonjs/chat-composer/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-prefers-reduced-motion.d.ts +3 -0
- package/lib/typescript/commonjs/hooks/use-prefers-reduced-motion.d.ts.map +1 -0
- package/lib/typescript/commonjs/page-footer/PageFooter.d.ts +1 -1
- package/lib/typescript/commonjs/page-footer/PageFooter.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-footer/types.d.ts +4 -0
- package/lib/typescript/commonjs/page-footer/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-footer/use-document-anchor.d.ts +9 -0
- package/lib/typescript/commonjs/page-footer/use-document-anchor.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/AppShellSplit.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellSplitMotion.d.ts +16 -0
- package/lib/typescript/module/app-shell/AppShellSplitMotion.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/SplitPane.d.ts +12 -0
- package/lib/typescript/module/app-shell/SplitPane.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/context.d.ts +4 -0
- package/lib/typescript/module/app-shell/context.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/index.d.ts +1 -1
- package/lib/typescript/module/app-shell/index.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/index.web.d.ts +1 -1
- package/lib/typescript/module/app-shell/index.web.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +8 -0
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/create-chat-composer.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/create-suggestion-list.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/types.d.ts +2 -1
- package/lib/typescript/module/chat-composer/types.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-prefers-reduced-motion.d.ts +3 -0
- package/lib/typescript/module/hooks/use-prefers-reduced-motion.d.ts.map +1 -0
- package/lib/typescript/module/page-footer/PageFooter.d.ts +1 -1
- package/lib/typescript/module/page-footer/PageFooter.d.ts.map +1 -1
- package/lib/typescript/module/page-footer/types.d.ts +4 -0
- package/lib/typescript/module/page-footer/types.d.ts.map +1 -1
- package/lib/typescript/module/page-footer/use-document-anchor.d.ts +9 -0
- package/lib/typescript/module/page-footer/use-document-anchor.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +683 -0
- package/src/__tests__/support/card-surface.ts +25 -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/messages-in.ts +10 -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/__tests__/support/worklet-capture-fixture.tsx +28 -0
- package/src/agent-avatar/__tests__/artwork-golden.json +774 -0
- package/src/agent-creator/__tests__/support/character-runtime-fixture.tsx +26 -0
- package/src/app-shell/AppShellSplit.tsx +24 -29
- package/src/app-shell/AppShellSplitMotion.tsx +133 -0
- package/src/app-shell/SplitPane.tsx +30 -0
- package/src/app-shell/context.ts +7 -0
- package/src/app-shell/index.ts +1 -1
- package/src/app-shell/index.web.ts +1 -1
- package/src/app-shell/types.ts +8 -0
- package/src/chat-composer/create-chat-composer.tsx +8 -6
- package/src/chat-composer/create-suggestion-list.tsx +8 -1
- package/src/chat-composer/types.ts +2 -1
- package/src/hooks/use-prefers-reduced-motion.ts +22 -0
- package/src/page-footer/PageFooter.tsx +13 -2
- package/src/page-footer/types.ts +4 -0
- package/src/page-footer/use-document-anchor.ts +52 -0
- 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
|
@@ -125,7 +125,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
125
125
|
| `alert-dialog` | `@oxy.so/bloom/alert-dialog` + barrel | web fork | `alert-dialog.mdx` | yes | 2 | | | | |
|
|
126
126
|
| `animated-check` | `@oxy.so/bloom/animated-check` + barrel | universal | `animated-check.mdx` | yes | 2 | | | | |
|
|
127
127
|
| `announcement` | `@oxy.so/bloom/announcement` + barrel | universal | `announcement.mdx` | yes | 2 | | | | |
|
|
128
|
-
| `app-shell` | `@oxy.so/bloom/app-shell` + barrel | web fork | `app-shell.mdx` | yes |
|
|
128
|
+
| `app-shell` | `@oxy.so/bloom/app-shell` + barrel | web fork | `app-shell.mdx` | yes | 8 | | | | reads |
|
|
129
129
|
| `appearance` | `@oxy.so/bloom/appearance` + barrel | universal | `composition.mdx` | yes | 12 | | reads | | |
|
|
130
130
|
| `aspect-ratio` | `@oxy.so/bloom/aspect-ratio` + barrel | universal | `aspect-ratio.mdx` | yes | 1 | | | | |
|
|
131
131
|
| `auth-card` | `@oxy.so/bloom/auth-card` + barrel | universal | `auth-card.mdx` | yes | 2 | | | | |
|
|
@@ -308,7 +308,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
|
|
|
308
308
|
| `tenancy` | `@oxy.so/bloom/tenancy` + barrel | universal | `tenancy.mdx` | yes | 5 | | reads | | |
|
|
309
309
|
| `text-field` | `@oxy.so/bloom/text-field` + barrel | universal | `text-field.mdx` | yes | 17 | reads | reads | | |
|
|
310
310
|
| `textarea` | `@oxy.so/bloom/textarea` + barrel | universal | `textarea.mdx` | yes | 4 | reads | reads | | n/a¹ |
|
|
311
|
-
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes |
|
|
311
|
+
| `theme` | `@oxy.so/bloom/theme` + barrel | web fork | `theme.mdx` | yes | 362 | | | n/a¹ | reads |
|
|
312
312
|
| `theme-toggle` | `@oxy.so/bloom/theme-toggle` + barrel | universal | `theme-toggle.mdx` | yes | 2 | n/a¹ | | | |
|
|
313
313
|
| `toast` | `@oxy.so/bloom/toast` + barrel | universal | `toast.mdx` | yes | 17 | | | | |
|
|
314
314
|
| `tooltip` | `@oxy.so/bloom/tooltip` + barrel | web fork | `tooltip.mdx` | yes | 1 | | | | |
|
package/docs/app-shell.mdx
CHANGED
|
@@ -692,6 +692,40 @@ content; omitting it preserves the existing 12px frame and wider-screen top gap.
|
|
|
692
692
|
|
|
693
693
|
### Pane error recovery
|
|
694
694
|
|
|
695
|
+
### Animated list/detail visibility
|
|
696
|
+
|
|
697
|
+
`transition="slide"` opts into coordinated pane motion. Keep `showList` true
|
|
698
|
+
when opening detail to shrink the list and reveal detail beside it. Set
|
|
699
|
+
`showList={!selected}` and `showDetail={selected}` on compact layouts to slide
|
|
700
|
+
between full-width panes. The last open layout determines the return direction.
|
|
701
|
+
Existing callers default to `transition="none"` and keep their immediate layout.
|
|
702
|
+
|
|
703
|
+
```tsx
|
|
704
|
+
<AppShellSplitPanes
|
|
705
|
+
variant="separated"
|
|
706
|
+
transition="slide"
|
|
707
|
+
list={<Results />}
|
|
708
|
+
detail={selected ? <Details /> : undefined}
|
|
709
|
+
showList={wide || !selected}
|
|
710
|
+
showDetail={selected}
|
|
711
|
+
paneScroll={false}
|
|
712
|
+
/>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
The expansion transition moves the actual panes with full opacity; it does not make
|
|
716
|
+
screenshots or float an overlay above the list. The list retains its component
|
|
717
|
+
state while it remains visible. Exiting panes stay mounted only until the transition
|
|
718
|
+
settles, become inert immediately, then unmount. Rapid reversals continue from the
|
|
719
|
+
current live position. System reduced motion settles immediately. Pane widths remain
|
|
720
|
+
resizable; the optional info column keeps its existing immediate behavior.
|
|
721
|
+
|
|
722
|
+
Use `useAppShellPaneActive()` inside a pane to suspend window-level shortcuts,
|
|
723
|
+
subscriptions or screen effects as soon as that pane becomes logically hidden,
|
|
724
|
+
including during its retained exit. The hook returns true outside split panes.
|
|
725
|
+
DOM focus/pointer input and native accessibility are already disabled by the
|
|
726
|
+
pane itself. Motion owns no scroll view: `paneScroll={false}` continues to leave
|
|
727
|
+
scrolling to the surrounding document or to the pane's own virtualized list.
|
|
728
|
+
|
|
695
729
|
`AppShellSplitPanes` isolates list, detail and info rendering failures independently.
|
|
696
730
|
The default localized, themed EmptyState offers retry while the other panes and
|
|
697
731
|
shell navigation keep working. Pass options per pane to customize the presentation
|
package/docs/chat-composer.mdx
CHANGED
|
@@ -244,3 +244,15 @@ All of them take `style` and `testID`.
|
|
|
244
244
|
The composer controls compose Bloom Button, including its press-in/out recording lifecycle. Each public component has a thin platform binding; shared factories receive Button, Surface, and overlay components explicitly. Web bindings name their `.web` dependencies, so built browser packages work without Metro-style extension resolution. No additional layout wrappers are introduced.
|
|
245
245
|
|
|
246
246
|
Interactive controls use canonical `sm`/`md`/`lg` sizes and inherit `BloomScope` when omitted. Their geometry remains family-specific; unsupported `xs` uses the compact rung. ReactionPicker has only `sm`/`md`, mapping scoped `lg` to `md`. Display badges and read-only rating sizes retain their existing vocabulary.
|
|
247
|
+
|
|
248
|
+
## Optional recording and suggestion focus
|
|
249
|
+
|
|
250
|
+
Recording controls appear only when at least one mic callback is supplied.
|
|
251
|
+
Without recording support, an empty draft shows a disabled send button;
|
|
252
|
+
`canSend` controls whether submission is permitted, independently of the visible
|
|
253
|
+
control. It is not necessary to enable empty sends to hide recording.
|
|
254
|
+
|
|
255
|
+
Mouse selection in `SuggestionList` preserves input focus until the option's
|
|
256
|
+
click is delivered, so callers may hide suggestions directly in `onBlur`.
|
|
257
|
+
Native suggestion scrolling uses `keyboardShouldPersistTaps="handled"`, allowing
|
|
258
|
+
the first tap to choose an option while the keyboard is open.
|
package/docs/motion.mdx
CHANGED
|
@@ -121,3 +121,14 @@ spatial transitions under reduced motion. Native Screen initializes keyboard
|
|
|
121
121
|
visibility before reserving bottom chrome, including inherited shell clearance.
|
|
122
122
|
Portaled overlays isolate screen navigation state while preserving theme and
|
|
123
123
|
locale; scrolling their content cannot collapse the navigation behind them.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
`AppShellSplitPanes transition="slide"` uses the expansion duration with a
|
|
127
|
+
cubic ease-out timing animation for live pane geometry. Reanimated 3's
|
|
128
|
+
**duration** spring integrates at most 64ms per frame, but compares its forced
|
|
129
|
+
completion against the full elapsed wall time. Expensive layout frames can
|
|
130
|
+
leave the spring far behind and then jump hundreds of pixels at the deadline.
|
|
131
|
+
Timing evaluates elapsed time directly, avoiding that accumulated deficit.
|
|
132
|
+
Retargeting still starts from the current pane position. Verify the last moving
|
|
133
|
+
frame as well as intermediate frames in a browser; counting intermediate frames
|
|
134
|
+
alone does not catch a large final snap.
|
package/docs/page-footer.mdx
CHANGED
|
@@ -54,8 +54,22 @@ controls let pointer events pass through. The gradient has no motion, including
|
|
|
54
54
|
when reduced motion is enabled. `scrim="none"` removes it; `scrimColor` overrides
|
|
55
55
|
the inherited opaque surface color. `style` and `testID` address the outer host.
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
Place it beside the scroller, never inside its scrolling content.
|
|
57
|
+
The default `position="absolute"` anchors this page chrome inside a bounded parent.
|
|
58
|
+
Place it beside the scroller, never inside its scrolling content.
|
|
59
|
+
|
|
60
|
+
For web pages that scroll the document, use `position="document"`. Bloom pins
|
|
61
|
+
its controls to the viewport bottom while an invisible, zero-height anchor
|
|
62
|
+
tracks the actual content column. Sidebar widths, responsive layout and RTL
|
|
63
|
+
remain owned by the page layout; consumers need no fixed styles or measured
|
|
64
|
+
coordinates. Mount it in the column, outside transformed/animated containers
|
|
65
|
+
(which establish a different fixed-position containing block). Resize observers
|
|
66
|
+
follow its ancestor frames, and horizontal scrolling updates the viewport
|
|
67
|
+
coordinate without rendering again for unchanged bounds. Native keeps the
|
|
68
|
+
existing absolute positioning within its bounded screen.
|
|
69
|
+
|
|
70
|
+
Both positions publish the same measured `usePageFooterInset()` clearance.
|
|
71
|
+
Wrap the page and footer in `PageFooterProvider` and use that value as bottom
|
|
72
|
+
padding, instead of a guessed spacer. A purchase
|
|
59
73
|
summary with price and booking controls belongs to `ActionBar`, which has a
|
|
60
74
|
different opaque, in-flow layout contract.
|
|
61
75
|
|
|
@@ -7,13 +7,14 @@ exports.AppShellSplitPanes = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _AiChatResizeHandle = require("../ai-chat/AiChatResizeHandle.js");
|
|
10
|
-
var _PanelErrorBoundary = require("../error-boundary/PanelErrorBoundary.js");
|
|
11
10
|
var _zIndex = require("../styles/z-index.js");
|
|
12
11
|
var _tokens = require("../styles/tokens.js");
|
|
13
12
|
var _useTheme = require("../theme/use-theme.js");
|
|
14
13
|
var _messages = require("../locale/messages.js");
|
|
15
14
|
var _messages2 = require("./messages.js");
|
|
16
15
|
var _constants = require("./constants.js");
|
|
16
|
+
var _SplitPane = require("./SplitPane.js");
|
|
17
|
+
var _AppShellSplitMotion = require("./AppShellSplitMotion.js");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
20
|
/**
|
|
@@ -33,42 +34,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
33
34
|
* set of the same three bugs.
|
|
34
35
|
*/
|
|
35
36
|
|
|
36
|
-
/** One pane: a bounded column that scrolls its own overflow. */function Pane({
|
|
37
|
-
children,
|
|
38
|
-
scroll,
|
|
39
|
-
errorBoundary,
|
|
40
|
-
style,
|
|
41
|
-
testID
|
|
42
|
-
}) {
|
|
43
|
-
const content = scroll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
44
|
-
style: {
|
|
45
|
-
flex: 1
|
|
46
|
-
},
|
|
47
|
-
contentContainerStyle: {
|
|
48
|
-
flexGrow: 1
|
|
49
|
-
},
|
|
50
|
-
children: children
|
|
51
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
52
|
-
style: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
minHeight: 0
|
|
55
|
-
},
|
|
56
|
-
children: children
|
|
57
|
-
});
|
|
58
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
59
|
-
testID: testID,
|
|
60
|
-
style: [{
|
|
61
|
-
minWidth: 0,
|
|
62
|
-
alignSelf: 'stretch'
|
|
63
|
-
}, style],
|
|
64
|
-
children: errorBoundary === false ? content : /*#__PURE__*/(0, _jsxRuntime.jsx)(_PanelErrorBoundary.PanelErrorBoundary, {
|
|
65
|
-
...errorBoundary,
|
|
66
|
-
children: content
|
|
67
|
-
})
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
37
|
const AppShellSplitPanesComponent = ({
|
|
71
38
|
variant = 'joined',
|
|
39
|
+
transition = 'none',
|
|
72
40
|
listErrorBoundary,
|
|
73
41
|
detailErrorBoundary,
|
|
74
42
|
infoErrorBoundary,
|
|
@@ -127,6 +95,52 @@ const AppShellSplitPanesComponent = ({
|
|
|
127
95
|
};
|
|
128
96
|
// Only the panes that are actually drawn count: alone, a pane fills the row.
|
|
129
97
|
const solo = [showList, showDetail, showInfo].filter(Boolean).length === 1;
|
|
98
|
+
if (transition === 'slide') {
|
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
100
|
+
style: {
|
|
101
|
+
flexGrow: 1,
|
|
102
|
+
flexShrink: 1,
|
|
103
|
+
minWidth: 0,
|
|
104
|
+
flexDirection: 'row'
|
|
105
|
+
},
|
|
106
|
+
children: [(showList || showDetail) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppShellSplitMotion.AppShellSplitMotion, {
|
|
107
|
+
list: list,
|
|
108
|
+
detail: detail,
|
|
109
|
+
showList: showList,
|
|
110
|
+
showDetail: showDetail,
|
|
111
|
+
width: width,
|
|
112
|
+
gap: divider.width,
|
|
113
|
+
paneScroll: paneScroll,
|
|
114
|
+
listErrorBoundary: listErrorBoundary,
|
|
115
|
+
detailErrorBoundary: detailErrorBoundary,
|
|
116
|
+
dividerStyle: divider,
|
|
117
|
+
testID: testID,
|
|
118
|
+
resizeHandle: resizable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AiChatResizeHandle.AiChatResizeHandle, {
|
|
119
|
+
label: resizeLabel,
|
|
120
|
+
onResizeStart: onResizeStart,
|
|
121
|
+
onResize: onResize,
|
|
122
|
+
onNudge: onNudge,
|
|
123
|
+
testID: testID ? `${testID}-divider` : undefined
|
|
124
|
+
}) : null
|
|
125
|
+
}), showInfo && (showList || showDetail) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
126
|
+
style: divider,
|
|
127
|
+
testID: testID ? `${testID}-info-gap` : undefined
|
|
128
|
+
}) : null, showInfo ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
129
|
+
testID: testID ? `${testID}-pane-info` : undefined,
|
|
130
|
+
errorBoundary: infoErrorBoundary,
|
|
131
|
+
scroll: paneScroll,
|
|
132
|
+
style: solo ? {
|
|
133
|
+
flexGrow: 1,
|
|
134
|
+
flexShrink: 1,
|
|
135
|
+
flexBasis: 0
|
|
136
|
+
} : {
|
|
137
|
+
width: infoWidth,
|
|
138
|
+
flexShrink: 0
|
|
139
|
+
},
|
|
140
|
+
children: info
|
|
141
|
+
}) : null]
|
|
142
|
+
});
|
|
143
|
+
}
|
|
130
144
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
131
145
|
style: {
|
|
132
146
|
flexGrow: 1,
|
|
@@ -134,7 +148,7 @@ const AppShellSplitPanesComponent = ({
|
|
|
134
148
|
minWidth: 0,
|
|
135
149
|
flexDirection: 'row'
|
|
136
150
|
},
|
|
137
|
-
children: [showList ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
151
|
+
children: [showList ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
138
152
|
testID: testID ? `${testID}-pane-list` : undefined,
|
|
139
153
|
errorBoundary: listErrorBoundary,
|
|
140
154
|
scroll: paneScroll,
|
|
@@ -171,7 +185,7 @@ const AppShellSplitPanesComponent = ({
|
|
|
171
185
|
testID: testID ? `${testID}-divider` : undefined
|
|
172
186
|
})
|
|
173
187
|
}) : null
|
|
174
|
-
}) : null, showDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
188
|
+
}) : null, showDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
175
189
|
testID: testID ? `${testID}-pane-detail` : undefined,
|
|
176
190
|
errorBoundary: detailErrorBoundary,
|
|
177
191
|
scroll: paneScroll,
|
|
@@ -184,7 +198,7 @@ const AppShellSplitPanesComponent = ({
|
|
|
184
198
|
}) : null, showInfo && showDetail && !solo ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
185
199
|
style: divider,
|
|
186
200
|
testID: testID ? `${testID}-info-gap` : undefined
|
|
187
|
-
}) : null, showInfo ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
201
|
+
}) : null, showInfo ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
188
202
|
testID: testID ? `${testID}-pane-info` : undefined,
|
|
189
203
|
errorBoundary: infoErrorBoundary,
|
|
190
204
|
scroll: paneScroll,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_AiChatResizeHandle","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_AiChatResizeHandle","_zIndex","_tokens","_useTheme","_messages","_messages2","_constants","_SplitPane","_AppShellSplitMotion","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AppShellSplitPanesComponent","variant","transition","listErrorBoundary","detailErrorBoundary","infoErrorBoundary","list","detail","info","showList","showDetail","showInfo","listWidth","D","listMinWidth","listMaxWidth","onListWidthChange","infoWidth","resizable","paneScroll","resizeLabel","resizeLabelProp","testID","theme","useTheme","messages","useMessages","APP_SHELL_MESSAGES","resizePanes","width","setWidth","useState","widthAtDragStart","useRef","clamp","useCallback","next","Math","min","max","commit","clamped","onResizeStart","current","onResize","dx","onNudge","separated","divider","space","md","flexShrink","alignSelf","zIndex","Z_INDEX","floating","backgroundColor","colors","border","solo","filter","Boolean","length","jsxs","View","style","flexGrow","minWidth","flexDirection","children","jsx","AppShellSplitMotion","gap","dividerStyle","resizeHandle","AiChatResizeHandle","label","undefined","SplitPane","errorBoundary","scroll","flexBasis","pointerEvents","position","top","bottom","left","right","flex","AppShellSplitPanes","exports","memo","displayName"],"sourceRoot":"../../../src","sources":["app-shell/AppShellSplit.tsx"],"mappings":";;;;;;AAgBA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAGA,IAAAQ,UAAA,GAAAR,OAA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E,MAAM,EAAE7D,UAAW;MACnB8C,KAAK,EAAEN,IAAI,GAAG;QAAEO,QAAQ,EAAE,CAAC;QAAEf,UAAU,EAAE,CAAC;QAAE8B,SAAS,EAAE;MAAE,CAAC,GAAG;QAAEpD,KAAK,EAAEZ,SAAS;QAAEkC,UAAU,EAAE;MAAE,CAAE;MAAAkB,QAAA,EAEhG7D;IAAI,CACD,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX,CAAC;AAEM,MAAMiF,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,gBAAG,IAAAE,WAAI,EAAC3F,2BAA2B,CAAC;AACnEyF,kBAAkB,CAACG,WAAW,GAAG,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AppShellSplitMotion = AppShellSplitMotion;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
+
var _useIsRtl = require("../hooks/use-is-rtl.js");
|
|
11
|
+
var _usePrefersReducedMotion = require("../hooks/use-prefers-reduced-motion.js");
|
|
12
|
+
var _recipes = require("../motion/recipes.js");
|
|
13
|
+
var _webViewStyle = require("../styles/web-view-style.js");
|
|
14
|
+
var _context = require("./context.js");
|
|
15
|
+
var _SplitPane = require("./SplitPane.js");
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
18
|
+
// `clip` prevents horizontal overflow without creating a nested scroll owner.
|
|
19
|
+
// Native has no document scroll and uses its ordinary clipping primitive.
|
|
20
|
+
const clipStyle = {
|
|
21
|
+
overflow: _reactNative.Platform.OS === 'web' ? _webViewStyle.WEB_OVERFLOW_CLIP : 'hidden'
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** One progress value owns both live pane positions; no clones, opacity or layout snapshots. */
|
|
25
|
+
function AppShellSplitMotion({
|
|
26
|
+
list,
|
|
27
|
+
detail,
|
|
28
|
+
showList,
|
|
29
|
+
showDetail,
|
|
30
|
+
width,
|
|
31
|
+
gap,
|
|
32
|
+
paneScroll,
|
|
33
|
+
listErrorBoundary,
|
|
34
|
+
detailErrorBoundary,
|
|
35
|
+
dividerStyle,
|
|
36
|
+
resizeHandle,
|
|
37
|
+
testID
|
|
38
|
+
}) {
|
|
39
|
+
const [containerWidth, setContainerWidth] = (0, _react.useState)(0);
|
|
40
|
+
const [retained, setRetained] = (0, _react.useState)({
|
|
41
|
+
list,
|
|
42
|
+
detail,
|
|
43
|
+
listVisible: showList,
|
|
44
|
+
detailVisible: showDetail
|
|
45
|
+
});
|
|
46
|
+
const previousSplit = (0, _react.useRef)(showList);
|
|
47
|
+
const split = showDetail ? showList : previousSplit.current;
|
|
48
|
+
const progress = (0, _reactNativeReanimated.useSharedValue)(showDetail ? 1 : 0);
|
|
49
|
+
const reducedMotion = (0, _usePrefersReducedMotion.usePrefersReducedMotion)();
|
|
50
|
+
const generation = (0, _react.useRef)(0);
|
|
51
|
+
const direction = (0, _useIsRtl.useIsRtl)() ? -1 : 1;
|
|
52
|
+
const directionProps = (0, _useIsRtl.useDirectionProps)();
|
|
53
|
+
(0, _react.useLayoutEffect)(() => {
|
|
54
|
+
previousSplit.current = split;
|
|
55
|
+
setRetained(current => ({
|
|
56
|
+
list: showList ? list : current.list,
|
|
57
|
+
detail: showDetail ? detail : current.detail,
|
|
58
|
+
listVisible: showList || current.listVisible,
|
|
59
|
+
detailVisible: showDetail || current.detailVisible
|
|
60
|
+
}));
|
|
61
|
+
}, [list, detail, showList, showDetail, split]);
|
|
62
|
+
const finish = (0, _react.useCallback)((id, keepList, keepDetail) => {
|
|
63
|
+
if (generation.current !== id) return;
|
|
64
|
+
setRetained(current => ({
|
|
65
|
+
list: keepList ? current.list : undefined,
|
|
66
|
+
detail: keepDetail ? current.detail : undefined,
|
|
67
|
+
listVisible: keepList,
|
|
68
|
+
detailVisible: keepDetail
|
|
69
|
+
}));
|
|
70
|
+
}, []);
|
|
71
|
+
(0, _react.useLayoutEffect)(() => {
|
|
72
|
+
const id = ++generation.current;
|
|
73
|
+
const target = showDetail ? 1 : 0;
|
|
74
|
+
if (reducedMotion) {
|
|
75
|
+
progress.value = target;
|
|
76
|
+
finish(id, showList, showDetail);
|
|
77
|
+
} else {
|
|
78
|
+
// Duration springs in Reanimated 3 cap each frame's integrated time at
|
|
79
|
+
// 64ms, then force their target at the wall-clock deadline. Expensive
|
|
80
|
+
// layout frames can therefore end in a large final jump. Timing samples
|
|
81
|
+
// elapsed time directly and never accumulates that integration deficit.
|
|
82
|
+
progress.value = (0, _reactNativeReanimated.withTiming)(target, {
|
|
83
|
+
duration: _recipes.MOTION_RECIPES.expand.duration,
|
|
84
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.cubic),
|
|
85
|
+
// The reactive hook above owns this policy; System is a launch snapshot.
|
|
86
|
+
reduceMotion: _reactNativeReanimated.ReduceMotion.Never
|
|
87
|
+
}, completed => {
|
|
88
|
+
if (completed) (0, _reactNativeReanimated.runOnJS)(finish)(id, showList, showDetail);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return () => {
|
|
92
|
+
(0, _reactNativeReanimated.cancelAnimation)(progress);
|
|
93
|
+
};
|
|
94
|
+
}, [showList, showDetail, progress, reducedMotion, finish]);
|
|
95
|
+
const measure = (0, _react.useCallback)(event => {
|
|
96
|
+
setContainerWidth(event.nativeEvent.layout.width);
|
|
97
|
+
}, []);
|
|
98
|
+
const listStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
99
|
+
width: containerWidth > 0 ? split ? containerWidth - (containerWidth - width) * progress.value : containerWidth : undefined,
|
|
100
|
+
transform: [{
|
|
101
|
+
translateX: split ? 0 : -direction * containerWidth * progress.value
|
|
102
|
+
}]
|
|
103
|
+
}), [containerWidth, width, split, progress, direction]);
|
|
104
|
+
const detailStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
105
|
+
width: containerWidth > 0 ? split ? Math.max(0, containerWidth - width - gap) : containerWidth : undefined,
|
|
106
|
+
transform: [{
|
|
107
|
+
translateX: split ? 0 : direction * containerWidth * (1 - progress.value)
|
|
108
|
+
}]
|
|
109
|
+
}), [containerWidth, width, gap, split, progress, direction]);
|
|
110
|
+
const gapStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
111
|
+
width: gap * progress.value
|
|
112
|
+
}), [gap, progress]);
|
|
113
|
+
const hasList = showList || retained.listVisible;
|
|
114
|
+
const hasDetail = showDetail || retained.detailVisible;
|
|
115
|
+
const inactive = active => ({
|
|
116
|
+
pointerEvents: active ? 'auto' : 'none',
|
|
117
|
+
'aria-hidden': active ? undefined : true,
|
|
118
|
+
importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
|
|
119
|
+
accessibilityElementsHidden: !active,
|
|
120
|
+
...(_reactNative.Platform.OS === 'web' && !active ? {
|
|
121
|
+
inert: true
|
|
122
|
+
} : null)
|
|
123
|
+
});
|
|
124
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
125
|
+
...directionProps,
|
|
126
|
+
onLayout: measure,
|
|
127
|
+
testID: testID ? `${testID}-motion` : undefined,
|
|
128
|
+
style: [{
|
|
129
|
+
flexGrow: 1,
|
|
130
|
+
flexShrink: 1,
|
|
131
|
+
flexBasis: 0,
|
|
132
|
+
minWidth: 0,
|
|
133
|
+
flexDirection: 'row',
|
|
134
|
+
alignItems: 'stretch'
|
|
135
|
+
}, clipStyle],
|
|
136
|
+
children: [hasList ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
137
|
+
...inactive(showList),
|
|
138
|
+
testID: testID ? `${testID}-pane-list` : undefined,
|
|
139
|
+
style: [{
|
|
140
|
+
minWidth: 0,
|
|
141
|
+
flexShrink: 0
|
|
142
|
+
}, !split && !showList ? {
|
|
143
|
+
position: 'absolute',
|
|
144
|
+
top: 0,
|
|
145
|
+
start: 0
|
|
146
|
+
} : null, listStyle],
|
|
147
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.AppShellPaneActiveContext.Provider, {
|
|
148
|
+
value: showList,
|
|
149
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
150
|
+
scroll: paneScroll,
|
|
151
|
+
errorBoundary: listErrorBoundary,
|
|
152
|
+
style: {
|
|
153
|
+
flexGrow: 1
|
|
154
|
+
},
|
|
155
|
+
children: showList ? list : retained.list
|
|
156
|
+
})
|
|
157
|
+
})
|
|
158
|
+
}) : null, split && hasList && hasDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
159
|
+
style: [dividerStyle, gapStyle],
|
|
160
|
+
testID: testID ? `${testID}-list-gap` : undefined,
|
|
161
|
+
children: showList && showDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
162
|
+
pointerEvents: "box-none",
|
|
163
|
+
testID: testID ? `${testID}-resize-anchor` : undefined,
|
|
164
|
+
style: {
|
|
165
|
+
position: 'absolute',
|
|
166
|
+
top: 0,
|
|
167
|
+
bottom: 0,
|
|
168
|
+
left: '50%',
|
|
169
|
+
right: '50%',
|
|
170
|
+
width: 0
|
|
171
|
+
},
|
|
172
|
+
children: resizeHandle
|
|
173
|
+
}) : null
|
|
174
|
+
}) : null, hasDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
175
|
+
...inactive(showDetail),
|
|
176
|
+
testID: testID ? `${testID}-pane-detail` : undefined,
|
|
177
|
+
style: [{
|
|
178
|
+
minWidth: 0,
|
|
179
|
+
flexShrink: 0
|
|
180
|
+
}, !split && !showDetail ? {
|
|
181
|
+
position: 'absolute',
|
|
182
|
+
top: 0,
|
|
183
|
+
start: 0
|
|
184
|
+
} : null, detailStyle],
|
|
185
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.AppShellPaneActiveContext.Provider, {
|
|
186
|
+
value: showDetail,
|
|
187
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SplitPane.SplitPane, {
|
|
188
|
+
scroll: paneScroll,
|
|
189
|
+
errorBoundary: detailErrorBoundary,
|
|
190
|
+
style: {
|
|
191
|
+
flexGrow: 1
|
|
192
|
+
},
|
|
193
|
+
children: showDetail ? detail : retained.detail
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
}) : null]
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=AppShellSplitMotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_useIsRtl","_usePrefersReducedMotion","_recipes","_webViewStyle","_context","_SplitPane","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","clipStyle","overflow","Platform","OS","WEB_OVERFLOW_CLIP","AppShellSplitMotion","list","detail","showList","showDetail","width","gap","paneScroll","listErrorBoundary","detailErrorBoundary","dividerStyle","resizeHandle","testID","containerWidth","setContainerWidth","useState","retained","setRetained","listVisible","detailVisible","previousSplit","useRef","split","current","progress","useSharedValue","reducedMotion","usePrefersReducedMotion","generation","direction","useIsRtl","directionProps","useDirectionProps","useLayoutEffect","finish","useCallback","id","keepList","keepDetail","undefined","target","value","withTiming","duration","MOTION_RECIPES","expand","easing","Easing","out","cubic","reduceMotion","ReduceMotion","Never","completed","runOnJS","cancelAnimation","measure","event","nativeEvent","layout","listStyle","useAnimatedStyle","transform","translateX","detailStyle","Math","max","gapStyle","hasList","hasDetail","inactive","active","pointerEvents","importantForAccessibility","accessibilityElementsHidden","inert","jsxs","View","onLayout","style","flexGrow","flexShrink","flexBasis","minWidth","flexDirection","alignItems","children","jsx","position","top","start","AppShellPaneActiveContext","Provider","SplitPane","scroll","errorBoundary","bottom","left","right"],"sourceRoot":"../../../src","sources":["app-shell/AppShellSplitMotion.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,wBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAAwC,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,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,C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E,CAAC;QAAEI,QAAQ,EAAE,CAAC;QAAEF,UAAU,EAAE;MAAE,CAAC,EAAE,CAAC3D,KAAK,IAAI,CAAClB,UAAU,GAAG;QAAEoF,QAAQ,EAAE,UAAU;QAAEC,GAAG,EAAE,CAAC;QAAEC,KAAK,EAAE;MAAE,CAAC,GAAG,IAAI,EAAE1B,WAAW,CAAE;MAAAsB,QAAA,eAChI,IAAA/G,WAAA,CAAAgH,GAAA,EAAClH,QAAA,CAAAsH,yBAAyB,CAACC,QAAQ;QAACnD,KAAK,EAAErC,UAAW;QAAAkF,QAAA,eACpD,IAAA/G,WAAA,CAAAgH,GAAA,EAACjH,UAAA,CAAAuH,SAAS;UAACC,MAAM,EAAEvF,UAAW;UAACwF,aAAa,EAAEtF,mBAAoB;UAACsE,KAAK,EAAE;YAAEC,QAAQ,EAAE;UAAE,CAAE;UAAAM,QAAA,EACvFlF,UAAU,GAAGF,MAAM,GAAGc,QAAQ,CAACd;QAAM,CAC7B;MAAC,CACsB;IAAC,CACxB,CAAC,GAAG,IAAI;EAAA,CACnB,CAAC;AACT","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SplitPane = SplitPane;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _PanelErrorBoundary = require("../error-boundary/PanelErrorBoundary.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/** One pane: a bounded column that scrolls its own overflow. */
|
|
13
|
+
function SplitPane({
|
|
14
|
+
children,
|
|
15
|
+
scroll,
|
|
16
|
+
errorBoundary,
|
|
17
|
+
style,
|
|
18
|
+
testID
|
|
19
|
+
}) {
|
|
20
|
+
const content = scroll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
21
|
+
style: {
|
|
22
|
+
flex: 1
|
|
23
|
+
},
|
|
24
|
+
contentContainerStyle: {
|
|
25
|
+
flexGrow: 1
|
|
26
|
+
},
|
|
27
|
+
children: children
|
|
28
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
29
|
+
style: {
|
|
30
|
+
flex: 1,
|
|
31
|
+
minHeight: 0
|
|
32
|
+
},
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
36
|
+
testID: testID,
|
|
37
|
+
style: [{
|
|
38
|
+
minWidth: 0,
|
|
39
|
+
alignSelf: 'stretch'
|
|
40
|
+
}, style],
|
|
41
|
+
children: errorBoundary === false ? content : /*#__PURE__*/(0, _jsxRuntime.jsx)(_PanelErrorBoundary.PanelErrorBoundary, {
|
|
42
|
+
...errorBoundary,
|
|
43
|
+
children: content
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=SplitPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_PanelErrorBoundary","_jsxRuntime","e","__esModule","default","SplitPane","children","scroll","errorBoundary","style","testID","content","jsx","ScrollView","flex","contentContainerStyle","flexGrow","View","minHeight","minWidth","alignSelf","PanelErrorBoundary"],"sourceRoot":"../../../src","sources":["app-shell/SplitPane.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAA0E,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG1E;AACO,SAASG,SAASA,CAAC;EACxBC,QAAQ;EACRC,MAAM;EACNC,aAAa;EACbC,KAAK;EACLC;AAOF,CAAC,EAAE;EACD,MAAMC,OAAO,GAAGJ,MAAM,gBACpB,IAAAN,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAc,UAAU;IAACJ,KAAK,EAAE;MAAEK,IAAI,EAAE;IAAE,CAAE;IAACC,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IAAAV,QAAA,EACpEA;EAAQ,CACC,CAAC,gBACX,IAAAL,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAkB,IAAI;IAACR,KAAK,EAAE;MAAEK,IAAI,EAAE,CAAC;MAAEI,SAAS,EAAE;IAAE,CAAE;IAAAZ,QAAA,EAAEA;EAAQ,CAAO,CAAC;EAC7D,oBACE,IAAAL,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAkB,IAAI;IAACP,MAAM,EAAEA,MAAO;IAACD,KAAK,EAAE,CAAC;MAAEU,QAAQ,EAAE,CAAC;MAAEC,SAAS,EAAE;IAAU,CAAC,EAAEX,KAAK,CAAE;IAAAH,QAAA,EACzEE,aAAa,KAAK,KAAK,GAAGG,OAAO,gBAAG,IAAAV,WAAA,CAAAW,GAAA,EAACZ,mBAAA,CAAAqB,kBAAkB;MAAA,GAAKb,aAAa;MAAAF,QAAA,EAAGK;IAAO,CAAqB;EAAC,CACtG,CAAC;AAEX","ignoreList":[]}
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.AppShellProvider = void 0;
|
|
6
|
+
exports.AppShellProvider = exports.AppShellPaneActiveContext = void 0;
|
|
7
7
|
exports.useAppShell = useAppShell;
|
|
8
|
+
exports.useAppShellPaneActive = useAppShellPaneActive;
|
|
8
9
|
exports.useOptionalAppShell = useOptionalAppShell;
|
|
9
10
|
var _react = require("react");
|
|
10
11
|
/**
|
|
@@ -27,4 +28,11 @@ function useAppShell() {
|
|
|
27
28
|
function useOptionalAppShell() {
|
|
28
29
|
return (0, _react.useContext)(AppShellContext);
|
|
29
30
|
}
|
|
31
|
+
|
|
32
|
+
/** Logical pane visibility, including while its exit animation is retained. */
|
|
33
|
+
const AppShellPaneActiveContext = exports.AppShellPaneActiveContext = /*#__PURE__*/(0, _react.createContext)(true);
|
|
34
|
+
/** Suspend pane-local global shortcuts/effects as soon as a pane is hidden. */
|
|
35
|
+
function useAppShellPaneActive() {
|
|
36
|
+
return (0, _react.useContext)(AppShellPaneActiveContext);
|
|
37
|
+
}
|
|
30
38
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","AppShellContext","createContext","displayName","AppShellProvider","exports","Provider","useAppShell","value","useContext","Error","useOptionalAppShell"],"sourceRoot":"../../../src","sources":["app-shell/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_react","require","AppShellContext","createContext","displayName","AppShellProvider","exports","Provider","useAppShell","value","useContext","Error","useOptionalAppShell","AppShellPaneActiveContext","useAppShellPaneActive"],"sourceRoot":"../../../src","sources":["app-shell/context.ts"],"mappings":";;;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAJA;AACA;AACA;AACA;;AAgBA,MAAMC,eAAe,gBAAG,IAAAC,oBAAa,EAA8B,IAAI,CAAC;AACxED,eAAe,CAACE,WAAW,GAAG,sBAAsB;AAE7C,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGH,eAAe,CAACK,QAAQ;;AAExD;AACO,SAASC,WAAWA,CAAA,EAAyB;EAClD,MAAMC,KAAK,GAAG,IAAAC,iBAAU,EAACR,eAAe,CAAC;EACzC,IAAI,CAACO,KAAK,EAAE,MAAM,IAAIE,KAAK,CAAC,gDAAgD,CAAC;EAC7E,OAAOF,KAAK;AACd;;AAEA;AACO,SAASG,mBAAmBA,CAAA,EAAgC;EACjE,OAAO,IAAAF,iBAAU,EAACR,eAAe,CAAC;AACpC;;AAEA;AACO,MAAMW,yBAAyB,GAAAP,OAAA,CAAAO,yBAAA,gBAAG,IAAAV,oBAAa,EAAC,IAAI,CAAC;AAC5D;AACO,SAASW,qBAAqBA,CAAA,EAAY;EAC/C,OAAO,IAAAJ,iBAAU,EAACG,yBAAyB,CAAC;AAC9C","ignoreList":[]}
|
|
@@ -46,6 +46,12 @@ Object.defineProperty(exports, "useAppShell", {
|
|
|
46
46
|
return _context.useAppShell;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
+
Object.defineProperty(exports, "useAppShellPaneActive", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return _context.useAppShellPaneActive;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
49
55
|
var _AppShell = require("./AppShell.js");
|
|
50
56
|
var _bottomBar = require("../bottom-bar");
|
|
51
57
|
var _fab = require("../fab");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_AppShell","require","_bottomBar","_fab","_contentPanel","_colorScope","_AppShellHeader","_AppShellMenuButton","_constants","_context","_NotificationBell","_ProOfferCard","_AppShellSplit","AppShell","exports","createAppShell","BottomBar","Fab","ContentPanel","BloomColorScope"],"sourceRoot":"../../../src","sources":["app-shell/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_AppShell","require","_bottomBar","_fab","_contentPanel","_colorScope","_AppShellHeader","_AppShellMenuButton","_constants","_context","_NotificationBell","_ProOfferCard","_AppShellSplit","AppShell","exports","createAppShell","BottomBar","Fab","ContentPanel","BloomColorScope"],"sourceRoot":"../../../src","sources":["app-shell/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,IAAAK,eAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AAkBA,IAAAW,cAAA,GAAAX,OAAA;AAzBO,MAAMY,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAAE,wBAAc,EAACC,oBAAS,EAAEC,QAAG,EAAEC,0BAAY,EAAEC,2BAAe,CAAC","ignoreList":[]}
|