@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.
- package/dist/build-components/BIcon/BIconProps.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 +2 -0
- package/dist/build-components/NavigationBarColor/NavigationBarColorProps.generated.d.ts +1 -40
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardImage/OnboardImageProps.generated.d.ts +3 -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/PaywallCloseButtonProps.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/StatusBarColor/StatusBarColorProps.generated.d.ts +1 -1
- package/dist/build-components/patterns.generated.d.ts +51 -356
- package/dist/components/BuilderProvider.d.ts +1 -0
- package/dist/components/DeviceButton.d.ts +4 -1
- 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/mockOS/context/MockOSContext.d.ts +3 -1
- package/dist/size-matters/index.d.ts +1 -1
- package/dist/store.d.ts +6 -0
- package/dist/styles.css +1 -1
- package/dist/types/Device.d.ts +5 -0
- package/dist/utils/extractTextStyle/extractTextStyle.d.ts +1 -0
- package/dist/utils/extractViewStyle/extractViewStyle.d.ts +1 -0
- package/package.json +1 -1
- package/scripts/prebuild/assets/prompt_scheme.md +7 -0
- package/src/DeviceMockFrame.tsx +8 -0
- package/src/RenderPage.tsx +3 -0
- package/src/assets/devices.json +747 -183
- package/src/assets/meta.json +1 -1
- package/src/assets/prompt-scheme-onboard.generated.ts +1 -1
- package/src/assets/prompt-scheme-paywall.generated.ts +1 -1
- package/src/assets/samples/carousel-sample.json +30 -26
- package/src/assets/samples/paywall-1.json +30 -30
- package/src/assets/samples/paywall-2.json +26 -26
- package/src/assets/samples/paywall-app-delete-offer.json +27 -27
- package/src/assets/samples/paywall-app-open-offer.json +27 -27
- package/src/assets/samples/paywall-back-offer.json +27 -27
- package/src/assets/samples/paywall-notification-offer.json +27 -27
- package/src/assets/samples/simple-1.json +4 -4
- package/src/assets/samples/simple-2.json +25 -25
- package/src/assets/samples/unmigrated-builder-1.1.1.json +7 -7
- package/src/assets/samples/unmigrated-builder1.json +4 -4
- package/src/assets/samples/unvalidated-builder1.json +4 -4
- package/src/assets/samples/unvalidated-crash1.json +2 -2
- package/src/assets/samples/unvalidated-crashcomponent1.json +2 -2
- package/src/assets/samples/vpn-onboard-1.json +34 -30
- package/src/assets/samples/vpn-onboard-2.json +34 -30
- package/src/assets/samples/vpn-onboard-3.json +28 -27
- package/src/assets/samples/vpn-onboard-4.json +28 -27
- package/src/assets/samples/vpn-onboard-5.json +46 -40
- package/src/assets/samples/vpn-onboard-6.json +34 -30
- package/src/assets/samples/vpn-onboard-7.json +33 -29
- package/src/attribute-analyser/style/web/useExtractImageStyle.ts +8 -3
- package/src/attribute-analyser/style/web/useExtractViewStyle.ts +8 -3
- package/src/build-components/BIcon/BIconProps.generated.ts +1 -1
- package/src/build-components/BIcon/pattern.json +1 -2
- package/src/build-components/BackgroundImage/pattern.json +1 -2
- package/src/build-components/Button/pattern.json +1 -2
- package/src/build-components/Carousel/pattern.json +1 -2
- package/src/build-components/CarouselButtons/pattern.json +1 -2
- package/src/build-components/CarouselDots/CarouselDots.tsx +8 -3
- package/src/build-components/CarouselDots/pattern.json +1 -2
- package/src/build-components/CarouselItem/pattern.json +1 -4
- package/src/build-components/CarouselProvider/pattern.json +0 -3
- package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
- package/src/build-components/CountDown/pattern.json +1 -2
- package/src/build-components/Image/ImageProps.generated.ts +6 -0
- package/src/build-components/Image/pattern.json +10 -2
- package/src/build-components/Main/Main.tsx +3 -1
- package/src/build-components/Main/pattern.json +1 -2
- package/src/build-components/NavigationBarColor/NavigationBarColor.tsx +15 -1
- package/src/build-components/NavigationBarColor/NavigationBarColorProps.generated.ts +1 -52
- package/src/build-components/NavigationBarColor/pattern.json +10 -2
- package/src/build-components/Onboard/pattern.json +1 -4
- package/src/build-components/OnboardButtons/pattern.json +1 -2
- package/src/build-components/OnboardDot/OnboardDot.tsx +3 -2
- package/src/build-components/OnboardDot/pattern.json +1 -2
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -1
- package/src/build-components/OnboardFooter/pattern.json +1 -2
- package/src/build-components/OnboardImage/OnboardImageProps.generated.ts +7 -1
- package/src/build-components/OnboardImage/pattern.json +1 -2
- package/src/build-components/OnboardItem/pattern.json +1 -2
- package/src/build-components/OnboardProvider/pattern.json +1 -2
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -1
- package/src/build-components/OnboardSubtitle/pattern.json +1 -4
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -1
- package/src/build-components/OnboardTitle/pattern.json +1 -4
- package/src/build-components/PaywallBackground/PaywallBackgroundProps.generated.ts +1 -1
- package/src/build-components/PaywallBackground/pattern.json +0 -3
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallCloseButton/pattern.json +2 -4
- package/src/build-components/PaywallOptions/pattern.json +1 -4
- package/src/build-components/PaywallProvider/pattern.json +1 -2
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButtonProps.generated.ts +1 -1
- package/src/build-components/PaywallSubscribeButton/pattern.json +1 -4
- package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -1
- package/src/build-components/PriceTag/pattern.json +1 -2
- package/src/build-components/Pricing/PricingProps.generated.ts +1 -1
- package/src/build-components/Pricing/pattern.json +1 -4
- package/src/build-components/Promo/PromoProps.generated.ts +1 -1
- package/src/build-components/Promo/pattern.json +1 -4
- package/src/build-components/RadioButton/pattern.json +1 -2
- package/src/build-components/StatusBarColor/StatusBarColor.tsx +15 -1
- package/src/build-components/StatusBarColor/StatusBarColorProps.generated.ts +1 -1
- package/src/build-components/StatusBarColor/pattern.json +10 -1
- package/src/build-components/Text/pattern.json +1 -2
- package/src/build-components/patterns.generated.ts +57 -376
- package/src/components/BuilderProvider.tsx +1 -0
- package/src/components/DeviceButton.tsx +35 -0
- package/src/components/EditorHeader.tsx +16 -1
- package/src/hooks/useSafeAreaViewStyle.ts +24 -4
- package/src/mockOS/context/MockOSContext.tsx +41 -13
- package/src/modals/DeviceSelectorModal.tsx +94 -10
- package/src/product-base/extractAndroidParams.ts +38 -8
- package/src/size-matters/index.ts +15 -9
- package/src/store.ts +27 -0
- package/src/styles/modals/_product-edit-modal.scss +2 -2
- package/src/types/Device.ts +5 -0
- package/src/utils/analyseNodeByPatterns.ts +6 -2
- package/src/utils/extractTextStyle/extractTextStyle.ts +3 -1
- package/src/utils/extractTextStyle/extractTextStyleNative.ts +1 -1
- package/src/utils/extractViewStyle/extractViewStyle.ts +19 -5
- package/src/utils/extractViewStyle/extractViewStyleNative.ts +5 -1
- package/src/utils/replaceLocalizationParams.ts +5 -7
|
@@ -34,6 +34,7 @@ export function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
34
34
|
selectedTheme: theme,
|
|
35
35
|
projectColors,
|
|
36
36
|
baseSize,
|
|
37
|
+
device,
|
|
37
38
|
} = useBuilderParams();
|
|
38
39
|
// OnboardDot specific attributes
|
|
39
40
|
const inactiveDotOpacity =
|
|
@@ -74,12 +75,12 @@ export function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
74
75
|
(attrRecord.dot_thickness as string | number | undefined) ??
|
|
75
76
|
(stylesBag?.dot_thickness as string | number | undefined);
|
|
76
77
|
const dotSizeCss = useMemo((): string => {
|
|
77
|
-
const parsed = parseSize(dotThicknessRaw, baseSize);
|
|
78
|
+
const parsed = parseSize(dotThicknessRaw, baseSize, device!);
|
|
78
79
|
if (parsed === undefined) return '10px';
|
|
79
80
|
if (typeof parsed === 'number') return `${parsed}px`;
|
|
80
81
|
if (typeof parsed === 'string' && parsed.trim()) return parsed;
|
|
81
82
|
return '10px';
|
|
82
|
-
}, [dotThicknessRaw, baseSize]);
|
|
83
|
+
}, [dotThicknessRaw, baseSize, device]);
|
|
83
84
|
const dotGapCss = useMemo((): string => {
|
|
84
85
|
// Prefer px math when possible; otherwise fall back to 10px/3.
|
|
85
86
|
const px =
|
|
@@ -68,8 +68,8 @@ export interface OnboardFooterPropsGenerated {
|
|
|
68
68
|
adjustsFontSizeToFit?: boolean;
|
|
69
69
|
showEllipsis?: boolean;
|
|
70
70
|
translateCounter?: number;
|
|
71
|
-
testID?: string;
|
|
72
71
|
scrollable?: boolean;
|
|
72
|
+
testID?: string;
|
|
73
73
|
textLocalizationKey?: string;
|
|
74
74
|
linkedWordFirstLocalizationKey?: string;
|
|
75
75
|
linkedWordFirstColor?: string;
|
|
@@ -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 ResizeModeOptionType = 'cover' | 'contain' | 'stretch' | 'center';
|
|
6
11
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
7
12
|
export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
@@ -63,8 +68,9 @@ export interface OnboardImagePropsGenerated {
|
|
|
63
68
|
attributes: {
|
|
64
69
|
styles?: OnboardImageStyleGenerated;
|
|
65
70
|
src?: string;
|
|
66
|
-
|
|
71
|
+
fetchStrategy?: FetchStrategyOptionType;
|
|
67
72
|
scrollable?: boolean;
|
|
73
|
+
testID?: string;
|
|
68
74
|
video_url?: string;
|
|
69
75
|
lottie?: string;
|
|
70
76
|
};
|
|
@@ -68,11 +68,11 @@ export interface PaywallCloseButtonPropsGenerated {
|
|
|
68
68
|
iconType?: string;
|
|
69
69
|
size?: number;
|
|
70
70
|
strokeWidth?: number;
|
|
71
|
-
testID?: string;
|
|
72
71
|
adjustsFontSizeToFit?: boolean;
|
|
73
72
|
showEllipsis?: boolean;
|
|
74
73
|
translateCounter?: number;
|
|
75
74
|
scrollable?: boolean;
|
|
75
|
+
testID?: string;
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -5,10 +5,7 @@
|
|
|
5
5
|
"title": "title",
|
|
6
6
|
"description": "description",
|
|
7
7
|
"children": "never",
|
|
8
|
-
"extends": "BIcon"
|
|
9
|
-
"attributes": {
|
|
10
|
-
"testID": "string"
|
|
11
|
-
}
|
|
8
|
+
"extends": "BIcon"
|
|
12
9
|
},
|
|
13
10
|
"meta": {
|
|
14
11
|
"desiredParent": [">PaywallProvider"],
|
|
@@ -17,6 +14,7 @@
|
|
|
17
14
|
"styles": {}
|
|
18
15
|
},
|
|
19
16
|
"defaults": {
|
|
17
|
+
"testID": "paywall-close-button",
|
|
20
18
|
"iconType": "close",
|
|
21
19
|
"size": 24,
|
|
22
20
|
"styles": {
|
|
@@ -73,8 +73,8 @@ export interface PriceTagPropsGenerated {
|
|
|
73
73
|
adjustsFontSizeToFit?: boolean;
|
|
74
74
|
showEllipsis?: boolean;
|
|
75
75
|
translateCounter?: number;
|
|
76
|
-
testID?: string;
|
|
77
76
|
scrollable?: boolean;
|
|
77
|
+
testID?: string;
|
|
78
78
|
showOriginalPricePossible?: boolean;
|
|
79
79
|
hideIfItsNotDiscount?: boolean;
|
|
80
80
|
};
|
|
@@ -15,6 +15,9 @@ function StatusBarColor({ node }: StatusBarColorComponentProps) {
|
|
|
15
15
|
const setStatusBarOverrideColor = useRenderStore(
|
|
16
16
|
(s) => s.setStatusBarOverrideColor,
|
|
17
17
|
);
|
|
18
|
+
const setStatusBarOverrideTranslucent = useRenderStore(
|
|
19
|
+
(s) => s.setStatusBarOverrideTranslucent,
|
|
20
|
+
);
|
|
18
21
|
|
|
19
22
|
const rawBg = getStyleBag(node.attributes)?.backgroundColor as
|
|
20
23
|
| string
|
|
@@ -24,14 +27,25 @@ function StatusBarColor({ node }: StatusBarColorComponentProps) {
|
|
|
24
27
|
theme,
|
|
25
28
|
});
|
|
26
29
|
|
|
30
|
+
const translucent = node.attributes?.translucent;
|
|
31
|
+
|
|
27
32
|
useEffect(() => {
|
|
28
33
|
if (resolvedColor) {
|
|
29
34
|
setStatusBarOverrideColor(resolvedColor);
|
|
30
35
|
}
|
|
36
|
+
if (translucent !== undefined) {
|
|
37
|
+
setStatusBarOverrideTranslucent(translucent);
|
|
38
|
+
}
|
|
31
39
|
return () => {
|
|
32
40
|
setStatusBarOverrideColor(null);
|
|
41
|
+
setStatusBarOverrideTranslucent(null);
|
|
33
42
|
};
|
|
34
|
-
}, [
|
|
43
|
+
}, [
|
|
44
|
+
resolvedColor,
|
|
45
|
+
setStatusBarOverrideColor,
|
|
46
|
+
translucent,
|
|
47
|
+
setStatusBarOverrideTranslucent,
|
|
48
|
+
]);
|
|
35
49
|
|
|
36
50
|
return null;
|
|
37
51
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"styles": {
|
|
10
10
|
"backgroundColor": "color"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"translucent": "boolean"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"meta": {
|
|
@@ -24,6 +24,15 @@
|
|
|
24
24
|
"specialCategory": null,
|
|
25
25
|
"sort": 1
|
|
26
26
|
}
|
|
27
|
+
},
|
|
28
|
+
"attributes": {
|
|
29
|
+
"translucent": {
|
|
30
|
+
"label": "Translucent",
|
|
31
|
+
"description": "Sets the status bar to translucent.",
|
|
32
|
+
"category": "style",
|
|
33
|
+
"specialCategory": null,
|
|
34
|
+
"sort": 2
|
|
35
|
+
}
|
|
27
36
|
}
|
|
28
37
|
},
|
|
29
38
|
"defaults": {
|