@builder.io/sdk-vue 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{awaiter-XqdWIlSd.cjs → awaiter-Go_v9R-Q.cjs} +1 -1
- package/lib/browser/{awaiter-pA1AuJSn.js → awaiter-f2v25MXG.js} +1 -1
- package/lib/browser/{block-styles-i6cpfJgi.cjs → block-styles-VvtOwAna.cjs} +1 -1
- package/lib/browser/{block-styles-ytvCIXMJ.js → block-styles-zLkeE8Yo.js} +1 -1
- package/lib/browser/{block-wrapper-UdxI8OCZ.js → block-wrapper-RHvSza0L.js} +3 -3
- package/lib/browser/{block-wrapper-4Ddr9Ro1.cjs → block-wrapper-W_D_Bb2d.cjs} +1 -1
- package/lib/browser/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/browser/blocks/text/text.vue.d.ts +1 -6
- package/lib/browser/{component-ref-1UbPu9gf.cjs → component-ref-OuSuLJu3.cjs} +1 -1
- package/lib/browser/{component-ref-CKlhzm4D.js → component-ref-QZVWIf-w.js} +3 -3
- package/lib/browser/components/block/block.helpers.d.ts +4 -3
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- package/lib/browser/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/browser/components/content/content.vue.d.ts +7 -6
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/browser/constants/file-types.d.ts +2 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/context/builder.context.d.ts +1 -0
- package/lib/browser/context/types.d.ts +1 -0
- package/lib/browser/functions/extract-localized-values.d.ts +2 -0
- package/lib/browser/functions/get-block-component-options.d.ts +2 -1
- package/lib/browser/functions/get-processed-block.d.ts +1 -6
- package/lib/browser/functions/traverse.d.ts +34 -0
- package/lib/browser/{get-block-properties-pUTK7jyd.cjs → get-block-properties-COMGTr9K.cjs} +1 -1
- package/lib/browser/{get-block-properties-C5uVrmU3.js → get-block-properties-IUSNX0SS.js} +1 -1
- package/lib/browser/helpers/flatten.d.ts +6 -0
- package/lib/browser/index-M-gfkd7t.cjs +166 -0
- package/lib/browser/{index-tDGIvfSj.js → index-mAw516k1.js} +969 -887
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{repeated-block-9RoptQEu.js → repeated-block-9wsw76F2.js} +2 -2
- package/lib/browser/{repeated-block-h7zSwvTu.cjs → repeated-block-nE8lZjb_.cjs} +1 -1
- package/lib/browser/server-index.d.ts +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/components.d.ts +3 -0
- package/lib/edge/{awaiter-yLbJL6E0.js → awaiter-4_rv9wh9.js} +1 -1
- package/lib/edge/{awaiter-V9rb_a7Q.cjs → awaiter-e1RaAwPG.cjs} +1 -1
- package/lib/edge/{block-styles-ZvyyqPxg.cjs → block-styles-83ja5Ixf.cjs} +1 -1
- package/lib/edge/{block-styles-8rJVuUSs.js → block-styles-KCVLt7eI.js} +1 -1
- package/lib/edge/{block-wrapper-jr4gy0mp.js → block-wrapper-FpChCEPR.js} +3 -3
- package/lib/edge/{block-wrapper-m7_ZegT7.cjs → block-wrapper-z1tA6pLu.cjs} +1 -1
- package/lib/edge/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/edge/blocks/text/text.vue.d.ts +1 -6
- package/lib/edge/{component-ref-_qPvv-Qb.cjs → component-ref-hZs-PJf_.cjs} +1 -1
- package/lib/edge/{component-ref-uZEXLaN7.js → component-ref-oYtINbYY.js} +3 -3
- package/lib/edge/components/block/block.helpers.d.ts +4 -3
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- package/lib/edge/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/edge/components/content/content.vue.d.ts +7 -6
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/edge/constants/file-types.d.ts +2 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/context/builder.context.d.ts +1 -0
- package/lib/edge/context/types.d.ts +1 -0
- package/lib/edge/functions/extract-localized-values.d.ts +2 -0
- package/lib/edge/functions/get-block-component-options.d.ts +2 -1
- package/lib/edge/functions/get-processed-block.d.ts +1 -6
- package/lib/edge/functions/traverse.d.ts +34 -0
- package/lib/edge/{get-block-properties-4gxUIMch.cjs → get-block-properties-WHU9TAQT.cjs} +1 -1
- package/lib/edge/{get-block-properties-IQuU2YJ7.js → get-block-properties-g6seSIll.js} +1 -1
- package/lib/edge/helpers/flatten.d.ts +6 -0
- package/lib/edge/index-Gb_tMZnR.cjs +184 -0
- package/lib/edge/{index-Qfd4FC6c.js → index-fTtKR2Pq.js} +1515 -1435
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{repeated-block-J3gmF8cW.js → repeated-block-_kwPuyY0.js} +2 -2
- package/lib/{node/repeated-block-sc5a_YJK.cjs → edge/repeated-block-o16gyhl8.cjs} +1 -1
- package/lib/edge/server-index.d.ts +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/components.d.ts +3 -0
- package/lib/node/{awaiter-pBLgVddK.cjs → awaiter-EKc5xDU7.cjs} +1 -1
- package/lib/node/{awaiter-yHq7zte0.js → awaiter-yTUISQzQ.js} +1 -1
- package/lib/node/{block-styles-JKmWb0f1.cjs → block-styles-KsyPudvY.cjs} +1 -1
- package/lib/node/{block-styles-UKsSQRSe.js → block-styles-Z4CBN1bX.js} +1 -1
- package/lib/node/{block-wrapper-Ql9JBZTu.js → block-wrapper-KpJ-EQWT.js} +3 -3
- package/lib/node/{block-wrapper-UkD5beND.cjs → block-wrapper-wfmJ-Is8.cjs} +1 -1
- package/lib/node/blocks/form/select/select.vue.d.ts +3 -3
- package/lib/node/blocks/text/text.vue.d.ts +1 -6
- package/lib/node/{component-ref-GQuqlfCd.js → component-ref-PIZE59-x.js} +3 -3
- package/lib/node/{component-ref-KSw6L492.cjs → component-ref-dZr5pqVw.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +4 -3
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +2 -2
- package/lib/node/components/content/components/enable-editor.helpers.d.ts +11 -0
- package/lib/node/components/content/components/enable-editor.vue.d.ts +8 -6
- package/lib/node/components/content/content.vue.d.ts +7 -6
- package/lib/node/components/content-variants/content-variants.vue.d.ts +6 -6
- package/lib/node/constants/file-types.d.ts +2 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/context/builder.context.d.ts +1 -0
- package/lib/node/context/types.d.ts +1 -0
- package/lib/node/functions/extract-localized-values.d.ts +2 -0
- package/lib/node/functions/get-block-component-options.d.ts +2 -1
- package/lib/node/functions/get-processed-block.d.ts +1 -6
- package/lib/node/functions/traverse.d.ts +34 -0
- package/lib/node/{get-block-properties-RPZW1-a0.cjs → get-block-properties-XFifmVHz.cjs} +1 -1
- package/lib/node/{get-block-properties-y-gYAn-I.js → get-block-properties-YmWkYu_d.js} +1 -1
- package/lib/node/helpers/flatten.d.ts +6 -0
- package/lib/node/{index-5bUk_uLu.js → index-PmCPg9YL.js} +901 -819
- package/lib/node/index-_D8PBs-1.cjs +166 -0
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +1 -1
- package/lib/{edge/repeated-block-48-vVIqv.cjs → node/repeated-block-p1vrucwi.cjs} +1 -1
- package/lib/node/{repeated-block-_Z2mgv3f.js → repeated-block-qSSzvRZP.js} +2 -2
- package/lib/node/server-index.d.ts +1 -1
- package/lib/node/style.css +1 -1
- package/lib/node/types/components.d.ts +3 -0
- package/package.json +1 -1
- package/lib/browser/index-N0sk5VKQ.cjs +0 -166
- package/lib/edge/index-LY5CDeZs.cjs +0 -184
- package/lib/node/index-W6CSiGOt.cjs +0 -166
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-M-gfkd7t.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,i,c,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-
|
|
1
|
+
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-M-gfkd7t.cjs"),f=l.defineComponent({name:"block-styles",components:{InlinedStyles:s._sfc_main},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const e=this.block;return s.checkIsDefined(e.hide)?!e.hide:s.checkIsDefined(e.show)?e.show:!0},css(){var y,p,h;const e=this.block,t=e.responsiveStyles,r=this.context.content,a=s.getSizesForBreakpoints(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),i=t==null?void 0:t.large,d=t==null?void 0:t.medium,c=t==null?void 0:t.small,n=e.id;if(!n)return"";const S=i?s.createCssClass({className:n,styles:i}):"",k=d?s.createCssClass({className:n,styles:d,mediaQuery:s.getMaxWidthQueryForSize("medium",a)}):"",C=c?s.createCssClass({className:n,styles:c,mediaQuery:s.getMaxWidthQueryForSize("small",a)}):"",o=e.animations&&e.animations.find(m=>m.trigger==="hover");let u="";if(o){const m=((h=(p=o.steps)==null?void 0:p[1])==null?void 0:h.styles)||{};u=s.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${o.duration}s ${s.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[S,k,C,u].join(" ")}}});function b(e,t,r,a,i,d){const c=l.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(l.openBlock(),l.createBlock(c,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):l.createCommentVNode("",!0)}const g=s._export_sfc(f,[["render",b]]);exports.default=g;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as C, resolveComponent as g, openBlock as $, createBlock as v, createCommentVNode as B } from "vue";
|
|
3
|
-
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-
|
|
3
|
+
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-mAw516k1.js";
|
|
4
4
|
const z = C({
|
|
5
5
|
name: "block-styles",
|
|
6
6
|
components: { InlinedStyles: _ },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
3
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
4
|
-
import { e as m } from "./index-
|
|
5
|
-
const d = () => import("./index-
|
|
3
|
+
import { g as s, a as l } from "./get-block-properties-IUSNX0SS.js";
|
|
4
|
+
import { e as m } from "./index-mAw516k1.js";
|
|
5
|
+
const d = () => import("./index-mAw516k1.js").then((e) => e.E).then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
8
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-COMGTr9K.cjs"),n=require("./index-M-gfkd7t.cjs"),c=()=>Promise.resolve().then(()=>require("./index-M-gfkd7t.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
|
|
@@ -17,8 +17,8 @@ export interface FormSelectProps {
|
|
|
17
17
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
18
18
|
name?: any;
|
|
19
19
|
value?: any;
|
|
20
|
-
attributes?: any;
|
|
21
20
|
options?: any;
|
|
21
|
+
attributes?: any;
|
|
22
22
|
defaultValue?: any;
|
|
23
23
|
required?: any;
|
|
24
24
|
}>, unknown, {
|
|
@@ -27,15 +27,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
27
27
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
28
28
|
name?: any;
|
|
29
29
|
value?: any;
|
|
30
|
-
attributes?: any;
|
|
31
30
|
options?: any;
|
|
31
|
+
attributes?: any;
|
|
32
32
|
defaultValue?: any;
|
|
33
33
|
required?: any;
|
|
34
34
|
}>>>, {
|
|
35
35
|
readonly name?: any;
|
|
36
36
|
readonly value?: any;
|
|
37
|
-
readonly attributes?: any;
|
|
38
37
|
readonly options?: any;
|
|
38
|
+
readonly attributes?: any;
|
|
39
39
|
readonly defaultValue?: any;
|
|
40
40
|
readonly required?: any;
|
|
41
41
|
}, {}>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
2
|
text?: any;
|
|
3
|
-
|
|
4
|
-
}>, unknown, unknown, {
|
|
5
|
-
processedText(): string;
|
|
6
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
3
|
+
}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
7
4
|
text?: any;
|
|
8
|
-
builderContext?: any;
|
|
9
5
|
}>>>, {
|
|
10
6
|
readonly text?: any;
|
|
11
|
-
readonly builderContext?: any;
|
|
12
7
|
}, {}>;
|
|
13
8
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-M-gfkd7t.cjs"),a=require("./get-block-properties-COMGTr9K.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-Go_v9R-Q.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),d=t.defineComponent({name:"interactive-element",components:{Awaiter:t.defineAsyncComponent(u)},props:["includeBlockProps","block","context","Wrapper","wrapperProps"],computed:{attributes(){return this.includeBlockProps?{...a.getBlockProperties({block:this.block,context:this.context}),...a.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function f(e,n,s,i,r,l){const o=t.resolveComponent("Awaiter");return e.Wrapper.load?(t.openBlock(),t.createBlock(o,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))}const m=c._export_sfc(d,[["render",f]]),b=({componentOptions:e,builderBlock:n,context:s,componentRef:i,includeBlockProps:r,isInteractive:l,contextValue:o})=>{const p={...e,...r?{attributes:a.getBlockProperties({block:n,context:o})}:{}};return l?{Wrapper:i,block:n,context:s,wrapperProps:e,includeBlockProps:r}:p},B=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function C(e,n,s,i,r,l){const o=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildren,(p,k)=>(t.openBlock(),t.createBlock(o,{key:p.id,block:p,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const h=c._export_sfc(B,[["render",C]]);exports.default=h;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as d, defineAsyncComponent as P, resolveComponent as k, openBlock as o, createBlock as a, withCtx as l, renderSlot as m, resolveDynamicComponent as f, mergeProps as b, normalizeProps as B, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as W } from "vue";
|
|
3
|
-
import { e as h, B as S, w as y } from "./index-
|
|
4
|
-
import { a as C, g as A } from "./get-block-properties-
|
|
5
|
-
const R = () => import("./awaiter-
|
|
3
|
+
import { e as h, B as S, w as y } from "./index-mAw516k1.js";
|
|
4
|
+
import { a as C, g as A } from "./get-block-properties-IUSNX0SS.js";
|
|
5
|
+
const R = () => import("./awaiter-f2v25MXG.js").then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
8
8
|
e
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { BuilderContextInterface, RegisteredComponent, RegisteredComponents } from '../../context/types';
|
|
2
2
|
import type { BuilderBlock } from '../../types/builder-block';
|
|
3
3
|
import type { RepeatData } from './types';
|
|
4
|
-
export declare const getComponent: ({ block, registeredComponents }: {
|
|
4
|
+
export declare const getComponent: ({ block, registeredComponents, model }: {
|
|
5
5
|
block: BuilderBlock;
|
|
6
6
|
registeredComponents: RegisteredComponents;
|
|
7
|
+
model: string;
|
|
7
8
|
}) => RegisteredComponent | null | undefined;
|
|
8
9
|
export declare const getRepeatItemData: ({ block, context }: {
|
|
9
10
|
block: BuilderBlock;
|
|
@@ -18,8 +19,8 @@ export declare const provideLinkComponent: (block: RegisteredComponent | null |
|
|
|
18
19
|
} | {
|
|
19
20
|
builderLinkComponent?: undefined;
|
|
20
21
|
};
|
|
21
|
-
export declare const provideRegisteredComponents: (block: RegisteredComponent | null | undefined, registeredComponents: RegisteredComponents) => {
|
|
22
|
-
builderComponents:
|
|
22
|
+
export declare const provideRegisteredComponents: (block: RegisteredComponent | null | undefined, registeredComponents: RegisteredComponents, model: string) => {
|
|
23
|
+
builderComponents: any;
|
|
23
24
|
} | {
|
|
24
25
|
builderComponents?: undefined;
|
|
25
26
|
};
|
|
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
12
12
|
}>, unknown, {
|
|
13
13
|
Wrapper: any;
|
|
14
14
|
getWrapperProps: ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }: Omit<ComponentProps, "registeredComponents" | "blockChildren"> & {
|
|
15
|
-
contextValue: import("
|
|
15
|
+
contextValue: import("../../../..").BuilderContextInterface;
|
|
16
16
|
}) => import("../interactive-element.vue").InteractiveElementProps | {
|
|
17
17
|
attributes?: {
|
|
18
18
|
'builder-id': string | undefined;
|
|
@@ -22,7 +22,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
22
22
|
[index: string]: any;
|
|
23
23
|
} | undefined;
|
|
24
24
|
builderBlock: import("../../../..").BuilderBlock;
|
|
25
|
-
builderContext: import("
|
|
25
|
+
builderContext: import("../../../..").BuilderContextInterface;
|
|
26
26
|
};
|
|
27
27
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
28
28
|
context?: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Target } from '../../../types/targets';
|
|
2
|
+
/**
|
|
3
|
+
* SDKS that use the elementRef approach to enable visual editing.
|
|
4
|
+
* We don't need to render the div for other SDKs as they attach event listeners to the window.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SDKS_USING_ELEMENT_REF_APPROACH: Target[];
|
|
7
|
+
/**
|
|
8
|
+
* We need to attach this div only when content exists or isPreviewing/isEditing even when content is null,
|
|
9
|
+
* as we need to set the elementRef and allow previewing and visual editing
|
|
10
|
+
*/
|
|
11
|
+
export declare const needsElementRefDivForEditing: () => boolean;
|
|
@@ -5,12 +5,12 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
5
5
|
context?: any;
|
|
6
6
|
content?: any;
|
|
7
7
|
apiKey?: any;
|
|
8
|
+
model?: any;
|
|
8
9
|
canTrack?: any;
|
|
10
|
+
locale?: any;
|
|
9
11
|
apiHost?: any;
|
|
10
|
-
model?: any;
|
|
11
12
|
trustedHosts?: any;
|
|
12
13
|
showContent?: any;
|
|
13
|
-
locale?: any;
|
|
14
14
|
enrich?: any;
|
|
15
15
|
contentWrapper?: any;
|
|
16
16
|
contentWrapperProps?: any;
|
|
@@ -35,9 +35,11 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
35
35
|
BlocksWrapper: string;
|
|
36
36
|
BlocksWrapperProps: {};
|
|
37
37
|
nonce: string;
|
|
38
|
+
model: string;
|
|
38
39
|
};
|
|
39
40
|
key: symbol;
|
|
40
41
|
};
|
|
42
|
+
needsElementRefDivForEditing: () => boolean;
|
|
41
43
|
getWrapperClassName: (variationId?: string | undefined) => string;
|
|
42
44
|
}, {
|
|
43
45
|
showContentProps(): {
|
|
@@ -73,12 +75,12 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
73
75
|
context?: any;
|
|
74
76
|
content?: any;
|
|
75
77
|
apiKey?: any;
|
|
78
|
+
model?: any;
|
|
76
79
|
canTrack?: any;
|
|
80
|
+
locale?: any;
|
|
77
81
|
apiHost?: any;
|
|
78
|
-
model?: any;
|
|
79
82
|
trustedHosts?: any;
|
|
80
83
|
showContent?: any;
|
|
81
|
-
locale?: any;
|
|
82
84
|
enrich?: any;
|
|
83
85
|
contentWrapper?: any;
|
|
84
86
|
contentWrapperProps?: any;
|
|
@@ -89,12 +91,12 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
89
91
|
readonly context?: any;
|
|
90
92
|
readonly content?: any;
|
|
91
93
|
readonly apiKey?: any;
|
|
94
|
+
readonly model?: any;
|
|
92
95
|
readonly canTrack?: any;
|
|
96
|
+
readonly locale?: any;
|
|
93
97
|
readonly apiHost?: any;
|
|
94
|
-
readonly model?: any;
|
|
95
98
|
readonly trustedHosts?: any;
|
|
96
99
|
readonly showContent?: any;
|
|
97
|
-
readonly locale?: any;
|
|
98
100
|
readonly enrich?: any;
|
|
99
101
|
readonly contentWrapper?: any;
|
|
100
102
|
readonly contentWrapperProps?: any;
|
|
@@ -8,15 +8,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
8
8
|
apiKey?: any;
|
|
9
9
|
apiVersion?: any;
|
|
10
10
|
nonce?: any;
|
|
11
|
+
model?: any;
|
|
11
12
|
canTrack?: any;
|
|
13
|
+
locale?: any;
|
|
12
14
|
apiHost?: any;
|
|
13
|
-
model?: any;
|
|
14
15
|
trustedHosts?: any;
|
|
15
16
|
showContent?: any;
|
|
16
17
|
isSsrAbTest?: any;
|
|
17
18
|
customComponents?: any;
|
|
18
19
|
linkComponent?: any;
|
|
19
|
-
locale?: any;
|
|
20
20
|
enrich?: any;
|
|
21
21
|
contentWrapper?: any;
|
|
22
22
|
contentWrapperProps?: any;
|
|
@@ -42,6 +42,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
42
42
|
BlocksWrapper: any;
|
|
43
43
|
BlocksWrapperProps: any;
|
|
44
44
|
nonce: any;
|
|
45
|
+
model: any;
|
|
45
46
|
};
|
|
46
47
|
TARGET: import("../../types/targets").Target;
|
|
47
48
|
}, {}, {
|
|
@@ -53,15 +54,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
53
54
|
apiKey?: any;
|
|
54
55
|
apiVersion?: any;
|
|
55
56
|
nonce?: any;
|
|
57
|
+
model?: any;
|
|
56
58
|
canTrack?: any;
|
|
59
|
+
locale?: any;
|
|
57
60
|
apiHost?: any;
|
|
58
|
-
model?: any;
|
|
59
61
|
trustedHosts?: any;
|
|
60
62
|
showContent?: any;
|
|
61
63
|
isSsrAbTest?: any;
|
|
62
64
|
customComponents?: any;
|
|
63
65
|
linkComponent?: any;
|
|
64
|
-
locale?: any;
|
|
65
66
|
enrich?: any;
|
|
66
67
|
contentWrapper?: any;
|
|
67
68
|
contentWrapperProps?: any;
|
|
@@ -75,15 +76,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
75
76
|
readonly apiKey?: any;
|
|
76
77
|
readonly apiVersion?: any;
|
|
77
78
|
readonly nonce?: any;
|
|
79
|
+
readonly model?: any;
|
|
78
80
|
readonly canTrack?: any;
|
|
81
|
+
readonly locale?: any;
|
|
79
82
|
readonly apiHost?: any;
|
|
80
|
-
readonly model?: any;
|
|
81
83
|
readonly trustedHosts?: any;
|
|
82
84
|
readonly showContent?: any;
|
|
83
85
|
readonly isSsrAbTest?: any;
|
|
84
86
|
readonly customComponents?: any;
|
|
85
87
|
readonly linkComponent?: any;
|
|
86
|
-
readonly locale?: any;
|
|
87
88
|
readonly enrich?: any;
|
|
88
89
|
readonly contentWrapper?: any;
|
|
89
90
|
readonly contentWrapperProps?: any;
|
|
@@ -5,13 +5,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
5
5
|
apiKey?: any;
|
|
6
6
|
apiVersion?: any;
|
|
7
7
|
nonce?: any;
|
|
8
|
+
model?: any;
|
|
8
9
|
canTrack?: any;
|
|
10
|
+
locale?: any;
|
|
9
11
|
apiHost?: any;
|
|
10
|
-
model?: any;
|
|
11
12
|
trustedHosts?: any;
|
|
12
13
|
customComponents?: any;
|
|
13
14
|
linkComponent?: any;
|
|
14
|
-
locale?: any;
|
|
15
15
|
enrich?: any;
|
|
16
16
|
contentWrapper?: any;
|
|
17
17
|
contentWrapperProps?: any;
|
|
@@ -57,13 +57,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
57
57
|
apiKey?: any;
|
|
58
58
|
apiVersion?: any;
|
|
59
59
|
nonce?: any;
|
|
60
|
+
model?: any;
|
|
60
61
|
canTrack?: any;
|
|
62
|
+
locale?: any;
|
|
61
63
|
apiHost?: any;
|
|
62
|
-
model?: any;
|
|
63
64
|
trustedHosts?: any;
|
|
64
65
|
customComponents?: any;
|
|
65
66
|
linkComponent?: any;
|
|
66
|
-
locale?: any;
|
|
67
67
|
enrich?: any;
|
|
68
68
|
contentWrapper?: any;
|
|
69
69
|
contentWrapperProps?: any;
|
|
@@ -77,13 +77,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
77
77
|
readonly apiKey?: any;
|
|
78
78
|
readonly apiVersion?: any;
|
|
79
79
|
readonly nonce?: any;
|
|
80
|
+
readonly model?: any;
|
|
80
81
|
readonly canTrack?: any;
|
|
82
|
+
readonly locale?: any;
|
|
81
83
|
readonly apiHost?: any;
|
|
82
|
-
readonly model?: any;
|
|
83
84
|
readonly trustedHosts?: any;
|
|
84
85
|
readonly customComponents?: any;
|
|
85
86
|
readonly linkComponent?: any;
|
|
86
|
-
readonly locale?: any;
|
|
87
87
|
readonly enrich?: any;
|
|
88
88
|
readonly contentWrapper?: any;
|
|
89
89
|
readonly contentWrapperProps?: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.2";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../context/types';
|
|
1
2
|
import type { BuilderBlock } from '../types/builder-block';
|
|
2
|
-
export declare function getBlockComponentOptions(block: BuilderBlock): any;
|
|
3
|
+
export declare function getBlockComponentOptions(block: BuilderBlock, context: Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): any;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block';
|
|
3
3
|
export declare function deepCloneWithConditions<T = any>(obj: T): T;
|
|
4
|
-
export declare function getProcessedBlock({ block, context,
|
|
4
|
+
export declare function getProcessedBlock({ block, context, localState, rootState, rootSetState }: {
|
|
5
5
|
block: BuilderBlock;
|
|
6
|
-
/**
|
|
7
|
-
* In some cases, we want to avoid evaluating bindings and only want framework-specific block transformation. It is
|
|
8
|
-
* also sometimes too early to consider bindings, e.g. when we might be looking at a repeated block.
|
|
9
|
-
*/
|
|
10
|
-
shouldEvaluateBindings: boolean;
|
|
11
6
|
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): BuilderBlock;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type TraverseCallback = (value: any, update: (newValue: any) => void) => void;
|
|
2
|
+
/**
|
|
3
|
+
* Recursively traverses an object or array, invoking a callback on each value.
|
|
4
|
+
*
|
|
5
|
+
* @param {any} obj - The object or array to traverse. Can also handle primitives, null, or undefined.
|
|
6
|
+
* @param {TraverseCallback} callback - The function to invoke on each value. Receives the current value
|
|
7
|
+
* and an `update` function to modify the value in its parent container.
|
|
8
|
+
* @param {any} [parent=null] - The parent object or array of the current value. Used internally.
|
|
9
|
+
* @param {any} [key=null] - The key or index of the current value in its parent. Used internally.
|
|
10
|
+
* @param {WeakSet} [visited=new WeakSet()] - Tracks visited objects to handle circular references. Used internally.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Example: Doubling all numbers in an object
|
|
14
|
+
* const obj = { a: 1, b: [2, 3, { c: 4 }] };
|
|
15
|
+
* traverse(obj, (value, update) => {
|
|
16
|
+
* if (typeof value === 'number') {
|
|
17
|
+
* update(value * 2);
|
|
18
|
+
* }
|
|
19
|
+
* });
|
|
20
|
+
* console.log(obj); // { a: 2, b: [4, 6, { c: 8 }] }
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Example: Handling circular references
|
|
24
|
+
* const obj = { a: 1 };
|
|
25
|
+
* obj.self = obj;
|
|
26
|
+
* traverse(obj, (value, update) => {
|
|
27
|
+
* if (typeof value === 'number') {
|
|
28
|
+
* update(value * 2);
|
|
29
|
+
* }
|
|
30
|
+
* });
|
|
31
|
+
* console.log(obj.a); // 2
|
|
32
|
+
*/
|
|
33
|
+
export declare function traverse(obj: any, callback: TraverseCallback, parent?: any, key?: any, visited?: WeakSet<object>): void;
|
|
34
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const s=require("./index-
|
|
1
|
+
var d=require("./style.css");const s=require("./index-M-gfkd7t.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=c(o);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(a,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style: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 u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
|
|
@@ -14,3 +14,9 @@ export declare function flatten<T extends Record<string, any>>(object: T, path?:
|
|
|
14
14
|
export declare function flattenMongoQuery(obj: any, _current?: any, _res?: any): {
|
|
15
15
|
[key: string]: string;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Unflatten a flat object with dot-separated keys back into a nested object.
|
|
19
|
+
*
|
|
20
|
+
* { 'foo.bar': 'baz' } -> { foo: { bar: 'baz' }}
|
|
21
|
+
*/
|
|
22
|
+
export declare function unflatten(obj: any): any;
|