@developer_tribe/react-builder 1.2.38 → 1.2.40

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 (134) hide show
  1. package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -1
  2. package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -1
  3. package/dist/build-components/Image/ImageProps.generated.d.ts +2 -0
  4. package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -40
  5. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -1
  6. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +3 -1
  7. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -1
  8. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -1
  9. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -1
  10. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -1
  11. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -1
  12. package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -1
  13. package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -1
  14. package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -1
  15. package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
  16. package/dist/build-components/patterns.generated.d.ts +51 -356
  17. package/dist/components/BuilderProvider.d.ts +1 -0
  18. package/dist/components/DeviceButton.d.ts +4 -1
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.cjs.js.map +1 -1
  21. package/dist/index.esm.js +1 -1
  22. package/dist/index.esm.js.map +1 -1
  23. package/dist/index.web.cjs.js +4 -4
  24. package/dist/index.web.cjs.js.map +1 -1
  25. package/dist/index.web.esm.js +4 -4
  26. package/dist/index.web.esm.js.map +1 -1
  27. package/dist/mockOS/context/MockOSContext.d.ts +3 -1
  28. package/dist/size-matters/index.d.ts +1 -1
  29. package/dist/store.d.ts +6 -0
  30. package/dist/styles.css +1 -1
  31. package/dist/types/Device.d.ts +5 -0
  32. package/dist/utils/extractTextStyle/extractTextStyle.d.ts +1 -0
  33. package/dist/utils/extractViewStyle/extractViewStyle.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/scripts/prebuild/assets/prompt_scheme.md +7 -0
  36. package/src/DeviceMockFrame.tsx +8 -0
  37. package/src/RenderPage.tsx +3 -0
  38. package/src/assets/devices.json +747 -183
  39. package/src/assets/meta.json +1 -1
  40. package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
  41. package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
  42. package/src/assets/samples/carousel-sample.json +30 -26
  43. package/src/assets/samples/paywall-1.json +30 -30
  44. package/src/assets/samples/paywall-2.json +26 -26
  45. package/src/assets/samples/paywall-app-delete-offer.json +27 -27
  46. package/src/assets/samples/paywall-app-open-offer.json +27 -27
  47. package/src/assets/samples/paywall-back-offer.json +27 -27
  48. package/src/assets/samples/paywall-notification-offer.json +27 -27
  49. package/src/assets/samples/simple-1.json +4 -4
  50. package/src/assets/samples/simple-2.json +25 -25
  51. package/src/assets/samples/unmigrated-builder-1.1.1.json +7 -7
  52. package/src/assets/samples/unmigrated-builder1.json +4 -4
  53. package/src/assets/samples/unvalidated-builder1.json +4 -4
  54. package/src/assets/samples/unvalidated-crash1.json +2 -2
  55. package/src/assets/samples/unvalidated-crashcomponent1.json +2 -2
  56. package/src/assets/samples/vpn-onboard-1.json +34 -30
  57. package/src/assets/samples/vpn-onboard-2.json +34 -30
  58. package/src/assets/samples/vpn-onboard-3.json +28 -27
  59. package/src/assets/samples/vpn-onboard-4.json +28 -27
  60. package/src/assets/samples/vpn-onboard-5.json +46 -40
  61. package/src/assets/samples/vpn-onboard-6.json +34 -30
  62. package/src/assets/samples/vpn-onboard-7.json +33 -29
  63. package/src/attribute-analyser/style/web/useExtractImageStyle.ts +8 -3
  64. package/src/attribute-analyser/style/web/useExtractViewStyle.ts +8 -3
  65. package/src/build-components/BIcon/BIconProps.generated.ts +1 -1
  66. package/src/build-components/BIcon/pattern.json +1 -2
  67. package/src/build-components/BackgroundImage/pattern.json +1 -2
  68. package/src/build-components/Button/pattern.json +1 -2
  69. package/src/build-components/Carousel/pattern.json +1 -2
  70. package/src/build-components/CarouselButtons/pattern.json +1 -2
  71. package/src/build-components/CarouselDots/CarouselDots.tsx +8 -3
  72. package/src/build-components/CarouselDots/pattern.json +1 -2
  73. package/src/build-components/CarouselItem/pattern.json +1 -4
  74. package/src/build-components/CarouselProvider/pattern.json +0 -3
  75. package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
  76. package/src/build-components/CountDown/pattern.json +1 -2
  77. package/src/build-components/Image/ImageProps.generated.ts +6 -0
  78. package/src/build-components/Image/pattern.json +10 -2
  79. package/src/build-components/Main/Main.tsx +3 -1
  80. package/src/build-components/Main/pattern.json +1 -2
  81. package/src/build-components/NavigationBarColor/NavigationBarColor.tsx +15 -1
  82. package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -52
  83. package/src/build-components/NavigationBarColor/pattern.json +10 -2
  84. package/src/build-components/Onboard/pattern.json +1 -4
  85. package/src/build-components/OnboardButtons/pattern.json +1 -2
  86. package/src/build-components/OnboardDot/OnboardDot.tsx +3 -2
  87. package/src/build-components/OnboardDot/pattern.json +1 -2
  88. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -1
  89. package/src/build-components/OnboardFooter/pattern.json +1 -2
  90. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +7 -1
  91. package/src/build-components/OnboardImage/pattern.json +1 -2
  92. package/src/build-components/OnboardItem/pattern.json +1 -2
  93. package/src/build-components/OnboardProvider/pattern.json +1 -2
  94. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -1
  95. package/src/build-components/OnboardSubtitle/pattern.json +1 -4
  96. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -1
  97. package/src/build-components/OnboardTitle/pattern.json +1 -4
  98. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
  99. package/src/build-components/PaywallBackground/pattern.json +0 -3
  100. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -1
  101. package/src/build-components/PaywallCloseButton/pattern.json +2 -4
  102. package/src/build-components/PaywallOptions/pattern.json +1 -4
  103. package/src/build-components/PaywallProvider/pattern.json +1 -2
  104. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -1
  105. package/src/build-components/PaywallSubscribeButton/pattern.json +1 -4
  106. package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -1
  107. package/src/build-components/PriceTag/pattern.json +1 -2
  108. package/src/build-components/Pricing/PricingProps.generated.ts +1 -1
  109. package/src/build-components/Pricing/pattern.json +1 -4
  110. package/src/build-components/Promo/PromoProps.generated.ts +1 -1
  111. package/src/build-components/Promo/pattern.json +1 -4
  112. package/src/build-components/RadioButton/pattern.json +1 -2
  113. package/src/build-components/StatusBarColor/StatusBarColor.tsx +15 -1
  114. package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
  115. package/src/build-components/StatusBarColor/pattern.json +10 -1
  116. package/src/build-components/Text/pattern.json +1 -2
  117. package/src/build-components/patterns.generated.ts +57 -376
  118. package/src/components/BuilderProvider.tsx +1 -0
  119. package/src/components/DeviceButton.tsx +35 -0
  120. package/src/components/EditorHeader.tsx +16 -1
  121. package/src/hooks/useSafeAreaViewStyle.ts +24 -4
  122. package/src/mockOS/context/MockOSContext.tsx +41 -13
  123. package/src/modals/DeviceSelectorModal.tsx +94 -10
  124. package/src/product-base/extractAndroidParams.ts +38 -8
  125. package/src/size-matters/index.ts +15 -9
  126. package/src/store.ts +27 -0
  127. package/src/styles/modals/_product-edit-modal.scss +2 -2
  128. package/src/types/Device.ts +5 -0
  129. package/src/utils/analyseNodeByPatterns.ts +6 -2
  130. package/src/utils/extractTextStyle/extractTextStyle.ts +3 -1
  131. package/src/utils/extractTextStyle/extractTextStyleNative.ts +1 -1
  132. package/src/utils/extractViewStyle/extractViewStyle.ts +19 -5
  133. package/src/utils/extractViewStyle/extractViewStyleNative.ts +5 -1
  134. package/src/utils/replaceLocalizationParams.ts +5 -7
