@developer_tribe/react-builder 1.2.25 → 1.2.26
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/attributes-editor/AttributesEditorFields.d.ts +1 -1
- package/dist/attributes-editor/SpecialCategorySection.d.ts +1 -1
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +3 -4
- package/dist/build-components/PaywallOptions/PaywallOptionButton.d.ts +1 -1
- package/dist/build-components/PaywallProvider/PaywallContext.d.ts +1 -2
- package/dist/build-components/index.d.ts +1 -3
- package/dist/build-components/patterns.generated.d.ts +759 -1637
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.web.cjs.js +3 -3
- package/dist/index.web.cjs.js.map +1 -1
- package/dist/index.web.esm.js +3 -3
- package/dist/index.web.esm.js.map +1 -1
- package/dist/paywall/hooks/index.d.ts +0 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/projectColors.d.ts +7 -0
- package/package.json +3 -3
- package/src/DeviceMockFrame.tsx +0 -2
- package/src/RenderPage.tsx +0 -9
- package/src/assets/.DS_Store +0 -0
- package/src/assets/meta.json +1 -1
- package/src/assets/samples/paywall-1.json +0 -1
- package/src/assets/samples/paywall-2.json +2 -3
- package/src/assets/samples/paywall-app-delete-offer.json +2 -3
- package/src/assets/samples/paywall-app-open-offer.json +2 -3
- package/src/assets/samples/paywall-back-offer.json +2 -3
- package/src/assets/samples/paywall-notification-offer.json +2 -3
- package/src/assets/samples/vpn-onboard-1.json +15 -15
- package/src/assets/samples/vpn-onboard-2.json +15 -15
- package/src/assets/samples/vpn-onboard-3.json +15 -15
- package/src/assets/samples/vpn-onboard-4.json +15 -15
- package/src/assets/samples/vpn-onboard-5.json +21 -21
- package/src/assets/samples/vpn-onboard-6.json +15 -15
- package/src/attributes-editor/AttributesEditorFields.tsx +0 -1
- package/src/attributes-editor/AttributesEditorView.tsx +0 -2
- package/src/attributes-editor/Field.tsx +1 -1
- package/src/attributes-editor/SpecialCategorySection.tsx +0 -1
- package/src/attributes-editor/useAttributesEditorModel.ts +18 -8
- package/src/build-components/BIcon/BIcon.tsx +1 -1
- package/src/build-components/BIcon/pattern.json +1 -3
- package/src/build-components/BackgroundImage/pattern.json +2 -10
- package/src/build-components/Button/pattern.json +1 -3
- package/src/build-components/Carousel/Carousel.tsx +1 -1
- package/src/build-components/Carousel/pattern.json +2 -8
- package/src/build-components/CarouselButtons/pattern.json +2 -9
- package/src/build-components/CarouselDots/pattern.json +1 -3
- package/src/build-components/CarouselItem/pattern.json +1 -3
- package/src/build-components/CarouselProvider/CarouselProvider.tsx +1 -1
- package/src/build-components/CarouselProvider/pattern.json +1 -4
- package/src/build-components/CountDown/CountDown.tsx +25 -1
- package/src/build-components/CountDown/CountDownProps.generated.ts +3 -4
- package/src/build-components/CountDown/pattern.json +9 -4
- package/src/build-components/Main/pattern.json +1 -3
- package/src/build-components/NavigationBarColor/pattern.json +1 -3
- package/src/build-components/Onboard/pattern.json +2 -6
- package/src/build-components/OnboardButton/OnboardButton.tsx +1 -4
- package/src/build-components/OnboardButton/pattern.json +3 -14
- package/src/build-components/OnboardButtons/OnboardButtons.tsx +1 -9
- package/src/build-components/OnboardButtons/pattern.json +4 -15
- package/src/build-components/OnboardDot/OnboardDot.tsx +2 -1
- package/src/build-components/OnboardDot/pattern.json +1 -3
- package/src/build-components/OnboardFooter/pattern.json +1 -3
- package/src/build-components/OnboardImage/pattern.json +1 -5
- package/src/build-components/OnboardItem/OnboardItem.tsx +1 -1
- package/src/build-components/OnboardItem/pattern.json +3 -11
- package/src/build-components/OnboardProvider/OnboardProvider.tsx +0 -1
- package/src/build-components/OnboardProvider/pattern.json +2 -8
- package/src/build-components/OnboardSubtitle/pattern.json +1 -4
- package/src/build-components/OnboardTitle/pattern.json +1 -4
- package/src/build-components/PaywallBackground/pattern.json +1 -3
- package/src/build-components/PaywallCloseButton/pattern.json +1 -3
- package/src/build-components/PaywallOptions/PaywallOptionButton.tsx +1 -2
- package/src/build-components/PaywallOptions/pattern.json +1 -3
- package/src/build-components/PaywallProvider/PaywallContext.ts +1 -1
- package/src/build-components/PaywallProvider/PaywallProvider.tsx +0 -10
- package/src/build-components/PaywallProvider/pattern.json +1 -3
- package/src/build-components/PaywallSubscribeButton/PaywallSubscribeButton.tsx +1 -1
- package/src/build-components/PaywallSubscribeButton/pattern.json +1 -3
- package/src/build-components/RadioButton/RadioButton.tsx +1 -1
- package/src/build-components/RadioButton/pattern.json +1 -3
- package/src/build-components/RenderNode.generated.tsx +0 -10
- package/src/build-components/Separator/pattern.json +1 -3
- package/src/build-components/StatusBarColor/pattern.json +1 -3
- package/src/build-components/Text/pattern.json +2 -9
- package/src/build-components/View/pattern.json +4 -16
- package/src/build-components/index.ts +0 -10
- package/src/build-components/patterns.generated.ts +789 -1700
- package/src/components/Builder.tsx +5 -0
- package/src/components/BuilderProvider.tsx +2 -37
- package/src/hooks/useSafeAreaViewStyle.ts +1 -3
- package/src/mockOS/managers/navigationManager.ts +1 -1
- package/src/pages/ProjectPage.tsx +2 -0
- package/src/pages/tabs/SideTool.tsx +1 -22
- package/src/paywall/hooks/index.ts +0 -1
- package/src/store.ts +1 -6
- package/src/styles/base/_global.scss +2 -0
- package/src/utils/analyseNodeByPatterns.ts +4 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logRenderStore.ts +0 -1
- package/src/utils/novaToJson.ts +1 -5
- package/src/utils/parseColor.ts +1 -0
- package/src/utils/projectColors.ts +71 -0
- package/dist/build-components/Counter/Counter.d.ts +0 -2
- package/dist/build-components/Counter/CounterProps.generated.d.ts +0 -61
- package/dist/build-components/PaywallCounter/PaywallCounter.d.ts +0 -2
- package/dist/build-components/PaywallCounter/PaywallCounterProps.generated.d.ts +0 -61
- package/dist/paywall/hooks/useHandleGoBack.d.ts +0 -1
- package/src/build-components/Counter/Counter.tsx +0 -44
- package/src/build-components/Counter/CounterProps.generated.ts +0 -78
- package/src/build-components/Counter/pattern.json +0 -29
- package/src/build-components/PaywallCounter/PaywallCounter.tsx +0 -46
- package/src/build-components/PaywallCounter/PaywallCounterProps.generated.ts +0 -78
- package/src/build-components/PaywallCounter/pattern.json +0 -26
- package/src/paywall/hooks/useHandleGoBack.ts +0 -60
|
@@ -8,12 +8,7 @@
|
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"src": "string",
|
|
11
|
-
"resizeMode": [
|
|
12
|
-
"cover",
|
|
13
|
-
"contain",
|
|
14
|
-
"stretch",
|
|
15
|
-
"center"
|
|
16
|
-
]
|
|
11
|
+
"resizeMode": ["cover", "contain", "stretch", "center"]
|
|
17
12
|
},
|
|
18
13
|
"defaults": {
|
|
19
14
|
"resizeMode": "cover",
|
|
@@ -29,10 +24,7 @@
|
|
|
29
24
|
}
|
|
30
25
|
},
|
|
31
26
|
"meta": {
|
|
32
|
-
"desiredParent": [
|
|
33
|
-
"all",
|
|
34
|
-
"background"
|
|
35
|
-
],
|
|
27
|
+
"desiredParent": ["all", "background"],
|
|
36
28
|
"label": "Background Image",
|
|
37
29
|
"description": "Background image.",
|
|
38
30
|
"styles": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useId
|
|
1
|
+
import React, { useId } from 'react';
|
|
2
2
|
import type { CarouselComponentProps } from './CarouselProps.generated';
|
|
3
3
|
import RenderNode from '../RenderNode.generated';
|
|
4
4
|
import { isCarouselItem } from '../../utils/isCarousel';
|
|
@@ -9,17 +9,11 @@
|
|
|
9
9
|
"attributes": {
|
|
10
10
|
"loop": "boolean",
|
|
11
11
|
"dragFree": "boolean",
|
|
12
|
-
"align": [
|
|
13
|
-
"start",
|
|
14
|
-
"center",
|
|
15
|
-
"end"
|
|
16
|
-
]
|
|
12
|
+
"align": ["start", "center", "end"]
|
|
17
13
|
}
|
|
18
14
|
},
|
|
19
15
|
"meta": {
|
|
20
|
-
"desiredParent": [
|
|
21
|
-
"=CarouselProvider"
|
|
22
|
-
],
|
|
16
|
+
"desiredParent": ["=CarouselProvider"],
|
|
23
17
|
"label": "Carousel",
|
|
24
18
|
"description": "Container for carousel items.",
|
|
25
19
|
"styles": {}
|
|
@@ -7,19 +7,12 @@
|
|
|
7
7
|
"children": "never",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"buttonType": [
|
|
11
|
-
"previous_button",
|
|
12
|
-
"next_button",
|
|
13
|
-
"skip_button"
|
|
14
|
-
],
|
|
10
|
+
"buttonType": ["previous_button", "next_button", "skip_button"],
|
|
15
11
|
"skipNumber": "number"
|
|
16
12
|
}
|
|
17
13
|
},
|
|
18
14
|
"meta": {
|
|
19
|
-
"desiredParent": [
|
|
20
|
-
">OnboardProvider",
|
|
21
|
-
">CarouselProvider"
|
|
22
|
-
],
|
|
15
|
+
"desiredParent": [">OnboardProvider", ">CarouselProvider"],
|
|
23
16
|
"label": "Carousel Buttons",
|
|
24
17
|
"description": "Renders built-in carousel buttons.",
|
|
25
18
|
"styles": {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext, useId
|
|
1
|
+
import React, { createContext, useId } from 'react';
|
|
2
2
|
import type { CarouselProviderComponentProps } from './CarouselProviderProps.generated';
|
|
3
3
|
import RenderNode from '../RenderNode.generated';
|
|
4
4
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
@@ -69,11 +69,35 @@ export function CountDown({ node }: CountDownComponentProps) {
|
|
|
69
69
|
};
|
|
70
70
|
}, [delayMs]);
|
|
71
71
|
|
|
72
|
+
const fontSize =
|
|
73
|
+
typeof style?.fontSize === 'number'
|
|
74
|
+
? style.fontSize
|
|
75
|
+
: typeof style?.fontSize === 'string'
|
|
76
|
+
? parseFloat(style.fontSize)
|
|
77
|
+
: 16;
|
|
78
|
+
|
|
79
|
+
const letterSpacing =
|
|
80
|
+
typeof style?.letterSpacing === 'number'
|
|
81
|
+
? style.letterSpacing
|
|
82
|
+
: typeof style?.letterSpacing === 'string'
|
|
83
|
+
? parseFloat(style.letterSpacing)
|
|
84
|
+
: 0;
|
|
85
|
+
|
|
86
|
+
// "00:00" format needs ~5 characters width
|
|
87
|
+
const charCount = 5;
|
|
88
|
+
const width = fontSize * charCount * 0.6 + letterSpacing * (charCount - 1);
|
|
89
|
+
|
|
72
90
|
return (
|
|
73
91
|
<p
|
|
74
92
|
attribute-name={attributeName}
|
|
75
93
|
attribute-key={attributeKey}
|
|
76
|
-
style={
|
|
94
|
+
style={{
|
|
95
|
+
...style,
|
|
96
|
+
width,
|
|
97
|
+
textAlign: 'left',
|
|
98
|
+
alignItems: 'left',
|
|
99
|
+
alignSelf: 'center',
|
|
100
|
+
}}
|
|
77
101
|
>
|
|
78
102
|
{time}
|
|
79
103
|
</p>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import type { NodeData } from '../../types/Node';
|
|
4
4
|
|
|
5
|
-
export type TextAlignOptionType = 'left' | 'center' | 'right' | 'justify';
|
|
6
5
|
export type FlexDirectionOptionType = 'row' | 'column';
|
|
7
6
|
export type FlexWrapOptionType = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
8
7
|
export type AlignItemsOptionType =
|
|
@@ -25,7 +24,7 @@ export interface CountDownStyleGenerated {
|
|
|
25
24
|
fontSize?: string;
|
|
26
25
|
fontFamily?: string;
|
|
27
26
|
fontWeight?: string;
|
|
28
|
-
textAlign?:
|
|
27
|
+
textAlign?: never;
|
|
29
28
|
flexDirection?: FlexDirectionOptionType;
|
|
30
29
|
flexWrap?: FlexWrapOptionType;
|
|
31
30
|
alignItems?: AlignItemsOptionType;
|
|
@@ -47,7 +46,7 @@ export interface CountDownStyleGenerated {
|
|
|
47
46
|
marginRight?: string;
|
|
48
47
|
backgroundColor?: string;
|
|
49
48
|
borderRadius?: string;
|
|
50
|
-
width?:
|
|
49
|
+
width?: never;
|
|
51
50
|
minWidth?: string;
|
|
52
51
|
maxWidth?: string;
|
|
53
52
|
height?: string;
|
|
@@ -66,10 +65,10 @@ export interface CountDownPropsGenerated {
|
|
|
66
65
|
child: string;
|
|
67
66
|
attributes: {
|
|
68
67
|
style?: CountDownStyleGenerated;
|
|
69
|
-
count?: number;
|
|
70
68
|
adjustsFontSizeToFit?: boolean;
|
|
71
69
|
showEllipsis?: boolean;
|
|
72
70
|
scrollable?: boolean;
|
|
71
|
+
count?: number;
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
74
|
|
|
@@ -5,12 +5,17 @@
|
|
|
5
5
|
"title": "title",
|
|
6
6
|
"description": "description",
|
|
7
7
|
"children": "never",
|
|
8
|
-
"extends": "
|
|
8
|
+
"extends": "Text",
|
|
9
|
+
"attributes": {
|
|
10
|
+
"count": "number",
|
|
11
|
+
"style": {
|
|
12
|
+
"width": "never",
|
|
13
|
+
"textAlign": "never"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
9
16
|
},
|
|
10
17
|
"meta": {
|
|
11
|
-
"desiredParent": [
|
|
12
|
-
"all"
|
|
13
|
-
],
|
|
18
|
+
"desiredParent": ["all"],
|
|
14
19
|
"label": "Count Down",
|
|
15
20
|
"description": "Displays a countdown timer.",
|
|
16
21
|
"attributes": {
|
|
@@ -8,12 +8,8 @@
|
|
|
8
8
|
"extends": "View"
|
|
9
9
|
},
|
|
10
10
|
"meta": {
|
|
11
|
-
"desiredParent": [
|
|
12
|
-
|
|
13
|
-
],
|
|
14
|
-
"desiredChildren": [
|
|
15
|
-
"=OnboardItem"
|
|
16
|
-
],
|
|
11
|
+
"desiredParent": ["=OnboardProvider"],
|
|
12
|
+
"desiredChildren": ["=OnboardItem"],
|
|
17
13
|
"label": "Onboard",
|
|
18
14
|
"description": "Wraps the onboarding flow.",
|
|
19
15
|
"styles": {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useId,
|
|
1
|
+
import React, { useContext, useId, useRef } from 'react';
|
|
2
2
|
import type {
|
|
3
3
|
EventObjectGenerated,
|
|
4
4
|
OnboardButtonComponentProps,
|
|
@@ -52,7 +52,6 @@ function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
52
52
|
const handleClick = () => {
|
|
53
53
|
//TODO: any ??
|
|
54
54
|
const events: EventObjectGenerated[] = attrs?.events ?? [];
|
|
55
|
-
let navigateHandled = false;
|
|
56
55
|
|
|
57
56
|
for (const e of events) {
|
|
58
57
|
// Check if event is already handled
|
|
@@ -69,13 +68,11 @@ function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
69
68
|
const eventTargetIndex = e.targetIndex;
|
|
70
69
|
if (typeof eventTargetIndex === 'number') {
|
|
71
70
|
emblaApi?.scrollTo(eventTargetIndex);
|
|
72
|
-
navigateHandled = true;
|
|
73
71
|
handledEventsRef.current.push(e);
|
|
74
72
|
//TODO: cause user to click second time
|
|
75
73
|
} else if (e.navigate_to) {
|
|
76
74
|
const eventTarget = e.navigate_to;
|
|
77
75
|
if (typeof eventTarget === 'string') {
|
|
78
|
-
navigateHandled = true;
|
|
79
76
|
handledEventsRef.current.push(e);
|
|
80
77
|
//TODO: cause user to click second time
|
|
81
78
|
if (context) {
|
|
@@ -30,25 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"types": {
|
|
32
32
|
"EventObject": {
|
|
33
|
-
"type": [
|
|
34
|
-
|
|
35
|
-
"Navigate"
|
|
36
|
-
],
|
|
37
|
-
"permission": [
|
|
38
|
-
"att",
|
|
39
|
-
"notification",
|
|
40
|
-
"rating",
|
|
41
|
-
"GDPR",
|
|
42
|
-
"null"
|
|
43
|
-
],
|
|
33
|
+
"type": ["Permission", "Navigate"],
|
|
34
|
+
"permission": ["att", "notification", "rating", "GDPR", "null"],
|
|
44
35
|
"navigate_to": "string",
|
|
45
36
|
"targetIndex": "number"
|
|
46
37
|
}
|
|
47
38
|
},
|
|
48
39
|
"meta": {
|
|
49
|
-
"desiredParent": [
|
|
50
|
-
"=OnboardButtons"
|
|
51
|
-
],
|
|
40
|
+
"desiredParent": ["=OnboardButtons"],
|
|
52
41
|
"label": "Onboard Button",
|
|
53
42
|
"description": "Single action button for onboarding.",
|
|
54
43
|
"styles": {
|
|
@@ -15,11 +15,7 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
|
|
|
15
15
|
useLogRender('OnboardButtons');
|
|
16
16
|
node = useNode(node);
|
|
17
17
|
const attributeName = node.sourceType ?? node.type ?? 'OnboardButtons';
|
|
18
|
-
const {
|
|
19
|
-
const seperatorColorDefault =
|
|
20
|
-
appConfig?.theme === 'light'
|
|
21
|
-
? appConfig?.screenStyle?.light?.seperatorColor
|
|
22
|
-
: appConfig?.screenStyle?.dark?.seperatorColor;
|
|
18
|
+
const { previewMode, selectedKey } = useBuilderParams();
|
|
23
19
|
const ctx = useContext(onboardContext) ?? {};
|
|
24
20
|
const [selectedIndex, setSelectedIndex] = useState(ctx.selectedIndex ?? 0);
|
|
25
21
|
|
|
@@ -31,10 +27,6 @@ function OnboardButtons({ node }: OnboardButtonsComponentProps) {
|
|
|
31
27
|
|
|
32
28
|
const attrRecord = toAttributeRecord(node.attributes);
|
|
33
29
|
const styleBag = getStyleBag(node.attributes);
|
|
34
|
-
const direction =
|
|
35
|
-
(attrRecord.buttons_direction ?? styleBag?.buttons_direction) === 'column'
|
|
36
|
-
? 'column'
|
|
37
|
-
: 'row';
|
|
38
30
|
|
|
39
31
|
const children = useMemo(() => {
|
|
40
32
|
const raw = node.children as unknown;
|
|
@@ -7,21 +7,12 @@
|
|
|
7
7
|
"children": "node",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"buttonType": [
|
|
11
|
-
"previous_button",
|
|
12
|
-
"next_button",
|
|
13
|
-
"skip_button"
|
|
14
|
-
],
|
|
10
|
+
"buttonType": ["previous_button", "next_button", "skip_button"],
|
|
15
11
|
"skipNumber": "number",
|
|
16
|
-
"buttons_direction": [
|
|
17
|
-
"row",
|
|
18
|
-
"column"
|
|
19
|
-
],
|
|
12
|
+
"buttons_direction": ["row", "column"],
|
|
20
13
|
"forIndex": "number",
|
|
21
14
|
"seperatorColor": "color",
|
|
22
|
-
"condition": [
|
|
23
|
-
"carousel-index"
|
|
24
|
-
],
|
|
15
|
+
"condition": ["carousel-index"],
|
|
25
16
|
"conditionVariable": "number"
|
|
26
17
|
},
|
|
27
18
|
"defaults": {
|
|
@@ -37,9 +28,7 @@
|
|
|
37
28
|
}
|
|
38
29
|
},
|
|
39
30
|
"meta": {
|
|
40
|
-
"desiredParent": [
|
|
41
|
-
"=OnboardItem"
|
|
42
|
-
],
|
|
31
|
+
"desiredParent": ["=OnboardItem"],
|
|
43
32
|
"label": "Onboard Buttons",
|
|
44
33
|
"description": "Wrapper for onboarding button set.",
|
|
45
34
|
"styles": {
|
|
@@ -71,7 +71,8 @@ function OnboardDot({ node }: OnboardDotComponentProps) {
|
|
|
71
71
|
|
|
72
72
|
const extractedStyle = useExtractViewStyle(node);
|
|
73
73
|
const baseStyle = useMemo(() => {
|
|
74
|
-
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
|
+
const { flexDirection, ...innerStyle } = extractedStyle;
|
|
75
76
|
return innerStyle;
|
|
76
77
|
}, [extractedStyle]);
|
|
77
78
|
const isSelected = isNodeSelected({
|
|
@@ -12,11 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"meta": {
|
|
15
|
-
"desiredParent": [
|
|
16
|
-
">OnboardProvider",
|
|
17
|
-
">OnboardItem",
|
|
18
|
-
"!=Onboard"
|
|
19
|
-
],
|
|
15
|
+
"desiredParent": [">OnboardProvider", ">OnboardItem", "!=Onboard"],
|
|
20
16
|
"label": "Onboard Image",
|
|
21
17
|
"description": "Onboarding hero image with media.",
|
|
22
18
|
"styles": {},
|
|
@@ -7,15 +7,9 @@
|
|
|
7
7
|
"children": "node",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"display": [
|
|
11
|
-
"flex",
|
|
12
|
-
"block"
|
|
13
|
-
],
|
|
10
|
+
"display": ["flex", "block"],
|
|
14
11
|
"gap": "size",
|
|
15
|
-
"flexDirection": [
|
|
16
|
-
"row",
|
|
17
|
-
"column"
|
|
18
|
-
],
|
|
12
|
+
"flexDirection": ["row", "column"],
|
|
19
13
|
"paddingHorizontal": "size"
|
|
20
14
|
}
|
|
21
15
|
},
|
|
@@ -28,9 +22,7 @@
|
|
|
28
22
|
}
|
|
29
23
|
},
|
|
30
24
|
"meta": {
|
|
31
|
-
"desiredParent": [
|
|
32
|
-
"=Onboard"
|
|
33
|
-
],
|
|
25
|
+
"desiredParent": ["=Onboard"],
|
|
34
26
|
"label": "Onboard Item",
|
|
35
27
|
"description": "Single onboarding screen section.",
|
|
36
28
|
"styles": {},
|
|
@@ -7,11 +7,7 @@
|
|
|
7
7
|
"children": "node",
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
|
-
"theme": [
|
|
11
|
-
"light",
|
|
12
|
-
"dark",
|
|
13
|
-
"all"
|
|
14
|
-
],
|
|
10
|
+
"theme": ["light", "dark", "all"],
|
|
15
11
|
"borderRadius": "never"
|
|
16
12
|
}
|
|
17
13
|
},
|
|
@@ -22,9 +18,7 @@
|
|
|
22
18
|
}
|
|
23
19
|
},
|
|
24
20
|
"meta": {
|
|
25
|
-
"desiredParent": [
|
|
26
|
-
"root"
|
|
27
|
-
],
|
|
21
|
+
"desiredParent": ["root"],
|
|
28
22
|
"label": "Onboard Provider",
|
|
29
23
|
"description": "Provides shared settings for onboarding.",
|
|
30
24
|
"styles": {},
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"meta": {
|
|
17
|
-
"desiredParent": [
|
|
18
|
-
">OnboardProvider",
|
|
19
|
-
">OnboardItem"
|
|
20
|
-
],
|
|
17
|
+
"desiredParent": [">OnboardProvider", ">OnboardItem"],
|
|
21
18
|
"label": "Onboard Subtitle",
|
|
22
19
|
"description": "Subtitle text for an onboarding step.",
|
|
23
20
|
"styles": {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useId
|
|
1
|
+
import { useId } from 'react';
|
|
2
2
|
import type { Product } from '../../paywall/types/paywall-types';
|
|
3
3
|
import { useExtractViewStyle } from '../../attribute-analyser/style/web/useExtractViewStyle';
|
|
4
4
|
import type { NodeData } from '../../types/Node';
|
|
@@ -16,7 +16,6 @@ export type OptionsButtonProps = {
|
|
|
16
16
|
|
|
17
17
|
export function PaywallOptionButton({
|
|
18
18
|
product,
|
|
19
|
-
selected,
|
|
20
19
|
onPress,
|
|
21
20
|
node,
|
|
22
21
|
}: OptionsButtonProps) {
|
|
@@ -13,7 +13,6 @@ import { PaywallContext } from './PaywallContext';
|
|
|
13
13
|
import { useMockOSContext } from '../../mockOS/context/MockOSContextBase';
|
|
14
14
|
import type { Product } from '../../paywall/types/paywall-types';
|
|
15
15
|
import { useChangeDelayByPaywall } from '../../paywall/hooks/useChangeDelayByPaywall';
|
|
16
|
-
import { useHandleGoBack } from '../../paywall/hooks/useHandleGoBack';
|
|
17
16
|
import { useMockOSBackHandler } from '../../paywall/hooks/useMockOSBackHandler';
|
|
18
17
|
|
|
19
18
|
function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
@@ -99,15 +98,6 @@ function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
|
99
98
|
}
|
|
100
99
|
}, [mockOS, isBackAllowed]);
|
|
101
100
|
|
|
102
|
-
const handleGoBack = useCallback(() => {
|
|
103
|
-
if (!isBackAllowed) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
return true;
|
|
107
|
-
}, [isBackAllowed]);
|
|
108
|
-
|
|
109
|
-
useHandleGoBack(handleGoBack);
|
|
110
|
-
|
|
111
101
|
const handleSubscribe = useCallback(
|
|
112
102
|
async (product?: Product): Promise<boolean> => {
|
|
113
103
|
// Host app override wins.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useId
|
|
1
|
+
import React, { useId } from 'react';
|
|
2
2
|
import type { PaywallSubscribeButtonComponentProps } from './PaywallSubscribeButtonProps.generated';
|
|
3
3
|
import useNode from '../useNode';
|
|
4
4
|
import { useBuilderParams } from '../../components/BuilderProvider';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useContext, useId
|
|
1
|
+
import React, { useContext, useId } from 'react';
|
|
2
2
|
import type { RadioButtonComponentProps } from './RadioButtonProps.generated';
|
|
3
3
|
import useNode from '../useNode';
|
|
4
4
|
import { useBuilderParams } from '../../components/BuilderProvider';
|