@builder.io/sdk-svelte 2.0.2 → 2.0.3
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/columns/columns.svelte +3 -2
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/constants/sdk-version.js +1 -1
- package/lib/browser/functions/register-component.d.ts +2 -2
- package/lib/browser/functions/register-component.js +8 -9
- package/lib/edge/blocks/columns/columns.svelte +3 -2
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/constants/sdk-version.js +1 -1
- package/lib/edge/functions/register-component.d.ts +2 -2
- package/lib/edge/functions/register-component.js +8 -9
- package/lib/node/blocks/columns/columns.svelte +3 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/constants/sdk-version.js +1 -1
- package/lib/node/functions/register-component.d.ts +2 -2
- package/lib/node/functions/register-component.js +8 -9
- package/package.json +1 -1
- package/src/blocks/columns/columns.svelte +3 -2
- package/src/constants/sdk-version.ts +1 -1
- package/src/functions/register-component.ts +8 -13
|
@@ -93,6 +93,7 @@ function getWidthForBreakpointSize(size) {
|
|
|
93
93
|
return breakpointSizes[size].max;
|
|
94
94
|
}
|
|
95
95
|
function columnsStyles() {
|
|
96
|
+
const childColumnDiv = `.${builderBlock.id}-breakpoints > .builder-column`;
|
|
96
97
|
return `
|
|
97
98
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
98
99
|
.${builderBlock.id}-breakpoints {
|
|
@@ -100,7 +101,7 @@ function columnsStyles() {
|
|
|
100
101
|
align-items: stretch;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
${childColumnDiv} {
|
|
104
105
|
width: var(--column-width-tablet) !important;
|
|
105
106
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
106
107
|
}
|
|
@@ -112,7 +113,7 @@ function columnsStyles() {
|
|
|
112
113
|
align-items: stretch;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
${childColumnDiv} {
|
|
116
117
|
width: var(--column-width-mobile) !important;
|
|
117
118
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
118
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentInfo } from '../types/components';
|
|
2
2
|
export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
|
|
3
3
|
type: string;
|
|
4
|
-
data:
|
|
4
|
+
data: any;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
6
|
+
export declare function serializeComponentInfo(info: ComponentInfo): any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fastClone } from './fast-clone';
|
|
2
1
|
export const createRegisterComponentMessage = (info) => ({
|
|
3
2
|
type: 'builder.registerComponent',
|
|
4
3
|
data: serializeComponentInfo(info)
|
|
@@ -13,11 +12,11 @@ const serializeFn = (fnValue) => {
|
|
|
13
12
|
const appendFunction = !fnStr.startsWith('function') && !fnStr.startsWith('(');
|
|
14
13
|
return `return (${appendFunction ? 'function ' : ''}${fnStr}).apply(this, arguments)`;
|
|
15
14
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
}
|
|
15
|
+
export function serializeComponentInfo(info) {
|
|
16
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
17
|
+
if (typeof value === 'function') {
|
|
18
|
+
return serializeFn(value);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
@@ -93,6 +93,7 @@ function getWidthForBreakpointSize(size) {
|
|
|
93
93
|
return breakpointSizes[size].max;
|
|
94
94
|
}
|
|
95
95
|
function columnsStyles() {
|
|
96
|
+
const childColumnDiv = `.${builderBlock.id}-breakpoints > .builder-column`;
|
|
96
97
|
return `
|
|
97
98
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
98
99
|
.${builderBlock.id}-breakpoints {
|
|
@@ -100,7 +101,7 @@ function columnsStyles() {
|
|
|
100
101
|
align-items: stretch;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
${childColumnDiv} {
|
|
104
105
|
width: var(--column-width-tablet) !important;
|
|
105
106
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
106
107
|
}
|
|
@@ -112,7 +113,7 @@ function columnsStyles() {
|
|
|
112
113
|
align-items: stretch;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
${childColumnDiv} {
|
|
116
117
|
width: var(--column-width-mobile) !important;
|
|
117
118
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
118
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentInfo } from '../types/components';
|
|
2
2
|
export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
|
|
3
3
|
type: string;
|
|
4
|
-
data:
|
|
4
|
+
data: any;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
6
|
+
export declare function serializeComponentInfo(info: ComponentInfo): any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fastClone } from './fast-clone';
|
|
2
1
|
export const createRegisterComponentMessage = (info) => ({
|
|
3
2
|
type: 'builder.registerComponent',
|
|
4
3
|
data: serializeComponentInfo(info)
|
|
@@ -13,11 +12,11 @@ const serializeFn = (fnValue) => {
|
|
|
13
12
|
const appendFunction = !fnStr.startsWith('function') && !fnStr.startsWith('(');
|
|
14
13
|
return `return (${appendFunction ? 'function ' : ''}${fnStr}).apply(this, arguments)`;
|
|
15
14
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
}
|
|
15
|
+
export function serializeComponentInfo(info) {
|
|
16
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
17
|
+
if (typeof value === 'function') {
|
|
18
|
+
return serializeFn(value);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
@@ -93,6 +93,7 @@ function getWidthForBreakpointSize(size) {
|
|
|
93
93
|
return breakpointSizes[size].max;
|
|
94
94
|
}
|
|
95
95
|
function columnsStyles() {
|
|
96
|
+
const childColumnDiv = `.${builderBlock.id}-breakpoints > .builder-column`;
|
|
96
97
|
return `
|
|
97
98
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
98
99
|
.${builderBlock.id}-breakpoints {
|
|
@@ -100,7 +101,7 @@ function columnsStyles() {
|
|
|
100
101
|
align-items: stretch;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
${childColumnDiv} {
|
|
104
105
|
width: var(--column-width-tablet) !important;
|
|
105
106
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
106
107
|
}
|
|
@@ -112,7 +113,7 @@ function columnsStyles() {
|
|
|
112
113
|
align-items: stretch;
|
|
113
114
|
}
|
|
114
115
|
|
|
115
|
-
|
|
116
|
+
${childColumnDiv} {
|
|
116
117
|
width: var(--column-width-mobile) !important;
|
|
117
118
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
118
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.3";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentInfo } from '../types/components';
|
|
2
2
|
export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
|
|
3
3
|
type: string;
|
|
4
|
-
data:
|
|
4
|
+
data: any;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
6
|
+
export declare function serializeComponentInfo(info: ComponentInfo): any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fastClone } from './fast-clone';
|
|
2
1
|
export const createRegisterComponentMessage = (info) => ({
|
|
3
2
|
type: 'builder.registerComponent',
|
|
4
3
|
data: serializeComponentInfo(info)
|
|
@@ -13,11 +12,11 @@ const serializeFn = (fnValue) => {
|
|
|
13
12
|
const appendFunction = !fnStr.startsWith('function') && !fnStr.startsWith('(');
|
|
14
13
|
return `return (${appendFunction ? 'function ' : ''}${fnStr}).apply(this, arguments)`;
|
|
15
14
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
}
|
|
15
|
+
export function serializeComponentInfo(info) {
|
|
16
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
17
|
+
if (typeof value === 'function') {
|
|
18
|
+
return serializeFn(value);
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
}));
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
return breakpointSizes[size].max;
|
|
118
118
|
}
|
|
119
119
|
function columnsStyles() {
|
|
120
|
+
const childColumnDiv = `.${builderBlock.id}-breakpoints > .builder-column`;
|
|
120
121
|
return `
|
|
121
122
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
122
123
|
.${builderBlock.id}-breakpoints {
|
|
@@ -124,7 +125,7 @@
|
|
|
124
125
|
align-items: stretch;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
+
${childColumnDiv} {
|
|
128
129
|
width: var(--column-width-tablet) !important;
|
|
129
130
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
130
131
|
}
|
|
@@ -136,7 +137,7 @@
|
|
|
136
137
|
align-items: stretch;
|
|
137
138
|
}
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
${childColumnDiv} {
|
|
140
141
|
width: var(--column-width-mobile) !important;
|
|
141
142
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
142
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "2.0.
|
|
1
|
+
export const SDK_VERSION = "2.0.3"
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { ComponentInfo } from '../types/components';
|
|
2
|
-
import type { Input } from '../types/input';
|
|
3
|
-
import { fastClone } from './fast-clone';
|
|
4
2
|
export const createRegisterComponentMessage = (info: ComponentInfo) => ({
|
|
5
3
|
type: 'builder.registerComponent',
|
|
6
4
|
data: serializeComponentInfo(info)
|
|
@@ -17,14 +15,11 @@ const serializeFn = (fnValue: Function) => {
|
|
|
17
15
|
const appendFunction = !fnStr.startsWith('function') && !fnStr.startsWith('(');
|
|
18
16
|
return `return (${appendFunction ? 'function ' : ''}${fnStr}).apply(this, arguments)`;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
[key]: serializeValue(value)
|
|
29
|
-
}), ({} as Input)))
|
|
30
|
-
})
|
|
18
|
+
export function serializeComponentInfo(info: ComponentInfo) {
|
|
19
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
20
|
+
if (typeof value === 'function') {
|
|
21
|
+
return serializeFn(value);
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}));
|
|
25
|
+
}
|