@@ -13,7 +13,7 @@
13
13
  "styles": {
14
14
  "paddingBottom": 16
15
15
  },
16
- "testID": "Main-test-id"
16
+ "testID": "Main-test-id-1"
17
17
  },
18
18
  "children": [
19
19
  {
@@ -24,7 +24,7 @@
24
24
  "styles": {
25
25
  "backgroundColor": "THEME_COLORS.BACKGROUND"
26
26
  },
27
- "testID": "StatusBarColor-test-id"
27
+ "testID": "StatusBarColor-test-id-1"
28
28
  },
29
29
  "children": null,
30
30
  "key": "StatusBarColor-sxj19suwkrn"
@@ -37,7 +37,7 @@
37
37
  "styles": {
38
38
  "backgroundColor": "THEME_COLORS.BACKGROUND"
39
39
  },
40
- "testID": "NavigationBarColor-test-id"
40
+ "testID": "NavigationBarColor-test-id-1"
41
41
  },
42
42
  "children": null,
43
43
  "key": "NavigationBarColor-rhzn570dc5o"
@@ -63,7 +63,7 @@
63
63
  "marginTop": 40,
64
64
  "fontSize": "28@fs"
65
65
  },
66
- "testID": "OnboardTitle-test-id"
66
+ "testID": "OnboardTitle-test-id-1"
67
67
  },
