@rocapine/react-native-onboarding 1.12.0 → 1.14.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/onboarding-example.d.ts +274 -0
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +94 -0
- package/dist/onboarding-example.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts +67 -0
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js +15 -1
- package/dist/steps/ComposableScreen/elements/BaseBoxProps.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +28 -1
- package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/CarouselElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/CheckboxGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/DatePickerElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/IconElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/ImageElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts +28 -1
- package/dist/steps/ComposableScreen/elements/InputElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/LottieElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/RadioGroupElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/RiveElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts +27 -0
- package/dist/steps/ComposableScreen/elements/StackElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts +28 -1
- package/dist/steps/ComposableScreen/elements/TextElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts +33 -0
- package/dist/steps/ComposableScreen/elements/VideoElement.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/elements/VideoElement.js +1 -0
- package/dist/steps/ComposableScreen/elements/VideoElement.js.map +1 -1
- package/dist/steps/ComposableScreen/elements/ZStackElement.d.ts +66 -0
- package/dist/steps/ComposableScreen/elements/ZStackElement.d.ts.map +1 -0
- package/dist/steps/ComposableScreen/elements/ZStackElement.js +6 -0
- package/dist/steps/ComposableScreen/elements/ZStackElement.js.map +1 -0
- package/dist/steps/ComposableScreen/types.d.ts +10 -2
- package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
- package/dist/steps/ComposableScreen/types.js +10 -1
- package/dist/steps/ComposableScreen/types.js.map +1 -1
- package/package.json +1 -1
- package/src/onboarding-example.ts +94 -0
- package/src/steps/ComposableScreen/elements/BaseBoxProps.ts +42 -0
- package/src/steps/ComposableScreen/elements/VideoElement.ts +2 -0
- package/src/steps/ComposableScreen/elements/ZStackElement.ts +6 -0
- package/src/steps/ComposableScreen/types.ts +18 -2
|
@@ -31,6 +31,33 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
31
31
|
}>>;
|
|
32
32
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
34
|
+
backgroundGradient: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"linear">;
|
|
36
|
+
from: z.ZodEnum<{
|
|
37
|
+
top: "top";
|
|
38
|
+
bottom: "bottom";
|
|
39
|
+
left: "left";
|
|
40
|
+
right: "right";
|
|
41
|
+
topLeft: "topLeft";
|
|
42
|
+
topRight: "topRight";
|
|
43
|
+
bottomLeft: "bottomLeft";
|
|
44
|
+
bottomRight: "bottomRight";
|
|
45
|
+
}>;
|
|
46
|
+
to: z.ZodEnum<{
|
|
47
|
+
top: "top";
|
|
48
|
+
bottom: "bottom";
|
|
49
|
+
left: "left";
|
|
50
|
+
right: "right";
|
|
51
|
+
topLeft: "topLeft";
|
|
52
|
+
topRight: "topRight";
|
|
53
|
+
bottomLeft: "bottomLeft";
|
|
54
|
+
bottomRight: "bottomRight";
|
|
55
|
+
}>;
|
|
56
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
57
|
+
color: z.ZodString;
|
|
58
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>], "type">>;
|
|
34
61
|
overflow: z.ZodOptional<z.ZodEnum<{
|
|
35
62
|
hidden: "hidden";
|
|
36
63
|
visible: "visible";
|
|
@@ -55,9 +82,9 @@ export declare const TextElementPropsSchema: z.ZodObject<{
|
|
|
55
82
|
fontFamily: z.ZodOptional<z.ZodString>;
|
|
56
83
|
color: z.ZodOptional<z.ZodString>;
|
|
57
84
|
textAlign: z.ZodOptional<z.ZodEnum<{
|
|
58
|
-
center: "center";
|
|
59
85
|
left: "left";
|
|
60
86
|
right: "right";
|
|
87
|
+
center: "center";
|
|
61
88
|
}>>;
|
|
62
89
|
letterSpacing: z.ZodOptional<z.ZodNumber>;
|
|
63
90
|
lineHeight: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/TextElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE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@ -6,6 +6,7 @@ export type VideoElementProps = BaseBoxProps & {
|
|
|
6
6
|
loop?: boolean;
|
|
7
7
|
muted?: boolean;
|
|
8
8
|
controls?: boolean;
|
|
9
|
+
contentFit?: "contain" | "cover" | "fill";
|
|
9
10
|
};
|
|
10
11
|
export declare const VideoElementPropsSchema: z.ZodObject<{
|
|
11
12
|
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
@@ -27,6 +28,33 @@ export declare const VideoElementPropsSchema: z.ZodObject<{
|
|
|
27
28
|
}>>;
|
|
28
29
|
opacity: z.ZodOptional<z.ZodNumber>;
|
|
29
30
|
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
31
|
+
backgroundGradient: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"linear">;
|
|
33
|
+
from: z.ZodEnum<{
|
|
34
|
+
top: "top";
|
|
35
|
+
bottom: "bottom";
|
|
36
|
+
left: "left";
|
|
37
|
+
right: "right";
|
|
38
|
+
topLeft: "topLeft";
|
|
39
|
+
topRight: "topRight";
|
|
40
|
+
bottomLeft: "bottomLeft";
|
|
41
|
+
bottomRight: "bottomRight";
|
|
42
|
+
}>;
|
|
43
|
+
to: z.ZodEnum<{
|
|
44
|
+
top: "top";
|
|
45
|
+
bottom: "bottom";
|
|
46
|
+
left: "left";
|
|
47
|
+
right: "right";
|
|
48
|
+
topLeft: "topLeft";
|
|
49
|
+
topRight: "topRight";
|
|
50
|
+
bottomLeft: "bottomLeft";
|
|
51
|
+
bottomRight: "bottomRight";
|
|
52
|
+
}>;
|
|
53
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
54
|
+
color: z.ZodString;
|
|
55
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>], "type">>;
|
|
30
58
|
overflow: z.ZodOptional<z.ZodEnum<{
|
|
31
59
|
hidden: "hidden";
|
|
32
60
|
visible: "visible";
|
|
@@ -46,5 +74,10 @@ export declare const VideoElementPropsSchema: z.ZodObject<{
|
|
|
46
74
|
loop: z.ZodOptional<z.ZodBoolean>;
|
|
47
75
|
muted: z.ZodOptional<z.ZodBoolean>;
|
|
48
76
|
controls: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
contentFit: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
fill: "fill";
|
|
79
|
+
cover: "cover";
|
|
80
|
+
contain: "contain";
|
|
81
|
+
}>>;
|
|
49
82
|
}, z.core.$strip>;
|
|
50
83
|
//# sourceMappingURL=VideoElement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"VideoElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOlC,CAAC"}
|
|
@@ -9,5 +9,6 @@ exports.VideoElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema.extend({
|
|
|
9
9
|
loop: zod_1.z.boolean().optional(),
|
|
10
10
|
muted: zod_1.z.boolean().optional(),
|
|
11
11
|
controls: zod_1.z.boolean().optional(),
|
|
12
|
+
contentFit: zod_1.z.enum(["contain", "cover", "fill"]).optional(),
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=VideoElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAkE;
|
|
1
|
+
{"version":3,"file":"VideoElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/VideoElement.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAkE;AAWrD,QAAA,uBAAuB,GAAG,iCAAkB,CAAC,MAAM,CAAC;IAC/D,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;IAC/C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { BaseBoxProps } from "./BaseBoxProps";
|
|
3
|
+
export type ZStackElementProps = BaseBoxProps;
|
|
4
|
+
export declare const ZStackElementPropsSchema: z.ZodObject<{
|
|
5
|
+
width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
6
|
+
height: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
7
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
maxWidth: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
maxHeight: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
flex: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
flexShrink: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
flexGrow: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
alignSelf: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
auto: "auto";
|
|
16
|
+
"flex-start": "flex-start";
|
|
17
|
+
"flex-end": "flex-end";
|
|
18
|
+
center: "center";
|
|
19
|
+
stretch: "stretch";
|
|
20
|
+
baseline: "baseline";
|
|
21
|
+
}>>;
|
|
22
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
24
|
+
backgroundGradient: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"linear">;
|
|
26
|
+
from: z.ZodEnum<{
|
|
27
|
+
top: "top";
|
|
28
|
+
bottom: "bottom";
|
|
29
|
+
left: "left";
|
|
30
|
+
right: "right";
|
|
31
|
+
topLeft: "topLeft";
|
|
32
|
+
topRight: "topRight";
|
|
33
|
+
bottomLeft: "bottomLeft";
|
|
34
|
+
bottomRight: "bottomRight";
|
|
35
|
+
}>;
|
|
36
|
+
to: z.ZodEnum<{
|
|
37
|
+
top: "top";
|
|
38
|
+
bottom: "bottom";
|
|
39
|
+
left: "left";
|
|
40
|
+
right: "right";
|
|
41
|
+
topLeft: "topLeft";
|
|
42
|
+
topRight: "topRight";
|
|
43
|
+
bottomLeft: "bottomLeft";
|
|
44
|
+
bottomRight: "bottomRight";
|
|
45
|
+
}>;
|
|
46
|
+
stops: z.ZodArray<z.ZodObject<{
|
|
47
|
+
color: z.ZodString;
|
|
48
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>], "type">>;
|
|
51
|
+
overflow: z.ZodOptional<z.ZodEnum<{
|
|
52
|
+
hidden: "hidden";
|
|
53
|
+
visible: "visible";
|
|
54
|
+
scroll: "scroll";
|
|
55
|
+
}>>;
|
|
56
|
+
margin: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
marginHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
marginVertical: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
padding: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
paddingHorizontal: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
paddingVertical: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
borderWidth: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
borderRadius: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
borderColor: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
//# sourceMappingURL=ZStackElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZStackElement.d.ts","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/ZStackElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAsB,MAAM,gBAAgB,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE9C,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZStackElementPropsSchema = void 0;
|
|
4
|
+
const BaseBoxProps_1 = require("./BaseBoxProps");
|
|
5
|
+
exports.ZStackElementPropsSchema = BaseBoxProps_1.BaseBoxPropsSchema;
|
|
6
|
+
//# sourceMappingURL=ZStackElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ZStackElement.js","sourceRoot":"","sources":["../../../../src/steps/ComposableScreen/elements/ZStackElement.ts"],"names":[],"mappings":";;;AACA,iDAAkE;AAIrD,QAAA,wBAAwB,GAAG,iCAAkB,CAAC"}
|
|
@@ -12,8 +12,9 @@ import { type RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
|
12
12
|
import { type CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
13
13
|
import { type DatePickerElementProps } from "./elements/DatePickerElement";
|
|
14
14
|
import { type CarouselElementProps } from "./elements/CarouselElement";
|
|
15
|
-
|
|
16
|
-
export {
|
|
15
|
+
import { type ZStackElementProps } from "./elements/ZStackElement";
|
|
16
|
+
export type { BaseBoxProps, GradientBackground, GradientEdge, GradientStop, LinearGradientConfig } from "./elements/BaseBoxProps";
|
|
17
|
+
export { BaseBoxPropsSchema, GradientBackgroundSchema } from "./elements/BaseBoxProps";
|
|
17
18
|
export type { StackElementProps } from "./elements/StackElement";
|
|
18
19
|
export type { TextElementProps } from "./elements/TextElement";
|
|
19
20
|
export type { ImageElementProps } from "./elements/ImageElement";
|
|
@@ -27,6 +28,7 @@ export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
|
27
28
|
export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
28
29
|
export type { DatePickerElementProps } from "./elements/DatePickerElement";
|
|
29
30
|
export type { CarouselElementProps } from "./elements/CarouselElement";
|
|
31
|
+
export type { ZStackElementProps } from "./elements/ZStackElement";
|
|
30
32
|
type UIElement = {
|
|
31
33
|
id: string;
|
|
32
34
|
name?: string;
|
|
@@ -94,6 +96,12 @@ type UIElement = {
|
|
|
94
96
|
type: "Carousel";
|
|
95
97
|
props: CarouselElementProps;
|
|
96
98
|
children: UIElement[];
|
|
99
|
+
} | {
|
|
100
|
+
id: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
type: "ZStack";
|
|
103
|
+
props: ZStackElementProps;
|
|
104
|
+
children: UIElement[];
|
|
97
105
|
};
|
|
98
106
|
export declare const ComposableScreenStepPayloadSchema: z.ZodObject<{
|
|
99
107
|
elements: z.ZodArray<z.ZodType<UIElement, unknown, z.core.$ZodTypeInternals<UIElement, unknown>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,KAAK,iBAAiB,EAA2B,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,KAAK,iBAAiB,EAA2B,M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E,sBAAsB,CAAC;CAC/B,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,yBAAyB,CAAC;CAClC,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,sBAAsB,CAAC;CAC/B,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB,CAAC;AA8FN,eAAO,MAAM,iCAAiC;;iBAE5C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComposableScreenStepTypeSchema = exports.ComposableScreenStepPayloadSchema = exports.BaseBoxPropsSchema = void 0;
|
|
3
|
+
exports.ComposableScreenStepTypeSchema = exports.ComposableScreenStepPayloadSchema = exports.GradientBackgroundSchema = exports.BaseBoxPropsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const common_types_1 = require("../common.types");
|
|
6
6
|
const StackElement_1 = require("./elements/StackElement");
|
|
@@ -16,8 +16,10 @@ const RadioGroupElement_1 = require("./elements/RadioGroupElement");
|
|
|
16
16
|
const CheckboxGroupElement_1 = require("./elements/CheckboxGroupElement");
|
|
17
17
|
const DatePickerElement_1 = require("./elements/DatePickerElement");
|
|
18
18
|
const CarouselElement_1 = require("./elements/CarouselElement");
|
|
19
|
+
const ZStackElement_1 = require("./elements/ZStackElement");
|
|
19
20
|
var BaseBoxProps_1 = require("./elements/BaseBoxProps");
|
|
20
21
|
Object.defineProperty(exports, "BaseBoxPropsSchema", { enumerable: true, get: function () { return BaseBoxProps_1.BaseBoxPropsSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "GradientBackgroundSchema", { enumerable: true, get: function () { return BaseBoxProps_1.GradientBackgroundSchema; } });
|
|
21
23
|
const UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
22
24
|
zod_1.z.object({
|
|
23
25
|
id: zod_1.z.string(),
|
|
@@ -99,6 +101,13 @@ const UIElementSchema = zod_1.z.lazy(() => zod_1.z.union([
|
|
|
99
101
|
props: CarouselElement_1.CarouselElementPropsSchema,
|
|
100
102
|
children: zod_1.z.array(UIElementSchema),
|
|
101
103
|
}),
|
|
104
|
+
zod_1.z.object({
|
|
105
|
+
id: zod_1.z.string(),
|
|
106
|
+
name: zod_1.z.string().optional(),
|
|
107
|
+
type: zod_1.z.literal("ZStack"),
|
|
108
|
+
props: ZStackElement_1.ZStackElementPropsSchema,
|
|
109
|
+
children: zod_1.z.array(UIElementSchema),
|
|
110
|
+
}),
|
|
102
111
|
]));
|
|
103
112
|
exports.ComposableScreenStepPayloadSchema = zod_1.z.object({
|
|
104
113
|
elements: zod_1.z.array(UIElementSchema),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/steps/ComposableScreen/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kDAAqD;AACrD,0DAA0F;AAC1F,wDAAuF;AACvF,0DAA0F;AAC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C,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,eAAe,CAAC;KACnC,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC3B,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACzB,KAAK,EAAE,wCAAwB;QAC/B,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,eAAe,CAAC;KACnC,CAAC;CACH,CAAC,CACH,CAAC;AAEW,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,eAAe,CAAC;CACnC,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,iCAAkB,CAAC,MAAM,CAAC;IACtE,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACnC,OAAO,EAAE,yCAAiC;CAC3C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocapine/react-native-onboarding",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Headless React Native SDK for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -149,6 +149,7 @@ export const onboardingExample = {
|
|
|
149
149
|
borderRadius: 12,
|
|
150
150
|
controls: true,
|
|
151
151
|
muted: true,
|
|
152
|
+
contentFit: "cover",
|
|
152
153
|
},
|
|
153
154
|
},
|
|
154
155
|
{
|
|
@@ -320,6 +321,49 @@ export const onboardingExample = {
|
|
|
320
321
|
},
|
|
321
322
|
],
|
|
322
323
|
},
|
|
324
|
+
{
|
|
325
|
+
id: "zstack-demo",
|
|
326
|
+
type: "ZStack",
|
|
327
|
+
props: {
|
|
328
|
+
height: 200,
|
|
329
|
+
borderRadius: 16,
|
|
330
|
+
overflow: "hidden",
|
|
331
|
+
marginVertical: 8,
|
|
332
|
+
},
|
|
333
|
+
children: [
|
|
334
|
+
{
|
|
335
|
+
id: "zstack-bg",
|
|
336
|
+
type: "Image",
|
|
337
|
+
props: {
|
|
338
|
+
url: "https://picsum.photos/800/400?random=20",
|
|
339
|
+
height: 200,
|
|
340
|
+
resizeMode: "cover",
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
id: "zstack-overlay",
|
|
345
|
+
type: "YStack",
|
|
346
|
+
props: {
|
|
347
|
+
flex: 1,
|
|
348
|
+
backgroundColor: "rgba(0,0,0,0.45)",
|
|
349
|
+
padding: 20,
|
|
350
|
+
justifyContent: "flex-end",
|
|
351
|
+
},
|
|
352
|
+
children: [
|
|
353
|
+
{
|
|
354
|
+
id: "zstack-label",
|
|
355
|
+
type: "Text",
|
|
356
|
+
props: {
|
|
357
|
+
content: "ZStack: layered elements",
|
|
358
|
+
fontSize: 18,
|
|
359
|
+
fontWeight: "700",
|
|
360
|
+
color: "#fff",
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
],
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
},
|
|
323
367
|
{
|
|
324
368
|
id: "hero-button",
|
|
325
369
|
type: "Button",
|
|
@@ -329,6 +373,56 @@ export const onboardingExample = {
|
|
|
329
373
|
marginVertical: 8,
|
|
330
374
|
},
|
|
331
375
|
},
|
|
376
|
+
{
|
|
377
|
+
id: "gradient-card",
|
|
378
|
+
type: "YStack",
|
|
379
|
+
props: {
|
|
380
|
+
padding: 20,
|
|
381
|
+
gap: 8,
|
|
382
|
+
borderRadius: 16,
|
|
383
|
+
overflow: "hidden",
|
|
384
|
+
marginVertical: 4,
|
|
385
|
+
backgroundGradient: {
|
|
386
|
+
type: "linear",
|
|
387
|
+
from: "topLeft",
|
|
388
|
+
to: "bottomRight",
|
|
389
|
+
stops: [
|
|
390
|
+
{ color: "#6C63FF" },
|
|
391
|
+
{ color: "#FF6584" },
|
|
392
|
+
],
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
children: [
|
|
396
|
+
{
|
|
397
|
+
id: "gradient-card-title",
|
|
398
|
+
type: "Text",
|
|
399
|
+
props: { content: "Linear gradient", fontSize: 15, fontWeight: "700", color: "#fff" },
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
id: "gradient-card-body",
|
|
403
|
+
type: "Text",
|
|
404
|
+
props: { content: "topLeft → bottomRight", fontSize: 12, color: "#fff", opacity: 0.85 },
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
id: "gradient-button",
|
|
410
|
+
type: "Button",
|
|
411
|
+
props: {
|
|
412
|
+
label: "Gradient Button",
|
|
413
|
+
variant: "filled",
|
|
414
|
+
marginVertical: 4,
|
|
415
|
+
backgroundGradient: {
|
|
416
|
+
type: "linear",
|
|
417
|
+
from: "left",
|
|
418
|
+
to: "right",
|
|
419
|
+
stops: [
|
|
420
|
+
{ color: "#FF6584", position: 0 },
|
|
421
|
+
{ color: "#6C63FF", position: 1 },
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
},
|
|
332
426
|
],
|
|
333
427
|
},
|
|
334
428
|
],
|
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
+
export type GradientStop = {
|
|
4
|
+
color: string;
|
|
5
|
+
position?: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type GradientEdge =
|
|
9
|
+
| "top"
|
|
10
|
+
| "bottom"
|
|
11
|
+
| "left"
|
|
12
|
+
| "right"
|
|
13
|
+
| "topLeft"
|
|
14
|
+
| "topRight"
|
|
15
|
+
| "bottomLeft"
|
|
16
|
+
| "bottomRight";
|
|
17
|
+
|
|
18
|
+
export type LinearGradientConfig = {
|
|
19
|
+
type: "linear";
|
|
20
|
+
from: GradientEdge;
|
|
21
|
+
to: GradientEdge;
|
|
22
|
+
stops: GradientStop[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type GradientBackground = LinearGradientConfig;
|
|
26
|
+
|
|
27
|
+
const GradientEdgeSchema = z.enum(["top", "bottom", "left", "right", "topLeft", "topRight", "bottomLeft", "bottomRight"]);
|
|
28
|
+
|
|
29
|
+
const GradientStopSchema = z.object({
|
|
30
|
+
color: z.string(),
|
|
31
|
+
position: z.number().min(0).max(1).optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const GradientBackgroundSchema = z.discriminatedUnion("type", [
|
|
35
|
+
z.object({
|
|
36
|
+
type: z.literal("linear"),
|
|
37
|
+
from: GradientEdgeSchema,
|
|
38
|
+
to: GradientEdgeSchema,
|
|
39
|
+
stops: z.array(GradientStopSchema).min(2, "gradient requires at least 2 stops"),
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
|
|
3
43
|
export type BaseBoxProps = {
|
|
4
44
|
width?: number | string;
|
|
5
45
|
height?: number | string;
|
|
@@ -13,6 +53,7 @@ export type BaseBoxProps = {
|
|
|
13
53
|
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
|
14
54
|
opacity?: number;
|
|
15
55
|
backgroundColor?: string;
|
|
56
|
+
backgroundGradient?: GradientBackground;
|
|
16
57
|
overflow?: "hidden" | "visible" | "scroll";
|
|
17
58
|
margin?: number;
|
|
18
59
|
marginHorizontal?: number;
|
|
@@ -38,6 +79,7 @@ export const BaseBoxPropsSchema = z.object({
|
|
|
38
79
|
alignSelf: z.enum(["auto", "flex-start", "flex-end", "center", "stretch", "baseline"]).optional(),
|
|
39
80
|
opacity: z.number().min(0).max(1).optional(),
|
|
40
81
|
backgroundColor: z.string().optional(),
|
|
82
|
+
backgroundGradient: GradientBackgroundSchema.optional(),
|
|
41
83
|
overflow: z.enum(["hidden", "visible", "scroll"]).optional(),
|
|
42
84
|
margin: z.number().optional(),
|
|
43
85
|
marginHorizontal: z.number().optional(),
|
|
@@ -7,6 +7,7 @@ export type VideoElementProps = BaseBoxProps & {
|
|
|
7
7
|
loop?: boolean;
|
|
8
8
|
muted?: boolean;
|
|
9
9
|
controls?: boolean;
|
|
10
|
+
contentFit?: "contain" | "cover" | "fill";
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
export const VideoElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
@@ -15,4 +16,5 @@ export const VideoElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
|
15
16
|
loop: z.boolean().optional(),
|
|
16
17
|
muted: z.boolean().optional(),
|
|
17
18
|
controls: z.boolean().optional(),
|
|
19
|
+
contentFit: z.enum(["contain", "cover", "fill"]).optional(),
|
|
18
20
|
});
|
|
@@ -13,9 +13,10 @@ import { type RadioGroupElementProps, RadioGroupElementPropsSchema } from "./ele
|
|
|
13
13
|
import { type CheckboxGroupElementProps, CheckboxGroupElementPropsSchema } from "./elements/CheckboxGroupElement";
|
|
14
14
|
import { type DatePickerElementProps, DatePickerElementPropsSchema } from "./elements/DatePickerElement";
|
|
15
15
|
import { type CarouselElementProps, CarouselElementPropsSchema } from "./elements/CarouselElement";
|
|
16
|
+
import { type ZStackElementProps, ZStackElementPropsSchema } from "./elements/ZStackElement";
|
|
16
17
|
|
|
17
|
-
export type { BaseBoxProps } from "./elements/BaseBoxProps";
|
|
18
|
-
export { BaseBoxPropsSchema } from "./elements/BaseBoxProps";
|
|
18
|
+
export type { BaseBoxProps, GradientBackground, GradientEdge, GradientStop, LinearGradientConfig } from "./elements/BaseBoxProps";
|
|
19
|
+
export { BaseBoxPropsSchema, GradientBackgroundSchema } from "./elements/BaseBoxProps";
|
|
19
20
|
export type { StackElementProps } from "./elements/StackElement";
|
|
20
21
|
export type { TextElementProps } from "./elements/TextElement";
|
|
21
22
|
export type { ImageElementProps } from "./elements/ImageElement";
|
|
@@ -29,6 +30,7 @@ export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
|
|
|
29
30
|
export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
|
|
30
31
|
export type { DatePickerElementProps } from "./elements/DatePickerElement";
|
|
31
32
|
export type { CarouselElementProps } from "./elements/CarouselElement";
|
|
33
|
+
export type { ZStackElementProps } from "./elements/ZStackElement";
|
|
32
34
|
|
|
33
35
|
// UIElement union — must live here (not in elements/) to avoid circular deps
|
|
34
36
|
// because the Stack variant's children: UIElement[] references itself.
|
|
@@ -112,6 +114,13 @@ type UIElement =
|
|
|
112
114
|
type: "Carousel";
|
|
113
115
|
props: CarouselElementProps;
|
|
114
116
|
children: UIElement[];
|
|
117
|
+
}
|
|
118
|
+
| {
|
|
119
|
+
id: string;
|
|
120
|
+
name?: string;
|
|
121
|
+
type: "ZStack";
|
|
122
|
+
props: ZStackElementProps;
|
|
123
|
+
children: UIElement[];
|
|
115
124
|
};
|
|
116
125
|
|
|
117
126
|
const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
@@ -196,6 +205,13 @@ const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
|
196
205
|
props: CarouselElementPropsSchema,
|
|
197
206
|
children: z.array(UIElementSchema),
|
|
198
207
|
}),
|
|
208
|
+
z.object({
|
|
209
|
+
id: z.string(),
|
|
210
|
+
name: z.string().optional(),
|
|
211
|
+
type: z.literal("ZStack"),
|
|
212
|
+
props: ZStackElementPropsSchema,
|
|
213
|
+
children: z.array(UIElementSchema),
|
|
214
|
+
}),
|
|
199
215
|
])
|
|
200
216
|
);
|
|
201
217
|
|