@oxyhq/bloom 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/docs/teleport.mdx +72 -0
  2. package/lib/commonjs/teleport/Portal.js +109 -0
  3. package/lib/commonjs/teleport/Portal.js.map +1 -0
  4. package/lib/commonjs/teleport/PortalHost.js +75 -0
  5. package/lib/commonjs/teleport/PortalHost.js.map +1 -0
  6. package/lib/commonjs/teleport/PortalHostView.js +40 -0
  7. package/lib/commonjs/teleport/PortalHostView.js.map +1 -0
  8. package/lib/commonjs/teleport/PortalHostView.native.js +24 -0
  9. package/lib/commonjs/teleport/PortalHostView.native.js.map +1 -0
  10. package/lib/commonjs/teleport/PortalProvider.js +57 -0
  11. package/lib/commonjs/teleport/PortalProvider.js.map +1 -0
  12. package/lib/commonjs/teleport/PortalProviderView.js +59 -0
  13. package/lib/commonjs/teleport/PortalProviderView.js.map +1 -0
  14. package/lib/commonjs/teleport/PortalProviderView.native.js +19 -0
  15. package/lib/commonjs/teleport/PortalProviderView.native.js.map +1 -0
  16. package/lib/commonjs/teleport/PortalView.js +83 -0
  17. package/lib/commonjs/teleport/PortalView.js.map +1 -0
  18. package/lib/commonjs/teleport/PortalView.native.js +14 -0
  19. package/lib/commonjs/teleport/PortalView.native.js.map +1 -0
  20. package/lib/commonjs/teleport/index.js +35 -0
  21. package/lib/commonjs/teleport/index.js.map +1 -0
  22. package/lib/commonjs/teleport/portal-manager.js +40 -0
  23. package/lib/commonjs/teleport/portal-manager.js.map +1 -0
  24. package/lib/commonjs/teleport/portal-registry.js +24 -0
  25. package/lib/commonjs/teleport/portal-registry.js.map +1 -0
  26. package/lib/commonjs/teleport/reducer.js +86 -0
  27. package/lib/commonjs/teleport/reducer.js.map +1 -0
  28. package/lib/commonjs/teleport/scroll-view-context/context.js +17 -0
  29. package/lib/commonjs/teleport/scroll-view-context/context.js.map +1 -0
  30. package/lib/commonjs/teleport/scroll-view-context/context.native.js +22 -0
  31. package/lib/commonjs/teleport/scroll-view-context/context.native.js.map +1 -0
  32. package/lib/commonjs/teleport/scroll-view-context/types.js +2 -0
  33. package/lib/commonjs/teleport/scroll-view-context/types.js.map +1 -0
  34. package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js +17 -0
  35. package/lib/commonjs/teleport/specs/PortalHostViewNativeComponent.js.map +1 -0
  36. package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js +17 -0
  37. package/lib/commonjs/teleport/specs/PortalViewNativeComponent.js.map +1 -0
  38. package/lib/commonjs/teleport/teleport-global.d.js +2 -0
  39. package/lib/commonjs/teleport/teleport-global.d.js.map +1 -0
  40. package/lib/commonjs/teleport/types.js +6 -0
  41. package/lib/commonjs/teleport/types.js.map +1 -0
  42. package/lib/commonjs/teleport/use-id.js +24 -0
  43. package/lib/commonjs/teleport/use-id.js.map +1 -0
  44. package/lib/commonjs/teleport/use-portal.js +59 -0
  45. package/lib/commonjs/teleport/use-portal.js.map +1 -0
  46. package/lib/module/teleport/Portal.js +103 -0
  47. package/lib/module/teleport/Portal.js.map +1 -0
  48. package/lib/module/teleport/PortalHost.js +71 -0
  49. package/lib/module/teleport/PortalHost.js.map +1 -0
  50. package/lib/module/teleport/PortalHostView.js +35 -0
  51. package/lib/module/teleport/PortalHostView.js.map +1 -0
  52. package/lib/module/teleport/PortalHostView.native.js +18 -0
  53. package/lib/module/teleport/PortalHostView.native.js.map +1 -0
  54. package/lib/module/teleport/PortalProvider.js +51 -0
  55. package/lib/module/teleport/PortalProvider.js.map +1 -0
  56. package/lib/module/teleport/PortalProviderView.js +54 -0
  57. package/lib/module/teleport/PortalProviderView.js.map +1 -0
  58. package/lib/module/teleport/PortalProviderView.native.js +15 -0
  59. package/lib/module/teleport/PortalProviderView.native.js.map +1 -0
  60. package/lib/module/teleport/PortalView.js +79 -0
  61. package/lib/module/teleport/PortalView.js.map +1 -0
  62. package/lib/module/teleport/PortalView.native.js +10 -0
  63. package/lib/module/teleport/PortalView.native.js.map +1 -0
  64. package/lib/module/teleport/index.js +30 -0
  65. package/lib/module/teleport/index.js.map +1 -0
  66. package/lib/module/teleport/portal-manager.js +33 -0
  67. package/lib/module/teleport/portal-manager.js.map +1 -0
  68. package/lib/module/teleport/portal-registry.js +18 -0
  69. package/lib/module/teleport/portal-registry.js.map +1 -0
  70. package/lib/module/teleport/reducer.js +81 -0
  71. package/lib/module/teleport/reducer.js.map +1 -0
  72. package/lib/module/teleport/scroll-view-context/context.js +12 -0
  73. package/lib/module/teleport/scroll-view-context/context.js.map +1 -0
  74. package/lib/module/teleport/scroll-view-context/context.native.js +18 -0
  75. package/lib/module/teleport/scroll-view-context/context.native.js.map +1 -0
  76. package/lib/module/teleport/scroll-view-context/types.js +2 -0
  77. package/lib/module/teleport/scroll-view-context/types.js.map +1 -0
  78. package/lib/module/teleport/specs/PortalHostViewNativeComponent.js +13 -0
  79. package/lib/module/teleport/specs/PortalHostViewNativeComponent.js.map +1 -0
  80. package/lib/module/teleport/specs/PortalViewNativeComponent.js +13 -0
  81. package/lib/module/teleport/specs/PortalViewNativeComponent.js.map +1 -0
  82. package/lib/module/teleport/teleport-global.d.js +2 -0
  83. package/lib/module/teleport/teleport-global.d.js.map +1 -0
  84. package/lib/module/teleport/types.js +4 -0
  85. package/lib/module/teleport/types.js.map +1 -0
  86. package/lib/module/teleport/use-id.js +19 -0
  87. package/lib/module/teleport/use-id.js.map +1 -0
  88. package/lib/module/teleport/use-portal.js +55 -0
  89. package/lib/module/teleport/use-portal.js.map +1 -0
  90. package/lib/typescript/commonjs/teleport/Portal.d.ts +48 -0
  91. package/lib/typescript/commonjs/teleport/Portal.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/teleport/PortalHost.d.ts +25 -0
  93. package/lib/typescript/commonjs/teleport/PortalHost.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/teleport/PortalHostView.d.ts +5 -0
  95. package/lib/typescript/commonjs/teleport/PortalHostView.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts +4 -0
  97. package/lib/typescript/commonjs/teleport/PortalHostView.native.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/teleport/PortalProvider.d.ts +23 -0
  99. package/lib/typescript/commonjs/teleport/PortalProvider.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts +3 -0
  101. package/lib/typescript/commonjs/teleport/PortalProviderView.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts +9 -0
  103. package/lib/typescript/commonjs/teleport/PortalProviderView.native.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/teleport/PortalView.d.ts +9 -0
  105. package/lib/typescript/commonjs/teleport/PortalView.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/teleport/PortalView.native.d.ts +8 -0
  107. package/lib/typescript/commonjs/teleport/PortalView.native.d.ts.map +1 -0
  108. package/lib/typescript/commonjs/teleport/index.d.ts +29 -0
  109. package/lib/typescript/commonjs/teleport/index.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/teleport/portal-manager.d.ts +16 -0
  111. package/lib/typescript/commonjs/teleport/portal-manager.d.ts.map +1 -0
  112. package/lib/typescript/commonjs/teleport/portal-registry.d.ts +10 -0
  113. package/lib/typescript/commonjs/teleport/portal-registry.d.ts.map +1 -0
  114. package/lib/typescript/commonjs/teleport/reducer.d.ts +40 -0
  115. package/lib/typescript/commonjs/teleport/reducer.d.ts.map +1 -0
  116. package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts +4 -0
  117. package/lib/typescript/commonjs/teleport/scroll-view-context/context.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts +13 -0
  119. package/lib/typescript/commonjs/teleport/scroll-view-context/context.native.d.ts.map +1 -0
  120. package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts +10 -0
  121. package/lib/typescript/commonjs/teleport/scroll-view-context/types.d.ts.map +1 -0
  122. package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts +13 -0
  123. package/lib/typescript/commonjs/teleport/specs/PortalHostViewNativeComponent.d.ts.map +1 -0
  124. package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts +14 -0
  125. package/lib/typescript/commonjs/teleport/specs/PortalViewNativeComponent.d.ts.map +1 -0
  126. package/lib/typescript/commonjs/teleport/types.d.ts +22 -0
  127. package/lib/typescript/commonjs/teleport/types.d.ts.map +1 -0
  128. package/lib/typescript/commonjs/teleport/use-id.d.ts +2 -0
  129. package/lib/typescript/commonjs/teleport/use-id.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/teleport/use-portal.d.ts +35 -0
  131. package/lib/typescript/commonjs/teleport/use-portal.d.ts.map +1 -0
  132. package/lib/typescript/module/teleport/Portal.d.ts +48 -0
  133. package/lib/typescript/module/teleport/Portal.d.ts.map +1 -0
  134. package/lib/typescript/module/teleport/PortalHost.d.ts +25 -0
  135. package/lib/typescript/module/teleport/PortalHost.d.ts.map +1 -0
  136. package/lib/typescript/module/teleport/PortalHostView.d.ts +5 -0
  137. package/lib/typescript/module/teleport/PortalHostView.d.ts.map +1 -0
  138. package/lib/typescript/module/teleport/PortalHostView.native.d.ts +4 -0
  139. package/lib/typescript/module/teleport/PortalHostView.native.d.ts.map +1 -0
  140. package/lib/typescript/module/teleport/PortalProvider.d.ts +23 -0
  141. package/lib/typescript/module/teleport/PortalProvider.d.ts.map +1 -0
  142. package/lib/typescript/module/teleport/PortalProviderView.d.ts +3 -0
  143. package/lib/typescript/module/teleport/PortalProviderView.d.ts.map +1 -0
  144. package/lib/typescript/module/teleport/PortalProviderView.native.d.ts +9 -0
  145. package/lib/typescript/module/teleport/PortalProviderView.native.d.ts.map +1 -0
  146. package/lib/typescript/module/teleport/PortalView.d.ts +9 -0
  147. package/lib/typescript/module/teleport/PortalView.d.ts.map +1 -0
  148. package/lib/typescript/module/teleport/PortalView.native.d.ts +8 -0
  149. package/lib/typescript/module/teleport/PortalView.native.d.ts.map +1 -0
  150. package/lib/typescript/module/teleport/index.d.ts +29 -0
  151. package/lib/typescript/module/teleport/index.d.ts.map +1 -0
  152. package/lib/typescript/module/teleport/portal-manager.d.ts +16 -0
  153. package/lib/typescript/module/teleport/portal-manager.d.ts.map +1 -0
  154. package/lib/typescript/module/teleport/portal-registry.d.ts +10 -0
  155. package/lib/typescript/module/teleport/portal-registry.d.ts.map +1 -0
  156. package/lib/typescript/module/teleport/reducer.d.ts +40 -0
  157. package/lib/typescript/module/teleport/reducer.d.ts.map +1 -0
  158. package/lib/typescript/module/teleport/scroll-view-context/context.d.ts +4 -0
  159. package/lib/typescript/module/teleport/scroll-view-context/context.d.ts.map +1 -0
  160. package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts +13 -0
  161. package/lib/typescript/module/teleport/scroll-view-context/context.native.d.ts.map +1 -0
  162. package/lib/typescript/module/teleport/scroll-view-context/types.d.ts +10 -0
  163. package/lib/typescript/module/teleport/scroll-view-context/types.d.ts.map +1 -0
  164. package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts +13 -0
  165. package/lib/typescript/module/teleport/specs/PortalHostViewNativeComponent.d.ts.map +1 -0
  166. package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts +14 -0
  167. package/lib/typescript/module/teleport/specs/PortalViewNativeComponent.d.ts.map +1 -0
  168. package/lib/typescript/module/teleport/types.d.ts +22 -0
  169. package/lib/typescript/module/teleport/types.d.ts.map +1 -0
  170. package/lib/typescript/module/teleport/use-id.d.ts +2 -0
  171. package/lib/typescript/module/teleport/use-id.d.ts.map +1 -0
  172. package/lib/typescript/module/teleport/use-portal.d.ts +35 -0
  173. package/lib/typescript/module/teleport/use-portal.d.ts.map +1 -0
  174. package/package.json +15 -1
  175. package/src/teleport/Portal.tsx +97 -0
  176. package/src/teleport/PortalHost.tsx +61 -0
  177. package/src/teleport/PortalHostView.native.tsx +14 -0
  178. package/src/teleport/PortalHostView.tsx +30 -0
  179. package/src/teleport/PortalProvider.tsx +51 -0
  180. package/src/teleport/PortalProviderView.native.tsx +11 -0
  181. package/src/teleport/PortalProviderView.tsx +67 -0
  182. package/src/teleport/PortalView.native.tsx +7 -0
  183. package/src/teleport/PortalView.tsx +94 -0
  184. package/src/teleport/index.ts +32 -0
  185. package/src/teleport/portal-manager.tsx +48 -0
  186. package/src/teleport/portal-registry.ts +27 -0
  187. package/src/teleport/reducer.ts +94 -0
  188. package/src/teleport/scroll-view-context/context.native.ts +19 -0
  189. package/src/teleport/scroll-view-context/context.ts +12 -0
  190. package/src/teleport/scroll-view-context/types.ts +7 -0
  191. package/src/teleport/specs/PortalHostViewNativeComponent.ts +15 -0
  192. package/src/teleport/specs/PortalViewNativeComponent.ts +16 -0
  193. package/src/teleport/teleport-global.d.ts +11 -0
  194. package/src/teleport/types.ts +22 -0
  195. package/src/teleport/use-id.ts +18 -0
  196. package/src/teleport/use-portal.ts +47 -0
