@developer_tribe/react-builder 1.2.39 → 1.2.41

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 (93) hide show
  1. package/dist/attributes-editor/FallbackLocalizationField.d.ts +6 -0
  2. package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -40
  3. package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
  4. package/dist/build-components/patterns.generated.d.ts +21 -344
  5. package/dist/components/BuilderProvider.d.ts +1 -0
  6. package/dist/components/DeviceButton.d.ts +4 -1
  7. package/dist/index.cjs.js +1 -1
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.esm.js +1 -1
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.web.cjs.js +4 -4
  12. package/dist/index.web.cjs.js.map +1 -1
  13. package/dist/index.web.d.ts +8 -0
  14. package/dist/index.web.esm.js +4 -4
  15. package/dist/index.web.esm.js.map +1 -1
  16. package/dist/mockOS/context/MockOSContext.d.ts +3 -1
  17. package/dist/product-base/types.d.ts +3 -0
  18. package/dist/size-matters/index.d.ts +1 -1
  19. package/dist/store.d.ts +31 -0
  20. package/dist/styles.css +1 -1
  21. package/dist/types/Device.d.ts +5 -0
  22. package/dist/types/PreviewConfig.d.ts +1 -1
  23. package/dist/utils/extractTextStyle/extractTextStyle.d.ts +1 -0
  24. package/dist/utils/extractViewStyle/extractViewStyle.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/scripts/prebuild/assets/prompt_scheme.md +7 -0
  27. package/scripts/public/bin.js +0 -0
  28. package/src/DeviceMockFrame.tsx +8 -0
  29. package/src/RenderPage.tsx +3 -0
  30. package/src/assets/devices.json +747 -183
  31. package/src/assets/meta.json +1 -1
  32. package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
  33. package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
  34. package/src/assets/samples/carousel-sample.json +30 -26
  35. package/src/assets/samples/paywall-1.json +31 -31
  36. package/src/assets/samples/paywall-2.json +28 -28
  37. package/src/assets/samples/paywall-app-delete-offer.json +29 -29
  38. package/src/assets/samples/paywall-app-open-offer.json +29 -29
  39. package/src/assets/samples/paywall-back-offer.json +28 -28
  40. package/src/assets/samples/paywall-notification-offer.json +28 -28
  41. package/src/assets/samples/simple-1.json +4 -4
  42. package/src/assets/samples/simple-2.json +25 -25
  43. package/src/assets/samples/unmigrated-builder-1.1.1.json +7 -7
  44. package/src/assets/samples/unmigrated-builder1.json +4 -4
  45. package/src/assets/samples/unvalidated-builder1.json +4 -4
  46. package/src/assets/samples/unvalidated-crash1.json +2 -2
  47. package/src/assets/samples/unvalidated-crashcomponent1.json +2 -2
  48. package/src/assets/samples/vpn-onboard-1.json +30 -30
  49. package/src/assets/samples/vpn-onboard-2.json +30 -30
  50. package/src/assets/samples/vpn-onboard-3.json +27 -27
  51. package/src/assets/samples/vpn-onboard-4.json +27 -27
  52. package/src/assets/samples/vpn-onboard-5.json +40 -40
  53. package/src/assets/samples/vpn-onboard-6.json +30 -30
  54. package/src/assets/samples/vpn-onboard-7.json +29 -29
  55. package/src/attribute-analyser/style/web/useExtractImageStyle.ts +8 -3
  56. package/src/attribute-analyser/style/web/useExtractViewStyle.ts +8 -3
  57. package/src/attributes-editor/AttributesEditorView.tsx +17 -6
  58. package/src/attributes-editor/FallbackLocalizationField.tsx +384 -0
  59. package/src/build-components/CarouselDots/CarouselDots.tsx +8 -3
  60. package/src/build-components/Main/Main.tsx +3 -1
  61. package/src/build-components/NavigationBarColor/NavigationBarColor.tsx +15 -1
  62. package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -52
  63. package/src/build-components/NavigationBarColor/pattern.json +11 -2
  64. package/src/build-components/OnboardDot/OnboardDot.tsx +3 -2
  65. package/src/build-components/PaywallCloseButton/pattern.json +1 -0
  66. package/src/build-components/StatusBarColor/StatusBarColor.tsx +15 -1
  67. package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
  68. package/src/build-components/StatusBarColor/pattern.json +10 -1
  69. package/src/build-components/patterns.generated.ts +25 -364
  70. package/src/components/BottomBar.tsx +135 -31
  71. package/src/components/BuilderProvider.tsx +1 -0
  72. package/src/components/DeviceButton.tsx +35 -0
  73. package/src/components/EditorHeader.tsx +16 -1
  74. package/src/hooks/useLocalize.ts +3 -1
  75. package/src/hooks/useSafeAreaViewStyle.ts +24 -4
  76. package/src/index.web.ts +19 -0
  77. package/src/mockOS/context/MockOSContext.tsx +41 -13
  78. package/src/modals/DeviceSelectorModal.tsx +94 -10
  79. package/src/modals/InspectModal.tsx +112 -4
  80. package/src/product-base/buildPaywallLocalizationParams.ts +3 -0
  81. package/src/product-base/extractAndroidParams.ts +38 -8
  82. package/src/product-base/types.ts +3 -0
  83. package/src/size-matters/index.ts +15 -9
  84. package/src/store.ts +66 -0
  85. package/src/styles/modals/_product-edit-modal.scss +2 -2
  86. package/src/types/Device.ts +5 -0
  87. package/src/types/PreviewConfig.ts +6 -0
  88. package/src/utils/analyseNodeByPatterns.ts +6 -2
  89. package/src/utils/extractTextStyle/extractTextStyle.ts +3 -1
  90. package/src/utils/extractTextStyle/extractTextStyleNative.ts +1 -1
  91. package/src/utils/extractViewStyle/extractViewStyle.ts +19 -5
  92. package/src/utils/extractViewStyle/extractViewStyleNative.ts +5 -1
  93. package/src/utils/replaceLocalizationParams.ts +5 -7
