@useinsider/guido 1.0.0-beta.a19efaa → 1.0.0-beta.a9e37bf

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 (136) hide show
  1. package/README.md +29 -270
  2. package/dist/@types/generic.d.ts +0 -14
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +2 -9
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +24 -39
  7. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  8. package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -15
  9. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
  10. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  11. package/dist/components/organisms/header/RightSlot.vue2.js +14 -16
  12. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  13. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +1 -1
  14. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  15. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  16. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  17. package/dist/composables/useActionsApi.d.ts +0 -1
  18. package/dist/composables/useActionsApi.js +12 -14
  19. package/dist/composables/useCustomInterfaceAppearance.js +6 -8
  20. package/dist/composables/useExport.d.ts +1 -1
  21. package/dist/composables/useExport.js +20 -35
  22. package/dist/composables/useStripo.js +55 -46
  23. package/dist/guido.css +1 -1
  24. package/dist/node_modules/pinia/dist/pinia.js +317 -0
  25. package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +11 -0
  26. package/dist/static/styles/components/dropdown-menu.css.js +0 -8
  27. package/dist/stores/editor.d.ts +0 -1
  28. package/dist/stores/editor.js +3 -4
  29. package/dist/stores/version-history.js +1 -1
  30. package/package.json +5 -6
  31. package/dist/_virtual/AddCustomFont.js +0 -4
  32. package/dist/_virtual/AiAssistantValueType.js +0 -4
  33. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  34. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  35. package/dist/_virtual/Block.js +0 -4
  36. package/dist/_virtual/BlockAttributes.js +0 -4
  37. package/dist/_virtual/BlockCompositionType.js +0 -4
  38. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  39. package/dist/_virtual/BlockRenderer.js +0 -4
  40. package/dist/_virtual/BlockType.js +0 -4
  41. package/dist/_virtual/BlocksPanel.js +0 -4
  42. package/dist/_virtual/BuiltInControl.js +0 -4
  43. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  44. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  45. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  46. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  47. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  48. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  49. package/dist/_virtual/ContextAction.js +0 -4
  50. package/dist/_virtual/ContextActionType.js +0 -4
  51. package/dist/_virtual/Control.js +0 -4
  52. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  53. package/dist/_virtual/Extension.js +0 -4
  54. package/dist/_virtual/ExtensionBuilder.js +0 -4
  55. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  56. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  57. package/dist/_virtual/ModificationDescription.js +0 -4
  58. package/dist/_virtual/PanelPosition.js +0 -4
  59. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  60. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  61. package/dist/_virtual/SettingsPanelTab.js +0 -4
  62. package/dist/_virtual/SettingsTab.js +0 -4
  63. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  64. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  65. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  66. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  67. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  68. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  69. package/dist/_virtual/UIElement.js +0 -4
  70. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  71. package/dist/_virtual/UIElementType.js +0 -4
  72. package/dist/_virtual/UIElementsAttributes.js +0 -4
  73. package/dist/_virtual/index.js +0 -5
  74. package/dist/_virtual/index2.js +0 -4
  75. package/dist/composables/useHtmlCompiler.d.ts +0 -4
  76. package/dist/composables/useHtmlCompiler.js +0 -16
  77. package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
  78. package/dist/config/compiler/htmlCompilerRules.js +0 -145
  79. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  80. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  81. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  82. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  83. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  84. package/dist/extensions/DynamicContent/dynamic-content.js +0 -63
  85. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  86. package/dist/extensions/DynamicContent/extension.js +0 -11
  87. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  88. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  89. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  90. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  91. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  92. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  93. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  94. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  95. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  96. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  97. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  130. package/dist/services/stripoApi.d.ts +0 -7
  131. package/dist/services/stripoApi.js +0 -29
  132. package/dist/static/styles/components/version-history.css.js +0 -30
  133. package/dist/utils/htmlCompiler.d.ts +0 -12
  134. package/dist/utils/htmlCompiler.js +0 -70
  135. package/dist/utils/tooltipUtils.d.ts +0 -2
  136. package/dist/utils/tooltipUtils.js +0 -9
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  date: number;
4
4
  textAlign: string;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
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
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
9
  type __VLS_TypePropsToOption<T> = {
@@ -10,7 +10,7 @@ var i = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "ee4b9c3f"
13
+ "0e2ff42d"
14
14
  );
