@developer_tribe/react-builder 1.0.7 → 1.0.9

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 (217) hide show
  1. package/dist/build-components/BIcon/BIconProps.generated.d.ts +3 -0
  2. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +1 -0
  3. package/dist/build-components/Button/ButtonProps.generated.d.ts +1 -0
  4. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +5 -0
  5. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +1 -0
  6. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +1 -0
  7. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +1 -0
  8. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +1 -0
  9. package/dist/build-components/Image/ImageProps.generated.d.ts +1 -0
  10. package/dist/build-components/Main/MainProps.generated.d.ts +1 -1
  11. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +1 -0
  12. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +1 -0
  13. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +1 -0
  14. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +1 -0
  15. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +3 -0
  16. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +1 -0
  17. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +1 -0
  18. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +3 -0
  19. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +3 -0
  20. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +3 -0
  21. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -1
  22. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +3 -1
  23. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +1 -1
  24. package/dist/build-components/PaywallProvider/PaywallContext.d.ts +12 -0
  25. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +1 -1
  26. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -0
  27. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +1 -1
  28. package/dist/build-components/Text/TextProps.generated.d.ts +3 -0
  29. package/dist/build-components/View/ViewProps.generated.d.ts +1 -0
  30. package/dist/build-components/patterns.generated.d.ts +372 -374
  31. package/dist/components/BuilderProvider.d.ts +2 -0
  32. package/dist/components/ParamsProvider.d.ts +5 -0
  33. package/dist/components/RenderErrorBoundary.d.ts +28 -0
  34. package/dist/hooks/useSyncHtmlThemeClass.d.ts +7 -0
  35. package/dist/index.cjs.js +5 -5
  36. package/dist/index.cjs.js.map +1 -1
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.esm.js +3 -3
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.native.cjs.js +4 -4
  41. package/dist/index.native.cjs.js.map +1 -1
  42. package/dist/index.native.d.ts +1 -0
  43. package/dist/index.native.esm.js +4 -4
  44. package/dist/index.native.esm.js.map +1 -1
  45. package/dist/migrations/migratePipe.d.ts +14 -0
  46. package/dist/migrations/migrations/1.1.0_normalize_style_attributes.d.ts +2 -0
  47. package/dist/migrations/semver.d.ts +8 -0
  48. package/dist/migrations/types.d.ts +8 -0
  49. package/dist/mockOS/components/SubscriptionModal.d.ts +7 -0
  50. package/dist/mockOS/context/MockOSContextBase.d.ts +1 -0
  51. package/dist/mockOS/hooks/useMockIap.d.ts +3 -0
  52. package/dist/mockOS/index.d.ts +4 -0
  53. package/dist/mockOS/managers/mockOSIapManager.d.ts +6 -0
  54. package/dist/mockOS/managers/subscriptionManager.d.ts +10 -0
  55. package/dist/pages/ProjectDebug.d.ts +14 -0
  56. package/dist/pages/ProjectMigrationPage.d.ts +23 -0
  57. package/dist/pages/ProjectValidationPage.d.ts +15 -0
  58. package/dist/styles.css +1 -1
  59. package/dist/types/Device.d.ts +5 -0
  60. package/dist/utils/__special_exceptions.d.ts +7 -0
  61. package/dist/utils/getImage.d.ts +23 -0
  62. package/dist/utils/pasteNode.d.ts +15 -0
  63. package/dist/utils/patterns.d.ts +1 -2
  64. package/package.json +6 -2
  65. package/scripts/migrate-patterns-to-v2.mjs +131 -0
  66. package/scripts/migrate-samples-to-current.ts +79 -0
  67. package/scripts/prebuild/utils/createGeneratedProps.js +4 -5
  68. package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +32 -21
  69. package/scripts/prebuild/utils/validatePatternJson.js +12 -10
  70. package/src/.DS_Store +0 -0
  71. package/src/AttributesEditor.tsx +41 -11
  72. package/src/RenderPage.tsx +55 -0
  73. package/src/assets/.DS_Store +0 -0
  74. package/src/assets/devices.json +91 -0
  75. package/src/assets/samples/carousel-sample.json +141 -29
  76. package/src/assets/samples/getSamples.ts +9 -0
  77. package/src/assets/samples/paywall-1.json +119 -71
  78. package/src/assets/samples/simple-1.json +28 -16
  79. package/src/assets/samples/simple-2.json +157 -82
  80. package/src/assets/samples/unmigrated-builder1.json +42 -0
  81. package/src/assets/samples/unvalidated-builder1.json +49 -0
  82. package/src/assets/samples/unvalidated-crash1.json +19 -0
  83. package/src/assets/samples/unvalidated-crashcomponent1.json +16 -0
  84. package/src/assets/samples/vpn-onboard-1.json +91 -51
  85. package/src/assets/samples/vpn-onboard-2.json +318 -278
  86. package/src/assets/samples/vpn-onboard-3.json +286 -252
  87. package/src/assets/samples/vpn-onboard-4.json +286 -252
  88. package/src/assets/samples/vpn-onboard-5.json +434 -374
  89. package/src/assets/samples/vpn-onboard-6.json +290 -250
  90. package/src/attributes-editor/Field.tsx +1 -1
  91. package/src/attributes-editor/LayoutPreviewPicker.tsx +5 -2
  92. package/src/build-components/BIcon/BIconProps.generated.ts +3 -0
  93. package/src/build-components/BIcon/pattern.json +12 -9
  94. package/src/build-components/BackgroundImage/BackgroundImage.tsx +3 -1
  95. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +1 -0
  96. package/src/build-components/BackgroundImage/pattern.json +25 -16
  97. package/src/build-components/Button/Button.tsx +26 -3
  98. package/src/build-components/Button/ButtonProps.generated.ts +1 -0
  99. package/src/build-components/Button/pattern.json +10 -6
  100. package/src/build-components/Carousel/CarouselProps.generated.ts +5 -0
  101. package/src/build-components/Carousel/pattern.json +19 -8
  102. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +1 -0
  103. package/src/build-components/CarouselButtons/pattern.json +11 -5
  104. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +1 -0
  105. package/src/build-components/CarouselDots/pattern.json +5 -4
  106. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +1 -0
  107. package/src/build-components/CarouselItem/pattern.json +5 -4
  108. package/src/build-components/CarouselProvider/CarouselProvider.tsx +44 -2
  109. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +1 -0
  110. package/src/build-components/Image/Image.tsx +2 -1
  111. package/src/build-components/Image/ImageProps.generated.ts +1 -0
  112. package/src/build-components/Image/pattern.json +11 -5
  113. package/src/build-components/Main/MainProps.generated.ts +1 -1
  114. package/src/build-components/Main/pattern.json +12 -9
  115. package/src/build-components/Onboard/OnboardProps.generated.ts +1 -0
  116. package/src/build-components/Onboard/pattern.json +14 -9
  117. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +1 -0
  118. package/src/build-components/OnboardButton/pattern.json +5 -4
  119. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +1 -0
  120. package/src/build-components/OnboardButtons/pattern.json +5 -4
  121. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +1 -0
  122. package/src/build-components/OnboardDot/pattern.json +5 -4
  123. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +3 -0
  124. package/src/build-components/OnboardFooter/pattern.json +8 -5
  125. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +1 -0
  126. package/src/build-components/OnboardImage/pattern.json +7 -4
  127. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +1 -0
  128. package/src/build-components/OnboardItem/pattern.json +18 -9
  129. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +3 -0
  130. package/src/build-components/OnboardProvider/pattern.json +21 -6
  131. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +3 -0
  132. package/src/build-components/OnboardSubtitle/pattern.json +10 -6
  133. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +3 -0
  134. package/src/build-components/OnboardTitle/pattern.json +11 -7
  135. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
  136. package/src/build-components/PaywallBackground/pattern.json +5 -4
  137. package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +6 -1
  138. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +3 -1
  139. package/src/build-components/PaywallCloseButton/pattern.json +15 -12
  140. package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +0 -1
  141. package/src/build-components/PaywallOptions/PaywallOptions.tsx +3 -2
  142. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +1 -1
  143. package/src/build-components/PaywallOptions/pattern.json +14 -11
  144. package/src/build-components/PaywallProvider/PaywallContext.ts +25 -0
  145. package/src/build-components/PaywallProvider/PaywallProvider.tsx +102 -5
  146. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +1 -1
  147. package/src/build-components/PaywallProvider/pattern.json +11 -8
  148. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +7 -0
  149. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -0
  150. package/src/build-components/PaywallSubscribeButton/pattern.json +16 -13
  151. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +1 -1
  152. package/src/build-components/RadioButton/pattern.json +5 -4
  153. package/src/build-components/Text/Text.tsx +107 -4
  154. package/src/build-components/Text/TextProps.generated.ts +3 -0
  155. package/src/build-components/Text/pattern.json +19 -4
  156. package/src/build-components/View/ViewProps.generated.ts +1 -0
  157. package/src/build-components/View/pattern.json +28 -13
  158. package/src/build-components/other.tsx +15 -0
  159. package/src/build-components/patterns.generated.ts +340 -235
  160. package/src/build-components/useNode.ts +22 -3
  161. package/src/components/BottomBar.tsx +45 -45
  162. package/src/components/Builder.tsx +20 -6
  163. package/src/components/BuilderButton.tsx +75 -38
  164. package/src/components/BuilderProvider.tsx +22 -2
  165. package/src/components/DeviceButton.tsx +12 -5
  166. package/src/components/EditorHeader.tsx +296 -38
  167. package/src/components/ParamsProvider.tsx +7 -0
  168. package/src/components/RenderErrorBoundary.tsx +200 -0
  169. package/src/hooks/useParams.ts +5 -1
  170. package/src/hooks/useSyncHtmlThemeClass.ts +19 -0
  171. package/src/index.native.ts +7 -0
  172. package/src/index.ts +8 -0
  173. package/src/migrations/migratePipe.ts +59 -0
  174. package/src/migrations/migrations/1.1.0_normalize_style_attributes.ts +80 -0
  175. package/src/migrations/semver.ts +24 -0
  176. package/src/migrations/types.ts +9 -0
  177. package/src/mockOS/components/PermissionModal.tsx +3 -2
  178. package/src/mockOS/components/SubscriptionModal.tsx +400 -0
  179. package/src/mockOS/context/MockOSContext.tsx +61 -10
  180. package/src/mockOS/context/MockOSContextBase.ts +1 -0
  181. package/src/mockOS/hooks/useMockIap.ts +11 -0
  182. package/src/mockOS/index.ts +7 -0
  183. package/src/mockOS/managers/mockOSIapManager.ts +10 -0
  184. package/src/mockOS/managers/subscriptionManager.ts +36 -0
  185. package/src/modals/IconPickerModal.tsx +1 -1
  186. package/src/pages/ProjectDebug.tsx +331 -0
  187. package/src/pages/ProjectMigrationPage.tsx +92 -0
  188. package/src/pages/ProjectPage.tsx +318 -166
  189. package/src/pages/ProjectValidationPage.tsx +54 -0
  190. package/src/styles/base/_global.scss +58 -11
  191. package/src/styles/components/_attributes-editor.scss +1 -1
  192. package/src/styles/components/_bottom-bar.scss +7 -4
  193. package/src/styles/components/_editor-shell.scss +126 -4
  194. package/src/styles/components/_mockos-router.scss +3 -2
  195. package/src/styles/components/_ui-components.scss +10 -5
  196. package/src/styles/foundation/_colors.scss +78 -11
  197. package/src/styles/foundation/_mixins.scss +4 -1
  198. package/src/styles/foundation/_sizes.scss +4 -2
  199. package/src/styles/index.scss +1 -0
  200. package/src/styles/layout/_builder.scss +61 -0
  201. package/src/styles/layout/_project-validation.scss +214 -0
  202. package/src/styles/modals/_add-component.scss +4 -2
  203. package/src/styles/modals/_color-modal.scss +4 -2
  204. package/src/styles/modals/_modal-shell.scss +3 -1
  205. package/src/types/Device.ts +5 -0
  206. package/src/utils/__special_exceptions.ts +88 -0
  207. package/src/utils/analyseNode.ts +8 -2
  208. package/src/utils/analyseNodeByPatterns.ts +43 -9
  209. package/src/utils/extractTextStyle.ts +19 -6
  210. package/src/utils/extractViewStyle.ts +68 -59
  211. package/src/utils/getImage.ts +76 -0
  212. package/src/utils/novaToJson.ts +2 -1
  213. package/src/utils/pasteNode.ts +172 -0
  214. package/src/utils/patterns.ts +4 -3
  215. package/dist/android.svg +0 -43
  216. package/dist/apple.svg +0 -16
  217. package/dist/background.jpg +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carousel-sample",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "other",
