@builder.io/sdk-vue 2.0.14 → 2.0.15
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/{edge/block-styles-zRPUnWLf.js → browser/block-styles-3kNIHbfo.js} +6 -6
- package/lib/browser/block-styles-mYBwPtv0.cjs +1 -0
- package/lib/browser/{block-wrapper-hPYvxseU.js → block-wrapper-N1PMQPGA.js} +3 -3
- package/lib/browser/{block-wrapper-l_mdj42t.cjs → block-wrapper-mGepkLsD.cjs} +1 -1
- package/lib/browser/{component-ref-dPnPtrON.cjs → component-ref-D4a8WUvU.cjs} +1 -1
- package/lib/browser/{component-ref-JlpkOrad.js → component-ref-eSpEv_vu.js} +2 -2
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/{edge/get-block-properties-PLBPSz3W.js → browser/get-block-properties--gxTb6u9.js} +13 -13
- package/lib/browser/get-block-properties-1Vr9AX-f.cjs +1 -0
- package/lib/browser/{index-ZL8QUFiN.js → index-dh7iM10N.js} +552 -546
- package/lib/browser/index-vQfvmzgX.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-8EN4xN25.js → repeated-block-CnX7KaV3.js} +2 -2
- package/lib/browser/{repeated-block-uV-zuqkw.cjs → repeated-block-zZGzC5Ez.cjs} +1 -1
- package/lib/browser/server-index.d.ts +1 -0
- package/lib/{node/block-styles-gLB-jSXN.js → edge/block-styles-IJpbU1il.js} +12 -13
- package/lib/edge/block-styles-c-t5DB1d.cjs +1 -0
- package/lib/{node/block-wrapper-frfIIST_.js → edge/block-wrapper-UEsTg8bU.js} +3 -3
- package/lib/edge/{block-wrapper-9IWz2vxg.cjs → block-wrapper-cbxxzz21.cjs} +1 -1
- package/lib/{node/component-ref-IbarjSnq.js → edge/component-ref-2h-cUV3Z.js} +2 -2
- package/lib/{node/component-ref-ZlBAzimq.cjs → edge/component-ref-pqmk5wUc.cjs} +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/{node/get-block-properties-QIsIgfnu.js → edge/get-block-properties-S3qjKi7G.js} +16 -17
- package/lib/edge/get-block-properties-egDFLKDW.cjs +1 -0
- package/lib/edge/{index-TGe9_80q.js → index-BN18YEfB.js} +843 -837
- package/lib/edge/{index-5-C3UhJz.cjs → index-NQs12e6I.cjs} +31 -31
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-_9Gs2AOY.js → repeated-block-3py1q2sc.js} +2 -2
- package/lib/{node/repeated-block-ZpVu-xdw.cjs → edge/repeated-block-IMmb2AE9.cjs} +1 -1
- package/lib/edge/server-index.d.ts +1 -0
- package/lib/{browser/block-styles-nWGppwAf.js → node/block-styles-E0MOJgK4.js} +12 -14
- package/lib/node/block-styles-VaKrzGA5.cjs +1 -0
- package/lib/node/{block-wrapper-cCYzfiv5.cjs → block-wrapper-TvqPY7Mt.cjs} +1 -1
- package/lib/{edge/block-wrapper-x7ERONr-.js → node/block-wrapper-cHgl5RuV.js} +5 -5
- package/lib/{edge/component-ref-eV0RBAzs.cjs → node/component-ref-fYSFTWDE.cjs} +1 -1
- package/lib/{edge/component-ref-JRfa9Vwo.js → node/component-ref-gqNpKniv.js} +2 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/{browser/get-block-properties-HzVZCpxa.js → node/get-block-properties-AZMTucap.js} +18 -20
- package/lib/node/get-block-properties-IntKgx2x.cjs +1 -0
- package/lib/node/index-ozkdxROi.cjs +213 -0
- package/lib/node/{index-BugETl2c.js → index-xSGjb-sL.js} +1123 -907
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +16 -17
- package/lib/node/{repeated-block-Z-_chLeZ.js → repeated-block-WqJu5DET.js} +2 -2
- package/lib/{edge/repeated-block-FB2jF4o_.cjs → node/repeated-block-wW6CINnA.cjs} +1 -1
- package/lib/node/server-index.d.ts +1 -0
- package/package.json +2 -8
- package/lib/browser/block-styles-rt4v7rBl.cjs +0 -1
- package/lib/browser/get-block-properties-sInACBRh.cjs +0 -1
- package/lib/browser/index-MDNnQzZB.cjs +0 -166
- package/lib/browser/init.cjs +0 -8
- package/lib/browser/init.mjs +0 -65
- package/lib/browser/logger-0-1mARBa.cjs +0 -1
- package/lib/browser/logger-Hm2e1Xk_.js +0 -12
- package/lib/edge/block-styles-Ta3OQAmE.cjs +0 -1
- package/lib/edge/get-block-properties-Dy3XF05J.cjs +0 -1
- package/lib/edge/init.cjs +0 -8
- package/lib/edge/init.mjs +0 -64
- package/lib/edge/logger-I8FmJD_1.js +0 -11
- package/lib/edge/logger-U9-0vDJK.cjs +0 -1
- package/lib/node/block-styles-u7KGnyuc.cjs +0 -1
- package/lib/node/get-block-properties-2Q2lr9bu.cjs +0 -1
- package/lib/node/index-s5vEnK-M.cjs +0 -166
- package/lib/node/init.cjs +0 -1
- package/lib/node/init.mjs +0 -11
- package/lib/node/node-runtime-0rF8vJwU.js +0 -233
- package/lib/node/node-runtime-Bqb5TnyM.cjs +0 -48
package/lib/edge/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-NQs12e6I.cjs");exports.Blocks=e.Blocks;exports.BuilderContext=e.BuilderContext;exports.Button=e.Button;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/edge/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as a, j as t, k as r, C as o, o as i, F as n, I as c, S as g, l, m, V as u, z as d, r as C, y as p, A as B, D as E, u as S, p as f, q as h, s as x, t as b, x as k, v as y } from "./index-BN18YEfB.js";
|
|
2
2
|
export {
|
|
3
3
|
a as Blocks,
|
|
4
4
|
t as BuilderContext,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as c, createBlock as p } from "vue";
|
|
2
|
-
import { j as s, e as l } from "./index-
|
|
3
|
-
const i = () => import("./index-
|
|
2
|
+
import { j as s, e as l } from "./index-BN18YEfB.js";
|
|
3
|
+
const i = () => import("./index-BN18YEfB.js").then((e) => e.G).then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component Block at ../block.vue",
|
|
6
6
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-NQs12e6I.cjs"),r=()=>Promise.resolve().then(()=>require("./index-NQs12e6I.cjs")).then(e=>e.block).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Block at ../block.vue",e),e}),c=o.defineComponent({name:"repeated-block",components:{Block:o.defineAsyncComponent(r)},props:["repeatContext","block","registeredComponents","linkComponent"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[t.BuilderContext.key]:e.store}}});function s(e,i,p,a,m,d){const n=o.resolveComponent("Block");return o.openBlock(),o.createBlock(n,{block:e.block,context:e.store,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"])}const l=t._export_sfc(c,[["render",s]]);exports.default=l;
|
|
@@ -37,3 +37,4 @@ export { subscribeToEditor } from './helpers/subscribe-to-editor';
|
|
|
37
37
|
*/
|
|
38
38
|
export { fetchBuilderProps } from './functions/fetch-builder-props';
|
|
39
39
|
export { _processContentResult, fetchEntries, fetchOneEntry } from './functions/get-content/index';
|
|
40
|
+
export type { GetContentOptions } from './functions/get-content/types';
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import "./style.css";
|
|
2
1
|
import { defineComponent as C, resolveComponent as g, openBlock as $, createBlock as v, createCommentVNode as B } from "vue";
|
|
3
|
-
import { _, c as h, g as
|
|
4
|
-
import { T as N } from "./logger-Hm2e1Xk_.js";
|
|
2
|
+
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-xSGjb-sL.js";
|
|
5
3
|
const z = C({
|
|
6
4
|
name: "block-styles",
|
|
7
5
|
components: { InlinedStyles: _ },
|
|
8
6
|
props: ["block", "context"],
|
|
9
7
|
data() {
|
|
10
|
-
return { TARGET:
|
|
8
|
+
return { TARGET: T };
|
|
11
9
|
},
|
|
12
10
|
computed: {
|
|
13
11
|
canShowBlock() {
|
|
@@ -16,27 +14,27 @@ const z = C({
|
|
|
16
14
|
},
|
|
17
15
|
css() {
|
|
18
16
|
var p, u, y;
|
|
19
|
-
const e = this.block, s = e.responsiveStyles, n = this.context.content,
|
|
17
|
+
const e = this.block, s = e.responsiveStyles, n = this.context.content, c = w(
|
|
20
18
|
((p = n == null ? void 0 : n.meta) == null ? void 0 : p.breakpoints) || {}
|
|
21
|
-
),
|
|
19
|
+
), r = s == null ? void 0 : s.large, i = s == null ? void 0 : s.medium, a = s == null ? void 0 : s.small, o = e.id;
|
|
22
20
|
if (!o)
|
|
23
21
|
return "";
|
|
24
|
-
const S =
|
|
22
|
+
const S = r ? l({
|
|
25
23
|
className: o,
|
|
26
|
-
styles:
|
|
24
|
+
styles: r
|
|
27
25
|
}) : "", f = i ? l({
|
|
28
26
|
className: o,
|
|
29
27
|
styles: i,
|
|
30
28
|
mediaQuery: k(
|
|
31
29
|
"medium",
|
|
32
|
-
|
|
30
|
+
c
|
|
33
31
|
)
|
|
34
32
|
}) : "", b = a ? l({
|
|
35
33
|
className: o,
|
|
36
34
|
styles: a,
|
|
37
35
|
mediaQuery: k(
|
|
38
36
|
"small",
|
|
39
|
-
|
|
37
|
+
c
|
|
40
38
|
)
|
|
41
39
|
}) : "", t = e.animations && e.animations.find((m) => m.trigger === "hover");
|
|
42
40
|
let d = "";
|
|
@@ -46,7 +44,7 @@ const z = C({
|
|
|
46
44
|
className: `${o}:hover`,
|
|
47
45
|
styles: {
|
|
48
46
|
...m,
|
|
49
|
-
transition: `all ${t.duration}s ${
|
|
47
|
+
transition: `all ${t.duration}s ${I(
|
|
50
48
|
t.easing
|
|
51
49
|
)}`,
|
|
52
50
|
transitionDelay: t.delay ? `${t.delay}s` : "0s"
|
|
@@ -62,7 +60,7 @@ const z = C({
|
|
|
62
60
|
}
|
|
63
61
|
}
|
|
64
62
|
});
|
|
65
|
-
function A(e, s, n,
|
|
63
|
+
function A(e, s, n, c, r, i) {
|
|
66
64
|
const a = g("InlinedStyles");
|
|
67
65
|
return e.TARGET !== "reactNative" && e.css && e.canShowBlock ? ($(), v(a, {
|
|
68
66
|
key: 0,
|
|
@@ -71,7 +69,7 @@ function A(e, s, n, r, c, i) {
|
|
|
71
69
|
nonce: e.context.nonce
|
|
72
70
|
}, null, 8, ["styles", "nonce"])) : B("", !0);
|
|
73
71
|
}
|
|
74
|
-
const
|
|
72
|
+
const D = /* @__PURE__ */ N(z, [["render", A]]);
|
|
75
73
|
export {
|
|
76
|
-
|
|
74
|
+
D as default
|
|
77
75
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-ozkdxROi.cjs"),f=l.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 y,p,h;const e=this.block,t=e.responsiveStyles,c=this.context.content,a=s.getSizesForBreakpoints(((y=c==null?void 0:c.meta)==null?void 0:y.breakpoints)||{}),i=t==null?void 0:t.large,d=t==null?void 0:t.medium,r=t==null?void 0:t.small,n=e.id;if(!n)return"";const S=i?s.createCssClass({className:n,styles:i}):"",k=d?s.createCssClass({className:n,styles:d,mediaQuery:s.getMaxWidthQueryForSize("medium",a)}):"",C=r?s.createCssClass({className:n,styles:r,mediaQuery:s.getMaxWidthQueryForSize("small",a)}):"",o=e.animations&&e.animations.find(m=>m.trigger==="hover");let u="";if(o){const m=((h=(p=o.steps)==null?void 0:p[1])==null?void 0:h.styles)||{};u=s.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${o.duration}s ${s.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[S,k,C,u].join(" ")}}});function b(e,t,c,a,i,d){const r=l.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(l.openBlock(),l.createBlock(r,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):l.createCommentVNode("",!0)}const g=s._export_sfc(f,[["render",b]]);exports.default=g;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-IntKgx2x.cjs"),n=require("./index-ozkdxROi.cjs"),c=()=>Promise.resolve().then(()=>require("./index-ozkdxROi.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,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
2
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
3
|
-
import { e as m } from "./index-
|
|
4
|
-
const d = () => import("./index-
|
|
2
|
+
import { g as s, a as l } from "./get-block-properties-AZMTucap.js";
|
|
3
|
+
import { e as m } from "./index-xSGjb-sL.js";
|
|
4
|
+
const d = () => import("./index-xSGjb-sL.js").then((e) => e.E).then((e) => e.default).catch((e) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
7
7
|
e
|
|
@@ -37,7 +37,7 @@ function u(e, k, b, y, S, g) {
|
|
|
37
37
|
_: 3
|
|
38
38
|
}, 8, ["TagName", "attributes", "actionAttributes"]);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const D = /* @__PURE__ */ m(f, [["render", u]]);
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
D as default
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-ozkdxROi.cjs"),a=require("./get-block-properties-IntKgx2x.cjs"),u=t.defineComponent({name:"interactive-element",props:["includeBlockProps","block","context","wrapperProps","Wrapper"],computed:{attributes(){return this.includeBlockProps?{...a.getBlockProperties({block:this.block,context:this.context}),...a.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function d(e,o,p,s,n,i){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=c._export_sfc(u,[["render",d]]),f=({componentOptions:e,builderBlock:o,context:p,componentRef:s,includeBlockProps:n,isInteractive:i,contextValue:l})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:o,context:l})}:{}};return i?{Wrapper:s,block:o,context:p,wrapperProps:e,includeBlockProps:n}:r},B=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:f}}});function b(e,o,p,s,n,i){const l=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,(r,k)=>(t.openBlock(),t.createBlock(l,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const C=c._export_sfc(B,[["render",b]]);exports.default=C;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as r, createBlock as a, resolveDynamicComponent as k, mergeProps as u, withCtx as d, renderSlot as h, resolveComponent as B, normalizeProps as P, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as S } from "vue";
|
|
2
|
-
import { e as f, B as W, w } from "./index-
|
|
3
|
-
import { a as b, g as R } from "./get-block-properties-
|
|
2
|
+
import { e as f, B as W, w } from "./index-xSGjb-sL.js";
|
|
3
|
+
import { a as b, g as R } from "./get-block-properties-AZMTucap.js";
|
|
4
4
|
const x = m({
|
|
5
5
|
name: "interactive-element",
|
|
6
6
|
props: ["includeBlockProps", "block", "context", "wrapperProps", "Wrapper"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.15";
|
package/lib/{browser/get-block-properties-HzVZCpxa.js → node/get-block-properties-AZMTucap.js}
RENAMED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
|
|
3
|
-
import { f as c, h as i, i as l } from "./index-ZL8QUFiN.js";
|
|
4
|
-
const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => c({
|
|
1
|
+
import { f as s, T as c, h as i, i as l } from "./index-xSGjb-sL.js";
|
|
2
|
+
const f = (e) => `v-on:${e.toLowerCase()}`, u = (e, t) => (r) => s({
|
|
5
3
|
code: e,
|
|
6
4
|
context: t.context,
|
|
7
5
|
localState: t.localState,
|
|
@@ -11,27 +9,27 @@ const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => c({
|
|
|
11
9
|
isExpression: !1,
|
|
12
10
|
enableCache: !0
|
|
13
11
|
});
|
|
14
|
-
function
|
|
12
|
+
function S(e) {
|
|
15
13
|
const t = {}, r = e.block.actions ?? {};
|
|
16
|
-
for (const
|
|
17
|
-
if (!r.hasOwnProperty(
|
|
14
|
+
for (const a in r) {
|
|
15
|
+
if (!r.hasOwnProperty(a))
|
|
18
16
|
continue;
|
|
19
|
-
const n = r[
|
|
20
|
-
let
|
|
17
|
+
const n = r[a];
|
|
18
|
+
let o = f(a);
|
|
21
19
|
if (e.stripPrefix)
|
|
22
|
-
switch (
|
|
20
|
+
switch (c) {
|
|
23
21
|
case "vue":
|
|
24
|
-
|
|
22
|
+
o = o.replace("v-on:", "");
|
|
25
23
|
break;
|
|
26
24
|
case "svelte":
|
|
27
|
-
|
|
25
|
+
o = o.replace("on:", "");
|
|
28
26
|
break;
|
|
29
27
|
}
|
|
30
|
-
t[
|
|
28
|
+
t[o] = u(n, e);
|
|
31
29
|
}
|
|
32
30
|
return t;
|
|
33
31
|
}
|
|
34
|
-
function
|
|
32
|
+
function p({
|
|
35
33
|
properties: e
|
|
36
34
|
}) {
|
|
37
35
|
return e;
|
|
@@ -39,11 +37,11 @@ function u({
|
|
|
39
37
|
const v = (e) => ({
|
|
40
38
|
href: e.href
|
|
41
39
|
});
|
|
42
|
-
function
|
|
40
|
+
function g({
|
|
43
41
|
block: e,
|
|
44
42
|
context: t
|
|
45
43
|
}) {
|
|
46
|
-
var
|
|
44
|
+
var a;
|
|
47
45
|
const r = {
|
|
48
46
|
...v(e),
|
|
49
47
|
...e.properties,
|
|
@@ -52,15 +50,15 @@ function h({
|
|
|
52
50
|
block: e,
|
|
53
51
|
context: t
|
|
54
52
|
}),
|
|
55
|
-
[l()]: [e.id, "builder-block", e.class, (
|
|
53
|
+
[l()]: [e.id, "builder-block", e.class, (a = e.properties) == null ? void 0 : a.class].filter(Boolean).join(" ")
|
|
56
54
|
};
|
|
57
|
-
return
|
|
55
|
+
return p({
|
|
58
56
|
properties: r,
|
|
59
57
|
context: t,
|
|
60
58
|
block: e
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
export {
|
|
64
|
-
|
|
65
|
-
g
|
|
62
|
+
g as a,
|
|
63
|
+
S as g
|
|
66
64
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("./index-ozkdxROi.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,e)}return t}function u({properties:e}){return e}const f=e=>({href:e.href});function p({block:e,context:t}){var o;const r={...f(e),...e.properties,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.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=p;
|