@developer_tribe/react-builder 1.2.43 → 1.2.44-test.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.
Files changed (101) hide show
  1. package/dist/build-components/Checkbox/Checkbox.d.ts +6 -0
  2. package/dist/build-components/Checkbox/CheckboxProps.generated.d.ts +67 -0
  3. package/dist/build-components/FormCheckbox/FormCheckbox.d.ts +3 -0
  4. package/dist/build-components/FormCheckbox/FormCheckboxProps.generated.d.ts +69 -0
  5. package/dist/build-components/FormErrorText/FormErrorText.d.ts +3 -0
  6. package/dist/build-components/FormErrorText/FormErrorTextProps.generated.d.ts +61 -0
  7. package/dist/build-components/FormProvider/FormProvider.d.ts +11 -0
  8. package/dist/build-components/FormProvider/FormProviderProps.generated.d.ts +55 -0
  9. package/dist/build-components/FormSubmitButton/FormSubmitButton.d.ts +2 -0
  10. package/dist/build-components/FormSubmitButton/FormSubmitButtonProps.generated.d.ts +73 -0
  11. package/dist/build-components/GlobalProvider/GlobalContext.d.ts +28 -0
  12. package/dist/build-components/GlobalProvider/GlobalProvider.d.ts +5 -0
  13. package/dist/build-components/GlobalProvider/GlobalProviderProps.generated.d.ts +60 -0
  14. package/dist/build-components/GlobalProvider/globalProviderUtils.d.ts +37 -0
  15. package/dist/build-components/GlobalProvider/useGlobalNavigation.d.ts +19 -0
  16. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +17 -10
  17. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +2 -0
  18. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +2 -0
  19. package/dist/build-components/SystemButton/SystemButton.d.ts +7 -0
  20. package/dist/build-components/SystemButton/SystemButtonProps.generated.d.ts +71 -0
  21. package/dist/build-components/SystemButton/usePlacementButtonEvents.d.ts +28 -0
  22. package/dist/build-components/TermsProvider/TermsProvider.d.ts +5 -0
  23. package/dist/build-components/TermsProvider/TermsProviderProps.generated.d.ts +55 -0
  24. package/dist/build-components/WebView/WebView.d.ts +2 -0
  25. package/dist/build-components/WebView/WebViewProps.generated.d.ts +59 -0
  26. package/dist/build-components/index.d.ts +10 -1
  27. package/dist/build-components/patterns.generated.d.ts +5639 -1686
  28. package/dist/index.cjs.js +1 -1
  29. package/dist/index.cjs.js.map +1 -1
  30. package/dist/index.esm.js +1 -1
  31. package/dist/index.esm.js.map +1 -1
  32. package/dist/index.web.cjs.js +5 -5
  33. package/dist/index.web.cjs.js.map +1 -1
  34. package/dist/index.web.d.ts +1 -0
  35. package/dist/index.web.esm.js +4 -4
  36. package/dist/index.web.esm.js.map +1 -1
  37. package/dist/mockOS/context/MockOSContextBase.d.ts +3 -1
  38. package/dist/styles.css +1 -1
  39. package/dist/types/PreviewConfig.d.ts +1 -1
  40. package/package.json +2 -1
  41. package/src/assets/meta.json +1 -1
  42. package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
  43. package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
  44. package/src/assets/samples/getSamples.ts +7 -0
  45. package/src/assets/samples/global-onboard-flow.json +729 -0
  46. package/src/assets/samples/terms-and-privacy-no-form.json +108 -0
  47. package/src/assets/samples/terms-and-privacy.json +130 -0
  48. package/src/build-components/Checkbox/Checkbox.tsx +165 -0
  49. package/src/build-components/Checkbox/CheckboxProps.generated.ts +84 -0
  50. package/src/build-components/Checkbox/pattern.json +83 -0
  51. package/src/build-components/FormCheckbox/FormCheckbox.tsx +106 -0
  52. package/src/build-components/FormCheckbox/FormCheckboxProps.generated.ts +86 -0
  53. package/src/build-components/FormCheckbox/pattern.json +39 -0
  54. package/src/build-components/FormErrorText/FormErrorText.tsx +34 -0
  55. package/src/build-components/FormErrorText/FormErrorTextProps.generated.ts +78 -0
  56. package/src/build-components/FormErrorText/pattern.json +21 -0
  57. package/src/build-components/FormProvider/FormProvider.tsx +131 -0
  58. package/src/build-components/FormProvider/FormProviderProps.generated.ts +72 -0
  59. package/src/build-components/FormProvider/pattern.json +33 -0
  60. package/src/build-components/FormSubmitButton/FormSubmitButton.tsx +49 -0
  61. package/src/build-components/FormSubmitButton/FormSubmitButtonProps.generated.ts +91 -0
  62. package/src/build-components/FormSubmitButton/pattern.json +33 -0
  63. package/src/build-components/GlobalProvider/GlobalContext.ts +48 -0
  64. package/src/build-components/GlobalProvider/GlobalProvider.tsx +191 -0
  65. package/src/build-components/GlobalProvider/GlobalProviderProps.generated.ts +78 -0
  66. package/src/build-components/GlobalProvider/globalProviderUtils.ts +163 -0
  67. package/src/build-components/GlobalProvider/pattern.json +55 -0
  68. package/src/build-components/GlobalProvider/useGlobalNavigation.ts +70 -0
  69. package/src/build-components/OnboardButton/OnboardButton.tsx +41 -36
  70. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +17 -10
  71. package/src/build-components/OnboardButton/pattern.json +5 -4
  72. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +12 -0
  73. package/src/build-components/OnboardProvider/pattern.json +9 -1
  74. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +12 -0
  75. package/src/build-components/PaywallProvider/pattern.json +9 -1
  76. package/src/build-components/RenderNode.generated.tsx +46 -1
  77. package/src/build-components/SystemButton/SystemButton.tsx +71 -0
  78. package/src/build-components/SystemButton/SystemButtonProps.generated.ts +89 -0
  79. package/src/build-components/SystemButton/pattern.json +61 -0
  80. package/src/build-components/SystemButton/usePlacementButtonEvents.ts +101 -0
  81. package/src/build-components/TermsProvider/TermsProvider.tsx +45 -0
  82. package/src/build-components/TermsProvider/TermsProviderProps.generated.ts +82 -0
  83. package/src/build-components/TermsProvider/pattern.json +35 -0
  84. package/src/build-components/WebView/WebView.tsx +149 -0
  85. package/src/build-components/WebView/WebViewProps.generated.ts +76 -0
  86. package/src/build-components/WebView/pattern.json +71 -0
  87. package/src/build-components/index.ts +45 -0
  88. package/src/build-components/patterns.generated.ts +5701 -1559
  89. package/src/index.web.ts +3 -0
  90. package/src/mockOS/components/MockOSRouter.tsx +21 -0
  91. package/src/mockOS/context/MockOSContext.tsx +7 -0
  92. package/src/mockOS/context/MockOSContextBase.ts +4 -0
  93. package/src/styles/components/_checkbox.scss +19 -0
  94. package/src/styles/components/_global-provider.scss +131 -0
  95. package/src/styles/components/_webview.scss +52 -0
  96. package/src/styles/index.scss +4 -0
  97. package/src/types/PreviewConfig.ts +19 -0
  98. package/src/utils/analyseNodeByPatterns.ts +5 -2
  99. package/src/utils/projectColors.ts +4 -0
  100. package/src/.DS_Store +0 -0
  101. package/src/assets/.DS_Store +0 -0
