@developer_tribe/react-builder 1.2.19 → 1.2.21

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 (162) hide show
  1. package/dist/attribute-analyser/style/web/useExtractTextStyle.d.ts +1 -1
  2. package/dist/build-components/BIcon/BIconProps.generated.d.ts +2 -0
  3. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +2 -0
  4. package/dist/build-components/Button/ButtonProps.generated.d.ts +2 -0
  5. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +2 -0
  6. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +2 -0
  7. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +2 -0
  8. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +2 -0
  9. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +2 -0
  10. package/dist/build-components/CountDown/CountDownProps.generated.d.ts +2 -0
  11. package/dist/build-components/Counter/CounterProps.generated.d.ts +2 -0
  12. package/dist/build-components/Image/ImageProps.generated.d.ts +2 -0
  13. package/dist/build-components/Main/MainProps.generated.d.ts +2 -0
  14. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +2 -0
  15. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -0
  16. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +2 -0
  17. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +4 -1
  18. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +2 -0
  19. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +2 -0
  20. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +2 -0
  21. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +2 -0
  22. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +2 -0
  23. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +2 -0
  24. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +2 -0
  25. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +2 -0
  26. package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +2 -0
  27. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +2 -0
  28. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +2 -0
  29. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +2 -0
  30. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +2 -0
  31. package/dist/build-components/Text/TextProps.generated.d.ts +2 -0
  32. package/dist/build-components/View/View.d.ts +1 -1
  33. package/dist/build-components/View/ViewProps.generated.d.ts +2 -0
  34. package/dist/build-components/patterns.generated.d.ts +310 -10
  35. package/dist/components/BuilderButton.d.ts +3 -1
  36. package/dist/index.cjs.js +4 -4
  37. package/dist/index.cjs.js.map +1 -1
  38. package/dist/index.esm.js +4 -4
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.web.cjs.js +6 -6
  41. package/dist/index.web.cjs.js.map +1 -1
  42. package/dist/index.web.esm.js +4 -4
  43. package/dist/index.web.esm.js.map +1 -1
  44. package/dist/store.d.ts +2 -0
  45. package/dist/styles.css +1 -1
  46. package/dist/utils/extractTextStyle/extractTextStyle.d.ts +1 -0
  47. package/package.json +1 -1
  48. package/scripts/migrate-patterns-to-v2.mjs +13 -8
  49. package/scripts/prebuild/icon-generator.js +34 -37
  50. package/src/assets/loading_animation.json +2587 -1
  51. package/src/assets/meta.json +1 -1
  52. package/src/assets/samples/carousel-sample.json +281 -199
  53. package/src/assets/samples/getSamples.ts +16 -1
  54. package/src/assets/samples/paywall-1.json +93 -77
  55. package/src/assets/samples/paywall-2.json +77 -77
  56. package/src/assets/samples/paywall-app-delete-offer.json +353 -0
  57. package/src/assets/samples/paywall-app-open-offer.json +353 -0
  58. package/src/assets/samples/paywall-back-offer.json +353 -0
  59. package/src/assets/samples/paywall-notification-offer.json +353 -0
  60. package/src/assets/samples/simple-1.json +13 -13
  61. package/src/assets/samples/simple-2.json +97 -97
  62. package/src/assets/samples/unmigrated-builder-1.1.1.json +25 -25
  63. package/src/assets/samples/unmigrated-builder1.json +1 -1
  64. package/src/assets/samples/unvalidated-builder1.json +15 -15
  65. package/src/assets/samples/unvalidated-crash1.json +4 -4
  66. package/src/assets/samples/vpn-onboard-1.json +122 -89
  67. package/src/assets/samples/vpn-onboard-2.json +119 -86
  68. package/src/assets/samples/vpn-onboard-3.json +125 -90
  69. package/src/assets/samples/vpn-onboard-4.json +125 -90
  70. package/src/assets/samples/vpn-onboard-5.json +161 -119
  71. package/src/assets/samples/vpn-onboard-6.json +122 -92
  72. package/src/attribute-analyser/style/web/useExtractTextStyle.ts +9 -2
  73. package/src/build-components/BIcon/BIconProps.generated.ts +2 -0
  74. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +2 -0
  75. package/src/build-components/Button/ButtonProps.generated.ts +2 -0
  76. package/src/build-components/Carousel/CarouselProps.generated.ts +2 -0
  77. package/src/build-components/Carousel/pattern.json +2 -8
  78. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +2 -0
  79. package/src/build-components/CarouselButtons/pattern.json +2 -9
  80. package/src/build-components/CarouselDots/CarouselDots.tsx +112 -12
  81. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +2 -0
  82. package/src/build-components/CarouselDots/pattern.json +1 -3
  83. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +2 -0
  84. package/src/build-components/CarouselItem/pattern.json +1 -3
  85. package/src/build-components/CarouselProvider/CarouselProvider.tsx +5 -44
  86. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +2 -0
  87. package/src/build-components/CarouselProvider/pattern.json +6 -0
  88. package/src/build-components/CountDown/CountDownProps.generated.ts +2 -0
  89. package/src/build-components/CountDown/pattern.json +0 -1
  90. package/src/build-components/Counter/CounterProps.generated.ts +2 -0
  91. package/src/build-components/Counter/pattern.json +0 -1
  92. package/src/build-components/Image/Image.tsx +1 -1
  93. package/src/build-components/Image/ImageProps.generated.ts +2 -0
  94. package/src/build-components/Main/MainProps.generated.ts +2 -0
  95. package/src/build-components/Main/pattern.json +1 -3
  96. package/src/build-components/Onboard/OnboardProps.generated.ts +2 -0
  97. package/src/build-components/Onboard/pattern.json +2 -6
  98. package/src/build-components/OnboardButton/OnboardButton.tsx +0 -4
  99. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -0
  100. package/src/build-components/OnboardButton/pattern.json +9 -14
  101. package/src/build-components/OnboardButtons/OnboardButtons.tsx +17 -20
  102. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +2 -0
  103. package/src/build-components/OnboardButtons/pattern.json +15 -15
  104. package/src/build-components/OnboardDot/OnboardDot.tsx +73 -42
  105. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +4 -1
  106. package/src/build-components/OnboardDot/pattern.json +28 -10
  107. package/src/build-components/OnboardFooter/OnboardFooter.tsx +63 -51
  108. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +2 -0
  109. package/src/build-components/OnboardFooter/pattern.json +6 -3
  110. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +2 -0
  111. package/src/build-components/OnboardImage/pattern.json +1 -5
  112. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +2 -0
  113. package/src/build-components/OnboardItem/pattern.json +3 -11
  114. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +2 -0
  115. package/src/build-components/OnboardProvider/pattern.json +2 -8
  116. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +2 -0
  117. package/src/build-components/OnboardSubtitle/pattern.json +1 -4
  118. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +2 -0
  119. package/src/build-components/OnboardTitle/pattern.json +1 -4
  120. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +2 -0
  121. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +2 -0
  122. package/src/build-components/PaywallCloseButton/pattern.json +1 -3
  123. package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +2 -0
  124. package/src/build-components/PaywallCounter/pattern.json +0 -1
  125. package/src/build-components/PaywallOptions/PaywallOptions.tsx +1 -1
  126. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +2 -0
  127. package/src/build-components/PaywallOptions/pattern.json +1 -3
  128. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +2 -0
  129. package/src/build-components/PaywallProvider/pattern.json +1 -3
  130. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +2 -0
  131. package/src/build-components/PaywallSubscribeButton/pattern.json +1 -3
  132. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +2 -0
  133. package/src/build-components/RadioButton/pattern.json +1 -3
  134. package/src/build-components/RenderNode.generated.tsx +1 -1
  135. package/src/build-components/Text/TextProps.generated.ts +2 -0
  136. package/src/build-components/View/View.tsx +11 -7
  137. package/src/build-components/View/ViewProps.generated.ts +2 -0
  138. package/src/build-components/View/pattern.json +8 -0
  139. package/src/build-components/patterns.generated.ts +300 -10
  140. package/src/build-components/useNode.ts +20 -4
  141. package/src/components/Builder.tsx +98 -8
  142. package/src/components/BuilderButton.tsx +39 -7
  143. package/src/components/DeviceButton.tsx +5 -1
  144. package/src/pages/DebugJsonPage.tsx +109 -1
  145. package/src/pages/ProjectDebug.tsx +0 -1
  146. package/src/pages/ProjectPage.tsx +2 -2
  147. package/src/store.ts +8 -0
  148. package/src/styles/base/_global.scss +0 -5
  149. package/src/styles/components/_editor-shell.scss +18 -3
  150. package/src/styles/components/_onboard.scss +0 -17
  151. package/src/styles/foundation/_colors.scss +1 -4
  152. package/src/styles/foundation/_typography.scss +0 -1
  153. package/src/styles/layout/_builder.scss +20 -0
  154. package/src/styles/modals/_product-presets-modal.scss +0 -2
  155. package/src/styles/utilities/_carousel.scss +0 -32
  156. package/src/utils/analyseNodeByPatterns.ts +16 -6
  157. package/src/utils/extractTextStyle/extractTextStyle.ts +47 -13
  158. package/src/utils/extractViewStyle/extractViewStyle.ts +118 -39
  159. package/src/utils/logRenderStore.ts +7 -9
  160. package/src/utils/logger.ts +1 -5
  161. package/src/utils/novaToJson.ts +7 -3
  162. package/src/utils/repairNodeKeys.ts +1 -4
