@oxyhq/bloom 0.45.0 → 0.48.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.
Files changed (211) hide show
  1. package/lib/commonjs/bottom-sheet/BottomSheetBase.js +34 -12
  2. package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
  3. package/lib/commonjs/combobox/Combobox.js +3 -3
  4. package/lib/commonjs/combobox/Combobox.js.map +1 -1
  5. package/lib/commonjs/command/Command.js +3 -3
  6. package/lib/commonjs/command/Command.js.map +1 -1
  7. package/lib/commonjs/dialog/Dialog.js +86 -8
  8. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.web.js +176 -18
  10. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  11. package/lib/commonjs/dialog/DialogBottomSheet.js +84 -29
  12. package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
  13. package/lib/commonjs/dialog/DialogHeader.js +365 -0
  14. package/lib/commonjs/dialog/DialogHeader.js.map +1 -0
  15. package/lib/commonjs/dialog/index.js +7 -0
  16. package/lib/commonjs/dialog/index.js.map +1 -1
  17. package/lib/commonjs/dialog/index.web.js +7 -0
  18. package/lib/commonjs/dialog/index.web.js.map +1 -1
  19. package/lib/commonjs/index.js +40 -4
  20. package/lib/commonjs/index.js.map +1 -1
  21. package/lib/commonjs/index.web.js +84 -48
  22. package/lib/commonjs/index.web.js.map +1 -1
  23. package/lib/commonjs/react-native-className.d.js +6 -0
  24. package/lib/commonjs/react-native-className.d.js.map +1 -0
  25. package/lib/commonjs/{search-input → search}/index.js +5 -3
  26. package/lib/commonjs/search/index.js.map +1 -0
  27. package/lib/commonjs/settings-list/SettingsList.js +5 -1
  28. package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
  29. package/lib/commonjs/surfaces/SurfaceHost.js +202 -0
  30. package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -0
  31. package/lib/commonjs/surfaces/api.js +83 -0
  32. package/lib/commonjs/surfaces/api.js.map +1 -0
  33. package/lib/commonjs/surfaces/index.js +82 -0
  34. package/lib/commonjs/surfaces/index.js.map +1 -0
  35. package/lib/commonjs/surfaces/index.web.js +77 -0
  36. package/lib/commonjs/surfaces/index.web.js.map +1 -0
  37. package/lib/commonjs/surfaces/prompts.js +154 -0
  38. package/lib/commonjs/surfaces/prompts.js.map +1 -0
  39. package/lib/commonjs/surfaces/surfaceStore.js +172 -0
  40. package/lib/commonjs/surfaces/surfaceStore.js.map +1 -0
  41. package/lib/commonjs/surfaces/types.js +6 -0
  42. package/lib/commonjs/surfaces/types.js.map +1 -0
  43. package/lib/commonjs/surfaces/useSurface.js +36 -0
  44. package/lib/commonjs/surfaces/useSurface.js.map +1 -0
  45. package/lib/commonjs/text-field/index.js +22 -6
  46. package/lib/commonjs/text-field/index.js.map +1 -1
  47. package/lib/module/bottom-sheet/BottomSheetBase.js +34 -12
  48. package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
  49. package/lib/module/combobox/Combobox.js +3 -3
  50. package/lib/module/combobox/Combobox.js.map +1 -1
  51. package/lib/module/command/Command.js +3 -3
  52. package/lib/module/command/Command.js.map +1 -1
  53. package/lib/module/dialog/Dialog.js +88 -10
  54. package/lib/module/dialog/Dialog.js.map +1 -1
  55. package/lib/module/dialog/Dialog.web.js +179 -21
  56. package/lib/module/dialog/Dialog.web.js.map +1 -1
  57. package/lib/module/dialog/DialogBottomSheet.js +85 -30
  58. package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
  59. package/lib/module/dialog/DialogHeader.js +356 -0
  60. package/lib/module/dialog/DialogHeader.js.map +1 -0
  61. package/lib/module/dialog/index.js +1 -0
  62. package/lib/module/dialog/index.js.map +1 -1
  63. package/lib/module/dialog/index.web.js +1 -0
  64. package/lib/module/dialog/index.web.js.map +1 -1
  65. package/lib/module/index.js +7 -2
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/module/index.web.js +7 -2
  68. package/lib/module/index.web.js.map +1 -1
  69. package/lib/module/react-native-className.d.js +20 -0
  70. package/lib/module/react-native-className.d.js.map +1 -0
  71. package/lib/module/{search-input → search}/index.js +6 -2
  72. package/lib/module/search/index.js.map +1 -0
  73. package/lib/module/settings-list/SettingsList.js +5 -1
  74. package/lib/module/settings-list/SettingsList.js.map +1 -1
  75. package/lib/module/surfaces/SurfaceHost.js +197 -0
  76. package/lib/module/surfaces/SurfaceHost.js.map +1 -0
  77. package/lib/module/surfaces/api.js +48 -0
  78. package/lib/module/surfaces/api.js.map +1 -0
  79. package/lib/module/surfaces/index.js +24 -0
  80. package/lib/module/surfaces/index.js.map +1 -0
  81. package/lib/module/surfaces/index.web.js +19 -0
  82. package/lib/module/surfaces/index.web.js.map +1 -0
  83. package/lib/module/surfaces/prompts.js +148 -0
  84. package/lib/module/surfaces/prompts.js.map +1 -0
  85. package/lib/module/surfaces/surfaceStore.js +159 -0
  86. package/lib/module/surfaces/surfaceStore.js.map +1 -0
  87. package/lib/module/surfaces/types.js +4 -0
  88. package/lib/module/surfaces/types.js.map +1 -0
  89. package/lib/module/surfaces/useSurface.js +31 -0
  90. package/lib/module/surfaces/useSurface.js.map +1 -0
  91. package/lib/module/text-field/index.js +22 -6
  92. package/lib/module/text-field/index.js.map +1 -1
  93. package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +23 -0
  94. package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/combobox/Combobox.d.ts +1 -1
  96. package/lib/typescript/commonjs/command/Command.d.ts +1 -1
  97. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
  100. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts +86 -0
  102. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/dialog/index.d.ts +2 -1
  104. package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/dialog/index.web.d.ts +2 -1
  106. package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/dialog/types.d.ts +85 -0
  108. package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/icons/common.d.ts +1 -0
  110. package/lib/typescript/commonjs/icons/common.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/index.d.ts +5 -3
  112. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/index.web.d.ts +5 -3
  114. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/input-group/types.d.ts +1 -1
  116. package/lib/typescript/commonjs/{search-input → search}/index.d.ts +1 -1
  117. package/lib/typescript/commonjs/search/index.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts +25 -0
  119. package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/surfaces/api.d.ts +41 -0
  121. package/lib/typescript/commonjs/surfaces/api.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/surfaces/index.d.ts +25 -0
  123. package/lib/typescript/commonjs/surfaces/index.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/surfaces/index.web.d.ts +20 -0
  125. package/lib/typescript/commonjs/surfaces/index.web.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/surfaces/prompts.d.ts +13 -0
  127. package/lib/typescript/commonjs/surfaces/prompts.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts +51 -0
  129. package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/surfaces/types.d.ts +161 -0
  131. package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/surfaces/useSurface.d.ts +21 -0
  133. package/lib/typescript/commonjs/surfaces/useSurface.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/text-field/index.d.ts +2 -1
  135. package/lib/typescript/commonjs/text-field/index.d.ts.map +1 -1
  136. package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +23 -0
  137. package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  138. package/lib/typescript/module/combobox/Combobox.d.ts +1 -1
  139. package/lib/typescript/module/command/Command.d.ts +1 -1
  140. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  141. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  142. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
  143. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
  144. package/lib/typescript/module/dialog/DialogHeader.d.ts +86 -0
  145. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -0
  146. package/lib/typescript/module/dialog/index.d.ts +2 -1
  147. package/lib/typescript/module/dialog/index.d.ts.map +1 -1
  148. package/lib/typescript/module/dialog/index.web.d.ts +2 -1
  149. package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
  150. package/lib/typescript/module/dialog/types.d.ts +85 -0
  151. package/lib/typescript/module/dialog/types.d.ts.map +1 -1
  152. package/lib/typescript/module/icons/common.d.ts +1 -0
  153. package/lib/typescript/module/icons/common.d.ts.map +1 -1
  154. package/lib/typescript/module/index.d.ts +5 -3
  155. package/lib/typescript/module/index.d.ts.map +1 -1
  156. package/lib/typescript/module/index.web.d.ts +5 -3
  157. package/lib/typescript/module/index.web.d.ts.map +1 -1
  158. package/lib/typescript/module/input-group/types.d.ts +1 -1
  159. package/lib/typescript/module/{search-input → search}/index.d.ts +1 -1
  160. package/lib/typescript/module/search/index.d.ts.map +1 -0
  161. package/lib/typescript/module/surfaces/SurfaceHost.d.ts +25 -0
  162. package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -0
  163. package/lib/typescript/module/surfaces/api.d.ts +41 -0
  164. package/lib/typescript/module/surfaces/api.d.ts.map +1 -0
  165. package/lib/typescript/module/surfaces/index.d.ts +25 -0
  166. package/lib/typescript/module/surfaces/index.d.ts.map +1 -0
  167. package/lib/typescript/module/surfaces/index.web.d.ts +20 -0
  168. package/lib/typescript/module/surfaces/index.web.d.ts.map +1 -0
  169. package/lib/typescript/module/surfaces/prompts.d.ts +13 -0
  170. package/lib/typescript/module/surfaces/prompts.d.ts.map +1 -0
  171. package/lib/typescript/module/surfaces/surfaceStore.d.ts +51 -0
  172. package/lib/typescript/module/surfaces/surfaceStore.d.ts.map +1 -0
  173. package/lib/typescript/module/surfaces/types.d.ts +161 -0
  174. package/lib/typescript/module/surfaces/types.d.ts.map +1 -0
  175. package/lib/typescript/module/surfaces/useSurface.d.ts +21 -0
  176. package/lib/typescript/module/surfaces/useSurface.d.ts.map +1 -0
  177. package/lib/typescript/module/text-field/index.d.ts +2 -1
  178. package/lib/typescript/module/text-field/index.d.ts.map +1 -1
  179. package/package.json +24 -8
  180. package/src/__tests__/BottomSheet.test.tsx +47 -0
  181. package/src/__tests__/DialogBottomSheet.test.tsx +30 -5
  182. package/src/__tests__/surfaceStore.test.ts +219 -0
  183. package/src/bottom-sheet/BottomSheetBase.tsx +59 -10
  184. package/src/combobox/Combobox.tsx +3 -3
  185. package/src/command/Command.tsx +3 -3
  186. package/src/dialog/Dialog.tsx +88 -7
  187. package/src/dialog/Dialog.web.tsx +179 -29
  188. package/src/dialog/DialogBottomSheet.tsx +90 -28
  189. package/src/dialog/DialogHeader.tsx +420 -0
  190. package/src/dialog/index.ts +2 -0
  191. package/src/dialog/index.web.ts +2 -0
  192. package/src/dialog/types.ts +86 -0
  193. package/src/index.ts +18 -1
  194. package/src/index.web.ts +18 -1
  195. package/src/input-group/types.ts +1 -1
  196. package/src/react-native-className.d.ts +38 -0
  197. package/src/{search-input → search}/index.tsx +8 -5
  198. package/src/settings-list/SettingsList.tsx +5 -1
  199. package/src/surfaces/SurfaceHost.tsx +222 -0
  200. package/src/surfaces/api.ts +55 -0
  201. package/src/surfaces/index.ts +38 -0
  202. package/src/surfaces/index.web.ts +33 -0
  203. package/src/surfaces/prompts.tsx +178 -0
  204. package/src/surfaces/surfaceStore.ts +168 -0
  205. package/src/surfaces/types.ts +172 -0
  206. package/src/surfaces/useSurface.ts +33 -0
  207. package/src/text-field/index.tsx +24 -5
  208. package/lib/commonjs/search-input/index.js.map +0 -1
  209. package/lib/module/search-input/index.js.map +0 -1
  210. package/lib/typescript/commonjs/search-input/index.d.ts.map +0 -1
  211. package/lib/typescript/module/search-input/index.d.ts.map +0 -1