@@ -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"}
@@ -0,0 +1,25 @@
1
+ import type { PortalHostProps } from "./types";
2
+ /**
3
+ * PortalHost is a component that acts as an anchor for the portals.
4
+ * You can define multiple portal hosts in your app and use them to render different portals.
5
+ * Each portal host has a unique name that you can use to identify a necessary one among the others.
6
+ *
7
+ * @category components
8
+ * @param name - The name of the portal host. It's used by `<Portal />` component to identify the host.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { StyleSheet, View } from "react-native";
13
+ * import { PortalHost, PortalProvider } from "react-native-teleport";
14
+ * export default function App() {
15
+ * return (
16
+ * <PortalProvider>
17
+ * <PortalHost style={StyleSheet.absoluteFillObject} name="overlay" />
18
+ * </PortalProvider>
19
+ * );
20
+ * }
21
+ * ```
22
+ */
23
+ declare const PortalHostComponent: ({ name, children, style }: PortalHostProps) => import("react/jsx-runtime").JSX.Element;
24
+ export default PortalHostComponent;
25
+ //# sourceMappingURL=PortalHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHost.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHost.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,mBAAmB,GAAI,2BAA2B,eAAe,4CAyBtE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PortalHostProps } from "./types";
2
+ declare function PortalHost({ name, children, style }: PortalHostProps): import("react/jsx-runtime").JSX.Element;
3
+ declare const _default: import("react").MemoExoticComponent<typeof PortalHost>;
4
+ export default _default;
5
+ //# sourceMappingURL=PortalHostView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHostView.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHostView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,2CAiB7D;;AAED,wBAAgC"}
@@ -0,0 +1,4 @@
1
+ import type { PortalHostProps } from "./types";
2
+ declare const PortalHost: (props: PortalHostProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default PortalHost;
4
+ //# sourceMappingURL=PortalHostView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHostView.native.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHostView.native.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,23 @@
1
+ type PortalProviderProps = {
2
+ children: React.ReactNode;
3
+ };
4
+ /**
5
+ * Wraps your app with this component to use the teleport API.
6
+ *
7
+ * This component provides a context/registry for all Portals so that you can use imperative API, such as `usePortal` hook to manage Portals.
8
+ *
9
+ * @category components
10
+ * @example
11
+ * ```tsx
12
+ * import { PortalProvider } from "react-native-teleport";
13
+ * export default function App() {
14
+ * return (
15
+ * <PortalProvider>
16
+ * //* your main application code goes here
17
+ * </PortalProvider>
18
+ * );
19
+ * }
20
+ */
21
+ export default function PortalProvider({ children }: PortalProviderProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=PortalProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProvider.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProvider.tsx"],"names":[],"mappings":"AAUA,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CASvE"}
@@ -0,0 +1,3 @@
1
+ import type { PortalProviderProps } from "./types";
2
+ export default function PortalProvider({ children }: PortalProviderProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=PortalProviderView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProviderView.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProviderView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAwDvE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.native.tsx`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import type { PortalProviderProps } from "./types";
8
+ export default function PortalProvider({ children }: PortalProviderProps): import("react").ReactNode;
9
+ //# sourceMappingURL=PortalProviderView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProviderView.native.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProviderView.native.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,6BAEvE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.tsx`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: import paths only, for this flat directory.
6
+ */
7
+ import type { PortalProps } from "./types";
8
+ export default function Portal({ hostName, children, style }: PortalProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=PortalView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalView.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsB3C,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,WAAW,2CAsDxE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/views/Portal/index.native.tsx`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: import paths only, for this flat directory.
6
+ */
7
+ export { default } from "./specs/PortalViewNativeComponent";
8
+ //# sourceMappingURL=PortalView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalView.native.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalView.native.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * react-native-teleport, vendored.
3
+ *
4
+ * COPIED FROM react-native-teleport 1.2.0 — `src/index.ts`. MIT, Copyright (c)
5
+ * 2025 Kiryl Ziusko; the full licence is in `NOTICE` at the repository root and
6
+ * every file in this directory names the file it came from.
7
+ *
8
+ * It is here rather than as a dependency because Bloom needs its NATIVE
9
+ * re-parenting — moving one platform view between hosts instead of mounting a
10
+ * second one — and that arrives as Fabric components, not as JavaScript.
11
+ *
12
+ * WHAT IS DIFFERENT FROM UPSTREAM, and it is not their code: **Bloom mounts
13
+ * these portals from its ROOT LAYER, never from the origin screen.** Their own
14
+ * recipe mounts the `<Portal>` inside the screen the media starts on, which is
15
+ * correct for a navigator that keeps that screen alive — and measured against
16
+ * expo-router on web, where the origin route unmounts on the URL change, it
17
+ * takes the media with it (`count 1 -> 0 -> 0`). The portal is not what fails
18
+ * there; the ownership is. Same piece, mounted where it does not die.
19
+ *
20
+ * Changed: import paths only, for this flat directory. Their file layout uses
21
+ * `index.tsx` per component, which Bloom's family-layout gate reserves for pure
22
+ * barrels, so each one is named after what it exports.
23
+ */
24
+ export { default as PortalHost } from './PortalHost';
25
+ export { default as Portal } from './Portal';
26
+ export { default as PortalProvider } from './PortalProvider';
27
+ export { default as usePortal } from './use-portal';
28
+ export type { PortalHostProps, PortalProps, PortalProviderProps, } from './types';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/teleport/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EACV,eAAe,EACf,WAAW,EACX,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/contexts/PortalManager.tsx`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: import paths only, for this flat directory.
6
+ */
7
+ import { type ReactNode } from "react";
8
+ import { type Action, type PortalState } from "./reducer";
9
+ export declare const PortalManagerProvider: ({ children, }: {
10
+ children: ReactNode;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const usePortalManagerContext: () => {
13
+ state: PortalState;
14
+ dispatch: React.Dispatch<Action>;
15
+ };
16
+ //# sourceMappingURL=portal-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-manager.d.ts","sourceRoot":"","sources":["../../../../src/teleport/portal-manager.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAGL,KAAK,MAAM,EACX,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AAMnB,eAAO,MAAM,qBAAqB,GAAI,eAEnC;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,4CASA,CAAC;AAEF,eAAO,MAAM,uBAAuB;WAlBzB,WAAW;cAAY,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;CA0BvD,CAAC"}
@@ -0,0 +1,10 @@
1
+ type PortalRegistryContextType = {
2
+ registerHost: (name: string, node: HTMLElement | null) => void;
3
+ getHost: (name: string) => HTMLElement | null;
4
+ registerPendingPortal: (name: string, callback: () => void) => void;
5
+ unregisterPendingPortal: (name: string, callback: () => void) => void;
6
+ };
7
+ export declare const PortalRegistryContext: import("react").Context<PortalRegistryContextType | null>;
8
+ export declare function usePortalRegistryContext(): PortalRegistryContextType;
9
+ export {};
10
+ //# sourceMappingURL=portal-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-registry.d.ts","sourceRoot":"","sources":["../../../../src/teleport/portal-registry.ts"],"names":[],"mappings":"AAQA,KAAK,yBAAyB,GAAG;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;IAC9C,qBAAqB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IACpE,uBAAuB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACvE,CAAC;AAEF,eAAO,MAAM,qBAAqB,2DACqB,CAAC;AAExD,wBAAgB,wBAAwB,8BAQvC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/state/reducer.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import type { ScrollViewContextValue } from "./scroll-view-context/types";
8
+ export type PortalState = {
9
+ removed: Record<string, Record<string, Record<string, boolean>>>;
10
+ hosts: Record<string, number>;
11
+ hostScrollViewContexts: Record<string, ScrollViewContextValue | undefined>;
12
+ };
13
+ export type Action = {
14
+ type: "REMOVE_PORTAL";
15
+ hostName: string;
16
+ name: string;
17
+ } | {
18
+ type: "CLEAR_REMOVED_ON_UNMOUNT";
19
+ hostName: string;
20
+ name: string;
21
+ instanceId: string;
22
+ } | {
23
+ type: "REGISTER_PORTAL";
24
+ hostName: string;
25
+ name: string;
26
+ instanceId: string;
27
+ } | {
28
+ type: "REGISTER_HOST";
29
+ hostName: string;
30
+ } | {
31
+ type: "UNREGISTER_HOST";
32
+ hostName: string;
33
+ } | {
34
+ type: "SET_HOST_SCROLL_VIEW_CONTEXT";
35
+ hostName: string;
36
+ value: ScrollViewContextValue;
37
+ };
38
+ export declare const initialState: PortalState;
39
+ export declare const reducer: (state: PortalState, action: Action) => PortalState;
40
+ //# sourceMappingURL=reducer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/teleport/reducer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAE1E,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACjE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,SAAS,CAAC,CAAC;CAC5E,CAAC;AAEF,MAAM,MAAM,MAAM,GACd;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzD;IACE,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB,GACD;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC7C;IACE,IAAI,EAAE,8BAA8B,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,sBAAsB,CAAC;CAC/B,CAAC;AAEN,eAAO,MAAM,YAAY,EAAE,WAI1B,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,WAAW,EAAE,QAAQ,MAAM,KAAG,WAmD5D,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ScrollViewContextValue } from "./types";
2
+ declare const ScrollViewContext: import("react").Context<ScrollViewContextValue>;
3
+ export default ScrollViewContext;
4
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/teleport/scroll-view-context/context.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,QAAA,MAAM,iBAAiB,iDAA8C,CAAC;AAEtE,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/contexts/ScrollViewContext/index.native.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: import paths, and `ScrollView.Context` is reached through a cast
6
+ * because Bloom does not compile with their `react-native-strict-api` condition,
7
+ * which is the only place that property is declared.
8
+ */
9
+ import type { Context } from "react";
10
+ import type { ScrollViewContextValue } from "./types";
11
+ declare const ScrollViewContext: Context<ScrollViewContextValue>;
12
+ export default ScrollViewContext;
13
+ //# sourceMappingURL=context.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.native.d.ts","sourceRoot":"","sources":["../../../../../src/teleport/scroll-view-context/context.native.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAKtD,QAAA,MAAM,iBAAiB,iCACb,CAAC;AAEX,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/contexts/ScrollViewContext/types.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ export type ScrollViewContextValue = {
8
+ horizontal: boolean;
9
+ } | null;
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/teleport/scroll-view-context/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IAAE,UAAU,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/specs/PortalHostViewNativeComponent.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import { type ViewProps } from "react-native";
8
+ interface NativeProps extends ViewProps {
9
+ name?: string;
10
+ }
11
+ declare const _default: import("react-native").HostComponent<NativeProps>;
12
+ export default _default;
13
+ //# sourceMappingURL=PortalHostViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHostViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../src/teleport/specs/PortalHostViewNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;;AAED,wBAEG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/specs/PortalViewNativeComponent.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import { type ViewProps } from "react-native";
8
+ interface NativeProps extends ViewProps {
9
+ name?: string;
10
+ hostName?: string;
11
+ }
12
+ declare const _default: import("react-native").HostComponent<NativeProps>;
13
+ export default _default;
14
+ //# sourceMappingURL=PortalViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../../src/teleport/specs/PortalViewNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;;AAED,wBAEG"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/types/index.ts`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import type { StyleProp, ViewStyle } from "react-native";
8
+ export type PortalProviderProps = {
9
+ children: React.ReactNode;
10
+ };
11
+ export type PortalHostProps = {
12
+ name: string;
13
+ style?: StyleProp<ViewStyle>;
14
+ children?: React.ReactNode;
15
+ };
16
+ export type PortalProps = {
17
+ name?: string;
18
+ hostName?: string;
19
+ style?: StyleProp<ViewStyle>;
20
+ children?: React.ReactNode;
21
+ };
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/teleport/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AACF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function useId(prefix?: string): string;
2
+ //# sourceMappingURL=use-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-id.d.ts","sourceRoot":"","sources":["../../../../src/teleport/use-id.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,MAAM,SAAQ,GAAG,MAAM,CAOpD"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The `usePortal` hook allows you to manage portals in imperative way.
3
+ *
4
+ * @category hooks
5
+ * @param `hostName` - `name` of the `<PortalHost />` component
6
+ * @returns an object that helps to manipulate portals
7
+ * @example
8
+ * ```tsx
9
+ * import { usePortal } from "react-native-teleport";
10
+ * export default function App() {
11
+ * const { removePortal, isHostAvailable } = usePortal("root");
12
+ * return (
13
+ * <View style={{ flex: 1 }}>
14
+ * <Text>{isHostAvailable ? "Host is available" : "Host is not available"}</Text>
15
+ * <Button title="Remove" onPress={() => removePortal("portal")} />
16
+ * </View>
17
+ * );
18
+ * }
19
+ * ```
20
+ */
21
+ export default function usePortal(hostName?: string): {
22
+ /**
23
+ * Whether a `<PortalHost />` with the given `hostName` is currently mounted.
24
+ */
25
+ isHostAvailable: boolean;
26
+ /**
27
+ * Remove portal from host container. Subsequent re-renders will not restore portal,
28
+ * but if you mount a new portal with the same name it will be shown (i. e. hook doesn't
29
+ * prevent new portal from being added).
30
+ *
31
+ * @param name - `name` of `<Portal />` component.
32
+ */
33
+ removePortal: (name: string) => void;
34
+ };
35
+ //# sourceMappingURL=use-portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-portal.d.ts","sourceRoot":"","sources":["../../../../src/teleport/use-portal.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,QAAQ,GAAE,MAAe;IAIvD;;OAEG;;IAEH;;;;;;OAMG;yBACkB,MAAM;EAG9B"}
@@ -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"}
@@ -0,0 +1,25 @@
1
+ import type { PortalHostProps } from "./types";
2
+ /**
3
+ * PortalHost is a component that acts as an anchor for the portals.
4
+ * You can define multiple portal hosts in your app and use them to render different portals.
5
+ * Each portal host has a unique name that you can use to identify a necessary one among the others.
6
+ *
7
+ * @category components
8
+ * @param name - The name of the portal host. It's used by `<Portal />` component to identify the host.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { StyleSheet, View } from "react-native";
13
+ * import { PortalHost, PortalProvider } from "react-native-teleport";
14
+ * export default function App() {
15
+ * return (
16
+ * <PortalProvider>
17
+ * <PortalHost style={StyleSheet.absoluteFillObject} name="overlay" />
18
+ * </PortalProvider>
19
+ * );
20
+ * }
21
+ * ```
22
+ */
23
+ declare const PortalHostComponent: ({ name, children, style }: PortalHostProps) => import("react/jsx-runtime").JSX.Element;
24
+ export default PortalHostComponent;
25
+ //# sourceMappingURL=PortalHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHost.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHost.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,mBAAmB,GAAI,2BAA2B,eAAe,4CAyBtE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PortalHostProps } from "./types";
2
+ declare function PortalHost({ name, children, style }: PortalHostProps): import("react/jsx-runtime").JSX.Element;
3
+ declare const _default: import("react").MemoExoticComponent<typeof PortalHost>;
4
+ export default _default;
5
+ //# sourceMappingURL=PortalHostView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHostView.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHostView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,2CAiB7D;;AAED,wBAAgC"}
@@ -0,0 +1,4 @@
1
+ import type { PortalHostProps } from "./types";
2
+ declare const PortalHost: (props: PortalHostProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default PortalHost;
4
+ //# sourceMappingURL=PortalHostView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalHostView.native.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalHostView.native.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,QAAA,MAAM,UAAU,GAAI,OAAO,eAAe,4CAEzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,23 @@
1
+ type PortalProviderProps = {
2
+ children: React.ReactNode;
3
+ };
4
+ /**
5
+ * Wraps your app with this component to use the teleport API.
6
+ *
7
+ * This component provides a context/registry for all Portals so that you can use imperative API, such as `usePortal` hook to manage Portals.
8
+ *
9
+ * @category components
10
+ * @example
11
+ * ```tsx
12
+ * import { PortalProvider } from "react-native-teleport";
13
+ * export default function App() {
14
+ * return (
15
+ * <PortalProvider>
16
+ * //* your main application code goes here
17
+ * </PortalProvider>
18
+ * );
19
+ * }
20
+ */
21
+ export default function PortalProvider({ children }: PortalProviderProps): import("react/jsx-runtime").JSX.Element;
22
+ export {};
23
+ //# sourceMappingURL=PortalProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProvider.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProvider.tsx"],"names":[],"mappings":"AAUA,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CASvE"}
@@ -0,0 +1,3 @@
1
+ import type { PortalProviderProps } from "./types";
2
+ export default function PortalProvider({ children }: PortalProviderProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=PortalProviderView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProviderView.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProviderView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,2CAwDvE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * COPIED FROM react-native-teleport 1.2.0 — `src/views/PortalProvider/index.native.tsx`
3
+ * MIT, Copyright (c) 2025 Kiryl Ziusko. Full licence in `NOTICE` at the root.
4
+ *
5
+ * Changed: nothing — byte-for-byte, only its path.
6
+ */
7
+ import type { PortalProviderProps } from "./types";
8
+ export default function PortalProvider({ children }: PortalProviderProps): import("react").ReactNode;
9
+ //# sourceMappingURL=PortalProviderView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PortalProviderView.native.d.ts","sourceRoot":"","sources":["../../../../src/teleport/PortalProviderView.native.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,6BAEvE"}