68
68
  "children": "base.onboard.title.one-page",
69
69
  "key": "OnboardTitle-5t0p86nj13m"
@@ -76,7 +76,8 @@
76
76
  "styles": {
77
77
  "height": 350
78
78
  },
79
- "testID": "OnboardImage-test-id"
79
+ "testID": "OnboardImage-test-id-1",
80
+ "fetchStrategy": "highIfItsAppLaunch"
80
81
  }
81
82
  },
82
83
  {
@@ -90,7 +91,7 @@
90
91
  "textAlign": "center",
91
92
  "paddingTop": "30@vs"
92
93
  },
93
- "testID": "OnboardSubtitle-test-id"
94
+ "testID": "OnboardSubtitle-test-id-1"
94
95
  },
95
96
  "children": "base.onboard.subtitle.one-page",
96
97
  "key": "OnboardSubtitle-0max8wno7l5b"
@@ -99,7 +100,7 @@
99
100
  "attributes": {
100
101
  "description": "Onboarding sayfası. (#1)",
101
102
  "title": "OnboardItem 1",
102
- "testID": "OnboardItem-test-id"
103
+ "testID": "OnboardItem-test-id-1"
103
104
  }
104
105
  },
105
106
  {
@@ -117,7 +118,7 @@
117
118
  "marginTop": 40,
118
119
  "fontSize": "28@fs"
119
120
  },
120
- "testID": "OnboardTitle-test-id"
121
+ "testID": "OnboardTitle-test-id-2"
121
122
  },
122
123
  "children": "base.onboard.title.two-page",
123
124
  "key": "OnboardTitle-ne9iihu925k"
@@ -130,7 +131,8 @@
130
131
  "styles": {
131
132
  "height": 350
132
133
  },
133
- "testID": "OnboardImage-test-id"
134
+ "testID": "OnboardImage-test-id-2",
135
+ "fetchStrategy": "normal"
134
136
  }
135
137
  },
136
138
  {
@@ -144,7 +146,7 @@
144
146
  "textAlign": "center",
145
147
  "paddingTop": "30@vs"
146
148
  },
147
- "testID": "OnboardSubtitle-test-id"
149
+ "testID": "OnboardSubtitle-test-id-2"
148
150
  },
149
151
  "children": "base.onboard.subtitle.two-page",
150
152
  "key": "OnboardSubtitle-jq9469r7c2"
@@ -153,7 +155,7 @@
153
155
  "attributes": {
154
156
  "description": "Onboarding sayfası. (#2)",
155
157
  "title": "OnboardItem 2",
156
- "testID": "OnboardItem-test-id"
158
+ "testID": "OnboardItem-test-id-2"
157
159
  }
158
160
  },
159
161
  {
@@ -171,7 +173,7 @@
171
173
  "marginTop": 40,
172
174
  "fontSize": "28@fs"
173
175
  },
174
- "testID": "OnboardTitle-test-id"
176
+ "testID": "OnboardTitle-test-id-3"
175
177
  },
176
178
  "children": "base.onboard.title.three-page",
