@rocapine/react-native-onboarding 1.14.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/infra/provider/OnboardingProvider.d.ts +14 -1
  6. package/dist/infra/provider/OnboardingProvider.d.ts.map +1 -1
  7. package/dist/infra/provider/OnboardingProvider.js +3 -1
  8. package/dist/infra/provider/OnboardingProvider.js.map +1 -1
  9. package/dist/infra/provider/index.d.ts +1 -0
  10. package/dist/infra/provider/index.d.ts.map +1 -1
  11. package/dist/onboarding-example.d.ts +931 -901
  12. package/dist/onboarding-example.d.ts.map +1 -1
  13. package/dist/onboarding-example.js +297 -286
  14. package/dist/onboarding-example.js.map +1 -1
  15. package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts +30 -0
  16. package/dist/steps/ComposableScreen/elements/ButtonElement.d.ts.map +1 -1
  17. package/dist/steps/ComposableScreen/elements/ButtonElement.js +11 -1
  18. package/dist/steps/ComposableScreen/elements/ButtonElement.js.map +1 -1
  19. package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.d.ts +102 -0
  20. package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.d.ts.map +1 -0
  21. package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.js +22 -0
  22. package/dist/steps/ComposableScreen/elements/SafeAreaViewElement.js.map +1 -0
  23. package/dist/steps/ComposableScreen/types.d.ts +18 -1
  24. package/dist/steps/ComposableScreen/types.d.ts.map +1 -1
  25. package/dist/steps/ComposableScreen/types.js +12 -1
  26. package/dist/steps/ComposableScreen/types.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/index.ts +10 -0
  29. package/src/infra/provider/OnboardingProvider.tsx +19 -1
  30. package/src/infra/provider/index.ts +4 -0
  31. package/src/onboarding-example.ts +11 -0
  32. package/src/steps/ComposableScreen/elements/ButtonElement.ts +29 -0
  33. package/src/steps/ComposableScreen/elements/SafeAreaViewElement.ts +28 -0
  34. package/src/steps/ComposableScreen/types.ts +24 -1
@@ -14,6 +14,7 @@ import { type CheckboxGroupElementProps, CheckboxGroupElementPropsSchema } from
14
14
  import { type DatePickerElementProps, DatePickerElementPropsSchema } from "./elements/DatePickerElement";
15
15
  import { type CarouselElementProps, CarouselElementPropsSchema } from "./elements/CarouselElement";
16
16
  import { type ZStackElementProps, ZStackElementPropsSchema } from "./elements/ZStackElement";
17
+ import { type SafeAreaViewElementProps, SafeAreaViewElementPropsSchema } from "./elements/SafeAreaViewElement";
17
18
 
18
19
  export type { BaseBoxProps, GradientBackground, GradientEdge, GradientStop, LinearGradientConfig } from "./elements/BaseBoxProps";
19
20
  export { BaseBoxPropsSchema, GradientBackgroundSchema } from "./elements/BaseBoxProps";
@@ -25,12 +26,20 @@ export type { RiveElementProps } from "./elements/RiveElement";
25
26
  export type { IconElementProps } from "./elements/IconElement";
26
27
  export type { VideoElementProps } from "./elements/VideoElement";
27
28
  export type { InputElementProps } from "./elements/InputElement";
28
- export type { ButtonElementProps } from "./elements/ButtonElement";
29
+ export type { ButtonElementProps, ButtonAction, CustomButtonAction } from "./elements/ButtonElement";
30
+ export { ButtonActionSchema, CustomButtonActionSchema } from "./elements/ButtonElement";
29
31
  export type { RadioGroupElementProps } from "./elements/RadioGroupElement";
30
32
  export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement";
31
33
  export type { DatePickerElementProps } from "./elements/DatePickerElement";
32
34
  export type { CarouselElementProps } from "./elements/CarouselElement";
33
35
  export type { ZStackElementProps } from "./elements/ZStackElement";
36
+ export type { SafeAreaViewElementProps, SafeAreaEdge, SafeAreaEdgeMode } from "./elements/SafeAreaViewElement";
37
+
38
+ /**
39
+ * A variable entry stored in the ComposableScreen variables map.
40
+ * `value` is the canonical value (string), `label` is an optional display label.
41
+ */
42
+ export type ComposableVariableEntry = { value: string; label?: string };
34
43
 
35
44
  // UIElement union — must live here (not in elements/) to avoid circular deps
36
45
  // because the Stack variant's children: UIElement[] references itself.
@@ -121,6 +130,13 @@ type UIElement =
121
130
  type: "ZStack";
122
131
  props: ZStackElementProps;
123
132
  children: UIElement[];
133
+ }
134
+ | {
135
+ id: string;
136
+ name?: string;
137
+ type: "SafeAreaView";
138
+ props: SafeAreaViewElementProps;
139
+ children: UIElement[];
124
140
  };
125
141
 
126
142
  const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
@@ -212,6 +228,13 @@ const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
212
228
  props: ZStackElementPropsSchema,
213
229
  children: z.array(UIElementSchema),
214
230
  }),
231
+ z.object({
232
+ id: z.string(),
233
+ name: z.string().optional(),
234
+ type: z.literal("SafeAreaView"),
235
+ props: SafeAreaViewElementPropsSchema,
236
+ children: z.array(UIElementSchema),
237
+ }),
215
238
  ])
216
239
  );
217
240