@builder.io/sdk-solid 0.0.7 → 0.0.8
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/package.json +57 -1
- package/src/blocks/columns.jsx +2 -7
- package/src/components/render-block.jsx +1 -3
- package/src/index.js +11 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-solid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -12,5 +12,61 @@
|
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"solid-js": "^1.3.15"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
"./functions/event-handler": "./functions/event-handler.js",
|
|
18
|
+
"./functions/get-block-actions": "./functions/get-block-actions.js",
|
|
19
|
+
"./functions/get-block-component": "./functions/get-block-component.js",
|
|
20
|
+
"./functions/get-block-properties": "./functions/get-block-properties.js",
|
|
21
|
+
"./functions/get-block-styles": "./functions/get-block-styles.js",
|
|
22
|
+
"./functions/get-block-tag": "./functions/get-block-tag.js",
|
|
23
|
+
"./functions/get-fetch": "./functions/get-fetch.js",
|
|
24
|
+
"./functions/get-global-this": "./functions/get-global-this.js",
|
|
25
|
+
"./functions/get-processed-block": "./functions/get-processed-block.js",
|
|
26
|
+
"./functions/if-target": "./functions/if-target.js",
|
|
27
|
+
"./functions/is-browser": "./functions/is-browser.js",
|
|
28
|
+
"./functions/is-editing": "./functions/is-editing.js",
|
|
29
|
+
"./functions/is-iframe": "./functions/is-iframe.js",
|
|
30
|
+
"./functions/is-previewing": "./functions/is-previewing.js",
|
|
31
|
+
"./functions/macro-eval": "./functions/macro-eval.js",
|
|
32
|
+
"./functions/on-change": "./functions/on-change.js",
|
|
33
|
+
"./functions/previewing-model-name": "./functions/previewing-model-name.js",
|
|
34
|
+
"./functions/register-component": "./functions/register-component.js",
|
|
35
|
+
"./functions/register": "./functions/register.js",
|
|
36
|
+
"./functions/set-editor-settings": "./functions/set-editor-settings.js",
|
|
37
|
+
"./functions/set": "./functions/set.js",
|
|
38
|
+
"./functions/track": "./functions/track.js",
|
|
39
|
+
"./functions/transform-block": "./functions/transform-block.js",
|
|
40
|
+
"./functions/get-content": "./functions/get-content/index.js",
|
|
41
|
+
"./functions/get-builder-search-params": "./functions/get-builder-search-params/index.js",
|
|
42
|
+
"./functions/index-helpers/block-exports": "./functions/index-helpers/block-exports.js",
|
|
43
|
+
"./functions/index-helpers/top-of-file": "./functions/index-helpers/top-of-file.js",
|
|
44
|
+
"./functions/scripts/init-editing": "./functions/scripts/init-editing.js",
|
|
45
|
+
"./constants/device-sizes": "./constants/device-sizes.js",
|
|
46
|
+
"./constants/target": "./constants/target.js",
|
|
47
|
+
"./context/builder.context": "./context/builder.context.js",
|
|
48
|
+
"./components/block-styles": "./components/block-styles.js",
|
|
49
|
+
"./components/error-boundary": "./components/error-boundary.js",
|
|
50
|
+
"./components/render-block": "./components/render-block.js",
|
|
51
|
+
"./components/render-blocks": "./components/render-blocks.js",
|
|
52
|
+
"./components/render-content/render-content": "./components/render-content/render-content.js",
|
|
53
|
+
"./components/render-content/components/render-styles": "./components/components/render-styles/render-content.js",
|
|
54
|
+
"./blocks/button": "./blocks/button.jsx",
|
|
55
|
+
"./blocks/columns": "./blocks/columns.jsx",
|
|
56
|
+
"./blocks/custom-code": "./blocks/custom-code.jsx",
|
|
57
|
+
"./blocks/embed": "./blocks/embed.jsx",
|
|
58
|
+
"./blocks/form": "./blocks/form.jsx",
|
|
59
|
+
"./blocks/fragment": "./blocks/fragment.jsx",
|
|
60
|
+
"./blocks/image": "./blocks/image.jsx",
|
|
61
|
+
"./blocks/img": "./blocks/img.jsx",
|
|
62
|
+
"./blocks/input": "./blocks/input.jsx",
|
|
63
|
+
"./blocks/raw-text": "./blocks/raw-text.jsx",
|
|
64
|
+
"./blocks/section": "./blocks/section.jsx",
|
|
65
|
+
"./blocks/select": "./blocks/select.jsx",
|
|
66
|
+
"./blocks/submit-button": "./blocks/submit-button.jsx",
|
|
67
|
+
"./blocks/symbol": "./blocks/symbol.jsx",
|
|
68
|
+
"./blocks/text": "./blocks/text.jsx",
|
|
69
|
+
"./blocks/textarea": "./blocks/textarea.jsx",
|
|
70
|
+
"./blocks/video": "./blocks/video.jsx"
|
|
15
71
|
}
|
|
16
72
|
}
|
package/src/blocks/columns.jsx
CHANGED
|
@@ -4,7 +4,6 @@ import { css } from "solid-styled-components";
|
|
|
4
4
|
import RenderBlocks from "../components/render-blocks";
|
|
5
5
|
|
|
6
6
|
function Columns(props) {
|
|
7
|
-
console.log('columns')
|
|
8
7
|
const state = createMutable({
|
|
9
8
|
getGutterSize() {
|
|
10
9
|
return typeof props.space === "number" ? props.space || 0 : 20;
|
|
@@ -51,8 +50,6 @@ function Columns(props) {
|
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
});
|
|
54
|
-
|
|
55
|
-
console.log('props.columns', props.columns, props.builderBlock.component.options.columns)
|
|
56
53
|
return <div class={css({
|
|
57
54
|
display: "flex",
|
|
58
55
|
alignItems: "stretch",
|
|
@@ -63,13 +60,11 @@ function Columns(props) {
|
|
|
63
60
|
"@media (max-width: 639px)": {
|
|
64
61
|
flexDirection: "var(--flex-dir)"
|
|
65
62
|
}
|
|
66
|
-
})
|
|
63
|
+
})} style={state.columnsCssVars}>
|
|
67
64
|
<For each={props.columns}>
|
|
68
65
|
{(column, _index) => {
|
|
69
66
|
const index = _index();
|
|
70
67
|
|
|
71
|
-
console.log('column', column)
|
|
72
|
-
|
|
73
68
|
return <div class={css({
|
|
74
69
|
flexGrow: "1",
|
|
75
70
|
"@media (max-width: 999px)": {
|
|
@@ -80,7 +75,7 @@ function Columns(props) {
|
|
|
80
75
|
width: "var(--column-width) !important",
|
|
81
76
|
marginLeft: "var(--column-margin-left) !important"
|
|
82
77
|
}
|
|
83
|
-
})
|
|
78
|
+
})} style={{
|
|
84
79
|
width: state.getColumnCssWidth(index),
|
|
85
80
|
"margin-left": `${index === 0 ? 0 : state.getGutterSize()}px`,
|
|
86
81
|
...state.columnCssVars
|
|
@@ -84,17 +84,15 @@ function RenderBlock(props) {
|
|
|
84
84
|
|
|
85
85
|
});
|
|
86
86
|
const builderContext = useContext(BuilderContext);
|
|
87
|
-
console.log('props.block.options', props.block.component?.options)
|
|
88
87
|
return <>
|
|
89
88
|
<Show when={!state.componentInfo?.noWrap}>
|
|
90
89
|
<Dynamic {...state.propertiesAndActions} style={state.css} component={state.tagName}>
|
|
91
90
|
<BlockStyles block={state.useBlock}></BlockStyles>
|
|
92
91
|
<Show when={state.componentRef}>
|
|
93
|
-
<Dynamic {...
|
|
92
|
+
<Dynamic {...state.componentOptions} builderBlock={state.useBlock} component={state.componentRef}>
|
|
94
93
|
<For each={state.children}>
|
|
95
94
|
{(child, _index) => {
|
|
96
95
|
const index = _index();
|
|
97
|
-
console.log('render block?')
|
|
98
96
|
|
|
99
97
|
return <RenderBlock block={child}></RenderBlock>;
|
|
100
98
|
}}
|
package/src/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import("./index-helpers/top-of-file");
|
|
2
|
-
import { isEditing } from "./functions/is-editing";
|
|
1
|
+
import("./index-helpers/top-of-file.js");
|
|
2
|
+
import { isEditing } from "./functions/is-editing.js";
|
|
3
3
|
if (isEditing()) {
|
|
4
|
-
import("./scripts/init-editing");
|
|
4
|
+
import("./scripts/init-editing.js");
|
|
5
5
|
}
|
|
6
|
-
export * from "./index-helpers/blocks-exports";
|
|
7
|
-
export * from "./functions/is-editing";
|
|
8
|
-
export * from "./functions/is-previewing";
|
|
9
|
-
export * from "./functions/register-component";
|
|
10
|
-
export * from "./functions/register";
|
|
11
|
-
export * from "./functions/set-editor-settings";
|
|
12
|
-
export * from "./functions/get-content";
|
|
13
|
-
export * from "./functions/get-builder-search-params";
|
|
6
|
+
export * from "./index-helpers/blocks-exports.js";
|
|
7
|
+
export * from "./functions/is-editing.js.js";
|
|
8
|
+
export * from "./functions/is-previewing.js";
|
|
9
|
+
export * from "./functions/register-component.js";
|
|
10
|
+
export * from "./functions/register.js";
|
|
11
|
+
export * from "./functions/set-editor-settings.js";
|
|
12
|
+
export * from "./functions/get-content.js";
|
|
13
|
+
export * from "./functions/get-builder-search-params.js";
|