177
179
  "key": "OnboardTitle-hczvlbg7gqj"
@@ -184,7 +186,8 @@
184
186
  "styles": {
185
187
  "height": 350
186
188
  },
187
- "testID": "OnboardImage-test-id"
189
+ "testID": "OnboardImage-test-id-3",
190
+ "fetchStrategy": "normal"
188
191
  }
189
192
  },
190
193
  {
@@ -198,7 +201,7 @@
198
201
  "textAlign": "center",
199
202
  "paddingTop": "30@vs"
200
203
  },
201
- "testID": "OnboardSubtitle-test-id"
204
+ "testID": "OnboardSubtitle-test-id-3"
202
205
  },
203
206
  "children": "base.onboard.subtitle.three-page",
204
207
  "key": "OnboardSubtitle-rufjwid9yug"
@@ -207,7 +210,7 @@
207
210
  "attributes": {
208
211
  "description": "Onboarding sayfası. (#3)",
209
212
  "title": "OnboardItem 3",
210
- "testID": "OnboardItem-test-id"
213
+ "testID": "OnboardItem-test-id-3"
211
214
  }
212
215
  },
213
216
  {
@@ -225,7 +228,7 @@
225
228
  "marginTop": 40,
226
229
  "fontSize": "28@fs"
227
230
  },
228
- "testID": "OnboardTitle-test-id"
231
+ "testID": "OnboardTitle-test-id-4"
229
232
  },
230
233
  "children": "base.onboard.title.four-page",
231
234
  "key": "OnboardTitle-f2ekfc0wcbl"
@@ -238,7 +241,8 @@
238
241
  "styles": {
239
242
  "height": 350
240
243
  },
241
- "testID": "OnboardImage-test-id"
244
+ "testID": "OnboardImage-test-id-4",
245
+ "fetchStrategy": "normal"
242
246
  }
243
247
  },
244
248
  {
@@ -252,7 +256,7 @@
252
256
  "textAlign": "center",
253
257
  "paddingTop": "30@vs"
254
258
  },
255
- "testID": "OnboardSubtitle-test-id"
259
+ "testID": "OnboardSubtitle-test-id-4"
256
260
  },
257
261
  "children": "base.onboard.subtitle.four-page",
258
262
  "key": "OnboardSubtitle-qkw2jn84xem"
@@ -261,7 +265,7 @@
261
265
  "attributes": {
262
266
  "description": "Onboarding sayfası. (#4)",
263
267
  "title": "OnboardItem 4",
264
- "testID": "OnboardItem-test-id"
268
+ "testID": "OnboardItem-test-id-4"
265
269
  }
266
270
  }
267
271
  ],
@@ -271,7 +275,7 @@
271
275
  "styles": {
272
276
  "flex": 1
273
277
  },
274
- "testID": "Onboard-test-id"
278
+ "testID": "Onboard-test-id-1"
275
279
  },
276
280
  "key": "Onboard-dg1zmwdawmg"
277
281
  },
@@ -286,7 +290,7 @@
286
290
  "paddingVertical": 12,
287
291
  "dot_thickness": "10@s"
288
292
  },
289
- "testID": "OnboardDot-test-id"
293
+ "testID": "OnboardDot-test-id-1"
290
294
  }
291
295
  },
292
296
  {
@@ -303,7 +307,7 @@
303
307
  "flexShrink": 0,
304
308
  "paddingBottom": "5@s"
305
309
  },
306
- "testID": "OnboardButtons-test-id"
310
+ "testID": "OnboardButtons-test-id-1"
307
311
  },
308
312
  "children": [
309
313
  {
@@ -361,7 +365,7 @@
361
365
  "flexShrink": 0,
362
366
  "paddingBottom": "5@s"
363
367
  },
364
- "testID": "OnboardButtons-test-id"
368
+ "testID": "OnboardButtons-test-id-2"
365
369
  },
366
370
  "children": [
367
371
  {
@@ -427,7 +431,7 @@
427
431
  "flexShrink": 0,
428
432
  "paddingBottom": "5@s"
429
433
  },
430
- "testID": "OnboardButtons-test-id"
434
+ "testID": "OnboardButtons-test-id-3"
431
435
  },
