@developer_tribe/react-builder 1.2.35 → 1.2.37
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/RenderPage.d.ts +0 -12
- package/dist/attributes-editor/Field.d.ts +2 -1
- package/dist/attributes-editor/SizeField.d.ts +2 -1
- package/dist/attributes-editor/attributesEditorUtils.d.ts +2 -1
- package/dist/build-components/BIcon/BIcon.d.ts +0 -3
- package/dist/build-components/BIcon/BIconProps.generated.d.ts +1 -0
- package/dist/build-components/Button/Button.d.ts +0 -3
- package/dist/build-components/CarouselItem/CarouselItem.d.ts +0 -3
- package/dist/build-components/CountDown/CountDownProps.generated.d.ts +1 -1
- package/dist/build-components/OnboardButton/OnboardButton.d.ts +0 -3
- package/dist/build-components/OnboardDot/OnboardDot.d.ts +0 -3
- package/dist/build-components/OnboardFooter/OnboardFooterProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardItem/OnboardItemProps.generated.d.ts +0 -3
- package/dist/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.d.ts +1 -0
- package/dist/build-components/OnboardTitle/OnboardTitleProps.generated.d.ts +1 -0
- package/dist/build-components/PaywallCloseButton/PaywallCloseButton.d.ts +0 -3
- package/dist/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.d.ts +1 -0
- package/dist/build-components/PriceTag/PriceTagProps.generated.d.ts +1 -0
- package/dist/build-components/Pricing/PricingProps.generated.d.ts +1 -0
- package/dist/build-components/Promo/PromoProps.generated.d.ts +1 -0
- package/dist/build-components/Text/TextProps.generated.d.ts +1 -0
- package/dist/build-components/patterns.generated.d.ts +9798 -10468
- package/dist/components/Breadcrumb.d.ts +1 -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 +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/migrations/migratePipe.d.ts +2 -1
- package/dist/migrations/semver.d.ts +0 -7
- package/dist/pages/DebugJsonPage.d.ts +2 -1
- package/dist/pages/ProjectDebug.d.ts +2 -1
- package/dist/pages/ProjectMigrationPage.d.ts +2 -1
- package/dist/pages/ProjectPage.d.ts +2 -1
- package/dist/pages/ProjectValidationPage.d.ts +2 -1
- package/dist/pages/tabs/SideTool.d.ts +2 -2
- package/dist/utils/parseColor.d.ts +1 -1
- package/package.json +1 -1
- package/scripts/prebuild/assets/prompt_scheme.md +5 -11
- package/scripts/prebuild/generate-prompt-schemes.js +11 -8
- package/scripts/prebuild/utils/validateAllComponentsOrThrow.js +50 -0
- package/scripts/prebuild/utils/validatePatternJson.js +73 -0
- package/src/RenderPage.tsx +1 -10
- 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/attributes-editor/Field.tsx +1 -1
- package/src/attributes-editor/SizeField.tsx +1 -1
- package/src/attributes-editor/attributesEditorUtils.ts +1 -1
- package/src/attributes-editor/useAttributesEditorModel.ts +5 -1
- package/src/build-components/BIcon/BIcon.tsx +0 -2
- package/src/build-components/BIcon/BIconProps.generated.ts +1 -0
- package/src/build-components/BackgroundImage/pattern.json +8 -9
- package/src/build-components/Button/Button.tsx +0 -2
- package/src/build-components/CarouselDots/CarouselDots.tsx +1 -1
- package/src/build-components/CarouselDots/pattern.json +1 -1
- package/src/build-components/CarouselItem/CarouselItem.tsx +0 -2
- package/src/build-components/CountDown/CountDownProps.generated.ts +1 -1
- package/src/build-components/OnboardButton/OnboardButton.tsx +1 -4
- package/src/build-components/OnboardButtons/pattern.json +2 -4
- package/src/build-components/OnboardDot/OnboardDot.tsx +0 -2
- package/src/build-components/OnboardDot/pattern.json +0 -1
- package/src/build-components/OnboardFooter/OnboardFooter.tsx +5 -6
- package/src/build-components/OnboardFooter/OnboardFooterProps.generated.ts +1 -0
- package/src/build-components/OnboardItem/OnboardItemProps.generated.ts +0 -3
- package/src/build-components/OnboardItem/pattern.json +27 -23
- package/src/build-components/OnboardProvider/pattern.json +29 -27
- package/src/build-components/OnboardSubtitle/OnboardSubtitleProps.generated.ts +1 -0
- package/src/build-components/OnboardTitle/OnboardTitleProps.generated.ts +1 -0
- package/src/build-components/PaywallCloseButton/PaywallCloseButton.tsx +0 -2
- package/src/build-components/PaywallCloseButton/PaywallCloseButtonProps.generated.ts +1 -0
- package/src/build-components/PaywallProvider/PaywallProvider.tsx +0 -10
- package/src/build-components/PriceTag/PriceTagProps.generated.ts +1 -0
- package/src/build-components/Pricing/PricingProps.generated.ts +1 -0
- package/src/build-components/Promo/PromoProps.generated.ts +1 -0
- package/src/build-components/RadioButton/pattern.json +2 -4
- package/src/build-components/Separator/pattern.json +24 -24
- package/src/build-components/Text/TextProps.generated.ts +1 -0
- package/src/build-components/Text/pattern.json +2 -1
- package/src/build-components/View/pattern.json +265 -265
- package/src/build-components/patterns.generated.ts +10019 -10689
- package/src/components/Breadcrumb.tsx +1 -1
- package/src/migrations/migratePipe.ts +1 -1
- package/src/migrations/semver.ts +3 -3
- package/src/modals/MockableFeatureModal.tsx +3 -1
- package/src/modals/PromptManagerModal.tsx +1 -7
- package/src/pages/DebugJsonPage.tsx +1 -1
- package/src/pages/ProjectDebug.tsx +1 -1
- package/src/pages/ProjectMigrationPage.tsx +1 -1
- package/src/pages/ProjectPage.tsx +1 -1
- package/src/pages/ProjectValidationPage.tsx +1 -1
- package/src/pages/tabs/SideTool.tsx +3 -1
- package/src/utils/nodeXml.ts +2 -4
- package/src/utils/parseColor.ts +5 -6
- package/src/utils/useMergedStyle.ts +1 -1
|
@@ -27,15 +27,7 @@
|
|
|
27
27
|
"desiredParent": ["all", "background"],
|
|
28
28
|
"label": "Background Image",
|
|
29
29
|
"description": "Background image.",
|
|
30
|
-
"styles": {
|
|
31
|
-
"resizeMode": {
|
|
32
|
-
"label": "Resize Mode",
|
|
33
|
-
"description": "How the image fits its container.",
|
|
34
|
-
"category": "style",
|
|
35
|
-
"specialCategory": null,
|
|
36
|
-
"sort": 4
|
|
37
|
-
}
|
|
38
|
-
},
|
|
30
|
+
"styles": {},
|
|
39
31
|
"attributes": {
|
|
40
32
|
"src": {
|
|
41
33
|
"label": "Src",
|
|
@@ -43,6 +35,13 @@
|
|
|
43
35
|
"category": "other",
|
|
44
36
|
"specialCategory": null,
|
|
45
37
|
"sort": 1
|
|
38
|
+
},
|
|
39
|
+
"resizeMode": {
|
|
40
|
+
"label": "Resize Mode",
|
|
41
|
+
"description": "How the image fits its container.",
|
|
42
|
+
"category": "other",
|
|
43
|
+
"specialCategory": null,
|
|
44
|
+
"sort": 4
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
},
|
|
@@ -134,7 +134,7 @@ function CarouselDots({ node }: CarouselDotsComponentProps) {
|
|
|
134
134
|
style={{
|
|
135
135
|
width: dotSize,
|
|
136
136
|
height: dotSize,
|
|
137
|
-
backgroundColor: dotColor,
|
|
137
|
+
backgroundColor: dotColor ?? undefined,
|
|
138
138
|
opacity: isDotSelected ? 1 : inactiveDotOpacity,
|
|
139
139
|
borderRadius: '9999px',
|
|
140
140
|
border: 0,
|
|
@@ -24,6 +24,7 @@ export interface CountDownStyleGenerated {
|
|
|
24
24
|
fontSize?: string;
|
|
25
25
|
fontFamily?: string;
|
|
26
26
|
fontWeight?: string;
|
|
27
|
+
textAlign?: never;
|
|
27
28
|
flexDirection?: FlexDirectionOptionType;
|
|
28
29
|
flexWrap?: FlexWrapOptionType;
|
|
29
30
|
alignItems?: AlignItemsOptionType;
|
|
@@ -58,7 +59,6 @@ export interface CountDownStyleGenerated {
|
|
|
58
59
|
left?: string;
|
|
59
60
|
right?: string;
|
|
60
61
|
zIndex?: number;
|
|
61
|
-
textAlign?: never;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface CountDownPropsGenerated {
|
|
@@ -11,7 +11,6 @@ import { useExtractViewStyle } from '../../attribute-analyser/style/web/useExtra
|
|
|
11
11
|
import { useMockOSContext, useMockPermission } from '../../mockOS';
|
|
12
12
|
import { useLocalize } from '../../hooks/useLocalize';
|
|
13
13
|
import { parseColor } from '../../utils/parseColor';
|
|
14
|
-
import { getStyleBag, toAttributeRecord } from '../../utils/attributeStyle';
|
|
15
14
|
|
|
16
15
|
export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
17
16
|
useLogRender('OnboardButton');
|
|
@@ -76,7 +75,7 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
76
75
|
onClick={handleClick}
|
|
77
76
|
style={{
|
|
78
77
|
...viewStyle,
|
|
79
|
-
color: textColor,
|
|
78
|
+
color: textColor ?? undefined,
|
|
80
79
|
border: 'none',
|
|
81
80
|
display: 'flex',
|
|
82
81
|
justifyContent: 'center',
|
|
@@ -87,5 +86,3 @@ export function OnboardButton({ node }: OnboardButtonComponentProps) {
|
|
|
87
86
|
</button>
|
|
88
87
|
);
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
export default React.memo(OnboardButton);
|
|
@@ -31,16 +31,14 @@
|
|
|
31
31
|
"desiredParent": ["=OnboardItem"],
|
|
32
32
|
"label": "Onboard Buttons",
|
|
33
33
|
"description": "Wrapper for onboarding button set.",
|
|
34
|
-
"
|
|
34
|
+
"attributes": {
|
|
35
35
|
"seperatorColor": {
|
|
36
36
|
"label": "Seperator Color",
|
|
37
37
|
"description": "Color of the divider line.",
|
|
38
38
|
"category": "style",
|
|
39
39
|
"specialCategory": null,
|
|
40
40
|
"sort": 5
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"attributes": {
|
|
41
|
+
},
|
|
44
42
|
"buttonType": {
|
|
45
43
|
"label": "Button Type",
|
|
46
44
|
"description": "Which onboard button to show.",
|
|
@@ -40,7 +40,7 @@ function buildSegments(
|
|
|
40
40
|
|
|
41
41
|
for (const p of patterns) {
|
|
42
42
|
if (!p.value) continue;
|
|
43
|
-
const re = new RegExp(escapeRegExp(p.value), '
|
|
43
|
+
const re = new RegExp(escapeRegExp(p.value), 'g');
|
|
44
44
|
for (const m of text.matchAll(re)) {
|
|
45
45
|
if (m.index == null) continue;
|
|
46
46
|
const matched = m[0];
|
|
@@ -94,7 +94,6 @@ function buildSegments(
|
|
|
94
94
|
function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
95
95
|
useLogRender('OnboardFooter');
|
|
96
96
|
node = useNode(node);
|
|
97
|
-
console.log('node', node);
|
|
98
97
|
const attributeName = node.sourceType ?? node.type ?? 'OnboardFooter';
|
|
99
98
|
const {
|
|
100
99
|
localization: builderLocalization,
|
|
@@ -164,12 +163,12 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
|
164
163
|
const { segments, matchCount } = buildSegments(text, [
|
|
165
164
|
{
|
|
166
165
|
value: firstText,
|
|
167
|
-
color: parsedFirstColor,
|
|
166
|
+
color: parsedFirstColor ?? undefined,
|
|
168
167
|
page: attrs?.linkedWordFirstPage,
|
|
169
168
|
},
|
|
170
169
|
{
|
|
171
170
|
value: secondText,
|
|
172
|
-
color: parsedSecondColor,
|
|
171
|
+
color: parsedSecondColor ?? undefined,
|
|
173
172
|
page: attrs?.linkedWordSecondPage,
|
|
174
173
|
},
|
|
175
174
|
]);
|
|
@@ -204,7 +203,7 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
|
204
203
|
<span
|
|
205
204
|
style={{
|
|
206
205
|
...mergedTextStyle,
|
|
207
|
-
color: parsedFirstColor,
|
|
206
|
+
color: parsedFirstColor ?? undefined,
|
|
208
207
|
}}
|
|
209
208
|
onClick={() => handleClick(attrs?.linkedWordFirstPage)}
|
|
210
209
|
>
|
|
@@ -215,7 +214,7 @@ function OnboardFooter({ node }: OnboardFooterComponentProps) {
|
|
|
215
214
|
<span
|
|
216
215
|
style={{
|
|
217
216
|
...mergedTextStyle,
|
|
218
|
-
color: parsedSecondColor,
|
|
217
|
+
color: parsedSecondColor ?? undefined,
|
|
219
218
|
}}
|
|
220
219
|
onClick={() => handleClick(attrs?.linkedWordSecondPage)}
|
|
221
220
|
>
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
"extends": "View",
|
|
9
9
|
"attributes": {
|
|
10
10
|
"display": ["flex", "block"],
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
"styles": {
|
|
12
|
+
"gap": "size",
|
|
13
|
+
"flexDirection": ["row", "column"],
|
|
14
|
+
"paddingHorizontal": "size"
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
17
|
},
|
|
16
18
|
"defaults": {
|
|
@@ -34,26 +36,28 @@
|
|
|
34
36
|
"specialCategory": null,
|
|
35
37
|
"sort": 1
|
|
36
38
|
},
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
39
|
+
"styles": {
|
|
40
|
+
"gap": {
|
|
41
|
+
"label": "Gap",
|
|
42
|
+
"description": "Space between child blocks.",
|
|
43
|
+
"category": "container",
|
|
44
|
+
"specialCategory": null,
|
|
45
|
+
"sort": 2
|
|
46
|
+
},
|
|
47
|
+
"flexDirection": {
|
|
48
|
+
"label": "Flex Direction",
|
|
49
|
+
"description": "Order of child stacking.",
|
|
50
|
+
"category": "container",
|
|
51
|
+
"specialCategory": null,
|
|
52
|
+
"sort": 3
|
|
53
|
+
},
|
|
54
|
+
"paddingHorizontal": {
|
|
55
|
+
"label": "Padding Horizontal",
|
|
56
|
+
"description": "Left and right padding.",
|
|
57
|
+
"category": "container",
|
|
58
|
+
"specialCategory": "padding",
|
|
59
|
+
"sort": 4
|
|
60
|
+
}
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
}
|
|
@@ -30,33 +30,35 @@
|
|
|
30
30
|
"specialCategory": null,
|
|
31
31
|
"sort": -10
|
|
32
32
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
33
|
+
"styles": {
|
|
34
|
+
"paddingTop": {
|
|
35
|
+
"label": "Padding Top",
|
|
36
|
+
"description": "Top padding for the provider.",
|
|
37
|
+
"category": "container",
|
|
38
|
+
"specialCategory": "padding",
|
|
39
|
+
"sort": 1
|
|
40
|
+
},
|
|
41
|
+
"paddingRight": {
|
|
42
|
+
"label": "Padding Right",
|
|
43
|
+
"description": "Right padding for the provider.",
|
|
44
|
+
"category": "container",
|
|
45
|
+
"specialCategory": "padding",
|
|
46
|
+
"sort": 2
|
|
47
|
+
},
|
|
48
|
+
"paddingBottom": {
|
|
49
|
+
"label": "Padding Bottom",
|
|
50
|
+
"description": "Bottom padding for the provider.",
|
|
51
|
+
"category": "container",
|
|
52
|
+
"specialCategory": "padding",
|
|
53
|
+
"sort": 3
|
|
54
|
+
},
|
|
55
|
+
"paddingLeft": {
|
|
56
|
+
"label": "Padding Left",
|
|
57
|
+
"description": "Left padding for the provider.",
|
|
58
|
+
"category": "container",
|
|
59
|
+
"specialCategory": "padding",
|
|
60
|
+
"sort": 4
|
|
61
|
+
}
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
}
|
|
@@ -107,16 +107,6 @@ function PaywallProvider({ node }: PaywallProviderComponentProps) {
|
|
|
107
107
|
localize,
|
|
108
108
|
},
|
|
109
109
|
);
|
|
110
|
-
|
|
111
|
-
console.log('[PaywallProvider] extraction debug', {
|
|
112
|
-
platform: platformForExtraction,
|
|
113
|
-
selectedProductId,
|
|
114
|
-
hasSubscriptionOffers: !!selectedProduct?.subscriptionOffers?.length,
|
|
115
|
-
subscriptionOffersCount: selectedProduct?.subscriptionOffers?.length ?? 0,
|
|
116
|
-
detailedProductParams,
|
|
117
|
-
selectedProduct,
|
|
118
|
-
});
|
|
119
|
-
|
|
120
110
|
const handleClose = useCallback(() => {
|
|
121
111
|
if (!isBackAllowed) {
|
|
122
112
|
return;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"desiredParent": ["all"],
|
|
17
17
|
"label": "Radio Button",
|
|
18
18
|
"description": "Generic radio button icon.",
|
|
19
|
-
"
|
|
19
|
+
"attributes": {
|
|
20
20
|
"color": {
|
|
21
21
|
"label": "Color",
|
|
22
22
|
"description": "Radio color.",
|
|
@@ -30,9 +30,7 @@
|
|
|
30
30
|
"category": "style",
|
|
31
31
|
"specialCategory": null,
|
|
32
32
|
"sort": 2
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"attributes": {
|
|
33
|
+
},
|
|
36
34
|
"selected": {
|
|
37
35
|
"label": "Selected",
|
|
38
36
|
"description": "Whether the radio is selected.",
|
|
@@ -21,31 +21,31 @@
|
|
|
21
21
|
"desiredParent": ["all"],
|
|
22
22
|
"label": "Separator",
|
|
23
23
|
"description": "Horizontal line separator.",
|
|
24
|
-
"styles": {
|
|
25
|
-
"backgroundColor": {
|
|
26
|
-
"label": "Color",
|
|
27
|
-
"description": "Separator line color.",
|
|
28
|
-
"category": "style",
|
|
29
|
-
"specialCategory": null,
|
|
30
|
-
"sort": 1
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
24
|
"attributes": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
"styles": {
|
|
26
|
+
"backgroundColor": {
|
|
27
|
+
"label": "Color",
|
|
28
|
+
"description": "Separator line color.",
|
|
29
|
+
"category": "style",
|
|
30
|
+
"specialCategory": null,
|
|
31
|
+
"sort": 1
|
|
32
|
+
},
|
|
33
|
+
"width": {
|
|
34
|
+
"label": "Width",
|
|
35
|
+
"description": "Separator width.",
|
|
36
|
+
"category": "container",
|
|
37
|
+
"specialCategory": null,
|
|
38
|
+
"sort": 1,
|
|
39
|
+
"preferredScale": "s"
|
|
40
|
+
},
|
|
41
|
+
"height": {
|
|
42
|
+
"label": "Height",
|
|
43
|
+
"description": "Separator thickness.",
|
|
44
|
+
"category": "container",
|
|
45
|
+
"specialCategory": null,
|
|
46
|
+
"sort": 2,
|
|
47
|
+
"preferredScale": "vs"
|
|
48
|
+
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
},
|