@topol.io/editor-vue 1.0.0-alpha.10 → 1.0.0-alpha.12

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/README.md CHANGED
@@ -6,7 +6,7 @@ Vue 3 wrapper for Email Editor v4, from the 1.x alpha line onward.
6
6
  <script setup lang="ts">
7
7
  import { EmailEditor, type IEmailCallbacks, type IVueEmailOptions } from "@topol.io/editor-vue";
8
8
  const options: IVueEmailOptions = {
9
- authorize: { apiKey: "pk_your-key", userId: "user-123" },
9
+ authorize: { apiKey: "pk_your-key", entityId: "user-123" },
10
10
  cloud: { enabled: true },
11
11
  };
12
12
  const callbacks: IEmailCallbacks = {
@@ -38,14 +38,21 @@ event listener are provided, the callback runs first and its result is returned.
38
38
  without it or `callbacks.onSaveAndClose`, the runtime's default save-and-close works.
39
39
  `getNonce` is a function callback only, never an event.
40
40
 
41
- `LandingPageEditor` and `CoreLandingPageEditor` retain their existing APIs.
41
+ The exposed `load()` and `save()` of `LandingPageEditor` return Promises: `save()`
42
+ settles once the save has finished and rejects with `err.code === "SAVE_IN_PROGRESS"`
43
+ while another save runs. The exposed `getEditor()` returns the instance for its other
44
+ methods. `LandingPageEditor` takes the same `callbacks` prop (`ILandingPageCallbacks`):
45
+ pass `getNonce` there to turn nonce authentication on, and async `onSave` /
46
+ `onSaveAndClose` / `onEditorClose` handlers the editor should wait for.
47
+ It also has `@ready`, `loader-url` and a container without a fixed `id`, so several
48
+ editors can share a page; `class` and `style` fall through to the container.
42
49
  `CoreEmailEditor` exposes the core v4 factory.
43
50
 
44
51
  `options` contains the v4 configuration (`IEmailConfig`). A `getNonce` callback that
45
52
  fetches a fresh `nc_` token from your application's authenticated backend enables
46
53
  nonce authentication on its own; Cloud additionally requires it. Never put an `sk_`
47
54
  secret in browser code. See the core package README for nonce authentication, Cloud
48
- feature options, the Countdown block (`enableCountdown`, `countdown`; see the
55
+ feature options, the Countdown block (`countdown`; see the
49
56
  [option reference](https://docs.topol.io/email-editor/reference/topol-options#countdown))
50
57
  and all v4 renames.
51
58
 
@@ -56,7 +63,7 @@ Set the container's height. Each component owns its own instance and destroys it
56
63
  on unmount, including when initialization is still pending.
57
64
 
58
65
  Use `loaderUrl` for an explicit v4 local/preview loader. A numeric `stage` selects
59
- a PR preview. `TopolEditor` is a deprecated naming alias using the new v4 contract.
66
+ a PR preview. The `TopolEditor` alias is removed; import `EmailEditor`.
60
67
 
61
68
  ## Running the example against deployed Cloud
62
69
 
@@ -1,7 +1,7 @@
1
- import { EmailEditor as A, LandingPageEditor as P } from "@topol.io/editor";
2
- import { EmailEditor as O, LandingPageEditor as _, default as M } from "@topol.io/editor";
3
- import { defineComponent as p, getCurrentInstance as h, ref as k, onMounted as b, onBeforeUnmount as f, createElementBlock as L, openBlock as T } from "vue";
4
- const B = /* @__PURE__ */ p({
1
+ import { EmailEditor as R, LandingPageEditor as y } from "@topol.io/editor";
2
+ import { EmailEditor as N, LandingPageEditor as x } from "@topol.io/editor";
3
+ import { defineComponent as L, getCurrentInstance as w, ref as U, onMounted as P, onBeforeUnmount as T, createElementBlock as A, openBlock as D, shallowRef as B } from "vue";
4
+ const _ = /* @__PURE__ */ L({
5
5
  __name: "EmailEditor",
6
6
  props: {
7
7
  options: {},
@@ -9,216 +9,218 @@ const B = /* @__PURE__ */ p({
9
9
  stage: { default: "production" },
10
10
  loaderUrl: {}
11
11
  },
12
- emits: ["ready", "onSave", "onSaveAndClose", "onTestSend", "onBannerClick", "onOpenFileManager", "onLoaded", "onSavedSectionSave", "onSavedSectionRemove", "onSavedSectionEdit", "onImageDelete", "onInit", "onUndoChange", "onRedoChange", "onPreview", "onPreviewClose", "onAlert", "onEditorClose", "onEdittedWithoutSaveChanged", "onBlocksAndStructuresVisibilityChange", "onOpenCustomBlockDialog", "onTemplateRename", "onTemplateUpdated", "updateTestingEmailAddresses", "onEditorError", "onLanguageCreated", "onLanguageDeleted", "onLanguageSelected", "onPrimaryLanguageChanged", "onGetMutations", "onCloudSave", "onCloudTemplateChange"],
13
- setup(C, { expose: m, emit: S }) {
14
- const a = C, r = S, v = h(), c = k();
15
- let d, u = !1;
16
- m({ getEditor: () => d ?? null });
17
- const i = (s) => {
18
- var n, o, e;
19
- const l = `on${s[0].toUpperCase()}${s.slice(1)}`;
20
- return !!((n = a.callbacks) != null && n[s]) || !!((o = v.vnode.props) != null && o[l]) || !!((e = v.vnode.props) != null && e[`${l}Once`]);
21
- }, g = (s) => {
22
- var n, o;
23
- if (u) return;
24
- const l = { source: "integration", message: s instanceof Error ? s.message : String(s), detail: s };
25
- i("onEditorError") || console.error("[@topol.io/editor-vue] EmailEditor failed:", s), (o = (n = a.callbacks) == null ? void 0 : n.onEditorError) == null || o.call(n, l), r("onEditorError", l);
12
+ emits: ["ready", "onSave", "onSaveAndClose", "onTestSend", "onBannerClick", "onOpenFileManager", "onLoaded", "onSavedSectionSave", "onSavedSectionRemove", "onSavedSectionEdit", "onImageDelete", "onInit", "onUndoChange", "onRedoChange", "onPreview", "onPreviewClose", "onAlert", "onEditorClose", "onUnsavedChangesChange", "onHiddenElementsVisibilityChange", "onOpenCustomBlockDialog", "onTemplateRename", "onTemplateUpdated", "onTestingEmailsChange", "onEditorError", "onLanguageCreated", "onLanguageDeleted", "onLanguageSelected", "onPrimaryLanguageChanged", "onGetMutations", "onCloudSave", "onCloudTemplateChange"],
13
+ setup(S, { expose: k, emit: p }) {
14
+ const a = S, r = p, E = w(), m = U();
15
+ let u, v = !1;
16
+ k({ getEditor: () => u ?? null });
17
+ const l = (i) => {
18
+ var n, t, e;
19
+ const d = `on${i[0].toUpperCase()}${i.slice(1)}`;
20
+ return !!((n = a.callbacks) != null && n[i]) || !!((t = E.vnode.props) != null && t[d]) || !!((e = E.vnode.props) != null && e[`${d}Once`]);
21
+ }, b = (i) => {
22
+ var n, t;
23
+ if (v) return;
24
+ const d = { source: "integration", message: i instanceof Error ? i.message : String(i), detail: i };
25
+ l("onEditorError") || console.error("[@topol.io/editor-vue] EmailEditor failed:", i), (t = (n = a.callbacks) == null ? void 0 : n.onEditorError) == null || t.call(n, d), r("onEditorError", d);
26
26
  };
27
- return b(async () => {
28
- var l;
29
- const s = {
30
- onSave: i("onSave") ? (n) => {
31
- var e, t;
32
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onSave) == null ? void 0 : t.call(e, n);
33
- return r("onSave", n), o;
27
+ return P(async () => {
28
+ var d;
29
+ const i = {
30
+ onSave: l("onSave") ? (n) => {
31
+ var e, o;
32
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onSave) == null ? void 0 : o.call(e, n);
33
+ return r("onSave", n), t;
34
34
  } : void 0,
35
- onSaveAndClose: i("onSaveAndClose") ? (n) => {
36
- var e, t;
37
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onSaveAndClose) == null ? void 0 : t.call(e, n);
38
- return r("onSaveAndClose", n), o;
35
+ onSaveAndClose: l("onSaveAndClose") ? (n) => {
36
+ var e, o;
37
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onSaveAndClose) == null ? void 0 : o.call(e, n);
38
+ return r("onSaveAndClose", n), t;
39
39
  } : void 0,
40
- onTestSend: i("onTestSend") ? (n) => {
41
- var e, t;
42
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onTestSend) == null ? void 0 : t.call(e, n);
43
- return r("onTestSend", n), o;
40
+ onTestSend: l("onTestSend") ? (n) => {
41
+ var e, o;
42
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onTestSend) == null ? void 0 : o.call(e, n);
43
+ return r("onTestSend", n), t;
44
44
  } : void 0,
45
- onBannerClick: i("onBannerClick") ? (n) => {
46
- var e, t;
47
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onBannerClick) == null ? void 0 : t.call(e, n);
48
- return r("onBannerClick", n), o;
45
+ onBannerClick: l("onBannerClick") ? (n) => {
46
+ var e, o;
47
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onBannerClick) == null ? void 0 : o.call(e, n);
48
+ return r("onBannerClick", n), t;
49
49
  } : void 0,
50
- onOpenFileManager: i("onOpenFileManager") ? () => {
51
- var o, e;
52
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onOpenFileManager) == null ? void 0 : e.call(o);
50
+ onOpenFileManager: l("onOpenFileManager") ? () => {
51
+ var t, e;
52
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onOpenFileManager) == null ? void 0 : e.call(t);
53
53
  return r("onOpenFileManager"), n;
54
54
  } : void 0,
55
- onLoaded: i("onLoaded") ? () => {
56
- var o, e;
57
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onLoaded) == null ? void 0 : e.call(o);
55
+ onLoaded: l("onLoaded") ? () => {
56
+ var t, e;
57
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onLoaded) == null ? void 0 : e.call(t);
58
58
  return r("onLoaded"), n;
59
59
  } : void 0,
60
- onSavedSectionSave: i("onSavedSectionSave") ? (n) => {
61
- var e, t;
62
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onSavedSectionSave) == null ? void 0 : t.call(e, n);
63
- return r("onSavedSectionSave", n), o;
60
+ onSavedSectionSave: l("onSavedSectionSave") ? (n) => {
61
+ var e, o;
62
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onSavedSectionSave) == null ? void 0 : o.call(e, n);
63
+ return r("onSavedSectionSave", n), t;
64
64
  } : void 0,
65
- onSavedSectionRemove: i("onSavedSectionRemove") ? (n) => {
66
- var e, t;
67
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onSavedSectionRemove) == null ? void 0 : t.call(e, n);
68
- return r("onSavedSectionRemove", n), o;
65
+ onSavedSectionRemove: l("onSavedSectionRemove") ? (n) => {
66
+ var e, o;
67
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onSavedSectionRemove) == null ? void 0 : o.call(e, n);
68
+ return r("onSavedSectionRemove", n), t;
69
69
  } : void 0,
70
- onSavedSectionEdit: i("onSavedSectionEdit") ? (n) => {
71
- var e, t;
72
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onSavedSectionEdit) == null ? void 0 : t.call(e, n);
73
- return r("onSavedSectionEdit", n), o;
70
+ onSavedSectionEdit: l("onSavedSectionEdit") ? (n) => {
71
+ var e, o;
72
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onSavedSectionEdit) == null ? void 0 : o.call(e, n);
73
+ return r("onSavedSectionEdit", n), t;
74
74
  } : void 0,
75
- onImageDelete: i("onImageDelete") ? (n) => {
76
- var e, t;
77
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onImageDelete) == null ? void 0 : t.call(e, n);
78
- return r("onImageDelete", n), o;
75
+ onImageDelete: l("onImageDelete") ? (n) => {
76
+ var e, o;
77
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onImageDelete) == null ? void 0 : o.call(e, n);
78
+ return r("onImageDelete", n), t;
79
79
  } : void 0,
80
- onInit: i("onInit") ? () => {
81
- var o, e;
82
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onInit) == null ? void 0 : e.call(o);
80
+ onInit: l("onInit") ? () => {
81
+ var t, e;
82
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onInit) == null ? void 0 : e.call(t);
83
83
  return r("onInit"), n;
84
84
  } : void 0,
85
- onUndoChange: i("onUndoChange") ? (n) => {
86
- var e, t;
87
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onUndoChange) == null ? void 0 : t.call(e, n);
88
- return r("onUndoChange", n), o;
85
+ onUndoChange: l("onUndoChange") ? (n) => {
86
+ var e, o;
87
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onUndoChange) == null ? void 0 : o.call(e, n);
88
+ return r("onUndoChange", n), t;
89
89
  } : void 0,
90
- onRedoChange: i("onRedoChange") ? (n) => {
91
- var e, t;
92
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onRedoChange) == null ? void 0 : t.call(e, n);
93
- return r("onRedoChange", n), o;
90
+ onRedoChange: l("onRedoChange") ? (n) => {
91
+ var e, o;
92
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onRedoChange) == null ? void 0 : o.call(e, n);
93
+ return r("onRedoChange", n), t;
94
94
  } : void 0,
95
- onPreview: i("onPreview") ? (n) => {
96
- var e, t;
97
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onPreview) == null ? void 0 : t.call(e, n);
98
- return r("onPreview", n), o;
95
+ onPreview: l("onPreview") ? (n) => {
96
+ var e, o;
97
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onPreview) == null ? void 0 : o.call(e, n);
98
+ return r("onPreview", n), t;
99
99
  } : void 0,
100
- onPreviewClose: i("onPreviewClose") ? () => {
101
- var o, e;
102
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onPreviewClose) == null ? void 0 : e.call(o);
100
+ onPreviewClose: l("onPreviewClose") ? () => {
101
+ var t, e;
102
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onPreviewClose) == null ? void 0 : e.call(t);
103
103
  return r("onPreviewClose"), n;
104
104
  } : void 0,
105
- onAlert: i("onAlert") ? (n) => {
106
- var e, t;
107
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onAlert) == null ? void 0 : t.call(e, n);
108
- return r("onAlert", n), o;
105
+ onAlert: l("onAlert") ? (n) => {
106
+ var e, o;
107
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onAlert) == null ? void 0 : o.call(e, n);
108
+ return r("onAlert", n), t;
109
109
  } : void 0,
110
- onEditorClose: i("onEditorClose") ? () => {
111
- var o, e;
112
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onEditorClose) == null ? void 0 : e.call(o);
110
+ onEditorClose: l("onEditorClose") ? () => {
111
+ var t, e;
112
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onEditorClose) == null ? void 0 : e.call(t);
113
113
  return r("onEditorClose"), n;
114
114
  } : void 0,
115
- onEdittedWithoutSaveChanged: i("onEdittedWithoutSaveChanged") ? (n) => {
116
- var e, t;
117
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onEdittedWithoutSaveChanged) == null ? void 0 : t.call(e, n);
118
- return r("onEdittedWithoutSaveChanged", n), o;
115
+ onUnsavedChangesChange: l("onUnsavedChangesChange") ? (n) => {
116
+ var e, o;
117
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onUnsavedChangesChange) == null ? void 0 : o.call(e, n);
118
+ return r("onUnsavedChangesChange", n), t;
119
119
  } : void 0,
120
- onBlocksAndStructuresVisibilityChange: i("onBlocksAndStructuresVisibilityChange") ? (n) => {
121
- var e, t;
122
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onBlocksAndStructuresVisibilityChange) == null ? void 0 : t.call(e, n);
123
- return r("onBlocksAndStructuresVisibilityChange", n), o;
120
+ onHiddenElementsVisibilityChange: l("onHiddenElementsVisibilityChange") ? (n) => {
121
+ var e, o;
122
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onHiddenElementsVisibilityChange) == null ? void 0 : o.call(e, n);
123
+ return r("onHiddenElementsVisibilityChange", n), t;
124
124
  } : void 0,
