@developer_tribe/react-builder 1.2.7 → 1.2.8

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 (112) hide show
  1. package/dist/build-components/BIcon/BIconProps.generated.d.ts +47 -44
  2. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +38 -35
  3. package/dist/build-components/Button/ButtonProps.generated.d.ts +40 -37
  4. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +37 -34
  5. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +39 -36
  6. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +38 -35
  7. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +37 -34
  8. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +37 -34
  9. package/dist/build-components/Image/ImageProps.generated.d.ts +38 -35
  10. package/dist/build-components/Main/MainProps.generated.d.ts +38 -35
  11. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +37 -34
  12. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +43 -40
  13. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +44 -41
  14. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +41 -38
  15. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +51 -48
  16. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +40 -37
  17. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +38 -35
  18. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +38 -35
  19. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +44 -41
  20. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +44 -41
  21. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +37 -34
  22. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +47 -44
  23. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +37 -34
  24. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +37 -34
  25. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +40 -37
  26. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +40 -37
  27. package/dist/build-components/Text/TextProps.generated.d.ts +44 -41
  28. package/dist/build-components/View/ViewProps.generated.d.ts +37 -34
  29. package/dist/build-components/patterns.generated.d.ts +21 -21
  30. package/dist/components/BuilderProvider.d.ts +6 -0
  31. package/dist/hooks/useExtractImageStyle.d.ts +3 -1
  32. package/dist/hooks/useExtractTextStyle.d.ts +1 -1
  33. package/dist/hooks/useExtractViewStyle.d.ts +1 -1
  34. package/dist/index.cjs.js +2 -2
  35. package/dist/index.cjs.js.map +1 -1
  36. package/dist/index.d.ts +1 -26
  37. package/dist/index.esm.js +2 -2
  38. package/dist/index.esm.js.map +1 -1
  39. package/dist/index.native.cjs.js +2 -2
  40. package/dist/index.native.cjs.js.map +1 -1
  41. package/dist/index.native.d.ts +4 -0
  42. package/dist/index.native.esm.js +2 -2
  43. package/dist/index.native.esm.js.map +1 -1
  44. package/dist/utils/extractImageStyle.d.ts +3 -0
  45. package/dist/utils/extractTextStyle/extractTextStyleNative.d.ts +17 -0
  46. package/dist/utils/extractTextStyle.d.ts +2 -0
  47. package/dist/utils/extractViewStyle/extractViewStyleNative.d.ts +12 -0
  48. package/dist/utils/extractViewStyle.d.ts +2 -0
  49. package/dist/utils/patterns.d.ts +2 -1
  50. package/package.json +1 -1
  51. package/scripts/prebuild/utils/createGeneratedProps.js +45 -3
  52. package/src/attributes-editor/LayoutPreviewPicker.tsx +4 -3
  53. package/src/build-components/BIcon/BIcon.tsx +3 -2
  54. package/src/build-components/BIcon/BIconProps.generated.ts +48 -44
  55. package/src/build-components/BackgroundImage/BackgroundImage.tsx +5 -3
  56. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +39 -35
  57. package/src/build-components/BackgroundImage/pattern.json +9 -17
  58. package/src/build-components/Button/Button.tsx +5 -4
  59. package/src/build-components/Button/ButtonProps.generated.ts +41 -37
  60. package/src/build-components/Carousel/CarouselProps.generated.ts +38 -34
  61. package/src/build-components/CarouselButtons/CarouselButtons.tsx +3 -2
  62. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +40 -36
  63. package/src/build-components/CarouselDots/CarouselDots.tsx +1 -1
  64. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +39 -35
  65. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +38 -34
  66. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +38 -34
  67. package/src/build-components/Image/Image.tsx +3 -2
  68. package/src/build-components/Image/ImageProps.generated.ts +39 -35
  69. package/src/build-components/Image/pattern.json +9 -16
  70. package/src/build-components/Main/Main.tsx +1 -1
  71. package/src/build-components/Main/MainProps.generated.ts +39 -35
  72. package/src/build-components/Onboard/OnboardProps.generated.ts +38 -34
  73. package/src/build-components/OnboardButton/OnboardButton.tsx +6 -5
  74. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +44 -40
  75. package/src/build-components/OnboardButtons/OnboardButtons.tsx +4 -4
  76. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +45 -41
  77. package/src/build-components/OnboardDot/OnboardDot.tsx +5 -4
  78. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +42 -38
  79. package/src/build-components/OnboardFooter/OnboardFooter.tsx +16 -21
  80. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +52 -48
  81. package/src/build-components/OnboardImage/OnboardImage.tsx +7 -6
  82. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +41 -37
  83. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +39 -35
  84. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +39 -35
  85. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +45 -41
  86. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +45 -41
  87. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +38 -34
  88. package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +4 -4
  89. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +48 -44
  90. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +38 -34
  91. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +38 -34
  92. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +41 -37
  93. package/src/build-components/RadioButton/RadioButton.tsx +4 -3
  94. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +41 -37
  95. package/src/build-components/Text/Text.tsx +3 -5
  96. package/src/build-components/Text/TextProps.generated.ts +45 -41
  97. package/src/build-components/View/ViewProps.generated.ts +38 -34
  98. package/src/build-components/patterns.generated.ts +21 -21
  99. package/src/components/BuilderProvider.tsx +15 -1
  100. package/src/hooks/useExtractImageStyle.ts +15 -4
  101. package/src/hooks/useExtractTextStyle.ts +11 -3
  102. package/src/hooks/useExtractViewStyle.ts +15 -4
  103. package/src/index.native.ts +6 -0
  104. package/src/index.ts +2 -77
  105. package/src/utils/extractImageStyle.ts +34 -5
  106. package/src/utils/extractTextStyle/extractTextStyle.ts +3 -5
  107. package/src/utils/extractTextStyle/extractTextStyleNative.ts +106 -0
  108. package/src/utils/extractTextStyle.ts +2 -0
  109. package/src/utils/extractViewStyle/extractViewStyle.ts +2 -4
  110. package/src/utils/extractViewStyle/extractViewStyleNative.ts +111 -0
  111. package/src/utils/extractViewStyle.ts +2 -0
  112. package/src/utils/patterns.ts +55 -1
