@oxyhq/bloom 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/getting-started.mdx +29 -15
- package/docs/media-flight.mdx +14 -9
- package/docs/teleport.mdx +72 -0
- package/lib/commonjs/connection-status/index.js +7 -0
- package/lib/commonjs/connection-status/index.js.map +1 -1
- package/lib/commonjs/connection-status/index.web.js +7 -0
- package/lib/commonjs/connection-status/index.web.js.map +1 -1
- package/lib/commonjs/connection-status/netinfo.js +34 -0
- package/lib/commonjs/connection-status/netinfo.js.map +1 -1
- package/lib/commonjs/teleport/Portal.js +109 -0
- package/lib/commonjs/teleport/Portal.js.map +1 -0
- package/lib/commonjs/teleport/PortalHost.js +75 -0
- package/lib/commonjs/teleport/PortalHost.js.map +1 -0
- package/lib/commonjs/teleport/PortalHostView.js +40 -0
- package/lib/commonjs/teleport/PortalHostView.js.map +1 -0
- package/lib/commonjs/teleport/PortalHostView.native.js +24 -0
- package/lib/commonjs/teleport/PortalHostView.native.js.map +1 -0
- package/lib/commonjs/teleport/PortalProvider.js +57 -0
- package/lib/commonjs/teleport/PortalProvider.js.map +1 -0
- package/lib/commonjs/teleport/PortalProviderView.js +59 -0
- package/lib/commonjs/teleport/PortalProviderView.js.map +1 -0
- package/lib/commonjs/teleport/PortalProviderView.native.js +19 -0
- package/lib/commonjs/teleport/PortalProviderView.native.js.map +1 -0
- package/lib/commonjs/teleport/PortalView.js +83 -0
- package/lib/commonjs/teleport/PortalView.js.map +1 -0
- package/lib/commonjs/teleport/PortalView.native.js +14 -0
- package/lib/commonjs/teleport/PortalView.native.js.map +1 -0
- package/lib/commonjs/teleport/index.js +35 -0
- package/lib/commonjs/teleport/index.js.map +1 -0
- package/lib/commonjs/teleport/portal-manager.js +40 -0
- package/lib/commonjs/teleport/portal-manager.js.map +1 -0
- package/lib/commonjs/teleport/portal-registry.js +24 -0
- package/lib/commonjs/teleport/portal-registry.js.map +1 -0
- package/lib/commonjs/teleport/reducer.js +86 -0
- package/lib/commonjs/teleport/reducer.js.map +1 -0
- package/lib/commonjs/teleport/scroll-view-context/context.js +17 -0
- package/lib/commonjs/teleport/scroll-view-context/context.js.map +1 -0
- package/lib/commonjs/teleport/scroll-view-context/context.native.js +22 -0
- package/lib/commonjs/teleport/scroll-view-context/context.native.js.map +1 -0
- package/lib/commonjs/teleport/scroll-view-context/types.js +2 -0
- package/lib/commonjs/teleport/scroll-view-context/types.js.map +1 -0
- package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js +17 -0
- package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js.map +1 -0
- package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js +17 -0
- package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js.map +1 -0
- package/lib/commonjs/teleport/teleport-global.d.js +2 -0
- package/lib/commonjs/teleport/teleport-global.d.js.map +1 -0
- package/lib/commonjs/teleport/types.js +6 -0
- package/lib/commonjs/teleport/types.js.map +1 -0
- package/lib/commonjs/teleport/use-id.js +24 -0
- package/lib/commonjs/teleport/use-id.js.map +1 -0
- package/lib/commonjs/teleport/use-portal.js +59 -0
- package/lib/commonjs/teleport/use-portal.js.map +1 -0
- package/lib/commonjs/theme/adaptive-colors.js +30 -4
- package/lib/commonjs/theme/adaptive-colors.js.map +1 -1
- package/lib/module/connection-status/index.js +3 -0
- package/lib/module/connection-status/index.js.map +1 -1
- package/lib/module/connection-status/index.web.js +3 -0
- package/lib/module/connection-status/index.web.js.map +1 -1
- package/lib/module/connection-status/netinfo.js +33 -0
- package/lib/module/connection-status/netinfo.js.map +1 -1
- package/lib/module/teleport/Portal.js +103 -0
- package/lib/module/teleport/Portal.js.map +1 -0
- package/lib/module/teleport/PortalHost.js +71 -0
- package/lib/module/teleport/PortalHost.js.map +1 -0
- package/lib/module/teleport/PortalHostView.js +35 -0
- package/lib/module/teleport/PortalHostView.js.map +1 -0
- package/lib/module/teleport/PortalHostView.native.js +18 -0
- package/lib/module/teleport/PortalHostView.native.js.map +1 -0
- package/lib/module/teleport/PortalProvider.js +51 -0
- package/lib/module/teleport/PortalProvider.js.map +1 -0
- package/lib/module/teleport/PortalProviderView.js +54 -0
- package/lib/module/teleport/PortalProviderView.js.map +1 -0
- package/lib/module/teleport/PortalProviderView.native.js +15 -0
- package/lib/module/teleport/PortalProviderView.native.js.map +1 -0
- package/lib/module/teleport/PortalView.js +79 -0
- package/lib/module/teleport/PortalView.js.map +1 -0
- package/lib/module/teleport/PortalView.native.js +10 -0
- package/lib/module/teleport/PortalView.native.js.map +1 -0
- package/lib/module/teleport/index.js +30 -0
- package/lib/module/teleport/index.js.map +1 -0
- package/lib/module/teleport/portal-manager.js +33 -0
- package/lib/module/teleport/portal-manager.js.map +1 -0
- package/lib/module/teleport/portal-registry.js +18 -0
- package/lib/module/teleport/portal-registry.js.map +1 -0
- package/lib/module/teleport/reducer.js +81 -0
- package/lib/module/teleport/reducer.js.map +1 -0
- package/lib/module/teleport/scroll-view-context/context.js +12 -0
- package/lib/module/teleport/scroll-view-context/context.js.map +1 -0
- package/lib/module/teleport/scroll-view-context/context.native.js +18 -0
- package/lib/module/teleport/scroll-view-context/context.native.js.map +1 -0
- package/lib/module/teleport/scroll-view-context/types.js +2 -0
- package/lib/module/teleport/scroll-view-context/types.js.map +1 -0
- package/lib/module/teleport/specs/PortalHostViewNativeComponent.js +13 -0
- package/lib/module/teleport/specs/PortalHostViewNativeComponent.js.map +1 -0
- package/lib/module/teleport/specs/PortalViewNativeComponent.js +13 -0
- package/lib/module/teleport/specs/PortalViewNativeComponent.js.map +1 -0
- package/lib/module/teleport/teleport-global.d.js +2 -0
- package/lib/module/teleport/teleport-global.d.js.map +1 -0
- package/lib/module/teleport/types.js +4 -0
- package/lib/module/teleport/types.js.map +1 -0
- package/lib/module/teleport/use-id.js +19 -0
- package/lib/module/teleport/use-id.js.map +1 -0
- package/lib/module/teleport/use-portal.js +55 -0
- package/lib/module/teleport/use-portal.js.map +1 -0
- package/lib/module/theme/adaptive-colors.js +30 -4
- package/lib/module/theme/adaptive-colors.js.map +1 -1
- package/lib/typescript/commonjs/connection-status/index.d.ts +1 -0
- package/lib/typescript/commonjs/connection-status/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/connection-status/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/connection-status/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/connection-status/netinfo.d.ts +25 -0
- package/lib/typescript/commonjs/connection-status/netinfo.d.ts.map +1 -1
- package/lib/typescript/commonjs/teleport/Portal.d.ts +48 -0
- package/lib/typescript/commonjs/teleport/Portal.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalHost.d.ts +25 -0
- package/lib/typescript/commonjs/teleport/PortalHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalHostView.d.ts +5 -0
- package/lib/typescript/commonjs/teleport/PortalHostView.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts +4 -0
- package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalProvider.d.ts +23 -0
- package/lib/typescript/commonjs/teleport/PortalProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts +3 -0
- package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts +9 -0
- package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalView.d.ts +9 -0
- package/lib/typescript/commonjs/teleport/PortalView.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/PortalView.native.d.ts +8 -0
- package/lib/typescript/commonjs/teleport/PortalView.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/index.d.ts +29 -0
- package/lib/typescript/commonjs/teleport/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/portal-manager.d.ts +16 -0
- package/lib/typescript/commonjs/teleport/portal-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/portal-registry.d.ts +10 -0
- package/lib/typescript/commonjs/teleport/portal-registry.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/reducer.d.ts +40 -0
- package/lib/typescript/commonjs/teleport/reducer.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts +4 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts +13 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts +10 -0
- package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts +13 -0
- package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts +14 -0
- package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/types.d.ts +22 -0
- package/lib/typescript/commonjs/teleport/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/use-id.d.ts +2 -0
- package/lib/typescript/commonjs/teleport/use-id.d.ts.map +1 -0
- package/lib/typescript/commonjs/teleport/use-portal.d.ts +35 -0
- package/lib/typescript/commonjs/teleport/use-portal.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/adaptive-colors.d.ts.map +1 -1
- package/lib/typescript/module/connection-status/index.d.ts +1 -0
- package/lib/typescript/module/connection-status/index.d.ts.map +1 -1
- package/lib/typescript/module/connection-status/index.web.d.ts +1 -0
- package/lib/typescript/module/connection-status/index.web.d.ts.map +1 -1
- package/lib/typescript/module/connection-status/netinfo.d.ts +25 -0
- package/lib/typescript/module/connection-status/netinfo.d.ts.map +1 -1
- package/lib/typescript/module/teleport/Portal.d.ts +48 -0
- package/lib/typescript/module/teleport/Portal.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalHost.d.ts +25 -0
- package/lib/typescript/module/teleport/PortalHost.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalHostView.d.ts +5 -0
- package/lib/typescript/module/teleport/PortalHostView.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalHostView.native.d.ts +4 -0
- package/lib/typescript/module/teleport/PortalHostView.native.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalProvider.d.ts +23 -0
- package/lib/typescript/module/teleport/PortalProvider.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalProviderView.d.ts +3 -0
- package/lib/typescript/module/teleport/PortalProviderView.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalProviderView.native.d.ts +9 -0
- package/lib/typescript/module/teleport/PortalProviderView.native.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalView.d.ts +9 -0
- package/lib/typescript/module/teleport/PortalView.d.ts.map +1 -0
- package/lib/typescript/module/teleport/PortalView.native.d.ts +8 -0
- package/lib/typescript/module/teleport/PortalView.native.d.ts.map +1 -0
- package/lib/typescript/module/teleport/index.d.ts +29 -0
- package/lib/typescript/module/teleport/index.d.ts.map +1 -0
- package/lib/typescript/module/teleport/portal-manager.d.ts +16 -0
- package/lib/typescript/module/teleport/portal-manager.d.ts.map +1 -0
- package/lib/typescript/module/teleport/portal-registry.d.ts +10 -0
- package/lib/typescript/module/teleport/portal-registry.d.ts.map +1 -0
- package/lib/typescript/module/teleport/reducer.d.ts +40 -0
- package/lib/typescript/module/teleport/reducer.d.ts.map +1 -0
- package/lib/typescript/module/teleport/scroll-view-context/context.d.ts +4 -0
- package/lib/typescript/module/teleport/scroll-view-context/context.d.ts.map +1 -0
- package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts +13 -0
- package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts.map +1 -0
- package/lib/typescript/module/teleport/scroll-view-context/types.d.ts +10 -0
- package/lib/typescript/module/teleport/scroll-view-context/types.d.ts.map +1 -0
- package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts +13 -0
- package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts +14 -0
- package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/teleport/types.d.ts +22 -0
- package/lib/typescript/module/teleport/types.d.ts.map +1 -0
- package/lib/typescript/module/teleport/use-id.d.ts +2 -0
- package/lib/typescript/module/teleport/use-id.d.ts.map +1 -0
- package/lib/typescript/module/teleport/use-portal.d.ts +35 -0
- package/lib/typescript/module/teleport/use-portal.d.ts.map +1 -0
- package/lib/typescript/module/theme/adaptive-colors.d.ts.map +1 -1
- package/package.json +15 -1
- package/src/connection-status/index.ts +3 -0
- package/src/connection-status/index.web.ts +3 -0
- package/src/connection-status/netinfo.ts +33 -0
- package/src/teleport/Portal.tsx +97 -0
- package/src/teleport/PortalHost.tsx +61 -0
- package/src/teleport/PortalHostView.native.tsx +14 -0
- package/src/teleport/PortalHostView.tsx +30 -0
- package/src/teleport/PortalProvider.tsx +51 -0
- package/src/teleport/PortalProviderView.native.tsx +11 -0
- package/src/teleport/PortalProviderView.tsx +67 -0
- package/src/teleport/PortalView.native.tsx +7 -0
- package/src/teleport/PortalView.tsx +94 -0
- package/src/teleport/index.ts +32 -0
- package/src/teleport/portal-manager.tsx +48 -0
- package/src/teleport/portal-registry.ts +27 -0
- package/src/teleport/reducer.ts +94 -0
- package/src/teleport/scroll-view-context/context.native.ts +19 -0
- package/src/teleport/scroll-view-context/context.ts +12 -0
- package/src/teleport/scroll-view-context/types.ts +7 -0
- package/src/teleport/specs/PortalHostViewNativeComponent.ts +15 -0
- package/src/teleport/specs/PortalViewNativeComponent.ts +16 -0
- package/src/teleport/teleport-global.d.ts +11 -0
- package/src/teleport/types.ts +22 -0
- package/src/teleport/use-id.ts +18 -0
- package/src/teleport/use-portal.ts +47 -0
- package/src/theme/adaptive-colors.ts +37 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","useLayoutEffect","useCallback","createPortal","usePortalRegistryContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","supportsMoveBefore","Element","prototype","moveElementTo","parent","child","before","parentNode","moveBefore","removeChild","insertBefore","Portal","hostName","children","style","getHost","registerPendingPortal","unregisterPendingPortal","elRef","current","document","createElement","sentinelRef","Object","assign","teleportToHost","el","hostNode","parentElement","ref","styles","anchor","display"],"sourceRoot":"../../../src","sources":["teleport/PortalView.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,EAAEC,eAAe,EAAEC,WAAW,QAAQ,OAAO;AAC5D,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,wBAAwB,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAG7D,MAAMC,kBAAkB,GACtB,OAAOC,OAAO,KAAK,WAAW,IAAI,YAAY,IAAIA,OAAO,CAACC,SAAS;AAErE,SAASC,aAAaA,CACpBC,MAAe,EACfC,KAAc,EACdC,MAAsB,GAAG,IAAI,EAC7B;EACA,IAAIN,kBAAkB,IAAIK,KAAK,CAACE,UAAU,EAAE;IAC1CH,MAAM,CAACI,UAAU,CAACH,KAAK,EAAEC,MAAM,CAAC;IAChC;EACF;EAEA,IAAID,KAAK,CAACE,UAAU,EAAE;IACpBF,KAAK,CAACE,UAAU,CAACE,WAAW,CAACJ,KAAK,CAAC;EACrC;EAEAD,MAAM,CAACM,YAAY,CAACL,KAAK,EAAEC,MAAM,CAAC;AACpC;AAEA,eAAe,SAASK,MAAMA,CAAC;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;A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AEa,cAAc,CAAC;IAC/C,OAAO,MAAM;MACXR,uBAAuB,CAACL,QAAQ,EAAEa,cAAc,CAAC;IACnD,CAAC;EACH,CAAC,EAAE,CACDb,QAAQ,EACRI,qBAAqB,EACrBC,uBAAuB,EACvBQ,cAAc,CACf,CAAC;EAEF,oBACE1B,KAAA,CAAAF,SAAA;IAAAgB,QAAA,gBACGrB,YAAY,CAACqB,QAAQ,EAAEK,KAAK,CAACC,OAAO,CAAC,eAEtCxB,IAAA;MAAKkC,GAAG,EAAEP,WAAY;MAACR,KAAK,EAAEgB,MAAM,CAACC;IAAO,CAAE,CAAC;EAAA,CAC/C,CAAC;AAEP;AAEA,MAAMD,MAAM,GAAG;EACbC,MAAM,EAAE;IACNC,OAAO,EAAE;EACX;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.native.tsx`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: import paths only, for this flat directory.
|
|
8
|
+
*/
|
|
9
|
+
export { default } from "./specs/PortalViewNativeComponent.js";
|
|
10
|
+
//# sourceMappingURL=PortalView.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sourceRoot":"../../../src","sources":["teleport/PortalView.native.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,sCAAmC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* react-native-teleport, vendored.
|
|
5
|
+
*
|
|
6
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/index.ts`. MIT, Copyright (c)
|
|
7
|
+
* 2025 Kiryl Ziusko; the full licence is in `NOTICE` at the repository root and
|
|
8
|
+
* every file in this directory names the file it came from.
|
|
9
|
+
*
|
|
10
|
+
* It is here rather than as a dependency because Bloom needs its NATIVE
|
|
11
|
+
* re-parenting — moving one platform view between hosts instead of mounting a
|
|
12
|
+
* second one — and that arrives as Fabric components, not as JavaScript.
|
|
13
|
+
*
|
|
14
|
+
* WHAT IS DIFFERENT FROM UPSTREAM, and it is not their code: **Bloom mounts
|
|
15
|
+
* these portals from its ROOT LAYER, never from the origin screen.** Their own
|
|
16
|
+
* recipe mounts the `<Portal>` inside the screen the media starts on, which is
|
|
17
|
+
* correct for a navigator that keeps that screen alive — and measured against
|
|
18
|
+
* expo-router on web, where the origin route unmounts on the URL change, it
|
|
19
|
+
* takes the media with it (`count 1 -> 0 -> 0`). The portal is not what fails
|
|
20
|
+
* there; the ownership is. Same piece, mounted where it does not die.
|
|
21
|
+
*
|
|
22
|
+
* Changed: import paths only, for this flat directory. Their file layout uses
|
|
23
|
+
* `index.tsx` per component, which Bloom's family-layout gate reserves for pure
|
|
24
|
+
* barrels, so each one is named after what it exports.
|
|
25
|
+
*/
|
|
26
|
+
export { default as PortalHost } from "./PortalHost.js";
|
|
27
|
+
export { default as Portal } from "./Portal.js";
|
|
28
|
+
export { default as PortalProvider } from "./PortalProvider.js";
|
|
29
|
+
export { default as usePortal } from "./use-portal.js";
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","PortalHost","Portal","PortalProvider","usePortal"],"sourceRoot":"../../../src","sources":["teleport/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,iBAAc;AACpD,SAASD,OAAO,IAAIE,MAAM,QAAQ,aAAU;AAC5C,SAASF,OAAO,IAAIG,cAAc,QAAQ,qBAAkB;AAC5D,SAASH,OAAO,IAAII,SAAS,QAAQ,iBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/PortalManager.tsx`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: import paths only, for this flat directory.
|
|
8
|
+
*/
|
|
9
|
+
import { createContext, useContext, useReducer, useMemo } from "react";
|
|
10
|
+
import { initialState, reducer } from "./reducer.js";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
const PortalManagerContext = /*#__PURE__*/createContext(undefined);
|
|
13
|
+
export const PortalManagerProvider = ({
|
|
14
|
+
children
|
|
15
|
+
}) => {
|
|
16
|
+
const [state, dispatch] = useReducer(reducer, initialState);
|
|
17
|
+
const context = useMemo(() => ({
|
|
18
|
+
state,
|
|
19
|
+
dispatch
|
|
20
|
+
}), [state, dispatch]);
|
|
21
|
+
return /*#__PURE__*/_jsx(PortalManagerContext.Provider, {
|
|
22
|
+
value: context,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
export const usePortalManagerContext = () => {
|
|
27
|
+
const context = useContext(PortalManagerContext);
|
|
28
|
+
if (!context) {
|
|
29
|
+
throw new Error("usePortalContext must be used within PortalProvider");
|
|
30
|
+
}
|
|
31
|
+
return context;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=portal-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useReducer","useMemo","initialState","reducer","jsx","_jsx","PortalManagerContext","undefined","PortalManagerProvider","children","state","dispatch","context","Provider","value","usePortalManagerContext","Error"],"sourceRoot":"../../../src","sources":["teleport/portal-manager.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SACEA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,OAAO,QAEF,OAAO;AACd,SACEC,YAAY,EACZC,OAAO,QAGF,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnB,MAAMC,oBAAoB,gBAAGR,aAAa,CAExCS,SAAS,CAAC;AAEZ,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EACpCC;AAGF,CAAC,KAAK;EACJ,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGX,UAAU,CAACG,OAAO,EAAED,YAAY,CAAC;EAC3D,MAAMU,OAAO,GAAGX,OAAO,CAAC,OAAO;IAAES,KAAK;IAAEC;EAAS,CAAC,CAAC,EAAE,CAACD,KAAK,EAAEC,QAAQ,CAAC,CAAC;EAEvE,oBACEN,IAAA,CAACC,oBAAoB,CAACO,QAAQ;IAACC,KAAK,EAAEF,OAAQ;IAAAH,QAAA,EAC3CA;EAAQ,CACoB,CAAC;AAEpC,CAAC;AAED,OAAO,MAAMM,uBAAuB,GAAGA,CAAA,KAAM;EAC3C,MAAMH,OAAO,GAAGb,UAAU,CAACO,oBAAoB,CAAC;EAEhD,IAAI,CAACM,OAAO,EAAE;IACZ,MAAM,IAAII,KAAK,CAAC,qDAAqD,CAAC;EACxE;EAEA,OAAOJ,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/PortalRegistry.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: nothing — byte-for-byte, only its path.
|
|
8
|
+
*/
|
|
9
|
+
import { createContext, useContext } from "react";
|
|
10
|
+
export const PortalRegistryContext = /*#__PURE__*/createContext(null);
|
|
11
|
+
export function usePortalRegistryContext() {
|
|
12
|
+
const context = useContext(PortalRegistryContext);
|
|
13
|
+
if (!context) {
|
|
14
|
+
throw new Error("usePortalRegistryContext must be used within a PortalRegistryContext");
|
|
15
|
+
}
|
|
16
|
+
return context;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=portal-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","PortalRegistryContext","usePortalRegistryContext","context","Error"],"sourceRoot":"../../../src","sources":["teleport/portal-registry.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AASjD,OAAO,MAAMC,qBAAqB,gBAChCF,aAAa,CAAmC,IAAI,CAAC;AAEvD,OAAO,SAASG,wBAAwBA,CAAA,EAAG;EACzC,MAAMC,OAAO,GAAGH,UAAU,CAACC,qBAAqB,CAAC;EACjD,IAAI,CAACE,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACb,sEACF,CAAC;EACH;EACA,OAAOD,OAAO;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/state/reducer.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: nothing — byte-for-byte, only its path.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const initialState = {
|
|
11
|
+
removed: {},
|
|
12
|
+
hosts: {},
|
|
13
|
+
hostScrollViewContexts: {}
|
|
14
|
+
};
|
|
15
|
+
export const reducer = (state, action) => {
|
|
16
|
+
const cloned = {
|
|
17
|
+
...state,
|
|
18
|
+
removed: {
|
|
19
|
+
...state.removed
|
|
20
|
+
},
|
|
21
|
+
hostScrollViewContexts: {
|
|
22
|
+
...state.hostScrollViewContexts
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const hostRemoved = "name" in action ? cloned.removed[action.hostName] || {} : {};
|
|
26
|
+
cloned.removed[action.hostName] = hostRemoved;
|
|
27
|
+
const nameRemoved = "name" in action ? hostRemoved[action.name] || {} : {};
|
|
28
|
+
if ("name" in action) {
|
|
29
|
+
hostRemoved[action.name] = nameRemoved;
|
|
30
|
+
}
|
|
31
|
+
switch (action.type) {
|
|
32
|
+
case "REGISTER_HOST":
|
|
33
|
+
{
|
|
34
|
+
const hosts = {
|
|
35
|
+
...cloned.hosts
|
|
36
|
+
};
|
|
37
|
+
hosts[action.hostName] = (hosts[action.hostName] || 0) + 1;
|
|
38
|
+
return {
|
|
39
|
+
...cloned,
|
|
40
|
+
hosts
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
case "UNREGISTER_HOST":
|
|
44
|
+
{
|
|
45
|
+
const hosts = {
|
|
46
|
+
...cloned.hosts
|
|
47
|
+
};
|
|
48
|
+
const count = (hosts[action.hostName] || 0) - 1;
|
|
49
|
+
if (count <= 0) {
|
|
50
|
+
delete hosts[action.hostName];
|
|
51
|
+
delete cloned.hostScrollViewContexts[action.hostName];
|
|
52
|
+
} else {
|
|
53
|
+
hosts[action.hostName] = count;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
...cloned,
|
|
57
|
+
hosts
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
case "SET_HOST_SCROLL_VIEW_CONTEXT":
|
|
61
|
+
cloned.hostScrollViewContexts[action.hostName] = action.value;
|
|
62
|
+
return cloned;
|
|
63
|
+
case "REGISTER_PORTAL":
|
|
64
|
+
if (!nameRemoved[action.instanceId]) {
|
|
65
|
+
nameRemoved[action.instanceId] = false;
|
|
66
|
+
}
|
|
67
|
+
return cloned;
|
|
68
|
+
case "REMOVE_PORTAL":
|
|
69
|
+
Object.keys(nameRemoved).forEach(id => nameRemoved[id] = true);
|
|
70
|
+
return cloned;
|
|
71
|
+
case "CLEAR_REMOVED_ON_UNMOUNT":
|
|
72
|
+
delete nameRemoved[action.instanceId];
|
|
73
|
+
if (Object.keys(nameRemoved).length === 0) {
|
|
74
|
+
delete hostRemoved[action.name];
|
|
75
|
+
}
|
|
76
|
+
return cloned;
|
|
77
|
+
default:
|
|
78
|
+
return state;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["initialState","removed","hosts","hostScrollViewContexts","reducer","state","action","cloned","hostRemoved","hostName","nameRemoved","name","type","count","value","instanceId","Object","keys","forEach","id","length"],"sourceRoot":"../../../src","sources":["teleport/reducer.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AA+BA,OAAO,MAAMA,YAAyB,GAAG;EACvCC,OAAO,EAAE,CAAC,CAAC;EACXC,KAAK,EAAE,CAAC,CAAC;EACTC,sBAAsB,EAAE,CAAC;AAC3B,CAAC;AAED,OAAO,MAAMC,OAAO,GAAGA,CAACC,KAAkB,EAAEC,MAAc,KAAkB;EAC1E,MAAMC,MAAM,GAAG;IACb,GAAGF,KAAK;IACRJ,OAAO,EAAE;MAAE,GAAGI,KAAK,CAACJ;IAAQ,CAAC;IAC7BE,sBAAsB,EAAE;MAAE,GAAGE,KAAK,CAACF;IAAuB;EAC5D,CAAC;EACD,MAAMK,WAAW,GACf,MAAM,IAAIF,MAAM,GAAGC,MAAM,CAACN,OAAO,CAACK,MAAM,CAACG,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;EAC/DF,MAAM,CAACN,OAAO,CAACK,MAAM,CAACG,QAAQ,CAAC,GAAGD,WAAW;EAC7C,MAAME,WAAW,GAAG,MAAM,IAAIJ,MAAM,GAAGE,WAAW,CAACF,MAAM,CAACK,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;EAC1E,IAAI,MAAM,IAAIL,MAAM,EAAE;IACpBE,WAAW,CAACF,MAAM,CAACK,IAAI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MAAM;IACf,KAAK,0BAA0B;MAC7B,OAAOG,WAAW,CAACJ,MAAM,CAACS,UAAU,CAAC;MACrC,IAAIC,MAAM,CAACC,IAAI,CAACP,WAAW,CAAC,CAACU,MAAM,KAAK,CAAC,EAAE;QACzC,OAAOZ,WAAW,CAACF,MAAM,CAACK,IAAI,CAAC;MACjC;MACA,OAAOJ,MAAM;IACf;MACE,OAAOF,KAAK;EAChB;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/ScrollViewContext/index.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: import paths only, for this flat directory.
|
|
8
|
+
*/
|
|
9
|
+
import { createContext } from "react";
|
|
10
|
+
const ScrollViewContext = /*#__PURE__*/createContext(null);
|
|
11
|
+
export default ScrollViewContext;
|
|
12
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","ScrollViewContext"],"sourceRoot":"../../../../src","sources":["teleport/scroll-view-context/context.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,OAAO;AAGrC,MAAMC,iBAAiB,gBAAGD,aAAa,CAAyB,IAAI,CAAC;AAErE,eAAeC,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/contexts/ScrollViewContext/index.native.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: import paths, and `ScrollView.Context` is reached through a cast
|
|
8
|
+
* because Bloom does not compile with their `react-native-strict-api` condition,
|
|
9
|
+
* which is the only place that property is declared.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { ScrollView } from "react-native";
|
|
13
|
+
// Bloom does not compile with their `react-native-strict-api` condition, and
|
|
14
|
+
// `ScrollView.Context` is only declared there. Reached through the shape it has
|
|
15
|
+
// at runtime instead; the value and the behaviour are theirs, unchanged.
|
|
16
|
+
const ScrollViewContext = ScrollView.Context;
|
|
17
|
+
export default ScrollViewContext;
|
|
18
|
+
//# sourceMappingURL=context.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ScrollView","ScrollViewContext","Context"],"sourceRoot":"../../../../src","sources":["teleport/scroll-view-context/context.native.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AAGzC;AACA;AACA;AACA,MAAMC,iBAAiB,GAAID,UAAU,CAClCE,OAAO;AAEV,eAAeD,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["teleport/scroll-view-context/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/specs/PortalHostViewNativeComponent.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: nothing — byte-for-byte, only its path.
|
|
8
|
+
*/
|
|
9
|
+
import { codegenNativeComponent } from "react-native";
|
|
10
|
+
export default codegenNativeComponent("PortalHostView", {
|
|
11
|
+
interfaceOnly: true
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=PortalHostViewNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["teleport/specs/PortalHostViewNativeComponent.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAwB,cAAc;AAMrE,eAAeA,sBAAsB,CAAc,gBAAgB,EAAE;EACnEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/specs/PortalViewNativeComponent.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: nothing — byte-for-byte, only its path.
|
|
8
|
+
*/
|
|
9
|
+
import { codegenNativeComponent } from "react-native";
|
|
10
|
+
export default codegenNativeComponent("PortalView", {
|
|
11
|
+
interfaceOnly: true
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=PortalViewNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["teleport/specs/PortalViewNativeComponent.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,sBAAsB,QAAwB,cAAc;AAOrE,eAAeA,sBAAsB,CAAc,YAAY,EAAE;EAC/DC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["teleport/teleport-global.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["teleport/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/hooks/useId.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: nothing — byte-for-byte, only its path.
|
|
8
|
+
*/
|
|
9
|
+
import { useRef } from "react";
|
|
10
|
+
let __idCounter = 0;
|
|
11
|
+
export default function useId(prefix = "uid") {
|
|
12
|
+
const idRef = useRef("");
|
|
13
|
+
if (!idRef.current) {
|
|
14
|
+
const n = ++__idCounter;
|
|
15
|
+
idRef.current = `${prefix}-${n}`;
|
|
16
|
+
}
|
|
17
|
+
return idRef.current;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=use-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRef","__idCounter","useId","prefix","idRef","current","n"],"sourceRoot":"../../../src","sources":["teleport/use-id.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,MAAM,QAAQ,OAAO;AAE9B,IAAIC,WAAW,GAAG,CAAC;AAEnB,eAAe,SAASC,KAAKA,CAACC,MAAM,GAAG,KAAK,EAAU;EACpD,MAAMC,KAAK,GAAGJ,MAAM,CAAS,EAAE,CAAC;EAChC,IAAI,CAACI,KAAK,CAACC,OAAO,EAAE;IAClB,MAAMC,CAAC,GAAG,EAAEL,WAAW;IACvBG,KAAK,CAACC,OAAO,GAAG,GAAGF,MAAM,IAAIG,CAAC,EAAE;EAClC;EACA,OAAOF,KAAK,CAACC,OAAO;AACtB","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* COPIED FROM react-native-teleport 1.2.0 — `src/hooks/usePortal.ts`
|
|
5
|
+
* MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
|
|
6
|
+
*
|
|
7
|
+
* Changed: import paths only, for this flat directory.
|
|
8
|
+
*/
|
|
9
|
+
import { usePortalManagerContext } from "./portal-manager.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The `usePortal` hook allows you to manage portals in imperative way.
|
|
13
|
+
*
|
|
14
|
+
* @category hooks
|
|
15
|
+
* @param `hostName` - `name` of the `<PortalHost />` component
|
|
16
|
+
* @returns an object that helps to manipulate portals
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { usePortal } from "react-native-teleport";
|
|
20
|
+
* export default function App() {
|
|
21
|
+
* const { removePortal, isHostAvailable } = usePortal("root");
|
|
22
|
+
* return (
|
|
23
|
+
* <View style={{ flex: 1 }}>
|
|
24
|
+
* <Text>{isHostAvailable ? "Host is available" : "Host is not available"}</Text>
|
|
25
|
+
* <Button title="Remove" onPress={() => removePortal("portal")} />
|
|
26
|
+
* </View>
|
|
27
|
+
* );
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export default function usePortal(hostName = "root") {
|
|
32
|
+
const {
|
|
33
|
+
state,
|
|
34
|
+
dispatch
|
|
35
|
+
} = usePortalManagerContext();
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* Whether a `<PortalHost />` with the given `hostName` is currently mounted.
|
|
39
|
+
*/
|
|
40
|
+
isHostAvailable: (state.hosts[hostName] ?? 0) > 0,
|
|
41
|
+
/**
|
|
42
|
+
* Remove portal from host container. Subsequent re-renders will not restore portal,
|
|
43
|
+
* but if you mount a new portal with the same name it will be shown (i. e. hook doesn't
|
|
44
|
+
* prevent new portal from being added).
|
|
45
|
+
*
|
|
46
|
+
* @param name - `name` of `<Portal />` component.
|
|
47
|
+
*/
|
|
48
|
+
removePortal: name => dispatch({
|
|
49
|
+
type: "REMOVE_PORTAL",
|
|
50
|
+
hostName,
|
|
51
|
+
name
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=use-portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["usePortalManagerContext","usePortal","hostName","state","dispatch","isHostAvailable","hosts","removePortal","name","type"],"sourceRoot":"../../../src","sources":["teleport/use-portal.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,uBAAuB,QAAQ,qBAAkB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,SAASA,CAACC,QAAgB,GAAG,MAAM,EAAE;EAC3D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGJ,uBAAuB,CAAC,CAAC;EAErD,OAAO;IACL;AACJ;AACA;IACIK,eAAe,EAAE,CAACF,KAAK,CAACG,KAAK,CAACJ,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;IACjD;AACJ;AACA;AACA;AACA;AACA;AACA;IACIK,YAAY,EAAGC,IAAY,IACzBJ,QAAQ,CAAC;MAAEK,IAAI,EAAE,eAAe;MAAEP,QAAQ;MAAEM;IAAK,CAAC;EACtD,CAAC;AACH","ignoreList":[]}
|
|
@@ -38,9 +38,30 @@ import { Platform } from 'react-native';
|
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
const c = v => v;
|
|
41
|
+
let hasWarned = false;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* SAY SO. This boundary degraded in complete silence, which is the worst of the
|
|
45
|
+
* six: an app simply gets the preset palette instead of the platform's, and
|
|
46
|
+
* nothing anywhere says the platform read failed.
|
|
47
|
+
*
|
|
48
|
+
* It is only reachable on Android and iOS — `getAdaptiveColors` returns `null`
|
|
49
|
+
* on web before touching `require` — so an ESM bundle never gets here. That is
|
|
50
|
+
* an argument for warning, not against it: a failure that cannot happen in the
|
|
51
|
+
* environment you test in is exactly the one that goes unnoticed when it does.
|
|
52
|
+
*/
|
|
53
|
+
function warnAdaptiveColorsUnavailable(reason) {
|
|
54
|
+
if (process.env.NODE_ENV === 'production' || hasWarned) return;
|
|
55
|
+
hasWarned = true;
|
|
56
|
+
// eslint-disable-next-line no-console
|
|
57
|
+
console.warn('[Bloom] The adaptive palette fell back to the preset one: `expo-router`’s ' + '`Color` proxy could not be read, so platform colours (Material You, iOS ' + 'dynamic) are not in use. Install the optional peer ' + '(`npx expo install expo-router`) if you want them. ' + `Reason: ${reason}`);
|
|
58
|
+
}
|
|
41
59
|
function getAndroidColors() {
|
|
42
60
|
try {
|
|
43
|
-
if (typeof require === 'undefined')
|
|
61
|
+
if (typeof require === 'undefined') {
|
|
62
|
+
warnAdaptiveColorsUnavailable('this bundle has no CommonJS `require`');
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
44
65
|
const {
|
|
45
66
|
Color
|
|
46
67
|
} = require('expo-router');
|
|
@@ -80,13 +101,17 @@ function getAndroidColors() {
|
|
|
80
101
|
shadow: 'rgba(0, 0, 0, 0.2)',
|
|
81
102
|
overlay: 'rgba(0, 0, 0, 0.5)'
|
|
82
103
|
};
|
|
83
|
-
} catch {
|
|
104
|
+
} catch (error) {
|
|
105
|
+
warnAdaptiveColorsUnavailable(error instanceof Error ? error.message : String(error));
|
|
84
106
|
return null;
|
|
85
107
|
}
|
|
86
108
|
}
|
|
87
109
|
function getIOSColors() {
|
|
88
110
|
try {
|
|
89
|
-
if (typeof require === 'undefined')
|
|
111
|
+
if (typeof require === 'undefined') {
|
|
112
|
+
warnAdaptiveColorsUnavailable('this bundle has no CommonJS `require`');
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
90
115
|
const {
|
|
91
116
|
Color
|
|
92
117
|
} = require('expo-router');
|
|
@@ -126,7 +151,8 @@ function getIOSColors() {
|
|
|
126
151
|
shadow: 'rgba(0, 0, 0, 0.15)',
|
|
127
152
|
overlay: 'rgba(0, 0, 0, 0.5)'
|
|
128
153
|
};
|
|
129
|
-
} catch {
|
|
154
|
+
} catch (error) {
|
|
155
|
+
warnAdaptiveColorsUnavailable(error instanceof Error ? error.message : String(error));
|
|
130
156
|
return null;
|
|
131
157
|
}
|
|
132
158
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","c","v","getAndroidColors","require","Color","d","android","dynamic","background","surface","backgroundSecondary","surfaceContainerLow","backgroundTertiary","surfaceContainer","text","onSurface","textSecondary","onSurfaceVariant","textTertiary","outline","border","outlineVariant","borderLight","primary","primaryForeground","onPrimary","primaryLight","primaryContainer","primaryDark","onPrimaryContainer","secondary","secondaryForeground","onSecondary","tertiary","tertiaryForeground","onTertiary","tint","icon","iconActive","success","error","warning","info","primarySubtle","primarySubtleForeground","negative","negativeForeground","negativeSubtle","errorContainer","negativeSubtleForeground","onErrorContainer","contrast50","card","shadow","overlay","getIOSColors","i","ios","systemBackground","secondarySystemBackground","tertiarySystemBackground","label","secondaryLabel","tertiaryLabel","separator","opaqueSeparator","systemBlue","systemGray6","systemPurple","systemTeal","systemGreen","systemRed","systemOrange","getAdaptiveColors","OS"],"sourceRoot":"../../../src","sources":["theme/adaptive-colors.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;;AAGvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,MAAMC,CAAC,GAAIC,CAAU,IAAaA,CAAW;AAE7C,SAASC,gBAAgBA,CAAA,EAA0B;EACjD,IAAI;IACF,IAAI,OAAOC,OAAO,KAAK,WAAW,EAAE,OAAO,IAAI;
|
|
1
|
+
{"version":3,"names":["Platform","c","v","hasWarned","warnAdaptiveColorsUnavailable","reason","process","env","NODE_ENV","console","warn","getAndroidColors","require","Color","d","android","dynamic","background","surface","backgroundSecondary","surfaceContainerLow","backgroundTertiary","surfaceContainer","text","onSurface","textSecondary","onSurfaceVariant","textTertiary","outline","border","outlineVariant","borderLight","primary","primaryForeground","onPrimary","primaryLight","primaryContainer","primaryDark","onPrimaryContainer","secondary","secondaryForeground","onSecondary","tertiary","tertiaryForeground","onTertiary","tint","icon","iconActive","success","error","warning","info","primarySubtle","primarySubtleForeground","negative","negativeForeground","negativeSubtle","errorContainer","negativeSubtleForeground","onErrorContainer","contrast50","card","shadow","overlay","Error","message","String","getIOSColors","i","ios","systemBackground","secondarySystemBackground","tertiarySystemBackground","label","secondaryLabel","tertiaryLabel","separator","opaqueSeparator","systemBlue","systemGray6","systemPurple","systemTeal","systemGreen","systemRed","systemOrange","getAdaptiveColors","OS"],"sourceRoot":"../../../src","sources":["theme/adaptive-colors.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;;AAGvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA,MAAMC,CAAC,GAAIC,CAAU,IAAaA,CAAW;AAE7C,IAAIC,SAAS,GAAG,KAAK;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,6BAA6BA,CAACC,MAAc,EAAQ;EAC3D,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIL,SAAS,EAAE;EACxDA,SAAS,GAAG,IAAI;EAChB;EACAM,OAAO,CAACC,IAAI,CACV,4EAA4E,GAC1E,0EAA0E,GAC1E,qDAAqD,GACrD,qDAAqD,GACrD,WAAWL,MAAM,EACrB,CAAC;AACH;AAEA,SAASM,gBAAgBA,CAAA,EAA0B;EACjD,IAAI;IACF,IAAI,OAAOC,OAAO,KAAK,WAAW,EAAE;MAClCR,6BAA6B,CAAC,uCAAuC,CAAC;MACtE,OAAO,IAAI;IACb;IACA,MAAM;MAAES;IAAM,CAAC,GAAGD,OAAO,CAAC,aA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QAAQ,EAAErD,CAAC,CAACmE,CAAC,CAACe,SAAS,CAAC;MACxB5B,kBAAkB,EAAE,SAAS;MAC7BC,cAAc,EAAEvD,CAAC,CAACmE,CAAC,CAACW,WAAW,CAAC;MAChCrB,wBAAwB,EAAEzD,CAAC,CAACmE,CAAC,CAACe,SAAS,CAAC;MACxCvB,UAAU,EAAE3D,CAAC,CAACmE,CAAC,CAACW,WAAW,CAAC;MAC5BlB,IAAI,EAAE5D,CAAC,CAACmE,CAAC,CAACG,yBAAyB,CAAC;MACpCT,MAAM,EAAE,qBAAqB;MAC7BC,OAAO,EAAE;IACX,CAAC;EACH,CAAC,CAAC,OAAOd,KAAK,EAAE;IACd7C,6BAA6B,CAAC6C,KAAK,YAAYe,KAAK,GAAGf,KAAK,CAACgB,OAAO,GAAGC,MAAM,CAACjB,KAAK,CAAC,CAAC;IACrF,OAAO,IAAI;EACb;AACF;AAEA,OAAO,SAASoC,iBAAiBA,CAAA,EAA0B;EACzD,IAAIrF,QAAQ,CAACsF,EAAE,KAAK,SAAS,EAAE,OAAO3E,gBAAgB,CAAC,CAAC;EACxD,IAAIX,QAAQ,CAACsF,EAAE,KAAK,KAAK,EAAE,OAAOnB,YAAY,CAAC,CAAC;EAChD,OAAO,IAAI;AACb","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,sBAAsB,GACvB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/index.web.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/index.web.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,sBAAsB,GACvB,MAAM,8BAA8B,CAAC"}
|
|
@@ -57,6 +57,31 @@ export interface NetInfoStateLike {
|
|
|
57
57
|
export interface NetInfoLike {
|
|
58
58
|
addEventListener: (listener: (state: NetInfoStateLike) => void) => () => void;
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Hand Bloom the netinfo module, from a consumer that has it.
|
|
62
|
+
*
|
|
63
|
+
* THIS IS NOT A TEST HOOK. It is the only mechanism that works in an ESM
|
|
64
|
+
* bundle: the consumer, who knows it has the peer and which entry of it its own
|
|
65
|
+
* bundler resolved, hands the module in.
|
|
66
|
+
*
|
|
67
|
+
* The `require` below cannot be relied on off Metro, and the reason is worth
|
|
68
|
+
* knowing because the symptom is identical while the cause is not:
|
|
69
|
+
*
|
|
70
|
+
* - Rollup / Vite ESM output: `require` is undefined, the guard catches it,
|
|
71
|
+
* and the boundary degrades.
|
|
72
|
+
* - esbuild ESM output: `require` EXISTS as a shim that throws
|
|
73
|
+
* (`Dynamic require of "…" is not supported`), so the guard PASSES and the
|
|
74
|
+
* call throws inside the try. Measured with the peer installed on disk:
|
|
75
|
+
* `platform=node` and `platform=browser` both degraded.
|
|
76
|
+
*
|
|
77
|
+
* So a fix aimed at the `typeof require` check would have changed nothing under
|
|
78
|
+
* esbuild. And there is no synchronous, bundler-agnostic alternative: `import()`
|
|
79
|
+
* is asynchronous AND resolved at build time, so an absent package fails the
|
|
80
|
+
* BUILD — which is what this boundary exists to prevent.
|
|
81
|
+
*
|
|
82
|
+
* Metro is unaffected either way and needs no binding.
|
|
83
|
+
*/
|
|
84
|
+
export declare function provideNetInfo(module: NetInfoLike | null): void;
|
|
60
85
|
/** The netinfo module, or `null` when the optional peer is not installed. */
|
|
61
86
|
export declare function loadNetInfo(): NetInfoLike | null;
|
|
62
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"netinfo.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/netinfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AASH,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CAC/E;
|
|
1
|
+
{"version":3,"file":"netinfo.d.ts","sourceRoot":"","sources":["../../../../src/connection-status/netinfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AASH,yDAAyD;AACzD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CAC/E;AAUD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAI/D;AAED,6EAA6E;AAC7E,wBAAgB,WAAW,IAAI,WAAW,GAAG,IAAI,CAkChD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAa7C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { PortalProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Portal helps you to render a component in a different place in the view hierarchy.
|
|
4
|
+
* This is useful when you need a view to visually “break out” of its parent container (for example: modals, toasts, floating UI, popovers).
|
|
5
|
+
*
|
|
6
|
+
* @category components
|
|
7
|
+
* @param hostName - The `name` of the `PortalHost`. It's used to identify the host where the content should be rendered.
|
|
8
|
+
* @param name - The name of the portal. It's used to identify the portal.
|
|
9
|
+
* @param children - The content that should be rendered in the portal.
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { useState } from "react";
|
|
13
|
+
* import { View, StyleSheet, Button } from "react-native";
|
|
14
|
+
* import { Portal } from "react-native-teleport";
|
|
15
|
+
* export default function InstantRootExample() {
|
|
16
|
+
* const [shouldBeTeleported, setTeleported] = useState(true);
|
|
17
|
+
* return (
|
|
18
|
+
* <View style={styles.container}>
|
|
19
|
+
* {shouldBeTeleported && (
|
|
20
|
+
* <Portal hostName={"overlay"}>
|
|
21
|
+
* <View style={styles.box} />
|
|
22
|
+
* </Portal>
|
|
23
|
+
* )}
|
|
24
|
+
* <Button
|
|
25
|
+
* title={shouldBeTeleported ? "Hide" : "Show"}
|
|
26
|
+
* onPress={() => setTeleported((t) => !t)}
|
|
27
|
+
* />
|
|
28
|
+
* </View>
|
|
29
|
+
* );
|
|
30
|
+
* }
|
|
31
|
+
* const styles = StyleSheet.create({
|
|
32
|
+
* container: {
|
|
33
|
+
* flex: 1,
|
|
34
|
+
* alignItems: "center",
|
|
35
|
+
* justifyContent: "center",
|
|
36
|
+
* },
|
|
37
|
+
* box: {
|
|
38
|
+
* width: 160,
|
|
39
|
+
* height: 160,
|
|
40
|
+
* marginVertical: 20,
|
|
41
|
+
* backgroundColor: "blue",
|
|
42
|
+
* },
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare const PortalComponent: ({ hostName, name, style, children }: PortalProps) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export default PortalComponent;
|
|
48
|
+
//# sourceMappingURL=Portal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../../src/teleport/Portal.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,QAAA,MAAM,eAAe,GAAI,qCAAqC,WAAW,4CAqCxE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|