@@ -11,7 +11,7 @@
11
11
  "minHeight": "100vh",
12
12
  "padding": "24px"
13
13
  },
14
- "testID": "Main-test-id"
14
+ "testID": "Main-test-id-1"
15
15
  },
16
16
  "children": {
17
17
  "type": "carouselProvider",
@@ -24,7 +24,7 @@
24
24
  "dragFree": true,
25
25
  "description": "carousel element 1 in sample.",
26
26
  "title": "carousel 1",
27
- "testID": "carousel-test-id"
27
+ "testID": "carousel-test-id-1"
28
28
  },
29
29
  "children": [
30
30
  {
@@ -35,7 +35,7 @@
35
35
  "styles": {
36
36
  "minWidth": 0
37
37
  },
38
- "testID": "carouselItem-test-id"
38
+ "testID": "carouselItem-test-id-1"
39
39
  },
40
40
  "children": {
41
41
  "type": "view",
@@ -50,7 +50,7 @@
50
50
  "gap": 14,
51
51
  "height": "100%"
52
52
  },
53
- "testID": "view-test-id"
53
+ "testID": "view-test-id-1"
54
54
  },
55
55
  "children": [
56
56
  {
@@ -63,7 +63,7 @@
63
63
  "maxWidth": "100%",
64
64
  "borderRadius": 14
65
65
  },
66
- "testID": "image-test-id"
66
+ "testID": "image-test-id-1"
67
67
  },
68
68
  "key": "image-49ojfyhl4d7"
69
69
  },
@@ -78,7 +78,7 @@
78
78
  "textAlign": "center",
79
79
  "color": "#0f172a"
80
80
  },
81
- "testID": "text-test-id"
81
+ "testID": "text-test-id-1"
82
82
  },
83
83
  "children": "Welcome aboard",
84
84
  "key": "text-3ougfj4mxnh"