432
436
  "children": [
433
437
  {
@@ -489,7 +493,7 @@
489
493
  "flexShrink": 0,
490
494
  "paddingBottom": "5@s"
491
495
  },
492
- "testID": "OnboardButtons-test-id"
496
+ "testID": "OnboardButtons-test-id-4"
493
497
  },
494
498
  "children": [
495
499
  {
@@ -526,7 +530,7 @@
526
530
  "marginHorizontal": 25,
527
531
  "flexShrink": 0
528
532
  },
529
- "testID": "View-test-id"
533
+ "testID": "View-test-id-1"
530
534
  },
531
535
  "children": [
532
536
  {
@@ -544,7 +548,7 @@
544
548
  "color": "THEME_COLORS.ONBOARD_FOOTER_TEXT",
545
549
  "fontSize": "12@fs"
546
550
  },
547
- "testID": "OnboardFooter-test-id"
551
+ "testID": "OnboardFooter-test-id-1"
548
552
  }
549
553
  }
550
554
  ],
@@ -555,13 +559,13 @@
555
559
  "theme": "dark",
556
560
  "description": "Onboarding sağlayıcısı. (#1)",
557
561
  "title": "OnboardProvider 1",
558
- "testID": "OnboardProvider-test-id"
562
+ "testID": "OnboardProvider-test-id-1"
559
563
  },
560
564
  "key": "OnboardProvider-pvc5b6o5gu"
561
565
  }
562
566
  ]
563
567
  },
564
568
  "attributes": {
565
- "testID": "onboard-test-id"
569
+ "testID": "onboard-test-id-1"
566
570
  }
567
571
  }
@@ -8,10 +8,15 @@ import { extractImageStyle } from '../../../utils/extractImageStyle';
8
8
  export function useExtractImageStyle<
9
9
  T extends ImagePropsGenerated['attributes'],
10
10
  >(node: NodeData<T>): CSSProperties {
11
- const { selectedTheme: theme, projectColors, baseSize } = useBuilderParams();
11
+ const {
12
+ selectedTheme: theme,
13
+ projectColors,
14
+ baseSize,
15
+ device,
16
+ } = useBuilderParams();
12
17
 
13
18
  return useMemo(
14
- () => extractImageStyle(node, { theme, projectColors, baseSize }),
15
- [node, theme, projectColors, baseSize],
19
+ () => extractImageStyle(node, { theme, projectColors, baseSize, device }),
20
+ [node, theme, projectColors, baseSize, device],
16
21
  );
17
22
  }
@@ -8,10 +8,15 @@ import { extractViewStyle } from '../../../utils/extractViewStyle';
8
8
  export function useExtractViewStyle<T extends ViewPropsGenerated['attributes']>(
9
9
  node: NodeData<T>,
10
10
  ): CSSProperties {
11
- const { selectedTheme: theme, projectColors, baseSize } = useBuilderParams();
11
+ const {
12
+ selectedTheme: theme,
13
+ projectColors,
14
+ baseSize,
15
+ device,
16
+ } = useBuilderParams();
12
17
 
13
18
  return useMemo(
14
- () => extractViewStyle(node, { theme, projectColors, baseSize }),
15
- [node, theme, projectColors, baseSize],
19
+ () => extractViewStyle(node, { theme, projectColors, baseSize, device }),
20
+ [node, theme, projectColors, baseSize, device],
16
21
  );
17
22
  }
@@ -68,8 +68,8 @@ export interface BIconPropsGenerated {
68
68
  adjustsFontSizeToFit?: boolean;
69
69
  showEllipsis?: boolean;
70
70
  translateCounter?: number;
71
- testID?: string;
72
71
  scrollable?: boolean;
72
+ testID?: string;
73
73
  iconType?: string;
74
74
  size?: number;
75
75
  strokeWidth?: number;
@@ -9,8 +9,7 @@
9
9
  "attributes": {
10
10
  "iconType": "iconType",
11
11
  "size": "number",
12
- "strokeWidth": "number",
13
- "testID": "string"
12
+ "strokeWidth": "number"
14
13
  }
15
14
  },
