@oxyhq/bloom 0.46.0 → 0.49.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 (160) hide show
  1. package/lib/commonjs/bottom-sheet/BottomSheetBase.js +36 -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 +103 -8
  8. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.web.js +189 -12
  10. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  11. package/lib/commonjs/dialog/DialogBottomSheet.js +111 -31
  12. package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
  13. package/lib/commonjs/dialog/DialogHeader.js +371 -0
  14. package/lib/commonjs/dialog/DialogHeader.js.map +1 -0
  15. package/lib/commonjs/dialog/DialogMorph.js +458 -0
  16. package/lib/commonjs/dialog/DialogMorph.js.map +1 -0
  17. package/lib/commonjs/dialog/index.js +14 -0
  18. package/lib/commonjs/dialog/index.js.map +1 -1
  19. package/lib/commonjs/dialog/index.web.js +14 -0
  20. package/lib/commonjs/dialog/index.web.js.map +1 -1
  21. package/lib/commonjs/index.js +11 -4
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/commonjs/index.web.js +11 -4
  24. package/lib/commonjs/index.web.js.map +1 -1
  25. package/lib/commonjs/react-native-className.d.js +6 -0
  26. package/lib/commonjs/react-native-className.d.js.map +1 -0
  27. package/lib/commonjs/{search-input → search}/index.js +5 -3
  28. package/lib/commonjs/search/index.js.map +1 -0
  29. package/lib/commonjs/settings-list/SettingsList.js +6 -2
  30. package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
  31. package/lib/commonjs/surfaces/SurfaceHost.js +23 -9
  32. package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -1
  33. package/lib/commonjs/text-field/index.js +22 -6
  34. package/lib/commonjs/text-field/index.js.map +1 -1
  35. package/lib/module/bottom-sheet/BottomSheetBase.js +36 -12
  36. package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
  37. package/lib/module/combobox/Combobox.js +3 -3
  38. package/lib/module/combobox/Combobox.js.map +1 -1
  39. package/lib/module/command/Command.js +3 -3
  40. package/lib/module/command/Command.js.map +1 -1
  41. package/lib/module/dialog/Dialog.js +104 -9
  42. package/lib/module/dialog/Dialog.js.map +1 -1
  43. package/lib/module/dialog/Dialog.web.js +192 -16
  44. package/lib/module/dialog/Dialog.web.js.map +1 -1
  45. package/lib/module/dialog/DialogBottomSheet.js +113 -33
  46. package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
  47. package/lib/module/dialog/DialogHeader.js +362 -0
  48. package/lib/module/dialog/DialogHeader.js.map +1 -0
  49. package/lib/module/dialog/DialogMorph.js +451 -0
  50. package/lib/module/dialog/DialogMorph.js.map +1 -0
  51. package/lib/module/dialog/index.js +2 -0
  52. package/lib/module/dialog/index.js.map +1 -1
  53. package/lib/module/dialog/index.web.js +2 -0
  54. package/lib/module/dialog/index.web.js.map +1 -1
  55. package/lib/module/index.js +2 -2
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/index.web.js +2 -2
  58. package/lib/module/index.web.js.map +1 -1
  59. package/lib/module/react-native-className.d.js +20 -0
  60. package/lib/module/react-native-className.d.js.map +1 -0
  61. package/lib/module/{search-input → search}/index.js +6 -2
  62. package/lib/module/search/index.js.map +1 -0
  63. package/lib/module/settings-list/SettingsList.js +6 -2
  64. package/lib/module/settings-list/SettingsList.js.map +1 -1
  65. package/lib/module/surfaces/SurfaceHost.js +23 -9
  66. package/lib/module/surfaces/SurfaceHost.js.map +1 -1
  67. package/lib/module/text-field/index.js +22 -6
  68. package/lib/module/text-field/index.js.map +1 -1
  69. package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +31 -1
  70. package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/combobox/Combobox.d.ts +1 -1
  72. package/lib/typescript/commonjs/command/Command.d.ts +1 -1
  73. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
  76. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts +86 -0
  78. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -0
  79. package/lib/typescript/commonjs/dialog/DialogMorph.d.ts +150 -0
  80. package/lib/typescript/commonjs/dialog/DialogMorph.d.ts.map +1 -0
  81. package/lib/typescript/commonjs/dialog/index.d.ts +4 -1
  82. package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
  83. package/lib/typescript/commonjs/dialog/index.web.d.ts +4 -1
  84. package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/dialog/types.d.ts +105 -0
  86. package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/icons/common.d.ts +1 -0
  88. package/lib/typescript/commonjs/icons/common.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/index.d.ts +3 -3
  90. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/index.web.d.ts +3 -3
  92. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/input-group/types.d.ts +1 -1
  94. package/lib/typescript/commonjs/{search-input → search}/index.d.ts +1 -1
  95. package/lib/typescript/commonjs/search/index.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/surfaces/types.d.ts +26 -1
  98. package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/text-field/index.d.ts +2 -1
  100. package/lib/typescript/commonjs/text-field/index.d.ts.map +1 -1
  101. package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +31 -1
  102. package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  103. package/lib/typescript/module/combobox/Combobox.d.ts +1 -1
  104. package/lib/typescript/module/command/Command.d.ts +1 -1
  105. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  106. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  107. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
  108. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
  109. package/lib/typescript/module/dialog/DialogHeader.d.ts +86 -0
  110. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -0
  111. package/lib/typescript/module/dialog/DialogMorph.d.ts +150 -0
  112. package/lib/typescript/module/dialog/DialogMorph.d.ts.map +1 -0
  113. package/lib/typescript/module/dialog/index.d.ts +4 -1
  114. package/lib/typescript/module/dialog/index.d.ts.map +1 -1
  115. package/lib/typescript/module/dialog/index.web.d.ts +4 -1
  116. package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
  117. package/lib/typescript/module/dialog/types.d.ts +105 -0
  118. package/lib/typescript/module/dialog/types.d.ts.map +1 -1
  119. package/lib/typescript/module/icons/common.d.ts +1 -0
  120. package/lib/typescript/module/icons/common.d.ts.map +1 -1
  121. package/lib/typescript/module/index.d.ts +3 -3
  122. package/lib/typescript/module/index.d.ts.map +1 -1
  123. package/lib/typescript/module/index.web.d.ts +3 -3
  124. package/lib/typescript/module/index.web.d.ts.map +1 -1
  125. package/lib/typescript/module/input-group/types.d.ts +1 -1
  126. package/lib/typescript/module/{search-input → search}/index.d.ts +1 -1
  127. package/lib/typescript/module/search/index.d.ts.map +1 -0
  128. package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -1
  129. package/lib/typescript/module/surfaces/types.d.ts +26 -1
  130. package/lib/typescript/module/surfaces/types.d.ts.map +1 -1
  131. package/lib/typescript/module/text-field/index.d.ts +2 -1
  132. package/lib/typescript/module/text-field/index.d.ts.map +1 -1
  133. package/package.json +8 -8
  134. package/src/__tests__/BottomSheet.test.tsx +47 -0
  135. package/src/__tests__/DialogBottomSheet.test.tsx +30 -5
  136. package/src/__tests__/DialogMorph.test.tsx +230 -0
  137. package/src/bottom-sheet/BottomSheetBase.tsx +72 -11
  138. package/src/combobox/Combobox.tsx +3 -3
  139. package/src/command/Command.tsx +3 -3
  140. package/src/dialog/Dialog.tsx +111 -14
  141. package/src/dialog/Dialog.web.tsx +186 -25
  142. package/src/dialog/DialogBottomSheet.tsx +122 -30
  143. package/src/dialog/DialogHeader.tsx +429 -0
  144. package/src/dialog/DialogMorph.tsx +576 -0
  145. package/src/dialog/index.ts +4 -0
  146. package/src/dialog/index.web.ts +4 -0
  147. package/src/dialog/types.ts +106 -0
  148. package/src/index.ts +3 -1
  149. package/src/index.web.ts +3 -1
  150. package/src/input-group/types.ts +1 -1
  151. package/src/react-native-className.d.ts +38 -0
  152. package/src/{search-input → search}/index.tsx +8 -5
  153. package/src/settings-list/SettingsList.tsx +6 -2
  154. package/src/surfaces/SurfaceHost.tsx +17 -1
  155. package/src/surfaces/types.ts +26 -1
  156. package/src/text-field/index.tsx +24 -5
  157. package/lib/commonjs/search-input/index.js.map +0 -1
  158. package/lib/module/search-input/index.js.map +0 -1
  159. package/lib/typescript/commonjs/search-input/index.d.ts.map +0 -1
  160. package/lib/typescript/module/search-input/index.d.ts.map +0 -1