@@ -94,7 +94,7 @@
94
94
  "color": "#334155",
95
95
  "paddingHorizontal": 8
96
96
  },
97
- "testID": "text-test-id"
97
+ "testID": "text-test-id-2"
98
98
  },
99
99
  "children": "Swipe through a beautiful, validated carousel sample with images.",
100
100
  "key": "text-2dol8grshke"
@@ -112,7 +112,7 @@
112
112
  "styles": {
113
113
  "minWidth": 0
114
114
  },
115
- "testID": "carouselItem-test-id"
115
+ "testID": "carouselItem-test-id-2"
116
116
  },
117
117
  "children": {
118
118
  "type": "view",
@@ -127,7 +127,7 @@
127
127
  "gap": 14,
128
128
  "height": "100%"
129
129
  },
130
- "testID": "view-test-id"
130
+ "testID": "view-test-id-2"
131
131
  },
132
132
  "children": [
133
133
  {
@@ -140,7 +140,7 @@
140
140
  "maxWidth": "100%",
141
141
  "borderRadius": 14
142
142
  },
143
- "testID": "image-test-id"
143
+ "testID": "image-test-id-2"
144
144
  },
145
145
  "key": "image-riwntk91k9"
146
146
  },
@@ -155,7 +155,7 @@
155
155
  "textAlign": "center",
156
156
  "color": "#0f172a"
157
157
  },
158
- "testID": "text-test-id"
158
+ "testID": "text-test-id-3"
159
159
  },
160
160
  "children": "Discover features",
161
161
  "key": "text-hmuk6f7ml4v"
@@ -171,7 +171,7 @@
171
171
  "color": "#334155",
172
172
  "paddingHorizontal": 8
173
173
  },
174
- "testID": "text-test-id"
174
+ "testID": "text-test-id-4"
175
175
  },
176
176
  "children": "Dots + buttons are included, and slide sizing comes from the carousel CSS.",
177
177
  "key": "text-dnhhoqiiri"
@@ -189,7 +189,7 @@
189
189
  "styles": {
190
190
  "minWidth": 0
191
191
  },
192
- "testID": "carouselItem-test-id"
192
+ "testID": "carouselItem-test-id-3"
193
193
  },
194
194
  "children": {
195
195
  "type": "view",
@@ -204,7 +204,7 @@
204
204
  "gap": 14,
205
205
  "height": "100%"
206
206
  },
207
- "testID": "view-test-id"
207
+ "testID": "view-test-id-3"
208
208
  },
209
209
  "children": [
210
210
  {
@@ -217,7 +217,7 @@
217
217
  "maxWidth": "100%",
218
218
  "borderRadius": 14
219
219
  },
220
- "testID": "image-test-id"
220
+ "testID": "image-test-id-3"
221
221
  },
222
222
  "key": "image-j9ru3r8g7km"
223
223
  },
@@ -232,7 +232,7 @@
232
232
  "textAlign": "center",
233
233
  "color": "#0f172a"
234
234
  },
235
- "testID": "text-test-id"
235
+ "testID": "text-test-id-5"
236
236
  },
237
237
  "children": "Get started",
238
238
  "key": "text-01u3fwwtkd8p"
@@ -248,7 +248,7 @@
248
248
  "color": "#334155",
249
249
  "paddingHorizontal": 8
250
250
  },
251
- "testID": "text-test-id"
251
+ "testID": "text-test-id-6"
252
252
  },
253
253
  "children": "This sample stays within validation rules (no string flex shorthand).",
254
254
  "key": "text-w8rwg9y1hj"
@@ -272,14 +272,14 @@
272
272
  "alignItems": "center",
273
273
  "paddingTop": 32
274
274
  },
275
- "testID": "view-test-id"
275
+ "testID": "view-test-id-4"
276
276
  },