5
5
  "appConfig": {
6
6
  "theme": "light"
@@ -20,7 +20,6 @@
20
20
  "type": "carouselItem",
21
21
  "attributes": {
22
22
  "style": {
23
- "flex": "0 0 100%",
24
23
  "minWidth": 0
25
24
  }
26
25
  },
@@ -28,23 +27,59 @@
28
27
  "type": "view",
29
28
  "attributes": {
30
29
  "style": {
31
- "padding": "20px",
32
- "backgroundColor": "#f5f5f5",
33
- "borderRadius": "8px",
34
- "textAlign": "center"
30
+ "padding": "22px",
31
+ "borderRadius": 18,
32
+ "backgroundImage": "linear-gradient(135deg, #eef2ff 0%, #ffffff 55%, #ecfeff 100%)",
33
+ "boxShadow": "0 10px 30px rgba(15, 23, 42, 0.10)",
34
+ "gap": 14,
35
+ "height": "100%",
36
+ "justifyContent": "center"
35
37
  }
36
38
  },
37
- "children": {
38
- "type": "text",
39
- "children": "Welcome to our app!"
40
- }
39
+ "children": [
40
+ {
41
+ "type": "image",
42
+ "attributes": {
43
+ "src": "https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1200&q=80",
44
+ "resizeMode": "cover",
45
+ "style": {
46
+ "width": "100%",
47
+ "height": 230,
48
+ "borderRadius": 14
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "type": "text",
54
+ "attributes": {
55
+ "style": {
56
+ "fontSize": 28,
57
+ "fontWeight": "700",
58
+ "textAlign": "center",
59
+ "color": "#0f172a"
60
+ }
61
+ },
62
+ "children": "Welcome aboard"
63
+ },
64
+ {
65
+ "type": "text",
66
+ "attributes": {
67
+ "style": {
68
+ "fontSize": 16,
69
+ "textAlign": "center",
70
+ "color": "#334155",
71
+ "paddingHorizontal": 8
72
+ }
73
+ },
74
+ "children": "Swipe through a beautiful, validated carousel sample with images."
75
+ }
76
+ ]
41
77
  }
42
78
  },
43
79
  {
44
80
  "type": "carouselItem",
45
81
  "attributes": {
46
82
  "style": {
47
- "flex": "0 0 100%",
48
83
  "minWidth": 0
49
84
  }
50
85
  },
@@ -52,23 +87,59 @@
52
87
  "type": "view",
53
88
  "attributes": {
54
89
  "style": {
55
- "padding": "20px",
56
- "backgroundColor": "#e8f5e9",
57
- "borderRadius": "8px",
58
- "textAlign": "center"
90
+ "padding": "22px",
91
+ "borderRadius": 18,
92
+ "backgroundImage": "linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%, #eff6ff 100%)",
93
+ "boxShadow": "0 10px 30px rgba(15, 23, 42, 0.10)",
94
+ "gap": 14,
95
+ "height": "100%",
96
+ "justifyContent": "center"
59
97
  }
60
98
  },
61
- "children": {
62
- "type": "text",
63
- "children": "Discover amazing features"
64
- }
99
+ "children": [
100
+ {
101
+ "type": "image",
102
+ "attributes": {
103
+ "src": "https://images.unsplash.com/photo-1553877522-43269d4ea984?auto=format&fit=crop&w=1200&q=80",
104
+ "resizeMode": "cover",
105
+ "style": {
106
+ "width": "100%",
107
+ "height": 230,
108
+ "borderRadius": 14
109
+ }
110
+ }
111
+ },
112
+ {
113
+ "type": "text",
114
+ "attributes": {
115
+ "style": {
116
+ "fontSize": 28,
117
+ "fontWeight": "700",
118
+ "textAlign": "center",
119
+ "color": "#0f172a"
120
+ }
121
+ },
122
+ "children": "Discover features"
123
+ },
124
+ {
125
+ "type": "text",
126
+ "attributes": {
127
+ "style": {
128
+ "fontSize": 16,
129
+ "textAlign": "center",
130
+ "color": "#334155",
131
+ "paddingHorizontal": 8
132
+ }
133
+ },
134
+ "children": "Dots + buttons are included, and slide sizing comes from the carousel CSS."
135
+ }
136
+ ]
65
137
  }
66
138
  },