125
- onOpenCustomBlockDialog: i("onOpenCustomBlockDialog") ? (n) => {
126
- var e, t;
127
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onOpenCustomBlockDialog) == null ? void 0 : t.call(e, n);
128
- return r("onOpenCustomBlockDialog", n), o;
125
+ onOpenCustomBlockDialog: l("onOpenCustomBlockDialog") ? (n) => {
126
+ var e, o;
127
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onOpenCustomBlockDialog) == null ? void 0 : o.call(e, n);
128
+ return r("onOpenCustomBlockDialog", n), t;
129
129
  } : void 0,
130
- onTemplateRename: i("onTemplateRename") ? (n) => {
131
- var e, t;
132
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onTemplateRename) == null ? void 0 : t.call(e, n);
133
- return r("onTemplateRename", n), o;
130
+ onTemplateRename: l("onTemplateRename") ? (n) => {
131
+ var e, o;
132
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onTemplateRename) == null ? void 0 : o.call(e, n);
133
+ return r("onTemplateRename", n), t;
134
134
  } : void 0,
135
- onTemplateUpdated: i("onTemplateUpdated") ? () => {
136
- var o, e;
137
- const n = (e = (o = a.callbacks) == null ? void 0 : o.onTemplateUpdated) == null ? void 0 : e.call(o);
135
+ onTemplateUpdated: l("onTemplateUpdated") ? () => {
136
+ var t, e;
137
+ const n = (e = (t = a.callbacks) == null ? void 0 : t.onTemplateUpdated) == null ? void 0 : e.call(t);
138
138
  return r("onTemplateUpdated"), n;
139
139
  } : void 0,
140
- updateTestingEmailAddresses: i("updateTestingEmailAddresses") ? (n) => {
141
- var e, t;
142
- const o = (t = (e = a.callbacks) == null ? void 0 : e.updateTestingEmailAddresses) == null ? void 0 : t.call(e, n);
143
- return r("updateTestingEmailAddresses", n), o;
140
+ onTestingEmailsChange: l("onTestingEmailsChange") ? (n) => {
141
+ var e, o;
142
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onTestingEmailsChange) == null ? void 0 : o.call(e, n);
143
+ return r("onTestingEmailsChange", n), t;
144
144
  } : void 0,
145
- onEditorError: i("onEditorError") ? (n) => {
146
- var e, t;
147
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onEditorError) == null ? void 0 : t.call(e, n);
148
- return r("onEditorError", n), o;
145
+ onEditorError: l("onEditorError") ? (n) => {
146
+ var e, o;
147
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onEditorError) == null ? void 0 : o.call(e, n);
148
+ return r("onEditorError", n), t;
149
149
  } : void 0,
