@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,25 @@
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 { e as C, B as y, w as S } from "./index-hzqKkVuy.js";
3
- import { a as w, g as A } from "./get-block-properties-YBHD-kyN.js";
4
- const R = () => import("./awaiter-inDvpJQO.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 { T as y, i as $, _ as g, B as R, w as A } from "./index-pedBdruj.js";
3
+ import { a as v, g as S } from "./get-block-properties-IlO7VcTG.js";
4
+ const L = () => import("./awaiter-G2IZpq8y.js").then((e) => e.default).catch((e) => {
5
5
  throw console.error(
6
6
  "Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
7
7
  e
8
8
  ), e;
9
- }), E = u({
9
+ }), I = () => import("./live-edit-mkwzJ3KQ.js").then((e) => e.default).catch((e) => {
10
+ throw console.error(
11
+ "Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
12
+ e
13
+ ), e;
14
+ }), T = b({
10
15
  name: "interactive-element",
11
- components: { Awaiter: g(R) },
16
+ components: {
17
+ LiveEdit: u(I),
18
+ Awaiter: u(L)
19
+ },
12
20
  props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
13
21
  data() {
14
- return { forceRenderCount: 0 };
22
+ return { forceRenderCount: 0, TARGET: y, isEditing: $ };
15
23
  },
16
24
  watch: {
17
25
  onUpdateHook0: { handler() {
@@ -20,11 +28,11 @@ const R = () => import("./awaiter-inDvpJQO.js").then((e) => e.default).catch((e)
20
28
  computed: {
21
29
  attributes() {
22
30
  return this.includeBlockProps ? {
23
- ...w({
31
+ ...v({
24
32
  block: this.block,
25
33
  context: this.context
26
34
  }),
27
- ...A({
35
+ ...S({
28
36
  block: this.block,
29
37
  rootState: this.context.rootState,
30
38
  rootSetState: this.context.rootSetState,
@@ -50,92 +58,95 @@ const R = () => import("./awaiter-inDvpJQO.js").then((e) => e.default).catch((e)
50
58
  }
51
59
  }
52
60
  });
53
- function I(e, t, s, i, r, c) {
54
- const o = k("Awaiter");
55
- return e.Wrapper.load ? (n(), a(o, {
61
+ function O(e, t, s, l, a, c) {
62
+ const n = d("Awaiter"), r = d("LiveEdit");
63
+ return e.Wrapper.load ? (o(), p(n, {
56
64
  key: 0,
57
65
  load: e.Wrapper.load,
58
66
  fallback: e.Wrapper.fallback,
59
67
  props: e.wrapperProps,
60
68
  attributes: e.attributes
61
69
  }, {
62
- default: l(() => [
70
+ default: i(() => [
63
71
  m(e.$slots, "default")
64
72
  ]),
65
73
  _: 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));
74
+ }, 8, ["load", "fallback", "props", "attributes"])) : (o(), h(w, { key: 1 }, [
75
+ e.TARGET === "rsc" && e.isEditing() ? (o(), p(r, {
76
+ key: 0,
77
+ Wrapper: e.Wrapper,
78
+ id: e.block.id || "",
79
+ attributes: e.attributes
80
+ }, {
81
+ default: i(() => [
82
+ m(e.$slots, "default")
83
+ ]),
84
+ _: 3
85
+ }, 8, ["Wrapper", "id", "attributes"])) : (o(), p(C(e.Wrapper), P({
86
+ key: 1,
87
+ attributes: e.attributes
88
+ }, e.targetWrapperProps), {
89
+ default: i(() => [
90
+ m(e.$slots, "default")
91
+ ]),
92
+ _: 3
93
+ }, 16, ["attributes"]))
94
+ ], 64));
72
95
  }
73
- const d = /* @__PURE__ */ C(E, [["render", I]]), U = ({
96
+ const f = /* @__PURE__ */ g(T, [["render", O]]), U = ({
74
97
  componentOptions: e,
75
98
  builderBlock: t,
76
99
  context: s,
77
- componentRef: i,
78
- includeBlockProps: r,
100
+ componentRef: l,
101
+ includeBlockProps: a,
79
102
  isInteractive: c,
80
- contextValue: o
103
+ contextValue: n
81
104
  }) => {
82
- const p = {
105
+ const r = {
83
106
  ...e,
84
107
  /**
85
108
  * If `noWrap` is set to `true`, then the block's props/attributes are provided to the
86
109
  * component itself directly. Otherwise, they are provided to the wrapper element.
87
110
  */
88
- ...r ? {
89
- attributes: w({
111
+ ...a ? {
112
+ attributes: v({
90
113
  block: t,
91
- context: o
114
+ context: n
92
115
  })
93
116
  } : {}
94
117
  };
95
118
  return c ? {
96
- Wrapper: i,
119
+ Wrapper: l,
97
120
  block: t,
98
121
  context: s,
99
122
  wrapperProps: e,
100
- includeBlockProps: r
101
- } : p;
102
- }, H = u({
123
+ includeBlockProps: a
124
+ } : r;
125
+ }, G = b({
103
126
  name: "component-ref",
104
- components: { Block: y, InteractiveElement: d },
127
+ components: { Block: R, InteractiveElement: f },
105
128
  props: [
106
- "componentOptions",
107
- "blockChildren",
108
129
  "isInteractive",
109
130
  "componentRef",
131
+ "componentOptions",
110
132
  "builderBlock",
111
133
  "context",
112
134
  "linkComponent",
113
135
  "includeBlockProps",
136
+ "blockChildren",
114
137
  "registeredComponents"
115
138
  ],
116
139
  data() {
117
140
  return {
118
141
  shouldUpdate: !1,
119
- Wrapper: this.isInteractive ? S(d) : this.componentRef,
142
+ Wrapper: this.isInteractive ? A(f) : this.componentRef,
120
143
  getWrapperProps: U
121
144
  };
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
145
  }
135
146
  });
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(
147
+ function H(e, t, s, l, a, c) {
148
+ const n = d("Block");
149
+ return e.componentRef ? (o(), p(C(e.Wrapper), B(P(
139
150
  { key: 0 },
140
151
  e.getWrapperProps({
141
152
  componentOptions: e.componentOptions,
@@ -148,19 +159,19 @@ function O(e, t, s, i, r, c) {
148
159
  contextValue: e.context
149
160
  })
150
161
  )), {
151
- default: l(() => [
152
- (n(!0), B(W, null, $(e.blockChildren, (p, P) => (n(), a(o, {
153
- key: p.id,
154
- block: p,
162
+ default: i(() => [
163
+ e.componentRef ? (o(!0), h(w, { key: 0 }, E(e.blockChildren, (r, W) => (o(), p(n, {
164
+ key: r.id,
165
+ block: r,
155
166
  context: e.context,
156
167
  registeredComponents: e.registeredComponents,
157
168
  linkComponent: e.linkComponent
158
- }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128))
169
+ }, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
159
170
  ]),
160
171
  _: 1
161
- }, 16)) : v("", !0);
172
+ }, 16)) : k("", !0);
162
173
  }
163
- const D = /* @__PURE__ */ C(H, [["render", O]]);
174
+ const D = /* @__PURE__ */ g(G, [["render", H]]);
164
175
  export {
165
176
  D as default
166
177
  };
@@ -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,4 +1,4 @@
1
- import { f as n, T as c, h as i, i as l } from "./index-hzqKkVuy.js";
1
+ import { e as n, T as c, g as i, a as l } from "./index-pedBdruj.js";
2
2
  const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => n({
3
3
  code: e,
4
4
  context: t.context,
@@ -10,21 +10,21 @@ const f = (e) => `v-on:${e.toLowerCase()}`, p = (e, t) => (r) => n({
10
10
  });
11
11
  function S(e) {
12
12
  const t = {}, r = e.block.actions ?? {};
13
- for (const o in r) {
14
- if (!r.hasOwnProperty(o))
13
+ for (const a in r) {
14
+ if (!r.hasOwnProperty(a))
15
15
  continue;
16
- const s = r[o];
17
- let a = f(o);
16
+ const s = r[a];
17
+ let o = f(a);
18
18
  if (e.stripPrefix)
19
19
  switch (c) {
20
20
  case "vue":
21
- a = a.replace("v-on:", "");
21
+ o = o.replace("v-on:", "");
22
22
  break;
23
23
  case "svelte":
24
- a = a.replace("on:", "");
24
+ o = o.replace("on:", "");
25
25
  break;
26
26
  }
27
- t[a] = p(s, e);
27
+ t[o] = p(s, e);
28
28
  }
29
29
  return t;
30
30
  }
@@ -40,7 +40,7 @@ function g({
40
40
  block: e,
41
41
  context: t
42
42
  }) {
43
- var o;
43
+ var a;
44
44
  const r = {
45
45
  ...v(e),
46
46
  ...e.properties,
@@ -49,7 +49,7 @@ function g({
49
49
  block: e,
50
50
  context: t
51
51
  }),
52
- [l()]: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
52
+ [l()]: [e.id, "builder-block", e.class, (a = e.properties) == null ? void 0 : a.class].filter(Boolean).join(" ")
53
53
  };
54
54
  return u({
55
55
  properties: r,
@@ -1 +1 @@
1
- "use strict";const s=require("./index-KuatB8ic.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 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 u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=p;
1
+ "use strict";const s=require("./index-UFKf4DGh.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 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 u({properties:r,context:t,block:e})}exports.getBlockActions=l;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>) => 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
  };