arlo-react-native 0.1.0 → 0.1.1

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.
@@ -0,0 +1,3 @@
1
+ import type { ArloFlowRendererProps } from "./types";
2
+ export declare function ArloFlowRenderer({ session, handlers, componentRenderers, registry, autoStart, emptyState, unsupportedComponent, unsupportedScreen, onSnapshotChange, }: ArloFlowRendererProps): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=ArloFlowRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArloFlowRenderer.d.ts","sourceRoot":"","sources":["../src/ArloFlowRenderer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAGV,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAqajB,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACR,SAAgB,EAChB,UAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,GACjB,EAAE,qBAAqB,2CAqMvB"}
@@ -0,0 +1,425 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArloFlowRenderer = ArloFlowRenderer;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ const arlo_sdk_1 = require("arlo-sdk");
8
+ const IMPORTED_SCREEN_KEYS = new Set([
9
+ "__arlo_imported_code__",
10
+ "__arlo_imported_figma__",
11
+ ]);
12
+ function isImportedPreviewPayload(value) {
13
+ return Boolean(value &&
14
+ typeof value === "object" &&
15
+ !Array.isArray(value) &&
16
+ ["imported-code", "imported-figma"].includes(String(value.kind ?? "")) &&
17
+ value.version === 1);
18
+ }
19
+ function getImportedPreviewScreen(screen) {
20
+ if (!screen.customScreenKey || !IMPORTED_SCREEN_KEYS.has(screen.customScreenKey))
21
+ return null;
22
+ return isImportedPreviewPayload(screen.customPayload) && screen.customPayload.previewScreen
23
+ ? screen.customPayload.previewScreen
24
+ : null;
25
+ }
26
+ function getScreenContainerStyle(screen) {
27
+ return {
28
+ backgroundColor: screen.style?.backgroundColor ?? "#0b0b0d",
29
+ paddingTop: screen.style?.paddingTop ?? screen.style?.padding ?? 24,
30
+ paddingBottom: screen.style?.paddingBottom ?? screen.style?.padding ?? 24,
31
+ paddingHorizontal: screen.style?.paddingHorizontal ?? screen.style?.padding ?? 20,
32
+ justifyContent: screen.style?.justifyContent ?? "flex-start",
33
+ alignItems: screen.style?.alignItems ?? "stretch",
34
+ };
35
+ }
36
+ function getComponentWrapperStyle(component, isAbsoluteScreen) {
37
+ const layout = component.layout;
38
+ if (!layout) {
39
+ return isAbsoluteScreen ? { position: "absolute", zIndex: component.order } : styles.componentBlock;
40
+ }
41
+ const baseStyle = {
42
+ display: layout.visible === false ? "none" : "flex",
43
+ zIndex: layout.zIndex ?? component.order,
44
+ };
45
+ if (!isAbsoluteScreen && layout.position !== "absolute") {
46
+ return {
47
+ ...styles.componentBlock,
48
+ ...baseStyle,
49
+ };
50
+ }
51
+ return {
52
+ ...baseStyle,
53
+ position: "absolute",
54
+ left: layout.x ?? 0,
55
+ top: layout.y ?? 0,
56
+ width: layout.width,
57
+ height: layout.height,
58
+ transform: layout.rotation ? [{ rotate: `${layout.rotation}deg` }] : undefined,
59
+ };
60
+ }
61
+ function coerceStringValue(value) {
62
+ return typeof value === "string" ? value : "";
63
+ }
64
+ function coerceStringArrayValue(value) {
65
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
66
+ }
67
+ function coerceNumberValue(value, fallback) {
68
+ return typeof value === "number" ? value : fallback;
69
+ }
70
+ function getFieldError(snapshot, fieldKey) {
71
+ return snapshot.validationErrorsByField[fieldKey] ?? null;
72
+ }
73
+ function DefaultTextComponent({ component }) {
74
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: {
75
+ color: component.props.color ?? "#ffffff",
76
+ fontSize: component.props.fontSize ?? 16,
77
+ fontWeight: component.props.fontWeight ?? "normal",
78
+ textAlign: component.props.textAlign ?? "left",
79
+ lineHeight: component.props.lineHeight && component.props.fontSize
80
+ ? component.props.lineHeight * component.props.fontSize
81
+ : undefined,
82
+ opacity: component.props.opacity ?? 1,
83
+ }, children: component.props.content }));
84
+ }
85
+ function DefaultImageComponent({ component }) {
86
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Image, { source: { uri: component.props.src }, accessibilityLabel: component.props.alt, resizeMode: component.props.resizeMode ?? "cover", style: {
87
+ width: component.props.width ?? "100%",
88
+ height: component.props.height ?? 220,
89
+ borderRadius: component.props.borderRadius ?? 0,
90
+ } }));
91
+ }
92
+ function DefaultButtonComponent({ component, onPress, }) {
93
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: () => {
94
+ void onPress();
95
+ }, style: [
96
+ styles.button,
97
+ {
98
+ backgroundColor: component.props.style?.backgroundColor ?? "#ffffff",
99
+ borderRadius: component.props.style?.borderRadius ?? 14,
100
+ borderColor: component.props.style?.borderColor ?? "transparent",
101
+ borderWidth: component.props.style?.borderWidth ?? 0,
102
+ },
103
+ ], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
104
+ styles.buttonText,
105
+ {
106
+ color: component.props.style?.textColor ?? "#111111",
107
+ },
108
+ ], children: component.props.label }) }));
109
+ }
110
+ function DefaultTextInputComponent({ component, context, }) {
111
+ const value = coerceStringValue(context.snapshot.values[component.props.fieldKey]);
112
+ const error = getFieldError(context.snapshot, component.props.fieldKey);
113
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.fieldGroup, children: [component.props.label ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldLabel, children: component.props.label }) : null, (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { value: value, onChangeText: (nextValue) => context.onValueChange(component.props.fieldKey, nextValue), placeholder: component.props.placeholder, placeholderTextColor: "#7a7a85", keyboardType: component.props.keyboardType === "email"
114
+ ? "email-address"
115
+ : component.props.keyboardType === "numeric"
116
+ ? "numeric"
117
+ : component.props.keyboardType === "phone"
118
+ ? "phone-pad"
119
+ : "default", maxLength: component.props.maxLength, style: [styles.input, error ? styles.inputError : undefined] }), error ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldError, children: error }) : null] }));
120
+ }
121
+ function OptionPill({ label, selected, onPress, }) {
122
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onPress: onPress, style: [styles.optionPill, selected ? styles.optionPillSelected : undefined], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.optionPillText, selected ? styles.optionPillTextSelected : undefined], children: label }) }));
123
+ }
124
+ function DefaultSingleSelectComponent({ component, context, }) {
125
+ const value = coerceStringValue(context.snapshot.values[component.props.fieldKey]);
126
+ const error = getFieldError(context.snapshot, component.props.fieldKey);
127
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.fieldGroup, children: [component.props.label ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldLabel, children: component.props.label }) : null, (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.optionGroup, children: component.props.options.map((option) => ((0, jsx_runtime_1.jsx)(OptionPill, { label: option.label, selected: value === option.id, onPress: () => context.onValueChange(component.props.fieldKey, option.id) }, option.id))) }), error ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldError, children: error }) : null] }));
128
+ }
129
+ function DefaultMultiSelectComponent({ component, context, }) {
130
+ const values = coerceStringArrayValue(context.snapshot.values[component.props.fieldKey]);
131
+ const error = getFieldError(context.snapshot, component.props.fieldKey);
132
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.fieldGroup, children: [component.props.label ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldLabel, children: component.props.label }) : null, (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.optionGroup, children: component.props.options.map((option) => {
133
+ const selected = values.includes(option.id);
134
+ return ((0, jsx_runtime_1.jsx)(OptionPill, { label: option.label, selected: selected, onPress: () => {
135
+ const nextValues = selected
136
+ ? values.filter((value) => value !== option.id)
137
+ : [...values, option.id];
138
+ context.onValueChange(component.props.fieldKey, nextValues);
139
+ } }, option.id));
140
+ }) }), error ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldError, children: error }) : null] }));
141
+ }
142
+ function DefaultSliderComponent({ component, context, }) {
143
+ const currentValue = coerceNumberValue(context.snapshot.values[component.props.fieldKey], component.props.defaultValue ?? component.props.min);
144
+ const step = component.props.step ?? 1;
145
+ const nextValue = Math.min(component.props.max, currentValue + step);
146
+ const previousValue = Math.max(component.props.min, currentValue - step);
147
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.fieldGroup, children: [component.props.label ? (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.fieldLabel, children: component.props.label }) : null, (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.sliderCard, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.sliderValue, children: String(currentValue) }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.sliderActions, children: [(0, jsx_runtime_1.jsx)(OptionPill, { label: component.props.minLabel ?? "-", selected: false, onPress: () => context.onValueChange(component.props.fieldKey, previousValue) }), (0, jsx_runtime_1.jsx)(OptionPill, { label: component.props.maxLabel ?? "+", selected: false, onPress: () => context.onValueChange(component.props.fieldKey, nextValue) })] })] })] }));
148
+ }
149
+ function DefaultProgressBarComponent({ snapshot, component, }) {
150
+ const progress = snapshot.totalScreens > 1
151
+ ? ((snapshot.currentScreenIndex + 1) / snapshot.totalScreens) * 100
152
+ : 100;
153
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
154
+ styles.progressTrack,
155
+ {
156
+ backgroundColor: component.props.backgroundColor ?? "#26262b",
157
+ height: component.props.height ?? 6,
158
+ },
159
+ ], children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
160
+ width: `${progress}%`,
161
+ backgroundColor: component.props.color ?? "#ffffff",
162
+ height: "100%",
163
+ borderRadius: 999,
164
+ } }) }));
165
+ }
166
+ function DefaultPageIndicatorComponent({ snapshot, component, }) {
167
+ const size = component.props.size ?? 8;
168
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.pageIndicatorRow, children: Array.from({ length: snapshot.totalScreens }).map((_, index) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: {
169
+ width: size,
170
+ height: size,
171
+ borderRadius: size / 2,
172
+ backgroundColor: index === snapshot.currentScreenIndex
173
+ ? component.props.activeColor ?? "#ffffff"
174
+ : component.props.inactiveColor ?? "#4b4b55",
175
+ } }, index))) }));
176
+ }
177
+ function renderDefaultComponent(component, context, registry) {
178
+ switch (component.type) {
179
+ case "TEXT":
180
+ return (0, jsx_runtime_1.jsx)(DefaultTextComponent, { component: component });
181
+ case "IMAGE":
182
+ return (0, jsx_runtime_1.jsx)(DefaultImageComponent, { component: component });
183
+ case "BUTTON":
184
+ return (0, jsx_runtime_1.jsx)(DefaultButtonComponent, { component: component, onPress: () => context.onPressButton(component.id) });
185
+ case "TEXT_INPUT":
186
+ return (0, jsx_runtime_1.jsx)(DefaultTextInputComponent, { component: component, context: context });
187
+ case "SINGLE_SELECT":
188
+ return (0, jsx_runtime_1.jsx)(DefaultSingleSelectComponent, { component: component, context: context });
189
+ case "MULTI_SELECT":
190
+ return (0, jsx_runtime_1.jsx)(DefaultMultiSelectComponent, { component: component, context: context });
191
+ case "SLIDER":
192
+ return (0, jsx_runtime_1.jsx)(DefaultSliderComponent, { component: component, context: context });
193
+ case "PROGRESS_BAR":
194
+ return (0, jsx_runtime_1.jsx)(DefaultProgressBarComponent, { component: component, snapshot: context.snapshot });
195
+ case "PAGE_INDICATOR":
196
+ return (0, jsx_runtime_1.jsx)(DefaultPageIndicatorComponent, { component: component, snapshot: context.snapshot });
197
+ case "CUSTOM_COMPONENT": {
198
+ const registered = registry?.getComponent(component.props.registryKey);
199
+ return registered
200
+ ? registered({
201
+ session: context.session,
202
+ snapshot: context.snapshot,
203
+ screen: context.snapshot.currentScreen,
204
+ component,
205
+ })
206
+ : null;
207
+ }
208
+ default:
209
+ return null;
210
+ }
211
+ }
212
+ function ArloFlowRenderer({ session, handlers, componentRenderers, registry, autoStart = true, emptyState = null, unsupportedComponent, unsupportedScreen, onSnapshotChange, }) {
213
+ const [snapshot, setSnapshot] = (0, react_1.useState)(() => session.getSnapshot());
214
+ (0, react_1.useEffect)(() => {
215
+ const nextSnapshot = session.getSnapshot();
216
+ setSnapshot(nextSnapshot);
217
+ onSnapshotChange?.(nextSnapshot);
218
+ if (autoStart && session.getSnapshot().status === "idle") {
219
+ const effect = session.start();
220
+ const startedSnapshot = session.getSnapshot();
221
+ setSnapshot(startedSnapshot);
222
+ onSnapshotChange?.(startedSnapshot);
223
+ void (0, arlo_sdk_1.applyFlowSessionEffect)(session, effect, handlers);
224
+ }
225
+ }, [autoStart, handlers, onSnapshotChange, session]);
226
+ const sortedComponents = (0, react_1.useMemo)(() => [...(snapshot.currentScreen?.components ?? [])].sort((a, b) => a.order - b.order), [snapshot.currentScreen]);
227
+ const context = {
228
+ session,
229
+ snapshot,
230
+ handlers,
231
+ onValueChange: (fieldKey, value) => {
232
+ const nextSnapshot = session.setValue(fieldKey, value);
233
+ setSnapshot(nextSnapshot);
234
+ onSnapshotChange?.(nextSnapshot);
235
+ },
236
+ onPressButton: async (componentId) => {
237
+ const effect = session.pressButton(componentId);
238
+ const immediateSnapshot = session.getSnapshot();
239
+ setSnapshot(immediateSnapshot);
240
+ onSnapshotChange?.(immediateSnapshot);
241
+ await (0, arlo_sdk_1.applyFlowSessionEffect)(session, effect, handlers);
242
+ const finalSnapshot = session.getSnapshot();
243
+ setSnapshot(finalSnapshot);
244
+ onSnapshotChange?.(finalSnapshot);
245
+ },
246
+ };
247
+ if (!snapshot.currentScreen) {
248
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: emptyState });
249
+ }
250
+ if (snapshot.currentScreen.customScreenKey) {
251
+ const registeredScreen = registry?.getScreen(snapshot.currentScreen.customScreenKey);
252
+ const importedPreviewScreen = getImportedPreviewScreen(snapshot.currentScreen);
253
+ if (registeredScreen) {
254
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: registeredScreen({
255
+ session,
256
+ snapshot,
257
+ screen: snapshot.currentScreen,
258
+ }) }));
259
+ }
260
+ if (importedPreviewScreen) {
261
+ const previewComponents = [...(importedPreviewScreen.components ?? [])].sort((a, b) => a.order - b.order);
262
+ const previewContext = {
263
+ ...context,
264
+ onValueChange: () => undefined,
265
+ onPressButton: async () => undefined,
266
+ };
267
+ return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { contentContainerStyle: [
268
+ styles.container,
269
+ getScreenContainerStyle(importedPreviewScreen),
270
+ ], children: previewComponents.map((component) => {
271
+ const customRenderer = componentRenderers?.[component.type];
272
+ const content = customRenderer
273
+ ? customRenderer(component, previewContext)
274
+ : renderDefaultComponent(component, previewContext, registry);
275
+ if (content === null) {
276
+ return null;
277
+ }
278
+ return (0, jsx_runtime_1.jsx)(react_native_1.View, { children: content }, component.id);
279
+ }) }));
280
+ }
281
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: unsupportedScreen ? (unsupportedScreen(snapshot.currentScreen)) : ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.unsupported, children: (0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: styles.unsupportedText, children: ["Unsupported screen: ", snapshot.currentScreen.customScreenKey] }) })) }));
282
+ }
283
+ if (snapshot.currentScreen.layoutMode === "absolute") {
284
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
285
+ styles.absoluteContainer,
286
+ getScreenContainerStyle(snapshot.currentScreen),
287
+ ], children: sortedComponents.map((component) => {
288
+ const customRenderer = componentRenderers?.[component.type];
289
+ const content = customRenderer
290
+ ? customRenderer(component, context)
291
+ : renderDefaultComponent(component, context, registry);
292
+ if (content === null) {
293
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.unsupported, children: unsupportedComponent ? (unsupportedComponent(component)) : ((0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: styles.unsupportedText, children: ["Unsupported component: ", component.type] })) }, component.id));
294
+ }
295
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: getComponentWrapperStyle(component, true), children: content }, component.id));
296
+ }) }));
297
+ }
298
+ return ((0, jsx_runtime_1.jsx)(react_native_1.ScrollView, { contentContainerStyle: [
299
+ styles.container,
300
+ getScreenContainerStyle(snapshot.currentScreen),
301
+ ], children: sortedComponents.map((component) => {
302
+ const customRenderer = componentRenderers?.[component.type];
303
+ const content = customRenderer
304
+ ? customRenderer(component, context)
305
+ : renderDefaultComponent(component, context, registry);
306
+ if (content === null) {
307
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.unsupported, children: unsupportedComponent ? (unsupportedComponent(component)) : ((0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: styles.unsupportedText, children: ["Unsupported component: ", component.type] })) }, component.id));
308
+ }
309
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: getComponentWrapperStyle(component, false), children: content }, component.id));
310
+ }) }));
311
+ }
312
+ const styles = react_native_1.StyleSheet.create({
313
+ container: {
314
+ flexGrow: 1,
315
+ gap: 16,
316
+ },
317
+ componentBlock: {
318
+ width: "100%",
319
+ },
320
+ absoluteContainer: {
321
+ flex: 1,
322
+ position: "relative",
323
+ overflow: "hidden",
324
+ },
325
+ fieldGroup: {
326
+ gap: 8,
327
+ },
328
+ fieldLabel: {
329
+ color: "#f3f3f5",
330
+ fontSize: 14,
331
+ fontWeight: "600",
332
+ },
333
+ input: {
334
+ borderWidth: 1,
335
+ borderColor: "#2c2c34",
336
+ borderRadius: 14,
337
+ paddingHorizontal: 14,
338
+ paddingVertical: 12,
339
+ color: "#ffffff",
340
+ backgroundColor: "#141419",
341
+ },
342
+ inputError: {
343
+ borderColor: "#f36b8d",
344
+ },
345
+ fieldError: {
346
+ color: "#f59cb3",
347
+ fontSize: 12,
348
+ fontWeight: "500",
349
+ },
350
+ button: {
351
+ minHeight: 52,
352
+ alignItems: "center",
353
+ justifyContent: "center",
354
+ paddingHorizontal: 16,
355
+ paddingVertical: 12,
356
+ },
357
+ buttonText: {
358
+ fontSize: 16,
359
+ fontWeight: "700",
360
+ },
361
+ optionGroup: {
362
+ flexDirection: "row",
363
+ flexWrap: "wrap",
364
+ gap: 10,
365
+ },
366
+ optionPill: {
367
+ paddingHorizontal: 14,
368
+ paddingVertical: 10,
369
+ borderRadius: 999,
370
+ borderWidth: 1,
371
+ borderColor: "#30303a",
372
+ backgroundColor: "#15151b",
373
+ },
374
+ optionPillSelected: {
375
+ backgroundColor: "#ffffff",
376
+ borderColor: "#ffffff",
377
+ },
378
+ optionPillText: {
379
+ color: "#f1f1f3",
380
+ fontSize: 14,
381
+ fontWeight: "600",
382
+ },
383
+ optionPillTextSelected: {
384
+ color: "#111111",
385
+ },
386
+ sliderCard: {
387
+ borderRadius: 18,
388
+ backgroundColor: "#15151b",
389
+ borderWidth: 1,
390
+ borderColor: "#2b2b34",
391
+ padding: 14,
392
+ gap: 12,
393
+ },
394
+ sliderValue: {
395
+ color: "#ffffff",
396
+ fontSize: 28,
397
+ fontWeight: "700",
398
+ },
399
+ sliderActions: {
400
+ flexDirection: "row",
401
+ gap: 10,
402
+ },
403
+ progressTrack: {
404
+ width: "100%",
405
+ borderRadius: 999,
406
+ overflow: "hidden",
407
+ },
408
+ pageIndicatorRow: {
409
+ flexDirection: "row",
410
+ gap: 8,
411
+ alignItems: "center",
412
+ },
413
+ unsupported: {
414
+ padding: 12,
415
+ borderRadius: 12,
416
+ borderWidth: 1,
417
+ borderColor: "#3a2430",
418
+ backgroundColor: "#21151a",
419
+ },
420
+ unsupportedText: {
421
+ color: "#f5b4c6",
422
+ fontSize: 13,
423
+ },
424
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AK;KAClB;IACD,sBAAsB,EAAE;QACtB,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,SAAS;QAC1B,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,OAAO,EAAE,EAAE;QACX,GAAG,EAAE,EAAE;KACR;IACD,WAAW,EAAE;QACX,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KAClB;IACD,aAAa,EAAE;QACb,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,EAAE;KACR;IACD,aAAa,EAAE;QACb,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,GAAG;QACjB,QAAQ,EAAE,QAAQ;KACnB;IACD,gBAAgB,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,CAAC;QACN,UAAU,EAAE,QAAQ;KACrB;IACD,WAAW,EAAE;QACX,OAAO,EAAE,EAAE;QACX,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,SAAS;QACtB,eAAe,EAAE,SAAS;KAC3B;IACD,eAAe,EAAE;QACf,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from "react";
2
+ import type { ArloPresenter } from "arlo-sdk";
3
+ import type { ArloFlowRendererProps } from "./types";
4
+ export interface ArloPresenterRendererProps extends Omit<ArloFlowRendererProps, "session"> {
5
+ presenter: ArloPresenter;
6
+ loadingState?: ReactNode;
7
+ errorState?: (message: string) => ReactNode;
8
+ }
9
+ export declare function ArloPresenterRenderer({ presenter, loadingState, errorState, ...rendererProps }: ArloPresenterRendererProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=ArloPresenterRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArloPresenterRenderer.d.ts","sourceRoot":"","sources":["../src/ArloPresenterRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrD,MAAM,WAAW,0BACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC;IAC9C,SAAS,EAAE,aAAa,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,CAAC;CAC7C;AAED,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,YAIC,EACD,UAAU,EACV,GAAG,aAAa,EACjB,EAAE,0BAA0B,2CAiC5B"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArloPresenterRenderer = ArloPresenterRenderer;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const ArloFlowRenderer_1 = require("./ArloFlowRenderer");
7
+ const useArloPresenter_1 = require("./useArloPresenter");
8
+ function ArloPresenterRenderer({ presenter, loadingState = ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: "Loading..." }) })), errorState, ...rendererProps }) {
9
+ const state = (0, useArloPresenter_1.useArloPresenter)(presenter);
10
+ if (state.status === "loading") {
11
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loadingState });
12
+ }
13
+ if (state.status === "error") {
14
+ if (errorState) {
15
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: errorState(state.error?.message ?? "Unknown error") });
16
+ }
17
+ return ((0, jsx_runtime_1.jsx)(react_native_1.View, { children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { children: state.error?.message ?? "Failed to load flow" }) }));
18
+ }
19
+ if (!state.session) {
20
+ return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: rendererProps.emptyState ?? null });
21
+ }
22
+ return ((0, jsx_runtime_1.jsx)(ArloFlowRenderer_1.ArloFlowRenderer, { session: state.session, ...rendererProps, onSnapshotChange: (snapshot) => {
23
+ rendererProps.onSnapshotChange?.(snapshot);
24
+ presenter.syncSession();
25
+ } }));
26
+ }
27
+ //# sourceMappingURL=ArloPresenterRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArloPresenterRenderer.js","sourceRoot":"","sources":["../src/ArloPresenterRenderer.tsx"],"names":[],"mappings":";;AAgBA,sDA0CC;;AAzDD,+CAA0C;AAI1C,yDAAsD;AAEtD,yDAAsD;AAStD,SAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,YAAY,GAAG,CACb,uBAAC,mBAAI,cACH,uBAAC,mBAAI,6BAAkB,GAClB,CACR,EACD,UAAU,EACV,GAAG,aAAa,EACW;IAC3B,MAAM,KAAK,GAAG,IAAA,mCAAgB,EAAC,SAAS,CAAC,CAAC;IAE1C,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,2DAAG,YAAY,GAAI,CAAC;IAC7B,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC7B,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,2DAAG,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,IAAI,eAAe,CAAC,GAAI,CAAC;QACpE,CAAC;QAED,OAAO,CACL,uBAAC,mBAAI,cACH,uBAAC,mBAAI,cAAE,KAAK,CAAC,KAAK,EAAE,OAAO,IAAI,qBAAqB,GAAQ,GACvD,CACR,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,2DAAG,aAAa,CAAC,UAAU,IAAI,IAAI,GAAI,CAAC;IACjD,CAAC;IAED,OAAO,CACL,uBAAC,mCAAgB,IACf,OAAO,EAAE,KAAK,CAAC,OAAO,KAClB,aAAa,EACjB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,EAAE;YAC7B,aAAa,CAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC,CAAC;YAC3C,SAAS,CAAC,WAAW,EAAE,CAAC;QAC1B,CAAC,GACD,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ export { ArloFlowRenderer } from "./ArloFlowRenderer";
2
+ export { ArloPresenterRenderer } from "./ArloPresenterRenderer";
3
+ export { createArloRegistry } from "./registry";
4
+ export { createReactNativeFlowCache } from "./storage-cache";
5
+ export { useArloPresenter } from "./useArloPresenter";
6
+ export type { ArloComponentRenderContext, ArloComponentRenderer, ArloComponentRendererMap, ArloCustomScreenRenderer, ArloFlowRendererProps, } from "./types";
7
+ export type { ArloRegistry, ArloRegisteredComponent, ArloRegisteredScreen, ArloRegistryComponentContext, ArloRegistryScreenContext, } from "./registry";
8
+ export type { AsyncStorageLike, CreateReactNativeFlowCacheOptions, } from "./storage-cache";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,oBAAoB,EACpB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,gBAAgB,EAChB,iCAAiC,GAClC,MAAM,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useArloPresenter = exports.createReactNativeFlowCache = exports.createArloRegistry = exports.ArloPresenterRenderer = exports.ArloFlowRenderer = void 0;
4
+ var ArloFlowRenderer_1 = require("./ArloFlowRenderer");
5
+ Object.defineProperty(exports, "ArloFlowRenderer", { enumerable: true, get: function () { return ArloFlowRenderer_1.ArloFlowRenderer; } });
6
+ var ArloPresenterRenderer_1 = require("./ArloPresenterRenderer");
7
+ Object.defineProperty(exports, "ArloPresenterRenderer", { enumerable: true, get: function () { return ArloPresenterRenderer_1.ArloPresenterRenderer; } });
8
+ var registry_1 = require("./registry");
9
+ Object.defineProperty(exports, "createArloRegistry", { enumerable: true, get: function () { return registry_1.createArloRegistry; } });
10
+ var storage_cache_1 = require("./storage-cache");
11
+ Object.defineProperty(exports, "createReactNativeFlowCache", { enumerable: true, get: function () { return storage_cache_1.createReactNativeFlowCache; } });
12
+ var useArloPresenter_1 = require("./useArloPresenter");
13
+ Object.defineProperty(exports, "useArloPresenter", { enumerable: true, get: function () { return useArloPresenter_1.useArloPresenter; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,uCAAgD;AAAvC,8GAAA,kBAAkB,OAAA;AAC3B,iDAA6D;AAApD,2HAAA,0BAA0B,OAAA;AACnC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA"}
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from "react";
2
+ import type { FlowComponent, FlowSession, FlowSessionSnapshot, Screen } from "arlo-sdk";
3
+ export interface ArloRegistryScreenContext {
4
+ session: FlowSession;
5
+ snapshot: FlowSessionSnapshot;
6
+ screen: Screen;
7
+ }
8
+ export interface ArloRegistryComponentContext extends ArloRegistryScreenContext {
9
+ component: Extract<FlowComponent, {
10
+ type: "CUSTOM_COMPONENT";
11
+ }>;
12
+ }
13
+ export type ArloRegisteredScreen = (context: ArloRegistryScreenContext) => ReactNode;
14
+ export type ArloRegisteredComponent = (context: ArloRegistryComponentContext) => ReactNode;
15
+ export interface ArloRegistry {
16
+ registerScreen(key: string, renderer: ArloRegisteredScreen): void;
17
+ registerComponent(key: string, renderer: ArloRegisteredComponent): void;
18
+ getScreen(key: string): ArloRegisteredScreen | null;
19
+ getComponent(key: string): ArloRegisteredComponent | null;
20
+ }
21
+ export declare function createArloRegistry(): ArloRegistry;
22
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAExF,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,4BAA6B,SAAQ,yBAAyB;IAC7E,SAAS,EAAE,OAAO,CAAC,aAAa,EAAE;QAAE,IAAI,EAAE,kBAAkB,CAAA;KAAE,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,yBAAyB,KAAK,SAAS,CAAC;AACrF,MAAM,MAAM,uBAAuB,GAAG,CACpC,OAAO,EAAE,4BAA4B,KAClC,SAAS,CAAC;AAEf,MAAM,WAAW,YAAY;IAC3B,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClE,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACxE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAAC;IACpD,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,uBAAuB,GAAG,IAAI,CAAC;CAC3D;AAED,wBAAgB,kBAAkB,IAAI,YAAY,CAkBjD"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createArloRegistry = createArloRegistry;
4
+ function createArloRegistry() {
5
+ const screens = new Map();
6
+ const components = new Map();
7
+ return {
8
+ registerScreen(key, renderer) {
9
+ screens.set(key, renderer);
10
+ },
11
+ registerComponent(key, renderer) {
12
+ components.set(key, renderer);
13
+ },
14
+ getScreen(key) {
15
+ return screens.get(key) ?? null;
16
+ },
17
+ getComponent(key) {
18
+ return components.get(key) ?? null;
19
+ },
20
+ };
21
+ }
22
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":";;AA0BA,gDAkBC;AAlBD,SAAgB,kBAAkB;IAChC,MAAM,OAAO,GAAG,IAAI,GAAG,EAAgC,CAAC;IACxD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAmC,CAAC;IAE9D,OAAO;QACL,cAAc,CAAC,GAAW,EAAE,QAA8B;YACxD,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC7B,CAAC;QACD,iBAAiB,CAAC,GAAW,EAAE,QAAiC;YAC9D,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAChC,CAAC;QACD,SAAS,CAAC,GAAW;YACnB,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;QAClC,CAAC;QACD,YAAY,CAAC,GAAW;YACtB,OAAO,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;QACrC,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface AsyncStorageLike {
2
+ getItem(key: string): Promise<string | null>;
3
+ setItem(key: string, value: string): Promise<void>;
4
+ removeItem(key: string): Promise<void>;
5
+ }
6
+ export interface CreateReactNativeFlowCacheOptions {
7
+ storage: AsyncStorageLike;
8
+ namespace?: string;
9
+ maxAgeMs?: number;
10
+ }
11
+ export declare function createReactNativeFlowCache(options: CreateReactNativeFlowCacheOptions): import("arlo-sdk").ArloFlowCache;
12
+ //# sourceMappingURL=storage-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-cache.d.ts","sourceRoot":"","sources":["../src/storage-cache.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,oCAa3C"}