150
- onLanguageCreated: i("onLanguageCreated") ? (n) => {
151
- var e, t;
152
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onLanguageCreated) == null ? void 0 : t.call(e, n);
153
- return r("onLanguageCreated", n), o;
150
+ onLanguageCreated: l("onLanguageCreated") ? (n) => {
151
+ var e, o;
152
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onLanguageCreated) == null ? void 0 : o.call(e, n);
153
+ return r("onLanguageCreated", n), t;
154
154
  } : void 0,
155
- onLanguageDeleted: i("onLanguageDeleted") ? (n) => {
156
- var e, t;
157
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onLanguageDeleted) == null ? void 0 : t.call(e, n);
158
- return r("onLanguageDeleted", n), o;
155
+ onLanguageDeleted: l("onLanguageDeleted") ? (n) => {
156
+ var e, o;
157
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onLanguageDeleted) == null ? void 0 : o.call(e, n);
158
+ return r("onLanguageDeleted", n), t;
159
159
  } : void 0,
160
- onLanguageSelected: i("onLanguageSelected") ? (n) => {
161
- var e, t;
162
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onLanguageSelected) == null ? void 0 : t.call(e, n);
163
- return r("onLanguageSelected", n), o;
160
+ onLanguageSelected: l("onLanguageSelected") ? (n) => {
161
+ var e, o;
162
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onLanguageSelected) == null ? void 0 : o.call(e, n);
163
+ return r("onLanguageSelected", n), t;
164
164
  } : void 0,
165
- onPrimaryLanguageChanged: i("onPrimaryLanguageChanged") ? (n) => {
166
- var e, t;
167
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onPrimaryLanguageChanged) == null ? void 0 : t.call(e, n);
168
- return r("onPrimaryLanguageChanged", n), o;
165
+ onPrimaryLanguageChanged: l("onPrimaryLanguageChanged") ? (n) => {
166
+ var e, o;
167
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onPrimaryLanguageChanged) == null ? void 0 : o.call(e, n);
168
+ return r("onPrimaryLanguageChanged", n), t;
169
169
  } : void 0,
170
- onGetMutations: i("onGetMutations") ? (n) => {
171
- var e, t;
172
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onGetMutations) == null ? void 0 : t.call(e, n);
173
- return r("onGetMutations", n), o;
170
+ onGetMutations: l("onGetMutations") ? (n) => {
171
+ var e, o;
172
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onGetMutations) == null ? void 0 : o.call(e, n);
173
+ return r("onGetMutations", n), t;
174
174
  } : void 0,
175
- getNonce: (l = a.callbacks) != null && l.getNonce ? () => a.callbacks.getNonce() : void 0,
176
- onCloudSave: i("onCloudSave") ? (n) => {
177
- var e, t;
178
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onCloudSave) == null ? void 0 : t.call(e, n);
179
- return r("onCloudSave", n), o;
175
+ getNonce: (d = a.callbacks) != null && d.getNonce ? () => a.callbacks.getNonce() : void 0,
176
+ onCloudSave: l("onCloudSave") ? (n) => {
177
+ var e, o;
178
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onCloudSave) == null ? void 0 : o.call(e, n);
179
+ return r("onCloudSave", n), t;
180
180
  } : void 0,
181
- onCloudTemplateChange: i("onCloudTemplateChange") ? (n) => {
182
- var e, t;
183
- const o = (t = (e = a.callbacks) == null ? void 0 : e.onCloudTemplateChange) == null ? void 0 : t.call(e, n);
184
- return r("onCloudTemplateChange", n), o;
181
+ onCloudTemplateChange: l("onCloudTemplateChange") ? (n) => {
182
+ var e, o;
183
+ const t = (o = (e = a.callbacks) == null ? void 0 : e.onCloudTemplateChange) == null ? void 0 : o.call(e, n);
184
+ return r("onCloudTemplateChange", n), t;
185
185
  } : void 0
186
186
  };
187
187
  try {
188
- const n = await A.init({ config: a.options, ...s }, { stage: a.stage, loaderUrl: a.loaderUrl });
189
- if (u) {
188
+ const n = await R.init({ config: a.options, ...i }, { stage: a.stage, loaderUrl: a.loaderUrl });
189
+ if (v) {
190
190
  await n.destroy();
191
191
  return;
192
192
  }
193
- d = n;
193
+ u = n;
194
194
  try {
195
- await n.render(c.value);
196
- } catch (o) {
197
- throw await n.destroy(), d = void 0, o;
195
+ await n.render(m.value);
196
+ } catch (t) {
197
+ throw await n.destroy(), u = void 0, t;
198
198
  }
199
- u || r("ready", n);
199
+ v || r("ready", n);
200
200
  } catch (n) {
201
- g(n);
201
+ b(n);
202
202
  }
203
- }), f(() => {
204
- u = !0;
205
- const s = d;
206
- d = void 0, s == null || s.destroy().catch((l) => console.warn("[@topol.io/editor-vue] EmailEditor cleanup failed:", l));
207
- }), (s, l) => (T(), L("div", {
203
+ }), T(() => {
204
+ v = !0;
205
+ const i = u;
206
+ u = void 0, i == null || i.destroy().catch((d) => console.warn("[@topol.io/editor-vue] EmailEditor cleanup failed:", d));
207
+ }), (i, d) => (D(), A("div", {
208
208
  ref_key: "container",
209
- ref: c,
209
+ ref: m,
210
210
  style: { width: "100%", height: "100vh" }
211
211
  }, null, 512));
212
212
  }
