@builder.io/sdk-vue 0.12.6 → 0.12.7
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/{block-styles.2f299508.js → block-styles.ac6656ce.js} +1 -1
- package/lib/browser/{block-styles.6aaf564a.cjs → block-styles.f11c5ffe.cjs} +1 -1
- package/lib/browser/{block-wrapper.0221145e.cjs → block-wrapper.6d69d80f.cjs} +1 -1
- package/lib/browser/{block-wrapper.90830b0b.js → block-wrapper.ad0103e8.js} +3 -3
- package/lib/browser/{component-ref.b2555637.cjs → component-ref.dcfd64fd.cjs} +1 -1
- package/lib/browser/{component-ref.e118188b.js → component-ref.e7f5419f.js} +2 -2
- package/lib/browser/components/block/animator.d.ts +5 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties.4461e82b.cjs → get-block-properties.36d49987.cjs} +1 -1
- package/lib/browser/{get-block-properties.ca78d237.js → get-block-properties.ed7e1592.js} +1 -1
- package/lib/browser/index.5c75e9ce.cjs +165 -0
- package/lib/browser/{index.70b9bffc.js → index.9fcd8cf7.js} +823 -688
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block.cda6cd73.cjs → repeated-block.281d449f.cjs} +1 -1
- package/lib/browser/{repeated-block.b1ae5c0d.js → repeated-block.4e2f22cc.js} +2 -2
- package/lib/browser/types/builder-block.d.ts +18 -1
- package/lib/edge/{block-styles.e2e8092d.cjs → block-styles.601b26cb.cjs} +1 -1
- package/lib/edge/{block-styles.d58d7b74.js → block-styles.bafed14d.js} +1 -1
- package/lib/edge/{block-wrapper.299629dd.js → block-wrapper.66bb2c57.js} +3 -3
- package/lib/edge/{block-wrapper.8d418b5a.cjs → block-wrapper.799a2e02.cjs} +1 -1
- package/lib/edge/{component-ref.7e7732dc.cjs → component-ref.541b3d51.cjs} +1 -1
- package/lib/edge/{component-ref.6331b010.js → component-ref.78a1379d.js} +2 -2
- package/lib/edge/components/block/animator.d.ts +5 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/{node/get-block-properties.f160f4a3.cjs → edge/get-block-properties.b1bc93ca.cjs} +1 -1
- package/lib/edge/{get-block-properties.35baa57f.js → get-block-properties.c85014fd.js} +1 -1
- package/lib/edge/{index.008ba030.js → index.86c101e6.js} +1356 -1221
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/{index.898c6989.cjs → index.df2b3d03.cjs} +30 -30
- package/lib/edge/index.js +1 -1
- package/lib/edge/{repeated-block.03eeebae.cjs → repeated-block.86b489a0.cjs} +1 -1
- package/lib/edge/{repeated-block.ffaf5faf.js → repeated-block.b8b6a27d.js} +2 -2
- package/lib/edge/types/builder-block.d.ts +18 -1
- package/lib/node/{block-styles.0b8dee45.js → block-styles.effd674a.js} +1 -1
- package/lib/node/{block-styles.dd671397.cjs → block-styles.fea2564c.cjs} +1 -1
- package/lib/node/{block-wrapper.c7d3478b.js → block-wrapper.80b8925e.js} +3 -3
- package/lib/node/{block-wrapper.7e9d2e81.cjs → block-wrapper.a1458c25.cjs} +1 -1
- package/lib/node/{component-ref.d446bf3c.js → component-ref.aec34fe0.js} +2 -2
- package/lib/node/{component-ref.b4ff04a2.cjs → component-ref.e6bc0eb4.cjs} +1 -1
- package/lib/node/components/block/animator.d.ts +5 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties.9941552d.js → get-block-properties.363f9151.js} +1 -1
- package/lib/{edge/get-block-properties.7cb55a14.cjs → node/get-block-properties.3b20c5e6.cjs} +1 -1
- package/lib/node/{index.1bf3ab50.js → index.8723c72d.js} +175 -40
- package/lib/node/{index.981f0f4d.cjs → index.89bf7bc3.cjs} +5 -5
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block.ef466bfa.cjs → repeated-block.54e347dd.cjs} +1 -1
- package/lib/node/{repeated-block.6fd6b909.js → repeated-block.d6e97a4f.js} +2 -2
- package/lib/node/types/builder-block.d.ts +18 -1
- package/package.json +1 -1
- package/lib/browser/index.21de2b72.cjs +0 -165
package/lib/edge/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as a, l as n, m as r, C as o, F as i, n as g, R as c, k as l, S as m, o as C, p as d, V as p, v as u, s as B, G as E, x as R, y as S, z as f, D as h, A as k, q as x, r as y, t as P, u as v, E as A } from "./index.
|
|
1
|
+
import { j as a, l as n, m as r, C as o, F as i, n as g, R as c, k as l, S as m, o as C, p as d, V as p, v as u, s as B, G as E, x as R, y as S, z as f, D as h, A as k, q as x, r as y, t as P, u as v, E as A } from "./index.86c101e6.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
a as Blocks,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),n=require("./index.df2b3d03.cjs"),r=()=>Promise.resolve().then(()=>require("./index.df2b3d03.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{[n.BuilderContext.key]:e.store}}});function s(e,i,p,d,k,u){const t=o.resolveComponent("block");return o.openBlock(),o.createBlock(t,{block:e.block,context:e.store,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"])}const l=n._export_sfc(c,[["render",s],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/repeated-block.vue"]]);exports.default=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, defineAsyncComponent as n, resolveComponent as r, openBlock as c, createBlock as s } from "vue";
|
|
2
|
-
import { i as p, _ as l } from "./index.
|
|
3
|
-
const i = () => import("./index.
|
|
2
|
+
import { i as p, _ as l } from "./index.86c101e6.js";
|
|
3
|
+
const i = () => import("./index.86c101e6.js").then((e) => e.J).then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component Block at ../block.vue",
|
|
6
6
|
e
|
|
@@ -4,6 +4,23 @@ interface JSONObject {
|
|
|
4
4
|
}
|
|
5
5
|
interface JSONArray extends Array<JSONValue> {
|
|
6
6
|
}
|
|
7
|
+
export interface AnimationStep {
|
|
8
|
+
styles: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
};
|
|
11
|
+
delay?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface BuilderAnimation {
|
|
14
|
+
elementId: string;
|
|
15
|
+
trigger: string;
|
|
16
|
+
steps: AnimationStep[];
|
|
17
|
+
duration: number;
|
|
18
|
+
delay?: number;
|
|
19
|
+
easing?: string;
|
|
20
|
+
id?: string;
|
|
21
|
+
repeat?: boolean;
|
|
22
|
+
thresholdPercent?: number;
|
|
23
|
+
}
|
|
7
24
|
/** @todo typedoc this */
|
|
8
25
|
export interface BuilderBlock {
|
|
9
26
|
'@type': '@builder.io/sdk:Element';
|
|
@@ -52,7 +69,7 @@ export interface BuilderBlock {
|
|
|
52
69
|
collection: string;
|
|
53
70
|
itemName?: string;
|
|
54
71
|
} | null;
|
|
55
|
-
animations?:
|
|
72
|
+
animations?: BuilderAnimation[];
|
|
56
73
|
style?: Partial<CSSStyleDeclaration>;
|
|
57
74
|
href?: string;
|
|
58
75
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as k, resolveComponent as y, openBlock as f, createBlock as x, createCommentVNode as b } from "vue";
|
|
2
|
-
import { I as B, T as g, g as d, c as u, a as _, b as r, d as m, _ as v } from "./index.
|
|
2
|
+
import { I as B, T as g, g as d, c as u, a as _, b as r, d as m, _ as v } from "./index.8723c72d.js";
|
|
3
3
|
import "node:module";
|
|
4
4
|
const C = k({
|
|
5
5
|
name: "block-styles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),e=require("./index.89bf7bc3.cjs");require("node:module");const h=s.defineComponent({name:"block-styles",components:{InlinedStyles:e.InlinedStyles},props:["block","context"],data(){return{TARGET:e.TARGET}},computed:{canShowBlock(){const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return e.checkIsDefined(t.hide)?!t.hide:e.checkIsDefined(t.show)?t.show:!0},css(){var d;const t=e.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),o=t.responsiveStyles,n=this.context.content,r=e.getSizesForBreakpoints(((d=n==null?void 0:n.meta)==null?void 0:d.breakpoints)||{}),a=o==null?void 0:o.large,i=o==null?void 0:o.medium,c=o==null?void 0:o.small,l=t.id;if(!l)return"";const u=a?e.createCssClass({className:l,styles:a}):"",S=i?e.createCssClass({className:l,styles:i,mediaQuery:e.getMaxWidthQueryForSize("medium",r)}):"",m=c?e.createCssClass({className:l,styles:c,mediaQuery:e.getMaxWidthQueryForSize("small",r)}):"";return[u,S,m].join(" ")}}});function k(t,o,n,r,a,i){const c=s.resolveComponent("inlined-styles");return t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?(s.openBlock(),s.createBlock(c,{key:0,styles:t.css},null,8,["styles"])):s.createCommentVNode("v-if",!0)}const p=e._export_sfc(h,[["render",k],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-styles.vue"]]);exports.default=p;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as p, renderSlot as i } from "vue";
|
|
2
|
-
import { g as s, a as l } from "./get-block-properties.
|
|
3
|
-
import { _ as m } from "./index.
|
|
2
|
+
import { g as s, a as l } from "./get-block-properties.363f9151.js";
|
|
3
|
+
import { _ as m } from "./index.8723c72d.js";
|
|
4
4
|
import "node:module";
|
|
5
|
-
const d = () => import("./index.
|
|
5
|
+
const d = () => import("./index.8723c72d.js").then((e) => e.H).then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
8
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties.3b20c5e6.cjs"),n=require("./index.89bf7bc3.cjs");require("node:module");const c=()=>Promise.resolve().then(()=>require("./index.89bf7bc3.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,u,m){const r=t.resolveComponent("dynamic-renderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/block-wrapper.vue"]]);exports.default=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as m, openBlock as r, createBlock as i, resolveDynamicComponent as k, mergeProps as u, withCtx as d, renderSlot as v, resolveComponent as P, normalizeProps as g, createElementBlock as B, Fragment as $, renderList as h, createCommentVNode as w } from "vue";
|
|
2
|
-
import { _ as f, B as S, w as W } from "./index.
|
|
3
|
-
import { g as R, a as b } from "./get-block-properties.
|
|
2
|
+
import { _ as f, B as S, w as W } from "./index.8723c72d.js";
|
|
3
|
+
import { g as R, a as b } from "./get-block-properties.363f9151.js";
|
|
4
4
|
import "node:module";
|
|
5
5
|
const I = m({
|
|
6
6
|
name: "interactive-element",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("./index.89bf7bc3.cjs"),a=require("./get-block-properties.3b20c5e6.cjs");require("node:module");const u=o.defineComponent({name:"interactive-element",props:["wrapperProps","includeBlockProps","block","context","Wrapper"],data(){return{getBlockActions:a.getBlockActions,getBlockProperties:a.getBlockProperties}}});function d(e,t,p,s,n,l){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({attributes:e.includeBlockProps?{...e.getBlockProperties({block:e.block,context:e.context}),...e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}},e.wrapperProps),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=c._export_sfc(u,[["render",d],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/interactive-element.vue"]]),b=({componentOptions:e,builderBlock:t,context:p,componentRef:s,includeBlockProps:n,isInteractive:l,contextValue:i})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:t,context:i})}:{}};return l?{Wrapper:s,block:t,context:p,wrapperProps:e,includeBlockProps:n}:r},f=o.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function B(e,t,p,s,n,l){const i=o.resolveComponent("block");return e.componentRef?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.normalizeProps(o.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:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.blockChildren,(r,k)=>(o.openBlock(),o.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):o.createCommentVNode("v-if",!0)}const g=c._export_sfc(f,[["render",B],["__file","/home/runner/work/builder/builder/packages/sdks/output/vue/src/components/block/components/component-ref/component-ref.vue"]]);exports.default=g;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BuilderAnimation } from '../../types/builder-block.js';
|
|
2
|
+
export declare function bindAnimations(animations: BuilderAnimation[]): void;
|
|
3
|
+
export declare function triggerAnimation(animation: BuilderAnimation): void;
|
|
4
|
+
export declare function bindHoverAnimation(animation: BuilderAnimation): void;
|
|
5
|
+
export declare function bindScrollInViewAnimation(animation: BuilderAnimation): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.12.
|
|
1
|
+
export declare const SDK_VERSION = "0.12.7";
|
package/lib/{edge/get-block-properties.7cb55a14.cjs → node/get-block-properties.3b20c5e6.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./index.
|
|
1
|
+
"use strict";const s=require("./index.89bf7bc3.cjs"),i=e=>`v-on:${e.toLowerCase()}`,l=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function u(e){var o;const t={},r=(o=e.block.actions)!=null?o:{};for(const a in r){if(!r.hasOwnProperty(a))continue;const c=r[a];let n=i(a);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=l(c,e)}return t}function f({properties:e}){return e}const p=e=>({href:e.href});function d({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:s.getStyle({block:e,context:t}),[s.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return f({properties:r,context:t,block:e})}exports.getBlockActions=u;exports.getBlockProperties=d;
|
|
@@ -324,14 +324,14 @@ output;
|
|
|
324
324
|
) : null;
|
|
325
325
|
d.setSync(getSyncValName(m), b);
|
|
326
326
|
}), d.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
327
|
-
const
|
|
327
|
+
const u = processCode({
|
|
328
328
|
code: e,
|
|
329
329
|
args: l
|
|
330
|
-
}),
|
|
330
|
+
}), p = c.evalSync(u);
|
|
331
331
|
try {
|
|
332
|
-
return JSON.parse(
|
|
332
|
+
return JSON.parse(p);
|
|
333
333
|
} catch {
|
|
334
|
-
return
|
|
334
|
+
return p;
|
|
335
335
|
}
|
|
336
336
|
}, checkIsDefined = (e) => e != null;
|
|
337
337
|
function isNodeRuntime() {
|
|
@@ -470,6 +470,128 @@ function mapStyleObjToStrIfNeeded(e) {
|
|
|
470
470
|
return e;
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
+
function throttle(e, t, n = {}) {
|
|
474
|
+
let o, r, s, i = null, a = 0;
|
|
475
|
+
const l = function() {
|
|
476
|
+
a = n.leading === !1 ? 0 : Date.now(), i = null, s = e.apply(o, r), i || (o = r = null);
|
|
477
|
+
};
|
|
478
|
+
return function() {
|
|
479
|
+
const c = Date.now();
|
|
480
|
+
!a && n.leading === !1 && (a = c);
|
|
481
|
+
const d = t - (c - a);
|
|
482
|
+
return o = this, r = arguments, d <= 0 || d > t ? (i && (clearTimeout(i), i = null), a = c, s = e.apply(o, r), i || (o = r = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, d)), s;
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function assign(e, ...t) {
|
|
486
|
+
const n = Object(e);
|
|
487
|
+
for (let o = 1; o < arguments.length; o++) {
|
|
488
|
+
const r = arguments[o];
|
|
489
|
+
if (r != null)
|
|
490
|
+
for (const s in r)
|
|
491
|
+
Object.prototype.hasOwnProperty.call(r, s) && (n[s] = r[s]);
|
|
492
|
+
}
|
|
493
|
+
return n;
|
|
494
|
+
}
|
|
495
|
+
const camelCaseToKebabCase = (e) => e ? e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`) : "";
|
|
496
|
+
function bindAnimations(e) {
|
|
497
|
+
for (const t of e)
|
|
498
|
+
switch (t.trigger) {
|
|
499
|
+
case "pageLoad":
|
|
500
|
+
triggerAnimation(t);
|
|
501
|
+
break;
|
|
502
|
+
case "hover":
|
|
503
|
+
bindHoverAnimation(t);
|
|
504
|
+
break;
|
|
505
|
+
case "scrollInView":
|
|
506
|
+
bindScrollInViewAnimation(t);
|
|
507
|
+
break;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function warnElementNotPresent(e) {
|
|
511
|
+
console.warn(`Cannot animate element: element with ID ${e} not found!`);
|
|
512
|
+
}
|
|
513
|
+
function augmentAnimation(e, t) {
|
|
514
|
+
const n = getAllStylesUsed(e), o = getComputedStyle(t), r = e.steps[0].styles, s = e.steps[e.steps.length - 1].styles, i = [r, s];
|
|
515
|
+
for (const a of i)
|
|
516
|
+
for (const l of n)
|
|
517
|
+
l in a || (a[l] = o[l]);
|
|
518
|
+
}
|
|
519
|
+
function getAllStylesUsed(e) {
|
|
520
|
+
const t = [];
|
|
521
|
+
for (const n of e.steps)
|
|
522
|
+
for (const o in n.styles)
|
|
523
|
+
t.indexOf(o) === -1 && t.push(o);
|
|
524
|
+
return t;
|
|
525
|
+
}
|
|
526
|
+
function triggerAnimation(e) {
|
|
527
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
528
|
+
if (!t.length) {
|
|
529
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
Array.from(t).forEach((n) => {
|
|
533
|
+
augmentAnimation(e, n), n.style.transition = "none", n.style.transitionDelay = "0", assign(n.style, e.steps[0].styles), setTimeout(() => {
|
|
534
|
+
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s"), assign(n.style, e.steps[1].styles), setTimeout(() => {
|
|
535
|
+
n.style.transition = "", n.style.transitionDelay = "";
|
|
536
|
+
}, (e.delay || 0) * 1e3 + e.duration * 1e3 + 100);
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
function bindHoverAnimation(e) {
|
|
541
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
542
|
+
if (!t.length) {
|
|
543
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
Array.from(t).forEach((n) => {
|
|
547
|
+
augmentAnimation(e, n);
|
|
548
|
+
const o = e.steps[0].styles, r = e.steps[1].styles;
|
|
549
|
+
function s() {
|
|
550
|
+
assign(n.style, o);
|
|
551
|
+
}
|
|
552
|
+
function i() {
|
|
553
|
+
assign(n.style, r);
|
|
554
|
+
}
|
|
555
|
+
s(), n.addEventListener("mouseenter", i), n.addEventListener("mouseleave", s), setTimeout(() => {
|
|
556
|
+
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
function bindScrollInViewAnimation(e) {
|
|
561
|
+
const t = Array.prototype.slice.call(document.getElementsByClassName(e.elementId || e.id || ""));
|
|
562
|
+
if (!t.length) {
|
|
563
|
+
warnElementNotPresent(e.elementId || e.id || "");
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
Array.from(t).forEach((n) => {
|
|
567
|
+
augmentAnimation(e, n);
|
|
568
|
+
let o = !1, r = !1;
|
|
569
|
+
function s() {
|
|
570
|
+
!o && a(n) ? (o = !0, r = !0, setTimeout(() => {
|
|
571
|
+
assign(n.style, e.steps[1].styles), e.repeat || document.removeEventListener("scroll", i), setTimeout(() => {
|
|
572
|
+
r = !1, e.repeat || (n.style.transition = "", n.style.transitionDelay = "");
|
|
573
|
+
}, (e.duration + (e.delay || 0)) * 1e3 + 100);
|
|
574
|
+
})) : e.repeat && o && !r && !a(n) && (o = !1, assign(n.style, e.steps[0].styles));
|
|
575
|
+
}
|
|
576
|
+
const i = throttle(s, 200, {
|
|
577
|
+
leading: !1
|
|
578
|
+
});
|
|
579
|
+
function a(d) {
|
|
580
|
+
const u = d.getBoundingClientRect(), p = window.innerHeight, f = (e.thresholdPercent || 0) / 100 * p;
|
|
581
|
+
return u.bottom > f && u.top < p - f;
|
|
582
|
+
}
|
|
583
|
+
const l = e.steps[0].styles;
|
|
584
|
+
function c() {
|
|
585
|
+
assign(n.style, l);
|
|
586
|
+
}
|
|
587
|
+
c(), setTimeout(() => {
|
|
588
|
+
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
589
|
+
}), document.addEventListener("scroll", i, {
|
|
590
|
+
capture: !0,
|
|
591
|
+
passive: !0
|
|
592
|
+
}), s();
|
|
593
|
+
});
|
|
594
|
+
}
|
|
473
595
|
const getComponent = ({
|
|
474
596
|
block: e,
|
|
475
597
|
context: t,
|
|
@@ -525,22 +647,22 @@ const getComponent = ({
|
|
|
525
647
|
},
|
|
526
648
|
block: o
|
|
527
649
|
}));
|
|
528
|
-
}, BlockStyles = () => import("./block-styles.
|
|
650
|
+
}, BlockStyles = () => import("./block-styles.effd674a.js").then((e) => e.default).catch((e) => {
|
|
529
651
|
throw console.error(
|
|
530
652
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
531
653
|
e
|
|
532
654
|
), e;
|
|
533
|
-
}), BlockWrapper = () => import("./block-wrapper.
|
|
655
|
+
}), BlockWrapper = () => import("./block-wrapper.80b8925e.js").then((e) => e.default).catch((e) => {
|
|
534
656
|
throw console.error(
|
|
535
657
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
536
658
|
e
|
|
537
659
|
), e;
|
|
538
|
-
}), ComponentRef = () => import("./component-ref.
|
|
660
|
+
}), ComponentRef = () => import("./component-ref.aec34fe0.js").then((e) => e.default).catch((e) => {
|
|
539
661
|
throw console.error(
|
|
540
662
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
541
663
|
e
|
|
542
664
|
), e;
|
|
543
|
-
}), RepeatedBlock = () => import("./repeated-block.
|
|
665
|
+
}), RepeatedBlock = () => import("./repeated-block.d6e97a4f.js").then((e) => e.default).catch((e) => {
|
|
544
666
|
throw console.error(
|
|
545
667
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
546
668
|
e
|
|
@@ -557,6 +679,15 @@ const getComponent = ({
|
|
|
557
679
|
data() {
|
|
558
680
|
return { childrenContext: this.context };
|
|
559
681
|
},
|
|
682
|
+
mounted() {
|
|
683
|
+
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
684
|
+
t && e && bindAnimations(
|
|
685
|
+
t.filter((n) => n.trigger !== "hover").map((n) => ({
|
|
686
|
+
...n,
|
|
687
|
+
elementId: e
|
|
688
|
+
}))
|
|
689
|
+
);
|
|
690
|
+
},
|
|
560
691
|
computed: {
|
|
561
692
|
blockComponent() {
|
|
562
693
|
return getComponent({
|
|
@@ -623,14 +754,14 @@ const getComponent = ({
|
|
|
623
754
|
}
|
|
624
755
|
});
|
|
625
756
|
function _sfc_render$h(e, t, n, o, r, s) {
|
|
626
|
-
var
|
|
757
|
+
var u;
|
|
627
758
|
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), c = resolveComponent("block-wrapper"), d = resolveComponent("repeated-block");
|
|
628
759
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
629
760
|
createVNode(i, {
|
|
630
761
|
block: e.block,
|
|
631
762
|
context: e.context
|
|
632
763
|
}, null, 8, ["block", "context"]),
|
|
633
|
-
(
|
|
764
|
+
(u = e.blockComponent) != null && u.noWrap ? (openBlock(), createBlock(a, {
|
|
634
765
|
key: 1,
|
|
635
766
|
componentRef: e.componentRefProps.componentRef,
|
|
636
767
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -642,10 +773,10 @@ function _sfc_render$h(e, t, n, o, r, s) {
|
|
|
642
773
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
643
774
|
isInteractive: e.componentRefProps.isInteractive
|
|
644
775
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"])) : (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
645
|
-
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (
|
|
776
|
+
e.repeatItem ? (openBlock(!0), createElementBlock(Fragment$1, { key: 1 }, renderList(e.repeatItem, (p, m) => (openBlock(), createBlock(d, {
|
|
646
777
|
key: m,
|
|
647
|
-
repeatContext:
|
|
648
|
-
block:
|
|
778
|
+
repeatContext: p.context,
|
|
779
|
+
block: p.block,
|
|
649
780
|
registeredComponents: e.registeredComponents,
|
|
650
781
|
linkComponent: e.linkComponent
|
|
651
782
|
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(c, {
|
|
@@ -667,9 +798,9 @@ function _sfc_render$h(e, t, n, o, r, s) {
|
|
|
667
798
|
includeBlockProps: e.componentRefProps.includeBlockProps,
|
|
668
799
|
isInteractive: e.componentRefProps.isInteractive
|
|
669
800
|
}, null, 8, ["componentRef", "componentOptions", "blockChildren", "context", "registeredComponents", "linkComponent", "builderBlock", "includeBlockProps", "isInteractive"]),
|
|
670
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (
|
|
671
|
-
key:
|
|
672
|
-
block:
|
|
801
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, m) => (openBlock(), createBlock(l, {
|
|
802
|
+
key: p.id,
|
|
803
|
+
block: p,
|
|
673
804
|
context: e.childrenContext,
|
|
674
805
|
registeredComponents: e.registeredComponents,
|
|
675
806
|
linkComponent: e.linkComponent
|
|
@@ -773,7 +904,7 @@ function _sfc_render$f(e, t, n, o, r, s) {
|
|
|
773
904
|
BlocksWrapperProps: (c = e.context) == null ? void 0 : c.BlocksWrapperProps
|
|
774
905
|
}, {
|
|
775
906
|
default: withCtx(() => [
|
|
776
|
-
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (d,
|
|
907
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (d, u) => (openBlock(), createBlock(i, {
|
|
777
908
|
key: d.id,
|
|
778
909
|
block: d,
|
|
779
910
|
linkComponent: e.linkComponent,
|
|
@@ -1680,13 +1811,13 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9
|
|
|
1680
1811
|
function n(i, a = 6e4) {
|
|
1681
1812
|
return new Promise((l, c) => {
|
|
1682
1813
|
const d = document.createElement("img");
|
|
1683
|
-
let
|
|
1814
|
+
let u = !1;
|
|
1684
1815
|
d.onload = () => {
|
|
1685
|
-
|
|
1686
|
-
}, d.addEventListener("error", (
|
|
1687
|
-
console.warn("Image load failed",
|
|
1816
|
+
u = !0, l(d);
|
|
1817
|
+
}, d.addEventListener("error", (p) => {
|
|
1818
|
+
console.warn("Image load failed", p.error), c(p.error);
|
|
1688
1819
|
}), d.src = i, setTimeout(() => {
|
|
1689
|
-
|
|
1820
|
+
u || c(new Error("Image load timed out"));
|
|
1690
1821
|
}, a);
|
|
1691
1822
|
});
|
|
1692
1823
|
}
|
|
@@ -2085,7 +2216,7 @@ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]
|
|
|
2085
2216
|
}
|
|
2086
2217
|
};
|
|
2087
2218
|
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2088
|
-
var i, a, l, c, d,
|
|
2219
|
+
var i, a, l, c, d, u, p;
|
|
2089
2220
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2090
2221
|
createElementVNode("video", mergeProps({
|
|
2091
2222
|
class: "builder-video",
|
|
@@ -2123,7 +2254,7 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2123
2254
|
((d = (c = e.builderBlock) == null ? void 0 : c.children) == null ? void 0 : d.length) && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2124
2255
|
renderSlot(e.$slots, "default")
|
|
2125
2256
|
])) : createCommentVNode("v-if", !0),
|
|
2126
|
-
((
|
|
2257
|
+
((p = (u = e.builderBlock) == null ? void 0 : u.children) == null ? void 0 : p.length) && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2127
2258
|
renderSlot(e.$slots, "default")
|
|
2128
2259
|
])) : createCommentVNode("v-if", !0)
|
|
2129
2260
|
]);
|
|
@@ -2351,8 +2482,8 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
2351
2482
|
enrich: l,
|
|
2352
2483
|
locale: c,
|
|
2353
2484
|
apiVersion: d = DEFAULT_API_VERSION,
|
|
2354
|
-
fields:
|
|
2355
|
-
omit:
|
|
2485
|
+
fields: u,
|
|
2486
|
+
omit: p,
|
|
2356
2487
|
offset: m,
|
|
2357
2488
|
cacheSeconds: f,
|
|
2358
2489
|
staleCacheSeconds: b,
|
|
@@ -2365,7 +2496,7 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
2365
2496
|
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${d}'`);
|
|
2366
2497
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
2367
2498
|
const g = new URL(`https://cdn.builder.io/api/${d}/content/${s}?apiKey=${i}&limit=${n}&noTraverse=${t}&includeRefs=${a}${c ? `&locale=${c}` : ""}${l ? `&enrich=${l}` : ""}`);
|
|
2368
|
-
if (g.searchParams.set("omit",
|
|
2499
|
+
if (g.searchParams.set("omit", p || "meta.componentsUsed"), u && g.searchParams.set("fields", u), Number.isFinite(m) && m > -1 && g.searchParams.set("offset", String(Math.floor(m))), typeof S == "boolean" && g.searchParams.set("includeUnpublished", String(S)), f && isPositiveNumber(f) && g.searchParams.set("cacheSeconds", String(f)), b && isPositiveNumber(b) && g.searchParams.set("staleCacheSeconds", String(b)), y) {
|
|
2369
2500
|
const k = flatten({
|
|
2370
2501
|
sort: y
|
|
2371
2502
|
});
|
|
@@ -2618,7 +2749,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2618
2749
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2619
2750
|
}
|
|
2620
2751
|
};
|
|
2621
|
-
}, SDK_VERSION = "0.12.
|
|
2752
|
+
}, SDK_VERSION = "0.12.7", registry = {};
|
|
2622
2753
|
function register(e, t) {
|
|
2623
2754
|
let n = registry[e];
|
|
2624
2755
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2687,19 +2818,19 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2687
2818
|
switch (r.type) {
|
|
2688
2819
|
case "builder.evaluate": {
|
|
2689
2820
|
const a = r.data.text, l = r.data.arguments || [], c = r.data.id, d = new Function(a);
|
|
2690
|
-
let
|
|
2821
|
+
let u, p = null;
|
|
2691
2822
|
try {
|
|
2692
|
-
|
|
2823
|
+
u = d.apply(null, l);
|
|
2693
2824
|
} catch (m) {
|
|
2694
|
-
|
|
2825
|
+
p = m;
|
|
2695
2826
|
}
|
|
2696
|
-
|
|
2827
|
+
p ? (s = window.parent) == null || s.postMessage({
|
|
2697
2828
|
type: "builder.evaluateError",
|
|
2698
2829
|
data: {
|
|
2699
2830
|
id: c,
|
|
2700
|
-
error:
|
|
2831
|
+
error: p.message
|
|
2701
2832
|
}
|
|
2702
|
-
}, "*") :
|
|
2833
|
+
}, "*") : u && typeof u.then == "function" ? u.then((m) => {
|
|
2703
2834
|
var f;
|
|
2704
2835
|
(f = window.parent) == null || f.postMessage({
|
|
2705
2836
|
type: "builder.evaluateResult",
|
|
@@ -2711,7 +2842,7 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2711
2842
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
2712
2843
|
type: "builder.evaluateResult",
|
|
2713
2844
|
data: {
|
|
2714
|
-
result:
|
|
2845
|
+
result: u,
|
|
2715
2846
|
id: c
|
|
2716
2847
|
}
|
|
2717
2848
|
}, "*");
|
|
@@ -2912,6 +3043,10 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2912
3043
|
}), this.forceReRenderCount = this.forceReRenderCount + 1;
|
|
2913
3044
|
break;
|
|
2914
3045
|
}
|
|
3046
|
+
case "builder.triggerAnimation": {
|
|
3047
|
+
triggerAnimation(t.data);
|
|
3048
|
+
break;
|
|
3049
|
+
}
|
|
2915
3050
|
case "builder.contentUpdate": {
|
|
2916
3051
|
const o = t.data, r = o.key || o.alias || o.entry || o.modelName, s = o.data;
|
|
2917
3052
|
r === this.model && (this.mergeNewContent(s), this.forceReRenderCount = this.forceReRenderCount + 1);
|
|
@@ -3278,7 +3413,7 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
3278
3413
|
trustedHosts: e.trustedHosts
|
|
3279
3414
|
}, {}), {
|
|
3280
3415
|
default: withCtx(() => {
|
|
3281
|
-
var d,
|
|
3416
|
+
var d, u, p, m, f, b, y;
|
|
3282
3417
|
return [
|
|
3283
3418
|
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
3284
3419
|
key: 0,
|
|
@@ -3287,7 +3422,7 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
3287
3422
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
3288
3423
|
key: 1,
|
|
3289
3424
|
contentId: (d = e.builderContextSignal.content) == null ? void 0 : d.id,
|
|
3290
|
-
cssCode: (
|
|
3425
|
+
cssCode: (p = (u = e.builderContextSignal.content) == null ? void 0 : u.data) == null ? void 0 : p.cssCode,
|
|
3291
3426
|
customFonts: (f = (m = e.builderContextSignal.content) == null ? void 0 : m.data) == null ? void 0 : f.customFonts
|
|
3292
3427
|
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("v-if", !0),
|
|
3293
3428
|
createVNode(l, {
|
|
@@ -3382,7 +3517,7 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
3382
3517
|
styles: e.hideVariantsStyleString
|
|
3383
3518
|
}, null, 8, ["id", "styles"]),
|
|
3384
3519
|
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
3385
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d,
|
|
3520
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (d, u) => (openBlock(), createBlock(l, {
|
|
3386
3521
|
key: d.testVariationId,
|
|
3387
3522
|
content: d,
|
|
3388
3523
|
showContent: !1,
|
|
@@ -3503,7 +3638,7 @@ const Content = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render
|
|
|
3503
3638
|
}
|
|
3504
3639
|
});
|
|
3505
3640
|
function _sfc_render(e, t, n, o, r, s) {
|
|
3506
|
-
var a, l, c, d,
|
|
3641
|
+
var a, l, c, d, u;
|
|
3507
3642
|
const i = resolveComponent("content-variants");
|
|
3508
3643
|
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
3509
3644
|
createVNode(i, {
|
|
@@ -3520,7 +3655,7 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
3520
3655
|
...e.builderContext.localState,
|
|
3521
3656
|
...(d = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : d.state
|
|
3522
3657
|
},
|
|
3523
|
-
model: (
|
|
3658
|
+
model: (u = e.symbol) == null ? void 0 : u.model,
|
|
3524
3659
|
content: e.contentToUse,
|
|
3525
3660
|
linkComponent: e.builderLinkComponent
|
|
3526
3661
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|