16
15
  "meta": {
@@ -8,8 +8,7 @@
8
8
  "extends": "View",
9
9
  "attributes": {
10
10
  "src": "string",
11
- "resizeMode": ["cover", "contain", "stretch", "center"],
12
- "testID": "string"
11
+ "resizeMode": ["cover", "contain", "stretch", "center"]
13
12
  },
14
13
  "defaults": {
15
14
  "resizeMode": "cover",
@@ -23,8 +23,7 @@
23
23
  "800",
24
24
  "900"
25
25
  ]
26
- },
27
- "testID": "string"
26
+ }
28
27
  }
29
28
  },
30
29
  "meta": {
@@ -9,8 +9,7 @@
9
9
  "attributes": {
10
10
  "loop": "boolean",
11
11
  "dragFree": "boolean",
12
- "align": ["start", "center", "end"],
13
- "testID": "string"
12
+ "align": ["start", "center", "end"]
14
13
  }
15
14
  },
16
15
  "meta": {
@@ -8,8 +8,7 @@
8
8
  "extends": "View",
9
9
  "attributes": {
10
10
  "buttonType": ["previous_button", "next_button", "skip_button"],
11
- "skipNumber": "number",
12
- "testID": "string"
11
+ "skipNumber": "number"
13
12
  }
14
13
  },
15
14
  "meta": {
@@ -34,7 +34,12 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
34
34
  const onboardApi = useContext(onboardContext);
35
35
  const emblaApi = isOnboard ? onboardApi?.emblaApi : carouselApi;
36
36
 
37
- const { selectedTheme: theme, projectColors, baseSize } = useBuilderParams();
37
+ const {
38
+ selectedTheme: theme,
39
+ projectColors,
40
+ baseSize,
41
+ device,
42
+ } = useBuilderParams();
38
43
  const inactiveDotOpacity =
39
44
  (stylesBag?.inactive_dot_opacity as number | undefined) ??
40
45
  (attrRecord.inactive_dot_opacity as number | undefined) ??
@@ -59,12 +64,12 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
59
64
  );
60
65
 
61
66
  const dotSizeCss = useMemo(() => {
62
- const parsed = parseSize(dotThicknessRaw, baseSize);
67
+ const parsed = parseSize(dotThicknessRaw, baseSize, device!);
63
68
  if (parsed === undefined) return '10px';
64
69
  if (typeof parsed === 'number') return `${parsed}px`;
65
70
  if (typeof parsed === 'string' && parsed.trim()) return parsed;
66
71
  return '10px';
67
- }, [dotThicknessRaw, baseSize]);
72
+ }, [dotThicknessRaw, baseSize, device]);
68
73
 
69
74
  const dotGapCss = useMemo((): string => {
70
75
  const px =
@@ -18,8 +18,7 @@
18
18
  "dot_thickness": "size",
19
19
  "inactive_dot_opacity": "number",
20
20
  "inactive_dot_color": "color",
21
- "active_dot_color": "color",
22
- "testID": "string"
21
+ "active_dot_color": "color"
23
22
  }
24
23
  },
25
24
  "defaults": {
@@ -5,10 +5,7 @@
5
5
  "title": "title",
6
6
  "description": "description",
7
7
  "children": "node",
8
- "extends": "View",
9
- "attributes": {
10
- "testID": "string"
11
- }
8
+ "extends": "View"
12
9
  },
13
10
  "meta": {
14
11
  "desiredParent": ["=Carousel"],
@@ -12,9 +12,6 @@
12
12
  "width": "100%",
13
13
  "height": "100%"
14
14
  }
15
- },
16
- "attributes": {
17
- "testID": "string"
18
15
  }
19
16
  },
20
17
  "meta": {
@@ -68,8 +68,8 @@ export interface CountDownPropsGenerated {
68
68
  adjustsFontSizeToFit?: boolean;
69
69
  showEllipsis?: boolean;
70
70
  translateCounter?: number;
71
- testID?: string;
72
71
  scrollable?: boolean;
72
+ testID?: string;
73
73
  count?: number;
74
74
  };
75
75
  }
@@ -11,8 +11,7 @@
11
11
  "styles": {
12
12
  "width": "never",
13
13
  "textAlign": "never"
14
- },
15
- "testID": "string"
14
+ }
16
15
  }