67
139
  {
68
140
  "type": "carouselItem",
69
141
  "attributes": {
70
142
  "style": {
71
- "flex": "0 0 100%",
72
143
  "minWidth": 0
73
144
  }
74
145
  },
@@ -76,16 +147,53 @@
76
147
  "type": "view",
77
148
  "attributes": {
78
149
  "style": {
79
- "padding": "20px",
80
- "backgroundColor": "#e3f2fd",
81
- "borderRadius": "8px",
82
- "textAlign": "center"
150
+ "padding": "22px",
151
+ "borderRadius": 18,
152
+ "backgroundImage": "linear-gradient(135deg, #fff7ed 0%, #ffffff 55%, #f5f3ff 100%)",
153
+ "boxShadow": "0 10px 30px rgba(15, 23, 42, 0.10)",
154
+ "gap": 14,
155
+ "height": "100%",
156
+ "justifyContent": "center"
83
157
  }
84
158
  },
85
- "children": {
86
- "type": "text",
87
- "children": "Get started now!"
88
- }
159
+ "children": [
160
+ {
161
+ "type": "image",
162
+ "attributes": {
163
+ "src": "https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1200&q=80",
164
+ "resizeMode": "cover",
165
+ "style": {
166
+ "width": "100%",
167
+ "height": 230,
168
+ "borderRadius": 14
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "type": "text",
174
+ "attributes": {
175
+ "style": {
176
+ "fontSize": 28,
177
+ "fontWeight": "700",
178
+ "textAlign": "center",
179
+ "color": "#0f172a"
180
+ }
181
+ },
182
+ "children": "Get started"
183
+ },
184
+ {
185
+ "type": "text",
186
+ "attributes": {
187
+ "style": {
188
+ "fontSize": 16,
189
+ "textAlign": "center",
190
+ "color": "#334155",
191
+ "paddingHorizontal": 8
192
+ }
193
+ },
194
+ "children": "This sample stays within validation rules (no string flex shorthand)."
195
+ }
196
+ ]
89
197
  }
90
198
  }
91
199
  ]