@@ -0,0 +1,6 @@
1
+ import { CheckboxComponentProps } from './CheckboxProps.generated';
2
+ export interface CheckboxProps extends CheckboxComponentProps {
3
+ checked?: boolean;
4
+ onCheckedChange?: (value: boolean) => void;
5
+ }
6
+ export declare function Checkbox({ node, checked: controlledChecked, onCheckedChange, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,67 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type FlexDirectionOptionType = 'row' | 'column';
3
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface CheckboxStyleGenerated {
8
+ color?: string;
9
+ fontSize?: string;
10
+ fontFamily?: string;
11
+ fontWeight?: string;
12
+ textAlign?: string;
13
+ flexDirection?: FlexDirectionOptionType;
14
+ flexWrap?: FlexWrapOptionType;
15
+ alignItems?: AlignItemsOptionType;
16
+ justifyContent?: JustifyContentOptionType;
17
+ gap?: string;
18
+ padding?: string;
19
+ paddingHorizontal?: string;
20
+ paddingVertical?: string;
21
+ paddingTop?: string;
22
+ paddingBottom?: string;
23
+ paddingLeft?: string;
24
+ paddingRight?: string;
25
+ margin?: string;
26
+ marginHorizontal?: string;
27
+ marginVertical?: string;
28
+ marginTop?: string;
29
+ marginBottom?: string;
30
+ marginLeft?: string;
31
+ marginRight?: string;
32
+ backgroundColor?: string;
33
+ borderRadius?: number;
34
+ width?: string;
35
+ minWidth?: string;
36
+ maxWidth?: string;
37
+ height?: string;
38
+ minHeight?: string;
39
+ maxHeight?: string;
40
+ flex?: number;
41
+ position?: PositionOptionType;
42
+ top?: string;
43
+ bottom?: string;
44
+ left?: string;
45
+ right?: string;
46
+ zIndex?: number;
47
+ checkIconSize?: number;
48
+ checkIconStrokeWidth?: number;
49
+ }
50
+ export interface CheckboxPropsGenerated {
51
+ child: string;
52
+ attributes: {
53
+ styles?: CheckboxStyleGenerated;
54
+ adjustsFontSizeToFit?: boolean;
55
+ numberOfLines?: number;
56
+ translateCounter?: number;
57
+ scrollable?: boolean;
58
+ testID?: string;
59
+ checked?: boolean;
60
+ label?: string;
61
+ checkedColor?: string;
62
+ syncTermsAccepted?: boolean;
63
+ };
64
+ }
65
+ export interface CheckboxComponentProps {
66
+ node: NodeData<CheckboxPropsGenerated['attributes']>;
67
+ }
@@ -0,0 +1,3 @@
1
+ import type { FormCheckboxComponentProps } from './FormCheckboxProps.generated';
2
+ /** FormCheckbox wraps Checkbox with RHF; UI and styling come from Checkbox. */
3
+ export declare function FormCheckbox({ node }: FormCheckboxComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,69 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type FlexDirectionOptionType = 'row' | 'column';
3
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface FormCheckboxStyleGenerated {
8
+ borderRadius?: string;
9
+ checkIconSize?: number;
10
+ checkIconStrokeWidth?: number;
11
+ color?: string;
12
+ fontSize?: string;
13
+ fontFamily?: string;
14
+ fontWeight?: string;
15
+ textAlign?: string;
16
+ flexDirection?: FlexDirectionOptionType;
17
+ flexWrap?: FlexWrapOptionType;
18
+ alignItems?: AlignItemsOptionType;
19
+ justifyContent?: JustifyContentOptionType;
20
+ gap?: string;
21
+ padding?: string;
22
+ paddingHorizontal?: string;
23
+ paddingVertical?: string;
24
+ paddingTop?: string;
25
+ paddingBottom?: string;
26
+ paddingLeft?: string;
27
+ paddingRight?: string;
28
+ margin?: string;
29
+ marginHorizontal?: string;
30
+ marginVertical?: string;
31
+ marginTop?: string;
32
+ marginBottom?: string;
33
+ marginLeft?: string;
34
+ marginRight?: string;
35
+ backgroundColor?: string;
36
+ width?: string;
37
+ minWidth?: string;
38
+ maxWidth?: string;
39
+ height?: string;
40
+ minHeight?: string;
41
+ maxHeight?: string;
42
+ flex?: number;
43
+ position?: PositionOptionType;
44
+ top?: string;
45
+ bottom?: string;
46
+ left?: string;
47
+ right?: string;
48
+ zIndex?: number;
49
+ }
50
+ export interface FormCheckboxPropsGenerated {
51
+ child: string;
52
+ attributes: {
53
+ styles?: FormCheckboxStyleGenerated;
54
+ checked?: boolean;
55
+ label?: string;
56
+ checkedColor?: string;
57
+ syncTermsAccepted?: boolean;
58
+ adjustsFontSizeToFit?: boolean;
59
+ numberOfLines?: number;
60
+ translateCounter?: number;
61
+ scrollable?: boolean;
62
+ testID?: string;
63
+ name?: string;
64
+ validation?: string[];
65
+ };
66
+ }
67
+ export interface FormCheckboxComponentProps {
68
+ node: NodeData<FormCheckboxPropsGenerated['attributes']>;
69
+ }
@@ -0,0 +1,3 @@
1
+ import type { FormErrorTextComponentProps } from './FormErrorTextProps.generated';
2
+ /** Renders FormProvider globalError as Text when present; only valid inside FormProvider. */
3
+ export declare function FormErrorText({ node }: FormErrorTextComponentProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,61 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type FlexDirectionOptionType = 'row' | 'column';
3
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface FormErrorTextStyleGenerated {
8
+ color?: string;
9
+ fontSize?: string;
10
+ fontFamily?: string;
11
+ fontWeight?: string;
12
+ textAlign?: string;
13
+ flexDirection?: FlexDirectionOptionType;
14
+ flexWrap?: FlexWrapOptionType;
15
+ alignItems?: AlignItemsOptionType;
16
+ justifyContent?: JustifyContentOptionType;
17
+ gap?: string;
18
+ padding?: string;
19
+ paddingHorizontal?: string;
20
+ paddingVertical?: string;
21
+ paddingTop?: string;
22
+ paddingBottom?: string;
23
+ paddingLeft?: string;
24
+ paddingRight?: string;
25
+ margin?: string;
26
+ marginHorizontal?: string;
27
+ marginVertical?: string;
28
+ marginTop?: string;
29
+ marginBottom?: string;
30
+ marginLeft?: string;
31
+ marginRight?: string;
32
+ backgroundColor?: string;
33
+ borderRadius?: string;
34
+ width?: string;
35
+ minWidth?: string;
36
+ maxWidth?: string;
37
+ height?: string;
38
+ minHeight?: string;
39
+ maxHeight?: string;
40
+ flex?: number;
41
+ position?: PositionOptionType;
42
+ top?: string;
43
+ bottom?: string;
44
+ left?: string;
45
+ right?: string;
46
+ zIndex?: number;
47
+ }
48
+ export interface FormErrorTextPropsGenerated {
49
+ child: string;
50
+ attributes: {
51
+ styles?: FormErrorTextStyleGenerated;
52
+ adjustsFontSizeToFit?: boolean;
53
+ numberOfLines?: number;
54
+ translateCounter?: number;
55
+ scrollable?: boolean;
56
+ testID?: string;
57
+ };
58
+ }
59
+ export interface FormErrorTextComponentProps {
60
+ node: NodeData<FormErrorTextPropsGenerated['attributes']>;
61
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { UseFormReturn } from 'react-hook-form';
3
+ import type { FormProviderComponentProps } from './FormProviderProps.generated';
4
+ export type FormContextValue = {
5
+ handleSubmit: (callback: (data: Record<string, unknown>) => void | Promise<unknown>) => (e?: React.BaseSyntheticEvent) => void;
6
+ isValid: boolean;
7
+ globalError: string | null;
8
+ control: UseFormReturn<Record<string, unknown>>['control'];
9
+ };
10
+ export declare const formContext: React.Context<FormContextValue | null>;
11
+ export declare function FormProvider(props: FormProviderComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,55 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type FlexDirectionOptionType = 'row' | 'column';
3
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface FormProviderStyleGenerated {
8
+ flexDirection?: FlexDirectionOptionType;
9
+ flexWrap?: FlexWrapOptionType;
10
+ alignItems?: AlignItemsOptionType;
11
+ justifyContent?: JustifyContentOptionType;
12
+ gap?: string;
13
+ padding?: string;
14
+ paddingHorizontal?: string;
15
+ paddingVertical?: string;
16
+ paddingTop?: string;
17
+ paddingBottom?: string;
18
+ paddingLeft?: string;
19
+ paddingRight?: string;
20
+ margin?: string;
21
+ marginHorizontal?: string;
22
+ marginVertical?: string;
23
+ marginTop?: string;
24
+ marginBottom?: string;
25
+ marginLeft?: string;
26
+ marginRight?: string;
27
+ backgroundColor?: string;
28
+ borderRadius?: string;
29
+ width?: string;
30
+ minWidth?: string;
31
+ maxWidth?: string;
32
+ height?: string;
33
+ minHeight?: string;
34
+ maxHeight?: string;
35
+ flex?: number;
36
+ position?: PositionOptionType;
37
+ top?: string;
38
+ bottom?: string;
39
+ left?: string;
40
+ right?: string;
41
+ zIndex?: number;
42
+ }
43
+ export interface FormProviderPropsGenerated {
44
+ child: string;
45
+ attributes: {
46
+ styles?: FormProviderStyleGenerated;
47
+ scrollable?: boolean;
48
+ testID?: string;
49
+ defaultValues?: string;
50
+ validationErrorMessageKey?: string;
51
+ };
52
+ }
53
+ export interface FormProviderComponentProps {
54
+ node: NodeData<FormProviderPropsGenerated['attributes']>;
55
+ }
@@ -0,0 +1,2 @@
1
+ import type { FormSubmitButtonComponentProps } from './FormSubmitButtonProps.generated';
2
+ export declare function FormSubmitButton({ node }: FormSubmitButtonComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,73 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type TypeOptionType = 'Permission' | 'Navigate' | 'Placement';
3
+ export type FlexDirectionOptionType = 'row' | 'column';
4
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
5
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
6
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
7
+ export type PositionOptionType = 'relative' | 'absolute';
8
+ export interface EventObjectGenerated {
9
+ type?: TypeOptionType;
10
+ permission?: string;
11
+ navigate_to?: string;
12
+ targetIndex?: number;
13
+ placementKey?: string;
14
+ }
15
+ export interface FormSubmitButtonStyleGenerated {
16
+ color?: string;
17
+ backgroundColor?: string;
18
+ height?: string;
19
+ borderRadius?: string;
20
+ fontSize?: string;
21
+ fontWeight?: string;
22
+ fontFamily?: string;
23
+ textAlign?: string;
24
+ flexDirection?: FlexDirectionOptionType;
25
+ flexWrap?: FlexWrapOptionType;
26
+ alignItems?: AlignItemsOptionType;
27
+ justifyContent?: JustifyContentOptionType;
28
+ gap?: string;
29
+ padding?: string;
30
+ paddingHorizontal?: string;
31
+ paddingVertical?: string;
32
+ paddingTop?: string;
33
+ paddingBottom?: string;
34
+ paddingLeft?: string;
35
+ paddingRight?: string;
36
+ margin?: string;
37
+ marginHorizontal?: string;
38
+ marginVertical?: string;
39
+ marginTop?: string;
40
+ marginBottom?: string;
41
+ marginLeft?: string;
42
+ marginRight?: string;
43
+ width?: string;
44
+ minWidth?: string;
45
+ maxWidth?: string;
46
+ minHeight?: string;
47
+ maxHeight?: string;
48
+ flex?: number;
49
+ position?: PositionOptionType;
50
+ top?: string;
51
+ bottom?: string;
52
+ left?: string;
53
+ right?: string;
54
+ zIndex?: number;
55
+ }
56
+ export interface FormSubmitButtonPropsGenerated {
57
+ child: string;
58
+ attributes: {
59
+ styles?: FormSubmitButtonStyleGenerated;
60
+ labelKey?: string;
61
+ events?: EventObjectGenerated[];
62
+ testID?: string;
63
+ adjustsFontSizeToFit?: boolean;
64
+ numberOfLines?: number;
65
+ translateCounter?: number;
66
+ scrollable?: boolean;
67
+ disableIfUnvalidated?: boolean;
68
+ validationRequired?: boolean;
69
+ };
70
+ }
71
+ export interface FormSubmitButtonComponentProps {
72
+ node: NodeData<FormSubmitButtonPropsGenerated['attributes']>;
73
+ }
@@ -0,0 +1,28 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ /** Supported transition animations when navigating to this page (platform-style names).
3
+ * rn stack transition animations
4
+ */
5
+ export declare const GLOBAL_PAGE_ANIMATIONS: readonly ["default", "fade", "fade_from_bottom", "fade_from_right", "reveal_from_bottom", "scale_from_center", "slide_from_right", "slide_from_left", "slide_from_bottom", "none"];
6
+ export type GlobalPageAnimationType = (typeof GLOBAL_PAGE_ANIMATIONS)[number];
7
+ export interface GlobalPage {
8
+ key: string;
9
+ node: NodeData;
10
+ /** Condition key: this page is skipped when conditions[skipIf] === true */
11
+ skipIf?: string;
12
+ /** Optional transition animation when this page is shown (push/enter). */
13
+ animation?: string;
14
+ index: number;
15
+ }
16
+ export interface GlobalContextValue {
17
+ currentPageKey: string;
18
+ pages: GlobalPage[];
19
+ pageStack: string[];
20
+ navigate: (key: string) => void;
21
+ goNext: () => void;
22
+ goBack: () => boolean;
23
+ /** Runtime boolean conditions (e.g. termsAccepted) */
24
+ conditions: Record<string, boolean>;
25
+ setCondition: (key: string, value: boolean) => void;
26
+ }
27
+ export declare const GlobalContext: import("react").Context<GlobalContextValue | null>;
28
+ export declare function useGlobalContext(): GlobalContextValue | null;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { GlobalProviderComponentProps } from './GlobalProviderProps.generated';
3
+ declare function GlobalProvider({ node }: GlobalProviderComponentProps): import("react/jsx-runtime").JSX.Element;
4
+ declare const _default: React.MemoExoticComponent<typeof GlobalProvider>;
5
+ export default _default;
@@ -0,0 +1,60 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ export type FlexDirectionOptionType = 'row' | 'column';
3
+ export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
+ export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
5
+ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
6
+ export type PositionOptionType = 'relative' | 'absolute';
7
+ export interface SkipConditionEntryGenerated {
8
+ pageKey?: string;
9
+ conditionKey?: string;
10
+ }
11
+ export interface GlobalProviderStyleGenerated {
12
+ flexDirection?: FlexDirectionOptionType;
13
+ flexWrap?: FlexWrapOptionType;
14
+ alignItems?: AlignItemsOptionType;
15
+ justifyContent?: JustifyContentOptionType;
16
+ gap?: string;
17
+ padding?: string;
18
+ paddingHorizontal?: string;
19
+ paddingVertical?: string;
20
+ paddingTop?: string;
21
+ paddingBottom?: string;
22
+ paddingLeft?: string;
23
+ paddingRight?: string;
24
+ margin?: string;
25
+ marginHorizontal?: string;
26
+ marginVertical?: string;
27
+ marginTop?: string;
28
+ marginBottom?: string;
29
+ marginLeft?: string;
30
+ marginRight?: string;
31
+ backgroundColor?: string;
32
+ borderRadius?: string;
33
+ width?: string;
34
+ minWidth?: string;
35
+ maxWidth?: string;
36
+ height?: string;
37
+ minHeight?: string;
38
+ maxHeight?: string;
39
+ flex?: number;
40
+ position?: PositionOptionType;
41
+ top?: string;
42
+ bottom?: string;
43
+ left?: string;
44
+ right?: string;
45
+ zIndex?: number;
46
+ }
47
+ export interface GlobalProviderPropsGenerated {
48
+ child: string;
49
+ attributes: {
50
+ styles?: GlobalProviderStyleGenerated;
51
+ scrollable?: boolean;
52
+ testID?: string;
53
+ initialPage?: string;
54
+ persistProgress?: boolean;
55
+ skipConditions?: SkipConditionEntryGenerated[];
56
+ };
57
+ }
58
+ export interface GlobalProviderComponentProps {
59
+ node: NodeData<GlobalProviderPropsGenerated['attributes']>;
60
+ }
@@ -0,0 +1,37 @@
1
+ import type { NodeData } from '../../types/Node';
2
+ import type { GlobalPage } from './GlobalContext';
3
+ /**
4
+ * Derives a stable page key for a child node.
5
+ * Priority: node.key (standard NodeData field) → TYPE_KEY_MAP → "${type}-{index}"
6
+ *
7
+ * Using node.key avoids adding unknown attributes to child components that
8
+ * would fail builder validation.
9
+ */
10
+ export declare function derivePageKey(node: NodeData, index: number): string;
11
+ /** Runtime shape of a SkipConditionEntry (mirrors the types block in pattern.json). */
12
+ export interface SkipConditionEntry {
13
+ pageKey: string;
14
+ conditionKey: string;
15
+ }
16
+ /**
17
+ * Converts SkipConditionEntry[] (from pattern schema) to a lookup map for fast access.
18
+ * Array format is used in pattern.json because the schema system doesn't support
19
+ * plain Record/object attribute types.
20
+ */
21
+ export declare function normalizeSkipConditions(raw: unknown): Record<string, string>;
22
+ /**
23
+ * Builds the page list for GlobalProvider.
24
+ *
25
+ * @param children - direct child nodes of GlobalProvider
26
+ * @param skipConditions - lookup map of pageKey → conditionKey, already normalized
27
+ * from SkipConditionEntry[] via normalizeSkipConditions().
28
+ */
29
+ export declare function buildPages(children: NodeData[], skipConditions?: Record<string, string>): GlobalPage[];
30
+ /** Returns the first non-skipped page key, starting from the requested key. */
31
+ export declare function resolveEffectivePage(targetKey: string, pages: GlobalPage[], conditions: Record<string, boolean>): string;
32
+ export declare function persistProgress(storageKey: string, currentPageKey: string, conditions: Record<string, boolean>): void;
33
+ export declare function loadProgress(storageKey: string): {
34
+ currentPageKey: string;
35
+ conditions: Record<string, boolean>;
36
+ } | null;
37
+ export declare function clearProgress(storageKey: string): void;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Maps route/placement aliases to their canonical GlobalProvider page keys.
3
+ *
4
+ * Add entries here when a new alias should resolve to an existing page key.
5
+ * Keys are the incoming target strings (from JSON events / usePlacementButtonEvents).
6
+ * Values are the canonical page key that GlobalContext.navigate() will receive.
7
+ *
8
+ * Exported so other modules (e.g. a navigation-flow visualiser) can inspect
9
+ * which aliases exist without duplicating this logic.
10
+ */
11
+ export declare const GLOBAL_ROUTE_ALIASES: Record<string, string>;
12
+ /**
13
+ * Returns a navigate function that first attempts to route within GlobalContext
14
+ * (when a GlobalProvider is active), then falls back to MockOSContext navigation.
15
+ *
16
+ * Used by SystemButton and OnboardButton so that events defined in JSON work
17
+ * transparently whether rendered inside a GlobalProvider or standalone.
18
+ */
19
+ export declare function useGlobalNavigation(): (target: string) => boolean;
@@ -1,6 +1,5 @@
1
1
  import type { NodeData } from '../../types/Node';
2
- export type TypeOptionType = 'Permission' | 'Navigate';
3
- export type PermissionOptionType = 'att' | 'notification' | 'rating' | 'GDPR';
2
+ export type TypeOptionType = 'Permission' | 'Navigate' | 'Placement';
4
3
  export type TestIDOptionType = 'onboardSkip' | 'onboardNext';
5
4
  export type AnimationOptionType = 'simple-animation' | 'line-animation' | 'blur' | 'blur-animation' | 'blur-line-animation';
6
5
  export type FlexDirectionOptionType = 'row' | 'column';
@@ -10,11 +9,20 @@ export type JustifyContentOptionType = 'flex-start' | 'center' | 'flex-end' | 's
10
9
  export type PositionOptionType = 'relative' | 'absolute';
11
10
  export interface EventObjectGenerated {
12
11
  type?: TypeOptionType;
13
- permission?: PermissionOptionType | null;
12
+ permission?: string;
14
13
  navigate_to?: string;
15
14
  targetIndex?: number;
15
+ placementKey?: string;
16
16
  }
17
17
  export interface OnboardButtonStyleGenerated {
18
+ color?: string;
19
+ backgroundColor?: string;
20
+ height?: string;
21
+ borderRadius?: string;
22
+ fontSize?: string;
23
+ fontWeight?: string;
24
+ fontFamily?: string;
25
+ textAlign?: string;
18
26
  flexDirection?: FlexDirectionOptionType;
19
27
  flexWrap?: FlexWrapOptionType;
20
28
  alignItems?: AlignItemsOptionType;
@@ -34,12 +42,9 @@ export interface OnboardButtonStyleGenerated {
34
42
  marginBottom?: string;
35
43
  marginLeft?: string;
36
44
  marginRight?: string;
37
- backgroundColor?: string;
38
- borderRadius?: string;
39
45
  width?: string;
40
46
  minWidth?: string;
41
47
  maxWidth?: string;
42
- height?: string;
43
48
  minHeight?: string;
44
49
  maxHeight?: string;
45
50
  flex?: number;
@@ -49,18 +54,20 @@ export interface OnboardButtonStyleGenerated {
49
54
  left?: string;
50
55
  right?: string;
51
56
  zIndex?: number;
52
- color?: string;
53
57
  }
54
58
  export interface OnboardButtonPropsGenerated {
55
59
  child: string;
56
60
  attributes: {
57
61
  styles?: OnboardButtonStyleGenerated;
58
- scrollable?: boolean;
59
- testID?: TestIDOptionType;
60
62
  labelKey?: string;
63
+ events?: EventObjectGenerated[];
64
+ testID?: TestIDOptionType;
65
+ adjustsFontSizeToFit?: boolean;
66
+ numberOfLines?: number;
67
+ translateCounter?: number;
68
+ scrollable?: boolean;
61
69
  animation?: AnimationOptionType;
62
70
  animation_color?: string;
63
- events?: EventObjectGenerated[];
64
71
  };
65
72
  }
66
73
  export interface OnboardButtonComponentProps {
@@ -1,5 +1,6 @@
1
1
  import type { NodeData } from '../../types/Node';
2
2
  export type ThemeOptionType = 'light' | 'dark' | 'all';
3
+ export type AnimationOptionType = 'default' | 'fade' | 'fade_from_bottom' | 'fade_from_right' | 'reveal_from_bottom' | 'scale_from_center' | 'slide_from_right' | 'slide_from_left' | 'slide_from_bottom' | 'none';
3
4
  export type FlexDirectionOptionType = 'row' | 'column';
4
5
  export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
5
6
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
@@ -49,6 +50,7 @@ export interface OnboardProviderPropsGenerated {
49
50
  testID?: string;
50
51
  theme?: ThemeOptionType;
51
52
  borderRadius?: never;
53
+ animation?: AnimationOptionType;
52
54
  };
53
55
  }
54
56
  export interface OnboardProviderComponentProps {
@@ -1,4 +1,5 @@
1
1
  import type { NodeData } from '../../types/Node';
2
+ export type AnimationOptionType = 'default' | 'fade' | 'fade_from_bottom' | 'fade_from_right' | 'reveal_from_bottom' | 'scale_from_center' | 'slide_from_right' | 'slide_from_left' | 'slide_from_bottom' | 'none';
2
3
  export type FlexDirectionOptionType = 'row' | 'column';
3
4
  export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
4
5
  export type AlignItemsOptionType = 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline';
@@ -47,6 +48,7 @@ export interface PaywallProviderPropsGenerated {
47
48
  scrollable?: boolean;
48
49
  testID?: string;
49
50
  delay?: number;
51
+ animation?: AnimationOptionType;
50
52
  };
51
53
  }
52
54
  export interface PaywallProviderComponentProps {
@@ -0,0 +1,7 @@
1
+ import type { SystemButtonComponentProps } from './SystemButtonProps.generated';
2
+ export type SystemButtonOptionalProps = {
3
+ onClick?: () => void;
4
+ disabled?: boolean;
5
+ };
6
+ export declare function SystemButton({ node, onClick: onClickProp, disabled, }: SystemButtonComponentProps & SystemButtonOptionalProps): import("react/jsx-runtime").JSX.Element;
7
+ export default SystemButton;