@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,17 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
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";
|
|
2
|
+
import { _ as g, B as y, w as $ } from "./index-cA6aiTF9.js";
|
|
3
|
+
import { T as R, h as A } from "./should-force-browser-runtime-in-node-ikxWrCvn.js";
|
|
4
|
+
import { a as v, g as S } from "./get-block-properties-FaxCrM1a.js";
|
|
5
|
+
const L = () => import("./awaiter-iefQuuK5.js").then((e) => e.default).catch((e) => {
|
|
5
6
|
throw console.error(
|
|
6
7
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
7
8
|
e
|
|
8
9
|
), e;
|
|
9
|
-
}),
|
|
10
|
+
}), I = () => import("./live-edit-d95nI1uy.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({
|
|
10
16
|
name: "interactive-element",
|
|
11
|
-
components: {
|
|
17
|
+
components: {
|
|
18
|
+
LiveEdit: u(I),
|
|
19
|
+
Awaiter: u(L)
|
|
20
|
+
},
|
|
12
21
|
props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
|
|
13
22
|
data() {
|
|
14
|
-
return { forceRenderCount: 0 };
|
|
23
|
+
return { forceRenderCount: 0, TARGET: R, isEditing: A };
|
|
15
24
|
},
|
|
16
25
|
watch: {
|
|
17
26
|
onUpdateHook0: { handler() {
|
|
@@ -20,11 +29,11 @@ const R = () => import("./awaiter-VENdQO6n.js").then((e) => e.default).catch((e)
|
|
|
20
29
|
computed: {
|
|
21
30
|
attributes() {
|
|
22
31
|
return this.includeBlockProps ? {
|
|
23
|
-
...
|
|
32
|
+
...v({
|
|
24
33
|
block: this.block,
|
|
25
34
|
context: this.context
|
|
26
35
|
}),
|
|
27
|
-
...
|
|
36
|
+
...S({
|
|
28
37
|
block: this.block,
|
|
29
38
|
rootState: this.context.rootState,
|
|
30
39
|
rootSetState: this.context.rootSetState,
|
|
@@ -50,92 +59,95 @@ const R = () => import("./awaiter-VENdQO6n.js").then((e) => e.default).catch((e)
|
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
});
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
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, {
|
|
56
65
|
key: 0,
|
|
57
66
|
load: e.Wrapper.load,
|
|
58
67
|
fallback: e.Wrapper.fallback,
|
|
59
68
|
props: e.wrapperProps,
|
|
60
69
|
attributes: e.attributes
|
|
61
70
|
}, {
|
|
62
|
-
default:
|
|
71
|
+
default: i(() => [
|
|
63
72
|
m(e.$slots, "default")
|
|
64
73
|
]),
|
|
65
74
|
_: 3
|
|
66
|
-
}, 8, ["load", "fallback", "props", "attributes"])) : (
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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));
|
|
72
96
|
}
|
|
73
|
-
const
|
|
97
|
+
const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
|
|
74
98
|
componentOptions: e,
|
|
75
99
|
builderBlock: t,
|
|
76
100
|
context: s,
|
|
77
|
-
componentRef:
|
|
78
|
-
includeBlockProps:
|
|
101
|
+
componentRef: l,
|
|
102
|
+
includeBlockProps: a,
|
|
79
103
|
isInteractive: c,
|
|
80
|
-
contextValue:
|
|
104
|
+
contextValue: n
|
|
81
105
|
}) => {
|
|
82
|
-
const
|
|
106
|
+
const r = {
|
|
83
107
|
...e,
|
|
84
108
|
/**
|
|
85
109
|
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
86
110
|
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
87
111
|
*/
|
|
88
|
-
...
|
|
89
|
-
attributes:
|
|
112
|
+
...a ? {
|
|
113
|
+
attributes: v({
|
|
90
114
|
block: t,
|
|
91
|
-
context:
|
|
115
|
+
context: n
|
|
92
116
|
})
|
|
93
117
|
} : {}
|
|
94
118
|
};
|
|
95
119
|
return c ? {
|
|
96
|
-
Wrapper:
|
|
120
|
+
Wrapper: l,
|
|
97
121
|
block: t,
|
|
98
122
|
context: s,
|
|
99
123
|
wrapperProps: e,
|
|
100
|
-
includeBlockProps:
|
|
101
|
-
} :
|
|
102
|
-
},
|
|
124
|
+
includeBlockProps: a
|
|
125
|
+
} : r;
|
|
126
|
+
}, G = b({
|
|
103
127
|
name: "component-ref",
|
|
104
|
-
components: { Block: y, InteractiveElement:
|
|
128
|
+
components: { Block: y, InteractiveElement: f },
|
|
105
129
|
props: [
|
|
106
|
-
"componentOptions",
|
|
107
|
-
"blockChildren",
|
|
108
130
|
"isInteractive",
|
|
109
131
|
"componentRef",
|
|
132
|
+
"componentOptions",
|
|
110
133
|
"builderBlock",
|
|
111
134
|
"context",
|
|
112
135
|
"linkComponent",
|
|
113
136
|
"includeBlockProps",
|
|
137
|
+
"blockChildren",
|
|
114
138
|
"registeredComponents"
|
|
115
139
|
],
|
|
116
140
|
data() {
|
|
117
141
|
return {
|
|
118
142
|
shouldUpdate: !1,
|
|
119
|
-
Wrapper: this.isInteractive ?
|
|
143
|
+
Wrapper: this.isInteractive ? $(f) : this.componentRef,
|
|
120
144
|
getWrapperProps: U
|
|
121
145
|
};
|
|
122
|
-
},
|
|
123
|
-
watch: {
|
|
124
|
-
onUpdateHook0: { handler() {
|
|
125
|
-
}, immediate: !0 }
|
|
126
|
-
},
|
|
127
|
-
computed: {
|
|
128
|
-
onUpdateHook0() {
|
|
129
|
-
return {
|
|
130
|
-
0: this.componentOptions,
|
|
131
|
-
1: this.blockChildren
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
146
|
}
|
|
135
147
|
});
|
|
136
|
-
function
|
|
137
|
-
const
|
|
138
|
-
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(
|
|
139
151
|
{ key: 0 },
|
|
140
152
|
e.getWrapperProps({
|
|
141
153
|
componentOptions: e.componentOptions,
|
|
@@ -148,19 +160,19 @@ function O(e, t, s, i, r, c) {
|
|
|
148
160
|
contextValue: e.context
|
|
149
161
|
})
|
|
150
162
|
)), {
|
|
151
|
-
default:
|
|
152
|
-
(
|
|
153
|
-
key:
|
|
154
|
-
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,
|
|
155
167
|
context: e.context,
|
|
156
168
|
registeredComponents: e.registeredComponents,
|
|
157
169
|
linkComponent: e.linkComponent
|
|
158
|
-
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128))
|
|
170
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
|
|
159
171
|
]),
|
|
160
172
|
_: 1
|
|
161
|
-
}, 16)) :
|
|
173
|
+
}, 16)) : k("", !0);
|
|
162
174
|
}
|
|
163
|
-
const
|
|
175
|
+
const F = /* @__PURE__ */ g(G, [["render", H]]);
|
|
164
176
|
export {
|
|
165
|
-
|
|
177
|
+
F as default
|
|
166
178
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),p=require("./index-XZ9fje0u.cjs"),d=require("./should-force-browser-runtime-in-node-1vTKsoso.cjs"),l=require("./get-block-properties-jmSoWfe4.cjs"),k=()=>Promise.resolve().then(()=>require("./awaiter-6p8mxokx.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),h=()=>Promise.resolve().then(()=>require("./live-edit-4dgiiT0i.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(h),Awaiter:t.defineAsyncComponent(k)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:d.TARGET,isEditing:d.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 b(e,o,s,a,i,c){const n=t.resolveComponent("Awaiter"),r=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(n,{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=p._export_sfc(f,[["render",b]]),B=({componentOptions:e,builderBlock:o,context:s,componentRef:a,includeBlockProps:i,isInteractive:c,contextValue:n})=>{const r={...e,...i?{attributes:l.getBlockProperties({block:o,context:n})}:{}};return c?{Wrapper:a,block:o,context:s,wrapperProps:e,includeBlockProps:i}:r},C=t.defineComponent({name:"component-ref",components:{Block:p.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?p.wrapComponentRef(m):this.componentRef,getWrapperProps:B}}});function v(e,o,s,a,i,c){const n=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,u)=>(t.openBlock(),t.createBlock(n,{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 P=p._export_sfc(C,[["render",v]]);exports.default=P;
|
|
@@ -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,29 @@
|
|
|
1
|
+
const s = (r, o) => {
|
|
2
|
+
var c;
|
|
3
|
+
return l((c = r.data) == null ? void 0 : c.blocks, o);
|
|
4
|
+
}, l = (r, o) => {
|
|
5
|
+
var c, e, f;
|
|
6
|
+
if (!r)
|
|
7
|
+
return null;
|
|
8
|
+
for (const n of r) {
|
|
9
|
+
if (n.id === o)
|
|
10
|
+
return n;
|
|
11
|
+
if (n.children) {
|
|
12
|
+
const t = l(n.children, o);
|
|
13
|
+
if (t)
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
if (((c = n.component) == null ? void 0 : c.name) === "Columns" && ((f = (e = n.component) == null ? void 0 : e.options) != null && f.columns)) {
|
|
17
|
+
for (const t of n.component.options.columns)
|
|
18
|
+
if (t.blocks) {
|
|
19
|
+
const i = l(t.blocks, o);
|
|
20
|
+
if (i)
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
s as f
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const f=(l,o)=>{var c;return r((c=l.data)==null?void 0:c.blocks,o)},r=(l,o)=>{var c,i,e;if(!l)return null;for(const n of l){if(n.id===o)return n;if(n.children){const t=r(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=r(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,5 +1,5 @@
|
|
|
1
1
|
import { T as n } from "./should-force-browser-runtime-in-node-ikxWrCvn.js";
|
|
2
|
-
import { e as c,
|
|
2
|
+
import { e as c, g as i, a as l } from "./index-cA6aiTF9.js";
|
|
3
3
|
const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => c({
|
|
4
4
|
code: e,
|
|
5
5
|
context: t.context,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const c=require("./should-force-browser-runtime-in-node-1vTKsoso.cjs"),s=require("./index-
|
|
1
|
+
"use strict";const c=require("./should-force-browser-runtime-in-node-1vTKsoso.cjs"),s=require("./index-XZ9fje0u.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){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=i(o);if(e.stripPrefix)switch(c.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=l(a,e)}return t}function d({properties:e}){return e}const f=e=>({href:e.href});function p({block:e,context:t}){var o;const r={...f(e),...e.properties,"builder-id":e.id,style: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 d({properties:r,context:t,block:e})}exports.getBlockActions=u;exports.getBlockProperties=p;
|
|
@@ -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;
|
|
@@ -2,10 +2,11 @@ import type { ContentProps } from '../components/content/content.types';
|
|
|
2
2
|
import type { BuilderAnimation } from '../types/builder-block';
|
|
3
3
|
import type { BuilderContent } from '../types/builder-content';
|
|
4
4
|
import type { Dictionary } from '../types/typescript';
|
|
5
|
+
export type EditType = 'client' | 'server' | undefined;
|
|
5
6
|
type ContentListener = Required<Pick<ContentProps, 'model' | 'trustedHosts'>> & {
|
|
6
7
|
callbacks: {
|
|
7
|
-
contentUpdate: (updatedContent: BuilderContent) => void;
|
|
8
|
-
stateUpdate: (newState: Dictionary<string
|
|
8
|
+
contentUpdate: (updatedContent: BuilderContent, editType?: EditType) => void;
|
|
9
|
+
stateUpdate: (newState: Dictionary<string>, editType?: EditType) => void;
|
|
9
10
|
animation: (updatedContent: BuilderAnimation) => void;
|
|
10
11
|
configureSdk: (updatedContent: any) => void;
|
|
11
12
|
};
|