@developer_tribe/react-builder 1.2.30 → 1.2.32
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.
- package/dist/build-components/BIcon/BIcon.d.ts +1 -1
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -1
- package/dist/build-components/BackgroundImage/BackgroundImage.d.ts +1 -1
- package/dist/build-components/BackgroundImage/BackgroundImageProps.generated.d.ts +1 -1
- package/dist/build-components/Button/Button.d.ts +1 -1
- package/dist/build-components/Button/ButtonProps.generated.d.ts +1 -1
- package/dist/build-components/Carousel/CarouselProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselButtons/CarouselButtonsProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselDots/CarouselDotsProps.generated.d.ts +5 -1
- package/dist/build-components/CarouselItem/CarouselItemProps.generated.d.ts +1 -1
- package/dist/build-components/CarouselProvider/CarouselProviderProps.generated.d.ts +1 -1
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -1
- package/dist/build-components/Image/ImageProps.generated.d.ts +1 -1
- package/dist/build-components/Main/MainProps.generated.d.ts +1 -1
- package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -1
- package/dist/build-components/Onboard/OnboardProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardButton/OnboardButton.d.ts +1 -1
- package/dist/build-components/OnboardButton/OnboardButtonProps.generated.d.ts +2 -4
- package/dist/build-components/OnboardButtons/OnboardButtonsProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardDot/OnboardDot.d.ts +1 -1
- package/dist/build-components/OnboardDot/OnboardDotProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardProvider/OnboardProviderProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallBackground/PaywallBackgroundProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallCloseButton/PaywallCloseButton.d.ts +1 -1
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallOptions/PaywallOptionsProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallProvider/PaywallProviderProps.generated.d.ts +1 -1
- package/dist/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.d.ts +1 -1
- package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -1
- package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -1
- package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -1
- package/dist/build-components/RadioButton/RadioButtonProps.generated.d.ts +1 -1
- package/dist/build-components/Separator/SeparatorProps.generated.d.ts +1 -1
- package/dist/build-components/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
- package/dist/build-components/Text/Text.d.ts +1 -1
- package/dist/build-components/Text/TextProps.generated.d.ts +1 -1
- package/dist/build-components/View/ViewProps.generated.d.ts +1 -1
- package/dist/build-components/patterns.generated.d.ts +73 -69
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +4 -4
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +4 -4
- package/dist/index.web.esm.js.map +1 -1
- package/dist/utils/attributeStyle.d.ts +2 -2
- package/dist/utils/patterns.d.ts +2 -2
- package/dist/utils/useMergedStyle.d.ts +1 -1
- package/package.json +1 -1
- package/scripts/prebuild/utils/createGeneratedProps.js +9 -9
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +9 -9
- package/src/RenderPage.tsx +42 -1
- package/src/assets/meta.json +1 -1
- package/src/assets/samples/vpn-onboard-1.json +21 -45
- package/src/assets/samples/vpn-onboard-2.json +21 -45
- package/src/assets/samples/vpn-onboard-3.json +21 -53
- package/src/assets/samples/vpn-onboard-4.json +21 -21
- package/src/assets/samples/vpn-onboard-5.json +33 -33
- package/src/assets/samples/vpn-onboard-6.json +21 -21
- package/src/assets/samples/vpn-onboard-7.json +21 -21
- package/src/build-components/BIcon/BIcon.tsx +1 -1
- package/src/build-components/BIcon/BIconProps.generated.ts +1 -1
- package/src/build-components/BIcon/pattern.json +4 -2
- package/src/build-components/BackgroundImage/BackgroundImage.tsx +2 -2
- package/src/build-components/BackgroundImage/BackgroundImageProps.generated.ts +1 -1
- package/src/build-components/BackgroundImage/pattern.json +11 -3
- package/src/build-components/Button/Button.tsx +3 -3
- package/src/build-components/Button/ButtonProps.generated.ts +1 -1
- package/src/build-components/Button/pattern.json +5 -3
- package/src/build-components/Carousel/CarouselProps.generated.ts +1 -1
- package/src/build-components/Carousel/pattern.json +9 -3
- package/src/build-components/CarouselButtons/CarouselButtonsProps.generated.ts +1 -1
- package/src/build-components/CarouselDots/CarouselDots.tsx +8 -17
- package/src/build-components/CarouselDots/CarouselDotsProps.generated.ts +5 -1
- package/src/build-components/CarouselDots/pattern.json +12 -1
- package/src/build-components/CarouselItem/CarouselItemProps.generated.ts +1 -1
- package/src/build-components/CarouselProvider/CarouselProviderProps.generated.ts +1 -1
- package/src/build-components/CarouselProvider/pattern.json +5 -2
- package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
- package/src/build-components/CountDown/pattern.json +4 -2
- package/src/build-components/Image/ImageProps.generated.ts +1 -1
- package/src/build-components/Image/pattern.json +11 -4
- package/src/build-components/Main/Main.tsx +1 -0
- package/src/build-components/Main/MainProps.generated.ts +1 -1
- package/src/build-components/Main/pattern.json +4 -2
- package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -1
- package/src/build-components/NavigationBarColor/pattern.json +5 -3
- package/src/build-components/Onboard/OnboardProps.generated.ts +1 -1
- package/src/build-components/Onboard/pattern.json +7 -3
- package/src/build-components/OnboardButton/OnboardButton.tsx +3 -22
- package/src/build-components/OnboardButton/OnboardButtonProps.generated.ts +2 -4
- package/src/build-components/OnboardButton/pattern.json +42 -44
- package/src/build-components/OnboardButtons/OnboardButtonsProps.generated.ts +1 -1
- package/src/build-components/OnboardButtons/pattern.json +16 -5
- package/src/build-components/OnboardDot/OnboardDot.tsx +10 -22
- package/src/build-components/OnboardDot/OnboardDotProps.generated.ts +1 -1
- package/src/build-components/OnboardDot/pattern.json +6 -3
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -1
- package/src/build-components/OnboardFooter/pattern.json +4 -2
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +1 -1
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +1 -1
- package/src/build-components/OnboardItem/pattern.json +12 -4
- package/src/build-components/OnboardProvider/OnboardProviderProps.generated.ts +1 -1
- package/src/build-components/OnboardProvider/pattern.json +9 -3
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -1
- package/src/build-components/OnboardSubtitle/pattern.json +5 -2
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -1
- package/src/build-components/OnboardTitle/pattern.json +5 -2
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
- package/src/build-components/PaywallBackground/pattern.json +4 -2
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +2 -2
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallCloseButton/pattern.json +4 -2
- package/src/build-components/PaywallOptions/PaywallOptionsProps.generated.ts +1 -1
- package/src/build-components/PaywallOptions/pattern.json +4 -2
- package/src/build-components/PaywallProvider/PaywallProviderProps.generated.ts +1 -1
- package/src/build-components/PaywallProvider/pattern.json +4 -2
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallSubscribeButton/pattern.json +4 -2
- package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -1
- package/src/build-components/PriceTag/pattern.json +10 -4
- package/src/build-components/Pricing/PricingProps.generated.ts +1 -1
- package/src/build-components/Pricing/pattern.json +4 -2
- package/src/build-components/Promo/PromoProps.generated.ts +1 -1
- package/src/build-components/Promo/pattern.json +4 -2
- package/src/build-components/RadioButton/RadioButton.tsx +6 -3
- package/src/build-components/RadioButton/RadioButtonProps.generated.ts +1 -1
- package/src/build-components/RenderNode.generated.tsx +7 -7
- package/src/build-components/Separator/SeparatorProps.generated.ts +1 -1
- package/src/build-components/Separator/pattern.json +5 -3
- package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
- package/src/build-components/StatusBarColor/pattern.json +5 -3
- package/src/build-components/Text/Text.tsx +2 -2
- package/src/build-components/Text/TextProps.generated.ts +1 -1
- package/src/build-components/Text/pattern.json +5 -3
- package/src/build-components/View/ViewProps.generated.ts +1 -1
- package/src/build-components/View/pattern.json +18 -6
- package/src/build-components/patterns.generated.ts +73 -69
- package/src/build-components/useNode.ts +2 -16
- package/src/components/BuilderProvider.tsx +1 -1
- package/src/hooks/useLocalize.ts +1 -1
- package/src/migrations/migrations/1.1.2_extract_component_attributes_from_style.ts +31 -10
- package/src/utils/analyseNodeByPatterns.ts +2 -2
- package/src/utils/attributeStyle.ts +9 -3
- package/src/utils/extractImageStyle.ts +4 -4
- package/src/utils/patterns.ts +3 -3
- package/src/utils/projectColors.ts +3 -2
- package/src/utils/useMergedStyle.ts +9 -7
|
@@ -13,7 +13,7 @@ export const patterns = [
|
|
|
13
13
|
adjustsFontSizeToFit: 'boolean',
|
|
14
14
|
showEllipsis: 'boolean',
|
|
15
15
|
translateCounter: 'number',
|
|
16
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2075
|
+
styles: {
|
|
2076
2076
|
flexDirection: ['row', 'column'],
|
|
2077
2077
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
2078
2078
|
alignItems: [
|
|
@@ -2129,6 +2129,10 @@ export const patterns = [
|
|
|
2129
2129
|
'sliding_dot',
|
|
2130
2130
|
'liquid_like',
|
|
2131
2131
|
],
|
|
2132
|
+
dot_thickness: 'size',
|
|
2133
|
+
inactive_dot_opacity: 'number',
|
|
2134
|
+
inactive_dot_color: 'color',
|
|
2135
|
+
active_dot_color: 'color',
|
|
2132
2136
|
},
|
|
2133
2137
|
},
|
|
2134
2138
|
meta: {
|
|
@@ -2453,6 +2457,11 @@ export const patterns = [
|
|
|
2453
2457
|
flexGrow: 0,
|
|
2454
2458
|
flexShrink: 0,
|
|
2455
2459
|
},
|
|
2460
|
+
dotType: 'expanding_dot',
|
|
2461
|
+
dot_thickness: 10,
|
|
2462
|
+
inactive_dot_opacity: 0.3,
|
|
2463
|
+
active_dot_color: 'STATIC_COLORS.ONBOARD_DOT_ACTIVE',
|
|
2464
|
+
inactive_dot_color: 'THEME_COLORS.BACKGROUND',
|
|
2456
2465
|
},
|
|
2457
2466
|
types: {},
|
|
2458
2467
|
},
|
|
@@ -2465,7 +2474,7 @@ export const patterns = [
|
|
|
2465
2474
|
children: 'node',
|
|
2466
2475
|
attributes: {
|
|
2467
2476
|
scrollable: 'boolean',
|
|
2468
|
-
|
|
2477
|
+
styles: {
|
|
2469
2478
|
flexDirection: ['row', 'column'],
|
|
2470
2479
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
2471
2480
|
alignItems: [
|
|
@@ -2843,7 +2852,7 @@ export const patterns = [
|
|
|
2843
2852
|
children: 'node',
|
|
2844
2853
|
attributes: {
|
|
2845
2854
|
scrollable: 'boolean',
|
|
2846
|
-
|
|
2855
|
+
styles: {
|
|
2847
2856
|
flexDirection: ['row', 'column'],
|
|
2848
2857
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
2849
2858
|
alignItems: [
|
|
@@ -3226,7 +3235,7 @@ export const patterns = [
|
|
|
3226
3235
|
adjustsFontSizeToFit: 'boolean',
|
|
3227
3236
|
showEllipsis: 'boolean',
|
|
3228
3237
|
translateCounter: 'number',
|
|
3229
|
-
|
|
3238
|
+
styles: {
|
|
3230
3239
|
color: 'color',
|
|
3231
3240
|
fontSize: 'size',
|
|
3232
3241
|
fontFamily: 'fontFamily',
|
|
@@ -3674,7 +3683,7 @@ export const patterns = [
|
|
|
3674
3683
|
children: 'never',
|
|
3675
3684
|
attributes: {
|
|
3676
3685
|
scrollable: 'boolean',
|
|
3677
|
-
|
|
3686
|
+
styles: {
|
|
3678
3687
|
flexDirection: ['row', 'column'],
|
|
3679
3688
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
3680
3689
|
alignItems: [
|
|
@@ -4069,7 +4078,7 @@ export const patterns = [
|
|
|
4069
4078
|
children: 'node',
|
|
4070
4079
|
attributes: {
|
|
4071
4080
|
scrollable: 'boolean',
|
|
4072
|
-
|
|
4081
|
+
styles: {
|
|
4073
4082
|
flexDirection: ['row', 'column'],
|
|
4074
4083
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
4075
4084
|
alignItems: [
|
|
@@ -4462,7 +4471,7 @@ export const patterns = [
|
|
|
4462
4471
|
children: 'never',
|
|
4463
4472
|
attributes: {
|
|
4464
4473
|
scrollable: 'boolean',
|
|
4465
|
-
|
|
4474
|
+
styles: {
|
|
4466
4475
|
flexDirection: ['row', 'column'],
|
|
4467
4476
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
4468
4477
|
alignItems: [
|
|
@@ -4841,7 +4850,7 @@ export const patterns = [
|
|
|
4841
4850
|
children: 'node',
|
|
4842
4851
|
attributes: {
|
|
4843
4852
|
scrollable: 'boolean',
|
|
4844
|
-
|
|
4853
|
+
styles: {
|
|
4845
4854
|
flexDirection: ['row', 'column'],
|
|
4846
4855
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
4847
4856
|
alignItems: [
|
|
@@ -5220,7 +5229,7 @@ export const patterns = [
|
|
|
5220
5229
|
children: 'never',
|
|
5221
5230
|
attributes: {
|
|
5222
5231
|
scrollable: 'boolean',
|
|
5223
|
-
|
|
5232
|
+
styles: {
|
|
5224
5233
|
flexDirection: ['row', 'column'],
|
|
5225
5234
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
5226
5235
|
alignItems: [
|
|
@@ -5268,9 +5277,9 @@ export const patterns = [
|
|
|
5268
5277
|
left: 'size',
|
|
5269
5278
|
right: 'size',
|
|
5270
5279
|
zIndex: 'number',
|
|
5280
|
+
color: 'color',
|
|
5271
5281
|
},
|
|
5272
5282
|
labelKey: 'string',
|
|
5273
|
-
button_text_color: 'color',
|
|
5274
5283
|
animation: [
|
|
5275
5284
|
'simple-animation',
|
|
5276
5285
|
'line-animation',
|
|
@@ -5279,8 +5288,6 @@ export const patterns = [
|
|
|
5279
5288
|
'blur-line-animation',
|
|
5280
5289
|
],
|
|
5281
5290
|
animation_color: 'color',
|
|
5282
|
-
button_background_color: 'color',
|
|
5283
|
-
flex: 'number',
|
|
5284
5291
|
events: 'EventObject[]',
|
|
5285
5292
|
},
|
|
5286
5293
|
},
|
|
@@ -5330,34 +5337,6 @@ export const patterns = [
|
|
|
5330
5337
|
sort: 21,
|
|
5331
5338
|
preferredScale: 's',
|
|
5332
5339
|
},
|
|
5333
|
-
button_text_color: {
|
|
5334
|
-
label: 'Button Text Color',
|
|
5335
|
-
description: 'Text color of the button.',
|
|
5336
|
-
category: 'style',
|
|
5337
|
-
specialCategory: null,
|
|
5338
|
-
sort: 2,
|
|
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
|
-
button_background_color: {
|
|
5355
|
-
label: 'Button Background Color',
|
|
5356
|
-
description: 'Background color of the button.',
|
|
5357
|
-
category: 'style',
|
|
5358
|
-
specialCategory: null,
|
|
5359
|
-
sort: 5,
|
|
5360
|
-
},
|
|
5361
5340
|
},
|
|
5362
5341
|
attributes: {
|
|
5363
5342
|
scrollable: {
|
|
@@ -5565,9 +5544,9 @@ export const patterns = [
|
|
|
5565
5544
|
},
|
|
5566
5545
|
flex: {
|
|
5567
5546
|
label: 'Flex',
|
|
5568
|
-
description: 'Flex grow
|
|
5547
|
+
description: 'Flex grow factor (e.g. 1 fills available space).',
|
|
5569
5548
|
category: 'container',
|
|
5570
|
-
specialCategory:
|
|
5549
|
+
specialCategory: 'size',
|
|
5571
5550
|
sort: 6,
|
|
5572
5551
|
},
|
|
5573
5552
|
position: {
|
|
@@ -5630,6 +5609,29 @@ export const patterns = [
|
|
|
5630
5609
|
specialCategory: null,
|
|
5631
5610
|
sort: 7,
|
|
5632
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
|
+
},
|
|
5633
5635
|
},
|
|
5634
5636
|
},
|
|
5635
5637
|
defaults: {
|
|
@@ -5642,6 +5644,7 @@ export const patterns = [
|
|
|
5642
5644
|
flexShrink: 0,
|
|
5643
5645
|
height: '40@vs',
|
|
5644
5646
|
borderRadius: '12@s',
|
|
5647
|
+
color: 'THEME_COLORS.ONBOARD_BUTTON_PRIMARY_TEXT',
|
|
5645
5648
|
},
|
|
5646
5649
|
},
|
|
5647
5650
|
types: {
|
|
@@ -5662,7 +5665,7 @@ export const patterns = [
|
|
|
5662
5665
|
children: 'node',
|
|
5663
5666
|
attributes: {
|
|
5664
5667
|
scrollable: 'boolean',
|
|
5665
|
-
|
|
5668
|
+
styles: {
|
|
5666
5669
|
flexDirection: ['row', 'column'],
|
|
5667
5670
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
5668
5671
|
alignItems: [
|
|
@@ -6102,7 +6105,7 @@ export const patterns = [
|
|
|
6102
6105
|
children: 'never',
|
|
6103
6106
|
attributes: {
|
|
6104
6107
|
scrollable: 'boolean',
|
|
6105
|
-
|
|
6108
|
+
styles: {
|
|
6106
6109
|
flexDirection: ['row', 'column'],
|
|
6107
6110
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
6108
6111
|
alignItems: [
|
|
@@ -6524,7 +6527,8 @@ export const patterns = [
|
|
|
6524
6527
|
dotType: 'expanding_dot',
|
|
6525
6528
|
dot_thickness: 10,
|
|
6526
6529
|
inactive_dot_opacity: 0.3,
|
|
6527
|
-
active_dot_color: '
|
|
6530
|
+
active_dot_color: 'STATIC_COLORS.ONBOARD_DOT_ACTIVE',
|
|
6531
|
+
inactive_dot_color: 'THEME_COLORS.BACKGROUND',
|
|
6528
6532
|
},
|
|
6529
6533
|
types: {},
|
|
6530
6534
|
},
|
|
@@ -6539,7 +6543,7 @@ export const patterns = [
|
|
|
6539
6543
|
adjustsFontSizeToFit: 'boolean',
|
|
6540
6544
|
showEllipsis: 'boolean',
|
|
6541
6545
|
translateCounter: 'number',
|
|
6542
|
-
|
|
6546
|
+
styles: {
|
|
6543
6547
|
color: 'color',
|
|
6544
6548
|
fontSize: 'size',
|
|
6545
6549
|
fontFamily: 'fontFamily',
|
|
@@ -7039,7 +7043,7 @@ export const patterns = [
|
|
|
7039
7043
|
children: 'node',
|
|
7040
7044
|
attributes: {
|
|
7041
7045
|
src: 'string',
|
|
7042
|
-
|
|
7046
|
+
styles: {
|
|
7043
7047
|
resizeMode: ['cover', 'contain', 'stretch', 'center'],
|
|
7044
7048
|
flexDirection: ['row', 'column'],
|
|
7045
7049
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
@@ -7450,7 +7454,7 @@ export const patterns = [
|
|
|
7450
7454
|
children: 'node',
|
|
7451
7455
|
attributes: {
|
|
7452
7456
|
scrollable: 'boolean',
|
|
7453
|
-
|
|
7457
|
+
styles: {
|
|
7454
7458
|
flexDirection: ['row', 'column'],
|
|
7455
7459
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
7456
7460
|
alignItems: [
|
|
@@ -7840,7 +7844,7 @@ export const patterns = [
|
|
|
7840
7844
|
children: 'node',
|
|
7841
7845
|
attributes: {
|
|
7842
7846
|
scrollable: 'boolean',
|
|
7843
|
-
|
|
7847
|
+
styles: {
|
|
7844
7848
|
flexDirection: ['row', 'column'],
|
|
7845
7849
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
7846
7850
|
alignItems: [
|
|
@@ -8228,7 +8232,7 @@ export const patterns = [
|
|
|
8228
8232
|
adjustsFontSizeToFit: 'boolean',
|
|
8229
8233
|
showEllipsis: 'boolean',
|
|
8230
8234
|
translateCounter: 'number',
|
|
8231
|
-
|
|
8235
|
+
styles: {
|
|
8232
8236
|
color: 'color',
|
|
8233
8237
|
fontSize: 'size',
|
|
8234
8238
|
fontFamily: 'fontFamily',
|
|
@@ -8669,7 +8673,7 @@ export const patterns = [
|
|
|
8669
8673
|
adjustsFontSizeToFit: 'boolean',
|
|
8670
8674
|
showEllipsis: 'boolean',
|
|
8671
8675
|
translateCounter: 'number',
|
|
8672
|
-
|
|
8676
|
+
styles: {
|
|
8673
8677
|
color: 'color',
|
|
8674
8678
|
fontSize: 'size',
|
|
8675
8679
|
fontFamily: 'fontFamily',
|
|
@@ -9111,7 +9115,7 @@ export const patterns = [
|
|
|
9111
9115
|
src: 'string',
|
|
9112
9116
|
resizeMode: ['cover', 'contain', 'stretch', 'center'],
|
|
9113
9117
|
scrollable: 'boolean',
|
|
9114
|
-
|
|
9118
|
+
styles: {
|
|
9115
9119
|
flexDirection: ['row', 'column'],
|
|
9116
9120
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
9117
9121
|
alignItems: [
|
|
@@ -9515,7 +9519,7 @@ export const patterns = [
|
|
|
9515
9519
|
adjustsFontSizeToFit: 'boolean',
|
|
9516
9520
|
showEllipsis: 'boolean',
|
|
9517
9521
|
translateCounter: 'number',
|
|
9518
|
-
|
|
9522
|
+
styles: {
|
|
9519
9523
|
color: 'color',
|
|
9520
9524
|
fontSize: 'size',
|
|
9521
9525
|
fontFamily: 'fontFamily',
|
|
@@ -9982,7 +9986,7 @@ export const patterns = [
|
|
|
9982
9986
|
children: 'node',
|
|
9983
9987
|
attributes: {
|
|
9984
9988
|
scrollable: 'boolean',
|
|
9985
|
-
|
|
9989
|
+
styles: {
|
|
9986
9990
|
flexDirection: ['row', 'column'],
|
|
9987
9991
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
9988
9992
|
alignItems: [
|
|
@@ -10363,7 +10367,7 @@ export const patterns = [
|
|
|
10363
10367
|
children: 'node',
|
|
10364
10368
|
attributes: {
|
|
10365
10369
|
scrollable: 'boolean',
|
|
10366
|
-
|
|
10370
|
+
styles: {
|
|
10367
10371
|
flexDirection: ['row', 'column'],
|
|
10368
10372
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
10369
10373
|
alignItems: [
|
|
@@ -10752,7 +10756,7 @@ export const patterns = [
|
|
|
10752
10756
|
description: 'description',
|
|
10753
10757
|
children: 'string',
|
|
10754
10758
|
attributes: {
|
|
10755
|
-
|
|
10759
|
+
styles: {
|
|
10756
10760
|
color: 'color',
|
|
10757
10761
|
fontSize: 'size',
|
|
10758
10762
|
fontWeight: [
|
|
@@ -11179,7 +11183,7 @@ export const patterns = [
|
|
|
11179
11183
|
adjustsFontSizeToFit: 'boolean',
|
|
11180
11184
|
showEllipsis: 'boolean',
|
|
11181
11185
|
translateCounter: 'number',
|
|
11182
|
-
|
|
11186
|
+
styles: {
|
|
11183
11187
|
color: 'color',
|
|
11184
11188
|
fontSize: 'size',
|
|
11185
11189
|
fontFamily: 'fontFamily',
|
|
@@ -11646,7 +11650,7 @@ export const patterns = [
|
|
|
11646
11650
|
adjustsFontSizeToFit: 'boolean',
|
|
11647
11651
|
showEllipsis: 'boolean',
|
|
11648
11652
|
translateCounter: 'number',
|
|
11649
|
-
|
|
11653
|
+
styles: {
|
|
11650
11654
|
color: 'color',
|
|
11651
11655
|
fontSize: 'size',
|
|
11652
11656
|
fontFamily: 'fontFamily',
|
|
@@ -12089,7 +12093,7 @@ export const patterns = [
|
|
|
12089
12093
|
adjustsFontSizeToFit: 'boolean',
|
|
12090
12094
|
showEllipsis: 'boolean',
|
|
12091
12095
|
translateCounter: 'number',
|
|
12092
|
-
|
|
12096
|
+
styles: {
|
|
12093
12097
|
color: 'color',
|
|
12094
12098
|
fontSize: 'size',
|
|
12095
12099
|
fontFamily: 'fontFamily',
|
|
@@ -12530,7 +12534,7 @@ export const patterns = [
|
|
|
12530
12534
|
children: 'never',
|
|
12531
12535
|
attributes: {
|
|
12532
12536
|
scrollable: 'boolean',
|
|
12533
|
-
|
|
12537
|
+
styles: {
|
|
12534
12538
|
flexDirection: ['row', 'column'],
|
|
12535
12539
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
12536
12540
|
alignItems: [
|
|
@@ -12931,7 +12935,7 @@ export const patterns = [
|
|
|
12931
12935
|
description: 'description',
|
|
12932
12936
|
children: 'never',
|
|
12933
12937
|
attributes: {
|
|
12934
|
-
|
|
12938
|
+
styles: {
|
|
12935
12939
|
backgroundColor: 'color',
|
|
12936
12940
|
width: 'size',
|
|
12937
12941
|
height: 'size',
|
|
@@ -12987,7 +12991,7 @@ export const patterns = [
|
|
|
12987
12991
|
children: 'never',
|
|
12988
12992
|
attributes: {
|
|
12989
12993
|
scrollable: 'boolean',
|
|
12990
|
-
|
|
12994
|
+
styles: {
|
|
12991
12995
|
flexDirection: ['row', 'column'],
|
|
12992
12996
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
12993
12997
|
alignItems: [
|
|
@@ -13366,7 +13370,7 @@ export const patterns = [
|
|
|
13366
13370
|
children: 'string',
|
|
13367
13371
|
attributes: {
|
|
13368
13372
|
scrollable: 'boolean',
|
|
13369
|
-
|
|
13373
|
+
styles: {
|
|
13370
13374
|
flexDirection: ['row', 'column'],
|
|
13371
13375
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
13372
13376
|
alignItems: [
|
|
@@ -13807,7 +13811,7 @@ export const patterns = [
|
|
|
13807
13811
|
children: 'node',
|
|
13808
13812
|
attributes: {
|
|
13809
13813
|
scrollable: 'boolean',
|
|
13810
|
-
|
|
13814
|
+
styles: {
|
|
13811
13815
|
flexDirection: ['row', 'column'],
|
|
13812
13816
|
flexWrap: ['nowrap', 'wrap', 'wrap-reverse'],
|
|
13813
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
|
-
//
|
|
19
|
-
|
|
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 &&
|
|
@@ -67,7 +67,7 @@ export function BuilderProvider({ params, children }: BuilderProviderProps) {
|
|
|
67
67
|
const lang = params.mockDefaultLanguage ?? defaultLanguage;
|
|
68
68
|
return {
|
|
69
69
|
...params,
|
|
70
|
-
// Ensure defaults if
|
|
70
|
+
// Ensure defaults if mxissing
|
|
71
71
|
mockProducts: params.mockProducts ?? [],
|
|
72
72
|
mockBenefits: params.mockBenefits ?? {},
|
|
73
73
|
mockTheme: theme,
|
package/src/hooks/useLocalize.ts
CHANGED
|
@@ -14,7 +14,7 @@ export function useLocalize(options?: {
|
|
|
14
14
|
localization: builderLocalization,
|
|
15
15
|
mockDefaultLanguage: builderDefaultLanguage,
|
|
16
16
|
} = useBuilderParams();
|
|
17
|
-
|
|
17
|
+
//TODO: genelle (react-native ksımına export et)
|
|
18
18
|
const localization =
|
|
19
19
|
options?.localization ?? builderLocalization ?? defaultLocalization;
|
|
20
20
|
const defaultLanguage =
|
|
@@ -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
|
-
|
|
54
|
-
const
|
|
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.
|
|
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
|
|
81
|
-
if (!isPlainObject(
|
|
82
|
-
return new Set(Object.keys(
|
|
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 !== '
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
@@ -22,7 +22,7 @@ export type AnalyseResultWithPath = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
type AttributeTypeSpec = string | string[];
|
|
25
|
-
// schema v2 supports nesting style specs under `attributes.
|
|
25
|
+
// schema v2 supports nesting style specs under `attributes.styles` (one level deep)
|
|
26
26
|
type NestedAttributeSchema = Record<string, AttributeTypeSpec>;
|
|
27
27
|
type AttributeSchema = Record<
|
|
28
28
|
string,
|
|
@@ -60,7 +60,7 @@ function getStyleSubSchema(
|
|
|
60
60
|
schema: AttributeSchema | undefined,
|
|
61
61
|
): AttributeSchema {
|
|
62
62
|
if (!schema) return {};
|
|
63
|
-
const maybe = schema.
|
|
63
|
+
const maybe = schema.styles;
|
|
64
64
|
if (!maybe) return {};
|
|
65
65
|
if (typeof maybe === 'string' || Array.isArray(maybe)) return {};
|
|
66
66
|
return (maybe ?? {}) as AttributeSchema;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared utilities for attribute/style bag access.
|
|
3
|
-
* schemaVersion=2 uses `attributes.styles
|
|
3
|
+
* schemaVersion=2 uses `attributes.styles` exclusively.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import type { NodeDefaultAttribute } from '../types/Node';
|
|
7
7
|
|
|
8
|
-
/** Returns styles
|
|
8
|
+
/** Returns styles bag from attributes (schemaVersion=2 uses `styles` only). Throws if legacy `style` is found. */
|
|
9
9
|
export function getStyleBag(
|
|
10
10
|
attributes: NodeDefaultAttribute | undefined,
|
|
11
11
|
): Record<string, unknown> | undefined {
|
|
12
12
|
const record = toAttributeRecord(attributes);
|
|
13
|
-
|
|
13
|
+
if ('style' in record && record.style != null) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
'[getStyleBag] Legacy "style" key detected in attributes. Use "styles" instead (schemaVersion=2).',
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const bag = record.styles;
|
|
14
19
|
return isPlainObject(bag) ? (bag as Record<string, unknown>) : undefined;
|
|
15
20
|
}
|
|
16
21
|
|
|
22
|
+
//TODO: sil
|
|
17
23
|
/** Safe indexed access to attributes. Use for reading style/direct props. */
|
|
18
24
|
export function toAttributeRecord(
|
|
19
25
|
attributes: unknown,
|
|
@@ -19,9 +19,9 @@ export function extractImageStyle<T extends ImagePropsGenerated['attributes']>(
|
|
|
19
19
|
|
|
20
20
|
if (!attributes) return style;
|
|
21
21
|
|
|
22
|
-
// Map resizeMode to CSS object-fit (schemaVersion=2 uses `styles
|
|
22
|
+
// Map resizeMode to CSS object-fit (schemaVersion=2 uses `styles`)
|
|
23
23
|
const stylesBag = getStyleBag(attributes) as
|
|
24
|
-
| ImagePropsGenerated['attributes']['
|
|
24
|
+
| ImagePropsGenerated['attributes']['styles']
|
|
25
25
|
| undefined;
|
|
26
26
|
const resizeMode: ResizeModeOptionType | undefined =
|
|
27
27
|
stylesBag?.resizeMode ?? (attributes as any).resizeMode;
|
|
@@ -40,9 +40,9 @@ export function extractImageStyleNative<
|
|
|
40
40
|
const attributes = node.attributes;
|
|
41
41
|
if (!attributes) return {};
|
|
42
42
|
|
|
43
|
-
// schemaVersion=2 uses `styles
|
|
43
|
+
// schemaVersion=2 uses `styles`
|
|
44
44
|
const nativeStylesBag = getStyleBag(attributes) as
|
|
45
|
-
| ImagePropsGenerated['attributes']['
|
|
45
|
+
| ImagePropsGenerated['attributes']['styles']
|
|
46
46
|
| undefined;
|
|
47
47
|
const resizeMode: ResizeModeOptionType | undefined =
|
|
48
48
|
nativeStylesBag?.resizeMode ?? (attributes as any).resizeMode;
|
package/src/utils/patterns.ts
CHANGED
|
@@ -73,7 +73,7 @@ function normalizePlatform(platform?: BuilderPlatform | null): BuilderPlatform {
|
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Keys that conceptually behave like component props (behavior/flags) rather than
|
|
76
|
-
* style properties. These should NOT be normalized into `attributes.
|
|
76
|
+
* style properties. These should NOT be normalized into `attributes.styles`.
|
|
77
77
|
*/
|
|
78
78
|
export const NON_STYLE_ATTRIBUTE_KEYS = new Set<string>([
|
|
79
79
|
'scrollable',
|
|
@@ -82,7 +82,7 @@ export const NON_STYLE_ATTRIBUTE_KEYS = new Set<string>([
|
|
|
82
82
|
]);
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* schemaVersion=2 stores style-like keys inside `attributes.
|
|
85
|
+
* schemaVersion=2 stores style-like keys inside `attributes.styles`.
|
|
86
86
|
*
|
|
87
87
|
* We treat View+Text schema keys as style-like by default, but explicitly exclude
|
|
88
88
|
* known non-style props (behavior flags).
|
|
@@ -97,7 +97,7 @@ export function getStyleAttributeKeySet(): Set<string> {
|
|
|
97
97
|
unknown
|
|
98
98
|
>;
|
|
99
99
|
const getNestedStyleKeys = (schema: Record<string, unknown>): string[] => {
|
|
100
|
-
const nested = schema.
|
|
100
|
+
const nested = schema.styles;
|
|
101
101
|
return typeof nested === 'object' && nested
|
|
102
102
|
? Object.keys(nested)
|
|
103
103
|
: Object.keys(schema);
|