@builder.io/sdk-vue 4.2.1 → 4.2.3

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.
Files changed (120) hide show
  1. package/lib/browser/{awaiter-522m_tb0.js → awaiter-QkoC16ei.js} +1 -1
  2. package/lib/browser/{awaiter-xp9lcSxP.cjs → awaiter-dVEzPIfa.cjs} +1 -1
  3. package/lib/browser/{block-wrapper-9mehIM9T.cjs → block-wrapper-BOi64ZSf.cjs} +1 -1
  4. package/lib/browser/{block-wrapper-26klNOq9.js → block-wrapper-LGlUvVpu.js} +3 -3
  5. package/lib/browser/blocks/form/form/form.vue.d.ts +1 -0
  6. package/lib/browser/blocks/img/img.vue.d.ts +9 -2
  7. package/lib/browser/blocks/symbol/symbol.types.d.ts +1 -2
  8. package/lib/browser/blocks/symbol/symbol.vue.d.ts +1 -0
  9. package/lib/browser/blocks/tabs/tabs.vue.d.ts +1 -0
  10. package/lib/browser/component-ref-Jt8NZQKY.cjs +1 -0
  11. package/lib/browser/{component-ref-IrVdrKrT.js → component-ref-tMh8EWjb.js} +68 -57
  12. package/lib/browser/components/awaiter.types.d.ts +7 -0
  13. package/lib/browser/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
  14. package/lib/browser/components/block/components/interactive-element.vue.d.ts +6 -3
  15. package/lib/browser/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
  16. package/lib/browser/components/block/components/style-wrapper.vue.d.ts +15 -0
  17. package/lib/browser/components/content/components/enable-editor.vue.d.ts +6 -2
  18. package/lib/browser/components/live-edit.vue.d.ts +17 -0
  19. package/lib/browser/constants/sdk-version.d.ts +1 -1
  20. package/lib/browser/find-block-4FksmtpZ.js +30 -0
  21. package/lib/browser/find-block-FHyxDYzT.cjs +1 -0
  22. package/lib/browser/{get-block-properties-QnM_YrNk.js → get-block-properties-Ahsh8p5y.js} +8 -8
  23. package/lib/browser/{get-block-properties-OKep411k.cjs → get-block-properties-NuVrGQN_.cjs} +1 -1
  24. package/lib/browser/helpers/find-block.d.ts +18 -0
  25. package/lib/browser/helpers/subscribe-to-editor.d.ts +3 -2
  26. package/lib/browser/{index-dDcL7IfY.js → index-EtzQVBnH.js} +635 -569
  27. package/lib/browser/index-jbLVGF3d.cjs +334 -0
  28. package/lib/browser/index.cjs +1 -1
  29. package/lib/browser/index.mjs +11 -11
  30. package/lib/browser/live-edit-h_5MH287.cjs +1 -0
  31. package/lib/browser/live-edit-rw2-UX9h.js +32 -0
  32. package/lib/browser/{repeated-block-nKx_42cr.cjs → repeated-block-DP1NryZH.cjs} +1 -1
  33. package/lib/browser/{repeated-block-iOBHvqGU.js → repeated-block-WP795fea.js} +2 -2
  34. package/lib/browser/style-wrapper-OLuHp-wg.js +210 -0
  35. package/lib/browser/style-wrapper-_FKH2e4u.cjs +1 -0
  36. package/lib/browser/style.css +1 -1
  37. package/lib/edge/{awaiter-1mRIGpV6.cjs → awaiter-AB81htE9.cjs} +1 -1
  38. package/lib/edge/{awaiter-inDvpJQO.js → awaiter-G2IZpq8y.js} +1 -1
  39. package/lib/{node/block-wrapper-02ftlAfU.cjs → edge/block-wrapper-3KMmt5za.cjs} +1 -1
  40. package/lib/edge/{block-wrapper-SsRgbO8V.js → block-wrapper-hc1D57Il.js} +3 -3
  41. package/lib/edge/blocks/form/form/form.vue.d.ts +1 -0
  42. package/lib/edge/blocks/img/img.vue.d.ts +9 -2
  43. package/lib/edge/blocks/symbol/symbol.types.d.ts +1 -2
  44. package/lib/edge/blocks/symbol/symbol.vue.d.ts +1 -0
  45. package/lib/edge/blocks/tabs/tabs.vue.d.ts +1 -0
  46. package/lib/edge/component-ref-1l1Dc15N.cjs +1 -0
  47. package/lib/edge/{component-ref-xNhbKfn9.js → component-ref-__eNmb_i.js} +68 -57
  48. package/lib/edge/components/awaiter.types.d.ts +7 -0
  49. package/lib/edge/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
  50. package/lib/edge/components/block/components/interactive-element.vue.d.ts +6 -3
  51. package/lib/edge/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
  52. package/lib/edge/components/block/components/style-wrapper.vue.d.ts +15 -0
  53. package/lib/edge/components/content/components/enable-editor.vue.d.ts +6 -2
  54. package/lib/edge/components/live-edit.vue.d.ts +17 -0
  55. package/lib/edge/constants/sdk-version.d.ts +1 -1
  56. package/lib/edge/find-block-3Ig0kVVe.js +29 -0
  57. package/lib/edge/find-block-FREohLcp.cjs +1 -0
  58. package/lib/edge/{get-block-properties-YBHD-kyN.js → get-block-properties-IlO7VcTG.js} +10 -10
  59. package/lib/edge/{get-block-properties-gqcOodFf.cjs → get-block-properties-YofIFdQl.cjs} +1 -1
  60. package/lib/edge/helpers/find-block.d.ts +18 -0
  61. package/lib/edge/helpers/subscribe-to-editor.d.ts +3 -2
  62. package/lib/edge/{index-KuatB8ic.cjs → index-UFKf4DGh.cjs} +27 -27
  63. package/lib/edge/{index-hzqKkVuy.js → index-pedBdruj.js} +880 -814
  64. package/lib/edge/index.cjs +1 -1
  65. package/lib/edge/index.mjs +11 -11
  66. package/lib/edge/live-edit-bP5Bdb_I.cjs +1 -0
  67. package/lib/edge/live-edit-mkwzJ3KQ.js +31 -0
  68. package/lib/{node/repeated-block-pKrhMIDV.cjs → edge/repeated-block-eV-zFRwn.cjs} +1 -1
  69. package/lib/{node/repeated-block-dhWJ0p4C.js → edge/repeated-block-i0HNWVX0.js} +2 -2
  70. package/lib/edge/style-wrapper-QrUxYNMa.cjs +1 -0
  71. package/lib/edge/style-wrapper-mI3PSijR.js +209 -0
  72. package/lib/edge/style.css +1 -1
  73. package/lib/node/{awaiter-xwpDFIvR.cjs → awaiter-GsCK0Rmm.cjs} +1 -1
  74. package/lib/node/{awaiter-VENdQO6n.js → awaiter-vsM2I4ci.js} +2 -2
  75. package/lib/node/{block-wrapper-YFKoP-Sr.js → block-wrapper-HC1GKPg-.js} +5 -5
  76. package/lib/{edge/block-wrapper-1wOAQ8jv.cjs → node/block-wrapper-VVk0Gqbc.cjs} +1 -1
  77. package/lib/node/blocks/form/form/form.vue.d.ts +1 -0
  78. package/lib/node/blocks/img/img.vue.d.ts +9 -2
  79. package/lib/node/blocks/symbol/symbol.types.d.ts +1 -2
  80. package/lib/node/blocks/symbol/symbol.vue.d.ts +1 -0
  81. package/lib/node/blocks/tabs/tabs.vue.d.ts +1 -0
  82. package/lib/node/component-ref-SsJCZYlF.cjs +1 -0
  83. package/lib/node/{component-ref-CL-UB2rM.js → component-ref-bqN5ZiyT.js} +70 -58
  84. package/lib/node/components/awaiter.types.d.ts +7 -0
  85. package/lib/node/components/block/components/component-ref/component-ref.vue.d.ts +1 -6
  86. package/lib/node/components/block/components/interactive-element.vue.d.ts +6 -3
  87. package/lib/node/components/block/components/live-edit-block-styles.vue.d.ts +19 -0
  88. package/lib/node/components/block/components/style-wrapper.vue.d.ts +15 -0
  89. package/lib/node/components/content/components/enable-editor.vue.d.ts +6 -2
  90. package/lib/node/components/live-edit.vue.d.ts +17 -0
  91. package/lib/node/constants/sdk-version.d.ts +1 -1
  92. package/lib/node/find-block-3Ig0kVVe.js +29 -0
  93. package/lib/node/find-block-FREohLcp.cjs +1 -0
  94. package/lib/node/{get-block-properties-5a2c_5xR.cjs → get-block-properties--0kf0kc1.cjs} +1 -1
  95. package/lib/node/{get-block-properties-LchfO6Kb.js → get-block-properties-4dl07r5f.js} +1 -1
  96. package/lib/node/helpers/find-block.d.ts +18 -0
  97. package/lib/node/helpers/subscribe-to-editor.d.ts +3 -2
  98. package/lib/node/index-9ZnpkpZ8.cjs +334 -0
  99. package/lib/node/{index-HR8y_fPw.js → index-BtCfIIfO.js} +600 -534
  100. package/lib/node/index.cjs +1 -1
  101. package/lib/node/index.mjs +8 -8
  102. package/lib/node/live-edit-dkMPrQFh.js +31 -0
  103. package/lib/node/live-edit-k5C1gkl6.cjs +1 -0
  104. package/lib/{edge/repeated-block-E4-2V2fe.js → node/repeated-block-FOLLYnPQ.js} +2 -2
  105. package/lib/{edge/repeated-block-6mZ2NJ7W.cjs → node/repeated-block-pPsNH7xs.cjs} +1 -1
  106. package/lib/node/style-wrapper-CbrJHZiI.cjs +1 -0
  107. package/lib/node/style-wrapper-bEfbvdLX.js +210 -0
  108. package/lib/node/style.css +1 -1
  109. package/package.json +1 -1
  110. package/lib/browser/block-styles-4ljhsSUM.js +0 -84
  111. package/lib/browser/block-styles-NDMRfO-4.cjs +0 -1
  112. package/lib/browser/component-ref-B8JFh8hq.cjs +0 -1
  113. package/lib/browser/index-Sn06h7cl.cjs +0 -334
  114. package/lib/edge/block-styles-NdwXUvb8.js +0 -83
  115. package/lib/edge/block-styles-gtNLlF4k.cjs +0 -1
  116. package/lib/edge/component-ref-aeV7uVzT.cjs +0 -1
  117. package/lib/node/block-styles-8bE2sgtd.cjs +0 -1
  118. package/lib/node/block-styles-8zkB2lOv.js +0 -84
  119. package/lib/node/component-ref-U-rcbsRh.cjs +0 -1
  120. package/lib/node/index-SDqfr0zQ.cjs +0 -334