277
277
  "children": [
278
278
  {
279
279
  "type": "carouselDots",
280
280
  "attributes": {
281
281
  "dotType": "expanding_dot",
282
- "testID": "carouselDots-test-id"
282
+ "testID": "carouselDots-test-id-1"
283
283
  },
284
284
  "key": "carouselDots-r5ji67uoxxg"
285
285
  },
@@ -294,34 +294,38 @@
294
294
  "alignItems": "center",
295
295
  "justifyContent": "center"
296
296
  },
297
- "testID": "view-test-id"
297
+ "testID": "view-test-id-5"
298
298
  },
299
299
  "children": [
300
300
  {
301
301
  "type": "carouselButtons",
302
302
  "attributes": {
303
- "buttonType": ["previous_button"],
303
+ "buttonType": [
304
+ "previous_button"
305
+ ],
304
306
  "styles": {
305
307
  "backgroundColor": "#6366f1",
306
308
  "borderRadius": 12,
307
309
  "padding": "12px 24px",
308
310
  "minWidth": 100
309
311
  },
310
- "testID": "carouselButtons-test-id"
312
+ "testID": "carouselButtons-test-id-1"
311
313
  },
312
314
  "key": "carouselButtons-prev"
313
315
  },
314
316
  {
315
317
  "type": "carouselButtons",
316
318
  "attributes": {
317
- "buttonType": ["next_button"],
319
+ "buttonType": [
320
+ "next_button"
321
+ ],
318
322
  "styles": {
319
323
  "backgroundColor": "#8b5cf6",
320
324
  "borderRadius": 12,
321
325
  "padding": "12px 24px",
322
326
  "minWidth": 100
323
327
  },
324
- "testID": "carouselButtons-test-id"
328
+ "testID": "carouselButtons-test-id-2"
325
329
  },
326
330
  "key": "carouselButtons-next"
327
331
  }
@@ -343,13 +347,13 @@
343
347
  "maxWidth": "600px",
344
348
  "margin": "0 auto"
345
349
  },
346
- "testID": "carouselProvider-test-id"
350
+ "testID": "carouselProvider-test-id-1"
347
351
  },
348
352
  "key": "carouselProvider-152n4dkqvam"
349
353
  },
350
354
  "key": "Main-u1cavjag9sr"
351
355
  },
352
356
  "attributes": {
353
- "testID": "other-test-id"
357
+ "testID": "other-test-id-1"
354
358
  }
355
359
  }
@@ -9,7 +9,7 @@
9
9
  "useSafeAreaView": true,
10
10
  "description": "Ekranın ana kapsayıcısı. (#1)",
11
11
  "title": "Main",
12
- "testID": "Main-test-id"
12
+ "testID": "Main-test-id-1"
13
13
  },
14
14
  "children": [
15
15
  {
@@ -20,7 +20,7 @@
20
20
  "styles": {
21
21
  "backgroundColor": "THEME_COLORS.BACKGROUND"
22
22
  },
23
- "testID": "StatusBarColor-test-id"
23
+ "testID": "StatusBarColor-test-id-1"
24
24
  },
25
25
  "children": null
26
26
  },
@@ -32,7 +32,7 @@
32
32
  "styles": {
33
33
  "backgroundColor": "THEME_COLORS.BACKGROUND"
34
34
  },
35
- "testID": "NavigationBarColor-test-id"
35
+ "testID": "NavigationBarColor-test-id-1"
36
36
  },
37
37
  "children": null
38
38
  },
@@ -49,7 +49,7 @@
49
49
  "position": "relative",
50
50
  "backgroundColor": "THEME_COLORS.BACKGROUND"
51
51
  },
52
- "testID": "PaywallProvider-test-id"
52
+ "testID": "PaywallProvider-test-id-1"
53
53
  },
54
54
  "children": [
55
55
  {
@@ -60,7 +60,7 @@
60
60
  "resizeMode": "cover",
61
61
  "description": "Paywall arka planı. (#1)",
62
62
  "title": "Paywall Background",
63
- "testID": "PaywallBackground-test-id"
63
+ "testID": "PaywallBackground-test-id-1"
64
64
  },
65
65
  "children": null
66
66
  },
