@useinsider/guido 1.0.0-beta.e239762 → 1.0.0-beta.e40480e

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 (102) hide show
  1. package/README.md +178 -89
  2. package/dist/@types/generic.d.ts +1 -4
  3. package/dist/components/Guido.vue.d.ts +2 -0
  4. package/dist/components/Guido.vue.js +6 -6
  5. package/dist/components/Guido.vue2.js +20 -13
  6. package/dist/components/organisms/{top-bar/Header.vue.js → header/HeaderWrapper.vue.js} +7 -7
  7. package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -0
  8. package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.js → header/LeftSlot.vue.js} +7 -7
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +11 -0
  10. package/dist/components/organisms/header/MiddleSlot.vue.d.ts +2 -0
  11. package/dist/components/organisms/header/MiddleSlot.vue.js +17 -0
  12. package/dist/components/organisms/header/MiddleSlot.vue2.js +20 -0
  13. package/dist/components/organisms/header/RightSlot.vue.d.ts +2 -0
  14. package/dist/components/organisms/header/RightSlot.vue.js +20 -0
  15. package/dist/components/organisms/header/RightSlot.vue2.js +24 -0
  16. package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
  17. package/dist/components/organisms/header/ViewOptions.vue2.js +15 -0
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +2 -0
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +22 -0
  20. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +15 -0
  21. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +16 -0
  22. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +18 -0
  23. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +16 -0
  24. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
  25. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +23 -0
  26. package/dist/composables/useActionsApi.d.ts +4 -0
  27. package/dist/composables/useActionsApi.js +36 -0
  28. package/dist/composables/useExport.d.ts +3 -0
  29. package/dist/composables/useExport.js +30 -0
  30. package/dist/composables/useStripo.d.ts +1 -1
  31. package/dist/composables/useStripo.js +41 -26
  32. package/dist/composables/useTemplates.d.ts +1 -1
  33. package/dist/composables/useToaster.js +29 -0
  34. package/dist/composables/useTranslations.d.ts +1 -3
  35. package/dist/composables/useTranslations.js +18 -0
  36. package/dist/composables/useVersionHistoryApi.d.ts +8 -0
  37. package/dist/composables/useVersionHistoryApi.js +53 -0
  38. package/dist/enums/defaults.d.ts +2 -0
  39. package/dist/enums/defaults.js +6 -0
  40. package/dist/guido.css +1 -1
  41. package/dist/guido.png +0 -0
  42. package/dist/library.d.ts +1 -0
  43. package/dist/node_modules/lodash-es/_Hash.js +20 -0
  44. package/dist/node_modules/lodash-es/_ListCache.js +20 -0
  45. package/dist/node_modules/lodash-es/_Map.js +6 -0
  46. package/dist/node_modules/lodash-es/_MapCache.js +20 -0
  47. package/dist/node_modules/lodash-es/_Symbol.js +5 -0
  48. package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
  49. package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
  50. package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
  51. package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
  52. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
  53. package/dist/node_modules/lodash-es/_getMapData.js +8 -0
  54. package/dist/node_modules/lodash-es/_getNative.js +9 -0
  55. package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
  56. package/dist/node_modules/lodash-es/_getValue.js +6 -0
  57. package/dist/node_modules/lodash-es/_hashClear.js +7 -0
  58. package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
  59. package/dist/node_modules/lodash-es/_hashGet.js +13 -0
  60. package/dist/node_modules/lodash-es/_hashHas.js +9 -0
  61. package/dist/node_modules/lodash-es/_hashSet.js +9 -0
  62. package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
  63. package/dist/node_modules/lodash-es/_isMasked.js +11 -0
  64. package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
  65. package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
  66. package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
  67. package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
  68. package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
  69. package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
  70. package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  71. package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
  72. package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
  73. package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
  74. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
  75. package/dist/node_modules/lodash-es/_objectToString.js +7 -0
  76. package/dist/node_modules/lodash-es/_root.js +5 -0
  77. package/dist/node_modules/lodash-es/_toSource.js +17 -0
  78. package/dist/node_modules/lodash-es/eq.js +6 -0
  79. package/dist/node_modules/lodash-es/isFunction.js +12 -0
  80. package/dist/node_modules/lodash-es/isObject.js +7 -0
  81. package/dist/node_modules/lodash-es/memoize.js +18 -0
  82. package/dist/node_modules/pinia/dist/pinia.js +317 -0
  83. package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +11 -0
  84. package/dist/stores/editor.d.ts +5 -0
  85. package/dist/stores/editor.js +11 -0
  86. package/dist/stores/version-history.d.ts +80 -0
  87. package/dist/stores/version-history.js +28 -0
  88. package/dist/utils/dateUtil.d.ts +1 -0
  89. package/dist/utils/dateUtil.js +16 -0
  90. package/package.json +1 -1
  91. package/dist/components/organisms/top-bar/Header.vue2.js +0 -14
  92. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +0 -11
  93. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +0 -17
  94. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +0 -11
  95. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +0 -18
  96. package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +0 -14
  97. package/dist/enums/defaults.enum.d.ts +0 -18
  98. package/dist/stores/counter.d.ts +0 -12
  99. /package/dist/components/organisms/{top-bar/Header.vue.d.ts → header/HeaderWrapper.vue.d.ts} +0 -0
  100. /package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.d.ts → header/LeftSlot.vue.d.ts} +0 -0
  101. /package/dist/components/organisms/{top-bar/HeaderMiddleSlot.vue.d.ts → header/ViewOptions.vue.d.ts} +0 -0
  102. /package/dist/components/organisms/{top-bar/HeaderRightSlot.vue.d.ts → header/version-history/ViewOptions.vue.d.ts} +0 -0
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ description: string;
3
+ date: number;
4
+ textAlign: string;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToOption<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
@@ -0,0 +1,18 @@
1
+ import e from "./VersionHistoryItem.vue2.js";
2
+ /* empty css */
3
+ import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var i = function() {
5
+ var s = this, r = s._self._c, t = s._self._setupProxy;
6
+ return r("div", { staticClass: "version-history-item f-g-1" }, [t.props.description ? r("div", { staticClass: "d-f f-d-c", class: { "t-a-r": t.props.textAlign === "right" } }, [r("div", { staticClass: "t-o-e o-h w-s-n-w", domProps: { innerHTML: s._s(t.props.description) } }), r("div", { staticClass: "f-s-1" }, [s._v(" " + s._s(t.formatPatchDate(t.props.date)) + " ")])]) : s._e()]);
7
+ }, a = [], n = /* @__PURE__ */ o(
8
+ e,
9
+ i,
10
+ a,
11
+ !1,
12
+ null,
13
+ "0e2ff42d"
14
+ );
15
+ const d = n.exports;
16
+ export {
17
+ d as default
18
+ };
@@ -0,0 +1,16 @@
1
+ import { defineComponent as o } from "vue";
2
+ import { formatPatchDate as e } from "../../../../utils/dateUtil.js";
3
+ const s = /* @__PURE__ */ o({
4
+ __name: "VersionHistoryItem",
5
+ props: {
6
+ description: null,
7
+ date: null,
8
+ textAlign: null
9
+ },
10
+ setup(t) {
11
+ return { __sfc: !0, props: t, formatPatchDate: e };
12
+ }
13
+ });
14
+ export {
15
+ s as default
16
+ };
@@ -0,0 +1,18 @@
1
+ import s from "./ViewOptions.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ s,
9
+ r,
10
+ n,
11
+ !1,
12
+ null,
13
+ "e805e1af"
14
+ );
15
+ const f = _.exports;
16
+ export {
17
+ f as default
18
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as s } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
4
+ import { InSegments as m } from "@useinsider/design-system-vue";
5
+ const d = /* @__PURE__ */ s({
6
+ __name: "ViewOptions",
7
+ setup(p) {
8
+ const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
9
+ return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
10
+ { text: "", icon: "line-desktop", value: "desktop" },
11
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
12
+ ], changeVisualMode: (i) => {
13
+ if (e.editorVisualMode = i, i === "mobile") {
14
+ t();
15
+ return;
16
+ }
17
+ o();
18
+ }, InSegments: m };
19
+ }
20
+ });
21
+ export {
22
+ d as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
+ export declare const useActionsApi: () => {
3
+ getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
4
+ };
@@ -0,0 +1,36 @@
1
+ const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
+ const m = { ...{
3
+ minimize: !0,
4
+ utmEntity: {
5
+ utmSource: "",
6
+ utmMedium: "",
7
+ utmCampaign: "",
8
+ utmContent: "",
9
+ utmTerm: "",
10
+ customUtms: [
11
+ {
12
+ name1: "val1",
13
+ name2: "val2"
14
+ }
15
+ ]
16
+ },
17
+ mergeTags: ["Tag1", "Tag2"],
18
+ forseAmp: !1,
19
+ resetDataSavedFlag: !1,
20
+ disableLineHeightsReplace: !0
21
+ }, ...t }, s = {
22
+ callback: (e, l, n, o, c) => {
23
+ e ? i(e) : a({
24
+ html: l,
25
+ ampHtml: n,
26
+ ampErrors: o,
27
+ displayConditions: c
28
+ });
29
+ },
30
+ ...m
31
+ };
32
+ window.StripoEditorApi.actionsApi.compileEmail(s);
33
+ }) });
34
+ export {
35
+ d as useActionsApi
36
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useExport: () => {
2
+ exportHtml: () => Promise<void>;
3
+ };
@@ -0,0 +1,30 @@
1
+ import { useActionsApi as l } from "./useActionsApi.js";
2
+ import { useToaster as m } from "./useToaster.js";
3
+ const u = () => {
4
+ const a = (r, t, e) => {
5
+ const n = new Blob([r], { type: e }), s = URL.createObjectURL(n), o = document.createElement("a");
6
+ o.href = s, o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(s);
7
+ }, c = (r) => {
8
+ const t = /* @__PURE__ */ new Date(), e = String(t.getDate()).padStart(2, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), s = t.getFullYear(), o = String(t.getHours()).padStart(2, "0"), i = String(t.getMinutes()).padStart(2, "0");
9
+ return `${r}_${e}-${n}-${s}_${o}-${i}.html`;
10
+ };
11
+ return { exportHtml: async () => {
12
+ const { getCompiledEmail: r } = l(), { showToaster: t } = m();
13
+ try {
14
+ const { html: e } = await r();
15
+ e ? a(e, c("HTML"), "text/html") : t({
16
+ type: "error",
17
+ message: "No HTML content to download"
18
+ });
19
+ } catch (e) {
20
+ const n = e instanceof Error ? e.message : String(e);
21
+ t({
22
+ type: "error",
23
+ message: `Error compiling email: ${n}`
24
+ });
25
+ }
26
+ } };
27
+ };
28
+ export {
29
+ u as useExport
30
+ };
@@ -1,4 +1,4 @@
1
- import type { Template } from '@@types/stripo';
1
+ import type { Template } from '@@/Types/stripo';
2
2
  export declare const useStripo: (emailId: string) => {
3
3
  initPlugin: (template: Template) => Promise<void>;
4
4
  };
@@ -1,68 +1,83 @@
1
- import { useCustomInterfaceAppearance as d } from "./useCustomInterfaceAppearance.js";
2
- const u = (s) => {
1
+ import { useCustomInterfaceAppearance as u } from "./useCustomInterfaceAppearance.js";
2
+ import { useEditorStore as a } from "../stores/editor.js";
3
+ const g = (s) => {
3
4
  const c = () => {
4
5
  const t = new Headers();
5
6
  t.append("Content-Type", "application/json");
6
- const o = JSON.stringify({
7
+ const r = JSON.stringify({
7
8
  pluginId: void 0,
8
9
  secretKey: void 0,
9
10
  role: void 0,
10
11
  userId: s
11
12
  });
12
- return fetch("/v2/stripo/get-token", {
13
+ return fetch("/v2/stripo/get-user-token", {
13
14
  method: "POST",
14
15
  headers: t,
15
- body: o,
16
+ body: r,
16
17
  redirect: "follow"
17
- }).then((e) => e.json());
18
- }, i = (t) => {
19
- const o = t.html, n = t.css;
18
+ }).then((o) => o.json());
19
+ }, d = (t) => {
20
+ const r = a(), i = t.html, o = t.css;
20
21
  window.UIEditor.initEditor(
21
22
  document.querySelector("#guido-editor"),
22
23
  {
23
24
  metadata: {
24
25
  emailId: s,
25
26
  userId: "1",
26
- username: "Plugin Demo User"
27
+ username: "Guido User"
27
28
  },
28
29
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
29
- html: o,
30
+ html: i,
30
31
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
31
- css: n,
32
+ css: o,
32
33
  locale: "en",
34
+ undoButtonSelector: "#guido__undo-button",
35
+ redoButtonSelector: "#guido__redo-button",
36
+ mobileViewButtonSelector: ".guido__view-option-selection-mobile",
37
+ desktopViewButtonSelector: ".guido__view-option-selection-desktop",
38
+ codeEditorButtonSelector: "#guido__code-button",
33
39
  async onTokenRefreshRequest(e) {
34
40
  try {
35
- const r = await c();
36
- e(r.token);
37
- } catch (r) {
38
- console.error("Failed to refresh token:", r);
41
+ const n = await c();
42
+ e(n.token);
43
+ } catch (n) {
44
+ console.error("Failed to refresh token:", n);
39
45
  }
40
46
  },
41
47
  onTemplateLoaded() {
42
48
  try {
43
- const { importCss: e } = d();
49
+ const { importCss: e } = u();
44
50
  e();
45
51
  } catch (e) {
46
52
  console.error("Failed to load custom interface appearance:", e);
47
53
  }
54
+ },
55
+ onCodeEditorVisibilityChanged(e) {
56
+ r.isCodeEditorOpen = e;
57
+ },
58
+ onEditorVisualModeChanged(e) {
59
+ r.editorVisualMode = e.toLowerCase();
60
+ },
61
+ onVersionHistoryVisibilityChanged(e) {
62
+ r.isVersionHistoryOpen = e;
48
63
  }
49
64
  }
50
65
  );
51
66
  };
52
- return { initPlugin: (t) => new Promise((o, n) => {
67
+ return { initPlugin: (t) => new Promise((r, i) => {
53
68
  if (document.getElementById("UiEditorScript")) {
54
- i(t), o();
69
+ d(t), r();
55
70
  return;
56
71
  }
57
- const e = document.createElement("script");
58
- e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
59
- i(t), o();
60
- }, e.onerror = () => {
61
- const r = new Error("Failed to load Stripo UIEditor script");
62
- n(r);
63
- }, document.body.appendChild(e);
72
+ const o = document.createElement("script");
73
+ o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
74
+ d(t), r();
75
+ }, o.onerror = () => {
76
+ const e = new Error("Failed to load Stripo UIEditor script");
77
+ i(e);
78
+ }, document.body.appendChild(o);
64
79
  }) };
65
80
  };
66
81
  export {
67
- u as useStripo
82
+ g as useStripo
68
83
  };
@@ -1,4 +1,4 @@
1
- import type { Template } from '@@types/stripo';
1
+ import type { Template } from '@@/Types/stripo';
2
2
  export declare const useTemplates: () => {
3
3
  getDefaultTemplate: () => Promise<Template>;
4
4
  getTemplate: (templateName: string) => Promise<Template>;
@@ -0,0 +1,29 @@
1
+ import { ref as u, watch as f } from "vue";
2
+ const T = () => {
3
+ const t = u(!1), s = u(""), r = u("success"), o = u([]);
4
+ let a = null;
5
+ function l() {
6
+ a && (clearTimeout(a), a = null);
7
+ }
8
+ function c() {
9
+ t.value = !1, o.value = [], s.value = "";
10
+ }
11
+ function n(e = { message: "" }) {
12
+ c(), s.value = e.message, r.value = e.type || "success", o.value = e.actionButton ? [e.actionButton] : [], t.value = !0;
13
+ }
14
+ return f([t, s], ([e, i]) => {
15
+ l(), e && i && (a = setTimeout(() => {
16
+ c();
17
+ }, 6e3));
18
+ }), {
19
+ isToasterVisible: t,
20
+ toasterMessage: s,
21
+ toasterType: r,
22
+ toasterActionButton: o,
23
+ showToaster: n,
24
+ hideToaster: c
25
+ };
26
+ };
27
+ export {
28
+ T as useToaster
29
+ };
@@ -1,7 +1,5 @@
1
1
  interface TranslationValues {
2
2
  [key: string]: string | number | boolean;
3
3
  }
4
- export declare const useTranslations: () => {
5
- trans: ((key: string, params?: TranslationValues) => string) & import("lodash").MemoizedFunction;
6
- };
4
+ export declare const useTranslations: () => ((key: string, params?: TranslationValues) => string) & import("lodash").MemoizedFunction;
7
5
  export {};
@@ -0,0 +1,18 @@
1
+ import memoize from "../node_modules/lodash-es/memoize.js";
2
+ import { ref } from "vue";
3
+ const useTranslations = () => {
4
+ const translations = ref(eval(window.GuidoConfig.translationsPath)), trans = (n, t) => {
5
+ const r = translations.value[n];
6
+ return r ? t ? Object.entries(t).reduce(
7
+ (e, [o, i]) => e.replace(new RegExp(`{${o}}`, "g"), String(i)),
8
+ r
9
+ ) : r : (console.warn(`Translation key not found: ${n}`), n);
10
+ };
11
+ return memoize(
12
+ trans,
13
+ (n, t) => !t || Object.keys(t).length === 0 ? n : JSON.stringify({ key: n, params: t })
14
+ );
15
+ };
16
+ export {
17
+ useTranslations
18
+ };
@@ -0,0 +1,8 @@
1
+ export declare const useVersionHistoryApi: () => {
2
+ openVersionHistory: () => void;
3
+ closeVersionHistory: () => void;
4
+ switchToDesktopPreview: () => void;
5
+ switchToMobilePreview: () => void;
6
+ previewVersion: (id: string) => void;
7
+ restoreVersion: (id: string) => void;
8
+ };
@@ -0,0 +1,53 @@
1
+ import { useVersionHistoryStore as p } from "../stores/version-history.js";
2
+ import { useToaster as c } from "./useToaster.js";
3
+ const l = () => {
4
+ const i = p(), { showToaster: s } = c(), t = (e) => {
5
+ i.$reset(), i.updateState(e);
6
+ }, n = () => {
7
+ i.$reset();
8
+ };
9
+ return {
10
+ openVersionHistory: () => {
11
+ window.StripoEditorApi.versionHistoryApi.openVersionHistory(t, n);
12
+ },
13
+ closeVersionHistory: () => {
14
+ window.StripoEditorApi.versionHistoryApi.closeVersionHistory();
15
+ },
16
+ switchToDesktopPreview: () => {
17
+ window.StripoEditorApi.versionHistoryApi.switchToDesktopPreview();
18
+ },
19
+ switchToMobilePreview: () => {
20
+ window.StripoEditorApi.versionHistoryApi.switchToMobilePreview();
21
+ },
22
+ previewVersion: (e) => {
23
+ window.StripoEditorApi.versionHistoryApi.previewVersion(e, (o) => {
24
+ const r = o instanceof Error ? o.message : String(o);
25
+ s({
26
+ type: "error",
27
+ message: `Error compiling email: ${r}`
28
+ });
29
+ });
30
+ },
31
+ restoreVersion: (e) => {
32
+ window.StripoEditorApi.versionHistoryApi.restoreVersion(
33
+ e,
34
+ () => {
35
+ s({
36
+ type: "success",
37
+ message: `${e} patch restored successfully.`
38
+ });
39
+ },
40
+ (o) => {
41
+ const r = o instanceof Error ? o.message : String(o);
42
+ s({
43
+ type: "error",
44
+ message: `Error compiling email: ${r}`
45
+ });
46
+ }
47
+ );
48
+ }
49
+ };
50
+ };
51
+ export {
52
+ l as useVersionHistoryApi
53
+ };
@@ -0,0 +1,2 @@
1
+ import type { GuidoConfig } from '@@/Types/generic';
2
+ export declare const DefaultGuidoConfig: GuidoConfig;
@@ -0,0 +1,6 @@
1
+ const n = {
2
+ translationsPath: "window.trans.en"
3
+ };
4
+ export {
5
+ n as DefaultGuidoConfig
6
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .header-right-slot[data-v-9d879f6f]{gap:16px}[data-v-9d879f6f] .preview-platform-selection-desktop svg,[data-v-9d879f6f] .preview-platform-selection-mobile svg{margin:0 0 0 2px}.guido-editor-wrapper[data-v-c14163ad],.guido-editor-container[data-v-c14163ad]{width:100%;height:100vh}
1
+ .version-history-item[data-v-0e2ff42d]{flex-basis:200px}.version-history-wrapper[data-v-187d41fa]{gap:8px}[data-v-e805e1af] .guido__verion-history-view-option-selection-desktop svg,[data-v-e805e1af] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-378010db] .guido__view-option-selection-desktop svg,[data-v-378010db] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}.header-right-slot[data-v-fefca98f]{gap:16px}.guido-editor__wrapper[data-v-3da1d904],.guido-editor__container[data-v-3da1d904]{width:100%;height:100vh}
package/dist/guido.png ADDED
Binary file
package/dist/library.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default as Guido } from './components/Guido.vue';
2
2
  export type { StripoEventType } from './@types/events';
3
+ export type * from './@types/generic';
@@ -0,0 +1,20 @@
1
+ import p from "./_hashClear.js";
2
+ import a from "./_hashDelete.js";
3
+ import l from "./_hashGet.js";
4
+ import s from "./_hashHas.js";
5
+ import m from "./_hashSet.js";
6
+ function t(o) {
7
+ var e = -1, h = o == null ? 0 : o.length;
8
+ for (this.clear(); ++e < h; ) {
9
+ var r = o[e];
10
+ this.set(r[0], r[1]);
11
+ }
12
+ }
13
+ t.prototype.clear = p;
14
+ t.prototype.delete = a;
15
+ t.prototype.get = l;
16
+ t.prototype.has = s;
17
+ t.prototype.set = m;
18
+ export {
19
+ t as default
20
+ };
@@ -0,0 +1,20 @@
1
+ import p from "./_listCacheClear.js";
2
+ import a from "./_listCacheDelete.js";
3
+ import i from "./_listCacheGet.js";
4
+ import h from "./_listCacheHas.js";
5
+ import s from "./_listCacheSet.js";
6
+ function t(e) {
7
+ var o = -1, l = e == null ? 0 : e.length;
8
+ for (this.clear(); ++o < l; ) {
9
+ var r = e[o];
10
+ this.set(r[0], r[1]);
11
+ }
12
+ }
13
+ t.prototype.clear = p;
14
+ t.prototype.delete = a;
15
+ t.prototype.get = i;
16
+ t.prototype.has = h;
17
+ t.prototype.set = s;
18
+ export {
19
+ t as default
20
+ };
@@ -0,0 +1,6 @@
1
+ import o from "./_getNative.js";
2
+ import r from "./_root.js";
3
+ var p = o(r, "Map");
4
+ export {
5
+ p as default
6
+ };
@@ -0,0 +1,20 @@
1
+ import r from "./_mapCacheClear.js";
2
+ import m from "./_mapCacheDelete.js";
3
+ import h from "./_mapCacheGet.js";
4
+ import l from "./_mapCacheHas.js";
5
+ import c from "./_mapCacheSet.js";
6
+ function e(t) {
7
+ var o = -1, a = t == null ? 0 : t.length;
8
+ for (this.clear(); ++o < a; ) {
9
+ var p = t[o];
10
+ this.set(p[0], p[1]);
11
+ }
12
+ }
13
+ e.prototype.clear = r;
14
+ e.prototype.delete = m;
15
+ e.prototype.get = h;
16
+ e.prototype.has = l;
17
+ e.prototype.set = c;
18
+ export {
19
+ e as default
20
+ };
@@ -0,0 +1,5 @@
1
+ import o from "./_root.js";
2
+ var m = o.Symbol;
3
+ export {
4
+ m as default
5
+ };
@@ -0,0 +1,10 @@
1
+ import r from "./eq.js";
2
+ function o(t, n) {
3
+ for (var e = t.length; e--; )
4
+ if (r(t[e][0], n))
5
+ return e;
6
+ return -1;
7
+ }
8
+ export {
9
+ o as default
10
+ };
@@ -0,0 +1,10 @@
1
+ import t from "./_Symbol.js";
2
+ import e from "./_getRawTag.js";
3
+ import o from "./_objectToString.js";
4
+ var i = "[object Null]", f = "[object Undefined]", r = t ? t.toStringTag : void 0;
5
+ function m(n) {
6
+ return n == null ? n === void 0 ? f : i : r && r in Object(n) ? e(n) : o(n);
7
+ }
8
+ export {
9
+ m as default
10
+ };
@@ -0,0 +1,16 @@
1
+ import o from "./isFunction.js";
2
+ import e from "./_isMasked.js";
3
+ import a from "./isObject.js";
4
+ import n from "./_toSource.js";
5
+ var p = /[\\^$.*+?()[\]{}|]/g, i = /^\[object .+?Constructor\]$/, s = Function.prototype, c = Object.prototype, f = s.toString, m = c.hasOwnProperty, u = RegExp(
6
+ "^" + f.call(m).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
7
+ );
8
+ function O(r) {
9
+ if (!a(r) || e(r))
10
+ return !1;
11
+ var t = o(r) ? u : i;
12
+ return t.test(n(r));
13
+ }
14
+ export {
15
+ O as default
16
+ };
@@ -0,0 +1,5 @@
1
+ import r from "./_root.js";
2
+ var a = r["__core-js_shared__"];
3
+ export {
4
+ a as default
5
+ };
@@ -0,0 +1,4 @@
1
+ var l = typeof global == "object" && global && global.Object === Object && global;
2
+ export {
3
+ l as default
4
+ };
@@ -0,0 +1,8 @@
1
+ import e from "./_isKeyable.js";
2
+ function n(r, a) {
3
+ var t = r.__data__;
4
+ return e(a) ? t[typeof a == "string" ? "string" : "hash"] : t.map;
5
+ }
6
+ export {
7
+ n as default
8
+ };
@@ -0,0 +1,9 @@
1
+ import r from "./_baseIsNative.js";
2
+ import i from "./_getValue.js";
3
+ function f(t, a) {
4
+ var e = i(t, a);
5
+ return r(e) ? e : void 0;
6
+ }
7
+ export {
8
+ f as default
9
+ };
@@ -0,0 +1,15 @@
1
+ import e from "./_Symbol.js";
2
+ var o = Object.prototype, c = o.hasOwnProperty, f = o.toString, r = e ? e.toStringTag : void 0;
3
+ function p(t) {
4
+ var a = c.call(t, r), n = t[r];
5
+ try {
6
+ t[r] = void 0;
7
+ var i = !0;
8
+ } catch {
9
+ }
10
+ var g = f.call(t);
11
+ return i && (a ? t[r] = n : delete t[r]), g;
12
+ }
13
+ export {
14
+ p as default
15
+ };
@@ -0,0 +1,6 @@
1
+ function u(e, n) {
2
+ return e == null ? void 0 : e[n];
3
+ }
4
+ export {
5
+ u as default
6
+ };
@@ -0,0 +1,7 @@
1
+ import t from "./_nativeCreate.js";
2
+ function e() {
3
+ this.__data__ = t ? t(null) : {}, this.size = 0;
4
+ }
5
+ export {
6
+ e as default
7
+ };
@@ -0,0 +1,7 @@
1
+ function s(t) {
2
+ var e = this.has(t) && delete this.__data__[t];
3
+ return this.size -= e ? 1 : 0, e;
4
+ }
5
+ export {
6
+ s as default
7
+ };