@oxyhq/bloom 0.44.1 → 0.46.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/lib/commonjs/dialog/Dialog.js +12 -3
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +23 -8
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/index.js +29 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +73 -44
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/surfaces/SurfaceHost.js +189 -0
- package/lib/commonjs/surfaces/SurfaceHost.js.map +1 -0
- package/lib/commonjs/surfaces/api.js +83 -0
- package/lib/commonjs/surfaces/api.js.map +1 -0
- package/lib/commonjs/surfaces/index.js +82 -0
- package/lib/commonjs/surfaces/index.js.map +1 -0
- package/lib/commonjs/surfaces/index.web.js +77 -0
- package/lib/commonjs/surfaces/index.web.js.map +1 -0
- package/lib/commonjs/surfaces/prompts.js +154 -0
- package/lib/commonjs/surfaces/prompts.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceStore.js +172 -0
- package/lib/commonjs/surfaces/surfaceStore.js.map +1 -0
- package/lib/commonjs/surfaces/types.js +6 -0
- package/lib/commonjs/surfaces/types.js.map +1 -0
- package/lib/commonjs/surfaces/useSurface.js +36 -0
- package/lib/commonjs/surfaces/useSurface.js.map +1 -0
- package/lib/commonjs/theme/BloomThemeProvider.js +34 -15
- package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/ambient-store.js +153 -0
- package/lib/commonjs/theme/ambient-store.js.map +1 -0
- package/lib/commonjs/theme/index.js +13 -0
- package/lib/commonjs/theme/index.js.map +1 -1
- package/lib/module/dialog/Dialog.js +13 -4
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +23 -8
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +5 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/surfaces/SurfaceHost.js +184 -0
- package/lib/module/surfaces/SurfaceHost.js.map +1 -0
- package/lib/module/surfaces/api.js +48 -0
- package/lib/module/surfaces/api.js.map +1 -0
- package/lib/module/surfaces/index.js +24 -0
- package/lib/module/surfaces/index.js.map +1 -0
- package/lib/module/surfaces/index.web.js +19 -0
- package/lib/module/surfaces/index.web.js.map +1 -0
- package/lib/module/surfaces/prompts.js +148 -0
- package/lib/module/surfaces/prompts.js.map +1 -0
- package/lib/module/surfaces/surfaceStore.js +159 -0
- package/lib/module/surfaces/surfaceStore.js.map +1 -0
- package/lib/module/surfaces/types.js +4 -0
- package/lib/module/surfaces/types.js.map +1 -0
- package/lib/module/surfaces/useSurface.js +31 -0
- package/lib/module/surfaces/useSurface.js.map +1 -0
- package/lib/module/theme/BloomThemeProvider.js +34 -15
- package/lib/module/theme/BloomThemeProvider.js.map +1 -1
- package/lib/module/theme/ambient-store.js +146 -0
- package/lib/module/theme/ambient-store.js.map +1 -0
- package/lib/module/theme/index.js +1 -0
- package/lib/module/theme/index.js.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +10 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts +25 -0
- package/lib/typescript/commonjs/surfaces/SurfaceHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/api.d.ts +41 -0
- package/lib/typescript/commonjs/surfaces/api.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/index.d.ts +25 -0
- package/lib/typescript/commonjs/surfaces/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/index.web.d.ts +20 -0
- package/lib/typescript/commonjs/surfaces/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/prompts.d.ts +13 -0
- package/lib/typescript/commonjs/surfaces/prompts.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts +51 -0
- package/lib/typescript/commonjs/surfaces/surfaceStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/types.d.ts +145 -0
- package/lib/typescript/commonjs/surfaces/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/surfaces/useSurface.d.ts +21 -0
- package/lib/typescript/commonjs/surfaces/useSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/ambient-store.d.ts +61 -0
- package/lib/typescript/commonjs/theme/ambient-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +2 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +10 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts +25 -0
- package/lib/typescript/module/surfaces/SurfaceHost.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/api.d.ts +41 -0
- package/lib/typescript/module/surfaces/api.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/index.d.ts +25 -0
- package/lib/typescript/module/surfaces/index.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/index.web.d.ts +20 -0
- package/lib/typescript/module/surfaces/index.web.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/prompts.d.ts +13 -0
- package/lib/typescript/module/surfaces/prompts.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/surfaceStore.d.ts +51 -0
- package/lib/typescript/module/surfaces/surfaceStore.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/types.d.ts +145 -0
- package/lib/typescript/module/surfaces/types.d.ts.map +1 -0
- package/lib/typescript/module/surfaces/useSurface.d.ts +21 -0
- package/lib/typescript/module/surfaces/useSurface.d.ts.map +1 -0
- package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
- package/lib/typescript/module/theme/ambient-store.d.ts +61 -0
- package/lib/typescript/module/theme/ambient-store.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +2 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -1
- package/package.json +17 -1
- package/src/__tests__/ambient-theme.test.tsx +136 -0
- package/src/__tests__/surfaceStore.test.ts +219 -0
- package/src/dialog/Dialog.tsx +14 -3
- package/src/dialog/Dialog.web.tsx +25 -6
- package/src/dialog/types.ts +10 -0
- package/src/index.ts +15 -0
- package/src/index.web.ts +15 -0
- package/src/surfaces/SurfaceHost.tsx +207 -0
- package/src/surfaces/api.ts +55 -0
- package/src/surfaces/index.ts +38 -0
- package/src/surfaces/index.web.ts +33 -0
- package/src/surfaces/prompts.tsx +178 -0
- package/src/surfaces/surfaceStore.ts +168 -0
- package/src/surfaces/types.ts +156 -0
- package/src/surfaces/useSurface.ts +33 -0
- package/src/theme/BloomThemeProvider.tsx +52 -13
- package/src/theme/ambient-store.ts +186 -0
- package/src/theme/index.ts +7 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { SurfaceConfirmOptions, SurfacePromptOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Present a confirm surface stacked on top of anything currently open. Resolves
|
|
4
|
+
* `true` on confirm, `false` on cancel OR on backdrop/Escape/back dismissal.
|
|
5
|
+
*/
|
|
6
|
+
export declare function confirm(options: SurfaceConfirmOptions): Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Present a prompt surface stacked on top of anything currently open. Resolves
|
|
9
|
+
* the entered string on submit, or `null` on cancel OR backdrop/Escape/back
|
|
10
|
+
* dismissal.
|
|
11
|
+
*/
|
|
12
|
+
export declare function prompt(options: SurfacePromptOptions): Promise<string | null>;
|
|
13
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/prompts.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,qBAAqB,EAErB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAyIjB;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CASxE;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAS5E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PresentOptions, SurfaceEntry, SurfaceRenderFn } from './types';
|
|
2
|
+
/** Subscribe to stack changes. Returns an unsubscribe fn. */
|
|
3
|
+
export declare function subscribe(listener: () => void): () => void;
|
|
4
|
+
/** Current stack snapshot (stable ref while unchanged). Bottom→top. */
|
|
5
|
+
export declare function getSnapshot(): readonly SurfaceEntry[];
|
|
6
|
+
/**
|
|
7
|
+
* Present a new surface on TOP of the stack. Returns a promise that resolves
|
|
8
|
+
* with the value passed to `dismiss(result)` (or `undefined` when the surface is
|
|
9
|
+
* dismissed without a result / by a stack-wide clear).
|
|
10
|
+
*/
|
|
11
|
+
export declare function present<Result = unknown>(render: SurfaceRenderFn, opts?: PresentOptions): Promise<Result>;
|
|
12
|
+
/**
|
|
13
|
+
* Request dismissal of a surface. RESOLVES THE PROMISE IMMEDIATELY (the exit
|
|
14
|
+
* animation that follows is cosmetic) and flips the entry to `'closing'` so the
|
|
15
|
+
* host runs its exit animation. Resolution is resolve-once via the `settled`
|
|
16
|
+
* guard — a second request (or the host's post-exit `onClose`) never re-resolves
|
|
17
|
+
* with a different value. Bumps the entry `generation` so a completion callback
|
|
18
|
+
* from a superseded cycle is inert.
|
|
19
|
+
*/
|
|
20
|
+
export declare function requestDismiss(id: string, result?: unknown): void;
|
|
21
|
+
/**
|
|
22
|
+
* Splice a surface out of the stack once its exit animation has settled. Called
|
|
23
|
+
* by the host from the `Dialog`'s post-exit `onClose`. Idempotent and gated on
|
|
24
|
+
* `'closing'` status: a stale/duplicate call — or one for an entry that is not
|
|
25
|
+
* actually closing — is a no-op, which (together with unique entry ids) is the
|
|
26
|
+
* stale-callback hygiene `BottomSheetBase`'s generation guard provides for its
|
|
27
|
+
* reused instance.
|
|
28
|
+
*/
|
|
29
|
+
export declare function finalizeClose(id: string): void;
|
|
30
|
+
/** Dismiss the TOP surface, resolving its promise with `result`. */
|
|
31
|
+
export declare function dismissTop(result?: unknown): void;
|
|
32
|
+
/**
|
|
33
|
+
* Dismiss every surface ABOVE the bottom-most one, keeping the root surface
|
|
34
|
+
* open. Pending awaiters of the dismissed surfaces resolve with `undefined` so
|
|
35
|
+
* they never hang. No-op with 0 or 1 surfaces.
|
|
36
|
+
*/
|
|
37
|
+
export declare function dismissToRoot(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Dismiss the ENTIRE stack. Every pending awaiter resolves with `undefined` so
|
|
40
|
+
* none hang.
|
|
41
|
+
*/
|
|
42
|
+
export declare function dismissAll(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Hard-reset the stack synchronously (no exit animation), resolving all pending
|
|
45
|
+
* awaiters with `undefined`. Used when the host provider unmounts so no
|
|
46
|
+
* `present()` promise is stranded.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resetSurfaces(): void;
|
|
49
|
+
/** Test-only: hard-reset without notifying (drops listeners' work). */
|
|
50
|
+
export declare function __resetSurfacesForTests(): void;
|
|
51
|
+
//# sourceMappingURL=surfaceStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceStore.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/surfaceStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EAChB,MAAM,SAAS,CAAC;AAoCjB,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAK1D;AAED,uEAAuE;AACvE,wBAAgB,WAAW,IAAI,SAAS,YAAY,EAAE,CAErD;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,GAAG,OAAO,EACtC,MAAM,EAAE,eAAe,EACvB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,MAAM,CAAC,CAcjB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAmBjE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAM9C;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAGjD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAGjC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAQpC;AAED,uEAAuE;AACvE,wBAAgB,uBAAuB,IAAI,IAAI,CAG9C"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { DialogInset, ResponsiveDialogPlacement } from '../dialog/types';
|
|
4
|
+
/**
|
|
5
|
+
* How a surface renders — the placement + the `Dialog` sizing/chrome options a
|
|
6
|
+
* surface needs. This is the CONTENT-AGNOSTIC presentation config: it never
|
|
7
|
+
* references a route or screen name (Bloom's stack knows nothing about routes;
|
|
8
|
+
* the SDK layers its route registry on top).
|
|
9
|
+
*
|
|
10
|
+
* The values map 1:1 onto the shared {@link ../dialog/types#DialogProps}, so a
|
|
11
|
+
* surface reads/behaves identically to a hand-mounted `<Dialog>` with the same
|
|
12
|
+
* props — only stacked/coordinated by {@link SurfaceHost}.
|
|
13
|
+
*/
|
|
14
|
+
export interface SurfacePresentation {
|
|
15
|
+
/**
|
|
16
|
+
* Surface anchor. Defaults to `{ base: 'bottom', md: 'center' }` — a bottom
|
|
17
|
+
* sheet on narrow viewports that becomes a centered modal on wide ones (the
|
|
18
|
+
* ecosystem's canonical responsive "sheet"). Pass `'center'` for a plain
|
|
19
|
+
* modal, `'left'`/`'right'` for a drawer, or any responsive placement map.
|
|
20
|
+
*/
|
|
21
|
+
placement?: ResponsiveDialogPlacement;
|
|
22
|
+
/** Side-sheet width (px) on wide screens. Forwarded to `Dialog`. */
|
|
23
|
+
width?: number;
|
|
24
|
+
/** Centered-card max width (px). Forwarded to `Dialog`. */
|
|
25
|
+
maxWidth?: number;
|
|
26
|
+
/** Bottom-sheet max height as a fraction of the viewport height. */
|
|
27
|
+
maxHeightRatio?: number;
|
|
28
|
+
/** Side-sheet inset (px) from the root overlay's edges. */
|
|
29
|
+
inset?: DialogInset;
|
|
30
|
+
/** Whether to render the drag handle in bottom-sheet mode. */
|
|
31
|
+
showHandle?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether tapping the backdrop / pressing Escape / Android-back dismisses the
|
|
34
|
+
* surface. Defaults to `true`. Set `false` for a blocking surface that must be
|
|
35
|
+
* dismissed programmatically (e.g. an unanswered required prompt).
|
|
36
|
+
*/
|
|
37
|
+
dismissOnBackdrop?: boolean;
|
|
38
|
+
/** Inner padding (px) of the surface content container. Forwarded to `Dialog`. */
|
|
39
|
+
contentPadding?: number;
|
|
40
|
+
/** Style overrides applied to the inner content container. */
|
|
41
|
+
style?: StyleProp<ViewStyle>;
|
|
42
|
+
/** Style overrides for the side/bottom placement panel surface. */
|
|
43
|
+
panelStyle?: StyleProp<ViewStyle>;
|
|
44
|
+
/** NativeWind classes for the side/bottom placement panel surface. */
|
|
45
|
+
panelClassName?: string;
|
|
46
|
+
/** Style for the root overlay (theme-var scope, rail offset, etc.). */
|
|
47
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
48
|
+
/** NativeWind classes for the root overlay. */
|
|
49
|
+
containerClassName?: string;
|
|
50
|
+
/** Accessibility label applied to the surface's dialog role. */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Stable testID forwarded to the underlying `Dialog`. */
|
|
53
|
+
testID?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Options accepted by `present` / `SurfaceControls.present`. */
|
|
56
|
+
export type PresentOptions = SurfacePresentation;
|
|
57
|
+
/**
|
|
58
|
+
* Controls handed to a presented surface — both as the argument to its render
|
|
59
|
+
* function AND via {@link ../surfaces/useSurface#useSurface}. This is the DEPTH
|
|
60
|
+
* axis only: a surface can dismiss ITSELF (resolving its own `present()`
|
|
61
|
+
* promise) or `present` a CHILD surface stacked above it. Navigation WITHIN a
|
|
62
|
+
* surface (route history / drill-in) is deliberately NOT here — that is the
|
|
63
|
+
* SDK's route layer, which composes on top of this stack.
|
|
64
|
+
*/
|
|
65
|
+
export interface SurfaceControls {
|
|
66
|
+
/**
|
|
67
|
+
* Dismiss THIS surface, resolving the promise returned by the `present` call
|
|
68
|
+
* that created it with `result` (or `undefined`). Resolves immediately; the
|
|
69
|
+
* exit animation is cosmetic.
|
|
70
|
+
*/
|
|
71
|
+
dismiss: (result?: unknown) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Stack a CHILD surface directly above this one. Resolves with the child's
|
|
74
|
+
* dismissal result. The child paints above (higher layer) and captures
|
|
75
|
+
* backdrop/Escape/back until it is dismissed.
|
|
76
|
+
*/
|
|
77
|
+
present: <Result = unknown>(render: SurfaceRenderFn, opts?: PresentOptions) => Promise<Result>;
|
|
78
|
+
}
|
|
79
|
+
/** A surface's content factory — receives its own {@link SurfaceControls}. */
|
|
80
|
+
export type SurfaceRenderFn = (surface: SurfaceControls) => ReactNode;
|
|
81
|
+
/** Lifecycle status of a stacked surface. */
|
|
82
|
+
export type SurfaceStatus = 'open' | 'closing';
|
|
83
|
+
/**
|
|
84
|
+
* One entry in the surface stack. `resolve` fulfils the `present()` promise; the
|
|
85
|
+
* `settled` guard makes resolution idempotent (resolve-once); `generation` is
|
|
86
|
+
* the per-entry stale-callback guard (carried from `BottomSheetBase`'s
|
|
87
|
+
* `closeGenerationRef`, keyed per entry id) so a completion callback from a
|
|
88
|
+
* superseded close cycle can never tear down the wrong state.
|
|
89
|
+
*/
|
|
90
|
+
export interface SurfaceEntry {
|
|
91
|
+
id: string;
|
|
92
|
+
render: SurfaceRenderFn;
|
|
93
|
+
presentation: SurfacePresentation;
|
|
94
|
+
status: SurfaceStatus;
|
|
95
|
+
resolve: (result: unknown) => void;
|
|
96
|
+
settled: boolean;
|
|
97
|
+
generation: number;
|
|
98
|
+
}
|
|
99
|
+
/** Options for the built-in {@link ../surfaces/prompts#confirm} surface. */
|
|
100
|
+
export interface SurfaceConfirmOptions {
|
|
101
|
+
/** Headline. */
|
|
102
|
+
title: string;
|
|
103
|
+
/** Supporting copy. */
|
|
104
|
+
message?: string;
|
|
105
|
+
/** Confirm button label. Defaults to `'Confirm'`. */
|
|
106
|
+
confirmLabel?: string;
|
|
107
|
+
/** Cancel button label. Defaults to `'Cancel'`. */
|
|
108
|
+
cancelLabel?: string;
|
|
109
|
+
/** Style the confirm button as destructive (negative color). */
|
|
110
|
+
destructive?: boolean;
|
|
111
|
+
/** Hide the cancel button (a single-action acknowledgement). */
|
|
112
|
+
hideCancel?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Backdrop / Escape / back dismiss (resolving `false`). Defaults to `true`;
|
|
115
|
+
* pass `false` for a blocking confirm that must be answered by a button.
|
|
116
|
+
*/
|
|
117
|
+
dismissible?: boolean;
|
|
118
|
+
/** Placement override. Defaults to `'center'`. */
|
|
119
|
+
placement?: ResponsiveDialogPlacement;
|
|
120
|
+
}
|
|
121
|
+
/** Options for the built-in {@link ../surfaces/prompts#prompt} surface. */
|
|
122
|
+
export interface SurfacePromptOptions {
|
|
123
|
+
/** Headline. */
|
|
124
|
+
title: string;
|
|
125
|
+
/** Supporting copy. */
|
|
126
|
+
message?: string;
|
|
127
|
+
/** Input placeholder. */
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
/** Initial input value. */
|
|
130
|
+
defaultValue?: string;
|
|
131
|
+
/** Accessibility label for the input. Defaults to the `title`. */
|
|
132
|
+
inputLabel?: string;
|
|
133
|
+
/** Submit button label. Defaults to `'OK'`. */
|
|
134
|
+
confirmLabel?: string;
|
|
135
|
+
/** Cancel button label. Defaults to `'Cancel'`. */
|
|
136
|
+
cancelLabel?: string;
|
|
137
|
+
/**
|
|
138
|
+
* Backdrop / Escape / back dismiss (resolving `null`). Defaults to `true`;
|
|
139
|
+
* pass `false` for a blocking prompt.
|
|
140
|
+
*/
|
|
141
|
+
dismissible?: boolean;
|
|
142
|
+
/** Placement override. Defaults to `'center'`. */
|
|
143
|
+
placement?: ResponsiveDialogPlacement;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;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D;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,yBAAyB,CAAC;CACvC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SurfaceControls } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Context carrying the CURRENT surface's controls. The host wraps each presented
|
|
4
|
+
* surface's content in a provider bound to that entry's id, so a nested surface
|
|
5
|
+
* reads its OWN controls — `dismiss` targets this surface, `present` stacks a
|
|
6
|
+
* child above it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const SurfaceContext: import("react").Context<SurfaceControls | null>;
|
|
9
|
+
/**
|
|
10
|
+
* Read the current surface's {@link SurfaceControls} from inside a presented
|
|
11
|
+
* surface. Equivalent to the `surface` argument the render function receives —
|
|
12
|
+
* use whichever is convenient (props vs. context).
|
|
13
|
+
*
|
|
14
|
+
* DEPTH only: `dismiss` (resolve this surface's promise + close) and `present`
|
|
15
|
+
* (stack a child). Navigation within a surface is the SDK's route layer, not
|
|
16
|
+
* this hook.
|
|
17
|
+
*
|
|
18
|
+
* @throws if called outside a presented surface.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useSurface(): SurfaceControls;
|
|
21
|
+
//# sourceMappingURL=useSurface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSurface.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/useSurface.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,iDAA8C,CAAC;AAG1E;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAQ5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BloomThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/BloomThemeProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BloomThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/BloomThemeProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAQN,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAWtB,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,OAAO,EAKL,KAAK,iBAAiB,EAEvB,MAAM,eAAe,CAAC;AAIvB,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKhD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,6BAA6B,EAC7B,KAAK,CAAC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,GAC5C,SAAS,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAEpB,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,uFAAuF;IACvF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,Y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`seed` is non-null the whole app is
|
|
3
|
+
* themed from this dynamic seed (same colour engine the `seed` prop uses),
|
|
4
|
+
* overriding the active preset / static `seed` prop. `secondary`/`tertiary` pin
|
|
5
|
+
* this seed's accent families (e.g. the 2nd/3rd colours extracted from artwork).
|
|
6
|
+
*/
|
|
7
|
+
export interface AmbientThemeState {
|
|
8
|
+
readonly seed: string | null;
|
|
9
|
+
readonly secondary: string | null;
|
|
10
|
+
readonly tertiary: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface AmbientAccents {
|
|
13
|
+
secondary?: string | null;
|
|
14
|
+
tertiary?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface AmbientThemeApi {
|
|
17
|
+
/**
|
|
18
|
+
* Set the ambient seed (and optional accents). Coalesced through an internal
|
|
19
|
+
* debounce so rapid hover/scroll doesn't thrash the theme. The debounce lives
|
|
20
|
+
* HERE — apps never own one.
|
|
21
|
+
*/
|
|
22
|
+
setAmbient: (seed: string, accents?: AmbientAccents) => void;
|
|
23
|
+
/** Clear the ambient override, restoring the preset (or the static `seed` prop). */
|
|
24
|
+
clearAmbient: () => void;
|
|
25
|
+
}
|
|
26
|
+
/** Options for {@link useAmbientTheme}. */
|
|
27
|
+
export interface UseAmbientThemeOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Debounce, in ms, applied to `setAmbient`/`clearAmbient` before the store
|
|
30
|
+
* commits. Default `120`. Pass `0` to apply synchronously.
|
|
31
|
+
*/
|
|
32
|
+
debounceMs?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Read + drive the app-wide ambient theme. Reading returns the current override
|
|
36
|
+
* (via `useSyncExternalStore` — stable snapshot ref while unchanged); the
|
|
37
|
+
* returned `setAmbient`/`clearAmbient` are debounced imperative controls.
|
|
38
|
+
*
|
|
39
|
+
* `BloomThemeProvider` consumes the SAME store internally, so calling
|
|
40
|
+
* `setAmbient(...)` from anywhere themes the whole app through the provider's
|
|
41
|
+
* single apply path — no `seed` prop threading, no app-owned theming store.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useAmbientTheme(options?: UseAmbientThemeOptions): AmbientThemeState & AmbientThemeApi;
|
|
44
|
+
/**
|
|
45
|
+
* Provider-side subscription. Returns the current ambient state with a stable
|
|
46
|
+
* ref while unchanged. Uses the same store, so it stays in lockstep with any
|
|
47
|
+
* `useAmbientTheme()` caller.
|
|
48
|
+
*/
|
|
49
|
+
export declare function useAmbientThemeState(): AmbientThemeState;
|
|
50
|
+
/**
|
|
51
|
+
* Non-hook imperative escape hatch (e.g. gesture handlers / worklets bridges /
|
|
52
|
+
* non-React callers). Same debounced store as {@link useAmbientTheme}.
|
|
53
|
+
*/
|
|
54
|
+
export declare const ambientTheme: AmbientThemeApi & {
|
|
55
|
+
getState: () => AmbientThemeState;
|
|
56
|
+
};
|
|
57
|
+
/** Test-only: flush any pending debounced commit synchronously. */
|
|
58
|
+
export declare function __flushAmbientForTests(): void;
|
|
59
|
+
/** Test-only: reset the store to the empty state without notifying via debounce. */
|
|
60
|
+
export declare function __resetAmbientForTests(): void;
|
|
61
|
+
//# sourceMappingURL=ambient-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ambient-store.d.ts","sourceRoot":"","sources":["../../../../src/theme/ambient-store.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7D,oFAAoF;IACpF,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqFD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,CAAC,EAAE,sBAAsB,GAC/B,iBAAiB,GAAG,eAAe,CAUrC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,eAAe,GAAG;IAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;CAI/E,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,sBAAsB,IAAI,IAAI,CAU7C;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,IAAI,IAAI,CAO7C"}
|
|
@@ -13,6 +13,8 @@ export { buildThemeFromSeed, buildColorsFromSeed } from './build-theme-from-seed
|
|
|
13
13
|
export type { SeedAccents } from './build-theme-from-seed';
|
|
14
14
|
export { THEME_GRADIENTS } from './gradients';
|
|
15
15
|
export { useTheme, useThemeColor, useBloomTheme } from './use-theme';
|
|
16
|
+
export { useAmbientTheme, ambientTheme } from './ambient-store';
|
|
17
|
+
export type { AmbientThemeState, AmbientThemeApi, AmbientAccents, UseAmbientThemeOptions, } from './ambient-store';
|
|
16
18
|
export { useNavigationTheme } from './use-navigation-theme';
|
|
17
19
|
export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
|
|
18
20
|
export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YA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AAM,eAAe,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAIL,4BAA4B,EAK7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,2CAab;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAIL,4BAA4B,EAK7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,4BAA4B,EAAE,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,WAAW,2CAab;AAgaD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAoBA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAML,4BAA4B,EAM7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.web.d.ts","sourceRoot":"","sources":["../../../../src/dialog/Dialog.web.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAML,4BAA4B,EAM7B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,YAAY,EAGZ,WAAW,EACZ,MAAM,SAAS,CAAC;AAqCjB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,WAAW,2CAazD;AAoTD,OAAO,EAAE,4BAA4B,EAAE,CAAC;AA6NxC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,2CAgBA;AA8BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,gBAAgB,mZAK5B,CAAC"}
|
|
@@ -154,6 +154,16 @@ export type DialogProps = React.PropsWithChildren<{
|
|
|
154
154
|
containerClassName?: string;
|
|
155
155
|
/** Accessibility label, applied to the dialog role on web. */
|
|
156
156
|
label?: string;
|
|
157
|
+
/**
|
|
158
|
+
* Stacking layer index within a coordinated surface stack. Multiplies
|
|
159
|
+
* `Z_INDEX_LAYER_STEP` onto this dialog's overlay z-indices (backdrop +
|
|
160
|
+
* panel) so a dialog presented on top of another paints above it. Defaults to
|
|
161
|
+
* `0` — the single-dialog case, byte-for-byte unchanged. Set by the shared
|
|
162
|
+
* surface stack (`src/surfaces`); direct consumers rarely need it. No-op for
|
|
163
|
+
* the `bottom` placement, which already stacks in mount order (native RN
|
|
164
|
+
* `<Modal>` / the web portal), so `layer` is harmless there.
|
|
165
|
+
*/
|
|
166
|
+
layer?: number;
|
|
157
167
|
}>;
|
|
158
168
|
/**
|
|
159
169
|
* Web-only options. Native uses bloom's `BottomSheet` underneath which has
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,k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IACtC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,mEAAmE;IACnE,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
|
@@ -18,6 +18,8 @@ export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from '
|
|
|
18
18
|
export * from './portal';
|
|
19
19
|
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog';
|
|
20
20
|
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog';
|
|
21
|
+
export { surfaces, SurfaceProvider, SurfaceHost, useSurface } from './surfaces';
|
|
22
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './surfaces';
|
|
21
23
|
export * from './button';
|
|
22
24
|
export { Fab } from './fab';
|
|
23
25
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACtE,YAAY,E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gB,CAAC;AAC7C,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -18,6 +18,8 @@ export { type Props as IconProps, sizes as iconSizes, useCommonSVGProps } from '
|
|
|
18
18
|
export * from './portal/index.web';
|
|
19
19
|
export { Dialog, DIALOG_SHEET_BACKDROP_TESTID, BloomDialogProvider, alert, useDialogContext, useDialogControl, } from './dialog/index.web';
|
|
20
20
|
export type { AlertButton, AlertButtonStyle, DialogAction, DialogActionColor, DialogContextProps, DialogControlProps, DialogInset, DialogPlacement, DialogProps, ResponsiveDialogPlacement, } from './dialog/index.web';
|
|
21
|
+
export { surfaces, SurfaceProvider, SurfaceHost, useSurface } from './surfaces/index.web';
|
|
22
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './surfaces/index.web';
|
|
21
23
|
export * from './button/index.web';
|
|
22
24
|
export { Fab } from './fab/index.web';
|
|
23
25
|
export type { FabProps, FabVariant, FabSize, FabPlacement } from './fab/index.web';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,UAAU,EACV,UAAU,EACV,YAAY,EACZ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACt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B,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAGxB,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACjF,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DialogProps } from '../dialog/types';
|
|
3
|
+
type DialogComponent = React.ComponentType<DialogProps>;
|
|
4
|
+
/**
|
|
5
|
+
* Build the `<SurfaceHost>` + `<SurfaceProvider>` bound to a platform `Dialog`.
|
|
6
|
+
*
|
|
7
|
+
* `Dialog` is platform-forked (native `BottomSheet`-backed vs. pure-DOM web
|
|
8
|
+
* overlay), so — like `createAlertDialog` — the platform entry files
|
|
9
|
+
* (`index.ts` / `index.web.ts`) inject the correct one. The stack logic below is
|
|
10
|
+
* single-source, no duplication.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createSurfaceHost(Dialog: DialogComponent): {
|
|
13
|
+
SurfaceHost: {
|
|
14
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
SurfaceProvider: {
|
|
18
|
+
({ children }: {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=SurfaceHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurfaceHost.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/SurfaceHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAYnD,KAAK,eAAe,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;AA6BxD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe;;;;;;uBAwFhB;YAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;SAAE;;;EAcrE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { dismissAll, dismissToRoot, present } from './surfaceStore';
|
|
2
|
+
import { confirm, prompt } from './prompts';
|
|
3
|
+
import type { PresentOptions, SurfaceRenderFn } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Dismiss the TOP surface, resolving its `present()` promise with `result`.
|
|
6
|
+
* The public counterpart of the store's `dismissTop`.
|
|
7
|
+
*/
|
|
8
|
+
declare function dismiss(result?: unknown): void;
|
|
9
|
+
/**
|
|
10
|
+
* Dismiss a SPECIFIC surface by id, resolving its `present()` promise with
|
|
11
|
+
* `result`. Rarely needed — most call sites use `dismiss()` (top) or the
|
|
12
|
+
* per-surface `SurfaceControls.dismiss`.
|
|
13
|
+
*/
|
|
14
|
+
declare function dismissById(id: string, result?: unknown): void;
|
|
15
|
+
/**
|
|
16
|
+
* The shared imperative surface-stack API — a module singleton (mirrors
|
|
17
|
+
* `alert()`'s shape) so any consumer, in the SDK or an app, presents into the
|
|
18
|
+
* SAME coordinated Bloom stack from anywhere without threading a provider.
|
|
19
|
+
*
|
|
20
|
+
* Exposed at the package root as `surfaces` (avoids a bare `present`/`confirm`
|
|
21
|
+
* name clash with the existing `alert-dialog` `confirm`); the individual
|
|
22
|
+
* functions are also named exports of `@oxyhq/bloom/surfaces` for direct import.
|
|
23
|
+
*/
|
|
24
|
+
export declare const surfaces: {
|
|
25
|
+
/** Present a new surface on top. Resolves with the dismissal result. */
|
|
26
|
+
readonly present: <Result = unknown>(render: SurfaceRenderFn, opts?: PresentOptions) => Promise<Result>;
|
|
27
|
+
/** Dismiss the top surface. */
|
|
28
|
+
readonly dismiss: typeof dismiss;
|
|
29
|
+
/** Dismiss a specific surface by id. */
|
|
30
|
+
readonly dismissById: typeof dismissById;
|
|
31
|
+
/** Dismiss everything above the root surface. */
|
|
32
|
+
readonly dismissToRoot: typeof dismissToRoot;
|
|
33
|
+
/** Dismiss the entire stack (resolves pending awaiters with `undefined`). */
|
|
34
|
+
readonly dismissAll: typeof dismissAll;
|
|
35
|
+
/** Present a confirm surface; resolves `true`/`false`. */
|
|
36
|
+
readonly confirm: typeof confirm;
|
|
37
|
+
/** Present a prompt surface; resolves the string or `null`. */
|
|
38
|
+
readonly prompt: typeof prompt;
|
|
39
|
+
};
|
|
40
|
+
export { confirm, dismiss, dismissAll, dismissById, dismissToRoot, present, prompt };
|
|
41
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,aAAa,EAEb,OAAO,EAER,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D;;;GAGG;AACH,iBAAS,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAEvC;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;IACnB,wEAAwE;uBAC9D,MAAM,oBAAoB,eAAe,SAAS,cAAc;IAE1E,+BAA+B;;IAE/B,wCAAwC;;IAExC,iDAAiD;;IAEjD,6EAA6E;;IAE7E,0DAA0D;;IAE1D,+DAA+D;;CAEvD,CAAC;AAEX,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared, content-agnostic SURFACE STACK.
|
|
3
|
+
*
|
|
4
|
+
* `<SurfaceProvider>`/`<SurfaceHost>` render the coordinated stack; the
|
|
5
|
+
* imperative `surfaces` API (+ its named functions) present into it from
|
|
6
|
+
* anywhere; `useSurface()` gives a presented surface its own controls.
|
|
7
|
+
*
|
|
8
|
+
* `SurfaceHost`/`SurfaceProvider` are bound to the NATIVE `Dialog` here; the web
|
|
9
|
+
* fork (`./index.web`) binds the web `Dialog`. The store, imperative API, hook,
|
|
10
|
+
* and types are platform-agnostic and shared by both.
|
|
11
|
+
*/
|
|
12
|
+
declare const SurfaceHost: {
|
|
13
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
}, SurfaceProvider: {
|
|
16
|
+
({ children }: {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export { SurfaceHost, SurfaceProvider };
|
|
22
|
+
export { surfaces, present, dismiss, dismissById, dismissToRoot, dismissAll, confirm, prompt, } from './api';
|
|
23
|
+
export { useSurface } from './useSurface';
|
|
24
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './types';
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,QAAA,MAAQ,WAAW;;;GAAE,eAAe;;;;;CAA8B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web variant of the surface stack barrel. Identical surface area to the native
|
|
3
|
+
* `./index.ts` — it just binds the web-fork `Dialog` (`Dialog.web.tsx`, a
|
|
4
|
+
* pure-DOM overlay) instead of the native `BottomSheet`-backed one. The store,
|
|
5
|
+
* imperative API, hook, and types are shared, platform-agnostic modules.
|
|
6
|
+
*/
|
|
7
|
+
declare const SurfaceHost: {
|
|
8
|
+
(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
}, SurfaceProvider: {
|
|
11
|
+
({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export { SurfaceHost, SurfaceProvider };
|
|
17
|
+
export { surfaces, present, dismiss, dismissById, dismissToRoot, dismissAll, confirm, prompt, } from './api';
|
|
18
|
+
export { useSurface } from './useSurface';
|
|
19
|
+
export type { SurfacePresentation, PresentOptions, SurfaceControls, SurfaceRenderFn, SurfaceStatus, SurfaceEntry, SurfaceConfirmOptions, SurfacePromptOptions, } from './types';
|
|
20
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/surfaces/index.web.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,QAAA,MAAQ,WAAW;;;GAAE,eAAe;;;;;CAA8B,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;AACxC,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,WAAW,EACX,aAAa,EACb,UAAU,EACV,OAAO,EACP,MAAM,GACP,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,eAAe,EACf,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|