@@ -0,0 +1,451 @@
1
+ "use strict";
2
+
3
+ import React, { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef } from 'react';
4
+ import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
5
+
6
+ // ---------------------------------------------------------------------------
7
+ // Size morphing — the panel reshapes across an IN-PLACE content swap.
8
+ //
9
+ // A surface has two axes. DEPTH: a new surface is presented on top (its own
10
+ // backdrop / z-layer) — untouched by this module. NAV-WITHIN: the content
11
+ // INSIDE one surface is swapped for another screen. Without morphing that swap
12
+ // hard-cuts: the panel jumps from the outgoing screen's size to the incoming
13
+ // one's in a single frame. Morphing animates the panel between the two sizes
14
+ // while the incoming content fades in, so navigating within a surface reads as
15
+ // ONE container reshaping.
16
+ //
17
+ // The Dialog cannot see a nav-within swap from its props: the content that
18
+ // changes lives deep inside `children` (a host that subscribes to its own
19
+ // route store), so the Dialog re-renders nothing. The content therefore
20
+ // DECLARES its identity through {@link useDialogFrame} — the same
21
+ // external-channel bridge `useDialogHeader` uses for the nav bar — and the
22
+ // surface runs the morph when that identity changes.
23
+ //
24
+ // Geometry, per placement:
25
+ // - centered card — height grows/shrinks about its centre (the backdrop
26
+ // centres it), and `maxWidth` morphs too when the surface changes it.
27
+ // - bottom sheet — height grows/shrinks from its anchored bottom edge.
28
+ // - side sheet — fixed geometry (pinned top/bottom, fixed width), so
29
+ // there is nothing to morph; those placements never mount this.
30
+ // ---------------------------------------------------------------------------
31
+
32
+ /** Panel reshape duration (ms) between two content frames. */
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ export const DIALOG_MORPH_DURATION = 260;
35
+
36
+ /**
37
+ * Incoming-frame fade-in (ms). Deliberately shorter than the reshape so the new
38
+ * content has landed by the time the panel finishes settling.
39
+ */
40
+ export const DIALOG_MORPH_FADE_DURATION = 150;
41
+
42
+ /**
43
+ * How long the panel stays pinned at the outgoing size waiting for the incoming
44
+ * frame to report its own. A frame whose content measures IDENTICALLY never
45
+ * re-reports (nothing resized), so the pin is released on this timeout — there
46
+ * was no size change to morph.
47
+ */
48
+ const MORPH_MEASURE_TIMEOUT_MS = 200;
49
+
50
+ /** Reshape easing — matches the ease-out the rest of the Dialog motion uses. */
51
+ const MORPH_EASING = Easing.out(Easing.cubic);
52
+
53
+ /**
54
+ * Largest plausible gap between the panel box and its content (borders, the
55
+ * scroll container's padding). A bigger difference means the sample is not
56
+ * chrome — the panel is capped, or the content wrapper is being stretched — so
57
+ * it is dropped rather than baked into the next reshape target.
58
+ */
59
+ const MAX_PANEL_CHROME = 96;
60
+
61
+ /**
62
+ * Below this, an incoming frame is treated as having NO natural height rather
63
+ * than a tiny one: content that fills the space it is given (a list that flexes
64
+ * to its container) measures ~0 inside a content-sized wrapper, and reshaping
65
+ * the panel down to that would collapse the surface. Such a frame keeps the
66
+ * panel's normal sizing instead.
67
+ */
68
+ const MIN_MEASURABLE_CONTENT = 40;
69
+
70
+ /**
71
+ * The identity of the content currently rendered inside a Dialog surface,
72
+ * declared by that content via {@link useDialogFrame}.
73
+ */
74
+
75
+ /**
76
+ * The bridge between a surface's content (which knows WHEN it swapped) and the
77
+ * surface (which owns the panel). Deliberately not a React store: the surface
78
+ * does not need to re-render on a frame change — it drives shared values.
79
+ */
80
+
81
+ function createFrameChannel() {
82
+ let last = null;
83
+ let handler = null;
84
+ let frameListener = null;
85
+ return {
86
+ setFrame: frame => {
87
+ const previous = last;
88
+ last = frame;
89
+ frameListener?.(frame);
90
+ if (previous && previous.key !== frame.key) handler?.(frame, previous);
91
+ },
92
+ setHandler: next => {
93
+ handler = next;
94
+ return () => {
95
+ if (handler === next) handler = null;
96
+ };
97
+ },
98
+ setFrameListener: next => {
99
+ frameListener = next;
100
+ if (last) next(last);
101
+ return () => {
102
+ if (frameListener === next) frameListener = null;
103
+ };
104
+ }
105
+ };
106
+ }
107
+ const DialogFrameContext = /*#__PURE__*/createContext(null);
108
+
109
+ /**
110
+ * Declare the identity of the content currently rendered inside a Dialog
111
+ * surface. When the `key` changes while the surface stays open, the surface
112
+ * MORPHS its panel from the outgoing content's size to the incoming one's
113
+ * instead of hard-cutting.
114
+ *
115
+ * Called by the host that owns the surface's content (the SDK's `SurfaceScreen`
116
+ * declares `route#step`). No-op outside a morph-capable Dialog surface — a side
117
+ * sheet, or a plain confirm dialog — so a host can call it unconditionally.
118
+ *
119
+ * EXACTLY ONE host per surface may declare frames: two writers with different
120
+ * identities would each read the other's key as a swap and morph on every
121
+ * render. A screen that wants its own sub-views to morph must fold them into
122
+ * the surface host's key rather than declaring a second frame.
123
+ */
124
+ export function useDialogFrame(frame) {
125
+ const channel = useContext(DialogFrameContext);
126
+ const key = frame?.key;
127
+ const morph = frame?.morph;
128
+ const sizeHeight = frame?.size?.height;
129
+ const sizeMaxWidth = frame?.size?.maxWidth;
130
+ // Declared in the commit's layout phase, BEFORE the browser paints the new
131
+ // content: that is what lets the surface pin the panel at the outgoing size
132
+ // in the same frame the swap commits (the panel's own layout for the incoming
133
+ // content is not reported until after this). Depend on the size PRIMITIVES (not
134
+ // the object) so a fresh `size` object each render does not re-fire the effect.
135
+ useLayoutEffect(() => {
136
+ if (!channel || key === undefined) return;
137
+ const size = sizeHeight !== undefined || sizeMaxWidth !== undefined ? {
138
+ height: sizeHeight,
139
+ maxWidth: sizeMaxWidth
140
+ } : undefined;
141
+ channel.setFrame({
142
+ key,
143
+ morph,
144
+ size
145
+ });
146
+ }, [channel, key, morph, sizeHeight, sizeMaxWidth]);
147
+ }
148
+
149
+ /** Options a surface passes when it wires up morphing for its panel. */
150
+
151
+ /**
152
+ * Wire size morphing into one Dialog surface. Returns the panel/content styles
153
+ * and the two measurement callbacks the surface must attach.
154
+ *
155
+ * While idle the panel style resolves to `height: 'auto'` — byte-for-byte the
156
+ * natural sizing every placement had before morphing existed — so first open,
157
+ * dismissal, and a responsive placement swap are untouched. The height is only
158
+ * driven for the ~260ms of an actual reshape, then released back to natural.
159
+ *
160
+ * A frame that declares an explicit `size` is different: that size is DERIVED
161
+ * state the panel rests at at EVERY layout (`declaredHeight`/`declaredMaxWidth`),
162
+ * not a one-shot animation target — so a placement swap (which re-lays the panel
163
+ * out WITHOUT a key change, so the animation never re-runs) still settles at the
164
+ * declared size instead of falling back to natural.
165
+ */
166
+ export function useDialogMorph({
167
+ enabled,
168
+ measurable,
169
+ maxHeight,
170
+ maxWidth
171
+ }) {
172
+ const channel = useMemo(() => createFrameChannel(), []);
173
+
174
+ /** 1 while the panel height is driven by an in-flight morph animation. */
175
+ const pinned = useSharedValue(0);
176
+ const height = useSharedValue(0);
177
+ /** 1 while `maxWidth` is driven by an in-flight morph animation. */
178
+ const widthPinned = useSharedValue(0);
179
+ const width = useSharedValue(0);
180
+ /**
181
+ * The ACTIVE frame's declared explicit size (0 = none) — the panel's RESTING
182
+ * size, re-derived on every `setFrame` so it survives a placement swap. `height`
183
+ * is clamped to the viewport; `maxWidth` widens the centered card.
184
+ */
185
+ const declaredHeight = useSharedValue(0);
186
+ const declaredMaxWidth = useSharedValue(0);
187
+ /** Incoming-frame opacity. Rests at 1; dips to 0 and fades back on a swap. */
188
+ const fade = useSharedValue(1);
189
+
190
+ /** Last laid-out panel height — the size a morph starts FROM. */
191
+ const panelHeight = useRef(0);
192
+ /** Last laid-out height of the content wrapper — the content's NATURAL height. */
193
+ const contentHeight = useRef(0);
194
+ /**
195
+ * Panel box height MINUS its scroll content height, sampled while idle and
196
+ * unclamped: the panel's own chrome (borders, scroll-container padding).
197
+ * Self-calibrating, so no placement has to hard-code its own box math.
198
+ */
199
+ const chrome = useRef(0);
200
+ /** True between a frame change and the moment the incoming size arrives. */
201
+ const awaitingSize = useRef(false);
202
+ const releaseTimer = useRef(null);
203
+ /** Mirrors of render-time values the (stable) callbacks below need to read. */
204
+ const maxHeightRef = useRef(maxHeight);
205
+ maxHeightRef.current = maxHeight;
206
+ const measurableRef = useRef(measurable);
207
+ measurableRef.current = measurable;
208
+ const enabledRef = useRef(enabled);
209
+ enabledRef.current = enabled;
210
+ /**
211
+ * The EFFECTIVE `maxWidth` of the CURRENT frame — its explicit `size.maxWidth`
212
+ * if it declared one, else the surface `maxWidth`. Held so the next frame change
213
+ * knows the width to morph FROM. The handler owns it (not a passive effect) so a
214
+ * per-frame width is not clobbered mid-flow.
215
+ */
216
+ const activeMaxWidth = useRef(maxWidth);
217
+
218
+ // Keep the active frame's DECLARED size current on every render/layout — this
219
+ // is the panel's resting size, so it survives a placement swap (which remounts
220
+ // this surface and fires the listener immediately with the current frame). A
221
+ // frame with no explicit size resets these to 0 (natural sizing). A LAYOUT
222
+ // effect so the seed lands BEFORE paint on a placement-swap remount (the child
223
+ // `SurfaceScreen`'s `setFrame` layout-effect runs first, setting the channel's
224
+ // last frame; registering here then fires immediately with it — no small-size
225
+ // flash). NOTE: must NOT touch `activeMaxWidth` — the listener runs BEFORE the
226
+ // key-change handler in the same `setFrame`, and the handler needs the PREVIOUS
227
+ // frame's width as the animation's FROM.
228
+ useLayoutEffect(() => {
229
+ return channel.setFrameListener(frame => {
230
+ declaredHeight.value = frame.size?.height ?? 0;
231
+ declaredMaxWidth.value = frame.size?.maxWidth ?? 0;
232
+ });
233
+ }, [channel, declaredHeight, declaredMaxWidth]);
234
+ const clearReleaseTimer = useCallback(() => {
235
+ if (releaseTimer.current === null) return;
236
+ clearTimeout(releaseTimer.current);
237
+ releaseTimer.current = null;
238
+ }, []);
239
+
240
+ /** Hand the panel back to natural sizing. */
241
+ const release = useCallback(() => {
242
+ awaitingSize.current = false;
243
+ clearReleaseTimer();
244
+ cancelAnimation(height);
245
+ pinned.value = 0;
246
+ }, [clearReleaseTimer, height, pinned]);
247
+
248
+ /** Start the reshape once the incoming frame's natural height is known. */
249
+ const settle = useCallback(naturalContentHeight => {
250
+ if (!awaitingSize.current) return;
251
+ awaitingSize.current = false;
252
+ clearReleaseTimer();
253
+ if (naturalContentHeight < MIN_MEASURABLE_CONTENT) {
254
+ release();
255
+ return;
256
+ }
257
+ const from = height.value;
258
+ const to = Math.max(0, Math.min(naturalContentHeight + chrome.current, maxHeightRef.current));
259
+ if (Math.abs(to - from) < 1) {
260
+ release();
261
+ return;
262
+ }
263
+ height.value = withTiming(to, {
264
+ duration: DIALOG_MORPH_DURATION,
265
+ easing: MORPH_EASING
266
+ }, finished => {
267
+ 'worklet';
268
+
269
+ // Release only on a clean finish — a cancel means a newer morph has
270
+ // already taken the pin over.
271
+ if (finished) pinned.value = 0;
272
+ });
273
+ }, [clearReleaseTimer, height, pinned, release]);
274
+
275
+ // The morph runner. Registered on the channel the content writes into.
276
+ useEffect(() => {
277
+ return channel.setHandler(next => {
278
+ if (!enabledRef.current) return;
279
+
280
+ // The incoming frame always fades in, morph or not — a hard content cut
281
+ // inside a surface that stays put is the jarring part.
282
+ cancelAnimation(fade);
283
+ fade.value = 0;
284
+ fade.value = withTiming(1, {
285
+ duration: DIALOG_MORPH_FADE_DURATION,
286
+ easing: MORPH_EASING
287
+ });
288
+ if (next.morph === false) {
289
+ release();
290
+ return;
291
+ }
292
+
293
+ // Pin at the size the panel is CURRENTLY painted at. `panelHeight` is
294
+ // still the outgoing frame's: this runs in the swap's layout phase, before
295
+ // the incoming content's layout is reported.
296
+ const from = panelHeight.current;
297
+
298
+ // Width, where the placement allows it: ANIMATE the panel's maxWidth from
299
+ // the outgoing frame's effective width to the incoming one's (its explicit
300
+ // `size.maxWidth`, else the surface `maxWidth`). The resting width is the
301
+ // DERIVED `declaredMaxWidth`, so we release `widthPinned` on finish — nothing
302
+ // snaps, and a placement swap re-settles at the declared width on its own.
303
+ const fromWidth = activeMaxWidth.current;
304
+ const toWidth = next.size?.maxWidth ?? maxWidth;
305
+ activeMaxWidth.current = toWidth;
306
+ if (fromWidth !== undefined && toWidth !== undefined && fromWidth !== toWidth) {
307
+ cancelAnimation(width);
308
+ width.value = fromWidth;
309
+ widthPinned.value = 1;
310
+ width.value = withTiming(toWidth, {
311
+ duration: DIALOG_MORPH_DURATION,
312
+ easing: MORPH_EASING
313
+ }, finished => {
314
+ 'worklet';
315
+
316
+ if (finished) widthPinned.value = 0;
317
+ });
318
+ }
319
+
320
+ // Height. An EXPLICIT `size.height` animates the panel DIRECTLY to it (grows
321
+ // or shrinks even a non-measurable / own-scroller frame to a big declared
322
+ // size); otherwise the panel can only reshape when the surface owns the
323
+ // scroll container (`measurable`) and we measure the incoming content. The
324
+ // resting height is the DERIVED `declaredHeight`, so we release the pin on
325
+ // finish — no snap to 'auto', and a placement swap re-settles there itself.
326
+ if (next.size?.height !== undefined) {
327
+ if (from <= 0) return;
328
+ cancelAnimation(height);
329
+ height.value = from;
330
+ pinned.value = 1;
331
+ const to = Math.max(0, Math.min(next.size.height, maxHeightRef.current));
332
+ height.value = withTiming(to, {
333
+ duration: DIALOG_MORPH_DURATION,
334
+ easing: MORPH_EASING
335
+ }, finished => {
336
+ 'worklet';
337
+
338
+ if (finished) pinned.value = 0;
339
+ });
340
+ return;
341
+ }
342
+ if (!measurableRef.current) {
343
+ release();
344
+ return;
345
+ }
346
+ if (from <= 0) return;
347
+ cancelAnimation(height);
348
+ height.value = from;
349
+ pinned.value = 1;
350
+ awaitingSize.current = true;
351
+ clearReleaseTimer();
352
+ releaseTimer.current = setTimeout(release, MORPH_MEASURE_TIMEOUT_MS);
353
+ });
354
+ }, [channel, clearReleaseTimer, fade, height, maxWidth, pinned, release, width, widthPinned]);
355
+ useEffect(() => () => {
356
+ clearReleaseTimer();
357
+ cancelAnimation(height);
358
+ cancelAnimation(width);
359
+ cancelAnimation(fade);
360
+ }, [clearReleaseTimer, fade, height, width]);
361
+
362
+ /** Re-derive the panel's own chrome height whenever it can be sampled cleanly. */
363
+ const calibrate = useCallback(() => {
364
+ if (!measurableRef.current) return;
365
+ if (pinned.value === 1 || awaitingSize.current) return;
366
+ if (panelHeight.current <= 0 || contentHeight.current <= 0) return;
367
+ const delta = panelHeight.current - contentHeight.current;
368
+ // A panel SHORTER than its content is capped, and one far taller is not
369
+ // reporting chrome at all — neither says anything usable.
370
+ if (delta < 0 || delta > MAX_PANEL_CHROME) return;
371
+ chrome.current = delta;
372
+ }, [pinned]);
373
+
374
+ /** Attach to the panel: tracks the size a morph starts from. */
375
+ const onPanelLayout = useCallback(event => {
376
+ panelHeight.current = event.nativeEvent.layout.height;
377
+ calibrate();
378
+ }, [calibrate]);
379
+
380
+ /**
381
+ * Attached to the content wrapper, which lives INSIDE the surface's scroll
382
+ * container and is sized by its own content — so it reports the natural height
383
+ * of the incoming frame even while the panel is pinned at the outgoing one,
384
+ * which is exactly what a pinned panel cannot measure for itself.
385
+ */
386
+ const onContentLayout = useCallback(event => {
387
+ const natural = event.nativeEvent.layout.height;
388
+ contentHeight.current = natural;
389
+ if (awaitingSize.current) {
390
+ settle(natural);
391
+ return;
392
+ }
393
+ calibrate();
394
+ }, [calibrate, settle]);
395
+ const panelStyle = useAnimatedStyle(() => {
396
+ // Height: the in-flight animation while pinned, else the RESTING size — the
397
+ // active frame's `declaredHeight` when it has one (survives a placement swap),
398
+ // else natural (`'auto'`).
399
+ const resolvedHeight = pinned.value === 1 ? height.value : declaredHeight.value > 0 ? declaredHeight.value : 'auto';
400
+ // Width only varies on a placement that HAS a `maxWidth` (the centered card).
401
+ // A full-bleed placement (bottom sheet, `maxWidth === undefined`) is never
402
+ // width-capped — only height matters there. On the centered card the width is
403
+ // the in-flight animation while pinned, else the frame's declared width (which
404
+ // survives a placement swap), else the surface `maxWidth`.
405
+ if (maxWidth === undefined) return {
406
+ height: resolvedHeight
407
+ };
408
+ const resolvedMaxWidth = widthPinned.value === 1 ? width.value : declaredMaxWidth.value > 0 ? declaredMaxWidth.value : maxWidth;
409
+ return {
410
+ height: resolvedHeight,
411
+ maxWidth: resolvedMaxWidth
412
+ };
413
+ // RN-Web has no worklets babel plugin: every shared value the mapper READS
414
+ // must be listed here or it runs once and freezes at the first frame.
415
+ }, [pinned, height, declaredHeight, widthPinned, width, declaredMaxWidth, maxWidth]);
416
+ const contentStyle = useAnimatedStyle(() => ({
417
+ opacity: fade.value
418
+ }), [fade]);
419
+ return {
420
+ channel,
421
+ onPanelLayout,
422
+ onContentLayout,
423
+ panelStyle,
424
+ contentStyle
425
+ };
426
+ }
427
+ /**
428
+ * Wraps a surface's content: publishes the frame channel to it (so it can
429
+ * declare swaps via {@link useDialogFrame}), measures the content's natural
430
+ * height, and carries the incoming-frame fade.
431
+ *
432
+ * MUST be rendered inside the surface's scroll content and MUST NOT be given a
433
+ * growing/stretching style: it is sized by its own content, which is what lets
434
+ * it report the incoming frame's natural height while the panel is still pinned
435
+ * at the outgoing one.
436
+ */
437
+ export function DialogMorphContent({
438
+ morph,
439
+ style,
440
+ children
441
+ }) {
442
+ return /*#__PURE__*/_jsx(DialogFrameContext.Provider, {
443
+ value: morph.channel,
444
+ children: /*#__PURE__*/_jsx(Animated.View, {
445
+ onLayout: morph.onContentLayout,
446
+ style: [style, morph.contentStyle],
447
+ children: children
448
+ })
449
+ });
450
+ }
451
+ //# sourceMappingURL=DialogMorph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","createContext","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","Animated","cancelAnimation","Easing","useAnimatedStyle","useSharedValue","withTiming","jsx","_jsx","DIALOG_MORPH_DURATION","DIALOG_MORPH_FADE_DURATION","MORPH_MEASURE_TIMEOUT_MS","MORPH_EASING","out","cubic","MAX_PANEL_CHROME","MIN_MEASURABLE_CONTENT","createFrameChannel","last","handler","frameListener","setFrame","frame","previous","key","setHandler","next","setFrameListener","DialogFrameContext","useDialogFrame","channel","morph","sizeHeight","size","height","sizeMaxWidth","maxWidth","undefined","useDialogMorph","enabled","measurable","maxHeight","pinned","widthPinned","width","declaredHeight","declaredMaxWidth","fade","panelHeight","contentHeight","chrome","awaitingSize","releaseTimer","maxHeightRef","current","measurableRef","enabledRef","activeMaxWidth","value","clearReleaseTimer","clearTimeout","release","settle","naturalContentHeight","from","to","Math","max","min","abs","duration","easing","finished","fromWidth","toWidth","setTimeout","calibrate","delta","onPanelLayout","event","nativeEvent","layout","onContentLayout","natural","panelStyle","resolvedHeight","resolvedMaxWidth","contentStyle","opacity","DialogMorphContent","style","children","Provider","View","onLayout"],"sourceRoot":"../../../src","sources":["dialog/DialogMorph.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,WAAW,EACXC,UAAU,EACV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EV,QAAQ,CAAC,CAAC;EAEpF,MAAMmD,YAAY,GAAGnF,gBAAgB,CACnC,OAAO;IAAEoF,OAAO,EAAEzC,IAAI,CAACW;EAAM,CAAC,CAAC,EAC/B,CAACX,IAAI,CACP,CAAC;EAED,OAAO;IACLjB,OAAO;IACPgD,aAAa;IACbI,eAAe;IACfE,UAAU;IACVG;EACF,CAAC;AACH;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,kBAAkBA,CAAC;EACjC1D,KAAK;EACL2D,KAAK;EACLC;AAKF,CAAC,EAAsB;EACrB,oBACEnF,IAAA,CAACoB,kBAAkB,CAACgE,QAAQ;IAAClC,KAAK,EAAE3B,KAAK,CAACD,OAAQ;IAAA6D,QAAA,eAChDnF,IAAA,CAACP,QAAQ,CAAC4F,IAAI;MAACC,QAAQ,EAAE/D,KAAK,CAACmD,eAAgB;MAACQ,KAAK,EAAE,CAACA,KAAK,EAAE3D,KAAK,CAACwD,YAAY,CAAE;MAAAI,QAAA,EAChFA;IAAQ,CACI;EAAC,CACW,CAAC;AAElC","ignoreList":[]}
@@ -4,4 +4,6 @@ export { Dialog, DIALOG_SHEET_BACKDROP_TESTID } from './Dialog';
4
4
  export { BloomDialogProvider } from './BloomDialogProvider';
