@builder.io/sdk-vue 0.4.1 → 0.4.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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.18ca317b.cjs → block-styles.aaf62526.cjs} +1 -1
- package/packages/_vue2/dist/{block-styles.69ca115c.js → block-styles.c38fdaef.js} +4 -4
- package/packages/{_vue3/dist/css.7fe37cb4.js → _vue2/dist/css.377600fa.js} +2 -2
- package/packages/{_vue3/dist/css.5cacc3c3.cjs → _vue2/dist/css.4a664d41.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.8238dbc9.js → evaluate.d2d16952.js} +1 -1
- package/packages/_vue2/dist/{evaluate.cff086ca.cjs → evaluate.d837a845.cjs} +2 -2
- package/packages/_vue2/dist/{index.e2db82e0.js → index.1074d675.js} +131 -129
- package/packages/_vue2/dist/{index.c16f4cca.cjs → index.3d5a7a37.cjs} +6 -6
- package/packages/_vue2/dist/{render-block.0f23cd7e.js → render-block.1ec27d4d.js} +20 -33
- package/packages/_vue2/dist/render-block.43f24cc4.cjs +3 -0
- package/packages/_vue2/dist/{render-component.74280c04.js → render-component.82a8e6f7.js} +3 -3
- package/packages/_vue2/dist/{render-component.e8047ef5.cjs → render-component.ba549c84.cjs} +1 -1
- package/packages/_vue2/dist/render-content.2c57f5bb.cjs +1 -0
- package/packages/_vue2/dist/{render-content.672eabd9.js → render-content.3afd4a46.js} +270 -271
- package/packages/_vue2/dist/{render-inlined-styles.2c0cf85b.cjs → render-inlined-styles.1ed1b531.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.ac06208e.js → render-inlined-styles.f76aba42.js} +1 -1
- package/packages/_vue2/dist/render-repeated-block.625e26fc.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.d3c2411b.js +38 -0
- package/packages/_vue2/dist/{render-styles.af4e2d5a.js → render-styles.7b01db22.js} +2 -2
- package/packages/_vue2/dist/{render-styles.e6e62ba1.cjs → render-styles.f1413001.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -10
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +27 -5
- package/packages/_vue2/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/sdk.cjs +72 -1
- package/packages/_vue3/dist/sdk.js +3251 -22
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -10
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +36 -14
- package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/css.24c082d4.cjs +0 -6
- package/packages/_vue2/dist/css.ce776b44.js +0 -75
- package/packages/_vue2/dist/render-block.954cc390.cjs +0 -3
- package/packages/_vue2/dist/render-content.702f0387.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.5740965b.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.c40e7c25.js +0 -45
- package/packages/_vue3/dist/block-styles.7969d695.js +0 -72
- package/packages/_vue3/dist/block-styles.e3f09eb7.cjs +0 -1
- package/packages/_vue3/dist/evaluate.975fa4d3.js +0 -63
- package/packages/_vue3/dist/evaluate.9a614eea.cjs +0 -4
- package/packages/_vue3/dist/index.3f716812.cjs +0 -32
- package/packages/_vue3/dist/index.cdd37dcf.js +0 -1393
- package/packages/_vue3/dist/render-block.348e561a.js +0 -286
- package/packages/_vue3/dist/render-block.d1c4ccaa.cjs +0 -3
- package/packages/_vue3/dist/render-component.788543b4.cjs +0 -1
- package/packages/_vue3/dist/render-component.9bd5c435.js +0 -42
- package/packages/_vue3/dist/render-content.0423df8b.js +0 -1355
- package/packages/_vue3/dist/render-content.17e9b187.cjs +0 -1
- package/packages/_vue3/dist/render-inlined-styles.49a121f8.js +0 -16
- package/packages/_vue3/dist/render-inlined-styles.528fb5cd.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.04301799.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.35a0d813.js +0 -39
- package/packages/_vue3/dist/render-styles.3411b577.js +0 -80
- package/packages/_vue3/dist/render-styles.b4509dd3.cjs +0 -31
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),s=require("./index.3d5a7a37.cjs"),r=require("./css.4a664d41.cjs");require("./evaluate.d837a845.cjs");const S=()=>Promise.resolve().then(()=>require("./render-inlined-styles.1ed1b531.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),y=h.defineComponent({name:"block-styles",components:{RenderInlinedStyles:S},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{useBlock(){return r.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return s.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:s.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var a;const e=this.useBlock.responsiveStyles,t=this.context.content,o=s.getSizesForBreakpoints(((a=t==null?void 0:t.meta)==null?void 0:a.breakpoints)||{}),l=e==null?void 0:e.large,c=e==null?void 0:e.medium,i=e==null?void 0:e.small,n=this.useBlock.id;if(!n)return"";const u=l?r.createCssClass({className:n,styles:l}):"",d=c?r.createCssClass({className:n,styles:c,mediaQuery:s.getMaxWidthQueryForSize("medium",o)}):"",m=i?r.createCssClass({className:n,styles:i,mediaQuery:s.getMaxWidthQueryForSize("small",o)}):"";return[u,d,m].join(" ")}}});var k=function(){var t=this,o=t._self._c;return t._self._setupProxy,t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?o("render-inlined-styles",{attrs:{styles:t.css}}):t._e()},p=[],_=s.normalizeComponent(y,k,p,!1,null,null,null,null);const f=_.exports;exports.default=f;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { T as S, c as i, g as k, a as m, n as y } from "./index.
|
|
3
|
-
import { g as f, c as n } from "./css.
|
|
4
|
-
import "./evaluate.
|
|
5
|
-
const _ = () => import("./render-inlined-styles.
|
|
2
|
+
import { T as S, c as i, g as k, a as m, n as y } from "./index.1074d675.js";
|
|
3
|
+
import { g as f, c as n } from "./css.377600fa.js";
|
|
4
|
+
import "./evaluate.d2d16952.js";
|
|
5
|
+
const _ = () => import("./render-inlined-styles.f76aba42.js").then((t) => t.default).catch((t) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
8
8
|
t
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as u } from "./evaluate.
|
|
2
|
-
import { f as p, c as l } from "./index.
|
|
1
|
+
import { e as u } from "./evaluate.d2d16952.js";
|
|
2
|
+
import { f as p, c as l } from "./index.1074d675.js";
|
|
3
3
|
const g = (e, t, n) => {
|
|
4
4
|
if (Object(e) !== e)
|
|
5
5
|
return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const f=require("./evaluate.d837a845.cjs"),a=require("./index.3d5a7a37.cjs"),p=(e,t,n)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((c,r,o)=>Object(c[r])===c[r]?c[r]:c[r]=Math.abs(Number(s[o+1]))>>0===+s[o+1]?[]:{},e)[s[s.length-1]]=n,e};const g=({block:e,context:t,localState:n,rootState:s,rootSetState:c})=>{if(!e.bindings)return e;const r=a.fastClone(e),o={...r,properties:{...r.properties},actions:{...r.actions}};for(const i in e.bindings){const l=e.bindings[i],d=f.evaluate({code:l,localState:n,rootState:s,rootSetState:c,context:t});p(o,i,d)}return o};function C({block:e,context:t,shouldEvaluateBindings:n,localState:s,rootState:c,rootSetState:r}){const o=e;return n?g({block:o,localState:s,rootState:c,rootSetState:r,context:t}):o}const S=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),u=e=>Object.entries(e).map(([n,s])=>{if(typeof s=="string")return`${S(n)}: ${s};`}).filter(a.checkIsDefined),v=e=>u(e).join(`
|
|
2
2
|
`),y=({mediaQuery:e,className:t,styles:n})=>{const s=`.${t} {
|
|
3
3
|
${v(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./index.
|
|
1
|
+
"use strict";const t=require("./index.3d5a7a37.cjs");function f({code:n,context:r,localState:i,rootState:s,rootSetState:e,event:u,isExpression:w=!0}){if(n===""){console.warn("Skipping evaluation of empty code block.");return}const c={isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser()},l=w&&!(n.includes(";")||n.includes(" return ")||n.trim().startsWith("return "))?`return (${n});`:n;try{return new Function("builder","Builder","state","context","event",l)(c,c,a(s,i,e),r,u)}catch(d){console.warn(`Builder custom code error:
|
|
2
2
|
While Evaluating:
|
|
3
3
|
`,l,`
|
|
4
|
-
`,d)}}function
|
|
4
|
+
`,d)}}function a(n,r,i){if(n===r)throw new Error("rootState === localState");return new Proxy(n,{get:(s,e)=>r&&e in r?r[e]:n[e],set:(s,e,u)=>{if(r&&e in r)throw new Error("Writing to local state is not allowed as it is read-only.");return n[e]=u,i==null||i(n),!0}})}exports.evaluate=f;
|