@useinsider/guido 1.0.0-beta.301d25a → 1.0.0-beta.35d2ac4

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 (172) hide show
  1. package/README.md +2 -26
  2. package/dist/@types/generic.d.ts +1 -24
  3. package/dist/components/Guido.vue.d.ts +3 -6
  4. package/dist/components/Guido.vue.js +6 -6
  5. package/dist/components/Guido.vue2.js +40 -54
  6. package/dist/components/organisms/design-preview/AmpErrorModal.vue.d.ts +16 -0
  7. package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +21 -0
  8. package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +30 -0
  9. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +16 -0
  10. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +22 -0
  11. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +43 -0
  12. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +16 -0
  13. package/dist/components/organisms/design-preview/EmailPreview.vue.js +17 -0
  14. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +33 -0
  15. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +18 -0
  16. package/dist/components/organisms/{email-preview/mobile-preview/ContentView.vue.js → design-preview/EmailView.vue.js} +7 -7
  17. package/dist/components/organisms/design-preview/EmailView.vue2.js +24 -0
  18. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +17 -0
  19. package/dist/components/organisms/design-preview/InboxView.vue.js +19 -0
  20. package/dist/components/organisms/design-preview/InboxView.vue2.js +23 -0
  21. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +17 -0
  22. package/dist/components/organisms/design-preview/MobilePreview.vue.js +17 -0
  23. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +23 -0
  24. package/dist/components/organisms/header/AmpToggle.vue.js +17 -0
  25. package/dist/components/organisms/header/AmpToggle.vue2.js +48 -0
  26. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  27. package/dist/components/organisms/header/MiddleSlot.vue2.js +20 -16
  28. package/dist/components/organisms/header/RightSlot.vue.js +9 -10
  29. package/dist/components/organisms/header/RightSlot.vue2.js +22 -26
  30. package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
  31. package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
  32. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  33. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  34. package/dist/composables/useActionsApi.d.ts +1 -1
  35. package/dist/composables/useActionsApi.js +23 -38
  36. package/dist/composables/useExport.js +9 -10
  37. package/dist/composables/useHtmlCompiler.js +8 -9
  38. package/dist/composables/useMobileGmailFit.d.ts +5 -0
  39. package/dist/composables/useMobileGmailFit.js +69 -0
  40. package/dist/composables/useStripo.js +17 -23
  41. package/dist/composables/useToaster.d.ts +16 -1
  42. package/dist/composables/useToaster.js +30 -24
  43. package/dist/composables/useTranslations.js +2 -3
  44. package/dist/composables/useVersionHistoryApi.js +10 -11
  45. package/dist/enums/defaults.js +5 -14
  46. package/dist/enums/emailPreview.d.ts +3 -0
  47. package/dist/enums/emailPreview.js +6 -0
  48. package/dist/enums/gmailMobilePreview.d.ts +7 -0
  49. package/dist/enums/gmailMobilePreview.js +17 -0
  50. package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
  51. package/dist/guido.css +1 -1
  52. package/dist/inbox-mockup.svg +39 -0
  53. package/dist/phone-mockup.svg +31 -0
  54. package/dist/stores/editor.d.ts +3 -0
  55. package/dist/stores/editor.js +6 -3
  56. package/package.json +1 -1
  57. package/dist/components/organisms/base/Toaster.vue.d.ts +0 -2
  58. package/dist/components/organisms/base/Toaster.vue.js +0 -17
  59. package/dist/components/organisms/base/Toaster.vue2.js +0 -15
  60. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  61. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  62. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  63. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  64. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  65. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  66. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  67. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  68. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  69. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  70. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  71. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  72. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  73. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  74. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  75. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  76. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  77. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  78. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  79. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  80. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  81. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  82. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  83. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  84. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  85. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  86. package/dist/components/wrappers/WpModal.vue.js +0 -27
  87. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  88. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  89. package/dist/composables/useCodeEditorApi.js +0 -11
  90. package/dist/composables/useConfig.d.ts +0 -4
  91. package/dist/composables/useConfig.js +0 -7
  92. package/dist/composables/usePreviewMode.d.ts +0 -5
  93. package/dist/composables/usePreviewMode.js +0 -31
  94. package/dist/composables/useResponsivePreview.d.ts +0 -5
  95. package/dist/composables/useResponsivePreview.js +0 -86
  96. package/dist/enums/preview.d.ts +0 -13
  97. package/dist/enums/preview.js +0 -23
  98. package/dist/enums/toaster.d.ts +0 -5
  99. package/dist/enums/toaster.js +0 -4
  100. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  101. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  102. package/dist/node_modules/lodash-es/_apply.js +0 -16
  103. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  104. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  105. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  106. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  107. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  108. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  109. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  110. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  111. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  112. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  113. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  114. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  115. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  116. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  117. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  118. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  119. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  120. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  121. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  122. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  123. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  124. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  125. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  126. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  127. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  128. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  129. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  130. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  131. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  132. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  133. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  134. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  135. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  136. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  137. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  138. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  139. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  140. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  141. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  142. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  143. package/dist/node_modules/lodash-es/constant.js +0 -8
  144. package/dist/node_modules/lodash-es/identity.js +0 -6
  145. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  146. package/dist/node_modules/lodash-es/isArray.js +0 -4
  147. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  148. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  149. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  150. package/dist/node_modules/lodash-es/isLength.js +0 -7
  151. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  152. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  153. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  154. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  155. package/dist/node_modules/lodash-es/merge.js +0 -8
  156. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  157. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  158. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  159. package/dist/static/assets/phone-mockup.svg.js +0 -4
  160. package/dist/stores/dynamic-content.d.ts +0 -27
  161. package/dist/stores/dynamic-content.js +0 -23
  162. package/dist/stores/preview.d.ts +0 -46
  163. package/dist/stores/preview.js +0 -53
  164. package/dist/stores/toaster.d.ts +0 -18
  165. package/dist/stores/toaster.js +0 -27
  166. package/dist/utils/arrayUtil.d.ts +0 -1
  167. package/dist/utils/arrayUtil.js +0 -10
  168. package/dist/utils/genericUtil.d.ts +0 -2
  169. package/dist/utils/genericUtil.js +0 -7
  170. package/dist/utils/tooltipUtils.d.ts +0 -2
  171. package/dist/utils/tooltipUtils.js +0 -11
  172. /package/dist/components/organisms/{email-preview/amp → header}/AmpToggle.vue.d.ts +0 -0