5
5
  export { alert } from "./alert.js";
6
6
  export { useDialogContext, useDialogControl } from "./context.js";
7
+ export { useDialogHeader } from "./DialogHeader.js";
8
+ export { useDialogFrame } from "./DialogMorph.js";
7
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl"],"sourceRoot":"../../../src","sources":["dialog/index.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,4BAA4B,QAAQ,UAAU;AAC/D,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAW","ignoreList":[]}
1
+ {"version":3,"names":["Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","useDialogHeader","useDialogFrame"],"sourceRoot":"../../../src","sources":["dialog/index.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,4BAA4B,QAAQ,UAAU;AAC/D,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAW;AAC9D,SAASC,eAAe,QAAQ,mBAAgB;AAChD,SAASC,cAAc,QAAQ,kBAAe","ignoreList":[]}
@@ -14,4 +14,6 @@ export { Dialog, BLOOM_DIALOG_CSS, DIALOG_SHEET_BACKDROP_TESTID } from "./Dialog
14
14
  export { BloomDialogProvider } from "./BloomDialogProvider.web.js";
15
15
  export { alert } from "./alert.js";
16
16
  export { useDialogContext, useDialogControl } from "./context.js";
17
+ export { useDialogHeader } from "./DialogHeader.js";
18
+ export { useDialogFrame } from "./DialogMorph.js";
17
19
  //# sourceMappingURL=index.web.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Dialog","BLOOM_DIALOG_CSS","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl"],"sourceRoot":"../../../src","sources":["dialog/index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,gBAAgB,EAAEC,4BAA4B,QAAQ,iBAAc;AACrF,SAASC,mBAAmB,QAAQ,8BAA2B;AAC/D,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAW","ignoreList":[]}
1
+ {"version":3,"names":["Dialog","BLOOM_DIALOG_CSS","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","useDialogHeader","useDialogFrame"],"sourceRoot":"../../../src","sources":["dialog/index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,EAAEC,gBAAgB,EAAEC,4BAA4B,QAAQ,iBAAc;AACrF,SAASC,mBAAmB,QAAQ,8BAA2B;AAC/D,SAASC,KAAK,QAAQ,YAAS;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,cAAW;AAC9D,SAASC,eAAe,QAAQ,mBAAgB;AAChD,SAASC,cAAc,QAAQ,kBAAe","ignoreList":[]}
@@ -26,7 +26,7 @@ export { sizes as iconSizes, useCommonSVGProps } from "./icons/common.js";
26
26
 
27
27
  // Core components
28
28
  export * from './portal';
29
- export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl } from './dialog';
29
+ export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, useDialogHeader } from './dialog';
30
30
  // Surface stack — the shared, coordinated overlay system. The imperative API is
