@builder.io/sdk-vue 5.2.9 → 5.2.11
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-QtLKYOQC.cjs → awaiter-MAyQwJUp.cjs} +1 -1
- package/lib/browser/{awaiter-GiQQpYhW.js → awaiter-quz2SFrg.js} +1 -1
- package/lib/browser/{block-wrapper-ViH1iyRS.js → block-wrapper-SCckT0M5.js} +3 -3
- package/lib/browser/{block-wrapper-y-IsMpII.cjs → block-wrapper-vBu_Ygm8.cjs} +1 -1
- package/lib/browser/{component-ref-rZJpDoXF.cjs → component-ref-HWBSC66Y.cjs} +1 -1
- package/lib/browser/{component-ref-zhlOI1eN.js → component-ref-owc3e0h8.js} +4 -4
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -0
- package/lib/browser/components/content/content.vue.d.ts +3 -0
- package/lib/browser/components/content-variants/content-variants.types.d.ts +8 -0
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/get-content/types.d.ts +27 -0
- package/lib/browser/{get-block-properties-GRPDkwr1.js → get-block-properties-Hny6jqGG.js} +1 -1
- package/lib/browser/{get-block-properties-d2CFs8mL.cjs → get-block-properties-odFddSWh.cjs} +1 -1
- package/lib/browser/{index-jB9t6TLT.js → index-7bXAC1Q8.js} +692 -682
- package/lib/browser/index-uDRmkrr4.cjs +350 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{live-edit-1ndmHzhK.cjs → live-edit-AUagAEej.cjs} +1 -1
- package/lib/browser/{live-edit-3N2WSAw-.js → live-edit-x4eHrcJh.js} +1 -1
- package/lib/browser/{repeated-block-XxWoPtha.cjs → repeated-block-ZGXPYgA8.cjs} +1 -1
- package/lib/browser/{repeated-block-9RiEvqga.js → repeated-block-uVi8A50N.js} +2 -2
- package/lib/browser/scripts/init-editing.d.ts +2 -0
- package/lib/browser/{style-wrapper-_KapIYCB.cjs → style-wrapper-C_c9B5_Y.cjs} +1 -1
- package/lib/browser/{style-wrapper--RSHsBTz.js → style-wrapper-usFESjt5.js} +1 -1
- package/lib/edge/{awaiter-OrQGcr3m.js → awaiter-RSfMls5f.js} +1 -1
- package/lib/edge/{awaiter-v2bPTW8r.cjs → awaiter-zow2zgzw.cjs} +1 -1
- package/lib/{node/block-wrapper-9Cx64vVu.cjs → edge/block-wrapper-4qKpWsP8.cjs} +1 -1
- package/lib/edge/{block-wrapper-ZzFH9Ulb.js → block-wrapper-GT2d4luN.js} +3 -3
- package/lib/edge/{component-ref-6FeHZp7H.js → component-ref-1iPK0xOE.js} +4 -4
- package/lib/edge/{component-ref-R3PgJrYU.cjs → component-ref-WdOIbmOU.cjs} +1 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -0
- package/lib/edge/components/content/content.vue.d.ts +3 -0
- package/lib/edge/components/content-variants/content-variants.types.d.ts +8 -0
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/get-content/types.d.ts +27 -0
- package/lib/edge/{get-block-properties-nY3-hKH0.cjs → get-block-properties-2E03ld67.cjs} +1 -1
- package/lib/edge/{get-block-properties-yRp1-2RV.js → get-block-properties-bMVCvUX0.js} +1 -1
- package/lib/edge/{index-ptOklu9Y.js → index-Bgm0yCrN.js} +1229 -1219
- package/lib/edge/index-LWGIJNVx.cjs +368 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/live-edit-LIJBIu6y.cjs → edge/live-edit-oLYhcuYs.cjs} +1 -1
- package/lib/edge/{live-edit-B5uw3o8F.js → live-edit-tegdYGJO.js} +1 -1
- package/lib/edge/{repeated-block-2_Qz4lsj.cjs → repeated-block--MhEsXmR.cjs} +1 -1
- package/lib/edge/{repeated-block-uNrMFIKx.js → repeated-block-yZJM5I60.js} +2 -2
- package/lib/edge/scripts/init-editing.d.ts +2 -0
- package/lib/edge/{style-wrapper-Zga-Wtqn.cjs → style-wrapper-8JiLG-FF.cjs} +1 -1
- package/lib/edge/{style-wrapper-vpmAkV03.js → style-wrapper-i8R7NpdY.js} +1 -1
- package/lib/node/{awaiter-bswJZJnI.cjs → awaiter-Vwjft2v-.cjs} +1 -1
- package/lib/node/{awaiter-TiRf4nxt.js → awaiter-o3ynOQKr.js} +1 -1
- package/lib/{edge/block-wrapper-wbI15Y2t.cjs → node/block-wrapper-KX1-Y2Oq.cjs} +1 -1
- package/lib/node/{block-wrapper-itY5eEAP.js → block-wrapper-PUFgSKq_.js} +3 -3
- package/lib/node/{component-ref-9RhufDjP.js → component-ref-HmJKie9z.js} +5 -5
- package/lib/node/{component-ref-2UVw1lsO.cjs → component-ref-o3vjSyAQ.cjs} +1 -1
- package/lib/node/components/content/components/enable-editor.vue.d.ts +3 -0
- package/lib/node/components/content/content.vue.d.ts +3 -0
- package/lib/node/components/content-variants/content-variants.types.d.ts +8 -0
- package/lib/node/components/content-variants/content-variants.vue.d.ts +3 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/get-content/types.d.ts +27 -0
- package/lib/node/{get-block-properties-nLiNlxIX.cjs → get-block-properties-2yGkQVh7.cjs} +1 -1
- package/lib/node/{get-block-properties-TbU7Zqh1.js → get-block-properties-DGfMhs4M.js} +2 -2
- package/lib/node/index-7xT7wMXt.cjs +350 -0
- package/lib/node/{index-sSbqLpd0.js → index-JQgNoVXs.js} +639 -629
- 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-RkqTgGBJ.js → live-edit-hxNZMHld.js} +1 -1
- package/lib/{edge/live-edit-OxTeX9Lr.cjs → node/live-edit-xPik2aUh.cjs} +1 -1
- package/lib/node/{repeated-block-wHkyYKX5.cjs → repeated-block-LHiXlO3e.cjs} +1 -1
- package/lib/node/{repeated-block-XWWc2Vbn.js → repeated-block-PvGSbsHD.js} +2 -2
- package/lib/node/scripts/init-editing.d.ts +2 -0
- package/lib/node/{should-force-browser-runtime-in-node-raAbGE2L.cjs → should-force-browser-runtime-in-node-aeKfQiEQ.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-WtPYGMUG.js → should-force-browser-runtime-in-node-ooRgTwqs.js} +1 -1
- package/lib/node/{style-wrapper-0ycJqVq3.cjs → style-wrapper-3l8xaVr4.cjs} +1 -1
- package/lib/node/{style-wrapper-iWa0ZPUf.js → style-wrapper-U-7exIwN.js} +2 -2
- package/package.json +1 -1
- package/lib/browser/index--piap5VV.cjs +0 -350
- package/lib/edge/index-dGvhih8u.cjs +0 -368
- package/lib/node/index-demcjU9J.cjs +0 -350
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-uDRmkrr4.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.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 { p as a, b as r, m as i, C as o, q as n, F as c, I as g, S as m, n as u, o as l, V as d, E as C, t as p, D as E, G as b, H as B, y as S, i as f, r as h, u as x, v as y, s as A, x as P, A as k, z as v } from "./index-
|
|
2
|
+
import { p as a, b as r, m as i, C as o, q as n, F as c, I as g, S as m, n as u, o as l, V as d, E as C, t as p, D as E, G as b, H as B, y as S, i as f, r as h, u as x, v as y, s as A, x as P, A as k, z as v } from "./index-7bXAC1Q8.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-uDRmkrr4.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-7bXAC1Q8.js";
|
|
5
5
|
const l = o({
|
|
6
6
|
name: "live-edit",
|
|
7
7
|
props: ["id", "attributes", "Wrapper"],
|
|
@@ -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-uDRmkrr4.cjs"),r=()=>Promise.resolve().then(()=>require("./index-uDRmkrr4.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,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-7bXAC1Q8.js";
|
|
4
|
+
const a = () => import("./index-7bXAC1Q8.js").then((e) => e.K).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,7 +1,9 @@
|
|
|
1
|
+
import type { EnrichOptions } from '../functions/get-content/types';
|
|
1
2
|
export declare const setupBrowserForEditing: (options: {
|
|
2
3
|
modelName: string;
|
|
3
4
|
apiKey: string;
|
|
4
5
|
enrich?: boolean;
|
|
6
|
+
enrichOptions?: EnrichOptions;
|
|
5
7
|
includeRefs?: boolean;
|
|
6
8
|
locale?: string;
|
|
7
9
|
trustedHosts?: string[];
|
|
@@ -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-uDRmkrr4.cjs"),$=require("./find-block-FHyxDYzT.cjs"),T=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;const e=this.block,t=e.responsiveStyles,n=this.context.content,l=s.getSizesForBreakpoints(((S=n==null?void 0:n.meta)==null?void 0:S.breakpoints)||{}),p=!!((B=(h=n==null?void 0:n.meta)==null?void 0:h.breakpoints)!=null&&B.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 v=a?s.createCssClass({className:m,styles:a}):"",b=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)}):"",k=r&&p?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=((f=(C=i.steps)==null?void 0:C[1])==null?void 0:f.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[v,b,x,k,y].join(" ")}}});function _(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 E=s._export_sfc(T,[["render",_]]),P=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,u;const e=(y=this.processedBlock)==null?void 0:y.responsiveStyles,t=this.contextProvider.content,n=s.getSizesForBreakpoints(((S=t==null?void 0:t.meta)==null?void 0:S.breakpoints)||{}),l=!!((B=(h=t==null?void 0:t.meta)==null?void 0:h.breakpoints)!=null&&B.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=(C=this.processedBlock)==null?void 0:C.id;if(!r)return"";const m=p?s.createCssClass({className:r,styles:p}):"",v=a?s.createCssClass({className:r,styles:a,mediaQuery:s.getMaxWidthQueryForSize("medium",n)}):"",b=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)}):"",k=this.processedBlock.animations&&this.processedBlock.animations.find(g=>g.trigger==="hover");let i="";if(k){const g=((u=(f=k.steps)==null?void 0:f[1])==null?void 0:u.styles)||{};i=s.createCssClass({className:`${r}:hover`,styles:{...g,transition:`all ${k.duration}s ${s.camelToKebabCase(k.easing)}`,transitionDelay:k.delay?`${k.delay}s`:"0s"}})||""}return[m,v,b,x,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(P,[["render",Q]]),I=o.defineComponent({name:"style-wrapper",components:{BlockStyles:E,LiveEditBlockStyles:A},props:["block","context"],data(){return{isClientEditing:!1,isHydrated:!1,TARGET:s.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 w=s._export_sfc(I,[["render",z]]);exports.default=w;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as E, resolveComponent as x, openBlock as y, createBlock as $, createCommentVNode as Q, createElementBlock as z, Fragment as G } from "vue";
|
|
3
|
-
import { c as A, T as w, d as C, f as N, h as l, j as u, k as j, _ as I, l as H, b as R } from "./index-
|
|
3
|
+
import { c as A, T as w, d as C, f as N, h as l, j as u, k as j, _ as I, l as H, b as R } from "./index-7bXAC1Q8.js";
|
|
4
4
|
import { f as U } from "./find-block-4FksmtpZ.js";
|
|
5
5
|
const W = E({
|
|
6
6
|
name: "block-styles",
|
|
@@ -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-LWGIJNVx.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-2E03ld67.cjs"),a=require("./index-LWGIJNVx.cjs"),i=()=>Promise.resolve().then(()=>require("./index-LWGIJNVx.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-bMVCvUX0.js";
|
|
3
|
+
import { _ as k } from "./index-Bgm0yCrN.js";
|
|
4
|
+
const u = () => import("./index-Bgm0yCrN.js").then((t) => t.J).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,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-Bgm0yCrN.js";
|
|
3
|
+
import { a as v, g as S } from "./get-block-properties-bMVCvUX0.js";
|
|
4
|
+
const T = () => import("./awaiter-RSfMls5f.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-tegdYGJO.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 +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-LWGIJNVx.cjs"),l=require("./get-block-properties-2E03ld67.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-zow2zgzw.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-oLYhcuYs.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;
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
13
13
|
trustedHosts?: any;
|
|
14
14
|
showContent?: any;
|
|
15
15
|
enrich?: any;
|
|
16
|
+
enrichOptions?: any;
|
|
16
17
|
contentWrapper?: any;
|
|
17
18
|
contentWrapperProps?: any;
|
|
18
19
|
isNestedRender?: any;
|
|
@@ -88,6 +89,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
88
89
|
trustedHosts?: any;
|
|
89
90
|
showContent?: any;
|
|
90
91
|
enrich?: any;
|
|
92
|
+
enrichOptions?: any;
|
|
91
93
|
contentWrapper?: any;
|
|
92
94
|
contentWrapperProps?: any;
|
|
93
95
|
isNestedRender?: any;
|
|
@@ -104,6 +106,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
104
106
|
readonly trustedHosts?: any;
|
|
105
107
|
readonly showContent?: any;
|
|
106
108
|
readonly enrich?: any;
|
|
109
|
+
readonly enrichOptions?: any;
|
|
107
110
|
readonly contentWrapper?: any;
|
|
108
111
|
readonly contentWrapperProps?: any;
|
|
109
112
|
readonly isNestedRender?: any;
|
|
@@ -18,6 +18,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
18
18
|
customComponents?: any;
|
|
19
19
|
linkComponent?: any;
|
|
20
20
|
enrich?: any;
|
|
21
|
+
enrichOptions?: any;
|
|
21
22
|
contentWrapper?: any;
|
|
22
23
|
contentWrapperProps?: any;
|
|
23
24
|
blocksWrapper?: any;
|
|
@@ -70,6 +71,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
70
71
|
customComponents?: any;
|
|
71
72
|
linkComponent?: any;
|
|
72
73
|
enrich?: any;
|
|
74
|
+
enrichOptions?: any;
|
|
73
75
|
contentWrapper?: any;
|
|
74
76
|
contentWrapperProps?: any;
|
|
75
77
|
blocksWrapper?: any;
|
|
@@ -92,6 +94,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
92
94
|
readonly customComponents?: any;
|
|
93
95
|
readonly linkComponent?: any;
|
|
94
96
|
readonly enrich?: any;
|
|
97
|
+
readonly enrichOptions?: any;
|
|
95
98
|
readonly contentWrapper?: any;
|
|
96
99
|
readonly contentWrapperProps?: any;
|
|
97
100
|
readonly blocksWrapper?: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BuilderRenderContext, RegisteredComponent } from '../../context/types';
|
|
2
|
+
import type { EnrichOptions } from '../../functions/get-content/types';
|
|
2
3
|
import type { ApiVersion } from '../../types/api-version';
|
|
3
4
|
import type { BuilderContent } from '../../types/builder-content';
|
|
4
5
|
import type { Nullable } from '../../types/typescript';
|
|
@@ -53,6 +54,13 @@ export interface ContentVariantsPrps extends ExtraFrameworkProps {
|
|
|
53
54
|
* Enriching will Include multilevel references in the response. Defaults to `false`.
|
|
54
55
|
*/
|
|
55
56
|
enrich?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The `enrichOptions` used to fetch this content (optional).
|
|
59
|
+
*
|
|
60
|
+
* Passing the same value you passed to `fetchOneEntry` lets the Visual Editor
|
|
61
|
+
* resolve references in its preview the way your site fetches them.
|
|
62
|
+
*/
|
|
63
|
+
enrichOptions?: EnrichOptions;
|
|
56
64
|
/**
|
|
57
65
|
* The element that wraps your content. Defaults to `<div>` ('ScrollView' in React Native).
|
|
58
66
|
*/
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
13
13
|
customComponents?: any;
|
|
14
14
|
linkComponent?: any;
|
|
15
15
|
enrich?: any;
|
|
16
|
+
enrichOptions?: any;
|
|
16
17
|
contentWrapper?: any;
|
|
17
18
|
contentWrapperProps?: any;
|
|
18
19
|
blocksWrapper?: any;
|
|
@@ -68,6 +69,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
68
69
|
customComponents?: any;
|
|
69
70
|
linkComponent?: any;
|
|
70
71
|
enrich?: any;
|
|
72
|
+
enrichOptions?: any;
|
|
71
73
|
contentWrapper?: any;
|
|
72
74
|
contentWrapperProps?: any;
|
|
73
75
|
blocksWrapper?: any;
|
|
@@ -88,6 +90,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
88
90
|
readonly customComponents?: any;
|
|
89
91
|
readonly linkComponent?: any;
|
|
90
92
|
readonly enrich?: any;
|
|
93
|
+
readonly enrichOptions?: any;
|
|
91
94
|
readonly contentWrapper?: any;
|
|
92
95
|
readonly contentWrapperProps?: any;
|
|
93
96
|
readonly blocksWrapper?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.2.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.11";
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options to configure how `enrich` resolves references.
|
|
3
|
+
*
|
|
4
|
+
* @see {@link https://www.builder.io/c/docs/content-api#code-enrich-options-code}
|
|
5
|
+
*/
|
|
6
|
+
export interface EnrichOptions {
|
|
7
|
+
/**
|
|
8
|
+
* How many levels of nested references to resolve. Higher levels multiply
|
|
9
|
+
* response size, so prefer the lowest level your content needs.
|
|
10
|
+
*/
|
|
11
|
+
enrichLevel?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Per-model field filters applied to resolved references.
|
|
14
|
+
*/
|
|
15
|
+
model?: {
|
|
16
|
+
[modelName: string]: {
|
|
17
|
+
/** Comma-separated list of fields to include */
|
|
18
|
+
fields?: string;
|
|
19
|
+
/** Comma-separated list of fields to omit */
|
|
20
|
+
omit?: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
1
24
|
export interface GetContentOptions {
|
|
2
25
|
/** The model to get content for (required) */
|
|
3
26
|
model: string;
|
|
@@ -58,6 +81,10 @@ export interface GetContentOptions {
|
|
|
58
81
|
* Include multilevel references in the response.
|
|
59
82
|
*/
|
|
60
83
|
enrich?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Constrains how `enrich` resolves references. Only honored when `enrich` is `true`.
|
|
86
|
+
*/
|
|
87
|
+
enrichOptions?: EnrichOptions;
|
|
61
88
|
/**
|
|
62
89
|
* If provided, the API will auto-resolve localized objects to the value of this `locale` key.
|
|
63
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./index-
|
|
1
|
+
"use strict";const a=require("./index-LWGIJNVx.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,trackingContext:t.trackingContext});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;
|