@pushframe/sdk 0.1.5 → 0.1.9

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 (288) hide show
  1. package/lib/commonjs/PushframeProvider.js +69 -0
  2. package/lib/commonjs/PushframeProvider.js.map +1 -0
  3. package/lib/commonjs/PushframeScreen.js +69 -0
  4. package/lib/commonjs/PushframeScreen.js.map +1 -0
  5. package/lib/commonjs/bindings.js +73 -0
  6. package/lib/commonjs/bindings.js.map +1 -0
  7. package/lib/commonjs/components/ButtonComponent.js +72 -0
  8. package/lib/commonjs/components/ButtonComponent.js.map +1 -0
  9. package/lib/commonjs/components/FlatListComponent.js +73 -0
  10. package/lib/commonjs/components/FlatListComponent.js.map +1 -0
  11. package/lib/commonjs/components/ImageComponent.js +67 -0
  12. package/lib/commonjs/components/ImageComponent.js.map +1 -0
  13. package/lib/commonjs/components/PushFrameComponent.js +179 -0
  14. package/lib/commonjs/components/PushFrameComponent.js.map +1 -0
  15. package/lib/commonjs/components/PushFrameProvider.js +115 -0
  16. package/lib/commonjs/components/PushFrameProvider.js.map +1 -0
  17. package/lib/commonjs/components/PushFrameScreen.js +39 -0
  18. package/lib/commonjs/components/PushFrameScreen.js.map +1 -0
  19. package/lib/commonjs/components/ScrollViewComponent.js +64 -0
  20. package/lib/commonjs/components/ScrollViewComponent.js.map +1 -0
  21. package/lib/commonjs/components/StackComponent.js +61 -0
  22. package/lib/commonjs/components/StackComponent.js.map +1 -0
  23. package/lib/commonjs/components/TextComponent.js +62 -0
  24. package/lib/commonjs/components/TextComponent.js.map +1 -0
  25. package/lib/commonjs/conditions.js +44 -0
  26. package/lib/commonjs/conditions.js.map +1 -0
  27. package/lib/commonjs/context/PushFrameContext.js +33 -0
  28. package/lib/commonjs/context/PushFrameContext.js.map +1 -0
  29. package/lib/commonjs/index.js +200 -0
  30. package/lib/commonjs/index.js.map +1 -0
  31. package/lib/commonjs/overlays/BottomSheetHost.js +144 -0
  32. package/lib/commonjs/overlays/BottomSheetHost.js.map +1 -0
  33. package/lib/commonjs/overlays/ToastHost.js +135 -0
  34. package/lib/commonjs/overlays/ToastHost.js.map +1 -0
  35. package/lib/commonjs/package.json +1 -0
  36. package/lib/commonjs/primitives/ActivityIndicator.js +24 -0
  37. package/lib/commonjs/primitives/ActivityIndicator.js.map +1 -0
  38. package/lib/commonjs/primitives/FlatList.js +34 -0
  39. package/lib/commonjs/primitives/FlatList.js.map +1 -0
  40. package/lib/commonjs/primitives/Image.js +33 -0
  41. package/lib/commonjs/primitives/Image.js.map +1 -0
  42. package/lib/commonjs/primitives/KeyboardAvoidingView.js +24 -0
  43. package/lib/commonjs/primitives/KeyboardAvoidingView.js.map +1 -0
  44. package/lib/commonjs/primitives/Modal.js +24 -0
  45. package/lib/commonjs/primitives/Modal.js.map +1 -0
  46. package/lib/commonjs/primitives/Pressable.js +26 -0
  47. package/lib/commonjs/primitives/Pressable.js.map +1 -0
  48. package/lib/commonjs/primitives/SafeAreaView.js +38 -0
  49. package/lib/commonjs/primitives/SafeAreaView.js.map +1 -0
  50. package/lib/commonjs/primitives/ScrollView.js +26 -0
  51. package/lib/commonjs/primitives/ScrollView.js.map +1 -0
  52. package/lib/commonjs/primitives/StatusBar.js +24 -0
  53. package/lib/commonjs/primitives/StatusBar.js.map +1 -0
  54. package/lib/commonjs/primitives/Switch.js +28 -0
  55. package/lib/commonjs/primitives/Switch.js.map +1 -0
  56. package/lib/commonjs/primitives/Text.js +37 -0
  57. package/lib/commonjs/primitives/Text.js.map +1 -0
  58. package/lib/commonjs/primitives/TextInput.js +31 -0
  59. package/lib/commonjs/primitives/TextInput.js.map +1 -0
  60. package/lib/commonjs/primitives/View.js +24 -0
  61. package/lib/commonjs/primitives/View.js.map +1 -0
  62. package/lib/commonjs/primitives/index.js +97 -0
  63. package/lib/commonjs/primitives/index.js.map +1 -0
  64. package/lib/commonjs/registry/ComponentRegistry.js +70 -0
  65. package/lib/commonjs/registry/ComponentRegistry.js.map +1 -0
  66. package/lib/commonjs/registry.js +94 -0
  67. package/lib/commonjs/registry.js.map +1 -0
  68. package/lib/commonjs/renderer/RecursiveRenderer.js +202 -0
  69. package/lib/commonjs/renderer/RecursiveRenderer.js.map +1 -0
  70. package/lib/commonjs/renderer/bindingResolver.js +98 -0
  71. package/lib/commonjs/renderer/bindingResolver.js.map +1 -0
  72. package/lib/commonjs/renderer/conditionalEvaluator.js +31 -0
  73. package/lib/commonjs/renderer/conditionalEvaluator.js.map +1 -0
  74. package/lib/commonjs/renderer.js +107 -0
  75. package/lib/commonjs/renderer.js.map +1 -0
  76. package/lib/commonjs/schema.js +79 -0
  77. package/lib/commonjs/schema.js.map +1 -0
  78. package/lib/commonjs/transformer/index.js +1055 -0
  79. package/lib/commonjs/transformer/index.js.map +1 -0
  80. package/lib/commonjs/transport.js +86 -0
  81. package/lib/commonjs/transport.js.map +1 -0
  82. package/lib/module/PushframeProvider.js +62 -0
  83. package/lib/module/PushframeProvider.js.map +1 -0
  84. package/lib/module/PushframeScreen.js +65 -0
  85. package/lib/module/PushframeScreen.js.map +1 -0
  86. package/lib/module/bindings.js +68 -0
  87. package/lib/module/bindings.js.map +1 -0
  88. package/lib/module/components/ButtonComponent.js +67 -0
  89. package/lib/module/components/ButtonComponent.js.map +1 -0
  90. package/lib/module/components/FlatListComponent.js +68 -0
  91. package/lib/module/components/FlatListComponent.js.map +1 -0
  92. package/lib/module/components/ImageComponent.js +62 -0
  93. package/lib/module/components/ImageComponent.js.map +1 -0
  94. package/lib/module/components/PushFrameComponent.js +174 -0
  95. package/lib/module/components/PushFrameComponent.js.map +1 -0
  96. package/lib/module/components/PushFrameProvider.js +110 -0
  97. package/lib/module/components/PushFrameProvider.js.map +1 -0
  98. package/lib/module/components/PushFrameScreen.js +34 -0
  99. package/lib/module/components/PushFrameScreen.js.map +1 -0
  100. package/lib/module/components/ScrollViewComponent.js +59 -0
  101. package/lib/module/components/ScrollViewComponent.js.map +1 -0
  102. package/lib/module/components/StackComponent.js +56 -0
  103. package/lib/module/components/StackComponent.js.map +1 -0
  104. package/lib/module/components/TextComponent.js +57 -0
  105. package/lib/module/components/TextComponent.js.map +1 -0
  106. package/lib/module/conditions.js +40 -0
  107. package/lib/module/conditions.js.map +1 -0
  108. package/lib/module/context/PushFrameContext.js +29 -0
  109. package/lib/module/context/PushFrameContext.js.map +1 -0
  110. package/lib/module/index.js +99 -0
  111. package/lib/module/index.js.map +1 -0
  112. package/lib/module/overlays/BottomSheetHost.js +139 -0
  113. package/lib/module/overlays/BottomSheetHost.js.map +1 -0
  114. package/lib/module/overlays/ToastHost.js +130 -0
  115. package/lib/module/overlays/ToastHost.js.map +1 -0
  116. package/lib/module/primitives/ActivityIndicator.js +19 -0
  117. package/lib/module/primitives/ActivityIndicator.js.map +1 -0
  118. package/lib/module/primitives/FlatList.js +29 -0
  119. package/lib/module/primitives/FlatList.js.map +1 -0
  120. package/lib/module/primitives/Image.js +28 -0
  121. package/lib/module/primitives/Image.js.map +1 -0
  122. package/lib/module/primitives/KeyboardAvoidingView.js +19 -0
  123. package/lib/module/primitives/KeyboardAvoidingView.js.map +1 -0
  124. package/lib/module/primitives/Modal.js +19 -0
  125. package/lib/module/primitives/Modal.js.map +1 -0
  126. package/lib/module/primitives/Pressable.js +21 -0
  127. package/lib/module/primitives/Pressable.js.map +1 -0
  128. package/lib/module/primitives/SafeAreaView.js +33 -0
  129. package/lib/module/primitives/SafeAreaView.js.map +1 -0
  130. package/lib/module/primitives/ScrollView.js +21 -0
  131. package/lib/module/primitives/ScrollView.js.map +1 -0
  132. package/lib/module/primitives/StatusBar.js +19 -0
  133. package/lib/module/primitives/StatusBar.js.map +1 -0
  134. package/lib/module/primitives/Switch.js +23 -0
  135. package/lib/module/primitives/Switch.js.map +1 -0
  136. package/lib/module/primitives/Text.js +32 -0
  137. package/lib/module/primitives/Text.js.map +1 -0
  138. package/lib/module/primitives/TextInput.js +26 -0
  139. package/lib/module/primitives/TextInput.js.map +1 -0
  140. package/lib/module/primitives/View.js +19 -0
  141. package/lib/module/primitives/View.js.map +1 -0
  142. package/lib/module/primitives/index.js +16 -0
  143. package/lib/module/primitives/index.js.map +1 -0
  144. package/lib/module/registry/ComponentRegistry.js +66 -0
  145. package/lib/module/registry/ComponentRegistry.js.map +1 -0
  146. package/lib/module/registry.js +88 -0
  147. package/lib/module/registry.js.map +1 -0
  148. package/lib/module/renderer/RecursiveRenderer.js +197 -0
  149. package/lib/module/renderer/RecursiveRenderer.js.map +1 -0
  150. package/lib/module/renderer/bindingResolver.js +92 -0
  151. package/lib/module/renderer/bindingResolver.js.map +1 -0
  152. package/lib/module/renderer/conditionalEvaluator.js +28 -0
  153. package/lib/module/renderer/conditionalEvaluator.js.map +1 -0
  154. package/lib/module/renderer.js +103 -0
  155. package/lib/module/renderer.js.map +1 -0
  156. package/lib/module/schema.js +74 -0
  157. package/lib/module/schema.js.map +1 -0
  158. package/lib/module/transformer/index.js +1051 -0
  159. package/lib/module/transformer/index.js.map +1 -0
  160. package/lib/module/transport.js +82 -0
  161. package/lib/module/transport.js.map +1 -0
  162. package/lib/typescript/PushframeProvider.d.ts +58 -0
  163. package/lib/typescript/PushframeProvider.d.ts.map +1 -0
  164. package/lib/typescript/PushframeScreen.d.ts +36 -0
  165. package/lib/typescript/PushframeScreen.d.ts.map +1 -0
  166. package/lib/typescript/bindings.d.ts +29 -0
  167. package/lib/typescript/bindings.d.ts.map +1 -0
  168. package/lib/typescript/components/ButtonComponent.d.ts +11 -0
  169. package/lib/typescript/components/ButtonComponent.d.ts.map +1 -0
  170. package/lib/typescript/components/FlatListComponent.d.ts +28 -0
  171. package/lib/typescript/components/FlatListComponent.d.ts.map +1 -0
  172. package/lib/typescript/components/ImageComponent.d.ts +12 -0
  173. package/lib/typescript/components/ImageComponent.d.ts.map +1 -0
  174. package/lib/typescript/components/PushFrameComponent.d.ts +48 -0
  175. package/lib/typescript/components/PushFrameComponent.d.ts.map +1 -0
  176. package/lib/typescript/components/PushFrameProvider.d.ts +51 -0
  177. package/lib/typescript/components/PushFrameProvider.d.ts.map +1 -0
  178. package/lib/typescript/components/PushFrameScreen.d.ts +15 -0
  179. package/lib/typescript/components/PushFrameScreen.d.ts.map +1 -0
  180. package/lib/typescript/components/ScrollViewComponent.d.ts +19 -0
  181. package/lib/typescript/components/ScrollViewComponent.d.ts.map +1 -0
  182. package/lib/typescript/components/StackComponent.d.ts +16 -0
  183. package/lib/typescript/components/StackComponent.d.ts.map +1 -0
  184. package/lib/typescript/components/TextComponent.d.ts +13 -0
  185. package/lib/typescript/components/TextComponent.d.ts.map +1 -0
  186. package/lib/typescript/conditions.d.ts +12 -0
  187. package/lib/typescript/conditions.d.ts.map +1 -0
  188. package/lib/typescript/context/PushFrameContext.d.ts +57 -0
  189. package/lib/typescript/context/PushFrameContext.d.ts.map +1 -0
  190. package/lib/typescript/index.d.ts +74 -0
  191. package/lib/typescript/index.d.ts.map +1 -0
  192. package/lib/typescript/overlays/BottomSheetHost.d.ts +21 -0
  193. package/lib/typescript/overlays/BottomSheetHost.d.ts.map +1 -0
  194. package/lib/typescript/overlays/ToastHost.d.ts +12 -0
  195. package/lib/typescript/overlays/ToastHost.d.ts.map +1 -0
  196. package/lib/typescript/primitives/ActivityIndicator.d.ts +12 -0
  197. package/lib/typescript/primitives/ActivityIndicator.d.ts.map +1 -0
  198. package/lib/typescript/primitives/FlatList.d.ts +29 -0
  199. package/lib/typescript/primitives/FlatList.d.ts.map +1 -0
  200. package/lib/typescript/primitives/Image.d.ts +20 -0
  201. package/lib/typescript/primitives/Image.d.ts.map +1 -0
  202. package/lib/typescript/primitives/KeyboardAvoidingView.d.ts +12 -0
  203. package/lib/typescript/primitives/KeyboardAvoidingView.d.ts.map +1 -0
  204. package/lib/typescript/primitives/Modal.d.ts +12 -0
  205. package/lib/typescript/primitives/Modal.d.ts.map +1 -0
  206. package/lib/typescript/primitives/Pressable.d.ts +14 -0
  207. package/lib/typescript/primitives/Pressable.d.ts.map +1 -0
  208. package/lib/typescript/primitives/SafeAreaView.d.ts +20 -0
  209. package/lib/typescript/primitives/SafeAreaView.d.ts.map +1 -0
  210. package/lib/typescript/primitives/ScrollView.d.ts +15 -0
  211. package/lib/typescript/primitives/ScrollView.d.ts.map +1 -0
  212. package/lib/typescript/primitives/StatusBar.d.ts +12 -0
  213. package/lib/typescript/primitives/StatusBar.d.ts.map +1 -0
  214. package/lib/typescript/primitives/Switch.d.ts +19 -0
  215. package/lib/typescript/primitives/Switch.d.ts.map +1 -0
  216. package/lib/typescript/primitives/Text.d.ts +25 -0
  217. package/lib/typescript/primitives/Text.d.ts.map +1 -0
  218. package/lib/typescript/primitives/TextInput.d.ts +25 -0
  219. package/lib/typescript/primitives/TextInput.d.ts.map +1 -0
  220. package/lib/typescript/primitives/View.d.ts +12 -0
  221. package/lib/typescript/primitives/View.d.ts.map +1 -0
  222. package/lib/typescript/primitives/index.d.ts +27 -0
  223. package/lib/typescript/primitives/index.d.ts.map +1 -0
  224. package/lib/typescript/registry/ComponentRegistry.d.ts +21 -0
  225. package/lib/typescript/registry/ComponentRegistry.d.ts.map +1 -0
  226. package/lib/typescript/registry.d.ts +57 -0
  227. package/lib/typescript/registry.d.ts.map +1 -0
  228. package/lib/typescript/renderer/RecursiveRenderer.d.ts +32 -0
  229. package/lib/typescript/renderer/RecursiveRenderer.d.ts.map +1 -0
  230. package/lib/typescript/renderer/bindingResolver.d.ts +26 -0
  231. package/lib/typescript/renderer/bindingResolver.d.ts.map +1 -0
  232. package/lib/typescript/renderer/conditionalEvaluator.d.ts +15 -0
  233. package/lib/typescript/renderer/conditionalEvaluator.d.ts.map +1 -0
  234. package/lib/typescript/renderer.d.ts +29 -0
  235. package/lib/typescript/renderer.d.ts.map +1 -0
  236. package/lib/typescript/schema.d.ts +84 -0
  237. package/lib/typescript/schema.d.ts.map +1 -0
  238. package/lib/typescript/transformer/index.d.ts +49 -0
  239. package/lib/typescript/transformer/index.d.ts.map +1 -0
  240. package/lib/typescript/transport.d.ts +19 -0
  241. package/lib/typescript/transport.d.ts.map +1 -0
  242. package/package.json +20 -18
  243. package/src/PushframeProvider.tsx +119 -0
  244. package/src/PushframeScreen.tsx +107 -0
  245. package/src/bindings.ts +72 -0
  246. package/src/components/ButtonComponent.tsx +87 -0
  247. package/src/components/FlatListComponent.tsx +86 -0
  248. package/src/components/ImageComponent.tsx +70 -0
  249. package/src/components/PushFrameComponent.tsx +221 -0
  250. package/src/components/PushFrameProvider.tsx +177 -0
  251. package/src/components/PushFrameScreen.tsx +30 -0
  252. package/src/components/ScrollViewComponent.tsx +65 -0
  253. package/src/components/StackComponent.tsx +69 -0
  254. package/src/components/TextComponent.tsx +60 -0
  255. package/src/conditions.ts +46 -0
  256. package/src/context/PushFrameContext.ts +89 -0
  257. package/src/index.ts +119 -0
  258. package/src/overlays/BottomSheetHost.tsx +175 -0
  259. package/src/overlays/ToastHost.tsx +147 -0
  260. package/src/primitives/ActivityIndicator.tsx +21 -0
  261. package/src/primitives/FlatList.tsx +49 -0
  262. package/src/primitives/Image.tsx +26 -0
  263. package/src/primitives/KeyboardAvoidingView.tsx +21 -0
  264. package/src/primitives/Modal.tsx +17 -0
  265. package/src/primitives/Pressable.tsx +19 -0
  266. package/src/primitives/SafeAreaView.tsx +42 -0
  267. package/src/primitives/ScrollView.tsx +21 -0
  268. package/src/primitives/StatusBar.tsx +17 -0
  269. package/src/primitives/Switch.tsx +24 -0
  270. package/src/primitives/Text.tsx +43 -0
  271. package/src/primitives/TextInput.tsx +42 -0
  272. package/src/primitives/View.tsx +17 -0
  273. package/src/primitives/index.ts +38 -0
  274. package/src/registry/ComponentRegistry.ts +99 -0
  275. package/src/registry.ts +99 -0
  276. package/src/renderer/RecursiveRenderer.tsx +242 -0
  277. package/src/renderer/bindingResolver.ts +94 -0
  278. package/src/renderer/conditionalEvaluator.ts +29 -0
  279. package/src/renderer.tsx +124 -0
  280. package/src/schema.ts +132 -0
  281. package/src/transformer/index.ts +1016 -0
  282. package/src/transport.ts +104 -0
  283. package/dist/index.d.mts +0 -534
  284. package/dist/index.d.ts +0 -534
  285. package/dist/index.js +0 -1572
  286. package/dist/index.js.map +0 -1
  287. package/dist/index.mjs +0 -1541
  288. package/dist/index.mjs.map +0 -1
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PushFrameProvider = PushFrameProvider;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _PushFrameContext = require("../context/PushFrameContext");
9
+ var _ComponentRegistry = require("../registry/ComponentRegistry");
10
+ var _ToastHost = require("../overlays/ToastHost");
11
+ var _BottomSheetHost = require("../overlays/BottomSheetHost");
12
+ var _RecursiveRenderer = require("../renderer/RecursiveRenderer");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ const DEFAULT_BASE_URL = 'https://api.pushframe.io';
16
+
17
+ // ---------------------------------------------------------------------------
18
+ // Props
19
+ // ---------------------------------------------------------------------------
20
+
21
+ // ---------------------------------------------------------------------------
22
+ // PushFrameProvider
23
+ // ---------------------------------------------------------------------------
24
+
25
+ /**
26
+ * Root provider for the PushFrame SDK.
27
+ *
28
+ * Wrap your app (or a subtree) in this provider. All PushFrame.Screen and
29
+ * PushFrame.Component slots inside will fetch their schemas from the delivery
30
+ * service and render them using the shared ComponentRegistry and context.
31
+ *
32
+ * Also renders the ToastHost and BottomSheetHost overlay hosts at root level
33
+ * so any component in the tree can trigger them via built-in actions.
34
+ */
35
+ function PushFrameProvider({
36
+ apiKey,
37
+ context = {},
38
+ baseUrl = DEFAULT_BASE_URL,
39
+ appVersion,
40
+ components,
41
+ loadingComponent,
42
+ fallbackComponent,
43
+ onAction,
44
+ onError,
45
+ children
46
+ }) {
47
+ // Registry — created once (components prop should be stable)
48
+ const registry = (0, _react.useMemo)(() => new _ComponentRegistry.ComponentRegistry(components),
49
+ // eslint-disable-next-line react-hooks/exhaustive-deps
50
+ []);
51
+
52
+ // Overlay refs
53
+ const toastRef = (0, _react.useRef)(null);
54
+ const bottomSheetRef = (0, _react.useRef)(null);
55
+ const showToast = (0, _react.useCallback)(payload => {
56
+ toastRef.current?.show(payload);
57
+ }, []);
58
+ const showBottomSheet = (0, _react.useCallback)(payload => {
59
+ bottomSheetRef.current?.show(payload);
60
+ }, []);
61
+ const dismissBottomSheet = (0, _react.useCallback)(() => {
62
+ bottomSheetRef.current?.dismiss();
63
+ }, []);
64
+
65
+ // renderContent for BottomSheetHost — renders a schema node with the Provider's registry
66
+ const renderBottomSheetContent = (0, _react.useCallback)((schema, sheetContext) => {
67
+ const mergedContext = sheetContext ? {
68
+ ...context,
69
+ ...sheetContext
70
+ } : context;
71
+ // No-op dispatchAction for bottom sheet content (actions bubble via onAction)
72
+ const dispatchAction = (action, payload) => {
73
+ if (action === 'dismiss-bottom-sheet') {
74
+ dismissBottomSheet();
75
+ return;
76
+ }
77
+ if (action === 'show-toast') {
78
+ showToast(payload);
79
+ return;
80
+ }
81
+ onAction?.(action, payload);
82
+ };
83
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RecursiveRenderer.RecursiveRenderer, {
84
+ node: schema,
85
+ context: mergedContext,
86
+ registry: registry,
87
+ dispatchAction: dispatchAction,
88
+ fallbackComponent: fallbackComponent
89
+ });
90
+ }, [context, registry, fallbackComponent, onAction, dismissBottomSheet, showToast]);
91
+ const contextValue = (0, _react.useMemo)(() => ({
92
+ apiKey,
93
+ baseUrl,
94
+ appVersion,
95
+ globalContext: context,
96
+ registry,
97
+ loadingComponent,
98
+ fallbackComponent,
99
+ onAction,
100
+ onError,
101
+ showToast,
102
+ showBottomSheet,
103
+ dismissBottomSheet
104
+ }), [apiKey, baseUrl, appVersion, context, registry, loadingComponent, fallbackComponent, onAction, onError, showToast, showBottomSheet, dismissBottomSheet]);
105
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_PushFrameContext.PushFrameContext.Provider, {
106
+ value: contextValue,
107
+ children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastHost.ToastHost, {
108
+ ref: toastRef
109
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_BottomSheetHost.BottomSheetHost, {
110
+ ref: bottomSheetRef,
111
+ renderContent: renderBottomSheetContent
112
+ })]
113
+ });
114
+ }
115
+ //# sourceMappingURL=PushFrameProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_PushFrameContext","_ComponentRegistry","_ToastHost","_BottomSheetHost","_RecursiveRenderer","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_BASE_URL","PushFrameProvider","apiKey","context","baseUrl","appVersion","components","loadingComponent","fallbackComponent","onAction","onError","children","registry","useMemo","ComponentRegistry","toastRef","useRef","bottomSheetRef","showToast","useCallback","payload","current","show","showBottomSheet","dismissBottomSheet","dismiss","renderBottomSheetContent","schema","sheetContext","mergedContext","dispatchAction","action","jsx","RecursiveRenderer","node","contextValue","globalContext","jsxs","PushFrameContext","Provider","value","ToastHost","ref","BottomSheetHost","renderContent"],"sourceRoot":"../../../src","sources":["components/PushFrameProvider.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAOA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA,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 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PushFrameScreen = PushFrameScreen;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _PushFrameComponent = require("./PushFrameComponent");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ /**
13
+ * Fetches a screen schema from GET /screens/:id[/:appVersion] on the delivery
14
+ * service and renders it with flex:1 sizing (full-page layout).
15
+ *
16
+ * Identical to PushFrame.Component in behaviour, but:
17
+ * - Fetches from /screens/:id instead of /components/:id
18
+ * - Applies flex:1 to its container so it fills the available space
19
+ *
20
+ * Context is merged: Provider context → slot context (local wins).
21
+ * Actions bubble: slot onAction → Provider onAction.
22
+ * Built-in actions (show-toast, show-bottom-sheet, etc.) are handled internally.
23
+ */
24
+ function PushFrameScreen(props) {
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
26
+ style: styles.container,
27
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PushFrameComponent.PushFrameComponentInternal, {
28
+ ...props,
29
+ resourceType: "screens",
30
+ fullscreen: true
31
+ })
32
+ });
33
+ }
34
+ const styles = _reactNative.StyleSheet.create({
35
+ container: {
36
+ flex: 1
37
+ }
38
+ });
39
+ //# sourceMappingURL=PushFrameScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_PushFrameComponent","_jsxRuntime","e","__esModule","default","PushFrameScreen","props","jsx","View","style","styles","container","children","PushFrameComponentInternal","resourceType","fullscreen","StyleSheet","create","flex"],"sourceRoot":"../../../src","sources":["components/PushFrameScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AAAkE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGlE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,eAAeA,CAACC,KAAyB,EAAE;EACzD,oBACE,IAAAL,WAAA,CAAAM,GAAA,EAACR,YAAA,CAAAS,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,eAC5B,IAAAX,WAAA,CAAAM,GAAA,EAACP,mBAAA,CAAAa,0BAA0B;MAAA,GAAKP,KAAK;MAAEQ,YAAY,EAAC,SAAS;MAACC,UAAU;IAAA,CAAE;EAAC,CACvE,CAAC;AAEX;AAEA,MAAML,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ScrollViewComponent = ScrollViewComponent;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function ScrollViewComponent({
12
+ props,
13
+ children
14
+ }) {
15
+ const {
16
+ horizontal = false,
17
+ padding,
18
+ paddingTop,
19
+ paddingBottom,
20
+ paddingLeft,
21
+ paddingRight,
22
+ backgroundColor,
23
+ flex,
24
+ showsScrollIndicator = true,
25
+ contentPadding,
26
+ contentPaddingTop,
27
+ contentPaddingBottom,
28
+ contentPaddingLeft,
29
+ contentPaddingRight
30
+ } = props;
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
32
+ horizontal: horizontal,
33
+ showsHorizontalScrollIndicator: horizontal ? showsScrollIndicator : false,
34
+ showsVerticalScrollIndicator: !horizontal ? showsScrollIndicator : false,
35
+ style: [padding !== undefined && {
36
+ padding
37
+ }, paddingTop !== undefined && {
38
+ paddingTop
39
+ }, paddingBottom !== undefined && {
40
+ paddingBottom
41
+ }, paddingLeft !== undefined && {
42
+ paddingLeft
43
+ }, paddingRight !== undefined && {
44
+ paddingRight
45
+ }, backgroundColor !== undefined && {
46
+ backgroundColor
47
+ }, flex !== undefined && {
48
+ flex
49
+ }],
50
+ contentContainerStyle: [contentPadding !== undefined && {
51
+ padding: contentPadding
52
+ }, contentPaddingTop !== undefined && {
53
+ paddingTop: contentPaddingTop
54
+ }, contentPaddingBottom !== undefined && {
55
+ paddingBottom: contentPaddingBottom
56
+ }, contentPaddingLeft !== undefined && {
57
+ paddingLeft: contentPaddingLeft
58
+ }, contentPaddingRight !== undefined && {
59
+ paddingRight: contentPaddingRight
60
+ }],
61
+ children: children
62
+ });
63
+ }
64
+ //# sourceMappingURL=ScrollViewComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","ScrollViewComponent","props","children","horizontal","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","backgroundColor","flex","showsScrollIndicator","contentPadding","contentPaddingTop","contentPaddingBottom","contentPaddingLeft","contentPaddingRight","jsx","ScrollView","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","style","undefined","contentContainerStyle"],"sourceRoot":"../../../src","sources":["components/ScrollViewComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAA0C,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAoBnC,SAASG,mBAAmBA,CAAC;EAAEC,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d,YAAY,EAAEQ;IAAoB,CAAC,CAC1E;IAAAd,QAAA,EAEDA;EAAQ,CACC,CAAC;AAEjB","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StackComponent = StackComponent;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function StackComponent({
12
+ props,
13
+ children
14
+ }) {
15
+ const {
16
+ direction = 'vertical',
17
+ padding,
18
+ paddingTop,
19
+ paddingBottom,
20
+ paddingLeft,
21
+ paddingRight,
22
+ gap,
23
+ backgroundColor,
24
+ flex,
25
+ alignItems,
26
+ justifyContent
27
+ } = props;
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
29
+ style: [styles.base, direction === 'horizontal' && styles.horizontal, padding !== undefined && {
30
+ padding
31
+ }, paddingTop !== undefined && {
32
+ paddingTop
33
+ }, paddingBottom !== undefined && {
34
+ paddingBottom
35
+ }, paddingLeft !== undefined && {
36
+ paddingLeft
37
+ }, paddingRight !== undefined && {
38
+ paddingRight
39
+ }, gap !== undefined && {
40
+ gap
41
+ }, backgroundColor !== undefined && {
42
+ backgroundColor
43
+ }, flex !== undefined && {
44
+ flex
45
+ }, alignItems !== undefined && {
46
+ alignItems
47
+ }, justifyContent !== undefined && {
48
+ justifyContent
49
+ }],
50
+ children: children
51
+ });
52
+ }
53
+ const styles = _reactNative.StyleSheet.create({
54
+ base: {
55
+ flexDirection: 'column'
56
+ },
57
+ horizontal: {
58
+ flexDirection: 'row'
59
+ }
60
+ });
61
+ //# sourceMappingURL=StackComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","StackComponent","props","children","direction","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","gap","backgroundColor","flex","alignItems","justifyContent","jsx","View","style","styles","base","horizontal","undefined","StyleSheet","create","flexDirection"],"sourceRoot":"../../../src","sources":["components/StackComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAgD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAuBzC,SAASG,cAAcA,CAAC;EAAEC,KAAK;EAAEC;AAA8C,CAAC,EAAE;EACvF,MAAM;IACJC,SAAS,GAAG,UAAU;IACtBC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC,WAAW;IACXC,YAAY;IACZC,GAAG;IACHC,eAAe;IACfC,IAAI;IACJC,UAAU;IACVC;EACF,CAAC,GAAGZ,KAAK;EAET,oBACE,IAAAL,WAAA,CAAAkB,GAAA,EAACnB,YAAA,CAAAoB,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACC,IAAI,EACXf,SAAS,KAAK,YAAY,IAAIc,MAAM,CAACE,UAAU,EAC/Cf,OAAO,KAAKgB,SAAS,IAAI;MAAEhB;IAAQ,CAAC,EACpCC,UAAU,KAAKe,SAAS,IAAI;MAAEf;IAAW,CAAC,EAC1CC,aAAa,KAAKc,SAAS,IAAI;MAAEd;IAAc,CAAC,EAChDC,WAAW,KAAKa,SAAS,IAAI;MAAEb;IAAY,CAAC,EAC5CC,YAAY,KAAKY,SAAS,IAAI;MAAEZ;IAAa,CAAC,EAC9CC,GAAG,KAAKW,SAAS,IAAI;MAAEX;IAAI,CAAC,EAC5BC,eAAe,KAAKU,SAAS,IAAI;MAAEV;IAAgB,CAAC,EACpDC,IAAI,KAAKS,SAAS,IAAI;MAAET;IAAK,CAAC,EAC9BC,UAAU,KAAKQ,SAAS,IAAI;MAAER;IAAW,CAAC,EAC1CC,cAAc,KAAKO,SAAS,IAAI;MAAEP;IAAe,CAAC,CAClD;IAAAX,QAAA,EAEDA;EAAQ,CACL,CAAC;AAEX;AAEA,MAAMe,MAAM,GAAGI,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,IAAI,EAAE;IACJK,aAAa,EAAE;EACjB,CAAC;EACDJ,UAAU,EAAE;IACVI,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TextComponent = TextComponent;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const SIZE_STYLES = {
12
+ heading: {
13
+ fontSize: 24,
14
+ lineHeight: 32
15
+ },
16
+ subheading: {
17
+ fontSize: 18,
18
+ lineHeight: 26
19
+ },
20
+ body: {
21
+ fontSize: 16,
22
+ lineHeight: 24
23
+ },
24
+ caption: {
25
+ fontSize: 12,
26
+ lineHeight: 18
27
+ }
28
+ };
29
+ const WEIGHT_MAP = {
30
+ normal: '400',
31
+ medium: '500',
32
+ bold: '700'
33
+ };
34
+ function TextComponent({
35
+ props
36
+ }) {
37
+ const {
38
+ content = '',
39
+ size = 'body',
40
+ weight = 'normal',
41
+ color,
42
+ align,
43
+ numberOfLines
44
+ } = props;
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
46
+ style: [styles.base, SIZE_STYLES[size], {
47
+ fontWeight: WEIGHT_MAP[weight]
48
+ }, color !== undefined && {
49
+ color
50
+ }, align !== undefined && {
51
+ textAlign: align
52
+ }],
53
+ numberOfLines: numberOfLines,
54
+ children: content
55
+ });
56
+ }
57
+ const styles = _reactNative.StyleSheet.create({
58
+ base: {
59
+ color: '#1a1a1a'
60
+ }
61
+ });
62
+ //# sourceMappingURL=TextComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","SIZE_STYLES","heading","fontSize","lineHeight","subheading","body","caption","WEIGHT_MAP","normal","medium","bold","TextComponent","props","content","size","weight","color","align","numberOfLines","jsx","Text","style","styles","base","fontWeight","undefined","textAlign","children","StyleSheet","create"],"sourceRoot":"../../../src","sources":["components/TextComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAgD,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAehD,MAAMG,WAAuE,GAAG;EAC9EC,OAAO,EAAE;IAAEC,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAG,CAAC;EACzCC,UAAU,EAAE;IAAEF,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAG,CAAC;EAC5CE,IAAI,EAAE;IAAEH,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAG,CAAC;EACtCG,OAAO,EAAE;IAAEJ,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAG;AAC1C,CAAC;AAED,MAAMI,UAAqD,GAAG;EAC5DC,MAAM,EAAE,KAAK;EACbC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE;AACR,CAAC;AAEM,SAASC,aAAaA,CAAC;EAAEC;AAA0C,CAAC,EAAE;EAC3E,MAAM;IACJC,OAAO,GAAG,EAAE;IACZC,IAAI,GAAG,MAAM;IACbC,MAAM,GAAG,QAAQ;IACjBC,KAAK;IACLC,KAAK;IACLC;EACF,CAAC,GAAGN,KAAK;EAET,oBACE,IAAAhB,WAAA,CAAAuB,GAAA,EAACxB,YAAA,CAAAyB,IAAI;IACHC,KAAK,EAAE,CACLC,MAAM,CAACC,IAAI,EACXvB,WAAW,CAACc,IAAI,CAAC,EACjB;MAAEU,UAAU,EAAEjB,UAAU,CAACQ,MAAM;IAAE,CAAC,EAClCC,KAAK,KAAKS,SAAS,IAAI;MAAET;IAAM,CAAC,EAChCC,KAAK,KAAKQ,SAAS,IAAI;MAAEC,SAAS,EAAET;IAAM,CAAC,CAC3C;IACFC,aAAa,EAAEA,aAAc;IAAAS,QAAA,EAE5Bd;EAAO,CACJ,CAAC;AAEX;AAEA,MAAMS,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,IAAI,EAAE;IACJP,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.evaluateCondition = evaluateCondition;
7
+ var _bindings = require("./bindings");
8
+ /**
9
+ * Evaluate a condition against the current context.
10
+ *
11
+ * Returns true → node should render
12
+ * Returns false → node should be skipped
13
+ *
14
+ * When no condition is provided, always returns true.
15
+ */
16
+ function evaluateCondition(condition, context) {
17
+ if (!condition) return true;
18
+ const resolved = (0, _bindings.resolveValue)(condition.if, context);
19
+ const operator = condition.operator ?? (condition.equals !== undefined ? 'equals' : 'truthy');
20
+ switch (operator) {
21
+ case 'truthy':
22
+ return Boolean(resolved);
23
+ case 'falsy':
24
+ return !resolved;
25
+ case 'equals':
26
+ {
27
+ const rhs = (0, _bindings.resolveValue)(condition.equals ?? null, context);
28
+ return resolved === rhs;
29
+ }
30
+ case 'notEquals':
31
+ {
32
+ const rhs = (0, _bindings.resolveValue)(condition.equals ?? null, context);
33
+ return resolved !== rhs;
34
+ }
35
+ default:
36
+ {
37
+ // Exhaustive check — TypeScript will catch new operators at compile time.
38
+ const _exhaustive = operator;
39
+ console.warn('[Pushframe] Unknown condition operator:', _exhaustive);
40
+ return true;
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=conditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_bindings","require","evaluateCondition","condition","context","resolved","resolveValue","if","operator","equals","undefined","Boolean","rhs","_exhaustive","console","warn"],"sourceRoot":"../../src","sources":["conditions.ts"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,iBAAiBA,CAC/BC,SAAgC,EAChCC,OAAyB,EAChB;EACT,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI;EAE3B,MAAME,QAAQ,GAAG,IAAAC,sBAAY,EAACH,SAAS,CAACI,EAAE,EAAEH,OAAO,CAAC;EACpD,MAAMI,QAAQ,GAAGL,SAAS,CAACK,QAAQ,KAAKL,SAAS,CAACM,MAAM,KAAKC,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;EAE7F,QAAQF,QAAQ;IACd,KAAK,QAAQ;MACX,OAAOG,OAAO,CAACN,QAAQ,CAAC;IAE1B,KAAK,OAAO;MACV,OAAO,CAACA,QAAQ;IAElB,KAAK,QAAQ;MAAE;QACb,MAAMO,GAAG,GAAG,IAAAN,sBAAY,EAACH,SAAS,CAACM,MAAM,IAAI,IAAI,EAAEL,OAAO,CAAC;QAC3D,OAAOC,QAAQ,KAAKO,GAAG;MACzB;IAEA,KAAK,WAAW;MAAE;QAChB,MAAMA,GAAG,GAAG,IAAAN,sBAAY,EAACH,SAAS,CAACM,MAAM,IAAI,IAAI,EAAEL,OAAO,CAAC;QAC3D,OAAOC,QAAQ,KAAKO,GAAG;MACzB;IAEA;MAAS;QACP;QACA,MAAMC,WAAkB,GAAGL,QAAQ;QACnCM,OAAO,CAACC,IAAI,CAAC,yCAAyC,EAAEF,WAAW,CAAC;QACpE,OAAO,IAAI;MACb;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PushFrameContext = void 0;
7
+ exports.usePushFrameContext = usePushFrameContext;
8
+ var _react = require("react");
9
+ // ---------------------------------------------------------------------------
10
+ // Schema types
11
+ // ---------------------------------------------------------------------------
12
+
13
+ // ---------------------------------------------------------------------------
14
+ // Overlay payload types
15
+ // ---------------------------------------------------------------------------
16
+
17
+ // ---------------------------------------------------------------------------
18
+ // Context value
19
+ // ---------------------------------------------------------------------------
20
+
21
+ // ---------------------------------------------------------------------------
22
+ // Context and hook
23
+ // ---------------------------------------------------------------------------
24
+
25
+ const PushFrameContext = exports.PushFrameContext = /*#__PURE__*/(0, _react.createContext)(null);
26
+ function usePushFrameContext() {
27
+ const ctx = (0, _react.useContext)(PushFrameContext);
28
+ if (!ctx) {
29
+ throw new Error('[PushFrame] usePushFrameContext must be called inside <PushFrame.Provider>');
30
+ }
31
+ return ctx;
32
+ }
33
+ //# sourceMappingURL=PushFrameContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","PushFrameContext","exports","createContext","usePushFrameContext","ctx","useContext","Error"],"sourceRoot":"../../../src","sources":["context/PushFrameContext.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA;AACA;AACA;;AA6BA;AACA;AACA;;AAmBA;AACA;AACA;;AAkBA;AACA;AACA;;AAEO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,gBAAG,IAAAE,oBAAa,EAA+B,IAAI,CAAC;AAE1E,SAASC,mBAAmBA,CAAA,EAA0B;EAC3D,MAAMC,GAAG,GAAG,IAAAC,iBAAU,EAACL,gBAAgB,CAAC;EACxC,IAAI,CAACI,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,4EAA4E,CAAC;EAC/F;EACA,OAAOF,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ PushFrame: true,
8
+ PushFrameProvider: true,
9
+ PushFrameScreen: true,
10
+ PushFrameComponent: true,
11
+ PushFrameContext: true,
12
+ usePushFrameContext: true,
13
+ ComponentRegistry: true,
14
+ RecursiveRenderer: true,
15
+ resolveValue: true,
16
+ resolveProps: true,
17
+ resolveDeep: true,
18
+ evaluateIf: true,
19
+ transformCraftToSDUI: true
20
+ };
21
+ Object.defineProperty(exports, "ComponentRegistry", {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _ComponentRegistry.ComponentRegistry;
25
+ }
26
+ });
27
+ exports.PushFrame = void 0;
28
+ Object.defineProperty(exports, "PushFrameComponent", {
29
+ enumerable: true,
30
+ get: function () {
31
+ return _PushFrameComponent.PushFrameComponent;
32
+ }
33
+ });
34
+ Object.defineProperty(exports, "PushFrameContext", {
35
+ enumerable: true,
36
+ get: function () {
37
+ return _PushFrameContext.PushFrameContext;
38
+ }
39
+ });
40
+ Object.defineProperty(exports, "PushFrameProvider", {
41
+ enumerable: true,
42
+ get: function () {
43
+ return _PushFrameProvider.PushFrameProvider;
44
+ }
45
+ });
46
+ Object.defineProperty(exports, "PushFrameScreen", {
47
+ enumerable: true,
48
+ get: function () {
49
+ return _PushFrameScreen.PushFrameScreen;
50
+ }
51
+ });
52
+ Object.defineProperty(exports, "RecursiveRenderer", {
53
+ enumerable: true,
54
+ get: function () {
55
+ return _RecursiveRenderer.RecursiveRenderer;
56
+ }
57
+ });
58
+ Object.defineProperty(exports, "evaluateIf", {
59
+ enumerable: true,
60
+ get: function () {
61
+ return _conditionalEvaluator.evaluateIf;
62
+ }
63
+ });
64
+ Object.defineProperty(exports, "resolveDeep", {
65
+ enumerable: true,
66
+ get: function () {
67
+ return _bindingResolver.resolveDeep;
68
+ }
69
+ });
70
+ Object.defineProperty(exports, "resolveProps", {
71
+ enumerable: true,
72
+ get: function () {
73
+ return _bindingResolver.resolveProps;
74
+ }
75
+ });
76
+ Object.defineProperty(exports, "resolveValue", {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _bindingResolver.resolveValue;
80
+ }
81
+ });
82
+ Object.defineProperty(exports, "transformCraftToSDUI", {
83
+ enumerable: true,
84
+ get: function () {
85
+ return _index2.transformCraftToSDUI;
86
+ }
87
+ });
88
+ Object.defineProperty(exports, "usePushFrameContext", {
89
+ enumerable: true,
90
+ get: function () {
91
+ return _PushFrameContext.usePushFrameContext;
92
+ }
93
+ });
94
+ var _PushFrameProvider = require("./components/PushFrameProvider");
95
+ var _PushFrameScreen = require("./components/PushFrameScreen");
96
+ var _PushFrameComponent = require("./components/PushFrameComponent");
97
+ var _Text = require("./primitives/Text");
98
+ var _View = require("./primitives/View");
99
+ var _ScrollView = require("./primitives/ScrollView");
100
+ var _Image = require("./primitives/Image");
101
+ var _Pressable = require("./primitives/Pressable");
102
+ var _TextInput = require("./primitives/TextInput");
103
+ var _FlatList = require("./primitives/FlatList");
104
+ var _Modal = require("./primitives/Modal");
105
+ var _ActivityIndicator = require("./primitives/ActivityIndicator");
106
+ var _Switch = require("./primitives/Switch");
107
+ var _KeyboardAvoidingView = require("./primitives/KeyboardAvoidingView");
108
+ var _SafeAreaView = require("./primitives/SafeAreaView");
109
+ var _StatusBar = require("./primitives/StatusBar");
110
+ var _PushFrameContext = require("./context/PushFrameContext");
111
+ var _ComponentRegistry = require("./registry/ComponentRegistry");
112
+ var _RecursiveRenderer = require("./renderer/RecursiveRenderer");
113
+ var _bindingResolver = require("./renderer/bindingResolver");
114
+ var _conditionalEvaluator = require("./renderer/conditionalEvaluator");
115
+ var _index = require("./primitives/index");
116
+ Object.keys(_index).forEach(function (key) {
117
+ if (key === "default" || key === "__esModule") return;
118
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
119
+ if (key in exports && exports[key] === _index[key]) return;
120
+ Object.defineProperty(exports, key, {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _index[key];
124
+ }
125
+ });
126
+ });
127
+ var _index2 = require("./transformer/index");
128
+ /**
129
+ * @pushframe/sdk — Server-Driven UI for React Native
130
+ *
131
+ * Usage:
132
+ * import { PushFrame } from '@pushframe/sdk';
133
+ *
134
+ * <PushFrame.Provider apiKey="..." context={...}>
135
+ * <PushFrame.Screen name="home" />
136
+ * <PushFrame.Component name="promo-banner" />
137
+ * </PushFrame.Provider>
138
+ */
139
+
140
+ // ---------------------------------------------------------------------------
141
+ // Component imports (for namespace assembly)
142
+ // ---------------------------------------------------------------------------
143
+
144
+ // ---------------------------------------------------------------------------
145
+ // PushFrame namespace — the primary API surface
146
+ // ---------------------------------------------------------------------------
147
+
148
+ /**
149
+ * The PushFrame namespace. Import this as the single entry-point for the SDK.
150
+ *
151
+ * Slot components:
152
+ * - PushFrame.Provider — wraps the app, initialises registry and context
153
+ * - PushFrame.Screen — full-page slot (fetches /screens/:name, applies flex:1)
154
+ * - PushFrame.Component — inline slot (fetches /components/:name)
155
+ *
156
+ * Primitives (used internally by RecursiveRenderer, available for direct use):
157
+ * - PushFrame.Text, PushFrame.View, PushFrame.ScrollView, PushFrame.Image
158
+ * - PushFrame.Pressable, PushFrame.TextInput, PushFrame.FlatList
159
+ * - PushFrame.Modal, PushFrame.ActivityIndicator, PushFrame.Switch
160
+ * - PushFrame.KeyboardAvoidingView, PushFrame.SafeAreaView, PushFrame.StatusBar
161
+ */
162
+ const PushFrame = exports.PushFrame = {
163
+ // Slot components
164
+ Provider: _PushFrameProvider.PushFrameProvider,
165
+ Screen: _PushFrameScreen.PushFrameScreen,
166
+ Component: _PushFrameComponent.PushFrameComponent,
167
+ // Primitives
168
+ Text: _Text.Text,
169
+ View: _View.View,
170
+ ScrollView: _ScrollView.ScrollView,
171
+ Image: _Image.Image,
172
+ Pressable: _Pressable.Pressable,
173
+ TextInput: _TextInput.TextInput,
174
+ FlatList: _FlatList.FlatList,
175
+ Modal: _Modal.Modal,
176
+ ActivityIndicator: _ActivityIndicator.ActivityIndicator,
177
+ Switch: _Switch.Switch,
178
+ KeyboardAvoidingView: _KeyboardAvoidingView.KeyboardAvoidingView,
179
+ SafeAreaView: _SafeAreaView.SafeAreaView,
180
+ StatusBar: _StatusBar.StatusBar
181
+ };
182
+
183
+ // ---------------------------------------------------------------------------
184
+ // Named exports (for tree-shaking and selective imports)
185
+ // ---------------------------------------------------------------------------
186
+
187
+ // Slot components
188
+
189
+ // Context
190
+
191
+ // Registry
192
+
193
+ // Renderer
194
+
195
+ // Binding utilities
196
+
197
+ // Primitives
198
+
199
+ // Transformer (Craft.js → SDUI; intended for backend / dashboard use)
200
+ //# sourceMappingURL=index.js.map