@@ -1,17 +1,26 @@
1
- import { defineComponent as u, defineAsyncComponent as g, resolveComponent as k, openBlock as n, createBlock as a, withCtx as l, renderSlot as m, resolveDynamicComponent as h, normalizeProps as f, mergeProps as b, createElementBlock as B, Fragment as W, renderList as $, createCommentVNode as v } from "vue";
2
- import { d as C, B as y, w as S } from "./index-HR8y_fPw.js";
3
- import { a as w, g as A } from "./get-block-properties-LchfO6Kb.js";
4
- const R = () => import("./awaiter-VENdQO6n.js").then((e) => e.default).catch((e) => {
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-BtCfIIfO.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-4dl07r5f.js";
5
+ const L = () => import("./awaiter-vsM2I4ci.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
- }), E = u({
10
+ }), I = () => import("./live-edit-dkMPrQFh.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: { Awaiter: g(R) },
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
- ...w({
32
+ ...v({
24
33
  block: this.block,
25
34
  context: this.context
26
35
  }),
27
- ...A({
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 I(e, t, s, i, r, c) {
54
- const o = k("Awaiter");
55
- return e.Wrapper.load ? (n(), a(o, {
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: l(() => [
71
+ default: i(() => [
63
72
  m(e.$slots, "default")
64
73
  ]),
65
74
  _: 3
66
- }, 8, ["load", "fallback", "props", "attributes"])) : (n(), a(h(e.Wrapper), f(b({ key: 1 }, e.targetWrapperProps)), {
67
- default: l(() => [
68
- m(e.$slots, "default")
69
- ]),
70
- _: 3
71
- }, 16));
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 d = /* @__PURE__ */ C(E, [["render", I]]), U = ({
97
+ const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
74
98
  componentOptions: e,
75
99
  builderBlock: t,
76
100
  context: s,
77
- componentRef: i,
78
- includeBlockProps: r,
101
+ componentRef: l,
102
+ includeBlockProps: a,
79
103
  isInteractive: c,
80
- contextValue: o
104
+ contextValue: n
81
105
  }) => {
82
- const p = {
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
- ...r ? {
89
- attributes: w({
112
+ ...a ? {
113
+ attributes: v({
90
114
  block: t,
91
- context: o
115
+ context: n
92
116
  })
93
117
  } : {}
94
118
  };
95
119
  return c ? {
96
- Wrapper: i,
120
+ Wrapper: l,
97
121
  block: t,
98
122
  context: s,
99
123
  wrapperProps: e,
100
- includeBlockProps: r
101
- } : p;
102
- }, H = u({
124
+ includeBlockProps: a
125
+ } : r;
126
+ }, G = b({
103
127
  name: "component-ref",
104
- components: { Block: y, InteractiveElement: d },
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 ? S(d) : this.componentRef,
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 O(e, t, s, i, r, c) {
137
- const o = k("Block");
138
- return e.componentRef ? (n(), a(h(e.Wrapper), f(b(
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: l(() => [
152
- (n(!0), B(W, null, $(e.blockChildren, (p, P) => (n(), a(o, {
153
- key: p.id,
154
- block: p,
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)) : v("", !0);
173
+ }, 16)) : k("", !0);
162
174
  }
163
- const D = /* @__PURE__ */ C(H, [["render", O]]);
175
+ const F = /* @__PURE__ */ g(G, [["render", H]]);
164
176
  export {
165
- D as default
177
+ F as default
166
178
  };
@@ -0,0 +1,7 @@
1
+ export type AwaiterProps = {
2
+ load: () => Promise<any>;
3
+ props?: any;
4
+ attributes?: any;
5
+ fallback?: any;
6
+ children?: any;
7
+ };
@@ -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>): void;
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";
1
+ export declare const SDK_VERSION = "4.2.3";
@@ -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 +1 @@
1
- "use strict";const c=require("./should-force-browser-runtime-in-node-1vTKsoso.cjs"),s=require("./index-SDqfr0zQ.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;
1
+ "use strict";const c=require("./should-force-browser-runtime-in-node-1vTKsoso.cjs"),s=require("./index-9ZnpkpZ8.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;
@@ -1,5 +1,5 @@
1
1
  import { T as n } from "./should-force-browser-runtime-in-node-ikxWrCvn.js";
2
- import { e as c, f as i, h as l } from "./index-HR8y_fPw.js";
2
+ import { e as c, g as i, a as l } from "./index-BtCfIIfO.js";
3
3
  const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => c({
4
4
  code: e,
5
5
  context: t.context,
@@ -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>) => void;
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
  };