@@ -0,0 +1,23 @@
1
+ import { defineComponent as r, computed as n } from "vue";
2
+ import { useTranslations as i } from "../../../composables/useTranslations.js";
3
+ import { InIcons as c } from "@useinsider/design-system-vue";
4
+ const f = /* @__PURE__ */ r({
5
+ __name: "InboxView",
6
+ props: {
7
+ emailData: null
8
+ },
9
+ emits: ["open-email"],
10
+ setup(o) {
11
+ const t = o, s = i(), a = n(() => {
12
+ var e;
13
+ return ((e = t.emailData) == null ? void 0 : e.senderName) || `(${s("settings.sender-name")})`;
14
+ }), m = n(() => {
15
+ var e;
16
+ return ((e = t.emailData) == null ? void 0 : e.subject) || s("newsletter.subject");
17
+ });
18
+ return { __sfc: !0, props: t, trans: s, senderName: a, subject: m, InIcons: c };
19
+ }
20
+ });
21
+ export {
22
+ f as default
23
+ };
@@ -0,0 +1,17 @@
1
+ import type { EmailData } from '@@/Types/generic';
2
+ interface Props {
3
+ emailHtml: string;
4
+ isAmp: boolean;
5
+ emailData?: EmailData;
6
+ }
7
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
8
+ export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToOption<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: import('vue').PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
@@ -0,0 +1,17 @@
1
+ import e from "./MobilePreview.vue2.js";
2
+ import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var i = function() {
4
+ var t = this, s = t._self._c, a = t._self._setupProxy;
5
+ return s("div", { staticClass: "d-f j-c-c pl-5" }, [s("div", { staticClass: "p-r w-35-s h-26-s" }, [s("img", { staticClass: "w-1 h-1 d-b p-e-n", attrs: { alt: a.mockupAlt, src: a.mockupImage } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: a.phoneScreenTopMargin, left: "20px" } }, [a.showInbox ? s(a.InboxView, { attrs: { "email-data": a.props.emailData }, on: { "open-email": a.openEmail } }) : s(a.EmailView, { attrs: { "email-html": t.emailHtml, "is-amp": t.isAmp }, on: { "back-to-inbox": a.backToInbox } })], 1)])]);
6
+ }, l = [], n = /* @__PURE__ */ o(
7
+ e,
8
+ i,
9
+ l,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const c = n.exports;
15
+ export {
16
+ c as default
17
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as s, ref as c, computed as e } from "vue";
2
+ import { INBOX_PREVIEW_PATH as u, PHONE_PREVIEW_PATH as i } from "../../../enums/emailPreview.js";
3
+ import f from "./EmailView.vue.js";
4
+ import _ from "./InboxView.vue.js";
5
+ const b = /* @__PURE__ */ s({
6
+ __name: "MobilePreview",
7
+ props: {
8
+ emailHtml: null,
9
+ isAmp: { type: Boolean },
10
+ emailData: null
11
+ },
12
+ setup(n) {
13
+ const t = n, o = c(!1), m = e(() => o.value ? u : i), p = e(() => o.value ? "Inbox mockup" : "Phone mockup"), a = () => {
14
+ o.value = !1;
15
+ }, l = () => {
16
+ o.value = !0;
17
+ }, r = e(() => o.value ? "88px" : "44px");
18
+ return { __sfc: !0, props: t, showInbox: o, mockupImage: m, mockupAlt: p, openEmail: a, backToInbox: l, phoneScreenTopMargin: r, EmailView: f, InboxView: _ };
19
+ }
20
+ });
21
+ export {
22
+ b as default
23
+ };
@@ -0,0 +1,17 @@
1
+ import t from "./AmpToggle.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var a = function() {
4
+ var e = this, o = e._self._c, r = e._self._setupProxy;
5
+ return r.editorStore.isPreviewModeOpen ? o("div", [o("div", { staticClass: "d-f a-i-c ml-3" }, [o(r.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": r.segmentList, selected: r.editorStore.emailFormat }, on: { click: r.handleFormatChange } }), r.showErrorButton ? o(r.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: r.handleErrorClick } }) : e._e()], 1), r.showErrorModal ? o(r.AmpErrorModal, { attrs: { errors: r.editorStore.ampErrors || [] }, on: { close: r.closeErrorModal } }) : e._e()], 1) : e._e();
6
+ }, n = [], l = /* @__PURE__ */ s(
7
+ t,
8
+ a,
9
+ n,
10
+ !1,
11
+ null,
12
+ null
13
+ );
14
+ const d = l.exports;
15
+ export {
16
+ d as default
17
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as h, ref as v, computed as a, watch as E } from "vue";
2
+ import { useActionsApi as g } from "../../../composables/useActionsApi.js";
3
+ import { useToaster as w } from "../../../composables/useToaster.js";
4
+ import { useTranslations as M } from "../../../composables/useTranslations.js";
5
+ import A from "../design-preview/AmpErrorModal.vue.js";
6
+ import { useEditorStore as _ } from "../../../stores/editor.js";
7
+ import { InButtonV2 as P, InSegments as y } from "@useinsider/design-system-vue";
8
+ const D = /* @__PURE__ */ h({
9
+ __name: "AmpToggle",
10
+ setup(F) {
11
+ const t = _(), { getPreviewData: s } = g(), { showToaster: l } = w(), e = M(), r = v(!1), m = a(() => !!t.ampHtml), n = a(() => !!(t.ampErrors && t.ampErrors.length > 0)), p = a(() => [
12
+ { text: e("dynamic-creatives.html"), value: "html" },
13
+ {
14
+ text: e("email.amp-html"),
15
+ value: "amp",
16
+ tooltipText: m.value ? "" : e("email.preview-amp-unavailable-tooltip"),
17
+ position: "bottom",
18
+ align: "center",
19
+ disable: !m.value
20
+ }
21
+ ]), i = async () => {
22
+ try {
23
+ const o = await s();
24
+ t.ampHtml = o.ampHtml ?? null, t.ampErrors = o.ampErrors ?? null, t.emailFormat = o.ampHtml ? "amp" : "html";
25
+ } catch {
26
+ l({
27
+ type: "error",
28
+ message: "Failed to load AMP data. Please try again later."
29
+ });
30
+ }
31
+ };
32
+ E([() => t.editorVisualMode, () => t.isPreviewModeOpen], () => {
33
+ t.isPreviewModeOpen && i();
34
+ }, { immediate: !0 });
35
+ const c = (o) => {
36
+ t.emailFormat = o;
37
+ }, u = () => {
38
+ r.value = !0;
39
+ }, d = a(() => t.emailFormat === "amp" && n.value);
40
+ function f() {
41
+ r.value = !1;
42
+ }
43
+ return { __sfc: !0, editorStore: t, getPreviewData: s, showToaster: l, trans: e, showErrorModal: r, hasAMP: m, hasAMPErrors: n, segmentList: p, updateAmpData: i, handleFormatChange: c, handleErrorClick: u, showErrorButton: d, closeErrorModal: f, AmpErrorModal: A, InSegments: y, InButtonV2: P };
44
+ }
45
+ });
46
+ export {
47
+ D as default
48
+ };
@@ -1,17 +1,17 @@
1
- import i from "./MiddleSlot.vue2.js";
2
- import s from "../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import s from "./MiddleSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
4
  var o = this, e = o._self._c, t = o._self._setupProxy;
5
- return t.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(t.VersionHistory), e(t.VersionHistoryViewOptions)], 1) : e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.previewStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreviewToggle } }), e(t.ViewOptions, { staticClass: "ml-3" }), t.previewStore.isPreviewModeOpen ? e(t.AmpToggle) : o._e()], 1);
6
- }, r = [], l = /* @__PURE__ */ s(
7
- i,
5
+ return t.editorStore.isVersionHistoryOpen ? e("div", { staticClass: "d-f" }, [e(t.VersionHistory), e(t.VersionHistoryViewOptions)], 1) : e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": t.isPreviewModeOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": t.isPreviewModeOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "disabled-status": t.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), e(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.isPreviewModeOpen ? t.trans("newsletter.close-email-preview") : t.trans("newsletter.email-preview") }, on: { click: t.handlePreviewClick } }), e(t.ViewOptions, { staticClass: "ml-3" }), e(t.AmpToggle)], 1);
6
+ }, l = [], r = /* @__PURE__ */ i(
7
+ s,
8
8
  n,
9
- r,
9
+ l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const u = l.exports;
14
+ const u = r.exports;
15
15
  export {
16
16
  u as default
17
17
  };
@@ -1,21 +1,25 @@
1
- import { defineComponent as m, computed as s } from "vue";
2
- import { usePreviewMode as l } from "../../../composables/usePreviewMode.js";
3
- import { useTranslations as d } from "../../../composables/useTranslations.js";
4
- import w from "../email-preview/amp/AmpToggle.vue.js";
5
- import { useEditorStore as c } from "../../../stores/editor.js";
6
- import { usePreviewStore as f } from "../../../stores/preview.js";
7
- import { getTooltipOptions as v } from "../../../utils/tooltipUtils.js";
8
- import { InButtonV2 as a } from "@useinsider/design-system-vue";
9
- import u from "./version-history/VersionHistory.vue.js";
10
- import T from "./version-history/ViewOptions.vue.js";
11
- import P from "./ViewOptions.vue.js";
12
- const B = /* @__PURE__ */ m({
1
+ import { defineComponent as s, computed as n } from "vue";
2
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as c } from "@useinsider/design-system-vue";
5
+ import d from "./AmpToggle.vue.js";
6
+ import f from "./version-history/VersionHistory.vue.js";
7
+ import a from "./version-history/ViewOptions.vue.js";
8
+ import l from "./ViewOptions.vue.js";
9
+ const T = /* @__PURE__ */ s({
13
10
  __name: "MiddleSlot",
14
- setup(_) {
15
- const t = c(), e = d(), o = f(), { openPreviewMode: r, closePreviewMode: i } = l(), n = s(() => o.isPreviewModeOpen ? e("newsletter.close-email-preview") : e("newsletter.email-preview")), p = s(() => t.isCodeEditorOpen ? e("newsletter.close-html-editor") : e("newsletter.html-editor"));
16
- return { __sfc: !0, editorStore: t, trans: e, previewStore: o, openPreviewMode: r, closePreviewMode: i, previewTooltipText: n, codeEditorTooltipText: p, handlePreviewToggle: () => o.isPreviewModeOpen ? i() : r(), AmpToggle: w, getTooltipOptions: v, InButtonV2: a, VersionHistory: u, VersionHistoryViewOptions: T, ViewOptions: P };
11
+ setup(u) {
12
+ const o = m(), t = p(), e = () => {
13
+ o.isPreviewModeOpen = !o.isPreviewModeOpen;
14
+ }, i = n(() => o.isPreviewModeOpen);
15
+ return { __sfc: !0, editorStore: o, trans: t, handlePreviewClick: e, isPreviewModeOpen: i, getTooltipOptions: (r) => ({
16
+ id: `${r}-tooltip`,
17
+ dynamicPosition: !1,
18
+ staticPosition: "bottom center",
19
+ iconStatus: !1
20
+ }), InButtonV2: c, AmpToggle: d, VersionHistory: f, VersionHistoryViewOptions: a, ViewOptions: l };
17
21
  }
18
22
  });
19
23
  export {
20
- B as default
24
+ T as default
21
25
  };
@@ -1,18 +1,17 @@
1
- import n from "./RightSlot.vue2.js";
2
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
4
- var s, i;
5
- var o = this, e = o._self._c, t = o._self._setupProxy;
6
- return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.previewStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.exportHtml } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.isSaveButtonDisabled }, on: { click: t.handleSave } })], 1);
7
- }, l = [], p = /* @__PURE__ */ r(
1
+ import o from "./RightSlot.vue2.js";
2
+ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
+ var n = function() {
4
+ var s = this, e = s._self._c, t = s._self._setupProxy;
5
+ return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen || t.editorStore.isPreviewModeOpen }, on: { click: t.handleSave } })], 1);
6
+ }, r = [], a = /* @__PURE__ */ i(
7
+ o,
8
8
  n,
9
- a,
10
- l,
9
+ r,
11
10
  !1,
12
11
  null,
13
12
  null
14
13
  );
