@oxy.so/bloom 7.2.0 → 7.4.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 +15 -15
- package/docs/app-shell.mdx +22 -0
- package/docs/appearance.mdx +1 -1
- package/docs/card.mdx +14 -0
- package/docs/chip.mdx +5 -0
- package/docs/content-panel.mdx +22 -0
- package/docs/error-boundary.mdx +35 -0
- package/docs/mail-thread.mdx +9 -1
- package/docs/settings-modal.mdx +5 -0
- package/lib/commonjs/app-shell/AppShellSplit.js +26 -14
- package/lib/commonjs/app-shell/AppShellSplit.js.map +1 -1
- package/lib/commonjs/card/Card.js +6 -2
- package/lib/commonjs/card/Card.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +51 -7
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/content-panel/ContentPanel.js +16 -8
- package/lib/commonjs/content-panel/ContentPanel.js.map +1 -1
- package/lib/commonjs/content-panel/ContentPanel.web.js +18 -8
- package/lib/commonjs/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/commonjs/error-boundary/ErrorBoundary.js +10 -0
- package/lib/commonjs/error-boundary/ErrorBoundary.js.map +1 -1
- package/lib/commonjs/error-boundary/PanelErrorBoundary.js +64 -0
- package/lib/commonjs/error-boundary/PanelErrorBoundary.js.map +1 -0
- package/lib/commonjs/error-boundary/index.js +7 -0
- package/lib/commonjs/error-boundary/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +7 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/mail-thread/MailMessage.js +1 -1
- package/lib/commonjs/mail-thread/MailMessage.js.map +1 -1
- package/lib/commonjs/mail-thread/MailThread.js +3 -4
- package/lib/commonjs/mail-thread/MailThread.js.map +1 -1
- package/lib/commonjs/mail-thread/shared.js +3 -3
- package/lib/commonjs/mail-thread/shared.js.map +1 -1
- package/lib/commonjs/settings-modal/SettingsPlanCard.js +11 -7
- package/lib/commonjs/settings-modal/SettingsPlanCard.js.map +1 -1
- package/lib/module/app-shell/AppShellSplit.js +26 -14
- package/lib/module/app-shell/AppShellSplit.js.map +1 -1
- package/lib/module/card/Card.js +6 -2
- package/lib/module/card/Card.js.map +1 -1
- package/lib/module/chip/Chip.js +51 -7
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/content-panel/ContentPanel.js +17 -9
- package/lib/module/content-panel/ContentPanel.js.map +1 -1
- package/lib/module/content-panel/ContentPanel.web.js +19 -9
- package/lib/module/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/module/error-boundary/ErrorBoundary.js +10 -0
- package/lib/module/error-boundary/ErrorBoundary.js.map +1 -1
- package/lib/module/error-boundary/PanelErrorBoundary.js +59 -0
- package/lib/module/error-boundary/PanelErrorBoundary.js.map +1 -0
- package/lib/module/error-boundary/index.js +1 -0
- package/lib/module/error-boundary/index.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/mail-thread/MailMessage.js +1 -1
- package/lib/module/mail-thread/MailMessage.js.map +1 -1
- package/lib/module/mail-thread/MailThread.js +1 -2
- package/lib/module/mail-thread/MailThread.js.map +1 -1
- package/lib/module/mail-thread/shared.js +3 -3
- package/lib/module/mail-thread/shared.js.map +1 -1
- package/lib/module/settings-modal/SettingsPlanCard.js +7 -3
- package/lib/module/settings-modal/SettingsPlanCard.js.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellSplit.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +5 -0
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/card/Card.d.ts.map +1 -1
- package/lib/typescript/commonjs/card/types.d.ts +5 -5
- package/lib/typescript/commonjs/card/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/ContentPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/types.d.ts +10 -0
- package/lib/typescript/commonjs/content-panel/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/error-boundary/ErrorBoundary.d.ts +1 -0
- package/lib/typescript/commonjs/error-boundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/typescript/commonjs/error-boundary/PanelErrorBoundary.d.ts +4 -0
- package/lib/typescript/commonjs/error-boundary/PanelErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/error-boundary/index.d.ts +2 -1
- package/lib/typescript/commonjs/error-boundary/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/error-boundary/types.d.ts +16 -0
- package/lib/typescript/commonjs/error-boundary/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-thread/MailThread.d.ts.map +1 -1
- package/lib/typescript/commonjs/mail-thread/shared.d.ts +2 -2
- package/lib/typescript/commonjs/mail-thread/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/note-card/shared.d.ts +1 -1
- package/lib/typescript/commonjs/note-card/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/SettingsPlanCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-modal/types.d.ts +3 -0
- package/lib/typescript/commonjs/settings-modal/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellSplit.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +5 -0
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/card/Card.d.ts.map +1 -1
- package/lib/typescript/module/card/types.d.ts +5 -5
- package/lib/typescript/module/card/types.d.ts.map +1 -1
- package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/ContentPanel.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/types.d.ts +10 -0
- package/lib/typescript/module/content-panel/types.d.ts.map +1 -1
- package/lib/typescript/module/error-boundary/ErrorBoundary.d.ts +1 -0
- package/lib/typescript/module/error-boundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/typescript/module/error-boundary/PanelErrorBoundary.d.ts +4 -0
- package/lib/typescript/module/error-boundary/PanelErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/error-boundary/index.d.ts +2 -1
- package/lib/typescript/module/error-boundary/index.d.ts.map +1 -1
- package/lib/typescript/module/error-boundary/types.d.ts +16 -0
- package/lib/typescript/module/error-boundary/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/mail-thread/MailThread.d.ts.map +1 -1
- package/lib/typescript/module/mail-thread/shared.d.ts +2 -2
- package/lib/typescript/module/mail-thread/shared.d.ts.map +1 -1
- package/lib/typescript/module/note-card/shared.d.ts +1 -1
- package/lib/typescript/module/note-card/shared.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/SettingsPlanCard.d.ts.map +1 -1
- package/lib/typescript/module/settings-modal/types.d.ts +3 -0
- package/lib/typescript/module/settings-modal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app-shell/AppShellSplit.tsx +16 -7
- package/src/app-shell/types.ts +5 -0
- package/src/card/Card.tsx +6 -2
- package/src/card/types.ts +5 -5
- package/src/chip/Chip.tsx +26 -5
- package/src/content-panel/ContentPanel.tsx +16 -11
- package/src/content-panel/ContentPanel.web.tsx +16 -10
- package/src/content-panel/types.ts +10 -0
- package/src/error-boundary/ErrorBoundary.tsx +6 -0
- package/src/error-boundary/PanelErrorBoundary.tsx +38 -0
- package/src/error-boundary/index.ts +3 -0
- package/src/error-boundary/types.ts +18 -0
- package/src/index.ts +3 -1
- package/src/index.web.ts +3 -1
- package/src/mail-thread/MailMessage.tsx +1 -1
- package/src/mail-thread/MailThread.tsx +0 -2
- package/src/mail-thread/shared.ts +3 -3
- package/src/note-card/shared.ts +1 -1
- package/src/settings-modal/SettingsPlanCard.tsx +2 -0
- package/src/settings-modal/types.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/settings-modal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE7D,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;AAMvD,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK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AAE,KAAK,IAAI,CAAC;IAC5C,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,SAAS,CAAC;IAChF,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@ import React, { memo, useCallback, useRef, useState } from 'react';
|
|
|
18
18
|
import { ScrollView, View } from 'react-native';
|
|
19
19
|
|
|
20
20
|
import { AiChatResizeHandle } from '../ai-chat/AiChatResizeHandle';
|
|
21
|
+
import { PanelErrorBoundary } from '../error-boundary/PanelErrorBoundary';
|
|
22
|
+
import type { PanelErrorBoundaryOptions } from '../error-boundary/types';
|
|
21
23
|
import { Z_INDEX } from '../styles/z-index';
|
|
22
24
|
import { space } from '../styles/tokens';
|
|
23
25
|
import { useTheme } from '../theme/use-theme';
|
|
@@ -31,29 +33,33 @@ import { APP_SHELL_DEFAULTS as D } from './constants';
|
|
|
31
33
|
function Pane({
|
|
32
34
|
children,
|
|
33
35
|
scroll,
|
|
36
|
+
errorBoundary,
|
|
34
37
|
style,
|
|
35
38
|
testID,
|
|
36
39
|
}: {
|
|
37
40
|
children: React.ReactNode;
|
|
38
41
|
scroll: boolean;
|
|
42
|
+
errorBoundary?: false | PanelErrorBoundaryOptions;
|
|
39
43
|
style: React.ComponentProps<typeof View>['style'];
|
|
40
44
|
testID?: string;
|
|
41
45
|
}) {
|
|
46
|
+
const content = scroll ? (
|
|
47
|
+
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ flexGrow: 1 }}>
|
|
48
|
+
{children}
|
|
49
|
+
</ScrollView>
|
|
50
|
+
) : <View style={{ flex: 1, minHeight: 0 }}>{children}</View>;
|
|
42
51
|
return (
|
|
43
52
|
<View testID={testID} style={[{ minWidth: 0, alignSelf: 'stretch' }, style]}>
|
|
44
|
-
{
|
|
45
|
-
<ScrollView style={{ flex: 1 }} contentContainerStyle={{ flexGrow: 1 }}>
|
|
46
|
-
{children}
|
|
47
|
-
</ScrollView>
|
|
48
|
-
) : (
|
|
49
|
-
<View style={{ flex: 1, minHeight: 0 }}>{children}</View>
|
|
50
|
-
)}
|
|
53
|
+
{errorBoundary === false ? content : <PanelErrorBoundary {...errorBoundary}>{content}</PanelErrorBoundary>}
|
|
51
54
|
</View>
|
|
52
55
|
);
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
const AppShellSplitPanesComponent: React.FC<AppShellSplitPanesProps> = ({
|
|
56
59
|
variant = 'joined',
|
|
60
|
+
listErrorBoundary,
|
|
61
|
+
detailErrorBoundary,
|
|
62
|
+
infoErrorBoundary,
|
|
57
63
|
list,
|
|
58
64
|
detail,
|
|
59
65
|
info,
|
|
@@ -120,6 +126,7 @@ const AppShellSplitPanesComponent: React.FC<AppShellSplitPanesProps> = ({
|
|
|
120
126
|
{showList ? (
|
|
121
127
|
<Pane
|
|
122
128
|
testID={testID ? `${testID}-pane-list` : undefined}
|
|
129
|
+
errorBoundary={listErrorBoundary}
|
|
123
130
|
scroll={paneScroll}
|
|
124
131
|
style={solo ? { flexGrow: 1, flexShrink: 1, flexBasis: 0 } : { width, flexShrink: 0 }}
|
|
125
132
|
>
|
|
@@ -148,6 +155,7 @@ const AppShellSplitPanesComponent: React.FC<AppShellSplitPanesProps> = ({
|
|
|
148
155
|
{showDetail ? (
|
|
149
156
|
<Pane
|
|
150
157
|
testID={testID ? `${testID}-pane-detail` : undefined}
|
|
158
|
+
errorBoundary={detailErrorBoundary}
|
|
151
159
|
scroll={paneScroll}
|
|
152
160
|
style={{ flexGrow: 1, flexShrink: 1, flexBasis: 0 }}
|
|
153
161
|
>
|
|
@@ -158,6 +166,7 @@ const AppShellSplitPanesComponent: React.FC<AppShellSplitPanesProps> = ({
|
|
|
158
166
|
{showInfo ? (
|
|
159
167
|
<Pane
|
|
160
168
|
testID={testID ? `${testID}-pane-info` : undefined}
|
|
169
|
+
errorBoundary={infoErrorBoundary}
|
|
161
170
|
scroll={paneScroll}
|
|
162
171
|
style={solo ? { flexGrow: 1, flexShrink: 1, flexBasis: 0 } : { width: infoWidth, flexShrink: 0 }}
|
|
163
172
|
>
|
package/src/app-shell/types.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AppColorName } from '../theme/color-presets';
|
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import type { PanelErrorBoundaryOptions } from '../error-boundary/types';
|
|
5
6
|
import type { ContentPanelFramedBreakpoint } from '../content-panel/types';
|
|
6
7
|
import type { NotificationCenterItem, NotificationCenterTab } from '../notification-center/types';
|
|
7
8
|
import type { SidebarProps } from '../sidebar/types';
|
|
@@ -387,6 +388,10 @@ export type AppShellProps = Omit<AppShellEngineProps, 'scroll'> & AppShellNaviga
|
|
|
387
388
|
|
|
388
389
|
/** A bounded list/detail/info layout, independent of navigation or surfaces. */
|
|
389
390
|
export interface AppShellSplitPanesProps {
|
|
391
|
+
/** Each visible pane isolates render errors by default. false delegates to an outer boundary. */
|
|
392
|
+
listErrorBoundary?: false | PanelErrorBoundaryOptions;
|
|
393
|
+
detailErrorBoundary?: false | PanelErrorBoundaryOptions;
|
|
394
|
+
infoErrorBoundary?: false | PanelErrorBoundaryOptions;
|
|
390
395
|
/** Joined uses hairline dividers (default); separated leaves a 12px gutter for independent panel surfaces. */
|
|
391
396
|
variant?: 'joined' | 'separated';
|
|
392
397
|
list?: ReactNode;
|
package/src/card/Card.tsx
CHANGED
|
@@ -38,6 +38,7 @@ import { bloomShadowStyle } from '../design-tokens/shadows';
|
|
|
38
38
|
import { useInteractionState } from '../hooks/use-interaction-state';
|
|
39
39
|
import { StyledPressable, StyledView } from '../styles/styled-primitives';
|
|
40
40
|
import { space } from '../styles/tokens';
|
|
41
|
+
import { usePanelShape } from '../styles/panel-chrome';
|
|
41
42
|
import type {
|
|
42
43
|
CardProps,
|
|
43
44
|
CardBorder,
|
|
@@ -75,7 +76,7 @@ const CardRootComponent = React.forwardRef<View, CardProps>(function CardRootCom
|
|
|
75
76
|
appearance: appearanceProp,
|
|
76
77
|
tone: toneProp,
|
|
77
78
|
radius,
|
|
78
|
-
cornerCurve
|
|
79
|
+
cornerCurve: cornerCurveProp,
|
|
79
80
|
clipContent = false,
|
|
80
81
|
contentStyle,
|
|
81
82
|
elevation,
|
|
@@ -92,7 +93,10 @@ const CardRootComponent = React.forwardRef<View, CardProps>(function CardRootCom
|
|
|
92
93
|
const theme = useTheme();
|
|
93
94
|
const layer = useSurfaceLayer();
|
|
94
95
|
const parentLevel = useSurfaceLevelValue();
|
|
95
|
-
const
|
|
96
|
+
const panelShape = usePanelShape();
|
|
97
|
+
const cornerCurve = cornerCurveProp ?? (radius === 'panel' ? panelShape.curve : SURFACE_SHAPES.card.curve);
|
|
98
|
+
const explicitRadius = radius === 'panel' ? panelShape.radius : radius ? RADIUS[radius] : undefined;
|
|
99
|
+
const resolvedGeometry = resolveSurfaceGeometry(explicitRadius, style, RADIUS['radius-12'], cornerCurve);
|
|
96
100
|
const appearance = appearanceProp ?? 'solid';
|
|
97
101
|
const {tone} = useBloomAppearance({tone: toneProp}, {size: 'md', tone: 'neutral'});
|
|
98
102
|
const paint = resolveBloomColors(theme.colors, tone, appearance);
|
package/src/card/types.ts
CHANGED
|
@@ -15,11 +15,11 @@ import type { ShadowRole } from '../design-tokens/shadows';
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* A rung of the `RADIUS` scale
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* A rung of the `RADIUS` scale, or `panel` to inherit BloomScope.panelRadius
|
|
19
|
+
* and the shared circular panel curve. Other cards retain the fixed radius
|
|
20
|
+
* scale, so their geometry does not change with the workspace setting.
|
|
21
21
|
*/
|
|
22
|
-
export type CardRadius = keyof typeof RADIUS;
|
|
22
|
+
export type CardRadius = keyof typeof RADIUS | 'panel';
|
|
23
23
|
|
|
24
24
|
/** Elevation role, or none. Resolved through `bloomShadowStyle`, which owns the platform split. */
|
|
25
25
|
export type CardElevation = 'none' | ShadowRole;
|
|
@@ -44,7 +44,7 @@ export interface CardProps {
|
|
|
44
44
|
/** Preset background + border + elevation. Default `solid` with small elevation. */
|
|
45
45
|
appearance?: BloomAppearance;
|
|
46
46
|
tone?: BloomTone;
|
|
47
|
-
/** Corner rung.
|
|
47
|
+
/** Corner rung, or panel to inherit BloomScope.panelRadius and the shared circular curve. Default radius-12. */
|
|
48
48
|
radius?: CardRadius;
|
|
49
49
|
/** Platform-adaptive curve. radius-max remains circular. */
|
|
50
50
|
cornerCurve?: CornerCurve;
|
package/src/chip/Chip.tsx
CHANGED
|
@@ -84,6 +84,15 @@ const BLOOM_CHIP_CSS = interactiveWebCss({
|
|
|
84
84
|
hover: { declarations: 'opacity: 0.9;' },
|
|
85
85
|
outlineOffset: 2,
|
|
86
86
|
extraRules: `
|
|
87
|
+
/* The removable pill contains two sibling controls. Draw one exterior focus ring. */
|
|
88
|
+
[data-bloom-chip-group]:has(:focus-visible) {
|
|
89
|
+
outline: 2px solid var(--bloom-chip-ring);
|
|
90
|
+
outline-offset: 2px;
|
|
91
|
+
}
|
|
92
|
+
[data-bloom-chip-group] [data-bloom-chip]:focus-visible {
|
|
93
|
+
outline: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
87
96
|
/* The rung with a minWidth ("Any", "1", "8+" in a counts row) centres its
|
|
88
97
|
label. The style prop cannot say so: the reset above is an adopted sheet and
|
|
89
98
|
wins over react-native-web's atomic classes, so it has to be said here too. */
|
|
@@ -214,7 +223,9 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
214
223
|
const removeLabel = closeLabel ?? (typeof children === 'string' ? `Remove ${children}` : 'Remove');
|
|
215
224
|
const closeButton = onClose ? (
|
|
216
225
|
<Pressable
|
|
217
|
-
onPress={onClose}
|
|
226
|
+
onPress={(event) => { event.stopPropagation(); onClose(); }}
|
|
227
|
+
disabled={disabled}
|
|
228
|
+
aria-disabled={disabled || undefined}
|
|
218
229
|
hitSlop={{ top: 6, bottom: 6, left: 6, right: 6 }}
|
|
219
230
|
accessibilityLabel={removeLabel}
|
|
220
231
|
accessibilityRole="button"
|
|
@@ -235,7 +246,6 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
235
246
|
children
|
|
236
247
|
)}
|
|
237
248
|
{endIcon != null ? <View style={iconSlotStyle}>{endIcon}</View> : null}
|
|
238
|
-
{closeButton}
|
|
239
249
|
</>
|
|
240
250
|
);
|
|
241
251
|
|
|
@@ -256,9 +266,9 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
256
266
|
? { accessibilityState: { selected, disabled }, 'aria-selected': selected }
|
|
257
267
|
: { accessibilityState: { disabled, selected }, 'aria-pressed': selected };
|
|
258
268
|
|
|
259
|
-
|
|
269
|
+
const button = (
|
|
260
270
|
<StyledPressable
|
|
261
|
-
className={className}
|
|
271
|
+
className={onClose ? undefined : className}
|
|
262
272
|
ref={ref}
|
|
263
273
|
// The DOM hook the adopted sheet above hangs off.
|
|
264
274
|
//
|
|
@@ -286,7 +296,7 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
286
296
|
...(onKeyDown ? { onKeyDown } : null),
|
|
287
297
|
} as Record<string, unknown>)
|
|
288
298
|
: {})}
|
|
289
|
-
style={[
|
|
299
|
+
style={onClose ? { flexGrow: 1, flexShrink: 1, alignSelf: 'stretch', flexDirection: 'row', alignItems: 'center', gap: geometry.iconGap, borderWidth: 0, backgroundColor: 'transparent', padding: 0, minWidth: 0 } : [
|
|
290
300
|
containerStyle,
|
|
291
301
|
disabled && { opacity: 0.5 },
|
|
292
302
|
hovered && !disabled && paint.hoveredBorder ? { borderColor: paint.hoveredBorder } : null,
|
|
@@ -312,6 +322,16 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
312
322
|
{content}
|
|
313
323
|
</StyledPressable>
|
|
314
324
|
);
|
|
325
|
+
if (!onClose) return button;
|
|
326
|
+
// Selection and removal are sibling controls, never nested buttons.
|
|
327
|
+
// The shared outer pill owns layout classes and paint; the ref still targets selection.
|
|
328
|
+
return <StyledView
|
|
329
|
+
className={className}
|
|
330
|
+
{...(IS_WEB ? { dataSet: { bloomChipGroup: '' } } : {})}
|
|
331
|
+
style={[containerStyle, disabled && { opacity: 0.5 },
|
|
332
|
+
hovered && !disabled && paint.hoveredBorder ? { borderColor: paint.hoveredBorder } : null,
|
|
333
|
+
pressed && !disabled && { backgroundColor: paint.pressedBackground }, style]}
|
|
334
|
+
>{button}{closeButton}</StyledView>;
|
|
315
335
|
}
|
|
316
336
|
|
|
317
337
|
return (
|
|
@@ -323,6 +343,7 @@ const ChipComponent = forwardRef<View, ChipProps>(function ChipComponent(
|
|
|
323
343
|
testID={testID}
|
|
324
344
|
>
|
|
325
345
|
{content}
|
|
346
|
+
{closeButton}
|
|
326
347
|
</StyledView>
|
|
327
348
|
);
|
|
328
349
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PanelErrorBoundary } from '../error-boundary/PanelErrorBoundary';
|
|
1
2
|
import { resolveSurfaceMaterial } from '../surface/resolve-surface-material';
|
|
2
3
|
/**
|
|
3
4
|
* Native variant of `ContentPanel` — the framed app-content surface.
|
|
@@ -37,7 +38,7 @@ import { StyleSheet, useWindowDimensions } from 'react-native';
|
|
|
37
38
|
import { useOptionalPanelChrome, usePanelShape } from '../styles/panel-chrome';
|
|
38
39
|
import { surfaceStyle as resolveShapeStyle } from '../shapes/surface-style';
|
|
39
40
|
import { StyledView } from '../styles/styled-primitives';
|
|
40
|
-
import { SurfaceLevelProvider, surfaceFillVars, useOptionalSurfaceFill } from '../styles/surface-levels';
|
|
41
|
+
import { SurfaceLevelProvider, surfaceFillVars, useOptionalSurfaceFill, useSurfaceLevelValue } from '../styles/surface-levels';
|
|
41
42
|
import {
|
|
42
43
|
ContentPanelNestingContext,
|
|
43
44
|
useContentPanelNestingGuard,
|
|
@@ -78,6 +79,8 @@ const RESPONSIVE_CONTENT: Record<ContentPanelFramedBreakpoint, string> = {
|
|
|
78
79
|
|
|
79
80
|
const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
80
81
|
children,
|
|
82
|
+
errorBoundary = false,
|
|
83
|
+
appearance = 'solid',
|
|
81
84
|
framed,
|
|
82
85
|
framedFrom = 768,
|
|
83
86
|
fill = false,
|
|
@@ -98,8 +101,10 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
98
101
|
const defaultFill = rawFill;
|
|
99
102
|
const { width } = useWindowDimensions();
|
|
100
103
|
const parentFill = useOptionalSurfaceFill();
|
|
101
|
-
const
|
|
102
|
-
const
|
|
104
|
+
const parentLevel = useSurfaceLevelValue();
|
|
105
|
+
const isPlain = appearance === 'plain';
|
|
106
|
+
const paintsSurface = !isPlain && Boolean(defaultFill) && parentFill !== undefined && (framed ?? width >= framedFrom) && chrome !== 'none';
|
|
107
|
+
const publishedFill = isPlain ? parentFill : rawFill && paintsSurface ? resolveSurfaceMaterial({ fill: rawFill, parentFill: parentFill! }).publishedFill : rawFill;
|
|
103
108
|
const radius = StyleSheet.flatten(surfaceStyle)?.borderRadius ?? panelShape.radius;
|
|
104
109
|
const isFramed = framed ?? width >= framedFrom;
|
|
105
110
|
const geometry = { ...resolveShapeStyle({ curve: panelShape.curve }), borderRadius: isFramed ? radius : 0 };
|
|
@@ -111,18 +116,18 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
111
116
|
// (the breakpoint bundle lives whole in `RESPONSIVE_SURFACE`; `framed ===
|
|
112
117
|
// true`/`false` ignore `framedFrom` for fixed always/never framing).
|
|
113
118
|
const surfaceBase =
|
|
114
|
-
chrome === 'none'
|
|
119
|
+
isPlain || chrome === 'none'
|
|
115
120
|
? 'flex-1'
|
|
116
121
|
: framed === undefined
|
|
117
122
|
? `flex-1 ${RESPONSIVE_SURFACE[framedFrom]}`
|
|
118
123
|
: framed
|
|
119
124
|
? 'flex-1 border border-border'
|
|
120
125
|
: 'flex-1';
|
|
121
|
-
const surfaceClass = [surfaceBase, fill ? 'min-h-0' : '', surfaceClassName ?? (paintsSurface ? 'bg-transparent' : 'bg-card')].filter(Boolean).join(' ');
|
|
126
|
+
const surfaceClass = [surfaceBase, fill ? 'min-h-0' : '', surfaceClassName ?? (isPlain || paintsSurface ? 'bg-transparent' : 'bg-card')].filter(Boolean).join(' ');
|
|
122
127
|
// Native has no overlays: the surface itself carries the edge. `none` drops
|
|
123
128
|
// both, `border` keeps the class-drawn hairline, `elevated` adds the lift.
|
|
124
129
|
const chromeStyle =
|
|
125
|
-
!isFramed || chrome === 'none' || chrome === 'border'
|
|
130
|
+
!isFramed || isPlain || chrome === 'none' || chrome === 'border'
|
|
126
131
|
? null
|
|
127
132
|
: shadow || panelChrome
|
|
128
133
|
? { boxShadow: shadow ?? panelChrome?.shadow }
|
|
@@ -147,15 +152,15 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
147
152
|
geometry,
|
|
148
153
|
chromeStyle,
|
|
149
154
|
surfaceStyle,
|
|
150
|
-
paintsSurface ? { backgroundColor: 'transparent' } : null,
|
|
155
|
+
isPlain || paintsSurface ? { backgroundColor: 'transparent' } : null,
|
|
151
156
|
]}
|
|
152
157
|
>
|
|
153
158
|
{paintsSurface ? <SurfacePaint fill={defaultFill!} radius={radius} shape={{ curve: panelShape.curve }} /> : null}
|
|
154
159
|
<StyledView testID="content-panel-content" className={contentClass} style={[geometry, contentStyle]}>
|
|
155
|
-
{/*
|
|
156
|
-
|
|
157
|
-
<SurfaceLevelProvider level={1} fill={publishedFill}>
|
|
158
|
-
{children}
|
|
160
|
+
{/* Solid panels publish their painted surface. Plain panels preserve
|
|
161
|
+
the enclosing surface so descendant scrims follow its real fill. */}
|
|
162
|
+
<SurfaceLevelProvider level={isPlain ? parentLevel : 1} fill={publishedFill}>
|
|
163
|
+
{errorBoundary === false ? children : <PanelErrorBoundary {...(errorBoundary === true ? {} : errorBoundary)}>{children}</PanelErrorBoundary>}
|
|
159
164
|
</SurfaceLevelProvider>
|
|
160
165
|
</StyledView>
|
|
161
166
|
</StyledView>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PanelErrorBoundary } from '../error-boundary/PanelErrorBoundary';
|
|
1
2
|
import { resolveSurfaceMaterial } from '../surface/resolve-surface-material';
|
|
2
3
|
/**
|
|
3
4
|
* Web variant of `ContentPanel` — the framed app-content surface.
|
|
@@ -96,7 +97,7 @@ import { surfaceStyle as resolveShapeStyle } from '../shapes/surface-style';
|
|
|
96
97
|
import { StyledView } from '../styles/styled-primitives';
|
|
97
98
|
|
|
98
99
|
import { useOptionalPanelChrome, usePanelShape } from '../styles/panel-chrome';
|
|
99
|
-
import { SurfaceLevelProvider, surfaceFillVars, useOptionalSurfaceFill } from '../styles/surface-levels';
|
|
100
|
+
import { SurfaceLevelProvider, surfaceFillVars, useOptionalSurfaceFill, useSurfaceLevelValue } from '../styles/surface-levels';
|
|
100
101
|
import { useTheme } from '../theme/use-theme';
|
|
101
102
|
import {
|
|
102
103
|
ContentPanelNestingContext,
|
|
@@ -171,6 +172,8 @@ const PANEL_INSET_CSS = `
|
|
|
171
172
|
|
|
172
173
|
const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
173
174
|
children,
|
|
175
|
+
errorBoundary = false,
|
|
176
|
+
appearance = 'solid',
|
|
174
177
|
framed,
|
|
175
178
|
framedFrom = 768,
|
|
176
179
|
fill = false,
|
|
@@ -209,8 +212,10 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
209
212
|
const defaultFill = rawFill;
|
|
210
213
|
const { width } = useWindowDimensions();
|
|
211
214
|
const parentFill = useOptionalSurfaceFill();
|
|
212
|
-
const
|
|
213
|
-
const
|
|
215
|
+
const parentLevel = useSurfaceLevelValue();
|
|
216
|
+
const isPlain = appearance === 'plain';
|
|
217
|
+
const paintsSurface = !isPlain && Boolean(defaultFill) && parentFill !== undefined && (framed ?? width >= framedFrom) && chrome !== 'none';
|
|
218
|
+
const publishedFill = isPlain ? parentFill : rawFill && paintsSurface ? resolveSurfaceMaterial({ fill: rawFill, parentFill: parentFill! }).publishedFill : rawFill;
|
|
214
219
|
const materialStyle = useSurfaceMaterial('[data-bloom-panel-material]', 'bloom-content-panel-material', defaultFill ?? 'transparent');
|
|
215
220
|
|
|
216
221
|
// Tri-state: `undefined` → responsive (md:-gated), `true` → always framed,
|
|
@@ -255,7 +260,7 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
255
260
|
const gridStackClass = boundToPanel
|
|
256
261
|
? 'web:grid web:[grid-template-columns:minmax(0,1fr)] web:[grid-template-rows:minmax(0,1fr)]'
|
|
257
262
|
: '';
|
|
258
|
-
const surfaceClass = [surfaceBase, fillSurface, gridStackClass, surfaceClassName ?? (paintsSurface ? 'bg-transparent' : 'bg-card')].filter(Boolean).join(' ');
|
|
263
|
+
const surfaceClass = [surfaceBase, fillSurface, gridStackClass, surfaceClassName ?? (isPlain || paintsSurface ? 'bg-transparent' : 'bg-card')].filter(Boolean).join(' ');
|
|
259
264
|
const contentClass = [contentBase, fillContent, boundToPanel ? 'web:[grid-area:1/1]' : '', contentClassName]
|
|
260
265
|
.filter(Boolean)
|
|
261
266
|
.join(' ');
|
|
@@ -311,6 +316,7 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
311
316
|
framed === true ? { borderRadius: radius } : framed === false ? { borderRadius: 0 } : null,
|
|
312
317
|
surfaceStyle,
|
|
313
318
|
paintsSurface ? materialStyle : null,
|
|
319
|
+
isPlain ? { backgroundColor: 'transparent' } : null,
|
|
314
320
|
]}
|
|
315
321
|
>
|
|
316
322
|
{/* (1) Bleed-mask overlay — gutter box-shadow ring, below chrome. Not
|
|
@@ -329,12 +335,12 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
329
335
|
? `web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-[var(--bloom-panel-radius)] ${bp.overlayHidden} web:[margin-bottom:calc(-100dvh+16px)]`
|
|
330
336
|
: 'web:sticky web:top-2 z-30 h-[calc(100dvh-16px)] w-full rounded-[var(--bloom-panel-radius)] web:[margin-bottom:calc(-100dvh+16px)]'
|
|
331
337
|
}
|
|
332
|
-
style={{ ...panelStyle, ...insetStyle, boxShadow: `0 0 0 ${maskSpread}px ${maskColor ?? colors.background}` }}
|
|
338
|
+
style={{ ...panelStyle, ...insetStyle, boxShadow: `0 0 0 ${maskSpread}px ${maskColor ?? (isPlain ? parentFill : undefined) ?? colors.background}` }}
|
|
333
339
|
/>
|
|
334
340
|
)}
|
|
335
341
|
{/* (2) Border-frame overlay — one continuous rounded border, above all.
|
|
336
342
|
Same visibility gating as the bleed-mask. */}
|
|
337
|
-
{showOverlays && showStickyFrame !== false && chrome !== 'none' && (
|
|
343
|
+
{showOverlays && showStickyFrame !== false && !isPlain && chrome !== 'none' && (
|
|
338
344
|
<StyledView
|
|
339
345
|
key="border-frame"
|
|
340
346
|
testID="content-panel-border-frame"
|
|
@@ -359,10 +365,10 @@ const ContentPanelComponent: React.FC<ContentPanelProps> = ({
|
|
|
359
365
|
scroll/virtualizer + refetch on a breakpoint cross). Clipped to the
|
|
360
366
|
rounded panel shape on web when framed. */}
|
|
361
367
|
<StyledView key="content" testID="content-panel-content" className={contentClass} style={[curveStyle, framed === true ? { borderRadius: radius } : framed === false ? { borderRadius: 0 } : null, contentStyle]}>
|
|
362
|
-
{/*
|
|
363
|
-
|
|
364
|
-
<SurfaceLevelProvider level={1} fill={publishedFill}>
|
|
365
|
-
{children}
|
|
368
|
+
{/* Solid panels publish their painted surface. Plain panels preserve
|
|
369
|
+
the enclosing surface so descendant scrims follow its real fill. */}
|
|
370
|
+
<SurfaceLevelProvider level={isPlain ? parentLevel : 1} fill={publishedFill}>
|
|
371
|
+
{errorBoundary === false ? children : <PanelErrorBoundary {...(errorBoundary === true ? {} : errorBoundary)}>{children}</PanelErrorBoundary>}
|
|
366
372
|
</SurfaceLevelProvider>
|
|
367
373
|
</StyledView>
|
|
368
374
|
</StyledView>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { PanelErrorBoundaryOptions } from '../error-boundary/types';
|
|
2
3
|
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -17,6 +18,15 @@ export type ContentPanelChrome = 'elevated' | 'border' | 'none';
|
|
|
17
18
|
|
|
18
19
|
export interface ContentPanelProps {
|
|
19
20
|
children: React.ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* `solid` (default) paints a panel surface. `plain` keeps layout, framing and
|
|
23
|
+
* clipping while leaving the enclosing surface visible, without material,
|
|
24
|
+
* border or shadow. Descendants inherit the parent's surface level and fill.
|
|
25
|
+
* In plain mode surface background overrides and surfaceColor are ignored.
|
|
26
|
+
*/
|
|
27
|
+
appearance?: 'solid' | 'plain';
|
|
28
|
+
/** Opt in to local themed error recovery. Split panes already provide their own boundaries. */
|
|
29
|
+
errorBoundary?: boolean | PanelErrorBoundaryOptions;
|
|
20
30
|
/**
|
|
21
31
|
* Framing mode. Tri-state, managed by Bloom — no consumer
|
|
22
32
|
* breakpoint hook needed:
|
|
@@ -83,6 +83,12 @@ export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundarySt
|
|
|
83
83
|
this.props.onError?.(error, errorInfo);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
componentDidUpdate(previous: ErrorBoundaryProps): void {
|
|
87
|
+
if (this.state.hasError && !Object.is(previous.resetKey, this.props.resetKey)) {
|
|
88
|
+
this.setState({ hasError: false, error: null, errorInfo: null, retryCount: 0 });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
86
92
|
private handleRetry = (): void => {
|
|
87
93
|
this.setState((prev) => ({
|
|
88
94
|
hasError: false,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ScrollView } from 'react-native';
|
|
3
|
+
import { EmptyState } from '../empty-state';
|
|
4
|
+
import { useBottomEdgeInset } from '../layout/bottom-edge';
|
|
5
|
+
import { useMessages } from '../locale/messages';
|
|
6
|
+
import { space } from '../styles/tokens';
|
|
7
|
+
import { ErrorBoundary } from './ErrorBoundary';
|
|
8
|
+
import { ERROR_BOUNDARY_MESSAGES } from './messages';
|
|
9
|
+
import type { PanelErrorBoundaryProps } from './types';
|
|
10
|
+
|
|
11
|
+
/** Local recovery inside a healthy Bloom shell. Catastrophic/provider errors belong to ErrorBoundary. */
|
|
12
|
+
export function PanelErrorBoundary({ children, fallback, emptyState, bottomInset, ...props }: PanelErrorBoundaryProps) {
|
|
13
|
+
const { messages } = useMessages(ERROR_BOUNDARY_MESSAGES);
|
|
14
|
+
const inheritedBottom = useBottomEdgeInset();
|
|
15
|
+
return (
|
|
16
|
+
<ErrorBoundary {...props} fallback={fallback !== undefined ? fallback : (({ retry }) => (
|
|
17
|
+
<ScrollView
|
|
18
|
+
style={{ flex: 1, minHeight: 0 }}
|
|
19
|
+
contentContainerStyle={{ flexGrow: 1, paddingHorizontal: space.md, paddingBottom: bottomInset ?? inheritedBottom }}
|
|
20
|
+
>
|
|
21
|
+
<EmptyState
|
|
22
|
+
variant="compact"
|
|
23
|
+
{...emptyState}
|
|
24
|
+
title={emptyState?.title ?? messages.title}
|
|
25
|
+
description={emptyState?.description ?? messages.message}
|
|
26
|
+
style={[{ flexGrow: 1 }, emptyState?.style]}
|
|
27
|
+
action={{
|
|
28
|
+
...emptyState?.action,
|
|
29
|
+
label: emptyState?.action?.label ?? messages.retry,
|
|
30
|
+
onPress: () => { emptyState?.action?.onPress?.(); retry(); },
|
|
31
|
+
}}
|
|
32
|
+
/>
|
|
33
|
+
</ScrollView>
|
|
34
|
+
))}>
|
|
35
|
+
{children}
|
|
36
|
+
</ErrorBoundary>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export { ErrorBoundary } from './ErrorBoundary';
|
|
2
|
+
export { PanelErrorBoundary } from './PanelErrorBoundary';
|
|
2
3
|
export type {
|
|
3
4
|
ErrorBoundaryProps,
|
|
4
5
|
ErrorBoundaryFallback,
|
|
5
6
|
ErrorBoundaryFallbackContext,
|
|
7
|
+
PanelErrorBoundaryOptions,
|
|
8
|
+
PanelErrorBoundaryProps,
|
|
6
9
|
} from './types';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode, ErrorInfo } from 'react';
|
|
2
|
+
import type { EmptyStateProps } from '../empty-state/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Context passed to a render-prop `fallback` when an ErrorBoundary catches an
|
|
@@ -38,6 +39,8 @@ export type ErrorBoundaryFallback =
|
|
|
38
39
|
|
|
39
40
|
export interface ErrorBoundaryProps {
|
|
40
41
|
children: ReactNode;
|
|
42
|
+
/** Changing this identity resets a failed boundary without remounting healthy children. */
|
|
43
|
+
resetKey?: string | number;
|
|
41
44
|
/**
|
|
42
45
|
* Custom fallback UI to render on error. Accepts either:
|
|
43
46
|
* - a ReactNode (static — same UI on every error), or
|
|
@@ -57,3 +60,18 @@ export interface ErrorBoundaryProps {
|
|
|
57
60
|
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
58
61
|
testID?: string;
|
|
59
62
|
}
|
|
63
|
+
|
|
64
|
+
/** Recovery UI for a panel inside a healthy Bloom provider. */
|
|
65
|
+
export interface PanelErrorBoundaryOptions {
|
|
66
|
+
resetKey?: ErrorBoundaryProps['resetKey'];
|
|
67
|
+
onError?: ErrorBoundaryProps['onError'];
|
|
68
|
+
fallback?: ErrorBoundaryFallback;
|
|
69
|
+
/** Defaults to localized error wording and a retry action. A supplied action runs before retry. */
|
|
70
|
+
emptyState?: EmptyStateProps;
|
|
71
|
+
/** Override inherited bottom chrome clearance when the parent has already reserved it. */
|
|
72
|
+
bottomInset?: number;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface PanelErrorBoundaryProps extends PanelErrorBoundaryOptions {
|
|
76
|
+
children: ReactNode;
|
|
77
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -220,11 +220,13 @@ export * from './task-list';
|
|
|
220
220
|
export * from './agent-chat';
|
|
221
221
|
export * from './ai-chat';
|
|
222
222
|
export * from './radio-indicator';
|
|
223
|
-
export { ErrorBoundary } from './error-boundary';
|
|
223
|
+
export { ErrorBoundary, PanelErrorBoundary } from './error-boundary';
|
|
224
224
|
export type {
|
|
225
225
|
ErrorBoundaryProps,
|
|
226
226
|
ErrorBoundaryFallback,
|
|
227
227
|
ErrorBoundaryFallbackContext,
|
|
228
|
+
PanelErrorBoundaryOptions,
|
|
229
|
+
PanelErrorBoundaryProps,
|
|
228
230
|
} from './error-boundary';
|
|
229
231
|
export * as Shapes from './shapes';
|
|
230
232
|
export * from './avatar';
|
package/src/index.web.ts
CHANGED
|
@@ -225,11 +225,13 @@ export * from './task-list';
|
|
|
225
225
|
export * from './agent-chat/index.web';
|
|
226
226
|
export * from './ai-chat/index.web';
|
|
227
227
|
export * from './radio-indicator';
|
|
228
|
-
export { ErrorBoundary } from './error-boundary';
|
|
228
|
+
export { ErrorBoundary, PanelErrorBoundary } from './error-boundary';
|
|
229
229
|
export type {
|
|
230
230
|
ErrorBoundaryProps,
|
|
231
231
|
ErrorBoundaryFallback,
|
|
232
232
|
ErrorBoundaryFallbackContext,
|
|
233
|
+
PanelErrorBoundaryOptions,
|
|
234
|
+
PanelErrorBoundaryProps,
|
|
233
235
|
} from './error-boundary';
|
|
234
236
|
export * as Shapes from './shapes';
|
|
235
237
|
export * from './avatar';
|
|
@@ -2,7 +2,6 @@ import React, { useEffect, useMemo, useState } from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { Button } from '../button';
|
|
5
|
-
import { Divider } from '../divider';
|
|
6
5
|
import { useControllableState } from '../hooks/use-controllable-state';
|
|
7
6
|
import { MailLabelChips, MailStar } from '../mail-list/parts';
|
|
8
7
|
import { mailStrings, resolveMailPaint, visibleLabels } from '../mail-list/shared';
|
|
@@ -145,7 +144,6 @@ export function MailThread({
|
|
|
145
144
|
/>
|
|
146
145
|
</View>
|
|
147
146
|
) : null}
|
|
148
|
-
<Divider />
|
|
149
147
|
<View testID={testID ? `${testID}-messages` : undefined} style={{ paddingTop: space.xs, paddingBottom: space.xs, gap: messageGap }}>
|
|
150
148
|
{entries.map((entry) =>
|
|
151
149
|
entry.kind === 'message' ? (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
import {
|
|
2
|
+
import { SURFACE_SHAPES } from '../design-tokens/shapes';
|
|
3
3
|
|
|
4
4
|
import { MAIL_THREAD_MESSAGES } from './messages';
|
|
5
5
|
import type { MailThreadMessage, MailAddress, MailThreadStrings } from './types';
|
|
@@ -44,8 +44,8 @@ export const MAIL_THREAD_GEOMETRY = {
|
|
|
44
44
|
glyph: 16,
|
|
45
45
|
/** The star and the overflow trigger. A touch target, so 44. */
|
|
46
46
|
action: 44,
|
|
47
|
-
/**
|
|
48
|
-
radius:
|
|
47
|
+
/** Default radius; rendered messages inherit BloomScope.panelRadius via Card. */
|
|
48
|
+
radius: SURFACE_SHAPES.sidebar.radius,
|
|
49
49
|
} as const;
|
|
50
50
|
|
|
51
51
|
/**
|