@developer_tribe/react-builder 1.2.31 → 1.2.33

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 (160) hide show
  1. package/dist/assets/prompt-scheme-onboard.generated.d.ts +1 -0
  2. package/dist/assets/prompt-scheme-paywall.generated.d.ts +1 -0
  3. package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -1
  4. package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +1 -1
  5. package/dist/build-components/Button/ButtonProps.generated.d.ts +1 -1
  6. package/dist/build-components/Carousel/CarouselProps.generated.d.ts +1 -1
  7. package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +1 -1
  8. package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +1 -1
  9. package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +1 -1
  10. package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +1 -1
  11. package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -1
  12. package/dist/build-components/Image/ImageProps.generated.d.ts +1 -1
  13. package/dist/build-components/Main/MainProps.generated.d.ts +1 -1
  14. package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -1
  15. package/dist/build-components/Onboard/OnboardProps.generated.d.ts +1 -1
  16. package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -2
  17. package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +1 -1
  18. package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +1 -1
  19. package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -1
  20. package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +1 -1
  21. package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +1 -1
  22. package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +1 -1
  23. package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -1
  24. package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -1
  25. package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -1
  26. package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -1
  27. package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +1 -1
  28. package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +1 -1
  29. package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -1
  30. package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -1
  31. package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -1
  32. package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -1
  33. package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +1 -1
  34. package/dist/build-components/Separator/SeparatorProps.generated.d.ts +1 -1
  35. package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
  36. package/dist/build-components/Text/TextProps.generated.d.ts +1 -1
  37. package/dist/build-components/View/ViewProps.generated.d.ts +1 -1
  38. package/dist/build-components/patterns.generated.d.ts +62 -52
  39. package/dist/components/BuilderProvider.d.ts +2 -4
  40. package/dist/index.cjs.js +1 -1
  41. package/dist/index.cjs.js.map +1 -1
  42. package/dist/index.esm.js +1 -1
  43. package/dist/index.esm.js.map +1 -1
  44. package/dist/index.web.cjs.js +6 -6
  45. package/dist/index.web.cjs.js.map +1 -1
  46. package/dist/index.web.esm.js +6 -6
  47. package/dist/index.web.esm.js.map +1 -1
  48. package/dist/modals/PromptManagerModal.d.ts +9 -0
  49. package/dist/modals/index.d.ts +1 -0
  50. package/dist/styles.css +1 -1
  51. package/dist/utils/attributeStyle.d.ts +2 -2
  52. package/dist/utils/nodeXml.d.ts +11 -0
  53. package/dist/utils/patterns.d.ts +2 -2
  54. package/package.json +5 -1
  55. package/scripts/prebuild/assets/prompt_scheme.md +44 -0
  56. package/scripts/prebuild/generate-prompt-schemes.js +328 -0
  57. package/scripts/prebuild/prebuild.js +4 -0
  58. package/scripts/prebuild/utils/createGeneratedProps.js +9 -9
  59. package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +9 -9
  60. package/src/RenderPage.tsx +48 -7
  61. package/src/assets/meta.json +1 -1
  62. package/src/assets/prompt-scheme-onboard.generated.ts +4 -0
  63. package/src/assets/prompt-scheme-paywall.generated.ts +4 -0
  64. package/src/assets/samples/vpn-onboard-1.json +0 -24
  65. package/src/attribute-analyser/style/native/useExtractImageStyle.ts +1 -1
  66. package/src/attribute-analyser/style/native/useExtractTextStyle.ts +1 -1
  67. package/src/attribute-analyser/style/native/useExtractViewStyle.ts +1 -1
  68. package/src/attribute-analyser/style/web/useExtractImageStyle.ts +1 -1
  69. package/src/attribute-analyser/style/web/useExtractTextStyle.ts +1 -1
  70. package/src/attribute-analyser/style/web/useExtractViewStyle.ts +1 -1
  71. package/src/build-components/BIcon/BIconProps.generated.ts +1 -1
  72. package/src/build-components/BIcon/pattern.json +1 -1
  73. package/src/build-components/BackgroundImage/BackgroundImage.tsx +1 -1
  74. package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +1 -1
  75. package/src/build-components/BackgroundImage/pattern.json +1 -1
  76. package/src/build-components/Button/Button.tsx +2 -2
  77. package/src/build-components/Button/ButtonProps.generated.ts +1 -1
  78. package/src/build-components/Button/pattern.json +2 -2
  79. package/src/build-components/Carousel/CarouselProps.generated.ts +1 -1
  80. package/src/build-components/Carousel/pattern.json +1 -1
  81. package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +1 -1
  82. package/src/build-components/CarouselDots/CarouselDots.tsx +1 -1
  83. package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +1 -1
  84. package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +1 -1
  85. package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +1 -1
  86. package/src/build-components/CarouselProvider/pattern.json +1 -1
  87. package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
  88. package/src/build-components/CountDown/pattern.json +1 -1
  89. package/src/build-components/Image/ImageProps.generated.ts +1 -1
  90. package/src/build-components/Image/pattern.json +2 -2
  91. package/src/build-components/Main/MainProps.generated.ts +1 -1
  92. package/src/build-components/Main/pattern.json +1 -1
  93. package/src/build-components/NavigationBarColor/NavigationBarColor.tsx +1 -1
  94. package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -1
  95. package/src/build-components/NavigationBarColor/pattern.json +2 -2
  96. package/src/build-components/Onboard/OnboardProps.generated.ts +1 -1
  97. package/src/build-components/Onboard/pattern.json +1 -1
  98. package/src/build-components/OnboardButton/OnboardButton.tsx +3 -24
  99. package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -2
  100. package/src/build-components/OnboardButton/pattern.json +30 -27
  101. package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +1 -1
  102. package/src/build-components/OnboardButtons/pattern.json +1 -1
  103. package/src/build-components/OnboardDot/OnboardDot.tsx +1 -1
  104. package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +1 -1
  105. package/src/build-components/OnboardDot/pattern.json +1 -1
  106. package/src/build-components/OnboardFooter/OnboardFooter.tsx +3 -3
  107. package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -1
  108. package/src/build-components/OnboardFooter/pattern.json +1 -1
  109. package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +1 -1
  110. package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +1 -1
  111. package/src/build-components/OnboardItem/pattern.json +1 -1
  112. package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +1 -1
  113. package/src/build-components/OnboardProvider/pattern.json +1 -1
  114. package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -1
  115. package/src/build-components/OnboardSubtitle/pattern.json +1 -1
  116. package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -1
  117. package/src/build-components/OnboardTitle/pattern.json +1 -1
  118. package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
  119. package/src/build-components/PaywallBackground/pattern.json +1 -1
  120. package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +1 -1
  121. package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -1
  122. package/src/build-components/PaywallCloseButton/pattern.json +1 -1
  123. package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +1 -1
  124. package/src/build-components/PaywallOptions/pattern.json +1 -1
  125. package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +1 -1
  126. package/src/build-components/PaywallProvider/pattern.json +1 -1
  127. package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -1
  128. package/src/build-components/PaywallSubscribeButton/pattern.json +1 -1
  129. package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -1
  130. package/src/build-components/PriceTag/pattern.json +2 -2
  131. package/src/build-components/Pricing/PricingProps.generated.ts +1 -1
  132. package/src/build-components/Pricing/pattern.json +1 -1
  133. package/src/build-components/Promo/PromoProps.generated.ts +1 -1
  134. package/src/build-components/Promo/pattern.json +1 -1
  135. package/src/build-components/RadioButton/RadioButtonProps.generated.ts +1 -1
  136. package/src/build-components/Separator/SeparatorProps.generated.ts +1 -1
  137. package/src/build-components/Separator/pattern.json +2 -2
  138. package/src/build-components/StatusBarColor/StatusBarColor.tsx +1 -1
  139. package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
  140. package/src/build-components/StatusBarColor/pattern.json +2 -2
  141. package/src/build-components/Text/Text.tsx +1 -1
  142. package/src/build-components/Text/TextProps.generated.ts +1 -1
  143. package/src/build-components/Text/pattern.json +2 -2
  144. package/src/build-components/View/ViewProps.generated.ts +1 -1
  145. package/src/build-components/View/pattern.json +2 -2
  146. package/src/build-components/patterns.generated.ts +62 -52
  147. package/src/build-components/useNode.ts +2 -16
  148. package/src/components/BottomBar.tsx +28 -1
  149. package/src/components/BuilderProvider.tsx +5 -14
  150. package/src/hooks/useLocalize.ts +1 -1
  151. package/src/migrations/migrations/1.1.2_extract_component_attributes_from_style.ts +31 -10
  152. package/src/modals/PromptManagerModal.tsx +270 -0
  153. package/src/modals/index.ts +1 -0
  154. package/src/styles/index.scss +1 -0
  155. package/src/styles/modals/_prompt-manager-modal.scss +95 -0
  156. package/src/utils/analyseNodeByPatterns.ts +2 -2
  157. package/src/utils/attributeStyle.ts +9 -3
  158. package/src/utils/extractImageStyle.ts +4 -4
  159. package/src/utils/nodeXml.ts +196 -0
  160. package/src/utils/patterns.ts +3 -3