@@ -75,7 +75,7 @@
75
75
  "gap": 12,
76
76
  "flex": 1
77
77
  },
78
- "testID": "View-test-id"
78
+ "testID": "View-test-id-1"
79
79
  },
80
80
  "children": [
81
81
  {
@@ -91,7 +91,7 @@
91
91
  "alignItems": "center",
92
92
  "justifyContent": "center"
93
93
  },
94
- "testID": "PaywallCloseButton-test-id"
94
+ "testID": "PaywallCloseButton-test-id-1"
95
95
  },
96
96
  "children": null
97
97
  },
@@ -105,7 +105,7 @@
105
105
  "gap": 0,
106
106
  "marginTop": "4%"
107
107
  },
108
- "testID": "View-test-id"
108
+ "testID": "View-test-id-2"
109
109
  },
110
110
  "children": [
111
111
  {
@@ -120,7 +120,7 @@
120
120
  "paddingVertical": 8,
121
121
  "paddingHorizontal": 12
122
122
  },
123
- "testID": "View-test-id"
123
+ "testID": "View-test-id-3"
124
124
  },
125
125
  "children": [
126
126
  {
@@ -135,7 +135,7 @@
135
135
  "fontSize": "16",
136
136
  "flex": 0
137
137
  },
138
- "testID": "BIcon-test-id"
138
+ "testID": "BIcon-test-id-1"
139
139
  },
140
140
  "children": null
141
141
  },
@@ -149,7 +149,7 @@
149
149
  "color": "STATIC_COLORS.WHITE",
150
150
  "fontWeight": "700"
151
151
  },
152
- "testID": "Text-test-id"
152
+ "testID": "Text-test-id-1"
153
153
  },
154
154
  "children": "@benefit1 — Unlimited access"
155
155
  }
@@ -167,7 +167,7 @@
167
167
  "paddingVertical": 8,
168
168
  "paddingHorizontal": 12
169
169
  },
170
- "testID": "View-test-id"
170
+ "testID": "View-test-id-4"
171
171
  },
172
172
  "children": [
173
173
  {
@@ -182,7 +182,7 @@
182
182
  "fontSize": "16",
183
183
  "flex": 0
184
184
  },
185
- "testID": "BIcon-test-id"
185
+ "testID": "BIcon-test-id-2"
186
186
  },
187
187
  "children": null
188
188
  },
@@ -196,7 +196,7 @@
196
196
  "color": "STATIC_COLORS.WHITE",
197
197
  "fontWeight": "700"
198
198
  },
199
- "testID": "Text-test-id"
199
+ "testID": "Text-test-id-2"
200
200
  },
201
201
  "children": "@benefit2 — 7-day free trial"
202
202
  }
@@ -214,7 +214,7 @@
214
214
  "paddingVertical": 8,
215
215
  "paddingHorizontal": 12
216
216
  },
217
- "testID": "View-test-id"
217
+ "testID": "View-test-id-5"
218
218
  },
219
219
  "children": [
220
220
  {
@@ -229,7 +229,7 @@
229
229
  "fontSize": "16",
230
230
  "flex": 0
231
231
  },
232
- "testID": "BIcon-test-id"
232
+ "testID": "BIcon-test-id-3"
233
233
  },
234
234
  "children": null
235
235
  },
@@ -243,7 +243,7 @@
243
243
  "color": "STATIC_COLORS.WHITE",
244
244
  "fontWeight": "700"
245
245
  },
246
- "testID": "Text-test-id"
246
+ "testID": "Text-test-id-3"
247
247
  },
248
248
  "children": "@benefit3 — Cancel anytime"
249
249
  }
@@ -260,7 +260,7 @@
260
260
  "borderRadius": 12,
261
261
  "backgroundColor": "THEME_COLORS.BACKGROUND"
262
262
  },
263
- "testID": "PaywallOptions-test-id"
263
+ "testID": "PaywallOptions-test-id-1"
264
264
  },
