@builder.io/sdk-vue 0.2.0 → 0.2.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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.97de2652.js → block-styles.4667431d.js} +14 -11
- package/packages/_vue2/dist/block-styles.7c2a87df.cjs +1 -0
- package/packages/_vue2/dist/{css.4d4e03cf.js → css.468435de.js} +1 -1
- package/packages/{_vue3/dist/css.785b2126.cjs → _vue2/dist/css.dce6e4eb.cjs} +2 -2
- package/packages/_vue2/dist/index.78ba6586.cjs +29 -0
- package/packages/_vue2/dist/{index.346656f6.js → index.eb91dc82.js} +340 -325
- package/packages/_vue2/dist/render-block.67e4dd65.cjs +3 -0
- package/packages/_vue2/dist/{render-block.1c1312ce.js → render-block.6f9a607a.js} +58 -63
- package/packages/_vue2/dist/{render-component.de99974e.js → render-component.10d6c8d2.js} +3 -3
- package/packages/_vue2/dist/{render-component.4ed8b740.cjs → render-component.3578089b.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.3797e28a.cjs → render-inlined-styles.56373d13.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.1c2c5bf9.js → render-inlined-styles.942eb38d.js} +4 -4
- package/packages/_vue2/dist/{render-repeated-block.dc48228e.cjs → render-repeated-block.18d7fc6e.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.d7d1e175.js → render-repeated-block.1bb5c2fb.js} +2 -2
- package/packages/_vue2/dist/{render-styles.a61feef4.js → render-styles.0d1f8872.js} +2 -2
- package/packages/_vue2/dist/{render-styles.23d118f3.cjs → render-styles.de7287b6.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +6 -8
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +6 -8
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +1 -0
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +4 -6
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +4 -6
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +4 -6
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +5 -7
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +6 -8
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue2/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue2/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue2/dist/src/types/components.d.ts +1 -72
- package/packages/_vue2/dist/src/types/input.d.ts +121 -0
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/block-styles.09955b0c.cjs +1 -0
- package/packages/_vue3/dist/{block-styles.40e4c9b5.js → block-styles.6bd36a5a.js} +14 -11
- package/packages/{_vue2/dist/css.75f390cc.cjs → _vue3/dist/css.3241302b.cjs} +2 -2
- package/packages/_vue3/dist/{css.77c76358.js → css.81a21c5a.js} +1 -1
- package/packages/_vue3/dist/{index.4931a4d1.js → index.45ab85e5.js} +506 -491
- package/packages/_vue3/dist/index.cca81180.cjs +29 -0
- package/packages/_vue3/dist/render-block.33cc5768.cjs +3 -0
- package/packages/_vue3/dist/{render-block.6fa26228.js → render-block.ec4c1913.js} +96 -101
- package/packages/_vue3/dist/{render-component.44d63ad3.js → render-component.3bd8dc76.js} +3 -3
- package/packages/_vue3/dist/{render-component.2721bc0c.cjs → render-component.c0d5e797.cjs} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.dccd4787.js → render-inlined-styles.952d2fff.js} +4 -4
- package/packages/_vue3/dist/{render-inlined-styles.b1441d2d.cjs → render-inlined-styles.b55b6667.cjs} +1 -1
- package/packages/_vue3/dist/{render-repeated-block.e5d7da62.js → render-repeated-block.263f0cec.js} +2 -2
- package/packages/_vue3/dist/{render-repeated-block.1360a469.cjs → render-repeated-block.c3c9e926.cjs} +1 -1
- package/packages/_vue3/dist/{render-styles.850fddb0.js → render-styles.cf6faa29.js} +2 -2
- package/packages/_vue3/dist/{render-styles.e1959d28.cjs → render-styles.d1ac3a18.cjs} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +2 -11
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +1 -0
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/functions/get-content/index.d.ts +1 -1
- package/packages/_vue3/dist/src/helpers/logger.d.ts +5 -0
- package/packages/_vue3/dist/src/types/builder-content.d.ts +1 -1
- package/packages/_vue3/dist/src/types/components.d.ts +1 -72
- package/packages/_vue3/dist/src/types/input.d.ts +121 -0
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.ef03a37e.cjs +0 -1
- package/packages/_vue2/dist/index.c72abf65.cjs +0 -29
- package/packages/_vue2/dist/render-block.2880ad6e.cjs +0 -3
- package/packages/_vue2/dist/src/functions/get-block-tag.d.ts +0 -3
- package/packages/_vue3/dist/block-styles.32155e57.cjs +0 -1
- package/packages/_vue3/dist/index.9fb3a7e0.cjs +0 -29
- package/packages/_vue3/dist/render-block.cfb6d51a.cjs +0 -3
- package/packages/_vue3/dist/src/functions/get-block-tag.d.ts +0 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";const s=require("vue"),be={name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(n={},t){const o="v-on:";return Object.keys(n).filter(r=>{if(!n[r])return!1;const i=r.startsWith(o);return t?i:!i}).reduce((r,i)=>({...r,[i.replace(o,"")]:n[i]}),{})},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};const p=(e,n)=>{const t=e.__vccOpts||e;for(const[o,r]of n)t[o]=r;return t},ye=["href","target"];function ke(e,n,t,o,r,i){return t.link?(s.openBlock(),s.createElementBlock("a",s.mergeProps({key:0,role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0},i.filterAttrs(t.attributes,!1),s.toHandlers(i.filterAttrs(t.attributes,!0),!0)),s.toDisplayString(t.text),17,ye)):(s.openBlock(),s.createElementBlock("button",s.mergeProps({key:1,class:i._classStringToObject(t.attributes.class+" button-1yj9n7yt24z")},i.filterAttrs(t.attributes,!1),s.toHandlers(i.filterAttrs(t.attributes,!0),!0)),s.toDisplayString(t.text),17))}const z=p(be,[["render",ke],["__scopeId","data-v-fa5dea7e"]]),C=e=>JSON.parse(JSON.stringify(e)),$={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ve=(e,n=$)=>`@media (max-width: ${n[e].max}px)`,H=({small:e,medium:n})=>{const t=C($);if(!e||!n)return t;const o=Math.floor(e/2);t.small={max:e,min:o,default:o+1};const r=t.small.max+1;t.medium={max:n,min:r,default:r+1};const i=t.medium.max+1;return t.large={max:2e3,min:i,default:i+1},t},v="vue3",xe=Symbol(),S={Builder:{content:null,context:{},state:{},setState(){},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:xe},Se=()=>Promise.resolve().then(()=>J).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),Ce=()=>Promise.resolve().then(()=>require("./render-inlined-styles.b55b6667.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",e),e}),_e={name:"builder-columns",components:{RenderInlinedStyles:s.defineAsyncComponent(Ce),RenderBlocks:s.defineAsyncComponent(Se)},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:v}},inject:{builderContext:S.key},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
|
|
2
|
+
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
3
|
+
.${this.builderBlock.id}-breakpoints {
|
|
4
|
+
flex-direction: var(--flex-dir-tablet);
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
9
|
+
width: var(--column-width-tablet) !important;
|
|
10
|
+
margin-left: var(--column-margin-left-tablet) !important;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
15
|
+
.${this.builderBlock.id}-breakpoints {
|
|
16
|
+
flex-direction: var(--flex-dir);
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
21
|
+
width: var(--column-width-mobile) !important;
|
|
22
|
+
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
`}},methods:{getWidth(e){var n;return((n=this.cols[e])==null?void 0:n.width)||100/this.cols.length},getColumnCssWidth(e){const n=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${n}px)`},getTabletStyle({stackedStyle:e,desktopStyle:n}){return this.stackAt==="tablet"?e:n},getMobileStyle({stackedStyle:e,desktopStyle:n}){return this.stackAt==="never"?n:e},columnCssVars(e){e===0||this.gutterSize;const n=this.getColumnCssWidth(e),t=`${this.gutterSize}px`,o="100%",r=0;return{width:n,"margin-left":t,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:r,desktopStyle:t}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:r,desktopStyle:t})}},getWidthForBreakpointSize(e){var t,o;return H(((o=(t=this.builderContext.content)==null?void 0:t.meta)==null?void 0:o.breakpoints)||{})[e].max},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};function we(e,n,t,o,r,i){const a=s.resolveComponent("render-inlined-styles"),l=s.resolveComponent("render-blocks");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(i._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-2btisl9m7v3`)),style:s.normalizeStyle(i.columnsCssVars),dataSet:{"builder-block-name":"builder-columns"}},[r.TARGET!=="reactNative"?(s.openBlock(),s.createBlock(a,{key:0,styles:i.columnsStyles},null,8,["styles"])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.columns,(c,d)=>(s.openBlock(),s.createElementBlock("div",{key:d,class:"builder-column div-2btisl9m7v3-2",style:s.normalizeStyle(i.columnCssVars(d)),dataSet:{"builder-block-name":"builder-column"}},[s.createVNode(l,{blocks:c.blocks,path:`component.options.columns.${d}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}},null,8,["blocks","path","parent"])],4))),128))],6)}const K=p(_e,[["render",we],["__scopeId","data-v-4459bc28"]]),Ie={name:"builder-fragment-component",props:[]};function Te(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("span",null,[s.renderSlot(e.$slots,"default")])}const D=p(Ie,[["render",Te]]);function j(e){return e.replace(/http(s)?:/,"")}function Re(e="",n,t){const o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+encodeURIComponent(t)+"$2"):e+r+n+"="+encodeURIComponent(t)}function Ee(e,n){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!n)return e;if(n==="master")return j(e);const t=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(t){const o=e.split(t[0]),r=t[3],i=n.match("x")?n:`${n}x`;return j(`${o[0]}_${i}${r}`)}return null}function w(e){if(!e)return e;const n=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let t=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(t=`${t} ${o}w`),n.filter(r=>r!==o).map(r=>`${Re(e,"width",r)} ${r}w`).concat([t]).join(", ")}return e.match(/cdn\.shopify\.com/)?n.map(t=>[Ee(e,`${t}x${t}`),t]).filter(([t])=>!!t).map(([t,o])=>`${t} ${o}w`).concat([e]).join(", "):e}const Be={name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var t;const n=this.image||this.src;if(!n||!(n.match(/builder\.io/)||n.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((t=this.image)==null?void 0:t.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),w(n)}else if(this.image&&!this.srcset)return w(n);return w(n)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};const Ae=["srcset"],Pe=["alt","role","src","srcset","sizes"],Ve={key:2,class:"div-20vehov4ay6-2"};function je(e,n,t,o,r,i){var a,l,c,d;return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("picture",null,[i.webpSrcSet?(s.openBlock(),s.createElementBlock("source",{key:0,type:"image/webp",srcset:i.webpSrcSet},null,8,Ae)):s.createCommentVNode("",!0),s.createElementVNode("img",{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,style:s.normalizeStyle({objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...i.aspectRatioCss}),class:s.normalizeClass(i._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-20vehov4ay6")),src:t.image,srcset:i.srcSetToUse,sizes:t.sizes},null,14,Pe)]),t.aspectRatio&&!(((l=(a=t.builderBlock)==null?void 0:a.children)==null?void 0:l.length)&&t.fitContent)?(s.openBlock(),s.createElementBlock("div",{key:0,class:"builder-image-sizer div-20vehov4ay6",style:s.normalizeStyle({paddingTop:t.aspectRatio*100+"%"})},null,4)):s.createCommentVNode("",!0),((d=(c=t.builderBlock)==null?void 0:c.children)==null?void 0:d.length)&&t.fitContent?s.renderSlot(e.$slots,"default",{key:1},void 0,!0):s.createCommentVNode("",!0),!t.fitContent&&e.children?(s.openBlock(),s.createElementBlock("div",Ve,[s.renderSlot(e.$slots,"default",{},void 0,!0)])):s.createCommentVNode("",!0)],64)}const q=p(Be,[["render",je],["__scopeId","data-v-b99a9c06"]]);function m(){return typeof window<"u"&&typeof document<"u"}function Fe(){return m()&&window.self!==window.top}function b(){return Fe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Oe=()=>Promise.resolve().then(()=>require("./block-styles.09955b0c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Ue=()=>Promise.resolve().then(()=>require("./render-block.33cc5768.cjs")).then(e=>e.renderBlock).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Ne={name:"render-blocks",components:{RenderBlock:s.defineAsyncComponent(Ue),BlockStyles:s.defineAsyncComponent(Oe)},props:["blocks","parent","path","styleProp"],inject:{builderContext:S.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,n;b()&&!((e=this.blocks)!=null&&e.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,n;b()&&!((e=this.blocks)!=null&&e.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}};const We=["builder-path","builder-parent-id","dataSet"];function Me(e,n,t,o,r,i){const a=s.resolveComponent("render-block"),l=s.resolveComponent("block-styles");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(i._classStringToObject(i.className+" div-7fq9d0i380")),"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:i.className},style:s.normalizeStyle(t.styleProp),onClick:n[0]||(n[0]=c=>i.onClick()),onMouseenter:n[1]||(n[1]=c=>i.onMouseEnter())},[t.blocks?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.blocks,(c,d)=>(s.openBlock(),s.createBlock(a,{key:"render-block-"+c.id,block:c,context:i.builderContext},null,8,["block","context"]))),128)):s.createCommentVNode("",!0),t.blocks?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(t.blocks,(c,d)=>(s.openBlock(),s.createBlock(l,{key:"block-style-"+c.id,block:c,context:i.builderContext},null,8,["block","context"]))),128)):s.createCommentVNode("",!0)],46,We)}const G=p(Ne,[["render",Me],["__scopeId","data-v-81bad369"]]),J=Object.freeze(Object.defineProperty({__proto__:null,default:G},Symbol.toStringTag,{value:"Module"})),Le={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},_=e=>{const n=e.toString().trim();return`return (${!n.startsWith("function")&&!n.startsWith("(")?"function ":""}${n}).apply(this, arguments)`},ze={name:"Columns",inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:_(e=>{function n(){t.forEach(o=>{o.delete("width")})}const t=e.get("columns");Array.isArray(t)&&!!t.find(r=>r.get("width"))&&(!!t.find(i=>!i.get("width"))||t.reduce((l,c)=>l+c.get("width"),0)!==100)&&n()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},$e={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},He={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:_(e=>{e.delete("srcset"),e.delete("noWebp");function t(a,l=6e4){return new Promise((c,d)=>{const u=document.createElement("img");let f=!1;u.onload=()=>{f=!0,c(u)},u.addEventListener("error",h=>{console.warn("Image load failed",h.error),d(h.error)}),u.src=a,setTimeout(()=>{f||d(new Error("Image load timed out"))},l)})}function o(a){return Math.round(a*1e3)/1e3}const r=e.get("image"),i=e.get("aspectRatio");if(fetch(r).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!i||i===.7041))return t(r).then(a=>{const l=e.get("aspectRatio");e.get("image")===r&&(!l||l===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Ke={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},De={name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(n={},t){const o="v-on:";return Object.keys(n).filter(r=>{if(!n[r])return!1;const i=r.startsWith(o);return t?i:!i}).reduce((r,i)=>({...r,[i.replace(o,"")]:n[i]}),{})}}};function qe(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("section",s.mergeProps({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},i.filterAttrs(t.attributes,!1),s.toHandlers(i.filterAttrs(t.attributes,!0),!0)),[s.renderSlot(e.$slots,"default")],16)}const X=p(De,[["render",qe]]),Ge={name:"Symbol",noWrap:!0,static:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},I="[Builder.io]: ",k={log:(...e)=>console.log(I,...e),error:(...e)=>console.error(I,...e),warn:(...e)=>console.warn(I,...e)};function Je(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Xe(){const e=Je().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Y=Xe(),y=e=>e!=null,Ye=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const n=e.split(".");return n.length>2?n.slice(1).join("."):e},Q=async({name:e,canTrack:n})=>{var t;try{return n?(t=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:t.split("=")[1]:void 0}catch(o){console.debug("[COOKIE] GET error: ",o);return}},Qe=e=>e.map(([n,t])=>t?`${n}=${t}`:n).filter(y).join("; "),Ze=[["secure",""],["SameSite","None"]],et=({name:e,value:n,expires:t})=>{const r=(m()?location.protocol==="https:":!0)?Ze:[[]],i=t?[["expires",t.toUTCString()]]:[[]],a=[[e,n],...i,["path","/"],["domain",Ye(window.location.hostname)],...r];return Qe(a)},Z=async({name:e,value:n,expires:t,canTrack:o})=>{try{if(!o)return;const r=et({name:e,value:n,expires:t});document.cookie=r}catch(r){console.warn("[COOKIE] SET error: ",r)}},tt="builderio.variations",ee=e=>`${tt}.${e}`,nt=({contentId:e,canTrack:n})=>Q({name:ee(e),canTrack:n}),ot=({contentId:e,canTrack:n,value:t})=>Z({name:ee(e),value:t,canTrack:n}),rt=e=>y(e.id)&&y(e.variations)&&Object.keys(e.variations).length>0,it=({id:e,variations:n})=>{var r;let t=0;const o=Math.random();for(const i in n){const a=(r=n[i])==null?void 0:r.testRatio;if(t+=a,o<t)return i}return e},F=({item:e,testGroupId:n})=>{const t=e.variations[n];return n===e.id||!t?{testVariationId:e.id,testVariationName:"Default"}:{data:t.data,testVariationId:t.id,testVariationName:t.name||(t.id===e.id?"Default":"")}},st=async({item:e,canTrack:n})=>{const t=await nt({canTrack:n,contentId:e.id}),o=t?F({item:e,testGroupId:t}):void 0;if(o)return o;{const r=it({variations:e.variations,id:e.id});return ot({contentId:e.id,value:r,canTrack:n}).catch(i=>{console.error("could not store A/B test variation: ",i)}),F({item:e,testGroupId:r})}},at=async({item:e,canTrack:n})=>{if(!rt(e))return;const t=await st({item:e,canTrack:n});Object.assign(e,t)};function T(e,n=null,t="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[n,r].filter(Boolean).join(t);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...T(i,a,t)}:{...o,[a]:i}},{})}const O="builder.",ct="options.",te=e=>{const n={};return e.forEach((t,o)=>{n[o]=t}),n},ne=e=>{if(!e)return{};const n=B(e),t={};return Object.keys(n).forEach(o=>{if(o.startsWith(O)){const r=o.replace(O,"").replace(ct,"");t[r]=n[o]}}),t},oe=()=>{if(!m())return{};const e=new URLSearchParams(window.location.search);return ne(e)},B=e=>e instanceof URLSearchParams?te(e):e,lt="v3",dt=e=>{const{limit:n=30,userAttributes:t,query:o,noTraverse:r=!1,model:i,apiKey:a,includeRefs:l=!0,locale:c,apiVersion:d=lt}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(d))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${d}'`);const u=new URL(`https://cdn.builder.io/api/${d}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${r}&includeRefs=${l}${c?`&locale=${c}`:""}`),f={...oe(),...B(e.options||{})},h=T(f);for(const g in h)u.searchParams.set(g,String(h[g]));if(t&&u.searchParams.set("userAttributes",JSON.stringify(t)),o){const g=T({query:o});for(const x in g)u.searchParams.set(x,JSON.stringify(g[x]))}return u};async function A(e){const n=await re({...e,limit:1});return n&&"results"in n&&(n==null?void 0:n.results[0])||null}async function re(e){try{const n=dt(e),o=await(await Y(n.href)).json();if("status"in o&&!("results"in o))return k.error("Error fetching data. ",o,e),o;const r=e.canTrack!==!1;try{if(r&&Array.isArray(o.results))for(const i of o.results)await at({item:i,canTrack:r})}catch(i){k.error("Could not setup A/B testing. ",i)}return o}catch(n){return k.error("Error fetching data. ",n),null}}const ut=()=>Promise.resolve().then(()=>yn).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",e),e}),mt={name:"builder-symbol",components:{RenderContent:s.defineAsyncComponent(ut)},props:["attributes","symbol","dynamic"],data(){var e,n,t;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((n=this.symbol)==null?void 0:n.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(t=this.symbol)==null?void 0:t.content}},inject:{builderContext:S.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var e,n;!this.contentToUse&&((e=this.symbol)==null?void 0:e.model)&&((n=this.builderContext)==null?void 0:n.apiKey)&&A({model:this.symbol.model,apiKey:this.builderContext.apiKey,apiVersion:this.builderContext.apiVersion,query:{id:this.symbol.entry}}).then(t=>{t&&(this.contentToUse=t)}).catch(t=>{k.error("Could not fetch symbol content: ",t)})},filterAttrs:function(n={},t){const o="v-on:";return Object.keys(n).filter(r=>{if(!n[r])return!1;const i=r.startsWith(o);return t?i:!i}).reduce((r,i)=>({...r,[i.replace(o,"")]:n[i]}),{})},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}},pt=["dataSet"];function ht(e,n,t,o,r,i){var l,c,d,u;const a=s.resolveComponent("render-content");return s.openBlock(),s.createElementBlock("div",s.mergeProps({dataSet:{class:r.className},class:i._classStringToObject(r.className)},i.filterAttrs(t.attributes,!1),s.toHandlers(i.filterAttrs(t.attributes,!0),!0)),[s.createVNode(a,{apiVersion:i.builderContext.apiVersion,apiKey:i.builderContext.apiKey,context:i.builderContext.context,customComponents:Object.values(i.builderContext.registeredComponents),data:{...(l=t.symbol)==null?void 0:l.data,...i.builderContext.state,...(d=(c=r.contentToUse)==null?void 0:c.data)==null?void 0:d.state},model:(u=t.symbol)==null?void 0:u.model,content:r.contentToUse},null,8,["apiVersion","apiKey","context","customComponents","data","model","content"])],16,pt)}const ie=p(mt,[["render",ht]]),ft={name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},gt={name:"builder-text",props:["text"]},bt=["innerHTML"];function yt(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("span",{class:"builder-text",innerHTML:t.text,style:{outline:"none"}},null,8,bt)}const se=p(gt,[["render",yt]]),kt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},vt={name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}},xt=["src","poster"];function St(e,n,t,o,r,i){var a;return s.openBlock(),s.createElementBlock("video",s.mergeProps({style:{width:"100%",height:"100%",...(a=t.attributes)==null?void 0:a.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},src:t.video||"no-src",poster:t.posterImage},i.spreadProps),null,16,xt)}const ae=p(vt,[["render",St]]),Ct={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:_(e=>{const n=e.get("url");if(n)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${n}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===n&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},_t=["text/javascript","application/javascript","application/ecmascript"],wt=e=>_t.includes(e.type),It={name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src&&!this.scriptsInserted.includes(t.src)){this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if(wt(t)&&!this.scriptsRun.includes(t.innerText))try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}},Tt=["innerHTML"];function Rt(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("div",{class:"builder-embed",ref:"elem",innerHTML:t.content},null,8,Tt)}const Et=p(It,[["render",Rt]]),Bt={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:b}},methods:{filterAttrs:function(n={},t){const o="v-on:";return Object.keys(n).filter(r=>{if(!n[r])return!1;const i=r.startsWith(o);return t?i:!i}).reduce((r,i)=>({...r,[i.replace(o,"")]:n[i]}),{})}}},At=["alt","src"];function Pt(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("img",s.mergeProps({style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center"},key:r.isEditing()&&t.imgSrc||"default-key",alt:t.altText,src:t.imgSrc||t.image},i.filterAttrs(t.attributes,!1),s.toHandlers(i.filterAttrs(t.attributes,!0),!0)),null,16,At)}const Vt=p(Bt,[["render",Pt]]),jt={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg"],required:!0}],noWrap:!0,static:!0},Ft={name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let n=0;n<e.length;n++){const t=e[n];if(t.src){if(this.scriptsInserted.includes(t.src))continue;this.scriptsInserted.push(t.src);const o=document.createElement("script");o.async=!0,o.src=t.src,document.head.appendChild(o)}else if(!t.type||["text/javascript","application/javascript","application/ecmascript"].includes(t.type)){if(this.scriptsRun.includes(t.innerText))continue;try{this.scriptsRun.push(t.innerText),new Function(t.innerText)()}catch(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(e){const n={};if(typeof e!="string")return n;const t=e.trim().split(/\s+/);for(const o of t)n[o]=!0;return n}}},Ot=["innerHTML"];function Ut(e,n,t,o,r,i){return s.openBlock(),s.createElementBlock("div",{ref:"elem",class:s.normalizeClass(i._classStringToObject("builder-custom-code"+(t.replaceNodes?" replace-nodes":""))),innerHTML:t.code},null,10,Ot)}const Nt=p(Ft,[["render",Ut]]),Wt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},Mt=()=>[{component:z,...Le},{component:K,...ze},{component:Nt,...Wt},{component:Et,...Ct},{component:D,...$e},{component:q,...He},{component:Vt,...jt},{component:X,...Ke},{component:ie,...Ge},{component:se,...ft},{component:ae,...kt}];function R({code:e,context:n,state:t,event:o,isExpression:r=!0}){if(e===""){console.warn("Skipping evaluation of empty code block.");return}const i={isEditing:b(),isBrowser:m(),isServer:!m()},l=r&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;try{return new Function("builder","Builder","state","context","event",l)(i,i,t,n,o)}catch(c){console.warn(`Builder custom code error:
|
|
27
|
+
While Evaluating:
|
|
28
|
+
`,l,`
|
|
29
|
+
`,c)}}function ce(){return!m()||b()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const P=[];function Lt(e,n){return P.push({component:e,...n}),console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."),e}const le=({component:e,...n})=>({type:"builder.registerComponent",data:$t(n)}),zt=e=>typeof e=="function"?_(e):C(e),$t=({inputs:e,...n})=>({...C(n),inputs:e==null?void 0:e.map(t=>Object.entries(t).reduce((o,[r,i])=>({...o,[r]:zt(i)}),{}))});function Ht(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const n=Math.random()*16|0;return(e=="x"?n:n&3|8).toString(16)})}function de(){return Ht().replace(/-/g,"")}const ue="builderSessionId",Kt=async({canTrack:e})=>{if(!e)return;const n=await Q({name:ue,canTrack:e});if(y(n))return n;{const t=Dt();return qt({id:t,canTrack:e}),t}},Dt=()=>de(),qt=({id:e,canTrack:n})=>Z({name:ue,value:e,canTrack:n}),me=()=>m()&&typeof localStorage<"u"?localStorage:void 0,Gt=({key:e,canTrack:n})=>{var t;try{return n?(t=me())==null?void 0:t.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},Jt=({key:e,canTrack:n,value:t})=>{var o;try{n&&((o=me())==null||o.setItem(e,t))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},pe="builderVisitorId",Xt=({canTrack:e})=>{if(!e)return;const n=Gt({key:pe,canTrack:e});if(y(n))return n;{const t=Yt();return Qt({id:t,canTrack:e}),t}},Yt=()=>de(),Qt=({id:e,canTrack:n})=>Jt({key:pe,value:e,canTrack:n}),Zt=()=>{if(m()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},en=()=>typeof navigator=="object"&&navigator.userAgent||"",tn=()=>{const e=en(),n={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return n.Android()||n.BlackBerry()||n.iOS()||n.Opera()||n.Windows()||v==="reactNative"}},t=e.match(/Tablet|iPad/i),o=Zt();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:t?"tablet":n.any()?"mobile":"desktop"}},nn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const n=await Kt({canTrack:e}),t=Xt({canTrack:e});return{sessionId:n,visitorId:t}},on=async({type:e,canTrack:n,apiKey:t,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await nn({canTrack:n}),userAttributes:tn(),ownerId:t}});async function E(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!b()&&!!(m()||v==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await on(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(n=>{console.error("Failed to track: ",n)})}const rn=e=>E({...e,canTrack:!0}),U={};function he(e,n){let t=U[e];if(t||(t=U[e]=[]),t.push(n),m()){const o={type:"builder.register",data:{type:e,info:n}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const sn=()=>{he("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let N=!1;const an=(e={})=>{var n,t;N||(N=!0,m()&&((n=window.parent)==null||n.postMessage({type:"builder.sdkInfo",data:{target:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(t=window.parent)==null||t.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var r,i;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const a=o.data.text,l=o.data.arguments||[],c=o.data.id,d=new Function(a);let u,f=null;try{u=d.apply(null,l)}catch(h){f=h}f?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:c,error:f.message}},"*"):u&&typeof u.then=="function"?u.then(h=>{var g;(g=window.parent)==null||g.postMessage({type:"builder.evaluateResult",data:{id:c,result:h}},"*")}).catch(console.error):(i=window.parent)==null||i.postMessage({type:"builder.evaluateResult",data:{result:u,id:c}},"*");break}}})))};function W(e){return Math.round(e*1e3)/1e3}const cn=(e,n,t=!0)=>{if(!(e instanceof HTMLElement))return null;let o=t?e:e.parentElement;do{if(!o)return null;if(n(o))return o}while(o=o.parentElement);return null},ln=e=>cn(e,n=>{const t=n.getAttribute("builder-id")||n.id;return Boolean((t==null?void 0:t.indexOf("builder-"))===0)}),M=({event:e,target:n})=>{const t=n.getBoundingClientRect(),o=e.clientX-t.left,r=e.clientY-t.top,i=W(o/t.width),a=W(r/t.height);return{x:i,y:a}},dn=e=>{const n=e.target,t=n&&ln(n),o=(t==null?void 0:t.getAttribute("builder-id"))||(t==null?void 0:t.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:n?M({event:e,target:n}):void 0,builderTargetOffset:t?M({event:e,target:t}):void 0,builderElementIndex:t&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(t):void 0}}},un=({content:e,data:n,locale:t})=>{var i,a,l;const o={};(a=(i=e==null?void 0:e.data)==null?void 0:i.inputs)==null||a.forEach(c=>{var d;c.name&&c.defaultValue!==void 0&&((d=e==null?void 0:e.data)==null?void 0:d.state)&&e.data.state[c.name]===void 0&&(o[c.name]=c.defaultValue)});const r={...(l=e==null?void 0:e.data)==null?void 0:l.state,...n,...t?{locale:t}:{}};return{...o,...r}},mn=({content:e,data:n})=>e?{...e,data:{...e==null?void 0:e.data,...n},meta:e==null?void 0:e.meta}:void 0,pn=()=>Promise.resolve().then(()=>J).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",e),e}),hn=()=>Promise.resolve().then(()=>require("./render-styles.d1ac3a18.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",e),e}),fn={name:"render-content",components:{RenderContentStyles:s.defineAsyncComponent(hn),RenderBlocks:s.defineAsyncComponent(pn)},props:["content","data","canTrack","locale","customComponents","model","context","apiKey","includeRefs","apiVersion"],data(){return{forceReRenderCount:0,overrideContent:null,useContent:mn({content:this.content,data:this.data}),update:0,canTrackToUse:y(this.canTrack)?this.canTrack:!0,contentState:un({content:this.content,data:this.data,locale:this.locale}),allRegisteredComponents:[...Mt(),...P,...this.customComponents||[]].reduce((e,n)=>({...e,[n.name]:n}),{}),httpReqsData:{},clicked:!1,TARGET:v}},provide(){const e=this;return{[S.key]:{content:e.useContent,state:e.contentState,setState:e.setContextState,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,registeredComponents:e.allRegisteredComponents}}},mounted(){var e,n;if(this.apiKey||k.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),m()){if(b()&&(this.forceReRenderCount=this.forceReRenderCount+1,sn(),an({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(t=>{var r;const o=le(t);(r=window.parent)==null||r.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const t=(e=this.useContent)==null?void 0:e.testVariationId,o=(n=this.useContent)==null?void 0:n.id;E({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:t!==o?t:void 0})}if(ce()){const t=new URL(location.href).searchParams,o=t.get("builder.preview"),r=t.get(`builder.preview.${o}`),i=t.get("apiKey")||t.get("builder.space");o===this.model&&i===this.apiKey&&(!this.content||r===this.content.id)&&A({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(a=>{a&&this.mergeNewContent(a)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){m()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var e,n;return{0:(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.jsCode,1:this.contentState}},onUpdateHook2(){var e,n;return{0:(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.httpRequests}},onUpdateHook3(){return{0:this.contentState}}},methods:{mergeNewContent(e){var n,t,o,r,i;this.useContent={...this.useContent,...e,data:{...(n=this.useContent)==null?void 0:n.data,...e==null?void 0:e.data},meta:{...(t=this.useContent)==null?void 0:t.meta,...e==null?void 0:e.meta,breakpoints:((o=e==null?void 0:e.meta)==null?void 0:o.breakpoints)||((i=(r=this.useContent)==null?void 0:r.meta)==null?void 0:i.breakpoints)}}},setBreakpoints(e){var n;this.useContent={...this.useContent,meta:{...(n=this.useContent)==null?void 0:n.meta,breakpoints:e}}},setContextState(e){this.contentState=e},processMessage(e){var t;const{data:n}=e;if(n)switch(n.type){case"builder.configureSdk":{const o=n.data,{breakpoints:r,contentId:i}=o;if(!i||i!==((t=this.useContent)==null?void 0:t.id))return;r&&this.setBreakpoints(r),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=n.data,r=o.key||o.alias||o.entry||o.modelName,i=o.data;r===this.model&&(this.mergeNewContent(i),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var n,t;const e=(t=(n=this.useContent)==null?void 0:n.data)==null?void 0:t.jsCode;e&&R({code:e,context:this.context||{},state:this.contentState})},onClick(e){var n,t;if(this.useContent){const o=(n=this.useContent)==null?void 0:n.testVariationId,r=(t=this.useContent)==null?void 0:t.id;E({type:"click",canTrack:this.canTrackToUse,contentId:r,apiKey:this.apiKey,variationId:o!==r?o:void 0,...dn(e),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(e){return e.replace(/{{([^}]+)}}/g,(n,t)=>R({code:t,context:this.context||{},state:this.contentState}))},handleRequest({url:e,key:n}){Y(e).then(t=>t.json()).then(t=>{const o={...this.contentState,[n]:t};this.setContextState(o)}).catch(t=>{console.error("error fetching dynamic data",e,t)})},runHttpRequests(){var n,t,o;const e=(o=(t=(n=this.useContent)==null?void 0:n.data)==null?void 0:t.httpRequests)!=null?o:{};Object.entries(e).forEach(([r,i])=>{if(i&&(!this.httpReqsData[r]||b())){const a=this.evalExpression(i);this.handleRequest({url:a,key:r})}})},emitStateUpdate(){b()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))}}},gn=["builder-content-id","builder-model"];function bn(e,n,t,o,r,i){var c,d,u,f,h,g,x,V;const a=s.resolveComponent("render-content-styles"),l=s.resolveComponent("render-blocks");return r.useContent?(s.openBlock(),s.createElementBlock("div",{key:0,ref:"elementRef",onClick:n[0]||(n[0]=ge=>i.onClick(ge)),"builder-content-id":(c=r.useContent)==null?void 0:c.id,"builder-model":t.model},[r.TARGET!=="reactNative"?(s.openBlock(),s.createBlock(a,{key:0,contentId:(d=r.useContent)==null?void 0:d.id,cssCode:(f=(u=r.useContent)==null?void 0:u.data)==null?void 0:f.cssCode,customFonts:(g=(h=r.useContent)==null?void 0:h.data)==null?void 0:g.customFonts},null,8,["contentId","cssCode","customFonts"])):s.createCommentVNode("",!0),(s.openBlock(),s.createBlock(l,{blocks:(V=(x=r.useContent)==null?void 0:x.data)==null?void 0:V.blocks,key:r.forceReRenderCount},null,8,["blocks"]))],8,gn)):s.createCommentVNode("",!0)}const fe=p(fn,[["render",bn]]),yn=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"})),L={};function kn(e){if(m()){Object.assign(L,e);const n={type:"builder.settingsChange",data:L};parent.postMessage(n,"*")}}exports.BuilderContext=S;exports.Button=z;exports.Columns=K;exports.Fragment=D;exports.Image=q;exports.Section=X;exports.Symbol=ie;exports.TARGET=v;exports.Text=se;exports.Video=ae;exports._export_sfc=p;exports.checkIsDefined=y;exports.components=P;exports.convertSearchParamsToQueryObject=te;exports.createRegisterComponentMessage=le;exports.evaluate=R;exports.fastClone=C;exports.getAllContent=re;exports.getBuilderSearchParams=ne;exports.getBuilderSearchParamsFromWindow=oe;exports.getContent=A;exports.getMaxWidthQueryForSize=ve;exports.getSizesForBreakpoints=H;exports.isEditing=b;exports.isPreviewing=ce;exports.normalizeSearchParams=B;exports.register=he;exports.registerComponent=Lt;exports.renderBlocks=G;exports.renderContent=fe;exports.setEditorSettings=kn;exports.track=rn;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),p=require("./index.cca81180.cjs"),k=require("./css.3241302b.cjs"),B=e=>`v-on:${e.toLowerCase()}`,f=(e,o)=>n=>p.evaluate({code:e,context:o.context,state:o.state,event:n,isExpression:!1});function b(e){var s;const o={},n=(s=e.block.actions)!=null?s:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const c=n[r];o[B(r)]=f(c,e)}return o}function x(e){var o;return{...(o=e.component)==null?void 0:o.options,...e.options,builderBlock:e}}function g(e){const o={};if(typeof e!="string")return o;const n=e.trim().split(/\\s+/);for(const s of n)o[s]=!0;return o}function C(e){return e.class=g(e.class),e}const v=e=>({href:e.href});function _(e){var n;const o={...v(e),...e.properties,"builder-id":e.id,style:P(e.style),class:[e.id,"builder-block",e.class,(n=e.properties)==null?void 0:n.class].filter(Boolean).join(" ")};return C(o)}function P(e){if(!!e)switch(p.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return k.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}const E=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],S=e=>typeof e=="string"&&E.includes(e.toLowerCase()),R=({block:e,context:o})=>{var r;const n=(r=k.getProcessedBlock({block:e,state:o.state,context:o.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!n)return null;const s=o.registeredComponents[n];if(s)return s;console.warn(`
|
|
2
|
+
Could not find a registered component named "${n}".
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},w=({block:e,context:o})=>{const{repeat:n,...s}=e;if(!(n!=null&&n.collection))return;const r=p.evaluate({code:n.collection,state:o.state,context:o.context});if(!Array.isArray(r))return;const c=n.collection.split(".").pop(),i=n.itemName||(c?c+"Item":"item");return r.map((a,m)=>({context:{...o,state:{...o.state,$index:m,$item:a,[i]:a,[`$${i}Index`]:m}},block:s}))},A=e=>typeof Proxy>"u"?(console.error("no Proxy available in this environment, cannot proxy state."),e.state):new Proxy(e.state,{set:(n,s,r)=>{var c;return n[s]=r,(c=e.setState)==null||c.call(e,n),!0}}),O=()=>Promise.resolve().then(()=>require("./block-styles.09955b0c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),j=()=>Promise.resolve().then(()=>y).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),N={name:"render-component",components:{RenderBlock:t.defineAsyncComponent(j),BlockStyles:t.defineAsyncComponent(O)},props:["componentRef","componentOptions","blockChildren","context"]},I=()=>Promise.resolve().then(()=>require("./block-styles.09955b0c.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),V=()=>Promise.resolve().then(()=>require("./render-repeated-block.c3c9e926.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),T=()=>Promise.resolve().then(()=>require("./render-component.c0d5e797.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),D={name:"render-block",components:{RenderComponent:t.defineAsyncComponent(T),RenderRepeatedBlock:t.defineAsyncComponent(V),BlockStyles:t.defineAsyncComponent(I)},props:["block","context"],data(){return{component:R({block:this.block,context:this.context}),repeatItemData:w({block:this.block,context:this.context}),tag:this.block.tagName||"div",proxyState:A(this.context),isEmptyHtmlElement:S}},computed:{useBlock(){return this.repeatItemData?this.block:k.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return"hide"in this.useBlock?!this.useBlock.hide:"show"in this.useBlock?this.useBlock.show:!0},actions(){return b({block:this.useBlock,state:this.proxyState,context:this.context.context})},attributes(){return{..._(this.useBlock)}},childrenWithoutParentComponent(){var o,n;return!((o=this.component)!=null&&o.component)&&!this.repeatItemData?(n=this.useBlock.children)!=null?n:[]:[]},childrenContext(){const e=()=>({});return{apiKey:this.context.apiKey,apiVersion:this.context.apiVersion,state:this.context.state,content:this.context.content,context:this.context.context,setState:this.context.setState,registeredComponents:this.context.registeredComponents,inheritedStyles:e()}},renderComponentProps(){var e,o,n;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(o=this.component)==null?void 0:o.component,componentOptions:{...x(this.useBlock),...(n=this.component)!=null&&n.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(o={}){return Object.keys(o).reduce((n,s)=>({...n,[s.replace("v-on:","")]:o[s]}),{})}}};function H(e,o,n,s,r,c){var h;const i=t.resolveComponent("render-repeated-block"),u=t.resolveComponent("render-component"),a=t.resolveComponent("render-block",!0),m=t.resolveComponent("block-styles");return c.canShowBlock?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(h=r.component)!=null&&h.noWrap?(t.openBlock(),t.createBlock(u,t.normalizeProps(t.mergeProps({key:1},c.renderComponentProps)),null,16)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[r.isEmptyHtmlElement(r.tag)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.tag),t.mergeProps({key:0},c.attributes,t.toHandlers(c.stripVOn(c.actions))),null,16)):t.createCommentVNode("",!0),!r.isEmptyHtmlElement(r.tag)&&r.repeatItemData?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(r.repeatItemData,(l,d)=>(t.openBlock(),t.createBlock(i,{key:d,repeatContext:l.context,block:l.block},null,8,["repeatContext","block"]))),128)):t.createCommentVNode("",!0),!r.isEmptyHtmlElement(r.tag)&&!r.repeatItemData?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.tag),t.mergeProps({key:2},c.attributes,t.toHandlers(c.stripVOn(c.actions))),{default:t.withCtx(()=>[t.createVNode(u,t.normalizeProps(t.guardReactiveProps(c.renderComponentProps)),null,16),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.childrenWithoutParentComponent,(l,d)=>(t.openBlock(),t.createBlock(a,{key:"render-block-"+l.id,block:l,context:c.childrenContext},null,8,["block","context"]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.childrenWithoutParentComponent,(l,d)=>(t.openBlock(),t.createBlock(m,{key:"block-style-"+l.id,block:l,context:c.childrenContext},null,8,["block","context"]))),128))]),_:1},16)):t.createCommentVNode("",!0)],64))],64)):t.createCommentVNode("",!0)}const q=p._export_sfc(D,[["render",H]]),y=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=N;exports.renderBlock=y;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineAsyncComponent as m, resolveComponent as k, openBlock as s, createElementBlock as a, Fragment as
|
|
2
|
-
import { e as
|
|
3
|
-
import { a as
|
|
4
|
-
const
|
|
1
|
+
import { defineAsyncComponent as m, resolveComponent as k, openBlock as s, createElementBlock as a, Fragment as p, createBlock as l, resolveDynamicComponent as C, mergeProps as x, toHandlers as _, createCommentVNode as y, renderList as g, withCtx as R, createVNode as w, normalizeProps as v, guardReactiveProps as P } from "vue";
|
|
2
|
+
import { e as S, T as O, _ as A } from "./index.45ab85e5.js";
|
|
3
|
+
import { a as I, g as E } from "./css.81a21c5a.js";
|
|
4
|
+
const T = (e) => `v-on:${e.toLowerCase()}`, N = (e, t) => (o) => S({
|
|
5
5
|
code: e,
|
|
6
6
|
context: t.context,
|
|
7
7
|
state: t.state,
|
|
8
|
-
event:
|
|
8
|
+
event: o,
|
|
9
9
|
isExpression: !1
|
|
10
10
|
});
|
|
11
|
-
function
|
|
11
|
+
function D(e) {
|
|
12
12
|
var c;
|
|
13
|
-
const t = {},
|
|
14
|
-
for (const
|
|
15
|
-
if (!
|
|
13
|
+
const t = {}, o = (c = e.block.actions) != null ? c : {};
|
|
14
|
+
for (const n in o) {
|
|
15
|
+
if (!o.hasOwnProperty(n))
|
|
16
16
|
continue;
|
|
17
|
-
const
|
|
18
|
-
t[
|
|
17
|
+
const r = o[n];
|
|
18
|
+
t[T(n)] = N(r, e);
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function H(e) {
|
|
23
23
|
var t;
|
|
24
24
|
return {
|
|
25
25
|
...(t = e.component) == null ? void 0 : t.options,
|
|
@@ -27,46 +27,45 @@ function V(e) {
|
|
|
27
27
|
builderBlock: e
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function V(e) {
|
|
31
31
|
const t = {};
|
|
32
32
|
if (typeof e != "string")
|
|
33
33
|
return t;
|
|
34
|
-
const
|
|
35
|
-
for (const c of
|
|
34
|
+
const o = e.trim().split(/\\s+/);
|
|
35
|
+
for (const c of o)
|
|
36
36
|
t[c] = !0;
|
|
37
37
|
return t;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return e.class =
|
|
39
|
+
function j(e) {
|
|
40
|
+
return e.class = V(e.class), e;
|
|
41
41
|
}
|
|
42
|
+
const W = (e) => ({ href: e.href });
|
|
42
43
|
function L(e) {
|
|
43
|
-
var
|
|
44
|
+
var o;
|
|
44
45
|
const t = {
|
|
46
|
+
...W(e),
|
|
45
47
|
...e.properties,
|
|
46
48
|
"builder-id": e.id,
|
|
47
49
|
style: M(e.style),
|
|
48
|
-
class: [e.id, "builder-block", e.class, (
|
|
50
|
+
class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
49
51
|
};
|
|
50
|
-
return
|
|
52
|
+
return j(t);
|
|
51
53
|
}
|
|
52
54
|
function M(e) {
|
|
53
55
|
if (!!e)
|
|
54
|
-
switch (
|
|
56
|
+
switch (O) {
|
|
55
57
|
case "svelte":
|
|
56
58
|
case "vue2":
|
|
57
59
|
case "vue3":
|
|
58
60
|
case "solid":
|
|
59
|
-
return
|
|
61
|
+
return I(e).join(" ");
|
|
60
62
|
case "qwik":
|
|
61
63
|
case "reactNative":
|
|
62
64
|
case "react":
|
|
63
65
|
return e;
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
return e.tagName || "div";
|
|
68
|
-
}
|
|
69
|
-
const K = [
|
|
68
|
+
const z = [
|
|
70
69
|
"area",
|
|
71
70
|
"base",
|
|
72
71
|
"br",
|
|
@@ -82,54 +81,61 @@ const K = [
|
|
|
82
81
|
"source",
|
|
83
82
|
"track",
|
|
84
83
|
"wbr"
|
|
85
|
-
],
|
|
84
|
+
], K = (e) => typeof e == "string" && z.includes(e.toLowerCase()), q = ({
|
|
86
85
|
block: e,
|
|
87
86
|
context: t
|
|
88
87
|
}) => {
|
|
89
|
-
var
|
|
90
|
-
const
|
|
88
|
+
var n;
|
|
89
|
+
const o = (n = E({
|
|
91
90
|
block: e,
|
|
92
91
|
state: t.state,
|
|
93
92
|
context: t.context,
|
|
94
93
|
shouldEvaluateBindings: !1
|
|
95
|
-
}).component) == null ? void 0 :
|
|
96
|
-
if (!
|
|
94
|
+
}).component) == null ? void 0 : n.name;
|
|
95
|
+
if (!o)
|
|
97
96
|
return null;
|
|
98
|
-
const c = t.registeredComponents[
|
|
97
|
+
const c = t.registeredComponents[o];
|
|
99
98
|
if (c)
|
|
100
99
|
return c;
|
|
101
100
|
console.warn(`
|
|
102
|
-
Could not find a registered component named "${
|
|
101
|
+
Could not find a registered component named "${o}".
|
|
103
102
|
If you registered it, is the file that registered it imported by the file that needs to render it?`);
|
|
104
|
-
},
|
|
103
|
+
}, F = ({
|
|
105
104
|
block: e,
|
|
106
105
|
context: t
|
|
107
106
|
}) => {
|
|
108
|
-
const { repeat:
|
|
109
|
-
if (!(
|
|
107
|
+
const { repeat: o, ...c } = e;
|
|
108
|
+
if (!(o != null && o.collection))
|
|
110
109
|
return;
|
|
111
|
-
const
|
|
112
|
-
code:
|
|
110
|
+
const n = S({
|
|
111
|
+
code: o.collection,
|
|
113
112
|
state: t.state,
|
|
114
113
|
context: t.context
|
|
115
114
|
});
|
|
116
|
-
if (!Array.isArray(
|
|
115
|
+
if (!Array.isArray(n))
|
|
117
116
|
return;
|
|
118
|
-
const
|
|
119
|
-
return
|
|
117
|
+
const r = o.collection.split(".").pop(), u = o.itemName || (r ? r + "Item" : "item");
|
|
118
|
+
return n.map((d, h) => ({
|
|
120
119
|
context: {
|
|
121
120
|
...t,
|
|
122
121
|
state: {
|
|
123
122
|
...t.state,
|
|
124
123
|
$index: h,
|
|
125
124
|
$item: d,
|
|
126
|
-
[
|
|
127
|
-
[`$${
|
|
125
|
+
[u]: d,
|
|
126
|
+
[`$${u}Index`]: h
|
|
128
127
|
}
|
|
129
128
|
},
|
|
130
129
|
block: c
|
|
131
130
|
}));
|
|
132
|
-
},
|
|
131
|
+
}, G = (e) => typeof Proxy > "u" ? (console.error(
|
|
132
|
+
"no Proxy available in this environment, cannot proxy state."
|
|
133
|
+
), e.state) : new Proxy(e.state, {
|
|
134
|
+
set: (o, c, n) => {
|
|
135
|
+
var r;
|
|
136
|
+
return o[c] = n, (r = e.setState) == null || r.call(e, o), !0;
|
|
137
|
+
}
|
|
138
|
+
}), U = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).catch((e) => {
|
|
133
139
|
throw console.error(
|
|
134
140
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
135
141
|
e
|
|
@@ -146,17 +152,17 @@ const K = [
|
|
|
146
152
|
BlockStyles: m(U)
|
|
147
153
|
},
|
|
148
154
|
props: ["componentRef", "componentOptions", "blockChildren", "context"]
|
|
149
|
-
}, J = () => import("./block-styles.
|
|
155
|
+
}, J = () => import("./block-styles.6bd36a5a.js").then((e) => e.default).catch((e) => {
|
|
150
156
|
throw console.error(
|
|
151
157
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
152
158
|
e
|
|
153
159
|
), e;
|
|
154
|
-
}), Q = () => import("./render-repeated-block.
|
|
160
|
+
}), Q = () => import("./render-repeated-block.263f0cec.js").then((e) => e.default).catch((e) => {
|
|
155
161
|
throw console.error(
|
|
156
162
|
"Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",
|
|
157
163
|
e
|
|
158
164
|
), e;
|
|
159
|
-
}), X = () => import("./render-component.
|
|
165
|
+
}), X = () => import("./render-component.3bd8dc76.js").then((e) => e.default).catch((e) => {
|
|
160
166
|
throw console.error(
|
|
161
167
|
"Error while attempting to dynamically import component RenderComponent at ./render-component.vue",
|
|
162
168
|
e
|
|
@@ -171,23 +177,22 @@ const K = [
|
|
|
171
177
|
props: ["block", "context"],
|
|
172
178
|
data() {
|
|
173
179
|
return {
|
|
174
|
-
component:
|
|
180
|
+
component: q({
|
|
175
181
|
block: this.block,
|
|
176
182
|
context: this.context
|
|
177
183
|
}),
|
|
178
|
-
repeatItemData:
|
|
184
|
+
repeatItemData: F({
|
|
179
185
|
block: this.block,
|
|
180
186
|
context: this.context
|
|
181
187
|
}),
|
|
182
|
-
|
|
188
|
+
tag: this.block.tagName || "div",
|
|
189
|
+
proxyState: G(this.context),
|
|
190
|
+
isEmptyHtmlElement: K
|
|
183
191
|
};
|
|
184
192
|
},
|
|
185
193
|
computed: {
|
|
186
|
-
tag() {
|
|
187
|
-
return z(this.useBlock);
|
|
188
|
-
},
|
|
189
194
|
useBlock() {
|
|
190
|
-
return this.repeatItemData ? this.block :
|
|
195
|
+
return this.repeatItemData ? this.block : E({
|
|
191
196
|
block: this.block,
|
|
192
197
|
state: this.context.state,
|
|
193
198
|
context: this.context.context,
|
|
@@ -195,20 +200,10 @@ const K = [
|
|
|
195
200
|
});
|
|
196
201
|
},
|
|
197
202
|
canShowBlock() {
|
|
198
|
-
return
|
|
199
|
-
},
|
|
200
|
-
proxyState() {
|
|
201
|
-
return typeof Proxy > "u" ? (console.error(
|
|
202
|
-
"no Proxy available in this environment, cannot proxy state."
|
|
203
|
-
), this.context.state) : new Proxy(this.context.state, {
|
|
204
|
-
set: (t, n, c) => {
|
|
205
|
-
var r, o;
|
|
206
|
-
return t[n] = c, (o = (r = this.context).setState) == null || o.call(r, t), !0;
|
|
207
|
-
}
|
|
208
|
-
});
|
|
203
|
+
return "hide" in this.useBlock ? !this.useBlock.hide : "show" in this.useBlock ? this.useBlock.show : !0;
|
|
209
204
|
},
|
|
210
205
|
actions() {
|
|
211
|
-
return
|
|
206
|
+
return D({
|
|
212
207
|
block: this.useBlock,
|
|
213
208
|
state: this.proxyState,
|
|
214
209
|
context: this.context.context
|
|
@@ -219,26 +214,9 @@ const K = [
|
|
|
219
214
|
...L(this.useBlock)
|
|
220
215
|
};
|
|
221
216
|
},
|
|
222
|
-
renderComponentProps() {
|
|
223
|
-
var e, t, n;
|
|
224
|
-
return {
|
|
225
|
-
blockChildren: (e = this.useBlock.children) != null ? e : [],
|
|
226
|
-
componentRef: (t = this.component) == null ? void 0 : t.component,
|
|
227
|
-
componentOptions: {
|
|
228
|
-
...V(this.useBlock),
|
|
229
|
-
...(n = this.component) != null && n.noWrap ? {
|
|
230
|
-
attributes: {
|
|
231
|
-
...this.attributes,
|
|
232
|
-
...this.actions
|
|
233
|
-
}
|
|
234
|
-
} : {}
|
|
235
|
-
},
|
|
236
|
-
context: this.childrenContext
|
|
237
|
-
};
|
|
238
|
-
},
|
|
239
217
|
childrenWithoutParentComponent() {
|
|
240
|
-
var t,
|
|
241
|
-
return !((t = this.component) != null && t.component) && !this.repeatItemData ? (
|
|
218
|
+
var t, o;
|
|
219
|
+
return !((t = this.component) != null && t.component) && !this.repeatItemData ? (o = this.useBlock.children) != null ? o : [] : [];
|
|
242
220
|
},
|
|
243
221
|
childrenContext() {
|
|
244
222
|
const e = () => ({});
|
|
@@ -252,13 +230,30 @@ const K = [
|
|
|
252
230
|
registeredComponents: this.context.registeredComponents,
|
|
253
231
|
inheritedStyles: e()
|
|
254
232
|
};
|
|
233
|
+
},
|
|
234
|
+
renderComponentProps() {
|
|
235
|
+
var e, t, o;
|
|
236
|
+
return {
|
|
237
|
+
blockChildren: (e = this.useBlock.children) != null ? e : [],
|
|
238
|
+
componentRef: (t = this.component) == null ? void 0 : t.component,
|
|
239
|
+
componentOptions: {
|
|
240
|
+
...H(this.useBlock),
|
|
241
|
+
...(o = this.component) != null && o.noWrap ? {
|
|
242
|
+
attributes: {
|
|
243
|
+
...this.attributes,
|
|
244
|
+
...this.actions
|
|
245
|
+
}
|
|
246
|
+
} : {}
|
|
247
|
+
},
|
|
248
|
+
context: this.childrenContext
|
|
249
|
+
};
|
|
255
250
|
}
|
|
256
251
|
},
|
|
257
252
|
methods: {
|
|
258
253
|
stripVOn: function(t = {}) {
|
|
259
254
|
return Object.keys(t).reduce(
|
|
260
|
-
(
|
|
261
|
-
...
|
|
255
|
+
(o, c) => ({
|
|
256
|
+
...o,
|
|
262
257
|
[c.replace("v-on:", "")]: t[c]
|
|
263
258
|
}),
|
|
264
259
|
{}
|
|
@@ -266,29 +261,29 @@ const K = [
|
|
|
266
261
|
}
|
|
267
262
|
}
|
|
268
263
|
};
|
|
269
|
-
function $(e, t,
|
|
264
|
+
function $(e, t, o, c, n, r) {
|
|
270
265
|
var B;
|
|
271
|
-
const
|
|
272
|
-
return
|
|
273
|
-
(B =
|
|
274
|
-
|
|
275
|
-
!
|
|
276
|
-
key:
|
|
266
|
+
const u = k("render-repeated-block"), f = k("render-component"), d = k("render-block", !0), h = k("block-styles");
|
|
267
|
+
return r.canShowBlock ? (s(), a(p, { key: 0 }, [
|
|
268
|
+
(B = n.component) != null && B.noWrap ? (s(), l(f, v(x({ key: 1 }, r.renderComponentProps)), null, 16)) : (s(), a(p, { key: 0 }, [
|
|
269
|
+
n.isEmptyHtmlElement(n.tag) ? (s(), l(C(n.tag), x({ key: 0 }, r.attributes, _(r.stripVOn(r.actions))), null, 16)) : y("", !0),
|
|
270
|
+
!n.isEmptyHtmlElement(n.tag) && n.repeatItemData ? (s(!0), a(p, { key: 1 }, g(n.repeatItemData, (i, b) => (s(), l(u, {
|
|
271
|
+
key: b,
|
|
277
272
|
repeatContext: i.context,
|
|
278
273
|
block: i.block
|
|
279
274
|
}, null, 8, ["repeatContext", "block"]))), 128)) : y("", !0),
|
|
280
|
-
!
|
|
275
|
+
!n.isEmptyHtmlElement(n.tag) && !n.repeatItemData ? (s(), l(C(n.tag), x({ key: 2 }, r.attributes, _(r.stripVOn(r.actions))), {
|
|
281
276
|
default: R(() => [
|
|
282
|
-
|
|
283
|
-
(s(!0), a(
|
|
277
|
+
w(f, v(P(r.renderComponentProps)), null, 16),
|
|
278
|
+
(s(!0), a(p, null, g(r.childrenWithoutParentComponent, (i, b) => (s(), l(d, {
|
|
284
279
|
key: "render-block-" + i.id,
|
|
285
280
|
block: i,
|
|
286
|
-
context:
|
|
281
|
+
context: r.childrenContext
|
|
287
282
|
}, null, 8, ["block", "context"]))), 128)),
|
|
288
|
-
(s(!0), a(
|
|
283
|
+
(s(!0), a(p, null, g(r.childrenWithoutParentComponent, (i, b) => (s(), l(h, {
|
|
289
284
|
key: "block-style-" + i.id,
|
|
290
285
|
block: i,
|
|
291
|
-
context:
|
|
286
|
+
context: r.childrenContext
|
|
292
287
|
}, null, 8, ["block", "context"]))), 128))
|
|
293
288
|
]),
|
|
294
289
|
_: 1
|
|
@@ -296,7 +291,7 @@ function $(e, t, n, c, r, o) {
|
|
|
296
291
|
], 64))
|
|
297
292
|
], 64)) : y("", !0);
|
|
298
293
|
}
|
|
299
|
-
const ee = /* @__PURE__ */
|
|
294
|
+
const ee = /* @__PURE__ */ A(Z, [["render", $]]), te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
300
295
|
__proto__: null,
|
|
301
296
|
default: ee
|
|
302
297
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as s } from "./render-block.
|
|
1
|
+
import { _ as s } from "./render-block.ec4c1913.js";
|
|
2
2
|
import { resolveComponent as c, openBlock as t, createBlock as n, resolveDynamicComponent as a, normalizeProps as d, mergeProps as u, withCtx as b, createElementBlock as r, Fragment as l, renderList as m, createCommentVNode as x } from "vue";
|
|
3
|
-
import { _ as f } from "./index.
|
|
4
|
-
import "./css.
|
|
3
|
+
import { _ as f } from "./index.45ab85e5.js";
|
|
4
|
+
import "./css.81a21c5a.js";
|
|
5
5
|
function p(y, C, e, B, g, h) {
|
|
6
6
|
const k = c("render-block"), _ = c("block-styles");
|
|
7
7
|
return e.componentRef ? (t(), n(a(e.componentRef), d(u({ key: 0 }, e.componentOptions)), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./render-block.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./render-block.33cc5768.cjs"),e=require("vue"),k=require("./index.cca81180.cjs");require("./css.3241302b.cjs");function s(d,i,n,m,a,b){const t=e.resolveComponent("render-block"),c=e.resolveComponent("block-styles");return n.componentRef?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.componentRef),e.normalizeProps(e.mergeProps({key:0},n.componentOptions)),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.blockChildren,(o,r)=>(e.openBlock(),e.createBlock(t,{key:"render-block-"+o.id,block:o,context:n.context},null,8,["block","context"]))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.blockChildren,(o,r)=>(e.openBlock(),e.createBlock(c,{key:"block-style-"+o.id,block:o,context:n.context},null,8,["block","context"]))),128))]),_:1},16)):e.createCommentVNode("",!0)}const u=k._export_sfc(l._sfc_main,[["render",s]]);exports.default=u;
|
package/packages/_vue3/dist/{render-inlined-styles.dccd4787.js → render-inlined-styles.952d2fff.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as n, createBlock as s, resolveDynamicComponent as l, withCtx as i, createTextVNode as a, toDisplayString as c } from "vue";
|
|
2
|
-
import { T as o, _ as y } from "./index.
|
|
2
|
+
import { T as o, _ as y } from "./index.45ab85e5.js";
|
|
3
3
|
const d = {
|
|
4
4
|
name: "render-inlined-styles",
|
|
5
5
|
props: ["styles"],
|
|
@@ -7,11 +7,11 @@ const d = {
|
|
|
7
7
|
return { TARGET: o };
|
|
8
8
|
},
|
|
9
9
|
computed: {
|
|
10
|
-
injectedStyleScript() {
|
|
11
|
-
return `<${this.tag}>${this.styles}</${this.tag}>`;
|
|
12
|
-
},
|
|
13
10
|
tag() {
|
|
14
11
|
return "style";
|
|
12
|
+
},
|
|
13
|
+
injectedStyleScript() {
|
|
14
|
+
return `<${this.tag}>${this.styles}</${this.tag}>`;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index.cca81180.cjs"),c={name:"render-inlined-styles",props:["styles"],data(){return{TARGET:s.TARGET}},computed:{tag(){return"style"},injectedStyleScript(){return`<${this.tag}>${this.styles}</${this.tag}>`}}};function l(o,a,t,u,n,r){return n.TARGET==="svelte"||n.TARGET==="qwik"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.tag),{key:0,innerHTML:t.styles},null,8,["innerHTML"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.tag),{key:1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.styles),1)]),_:1}))}const i=s._export_sfc(c,[["render",l]]);exports.default=i;
|
package/packages/_vue3/dist/{render-repeated-block.e5d7da62.js → render-repeated-block.263f0cec.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineAsyncComponent as n, resolveComponent as r, openBlock as c, createBlock as a } from "vue";
|
|
2
|
-
import { B as p, _ as s } from "./index.
|
|
3
|
-
const l = () => import("./render-block.
|
|
2
|
+
import { B as p, _ as s } from "./index.45ab85e5.js";
|
|
3
|
+
const l = () => import("./render-block.ec4c1913.js").then((e) => e.r).then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
6
6
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./index.cca81180.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.33cc5768.cjs")).then(e=>e.renderBlock).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),s={name:"render-repeated-block",components:{RenderBlock:t.defineAsyncComponent(c)},props:["block","repeatContext"],provide(){const e=this;return{[o.BuilderContext.key]:{content:e.repeatContext.content,state:e.repeatContext.state,setState:e.repeatContext.setState,context:e.repeatContext.context,apiKey:e.repeatContext.apiKey,registeredComponents:e.repeatContext.registeredComponents,inheritedStyles:e.repeatContext.inheritedStyles}}}};function a(e,d,n,i,p,x){const r=t.resolveComponent("render-block");return t.openBlock(),t.createBlock(r,{block:n.block,context:n.repeatContext},null,8,["block","context"])}const l=o._export_sfc(s,[["render",a]]);exports.default=l;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineAsyncComponent as a, resolveComponent as f, openBlock as d, createBlock as p } from "vue";
|
|
2
|
-
import { _ as m } from "./index.
|
|
2
|
+
import { _ as m } from "./index.45ab85e5.js";
|
|
3
3
|
const u = (e) => {
|
|
4
4
|
var o, l;
|
|
5
5
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], r = (l = e.fileUrl) != null ? l : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
|
|
@@ -32,7 +32,7 @@ font-weight: ${s};
|
|
|
32
32
|
}, y = ({
|
|
33
33
|
cssCode: e,
|
|
34
34
|
contentId: t
|
|
35
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", g = () => import("./render-inlined-styles.
|
|
35
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", g = () => import("./render-inlined-styles.952d2fff.js").then((e) => e.default).catch((e) => {
|
|
36
36
|
throw console.error(
|
|
37
37
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",
|
|
38
38
|
e
|