@builder.io/sdk-svelte 1.1.2 → 2.0.0
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/lib/browser/blocks/button/component-info.js +0 -3
- package/lib/browser/blocks/columns/columns.svelte +3 -2
- package/lib/browser/blocks/custom-code/component-info.js +0 -6
- package/lib/browser/blocks/embed/component-info.js +0 -6
- package/lib/browser/blocks/form/input/component-info.js +0 -6
- package/lib/browser/blocks/form/select/component-info.js +0 -6
- package/lib/browser/blocks/form/submit-button/component-info.js +0 -6
- package/lib/browser/blocks/form/textarea/component-info.js +0 -6
- package/lib/browser/blocks/fragment/component-info.js +0 -6
- package/lib/browser/blocks/image/component-info.js +1 -4
- package/lib/browser/blocks/img/component-info.js +0 -6
- package/lib/browser/blocks/raw-text/component-info.js +0 -6
- package/lib/browser/blocks/section/component-info.js +0 -6
- package/lib/browser/blocks/slot/component-info.js +1 -4
- package/lib/browser/blocks/text/component-info.js +1 -4
- package/lib/browser/blocks/video/component-info.js +1 -4
- package/lib/browser/components/block/block.helpers.d.ts +8 -8
- package/lib/browser/components/block/block.helpers.js +20 -43
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/edge/blocks/button/component-info.js +0 -3
- package/lib/edge/blocks/columns/columns.svelte +3 -2
- package/lib/edge/blocks/custom-code/component-info.js +0 -6
- package/lib/edge/blocks/embed/component-info.js +0 -6
- package/lib/edge/blocks/form/input/component-info.js +0 -6
- package/lib/edge/blocks/form/select/component-info.js +0 -6
- package/lib/edge/blocks/form/submit-button/component-info.js +0 -6
- package/lib/edge/blocks/form/textarea/component-info.js +0 -6
- package/lib/edge/blocks/fragment/component-info.js +0 -6
- package/lib/edge/blocks/image/component-info.js +1 -4
- package/lib/edge/blocks/img/component-info.js +0 -6
- package/lib/edge/blocks/raw-text/component-info.js +0 -6
- package/lib/edge/blocks/section/component-info.js +0 -6
- package/lib/edge/blocks/slot/component-info.js +1 -4
- package/lib/edge/blocks/text/component-info.js +1 -4
- package/lib/edge/blocks/video/component-info.js +1 -4
- package/lib/edge/components/block/block.helpers.d.ts +8 -8
- package/lib/edge/components/block/block.helpers.js +20 -43
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/node/blocks/button/component-info.js +0 -3
- package/lib/node/blocks/columns/columns.svelte +3 -2
- package/lib/node/blocks/custom-code/component-info.js +0 -6
- package/lib/node/blocks/embed/component-info.js +0 -6
- package/lib/node/blocks/form/input/component-info.js +0 -6
- package/lib/node/blocks/form/select/component-info.js +0 -6
- package/lib/node/blocks/form/submit-button/component-info.js +0 -6
- package/lib/node/blocks/form/textarea/component-info.js +0 -6
- package/lib/node/blocks/fragment/component-info.js +0 -6
- package/lib/node/blocks/image/component-info.js +1 -4
- package/lib/node/blocks/img/component-info.js +0 -6
- package/lib/node/blocks/raw-text/component-info.js +0 -6
- package/lib/node/blocks/section/component-info.js +0 -6
- package/lib/node/blocks/slot/component-info.js +1 -4
- package/lib/node/blocks/text/component-info.js +1 -4
- package/lib/node/blocks/video/component-info.js +1 -4
- package/lib/node/components/block/block.helpers.d.ts +8 -8
- package/lib/node/components/block/block.helpers.js +20 -43
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/package.json +1 -1
- package/src/blocks/button/component-info.ts +0 -3
- package/src/blocks/columns/columns.svelte +3 -2
- package/src/blocks/custom-code/component-info.ts +0 -6
- package/src/blocks/embed/component-info.ts +0 -6
- package/src/blocks/form/input/component-info.ts +0 -6
- package/src/blocks/form/select/component-info.ts +0 -6
- package/src/blocks/form/submit-button/component-info.ts +0 -6
- package/src/blocks/form/textarea/component-info.ts +0 -6
- package/src/blocks/fragment/component-info.ts +0 -6
- package/src/blocks/image/component-info.ts +1 -4
- package/src/blocks/img/component-info.ts +0 -6
- package/src/blocks/raw-text/component-info.ts +0 -6
- package/src/blocks/section/component-info.ts +0 -6
- package/src/blocks/slot/component-info.ts +1 -4
- package/src/blocks/text/component-info.ts +1 -4
- package/src/blocks/video/component-info.ts +1 -4
- package/src/components/block/block.helpers.ts +8 -28
- package/src/constants/sdk-version.ts +1 -1
|
@@ -35,8 +35,9 @@ function getWidth(index) {
|
|
|
35
35
|
return cols[index]?.width || 100 / cols.length;
|
|
36
36
|
}
|
|
37
37
|
function getColumnCssWidth(index) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const width = getWidth(index);
|
|
39
|
+
const subtractWidth = gutterSize * (cols.length - 1) * (width / 100);
|
|
40
|
+
return `calc(${width}% - ${subtractWidth}px)`;
|
|
40
41
|
}
|
|
41
42
|
function getTabletStyle({ stackedStyle, desktopStyle, }) {
|
|
42
43
|
return stackAt === "tablet" ? stackedStyle : desktopStyle;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:Input',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca',
|
|
10
4
|
inputs: [{
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:Select',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045',
|
|
10
4
|
defaultStyles: {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:SubmitButton',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98',
|
|
10
4
|
defaultStyles: {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:TextArea',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3',
|
|
10
4
|
inputs: [{
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Core:Section',
|
|
9
3
|
static: true,
|
|
10
4
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a',
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TARGET } from '../../constants/target';
|
|
2
2
|
export const componentInfo = {
|
|
3
3
|
shouldReceiveBuilderProps: {
|
|
4
|
-
builderBlock: TARGET === 'reactNative' ? true : false
|
|
5
|
-
builderContext: false,
|
|
6
|
-
builderComponents: false,
|
|
7
|
-
builderLinkComponent: false
|
|
4
|
+
builderBlock: TARGET === 'reactNative' ? true : false
|
|
8
5
|
},
|
|
9
6
|
name: 'Text',
|
|
10
7
|
static: true,
|
|
@@ -17,22 +17,22 @@ export declare const getInheritedStyles: ({ block, context }: {
|
|
|
17
17
|
context: BuilderContextInterface;
|
|
18
18
|
}) => Partial<CSSStyleDeclaration>;
|
|
19
19
|
export declare const provideLinkComponent: (block: RegisteredComponent | null | undefined, linkComponent: any) => {
|
|
20
|
-
builderLinkComponent?: undefined;
|
|
21
|
-
} | {
|
|
22
20
|
builderLinkComponent: any;
|
|
21
|
+
} | {
|
|
22
|
+
builderLinkComponent?: undefined;
|
|
23
23
|
};
|
|
24
24
|
export declare const provideRegisteredComponents: (block: RegisteredComponent | null | undefined, registeredComponents: RegisteredComponents) => {
|
|
25
|
-
builderComponents?: undefined;
|
|
26
|
-
} | {
|
|
27
25
|
builderComponents: RegisteredComponents;
|
|
26
|
+
} | {
|
|
27
|
+
builderComponents?: undefined;
|
|
28
28
|
};
|
|
29
29
|
export declare const provideBuilderBlock: (block: RegisteredComponent | null | undefined, builderBlock: BuilderBlock) => {
|
|
30
|
-
builderBlock?: undefined;
|
|
31
|
-
} | {
|
|
32
30
|
builderBlock: BuilderBlock;
|
|
31
|
+
} | {
|
|
32
|
+
builderBlock?: undefined;
|
|
33
33
|
};
|
|
34
34
|
export declare const provideBuilderContext: (block: RegisteredComponent | null | undefined, context: Writable<BuilderContextInterface>) => {
|
|
35
|
-
builderContext?: undefined;
|
|
36
|
-
} | {
|
|
37
35
|
builderContext: Writable<BuilderContextInterface>;
|
|
36
|
+
} | {
|
|
37
|
+
builderContext?: undefined;
|
|
38
38
|
};
|
|
@@ -73,54 +73,31 @@ export const getInheritedStyles = ({ block, context }) => {
|
|
|
73
73
|
}
|
|
74
74
|
return extractTextStyles(style);
|
|
75
75
|
};
|
|
76
|
-
const applyDefaults = (shouldReceiveBuilderProps) => {
|
|
77
|
-
return {
|
|
78
|
-
// once we bump to a major version, toggle this to `false`.
|
|
79
|
-
builderBlock: true,
|
|
80
|
-
// once we bump to a major version, toggle this to `false`.
|
|
81
|
-
builderContext: true,
|
|
82
|
-
builderComponents: false,
|
|
83
|
-
builderLinkComponent: false,
|
|
84
|
-
...shouldReceiveBuilderProps
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
76
|
export const provideLinkComponent = (block, linkComponent) => {
|
|
88
|
-
if (
|
|
89
|
-
return {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
builderLinkComponent: linkComponent
|
|
95
|
-
};
|
|
77
|
+
if (block?.shouldReceiveBuilderProps?.builderLinkComponent)
|
|
78
|
+
return {
|
|
79
|
+
builderLinkComponent: linkComponent
|
|
80
|
+
};
|
|
81
|
+
return {};
|
|
96
82
|
};
|
|
97
83
|
export const provideRegisteredComponents = (block, registeredComponents) => {
|
|
98
|
-
if (
|
|
99
|
-
return {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
builderComponents: registeredComponents
|
|
105
|
-
};
|
|
84
|
+
if (block?.shouldReceiveBuilderProps?.builderComponents)
|
|
85
|
+
return {
|
|
86
|
+
builderComponents: registeredComponents
|
|
87
|
+
};
|
|
88
|
+
return {};
|
|
106
89
|
};
|
|
107
90
|
export const provideBuilderBlock = (block, builderBlock) => {
|
|
108
|
-
if (
|
|
109
|
-
return {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
builderBlock
|
|
115
|
-
};
|
|
91
|
+
if (block?.shouldReceiveBuilderProps?.builderBlock)
|
|
92
|
+
return {
|
|
93
|
+
builderBlock
|
|
94
|
+
};
|
|
95
|
+
return {};
|
|
116
96
|
};
|
|
117
97
|
export const provideBuilderContext = (block, context) => {
|
|
118
|
-
if (
|
|
119
|
-
return {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
builderContext: context
|
|
125
|
-
};
|
|
98
|
+
if (block?.shouldReceiveBuilderProps?.builderContext)
|
|
99
|
+
return {
|
|
100
|
+
builderContext: context
|
|
101
|
+
};
|
|
102
|
+
return {};
|
|
126
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "2.0.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "2.0.0";
|
|
@@ -35,8 +35,9 @@ function getWidth(index) {
|
|
|
35
35
|
return cols[index]?.width || 100 / cols.length;
|
|
36
36
|
}
|
|
37
37
|
function getColumnCssWidth(index) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const width = getWidth(index);
|
|
39
|
+
const subtractWidth = gutterSize * (cols.length - 1) * (width / 100);
|
|
40
|
+
return `calc(${width}% - ${subtractWidth}px)`;
|
|
40
41
|
}
|
|
41
42
|
function getTabletStyle({ stackedStyle, desktopStyle, }) {
|
|
42
43
|
return stackAt === "tablet" ? stackedStyle : desktopStyle;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:Input',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca',
|
|
10
4
|
inputs: [{
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:Select',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045',
|
|
10
4
|
defaultStyles: {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:SubmitButton',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98',
|
|
10
4
|
defaultStyles: {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Form:TextArea',
|
|
9
3
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3',
|
|
10
4
|
inputs: [{
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
export const componentInfo = {
|
|
2
|
-
shouldReceiveBuilderProps: {
|
|
3
|
-
builderBlock: false,
|
|
4
|
-
builderContext: false,
|
|
5
|
-
builderComponents: false,
|
|
6
|
-
builderLinkComponent: false
|
|
7
|
-
},
|
|
8
2
|
name: 'Core:Section',
|
|
9
3
|
static: true,
|
|
10
4
|
image: 'https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a',
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { TARGET } from '../../constants/target';
|
|
2
2
|
export const componentInfo = {
|
|
3
3
|
shouldReceiveBuilderProps: {
|
|
4
|
-
builderBlock: TARGET === 'reactNative' ? true : false
|
|
5
|
-
builderContext: false,
|
|
6
|
-
builderComponents: false,
|
|
7
|
-
builderLinkComponent: false
|
|
4
|
+
builderBlock: TARGET === 'reactNative' ? true : false
|
|
8
5
|
},
|
|
9
6
|
name: 'Text',
|
|
10
7
|
static: true,
|
|
@@ -17,22 +17,22 @@ export declare const getInheritedStyles: ({ block, context }: {
|
|
|
17
17
|
context: BuilderContextInterface;
|
|
18
18
|
}) => Partial<CSSStyleDeclaration>;
|
|
19
19
|
export declare const provideLinkComponent: (block: RegisteredComponent | null | undefined, linkComponent: any) => {
|
|
20
|
-
builderLinkComponent?: undefined;
|
|
21
|
-
} | {
|
|
22
20
|
builderLinkComponent: any;
|
|
21
|
+
} | {
|
|
22
|
+
builderLinkComponent?: undefined;
|
|
23
23
|
};
|
|
24
24
|
export declare const provideRegisteredComponents: (block: RegisteredComponent | null | undefined, registeredComponents: RegisteredComponents) => {
|
|
25
|
-
builderComponents?: undefined;
|
|
26
|
-
} | {
|
|
27
25
|
builderComponents: RegisteredComponents;
|
|
26
|
+
} | {
|
|
27
|
+
builderComponents?: undefined;
|
|
28
28
|
};
|
|
29
29
|
export declare const provideBuilderBlock: (block: RegisteredComponent | null | undefined, builderBlock: BuilderBlock) => {
|
|
30
|
-
builderBlock?: undefined;
|
|
31
|
-
} | {
|
|
32
30
|
builderBlock: BuilderBlock;
|
|
31
|
+
} | {
|
|
32
|
+
builderBlock?: undefined;
|
|
33
33
|
};
|
|
34
34
|
export declare const provideBuilderContext: (block: RegisteredComponent | null | undefined, context: Writable<BuilderContextInterface>) => {
|
|
35
|
-
builderContext?: undefined;
|
|
36
|
-
} | {
|
|
37
35
|
builderContext: Writable<BuilderContextInterface>;
|
|
36
|
+
} | {
|
|
37
|
+
builderContext?: undefined;
|
|
38
38
|
};
|
|
@@ -73,54 +73,31 @@ export const getInheritedStyles = ({ block, context }) => {
|
|
|
73
73
|
}
|
|
74
74
|
return extractTextStyles(style);
|
|
75
75
|
};
|
|
76
|
-
const applyDefaults = (shouldReceiveBuilderProps) => {
|
|
77
|
-
return {
|
|
78
|
-
// once we bump to a major version, toggle this to `false`.
|
|
79
|
-
builderBlock: true,
|
|
80
|
-
// once we bump to a major version, toggle this to `false`.
|
|
81
|
-
builderContext: true,
|
|
82
|
-
builderComponents: false,
|
|
83
|
-
builderLinkComponent: false,
|
|
84
|
-
...shouldReceiveBuilderProps
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
76
|
export const provideLinkComponent = (block, linkComponent) => {
|
|
88
|
-
if (
|
|
89
|
-
return {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
builderLinkComponent: linkComponent
|
|
95
|
-
};
|
|
77
|
+
if (block?.shouldReceiveBuilderProps?.builderLinkComponent)
|
|
78
|
+
return {
|
|
79
|
+
builderLinkComponent: linkComponent
|
|
80
|
+
};
|
|
81
|
+
return {};
|
|
96
82
|
};
|
|
97
83
|
export const provideRegisteredComponents = (block, registeredComponents) => {
|
|
98
|
-
if (
|
|
99
|
-
return {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
builderComponents: registeredComponents
|
|
105
|
-
};
|
|
84
|
+
if (block?.shouldReceiveBuilderProps?.builderComponents)
|
|
85
|
+
return {
|
|
86
|
+
builderComponents: registeredComponents
|
|
87
|
+
};
|
|
88
|
+
return {};
|
|
106
89
|
};
|
|
107
90
|
export const provideBuilderBlock = (block, builderBlock) => {
|
|
108
|
-
if (
|
|
109
|
-
return {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return {
|
|
114
|
-
builderBlock
|
|
115
|
-
};
|
|
91
|
+
if (block?.shouldReceiveBuilderProps?.builderBlock)
|
|
92
|
+
return {
|
|
93
|
+
builderBlock
|
|
94
|
+
};
|
|
95
|
+
return {};
|
|
116
96
|
};
|
|
117
97
|
export const provideBuilderContext = (block, context) => {
|
|
118
|
-
if (
|
|
119
|
-
return {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
builderContext: context
|
|
125
|
-
};
|
|
98
|
+
if (block?.shouldReceiveBuilderProps?.builderContext)
|
|
99
|
+
return {
|
|
100
|
+
builderContext: context
|
|
101
|
+
};
|
|
102
|
+
return {};
|
|
126
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "2.0.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "2.0.0";
|
|
@@ -35,8 +35,9 @@ function getWidth(index) {
|
|
|
35
35
|
return cols[index]?.width || 100 / cols.length;
|
|
36
36
|
}
|
|
37
37
|
function getColumnCssWidth(index) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const width = getWidth(index);
|
|
39
|
+
const subtractWidth = gutterSize * (cols.length - 1) * (width / 100);
|
|
40
|
+
return `calc(${width}% - ${subtractWidth}px)`;
|
|
40
41
|
}
|
|
41
42
|
function getTabletStyle({ stackedStyle, desktopStyle, }) {
|
|
42
43
|
return stackAt === "tablet" ? stackedStyle : desktopStyle;
|