@builder.io/sdk-vue 5.4.0 → 5.4.2
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-XLoIdAw3.js → awaiter-Y7PQyi6v.js} +1 -1
- package/lib/browser/{awaiter-qNFJfpSz.cjs → awaiter-dHA6AJCX.cjs} +1 -1
- package/lib/browser/{block-wrapper-reas9rmo.cjs → block-wrapper-qLLDWPpH.cjs} +1 -1
- package/lib/browser/{block-wrapper-f3zEx8S_.js → block-wrapper-tanzST5K.js} +3 -3
- package/lib/browser/{component-ref-4ay3OV1k.cjs → component-ref--8Xo0eru.cjs} +1 -1
- package/lib/browser/{component-ref-4lLMyE43.js → component-ref-aA9EUnWU.js} +4 -4
- package/lib/browser/components/content/content.helpers.d.ts +7 -1
- package/lib/browser/components/content/content.vue.d.ts +4 -0
- package/lib/browser/components/content-variants/inlined-fns.d.ts +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-CK4qnoHd.cjs → get-block-properties--kuQ2jHl.cjs} +1 -1
- package/lib/browser/{get-block-properties-nqV8scES.js → get-block-properties-Slh1yFIO.js} +1 -1
- package/lib/browser/{index-pJnoXY0A.js → index-94HnK8k2.js} +72 -64
- package/lib/browser/{index-lRIGot7h.cjs → index-lIMMbjkW.cjs} +9 -9
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{live-edit-hoV0ghuj.cjs → live-edit-IiNcdkxk.cjs} +1 -1
- package/lib/browser/{live-edit-5mCChUV2.js → live-edit-xzOoYzhl.js} +1 -1
- package/lib/browser/{repeated-block-F5n8q4pA.js → repeated-block-2K9I8Wm-.js} +2 -2
- package/lib/browser/{repeated-block-FDJw__8i.cjs → repeated-block-7wMvv6Dw.cjs} +1 -1
- package/lib/browser/{style-wrapper-e5wqPuhd.js → style-wrapper-C7yRsoDq.js} +1 -1
- package/lib/browser/{style-wrapper-6XW31DT6.cjs → style-wrapper-OlwFiSMB.cjs} +1 -1
- package/lib/edge/{awaiter-TPWZATcH.js → awaiter-74eowwGt.js} +1 -1
- package/lib/edge/{awaiter-g1cucmgb.cjs → awaiter-fRxc54AZ.cjs} +1 -1
- package/lib/edge/{block-wrapper-oEdWkUs5.cjs → block-wrapper-B5BJISjx.cjs} +1 -1
- package/lib/{node/block-wrapper-S-D5WDpF.js → edge/block-wrapper-DLiZnpc5.js} +3 -3
- package/lib/edge/{component-ref-XsyNNMUg.cjs → component-ref-Kok-pAOt.cjs} +1 -1
- package/lib/edge/{component-ref-PjrRqoNv.js → component-ref-Po30Jz7c.js} +4 -4
- package/lib/edge/components/content/content.helpers.d.ts +7 -1
- package/lib/edge/components/content/content.vue.d.ts +4 -0
- package/lib/edge/components/content-variants/inlined-fns.d.ts +1 -1
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-LZfO1d9V.cjs → get-block-properties-s0HfaFAz.cjs} +1 -1
- package/lib/edge/{get-block-properties-OQKbXkPB.js → get-block-properties-uEWmkpXU.js} +1 -1
- package/lib/edge/{index-fWAfFgEy.cjs → index-Nd4Mq5NZ.cjs} +13 -13
- package/lib/edge/{index-RgTaKnZ2.js → index-oUrb-PAc.js} +27 -19
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{live-edit-f7U2Azcm.js → live-edit-fVd_ug7o.js} +1 -1
- package/lib/{node/live-edit-YCZ5pmAP.cjs → edge/live-edit-s44cI_k-.cjs} +1 -1
- package/lib/edge/{repeated-block-bXYXfKP_.js → repeated-block-Ejv18P9i.js} +2 -2
- package/lib/edge/{repeated-block-N0cYhpaS.cjs → repeated-block-kYllzesL.cjs} +1 -1
- package/lib/edge/{style-wrapper-x1xM4jrn.cjs → style-wrapper-1RJACAmT.cjs} +1 -1
- package/lib/edge/{style-wrapper-XXgvForl.js → style-wrapper-7J29CqBV.js} +1 -1
- package/lib/node/{awaiter-6GuArcPZ.cjs → awaiter-HlIEMqL2.cjs} +1 -1
- package/lib/node/{awaiter-U9ghjah_.js → awaiter-SBbqkqGS.js} +1 -1
- package/lib/node/{block-wrapper-BjCwxGrk.cjs → block-wrapper-CxABGooQ.cjs} +1 -1
- package/lib/{edge/block-wrapper-pWTeul3q.js → node/block-wrapper-RbIX1_FJ.js} +3 -3
- package/lib/node/{component-ref-JIXZgEPq.js → component-ref-36nEcDJg.js} +5 -5
- package/lib/node/{component-ref-2T_SzZr_.cjs → component-ref-gZgBfl3C.cjs} +1 -1
- package/lib/node/components/content/content.helpers.d.ts +7 -1
- package/lib/node/components/content/content.vue.d.ts +4 -0
- package/lib/node/components/content-variants/inlined-fns.d.ts +1 -1
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-VdcyrKHl.cjs → get-block-properties--P_kIEc4.cjs} +1 -1
- package/lib/node/{get-block-properties-6ZEBsSGZ.js → get-block-properties-_gI9Xz9P.js} +2 -2
- package/lib/node/{index-C8cK6fMj.cjs → index-jza5cPNQ.cjs} +13 -13
- package/lib/node/{index-BFBRlmya.js → index-zO0b5of_.js} +27 -19
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +2 -2
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +1 -1
- package/lib/node/{live-edit-Gaqi2aam.js → live-edit-5hkdZt2p.js} +1 -1
- package/lib/{edge/live-edit-JjbauDaL.cjs → node/live-edit-Csjy-Smn.cjs} +1 -1
- package/lib/node/{repeated-block-crOq_RyN.cjs → repeated-block-BzgNegIW.cjs} +1 -1
- package/lib/node/{repeated-block-xa9PS91L.js → repeated-block-s2MfIPGD.js} +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-ljCjC7PN.cjs → should-force-browser-runtime-in-node-iaCUWBcy.cjs} +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-dSSMAIhU.js → should-force-browser-runtime-in-node-vgbSWZcY.js} +1 -1
- package/lib/node/{style-wrapper-8sWObtTj.js → style-wrapper-cn8kiAX7.js} +2 -2
- package/lib/node/{style-wrapper-ol70p_wf.cjs → style-wrapper-wvi8GKDA.cjs} +1 -1
- package/package.json +1 -1
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
var t=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-lIMMbjkW.cjs");exports.Blocks=e.Blocks;exports.BuilderContext=e.BuilderContext;exports.BuilderScripts=e.builderScripts;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.registerAction=e.registerAction;exports.setClientUserAttributes=e.setClientUserAttributes;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { q as a, b as r, r as i, n as o, C as n, s as c, F as g, I as u, S as l, o as d, p as m, V as p, H as C, v as B, G as E, J as S, K as b, A as f, i as h, u as x, x as y, y as A, t as P, z as k, E as v, D as F } from "./index-
|
|
2
|
+
import { q as a, b as r, r as i, n as o, C as n, s as c, F as g, I as u, S as l, o as d, p as m, V as p, H as C, v as B, G as E, J as S, K as b, A as f, i as h, u as x, x as y, y as A, t as P, z as k, E as v, D as F } from "./index-94HnK8k2.js";
|
|
3
3
|
export {
|
|
4
4
|
a as Blocks,
|
|
5
5
|
r as BuilderContext,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./find-block-FHyxDYzT.cjs"),n=require("./index-
|
|
1
|
+
var l=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./find-block-FHyxDYzT.cjs"),n=require("./index-lIMMbjkW.cjs"),i=t.defineComponent({name:"live-edit",props:["id","attributes","Wrapper"],inject:{context:n.BuilderContext.key},computed:{block(){return r.findBlockById(this.context.content,this.id)},options(){var e,o;return((o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options)||{}}}});function s(e,o,p,u,d,a){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({attributes:e.attributes},e.options),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const c=n._export_sfc(i,[["render",s]]);exports.default=c;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as o, openBlock as r, createBlock as n, resolveDynamicComponent as i, mergeProps as s, withCtx as p, renderSlot as a } from "vue";
|
|
3
3
|
import { f as c } from "./find-block-4FksmtpZ.js";
|
|
4
|
-
import { b as d, _ as m } from "./index-
|
|
4
|
+
import { b as d, _ as m } from "./index-94HnK8k2.js";
|
|
5
5
|
const l = o({
|
|
6
6
|
name: "live-edit",
|
|
7
7
|
props: ["id", "attributes", "Wrapper"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as p, createBlock as s } from "vue";
|
|
3
|
-
import { b as c, _ as i } from "./index-
|
|
4
|
-
const a = () => import("./index-
|
|
3
|
+
import { b as c, _ as i } from "./index-94HnK8k2.js";
|
|
4
|
+
const a = () => import("./index-94HnK8k2.js").then((e) => e.M).then((e) => e.default).catch((e) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component Block at ../block.vue",
|
|
7
7
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),t=require("./index-lIMMbjkW.cjs"),r=()=>Promise.resolve().then(()=>require("./index-lIMMbjkW.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}},watch:{onUpdateHook0:{handler(){this.store=this.repeatContext},immediate:!0}},computed:{onUpdateHook0(){return{0:this.repeatContext}}}});function s(e,p,l,a,d,m){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 i=t._export_sfc(c,[["render",s]]);exports.default=i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as E, resolveComponent as x, openBlock as y, createBlock as g, createCommentVNode as N, createElementBlock as G, Fragment as H } from "vue";
|
|
3
|
-
import { c as R, T as w, d as C, f as W, h as j, j as l, k as u, l as z, _ as Q, m as U, b as D } from "./index-
|
|
3
|
+
import { c as R, T as w, d as C, f as W, h as j, j as l, k as u, l as z, _ as Q, m as U, b as D } from "./index-94HnK8k2.js";
|
|
4
4
|
import { f as F } from "./find-block-4FksmtpZ.js";
|
|
5
5
|
const L = E({
|
|
6
6
|
name: "block-styles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var F=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./index-
|
|
1
|
+
var F=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),s=require("./index-lIMMbjkW.cjs"),_=require("./find-block-FHyxDYzT.cjs"),P=o.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,B,C,f,v;const e=this.block,t=s.getResponsiveStylesWithImagePosition(e.responsiveStyles,((S=e.component)==null?void 0:S.name)==="Image"),n=this.context.content,l=s.getSizesForBreakpoints(((h=n==null?void 0:n.meta)==null?void 0:h.breakpoints)||{}),k=!!((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}):"",g=c?s.createCssClass({className:m,styles:c,mediaQuery:s.getMaxWidthQueryForSize("medium",l)}):"",x=d?s.createCssClass({className:m,styles:d,mediaQuery:s.getMaxWidthQueryForSize("small",l)}):"",p=r&&k?s.createCssClass({className:m,styles:r,mediaQuery:s.getMaxWidthQueryForSize("xsmall",l)}):"",i=e.animations&&e.animations.find(u=>u.trigger==="hover");let y="";if(i){const u=((v=(f=i.steps)==null?void 0:f[1])==null?void 0:v.styles)||{};y=s.createCssClass({className:`${m}:hover`,styles:{...u,transition:`all ${i.duration}s ${s.camelToKebabCase(i.easing)}`,transitionDelay:i.delay?`${i.delay}s`:"0s"}})||""}return[b,g,x,p,y].join(" ")}}});function E(e,t,n,l,k,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 I=s._export_sfc(P,[["render",E]]),Q=o.defineComponent({name:"live-edit-block-styles",components:{InlinedStyles:s._sfc_main},props:["contextProvider","id"],data(){return{TARGET:s.TARGET}},computed:{block(){return _.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 s.checkIsDefined((e=this.processedBlock)==null?void 0:e.hide)?!((t=this.processedBlock)!=null&&t.hide):s.checkIsDefined((n=this.processedBlock)==null?void 0:n.show)?(l=this.processedBlock)==null?void 0:l.show:!0},css(){var y,S,h,B,C,f,v,u,T;const e=s.getResponsiveStylesWithImagePosition((y=this.processedBlock)==null?void 0:y.responsiveStyles,((h=(S=this.processedBlock)==null?void 0:S.component)==null?void 0:h.name)==="Image"),t=this.contextProvider.content,n=s.getSizesForBreakpoints(((B=t==null?void 0:t.meta)==null?void 0:B.breakpoints)||{}),l=!!((f=(C=t==null?void 0:t.meta)==null?void 0:C.breakpoints)!=null&&f.xsmall),k=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=(v=this.processedBlock)==null?void 0:v.id;if(!r)return"";const m=k?s.createCssClass({className:r,styles:k}):"",b=a?s.createCssClass({className:r,styles:a,mediaQuery:s.getMaxWidthQueryForSize("medium",n)}):"",g=c?s.createCssClass({className:r,styles:c,mediaQuery:s.getMaxWidthQueryForSize("small",n)}):"",x=d&&l?s.createCssClass({className:r,styles:d,mediaQuery:s.getMaxWidthQueryForSize("xsmall",n)}):"",p=this.processedBlock.animations&&this.processedBlock.animations.find($=>$.trigger==="hover");let i="";if(p){const $=((T=(u=p.steps)==null?void 0:u[1])==null?void 0:T.styles)||{};i=s.createCssClass({className:`${r}:hover`,styles:{...$,transition:`all ${p.duration}s ${s.camelToKebabCase(p.easing)}`,transitionDelay:p.delay?`${p.delay}s`:"0s"}})||""}return[m,b,g,x,i].join(" ")}}});function A(e,t,n,l,k,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 R=s._export_sfc(Q,[["render",A]]),W=o.defineComponent({name:"style-wrapper",components:{BlockStyles:I,LiveEditBlockStyles:R},props:["block","context"],data(){return{isClientEditing:!1,isHydrated:!1,TARGET:s.TARGET}},inject:{contextProvider:s.BuilderContext.key},mounted(){}});function z(e,t,n,l,k,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 w=s._export_sfc(W,[["render",z]]);exports.default=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Nd4Mq5NZ.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,c,i,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./get-block-properties-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./get-block-properties-s0HfaFAz.cjs"),a=require("./index-Nd4Mq5NZ.cjs"),i=()=>Promise.resolve().then(()=>require("./index-Nd4Mq5NZ.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}),s=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(i)},props:["Wrapper","block","context"],data(){return{getBlockActions:r.getBlockActions,getBlockProperties:r.getBlockProperties}}});function l(e,d,m,u,k,y){var o,n;const c=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(c,{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,trackingContext:{apiKey:e.context.apiKey,canTrack:e.context.canTrack??!0,contentId:(o=e.context.content)==null?void 0:o.id,variationId:(n=e.context.content)==null?void 0:n.testVariationId}})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const p=a._export_sfc(s,[["render",l]]);exports.default=p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r, defineAsyncComponent as a, resolveComponent as c, openBlock as i, createBlock as p, withCtx as s, renderSlot as l } from "vue";
|
|
2
|
-
import { g as m, a as d } from "./get-block-properties-
|
|
3
|
-
import { _ as k } from "./index-
|
|
4
|
-
const u = () => import("./index-
|
|
2
|
+
import { g as m, a as d } from "./get-block-properties-uEWmkpXU.js";
|
|
3
|
+
import { _ as k } from "./index-oUrb-PAc.js";
|
|
4
|
+
const u = () => import("./index-oUrb-PAc.js").then((t) => t.L).then((t) => t.default).catch((t) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
7
7
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-Nd4Mq5NZ.cjs"),l=require("./get-block-properties-s0HfaFAz.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-fRxc54AZ.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-s44cI_k-.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),h=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:r.TARGET,isEditing:r.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){var e,o;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,trackingContext:{apiKey:this.context.apiKey,canTrack:this.context.canTrack??!0,contentId:(e=this.context.content)==null?void 0:e.id,variationId:(o=this.context.content)==null?void 0:o.testVariationId}})}:{}},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 b(e,o,a,s,p,c){const i=t.resolveComponent("Awaiter"),n=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(n,{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 d=r._export_sfc(h,[["render",b]]),f=({componentOptions:e,builderBlock:o,context:a,componentRef:s,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const n={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:s,block:o,context:a,wrapperProps:e,includeBlockProps:p}:n},C=t.defineComponent({name:"component-ref",components:{Block:r.Block,InteractiveElement:d},props:["isInteractive","componentRef","blockChildren","componentOptions","builderBlock","context","linkComponent","includeBlockProps","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?r.wrapComponentRef(d):this.componentRef,getWrapperProps:f}},computed:{blockChildrenToRender(){return this.componentRef?this.blockChildren:[]}}});function B(e,o,a,s,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(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildrenToRender,(n,m)=>(t.openBlock(),t.createBlock(i,{key:n.id,block:n,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const v=r._export_sfc(C,[["render",B]]);exports.default=v;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as h, defineAsyncComponent as u, resolveComponent as m, openBlock as o, createBlock as i, withCtx as p, renderSlot as d, createElementBlock as b, Fragment as f, resolveDynamicComponent as C, mergeProps as w, normalizeProps as W, renderList as y, createCommentVNode as B } from "vue";
|
|
2
|
-
import { T as E, i as R, _ as g, B as $, w as A } from "./index-
|
|
3
|
-
import { a as v, g as S } from "./get-block-properties-
|
|
4
|
-
const T = () => import("./awaiter-
|
|
2
|
+
import { T as E, i as R, _ as g, B as $, w as A } from "./index-oUrb-PAc.js";
|
|
3
|
+
import { a as v, g as S } from "./get-block-properties-uEWmkpXU.js";
|
|
4
|
+
const T = () => import("./awaiter-74eowwGt.js").then((t) => t.default).catch((t) => {
|
|
5
5
|
throw console.error(
|
|
6
6
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
7
7
|
t
|
|
8
8
|
), t;
|
|
9
|
-
}), I = () => import("./live-edit-
|
|
9
|
+
}), I = () => import("./live-edit-fVd_ug7o.js").then((t) => t.default).catch((t) => {
|
|
10
10
|
throw console.error(
|
|
11
11
|
"Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
|
|
12
12
|
t
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegisteredComponent, RegisteredComponents } from '../../context/types';
|
|
1
|
+
import type { BuilderRenderState, RegisteredComponent, RegisteredComponents } from '../../context/types';
|
|
2
2
|
import type { BuilderContent } from '../../types/builder-content';
|
|
3
3
|
import type { ComponentInfo } from '../../types/components';
|
|
4
4
|
import type { Dictionary, Nullable } from '../../types/typescript';
|
|
@@ -9,3 +9,9 @@ export declare const getRootStateInitialValue: ({ content, data, locale }: Pick<
|
|
|
9
9
|
locale?: string | undefined;
|
|
10
10
|
};
|
|
11
11
|
export declare const getContentInitialValue: ({ content, data }: Pick<ContentProps, 'content' | 'data'>) => Nullable<BuilderContent>;
|
|
12
|
+
/**
|
|
13
|
+
* A state object whose reads and writes go to whatever `getRootState` returns
|
|
14
|
+
* when they happen, for jsCode functions that outlive the root state object
|
|
15
|
+
* they were defined against.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getLiveRootState: (getRootState: () => BuilderRenderState) => BuilderRenderState;
|
|
@@ -24,6 +24,10 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
24
24
|
isNestedRender?: any;
|
|
25
25
|
}>, unknown, {
|
|
26
26
|
scriptStr: string;
|
|
27
|
+
jsCodeRun: {
|
|
28
|
+
done: boolean;
|
|
29
|
+
rootState: BuilderRenderState | null;
|
|
30
|
+
};
|
|
27
31
|
registeredComponents: import("../../context/types").RegisteredComponents;
|
|
28
32
|
builderContextSignal: {
|
|
29
33
|
content: import("../../types/typescript").Nullable<import("../..").BuilderContent>;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
* For more information on how this works,
|
|
11
11
|
* see our [SSR A/B Test Docs](https://github.com/BuilderIO/builder/tree/main/packages/sdks/docs/SSR_AB_TEST.md)
|
|
12
12
|
*/
|
|
13
|
-
export declare const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n let styleEl = document.currentScript?.previousElementSibling;\n if (isAngularSDK) {\n styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');\n }\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
|
|
13
|
+
export declare const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id, 30);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId, 30);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n let styleEl = document.currentScript?.previousElementSibling;\n if (isAngularSDK) {\n styleEl = document.currentScript?.parentElement?.previousElementSibling?.querySelector('style');\n }\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
|
|
14
14
|
export declare const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.4.
|
|
1
|
+
export declare const SDK_VERSION = "5.4.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-Nd4Mq5NZ.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>o=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1,trackingContext:t.trackingContext});function l(e){const t={},o=e.block.actions??{};for(const n in o){if(!o.hasOwnProperty(n))continue;const s=o[n];let r=c(n);if(e.stripPrefix)switch(a.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var r;const{_newProperty:o,...n}=e.properties||{},s={...p(e),...n,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return u({properties:s,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
|