15
15
  const d = n.exports;
16
16
  export {
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
2
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
2
  export declare const useActionsApi: () => {
3
3
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
4
- activateCustomViewStyles: (isActive?: boolean) => void;
5
4
  };
@@ -1,5 +1,5 @@
1
- const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
- const s = { ...{
1
+ const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
+ const m = { ...{
3
3
  minimize: !0,
4
4
  utmEntity: {
5
5
  utmSource: "",
@@ -18,21 +18,19 @@ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
18
18
  forseAmp: !1,
19
19
  resetDataSavedFlag: !1,
20
20
  disableLineHeightsReplace: !0
21
- }, ...t }, o = {
22
- callback: (e, m, l, n, c) => {
23
- e ? a(e) : i({
24
- html: m,
25
- ampHtml: l,
26
- ampErrors: n,
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
27
  displayConditions: c
28
28
  });
29
29
  },
30
- ...s
30
+ ...m
31
31
  };
32
- window.StripoEditorApi.actionsApi.compileEmail(o);
33
- }), activateCustomViewStyles: (t = !0) => {
34
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
- } });
32
+ window.StripoEditorApi.actionsApi.compileEmail(s);
33
+ }) });
36
34
  export {
37
- g as useActionsApi
35
+ d as useActionsApi
38
36
  };
@@ -11,11 +11,10 @@ import a from "../static/styles/components/narrow-panel.css.js";
11
11
  import u from "../static/styles/components/switcher.css.js";
12
12
  import c from "../static/styles/components/tabs.css.js";
13
13
  import d from "../static/styles/components/tools.css.js";