213
- }), E = "topol-landing-page-editor-id", R = /* @__PURE__ */ p({
213
+ }), M = /* @__PURE__ */ L({
214
214
  __name: "LandingPageEditor",
215
215
  props: {
216
216
  options: {},
217
- stage: { default: "production" }
217
+ callbacks: {},
218
+ stage: { default: "production" },
219
+ loaderUrl: {}
218
220
  },
219
- emits: ["onSave", "onSaveAndClose", "onOpenFileManager", "onImageDelete", "onLoaded", "onInit", "onUndoChange", "onRedoChange", "onPreview", "onPreviewClose", "onAlert", "onEditorClose", "onEdittedWithoutSaveChanged", "onOpenCustomBlockDialog", "onTemplateRename", "onEditorError"],
220
- setup(C, { expose: m, emit: S }) {
221
- const a = C, r = S, v = [
221
+ emits: ["ready", "onSave", "onSaveAndClose", "onOpenFileManager", "onImageDelete", "onLoaded", "onInit", "onUndoChange", "onRedoChange", "onPreview", "onPreviewClose", "onAlert", "onEditorClose", "onUnsavedChangesChange", "onOpenCustomBlockDialog", "onTemplateRename", "onEditorError"],
222
+ setup(S, { expose: k, emit: p }) {
223
+ const a = S, r = p, E = [
222
224
  "onSave",
223
225
  "onSaveAndClose",
224
226
  "onOpenFileManager",
@@ -231,70 +233,82 @@ const B = /* @__PURE__ */ p({
231
233
  "onPreviewClose",
232
234
  "onAlert",
233
235
  "onEditorClose",
234
- "onEdittedWithoutSaveChanged",
236
+ "onUnsavedChangesChange",
235
237
  "onOpenCustomBlockDialog",
236
238
  "onTemplateRename",
237
239
  "onEditorError"
238
- ], c = k(null), d = h(), u = (o) => {
239
- const e = d == null ? void 0 : d.vnode.props;
240
- if (!e) return !1;
241
- const t = "on" + o.charAt(0).toUpperCase() + o.slice(1);
242
- return typeof e[t] == "function" || Array.isArray(e[t]);
243
- }, i = () => {
240
+ ], m = U(), u = B(null), v = w(), l = (o) => {
241
+ var g;
242
+ if (typeof ((g = a.callbacks) == null ? void 0 : g[o]) == "function") return !0;
243
+ const c = v == null ? void 0 : v.vnode.props;
244
+ if (!c) return !1;
245
+ const s = "on" + o.charAt(0).toUpperCase() + o.slice(1);
246
+ return [s, s + "Once"].some((C) => typeof c[C] == "function" || Array.isArray(c[C]));
247
+ }, b = () => {
248
+ var c;
244
249
  const o = {};
245
- for (const e of v)
246
- u(e) && (o[e] = (t) => {
247
- t === void 0 ? r(e) : r(e, t);
250
+ for (const s of E)
251
+ l(s) && (o[s] = (g) => {
252
+ var h, f;
253
+ const C = (f = (h = a.callbacks) == null ? void 0 : h[s]) == null ? void 0 : f.call(h, g);
254
+ return g === void 0 ? r(s) : r(s, g), C;
248
255
  });
249
- return o;
256
+ return typeof ((c = a.callbacks) == null ? void 0 : c.getNonce) == "function" && (o.getNonce = () => a.callbacks.getNonce()), o;
250
257
  };
251
- let g = !1;
252
- async function s(o) {
253
- var e;
258
+ let i = !1;
259
+ async function d(o) {
260
+ var c;
254
261
  if (o)
255
262
  try {
256
- await ((e = o.destroy) == null ? void 0 : e.call(o));
257
- } catch (t) {
258
- console.warn("[@topol.io/editor-vue] LandingPageEditor destroy failed:", t);
263
+ await ((c = o.destroy) == null ? void 0 : c.call(o));
264
+ } catch (s) {
265
+ console.warn("[@topol.io/editor-vue] LandingPageEditor destroy failed:", s);
259
266
  }
260
267
  }
261
- return b(async () => {
268
+ return P(async () => {
269
+ var o, c;
262
270
  try {
263
- const o = await P.init({ config: a.options, ...i() }, { stage: a.stage });
264
- if (g) {
265
- await s(o);
271
+ const s = await y.init({ config: a.options, ...b() }, { stage: a.stage, loaderUrl: a.loaderUrl });
272
+ if (i) {
273
+ await d(s);
266
274
  return;
267
275
  }
268
- c.value = o, await o.render("#" + E);
269
- } catch (o) {
270
- if (g) return;
271
- const e = o instanceof Error ? o.message : "Failed to initialize editor";
272
- r("onEditorError", { source: "init", message: e, detail: o }), console.error("[@topol.io/editor-vue] LandingPageEditor initialization failed:", o);
276
+ u.value = s;
277
+ try {
278
+ await s.render(m.value);
279
+ } catch (g) {
280
+ throw u.value === s && (u.value = null), await d(s), g;
281
+ }
282
+ i || r("ready", s);
283
+ } catch (s) {
284
+ if (i) return;
285
+ const C = { source: "integration", message: s instanceof Error ? s.message : "Failed to initialize editor", detail: s };
286
+ (c = (o = a.callbacks) == null ? void 0 : o.onEditorError) == null || c.call(o, C), r("onEditorError", C), console.error("[@topol.io/editor-vue] LandingPageEditor initialization failed:", s);
273
287
  }
274
- }), f(() => {
275
- g = !0;
276
- const o = c.value;
277
- c.value = null, s(o);
278
- }), m({
279
- load: (o) => {
280
- var e;
281
- (e = c.value) == null || e.load(o);
288
+ }), T(() => {
289
+ i = !0;
290
+ const o = u.value;
291
+ u.value = null, d(o);
292
+ }), k({
293
+ load: async (o) => {
294
+ var c;
295
+ await ((c = u.value) == null ? void 0 : c.load(o));
282
296
  },
283
- save: () => {
297
+ save: async () => {
284
298
  var o;
285
- (o = c.value) == null || o.save();
286
- }
287
- }), (o, e) => (T(), L("div", {
288
- id: E,
289
- style: { position: "absolute", width: "100%", height: "100vh" }
290
- }));
299
+ await ((o = u.value) == null ? void 0 : o.save());
300
+ },
301
+ getEditor: () => u.value ?? null
302
+ }), (o, c) => (D(), A("div", {
303
+ ref_key: "container",
304
+ ref: m,
305
+ style: { width: "100%", height: "100vh" }
306
+ }, null, 512));
291
307
  }
292
308
  });
293
309
  export {
294
- O as CoreEmailEditor,
295
- _ as CoreLandingPageEditor,
296
- B as EmailEditor,
297
- R as LandingPageEditor,
298
- B as TopolEditor,
299
- M as TopolPlugin
310
+ N as CoreEmailEditor,
311
+ x as CoreLandingPageEditor,
312
+ _ as EmailEditor,
313
+ M as LandingPageEditor
300
314
  };
@@ -1 +1 @@
1
- (function(d,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("@topol.io/editor"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@topol.io/editor","vue"],u):(d=typeof globalThis<"u"?globalThis:d||self,u(d["topol-editor-vue"]={},d.TopolPlugin,d.Vue))})(this,function(d,u,s){"use strict";const k=s.defineComponent({__name:"EmailEditor",props:{options:{},callbacks:{},stage:{default:"production"},loaderUrl:{}},emits:["ready","onSave","onSaveAndClose","onTestSend","onBannerClick","onOpenFileManager","onLoaded","onSavedSectionSave","onSavedSectionRemove","onSavedSectionEdit","onImageDelete","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onEdittedWithoutSaveChanged","onBlocksAndStructuresVisibilityChange","onOpenCustomBlockDialog","onTemplateRename","onTemplateUpdated","updateTestingEmailAddresses","onEditorError","onLanguageCreated","onLanguageDeleted","onLanguageSelected","onPrimaryLanguageChanged","onGetMutations","onCloudSave","onCloudTemplateChange"],setup(E,{expose:p,emit:h}){const a=E,r=h,S=s.getCurrentInstance(),v=s.ref();let g,C=!1;p({getEditor:()=>g??null});const i=l=>{var o,n,e;const c=`on${l[0].toUpperCase()}${l.slice(1)}`;return!!((o=a.callbacks)!=null&&o[l])||!!((n=S.vnode.props)!=null&&n[c])||!!((e=S.vnode.props)!=null&&e[`${c}Once`])},m=l=>{var o,n;if(C)return;const c={source:"integration",message:l instanceof Error?l.message:String(l),detail:l};i("onEditorError")||console.error("[@topol.io/editor-vue] EmailEditor failed:",l),(n=(o=a.callbacks)==null?void 0:o.onEditorError)==null||n.call(o,c),r("onEditorError",c)};return s.onMounted(async()=>{var c;const l={onSave:i("onSave")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onSave)==null?void 0:t.call(e,o);return r("onSave",o),n}:void 0,onSaveAndClose:i("onSaveAndClose")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onSaveAndClose)==null?void 0:t.call(e,o);return r("onSaveAndClose",o),n}:void 0,onTestSend:i("onTestSend")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onTestSend)==null?void 0:t.call(e,o);return r("onTestSend",o),n}:void 0,onBannerClick:i("onBannerClick")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onBannerClick)==null?void 0:t.call(e,o);return r("onBannerClick",o),n}:void 0,onOpenFileManager:i("onOpenFileManager")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onOpenFileManager)==null?void 0:e.call(n);return r("onOpenFileManager"),o}:void 0,onLoaded:i("onLoaded")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onLoaded)==null?void 0:e.call(n);return r("onLoaded"),o}:void 0,onSavedSectionSave:i("onSavedSectionSave")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onSavedSectionSave)==null?void 0:t.call(e,o);return r("onSavedSectionSave",o),n}:void 0,onSavedSectionRemove:i("onSavedSectionRemove")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onSavedSectionRemove)==null?void 0:t.call(e,o);return r("onSavedSectionRemove",o),n}:void 0,onSavedSectionEdit:i("onSavedSectionEdit")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onSavedSectionEdit)==null?void 0:t.call(e,o);return r("onSavedSectionEdit",o),n}:void 0,onImageDelete:i("onImageDelete")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onImageDelete)==null?void 0:t.call(e,o);return r("onImageDelete",o),n}:void 0,onInit:i("onInit")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onInit)==null?void 0:e.call(n);return r("onInit"),o}:void 0,onUndoChange:i("onUndoChange")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onUndoChange)==null?void 0:t.call(e,o);return r("onUndoChange",o),n}:void 0,onRedoChange:i("onRedoChange")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onRedoChange)==null?void 0:t.call(e,o);return r("onRedoChange",o),n}:void 0,onPreview:i("onPreview")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onPreview)==null?void 0:t.call(e,o);return r("onPreview",o),n}:void 0,onPreviewClose:i("onPreviewClose")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onPreviewClose)==null?void 0:e.call(n);return r("onPreviewClose"),o}:void 0,onAlert:i("onAlert")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onAlert)==null?void 0:t.call(e,o);return r("onAlert",o),n}:void 0,onEditorClose:i("onEditorClose")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onEditorClose)==null?void 0:e.call(n);return r("onEditorClose"),o}:void 0,onEdittedWithoutSaveChanged:i("onEdittedWithoutSaveChanged")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onEdittedWithoutSaveChanged)==null?void 0:t.call(e,o);return r("onEdittedWithoutSaveChanged",o),n}:void 0,onBlocksAndStructuresVisibilityChange:i("onBlocksAndStructuresVisibilityChange")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onBlocksAndStructuresVisibilityChange)==null?void 0:t.call(e,o);return r("onBlocksAndStructuresVisibilityChange",o),n}:void 0,onOpenCustomBlockDialog:i("onOpenCustomBlockDialog")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onOpenCustomBlockDialog)==null?void 0:t.call(e,o);return r("onOpenCustomBlockDialog",o),n}:void 0,onTemplateRename:i("onTemplateRename")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onTemplateRename)==null?void 0:t.call(e,o);return r("onTemplateRename",o),n}:void 0,onTemplateUpdated:i("onTemplateUpdated")?()=>{var n,e;const o=(e=(n=a.callbacks)==null?void 0:n.onTemplateUpdated)==null?void 0:e.call(n);return r("onTemplateUpdated"),o}:void 0,updateTestingEmailAddresses:i("updateTestingEmailAddresses")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.updateTestingEmailAddresses)==null?void 0:t.call(e,o);return r("updateTestingEmailAddresses",o),n}:void 0,onEditorError:i("onEditorError")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onEditorError)==null?void 0:t.call(e,o);return r("onEditorError",o),n}:void 0,onLanguageCreated:i("onLanguageCreated")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onLanguageCreated)==null?void 0:t.call(e,o);return r("onLanguageCreated",o),n}:void 0,onLanguageDeleted:i("onLanguageDeleted")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onLanguageDeleted)==null?void 0:t.call(e,o);return r("onLanguageDeleted",o),n}:void 0,onLanguageSelected:i("onLanguageSelected")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onLanguageSelected)==null?void 0:t.call(e,o);return r("onLanguageSelected",o),n}:void 0,onPrimaryLanguageChanged:i("onPrimaryLanguageChanged")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onPrimaryLanguageChanged)==null?void 0:t.call(e,o);return r("onPrimaryLanguageChanged",o),n}:void 0,onGetMutations:i("onGetMutations")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onGetMutations)==null?void 0:t.call(e,o);return r("onGetMutations",o),n}:void 0,getNonce:(c=a.callbacks)!=null&&c.getNonce?()=>a.callbacks.getNonce():void 0,onCloudSave:i("onCloudSave")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onCloudSave)==null?void 0:t.call(e,o);return r("onCloudSave",o),n}:void 0,onCloudTemplateChange:i("onCloudTemplateChange")?o=>{var e,t;const n=(t=(e=a.callbacks)==null?void 0:e.onCloudTemplateChange)==null?void 0:t.call(e,o);return r("onCloudTemplateChange",o),n}:void 0};try{const o=await u.EmailEditor.init({config:a.options,...l},{stage:a.stage,loaderUrl:a.loaderUrl});if(C){await o.destroy();return}g=o;try{await o.render(v.value)}catch(n){throw await o.destroy(),g=void 0,n}C||r("ready",o)}catch(o){m(o)}}),s.onBeforeUnmount(()=>{C=!0;const l=g;g=void 0,l==null||l.destroy().catch(c=>console.warn("[@topol.io/editor-vue] EmailEditor cleanup failed:",c))}),(l,c)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"container",ref:v,style:{width:"100%",height:"100vh"}},null,512))}}),f="topol-landing-page-editor-id",b=s.defineComponent({__name:"LandingPageEditor",props:{options:{},stage:{default:"production"}},emits:["onSave","onSaveAndClose","onOpenFileManager","onImageDelete","onLoaded","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onEdittedWithoutSaveChanged","onOpenCustomBlockDialog","onTemplateRename","onEditorError"],setup(E,{expose:p,emit:h}){const a=E,r=h,S=["onSave","onSaveAndClose","onOpenFileManager","onImageDelete","onLoaded","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onEdittedWithoutSaveChanged","onOpenCustomBlockDialog","onTemplateRename","onEditorError"],v=s.ref(null),g=s.getCurrentInstance(),C=n=>{const e=g==null?void 0:g.vnode.props;if(!e)return!1;const t="on"+n.charAt(0).toUpperCase()+n.slice(1);return typeof e[t]=="function"||Array.isArray(e[t])},i=()=>{const n={};for(const e of S)C(e)&&(n[e]=t=>{t===void 0?r(e):r(e,t)});return n};let m=!1;async function l(n){var e;if(n)try{await((e=n.destroy)==null?void 0:e.call(n))}catch(t){console.warn("[@topol.io/editor-vue] LandingPageEditor destroy failed:",t)}}return s.onMounted(async()=>{try{const n=await u.LandingPageEditor.init({config:a.options,...i()},{stage:a.stage});if(m){await l(n);return}v.value=n,await n.render("#"+f)}catch(n){if(m)return;const e=n instanceof Error?n.message:"Failed to initialize editor";r("onEditorError",{source:"init",message:e,detail:n}),console.error("[@topol.io/editor-vue] LandingPageEditor initialization failed:",n)}}),s.onBeforeUnmount(()=>{m=!0;const n=v.value;v.value=null,l(n)}),p({load:n=>{var e;(e=v.value)==null||e.load(n)},save:()=>{var n;(n=v.value)==null||n.save()}}),(n,e)=>(s.openBlock(),s.createElementBlock("div",{id:f,style:{position:"absolute",width:"100%",height:"100vh"}}))}});Object.defineProperty(d,"CoreEmailEditor",{enumerable:!0,get:()=>u.EmailEditor}),Object.defineProperty(d,"CoreLandingPageEditor",{enumerable:!0,get:()=>u.LandingPageEditor}),d.TopolPlugin=u,d.EmailEditor=k,d.LandingPageEditor=b,d.TopolEditor=k,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
1
+ (function(v,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("@topol.io/editor"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@topol.io/editor","vue"],m):(v=typeof globalThis<"u"?globalThis:v||self,m(v["topol-editor-vue"]={},v.TopolPlugin,v.Vue))})(this,function(v,m,d){"use strict";const T=d.defineComponent({__name:"EmailEditor",props:{options:{},callbacks:{},stage:{default:"production"},loaderUrl:{}},emits:["ready","onSave","onSaveAndClose","onTestSend","onBannerClick","onOpenFileManager","onLoaded","onSavedSectionSave","onSavedSectionRemove","onSavedSectionEdit","onImageDelete","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onUnsavedChangesChange","onHiddenElementsVisibilityChange","onOpenCustomBlockDialog","onTemplateRename","onTemplateUpdated","onTestingEmailsChange","onEditorError","onLanguageCreated","onLanguageDeleted","onLanguageSelected","onPrimaryLanguageChanged","onGetMutations","onCloudSave","onCloudTemplateChange"],setup(k,{expose:b,emit:L}){const a=k,r=L,p=d.getCurrentInstance(),S=d.ref();let g,E=!1;b({getEditor:()=>g??null});const i=s=>{var n,t,e;const u=`on${s[0].toUpperCase()}${s.slice(1)}`;return!!((n=a.callbacks)!=null&&n[s])||!!((t=p.vnode.props)!=null&&t[u])||!!((e=p.vnode.props)!=null&&e[`${u}Once`])},w=s=>{var n,t;if(E)return;const u={source:"integration",message:s instanceof Error?s.message:String(s),detail:s};i("onEditorError")||console.error("[@topol.io/editor-vue] EmailEditor failed:",s),(t=(n=a.callbacks)==null?void 0:n.onEditorError)==null||t.call(n,u),r("onEditorError",u)};return d.onMounted(async()=>{var u;const s={onSave:i("onSave")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onSave)==null?void 0:o.call(e,n);return r("onSave",n),t}:void 0,onSaveAndClose:i("onSaveAndClose")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onSaveAndClose)==null?void 0:o.call(e,n);return r("onSaveAndClose",n),t}:void 0,onTestSend:i("onTestSend")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onTestSend)==null?void 0:o.call(e,n);return r("onTestSend",n),t}:void 0,onBannerClick:i("onBannerClick")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onBannerClick)==null?void 0:o.call(e,n);return r("onBannerClick",n),t}:void 0,onOpenFileManager:i("onOpenFileManager")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onOpenFileManager)==null?void 0:e.call(t);return r("onOpenFileManager"),n}:void 0,onLoaded:i("onLoaded")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onLoaded)==null?void 0:e.call(t);return r("onLoaded"),n}:void 0,onSavedSectionSave:i("onSavedSectionSave")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onSavedSectionSave)==null?void 0:o.call(e,n);return r("onSavedSectionSave",n),t}:void 0,onSavedSectionRemove:i("onSavedSectionRemove")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onSavedSectionRemove)==null?void 0:o.call(e,n);return r("onSavedSectionRemove",n),t}:void 0,onSavedSectionEdit:i("onSavedSectionEdit")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onSavedSectionEdit)==null?void 0:o.call(e,n);return r("onSavedSectionEdit",n),t}:void 0,onImageDelete:i("onImageDelete")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onImageDelete)==null?void 0:o.call(e,n);return r("onImageDelete",n),t}:void 0,onInit:i("onInit")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onInit)==null?void 0:e.call(t);return r("onInit"),n}:void 0,onUndoChange:i("onUndoChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onUndoChange)==null?void 0:o.call(e,n);return r("onUndoChange",n),t}:void 0,onRedoChange:i("onRedoChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onRedoChange)==null?void 0:o.call(e,n);return r("onRedoChange",n),t}:void 0,onPreview:i("onPreview")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onPreview)==null?void 0:o.call(e,n);return r("onPreview",n),t}:void 0,onPreviewClose:i("onPreviewClose")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onPreviewClose)==null?void 0:e.call(t);return r("onPreviewClose"),n}:void 0,onAlert:i("onAlert")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onAlert)==null?void 0:o.call(e,n);return r("onAlert",n),t}:void 0,onEditorClose:i("onEditorClose")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onEditorClose)==null?void 0:e.call(t);return r("onEditorClose"),n}:void 0,onUnsavedChangesChange:i("onUnsavedChangesChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onUnsavedChangesChange)==null?void 0:o.call(e,n);return r("onUnsavedChangesChange",n),t}:void 0,onHiddenElementsVisibilityChange:i("onHiddenElementsVisibilityChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onHiddenElementsVisibilityChange)==null?void 0:o.call(e,n);return r("onHiddenElementsVisibilityChange",n),t}:void 0,onOpenCustomBlockDialog:i("onOpenCustomBlockDialog")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onOpenCustomBlockDialog)==null?void 0:o.call(e,n);return r("onOpenCustomBlockDialog",n),t}:void 0,onTemplateRename:i("onTemplateRename")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onTemplateRename)==null?void 0:o.call(e,n);return r("onTemplateRename",n),t}:void 0,onTemplateUpdated:i("onTemplateUpdated")?()=>{var t,e;const n=(e=(t=a.callbacks)==null?void 0:t.onTemplateUpdated)==null?void 0:e.call(t);return r("onTemplateUpdated"),n}:void 0,onTestingEmailsChange:i("onTestingEmailsChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onTestingEmailsChange)==null?void 0:o.call(e,n);return r("onTestingEmailsChange",n),t}:void 0,onEditorError:i("onEditorError")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onEditorError)==null?void 0:o.call(e,n);return r("onEditorError",n),t}:void 0,onLanguageCreated:i("onLanguageCreated")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onLanguageCreated)==null?void 0:o.call(e,n);return r("onLanguageCreated",n),t}:void 0,onLanguageDeleted:i("onLanguageDeleted")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onLanguageDeleted)==null?void 0:o.call(e,n);return r("onLanguageDeleted",n),t}:void 0,onLanguageSelected:i("onLanguageSelected")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onLanguageSelected)==null?void 0:o.call(e,n);return r("onLanguageSelected",n),t}:void 0,onPrimaryLanguageChanged:i("onPrimaryLanguageChanged")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onPrimaryLanguageChanged)==null?void 0:o.call(e,n);return r("onPrimaryLanguageChanged",n),t}:void 0,onGetMutations:i("onGetMutations")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onGetMutations)==null?void 0:o.call(e,n);return r("onGetMutations",n),t}:void 0,getNonce:(u=a.callbacks)!=null&&u.getNonce?()=>a.callbacks.getNonce():void 0,onCloudSave:i("onCloudSave")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onCloudSave)==null?void 0:o.call(e,n);return r("onCloudSave",n),t}:void 0,onCloudTemplateChange:i("onCloudTemplateChange")?n=>{var e,o;const t=(o=(e=a.callbacks)==null?void 0:e.onCloudTemplateChange)==null?void 0:o.call(e,n);return r("onCloudTemplateChange",n),t}:void 0};try{const n=await m.EmailEditor.init({config:a.options,...s},{stage:a.stage,loaderUrl:a.loaderUrl});if(E){await n.destroy();return}g=n;try{await n.render(S.value)}catch(t){throw await n.destroy(),g=void 0,t}E||r("ready",n)}catch(n){w(n)}}),d.onBeforeUnmount(()=>{E=!0;const s=g;g=void 0,s==null||s.destroy().catch(u=>console.warn("[@topol.io/editor-vue] EmailEditor cleanup failed:",u))}),(s,u)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"container",ref:S,style:{width:"100%",height:"100vh"}},null,512))}}),U=d.defineComponent({__name:"LandingPageEditor",props:{options:{},callbacks:{},stage:{default:"production"},loaderUrl:{}},emits:["ready","onSave","onSaveAndClose","onOpenFileManager","onImageDelete","onLoaded","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onUnsavedChangesChange","onOpenCustomBlockDialog","onTemplateRename","onEditorError"],setup(k,{expose:b,emit:L}){const a=k,r=L,p=["onSave","onSaveAndClose","onOpenFileManager","onImageDelete","onLoaded","onInit","onUndoChange","onRedoChange","onPreview","onPreviewClose","onAlert","onEditorClose","onUnsavedChangesChange","onOpenCustomBlockDialog","onTemplateRename","onEditorError"],S=d.ref(),g=d.shallowRef(null),E=d.getCurrentInstance(),i=o=>{var C;if(typeof((C=a.callbacks)==null?void 0:C[o])=="function")return!0;const c=E==null?void 0:E.vnode.props;if(!c)return!1;const l="on"+o.charAt(0).toUpperCase()+o.slice(1);return[l,l+"Once"].some(h=>typeof c[h]=="function"||Array.isArray(c[h]))},w=()=>{var c;const o={};for(const l of p)i(l)&&(o[l]=C=>{var f,P;const h=(P=(f=a.callbacks)==null?void 0:f[l])==null?void 0:P.call(f,C);return C===void 0?r(l):r(l,C),h});return typeof((c=a.callbacks)==null?void 0:c.getNonce)=="function"&&(o.getNonce=()=>a.callbacks.getNonce()),o};let s=!1;async function u(o){var c;if(o)try{await((c=o.destroy)==null?void 0:c.call(o))}catch(l){console.warn("[@topol.io/editor-vue] LandingPageEditor destroy failed:",l)}}return d.onMounted(async()=>{var o,c;try{const l=await m.LandingPageEditor.init({config:a.options,...w()},{stage:a.stage,loaderUrl:a.loaderUrl});if(s){await u(l);return}g.value=l;try{await l.render(S.value)}catch(C){throw g.value===l&&(g.value=null),await u(l),C}s||r("ready",l)}catch(l){if(s)return;const h={source:"integration",message:l instanceof Error?l.message:"Failed to initialize editor",detail:l};(c=(o=a.callbacks)==null?void 0:o.onEditorError)==null||c.call(o,h),r("onEditorError",h),console.error("[@topol.io/editor-vue] LandingPageEditor initialization failed:",l)}}),d.onBeforeUnmount(()=>{s=!0;const o=g.value;g.value=null,u(o)}),b({load:async o=>{var c;await((c=g.value)==null?void 0:c.load(o))},save:async()=>{var o;await((o=g.value)==null?void 0:o.save())},getEditor:()=>g.value??null}),(o,c)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"container",ref:S,style:{width:"100%",height:"100vh"}},null,512))}});Object.defineProperty(v,"CoreEmailEditor",{enumerable:!0,get:()=>m.EmailEditor}),Object.defineProperty(v,"CoreLandingPageEditor",{enumerable:!0,get:()=>m.LandingPageEditor}),v.EmailEditor=T,v.LandingPageEditor=U,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
@@ -1,4 +1,4 @@
1
- import type { IEmailCallbacks, IEmailEditorInstance, IStage, IErrorData } from "@topol.io/editor";
1
+ import type { IEmailCallbacks, IEmailEditorInstance, IStage, IEmailErrorPayload } from "@topol.io/editor";
2
2
  import type { IVueEmailOptions } from "./types";