31
31
  // the `surfaces` object (its members would otherwise clash with alert-dialog's
32
32
  // `confirm`); the individual functions are also named exports of
@@ -69,7 +69,7 @@ export { AnimatedCheck } from "./animated-check/index.js";
69
69
  // Form components
70
70
  export * from "./text-field/index.js";
71
71
  export * from "./segmented-control/index.js";
72
- export { SearchInput } from "./search-input/index.js";
72
+ export { Search } from "./search/index.js";
73
73
  export { Label } from "./label/index.js";
74
74
  export { Field } from "./field/index.js";
75
75
  export { InputGroup } from "./input-group/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":["atoms","flatten","Z_INDEX","zIndex","tokens","web","native","ios","android","platform","select","bloomTailwindPreset","bloomThemeCss","bloomThemeBlock","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","SPACING","RADIUS","BORDER_WIDTH","TYPOGRAPHY","FONT_FAMILY_VARS","SHADOW_BOX","bloomShadowStyle","useInteractionState","useDelayedLoading","useThrottledValue","useHaptics","BloomHapticsProvider","useGutters","useImagePreload","preloadImage","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","surfaces","SurfaceProvider","SurfaceHost","useSurface","Fab","FrostedIconButton","ErrorBoundary","AvatarGroup","UserHoverCard","toast","Typography","Skeleton","Grid","Fill","MediaInsetBorder","IconCircle","ConnectionDots","BenefitRow","BenefitList","PressableScale","PressableWithHover","SubtleHover","ScaleAndFadeIn","ScaleAndFadeOut","ShrinkAndPop","ScreenTransition","AnimatedCheck","SearchInput","Label","Field","InputGroup","Slider","Combobox","BottomSheet","LinkPreviewCard","CompositionBar","DotGridMeter","StatBar","ActivityHeatmap","bucketByDay","ProfileCard","Item","Kbd","AlertDialog","AlertDialogHost","confirm","Command","Code","Fonts"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,MAAM,QAAQ,mBAAU;AAE1D,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,aAAa,EACbC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,YAAY,EACZC,OAAO,EACPC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,QACX,0BAAiB;AAYxB;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,UAAU,EAAEC,oBAAoB,QAAQ,uBAAoB;AAErE,SAASC,UAAU,QAAQ,uBAAoB;AAE/C,SAASC,eAAe,EAAEC,YAAY,Q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,mBAAU;AAE1F,SAASC,aAAa,QAAQ,2BAAkB;AAGhD;AACA,cAAc,uBAAc;AAC5B,cAAc,8BAAqB;AACnC,SAASC,WAAW,QAAQ,yBAAgB;AAC5C,SAASC,KAAK,QAAQ,kBAAS;AAE/B,SAASC,KAAK,QAAQ,kBAAS;AAE/B,SAASC,UAAU,QAAQ,wBAAe;AAE1C,SAASC,MAAM,QAAQ,mBAAU;AAEjC,SAASC,QAAQ,QAAQ,YAAY;AAGrC;AACA,SAASC,WAAW,QAAQ,gBAAgB;AAG5C;AACA,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,sBAAa;AAC3B,SAASC,eAAe,QAAQ,yBAAgB;AAGhD;AACA,SAASC,cAAc,QAAQ,4BAAmB;AAElD,SAASC,YAAY,QAAQ,2BAAkB;AAE/C,SAASC,OAAO,QAAQ,qBAAY;AAOpC,SAASC,eAAe,EAAEC,WAAW,QAAQ,6BAAoB;AAEjE,SAASC,WAAW,QAAQ,yBAAgB;AAU5C;AACA,cAAc,0BAAiB;AAC/B,SAASC,IAAI,QAAQ,iBAAQ;AAE7B,SAASC,GAAG,QAAQ,gBAAO;AAG3B;AACA,cAAc,uBAAc;AAC5B,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,SAASC,WAAW,EAAEC,eAAe,EAAEC,OAAO,QAAQ,gBAAgB;AAMtE,SAASC,OAAO,QAAQ,WAAW;AAGnC;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["atoms","flatten","Z_INDEX","zIndex","tokens","web","native","ios","android","platform","select","bloomTailwindPreset","bloomThemeCss","bloomThemeBlock","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","SPACING","RADIUS","BORDER_WIDTH","TYPOGRAPHY","FONT_FAMILY_VARS","SHADOW_BOX","bloomShadowStyle","useInteractionState","useDelayedLoading","useThrottledValue","useHaptics","BloomHapticsProvider","useGutters","useImagePreload","preloadImage","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","useDialogHeader","surfaces","SurfaceProvider","SurfaceHost","useSurface","Fab","FrostedIconButton","ErrorBoundary","AvatarGroup","UserHoverCard","toast","Typography","Skeleton","Grid","Fill","MediaInsetBorder","IconCircle","ConnectionDots","BenefitRow","BenefitList","PressableScale","PressableWithHover","SubtleHover","ScaleAndFadeIn","ScaleAndFadeOut","ShrinkAndPop","ScreenTransition","AnimatedCheck","Search","Label","Field","InputGroup","Slider","Combobox","BottomSheet","LinkPreviewCard","CompositionBar","DotGridMeter","StatBar","ActivityHeatmap","bucketByDay","ProfileCard","Item","Kbd","AlertDialog","AlertDialogHost","confirm","Command","Code","Fonts"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,MAAM,QAAQ,mBAAU;AAE1D,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,aAAa,EACbC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,YAAY,EACZC,OAAO,EACPC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,QACX,0BAAiB;AAYxB;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8B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@ -31,7 +31,7 @@ export { sizes as iconSizes, useCommonSVGProps } from "./icons/common.js";
31
31
 
32
32
  // Core components
33
33
  export * from "./portal/index.web.js";
34
- export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl } from "./dialog/index.web.js";
34
+ export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, useDialogHeader } from "./dialog/index.web.js";
35
35
  // Surface stack — the shared, coordinated overlay system. The imperative API is