@@ -0,0 +1,178 @@
1
+ import React, { useCallback, useState } from 'react';
2
+ import { Text, View } from 'react-native';
3
+
4
+ import { Button } from '../button';
5
+ import { TextFieldInput } from '../text-field';
6
+ import { useTheme } from '../theme/use-theme';
7
+ import { present } from './surfaceStore';
8
+ import type {
9
+ SurfaceConfirmOptions,
10
+ SurfaceControls,
11
+ SurfacePromptOptions,
12
+ } from './types';
13
+
14
+ /**
15
+ * Built-in `confirm` / `prompt` surfaces.
16
+ *
17
+ * They are implemented AS surfaces — each calls `present(...)` so it STACKS
18
+ * correctly above any open surface with the right layer/z (unlike Bloom's
19
+ * one-at-a-time `alert()` FIFO queue, which cannot layer over another surface).
20
+ * Their buttons resolve through the surface's own `dismiss(result)` (NOT the
21
+ * underlying `Dialog`'s close), so the value flows back through the `present()`
22
+ * promise.
23
+ */
24
+
25
+ const TITLE_STYLE = { fontSize: 22, fontWeight: '600' as const, lineHeight: 30 };
26
+ const MESSAGE_STYLE = { fontSize: 16, lineHeight: 22 };
27
+
28
+ function ConfirmSurface({
29
+ options,
30
+ surface,
31
+ }: {
32
+ options: SurfaceConfirmOptions;
33
+ surface: SurfaceControls;
34
+ }) {
35
+ const theme = useTheme();
36
+ const onConfirm = useCallback(() => surface.dismiss(true), [surface]);
37
+ const onCancel = useCallback(() => surface.dismiss(false), [surface]);
38
+
39
+ return (
40
+ <View>
41
+ <Text
42
+ style={[
43
+ TITLE_STYLE,
44
+ {
45
+ color: theme.colors.text,
46
+ paddingBottom: options.message ? 4 : 16,
47
+ },
48
+ ]}
49
+ >
50
+ {options.title}
51
+ </Text>
52
+ {options.message ? (
53
+ <Text
54
+ style={[
55
+ MESSAGE_STYLE,
56
+ { color: theme.colors.textSecondary, paddingBottom: 16 },
57
+ ]}
58
+ >
59
+ {options.message}
60
+ </Text>
61
+ ) : null}
62
+ <View style={{ gap: 8 }}>
63
+ <Button
64
+ variant={options.destructive ? 'destructive' : 'primary'}
65
+ onPress={onConfirm}
66
+ testID="bloom-surface-confirm-confirm"
67
+ >
68
+ {options.confirmLabel ?? 'Confirm'}
69
+ </Button>
70
+ {options.hideCancel ? null : (
71
+ <Button
72
+ variant="secondary"
73
+ onPress={onCancel}
74
+ testID="bloom-surface-confirm-cancel"
75
+ >
76
+ {options.cancelLabel ?? 'Cancel'}
77
+ </Button>
78
+ )}
79
+ </View>
80
+ </View>
81
+ );
82
+ }
83
+
84
+ function PromptSurface({
85
+ options,
86
+ surface,
87
+ }: {
88
+ options: SurfacePromptOptions;
89
+ surface: SurfaceControls;
90
+ }) {
91
+ const theme = useTheme();
92
+ const [value, setValue] = useState(options.defaultValue ?? '');
93
+ const onSubmit = useCallback(() => surface.dismiss(value), [surface, value]);
94
+ const onCancel = useCallback(() => surface.dismiss(null), [surface]);
95
+
96
+ return (
97
+ <View>
98
+ <Text
99
+ style={[
100
+ TITLE_STYLE,
101
+ {
102
+ color: theme.colors.text,
103
+ paddingBottom: options.message ? 4 : 16,
104
+ },
105
+ ]}
106
+ >
107
+ {options.title}
108
+ </Text>
109
+ {options.message ? (
110
+ <Text
111
+ style={[
112
+ MESSAGE_STYLE,
113
+ { color: theme.colors.textSecondary, paddingBottom: 16 },
114
+ ]}
115
+ >
116
+ {options.message}
117
+ </Text>
118
+ ) : null}
119
+ <TextFieldInput
120
+ label={options.inputLabel ?? options.title}
121
+ placeholder={options.placeholder}
122
+ value={value}
123
+ onChangeText={setValue}
124
+ autoFocus
125
+ returnKeyType="done"
126
+ onSubmitEditing={onSubmit}
127
+ testID="bloom-surface-prompt-input"
128
+ />
129
+ <View style={{ gap: 8, paddingTop: 16 }}>
130
+ <Button
131
+ variant="primary"
132
+ onPress={onSubmit}
133
+ testID="bloom-surface-prompt-confirm"
134
+ >
135
+ {options.confirmLabel ?? 'OK'}
136
+ </Button>
137
+ <Button
138
+ variant="secondary"
139
+ onPress={onCancel}
140
+ testID="bloom-surface-prompt-cancel"
141
+ >
142
+ {options.cancelLabel ?? 'Cancel'}
143
+ </Button>
144
+ </View>
145
+ </View>
146
+ );
147
+ }
148
+
149
+ /**
150
+ * Present a confirm surface stacked on top of anything currently open. Resolves
151
+ * `true` on confirm, `false` on cancel OR on backdrop/Escape/back dismissal.
152
+ */
153
+ export function confirm(options: SurfaceConfirmOptions): Promise<boolean> {
154
+ return present<unknown>(
155
+ (surface) => <ConfirmSurface options={options} surface={surface} />,
156
+ {
157
+ placement: options.placement ?? 'center',
158
+ dismissOnBackdrop: options.dismissible ?? true,
159
+ label: options.title,
160
+ },
161
+ ).then((result) => result === true);
162
+ }
163
+
164
+ /**
165
+ * Present a prompt surface stacked on top of anything currently open. Resolves
166
+ * the entered string on submit, or `null` on cancel OR backdrop/Escape/back
167
+ * dismissal.
168
+ */
169
+ export function prompt(options: SurfacePromptOptions): Promise<string | null> {
170
+ return present<unknown>(
171
+ (surface) => <PromptSurface options={options} surface={surface} />,
172
+ {
173
+ placement: options.placement ?? 'center',
174
+ dismissOnBackdrop: options.dismissible ?? true,
175
+ label: options.title,
176
+ },
177
+ ).then((result) => (typeof result === 'string' ? result : null));
178
+ }
@@ -0,0 +1,168 @@
1
+ import type {
2
+ PresentOptions,
3
+ SurfaceEntry,
4
+ SurfaceRenderFn,
5
+ } from './types';
6
+
7
+ /**
8
+ * The shared, content-agnostic SURFACE STACK.
9
+ *
10
+ * A module-singleton store (same pattern as `theme/ambient-store.ts` and
11
+ * `dialog/alert-store.ts`) holding an ordered stack of surfaces presented ON TOP
12
+ * of each other — bottom→top, the last entry is the top. One coordinated stack
13
+ * that the whole ecosystem (the SDK AND consumer apps) presents into, so
14
+ * overlays never clash: per-layer z, top-only interactivity, backdrop/Escape/
15
+ * back routed to the TOP surface, lower layers dimmed.
16
+ *
17
+ * It is CONTENT-AGNOSTIC: `present` takes a render function, not a route name.
18
+ * Bloom must never know about routes; the SDK layers its route registry on top.
19
+ *
20
+ * `getSnapshot` returns a STABLE reference while unchanged (the array identity
21
+ * only changes on a real mutation), so `useSyncExternalStore` — and the React
22
+ * Compiler — never see a silently-stale value.
23
+ */
24
+
25
+ let idCounter = 0;
26
+ function genId(): string {
27
+ idCounter += 1;
28
+ return `bloom-surface-${idCounter}`;
29
+ }
30
+
31
+ /** A single frozen "empty stack" snapshot returned by `getSnapshot` when idle. */
32
+ const EMPTY: readonly SurfaceEntry[] = Object.freeze([]);
33
+
34
+ let surfaces: readonly SurfaceEntry[] = EMPTY;
35
+ const listeners = new Set<() => void>();
36
+
37
+ function emit(): void {
38
+ for (const listener of listeners) listener();
39
+ }
40
+
41
+ /** Subscribe to stack changes. Returns an unsubscribe fn. */
42
+ export function subscribe(listener: () => void): () => void {
43
+ listeners.add(listener);
44
+ return () => {
45
+ listeners.delete(listener);
46
+ };
47
+ }
48
+
49
+ /** Current stack snapshot (stable ref while unchanged). Bottom→top. */
50
+ export function getSnapshot(): readonly SurfaceEntry[] {
51
+ return surfaces;
52
+ }
53
+
54
+ /**
55
+ * Present a new surface on TOP of the stack. Returns a promise that resolves
56
+ * with the value passed to `dismiss(result)` (or `undefined` when the surface is
57
+ * dismissed without a result / by a stack-wide clear).
58
+ */
59
+ export function present<Result = unknown>(
60
+ render: SurfaceRenderFn,
61
+ opts?: PresentOptions,
62
+ ): Promise<Result> {
63
+ return new Promise<Result>((resolve) => {
64
+ const entry: SurfaceEntry = {
65
+ id: genId(),
66
+ render,
67
+ presentation: opts ?? {},
68
+ status: 'open',
69
+ resolve: resolve as (result: unknown) => void,
70
+ settled: false,
71
+ generation: 0,
72
+ };
73
+ surfaces = [...surfaces, entry];
74
+ emit();
75
+ });
76
+ }
77
+
78
+ /**
79
+ * Request dismissal of a surface. RESOLVES THE PROMISE IMMEDIATELY (the exit
80
+ * animation that follows is cosmetic) and flips the entry to `'closing'` so the
81
+ * host runs its exit animation. Resolution is resolve-once via the `settled`
82
+ * guard — a second request (or the host's post-exit `onClose`) never re-resolves
83
+ * with a different value. Bumps the entry `generation` so a completion callback
84
+ * from a superseded cycle is inert.
85
+ */
86
+ export function requestDismiss(id: string, result?: unknown): void {
87
+ const entry = surfaces.find((e) => e.id === id);
88
+ if (!entry) return;
89
+
90
+ // Resolve-once. The mapped replacement below carries `settled: true`, so a
91
+ // later `requestDismiss(id)` reads the settled entry and skips this branch —
92
+ // no in-place mutation of the live entry is needed.
93
+ if (!entry.settled) {
94
+ entry.resolve(result);
95
+ }
96
+
97
+ if (entry.status === 'closing') return;
98
+
99
+ surfaces = surfaces.map((e) =>
100
+ e.id === id
101
+ ? { ...e, settled: true, status: 'closing', generation: e.generation + 1 }
102
+ : e,
103
+ );
104
+ emit();
105
+ }
106
+
107
+ /**
108
+ * Splice a surface out of the stack once its exit animation has settled. Called
109
+ * by the host from the `Dialog`'s post-exit `onClose`. Idempotent and gated on
110
+ * `'closing'` status: a stale/duplicate call — or one for an entry that is not
111
+ * actually closing — is a no-op, which (together with unique entry ids) is the
112
+ * stale-callback hygiene `BottomSheetBase`'s generation guard provides for its
113
+ * reused instance.
114
+ */
115
+ export function finalizeClose(id: string): void {
116
+ const entry = surfaces.find((e) => e.id === id);
117
+ if (!entry || entry.status !== 'closing') return;
118
+ const next = surfaces.filter((e) => e.id !== id);
119
+ surfaces = next.length === 0 ? EMPTY : next;
120
+ emit();
121
+ }
122
+
123
+ /** Dismiss the TOP surface, resolving its promise with `result`. */
124
+ export function dismissTop(result?: unknown): void {
125
+ const top = surfaces[surfaces.length - 1];
126
+ if (top) requestDismiss(top.id, result);
127
+ }
128
+
129
+ /**
130
+ * Dismiss every surface ABOVE the bottom-most one, keeping the root surface
131
+ * open. Pending awaiters of the dismissed surfaces resolve with `undefined` so
132
+ * they never hang. No-op with 0 or 1 surfaces.
133
+ */
134
+ export function dismissToRoot(): void {
135
+ if (surfaces.length <= 1) return;
136
+ const above = surfaces.slice(1).map((e) => e.id);
137
+ for (const id of above) requestDismiss(id, undefined);
138
+ }
139
+
140
+ /**
141
+ * Dismiss the ENTIRE stack. Every pending awaiter resolves with `undefined` so
142
+ * none hang.
143
+ */
144
+ export function dismissAll(): void {
145
+ const ids = surfaces.map((e) => e.id);
146
+ for (const id of ids) requestDismiss(id, undefined);
147
+ }
148
+
149
+ /**
150
+ * Hard-reset the stack synchronously (no exit animation), resolving all pending
151
+ * awaiters with `undefined`. Used when the host provider unmounts so no
152
+ * `present()` promise is stranded.
153
+ */
154
+ export function resetSurfaces(): void {
155
+ if (surfaces.length === 0) return;
156
+ const pending = surfaces;
157
+ surfaces = EMPTY;
158
+ for (const entry of pending) {
159
+ if (!entry.settled) entry.resolve(undefined);
160
+ }
161
+ emit();
162
+ }
163
+
164
+ /** Test-only: hard-reset without notifying (drops listeners' work). */
165
+ export function __resetSurfacesForTests(): void {
166
+ surfaces = EMPTY;
167
+ idCounter = 0;
168
+ }
@@ -0,0 +1,172 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { StyleProp, ViewStyle } from 'react-native';
3
+
4
+ import type { DialogHeaderConfig, DialogInset, ResponsiveDialogPlacement } from '../dialog/types';
5
+
6
+ /**
7
+ * How a surface renders — the placement + the `Dialog` sizing/chrome options a
8
+ * surface needs. This is the CONTENT-AGNOSTIC presentation config: it never
9
+ * references a route or screen name (Bloom's stack knows nothing about routes;
10
+ * the SDK layers its route registry on top).
11
+ *
12
+ * The values map 1:1 onto the shared {@link ../dialog/types#DialogProps}, so a
13
+ * surface reads/behaves identically to a hand-mounted `<Dialog>` with the same
14
+ * props — only stacked/coordinated by {@link SurfaceHost}.
15
+ */
16
+ export interface SurfacePresentation {
17
+ /**
18
+ * Surface anchor. Defaults to `{ base: 'bottom', md: 'center' }` — a bottom
19
+ * sheet on narrow viewports that becomes a centered modal on wide ones (the
20
+ * ecosystem's canonical responsive "sheet"). Pass `'center'` for a plain
21
+ * modal, `'left'`/`'right'` for a drawer, or any responsive placement map.
22
+ */
23
+ placement?: ResponsiveDialogPlacement;
24
+ /** Side-sheet width (px) on wide screens. Forwarded to `Dialog`. */
25
+ width?: number;
26
+ /** Centered-card max width (px). Forwarded to `Dialog`. */
27
+ maxWidth?: number;
28
+ /** Bottom-sheet max height as a fraction of the viewport height. */
29
+ maxHeightRatio?: number;
30
+ /** Side-sheet inset (px) from the root overlay's edges. */
31
+ inset?: DialogInset;
32
+ /** Whether to render the drag handle in bottom-sheet mode. */
33
+ showHandle?: boolean;
34
+ /**
35
+ * Whether tapping the backdrop / pressing Escape / Android-back dismisses the
36
+ * surface. Defaults to `true`. Set `false` for a blocking surface that must be
37
+ * dismissed programmatically (e.g. an unanswered required prompt).
38
+ */
39
+ dismissOnBackdrop?: boolean;
40
+ /** Inner padding (px) of the surface content container. Forwarded to `Dialog`. */
41
+ contentPadding?: number;
42
+ /**
43
+ * Turns on the Dialog's OWN navigation header for this surface (sticky gradient
44
+ * nav bar + large collapsing title over the surface's scroll content). Seeds
45
+ * the header content; a mounted screen refines it at runtime via
46
+ * `useDialogHeader`. Omit for a plain surface (a confirm/alert dialog). Forwarded
47
+ * to `Dialog`.
48
+ */
49
+ header?: DialogHeaderConfig;
50
+ /**
51
+ * Whether the surface wraps its content in an internal scroll container.
52
+ * Defaults to `true`. Set `false` when the surface's content owns its own
53
+ * scrolling primitive (a `FlatList` / `SectionList` / VirtualizedList, or its
54
+ * own `ScrollView`) so the host does not nest it in a ScrollView. Forwarded
55
+ * to `Dialog`.
56
+ */
57
+ scrollable?: boolean;
58
+ /** Style overrides applied to the inner content container. */
59
+ style?: StyleProp<ViewStyle>;
60
+ /** Style overrides for the side/bottom placement panel surface. */
61
+ panelStyle?: StyleProp<ViewStyle>;
62
+ /** NativeWind classes for the side/bottom placement panel surface. */
63
+ panelClassName?: string;
64
+ /** Style for the root overlay (theme-var scope, rail offset, etc.). */
65
+ containerStyle?: StyleProp<ViewStyle>;
66
+ /** NativeWind classes for the root overlay. */
67
+ containerClassName?: string;
68
+ /** Accessibility label applied to the surface's dialog role. */
69
+ label?: string;
70
+ /** Stable testID forwarded to the underlying `Dialog`. */
71
+ testID?: string;
72
+ }
73
+
74
+ /** Options accepted by `present` / `SurfaceControls.present`. */
75
+ export type PresentOptions = SurfacePresentation;
76
+
77
+ /**
78
+ * Controls handed to a presented surface — both as the argument to its render
79
+ * function AND via {@link ../surfaces/useSurface#useSurface}. This is the DEPTH
80
+ * axis only: a surface can dismiss ITSELF (resolving its own `present()`
81
+ * promise) or `present` a CHILD surface stacked above it. Navigation WITHIN a
82
+ * surface (route history / drill-in) is deliberately NOT here — that is the
83
+ * SDK's route layer, which composes on top of this stack.
84
+ */
85
+ export interface SurfaceControls {
86
+ /**
87
+ * Dismiss THIS surface, resolving the promise returned by the `present` call
88
+ * that created it with `result` (or `undefined`). Resolves immediately; the
89
+ * exit animation is cosmetic.
90
+ */
91
+ dismiss: (result?: unknown) => void;
92
+ /**
93
+ * Stack a CHILD surface directly above this one. Resolves with the child's
94
+ * dismissal result. The child paints above (higher layer) and captures
95
+ * backdrop/Escape/back until it is dismissed.
96
+ */
97
+ present: <Result = unknown>(
98
+ render: SurfaceRenderFn,
99
+ opts?: PresentOptions,
100
+ ) => Promise<Result>;
101
+ }
102
+
103
+ /** A surface's content factory — receives its own {@link SurfaceControls}. */
104
+ export type SurfaceRenderFn = (surface: SurfaceControls) => ReactNode;
105
+
106
+ /** Lifecycle status of a stacked surface. */
107
+ export type SurfaceStatus = 'open' | 'closing';
108
+
109
+ /**
110
+ * One entry in the surface stack. `resolve` fulfils the `present()` promise; the
111
+ * `settled` guard makes resolution idempotent (resolve-once); `generation` is
112
+ * the per-entry stale-callback guard (carried from `BottomSheetBase`'s
113
+ * `closeGenerationRef`, keyed per entry id) so a completion callback from a
114
+ * superseded close cycle can never tear down the wrong state.
115
+ */
116
+ export interface SurfaceEntry {
117
+ id: string;
118
+ render: SurfaceRenderFn;
119
+ presentation: SurfacePresentation;
120
+ status: SurfaceStatus;
121
+ resolve: (result: unknown) => void;
122
+ settled: boolean;
123
+ generation: number;
124
+ }
125
+
126
+ /** Options for the built-in {@link ../surfaces/prompts#confirm} surface. */
127
+ export interface SurfaceConfirmOptions {
128
+ /** Headline. */
129
+ title: string;
130
+ /** Supporting copy. */
131
+ message?: string;
132
+ /** Confirm button label. Defaults to `'Confirm'`. */
133
+ confirmLabel?: string;
134
+ /** Cancel button label. Defaults to `'Cancel'`. */
135
+ cancelLabel?: string;
136
+ /** Style the confirm button as destructive (negative color). */
137
+ destructive?: boolean;
138
+ /** Hide the cancel button (a single-action acknowledgement). */
139
+ hideCancel?: boolean;
140
+ /**
141
+ * Backdrop / Escape / back dismiss (resolving `false`). Defaults to `true`;
142
+ * pass `false` for a blocking confirm that must be answered by a button.
143
+ */
144
+ dismissible?: boolean;
145
+ /** Placement override. Defaults to `'center'`. */
146
+ placement?: ResponsiveDialogPlacement;
147
+ }
148
+
149
+ /** Options for the built-in {@link ../surfaces/prompts#prompt} surface. */
150
+ export interface SurfacePromptOptions {
151
+ /** Headline. */
152
+ title: string;
153
+ /** Supporting copy. */
154
+ message?: string;
155
+ /** Input placeholder. */
156
+ placeholder?: string;
157
+ /** Initial input value. */
158
+ defaultValue?: string;
159
+ /** Accessibility label for the input. Defaults to the `title`. */
160
+ inputLabel?: string;
161
+ /** Submit button label. Defaults to `'OK'`. */
162
+ confirmLabel?: string;
163
+ /** Cancel button label. Defaults to `'Cancel'`. */
164
+ cancelLabel?: string;
165
+ /**
166
+ * Backdrop / Escape / back dismiss (resolving `null`). Defaults to `true`;
167
+ * pass `false` for a blocking prompt.
168
+ */
169
+ dismissible?: boolean;
170
+ /** Placement override. Defaults to `'center'`. */
171
+ placement?: ResponsiveDialogPlacement;
172
+ }
@@ -0,0 +1,33 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ import type { SurfaceControls } from './types';
4
+
5
+ /**
6
+ * Context carrying the CURRENT surface's controls. The host wraps each presented
7
+ * surface's content in a provider bound to that entry's id, so a nested surface
8
+ * reads its OWN controls — `dismiss` targets this surface, `present` stacks a
9
+ * child above it.
10
+ */
11
+ export const SurfaceContext = createContext<SurfaceControls | null>(null);
12
+ SurfaceContext.displayName = 'BloomSurfaceContext';
13
+
14
+ /**
15
+ * Read the current surface's {@link SurfaceControls} from inside a presented
16
+ * surface. Equivalent to the `surface` argument the render function receives —
17
+ * use whichever is convenient (props vs. context).
18
+ *
19
+ * DEPTH only: `dismiss` (resolve this surface's promise + close) and `present`
20
+ * (stack a child). Navigation within a surface is the SDK's route layer, not
21
+ * this hook.
22
+ *
23
+ * @throws if called outside a presented surface.
24
+ */
25
+ export function useSurface(): SurfaceControls {
26
+ const controls = useContext(SurfaceContext);
27
+ if (!controls) {
28
+ throw new Error(
29
+ 'useSurface must be called from within a presented surface (rendered by <SurfaceProvider>/<SurfaceHost>).',
30
+ );
31
+ }
32
+ return controls;
33
+ }
@@ -30,6 +30,8 @@ import { Text } from '../typography';
30
30
  const Context = createContext<{
31
31
  inputRef: React.RefObject<TextInput | null> | null;
32
32
  isInvalid: boolean;
33
+ /** Corner radius of the input chrome. A large value (e.g. 999) reads as a pill. */
34
+ radius: number;
33
35
  hovered: boolean;
34
36
  onHoverIn: () => void;
35
37
  onHoverOut: () => void;
@@ -39,6 +41,7 @@ const Context = createContext<{
39
41
  }>({
40
42
  inputRef: null,
41
43
  isInvalid: false,
44
+ radius: 10,
42
45
  hovered: false,
43
46
  onHoverIn: () => {},
44
47
  onHoverOut: () => {},
@@ -48,11 +51,24 @@ const Context = createContext<{
48
51
  });
49
52
  Context.displayName = 'TextFieldContext';
50
53
 
54
+ /**
55
+ * RN Web paints the browser's default focus outline on the underlying `<input>`.
56
+ * That rectangle follows the input's own box — NOT the TextField chrome — so on a
57
+ * pill (large radius) it pokes out of the corners and reads as a stray border on
58
+ * focus. Strip it so ONLY the TextField's own focus chrome (the animated border)
59
+ * signals focus. `outlineStyle`/`outlineWidth` are RN-Web style properties absent
60
+ * from RN's core types; `web()` guarantees this object is never applied on native.
61
+ */
62
+ const WEB_INPUT_OUTLINE_RESET: TextStyle | undefined =
63
+ Platform.OS === 'web'
64
+ ? ({ outlineWidth: 0, outlineStyle: 'none' } as unknown as TextStyle)
65
+ : undefined;
66
+
51
67
  export type TextFieldProps = React.PropsWithChildren<
52
- { isInvalid?: boolean } & ViewStyleProp
68
+ { isInvalid?: boolean; radius?: number } & ViewStyleProp
53
69
  >;
54
70
 
55
- export function TextField({ children, isInvalid = false, style }: TextFieldProps) {
71
+ export function TextField({ children, isInvalid = false, radius = 10, style }: TextFieldProps) {
56
72
  const inputRef = useRef<TextInput>(null);
57
73
  const {
58
74
  state: hovered,
@@ -75,8 +91,9 @@ export function TextField({ children, isInvalid = false, style }: TextFieldProps
75
91
  onFocus,
76
92
  onBlur,
77
93
  isInvalid,
94
+ radius,
78
95
  }),
79
- [inputRef, hovered, onHoverIn, onHoverOut, focused, onFocus, onBlur, isInvalid],
96
+ [inputRef, hovered, onHoverIn, onHoverOut, focused, onFocus, onBlur, isInvalid, radius],
80
97
  );
81
98
 
82
99
  return (
@@ -240,6 +257,7 @@ export function TextFieldInput({
240
257
  marginTop: 2,
241
258
  marginBottom: 2,
242
259
  }),
260
+ WEB_INPUT_OUTLINE_RESET,
243
261
  style,
244
262
  ]) as TextStyle;
245
263
 
@@ -272,7 +290,7 @@ export function TextFieldInput({
272
290
  a.z_10,
273
291
  a.absolute,
274
292
  a.inset_0,
275
- { borderRadius: 10 },
293
+ { borderRadius: ctx.radius },
276
294
  { backgroundColor: theme.colors.contrast50 },
277
295
  { borderColor: 'transparent', borderWidth: 2 },
278
296
  ctx.hovered ? chromeHover : {},
@@ -393,6 +411,7 @@ function FloatingLabelInput({
393
411
  },
394
412
  android({ paddingTop: 24, paddingBottom: 6 }),
395
413
  web({ paddingTop: 25, paddingBottom: 7 }),
414
+ WEB_INPUT_OUTLINE_RESET,
396
415
  style,
397
416
  ]) as TextStyle;
398
417
 
@@ -444,7 +463,7 @@ function FloatingLabelInput({
444
463
  a.z_10,
445
464
  a.absolute,
446
465
  a.inset_0,
447
- { borderRadius: 10 },
466
+ { borderRadius: ctx.radius },
448
467
  { backgroundColor: theme.colors.contrast50 },
449
468
  { borderColor: 'transparent', borderWidth: 2 },
450
469
  ctx.hovered ? chromeHover : {},
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_useTheme","_index","_button","_index2","_MagnifyingGlass","_Times","_jsxRuntime","SearchInput","exports","forwardRef","value","label","onClearText","rest","ref","theme","useTheme","showClear","length","jsxs","View","style","a","w_full","relative","children","TextField","jsx","TextFieldIcon","icon","MagnifyingGlassIcon","TextFieldInput","inputRef","placeholder","returnKeyType","keyboardAppearance","mode","selectTextOnFocus","Platform","OS","autoFocus","accessibilityRole","autoCorrect","autoComplete","autoCapitalize","paddingRight","undefined","absolute","z_20","my_auto","inset_0","justify_center","pr_sm","left","Button","testID","onPress","accessibilityLabel","hitSlop","top","bottom","right","variant","size","TimesLarge_Stroke2_Corner0_Rounded","fill","colors","textSecondary","padding","minHeight","displayName"],"sourceRoot":"../../../src","sources":["search-input/index.tsx"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["forwardRef","Platform","View","useTheme","atoms","a","Button","TextField","TextFieldIcon","TextFieldInput","MagnifyingGlass_Stroke2_Corner0_Rounded","MagnifyingGlassIcon","TimesLarge_Stroke2_Corner0_Rounded","X","jsx","_jsx","jsxs","_jsxs","SearchInput","value","label","onClearText","rest","ref","theme","showClear","length","style","w_full","relative","children","icon","inputRef","placeholder","returnKeyType","keyboardAppearance","mode","selectTextOnFocus","OS","autoFocus","accessibilityRole","autoCorrect","autoComplete","autoCapitalize","paddingRight","undefined","absolute","z_20","my_auto","inset_0","justify_center","pr_sm","left","testID","onPress","accessibilityLabel","hitSlop","top","bottom","right","variant","size","fill","colors","textSecondary","padding","minHeight","displayName"],"sourceRoot":"../../../src","sources":["search-input/index.tsx"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/search-input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAK9D,OAAO,EAA4C,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAYnG,eAAO,MAAM,WAAW;YAPd,mBAAmB,CAAC,OAAO,CAAC;IACpC;;OAEG;kBACW,MAAM,IAAI;6CAwDzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/search-input/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;AAK9D,OAAO,EAA4C,KAAK,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAYnG,eAAO,MAAM,WAAW;YAPd,mBAAmB,CAAC,OAAO,CAAC;IACpC;;OAEG;kBACW,MAAM,IAAI;6CAwDzB,CAAC"}