15
- const c = p.exports;
14
+ const c = a.exports;
16
15
  export {
17
16
  c as default
18
17
  };
@@ -1,39 +1,35 @@
1
- import { defineComponent as y, computed as a } from "vue";
2
- import { useActionsApi as S } from "../../../composables/useActionsApi.js";
3
- import { useConfig as H } from "../../../composables/useConfig.js";
4
- import { useExport as h } from "../../../composables/useExport.js";
5
- import { useSaveStart as V, useSaveComplete as _ } from "../../../composables/useGuidoActions.js";
6
- import { useTranslations as g } from "../../../composables/useTranslations.js";
7
- import { useVersionHistoryApi as w } from "../../../composables/useVersionHistoryApi.js";
8
- import { useEditorStore as C } from "../../../stores/editor.js";
9
- import { usePreviewStore as O } from "../../../stores/preview.js";
10
- import { getTooltipOptions as x } from "../../../utils/tooltipUtils.js";
11
- import { InButtonV2 as T } from "@useinsider/design-system-vue";
12
- const q = /* @__PURE__ */ y({
1
+ import { defineComponent as m } from "vue";
2
+ import { useActionsApi as p } from "../../../composables/useActionsApi.js";
3
+ import { useExport as c } from "../../../composables/useExport.js";
4
+ import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
5
+ import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
6
+ import { useEditorStore as d } from "../../../stores/editor.js";
7
+ import { InButtonV2 as S } from "@useinsider/design-system-vue";
8
+ const E = /* @__PURE__ */ m({
13
9
  __name: "RightSlot",
14
- setup(A) {
15
- const { config: c } = H(), { exportHtml: l } = h(), { getCompiledEmail: r } = S(), s = V(), i = _(), { openVersionHistory: n, closeVersionHistory: m } = w(), o = C(), t = g(), p = O(), f = () => {
16
- if (o.isVersionHistoryOpen) {
17
- m();
10
+ setup(h) {
11
+ const { exportHtml: a } = c(), { getCompiledEmail: t } = p(), e = l(), r = f(), { openVersionHistory: s, closeVersionHistory: n } = u(), i = d();
12
+ return { __sfc: !0, exportHtml: a, getCompiledEmail: t, saveStart: e, saveComplete: r, openVersionHistory: s, closeVersionHistory: n, editorStore: i, handleVersionHistory: () => {
13
+ if (i.isVersionHistoryOpen) {
14
+ n();
18
15
  return;
19
16
  }
20
- n();
21
- }, u = a(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history")), v = async () => {
22
17
  s();
18
+ }, handleSave: async () => {
19
+ e();
23
20
  try {
24
- const { html: e } = await r();
25
- i({
26
- html: e || "",
21
+ const { html: o } = await t();
22
+ r({
23
+ html: o || "",
27
24
  css: ""
28
25
  // CSS is embedded in HTML from Stripo
29
26
  });
30
- } catch (e) {
31
- console.error("Failed to get template data for save:", e);
27
+ } catch (o) {
28
+ console.error("Failed to get template data for save:", o);
32
29
  }
33
- }, d = a(() => o.isVersionHistoryOpen || p.isPreviewModeOpen);
34
- return { __sfc: !0, config: c, exportHtml: l, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: m, editorStore: o, trans: t, previewStore: p, handleVersionHistory: f, versionHistoryTooltipText: u, handleSave: v, isSaveButtonDisabled: d, getTooltipOptions: x, InButtonV2: T };
30
+ }, InButtonV2: S };
35
31
  }
36
32
  });
37
33
  export {
38
- q as default
34
+ E as default
39
35
  };
@@ -3,16 +3,16 @@ import r from "./ViewOptions.vue2.js";
3
3
  import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = function() {
5
5
  var t = this, o = t._self._c, e = t._self._setupProxy;
6
- return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.previewStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
6
+ return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
7
7
  }, n = [], _ = /* @__PURE__ */ i(
8
8
  r,
9
9
  s,
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "aad05c54"
13
+ "f90d31ea"
14
14
  );
15
- const p = _.exports;
15
+ const l = _.exports;
16
16
  export {
17
- p as default
17
+ l as default
18
18
  };
@@ -1,35 +1,15 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as r } from "../../../composables/useTranslations.js";
3
- import { useEditorStore as s } from "../../../stores/editor.js";
4
- import { usePreviewStore as m } from "../../../stores/preview.js";
5
- import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
6
- import { InSegments as l } from "@useinsider/design-system-vue";
7
- const w = /* @__PURE__ */ p({
1
+ import { defineComponent as e } from "vue";
2
+ import { useEditorStore as t } from "../../../stores/editor.js";
3
+ import { InSegments as o } from "@useinsider/design-system-vue";
4
+ const u = /* @__PURE__ */ e({
8
5
  __name: "ViewOptions",
9
- setup(a) {
10
- const e = s(), o = r(), i = [
11
- {
12
- text: "",
13
- icon: "line-desktop",
14
- value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: t("guido__view-option-desktop")
19
- },
20
- {
21
- text: "",
22
- icon: "line-menu-mobileapp",
23
- value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: t("guido__view-option-mobile")
28
- }
29
- ], n = m();
30
- return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
6
+ setup(n) {
7
+ return { __sfc: !0, editorStore: t(), segmentList: [
8
+ { text: "", icon: "line-desktop", value: "desktop" },
9
+ { text: "", icon: "line-menu-mobileapp", value: "mobile" }
10
+ ], InSegments: o };
31
11
  }
32
12
  });
33
13
  export {
34
- w as default
14
+ u as default
35
15
  };
@@ -10,9 +10,9 @@ var r = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "421ffc13"
13
+ "6a2bde67"
14
14
  );
15
- const f = _.exports;
15
+ const d = _.exports;
16
16
  export {
17
- f as default
17
+ d as default
18
18
  };
@@ -1,41 +1,23 @@
1
- import { defineComponent as p } from "vue";
2
- import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
- import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
- import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
- import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
- import { InSegments as c } from "@useinsider/design-system-vue";
7
- const h = /* @__PURE__ */ p({
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({
8
6
  __name: "ViewOptions",
9
- setup(u) {
10
- const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
- {
12
- text: "",
13
- icon: "line-desktop",
14
- value: "desktop",
15
- position: "bottom",
16
- align: "center",
17
- tooltipText: o("newsletter.desktop"),
18
- tooltipOptions: n("guido__version-history-view-option-desktop")
19
- },
20
- {
21
- text: "",
22
- icon: "line-menu-mobileapp",
23
- value: "mobile",
24
- position: "bottom",
25
- align: "center",
26
- tooltipText: o("newsletter.mobile"),
27
- tooltipOptions: n("guido__version-history-view-option-mobile")
28
- }
29
- ];
30
- return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
31
- if (t.editorVisualMode = s, s === "mobile") {
32
- i();
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();
33
15
  return;
34
16
  }
35
- e();
36
- }, InSegments: c };
17
+ o();
18
+ }, InSegments: m };
37
19
  }
38
20
  });
39
21
  export {
40
- h as default
22
+ d as default
41
23
  };
@@ -1,4 +1,4 @@
1
- import type { CompileEmailOptions } from '@@/Types/actions-api';
1
+ import type { CompileEmailOptions } from '@@/Types/stripo';
2
2
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
3
3
  export declare const useActionsApi: () => {
4
4
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
@@ -1,7 +1,6 @@
1
- import { useToaster as d } from "./useToaster.js";
2
- const E = () => {
3
- const { handleError: m } = d(), s = (t = {}) => new Promise((e, a) => {
4
- const i = { ...{
1
+ const w = () => {
2
+ const a = (e = {}) => new Promise((t, s) => {
3
+ const m = { ...{
5
4
  minimize: !0,
6
5
  utmEntity: {
7
6
  utmSource: "",
@@ -20,45 +19,31 @@ const E = () => {
20
19
  forseAmp: !1,
21
20
  resetDataSavedFlag: !1,
22
21
  disableLineHeightsReplace: !0
23
- }, ...t }, n = {
24
- callback: (r, l, c, p, u) => {
25
- r ? a(r) : e({
26
- html: l,
27
- ampHtml: c,
28
- ampErrors: p,
29
- displayConditions: u
22
+ }, ...e }, o = {
23
+ callback: (i, n, l, r, c) => {
24
+ i ? s(i) : t({
25
+ html: n,
26
+ ampHtml: l,
27
+ ampErrors: r,
28
+ displayConditions: c
30
29
  });
31
30
  },
32
- ...i
31
+ ...m
33
32
  };
34
- window.StripoEditorApi.actionsApi.compileEmail(n);
33
+ window.StripoEditorApi.actionsApi.compileEmail(o);
35
34
  });
36
- return { getCompiledEmail: s, activateCustomViewStyles: (t = !0) => {
37
- window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
38
- }, getPreviewData: async (t) => {
39
- try {
40
- const {
41
- html: e,
42
- displayConditions: a,
43
- ampHtml: o = "",
44
- ampErrors: i = []
45
- } = await s({ minimize: !1, resetDataSavedFlag: !1, ...t });
46
- return {
47
- html: e,
48
- ampHtml: o,
49
- ampErrors: i,
50
- displayConditions: a
51
- };
52
- } catch (e) {
53
- return m(e, "Error loading preview"), {
54
- html: "",
55
- ampHtml: "",
56
- ampErrors: [],
57
- displayConditions: []
58
- };
59
- }
35
+ return { getCompiledEmail: a, activateCustomViewStyles: (e = !0) => {
36
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
37
+ }, getPreviewData: async (e) => {
38
+ const t = await a({ minimize: !1, resetDataSavedFlag: !1, ...e });
39
+ return {
40
+ html: t.html,
41
+ ampHtml: t.ampHtml ?? "",
42
+ ampErrors: t.ampErrors ?? null,
43
+ displayConditions: t.displayConditions
44
+ };
60
45
  } };
61
46
  };
62
47
  export {
63
- E as useActionsApi
48
+ w as useActionsApi
64
49
  };
@@ -1,9 +1,8 @@
1
- import { ToasterTypeOptions as a } from "../enums/toaster.js";
2
- import { useActionsApi as m } from "./useActionsApi.js";
3
- import { useHtmlCompiler as p } from "./useHtmlCompiler.js";
1
+ import { useActionsApi as l } from "./useActionsApi.js";
2
+ import { useHtmlCompiler as m } from "./useHtmlCompiler.js";
4
3
  import { useToaster as d } from "./useToaster.js";
5
- const H = () => {
6
- const l = (s, o, r) => {
4
+ const h = () => {
5
+ const a = (s, o, r) => {
7
6
  const i = new Blob([s], { type: r }), t = URL.createObjectURL(i), e = document.createElement("a");
8
7
  e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
9
8
  }, c = (s) => {
@@ -11,7 +10,7 @@ const H = () => {
11
10
  return `${s}_${r}-${i}-${t}_${e}-${n}.html`;
12
11
  };
13
12
  return { exportHtml: async (s = !0) => {
14
- const { getCompiledEmail: o } = m(), { showToaster: r } = d(), { compileHtml: i } = p();
13
+ const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
15
14
  try {
16
15
  const { html: t } = await o();
17
16
  if (t) {
@@ -26,21 +25,21 @@ const H = () => {
26
25
  executionTime: `${n.stats.executionTime.toFixed(2)}ms`
27
26
  });
28
27
  }
29
- l(e, c("HTML"), "text/html");
28
+ a(e, c("HTML"), "text/html");
30
29
  } else
31
30
  r({
32
- type: a.Alert,
31
+ type: "error",
33
32
  message: "No HTML content to download"
34
33
  });
35
34
  } catch (t) {
36
35
  const e = t instanceof Error ? t.message : String(t);
37
36
  r({
38
- type: a.Alert,
37
+ type: "error",
39
38
  message: `Error compiling email: ${e}`
40
39
  });
41
40
  }
42
41
  } };
43
42
  };
44
43
  export {
45
- H as useExport
44
+ h as useExport
46
45
  };
@@ -1,17 +1,16 @@
1
1
  import { defaultHtmlCompilerRules as r } from "../config/compiler/htmlCompilerRules.js";
2
2
  import { createHtmlCompiler as p } from "../utils/htmlCompiler.js";
3
- import { useConfig as s } from "./useConfig.js";
4
- const R = () => {
5
- const { config: e } = s(), l = e.htmlCompilerRules || [], t = [
6
- ...!!e.ignoreDefaultHtmlCompilerRules ? [] : r,
7
- ...l.map((o, i) => ({
3
+ const a = () => {
4
+ const e = typeof window < "u" ? window.GuidoConfig : void 0, l = (e == null ? void 0 : e.htmlCompilerRules) || [], t = [
5
+ ...!!(e != null && e.ignoreDefaultHtmlCompilerRules) ? [] : r,
6
+ ...l.map((o, m) => ({
8
7
  ...o,
9
- priority: o.priority + 1e3 + i
8
+ priority: o.priority + 1e3 + m
10
9
  // Ensure additional rules run after default rules
11
10
  }))
12
- ], m = p(t);
13
- return { compileHtml: (o) => m.compile(o) };
11
+ ], i = p(t);
12
+ return { compileHtml: (o) => i.compile(o) };
14
13
  };
15
14
  export {
16
- R as useHtmlCompiler
15
+ a as useHtmlCompiler
17
16
  };