@@ -13,7 +13,7 @@ export const patterns = [
13
13
  adjustsFontSizeToFit: 'boolean',
14
14
  showEllipsis: 'boolean',
15
15
  translateCounter: 'number',
16
- style: {
16
+ styles: {
17
17
  color: 'color',
18
18
  fontSize: 'size',
19
19
  fontFamily: 'fontFamily',
@@ -478,7 +478,7 @@ export const patterns = [
478
478
  children: 'never',
479
479
  attributes: {
480
480
  scrollable: 'boolean',
481
- style: {
481
+ styles: {
482
482
  flexDirection: ['row', 'column'],
483
483
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
484
484
  alignItems: [
@@ -879,7 +879,7 @@ export const patterns = [
879
879
  children: 'string',
880
880
  attributes: {
881
881
  scrollable: 'boolean',
882
- style: {
882
+ styles: {
883
883
  flexDirection: ['row', 'column'],
884
884
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
885
885
  alignItems: [
@@ -1297,7 +1297,7 @@ export const patterns = [
1297
1297
  children: 'node',
1298
1298
  attributes: {
1299
1299
  scrollable: 'boolean',
1300
- style: {
1300
+ styles: {
1301
1301
  flexDirection: ['row', 'column'],
1302
1302
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
1303
1303
  alignItems: [
@@ -1678,7 +1678,7 @@ export const patterns = [
1678
1678
  children: 'never',
1679
1679
  attributes: {
1680
1680
  scrollable: 'boolean',
1681
- style: {
1681
+ styles: {
1682
1682
  flexDirection: ['row', 'column'],
1683
1683
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
1684
1684
  alignItems: [
@@ -2072,7 +2072,7 @@ export const patterns = [
2072
2072
  children: 'never',
2073
2073
  attributes: {
2074
2074
  scrollable: 'boolean',
2075
- style: {
2075
+ styles: {
2076
2076
  flexDirection: ['row', 'column'],
2077
2077
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
2078
2078
  alignItems: [
@@ -2474,7 +2474,7 @@ export const patterns = [
2474
2474
  children: 'node',
2475
2475
  attributes: {
2476
2476
  scrollable: 'boolean',
2477
- style: {
2477
+ styles: {
2478
2478
  flexDirection: ['row', 'column'],
2479
2479
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
2480
2480
  alignItems: [
@@ -2852,7 +2852,7 @@ export const patterns = [
2852
2852
  children: 'node',
2853
2853
  attributes: {
2854
2854
  scrollable: 'boolean',
2855
- style: {
2855
+ styles: {
2856
2856
  flexDirection: ['row', 'column'],
2857
2857
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
2858
2858
  alignItems: [
@@ -3235,7 +3235,7 @@ export const patterns = [
3235
3235
  adjustsFontSizeToFit: 'boolean',
3236
3236
  showEllipsis: 'boolean',
3237
3237
  translateCounter: 'number',
3238
- style: {
3238
+ styles: {
3239
3239
  color: 'color',
3240
3240
  fontSize: 'size',
3241
3241
  fontFamily: 'fontFamily',
@@ -3683,7 +3683,7 @@ export const patterns = [
3683
3683
  children: 'never',
3684
3684
  attributes: {
3685
3685
  scrollable: 'boolean',
3686
- style: {
3686
+ styles: {
3687
3687
  flexDirection: ['row', 'column'],
3688
3688
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
3689
3689
  alignItems: [
@@ -4078,7 +4078,7 @@ export const patterns = [
4078
4078
  children: 'node',
4079
4079
  attributes: {
4080
4080
  scrollable: 'boolean',
4081
- style: {
4081
+ styles: {
4082
4082
  flexDirection: ['row', 'column'],
4083
4083
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
4084
4084
  alignItems: [
@@ -4471,7 +4471,7 @@ export const patterns = [
4471
4471
  children: 'never',
4472
4472
  attributes: {
4473
4473
  scrollable: 'boolean',
4474
- style: {
4474
+ styles: {
4475
4475
  flexDirection: ['row', 'column'],
4476
4476
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
4477
4477
  alignItems: [
@@ -4850,7 +4850,7 @@ export const patterns = [
4850
4850
  children: 'node',
4851
4851
  attributes: {
4852
4852
  scrollable: 'boolean',
4853
- style: {
4853
+ styles: {
4854
4854
  flexDirection: ['row', 'column'],
4855
4855
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
4856
4856
  alignItems: [
@@ -5229,7 +5229,7 @@ export const patterns = [
5229
5229
  children: 'never',
5230
5230
  attributes: {
5231
5231
  scrollable: 'boolean',
5232
- style: {
5232
+ styles: {
5233
5233
  flexDirection: ['row', 'column'],
5234
5234
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
5235
5235
  alignItems: [
@@ -5277,6 +5277,7 @@ export const patterns = [
5277
5277
  left: 'size',
5278
5278
  right: 'size',
5279
5279
  zIndex: 'number',
5280
+ color: 'color',
5280
5281
  },
5281
5282
  labelKey: 'string',
5282
5283
  animation: [
@@ -5287,7 +5288,6 @@ export const patterns = [
5287
5288
  'blur-line-animation',
5288
5289
  ],
5289
5290
  animation_color: 'color',
5290
- flex: 'number',
5291
5291
  events: 'EventObject[]',
5292
5292
  },
5293
5293
  },
@@ -5337,20 +5337,6 @@ export const patterns = [
5337
5337
  sort: 21,
5338
5338
  preferredScale: 's',
5339
5339
  },
5340
- animation: {
5341
- label: 'Animation',
5342
- description: 'Animation style for the button.',
5343
- category: 'style',
5344
- specialCategory: null,
5345
- sort: 3,
5346
- },
5347
- animation_color: {
5348
- label: 'Animation Color',
5349
- description: 'Color used by the animation.',
5350
- category: 'style',
5351
- specialCategory: null,
5352
- sort: 4,
5353
- },
5354
5340
  },
5355
5341
  attributes: {
5356
5342
  scrollable: {
@@ -5558,9 +5544,9 @@ export const patterns = [
5558
5544
  },
5559
5545
  flex: {
5560
5546
  label: 'Flex',
5561
- description: 'Flex grow value in layout.',
5547
+ description: 'Flex grow factor (e.g. 1 fills available space).',
5562
5548
  category: 'container',
5563
- specialCategory: null,
5549
+ specialCategory: 'size',
5564
5550
  sort: 6,
5565
5551
  },
5566
5552
  position: {
@@ -5623,6 +5609,29 @@ export const patterns = [
5623
5609
  specialCategory: null,
5624
5610
  sort: 7,
5625
5611
  },
5612
+ animation: {
5613
+ label: 'Animation',
5614
+ description: 'Animation style for the button.',
5615
+ category: 'style',
5616
+ specialCategory: null,
5617
+ sort: 3,
5618
+ },
5619
+ animation_color: {
5620
+ label: 'Animation Color',
5621
+ description: 'Color used by the animation.',
5622
+ category: 'style',
5623
+ specialCategory: null,
5624
+ sort: 4,
5625
+ },
5626
+ styles: {
5627
+ color: {
5628
+ label: 'Color',
5629
+ description: 'Text color.',
5630
+ category: 'style',
5631
+ specialCategory: null,
5632
+ sort: 1,
5633
+ },
5634
+ },
5626
5635
  },
5627
5636
  },
5628
5637
  defaults: {
@@ -5635,6 +5644,7 @@ export const patterns = [
5635
5644
  flexShrink: 0,
5636
5645
  height: '40@vs',
5637
5646
  borderRadius: '12@s',
5647
+ color: 'THEME_COLORS.ONBOARD_BUTTON_PRIMARY_TEXT',
5638
5648
  },
5639
5649
  },
5640
5650
  types: {
@@ -5655,7 +5665,7 @@ export const patterns = [
5655
5665
  children: 'node',
5656
5666
  attributes: {
5657
5667
  scrollable: 'boolean',
5658
- style: {
5668
+ styles: {
5659
5669
  flexDirection: ['row', 'column'],
5660
5670
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
5661
5671
  alignItems: [
@@ -6095,7 +6105,7 @@ export const patterns = [
6095
6105
  children: 'never',
6096
6106
  attributes: {
6097
6107
  scrollable: 'boolean',
6098
- style: {
6108
+ styles: {
6099
6109
  flexDirection: ['row', 'column'],
6100
6110
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
6101
6111
  alignItems: [
@@ -6533,7 +6543,7 @@ export const patterns = [
6533
6543
  adjustsFontSizeToFit: 'boolean',
6534
6544
  showEllipsis: 'boolean',
6535
6545
  translateCounter: 'number',
6536
- style: {
6546
+ styles: {
6537
6547
  color: 'color',
6538
6548
  fontSize: 'size',
6539
6549
  fontFamily: 'fontFamily',
@@ -7033,7 +7043,7 @@ export const patterns = [
7033
7043
  children: 'node',
7034
7044
  attributes: {
7035
7045
  src: 'string',
7036
- style: {
7046
+ styles: {
7037
7047
  resizeMode: ['cover', 'contain', 'stretch', 'center'],
7038
7048
  flexDirection: ['row', 'column'],
7039
7049
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
@@ -7444,7 +7454,7 @@ export const patterns = [
7444
7454
  children: 'node',
7445
7455
  attributes: {
7446
7456
  scrollable: 'boolean',
7447
- style: {
7457
+ styles: {
7448
7458
  flexDirection: ['row', 'column'],
7449
7459
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
7450
7460
  alignItems: [
@@ -7834,7 +7844,7 @@ export const patterns = [
7834
7844
  children: 'node',
7835
7845
  attributes: {
7836
7846
  scrollable: 'boolean',
7837
- style: {
7847
+ styles: {
7838
7848
  flexDirection: ['row', 'column'],
7839
7849
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
7840
7850
  alignItems: [
@@ -8222,7 +8232,7 @@ export const patterns = [
8222
8232
  adjustsFontSizeToFit: 'boolean',
8223
8233
  showEllipsis: 'boolean',
8224
8234
  translateCounter: 'number',
8225
- style: {
8235
+ styles: {
8226
8236
  color: 'color',
8227
8237
  fontSize: 'size',
8228
8238
  fontFamily: 'fontFamily',
@@ -8663,7 +8673,7 @@ export const patterns = [
8663
8673
  adjustsFontSizeToFit: 'boolean',
8664
8674
  showEllipsis: 'boolean',
8665
8675
  translateCounter: 'number',
8666
- style: {
8676
+ styles: {
8667
8677
  color: 'color',
8668
8678
  fontSize: 'size',
8669
8679
  fontFamily: 'fontFamily',
@@ -9105,7 +9115,7 @@ export const patterns = [
9105
9115
  src: 'string',
9106
9116
  resizeMode: ['cover', 'contain', 'stretch', 'center'],
9107
9117
  scrollable: 'boolean',
9108
- style: {
9118
+ styles: {
9109
9119
  flexDirection: ['row', 'column'],
9110
9120
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
9111
9121
  alignItems: [
@@ -9509,7 +9519,7 @@ export const patterns = [
9509
9519
  adjustsFontSizeToFit: 'boolean',
9510
9520
  showEllipsis: 'boolean',
9511
9521
  translateCounter: 'number',
9512
- style: {
9522
+ styles: {
9513
9523
  color: 'color',
9514
9524
  fontSize: 'size',
9515
9525
  fontFamily: 'fontFamily',
@@ -9976,7 +9986,7 @@ export const patterns = [
9976
9986
  children: 'node',
9977
9987
  attributes: {
9978
9988
  scrollable: 'boolean',
9979
- style: {
9989
+ styles: {
9980
9990
  flexDirection: ['row', 'column'],
9981
9991
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
9982
9992
  alignItems: [
@@ -10357,7 +10367,7 @@ export const patterns = [
10357
10367
  children: 'node',
10358
10368
  attributes: {
10359
10369
  scrollable: 'boolean',
10360
- style: {
10370
+ styles: {
10361
10371
  flexDirection: ['row', 'column'],
10362
10372
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
10363
10373
  alignItems: [
@@ -10746,7 +10756,7 @@ export const patterns = [
10746
10756
  description: 'description',
10747
10757
  children: 'string',
10748
10758
  attributes: {
10749
- style: {
10759
+ styles: {
10750
10760
  color: 'color',
10751
10761
  fontSize: 'size',
10752
10762
  fontWeight: [
@@ -11173,7 +11183,7 @@ export const patterns = [
11173
11183
  adjustsFontSizeToFit: 'boolean',
11174
11184
  showEllipsis: 'boolean',
11175
11185
  translateCounter: 'number',
11176
- style: {
11186
+ styles: {
11177
11187
  color: 'color',
11178
11188
  fontSize: 'size',
11179
11189
  fontFamily: 'fontFamily',
@@ -11640,7 +11650,7 @@ export const patterns = [
11640
11650
  adjustsFontSizeToFit: 'boolean',
11641
11651
  showEllipsis: 'boolean',
11642
11652
  translateCounter: 'number',
11643
- style: {
11653
+ styles: {
11644
11654
  color: 'color',
11645
11655
  fontSize: 'size',
11646
11656
  fontFamily: 'fontFamily',
@@ -12083,7 +12093,7 @@ export const patterns = [
12083
12093
  adjustsFontSizeToFit: 'boolean',
12084
12094
  showEllipsis: 'boolean',
12085
12095
  translateCounter: 'number',
12086
- style: {
12096
+ styles: {
12087
12097
  color: 'color',
12088
12098
  fontSize: 'size',
12089
12099
  fontFamily: 'fontFamily',
@@ -12524,7 +12534,7 @@ export const patterns = [
12524
12534
  children: 'never',
12525
12535
  attributes: {
12526
12536
  scrollable: 'boolean',
12527
- style: {
12537
+ styles: {
12528
12538
  flexDirection: ['row', 'column'],
12529
12539
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
12530
12540
  alignItems: [
@@ -12925,7 +12935,7 @@ export const patterns = [
12925
12935
  description: 'description',
12926
12936
  children: 'never',
12927
12937
  attributes: {
12928
- style: {
12938
+ styles: {
12929
12939
  backgroundColor: 'color',
12930
12940
  width: 'size',
12931
12941
  height: 'size',
@@ -12981,7 +12991,7 @@ export const patterns = [
12981
12991
  children: 'never',
12982
12992
  attributes: {
12983
12993
  scrollable: 'boolean',
12984
- style: {
12994
+ styles: {
12985
12995
  flexDirection: ['row', 'column'],
12986
12996
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
12987
12997
  alignItems: [
@@ -13360,7 +13370,7 @@ export const patterns = [
13360
13370
  children: 'string',
13361
13371
  attributes: {
13362
13372
  scrollable: 'boolean',
13363
- style: {
13373
+ styles: {
13364
13374
  flexDirection: ['row', 'column'],
13365
13375
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
13366
13376
  alignItems: [
@@ -13801,7 +13811,7 @@ export const patterns = [
13801
13811
  children: 'node',
13802
13812
  attributes: {
13803
13813
  scrollable: 'boolean',
13804
- style: {
13814
+ styles: {
13805
13815
  flexDirection: ['row', 'column'],
13806
13816
  flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
13807
13817
  alignItems: [
@@ -2,7 +2,6 @@ import { NodeData, NodeDefaultAttribute } from '../types/Node';
2
2
  import { getDefaultsForType } from '../utils/patterns';
3
3
 
4
4
  type WithStyleBags = {
5
- style?: Record<string, unknown>;
6
5
  styles?: Record<string, unknown>;
7
6
  };
8
7
 
@@ -15,29 +14,16 @@ export default function useNode<
15
14
  const nodeAttributes = ((node.attributes as T) ?? ({} as T)) as T &
16
15
  WithStyleBags;
17
16
  const defaultAttributes = defaults as T & WithStyleBags;
18
- // Merge styles from both defaults and node (schemaVersion=2 uses `styles` only).
19
- // Read legacy `style` for back-compat with old persisted data, but output only `styles`.
20
- const defaultStyle = {
21
- ...(defaultAttributes?.style ?? {}),
17
+ // Deep-merge styles so default style values aren't lost when the node provides partial overrides.
18
+ const mergedStyle = {
22
19
  ...(defaultAttributes?.styles ?? {}),
23
- };
24
- const nodeStyle = {
25
- ...(nodeAttributes?.style ?? {}),
26
20
  ...(nodeAttributes?.styles ?? {}),
27
21
  };
28
- const mergedStyle = {
29
- ...defaultStyle,
30
- ...nodeStyle,
31
- };
32
22
  const mergedRecord: Record<string, unknown> = {
33
23
  ...(defaultAttributes as Record<string, unknown>),
34
24
  ...(nodeAttributes as Record<string, unknown>),
35
- // Deep merge styles so default style values aren't lost when the node provides partial overrides.
36
- // Only use `styles` (schemaVersion=2). Remove legacy `style` to avoid validator rejection.
37
25
  styles: mergedStyle,
38
26
  };
39
- // Remove legacy `style` key if it was inherited from defaults or node attributes.
40
- delete mergedRecord.style;
41
27
  if (
42
28
  typeof mergedRecord.styles === 'object' &&
43
29
  mergedRecord.styles != null &&
@@ -3,7 +3,12 @@ import { Icon } from './Icon.generated';
3
3
  import type { IconsType } from '../types/Icons.generated';
4
4
  import { useRenderStore } from '../store';
5
5
  import type { Localication } from '../types/PreviewConfig';
6
- import { InspectModal, LocalicationModal, Modal } from '../modals';
6
+ import {
7
+ InspectModal,
8
+ LocalicationModal,
9
+ Modal,
10
+ PromptManagerModal,
11
+ } from '../modals';
7
12
  import type { Node } from '../types/Node';
8
13
  import type { Project } from '../types/Project';
9
14
  import { DebugJsonPage } from '../pages/DebugJsonPage';
@@ -29,6 +34,7 @@ export function BottomBar({
29
34
  const debugIcon: IconsType = 'speedometer-03';
30
35
  const localizationIcon: IconsType = 'globe-01';
31
36
  const inspectIcon: IconsType = 'info-circle';
37
+ const promptAiIcon: IconsType = 'star';
32
38
 
33
39
  const {
34
40
  localization,
@@ -57,6 +63,7 @@ export function BottomBar({
57
63
  const [isDebugOpen, setIsDebugOpen] = useState(false);
58
64
  const [isLocalizationOpen, setIsLocalizationOpen] = useState(false);
59
65
  const [isInspectOpen, setIsInspectOpen] = useState(false);
66
+ const [isPromptManagerOpen, setIsPromptManagerOpen] = useState(false);
60
67
 
61
68
  const languages = useMemo(() => ['en', 'tr', 'ar'], []);
62
69
  const activeLanguage = defaultLanguage;
@@ -150,6 +157,18 @@ export function BottomBar({
150
157
  <Icon iconType={inspectIcon} size={20} color="currentColor" alt="" />
151
158
  </button>
152
159
 
160
+ <button
161
+ type="button"
162
+ className={`rb-bottom-bar__button${
163
+ isPromptManagerOpen ? ' is-active' : ''
164
+ }`}
165
+ aria-label="Prompt Manager"
166
+ aria-pressed={isPromptManagerOpen}
167
+ onClick={() => setIsPromptManagerOpen(true)}
168
+ >
169
+ <Icon iconType={promptAiIcon} size={20} color="currentColor" alt="" />
170
+ </button>
171
+
153
172
  <div className="rb-bottom-bar__spacer" />
154
173
 
155
174
  <div className="rb-bottom-bar__langs" aria-label="Language">
@@ -199,6 +218,14 @@ export function BottomBar({
199
218
  {isInspectOpen && (
200
219
  <InspectModal onClose={() => setIsInspectOpen(false)} />
201
220
  )}
221
+
222
+ {isPromptManagerOpen && (
223
+ <PromptManagerModal
224
+ data={data}
225
+ setData={setData}
226
+ onClose={() => setIsPromptManagerOpen(false)}
227
+ />
228
+ )}
202
229
  </>
203
230
  );
204
231
  }
@@ -36,19 +36,14 @@ export type BuilderProviderParams = {
36
36
  // but internally we prefer store values.
37
37
  mockProducts?: Products[];
38
38
  mockBenefits?: PaywallBenefits;
39
- mockTheme?: Theme;
40
- mockDefaultLanguage?: string;
39
+ selectedLanguage?: string;
40
+ selectedTheme?: Theme;
41
41
  localization?: Localication;
42
42
  baseSize?: BaseSize;
43
- // projectColors, fonts, previewMode, selectedKey kept as they are commonly used and not explicitly asked to rename
44
43
  projectColors?: ProjectColors;
45
44
  fonts?: Fonts;
46
45
  previewMode?: boolean;
47
46
  selectedKey?: string;
48
-
49
- // Derived / Convenience values provided by the context (populated from mock* if present)
50
- theme?: Theme;
51
- defaultLanguage?: string;
52
47
  };
53
48
 
54
49
  type BuilderProviderProps = {
@@ -63,17 +58,13 @@ const builderContext = createContext<BuilderProviderParams | undefined>(
63
58
  export function BuilderProvider({ params, children }: BuilderProviderProps) {
64
59
  // We rely purely on params passed from parent (which reads from store)
65
60
  const value = useMemo<BuilderProviderParams>(() => {
66
- const theme = params.mockTheme ?? defaultTheme;
67
- const lang = params.mockDefaultLanguage ?? defaultLanguage;
61
+ const lang = params.selectedLanguage ?? defaultLanguage;
68
62
  return {
69
63
  ...params,
70
- // Ensure defaults if mxissing
71
64
  mockProducts: params.mockProducts ?? [],
72
65
  mockBenefits: params.mockBenefits ?? {},
73
- mockTheme: theme,
74
- mockDefaultLanguage: lang,
75
- theme,
76
- defaultLanguage: lang,
66
+ selectedLanguage: lang,
67
+ selectedTheme: params.selectedTheme ?? defaultTheme,
77
68
  baseSize: params.baseSize ?? defaultBaseSize,
78
69
  projectColors: params.projectColors
79
70
  ? mergeProjectColors(defaultProjectColors, params.projectColors)
@@ -12,7 +12,7 @@ export function useLocalize(options?: {
12
12
  }): LocalizeFn {
13
13
  const {
14
14
  localization: builderLocalization,
15
- mockDefaultLanguage: builderDefaultLanguage,
15
+ selectedLanguage: builderDefaultLanguage,
16
16
  } = useBuilderParams();
17
17
  //TODO: genelle (react-native ksımına export et)
18
18
  const localization =
@@ -50,11 +50,16 @@ function normalizeStyleAttributes(node: Node, styleKeys: Set<string>): Node {
50
50
  }
51
51
 
52
52
  const nextAttrs: Record<string, unknown> = { ...(record.attributes ?? {}) };
53
- const prevStyle = isPlainObject(nextAttrs.style) ? nextAttrs.style : {};
54
- const nextStyle: Record<string, unknown> = { ...prevStyle };
53
+ // Read from both legacy `style` and `styles` for backwards compatibility.
54
+ const prevStyleLegacy = isPlainObject(nextAttrs.style) ? nextAttrs.style : {};
55
+ const prevStyles = isPlainObject(nextAttrs.styles) ? nextAttrs.styles : {};
56
+ const nextStyle: Record<string, unknown> = {
57
+ ...prevStyleLegacy,
58
+ ...prevStyles,
59
+ };
55
60
 
56
61
  for (const [k, v] of Object.entries(nextAttrs)) {
57
- if (k === 'style') continue;
62
+ if (k === 'style' || k === 'styles') continue;
58
63
  if (!styleKeys.has(k)) continue;
59
64
 
60
65
  // If already set in style, prefer style (drop legacy flat key).
@@ -62,8 +67,10 @@ function normalizeStyleAttributes(node: Node, styleKeys: Set<string>): Node {
62
67
  delete nextAttrs[k];
63
68
  }
64
69
 
70
+ // Always output as `styles` (schemaVersion=2). Remove legacy `style`.
71
+ delete nextAttrs.style;
65
72
  if (Object.keys(nextStyle).length > 0) {
66
- nextAttrs.style = nextStyle;
73
+ nextAttrs.styles = nextStyle;
67
74
  }
68
75
 
69
76
  return {
@@ -77,16 +84,16 @@ function getStyleSubSchemaKeys(
77
84
  schema: Record<string, unknown> | undefined,
78
85
  ): Set<string> {
79
86
  if (!schema) return new Set();
80
- const style = schema.style;
81
- if (!isPlainObject(style)) return new Set();
82
- return new Set(Object.keys(style));
87
+ const styles = schema.styles;
88
+ if (!isPlainObject(styles)) return new Set();
89
+ return new Set(Object.keys(styles));
83
90
  }
84
91
 
85
92
  function getTopLevelAttributeKeys(
86
93
  schema: Record<string, unknown> | undefined,
87
94
  ): Set<string> {
88
95
  if (!schema) return new Set();
89
- const keys = Object.keys(schema).filter((k) => k !== 'style');
96
+ const keys = Object.keys(schema).filter((k) => k !== 'styles');
90
97
  return new Set(keys);
91
98
  }
92
99
 
@@ -131,7 +138,18 @@ function extractAttributesFromStyle(
131
138
  }
132
139
 
133
140
  const nextAttrs: Record<string, unknown> = { ...(record.attributes ?? {}) };
134
- const style = nextAttrs.style;
141
+ // Read from both legacy `style` and canonical `styles`.
142
+ const legacyStyle = nextAttrs.style;
143
+ const canonicalStyles = nextAttrs.styles;
144
+ const style = isPlainObject(canonicalStyles)
145
+ ? canonicalStyles
146
+ : isPlainObject(legacyStyle)
147
+ ? legacyStyle
148
+ : undefined;
149
+
150
+ if (!style) {
151
+ return { ...record, children: nextChildren, attributes: nextAttrs };
152
+ }
135
153
 
136
154
  if (!isPlainObject(style)) {
137
155
  return { ...record, children: nextChildren, attributes: nextAttrs };
@@ -174,8 +192,11 @@ function extractAttributesFromStyle(
174
192
 
175
193
  if (Object.keys(nextStyle).length === 0) {
176
194
  delete nextAttrs.style;
195
+ delete nextAttrs.styles;
177
196
  } else {
178
- nextAttrs.style = nextStyle;
197
+ // Always output as `styles` (schemaVersion=2). Remove legacy `style`.
198
+ delete nextAttrs.style;
199
+ nextAttrs.styles = nextStyle;
179
200
  }
180
201
 
181
202
  return {