@@ -99,7 +207,11 @@
99
207
  {
100
208
  "type": "carouselButtons",
101
209
  "attributes": {
102
- "buttonType": ["previous_button", "next_button", "skip_button"],
210
+ "buttonType": [
211
+ "previous_button",
212
+ "next_button",
213
+ "skip_button"
214
+ ],
103
215
  "skipNumber": 3
104
216
  }
105
217
  }
@@ -2,6 +2,10 @@ import { Project } from '../../types/Project';
2
2
  import simple1 from './simple-1.json';
3
3
  import simple2 from './simple-2.json';
4
4
  import carouselSample from './carousel-sample.json';
5
+ import unvalidatedBuilder1 from './unvalidated-builder1.json';
6
+ import unvalidatedCrash1 from './unvalidated-crash1.json';
7
+ import unvalidatedCrashComponent1 from './unvalidated-crashcomponent1.json';
8
+ import unmigratedBuilder1 from './unmigrated-builder1.json';
5
9
  import paywall1 from './paywall-1.json';
6
10
  import vpnOnboard1 from './vpn-onboard-1.json';
7
11
  import vpnOnboard2 from './vpn-onboard-2.json';
@@ -32,6 +36,10 @@ export function getSamples(): Project[] {
32
36
  normalizeSample(simple1),
33
37
  normalizeSample(simple2),
34
38
  normalizeSample(carouselSample),
39
+ normalizeSample(unvalidatedBuilder1),
40
+ normalizeSample(unvalidatedCrash1),
41
+ normalizeSample(unvalidatedCrashComponent1),
42
+ normalizeSample(unmigratedBuilder1),
35
43
  normalizeSample(paywall1),
36
44
  ...onboardSamples,
37
45
  ];