3
3
  type __VLS_Props = {
4
4
  options: IVueEmailOptions;
@@ -9,9 +9,9 @@ type __VLS_Props = {
9
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
10
10
  getEditor: () => IEmailEditorInstance | null;
11
11
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
- onSave: (payload: import("@topol.io/editor").ISaveData) => any;
13
- onSaveAndClose: (payload: import("@topol.io/editor").ISaveData) => any;
14
- onTestSend: (payload: import("@topol.io/editor").ISendTestData) => any;
12
+ onSave: (payload: import("@topol.io/editor").IEmailSavePayload) => any;
13
+ onSaveAndClose: (payload: import("@topol.io/editor").IEmailSavePayload) => any;
14
+ onTestSend: (payload: import("@topol.io/editor").IEmailTestSendPayload) => any;
15
15
  onBannerClick: (payload: {
16
16
  json: unknown;
17
17
  html: unknown;
@@ -19,13 +19,13 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
19
19
  onOpenFileManager: () => any;
20
20
  onLoaded: () => any;
21
21
  onSavedSectionSave: (payload: {
22
- section: import("@topol.io/editor").ISavedBlock;
22
+ section: import("@topol.io/editor").ISavedSectionDraft;
23
23
  }) => any;
24
24
  onSavedSectionRemove: (payload: {
25
- id: number | string;
25
+ id: number;
26
26
  }) => any;
27
27
  onSavedSectionEdit: (payload: {
28
- id: number | string;
28
+ id: number;
29
29
  }) => any;
30
30
  onImageDelete: (payload: {
31
31
  items: import("@topol.io/editor").IEmailDeletedItem[];
@@ -45,11 +45,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
45
45
  notification: import("@topol.io/editor").INotification;
46
46
  }) => any;
47
47
  onEditorClose: () => any;
48
- onEdittedWithoutSaveChanged: (payload: {
49
- value: boolean;
48
+ onUnsavedChangesChange: (payload: {
49
+ hasUnsavedChanges: boolean;
50
50
  }) => any;
51
- onBlocksAndStructuresVisibilityChange: (payload: {
52
- value: boolean;
51
+ onHiddenElementsVisibilityChange: (payload: {
52
+ visible: boolean;
53
53
  }) => any;
54
54
  onOpenCustomBlockDialog: (payload: {
55
55
  block: unknown;
@@ -58,10 +58,10 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
58
58
  name: string;
59
59
  }) => any;
60
60
  onTemplateUpdated: () => any;
61
- updateTestingEmailAddresses: (payload: {
61
+ onTestingEmailsChange: (payload: {
62
62
  emails: string[];
63
63
  }) => any;
64
- onEditorError: (payload: IErrorData) => any;
64
+ onEditorError: (payload: IEmailErrorPayload) => any;
65
65
  onLanguageCreated: (payload: import("@topol.io/editor").ILanguageChangePayload) => any;
66
66
  onLanguageDeleted: (payload: import("@topol.io/editor").ILanguageChangePayload) => any;
67
67
  onLanguageSelected: (payload: {
@@ -75,9 +75,9 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
75
75
  onCloudTemplateChange: (payload: import("@topol.io/editor").ICloudTemplateChangePayload) => any;
76
76
  ready: (editor: IEmailEditorInstance) => any;
77
77
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
78
- onOnSave?: ((payload: import("@topol.io/editor").ISaveData) => any) | undefined;
79
- onOnSaveAndClose?: ((payload: import("@topol.io/editor").ISaveData) => any) | undefined;
80
- onOnTestSend?: ((payload: import("@topol.io/editor").ISendTestData) => any) | undefined;
78
+ onOnSave?: ((payload: import("@topol.io/editor").IEmailSavePayload) => any) | undefined;
79
+ onOnSaveAndClose?: ((payload: import("@topol.io/editor").IEmailSavePayload) => any) | undefined;
80
+ onOnTestSend?: ((payload: import("@topol.io/editor").IEmailTestSendPayload) => any) | undefined;
81
81
  onOnBannerClick?: ((payload: {
82
82
  json: unknown;
83
83
  html: unknown;
@@ -85,13 +85,13 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
85
85
  onOnOpenFileManager?: (() => any) | undefined;
86
86
  onOnLoaded?: (() => any) | undefined;
87
87
  onOnSavedSectionSave?: ((payload: {
88
- section: import("@topol.io/editor").ISavedBlock;
88
+ section: import("@topol.io/editor").ISavedSectionDraft;
89
89
  }) => any) | undefined;
90
90
  onOnSavedSectionRemove?: ((payload: {
91
- id: number | string;
91
+ id: number;
92
92
  }) => any) | undefined;
93
93
  onOnSavedSectionEdit?: ((payload: {
94
- id: number | string;
94
+ id: number;
95
95
  }) => any) | undefined;
96
96
  onOnImageDelete?: ((payload: {
97
97
  items: import("@topol.io/editor").IEmailDeletedItem[];
@@ -111,11 +111,11 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
111
111
  notification: import("@topol.io/editor").INotification;
112
112
  }) => any) | undefined;
113
113
  onOnEditorClose?: (() => any) | undefined;
114
- onOnEdittedWithoutSaveChanged?: ((payload: {
115
- value: boolean;
114
+ onOnUnsavedChangesChange?: ((payload: {
115
+ hasUnsavedChanges: boolean;
116
116
  }) => any) | undefined;
117
- onOnBlocksAndStructuresVisibilityChange?: ((payload: {
118
- value: boolean;
117
+ onOnHiddenElementsVisibilityChange?: ((payload: {
118
+ visible: boolean;
119
119
  }) => any) | undefined;
120
120
  onOnOpenCustomBlockDialog?: ((payload: {
121
121
  block: unknown;
@@ -124,10 +124,10 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {
124
124
  name: string;
125
125
  }) => any) | undefined;
126
126
  onOnTemplateUpdated?: (() => any) | undefined;
127
- onUpdateTestingEmailAddresses?: ((payload: {
127
+ onOnTestingEmailsChange?: ((payload: {
128
128
  emails: string[];
129
129
  }) => any) | undefined;
130
- onOnEditorError?: ((payload: IErrorData) => any) | undefined;
130
+ onOnEditorError?: ((payload: IEmailErrorPayload) => any) | undefined;
131
131
  onOnLanguageCreated?: ((payload: import("@topol.io/editor").ILanguageChangePayload) => any) | undefined;
132
132
  onOnLanguageDeleted?: ((payload: import("@topol.io/editor").ILanguageChangePayload) => any) | undefined;
133
133
  onOnLanguageSelected?: ((payload: {
@@ -1,12 +1,21 @@
1
- import { type IStage } from "@topol.io/editor";
1
+ import { type ILandingPageCallbacks, type ILandingPageEditorInstance, type IStage } from "@topol.io/editor";
2
2
  import type { IVueLandingPageOptions } from "./types";
3
3
  type __VLS_Props = {
4
4
  options: IVueLandingPageOptions;
5
+ /**
6
+ * Callbacks as functions, for the ones whose result the editor uses: `getNonce` (the only
7
+ * way to pass it), and an async `onSave` / `onSaveAndClose` / `onEditorClose` the editor
8
+ * should wait for. A callback given here and its event (`@on-save`) both fire.
9
+ */
10
+ callbacks?: ILandingPageCallbacks;
5
11
  stage?: IStage;
12
+ /** Explicit loader URL, e.g. a deployed preview or a local build. One loader URL per page. */
13
+ loaderUrl?: string;
6
14
  };
7
15
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
8
- load: (template: unknown) => void;
9
- save: () => void;
16
+ load: (template: unknown) => Promise<void>;
17
+ save: () => Promise<void>;
18
+ getEditor: () => ILandingPageEditorInstance | null;
10
19
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
20
  [x: string]: any;
12
21
  } & {
@@ -7,7 +7,7 @@
7
7
  * import { EmailEditor, type IVueEmailOptions } from '@topol.io/editor-vue';
8
8
  *
9
9
  * const options: IVueEmailOptions = {
10
- * authorize: { apiKey: 'your-key', userId: 'user-123' },
10
+ * authorize: { apiKey: 'your-key', entityId: 'user-123' },
11
11
  * };
12
12
  * </script>
13
13
  *
@@ -22,7 +22,7 @@
22
22
  * import { LandingPageEditor, type IVueLandingPageOptions } from '@topol.io/editor-vue';
23
23
  *
24
24
  * const options: IVueLandingPageOptions = {
25
- * authorize: { apiKey: 'your-key', userId: 'user-123' },
25
+ * authorize: { apiKey: 'your-key', entityId: 'user-123' },
26
26
  * };
27
27
  * </script>
28
28
  *
@@ -31,13 +31,8 @@
31
31
  * </template>
32
32
  * ```
33
33
  */
34
- export { default as TopolPlugin, EmailEditor as CoreEmailEditor, LandingPageEditor as CoreLandingPageEditor } from "@topol.io/editor";
34
+ export { EmailEditor as CoreEmailEditor, LandingPageEditor as CoreLandingPageEditor } from "@topol.io/editor";
35
35
  export { default as EmailEditor } from "./EmailEditor.vue";
36
36
  export { default as LandingPageEditor } from "./LandingPageEditor.vue";
37
- /**
38
- * @deprecated Use EmailEditor instead. TopolEditor is an alias for backwards compatibility.
39
- */
40
- export { default as TopolEditor } from "./TopolEditor.vue";
41
- export type { ITopolOptions, ILandingPageOptions, ILandingPageEditorInstance, IEmailCallbacks, ILandingPageCallbacks, ISaveData, IErrorData, ISendTestData, INotification, ISavedBlock, IStage, TopolSection, } from "@topol.io/editor";
42
- export type { IVueEmailOptions, IVueLandingPageOptions, IVueOptions } from "./types";
43
- export type { IEmailConfig, IEmailEditorInstance, IEmailEditorPluginOptions, ICloudOptions, ICloudFeatures, INonceAuthCallbacks, ICountdownOptions, ICountdownDefaultColors, ICountdownDateMergeTag, ICloudCallbacks, ICloudSavePayload, ICloudTemplateChangePayload, ISavedSection, IPremadeSection, IPremadeSections, IPremadeSectionsOptions, ILanguageMutation, ILanguageChangePayload, IEmailDeletedItem, IUpdateTemplateOptions, } from "@topol.io/editor";
37
+ export type { IVueEmailOptions, IVueLandingPageOptions } from "./types";
38
+ export type { IEmailOptions, IEmailConfig, IEmailCallbacks, IEmailEditorInstance, IEmailEditorPluginOptions, IEmailSavePayload, IEmailErrorPayload, IEmailTestSendPayload, IEmailDeletedItem, IUpdateTemplateOptions, ILanguageMutation, ILanguageChangePayload, ILandingPageOptions, ILandingPageConfig, ILandingPageCallbacks, ILandingPageEditorInstance, ILandingPageEditorPluginOptions, ILandingPageSavePayload, ILandingPageErrorPayload, ILandingPageDeletedItem, IStage, EditorErrorSource, INonceAuthCallbacks, IAuthorize, EmailEditorShortcut, LandingPageEditorShortcut, INotification, ICloudOptions, ICloudFeatures, ICloudCallbacks, ICloudSavePayload, ICloudTemplateChangePayload, ICountdownOptions, ICountdownDefaultColors, ICountdownDateMergeTag, ISavedSection, ISavedSectionDraft, IPremadeSection, IPremadeSections, IPremadeSectionsOptions, } from "@topol.io/editor";
@@ -1,19 +1,11 @@
1
+ import type { IEmailConfig, ILandingPageConfig } from "@topol.io/editor";
1
2
  /**
2
- * Type re-exports from core package and Vue-specific types.
3
- */
4
- export type { ITopolOptions, ILandingPageOptions, ILandingPageEditorInstance, IEmailCallbacks, ILandingPageCallbacks, ISaveData, IErrorData, ISendTestData, INotification, ISavedBlock, IStage, TopolSection, } from "@topol.io/editor";
5
- import type { IEmailConfig, ILandingPageOptions } from "@topol.io/editor";
6
- /**
7
- * Vue-specific options for EmailEditor component.
8
- * Contains the v4 config; callbacks are provided separately.
3
+ * The `options` prop of the EmailEditor component: the editor config.
4
+ * Callbacks are passed through the `callbacks` prop or as events.
9
5
  */
10
6
  export type IVueEmailOptions = IEmailConfig;
11
7
  /**
12
- * Vue-specific options for LandingPageEditor component.
13
- * Contains only the config options, as callbacks are handled as Vue emits.
14
- */
15
- export type IVueLandingPageOptions = ILandingPageOptions["config"];
16
- /**
17
- * @deprecated Use IVueEmailOptions instead.
8
+ * The `options` prop of the LandingPageEditor component: the editor config.
9
+ * Callbacks are passed through the `callbacks` prop or as events.
18
10
  */
19
- export type IVueOptions = IVueEmailOptions;
11
+ export type IVueLandingPageOptions = ILandingPageConfig;
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "author": "Topol.io",
15
15
  "homepage": "https://topol.io",
16
16
  "license": "Apache-2.0",
17
- "version": "1.0.0-alpha.10",
17
+ "version": "1.0.0-alpha.12",
18
18
  "type": "module",
19
19
  "files": [
20
20
  "dist"
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@topol.io/editor": "1.0.0-alpha.10"
32
+ "@topol.io/editor": "1.0.0-alpha.12"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "vue": "^3.2.25"
@@ -1,3 +0,0 @@
1
- /** @deprecated Naming alias only; uses the v4 EmailEditor contract. */
2
- import EmailEditor from "./EmailEditor.vue";
3
- export default EmailEditor;