36
36
  // the `surfaces` object (its members would otherwise clash with alert-dialog's
37
37
  // `confirm`); the individual functions are also named exports of
@@ -74,7 +74,7 @@ export { AnimatedCheck } from "./animated-check/index.js";
74
74
  // Form components
75
75
  export * from "./text-field/index.js";
76
76
  export * from "./segmented-control/index.js";
77
- export { SearchInput } from "./search-input/index.js";
77
+ export { Search } from "./search/index.js";
78
78
  export { Label } from "./label/index.js";
79
79
  export { Field } from "./field/index.js";
80
80
  export { InputGroup } from "./input-group/index.js";
@@ -1 +1 @@
1
- {"version":3,"names":["atoms","flatten","Z_INDEX","zIndex","tokens","web","native","ios","android","platform","select","bloomTailwindPreset","bloomThemeCss","bloomThemeBlock","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","SPACING","RADIUS","BORDER_WIDTH","TYPOGRAPHY","FONT_FAMILY_VARS","SHADOW_BOX","bloomShadowStyle","useInteractionState","useDelayedLoading","useThrottledValue","useHaptics","BloomHapticsProvider","useGutters","useImagePreload","preloadImage","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","surfaces","SurfaceProvider","SurfaceHost","useSurface","Fab","FrostedIconButton","ErrorBoundary","AvatarGroup","UserHoverCard","toast","Typography","Skeleton","Grid","Fill","MediaInsetBorder","IconCircle","ConnectionDots","BenefitRow","BenefitList","PressableScale","PressableWithHover","SubtleHover","ScaleAndFadeIn","ScaleAndFadeOut","ShrinkAndPop","ScreenTransition","AnimatedCheck","SearchInput","Label","Field","InputGroup","Slider","Combobox","BottomSheet","LinkPreviewCard","CompositionBar","DotGridMeter","StatBar","ActivityHeatmap","bucketByDay","ProfileCard","Item","Kbd","AlertDialog","AlertDialogHost","confirm","Command","Code","Fonts"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,MAAM,QAAQ,mBAAU;AAE1D,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,aAAa,EACbC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,YAAY,EACZC,OAAO,EACPC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,QACX,0BAAiB;AAYxB;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,UAAU,EAAEC,oBAAoB,QAAQ,uBAAoB;AAErE,SAASC,UAAU,QAAQ,uBAAoB;AAE/C,SAASC,eAAe,EAAEC,YAAY,QAAQ,4BAAyB;;AAEvE;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS;AAChC,SAAkCC,KAAK,IAAIC,SAAS,EAAEC,iBAAiB,QAAQ,mBAAgB;;AAE/F;AACA,cAAc,uBAAoB;AAClC,SACEC,MAAM,EACNC,4BAA4B,EAC5BC,mBAAmB,EACnBC,KAAK,EACLC,gBAAgB,EAChBC,gBAAgB,QACX,uBAAoB;AAa3B;AACA;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,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AAsB;AAG/C;AACA,SAASC,WAAW,QAAQ,6BAA0B;AAGtD;AACA,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,sBAAa;AAC3B,SAASC,eAAe,QAAQ,yBAAgB;AAGhD;AACA,SAASC,cAAc,QAAQ,4BAAmB;AAElD,SAASC,YAAY,QAAQ,2BAAkB;AAE/C,SAASC,OAAO,QAAQ,qBAAY;AAOpC,SAASC,eAAe,EAAEC,WAAW,QAAQ,6BAAoB;AAEjE,SAASC,WAAW,QAAQ,yBAAgB;AAU5C;AACA,cAAc,0BAAiB;AAC/B,SAASC,IAAI,QAAQ,iBAAQ;AAE7B,SAASC,GAAG,QAAQ,gBAAO;AAG3B;AACA,cAAc,uBAAc;AAC5B,cAAc,qBAAkB;AAChC,cAAc,wBAAqB;AACnC,cAAc,uBAAoB;AAClC,cAAc,6BAA0B;AACxC,cAAc,wBAAqB;AACnC,SAASC,WAAW,EAAEC,eAAe,EAAEC,OAAO,QAAQ,6BAA0B;AAMhF,SAASC,OAAO,QAAQ,wBAAqB;AAG7C;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,sBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["atoms","flatten","Z_INDEX","zIndex","tokens","web","native","ios","android","platform","select","bloomTailwindPreset","bloomThemeCss","bloomThemeBlock","FILL_ROLES","TEXT_ROLES","BORDER_ROLES","SPACING","RADIUS","BORDER_WIDTH","TYPOGRAPHY","FONT_FAMILY_VARS","SHADOW_BOX","bloomShadowStyle","useInteractionState","useDelayedLoading","useThrottledValue","useHaptics","BloomHapticsProvider","useGutters","useImagePreload","preloadImage","Icons","sizes","iconSizes","useCommonSVGProps","Dialog","DIALOG_SHEET_BACKDROP_TESTID","BloomDialogProvider","alert","useDialogContext","useDialogControl","useDialogHeader","surfaces","SurfaceProvider","SurfaceHost","useSurface","Fab","FrostedIconButton","ErrorBoundary","AvatarGroup","UserHoverCard","toast","Typography","Skeleton","Grid","Fill","MediaInsetBorder","IconCircle","ConnectionDots","BenefitRow","BenefitList","PressableScale","PressableWithHover","SubtleHover","ScaleAndFadeIn","ScaleAndFadeOut","ShrinkAndPop","ScreenTransition","AnimatedCheck","Search","Label","Field","InputGroup","Slider","Combobox","BottomSheet","LinkPreviewCard","CompositionBar","DotGridMeter","StatBar","ActivityHeatmap","bucketByDay","ProfileCard","Item","Kbd","AlertDialog","AlertDialogHost","confirm","Command","Code","Fonts"],"sourceRoot":"../../src","sources":["index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA;AACA,cAAc,kBAAS;;AAEvB;AACA,SAASA,KAAK,EAAEC,OAAO,EAAEC,OAAO,EAAEC,MAAM,QAAQ,mBAAU;AAE1D,OAAO,KAAKC,MAAM,MAAM,oBAAiB;AACzC,SAASC,GAAG,EAAEC,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,sBAAmB;;AAE/E;AACA;AACA;AACA,SACEC,mBAAmB,EACnBC,aAAa,EACbC,eAAe,EACfC,UAAU,EACVC,UAAU,EACVC,YAAY,EACZC,OAAO,EACPC,MAAM,EACNC,YAAY,EACZC,UAAU,EACVC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,QACX,0BAAiB;AAYxB;AACA,SAASC,mBAAmB,QAAQ,gCAA6B;AACjE,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,UAAU,EAAEC,oBAAoB,QAAQ,uBAAoB;AAErE,SAASC,UAAU,QAAQ,uBAAoB;AAE/C,SAASC,eAAe,EAAEC,YAAY,QAAQ,4BAAyB;;AAEvE;AACA,OAAO,KAAKC,KAAK,MAAM,kBAAS;AAChC,SAAkCC,KAAK,IAAIC,SAAS,EAAEC,iBAAiB,QAAQ,mBAAgB;;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SAASC,MAAM,QAAQ,mBAAU;AACjC,SAASC,KAAK,QAAQ,kBAAS;AAE/B,SAASC,KAAK,QAAQ,kBAAS;AAE/B,SAASC,UAAU,QAAQ,wBAAe;AAE1C,SAASC,MAAM,QAAQ,mBAAU;AAEjC,SAASC,QAAQ,QAAQ,yBAAsB;AAG/C;AACA,SAASC,WAAW,QAAQ,6BAA0B;AAGtD;AACA,cAAc,iBAAQ;AACtB,cAAc,kBAAS;AACvB,cAAc,iBAAQ;AACtB,cAAc,iBAAQ;AACtB,cAAc,qBAAY;AAC1B,cAAc,sBAAa;AAC3B,SAASC,eAAe,QAAQ,yBAAgB;AAGhD;AACA,SAASC,cAAc,QAAQ,4BAAmB;AAElD,SAASC,YAAY,QAAQ,2BAAkB;AAE/C,SAASC,OAAO,QAAQ,qBAAY;AAOpC,SAASC,eAAe,EAAEC,WAAW,QAAQ,6BAAoB;AAEjE,SAASC,WAAW,QAAQ,yBAAgB;AAU5C;AACA,cAAc,0BAAiB;AAC/B,SAASC,IAAI,QAAQ,iBAAQ;AAE7B,SAASC,GAAG,QAAQ,gBAAO;AAG3B;AACA,cAAc,uBAAc;AAC5B,cAAc,qBAAkB;AAChC,cAAc,wBAAqB;AACnC,cAAc,uBAAoB;AAClC,cAAc,6BAA0B;AACxC,cAAc,wBAAqB;AACnC,SAASC,WAAW,EAAEC,eAAe,EAAEC,OAAO,QAAQ,6BAA0B;AAMhF,SAASC,OAAO,QAAQ,wBAAqB;AAG7C;AACA,OAAO,KAAKC,IAAI,MAAM,iBAAQ;;AAE9B;AACA,OAAO,KAAKC,KAAK,MAAM,sBAAmB","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * `className` support for React Native core components in Bloom.
5
+ *
6
+ * Bloom styles some primitives with NativeWind/`react-native-css` utility
7
+ * classes (`className="..."`). react-native-css applies them at runtime — on web
8
+ * as real CSS classes emitted by the consumer's Tailwind pipeline (`@source`-
9
+ * scanning Bloom's lib), on native as compiled styles. This ambient augmentation
10
+ * makes `className` type-valid on the RN primitives we set it on.
11
+ *
12
+ * Heritage-free (a plain interface-merge `declare module`, no `extends` / import
13
+ * of RN's own module graph) so it never drags a second `@types/react` copy into
14
+ * the RN 0.85 / React 19 tree — the same hazard the `mergeRefs` note calls out.
15
+ */
16
+ // `export {}` makes this file a MODULE, so the `declare module` below MERGES
17
+ // with react-native's real types (an augmentation) instead of replacing the
18
+ // module and hiding its exports.
19
+ export {};
20
+ //# sourceMappingURL=react-native-className.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["react-native-className.d.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -8,8 +8,11 @@ import { Button } from '../button';
8
8
  import { TextField, TextFieldIcon, TextFieldInput } from "../text-field/index.js";
9
9
  import { MagnifyingGlass_Stroke2_Corner0_Rounded as MagnifyingGlassIcon } from "../icons/MagnifyingGlass.js";
10
10
  import { TimesLarge_Stroke2_Corner0_Rounded as X } from "../icons/Times.js";
11
+
12
+ /** Fully-rounded (pill) corner radius — clamps to half the field height. */
11
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- export const SearchInput = /*#__PURE__*/forwardRef(function SearchInput({
14
+ const PILL_RADIUS = 999;
15
+ export const Search = /*#__PURE__*/forwardRef(function Search({
13
16
  value,
14
17
  label = 'Search',
15
18
  onClearText,
@@ -20,6 +23,7 @@ export const SearchInput = /*#__PURE__*/forwardRef(function SearchInput({
20
23
  return /*#__PURE__*/_jsxs(View, {
21
24
  style: [a.w_full, a.relative],
22
25
  children: [/*#__PURE__*/_jsxs(TextField, {
26
+ radius: PILL_RADIUS,
23
27
  children: [/*#__PURE__*/_jsx(TextFieldIcon, {
24
28
  icon: MagnifyingGlassIcon
25
29
  }), /*#__PURE__*/_jsx(TextFieldInput, {
@@ -68,5 +72,5 @@ export const SearchInput = /*#__PURE__*/forwardRef(function SearchInput({
68
72
  })]
69
73
  });
70
74
  });
71
- SearchInput.displayName = 'SearchInput';
75
+ Search.displayName = 'Search';
72
76
  //# sourceMappingURL=index.js.map