265
265
  "children": [
266
266
  {
@@ -271,7 +271,7 @@
271
271
  "styles": {
272
272
  "flex": 1
273
273
  },
274
- "testID": "RadioButton-test-id"
274
+ "testID": "RadioButton-test-id-1"
275
275
  },
276
276
  "children": null
277
277
  },
@@ -283,7 +283,7 @@
283
283
  "styles": {
284
284
  "flex": 4
285
285
  },
286
- "testID": "Text-test-id"
286
+ "testID": "Text-test-id-4"
287
287
  },
288
288
  "children": "@productDescription"
289
289
  },
@@ -296,7 +296,7 @@
296
296
  "flex": 1,
297
297
  "alignItems": "flex-end"
298
298
  },
299
- "testID": "View-test-id"
299
+ "testID": "View-test-id-6"
300
300
  },
301
301
  "children": [
302
302
  {
@@ -307,7 +307,7 @@
307
307
  "textAlign": "right",
308
308
  "fontWeight": "700"
309
309
  },
310
- "testID": "PriceTag-test-id"
310
+ "testID": "PriceTag-test-id-1"
311
311
  },
312
312
  "children": "@localizedCalculatedPrice"
313
313
  },
@@ -323,7 +323,7 @@
323
323
  "fontWeight": "400",
324
324
  "color": "#999999"
325
325
  },
326
- "testID": "PriceTag-test-id"
326
+ "testID": "PriceTag-test-id-2"
327
327
  },
328
328
  "children": "@localizedPrice"
329
329
  }
@@ -342,7 +342,7 @@
342
342
  "width": 32,
343
343
  "color": "STATIC_COLORS.BLACK"
344
344
  },
345
- "testID": "BIcon-test-id"
345
+ "testID": "BIcon-test-id-4"
346
346
  },
347
347
  "children": null
348
348
  }
@@ -361,7 +361,7 @@
361
361
  "gap": 8,
362
362
  "paddingBottom": "50px"
363
363
  },
364
- "testID": "View-test-id"
364
+ "testID": "View-test-id-7"
365
365
  },
366
366
  "children": [
367
367
  {
@@ -369,7 +369,7 @@
369
369
  "attributes": {
370
370
  "description": "Pricing breakdown for promo/trial.",
371
371
  "title": "Pricing Detail",
372
- "testID": "Pricing-test-id"
372
+ "testID": "Pricing-test-id-1"
373
373
  },
374
374
  "children": "@baseLocalizedPricingText"
375
375
  },
@@ -383,17 +383,17 @@
383
383
  "fontSize": 12,
384
384
  "color": "rgba(255,255,255,0.6)"
385
385
  },
386
- "testID": "Text-test-id"
386
+ "testID": "Text-test-id-5"
387
387
  },
388
388
  "children": "@trialPeriod days free, then @price/@period"
389
389
  },
390
390
  {
391
391
  "type": "PaywallSubscribeButton",
392
- "children": "Subscribe",
392
+ "children": "@subscribe",
393
393
  "attributes": {
394
394
  "description": "Abonelik onay butonu. (#1)",
395
395
  "title": "Subscribe",
396
- "testID": "PaywallSubscribeButton-test-id"
396
+ "testID": "PaywallSubscribeButton-test-id-1"
397
397
  }
398
398
  },
399
399
  {
@@ -401,7 +401,7 @@
401
401
  "attributes": {
402
402
  "description": "Discount badge / promo text.",
403
403
  "title": "Promo Badge",
404
- "testID": "Promo-test-id"
404
+ "testID": "Promo-test-id-1"
405
405
  },
406
406
  "children": "@baseLocalizedPromoText"
407
407
  }
@@ -414,6 +414,6 @@
414
414
  ]
415
415
  },
416
416
  "attributes": {
417
- "testID": "paywall-test-id"
417
+ "testID": "paywall-test-id-1"
418
418
  }
419
419
  }