@builder.io/sdk-vue 5.0.1 → 5.1.1
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-ltuXxa1H.js → awaiter-NbFI2CU_.js} +1 -1
- package/lib/browser/{awaiter-EvoLkoA-.cjs → awaiter-YRNWppS-.cjs} +1 -1
- package/lib/browser/block-wrapper-7ZGQAl5W.cjs +1 -0
- package/lib/browser/block-wrapper-_4lEInw9.js +51 -0
- package/lib/browser/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/browser/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/browser/component-ref-A2Q0eDCA.cjs +1 -0
- package/lib/browser/component-ref-S2rn5_QV.js +185 -0
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/browser/components/content/components/styles.vue.d.ts +3 -3
- package/lib/browser/components/content/content.vue.d.ts +9 -9
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/browser/components/inlined-script.vue.d.ts +3 -3
- package/lib/browser/components/inlined-styles.vue.d.ts +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/browser/functions/evaluate/helpers.d.ts +9 -1
- package/lib/browser/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/browser/functions/get-block-actions.d.ts +2 -0
- package/lib/browser/get-block-properties-PbwnoRP4.cjs +1 -0
- package/lib/{edge/get-block-properties-oCaILy-t.js → browser/get-block-properties-Y9GlYFTe.js} +9 -7
- package/lib/browser/{index-ePDYAZ6K.js → index-HPQgrUEC.js} +427 -411
- package/lib/browser/index-OpNLmfCu.cjs +334 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{live-edit-chiC8ikS.js → live-edit-8F1riCsR.js} +1 -1
- package/lib/browser/{live-edit-DW8AQ7OF.cjs → live-edit-tMAUVH2B.cjs} +1 -1
- package/lib/browser/{repeated-block-xZMeXElb.js → repeated-block-C21nYjNB.js} +2 -2
- package/lib/browser/{repeated-block-2KQQbmA4.cjs → repeated-block-YesIuQQG.cjs} +1 -1
- package/lib/browser/{style-wrapper-WGd4Chxy.js → style-wrapper-6gB537kz.js} +1 -1
- package/lib/browser/{style-wrapper-qFjrPlxq.cjs → style-wrapper-toT_b35_.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/edge/{awaiter-oif9kJRe.cjs → awaiter-GbCbMdxs.cjs} +1 -1
- package/lib/edge/{awaiter-C9m9dHFI.js → awaiter-Z1Aho-Tf.js} +1 -1
- package/lib/edge/block-wrapper-SGs68mW-.cjs +1 -0
- package/lib/edge/block-wrapper-sP32aCJj.js +50 -0
- package/lib/edge/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/edge/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/edge/component-ref-1HNLmjNP.cjs +1 -0
- package/lib/edge/component-ref-v3RKtvga.js +184 -0
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/edge/components/content/components/styles.vue.d.ts +3 -3
- package/lib/edge/components/content/content.vue.d.ts +9 -9
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/edge/components/inlined-script.vue.d.ts +3 -3
- package/lib/edge/components/inlined-styles.vue.d.ts +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/edge/functions/evaluate/helpers.d.ts +9 -1
- package/lib/edge/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/edge/functions/get-block-actions.d.ts +2 -0
- package/lib/{browser/get-block-properties-iI7YmUch.js → edge/get-block-properties-O8BCJSao.js} +17 -17
- package/lib/edge/get-block-properties-ju6Fj919.cjs +1 -0
- package/lib/edge/{index-HFOGs4Hj.cjs → index-FjhQsct4.cjs} +16 -16
- package/lib/edge/{index-1frz5lkv.js → index-x6Hu33ce.js} +784 -768
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/live-edit-aXbmFIfP.cjs → edge/live-edit-VsbDXDK9.cjs} +1 -1
- package/lib/edge/{live-edit-zALqI-9F.js → live-edit-v7-_17wH.js} +1 -1
- package/lib/{node/repeated-block-mSU_Cjr_.js → edge/repeated-block-gmtzy89x.js} +2 -2
- package/lib/edge/{repeated-block-Ee9Tm3uw.cjs → repeated-block-ic1FaN4o.cjs} +1 -1
- package/lib/edge/{style-wrapper-c3dw8riH.js → style-wrapper-DFS-znzq.js} +1 -1
- package/lib/edge/{style-wrapper-4MZw2Z4C.cjs → style-wrapper-Xaty5j6j.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/node/{awaiter-zW9jRrYG.cjs → awaiter-7GQ8utUb.cjs} +1 -1
- package/lib/node/{awaiter-excNZ5hj.js → awaiter-MB_eWqp9.js} +1 -1
- package/lib/node/block-wrapper--M33E0VG.cjs +1 -0
- package/lib/node/block-wrapper-P5y87ZAx.js +50 -0
- package/lib/node/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/node/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/node/component-ref-KETj2JRL.cjs +1 -0
- package/lib/node/component-ref-RUGITshe.js +185 -0
- package/lib/node/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/node/components/content/components/styles.vue.d.ts +3 -3
- package/lib/node/components/content/content.vue.d.ts +9 -9
- package/lib/node/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/node/components/inlined-script.vue.d.ts +3 -3
- package/lib/node/components/inlined-styles.vue.d.ts +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/node/functions/evaluate/helpers.d.ts +9 -1
- package/lib/node/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/node/functions/get-block-actions.d.ts +2 -0
- package/lib/node/{get-block-properties-Mb4zG5TJ.js → get-block-properties-Ec9Kj4p7.js} +18 -17
- package/lib/node/get-block-properties-Z9QEqFjm.cjs +1 -0
- package/lib/node/{index-eR1W_62s.js → index-TvY2gce_.js} +696 -894
- package/lib/node/{index-tfY1dYSa.cjs → index-WS6d-d4F.cjs} +30 -30
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +11 -11
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +1 -1
- package/lib/node/{live-edit-o65mqvJD.js → live-edit-61Hzovyk.js} +1 -1
- package/lib/{edge/live-edit-Iys2OcAx.cjs → node/live-edit-Jp1PzpUr.cjs} +1 -1
- package/lib/node/{repeated-block-37s5osdr.cjs → repeated-block-9JRCsGOV.cjs} +1 -1
- package/lib/{edge/repeated-block-7Kc2eLpq.js → node/repeated-block-Nh0O2sxg.js} +2 -2
- package/lib/node/should-force-browser-runtime-in-node-ghF-DZhu.js +503 -0
- package/lib/node/should-force-browser-runtime-in-node-xByMtVKh.cjs +48 -0
- package/lib/node/{style-wrapper-3JIrc4dO.cjs → style-wrapper-rXB6kp1P.cjs} +1 -1
- package/lib/node/{style-wrapper-5KYeK0ik.js → style-wrapper-y344qWFp.js} +10 -10
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/block-wrapper-7_N4V3w6.js +0 -44
- package/lib/browser/block-wrapper-RtyEgmfY.cjs +0 -1
- package/lib/browser/component-ref-TD-MkgTS.cjs +0 -1
- package/lib/browser/component-ref-br7lvgH4.js +0 -178
- package/lib/browser/get-block-properties-p2HBwDQ1.cjs +0 -1
- package/lib/browser/index-s0tL4FL7.cjs +0 -334
- package/lib/edge/block-wrapper-WxMXMCAh.js +0 -43
- package/lib/edge/block-wrapper-cR5tGys5.cjs +0 -1
- package/lib/edge/component-ref-m5Kyhqf9.cjs +0 -1
- package/lib/edge/component-ref-v_a0xkUh.js +0 -177
- package/lib/edge/get-block-properties-8MeUldw3.cjs +0 -1
- package/lib/node/block-wrapper-bkv_QgId.js +0 -43
- package/lib/node/block-wrapper-ywFGBqs7.cjs +0 -1
- package/lib/node/component-ref-RVkeY7E2.cjs +0 -1
- package/lib/node/component-ref-nfCUEPmF.js +0 -178
- package/lib/node/get-block-properties-o8p6cp5S.cjs +0 -1
- package/lib/node/should-force-browser-runtime-in-node-1vTKsoso.cjs +0 -48
- package/lib/node/should-force-browser-runtime-in-node-ikxWrCvn.js +0 -277
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./should-force-browser-runtime-in-node-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./should-force-browser-runtime-in-node-xByMtVKh.cjs"),s=require("./index-WS6d-d4F.cjs"),T=require("./find-block-FREohLcp.cjs"),_=o.defineComponent({name:"block-styles",components:{InlinedStyles:s._sfc_main},props:["block","context"],data(){return{TARGET:u.TARGET}},computed:{canShowBlock(){const e=this.block;return u.checkIsDefined(e.hide)?!e.hide:u.checkIsDefined(e.show)?e.show:!0},css(){var h,B,C,f,v;const e=this.block,t=e.responsiveStyles,n=this.context.content,l=s.getSizesForBreakpoints(((h=n==null?void 0:n.meta)==null?void 0:h.breakpoints)||{}),p=!!((C=(B=n==null?void 0:n.meta)==null?void 0:B.breakpoints)!=null&&C.xsmall),a=t==null?void 0:t.large,c=t==null?void 0:t.medium,d=t==null?void 0:t.small,r=t==null?void 0:t.xsmall,m=e.id;if(!m)return"";const b=a?s.createCssClass({className:m,styles:a}):"",x=c?s.createCssClass({className:m,styles:c,mediaQuery:s.getMaxWidthQueryForSize("medium",l)}):"",g=d?s.createCssClass({className:m,styles:d,mediaQuery:s.getMaxWidthQueryForSize("small",l)}):"",k=r&&p?s.createCssClass({className:m,styles:r,mediaQuery:s.getMaxWidthQueryForSize("xsmall",l)}):"",i=e.animations&&e.animations.find(y=>y.trigger==="hover");let S="";if(i){const y=((v=(f=i.steps)==null?void 0:f[1])==null?void 0:v.styles)||{};S=s.createCssClass({className:`${m}:hover`,styles:{...y,transition:`all ${i.duration}s ${s.camelToKebabCase(i.easing)}`,transitionDelay:i.delay?`${i.delay}s`:"0s"}})||""}return[b,x,g,k,S].join(" ")}}});function E(e,t,n,l,p,a){const c=o.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(c,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):o.createCommentVNode("",!0)}const P=s._export_sfc(_,[["render",E]]),I=o.defineComponent({name:"live-edit-block-styles",components:{InlinedStyles:s._sfc_main},props:["contextProvider","id"],data(){return{TARGET:u.TARGET}},computed:{block(){return T.findBlockById(this.contextProvider.content,this.id)},processedBlock(){var n;const e=this.block;return e?(n=e.repeat)!=null&&n.collection?e:s.getProcessedBlock({block:e,localState:this.contextProvider.localState,rootState:this.contextProvider.rootState,rootSetState:this.contextProvider.rootSetState,context:this.contextProvider.context}):null},canShowBlock(){var e,t,n,l;return u.checkIsDefined((e=this.processedBlock)==null?void 0:e.hide)?!((t=this.processedBlock)!=null&&t.hide):u.checkIsDefined((n=this.processedBlock)==null?void 0:n.show)?(l=this.processedBlock)==null?void 0:l.show:!0},css(){var S,h,B,C,f,v,y;const e=(S=this.processedBlock)==null?void 0:S.responsiveStyles,t=this.contextProvider.content,n=s.getSizesForBreakpoints(((h=t==null?void 0:t.meta)==null?void 0:h.breakpoints)||{}),l=!!((C=(B=t==null?void 0:t.meta)==null?void 0:B.breakpoints)!=null&&C.xsmall),p=e==null?void 0:e.large,a=e==null?void 0:e.medium,c=e==null?void 0:e.small,d=e==null?void 0:e.xsmall,r=(f=this.processedBlock)==null?void 0:f.id;if(!r)return"";const m=p?s.createCssClass({className:r,styles:p}):"",b=a?s.createCssClass({className:r,styles:a,mediaQuery:s.getMaxWidthQueryForSize("medium",n)}):"",x=c?s.createCssClass({className:r,styles:c,mediaQuery:s.getMaxWidthQueryForSize("small",n)}):"",g=d&&l?s.createCssClass({className:r,styles:d,mediaQuery:s.getMaxWidthQueryForSize("xsmall",n)}):"",k=this.processedBlock.animations&&this.processedBlock.animations.find($=>$.trigger==="hover");let i="";if(k){const $=((y=(v=k.steps)==null?void 0:v[1])==null?void 0:y.styles)||{};i=s.createCssClass({className:`${r}:hover`,styles:{...$,transition:`all ${k.duration}s ${s.camelToKebabCase(k.easing)}`,transitionDelay:k.delay?`${k.delay}s`:"0s"}})||""}return[m,b,x,g,i].join(" ")}}});function Q(e,t,n,l,p,a){const c=o.resolveComponent("InlinedStyles");return e.TARGET==="rsc"&&e.css&&e.canShowBlock?(o.openBlock(),o.createBlock(c,{key:0,id:"builderio-block",styles:e.css,nonce:e.contextProvider.nonce},null,8,["styles","nonce"])):o.createCommentVNode("",!0)}const A=s._export_sfc(I,[["render",Q]]),w=o.defineComponent({name:"style-wrapper",components:{BlockStyles:P,LiveEditBlockStyles:A},props:["block","context"],data(){return{isClientEditing:!1,isHydrated:!1,TARGET:u.TARGET}},inject:{contextProvider:s.BuilderContext.key},mounted(){}});function z(e,t,n,l,p,a){const c=o.resolveComponent("LiveEditBlockStyles"),d=o.resolveComponent("BlockStyles");return e.isHydrated?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[e.TARGET==="rsc"&&e.isClientEditing?(o.openBlock(),o.createBlock(c,{key:0,id:e.block.id,contextProvider:e.contextProvider},null,8,["id","contextProvider"])):(o.openBlock(),o.createBlock(d,{key:1,block:e.block,context:e.context},null,8,["block","context"]))],64)):(o.openBlock(),o.createBlock(d,{key:1,block:e.block,context:e.context},null,8,["block","context"]))}const F=s._export_sfc(w,[["render",z]]);exports.default=F;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as E, resolveComponent as x, openBlock as y, createBlock as $, createCommentVNode as Q, createElementBlock as z, Fragment as G } from "vue";
|
|
2
|
-
import { T as w,
|
|
3
|
-
import { c as A, d as N, f as l, h as u, i as j, _ as I, j as H, b as R } from "./index-
|
|
2
|
+
import { T as w, h as C } from "./should-force-browser-runtime-in-node-ghF-DZhu.js";
|
|
3
|
+
import { c as A, d as N, f as l, h as u, i as j, _ as I, j as H, b as R } from "./index-TvY2gce_.js";
|
|
4
4
|
import { f as U } from "./find-block-3Ig0kVVe.js";
|
|
5
5
|
const W = E({
|
|
6
6
|
name: "block-styles",
|
|
@@ -15,9 +15,9 @@ const W = E({
|
|
|
15
15
|
return C(e.hide) ? !e.hide : C(e.show) ? e.show : !0;
|
|
16
16
|
},
|
|
17
17
|
css() {
|
|
18
|
-
var
|
|
18
|
+
var S, B, f, v, b;
|
|
19
19
|
const e = this.block, s = e.responsiveStyles, t = this.context.content, o = N(
|
|
20
|
-
((
|
|
20
|
+
((S = t == null ? void 0 : t.meta) == null ? void 0 : S.breakpoints) || {}
|
|
21
21
|
), p = !!((f = (B = t == null ? void 0 : t.meta) == null ? void 0 : B.breakpoints) != null && f.xsmall), i = s == null ? void 0 : s.large, n = s == null ? void 0 : s.medium, a = s == null ? void 0 : s.small, r = s == null ? void 0 : s.xsmall, d = e.id;
|
|
22
22
|
if (!d)
|
|
23
23
|
return "";
|
|
@@ -46,10 +46,10 @@ const W = E({
|
|
|
46
46
|
o
|
|
47
47
|
)
|
|
48
48
|
}) : "", c = e.animations && e.animations.find((k) => k.trigger === "hover");
|
|
49
|
-
let
|
|
49
|
+
let h = "";
|
|
50
50
|
if (c) {
|
|
51
51
|
const k = ((b = (v = c.steps) == null ? void 0 : v[1]) == null ? void 0 : b.styles) || {};
|
|
52
|
-
|
|
52
|
+
h = l({
|
|
53
53
|
className: `${d}:hover`,
|
|
54
54
|
styles: {
|
|
55
55
|
...k,
|
|
@@ -65,7 +65,7 @@ const W = E({
|
|
|
65
65
|
P,
|
|
66
66
|
T,
|
|
67
67
|
m,
|
|
68
|
-
|
|
68
|
+
h
|
|
69
69
|
].join(" ");
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -106,9 +106,9 @@ const F = /* @__PURE__ */ I(W, [["render", D]]), L = E({
|
|
|
106
106
|
return C((e = this.processedBlock) == null ? void 0 : e.hide) ? !((s = this.processedBlock) != null && s.hide) : C((t = this.processedBlock) == null ? void 0 : t.show) ? (o = this.processedBlock) == null ? void 0 : o.show : !0;
|
|
107
107
|
},
|
|
108
108
|
css() {
|
|
109
|
-
var
|
|
110
|
-
const e = (
|
|
111
|
-
((
|
|
109
|
+
var h, S, B, f, v, b, k;
|
|
110
|
+
const e = (h = this.processedBlock) == null ? void 0 : h.responsiveStyles, s = this.contextProvider.content, t = N(
|
|
111
|
+
((S = s == null ? void 0 : s.meta) == null ? void 0 : S.breakpoints) || {}
|
|
112
112
|
), o = !!((f = (B = s == null ? void 0 : s.meta) == null ? void 0 : B.breakpoints) != null && f.xsmall), p = e == null ? void 0 : e.large, i = e == null ? void 0 : e.medium, n = e == null ? void 0 : e.small, a = e == null ? void 0 : e.xsmall, r = (v = this.processedBlock) == null ? void 0 : v.id;
|
|
113
113
|
if (!r)
|
|
114
114
|
return "";
|
package/lib/node/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-5vz8uirn7sc[data-v-82fc93d6]{display:flex;flex-direction:column;align-items:stretch}.div-
|
|
1
|
+
.component-5vz8uirn7sc[data-v-82fc93d6]{display:flex;flex-direction:column;align-items:stretch}.div-29wpyomtntv[data-v-f17e7a38]{display:flex;line-height:normal;height:100%}.img-t43jfuqn6g[data-v-741b9bbc]{opacity:1;transition:opacity .2s ease-in-out}.div-t43jfuqn6g[data-v-741b9bbc]{width:100%;pointer-events:none;font-size:0}.div-t43jfuqn6g-2[data-v-741b9bbc]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.pre-2oa2wtipkzk[data-v-77c7888c]{padding:10px;color:red;text-align:center}
|
package/package.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "./style.css";
|
|
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-iI7YmUch.js";
|
|
4
|
-
import { _ as m } from "./index-ePDYAZ6K.js";
|
|
5
|
-
const d = () => import("./index-ePDYAZ6K.js").then((e) => e.J).then((e) => e.default).catch((e) => {
|
|
6
|
-
throw console.error(
|
|
7
|
-
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
|
-
e
|
|
9
|
-
), e;
|
|
10
|
-
}), f = o({
|
|
11
|
-
name: "block-wrapper",
|
|
12
|
-
components: { DynamicRenderer: r(d) },
|
|
13
|
-
props: ["Wrapper", "block", "context"],
|
|
14
|
-
data() {
|
|
15
|
-
return { getBlockActions: s, getBlockProperties: l };
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
function u(e, k, b, y, S, g) {
|
|
19
|
-
const t = n("DynamicRenderer");
|
|
20
|
-
return a(), c(t, {
|
|
21
|
-
TagName: e.Wrapper,
|
|
22
|
-
attributes: e.getBlockProperties({
|
|
23
|
-
block: e.block,
|
|
24
|
-
context: e.context
|
|
25
|
-
}),
|
|
26
|
-
actionAttributes: e.getBlockActions({
|
|
27
|
-
block: e.block,
|
|
28
|
-
rootState: e.context.rootState,
|
|
29
|
-
rootSetState: e.context.rootSetState,
|
|
30
|
-
localState: e.context.localState,
|
|
31
|
-
context: e.context.context,
|
|
32
|
-
stripPrefix: !0
|
|
33
|
-
})
|
|
34
|
-
}, {
|
|
35
|
-
default: i(() => [
|
|
36
|
-
p(e.$slots, "default")
|
|
37
|
-
]),
|
|
38
|
-
_: 3
|
|
39
|
-
}, 8, ["TagName", "attributes", "actionAttributes"]);
|
|
40
|
-
}
|
|
41
|
-
const R = /* @__PURE__ */ m(f, [["render", u]]);
|
|
42
|
-
export {
|
|
43
|
-
R as default
|
|
44
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-p2HBwDQ1.cjs"),n=require("./index-s0tL4FL7.cjs"),c=()=>Promise.resolve().then(()=>require("./index-s0tL4FL7.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 +0,0 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-s0tL4FL7.cjs"),l=require("./get-block-properties-p2HBwDQ1.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-EvoLkoA-.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-DW8AQ7OF.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),f=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:n.TARGET,isEditing:n.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},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})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function h(e,o,s,a,p,c){const i=t.resolveComponent("Awaiter"),r=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{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.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(r,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const m=n._export_sfc(f,[["render",h]]),b=({componentOptions:e,builderBlock:o,context:s,componentRef:a,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const r={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:a,block:o,context:s,wrapperProps:e,includeBlockProps:p}:r},C=t.defineComponent({name:"component-ref",components:{Block:n.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?n.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function B(e,o,s,a,p,c){const i=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(()=>[e.componentRef?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.blockChildren,(r,d)=>(t.openBlock(),t.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128)):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}const v=n._export_sfc(C,[["render",B]]);exports.default=v;
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
|
-
import { defineComponent as b, defineAsyncComponent as u, resolveComponent as d, openBlock as o, createBlock as p, withCtx as i, renderSlot as m, createElementBlock as h, Fragment as w, resolveDynamicComponent as C, mergeProps as P, normalizeProps as B, renderList as E, createCommentVNode as k } from "vue";
|
|
3
|
-
import { T as y, i as $, _ as g, B as R, w as A } from "./index-ePDYAZ6K.js";
|
|
4
|
-
import { a as v, g as S } from "./get-block-properties-iI7YmUch.js";
|
|
5
|
-
const L = () => import("./awaiter-ltuXxa1H.js").then((e) => e.default).catch((e) => {
|
|
6
|
-
throw console.error(
|
|
7
|
-
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
8
|
-
e
|
|
9
|
-
), e;
|
|
10
|
-
}), I = () => import("./live-edit-chiC8ikS.js").then((e) => e.default).catch((e) => {
|
|
11
|
-
throw console.error(
|
|
12
|
-
"Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
|
|
13
|
-
e
|
|
14
|
-
), e;
|
|
15
|
-
}), T = b({
|
|
16
|
-
name: "interactive-element",
|
|
17
|
-
components: {
|
|
18
|
-
LiveEdit: u(I),
|
|
19
|
-
Awaiter: u(L)
|
|
20
|
-
},
|
|
21
|
-
props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
|
|
22
|
-
data() {
|
|
23
|
-
return { forceRenderCount: 0, TARGET: y, isEditing: $ };
|
|
24
|
-
},
|
|
25
|
-
watch: {
|
|
26
|
-
onUpdateHook0: { handler() {
|
|
27
|
-
}, immediate: !0 }
|
|
28
|
-
},
|
|
29
|
-
computed: {
|
|
30
|
-
attributes() {
|
|
31
|
-
return this.includeBlockProps ? {
|
|
32
|
-
...v({
|
|
33
|
-
block: this.block,
|
|
34
|
-
context: this.context
|
|
35
|
-
}),
|
|
36
|
-
...S({
|
|
37
|
-
block: this.block,
|
|
38
|
-
rootState: this.context.rootState,
|
|
39
|
-
rootSetState: this.context.rootSetState,
|
|
40
|
-
localState: this.context.localState,
|
|
41
|
-
context: this.context.context
|
|
42
|
-
})
|
|
43
|
-
} : {};
|
|
44
|
-
},
|
|
45
|
-
targetWrapperProps() {
|
|
46
|
-
return {
|
|
47
|
-
...this.wrapperProps,
|
|
48
|
-
...Object.keys(this.attributes).length > 0 ? {
|
|
49
|
-
attributes: this.attributes
|
|
50
|
-
} : {}
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
onUpdateHook0() {
|
|
54
|
-
var e, t;
|
|
55
|
-
return {
|
|
56
|
-
0: this.wrapperProps,
|
|
57
|
-
1: (t = (e = this.block) == null ? void 0 : e.component) == null ? void 0 : t.options
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
function O(e, t, s, l, a, c) {
|
|
63
|
-
const n = d("Awaiter"), r = d("LiveEdit");
|
|
64
|
-
return e.Wrapper.load ? (o(), p(n, {
|
|
65
|
-
key: 0,
|
|
66
|
-
load: e.Wrapper.load,
|
|
67
|
-
fallback: e.Wrapper.fallback,
|
|
68
|
-
props: e.wrapperProps,
|
|
69
|
-
attributes: e.attributes
|
|
70
|
-
}, {
|
|
71
|
-
default: i(() => [
|
|
72
|
-
m(e.$slots, "default")
|
|
73
|
-
]),
|
|
74
|
-
_: 3
|
|
75
|
-
}, 8, ["load", "fallback", "props", "attributes"])) : (o(), h(w, { key: 1 }, [
|
|
76
|
-
e.TARGET === "rsc" && e.isEditing() ? (o(), p(r, {
|
|
77
|
-
key: 0,
|
|
78
|
-
Wrapper: e.Wrapper,
|
|
79
|
-
id: e.block.id || "",
|
|
80
|
-
attributes: e.attributes
|
|
81
|
-
}, {
|
|
82
|
-
default: i(() => [
|
|
83
|
-
m(e.$slots, "default")
|
|
84
|
-
]),
|
|
85
|
-
_: 3
|
|
86
|
-
}, 8, ["Wrapper", "id", "attributes"])) : (o(), p(C(e.Wrapper), P({
|
|
87
|
-
key: 1,
|
|
88
|
-
attributes: e.attributes
|
|
89
|
-
}, e.targetWrapperProps), {
|
|
90
|
-
default: i(() => [
|
|
91
|
-
m(e.$slots, "default")
|
|
92
|
-
]),
|
|
93
|
-
_: 3
|
|
94
|
-
}, 16, ["attributes"]))
|
|
95
|
-
], 64));
|
|
96
|
-
}
|
|
97
|
-
const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
|
|
98
|
-
componentOptions: e,
|
|
99
|
-
builderBlock: t,
|
|
100
|
-
context: s,
|
|
101
|
-
componentRef: l,
|
|
102
|
-
includeBlockProps: a,
|
|
103
|
-
isInteractive: c,
|
|
104
|
-
contextValue: n
|
|
105
|
-
}) => {
|
|
106
|
-
const r = {
|
|
107
|
-
...e,
|
|
108
|
-
/**
|
|
109
|
-
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
110
|
-
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
111
|
-
*/
|
|
112
|
-
...a ? {
|
|
113
|
-
attributes: v({
|
|
114
|
-
block: t,
|
|
115
|
-
context: n
|
|
116
|
-
})
|
|
117
|
-
} : {}
|
|
118
|
-
};
|
|
119
|
-
return c ? {
|
|
120
|
-
Wrapper: l,
|
|
121
|
-
block: t,
|
|
122
|
-
context: s,
|
|
123
|
-
wrapperProps: e,
|
|
124
|
-
includeBlockProps: a
|
|
125
|
-
} : r;
|
|
126
|
-
}, G = b({
|
|
127
|
-
name: "component-ref",
|
|
128
|
-
components: { Block: R, InteractiveElement: f },
|
|
129
|
-
props: [
|
|
130
|
-
"isInteractive",
|
|
131
|
-
"componentRef",
|
|
132
|
-
"componentOptions",
|
|
133
|
-
"builderBlock",
|
|
134
|
-
"context",
|
|
135
|
-
"linkComponent",
|
|
136
|
-
"includeBlockProps",
|
|
137
|
-
"blockChildren",
|
|
138
|
-
"registeredComponents"
|
|
139
|
-
],
|
|
140
|
-
data() {
|
|
141
|
-
return {
|
|
142
|
-
shouldUpdate: !1,
|
|
143
|
-
Wrapper: this.isInteractive ? A(f) : this.componentRef,
|
|
144
|
-
getWrapperProps: U
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
function H(e, t, s, l, a, c) {
|
|
149
|
-
const n = d("Block");
|
|
150
|
-
return e.componentRef ? (o(), p(C(e.Wrapper), B(P(
|
|
151
|
-
{ key: 0 },
|
|
152
|
-
e.getWrapperProps({
|
|
153
|
-
componentOptions: e.componentOptions,
|
|
154
|
-
builderBlock: e.builderBlock,
|
|
155
|
-
context: e.context,
|
|
156
|
-
componentRef: e.componentRef,
|
|
157
|
-
linkComponent: e.linkComponent,
|
|
158
|
-
includeBlockProps: e.includeBlockProps,
|
|
159
|
-
isInteractive: e.isInteractive,
|
|
160
|
-
contextValue: e.context
|
|
161
|
-
})
|
|
162
|
-
)), {
|
|
163
|
-
default: i(() => [
|
|
164
|
-
e.componentRef ? (o(!0), h(w, { key: 0 }, E(e.blockChildren, (r, W) => (o(), p(n, {
|
|
165
|
-
key: r.id,
|
|
166
|
-
block: r,
|
|
167
|
-
context: e.context,
|
|
168
|
-
registeredComponents: e.registeredComponents,
|
|
169
|
-
linkComponent: e.linkComponent
|
|
170
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
}, 16)) : k("", !0);
|
|
174
|
-
}
|
|
175
|
-
const F = /* @__PURE__ */ g(G, [["render", H]]);
|
|
176
|
-
export {
|
|
177
|
-
F as default
|
|
178
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=require("./style.css");const s=require("./index-s0tL4FL7.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;
|