14
- import l from "../static/styles/components/version-history.css.js";
15
- import h from "../static/styles/components/wide-panel.css.js";
16
- import w from "../static/styles/variables.css.js";
17
- const y = [
18
- w,
14
+ import l from "../static/styles/components/wide-panel.css.js";
15
+ import h from "../static/styles/variables.css.js";
16
+ const w = [
17
+ h,
19
18
  // Must be on top
20
19
  S,
21
20
  // Must be on top
@@ -31,13 +30,12 @@ const y = [
31
30
  u,
32
31
  c,
33
32
  d,
34
- l,
35
- h
33
+ l
36
34
  ].join(`
37
35
 
38
36
  `), N = () => ({ importCss: () => {
39
37
  const o = new CSSStyleSheet();
40
- o.replaceSync(y);
38
+ o.replaceSync(w);
41
39
  const r = document.querySelector("ui-editor");
42
40
  if (!r)
43
41
  return;
@@ -1,3 +1,3 @@
1
1
  export declare const useExport: () => {
2
- exportHtml: (compile?: boolean) => Promise<void>;
2
+ exportHtml: () => Promise<void>;
3
3
  };
@@ -1,45 +1,30 @@
1
1
  import { useActionsApi as l } from "./useActionsApi.js";
2
- import { useHtmlCompiler as m } from "./useHtmlCompiler.js";
3
- import { useToaster as d } from "./useToaster.js";
4
- const h = () => {
5
- const a = (s, o, r) => {
6
- const i = new Blob([s], { type: r }), t = URL.createObjectURL(i), e = document.createElement("a");
7
- e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
8
- }, c = (s) => {
9
- const o = /* @__PURE__ */ new Date(), r = String(o.getDate()).padStart(2, "0"), i = String(o.getMonth() + 1).padStart(2, "0"), t = o.getFullYear(), e = String(o.getHours()).padStart(2, "0"), n = String(o.getMinutes()).padStart(2, "0");
10
- return `${s}_${r}-${i}-${t}_${e}-${n}.html`;
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`;
11
10
  };
12
- return { exportHtml: async (s = !0) => {
13
- const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
11
+ return { exportHtml: async () => {
12
+ const { getCompiledEmail: r } = l(), { showToaster: t } = m();
14
13
  try {
15
- const { html: t } = await o();
16
- if (t) {
17
- let e = t;
18
- if (s) {
19
- const n = i(t);
20
- e = n.compiledHtml, console.debug("HTML Compilation Stats:", {
21
- originalSize: n.stats.originalSize,
22
- compiledSize: n.stats.compiledSize,
23
- reduction: `${n.stats.reductionPercentage.toFixed(2)}%`,
24
- appliedRules: n.appliedRules,
25
- executionTime: `${n.stats.executionTime.toFixed(2)}ms`
26
- });
27
- }
28
- a(e, c("HTML"), "text/html");
29
- } else
30
- r({
31
- type: "error",
32
- message: "No HTML content to download"
33
- });
34
- } catch (t) {
35
- const e = t instanceof Error ? t.message : String(t);
36
- r({
14
+ const { html: e } = await r();
15
+ e ? a(e, c("HTML"), "text/html") : t({
37
16
  type: "error",
38
- message: `Error compiling email: ${e}`
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}`
39
24
  });
40
25
  }
41
26
  } };
42
27
  };
43
28
  export {
44
- h as useExport
29
+ u as useExport
45
30
  };
@@ -1,18 +1,36 @@
1
- import { useActionsApi as m } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as g } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as f } from "./useToaster.js";
4
- import { displayConditions as E } from "../enums/displayConditions.js";
5
- import S from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as y } from "../services/stripoApi.js";
7
- import { useEditorStore as C } from "../stores/editor.js";
8
- const x = (a) => {
9
- const { handleError: d } = f(), { getToken: c, getCustomFonts: u } = y(), l = (e, r = []) => {
10
- const i = C(), { html: t, css: s } = e;
1
+ import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
2
+ import { useHttp as y } from "./useHttp.js";
3
+ import { useToaster as E } from "./useToaster.js";
4
+ import { displayConditions as h } from "../enums/displayConditions.js";
5
+ import { useEditorStore as w } from "../stores/editor.js";
6
+ const I = (c) => {
7
+ const { get: a, post: u } = y(), { handleError: i } = E(), l = async () => {
8
+ try {
9
+ return (await u("/v2/stripo/get-user-token", {
10
+ pluginId: void 0,
11
+ secretKey: void 0,
12
+ role: void 0,
13
+ userId: c.emailId
14
+ })).data.token;
15
+ } catch (t) {
16
+ return i(t, "Failed to fetch token"), "";
17
+ }
18
+ }, p = async () => {
19
+ try {
20
+ return ((await a("/stripo/get-partner-custom-fonts")).data || []).map((n) => ({
21
+ ...n,
22
+ active: !0
23
+ }));
24
+ } catch (t) {
25
+ return i(t, "Failed to fetch custom fonts"), [];
26
+ }
27
+ }, m = (t, r = []) => {
28
+ const n = w(), { html: e, css: s } = t;
11
29
  window.UIEditor.initEditor(
12
30
  document.querySelector("#guido-editor"),
13
31
  {
14
- metadata: a,
15
- html: t,
32
+ metadata: c,
33
+ html: e,
16
34
  css: s,
17
35
  locale: "en",
18
36
  undoButtonSelector: "#guido__undo-button",
@@ -20,16 +38,9 @@ const x = (a) => {
20
38
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
21
39
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
22
40
  codeEditorButtonSelector: "#guido__code-button",
23
- customAppearanceMergetags: !0,
24
- customAppearanceMergetagsBorderColor: "#f1f3fe",
25
- customAppearanceMergetagsBackgroundColor: "#f1f3fe",
26
- customViewStyles: `
27
- .esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
28
- .esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
29
- `,
30
41
  conditionsEnabled: !0,
31
42
  customConditionsEnabled: !0,
32
- conditionCategories: E,
43
+ conditionCategories: h,
33
44
  messageSettingsEnabled: !1,
34
45
  editorFonts: {
35
46
  showDefaultStandardFonts: !0,
@@ -38,53 +49,51 @@ const x = (a) => {
38
49
  },
39
50
  async onTokenRefreshRequest(o) {
40
51
  try {
41
- const n = await c();
42
- o(n);
43
- } catch (n) {
44
- d(n, "Failed to refresh token");
52
+ const d = await l();
53
+ o(d);
54
+ } catch (d) {
55
+ i(d, "Failed to refresh token");
45
56
  }
46
57
  },
47
58
  onTemplateLoaded() {
48
59
  try {
49
- const { importCss: o } = g(), { activateCustomViewStyles: n } = m();
50
- o(), n();
60
+ const { importCss: o } = f();
61
+ o();
51
62
  } catch (o) {
52
- d(o, "Failed to load custom interface appearance");
63
+ i(o, "Failed to load custom interface appearance");
53
64
  }
54
65
  },
55
66
  onCodeEditorVisibilityChanged(o) {
56
- i.isCodeEditorOpen = o;
67
+ n.isCodeEditorOpen = o;
57
68
  },
58
69
  onEditorVisualModeChanged(o) {
59
- i.editorVisualMode = o.toLowerCase();
70
+ n.editorVisualMode = o.toLowerCase();
60
71
  },
61
72
  onVersionHistoryVisibilityChanged(o) {
62
- i.isVersionHistoryOpen = o;
63
- },
64
- ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
65
- extensions: [S]
73
+ n.isVersionHistoryOpen = o;
74
+ }
66
75
  }
67
76
  );
68
- }, p = (e) => new Promise((r, i) => {
77
+ }, g = (t) => new Promise((r, n) => {
69
78
  if (document.getElementById("UiEditorScript")) {
70
- e(), r();
79
+ t(), r();
71
80
  return;
72
81
  }
73
- const t = document.createElement("script");
74
- t.id = "UiEditorScript", t.type = "module", t.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", t.onload = () => {
75
- e(), r();
76
- }, t.onerror = () => {
82
+ const e = document.createElement("script");
83
+ e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
84
+ t(), r();
85
+ }, e.onerror = () => {
77
86
  const s = new Error("Failed to load Stripo UIEditor script");
78
- i(s);
79
- }, document.body.appendChild(t);
87
+ n(s);
88
+ }, document.body.appendChild(e);
80
89
  });
81
- return { initPlugin: async (e) => {
82
- await p(async () => {
83
- const r = await u();
84
- l(e, r);
90
+ return { initPlugin: async (t) => {
91
+ await g(async () => {
92
+ const r = await p();
93
+ m(t, r);
85
94
  });
86
95
  } };
87
96
  };
88
97
  export {
89
- x as useStripo
98
+ I as useStripo
90
99
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-89423288],.guido-editor__container[data-v-89423288]{width:100%;height:calc(100vh - 75px)}
1
+ .version-history-item[data-v-0e2ff42d]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-8e229594],.guido-editor__container[data-v-8e229594]{width:100%;height:calc(100vh - 75px)}
@@ -0,0 +1,317 @@
1
+ import { hasInjectionContext as ut } from "../node_modules/vue-demi/lib/index.js";
2
+ import { inject as at, getCurrentInstance as it, set as O, ref as K, reactive as ft, markRaw as j, effectScope as _t, isRef as x, isReactive as J, toRef as T, del as A, nextTick as B, computed as tt, getCurrentScope as lt, onScopeDispose as Et, watch as pt, toRefs as Q } from "vue";
3
+ /*!
4
+ * pinia v2.3.1
5
+ * (c) 2025 Eduardo San Martin Morote
6
+ * @license MIT
7
+ */
8
+ let R;
9
+ const L = (t) => R = t, dt = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
10
+ /* istanbul ignore next */
11
+ Symbol()
12
+ );
13
+ function V(t) {
14
+ return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
15
+ }
16
+ var w;
17
+ (function(t) {
18
+ t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
19
+ })(w || (w = {}));
20
+ const C = typeof window < "u";
21
+ function et(t, u) {
22
+ for (const r in u) {
23
+ const o = u[r];
24
+ if (!(r in t))
25
+ continue;
26
+ const c = t[r];
27
+ V(c) && V(o) && !x(o) && !J(o) ? t[r] = et(c, o) : O(t, r, o);
28
+ }
29
+ return t;
30
+ }
31
+ const ot = () => {
32
+ };
33
+ function X(t, u, r, o = ot) {
34
+ t.push(u);
35
+ const c = () => {
36
+ const f = t.indexOf(u);
37
+ f > -1 && (t.splice(f, 1), o());
38
+ };
39
+ return !r && lt() && Et(c), c;
40
+ }
41
+ function g(t, ...u) {
42
+ t.slice().forEach((r) => {
43
+ r(...u);
44
+ });
45
+ }
46
+ const ht = (t) => t(), Y = Symbol(), W = Symbol();
47
+ function H(t, u) {
48
+ t instanceof Map && u instanceof Map ? u.forEach((r, o) => t.set(o, r)) : t instanceof Set && u instanceof Set && u.forEach(t.add, t);
49
+ for (const r in u) {
50
+ if (!u.hasOwnProperty(r))
51
+ continue;
52
+ const o = u[r], c = t[r];
53
+ V(c) && V(o) && t.hasOwnProperty(r) && !x(o) && !J(o) ? t[r] = H(c, o) : t[r] = o;
54
+ }
55
+ return t;
56
+ }
57
+ const Nt = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
58
+ /* istanbul ignore next */
59
+ Symbol()
60
+ );
61
+ function vt(t) {
62
+ return !V(t) || !t.hasOwnProperty(Nt);
63
+ }
64
+ const { assign: y } = Object;
65
+ function Z(t) {
66
+ return !!(x(t) && t.effect);
67
+ }
68
+ function G(t, u, r, o) {
69
+ const { state: c, actions: f, getters: E } = u, i = r.state.value[t];
70
+ let b;
71
+ function N() {
72
+ !i && (process.env.NODE_ENV === "production" || !o) && O(r.state.value, t, c ? c() : {});
73
+ const p = process.env.NODE_ENV !== "production" && o ? (
74
+ // use ref() to unwrap refs inside state TODO: check if this is still necessary
75
+ Q(K(c ? c() : {}).value)
76
+ ) : Q(r.state.value[t]);
77
+ return y(p, f, Object.keys(E || {}).reduce((_, l) => (process.env.NODE_ENV !== "production" && l in p && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${l}" in store "${t}".`), _[l] = j(tt(() => {
78
+ L(r);
79
+ const v = r._s.get(t);
80
+ if (v._r)
81
+ return E[l].call(v, v);
82
+ })), _), {}));
83
+ }
84
+ return b = M(t, N, u, r, o, !0), b;
85
+ }
86
+ function M(t, u, r = {}, o, c, f) {
87
+ let E;
88
+ const i = y({ actions: {} }, r);
89
+ if (process.env.NODE_ENV !== "production" && !o._e.active)
90
+ throw new Error("Pinia destroyed");
91
+ const b = { deep: !0 };
92
+ process.env.NODE_ENV;
93
+ let N, p, _ = [], l = [], v;
94
+ const D = o.state.value[t];
95
+ !f && !D && (process.env.NODE_ENV === "production" || !c) && O(o.state.value, t, {});
96
+ const $ = K({});
97
+ let q;
98
+ function z(s) {
99
+ let e;
100
+ N = p = !1, process.env.NODE_ENV !== "production" && (v = []), typeof s == "function" ? (s(o.state.value[t]), e = {
101
+ type: w.patchFunction,
102
+ storeId: t,
103
+ events: v
104
+ }) : (H(o.state.value[t], s), e = {
105
+ type: w.patchObject,
106
+ payload: s,
107
+ storeId: t,
108
+ events: v
109
+ });
110
+ const a = q = Symbol();
111
+ B().then(() => {
112
+ q === a && (N = !0);
113
+ }), p = !0, g(_, e, o.state.value[t]);
114
+ }
115
+ const st = f ? function() {
116
+ const { state: e } = r, a = e ? e() : {};
117
+ this.$patch((d) => {
118
+ y(d, a);
119
+ });
120
+ } : (
121
+ /* istanbul ignore next */
122
+ process.env.NODE_ENV !== "production" ? () => {
123
+ throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`);
124
+ } : ot
125
+ );
126
+ function nt() {
127
+ E.stop(), _ = [], l = [], o._s.delete(t);
128
+ }
129
+ const k = (s, e = "") => {
130
+ if (Y in s)
131
+ return s[W] = e, s;
132
+ const a = function() {
133
+ L(o);
134
+ const d = Array.from(arguments), P = [], F = [];
135
+ function rt(h) {
136
+ P.push(h);
137
+ }
138
+ function ct(h) {
139
+ F.push(h);
140
+ }
141
+ g(l, {
142
+ args: d,
143
+ name: a[W],
144
+ store: n,
145
+ after: rt,
146
+ onError: ct
147
+ });
148
+ let S;
149
+ try {
150
+ S = s.apply(this && this.$id === t ? this : n, d);
151
+ } catch (h) {
152
+ throw g(F, h), h;
153
+ }
154
+ return S instanceof Promise ? S.then((h) => (g(P, h), h)).catch((h) => (g(F, h), Promise.reject(h))) : (g(P, S), S);
155
+ };
156
+ return a[Y] = !0, a[W] = e, a;
157
+ }, I = /* @__PURE__ */ j({
158
+ actions: {},
159
+ getters: {},
160
+ state: [],
161
+ hotState: $
162
+ }), U = {
163
+ _p: o,
164
+ // _s: scope,
165
+ $id: t,
166
+ $onAction: X.bind(null, l),
167
+ $patch: z,
168
+ $reset: st,
169
+ $subscribe(s, e = {}) {
170
+ const a = X(_, s, e.detached, () => d()), d = E.run(() => pt(() => o.state.value[t], (P) => {
171
+ (e.flush === "sync" ? p : N) && s({
172
+ storeId: t,
173
+ type: w.direct,
174
+ events: v
175
+ }, P);
176
+ }, y({}, b, e)));
177
+ return a;
178
+ },
179
+ $dispose: nt
180
+ };
181
+ U._r = !1;
182
+ const n = ft(process.env.NODE_ENV !== "production" || (process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && C ? y(
183
+ {
184
+ _hmrPayload: I,
185
+ _customProperties: j(/* @__PURE__ */ new Set())
186
+ // devtools custom properties
187
+ },
188
+ U
189
+ // must be added later
190
+ // setupStore
191
+ ) : U);
192
+ o._s.set(t, n);
193
+ const m = (o._a && o._a.runWithContext || ht)(() => o._e.run(() => (E = _t()).run(() => u({ action: k }))));
194
+ for (const s in m) {
195
+ const e = m[s];
196
+ if (x(e) && !Z(e) || J(e))
197
+ process.env.NODE_ENV !== "production" && c ? O($.value, s, T(m, s)) : f || (D && vt(e) && (x(e) ? e.value = D[s] : H(e, D[s])), O(o.state.value[t], s, e)), process.env.NODE_ENV !== "production" && I.state.push(s);
198
+ else if (typeof e == "function") {
199
+ const a = process.env.NODE_ENV !== "production" && c ? e : k(e, s);
200
+ O(m, s, a), process.env.NODE_ENV !== "production" && (I.actions[s] = e), i.actions[s] = e;
201
+ } else process.env.NODE_ENV !== "production" && Z(e) && (I.getters[s] = f ? (
202
+ // @ts-expect-error
203
+ r.getters[s]
204
+ ) : e, C && (m._getters || // @ts-expect-error: same
205
+ (m._getters = j([]))).push(s));
206
+ }
207
+ if (Object.keys(m).forEach((s) => {
208
+ O(n, s, m[s]);
209
+ }), Object.defineProperty(n, "$state", {
210
+ get: () => process.env.NODE_ENV !== "production" && c ? $.value : o.state.value[t],
211
+ set: (s) => {
212
+ if (process.env.NODE_ENV !== "production" && c)
213
+ throw new Error("cannot set hotState");
214
+ z((e) => {
215
+ y(e, s);
216
+ });
217
+ }
218
+ }), process.env.NODE_ENV !== "production" && (n._hotUpdate = j((s) => {
219
+ n._hotUpdating = !0, s._hmrPayload.state.forEach((e) => {
220
+ if (e in n.$state) {
221
+ const a = s.$state[e], d = n.$state[e];
222
+ typeof a == "object" && V(a) && V(d) ? et(a, d) : s.$state[e] = d;
223
+ }
224
+ O(n, e, T(s.$state, e));
225
+ }), Object.keys(n.$state).forEach((e) => {
226
+ e in s.$state || A(n, e);
227
+ }), N = !1, p = !1, o.state.value[t] = T(s._hmrPayload, "hotState"), p = !0, B().then(() => {
228
+ N = !0;
229
+ });
230
+ for (const e in s._hmrPayload.actions) {
231
+ const a = s[e];
232
+ O(n, e, k(a, e));
233
+ }
234
+ for (const e in s._hmrPayload.getters) {
235
+ const a = s._hmrPayload.getters[e], d = f ? (
236
+ // special handling of options api
237
+ tt(() => (L(o), a.call(n, n)))
238
+ ) : a;
239
+ O(n, e, d);
240
+ }
241
+ Object.keys(n._hmrPayload.getters).forEach((e) => {
242
+ e in s._hmrPayload.getters || A(n, e);
243
+ }), Object.keys(n._hmrPayload.actions).forEach((e) => {
244
+ e in s._hmrPayload.actions || A(n, e);
245
+ }), n._hmrPayload = s._hmrPayload, n._getters = s._getters, n._hotUpdating = !1;
246
+ })), (process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && C) {
247
+ const s = {
248
+ writable: !0,
249
+ configurable: !0,
250
+ // avoid warning on devtools trying to display this property
251
+ enumerable: !1
252
+ };
253
+ ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((e) => {
254
+ Object.defineProperty(n, e, y({ value: n[e] }, s));
255
+ });
256
+ }
257
+ return n._r = !0, o._p.forEach((s) => {
258
+ if ((process.env.NODE_ENV !== "production" || typeof __VUE_PROD_DEVTOOLS__ < "u" && __VUE_PROD_DEVTOOLS__) && process.env.NODE_ENV !== "test" && C) {
259
+ const e = E.run(() => s({
260
+ store: n,
261
+ app: o._a,
262
+ pinia: o,
263
+ options: i
264
+ }));
265
+ Object.keys(e || {}).forEach((a) => n._customProperties.add(a)), y(n, e);
266
+ } else
267
+ y(n, E.run(() => s({
268
+ store: n,
269
+ app: o._a,
270
+ pinia: o,
271
+ options: i
272
+ })));
273
+ }), process.env.NODE_ENV !== "production" && n.$state && typeof n.$state == "object" && typeof n.$state.constructor == "function" && !n.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
274
+ state: () => new MyClass()
275
+ Found in store "${n.$id}".`), D && f && r.hydrate && r.hydrate(n.$state, D), N = !0, p = !0, n;
276
+ }
277
+ /*! #__NO_SIDE_EFFECTS__ */
278
+ // @__NO_SIDE_EFFECTS__
279
+ function mt(t, u, r) {
280
+ let o, c;
281
+ const f = typeof u == "function";
282
+ if (typeof t == "string")
283
+ o = t, c = f ? r : u;
284
+ else if (c = t, o = t.id, process.env.NODE_ENV !== "production" && typeof o != "string")
285
+ throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
286
+ function E(i, b) {
287
+ const N = ut();
288
+ if (i = // in test mode, ignore the argument provided as we can always retrieve a
289
+ // pinia instance with getActivePinia()
290
+ (process.env.NODE_ENV === "test" && R && R._testing ? null : i) || (N ? at(dt, null) : null), i && L(i), process.env.NODE_ENV !== "production" && !R)
291
+ throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
292
+ See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
293
+ This will fail in production.`);
294
+ i = R, i._s.has(o) || (f ? M(o, u, c, i) : G(o, c, i), process.env.NODE_ENV !== "production" && (E._pinia = i));
295
+ const p = i._s.get(o);
296
+ if (process.env.NODE_ENV !== "production" && b) {
297
+ const _ = "__hot:" + o, l = f ? M(_, u, c, i, !0) : G(_, y({}, c), i, !0);
298
+ b._hotUpdate(l), delete i.state.value[_], i._s.delete(_);
299
+ }
300
+ if (process.env.NODE_ENV !== "production" && C) {
301
+ const _ = it();
302
+ if (_ && _.proxy && // avoid adding stores that are just built for hot module replacement
303
+ !b) {
304
+ const l = _.proxy, v = "_pStores" in l ? l._pStores : l._pStores = {};
305
+ v[o] = p;
306
+ }
307
+ }
308
+ return p;
309
+ }
310
+ return E.$id = o, E;
311
+ }
312
+ export {
313
+ w as MutationType,
314
+ mt as defineStore,
315
+ L as setActivePinia,
316
+ vt as shouldHydrate
317
+ };
@@ -0,0 +1,11 @@
1
+ import t, { getCurrentInstance as e } from "vue";
2
+ export * from "vue";
3
+ import { default as f } from "vue";
4
+ t.util.warn;
5
+ function n() {
6
+ return !!e();
7
+ }
8
+ export {
9
+ f as Vue,
10
+ n as hasInjectionContext
11
+ };