@@ -33,49 +33,53 @@ export interface EventObjectGenerated {
33
33
  targetIndex?: number;
34
34
  }
35
35
 
36
+ export interface OnboardButtonStyleGenerated {
37
+ scrollable?: boolean;
38
+ flexDirection?: FlexDirectionOptionType;
39
+ alignItems?: AlignItemsOptionType;
40
+ justifyContent?: JustifyContentOptionType;
41
+ gap?: string;
42
+ padding?: string;
43
+ paddingHorizontal?: string;
44
+ paddingVertical?: string;
45
+ paddingTop?: string;
46
+ paddingBottom?: string;
47
+ paddingLeft?: string;
48
+ paddingRight?: string;
49
+ margin?: string;
50
+ marginHorizontal?: string;
51
+ marginVertical?: string;
52
+ marginTop?: string;
53
+ marginBottom?: string;
54
+ marginLeft?: string;
55
+ marginRight?: string;
56
+ backgroundColor?: string;
57
+ borderRadius?: string;
58
+ width?: string;
59
+ minWidth?: string;
60
+ maxWidth?: string;
61
+ height?: string;
62
+ minHeight?: string;
63
+ maxHeight?: string;
64
+ flex?: number;
65
+ position?: PositionOptionType;
66
+ top?: string;
67
+ bottom?: string;
68
+ left?: string;
69
+ right?: string;
70
+ zIndex?: number;
71
+ labelKey?: string;
72
+ button_text_color?: string;
73
+ animation?: AnimationOptionType;
74
+ animation_color?: string;
75
+ button_background_color?: string;
76
+ events?: EventObjectGenerated[];
77
+ }
78
+
36
79
  export interface OnboardButtonPropsGenerated {
37
80
  child: string;
38
81
  attributes: {
39
- style?: Record<string, unknown>;
40
- scrollable?: boolean;
41
- flexDirection?: FlexDirectionOptionType;
42
- alignItems?: AlignItemsOptionType;
43
- justifyContent?: JustifyContentOptionType;
44
- gap?: string;
45
- padding?: string;
46
- paddingHorizontal?: string;
47
- paddingVertical?: string;
48
- paddingTop?: string;
49
- paddingBottom?: string;
50
- paddingLeft?: string;
51
- paddingRight?: string;
52
- margin?: string;
53
- marginVertical?: string;
54
- marginTop?: string;
55
- marginBottom?: string;
56
- marginLeft?: string;
57
- marginRight?: string;
58
- backgroundColor?: string;
59
- borderRadius?: string;
60
- width?: string;
61
- minWidth?: string;
62
- maxWidth?: string;
63
- height?: string;
64
- minHeight?: string;
65
- maxHeight?: string;
66
- flex?: number;
67
- position?: PositionOptionType;
68
- top?: string;
69
- bottom?: string;
70
- left?: string;
71
- right?: string;
72
- zIndex?: number;
73
- labelKey?: string;
74
- button_text_color?: string;
75
- animation?: AnimationOptionType;
76
- animation_color?: string;
77
- button_background_color?: string;
78
- events?: EventObjectGenerated[];
82
+ style?: OnboardButtonStyleGenerated;
79
83
  };
80
84
  }
