@builder.io/sdk-vue 4.2.1 → 4.2.4
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-xp9lcSxP.cjs → awaiter-9j04A_GV.cjs} +1 -1
- package/lib/browser/{awaiter-522m_tb0.js → awaiter-k56NYxtZ.js} +1 -1
- package/lib/browser/{block-wrapper-9mehIM9T.cjs → block-wrapper-fa_I-FFZ.cjs} +1 -1
- package/lib/browser/{block-wrapper-26klNOq9.js → block-wrapper-nWZ8mnzV.js} +3 -3
- package/lib/browser/blocks/form/form/form.vue.d.ts +1 -0
- package/lib/browser/blocks/img/img.vue.d.ts +9 -2
- package/lib/browser/blocks/symbol/symbol.types.d.ts +1 -2
- package/lib/browser/blocks/symbol/symbol.vue.d.ts +1 -0
- package/lib/browser/blocks/tabs/tabs.vue.d.ts +1 -0
- package/lib/browser/{component-ref-IrVdrKrT.js → component-ref-809aE3jw.js} +68 -57
- package/lib/browser/component-ref-BiCTuNrm.cjs +1 -0
- package/lib/browser/components/awaiter.types.d.ts +7 -0
- package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
- package/lib/browser/components/block/components/interactive-element.vue.d.ts +6 -3
- package/lib/browser/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
- package/lib/browser/components/block/components/style-wrapper.vue.d.ts +15 -0
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +6 -2
- package/lib/browser/components/live-edit.vue.d.ts +17 -0
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/find-block-4FksmtpZ.js +30 -0
- package/lib/browser/find-block-FHyxDYzT.cjs +1 -0
- package/lib/browser/functions/get-builder-search-params/index.d.ts +8 -2
- package/lib/browser/functions/is-previewing.d.ts +11 -1
- package/lib/browser/{get-block-properties-OKep411k.cjs → get-block-properties-Wj-bZmuN.cjs} +1 -1
- package/lib/browser/{get-block-properties-QnM_YrNk.js → get-block-properties-hv2UC_Ak.js} +8 -8
- package/lib/browser/helpers/find-block.d.ts +18 -0
- package/lib/browser/helpers/subscribe-to-editor.d.ts +3 -2
- package/lib/browser/index-DRqRWus9.cjs +334 -0
- package/lib/browser/{index-dDcL7IfY.js → index-up0O4QOR.js} +635 -569
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +11 -11
- package/lib/browser/live-edit-u4CLwhz2.js +32 -0
- package/lib/browser/live-edit-yg5JQxHm.cjs +1 -0
- package/lib/browser/{repeated-block-nKx_42cr.cjs → repeated-block-0QfzfDq4.cjs} +1 -1
- package/lib/browser/{repeated-block-iOBHvqGU.js → repeated-block-pz96mjT3.js} +2 -2
- package/lib/browser/style-wrapper-XpqFC6zr.js +210 -0
- package/lib/browser/style-wrapper-lru4KPfF.cjs +1 -0
- package/lib/browser/style.css +1 -1
- package/lib/edge/{awaiter-inDvpJQO.js → awaiter-6dzFFSC3.js} +1 -1
- package/lib/edge/{awaiter-1mRIGpV6.cjs → awaiter-yiZL6S2H.cjs} +1 -1
- package/lib/{node/block-wrapper-02ftlAfU.cjs → edge/block-wrapper-f_-dny3h.cjs} +1 -1
- package/lib/edge/{block-wrapper-SsRgbO8V.js → block-wrapper-x_q82_kn.js} +3 -3
- package/lib/edge/blocks/form/form/form.vue.d.ts +1 -0
- package/lib/edge/blocks/img/img.vue.d.ts +9 -2
- package/lib/edge/blocks/symbol/symbol.types.d.ts +1 -2
- package/lib/edge/blocks/symbol/symbol.vue.d.ts +1 -0
- package/lib/edge/blocks/tabs/tabs.vue.d.ts +1 -0
- package/lib/edge/component-ref-6pdeZX03.cjs +1 -0
- package/lib/edge/{component-ref-xNhbKfn9.js → component-ref-o49BQXb9.js} +68 -57
- package/lib/edge/components/awaiter.types.d.ts +7 -0
- package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
- package/lib/edge/components/block/components/interactive-element.vue.d.ts +6 -3
- package/lib/edge/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
- package/lib/edge/components/block/components/style-wrapper.vue.d.ts +15 -0
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +6 -2
- package/lib/edge/components/live-edit.vue.d.ts +17 -0
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/find-block-3Ig0kVVe.js +29 -0
- package/lib/edge/find-block-FREohLcp.cjs +1 -0
- package/lib/edge/functions/get-builder-search-params/index.d.ts +8 -2
- package/lib/edge/functions/is-previewing.d.ts +11 -1
- package/lib/edge/{get-block-properties-gqcOodFf.cjs → get-block-properties-BZeTejYz.cjs} +1 -1
- package/lib/edge/{get-block-properties-YBHD-kyN.js → get-block-properties-rN_Wdewg.js} +10 -10
- package/lib/edge/helpers/find-block.d.ts +18 -0
- package/lib/edge/helpers/subscribe-to-editor.d.ts +3 -2
- package/lib/edge/{index-hzqKkVuy.js → index-YikH7lP_.js} +880 -814
- package/lib/edge/{index-KuatB8ic.cjs → index-j3k1FtDv.cjs} +27 -27
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +11 -11
- package/lib/edge/live-edit--OTgD3lj.js +31 -0
- package/lib/edge/live-edit-5TXPHULA.cjs +1 -0
- package/lib/{node/repeated-block-pKrhMIDV.cjs → edge/repeated-block-BcDLD-Ro.cjs} +1 -1
- package/lib/{node/repeated-block-dhWJ0p4C.js → edge/repeated-block-cY7tvCZ6.js} +2 -2
- package/lib/edge/style-wrapper-3dTutPaZ.js +209 -0
- package/lib/edge/style-wrapper-gIxKA8yk.cjs +1 -0
- package/lib/edge/style.css +1 -1
- package/lib/node/{awaiter-xwpDFIvR.cjs → awaiter-6p8mxokx.cjs} +1 -1
- package/lib/node/{awaiter-VENdQO6n.js → awaiter-iefQuuK5.js} +2 -2
- package/lib/{edge/block-wrapper-1wOAQ8jv.cjs → node/block-wrapper-JOi6L86W.cjs} +1 -1
- package/lib/node/{block-wrapper-YFKoP-Sr.js → block-wrapper-e7v8Xkfa.js} +5 -5
- package/lib/node/blocks/form/form/form.vue.d.ts +1 -0
- package/lib/node/blocks/img/img.vue.d.ts +9 -2
- package/lib/node/blocks/symbol/symbol.types.d.ts +1 -2
- package/lib/node/blocks/symbol/symbol.vue.d.ts +1 -0
- package/lib/node/blocks/tabs/tabs.vue.d.ts +1 -0
- package/lib/node/{component-ref-CL-UB2rM.js → component-ref--dFHHl9O.js} +70 -58
- package/lib/node/component-ref-cGDAecrm.cjs +1 -0
- package/lib/node/components/awaiter.types.d.ts +7 -0
- package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
- package/lib/node/components/block/components/interactive-element.vue.d.ts +6 -3
- package/lib/node/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
- package/lib/node/components/block/components/style-wrapper.vue.d.ts +15 -0
- package/lib/node/components/content/components/enable-editor.vue.d.ts +6 -2
- package/lib/node/components/live-edit.vue.d.ts +17 -0
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/find-block-3Ig0kVVe.js +29 -0
- package/lib/node/find-block-FREohLcp.cjs +1 -0
- package/lib/node/functions/get-builder-search-params/index.d.ts +8 -2
- package/lib/node/functions/is-previewing.d.ts +11 -1
- package/lib/node/{get-block-properties-LchfO6Kb.js → get-block-properties-FaxCrM1a.js} +1 -1
- package/lib/node/{get-block-properties-5a2c_5xR.cjs → get-block-properties-jmSoWfe4.cjs} +1 -1
- package/lib/node/helpers/find-block.d.ts +18 -0
- package/lib/node/helpers/subscribe-to-editor.d.ts +3 -2
- package/lib/node/index-XZ9fje0u.cjs +334 -0
- package/lib/node/{index-HR8y_fPw.js → index-cA6aiTF9.js} +600 -534
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +8 -8
- package/lib/node/live-edit-4dgiiT0i.cjs +1 -0
- package/lib/node/live-edit-d95nI1uy.js +31 -0
- package/lib/{edge/repeated-block-E4-2V2fe.js → node/repeated-block-0GJiZm2S.js} +2 -2
- package/lib/{edge/repeated-block-6mZ2NJ7W.cjs → node/repeated-block-dl3zJ7hh.cjs} +1 -1
- package/lib/node/style-wrapper-aM0mtDgE.cjs +1 -0
- package/lib/node/style-wrapper-rg8DEjG3.js +210 -0
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/block-styles-4ljhsSUM.js +0 -84
- package/lib/browser/block-styles-NDMRfO-4.cjs +0 -1
- package/lib/browser/component-ref-B8JFh8hq.cjs +0 -1
- package/lib/browser/index-Sn06h7cl.cjs +0 -334
- package/lib/edge/block-styles-NdwXUvb8.js +0 -83
- package/lib/edge/block-styles-gtNLlF4k.cjs +0 -1
- package/lib/edge/component-ref-aeV7uVzT.cjs +0 -1
- package/lib/node/block-styles-8bE2sgtd.cjs +0 -1
- package/lib/node/block-styles-8zkB2lOv.js +0 -84
- package/lib/node/component-ref-U-rcbsRh.cjs +0 -1
- package/lib/node/index-SDqfr0zQ.cjs +0 -334
|
@@ -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-DRqRWus9.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 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-Wj-bZmuN.cjs"),n=require("./index-DRqRWus9.cjs"),c=()=>Promise.resolve().then(()=>require("./index-DRqRWus9.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;
|
|
@@ -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 {
|
|
5
|
-
const d = () => import("./index-
|
|
3
|
+
import { g as s, a as l } from "./get-block-properties-hv2UC_Ak.js";
|
|
4
|
+
import { _ as m } from "./index-up0O4QOR.js";
|
|
5
|
+
const d = () => import("./index-up0O4QOR.js").then((e) => e.J).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
|
|
@@ -58,6 +58,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
58
58
|
}, {}, {
|
|
59
59
|
mergeNewRootState(newData: Dictionary<any>): void;
|
|
60
60
|
submissionState(): any;
|
|
61
|
+
errorResponse(response: any): string;
|
|
61
62
|
onSubmit(event: any): void;
|
|
62
63
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
63
64
|
name?: any;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isEditing } from "../../functions/is-editing";
|
|
2
|
-
import { filterAttrs } from "../helpers";
|
|
3
2
|
/**
|
|
4
3
|
* This import is used by the Svelte SDK. Do not remove.
|
|
5
4
|
*/
|
|
@@ -10,29 +9,37 @@ export interface ImgProps {
|
|
|
10
9
|
altText?: string;
|
|
11
10
|
backgroundSize?: "cover" | "contain";
|
|
12
11
|
backgroundPosition?: "center" | "top" | "left" | "right" | "bottom" | "top left" | "top right" | "bottom left" | "bottom right";
|
|
12
|
+
aspectRatio?: number;
|
|
13
|
+
title?: string;
|
|
13
14
|
}
|
|
14
15
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
16
|
+
title?: any;
|
|
15
17
|
image?: any;
|
|
16
18
|
attributes?: any;
|
|
19
|
+
aspectRatio?: any;
|
|
17
20
|
backgroundPosition?: any;
|
|
18
21
|
backgroundSize?: any;
|
|
19
22
|
altText?: any;
|
|
20
23
|
imgSrc?: any;
|
|
21
24
|
}>, unknown, {
|
|
22
25
|
isEditing: typeof isEditing;
|
|
23
|
-
filterAttrs: typeof filterAttrs;
|
|
24
26
|
}, {
|
|
25
27
|
srcSetToUse(): string | undefined;
|
|
28
|
+
imgAttrs(): Record<string, any>;
|
|
26
29
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
30
|
+
title?: any;
|
|
27
31
|
image?: any;
|
|
28
32
|
attributes?: any;
|
|
33
|
+
aspectRatio?: any;
|
|
29
34
|
backgroundPosition?: any;
|
|
30
35
|
backgroundSize?: any;
|
|
31
36
|
altText?: any;
|
|
32
37
|
imgSrc?: any;
|
|
33
38
|
}>>>, {
|
|
39
|
+
readonly title?: any;
|
|
34
40
|
readonly image?: any;
|
|
35
41
|
readonly attributes?: any;
|
|
42
|
+
readonly aspectRatio?: any;
|
|
36
43
|
readonly backgroundPosition?: any;
|
|
37
44
|
readonly backgroundSize?: any;
|
|
38
45
|
readonly altText?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BuilderContent } from '../../types/builder-content';
|
|
2
2
|
import type { BuilderComponentsProp, BuilderDataProps, BuilderLinkComponentProp } from '../../types/builder-props';
|
|
3
|
-
interface SymbolInfo {
|
|
3
|
+
export interface SymbolInfo {
|
|
4
4
|
model?: string;
|
|
5
5
|
entry?: string;
|
|
6
6
|
data?: any;
|
|
@@ -16,4 +16,3 @@ export interface SymbolProps extends BuilderComponentsProp, BuilderDataProps, Bu
|
|
|
16
16
|
inheritState?: boolean;
|
|
17
17
|
renderToLiquid?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export {};
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
12
12
|
activeTab: number;
|
|
13
13
|
}, {}, {
|
|
14
14
|
activeTabContent(active: number): any;
|
|
15
|
+
getTabStyle(index: number): any;
|
|
15
16
|
onClick(index: number): void;
|
|
16
17
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
17
18
|
builderContext?: any;
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
const
|
|
2
|
+
import { defineComponent as b, defineAsyncComponent as u, resolveComponent as d, openBlock as o, createBlock as p, withCtx as i, renderSlot as m, createElementBlock as h, Fragment as w, resolveDynamicComponent as C, mergeProps as P, normalizeProps as B, renderList as E, createCommentVNode as k } from "vue";
|
|
3
|
+
import { T as y, i as $, _ as g, B as R, w as A } from "./index-up0O4QOR.js";
|
|
4
|
+
import { a as v, g as S } from "./get-block-properties-hv2UC_Ak.js";
|
|
5
|
+
const L = () => import("./awaiter-k56NYxtZ.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
|
|
9
9
|
), e;
|
|
10
|
-
}),
|
|
10
|
+
}), I = () => import("./live-edit-u4CLwhz2.js").then((e) => e.default).catch((e) => {
|
|
11
|
+
throw console.error(
|
|
12
|
+
"Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
|
|
13
|
+
e
|
|
14
|
+
), e;
|
|
15
|
+
}), T = b({
|
|
11
16
|
name: "interactive-element",
|
|
12
|
-
components: {
|
|
17
|
+
components: {
|
|
18
|
+
LiveEdit: u(I),
|
|
19
|
+
Awaiter: u(L)
|
|
20
|
+
},
|
|
13
21
|
props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
|
|
14
22
|
data() {
|
|
15
|
-
return { forceRenderCount: 0 };
|
|
23
|
+
return { forceRenderCount: 0, TARGET: y, isEditing: $ };
|
|
16
24
|
},
|
|
17
25
|
watch: {
|
|
18
26
|
onUpdateHook0: { handler() {
|
|
@@ -21,11 +29,11 @@ const R = () => import("./awaiter-522m_tb0.js").then((e) => e.default).catch((e)
|
|
|
21
29
|
computed: {
|
|
22
30
|
attributes() {
|
|
23
31
|
return this.includeBlockProps ? {
|
|
24
|
-
...
|
|
32
|
+
...v({
|
|
25
33
|
block: this.block,
|
|
26
34
|
context: this.context
|
|
27
35
|
}),
|
|
28
|
-
...
|
|
36
|
+
...S({
|
|
29
37
|
block: this.block,
|
|
30
38
|
rootState: this.context.rootState,
|
|
31
39
|
rootSetState: this.context.rootSetState,
|
|
@@ -51,92 +59,95 @@ const R = () => import("./awaiter-522m_tb0.js").then((e) => e.default).catch((e)
|
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
61
|
});
|
|
54
|
-
function
|
|
55
|
-
const
|
|
56
|
-
return e.Wrapper.load ? (
|
|
62
|
+
function O(e, t, s, l, a, c) {
|
|
63
|
+
const n = d("Awaiter"), r = d("LiveEdit");
|
|
64
|
+
return e.Wrapper.load ? (o(), p(n, {
|
|
57
65
|
key: 0,
|
|
58
66
|
load: e.Wrapper.load,
|
|
59
67
|
fallback: e.Wrapper.fallback,
|
|
60
68
|
props: e.wrapperProps,
|
|
61
69
|
attributes: e.attributes
|
|
62
70
|
}, {
|
|
63
|
-
default:
|
|
71
|
+
default: i(() => [
|
|
64
72
|
m(e.$slots, "default")
|
|
65
73
|
]),
|
|
66
74
|
_: 3
|
|
67
|
-
}, 8, ["load", "fallback", "props", "attributes"])) : (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
}, 8, ["load", "fallback", "props", "attributes"])) : (o(), h(w, { key: 1 }, [
|
|
76
|
+
e.TARGET === "rsc" && e.isEditing() ? (o(), p(r, {
|
|
77
|
+
key: 0,
|
|
78
|
+
Wrapper: e.Wrapper,
|
|
79
|
+
id: e.block.id || "",
|
|
80
|
+
attributes: e.attributes
|
|
81
|
+
}, {
|
|
82
|
+
default: i(() => [
|
|
83
|
+
m(e.$slots, "default")
|
|
84
|
+
]),
|
|
85
|
+
_: 3
|
|
86
|
+
}, 8, ["Wrapper", "id", "attributes"])) : (o(), p(C(e.Wrapper), P({
|
|
87
|
+
key: 1,
|
|
88
|
+
attributes: e.attributes
|
|
89
|
+
}, e.targetWrapperProps), {
|
|
90
|
+
default: i(() => [
|
|
91
|
+
m(e.$slots, "default")
|
|
92
|
+
]),
|
|
93
|
+
_: 3
|
|
94
|
+
}, 16, ["attributes"]))
|
|
95
|
+
], 64));
|
|
73
96
|
}
|
|
74
|
-
const
|
|
97
|
+
const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
|
|
75
98
|
componentOptions: e,
|
|
76
99
|
builderBlock: t,
|
|
77
100
|
context: s,
|
|
78
|
-
componentRef:
|
|
79
|
-
includeBlockProps:
|
|
101
|
+
componentRef: l,
|
|
102
|
+
includeBlockProps: a,
|
|
80
103
|
isInteractive: c,
|
|
81
|
-
contextValue:
|
|
104
|
+
contextValue: n
|
|
82
105
|
}) => {
|
|
83
|
-
const
|
|
106
|
+
const r = {
|
|
84
107
|
...e,
|
|
85
108
|
/**
|
|
86
109
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
87
110
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
88
111
|
*/
|
|
89
|
-
...
|
|
90
|
-
attributes:
|
|
112
|
+
...a ? {
|
|
113
|
+
attributes: v({
|
|
91
114
|
block: t,
|
|
92
|
-
context:
|
|
115
|
+
context: n
|
|
93
116
|
})
|
|
94
117
|
} : {}
|
|
95
118
|
};
|
|
96
119
|
return c ? {
|
|
97
|
-
Wrapper:
|
|
120
|
+
Wrapper: l,
|
|
98
121
|
block: t,
|
|
99
122
|
context: s,
|
|
100
123
|
wrapperProps: e,
|
|
101
|
-
includeBlockProps:
|
|
102
|
-
} :
|
|
103
|
-
},
|
|
124
|
+
includeBlockProps: a
|
|
125
|
+
} : r;
|
|
126
|
+
}, G = b({
|
|
104
127
|
name: "component-ref",
|
|
105
|
-
components: { Block:
|
|
128
|
+
components: { Block: R, InteractiveElement: f },
|
|
106
129
|
props: [
|
|
107
|
-
"componentOptions",
|
|
108
|
-
"blockChildren",
|
|
109
130
|
"isInteractive",
|
|
110
131
|
"componentRef",
|
|
132
|
+
"componentOptions",
|
|
111
133
|
"builderBlock",
|
|
112
134
|
"context",
|
|
113
135
|
"linkComponent",
|
|
114
136
|
"includeBlockProps",
|
|
137
|
+
"blockChildren",
|
|
115
138
|
"registeredComponents"
|
|
116
139
|
],
|
|
117
140
|
data() {
|
|
118
141
|
return {
|
|
119
142
|
shouldUpdate: !1,
|
|
120
|
-
Wrapper: this.isInteractive ?
|
|
143
|
+
Wrapper: this.isInteractive ? A(f) : this.componentRef,
|
|
121
144
|
getWrapperProps: U
|
|
122
145
|
};
|
|
123
|
-
},
|
|
124
|
-
watch: {
|
|
125
|
-
onUpdateHook0: { handler() {
|
|
126
|
-
}, immediate: !0 }
|
|
127
|
-
},
|
|
128
|
-
computed: {
|
|
129
|
-
onUpdateHook0() {
|
|
130
|
-
return {
|
|
131
|
-
0: this.componentOptions,
|
|
132
|
-
1: this.blockChildren
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
146
|
}
|
|
136
147
|
});
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
return e.componentRef ? (
|
|
148
|
+
function H(e, t, s, l, a, c) {
|
|
149
|
+
const n = d("Block");
|
|
150
|
+
return e.componentRef ? (o(), p(C(e.Wrapper), B(P(
|
|
140
151
|
{ key: 0 },
|
|
141
152
|
e.getWrapperProps({
|
|
142
153
|
componentOptions: e.componentOptions,
|
|
@@ -149,19 +160,19 @@ function O(e, t, s, i, r, c) {
|
|
|
149
160
|
contextValue: e.context
|
|
150
161
|
})
|
|
151
162
|
)), {
|
|
152
|
-
default:
|
|
153
|
-
(
|
|
154
|
-
key:
|
|
155
|
-
block:
|
|
163
|
+
default: i(() => [
|
|
164
|
+
e.componentRef ? (o(!0), h(w, { key: 0 }, E(e.blockChildren, (r, W) => (o(), p(n, {
|
|
165
|
+
key: r.id,
|
|
166
|
+
block: r,
|
|
156
167
|
context: e.context,
|
|
157
168
|
registeredComponents: e.registeredComponents,
|
|
158
169
|
linkComponent: e.linkComponent
|
|
159
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128))
|
|
170
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
|
|
160
171
|
]),
|
|
161
172
|
_: 1
|
|
162
|
-
}, 16)) :
|
|
173
|
+
}, 16)) : k("", !0);
|
|
163
174
|
}
|
|
164
|
-
const F = /* @__PURE__ */
|
|
175
|
+
const F = /* @__PURE__ */ g(G, [["render", H]]);
|
|
165
176
|
export {
|
|
166
177
|
F as default
|
|
167
178
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),n=require("./index-DRqRWus9.cjs"),l=require("./get-block-properties-Wj-bZmuN.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-9j04A_GV.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-yg5JQxHm.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),f=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:n.TARGET,isEditing:n.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function h(e,o,s,a,p,c){const i=t.resolveComponent("Awaiter"),r=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(r,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const m=n._export_sfc(f,[["render",h]]),b=({componentOptions:e,builderBlock:o,context:s,componentRef:a,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const r={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:a,block:o,context:s,wrapperProps:e,includeBlockProps:p}:r},C=t.defineComponent({name:"component-ref",components:{Block:n.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?n.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function B(e,o,s,a,p,c){const i=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:t.withCtx(()=>[e.componentRef?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.blockChildren,(r,d)=>(t.openBlock(),t.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128)):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}const v=n._export_sfc(C,[["render",B]]);exports.default=v;
|
|
@@ -25,12 +25,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
25
25
|
builderBlock: import("../../../..").BuilderBlock;
|
|
26
26
|
builderContext: import("../../../..").BuilderContextInterface;
|
|
27
27
|
};
|
|
28
|
-
}, {
|
|
29
|
-
onUpdateHook0(): {
|
|
30
|
-
0: any;
|
|
31
|
-
1: any;
|
|
32
|
-
};
|
|
33
|
-
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
28
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
34
29
|
context?: any;
|
|
35
30
|
builderBlock?: any;
|
|
36
31
|
linkComponent?: any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from "../../../context/types";
|
|
2
|
+
import { isEditing } from "../../../server-index";
|
|
2
3
|
import type { BuilderBlock } from "../../../types/builder-block";
|
|
3
4
|
import type { Dictionary } from "../../../types/typescript";
|
|
4
5
|
export type InteractiveElementProps = {
|
|
@@ -12,11 +13,13 @@ export type InteractiveElementProps = {
|
|
|
12
13
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
13
14
|
context?: any;
|
|
14
15
|
block?: any;
|
|
16
|
+
Wrapper?: any;
|
|
15
17
|
wrapperProps?: any;
|
|
16
18
|
includeBlockProps?: any;
|
|
17
|
-
Wrapper?: any;
|
|
18
19
|
}>, unknown, {
|
|
19
20
|
forceRenderCount: number;
|
|
21
|
+
TARGET: import("../../../types/targets").Target;
|
|
22
|
+
isEditing: typeof isEditing;
|
|
20
23
|
}, {
|
|
21
24
|
attributes(): {};
|
|
22
25
|
targetWrapperProps(): any;
|
|
@@ -27,14 +30,14 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
27
30
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
28
31
|
context?: any;
|
|
29
32
|
block?: any;
|
|
33
|
+
Wrapper?: any;
|
|
30
34
|
wrapperProps?: any;
|
|
31
35
|
includeBlockProps?: any;
|
|
32
|
-
Wrapper?: any;
|
|
33
36
|
}>>>, {
|
|
34
37
|
readonly context?: any;
|
|
35
38
|
readonly block?: any;
|
|
39
|
+
readonly Wrapper?: any;
|
|
36
40
|
readonly wrapperProps?: any;
|
|
37
41
|
readonly includeBlockProps?: any;
|
|
38
|
-
readonly Wrapper?: any;
|
|
39
42
|
}, {}>;
|
|
40
43
|
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BuilderBlock } from "../../../server-index";
|
|
2
|
+
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
3
|
+
id?: any;
|
|
4
|
+
contextProvider?: any;
|
|
5
|
+
}>, unknown, {
|
|
6
|
+
TARGET: import("../../../types/targets").Target;
|
|
7
|
+
}, {
|
|
8
|
+
block(): BuilderBlock | null;
|
|
9
|
+
processedBlock(): BuilderBlock | null;
|
|
10
|
+
canShowBlock(): boolean;
|
|
11
|
+
css(): string;
|
|
12
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
13
|
+
id?: any;
|
|
14
|
+
contextProvider?: any;
|
|
15
|
+
}>>>, {
|
|
16
|
+
readonly id?: any;
|
|
17
|
+
readonly contextProvider?: any;
|
|
18
|
+
}, {}>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
+
context?: any;
|
|
3
|
+
block?: any;
|
|
4
|
+
}>, unknown, {
|
|
5
|
+
isClientEditing: boolean;
|
|
6
|
+
isHydrated: boolean;
|
|
7
|
+
TARGET: import("../../../types/targets").Target;
|
|
8
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
9
|
+
context?: any;
|
|
10
|
+
block?: any;
|
|
11
|
+
}>>>, {
|
|
12
|
+
readonly context?: any;
|
|
13
|
+
readonly block?: any;
|
|
14
|
+
}, {}>;
|
|
15
|
+
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EditType } from "../../../helpers/subscribe-to-editor";
|
|
1
2
|
import type { BuilderContent } from "../../../types/builder-content";
|
|
2
3
|
import type { Dictionary } from "../../../types/typescript";
|
|
3
4
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
@@ -18,6 +19,9 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
18
19
|
builderContextSignal?: any;
|
|
19
20
|
}>, unknown, {
|
|
20
21
|
hasExecuted: boolean;
|
|
22
|
+
contextValue: any;
|
|
23
|
+
prevData: null;
|
|
24
|
+
prevLocale: string;
|
|
21
25
|
ContentWrapper: any;
|
|
22
26
|
httpReqsData: {};
|
|
23
27
|
httpReqsPending: {};
|
|
@@ -63,8 +67,8 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
63
67
|
0: any;
|
|
64
68
|
};
|
|
65
69
|
}, {
|
|
66
|
-
mergeNewRootState(newData: Dictionary<any
|
|
67
|
-
mergeNewContent(newContent: BuilderContent): void;
|
|
70
|
+
mergeNewRootState(newData: Dictionary<any>, editType?: EditType): void;
|
|
71
|
+
mergeNewContent(newContent: BuilderContent, editType?: EditType): void;
|
|
68
72
|
processMessage(event: MessageEvent): void;
|
|
69
73
|
onClick(event: any): void;
|
|
70
74
|
runHttpRequests(): void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
+
id?: any;
|
|
3
|
+
attributes?: any;
|
|
4
|
+
Wrapper?: any;
|
|
5
|
+
}>, unknown, unknown, {
|
|
6
|
+
block(): import("..").BuilderBlock | null;
|
|
7
|
+
options(): any;
|
|
8
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
9
|
+
id?: any;
|
|
10
|
+
attributes?: any;
|
|
11
|
+
Wrapper?: any;
|
|
12
|
+
}>>>, {
|
|
13
|
+
readonly id?: any;
|
|
14
|
+
readonly attributes?: any;
|
|
15
|
+
readonly Wrapper?: any;
|
|
16
|
+
}, {}>;
|
|
17
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.2.
|
|
1
|
+
export declare const SDK_VERSION = "4.2.4";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
const u = (r, o) => {
|
|
3
|
+
var c;
|
|
4
|
+
return l((c = r.data) == null ? void 0 : c.blocks, o);
|
|
5
|
+
}, l = (r, o) => {
|
|
6
|
+
var c, e, i;
|
|
7
|
+
if (!r)
|
|
8
|
+
return null;
|
|
9
|
+
for (const n of r) {
|
|
10
|
+
if (n.id === o)
|
|
11
|
+
return n;
|
|
12
|
+
if (n.children) {
|
|
13
|
+
const t = l(n.children, o);
|
|
14
|
+
if (t)
|
|
15
|
+
return t;
|
|
16
|
+
}
|
|
17
|
+
if (((c = n.component) == null ? void 0 : c.name) === "Columns" && ((i = (e = n.component) == null ? void 0 : e.options) != null && i.columns)) {
|
|
18
|
+
for (const t of n.component.options.columns)
|
|
19
|
+
if (t.blocks) {
|
|
20
|
+
const f = l(t.blocks, o);
|
|
21
|
+
if (f)
|
|
22
|
+
return f;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
u as f
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var u=require("./style.css");const f=(r,o)=>{var c;return l((c=r.data)==null?void 0:c.blocks,o)},l=(r,o)=>{var c,i,e;if(!r)return null;for(const n of r){if(n.id===o)return n;if(n.children){const t=l(n.children,o);if(t)return t}if(((c=n.component)==null?void 0:c.name)==="Columns"&&((e=(i=n.component)==null?void 0:i.options)!=null&&e.columns)){for(const t of n.component.options.columns)if(t.blocks){const s=l(t.blocks,o);if(s)return s}}}return null};exports.findBlockById=f;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { QueryObject } from '../../helpers/search/search';
|
|
2
2
|
/**
|
|
3
|
-
* Receives a `URLSearchParams` object or a regular query object, and returns
|
|
4
|
-
* relevant to the Builder SDK.
|
|
3
|
+
* Receives a `URLSearchParams` object or a regular query object, and returns
|
|
4
|
+
* the subset of query params that are relevant to the Builder SDK.
|
|
5
|
+
*
|
|
6
|
+
* Outputs a key-value object to be passed to `fetchOneEntry` or `fetchEntries`
|
|
7
|
+
* functions as the `options` argument.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This function is generally not needed. Instead, it is recommended to use `isPreviewing()`
|
|
10
|
+
* to check if the current page requires previewed content.
|
|
5
11
|
*
|
|
6
12
|
* @returns
|
|
7
13
|
*/
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { Search } from '../helpers/search/search';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Checks the current URL's search parameters to see if it is attempting to
|
|
4
|
+
* preview Builder Content.
|
|
5
|
+
*
|
|
6
|
+
* When called on the client, it uses `window.location.search`.
|
|
7
|
+
* When called on the server (SSR), it requires a `search` argument.
|
|
8
|
+
*
|
|
9
|
+
* @param search - The search parameters to check. Can be a URL string (containing the search parameters), `URLSearchParams`, or a key-value object containing the search parameters.
|
|
10
|
+
* @returns `true` if the current page is being previewed, `false` otherwise.
|
|
11
|
+
*/
|
|
12
|
+
export declare function isPreviewing(search?: Search): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const s=require("./index-
|
|
1
|
+
var d=require("./style.css");const s=require("./index-DRqRWus9.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
2
|
+
import { e as n, T as c, g as i, a as l } from "./index-up0O4QOR.js";
|
|
3
|
+
const p = (e) => `v-on:${e.toLowerCase()}`, f = (e, t) => (r) => n({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
6
6
|
localState: t.localState,
|
|
@@ -9,13 +9,13 @@ const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => n({
|
|
|
9
9
|
event: r,
|
|
10
10
|
isExpression: !1
|
|
11
11
|
});
|
|
12
|
-
function
|
|
12
|
+
function g(e) {
|
|
13
13
|
const t = {}, r = e.block.actions ?? {};
|
|
14
14
|
for (const o in r) {
|
|
15
15
|
if (!r.hasOwnProperty(o))
|
|
16
16
|
continue;
|
|
17
17
|
const s = r[o];
|
|
18
|
-
let a =
|
|
18
|
+
let a = p(o);
|
|
19
19
|
if (e.stripPrefix)
|
|
20
20
|
switch (c) {
|
|
21
21
|
case "vue":
|
|
@@ -25,7 +25,7 @@ function m(e) {
|
|
|
25
25
|
a = a.replace("on:", "");
|
|
26
26
|
break;
|
|
27
27
|
}
|
|
28
|
-
t[a] =
|
|
28
|
+
t[a] = f(s, e);
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
31
31
|
}
|
|
@@ -37,7 +37,7 @@ function u({
|
|
|
37
37
|
const v = (e) => ({
|
|
38
38
|
href: e.href
|
|
39
39
|
});
|
|
40
|
-
function
|
|
40
|
+
function m({
|
|
41
41
|
block: e,
|
|
42
42
|
context: t
|
|
43
43
|
}) {
|
|
@@ -59,6 +59,6 @@ function g({
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
m as a,
|
|
63
|
+
g
|
|
64
64
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BuilderBlock, BuilderContent } from '../server-index';
|
|
2
|
+
/**
|
|
3
|
+
* Recursively searches for a block by ID.
|
|
4
|
+
*
|
|
5
|
+
* @param content The Builder content to search through.
|
|
6
|
+
* @param id The ID of the block to search for.
|
|
7
|
+
* @returns The block if found, otherwise null.
|
|
8
|
+
*/
|
|
9
|
+
export declare const findBlockById: (content: BuilderContent, id: string) => BuilderBlock | null;
|
|
10
|
+
/**
|
|
11
|
+
* Helper function to recursively search through block tree.
|
|
12
|
+
*
|
|
13
|
+
* @param blocks The blocks to search through.
|
|
14
|
+
* @param id The ID of the block to search for.
|
|
15
|
+
* @returns The block if found, otherwise null.
|
|
16
|
+
* @private This is an internal implementation detail.
|
|
17
|
+
*/
|
|
18
|
+
export declare const findBlockInTree: (blocks: BuilderBlock[] | undefined, id: string) => BuilderBlock | null;
|