@builder.io/sdk-solid 0.1.5 → 0.1.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-solid",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./solid-index.jsx",
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Core:Button",
3
- builtIn: true,
4
3
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
5
4
  defaultStyles: {
6
5
  appearance: "none",
@@ -1,4 +1,4 @@
1
- import { Show, For, createSignal } from "solid-js";
1
+ import { useContext, Show, For, createSignal } from "solid-js";
2
2
 
3
3
  import { css } from "solid-styled-components";
4
4
 
@@ -7,6 +7,7 @@ import { getSizesForBreakpoints } from "../../constants/device-sizes";
7
7
  import RenderInlinedStyles from "../../components/render-inlined-styles.jsx";
8
8
  import { TARGET } from "../../constants/target.js";
9
9
  import { convertStyleMapToCSS } from "../../helpers/css";
10
+ import BuilderContext from "../../context/builder.context.js";
10
11
 
11
12
  function Columns(props) {
12
13
  function getGutterSize() {
@@ -60,7 +61,7 @@ function Columns(props) {
60
61
 
61
62
  function getWidthForBreakpointSize(size) {
62
63
  const breakpointSizes = getSizesForBreakpoints(
63
- props.customBreakpoints || {}
64
+ builderContext.content?.meta?.breakpoints || {}
64
65
  );
65
66
  return breakpointSizes[size].max;
66
67
  }
@@ -122,6 +123,8 @@ function Columns(props) {
122
123
  return this.columnStyleObjects.column.small;
123
124
  }
124
125
 
126
+ const builderContext = useContext(BuilderContext);
127
+
125
128
  return (
126
129
  <div
127
130
  class={
@@ -1,7 +1,6 @@
1
1
  import { serializeFn } from "../util.js";
2
2
  const componentInfo = {
3
3
  name: "Columns",
4
- builtIn: true,
5
4
  inputs: [
6
5
  {
7
6
  name: "columns",
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Custom Code",
3
3
  static: true,
4
- builtIn: true,
5
4
  requiredPermissions: ["editCode"],
6
5
  inputs: [
7
6
  {
@@ -2,7 +2,6 @@ import { serializeFn } from "../util.js";
2
2
  const componentInfo = {
3
3
  name: "Embed",
4
4
  static: true,
5
- builtIn: true,
6
5
  inputs: [
7
6
  {
8
7
  name: "url",
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Form:Form",
3
- builtIn: true,
4
3
  defaults: {
5
4
  responsiveStyles: {
6
5
  large: {
@@ -2,7 +2,6 @@ const componentInfo = {
2
2
  name: "Fragment",
3
3
  static: true,
4
4
  hidden: true,
5
- builtIn: true,
6
5
  canHaveChildren: true,
7
6
  noWrap: true
8
7
  };
@@ -2,7 +2,6 @@ import { serializeFn } from "../util.js";
2
2
  const componentInfo = {
3
3
  name: "Image",
4
4
  static: true,
5
- builtIn: true,
6
5
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
7
6
  defaultStyles: {
8
7
  position: "relative",
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Raw:Img",
3
3
  hideFromInsertMenu: true,
4
- builtIn: true,
5
4
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
6
5
  inputs: [
7
6
  {
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Form:Input",
3
- builtIn: true,
4
3
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
5
4
  inputs: [
6
5
  {
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Builder:RawText",
3
3
  hideFromInsertMenu: true,
4
- builtIn: true,
5
4
  inputs: [
6
5
  {
7
6
  name: "text",
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Core:Section",
3
3
  static: true,
4
- builtIn: true,
5
4
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
6
5
  inputs: [
7
6
  {
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Form:Select",
3
- builtIn: true,
4
3
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
5
4
  defaultStyles: {
6
5
  alignSelf: "flex-start"
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Form:SubmitButton",
3
- builtIn: true,
4
3
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
5
4
  defaultStyles: {
6
5
  appearance: "none",
@@ -2,7 +2,6 @@ const componentInfo = {
2
2
  name: "Symbol",
3
3
  noWrap: true,
4
4
  static: true,
5
- builtIn: true,
6
5
  inputs: [
7
6
  {
8
7
  name: "symbol",
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Text",
3
3
  static: true,
4
- builtIn: true,
5
4
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
6
5
  inputs: [
7
6
  {
@@ -1,6 +1,5 @@
1
1
  const componentInfo = {
2
2
  name: "Form:TextArea",
3
- builtIn: true,
4
3
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
5
4
  inputs: [
6
5
  {
@@ -1,7 +1,6 @@
1
1
  const componentInfo = {
2
2
  name: "Video",
3
3
  canHaveChildren: true,
4
- builtIn: true,
5
4
  defaultStyles: {
6
5
  minHeight: "20px",
7
6
  minWidth: "20px"
@@ -110,7 +110,6 @@ function RenderBlock(props) {
110
110
  ...actions(),
111
111
  },
112
112
  }),
113
- customBreakpoints: childrenContext()?.content?.meta?.breakpoints,
114
113
  },
115
114
  context: childrenContext(),
116
115
  };