@oxyhq/bloom 0.45.0 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +34 -12
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/combobox/Combobox.js +3 -3
- package/lib/commonjs/combobox/Combobox.js.map +1 -1
- package/lib/commonjs/command/Command.js +3 -3
- package/lib/commonjs/command/Command.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.js +86 -8
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/Dialog.web.js +176 -18
- package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
- package/lib/commonjs/dialog/DialogBottomSheet.js +84 -29
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/dialog/DialogHeader.js +365 -0
- package/lib/commonjs/dialog/DialogHeader.js.map +1 -0
- package/lib/commonjs/dialog/index.js +7 -0
- package/lib/commonjs/dialog/index.js.map +1 -1
- package/lib/commonjs/dialog/index.web.js +7 -0
- package/lib/commonjs/dialog/index.web.js.map +1 -1
- package/lib/commonjs/index.js +40 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +84 -48
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/react-native-className.d.js +6 -0
- package/lib/commonjs/react-native-className.d.js.map +1 -0
- package/lib/commonjs/{search-input → search}/index.js +5 -3
- package/lib/commonjs/search/index.js.map +1 -0
- package/lib/commonjs/settings-list/SettingsList.js +5 -1
- package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
- package/lib/commonjs/surfaces/SurfaceHost.js +202 -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/text-field/index.js +22 -6
- package/lib/commonjs/text-field/index.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +34 -12
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/combobox/Combobox.js +3 -3
- package/lib/module/combobox/Combobox.js.map +1 -1
- package/lib/module/command/Command.js +3 -3
- package/lib/module/command/Command.js.map +1 -1
- package/lib/module/dialog/Dialog.js +88 -10
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/Dialog.web.js +179 -21
- package/lib/module/dialog/Dialog.web.js.map +1 -1
- package/lib/module/dialog/DialogBottomSheet.js +85 -30
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/dialog/DialogHeader.js +356 -0
- package/lib/module/dialog/DialogHeader.js.map +1 -0
- package/lib/module/dialog/index.js +1 -0
- package/lib/module/dialog/index.js.map +1 -1
- package/lib/module/dialog/index.web.js +1 -0
- package/lib/module/dialog/index.web.js.map +1 -1
- package/lib/module/index.js +7 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +7 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/react-native-className.d.js +20 -0
- package/lib/module/react-native-className.d.js.map +1 -0
- package/lib/module/{search-input → search}/index.js +6 -2
- package/lib/module/search/index.js.map +1 -0
- package/lib/module/settings-list/SettingsList.js +5 -1
- package/lib/module/settings-list/SettingsList.js.map +1 -1
- package/lib/module/surfaces/SurfaceHost.js +197 -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/text-field/index.js +22 -6
- package/lib/module/text-field/index.js.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts +23 -0
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/combobox/Combobox.d.ts +1 -1
- package/lib/typescript/commonjs/command/Command.d.ts +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/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts +86 -0
- package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/index.d.ts +2 -1
- package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +85 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/common.d.ts +1 -0
- package/lib/typescript/commonjs/icons/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +5 -3
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/input-group/types.d.ts +1 -1
- package/lib/typescript/commonjs/{search-input → search}/index.d.ts +1 -1
- package/lib/typescript/commonjs/search/index.d.ts.map +1 -0
- 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 +161 -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/text-field/index.d.ts +2 -1
- package/lib/typescript/commonjs/text-field/index.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts +23 -0
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/combobox/Combobox.d.ts +1 -1
- package/lib/typescript/module/command/Command.d.ts +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/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DialogHeader.d.ts +86 -0
- package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -0
- package/lib/typescript/module/dialog/index.d.ts +2 -1
- package/lib/typescript/module/dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.web.d.ts +2 -1
- package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +85 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/icons/common.d.ts +1 -0
- package/lib/typescript/module/icons/common.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +5 -3
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/input-group/types.d.ts +1 -1
- package/lib/typescript/module/{search-input → search}/index.d.ts +1 -1
- package/lib/typescript/module/search/index.d.ts.map +1 -0
- 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 +161 -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/text-field/index.d.ts +2 -1
- package/lib/typescript/module/text-field/index.d.ts.map +1 -1
- package/package.json +24 -8
- package/src/__tests__/BottomSheet.test.tsx +47 -0
- package/src/__tests__/DialogBottomSheet.test.tsx +30 -5
- package/src/__tests__/surfaceStore.test.ts +219 -0
- package/src/bottom-sheet/BottomSheetBase.tsx +59 -10
- package/src/combobox/Combobox.tsx +3 -3
- package/src/command/Command.tsx +3 -3
- package/src/dialog/Dialog.tsx +88 -7
- package/src/dialog/Dialog.web.tsx +179 -29
- package/src/dialog/DialogBottomSheet.tsx +90 -28
- package/src/dialog/DialogHeader.tsx +420 -0
- package/src/dialog/index.ts +2 -0
- package/src/dialog/index.web.ts +2 -0
- package/src/dialog/types.ts +86 -0
- package/src/index.ts +18 -1
- package/src/index.web.ts +18 -1
- package/src/input-group/types.ts +1 -1
- package/src/react-native-className.d.ts +38 -0
- package/src/{search-input → search}/index.tsx +8 -5
- package/src/settings-list/SettingsList.tsx +5 -1
- package/src/surfaces/SurfaceHost.tsx +222 -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 +172 -0
- package/src/surfaces/useSurface.ts +33 -0
- package/src/text-field/index.tsx +24 -5
- package/lib/commonjs/search-input/index.js.map +0 -1
- package/lib/module/search-input/index.js.map +0 -1
- package/lib/typescript/commonjs/search-input/index.d.ts.map +0 -1
- package/lib/typescript/module/search-input/index.d.ts.map +0 -1
|
@@ -218,7 +218,11 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
218
218
|
marginBottom: 16
|
|
219
219
|
},
|
|
220
220
|
groupCard: {
|
|
221
|
-
|
|
221
|
+
// No horizontal self-inset: a `SettingsListGroup` fills its parent's content
|
|
222
|
+
// width, so the single horizontal inset comes from the ONE content padding
|
|
223
|
+
// the screen/Dialog already applies (the same `px-screen-margin` that pads
|
|
224
|
+
// the title/search). Keeping a self-margin here double-inset grouped rows on
|
|
225
|
+
// every screen that also applies that padding.
|
|
222
226
|
borderRadius: 16,
|
|
223
227
|
overflow: 'hidden'
|
|
224
228
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useTheme","_useInteractionState","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Chevron","memo","size","color","jsx","Text","style","fontSize","lineHeight","textAlign","width","children","displayName","SettingsListItem","exports","icon","title","description","value","rightElement","showChevron","destructive","onPress","disabled","accessibilityLabel","accessibilityHint","accessibilityRole","leftInset","theme","useTheme","hasChevron","Boolean","titleColor","colors","error","text","pressedOpacity","state","pressed","onIn","onPressIn","onOut","onPressOut","useInteractionState","role","label","content","jsxs","View","styles","itemContainer","undefined","paddingLeft","testID","iconContainer","textContainer","numberOfLines","textSecondary","textTertiary","Pressable","android_ripple","border","accessibilityState","opacity","SettingsListGroup","footer","filteredChildren","React","Children","toArray","filter","groupContainer","groupTitle","groupCard","backgroundColor","card","map","child","index","Fragment","length","divider","groupFooter","SettingsListDivider","inset","marginLeft","StyleSheet","create","flexDirection","alignItems","paddingHorizontal","paddingVertical","minHeight","gap","height","justifyContent","flex","fontWeight","marginBottom","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_useTheme","_useInteractionState","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Chevron","memo","size","color","jsx","Text","style","fontSize","lineHeight","textAlign","width","children","displayName","SettingsListItem","exports","icon","title","description","value","rightElement","showChevron","destructive","onPress","disabled","accessibilityLabel","accessibilityHint","accessibilityRole","leftInset","theme","useTheme","hasChevron","Boolean","titleColor","colors","error","text","pressedOpacity","state","pressed","onIn","onPressIn","onOut","onPressOut","useInteractionState","role","label","content","jsxs","View","styles","itemContainer","undefined","paddingLeft","testID","iconContainer","textContainer","numberOfLines","textSecondary","textTertiary","Pressable","android_ripple","border","accessibilityState","opacity","SettingsListGroup","footer","filteredChildren","React","Children","toArray","filter","groupContainer","groupTitle","groupCard","backgroundColor","card","map","child","index","Fragment","length","divider","groupFooter","SettingsListDivider","inset","marginLeft","StyleSheet","create","flexDirection","alignItems","paddingHorizontal","paddingVertical","minHeight","gap","height","justifyContent","flex","fontWeight","marginBottom","borderRadius","overflow","textTransform","letterSpacing","paddingTop","paddingBottom","hairlineWidth"],"sourceRoot":"../../../src","sources":["settings-list/SettingsList.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAAmE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA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AAU,EAAE;IACVjE,QAAQ,EAAE,EAAE;IACZ0F,UAAU,EAAE,KAAK;IACjBI,aAAa,EAAE,WAAW;IAC1BC,aAAa,EAAE,GAAG;IAClBZ,iBAAiB,EAAE,EAAE;IACrBa,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACDtB,WAAW,EAAE;IACX3E,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdkF,iBAAiB,EAAE,EAAE;IACrBa,UAAU,EAAE;EACd,CAAC;EAED;EACAtB,OAAO,EAAE;IACPa,MAAM,EAAER,uBAAU,CAACmB,aAAa;IAChCpB,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createSurfaceHost = createSurfaceHost;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _context = require("../dialog/context.js");
|
|
10
|
+
var _surfaceStore = require("./surfaceStore.js");
|
|
11
|
+
var _useSurface = require("./useSurface.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
/** Default placement — the ecosystem's responsive "sheet" (bottom → centered). */
|
|
15
|
+
const DEFAULT_PLACEMENT = {
|
|
16
|
+
base: 'bottom',
|
|
17
|
+
md: 'center'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** Map a surface's presentation config onto the shared `Dialog` props. */
|
|
21
|
+
function placementFor(p) {
|
|
22
|
+
return {
|
|
23
|
+
placement: p.placement ?? DEFAULT_PLACEMENT,
|
|
24
|
+
width: p.width,
|
|
25
|
+
maxWidth: p.maxWidth,
|
|
26
|
+
maxHeightRatio: p.maxHeightRatio,
|
|
27
|
+
inset: p.inset,
|
|
28
|
+
showHandle: p.showHandle,
|
|
29
|
+
dismissOnBackdrop: p.dismissOnBackdrop,
|
|
30
|
+
contentPadding: p.contentPadding,
|
|
31
|
+
header: p.header,
|
|
32
|
+
scrollable: p.scrollable,
|
|
33
|
+
style: p.style,
|
|
34
|
+
panelStyle: p.panelStyle,
|
|
35
|
+
panelClassName: p.panelClassName,
|
|
36
|
+
containerStyle: p.containerStyle,
|
|
37
|
+
containerClassName: p.containerClassName,
|
|
38
|
+
label: p.label,
|
|
39
|
+
testID: p.testID
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Build the `<SurfaceHost>` + `<SurfaceProvider>` bound to a platform `Dialog`.
|
|
45
|
+
*
|
|
46
|
+
* `Dialog` is platform-forked (native `BottomSheet`-backed vs. pure-DOM web
|
|
47
|
+
* overlay), so — like `createAlertDialog` — the platform entry files
|
|
48
|
+
* (`index.ts` / `index.web.ts`) inject the correct one. The stack logic below is
|
|
49
|
+
* single-source, no duplication.
|
|
50
|
+
*/
|
|
51
|
+
function createSurfaceHost(Dialog) {
|
|
52
|
+
/**
|
|
53
|
+
* One stacked surface. Bridges a store entry onto an IMPERATIVE `Dialog`
|
|
54
|
+
* (`useDialogControl()` + `open()`/`close()`) — never the controlled
|
|
55
|
+
* `open`/`onClose` boolean path, which fires `onClose` synchronously as the
|
|
56
|
+
* dismiss REQUEST and has no post-exit callback, so it could never tell the
|
|
57
|
+
* store WHEN to splice the entry after the exit animation.
|
|
58
|
+
*/
|
|
59
|
+
function SurfaceLayer({
|
|
60
|
+
entry,
|
|
61
|
+
index
|
|
62
|
+
}) {
|
|
63
|
+
const control = (0, _context.useDialogControl)();
|
|
64
|
+
const {
|
|
65
|
+
id,
|
|
66
|
+
status
|
|
67
|
+
} = entry;
|
|
68
|
+
const controls = (0, _react.useMemo)(() => ({
|
|
69
|
+
dismiss: result => (0, _surfaceStore.requestDismiss)(id, result),
|
|
70
|
+
present: (render, opts) => (0, _surfaceStore.present)(render, opts)
|
|
71
|
+
}), [id]);
|
|
72
|
+
|
|
73
|
+
// Open imperatively on mount (mirrors `AlertDialog`'s canonical
|
|
74
|
+
// fresh-mount open-from-effect; `control` is stable for the layer's life).
|
|
75
|
+
(0, _react.useEffect)(() => {
|
|
76
|
+
control.open();
|
|
77
|
+
}, [control]);
|
|
78
|
+
|
|
79
|
+
// When the store flips this entry to 'closing' (a programmatic dismiss,
|
|
80
|
+
// dismissAll, dismissToRoot, Escape, or Android-back), run the exit
|
|
81
|
+
// animation. A user backdrop/Escape handled by the Dialog itself instead
|
|
82
|
+
// drives its own internal close; either way `onClose` fires post-exit.
|
|
83
|
+
(0, _react.useEffect)(() => {
|
|
84
|
+
if (status === 'closing') control.close();
|
|
85
|
+
}, [status, control]);
|
|
86
|
+
|
|
87
|
+
// Fires AFTER the exit animation settles (imperative mode), for ANY
|
|
88
|
+
// dismissal path — user backdrop/Escape/back OR a programmatic dismiss.
|
|
89
|
+
// `requestDismiss` resolves-once (a programmatic dismiss already resolved
|
|
90
|
+
// with its result; this is a no-op then), then `finalizeClose` splices the
|
|
91
|
+
// entry out. Guarded by unique ids + `'closing'` status in the store.
|
|
92
|
+
const handleClose = (0, _react.useCallback)(() => {
|
|
93
|
+
(0, _surfaceStore.requestDismiss)(id);
|
|
94
|
+
(0, _surfaceStore.finalizeClose)(id);
|
|
95
|
+
}, [id]);
|
|
96
|
+
const placement = (0, _react.useMemo)(() => placementFor(entry.presentation), [entry.presentation]);
|
|
97
|
+
return (
|
|
98
|
+
/*#__PURE__*/
|
|
99
|
+
// `startOpen` is the surface's open-INTENT (true while not closing). It
|
|
100
|
+
// ONLY seeds a freshly-mounted Dialog branch's visible state — the
|
|
101
|
+
// imperative `control` still owns open/close — so when a responsive Dialog
|
|
102
|
+
// swaps its inner component on resize (centered card ↔ bottom sheet) the
|
|
103
|
+
// new branch mounts STILL OPEN instead of dismissing the surface. A real
|
|
104
|
+
// dismiss (backdrop/Escape/back/programmatic) still resolves + splices
|
|
105
|
+
// exactly once via `control.close()` → `handleClose`, post-exit.
|
|
106
|
+
(0, _jsxRuntime.jsx)(Dialog, {
|
|
107
|
+
control: control,
|
|
108
|
+
onClose: handleClose,
|
|
109
|
+
layer: index,
|
|
110
|
+
startOpen: status !== 'closing',
|
|
111
|
+
...placement,
|
|
112
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_useSurface.SurfaceContext.Provider, {
|
|
113
|
+
value: controls,
|
|
114
|
+
children: entry.render(controls)
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function SurfaceHost() {
|
|
120
|
+
const stack = (0, _react.useSyncExternalStore)(_surfaceStore.subscribe, _surfaceStore.getSnapshot, _surfaceStore.getSnapshot);
|
|
121
|
+
useAndroidBackDismissesTop();
|
|
122
|
+
useEscapeDismissesTop();
|
|
123
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
124
|
+
children: stack.map((entry, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(SurfaceLayer, {
|
|
125
|
+
entry: entry,
|
|
126
|
+
index: index
|
|
127
|
+
}, entry.id))
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
SurfaceHost.displayName = 'SurfaceHost';
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Mount ONCE near your app root — renders `children` plus the stack host.
|
|
134
|
+
* Requires the Bloom Portal provider to be mounted too (same as any `<Dialog>`
|
|
135
|
+
* usage): on web the Portal auto-creates `#bloom-portal-root`; on native mount
|
|
136
|
+
* `<Provider>`/`<Outlet>` from `@oxyhq/bloom/portal`. Can equally be folded
|
|
137
|
+
* next to that Portal provider — `<SurfaceHost>` used directly does the same
|
|
138
|
+
* job without wrapping `children`.
|
|
139
|
+
*/
|
|
140
|
+
function SurfaceProvider({
|
|
141
|
+
children
|
|
142
|
+
}) {
|
|
143
|
+
// Resolve any pending awaiters if the provider unmounts so no `present()`
|
|
144
|
+
// promise is stranded.
|
|
145
|
+
(0, _react.useEffect)(() => () => (0, _surfaceStore.resetSurfaces)(), []);
|
|
146
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
147
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(SurfaceHost, {})]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
SurfaceProvider.displayName = 'SurfaceProvider';
|
|
151
|
+
return {
|
|
152
|
+
SurfaceHost,
|
|
153
|
+
SurfaceProvider
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* ONE Android hardware-back handler for the whole stack → dismiss the TOP
|
|
159
|
+
* surface. Reads the live top from the store so a single registration always
|
|
160
|
+
* targets the current top. Returns `false` when the stack is empty so app-level
|
|
161
|
+
* back navigation is untouched.
|
|
162
|
+
*/
|
|
163
|
+
function useAndroidBackDismissesTop() {
|
|
164
|
+
(0, _react.useEffect)(() => {
|
|
165
|
+
if (_reactNative.Platform.OS !== 'android') return;
|
|
166
|
+
const sub = _reactNative.BackHandler.addEventListener('hardwareBackPress', () => {
|
|
167
|
+
const stack = (0, _surfaceStore.getSnapshot)();
|
|
168
|
+
const top = stack[stack.length - 1];
|
|
169
|
+
if (!top) return false;
|
|
170
|
+
if (top.presentation.dismissOnBackdrop === false) return true;
|
|
171
|
+
(0, _surfaceStore.requestDismiss)(top.id);
|
|
172
|
+
return true;
|
|
173
|
+
});
|
|
174
|
+
return () => sub.remove();
|
|
175
|
+
}, []);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Web-only: route Escape to the TOP surface only. A window-CAPTURE listener runs
|
|
180
|
+
* before each `Dialog`'s own document-level keydown, so `stopImmediatePropagation`
|
|
181
|
+
* prevents the lower stacked dialogs from ALSO handling Escape (they each add a
|
|
182
|
+
* document listener) — Escape dismisses strictly the top, LIFO. No-op on native.
|
|
183
|
+
*/
|
|
184
|
+
function useEscapeDismissesTop() {
|
|
185
|
+
(0, _react.useEffect)(() => {
|
|
186
|
+
if (_reactNative.Platform.OS !== 'web') return;
|
|
187
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') return;
|
|
188
|
+
const handler = e => {
|
|
189
|
+
if (e.key !== 'Escape') return;
|
|
190
|
+
const stack = (0, _surfaceStore.getSnapshot)();
|
|
191
|
+
const top = stack[stack.length - 1];
|
|
192
|
+
if (!top) return;
|
|
193
|
+
if (top.presentation.dismissOnBackdrop === false) return;
|
|
194
|
+
e.stopImmediatePropagation();
|
|
195
|
+
e.preventDefault();
|
|
196
|
+
(0, _surfaceStore.requestDismiss)(top.id);
|
|
197
|
+
};
|
|
198
|
+
window.addEventListener('keydown', handler, true);
|
|
199
|
+
return () => window.removeEventListener('keydown', handler, true);
|
|
200
|
+
}, []);
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=SurfaceHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_context","_surfaceStore","_useSurface","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_PLACEMENT","base","md","placementFor","p","placement","width","maxWidth","maxHeightRatio","inset","showHandle","dismissOnBackdrop","contentPadding","header","scrollable","style","panelStyle","panelClassName","containerStyle","containerClassName","label","testID","createSurfaceHost","Dialog","SurfaceLayer","entry","index","control","useDialogControl","id","status","controls","useMemo","dismiss","result","requestDismiss","present","render","opts","useEffect","open","close","handleClose","useCallback","finalizeClose","presentation","jsx","onClose","layer","startOpen","children","SurfaceContext","Provider","value","SurfaceHost","stack","useSyncExternalStore","subscribe","getSnapshot","useAndroidBackDismissesTop","useEscapeDismissesTop","Fragment","map","displayName","SurfaceProvider","resetSurfaces","jsxs","Platform","OS","sub","BackHandler","addEventListener","top","length","remove","window","document","handler","key","stopImmediatePropagation","preventDefault","removeEventListener"],"sourceRoot":"../../../src","sources":["surfaces/SurfaceHost.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AAQA,IAAAI,WAAA,GAAAJ,OAAA;AAA8C,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa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V,IAAIA,GAAG,CAAC3B,YAAY,CAAClC,iBAAiB,KAAK,KAAK,EAAE;MAClD9B,CAAC,CAACkG,wBAAwB,CAAC,CAAC;MAC5BlG,CAAC,CAACmG,cAAc,CAAC,CAAC;MAClB,IAAA7C,4BAAc,EAACqC,GAAG,CAAC3C,EAAE,CAAC;IACxB,CAAC;IACD8C,MAAM,CAACJ,gBAAgB,CAAC,SAAS,EAAEM,OAAO,EAAE,IAAI,CAAC;IACjD,OAAO,MAAMF,MAAM,CAACM,mBAAmB,CAAC,SAAS,EAAEJ,OAAO,EAAE,IAAI,CAAC;EACnE,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "confirm", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _prompts.confirm;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.dismiss = dismiss;
|
|
13
|
+
Object.defineProperty(exports, "dismissAll", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _surfaceStore.dismissAll;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
exports.dismissById = dismissById;
|
|
20
|
+
Object.defineProperty(exports, "dismissToRoot", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _surfaceStore.dismissToRoot;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "present", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () {
|
|
29
|
+
return _surfaceStore.present;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "prompt", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _prompts.prompt;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
exports.surfaces = void 0;
|
|
39
|
+
var _surfaceStore = require("./surfaceStore.js");
|
|
40
|
+
var _prompts = require("./prompts.js");
|
|
41
|
+
/**
|
|
42
|
+
* Dismiss the TOP surface, resolving its `present()` promise with `result`.
|
|
43
|
+
* The public counterpart of the store's `dismissTop`.
|
|
44
|
+
*/
|
|
45
|
+
function dismiss(result) {
|
|
46
|
+
(0, _surfaceStore.dismissTop)(result);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Dismiss a SPECIFIC surface by id, resolving its `present()` promise with
|
|
51
|
+
* `result`. Rarely needed — most call sites use `dismiss()` (top) or the
|
|
52
|
+
* per-surface `SurfaceControls.dismiss`.
|
|
53
|
+
*/
|
|
54
|
+
function dismissById(id, result) {
|
|
55
|
+
(0, _surfaceStore.requestDismiss)(id, result);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The shared imperative surface-stack API — a module singleton (mirrors
|
|
60
|
+
* `alert()`'s shape) so any consumer, in the SDK or an app, presents into the
|
|
61
|
+
* SAME coordinated Bloom stack from anywhere without threading a provider.
|
|
62
|
+
*
|
|
63
|
+
* Exposed at the package root as `surfaces` (avoids a bare `present`/`confirm`
|
|
64
|
+
* name clash with the existing `alert-dialog` `confirm`); the individual
|
|
65
|
+
* functions are also named exports of `@oxyhq/bloom/surfaces` for direct import.
|
|
66
|
+
*/
|
|
67
|
+
const surfaces = exports.surfaces = {
|
|
68
|
+
/** Present a new surface on top. Resolves with the dismissal result. */
|
|
69
|
+
present: (render, opts) => (0, _surfaceStore.present)(render, opts),
|
|
70
|
+
/** Dismiss the top surface. */
|
|
71
|
+
dismiss,
|
|
72
|
+
/** Dismiss a specific surface by id. */
|
|
73
|
+
dismissById,
|
|
74
|
+
/** Dismiss everything above the root surface. */
|
|
75
|
+
dismissToRoot: _surfaceStore.dismissToRoot,
|
|
76
|
+
/** Dismiss the entire stack (resolves pending awaiters with `undefined`). */
|
|
77
|
+
dismissAll: _surfaceStore.dismissAll,
|
|
78
|
+
/** Present a confirm surface; resolves `true`/`false`. */
|
|
79
|
+
confirm: _prompts.confirm,
|
|
80
|
+
/** Present a prompt surface; resolves the string or `null`. */
|
|
81
|
+
prompt: _prompts.prompt
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_surfaceStore","require","_prompts","dismiss","result","dismissTop","dismissById","id","requestDismiss","surfaces","exports","present","render","opts","dismissToRoot","dismissAll","confirm","prompt"],"sourceRoot":"../../../src","sources":["surfaces/api.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAD,OAAA;AAGA;AACA;AACA;AACA;AACA,SAASE,OAAOA,CAACC,MAAgB,EAAQ;EACvC,IAAAC,wBAAU,EAACD,MAAM,CAAC;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA,SAASE,WAAWA,CAACC,EAAU,EAAEH,MAAgB,EAAQ;EACvD,IAAAI,4BAAc,EAACD,EAAE,EAAEH,MAAM,CAAC;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMK,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAG;EACtB;EACAE,OAAO,EAAEA,CAAmBC,MAAuB,EAAEC,IAAqB,KACxE,IAAAF,qBAAO,EAASC,MAAM,EAAEC,IAAI,CAAC;EAC/B;EACAV,OAAO;EACP;EACAG,WAAW;EACX;EACAQ,aAAa,EAAbA,2BAAa;EACb;EACAC,UAAU,EAAVA,wBAAU;EACV;EACAC,OAAO,EAAPA,gBAAO;EACP;EACAC,MAAM,EAANA;AACF,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SurfaceProvider = exports.SurfaceHost = void 0;
|
|
7
|
+
Object.defineProperty(exports, "confirm", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _api.confirm;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "dismiss", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _api.dismiss;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "dismissAll", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _api.dismissAll;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "dismissById", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _api.dismissById;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "dismissToRoot", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _api.dismissToRoot;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "present", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _api.present;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "prompt", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _api.prompt;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "surfaces", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return _api.surfaces;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "useSurface", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return _useSurface.useSurface;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var _dialog = require("../dialog");
|
|
62
|
+
var _SurfaceHost = require("./SurfaceHost.js");
|
|
63
|
+
var _api = require("./api.js");
|
|
64
|
+
var _useSurface = require("./useSurface.js");
|
|
65
|
+
/**
|
|
66
|
+
* The shared, content-agnostic SURFACE STACK.
|
|
67
|
+
*
|
|
68
|
+
* `<SurfaceProvider>`/`<SurfaceHost>` render the coordinated stack; the
|
|
69
|
+
* imperative `surfaces` API (+ its named functions) present into it from
|
|
70
|
+
* anywhere; `useSurface()` gives a presented surface its own controls.
|
|
71
|
+
*
|
|
72
|
+
* `SurfaceHost`/`SurfaceProvider` are bound to the NATIVE `Dialog` here; the web
|
|
73
|
+
* fork (`./index.web`) binds the web `Dialog`. The store, imperative API, hook,
|
|
74
|
+
* and types are platform-agnostic and shared by both.
|
|
75
|
+
*/
|
|
76
|
+
const {
|
|
77
|
+
SurfaceHost,
|
|
78
|
+
SurfaceProvider
|
|
79
|
+
} = (0, _SurfaceHost.createSurfaceHost)(_dialog.Dialog);
|
|
80
|
+
exports.SurfaceProvider = SurfaceProvider;
|
|
81
|
+
exports.SurfaceHost = SurfaceHost;
|
|
82
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_dialog","require","_SurfaceHost","_api","_useSurface","SurfaceHost","SurfaceProvider","createSurfaceHost","Dialog","exports"],"sourceRoot":"../../../src","sources":["surfaces/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAgBA,IAAAE,IAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;EAAEI,WAAW;EAAEC;AAAgB,CAAC,GAAG,IAAAC,8BAAiB,EAACC,cAAM,CAAC;AAACC,OAAA,CAAAH,eAAA,GAAAA,eAAA;AAAAG,OAAA,CAAAJ,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SurfaceProvider = exports.SurfaceHost = void 0;
|
|
7
|
+
Object.defineProperty(exports, "confirm", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _api.confirm;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "dismiss", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _api.dismiss;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "dismissAll", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _api.dismissAll;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "dismissById", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return _api.dismissById;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "dismissToRoot", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () {
|
|
34
|
+
return _api.dismissToRoot;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "present", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _api.present;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "prompt", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _api.prompt;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "surfaces", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return _api.surfaces;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, "useSurface", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return _useSurface.useSurface;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
var _indexWeb = require("../dialog/index.web.js");
|
|
62
|
+
var _SurfaceHost = require("./SurfaceHost.js");
|
|
63
|
+
var _api = require("./api.js");
|
|
64
|
+
var _useSurface = require("./useSurface.js");
|
|
65
|
+
/**
|
|
66
|
+
* Web variant of the surface stack barrel. Identical surface area to the native
|
|
67
|
+
* `./index.ts` — it just binds the web-fork `Dialog` (`Dialog.web.tsx`, a
|
|
68
|
+
* pure-DOM overlay) instead of the native `BottomSheet`-backed one. The store,
|
|
69
|
+
* imperative API, hook, and types are shared, platform-agnostic modules.
|
|
70
|
+
*/
|
|
71
|
+
const {
|
|
72
|
+
SurfaceHost,
|
|
73
|
+
SurfaceProvider
|
|
74
|
+
} = (0, _SurfaceHost.createSurfaceHost)(_indexWeb.Dialog);
|
|
75
|
+
exports.SurfaceProvider = SurfaceProvider;
|
|
76
|
+
exports.SurfaceHost = SurfaceHost;
|
|
77
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_indexWeb","require","_SurfaceHost","_api","_useSurface","SurfaceHost","SurfaceProvider","createSurfaceHost","Dialog","exports"],"sourceRoot":"../../../src","sources":["surfaces/index.web.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,IAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AAnBA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;EAAEI,WAAW;EAAEC;AAAgB,CAAC,GAAG,IAAAC,8BAAiB,EAACC,gBAAM,CAAC;AAACC,OAAA,CAAAH,eAAA,GAAAA,eAAA;AAAAG,OAAA,CAAAJ,WAAA,GAAAA,WAAA","ignoreList":[]}
|