@@ -0,0 +1,353 @@
1
+ {
2
+ "name": "Paywall Notification Offer",
3
+ "version": "1.1.2",
4
+ "type": "paywall",
5
+ "appConfig": {
6
+ "theme": "light",
7
+ "isRtl": false,
8
+ "screenStyle": {
9
+ "light": {
10
+ "backgroundColor": "#F9FBF4",
11
+ "color": "#141A12"
12
+ },
13
+ "dark": {
14
+ "backgroundColor": "#0F140F",
15
+ "color": "#E8F2E4"
16
+ }
17
+ },
18
+ "defaultLanguage": "en"
19
+ },
20
+ "data": {
21
+ "type": "Main",
22
+ "isMain": true,
23
+ "attributes": {
24
+ "useSafeAreaView": true,
25
+ "description": "Main container for Notification Offer.",
26
+ "title": "Main"
27
+ },
28
+ "children": [
29
+ {
30
+ "type": "PaywallProvider",
31
+ "attributes": {
32
+ "scrollable": true,
33
+ "delay": 5000,
34
+ "description": "Paywall provider container.",
35
+ "title": "Main Paywall",
36
+ "styles": {
37
+ "flexDirection": "column",
38
+ "alignItems": "stretch",
39
+ "justifyContent": "flex-start",
40
+ "position": "relative",
41
+ "backgroundColor": "#EAF7E5"
42
+ }
43
+ },
44
+ "children": [
45
+ {
46
+ "type": "PaywallBackground",
47
+ "attributes": {
48
+ "src": "https://images.unsplash.com/photo-1469474968028-56623f02e42e?auto=format&fit=crop&w=1200&q=80",
49
+ "resizeMode": "cover",
50
+ "description": "Paywall background.",
51
+ "title": "Paywall Background"
52
+ },
53
+ "children": null
54
+ },
55
+ {
56
+ "type": "View",
57
+ "attributes": {
58
+ "styles": {
59
+ "paddingTop": 56,
60
+ "paddingHorizontal": 16,
61
+ "paddingBottom": 16,
62
+ "gap": 16,
63
+ "flex": 1
64
+ }
65
+ },
66
+ "children": [
67
+ {
68
+ "type": "PaywallCloseButton",
69
+ "attributes": {
70
+ "styles": {
71
+ "width": 32,
72
+ "height": 32,
73
+ "borderRadius": 16,
74
+ "backgroundColor": "#FFFFFF",
75
+ "color": "#000",
76
+ "zIndex": 10,
77
+ "alignItems": "center",
78
+ "justifyContent": "center"
79
+ }
80
+ },
81
+ "children": null
82
+ },
83
+ {
84
+ "type": "text",
85
+ "attributes": {
86
+ "description": "Title text.",
87
+ "title": "Paywall Title",
88
+ "styles": {
89
+ "color": "#FFFFFF",
90
+ "fontWeight": "700",
91
+ "fontSize": 28,
92
+ "textAlign": "center"
93
+ }
94
+ },
95
+ "children": "Notification Offer"
96
+ },
97
+ {
98
+ "type": "View",
99
+ "attributes": {
100
+ "description": "Benefits container.",
101
+ "title": "Benefits",
102
+ "styles": {
103
+ "flexDirection": "column",
104
+ "gap": 4,
105
+ "marginTop": "12%"
106
+ }
107
+ },
108
+ "children": [
109
+ {
110
+ "type": "View",
111
+ "attributes": {
112
+ "description": "Benefit container #1.",
113
+ "title": "Benefit #1",
114
+ "styles": {
115
+ "flexDirection": "row",
116
+ "alignItems": "center",
117
+ "gap": 8,
118
+ "paddingVertical": 8,
119
+ "paddingHorizontal": 12
120
+ }
121
+ },
122
+ "children": [
123
+ {
124
+ "type": "BIcon",
125
+ "attributes": {
126
+ "iconType": "check",
127
+ "strokeWidth": 3,
128
+ "description": "Icon item.",
129
+ "title": "BIcon 1",
130
+ "styles": {
131
+ "color": "#22c55e",
132
+ "fontSize": "16",
133
+ "flex": 0
134
+ }
135
+ },
136
+ "children": null
137
+ },
138
+ {
139
+ "type": "text",
140
+ "attributes": {
141
+ "description": "Text item.",
142
+ "title": "text 1",
143
+ "styles": {
144
+ "flex": 1,
145
+ "color": "#FFFFFF",
146
+ "fontWeight": "700"
147
+ }
148
+ },
149
+ "children": "@benefit1 — Unlimited access"
150
+ }
151
+ ]
152
+ },
153
+ {
154
+ "type": "View",
155
+ "attributes": {
156
+ "description": "Benefit container #2.",
157
+ "title": "Benefit #2",
158
+ "styles": {
159
+ "flexDirection": "row",
160
+ "alignItems": "center",
161
+ "gap": 8,
162
+ "paddingVertical": 8,
163
+ "paddingHorizontal": 12
164
+ }
165
+ },
166
+ "children": [
167
+ {
168
+ "type": "BIcon",
169
+ "attributes": {
170
+ "iconType": "check",
171
+ "strokeWidth": 3,
172
+ "description": "Icon item.",
173
+ "title": "BIcon 2",
174
+ "styles": {
175
+ "color": "#22c55e",
176
+ "fontSize": "16",
177
+ "flex": 0
178
+ }
179
+ },
180
+ "children": null
181
+ },
182
+ {
183
+ "type": "text",
184
+ "attributes": {
185
+ "description": "Text item.",
186
+ "title": "text 2",
187
+ "styles": {
188
+ "flex": 1,
189
+ "color": "#FFFFFF",
190
+ "fontWeight": "700"
191
+ }
192
+ },
193
+ "children": "@benefit2 — 7-day free trial"
194
+ }
195
+ ]
196
+ },
197
+ {
198
+ "type": "View",
199
+ "attributes": {
200
+ "description": "Benefit container #3.",
201
+ "title": "Benefit #3",
202
+ "styles": {
203
+ "flexDirection": "row",
204
+ "alignItems": "center",
205
+ "gap": 8,
206
+ "paddingVertical": 8,
207
+ "paddingHorizontal": 12
208
+ }
209
+ },
210
+ "children": [
211
+ {
212
+ "type": "BIcon",
213
+ "attributes": {
214
+ "iconType": "check",
215
+ "strokeWidth": 3,
216
+ "description": "Icon item.",
217
+ "title": "BIcon 3",
218
+ "styles": {
219
+ "color": "#22c55e",
220
+ "fontSize": "16",
221
+ "flex": 0
222
+ }
223
+ },
224
+ "children": null
225
+ },
226
+ {
227
+ "type": "text",
228
+ "attributes": {
229
+ "description": "Text item.",
230
+ "title": "text 3",
231
+ "styles": {
232
+ "flex": 1,
233
+ "color": "#FFFFFF",
234
+ "fontWeight": "700"
235
+ }
236
+ },
237
+ "children": "@benefit3 — Cancel anytime"
238
+ }
239
+ ]
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "type": "PaywallOptions",
245
+ "attributes": {
246
+ "description": "Subscription options area.",
247
+ "title": "Option(s)",
248
+ "styles": {
249
+ "borderRadius": 12,
250
+ "backgroundColor": "#FFFFFF"
251
+ }
252
+ },
253
+ "children": [
254
+ {
255
+ "type": "RadioButton",
256
+ "attributes": {
257
+ "description": "Radio item.",
258
+ "title": "Product Radio(s)",
259
+ "styles": {
260
+ "flex": 1
261
+ }
262
+ },
263
+ "children": null
264
+ },
265
+ {
266
+ "type": "text",
267
+ "attributes": {
268
+ "description": "Product description.",
269
+ "title": "Product Desc(s)",
270
+ "styles": {
271
+ "flex": 4,
272
+ "color": "#000"
273
+ }
274
+ },
275
+ "children": "@productDescription — Unlock all premium features for a month."
276
+ },
277
+ {
278
+ "type": "text",
279
+ "attributes": {
280
+ "description": "Product price.",
281
+ "title": "Product Price(s)",
282
+ "styles": {
283
+ "flex": 1,
284
+ "textAlign": "right",
285
+ "color": "#000"
286
+ }
287
+ },
288
+ "children": "@localizedPrice"
289
+ },
290
+ {
291
+ "type": "BIcon",
292
+ "attributes": {
293
+ "iconType": "chevron-right",
294
+ "size": 16,
295
+ "description": "Chevron icon.",
296
+ "title": "Product BIcon(s)",
297
+ "styles": {
298
+ "marginRight": 4,
299
+ "flex": 0,
300
+ "width": 32,
301
+ "color": "#000"
302
+ }
303
+ },
304
+ "children": null
305
+ }
306
+ ]
307
+ },
308
+ {
309
+ "type": "CountDown",
310
+ "attributes": {
311
+ "count": 5000,
312
+ "description": "Countdown timer (5 seconds).",
313
+ "title": "Countdown",
314
+ "styles": {
315
+ "color": "#FF0000",
316
+ "fontWeight": "700",
317
+ "fontSize": 40,
318
+ "textAlign": "center"
319
+ }
320
+ },
321
+ "children": null
322
+ },
323
+ {
324
+ "type": "View",
325
+ "attributes": {
326
+ "description": "Subscribe button container.",
327
+ "title": "Subs Container",
328
+ "styles": {
329
+ "flex": 1,
330
+ "flexDirection": "column",
331
+ "justifyContent": "flex-end",
332
+ "alignItems": "stretch",
333
+ "paddingBottom": "50px"
334
+ }
335
+ },
336
+ "children": [
337
+ {
338
+ "type": "PaywallSubscribeButton",
339
+ "children": "Subscribe Now",
340
+ "attributes": {
341
+ "description": "Subscription confirm button.",
342
+ "title": "Subscribe"
343
+ }
344
+ }
345
+ ]
346
+ }
347
+ ]
348
+ }
349
+ ]
350
+ }
351
+ ]
352
+ }
353
+ }
@@ -20,43 +20,43 @@
20
20
  "data": {
21
21
  "type": "View",
22
22
  "attributes": {
23
- "style": {
23
+ "scrollable": true,
24
+ "description": "View element 1 in sample.",
25
+ "title": "View 1",
26
+ "styles": {
24
27
  "flexDirection": "column",
25
28
  "alignItems": "center",
26
29
  "justifyContent": "center",
27
30
  "gap": 12,
28
31
  "padding": 16,
29
32
  "backgroundColor": "#F5F7FA"
30
- },
31
- "scrollable": true,
32
- "description": "View element 1 in sample.",
33
- "title": "View 1"
33
+ }
34
34
  },
35
35
  "children": [
36
36
  {
37
37
  "type": "Text",
38
38
  "children": "Hello, world!",
39
39
  "attributes": {
40
- "style": {
40
+ "description": "Text element 1 in sample.",
41
+ "title": "Text 1",
42
+ "styles": {
41
43
  "color": "#111827",
42
44
  "fontSize": 24,
43
45
  "fontWeight": "600"
44
- },
45
- "description": "Text element 1 in sample.",
46
- "title": "Text 1"
46
+ }
47
47
  }
48
48
  },
49
49
  {
50
50
  "type": "Text",
51
51
  "children": "Welcome to react-native-builder",
52
52
  "attributes": {
53
- "style": {
53
+ "description": "Text element 2 in sample.",
54
+ "title": "Text 2",
55
+ "styles": {
54
56
  "color": "#6B7280",
55
57
  "fontSize": 14,
56
58
  "fontWeight": "400"
57
- },
58
- "description": "Text element 2 in sample.",
59
- "title": "Text 2"
59
+ }
60
60
  }
61
61
  }
62
62
  ]