17
16
  },
18
17
  "meta": {
@@ -2,6 +2,11 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
+ export type FetchStrategyOptionType =
6
+ | 'highIfItsAppLaunch'
7
+ | 'normal'
8
+ | 'lazy'
9
+ | 'none';
5
10
  export type FlexDirectionOptionType = 'row' | 'column';
6
11
  export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
7
12
  export type AlignItemsOptionType =
@@ -65,6 +70,7 @@ export interface ImagePropsGenerated {
65
70
  scrollable?: boolean;
66
71
  testID?: string;
67
72
  src?: string;
73
+ fetchStrategy?: FetchStrategyOptionType;
68
74
  };
69
75
  }
70
76
 
@@ -8,12 +8,13 @@
8
8
  "extends": "View",
9
9
  "attributes": {
10
10
  "src": "string",
11
+ "fetchStrategy": ["highIfItsAppLaunch", "normal", "lazy", "none"],
11
12
  "styles": {
12
13
  "resizeMode": ["cover", "contain", "stretch", "center"]
13
- },
14
- "testID": "string"
14
+ }
15
15
  },
16
16
  "defaults": {
17
+ "fetchStrategy": "normal",
17
18
  "styles": {
18
19
  "resizeMode": "contain"
19
20
  }
@@ -39,6 +40,13 @@
39
40
  "category": "other",
40
41
  "specialCategory": null,
41
42
  "sort": 1
43
+ },
44
+ "fetchStrategy": {
45
+ "label": "Fetch Strategy",
46
+ "description": "highIfItsAppLaunch ilk başta yükleniyor eğer app_launch placeholder'i ile gelirse\nnormal sonra bütün hepsi toplanıp prefetch ediniyor\nlazy builder açılır açılmaz\nnone ise os'a bırakıldı",
47
+ "category": "other",
48
+ "specialCategory": null,
49
+ "sort": 2
42
50
  }
43
51
  }
44
52
  }
@@ -4,6 +4,7 @@ import RenderNode from '../RenderNode.generated';
4
4
  import type { Node } from '../../types/Node';
5
5
  import useNode from '../useNode';
6
6
  import { useBuilderParams } from '../../components/BuilderProvider';
7
+ import { useRenderStore } from '../../store';
7
8
  import { useExtractViewStyle } from '../../attribute-analyser/style/web/useExtractViewStyle';
8
9
  import { useLogRender } from '../../utils/useLogRender';
9
10
  import { isNodeSelected, SELECTED_OUTLINE_STYLE } from '../../utils/selection';
@@ -19,11 +20,12 @@ function Main({ node }: MainComponentProps) {
19
20
  const attributeKey = node.key ?? generatedId;
20
21
 
21
22
  const { previewMode, selectedKey } = useBuilderParams();
23
+ const device = useRenderStore((s) => s.device);
22
24
 
23
25
  const baseStyle = useExtractViewStyle(node);
24
26
 
25
27
  const useSafeAreaView = node.attributes?.useSafeAreaView ?? true;
26
- const layoutStyle = useSafeAreaViewStyle(baseStyle, useSafeAreaView);
28
+ const layoutStyle = useSafeAreaViewStyle(baseStyle, useSafeAreaView, device);
27
29
 
28
30
  const isSelected = isNodeSelected({
29
31
  previewMode: !!previewMode,
@@ -7,8 +7,7 @@
7
7
  "children": "node",
8
8
  "extends": "View",
9
9
  "attributes": {
10
- "useSafeAreaView": "boolean",
11
- "testID": "string"
10
+ "useSafeAreaView": "boolean"
12
11
  }
13
12
  },
14
13
  "defaults": {
@@ -15,6 +15,9 @@ function NavigationBarColor({ node }: NavigationBarColorComponentProps) {
15
15
  const setNavBarOverrideColor = useRenderStore(
16
16
  (s) => s.setNavBarOverrideColor,
17
17
  );
18
+ const setNavBarOverrideTranslucent = useRenderStore(
19
+ (s) => s.setNavBarOverrideTranslucent,
20
+ );
18
21
 
19
22
  const rawBg = getStyleBag(node.attributes)?.backgroundColor as
20
23
  | string
@@ -24,14 +27,25 @@ function NavigationBarColor({ node }: NavigationBarColorComponentProps) {
24
27
  theme,
25
28
  });
26
29
 
30
+ const translucent = node.attributes?.translucent;
31
+
27
32
  useEffect(() => {
28
33
  if (resolvedColor) {
29
34
  setNavBarOverrideColor(resolvedColor);
30
35
  }
36
+ if (translucent !== undefined) {
37
+ setNavBarOverrideTranslucent(translucent);
38
+ }
31
39
  return () => {
32
40
  setNavBarOverrideColor(null);
41
+ setNavBarOverrideTranslucent(null);
33
42
  };
34
- }, [resolvedColor, setNavBarOverrideColor]);
43
+ }, [
44
+ resolvedColor,
45
+ setNavBarOverrideColor,
46
+ translucent,
47
+ setNavBarOverrideTranslucent,
48
+ ]);
35
49
 
36
50
  return null;
37
51
  }