@@ -42,6 +50,7 @@ export function getBasicSamples(): Project[] {
42
50
  normalizeSample(simple1),
43
51
  normalizeSample(simple2),
44
52
  normalizeSample(carouselSample),
53
+ normalizeSample(unvalidatedBuilder1),
45
54
  ];
46
55
  }
47
56
 
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "Simple Paywall",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "paywall",
5
5
  "appConfig": {
6
6
  "theme": "light",
7
7
  "isRtl": false,
8
8
  "screenStyle": {
9
- "light": { "backgroundColor": "#FDFDFD", "color": "#161827" },
10
- "dark": { "backgroundColor": "#12131A", "color": "#E9EBF9" }
9
+ "light": {
10
+ "backgroundColor": "#FDFDFD",
11
+ "color": "#161827"
12
+ },
13
+ "dark": {
14
+ "backgroundColor": "#12131A",
15
+ "color": "#E9EBF9"
16
+ }
11
17
  },
12
18
  "defaultLanguage": "en"
13
19
  },
@@ -21,16 +27,18 @@
21
27
  {
22
28
  "type": "PaywallProvider",
23
29
  "attributes": {
24
- "scrollable": true,
25
- "flexDirection": "column",
26
- "alignItems": "stretch",
27
- "justifyContent": "flex-start",
28
- "position": "relative",
29
- "paddingTop": 56,
30
- "paddingHorizontal": 16,
31
- "paddingBottom": 16,
32
- "gap": 12,
33
- "backgroundColor": "#F5F7FA"
30
+ "style": {
31
+ "scrollable": true,
32
+ "flexDirection": "column",
33
+ "alignItems": "stretch",
34
+ "justifyContent": "flex-start",
35
+ "position": "relative",
36
+ "paddingTop": 56,
37
+ "paddingHorizontal": 16,
38
+ "paddingBottom": 16,
39
+ "gap": 12,
40
+ "backgroundColor": "#F5F7FA"
41
+ }
34
42
  },
35
43
  "children": [
36
44
  {
@@ -44,52 +52,62 @@
44
52
  {
45
53
  "type": "PaywallCloseButton",
46
54
  "attributes": {
47
- "position": "absolute",
48
- "top": 16,
49
- "left": 16,
50
- "width": 32,
51
- "height": 32,
52
- "borderRadius": 16,
53
- "backgroundColor": "#FFFFFF",
54
- "zIndex": 10
55
+ "style": {
56
+ "position": "absolute",
57
+ "top": 16,
58
+ "left": 16,
59
+ "width": 32,
60
+ "height": 32,
61
+ "borderRadius": 16,
62
+ "backgroundColor": "#FFFFFF",
63
+ "zIndex": 10
64
+ }
55
65
  },
56
66
  "children": null
57
67
  },
58
68
  {
59
69
  "type": "View",
60
70
  "attributes": {
61
- "flexDirection": "column",
62
- "gap": 0,
63
- "marginTop": "16%"
71
+ "style": {
72
+ "flexDirection": "column",
73
+ "gap": 0,
74
+ "marginTop": "16%"
75
+ }
64
76
  },
65
77
  "children": [
66
78
  {
67
79
  "type": "View",
68
80
  "attributes": {
69
- "flexDirection": "row",
70
- "alignItems": "center",
71
- "gap": 8,
72
- "paddingVertical": 8,
73
- "paddingHorizontal": 12
81
+ "style": {
82
+ "flexDirection": "row",
83
+ "alignItems": "center",
84
+ "gap": 8,
85
+ "paddingVertical": 8,
86
+ "paddingHorizontal": 12
87
+ }
74
88
  },
75
89
  "children": [
76
90
  {
77
91
  "type": "BIcon",
78
92
  "attributes": {
79
93
  "iconType": "check",
80
- "color": "#22c55e",
81
94
  "strokeWidth": 3,
82
- "fontSize": "16",
83
- "flex": 0
95
+ "style": {
96
+ "color": "#22c55e",
97
+ "fontSize": "16",
98
+ "flex": 0
99
+ }
84
100
  },
85
101
  "children": null
86
102
  },
87
103
  {
88
104
  "type": "text",
89
105
  "attributes": {
90
- "flex": 1,
91
- "color": "#FFFFFF",
92
- "fontWeight": "700"
106
+ "style": {
107
+ "flex": 1,
108
+ "color": "#FFFFFF",
109
+ "fontWeight": "700"
110
+ }
93
111
  },
94
112
  "children": "@benefit1 — Unlimited access"
95
113
  }
@@ -98,30 +116,36 @@
98
116
  {
99
117
  "type": "View",
100
118
  "attributes": {
101
- "flexDirection": "row",
102
- "alignItems": "center",
103
- "gap": 8,
104
- "paddingVertical": 8,
105
- "paddingHorizontal": 12
119
+ "style": {
120
+ "flexDirection": "row",
121
+ "alignItems": "center",
122
+ "gap": 8,
123
+ "paddingVertical": 8,
124
+ "paddingHorizontal": 12
125
+ }
106
126
  },
107
127
  "children": [
108
128
  {
109
129
  "type": "BIcon",
110
130
  "attributes": {
111
131
  "iconType": "check",
112
- "color": "#22c55e",
113
132
  "strokeWidth": 3,
114
- "fontSize": "16",
115
- "flex": 0
133
+ "style": {
134
+ "color": "#22c55e",
135
+ "fontSize": "16",
136
+ "flex": 0
137
+ }
116
138
  },
117
139
  "children": null
118
140
  },
119
141
  {
120
142
  "type": "text",
121
143
  "attributes": {
122
- "flex": 1,
123
- "color": "#FFFFFF",
124
- "fontWeight": "700"
144
+ "style": {
145
+ "flex": 1,
146
+ "color": "#FFFFFF",
147
+ "fontWeight": "700"
148
+ }
125
149
  },
126
150
  "children": "@benefit2 — 7-day free trial"
127
151
  }
@@ -130,30 +154,36 @@
130
154
  {
131
155
  "type": "View",
132
156
  "attributes": {
133
- "flexDirection": "row",
134
- "alignItems": "center",
135
- "gap": 8,
136
- "paddingVertical": 8,
137
- "paddingHorizontal": 12
157
+ "style": {
158
+ "flexDirection": "row",
159
+ "alignItems": "center",
160
+ "gap": 8,
161
+ "paddingVertical": 8,
162
+ "paddingHorizontal": 12
163
+ }
138
164
  },
139
165
  "children": [
140
166
  {
141
167
  "type": "BIcon",
142
168
  "attributes": {
143
169
  "iconType": "check",
144
- "color": "#22c55e",
145
170
  "strokeWidth": 3,
146
- "fontSize": "16",
147
- "flex": 0
171
+ "style": {
172
+ "color": "#22c55e",
173
+ "fontSize": "16",
174
+ "flex": 0
175
+ }
148
176
  },
149
177
  "children": null
150
178
  },
151
179
  {
152
180
  "type": "text",
153
181
  "attributes": {
154
- "flex": 1,
155
- "color": "#FFFFFF",
156
- "fontWeight": "700"
182
+ "style": {
183
+ "flex": 1,
184
+ "color": "#FFFFFF",
185
+ "fontWeight": "700"
186
+ }
157
187
  },
158
188
  "children": "@benefit3 — Cancel anytime"
159
189
  }
@@ -164,24 +194,38 @@
164
194
  {
165
195
  "type": "PaywallOptions",
166
196
  "attributes": {
167
- "borderRadius": 12,
168
- "backgroundColor": "#FFFFFF"
197
+ "style": {
198
+ "borderRadius": 12,
199
+ "backgroundColor": "#FFFFFF"
200
+ }
169
201
  },
170
202
  "children": [
171
203
  {
172
204
  "type": "RadioButton",
173
- "attributes": { "flex": 1 },
205
+ "attributes": {
206
+ "style": {
207
+ "flex": 1
208
+ }
209
+ },
174
210
  "children": null
175
211
  },
176
-
177
212
  {
178
213
  "type": "text",
179
- "attributes": { "flex": 4 },
214
+ "attributes": {
215
+ "style": {
216
+ "flex": 4
217
+ }
218
+ },
180
219
  "children": "@productDescription — Unlock all premium features for a month."
181
220
  },
182
221
  {
183
222
  "type": "text",
184
- "attributes": { "flex": 1, "textAlign": "right" },
223
+ "attributes": {
224
+ "style": {
225
+ "flex": 1,
226
+ "textAlign": "right"
227
+ }
228
+ },
185
229
  "children": "@localizedPrice"
186
230
  },
187
231
  {
@@ -189,9 +233,11 @@
189
233
  "attributes": {
190
234
  "iconType": "chevron-right",
191
235
  "size": 16,
192
- "marginRight": 4,
193
- "flex": 0,
194
- "width": 32
236
+ "style": {
237
+ "marginRight": 4,
238
+ "flex": 0,
239
+ "width": 32
240
+ }
195
241
  },
196
242
  "children": null
197
243
  }
@@ -200,11 +246,13 @@
200
246
  {
201
247
  "type": "View",
202
248
  "attributes": {
203
- "flex": 1,
204
- "flexDirection": "column",
205
- "justifyContent": "flex-end",
206
- "alignItems": "stretch",
207
- "paddingBottom": "50px"
249
+ "style": {
250
+ "flex": 1,
251
+ "flexDirection": "column",
252
+ "justifyContent": "flex-end",
253
+ "alignItems": "stretch",
254
+ "paddingBottom": "50px"
255
+ }
208
256
  },
209
257
  "children": [
210
258
  {
@@ -1,44 +1,56 @@
1
1
  {
2
2
  "name": "hello-world",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "other",
5
5
  "appConfig": {
6
6
  "theme": "light",
7
7
  "isRtl": false,
8
8
  "screenStyle": {
9
- "light": { "backgroundColor": "#FDFDFD", "color": "#161827" },
10
- "dark": { "backgroundColor": "#12131A", "color": "#E9EBF9" }
9
+ "light": {
10
+ "backgroundColor": "#FDFDFD",
11
+ "color": "#161827"
12
+ },
13
+ "dark": {
14
+ "backgroundColor": "#12131A",
15
+ "color": "#E9EBF9"
16
+ }
11
17
  },
12
18
  "defaultLanguage": "en"
13
19
  },
14
20
  "data": {
15
21
  "type": "view",
16
22
  "attributes": {
17
- "scrollable": true,
18
- "flexDirection": "column",
19
- "alignItems": "center",
20
- "justifyContent": "center",
21
- "gap": 12,
22
- "padding": 16,
23
- "backgroundColor": "#F5F7FA"
23
+ "style": {
24
+ "scrollable": true,
25
+ "flexDirection": "column",
26
+ "alignItems": "center",
27
+ "justifyContent": "center",
28
+ "gap": 12,
29
+ "padding": 16,
30
+ "backgroundColor": "#F5F7FA"
31
+ }
24
32
  },
25
33
  "children": [
26
34
  {
27
35
  "type": "text",
28
36
  "children": "Hello, world!",
29
37
  "attributes": {
30
- "color": "#111827",
31
- "fontSize": 24,
32
- "fontWeight": "600"
38
+ "style": {
39
+ "color": "#111827",
40
+ "fontSize": 24,
41
+ "fontWeight": "600"
42
+ }
33
43
  }
34
44
  },
35
45
  {
36
46
  "type": "text",
37
47
  "children": "Welcome to react-native-builder",
38
48
  "attributes": {
39
- "color": "#6B7280",
40
- "fontSize": 14,
41
- "fontWeight": "400"
49
+ "style": {
50
+ "color": "#6B7280",
51
+ "fontSize": 14,
52
+ "fontWeight": "400"
53
+ }
42
54
  }
43
55
  }
44
56
  ]