@rocapine/react-native-onboarding 1.45.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/infra/hooks/index.d.ts +1 -0
- package/dist/infra/hooks/index.d.ts.map +1 -1
- package/dist/infra/hooks/index.js +3 -1
- package/dist/infra/hooks/index.js.map +1 -1
- package/dist/infra/hooks/useOnboardingNavigation.d.ts +8 -0
- package/dist/infra/hooks/useOnboardingNavigation.d.ts.map +1 -0
- package/dist/infra/hooks/useOnboardingNavigation.js +13 -0
- package/dist/infra/hooks/useOnboardingNavigation.js.map +1 -0
- package/dist/infra/hooks/useOnboardingStep.d.ts.map +1 -1
- package/dist/infra/hooks/useOnboardingStep.js +2 -3
- package/dist/infra/hooks/useOnboardingStep.js.map +1 -1
- package/dist/infra/navigation/expoRouterAdapter.d.ts +12 -0
- package/dist/infra/navigation/expoRouterAdapter.d.ts.map +1 -0
- package/dist/infra/navigation/expoRouterAdapter.js +39 -0
- package/dist/infra/navigation/expoRouterAdapter.js.map +1 -0
- package/dist/infra/navigation/types.d.ts +17 -0
- package/dist/infra/navigation/types.d.ts.map +1 -0
- package/dist/infra/navigation/types.js +3 -0
- package/dist/infra/navigation/types.js.map +1 -0
- package/dist/infra/provider/OnboardingProvider.d.ts +10 -1
- package/dist/infra/provider/OnboardingProvider.d.ts.map +1 -1
- package/dist/infra/provider/OnboardingProvider.js +4 -1
- package/dist/infra/provider/OnboardingProvider.js.map +1 -1
- package/dist/onboarding-example.d.ts +349 -0
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +31 -0
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/DrawingPadElement.d.ts +314 -0
- package/dist/steps/ComposableScreen/elements/DrawingPadElement.d.ts.map +1 -0
- package/dist/steps/ComposableScreen/elements/DrawingPadElement.js +21 -0
- package/dist/steps/ComposableScreen/elements/DrawingPadElement.js.map +1 -0
- package/dist/steps/ComposableScreen/types.d.ts +8 -0
- package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.js +8 -0
- package/dist/steps/ComposableScreen/types.js.map +1 -1
- package/package.json +5 -1
- package/src/index.ts +3 -0
- package/src/infra/hooks/index.ts +1 -0
- package/src/infra/hooks/useOnboardingNavigation.ts +11 -0
- package/src/infra/hooks/useOnboardingStep.ts +2 -2
- package/src/infra/navigation/expoRouterAdapter.ts +38 -0
- package/src/infra/navigation/types.ts +13 -0
- package/src/infra/provider/OnboardingProvider.tsx +13 -0
- package/src/onboarding-example.ts +31 -0
- package/src/steps/ComposableScreen/elements/DrawingPadElement.ts +55 -0
- package/src/steps/ComposableScreen/types.ts +16 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAMyB;AACzB,0DAA0F;AAC1F,wDAAuF;AACvF,gEAAmG;AACnG,0DAA0F;AAC1F,wFAGgD;AAChD,4DAA6F;AAC7F,wDAAuF;AACvF,wDAAuF;AACvF,0DAA0F;AAC1F,0DAA0F;AAC1F,4DAA6F;AAC7F,oEAAyG;AACzG,0EAAkH;AAClH,oEAAyG;AACzG,sEAA4G;AAC5G,gEAAmG;AACnG,4DAA6F;AAC7F,wEAA+G;AAC/G,oEAAyG;AACzG,wFAGgD;AAChD,kFAA8H;AAC9H,wEAA+G;AAC/G,4DAA6F;AAiB7F,wDAAuF;AAA9E,kHAAA,kBAAkB,OAAA;AAAE,wHAAA,wBAAwB,OAAA;AAGrD,sDAAwD;AAA/C,6GAAA,cAAc,OAAA;AAiBvB,0DAAuH;AAA9G,mHAAA,kBAAkB,OAAA;AAAE,yHAAA,wBAAwB,OAAA;AAAE,8HAAA,6BAA6B,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K for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"expo-font": "*",
|
|
39
39
|
"expo-image": "*",
|
|
40
|
+
"expo-router": ">=3.0.0",
|
|
40
41
|
"react": "*",
|
|
41
42
|
"react-native": "*"
|
|
42
43
|
},
|
|
@@ -46,6 +47,9 @@
|
|
|
46
47
|
},
|
|
47
48
|
"expo-image": {
|
|
48
49
|
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"expo-router": {
|
|
52
|
+
"optional": true
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
"files": [
|
package/src/index.ts
CHANGED
|
@@ -44,6 +44,9 @@ export {
|
|
|
44
44
|
} from "./steps/ComposableScreen/types";
|
|
45
45
|
// Hooks and providers
|
|
46
46
|
export * from "./infra";
|
|
47
|
+
// Navigation adapter (dependency-injected navigation)
|
|
48
|
+
export type { OnboardingNavigationAdapter } from "./infra/navigation/types";
|
|
49
|
+
export { expoRouterAdapter } from "./infra/navigation/expoRouterAdapter";
|
|
47
50
|
// Branching
|
|
48
51
|
export { resolveNextStepNumber } from "./resolveNextStepNumber";
|
|
49
52
|
export { evaluateCondition, evaluateLeaf, isConditionGroup } from "./evaluateCondition";
|
package/src/infra/hooks/index.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { OnboardingProgressContext } from "../provider/OnboardingProvider";
|
|
3
|
+
import type { OnboardingNavigationAdapter } from "../navigation/types";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the navigation adapter provided to `OnboardingProvider` (defaults to
|
|
7
|
+
* the expo-router adapter). Used by UI components (e.g. ProgressBar) to perform
|
|
8
|
+
* back navigation without importing expo-router directly.
|
|
9
|
+
*/
|
|
10
|
+
export const useOnboardingNavigation = (): OnboardingNavigationAdapter =>
|
|
11
|
+
useContext(OnboardingProgressContext).navigation;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useCallback, useContext } from "react";
|
|
2
2
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
3
|
-
import { useFocusEffect } from "expo-router";
|
|
4
3
|
import { OnboardingProgressContext } from "../provider/OnboardingProvider";
|
|
5
4
|
import { getOnboardingQuery } from "../queries/getOnboarding.query";
|
|
6
5
|
import { BaseStepType, Onboarding, OnboardingMetadata } from "../../types";
|
|
@@ -27,6 +26,7 @@ export const useOnboardingStep = <
|
|
|
27
26
|
setActiveStep,
|
|
28
27
|
setTotalSteps,
|
|
29
28
|
setOnboarding,
|
|
29
|
+
navigation,
|
|
30
30
|
} = useContext(OnboardingProgressContext);
|
|
31
31
|
|
|
32
32
|
// Build query with config from context
|
|
@@ -41,7 +41,7 @@ export const useOnboardingStep = <
|
|
|
41
41
|
const steps = data.steps;
|
|
42
42
|
const onboardingMetadata = data.metadata;
|
|
43
43
|
|
|
44
|
-
useFocusEffect(
|
|
44
|
+
navigation.useFocusEffect(
|
|
45
45
|
useCallback(() => {
|
|
46
46
|
const currentStep = steps[stepNumber - 1];
|
|
47
47
|
setActiveStep({
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import type { OnboardingNavigationAdapter } from "./types";
|
|
3
|
+
|
|
4
|
+
// expo-router is an OPTIONAL peer dependency. Lazily require it so the SDK
|
|
5
|
+
// loads (and the no-op fallbacks below take over) when it is not installed.
|
|
6
|
+
// Precedent: Pages/ComposableScreen/elements/haptics.ts (try/require/catch).
|
|
7
|
+
let expoRouter: any;
|
|
8
|
+
try {
|
|
9
|
+
expoRouter = require("expo-router");
|
|
10
|
+
} catch {
|
|
11
|
+
/* expo-router not installed — fall back to no-op navigation */
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Default navigation adapter. Binds to expo-router when available, otherwise
|
|
16
|
+
* degrades gracefully: focus effect runs as a mount/cb-change effect and the
|
|
17
|
+
* back button stays hidden (`canGoBack` returns false).
|
|
18
|
+
*
|
|
19
|
+
* Fields are bound once at module load, so the hook identities are stable —
|
|
20
|
+
* consumers may call `adapter.useFocusEffect(...)` / `adapter.useRouter()`
|
|
21
|
+
* directly without breaking the rules of hooks.
|
|
22
|
+
*/
|
|
23
|
+
export const expoRouterAdapter: OnboardingNavigationAdapter = {
|
|
24
|
+
useFocusEffect:
|
|
25
|
+
expoRouter?.useFocusEffect ??
|
|
26
|
+
((effect: () => void | (() => void)) => {
|
|
27
|
+
useEffect(effect, [effect]);
|
|
28
|
+
}),
|
|
29
|
+
useRouter: expoRouter
|
|
30
|
+
? () => {
|
|
31
|
+
const router = expoRouter.useRouter();
|
|
32
|
+
return {
|
|
33
|
+
canGoBack: () => router.canGoBack(),
|
|
34
|
+
goBack: () => router.back(),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
: () => ({ canGoBack: () => false, goBack: () => {} }),
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation abstraction injected into the SDK so it does not hard-depend on
|
|
3
|
+
* any particular navigation library (expo-router, react-navigation, custom).
|
|
4
|
+
* The default implementation binds to expo-router when present
|
|
5
|
+
* (see `expoRouterAdapter`); hosts can override it via
|
|
6
|
+
* `OnboardingProvider`'s `navigation` prop.
|
|
7
|
+
*/
|
|
8
|
+
export interface OnboardingNavigationAdapter {
|
|
9
|
+
/** Hook: re-run `effect` when the screen gains focus (expo-router `useFocusEffect` semantics). */
|
|
10
|
+
useFocusEffect: (effect: () => void | (() => void)) => void;
|
|
11
|
+
/** Hook: returns back-navigation controls. */
|
|
12
|
+
useRouter: () => { canGoBack: () => boolean; goBack: () => void };
|
|
13
|
+
}
|
|
@@ -8,6 +8,8 @@ import { ComposableVariableEntry } from "../../steps/ComposableScreen/types";
|
|
|
8
8
|
import { FontLoaderGate } from "./FontLoader";
|
|
9
9
|
import { extractAssetUrls } from "../preload/extractAssetUrls";
|
|
10
10
|
import { preloadAssets } from "../preload/preloadAssets";
|
|
11
|
+
import { OnboardingNavigationAdapter } from "../navigation/types";
|
|
12
|
+
import { expoRouterAdapter } from "../navigation/expoRouterAdapter";
|
|
11
13
|
|
|
12
14
|
const queryClient = new QueryClient({
|
|
13
15
|
defaultOptions: {
|
|
@@ -41,6 +43,13 @@ interface OnboardingProviderProps {
|
|
|
41
43
|
* Defaults to `null`.
|
|
42
44
|
*/
|
|
43
45
|
fontsFallback?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Navigation adapter used for back navigation (ProgressBar back button) and
|
|
48
|
+
* the per-step focus effect. Defaults to an expo-router-backed adapter that
|
|
49
|
+
* degrades to a no-op when expo-router is not installed. Inject your own to
|
|
50
|
+
* support a different navigation library. Must be a stable reference.
|
|
51
|
+
*/
|
|
52
|
+
navigation?: OnboardingNavigationAdapter;
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
interface OnboardingDataGateProps {
|
|
@@ -93,6 +102,7 @@ export const OnboardingProvider = ({
|
|
|
93
102
|
customAudienceParams = {},
|
|
94
103
|
customActions = {},
|
|
95
104
|
fontsFallback,
|
|
105
|
+
navigation = expoRouterAdapter,
|
|
96
106
|
}: OnboardingProviderProps) => {
|
|
97
107
|
const [activeStep, setActiveStep] = useState({
|
|
98
108
|
number: 0,
|
|
@@ -125,6 +135,7 @@ export const OnboardingProvider = ({
|
|
|
125
135
|
setVariable,
|
|
126
136
|
getVariables,
|
|
127
137
|
customActions,
|
|
138
|
+
navigation,
|
|
128
139
|
}}
|
|
129
140
|
>
|
|
130
141
|
<OnboardingDataGate
|
|
@@ -155,6 +166,7 @@ export const OnboardingProgressContext = createContext<{
|
|
|
155
166
|
setVariable: (name: string, value: any) => void;
|
|
156
167
|
getVariables: () => Record<string, any>;
|
|
157
168
|
customActions: CustomActions;
|
|
169
|
+
navigation: OnboardingNavigationAdapter;
|
|
158
170
|
}>({
|
|
159
171
|
activeStep: { number: 0, displayProgressHeader: false },
|
|
160
172
|
setActiveStep: () => { },
|
|
@@ -169,4 +181,5 @@ export const OnboardingProgressContext = createContext<{
|
|
|
169
181
|
setVariable: () => { },
|
|
170
182
|
getVariables: () => ({}),
|
|
171
183
|
customActions: {},
|
|
184
|
+
navigation: expoRouterAdapter,
|
|
172
185
|
});
|
|
@@ -371,6 +371,37 @@ export const onboardingExample = {
|
|
|
371
371
|
marginVertical: 4,
|
|
372
372
|
},
|
|
373
373
|
},
|
|
374
|
+
{
|
|
375
|
+
// DrawingPad — freehand signature/drawing surface. On each
|
|
376
|
+
// completed stroke it serializes the drawing into variables:
|
|
377
|
+
// `signature` (SVG path string) + `signatureImage` (base64 PNG
|
|
378
|
+
// data URI). Requires @shopify/react-native-skia.
|
|
379
|
+
id: "signature-pad",
|
|
380
|
+
type: "DrawingPad",
|
|
381
|
+
props: {
|
|
382
|
+
variableName: "signature",
|
|
383
|
+
imageVariableName: "signatureImage",
|
|
384
|
+
strokeWidth: 3,
|
|
385
|
+
height: 180,
|
|
386
|
+
borderRadius: 16,
|
|
387
|
+
marginVertical: 8,
|
|
388
|
+
clearable: true,
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
// Confirmation shown once the pad has been drawn on —
|
|
393
|
+
// demonstrates reading the DrawingPad's SVG variable.
|
|
394
|
+
id: "signature-confirm",
|
|
395
|
+
type: "Text",
|
|
396
|
+
renderWhen: { variable: "signature", operator: "is_not_empty" },
|
|
397
|
+
props: {
|
|
398
|
+
content: "Signature captured ✓",
|
|
399
|
+
fontSize: 14,
|
|
400
|
+
textAlign: "center",
|
|
401
|
+
opacity: 0.6,
|
|
402
|
+
marginVertical: 4,
|
|
403
|
+
},
|
|
404
|
+
},
|
|
374
405
|
{
|
|
375
406
|
// Inline rich text — `content` as an array of styled spans.
|
|
376
407
|
// Each span inherits the parent Text style and overrides only
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Freehand drawing surface (signature, doodle, etc.). On each completed stroke
|
|
6
|
+
* the captured drawing is serialized into runtime variable(s):
|
|
7
|
+
* - `variableName` → SVG path `d` string (compact, vector, canonical)
|
|
8
|
+
* - `imageVariableName` → base64 PNG/JPEG data URI (raster, drop-in for Image / upload)
|
|
9
|
+
*
|
|
10
|
+
* Requires the optional peer dependency `@shopify/react-native-skia`.
|
|
11
|
+
*/
|
|
12
|
+
export type DrawingPadElementProps = BaseBoxProps & {
|
|
13
|
+
/** Variable receiving the serialized SVG path string. */
|
|
14
|
+
variableName?: string;
|
|
15
|
+
/** Variable receiving a base64 image data URI (`data:image/png;base64,…`). */
|
|
16
|
+
imageVariableName?: string;
|
|
17
|
+
/** Stroke color. Defaults to `theme.colors.text.primary`. */
|
|
18
|
+
strokeColor?: string;
|
|
19
|
+
/** Stroke width in px. Defaults to `2`. */
|
|
20
|
+
strokeWidth?: number;
|
|
21
|
+
/** Canvas background (also painted into the exported image). Defaults to `theme.colors.neutral.lowest`. */
|
|
22
|
+
backgroundColor?: string;
|
|
23
|
+
/** Show a clear button to reset the drawing. Defaults to `true`. */
|
|
24
|
+
clearable?: boolean;
|
|
25
|
+
/** Corner the clear button sits in. Defaults to `"top-right"`. */
|
|
26
|
+
clearButtonPosition?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
27
|
+
/** Distance (px) of the clear button from the two nearest edges. Defaults to `8`. */
|
|
28
|
+
clearButtonOffset?: number;
|
|
29
|
+
/** Clear button diameter (px). Defaults to `32`. */
|
|
30
|
+
clearButtonSize?: number;
|
|
31
|
+
/** Clear button background color. Defaults to `theme.colors.neutral.higher`. */
|
|
32
|
+
clearButtonColor?: string;
|
|
33
|
+
/** Clear button glyph/icon color. Defaults to `theme.colors.text.opposite`. */
|
|
34
|
+
clearButtonIconColor?: string;
|
|
35
|
+
/** Clear button glyph/label. Defaults to `"✕"`. */
|
|
36
|
+
clearButtonLabel?: string;
|
|
37
|
+
/** Encode format for `imageVariableName`. Defaults to `"png"`. */
|
|
38
|
+
imageFormat?: "png" | "jpeg";
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const DrawingPadElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
42
|
+
variableName: z.string().min(1).optional(),
|
|
43
|
+
imageVariableName: z.string().min(1).optional(),
|
|
44
|
+
strokeColor: z.string().optional(),
|
|
45
|
+
strokeWidth: z.number().positive().optional(),
|
|
46
|
+
backgroundColor: z.string().optional(),
|
|
47
|
+
clearable: z.boolean().optional(),
|
|
48
|
+
clearButtonPosition: z.enum(["top-left", "top-right", "bottom-left", "bottom-right"]).optional(),
|
|
49
|
+
clearButtonOffset: z.number().min(0).optional(),
|
|
50
|
+
clearButtonSize: z.number().positive().optional(),
|
|
51
|
+
clearButtonColor: z.string().optional(),
|
|
52
|
+
clearButtonIconColor: z.string().optional(),
|
|
53
|
+
clearButtonLabel: z.string().optional(),
|
|
54
|
+
imageFormat: z.enum(["png", "jpeg"]).optional(),
|
|
55
|
+
});
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
} from "./elements/KeyboardAvoidingViewElement";
|
|
35
35
|
import { type ProgressIndicatorElementProps, ProgressIndicatorElementPropsSchema } from "./elements/ProgressIndicatorElement";
|
|
36
36
|
import { type AnimatedTextElementProps, AnimatedTextElementPropsSchema } from "./elements/AnimatedTextElement";
|
|
37
|
+
import { type DrawingPadElementProps, DrawingPadElementPropsSchema } from "./elements/DrawingPadElement";
|
|
37
38
|
import { type SliderElementProps, SliderElementPropsSchema } from "./elements/SliderElement";
|
|
38
39
|
|
|
39
40
|
export type { BaseBoxProps, GradientBackground, GradientEdge, GradientStop, LinearGradientConfig } from "./elements/BaseBoxProps";
|
|
@@ -87,6 +88,7 @@ export type {
|
|
|
87
88
|
} from "./elements/KeyboardAvoidingViewElement";
|
|
88
89
|
export type { ProgressIndicatorElementProps, ProgressEasing } from "./elements/ProgressIndicatorElement";
|
|
89
90
|
export type { AnimatedTextElementProps } from "./elements/AnimatedTextElement";
|
|
91
|
+
export type { DrawingPadElementProps } from "./elements/DrawingPadElement";
|
|
90
92
|
export type { SliderElementProps } from "./elements/SliderElement";
|
|
91
93
|
|
|
92
94
|
/**
|
|
@@ -270,6 +272,13 @@ type UIElement =
|
|
|
270
272
|
type: "AnimatedText";
|
|
271
273
|
props: AnimatedTextElementProps;
|
|
272
274
|
}
|
|
275
|
+
| {
|
|
276
|
+
id: string;
|
|
277
|
+
name?: string;
|
|
278
|
+
renderWhen?: LeafCondition | ConditionGroup;
|
|
279
|
+
type: "DrawingPad";
|
|
280
|
+
props: DrawingPadElementProps;
|
|
281
|
+
}
|
|
273
282
|
| {
|
|
274
283
|
id: string;
|
|
275
284
|
name?: string;
|
|
@@ -446,6 +455,13 @@ const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
|
446
455
|
type: z.literal("AnimatedText"),
|
|
447
456
|
props: AnimatedTextElementPropsSchema,
|
|
448
457
|
}),
|
|
458
|
+
z.object({
|
|
459
|
+
id: z.string(),
|
|
460
|
+
name: z.string().optional(),
|
|
461
|
+
renderWhen: z.union([LeafConditionSchema, ConditionGroupSchema]).optional(),
|
|
462
|
+
type: z.literal("DrawingPad"),
|
|
463
|
+
props: DrawingPadElementPropsSchema,
|
|
464
|
+
}),
|
|
449
465
|
z.object({
|
|
450
466
|
id: z.string(),
|
|
451
467
|
name: z.string().optional(),
|