@builder.io/sdk-solid 0.0.6 → 0.0.7

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
+ "type": "module",
4
5
  "description": "",
5
- "main": "src/index.js",
6
+ "module": "src/index.js",
6
7
  "dependencies": {
7
8
  "solid-styled-components": "^0.27.6"
8
9
  },
@@ -4,6 +4,7 @@ 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')
7
8
  const state = createMutable({
8
9
  getGutterSize() {
9
10
  return typeof props.space === "number" ? props.space || 0 : 20;
@@ -50,6 +51,8 @@ function Columns(props) {
50
51
  }
51
52
 
52
53
  });
54
+
55
+ console.log('props.columns', props.columns, props.builderBlock.component.options.columns)
53
56
  return <div class={css({
54
57
  display: "flex",
55
58
  alignItems: "stretch",
@@ -60,11 +63,13 @@ function Columns(props) {
60
63
  "@media (max-width: 639px)": {
61
64
  flexDirection: "var(--flex-dir)"
62
65
  }
63
- })} style={state.columnsCssVars}>
66
+ }) + " builder-columns"} style={state.columnsCssVars}>
64
67
  <For each={props.columns}>
65
68
  {(column, _index) => {
66
69
  const index = _index();
67
70
 
71
+ console.log('column', column)
72
+
68
73
  return <div class={css({
69
74
  flexGrow: "1",
70
75
  "@media (max-width: 999px)": {
@@ -75,7 +80,7 @@ function Columns(props) {
75
80
  width: "var(--column-width) !important",
76
81
  marginLeft: "var(--column-margin-left) !important"
77
82
  }
78
- })} style={{
83
+ }) + "builder-column"} style={{
79
84
  width: state.getColumnCssWidth(index),
80
85
  "margin-left": `${index === 0 ? 0 : state.getGutterSize()}px`,
81
86
  ...state.columnCssVars
@@ -84,15 +84,17 @@ function RenderBlock(props) {
84
84
 
85
85
  });
86
86
  const builderContext = useContext(BuilderContext);
87
+ console.log('props.block.options', props.block.component?.options)
87
88
  return <>
88
89
  <Show when={!state.componentInfo?.noWrap}>
89
90
  <Dynamic {...state.propertiesAndActions} style={state.css} component={state.tagName}>
90
91
  <BlockStyles block={state.useBlock}></BlockStyles>
91
92
  <Show when={state.componentRef}>
92
- <Dynamic {...state.componentOptions} builderBlock={state.useBlock} component={state.componentRef}>
93
+ <Dynamic {...props.block.component.options} builderBlock={props.block} component={state.componentRef}>
93
94
  <For each={state.children}>
94
95
  {(child, _index) => {
95
96
  const index = _index();
97
+ console.log('render block?')
96
98
 
97
99
  return <RenderBlock block={child}></RenderBlock>;
98
100
  }}