81
85
 
@@ -27,9 +27,9 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
27
27
  }, [ctx.selectedIndex]);
28
28
 
29
29
  const direction =
30
- node.attributes?.buttons_direction === 'column' ? 'column' : 'row';
30
+ node.attributes?.style?.buttons_direction === 'column' ? 'column' : 'row';
31
31
  const seperatorColor =
32
- node.attributes?.seperatorColor ?? seperatorColorDefault;
32
+ node.attributes?.style?.seperatorColor ?? seperatorColorDefault;
33
33
 
34
34
  const renderChildren = () => {
35
35
  if (Array.isArray(node.children)) {
@@ -47,8 +47,8 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
47
47
  const generatedId = useId();
48
48
 
49
49
  // New condition logic: hide when condition is carousel-index and does not match
50
- const condition = (node.attributes as any)?.condition;
51
- const conditionVariable = (node.attributes as any)?.conditionVariable;
50
+ const condition = (node.attributes?.style as any)?.condition;
51
+ const conditionVariable = (node.attributes?.style as any)?.conditionVariable;
52
52
  const shouldHide =
53
53
  condition === 'carousel-index' &&
54
54
  typeof conditionVariable === 'number' &&
@@ -24,50 +24,54 @@ export type ButtonTypeOptionType =
24
24
  export type ButtonsDirectionOptionType = 'row' | 'column';
25
25
  export type ConditionOptionType = 'carousel-index';
26
26
 
27
+ export interface OnboardButtonsStyleGenerated {
28
+ scrollable?: boolean;
29
+ flexDirection?: FlexDirectionOptionType;
30
+ alignItems?: AlignItemsOptionType;
31
+ justifyContent?: JustifyContentOptionType;
32
+ gap?: string;
33
+ padding?: string;
34
+ paddingHorizontal?: string;
35
+ paddingVertical?: string;
36
+ paddingTop?: string;
37
+ paddingBottom?: string;
38
+ paddingLeft?: string;
39
+ paddingRight?: string;
40
+ margin?: string;
41
+ marginHorizontal?: string;
42
+ marginVertical?: string;
43
+ marginTop?: string;
44
+ marginBottom?: string;
45
+ marginLeft?: string;
46
+ marginRight?: string;
47
+ backgroundColor?: string;
48
+ borderRadius?: string;
49
+ width?: string;
50
+ minWidth?: string;
51
+ maxWidth?: string;
52
+ height?: string;
53
+ minHeight?: string;
54
+ maxHeight?: string;
55
+ flex?: number;
56
+ position?: PositionOptionType;
57
+ top?: string;
58
+ bottom?: string;
59
+ left?: string;
60
+ right?: string;
61
+ zIndex?: number;
62
+ buttonType?: ButtonTypeOptionType;
63
+ skipNumber?: number;
64
+ buttons_direction?: ButtonsDirectionOptionType;
65
+ forIndex?: number;
66
+ seperatorColor?: string;
67
+ condition?: ConditionOptionType;
68
+ conditionVariable?: number;
69
+ }
70
+
27
71
  export interface OnboardButtonsPropsGenerated {
28
72
  child: string;
29
73
  attributes: {
30
- style?: Record<string, unknown>;
31
- scrollable?: boolean;
32
- flexDirection?: FlexDirectionOptionType;
33
- alignItems?: AlignItemsOptionType;
34
- justifyContent?: JustifyContentOptionType;
35
- gap?: string;
36
- padding?: string;
37
- paddingHorizontal?: string;
38
- paddingVertical?: string;
39
- paddingTop?: string;
40
- paddingBottom?: string;
41
- paddingLeft?: string;
42
- paddingRight?: string;
43
- margin?: string;
44
- marginVertical?: string;
45
- marginTop?: string;
46
- marginBottom?: string;
47
- marginLeft?: string;
48
- marginRight?: string;
49
- backgroundColor?: string;
50
- borderRadius?: string;
51
- width?: string;
52
- minWidth?: string;
53
- maxWidth?: string;
54
- height?: string;
55
- minHeight?: string;
56
- maxHeight?: string;
57
- flex?: number;
58
- position?: PositionOptionType;
59
- top?: string;
60
- bottom?: string;
61
- left?: string;
62
- right?: string;
63
- zIndex?: number;
64
- buttonType?: ButtonTypeOptionType;
65
- skipNumber?: number;
66
- buttons_direction?: ButtonsDirectionOptionType;
67
- forIndex?: number;
68
- seperatorColor?: string;
69
- condition?: ConditionOptionType;
70
- conditionVariable?: number;
74
+ style?: OnboardButtonsStyleGenerated;
71
75
  };
72
76
  }
73
77
 
@@ -19,7 +19,8 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
19
19
  const generatedId = useId();
20
20
  const attributeName = node.type ?? 'OnboardDot';
21
21
  const attributeKey = node.key ?? generatedId;
22
- const dotType = node.attributes?.dotType || 'normal_dot';
22
+ const styleBag = node.attributes?.style;
23
+ const dotType = styleBag?.dotType || 'normal_dot';
23
24
  const GHOST_DOT_DARK_COLOR = '#E4E5E7';
24
25
  const GHOST_DOT_LIGHT_COLOR = '#F7F7F9';
25
26
  const {
@@ -35,8 +36,8 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
35
36
  const inactiveDotColor = isDark
36
37
  ? GHOST_DOT_DARK_COLOR
37
38
  : GHOST_DOT_LIGHT_COLOR;
38
- const inactiveDotOpacity = node.attributes?.inactive_dot_opacity ?? 0.3;
39
- const activeDotColor = node.attributes?.active_dot_color;
39
+ const inactiveDotOpacity = styleBag?.inactive_dot_opacity ?? 0.3;
40
+ const activeDotColor = styleBag?.active_dot_color;
40
41
  const resolvedActiveDotColor = useMemo(
41
42
  () => parseColor(activeDotColor, { theme: appConfig.theme, projectColors }),
42
43
  [activeDotColor, appConfig.theme, projectColors],
@@ -56,7 +57,7 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
56
57
  baseStyle,
57
58
  isSelected ? SELECTED_OUTLINE_STYLE : undefined,
58
59
  );
59
- const expandingDotWidthRaw = node.attributes?.expanding_dot_width;
60
+ const expandingDotWidthRaw = styleBag?.expanding_dot_width;
60
61
  const expandingDotWidthOverride = useMemo(() => {
61
62
  const parsed = parseSize(expandingDotWidthRaw);
62
63
  if (parsed === undefined) return undefined;
@@ -11,47 +11,51 @@ export type DotTypeOptionType =
11
11
  | 'sliding_dot'
12
12
  | 'liquid_like';
13
13
 
14
+ export interface OnboardDotStyleGenerated {
15
+ scrollable?: boolean;
16
+ flexDirection?: never;
17
+ alignItems?: never;
18
+ justifyContent?: never;
19
+ gap?: string;
20
+ padding?: string;
21
+ paddingHorizontal?: string;
22
+ paddingVertical?: string;
23
+ paddingTop?: string;
24
+ paddingBottom?: string;
25
+ paddingLeft?: string;
26
+ paddingRight?: string;
27
+ margin?: string;
28
+ marginHorizontal?: string;
29
+ marginVertical?: string;
30
+ marginTop?: string;
31
+ marginBottom?: string;
32
+ marginLeft?: string;
33
+ marginRight?: string;
34
+ backgroundColor?: string;
35
+ borderRadius?: 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
+ dotType?: DotTypeOptionType;
50
+ inactive_dot_opacity?: number;
51
+ expanding_dot_width?: string;
52
+ active_dot_color?: string;
53
+ }
54
+
14
55
  export interface OnboardDotPropsGenerated {
15
56
  child: string;
16
57
  attributes: {
17
- style?: Record<string, unknown>;
18
- scrollable?: boolean;
19
- flexDirection?: never;
20
- alignItems?: never;
21
- justifyContent?: never;
22
- gap?: string;
23
- padding?: string;
24
- paddingHorizontal?: string;
25
- paddingVertical?: string;
26
- paddingTop?: string;
27
- paddingBottom?: string;
28
- paddingLeft?: string;
29
- paddingRight?: string;
30
- margin?: string;
31
- marginVertical?: string;
32
- marginTop?: string;
33
- marginBottom?: string;
34
- marginLeft?: string;
35
- marginRight?: string;
36
- backgroundColor?: string;
37
- borderRadius?: string;
38
- width?: string;
39
- minWidth?: string;
40
- maxWidth?: string;
41
- height?: string;
42
- minHeight?: string;
43
- maxHeight?: string;
44
- flex?: number;
45
- position?: PositionOptionType;
46
- top?: string;
47
- bottom?: string;
48
- left?: string;
49
- right?: string;
50
- zIndex?: number;
51
- dotType?: DotTypeOptionType;
52
- inactive_dot_opacity?: number;
53
- expanding_dot_width?: string;
54
- active_dot_color?: string;
58
+ style?: OnboardDotStyleGenerated;
55
59
  };
56
60
  }
57
61
 
@@ -104,7 +104,8 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
104
104
  const t = (key?: string) =>
105
105
  key ? (localication?.[defaultLanguage ?? 'en']?.[key] ?? key) : '';
106
106
 
107
- const text = t(node?.attributes?.textLocalizationKey);
107
+ const styleBag = node?.attributes?.style;
108
+ const text = t(styleBag?.textLocalizationKey);
108
109
  const textStyle = useExtractTextStyle(node);
109
110
  const viewStyle = useExtractViewStyle(node);
110
111
 
@@ -113,7 +114,7 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
113
114
  cursor: color ? 'pointer' : undefined,
114
115
  });
115
116
 
116
- const paddingHorizontal = parseSize(node?.attributes?.paddingHorizontal);
117
+ const paddingHorizontal = parseSize(styleBag?.paddingHorizontal);
117
118
  const layoutStyle = useMemo<React.CSSProperties>(
118
119
  () => ({
119
120
  paddingLeft: paddingHorizontal,
@@ -141,24 +142,22 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
141
142
  >
142
143
  {!!text &&
143
144
  (() => {
144
- const firstText = t(node?.attributes?.linkedWordFirstLocalizationKey);
145
- const secondText = t(
146
- node?.attributes?.linkedWordSecondLocalizationKey,
147
- );
145
+ const firstText = t(styleBag?.linkedWordFirstLocalizationKey);
146
+ const secondText = t(styleBag?.linkedWordSecondLocalizationKey);
148
147
  const { segments, matchCount } = buildSegments(text, [
149
148
  {
150
149
  value: firstText,
151
- color: node?.attributes?.linkedWordFirstColor,
152
- page: (node?.attributes as any)?.linkedWordFirstPage,
150
+ color: styleBag?.linkedWordFirstColor,
151
+ page: (styleBag as any)?.linkedWordFirstPage,
153
152
  },
154
153
  {
155
154
  value: secondText,
156
- color: node?.attributes?.linkedWordSecondColor,
157
- page: (node?.attributes as any)?.linkedWordSecondPage,
155
+ color: styleBag?.linkedWordSecondColor,
156
+ page: (styleBag as any)?.linkedWordSecondPage,
158
157
  },
159
158
  ]);
160
159
 
161
- const textColor = node?.attributes?.color;
160
+ const textColor = styleBag?.color;
162
161
 
163
162
  const handleClick = (page?: string) => {
164
163
  if (!page) return;
@@ -183,25 +182,21 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
183
182
  </p>
184
183
  {matchCount === 0 && (
185
184
  <div>
186
- {node?.attributes?.linkedWordFirstLocalizationKey && (
185
+ {styleBag?.linkedWordFirstLocalizationKey && (
187
186
  <span
188
- style={linkStyle(node?.attributes?.linkedWordFirstColor)}
187
+ style={linkStyle(styleBag?.linkedWordFirstColor)}
189
188
  onClick={() =>
190
- handleClick(
191
- (node?.attributes as any)?.linkedWordFirstPage,
192
- )
189
+ handleClick((styleBag as any)?.linkedWordFirstPage)
193
190
  }
194
191
  >
195
192
  {firstText}
196
193
  </span>
197
194
  )}
198
- {node?.attributes?.linkedWordSecondLocalizationKey && (
195
+ {styleBag?.linkedWordSecondLocalizationKey && (
199
196
  <span
200
- style={linkStyle(node?.attributes?.linkedWordSecondColor)}
197
+ style={linkStyle(styleBag?.linkedWordSecondColor)}
201
198
  onClick={() =>
202
- handleClick(
203
- (node?.attributes as any)?.linkedWordSecondPage,
204
- )
199
+ handleClick((styleBag as any)?.linkedWordSecondPage)
205
200
  }
206
201
  >
207
202
  {secondText}
@@ -19,57 +19,61 @@ export type JustifyContentOptionType =
19
19
  | 'space-evenly';
20
20
  export type PositionOptionType = 'relative' | 'absolute';
21
21
 
22
+ export interface OnboardFooterStyleGenerated {
23
+ color?: string;
24
+ fontSize?: string;
25
+ fontFamily?: string;
26
+ fontWeight?: string;
27
+ textAlign?: TextAlignOptionType;
28
+ adjustsFontSizeToFit?: boolean;
29
+ showEllipsis?: boolean;
30
+ scrollable?: boolean;
31
+ flexDirection?: FlexDirectionOptionType;
32
+ alignItems?: AlignItemsOptionType;
33
+ justifyContent?: JustifyContentOptionType;
34
+ gap?: string;
35
+ padding?: string;
36
+ paddingHorizontal?: string;
37
+ paddingVertical?: string;
38
+ paddingTop?: string;
39
+ paddingBottom?: string;
40
+ paddingLeft?: string;
41
+ paddingRight?: string;
42
+ margin?: string;
43
+ marginHorizontal?: string;
44
+ marginVertical?: string;
45
+ marginTop?: string;
46
+ marginBottom?: string;
47
+ marginLeft?: string;
48
+ marginRight?: string;
49
+ backgroundColor?: string;
50
+ borderRadius?: string;
51
+ width?: string;
52
+ minWidth?: string;
53
+ maxWidth?: string;
54
+ height?: string;
55
+ minHeight?: string;
56
+ maxHeight?: string;
57
+ flex?: number;
58
+ position?: PositionOptionType;
59
+ top?: string;
60
+ bottom?: string;
61
+ left?: string;
62
+ right?: string;
63
+ zIndex?: number;
64
+ textLocalizationKey?: string;
65
+ linkedWordFirstLocalizationKey?: string;
66
+ linkedWordFirstColor?: string;
67
+ linkedWordFirstPage?: string;
68
+ linkedWordSecondLocalizationKey?: string;
69
+ linkedWordSecondColor?: string;
70
+ linkedWordSecondPage?: string;
71
+ }
72
+
22
73
  export interface OnboardFooterPropsGenerated {
23
74
  child: string;
24
75
  attributes: {
25
- style?: Record<string, unknown>;
26
- color?: string;
27
- fontSize?: string;
28
- fontFamily?: string;
29
- fontWeight?: string;
30
- textAlign?: TextAlignOptionType;
31
- adjustsFontSizeToFit?: boolean;
32
- showEllipsis?: boolean;
33
- scrollable?: boolean;
34
- flexDirection?: FlexDirectionOptionType;
35
- alignItems?: AlignItemsOptionType;
36
- justifyContent?: JustifyContentOptionType;
37
- gap?: string;
38
- padding?: string;
39
- paddingHorizontal?: string;
40
- paddingVertical?: string;
41
- paddingTop?: string;
42
- paddingBottom?: string;
43
- paddingLeft?: string;
44
- paddingRight?: string;
45
- margin?: string;
46
- marginVertical?: string;
47
- marginTop?: string;
48
- marginBottom?: string;
49
- marginLeft?: string;
50
- marginRight?: string;
51
- backgroundColor?: string;
52
- borderRadius?: string;
53
- width?: string;
54
- minWidth?: string;
55
- maxWidth?: string;
56
- height?: string;
57
- minHeight?: string;
58
- maxHeight?: string;
59
- flex?: number;
60
- position?: PositionOptionType;
61
- top?: string;
62
- bottom?: string;
63
- left?: string;
64
- right?: string;
65
- zIndex?: number;
66
- textLocalizationKey?: string;
67
- linkedWordFirstLocalizationKey?: string;
68
- linkedWordFirstColor?: string;
69
- linkedWordFirstPage?: string;
70
- linkedWordSecondLocalizationKey?: string;
71
- linkedWordSecondColor?: string;
72
- linkedWordSecondPage?: string;
76
+ style?: OnboardFooterStyleGenerated;
73
77
  };
74
78
  }
75
79
 
@@ -15,16 +15,17 @@ function OnboardImage({ node }: OnboardImageComponentProps) {
15
15
  const attributeKey = node.key ?? generatedId;
16
16
  const [lottie, setLottie] = useState<string | null>(null);
17
17
  const viewStyle = useExtractViewStyle(node);
18
+ const styleBag = node.attributes?.style;
18
19
 
19
20
  useEffect(() => {
20
- if (node.attributes?.lottie) {
21
- fetch(node.attributes?.lottie)
21
+ if (styleBag?.lottie) {
22
+ fetch(styleBag?.lottie)
22
23
  .then((res) => res.json())
23
24
  .then((data) => setLottie(data));
24
25
  }
25
- }, [node.attributes?.lottie]);
26
+ }, [styleBag?.lottie]);
26
27
 
27
- if (node.attributes?.video_url) {
28
+ if (styleBag?.video_url) {
28
29
  return (
29
30
  <video
30
31
  attribute-name={attributeName}
@@ -32,13 +33,13 @@ function OnboardImage({ node }: OnboardImageComponentProps) {
32
33
  autoPlay
33
34
  muted
34
35
  loop
35
- src={node.attributes?.video_url}
36
+ src={styleBag?.video_url}
36
37
  style={viewStyle}
37
38
  />
38
39
  );
39
40
  }
40
41
 
41
- if (node.attributes?.lottie) {
42
+ if (styleBag?.lottie) {
42
43
  if (lottie) {
43
44
  return (
44
45
  <div
@@ -19,47 +19,51 @@ export type JustifyContentOptionType =
19
19
  | 'space-evenly';
20
20
  export type PositionOptionType = 'relative' | 'absolute';
21
21
 
22
+ export interface OnboardImageStyleGenerated {
23
+ width?: string;
24
+ height?: string;
25
+ resizeMode?: ResizeModeOptionType;
26
+ scrollable?: boolean;
27
+ flexDirection?: FlexDirectionOptionType;
28
+ alignItems?: AlignItemsOptionType;
29
+ justifyContent?: JustifyContentOptionType;
30
+ gap?: string;
31
+ padding?: string;
32
+ paddingHorizontal?: string;
33
+ paddingVertical?: string;
34
+ paddingTop?: string;
35
+ paddingBottom?: string;
36
+ paddingLeft?: string;
37
+ paddingRight?: string;
38
+ margin?: string;
39
+ marginHorizontal?: string;
40
+ marginVertical?: string;
41
+ marginTop?: string;
42
+ marginBottom?: string;
43
+ marginLeft?: string;
44
+ marginRight?: string;
45
+ backgroundColor?: string;
46
+ borderRadius?: string;
47
+ minWidth?: string;
48
+ maxWidth?: string;
49
+ minHeight?: string;
50
+ maxHeight?: string;
51
+ flex?: number;
52
+ position?: PositionOptionType;
53
+ top?: string;
54
+ bottom?: string;
55
+ left?: string;
56
+ right?: string;
57
+ zIndex?: number;
58
+ video_url?: string;
59
+ lottie?: string;
60
+ }
61
+
22
62
  export interface OnboardImagePropsGenerated {
23
63
  child: string;
24
64
  attributes: {
25
- style?: Record<string, unknown>;
65
+ style?: OnboardImageStyleGenerated;
26
66
  src?: string;
27
- width?: string;
28
- height?: string;
29
- resizeMode?: ResizeModeOptionType;
30
- scrollable?: boolean;
31
- flexDirection?: FlexDirectionOptionType;
32
- alignItems?: AlignItemsOptionType;
33
- justifyContent?: JustifyContentOptionType;
34
- gap?: string;
35
- padding?: string;
36
- paddingHorizontal?: string;
37
- paddingVertical?: string;
38
- paddingTop?: string;
39
- paddingBottom?: string;
40
- paddingLeft?: string;
41
- paddingRight?: string;
42
- margin?: string;
43
- marginVertical?: string;
44
- marginTop?: string;
45
- marginBottom?: string;
46
- marginLeft?: string;
47
- marginRight?: string;
48
- backgroundColor?: string;
49
- borderRadius?: string;
50
- minWidth?: string;
51
- maxWidth?: string;
52
- minHeight?: string;
53
- maxHeight?: string;
54
- flex?: number;
55
- position?: PositionOptionType;
56
- top?: string;
57
- bottom?: string;
58
- left?: string;
59
- right?: string;
60
- zIndex?: number;
61
- video_url?: string;
62
- lottie?: string;
63
67
  };
64
68
  }
65
69