@@ -2,66 +2,15 @@
2
2
 
3
3
  import type { NodeData } from '../../types/Node';
4
4
 
5
- export type FlexDirectionOptionType = 'row' | 'column';
6
- export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
7
- export type AlignItemsOptionType =
8
- | 'flex-start'
9
- | 'center'
10
- | 'flex-end'
11
- | 'stretch'
12
- | 'baseline';
13
- export type JustifyContentOptionType =
14
- | 'flex-start'
15
- | 'center'
16
- | 'flex-end'
17
- | 'space-between'
18
- | 'space-around'
19
- | 'space-evenly';
20
- export type PositionOptionType = 'relative' | 'absolute';
21
-
22
5
  export interface NavigationBarColorStyleGenerated {
23
- flexDirection?: FlexDirectionOptionType;
24
- flexWrap?: FlexWrapOptionType;
25
- alignItems?: AlignItemsOptionType;
26
- justifyContent?: JustifyContentOptionType;
27
- gap?: string;
28
- padding?: string;
29
- paddingHorizontal?: string;
30
- paddingVertical?: string;
31
- paddingTop?: string;
32
- paddingBottom?: string;
33
- paddingLeft?: string;
34
- paddingRight?: string;
35
- margin?: string;
36
- marginHorizontal?: string;
37
- marginVertical?: string;
38
- marginTop?: string;
39
- marginBottom?: string;
40
- marginLeft?: string;
41
- marginRight?: string;
42
6
  backgroundColor?: string;
43
- borderRadius?: string;
44
- width?: string;
45
- minWidth?: string;
46
- maxWidth?: string;
47
- height?: string;
48
- minHeight?: string;
49
- maxHeight?: string;
50
- flex?: number;
51
- position?: PositionOptionType;
52
- top?: string;
53
- bottom?: string;
54
- left?: string;
55
- right?: string;
56
- zIndex?: number;
57
7
  }
58
8
 
59
9
  export interface NavigationBarColorPropsGenerated {
60
10
  child: string;
61
11
  attributes: {
62
12
  styles?: NavigationBarColorStyleGenerated;
63
- scrollable?: boolean;
64
- testID?: string;
13
+ translucent?: boolean;
65
14
  };
66
15
  }
67
16
 
@@ -5,12 +5,11 @@
5
5
  "title": "title",
6
6
  "description": "description",
7
7
  "children": "never",
8
- "extends": "View",
9
8
  "attributes": {
10
9
  "styles": {
11
10
  "backgroundColor": "color"
12
11
  },
13
- "testID": "string"
12
+ "translucent": "boolean"
14
13
  }
15
14
  },
16
15
  "meta": {
@@ -25,6 +24,15 @@
25
24
  "specialCategory": null,
26
25
  "sort": 1
27
26
  }
27
+ },
28
+ "attributes": {
29
+ "translucent": {
30
+ "label": "Translucent",
31
+ "description": "Sets the navigation bar to translucent.",
32
+ "category": "style",
33
+ "specialCategory": null,
34
+ "sort": 2
35
+ }
28
36
  }
29
37
  },
30
38
  "defaults": {