@builder.io/sdk-vue 2.0.14 → 2.0.16
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-J1Ycb5k6.js} +6 -6
- package/lib/browser/block-styles-wdfZngGH.cjs +1 -0
- package/lib/browser/{block-wrapper-l_mdj42t.cjs → block-wrapper-0yNnaWi7.cjs} +1 -1
- package/lib/browser/{block-wrapper-hPYvxseU.js → block-wrapper-WNcg8adi.js} +3 -3
- package/lib/browser/{component-ref-JlpkOrad.js → component-ref-ZQ1LWsdM.js} +2 -2
- package/lib/browser/{component-ref-dPnPtrON.cjs → component-ref-vgKnLwfE.cjs} +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/lib/{edge/get-block-properties-PLBPSz3W.js → browser/get-block-properties-9178299s.js} +13 -13
- package/lib/browser/get-block-properties-EYg8xaCR.cjs +1 -0
- package/lib/browser/{index-ZL8QUFiN.js → index-LzjDY2XM.js} +559 -549
- package/lib/browser/index-NFUE2Jgz.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-uV-zuqkw.cjs → repeated-block-BQJwYMB1.cjs} +1 -1
- package/lib/browser/{repeated-block-8EN4xN25.js → repeated-block-qTqSm8kM.js} +2 -2
- package/lib/browser/server-index.d.ts +1 -0
- package/lib/edge/block-styles-VxOvC1TW.cjs +1 -0
- package/lib/{node/block-styles-gLB-jSXN.js → edge/block-styles-ZXgAEao4.js} +12 -13
- package/lib/{node/block-wrapper-frfIIST_.js → edge/block-wrapper--PIvpZ-W.js} +3 -3
- package/lib/edge/{block-wrapper-9IWz2vxg.cjs → block-wrapper-_Jqy6OhJ.cjs} +1 -1
- package/lib/{node/component-ref-ZlBAzimq.cjs → edge/component-ref-Gmo3ST7V.cjs} +1 -1
- package/lib/{node/component-ref-IbarjSnq.js → edge/component-ref-J3KW7NWq.js} +2 -2
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/lib/{node/get-block-properties-QIsIgfnu.js → edge/get-block-properties-1IIhEm1L.js} +16 -17
- package/lib/edge/get-block-properties-YnnLDBjt.cjs +1 -0
- package/lib/edge/{index-TGe9_80q.js → index-_G5Jct0s.js} +850 -840
- package/lib/edge/{index-5-C3UhJz.cjs → index-sCP9BbUb.cjs} +31 -31
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/repeated-block-ZpVu-xdw.cjs → edge/repeated-block-BFv7xfur.cjs} +1 -1
- package/lib/edge/{repeated-block-_9Gs2AOY.js → repeated-block-xjv5lSgT.js} +2 -2
- package/lib/edge/server-index.d.ts +1 -0
- package/lib/{browser/block-styles-nWGppwAf.js → node/block-styles-1_5JG_2z.js} +12 -14
- package/lib/node/block-styles-_qZsI9c3.cjs +1 -0
- package/lib/{edge/block-wrapper-x7ERONr-.js → node/block-wrapper-V_pureM-.js} +5 -5
- package/lib/node/{block-wrapper-cCYzfiv5.cjs → block-wrapper-ofVcndkY.cjs} +1 -1
- package/lib/{edge/component-ref-eV0RBAzs.cjs → node/component-ref--fBJ8B90.cjs} +1 -1
- package/lib/{edge/component-ref-JRfa9Vwo.js → node/component-ref-i-BTHCKC.js} +2 -2
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/should-force-browser-runtime-in-node.d.ts +3 -1
- package/lib/node/get-block-properties-WxCzIZPQ.cjs +1 -0
- package/lib/{browser/get-block-properties-HzVZCpxa.js → node/get-block-properties-dtlboGe6.js} +18 -20
- package/lib/node/index-Yv0J5kjl.cjs +213 -0
- package/lib/node/{index-BugETl2c.js → index-trhIUBJe.js} +1129 -909
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +16 -17
- package/lib/{edge/repeated-block-FB2jF4o_.cjs → node/repeated-block-3sS8LQKZ.cjs} +1 -1
- package/lib/node/{repeated-block-Z-_chLeZ.js → repeated-block-DGLvKNeT.js} +2 -2
- 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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import "./style.css";
|
|
1
2
|
import { defineComponent as C, resolveComponent as g, openBlock as $, createBlock as v, createCommentVNode as B } from "vue";
|
|
2
|
-
import { _, c as h, g as
|
|
3
|
-
import { T as N } from "./logger-I8FmJD_1.js";
|
|
3
|
+
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-LzjDY2XM.js";
|
|
4
4
|
const z = C({
|
|
5
5
|
name: "block-styles",
|
|
6
6
|
components: { InlinedStyles: _ },
|
|
7
7
|
props: ["block", "context"],
|
|
8
8
|
data() {
|
|
9
|
-
return { TARGET:
|
|
9
|
+
return { TARGET: T };
|
|
10
10
|
},
|
|
11
11
|
computed: {
|
|
12
12
|
canShowBlock() {
|
|
@@ -15,7 +15,7 @@ const z = C({
|
|
|
15
15
|
},
|
|
16
16
|
css() {
|
|
17
17
|
var p, u, y;
|
|
18
|
-
const e = this.block, s = e.responsiveStyles, n = this.context.content, r =
|
|
18
|
+
const e = this.block, s = e.responsiveStyles, n = this.context.content, r = w(
|
|
19
19
|
((p = n == null ? void 0 : n.meta) == null ? void 0 : p.breakpoints) || {}
|
|
20
20
|
), c = s == null ? void 0 : s.large, i = s == null ? void 0 : s.medium, a = s == null ? void 0 : s.small, o = e.id;
|
|
21
21
|
if (!o)
|
|
@@ -45,7 +45,7 @@ const z = C({
|
|
|
45
45
|
className: `${o}:hover`,
|
|
46
46
|
styles: {
|
|
47
47
|
...m,
|
|
48
|
-
transition: `all ${t.duration}s ${
|
|
48
|
+
transition: `all ${t.duration}s ${I(
|
|
49
49
|
t.easing
|
|
50
50
|
)}`,
|
|
51
51
|
transitionDelay: t.delay ? `${t.delay}s` : "0s"
|
|
@@ -70,7 +70,7 @@ function A(e, s, n, r, c, i) {
|
|
|
70
70
|
nonce: e.context.nonce
|
|
71
71
|
}, null, 8, ["styles", "nonce"])) : B("", !0);
|
|
72
72
|
}
|
|
73
|
-
const E = /* @__PURE__ */
|
|
73
|
+
const E = /* @__PURE__ */ N(z, [["render", A]]);
|
|
74
74
|
export {
|
|
75
75
|
E as default
|
|
76
76
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-NFUE2Jgz.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,r=this.context.content,a=s.getSizesForBreakpoints(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),i=t==null?void 0:t.large,d=t==null?void 0:t.medium,c=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=c?s.createCssClass({className:n,styles:c,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,r,a,i,d){const c=l.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(l.openBlock(),l.createBlock(c,{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
|
-
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-EYg8xaCR.cjs"),n=require("./index-NFUE2Jgz.cjs"),c=()=>Promise.resolve().then(()=>require("./index-NFUE2Jgz.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-9178299s.js";
|
|
4
|
+
import { e as m } from "./index-LzjDY2XM.js";
|
|
5
|
+
const d = () => import("./index-LzjDY2XM.js").then((e) => e.E).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,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
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";
|
|
3
|
-
import { e as f, B as W, w } from "./index-
|
|
4
|
-
import { a as b, g as R } from "./get-block-properties-
|
|
3
|
+
import { e as f, B as W, w } from "./index-LzjDY2XM.js";
|
|
4
|
+
import { a as b, g as R } from "./get-block-properties-9178299s.js";
|
|
5
5
|
const x = m({
|
|
6
6
|
name: "interactive-element",
|
|
7
7
|
props: ["includeBlockProps", "block", "context", "wrapperProps", "Wrapper"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-NFUE2Jgz.cjs"),a=require("./get-block-properties-EYg8xaCR.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 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.0.
|
|
1
|
+
export declare const SDK_VERSION = "2.0.16";
|
package/lib/{edge/get-block-properties-PLBPSz3W.js → browser/get-block-properties-9178299s.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { f as c, h as i, i as l } from "./index-
|
|
3
|
-
const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) =>
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { f as s, T as c, h as i, i as l } from "./index-LzjDY2XM.js";
|
|
3
|
+
const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => s({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
6
6
|
localState: t.localState,
|
|
@@ -12,21 +12,21 @@ const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => c({
|
|
|
12
12
|
});
|
|
13
13
|
function m(e) {
|
|
14
14
|
const t = {}, r = e.block.actions ?? {};
|
|
15
|
-
for (const
|
|
16
|
-
if (!r.hasOwnProperty(
|
|
15
|
+
for (const a in r) {
|
|
16
|
+
if (!r.hasOwnProperty(a))
|
|
17
17
|
continue;
|
|
18
|
-
const n = r[
|
|
19
|
-
let
|
|
18
|
+
const n = r[a];
|
|
19
|
+
let o = f(a);
|
|
20
20
|
if (e.stripPrefix)
|
|
21
|
-
switch (
|
|
21
|
+
switch (c) {
|
|
22
22
|
case "vue":
|
|
23
|
-
|
|
23
|
+
o = o.replace("v-on:", "");
|
|
24
24
|
break;
|
|
25
25
|
case "svelte":
|
|
26
|
-
|
|
26
|
+
o = o.replace("on:", "");
|
|
27
27
|
break;
|
|
28
28
|
}
|
|
29
|
-
t[
|
|
29
|
+
t[o] = p(n, e);
|
|
30
30
|
}
|
|
31
31
|
return t;
|
|
32
32
|
}
|
|
@@ -42,7 +42,7 @@ function g({
|
|
|
42
42
|
block: e,
|
|
43
43
|
context: t
|
|
44
44
|
}) {
|
|
45
|
-
var
|
|
45
|
+
var a;
|
|
46
46
|
const r = {
|
|
47
47
|
...v(e),
|
|
48
48
|
...e.properties,
|
|
@@ -51,7 +51,7 @@ function g({
|
|
|
51
51
|
block: e,
|
|
52
52
|
context: t
|
|
53
53
|
}),
|
|
54
|
-
[l()]: [e.id, "builder-block", e.class, (
|
|
54
|
+
[l()]: [e.id, "builder-block", e.class, (a = e.properties) == null ? void 0 : a.class].filter(Boolean).join(" ")
|
|
55
55
|
};
|
|
56
56
|
return u({
|
|
57
57
|
properties: r,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=require("./style.css");const a=require("./index-NFUE2Jgz.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 p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(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=f;
|