@builder.io/sdk-vue 4.0.4 → 4.0.6
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/{awaiter-2F9-_oO8.cjs → awaiter-96xCyq9c.cjs} +1 -1
- package/lib/browser/{awaiter-HDfw2t1B.js → awaiter-zNn8NS8r.js} +1 -1
- package/lib/browser/{block-styles-MXm48vmz.js → block-styles-0o9M36rK.js} +1 -1
- package/lib/browser/{block-styles-X9EhtMJv.cjs → block-styles-ofpNl1bZ.cjs} +1 -1
- package/lib/browser/{block-wrapper-c8JGyOAA.cjs → block-wrapper-CROVZaJw.cjs} +1 -1
- package/lib/browser/{block-wrapper-4qw8AGWG.js → block-wrapper-nAtnXdA_.js} +3 -3
- package/lib/browser/{component-ref-qKfSMika.js → component-ref-G3WBnT08.js} +27 -14
- package/lib/browser/component-ref-dYV2xUP6.cjs +1 -0
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +7 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-UKaGP0U3.cjs → get-block-properties-35RfkJv0.cjs} +1 -1
- package/lib/browser/{get-block-properties-QUOxxR_A.js → get-block-properties-Tp3tEKPI.js} +1 -1
- package/lib/browser/helpers/preview-lru-cache/set.d.ts +3 -4
- package/lib/browser/{index-bGdQisdn.cjs → index-3yShtqk3.cjs} +4 -4
- package/lib/browser/{index-LkA4auYM.js → index-LQooJIVP.js} +7 -7
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-GTImoZrN.cjs → repeated-block-9PgmawTD.cjs} +1 -1
- package/lib/browser/{repeated-block-kQ_jnUM3.js → repeated-block-nSWYIBYY.js} +2 -2
- package/lib/browser/style.css +1 -1
- package/lib/edge/{awaiter-mqwukzJZ.cjs → awaiter-84203SWg.cjs} +1 -1
- package/lib/edge/{awaiter-nsg2nwZ7.js → awaiter-BPHhe8gu.js} +1 -1
- package/lib/edge/{block-styles-uiNGacsi.js → block-styles-FBx6Wj7n.js} +1 -1
- package/lib/edge/{block-styles-jsDKKRQk.cjs → block-styles-GoLS-7a-.cjs} +1 -1
- package/lib/edge/{block-wrapper-OdmciHkP.js → block-wrapper-GHYV0qcz.js} +3 -3
- package/lib/{node/block-wrapper-rqFiyxb2.cjs → edge/block-wrapper-uwJjRSjB.cjs} +1 -1
- package/lib/edge/component-ref-RVSJkiDE.cjs +1 -0
- package/lib/{node/component-ref-_3BRwWYE.js → edge/component-ref-m6_Qgjxh.js} +22 -9
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +7 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-MuKAymJ3.cjs → get-block-properties-ePFST2_a.cjs} +1 -1
- package/lib/edge/{get-block-properties-skoEen4E.js → get-block-properties-nUOubhiy.js} +1 -1
- package/lib/edge/helpers/preview-lru-cache/set.d.ts +3 -4
- package/lib/edge/{index-qJQiiZLG.js → index-O2Rm1-0p.js} +7 -7
- package/lib/edge/{index-BpamWQ_I.cjs → index-SxXHoi3G.cjs} +4 -4
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block--Z7wD2xG.js → repeated-block-730A9lRm.js} +2 -2
- package/lib/{node/repeated-block-Q0mddYsG.cjs → edge/repeated-block-CKncF9Od.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/node/{awaiter-JPCBNySo.js → awaiter-niFBXKBm.js} +1 -1
- package/lib/node/{awaiter-hL5s-L1s.cjs → awaiter-p7qiswFI.cjs} +1 -1
- package/lib/node/{block-styles-cdBFFodd.js → block-styles-3BFRWeR_.js} +1 -1
- package/lib/node/{block-styles-Qs6UPPvF.cjs → block-styles-dahfLzRE.cjs} +1 -1
- package/lib/{edge/block-wrapper-nI4dA-4Z.cjs → node/block-wrapper-Aqn2S1Zk.cjs} +1 -1
- package/lib/node/{block-wrapper-QLQ8QCsB.js → block-wrapper-ThVlymJQ.js} +3 -3
- package/lib/{edge/component-ref-Fb_1lhVs.js → node/component-ref-7fop4Scs.js} +27 -14
- package/lib/node/component-ref-jm5wkBt_.cjs +1 -0
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +7 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-4xNKhBHm.js → get-block-properties-XqAwKEib.js} +1 -1
- package/lib/node/{get-block-properties-gCroeFct.cjs → get-block-properties-pu3hVstP.cjs} +1 -1
- package/lib/node/helpers/preview-lru-cache/set.d.ts +3 -4
- package/lib/node/{index-7TI9yCCh.cjs → index-3VhVRFNG.cjs} +4 -4
- package/lib/node/{index-kH9JS7W5.js → index-6f7aS4as.js} +7 -7
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/{edge/repeated-block-163bX_a9.cjs → node/repeated-block-lURNziSK.cjs} +1 -1
- package/lib/node/{repeated-block-5xUjwB4K.js → repeated-block-zjZTsi5s.js} +2 -2
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/component-ref-9P0mKMJt.cjs +0 -1
- package/lib/edge/component-ref-Tb1ckGhf.cjs +0 -1
- package/lib/node/component-ref-kiBJD9kI.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-3yShtqk3.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,i,c,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as _, resolveComponent as x, openBlock as T, createBlock as w, createCommentVNode as I } from "vue";
|
|
3
|
-
import { _ as N, T as Q, c as C, g as z, a, b as m, d as A, e as D } from "./index-
|
|
3
|
+
import { _ as N, T as Q, c as C, g as z, a, b as m, d as A, e as D } from "./index-LQooJIVP.js";
|
|
4
4
|
const E = _({
|
|
5
5
|
name: "block-styles",
|
|
6
6
|
components: { InlinedStyles: N },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-
|
|
1
|
+
var _=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),s=require("./index-3yShtqk3.cjs"),x=a.defineComponent({name:"block-styles",components:{InlinedStyles:s._sfc_main},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const e=this.block;return s.checkIsDefined(e.hide)?!e.hide:s.checkIsDefined(e.show)?e.show:!0},css(){var S,h,k,C,f;const e=this.block,t=e.responsiveStyles,o=this.context.content,r=s.getSizesForBreakpoints(((S=o==null?void 0:o.meta)==null?void 0:S.breakpoints)||{}),d=!!((k=(h=o==null?void 0:o.meta)==null?void 0:h.breakpoints)!=null&&k.xsmall),i=t==null?void 0:t.large,c=t==null?void 0:t.medium,u=t==null?void 0:t.small,y=t==null?void 0:t.xsmall,n=e.id;if(!n)return"";const b=i?s.createCssClass({className:n,styles:i}):"",g=c?s.createCssClass({className:n,styles:c,mediaQuery:s.getMaxWidthQueryForSize("medium",r)}):"",v=u?s.createCssClass({className:n,styles:u,mediaQuery:s.getMaxWidthQueryForSize("small",r)}):"",B=y&&d?s.createCssClass({className:n,styles:y,mediaQuery:s.getMaxWidthQueryForSize("xsmall",r)}):"",l=e.animations&&e.animations.find(m=>m.trigger==="hover");let p="";if(l){const m=((f=(C=l.steps)==null?void 0:C[1])==null?void 0:f.styles)||{};p=s.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${l.duration}s ${s.camelToKebabCase(l.easing)}`,transitionDelay:l.delay?`${l.delay}s`:"0s"}})||""}return[b,g,v,B,p].join(" ")}}});function T(e,t,o,r,d,i){const c=a.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(a.openBlock(),a.createBlock(c,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):a.createCommentVNode("",!0)}const $=s._export_sfc(x,[["render",T]]);exports.default=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-35RfkJv0.cjs"),n=require("./index-3yShtqk3.cjs"),c=()=>Promise.resolve().then(()=>require("./index-3yShtqk3.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
3
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
4
|
-
import { e as m } from "./index-
|
|
5
|
-
const d = () => import("./index-
|
|
3
|
+
import { g as s, a as l } from "./get-block-properties-Tp3tEKPI.js";
|
|
4
|
+
import { e as m } from "./index-LQooJIVP.js";
|
|
5
|
+
const d = () => import("./index-LQooJIVP.js").then((e) => e.G).then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
8
|
e
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { e as h, B as S, w as y } from "./index-
|
|
4
|
-
import { a as C, g as A } from "./get-block-properties-
|
|
5
|
-
const R = () => import("./awaiter-
|
|
2
|
+
import { defineComponent as u, defineAsyncComponent as P, resolveComponent as k, openBlock as o, createBlock as a, withCtx as l, renderSlot as m, resolveDynamicComponent as f, mergeProps as b, normalizeProps as B, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as W } from "vue";
|
|
3
|
+
import { e as h, B as S, w as y } from "./index-LQooJIVP.js";
|
|
4
|
+
import { a as C, g as A } from "./get-block-properties-Tp3tEKPI.js";
|
|
5
|
+
const R = () => import("./awaiter-zNn8NS8r.js").then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
8
8
|
e
|
|
9
9
|
), e;
|
|
10
|
-
}), E =
|
|
10
|
+
}), E = u({
|
|
11
11
|
name: "interactive-element",
|
|
12
12
|
components: { Awaiter: P(R) },
|
|
13
13
|
props: ["includeBlockProps", "block", "context", "Wrapper", "wrapperProps"],
|
|
@@ -52,7 +52,7 @@ function I(e, n, s, i, r, c) {
|
|
|
52
52
|
_: 3
|
|
53
53
|
}, 16, ["attributes"]));
|
|
54
54
|
}
|
|
55
|
-
const
|
|
55
|
+
const d = /* @__PURE__ */ h(E, [["render", I]]), O = ({
|
|
56
56
|
componentOptions: e,
|
|
57
57
|
builderBlock: n,
|
|
58
58
|
context: s,
|
|
@@ -81,28 +81,41 @@ const u = /* @__PURE__ */ h(E, [["render", I]]), O = ({
|
|
|
81
81
|
wrapperProps: e,
|
|
82
82
|
includeBlockProps: r
|
|
83
83
|
} : p;
|
|
84
|
-
},
|
|
84
|
+
}, U = u({
|
|
85
85
|
name: "component-ref",
|
|
86
|
-
components: { Block: S, InteractiveElement:
|
|
86
|
+
components: { Block: S, InteractiveElement: d },
|
|
87
87
|
props: [
|
|
88
|
+
"componentOptions",
|
|
89
|
+
"blockChildren",
|
|
88
90
|
"isInteractive",
|
|
89
91
|
"componentRef",
|
|
90
|
-
"componentOptions",
|
|
91
92
|
"builderBlock",
|
|
92
93
|
"context",
|
|
93
94
|
"linkComponent",
|
|
94
95
|
"includeBlockProps",
|
|
95
|
-
"blockChildren",
|
|
96
96
|
"registeredComponents"
|
|
97
97
|
],
|
|
98
98
|
data() {
|
|
99
99
|
return {
|
|
100
|
-
|
|
100
|
+
shouldUpdate: !1,
|
|
101
|
+
Wrapper: this.isInteractive ? y(d) : this.componentRef,
|
|
101
102
|
getWrapperProps: O
|
|
102
103
|
};
|
|
104
|
+
},
|
|
105
|
+
watch: {
|
|
106
|
+
onUpdateHook0: { handler() {
|
|
107
|
+
}, immediate: !0 }
|
|
108
|
+
},
|
|
109
|
+
computed: {
|
|
110
|
+
onUpdateHook0() {
|
|
111
|
+
return {
|
|
112
|
+
0: this.componentOptions,
|
|
113
|
+
1: this.blockChildren
|
|
114
|
+
};
|
|
115
|
+
}
|
|
103
116
|
}
|
|
104
117
|
});
|
|
105
|
-
function
|
|
118
|
+
function H(e, n, s, i, r, c) {
|
|
106
119
|
const t = k("Block");
|
|
107
120
|
return e.componentRef ? (o(), a(f(e.Wrapper), B(b(
|
|
108
121
|
{ key: 0 },
|
|
@@ -129,7 +142,7 @@ function z(e, n, s, i, r, c) {
|
|
|
129
142
|
_: 1
|
|
130
143
|
}, 16)) : W("", !0);
|
|
131
144
|
}
|
|
132
|
-
const
|
|
145
|
+
const L = /* @__PURE__ */ h(U, [["render", H]]);
|
|
133
146
|
export {
|
|
134
|
-
|
|
147
|
+
L as default
|
|
135
148
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-3yShtqk3.cjs"),l=require("./get-block-properties-35RfkJv0.cjs"),k=()=>Promise.resolve().then(()=>require("./awaiter-96xCyq9c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),u=t.defineComponent({name:"interactive-element",components:{Awaiter:t.defineAsyncComponent(k)},props:["includeBlockProps","block","context","Wrapper","wrapperProps"],computed:{attributes(){return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function f(e,n,s,i,r,a){const o=t.resolveComponent("Awaiter");return e.Wrapper.load?(t.openBlock(),t.createBlock(o,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))}const m=c._export_sfc(u,[["render",f]]),b=({componentOptions:e,builderBlock:n,context:s,componentRef:i,includeBlockProps:r,isInteractive:a,contextValue:o})=>{const p={...e,...r?{attributes:l.getBlockProperties({block:n,context:o})}:{}};return a?{Wrapper:i,block:n,context:s,wrapperProps:e,includeBlockProps:r}:p},h=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["componentOptions","blockChildren","isInteractive","componentRef","builderBlock","context","linkComponent","includeBlockProps","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{onUpdateHook0(){return{0:this.componentOptions,1:this.blockChildren}}}});function C(e,n,s,i,r,a){const o=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildren,(p,d)=>(t.openBlock(),t.createBlock(o,{key:p.id,block:p,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const B=c._export_sfc(h,[["render",C]]);exports.default=B;
|
|
@@ -10,6 +10,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
10
10
|
componentOptions?: any;
|
|
11
11
|
isInteractive?: any;
|
|
12
12
|
}>, unknown, {
|
|
13
|
+
shouldUpdate: boolean;
|
|
13
14
|
Wrapper: any;
|
|
14
15
|
getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
15
16
|
contextValue: import("../../../..").BuilderContextInterface;
|
|
@@ -24,7 +25,12 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
24
25
|
builderBlock: import("../../../..").BuilderBlock;
|
|
25
26
|
builderContext: import("../../../..").BuilderContextInterface;
|
|
26
27
|
};
|
|
27
|
-
}, {
|
|
28
|
+
}, {
|
|
29
|
+
onUpdateHook0(): {
|
|
30
|
+
0: any;
|
|
31
|
+
1: any;
|
|
32
|
+
};
|
|
33
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
28
34
|
context?: any;
|
|
29
35
|
builderBlock?: any;
|
|
30
36
|
linkComponent?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.0.
|
|
1
|
+
export declare const SDK_VERSION = "4.0.6";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const s=require("./index-
|
|
1
|
+
var d=require("./style.css");const s=require("./index-3yShtqk3.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=c(o);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(a,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:s.getStyle({block:e,context:t}),[s.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content';
|
|
2
|
-
export declare function postPreviewContent(
|
|
2
|
+
export declare function postPreviewContent(_opts: {
|
|
3
3
|
key: string;
|
|
4
4
|
value: BuilderContent;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}>;
|
|
5
|
+
url: string;
|
|
6
|
+
}): Promise<null>;
|