@useinsider/guido 1.0.0-beta.eda3d24 → 1.0.0-beta.ef5e504

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 (95) hide show
  1. package/README.md +21 -133
  2. package/dist/@types/generic.d.ts +1 -2
  3. package/dist/components/Guido.vue.d.ts +2 -5
  4. package/dist/components/Guido.vue.js +6 -6
  5. package/dist/components/Guido.vue2.js +35 -50
  6. package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +16 -0
  7. package/dist/components/organisms/design-preview/DesktopPreview.vue.js +22 -0
  8. package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +28 -0
  9. package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +16 -0
  10. package/dist/components/organisms/design-preview/EmailPreview.vue.js +17 -0
  11. package/dist/components/organisms/design-preview/EmailPreview.vue2.js +37 -0
  12. package/dist/components/organisms/design-preview/EmailView.vue.d.ts +18 -0
  13. package/dist/components/organisms/{email-preview/mobile-preview/ContentView.vue.js → design-preview/EmailView.vue.js} +7 -7
  14. package/dist/components/organisms/design-preview/EmailView.vue2.js +24 -0
  15. package/dist/components/organisms/design-preview/InboxView.vue.d.ts +17 -0
  16. package/dist/components/organisms/design-preview/InboxView.vue.js +19 -0
  17. package/dist/components/organisms/design-preview/InboxView.vue2.js +23 -0
  18. package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +17 -0
  19. package/dist/components/organisms/design-preview/MobilePreview.vue.js +17 -0
  20. package/dist/components/organisms/design-preview/MobilePreview.vue2.js +22 -0
  21. package/dist/components/organisms/header/AmpErrorModal.vue.d.ts +16 -0
  22. package/dist/components/organisms/header/AmpErrorModal.vue.js +21 -0
  23. package/dist/components/organisms/header/AmpErrorModal.vue2.js +27 -0
  24. package/dist/components/organisms/header/AmpToggle.vue.js +19 -0
  25. package/dist/components/organisms/header/AmpToggle.vue2.js +38 -0
  26. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  27. package/dist/components/organisms/header/LeftSlot.vue2.js +8 -10
  28. package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
  29. package/dist/components/organisms/header/MiddleSlot.vue2.js +18 -17
  30. package/dist/components/organisms/header/RightSlot.vue.js +4 -4
  31. package/dist/components/organisms/header/RightSlot.vue2.js +14 -29
  32. package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
  33. package/dist/components/organisms/header/ViewOptions.vue2.js +8 -10
  34. package/dist/composables/useActionsApi.d.ts +0 -2
  35. package/dist/composables/useActionsApi.js +36 -62
  36. package/dist/composables/useMobileGmailFit.d.ts +5 -0
  37. package/dist/composables/useMobileGmailFit.js +69 -0
  38. package/dist/composables/usePreviewMode.d.ts +4 -3
  39. package/dist/composables/usePreviewMode.js +16 -28
  40. package/dist/composables/useStripo.js +15 -15
  41. package/dist/enums/defaults.js +5 -9
  42. package/dist/enums/gmailMobilePreview.d.ts +7 -0
  43. package/dist/enums/gmailMobilePreview.js +17 -0
  44. package/dist/guido.css +1 -1
  45. package/dist/inbox-mockup.svg +41 -0
  46. package/dist/phone-mockup.svg +31 -0
  47. package/dist/services/stripoApi.js +2 -6
  48. package/dist/stores/editor.d.ts +4 -0
  49. package/dist/stores/editor.js +7 -3
  50. package/package.json +1 -1
  51. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  52. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  53. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  54. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  55. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  56. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  57. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  58. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  59. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  60. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  61. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  62. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  63. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  64. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  65. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  66. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  67. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -22
  68. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  69. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  70. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  71. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  72. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  73. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  74. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  75. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  76. package/dist/components/wrappers/WpModal.vue.d.ts +0 -76
  77. package/dist/components/wrappers/WpModal.vue.js +0 -27
  78. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  79. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  80. package/dist/composables/useCodeEditorApi.js +0 -11
  81. package/dist/composables/useConfig.d.ts +0 -4
  82. package/dist/composables/useConfig.js +0 -7
  83. package/dist/composables/useGuidoActions.d.ts +0 -46
  84. package/dist/composables/useGuidoActions.js +0 -37
  85. package/dist/composables/useProvideInject.d.ts +0 -14
  86. package/dist/composables/useProvideInject.js +0 -17
  87. package/dist/composables/useResponsivePreview.d.ts +0 -5
  88. package/dist/composables/useResponsivePreview.js +0 -86
  89. package/dist/enums/preview.d.ts +0 -13
  90. package/dist/enums/preview.js +0 -23
  91. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  92. package/dist/static/assets/phone-mockup.svg.js +0 -4
  93. package/dist/stores/preview.d.ts +0 -57
  94. package/dist/stores/preview.js +0 -56
  95. /package/dist/components/organisms/{email-preview/amp → header}/AmpToggle.vue.d.ts +0 -0
@@ -1,31 +0,0 @@
1
- import { defineComponent as d, ref as r, onMounted as h, onBeforeUnmount as v, nextTick as g } from "vue";
2
- import { usePreviewStore as _ } from "../../../../stores/preview.js";
3
- import { InContainer as I } from "@useinsider/design-system-vue";
4
- import R from "./EmailHeaderInfo.vue.js";
5
- import C from "./EmailSizeIndicator.vue.js";
6
- const B = /* @__PURE__ */ d({
7
- __name: "DesktopPreview",
8
- setup(H) {
9
- const t = r(), i = r("400px"), a = r(!1), m = _(), n = () => {
10
- if (!t.value)
11
- return;
12
- const o = t.value.querySelector(".in-container");
13
- if (!o)
14
- return;
15
- const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
16
- i.value = `${p}px`;
17
- };
18
- let e = null;
19
- const c = () => {
20
- n(), t.value && (e = new ResizeObserver(n), e.observe(t.value), g(() => {
21
- a.value = !0;
22
- }));
23
- }, l = () => {
24
- e == null || e.disconnect();
25
- };
26
- return h(c), v(l), { __sfc: !0, containerRef: t, iframeHeight: i, isContainerReady: a, previewStore: m, calculateIframeHeight: n, resizeObserver: e, initIframe: c, cleanIframe: l, InContainer: I, EmailHeaderInfo: R, EmailSizeIndicator: C };
27
- }
28
- });
29
- export {
30
- B as default
31
- };
@@ -1,2 +0,0 @@
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<{}>>, {}>;
2
- export default _default;
@@ -1,17 +0,0 @@
1
- import e from "./EmailHeaderInfo.vue2.js";
2
- import c from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var r = function() {
4
- var t = this, s = t._self._c, a = t._self._setupProxy;
5
- return s("div", { staticClass: "d-f a-i-c j-c-s-b w-1" }, [s("div", { staticClass: "d-f a-i-c" }, [s("div", { staticClass: "b-c-49 bor-r-100 w-5-s h-5-s d-f a-i-c j-c-c" }, [s(a.InIcons, { attrs: { name: "line-menu-profile" } })], 1), s("div", { staticClass: "d-f f-d-c ml-2" }, [s("p", { staticClass: "t-c-53 f-w-600 f-s-1 l-h-1" }, [t._v(" " + t._s(a.senderName) + " ")]), s("p", { staticClass: "t-c-55 f-w-400 f-s-12 l-h-1" }, [t._v(" " + t._s(a.subject) + " ")])])])]);
6
- }, i = [], n = /* @__PURE__ */ c(
7
- e,
8
- r,
9
- i,
10
- !1,
11
- null,
12
- null
13
- );
14
- const o = n.exports;
15
- export {
16
- o as default
17
- };
@@ -1,20 +0,0 @@
1
- import { defineComponent as m, computed as o } from "vue";
2
- import { useConfig as a } from "../../../../composables/useConfig.js";
3
- import { useTranslations as i } from "../../../../composables/useTranslations.js";
4
- import { InIcons as c } from "@useinsider/design-system-vue";
5
- const l = /* @__PURE__ */ m({
6
- __name: "EmailHeaderInfo",
7
- setup(f) {
8
- const { config: t } = a(), n = i(), s = o(() => {
9
- var e;
10
- return ((e = t.emailHeader) == null ? void 0 : e.senderName) || n("settings.sender-name");
11
- }), r = o(() => {
12
- var e;
13
- return ((e = t.emailHeader) == null ? void 0 : e.subject) || n("email-editor.default-subject");
14
- });
15
- return { __sfc: !0, config: t, trans: n, senderName: s, subject: r, InIcons: c };
16
- }
17
- });
18
- export {
19
- l as default
20
- };
@@ -1,2 +0,0 @@
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<{}>>, {}>;
2
- export default _default;
@@ -1,18 +0,0 @@
1
- import i from "./EmailSizeIndicator.vue2.js";
2
- /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var o = function() {
5
- var s = this, e = s._self._c, t = s._self._setupProxy;
6
- return e("div", { staticClass: "d-f a-i-c j-c-c" }, [e(t.InProgress, { staticClass: "min-w-15-s", attrs: { id: "email-size-progress", "description-status": "", "description-position": "left", description: t.htmlSize, "max-value": t.MAX_EMAIL_SIZE_IN_KB, type: t.progress.type, value: t.progress.value } }), e(t.InTooltip, { staticClass: "d-f ml-1", attrs: { id: "email-size-tooltip", align: "center", position: "bottom", text: t.trans("email-editor.preview-design-size-tooltip") } })], 1);
7
- }, a = [], n = /* @__PURE__ */ r(
8
- i,
9
- o,
10
- a,
11
- !1,
12
- null,
13
- "bd212ce2"
14
- );
15
- const m = n.exports;
16
- export {
17
- m as default
18
- };
@@ -1,22 +0,0 @@
1
- import { defineComponent as c, ref as n, computed as l, watch as u } from "vue";
2
- import { useTranslations as p } from "../../../../composables/useTranslations.js";
3
- import { usePreviewStore as v } from "../../../../stores/preview.js";
4
- import { InTooltip as _, InProgress as f } from "@useinsider/design-system-vue";
5
- const S = /* @__PURE__ */ c({
6
- __name: "EmailSizeIndicator",
7
- setup(w) {
8
- const t = v(), o = 102, e = n(0), s = n({
9
- type: "success",
10
- value: 0
11
- }), a = l(() => `~${e.value} KB`), r = () => {
12
- const m = new Blob([t.previewHtml]).size;
13
- e.value = Math.round(m / 1024), s.value.value = Math.min(e.value, o), s.value.type = e.value < o ? "success" : "warning";
14
- }, i = p();
15
- return u(() => t.previewHtml, () => {
16
- r();
17
- }, { immediate: !0 }), { __sfc: !0, previewStore: t, MAX_EMAIL_SIZE_IN_KB: o, htmlKB: e, progress: s, htmlSize: a, calculateProgress: r, trans: i, InProgress: f, InTooltip: _ };
18
- }
19
- });
20
- export {
21
- S as default
22
- };
@@ -1,4 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
- "back-to-inbox": () => void;
3
- }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
- export default _default;
@@ -1,23 +0,0 @@
1
- import { defineComponent as m, ref as c } from "vue";
2
- import { useResponsivePreview as f } from "../../../../composables/useResponsivePreview.js";
3
- import { useTranslations as a } from "../../../../composables/useTranslations.js";
4
- import { usePreviewStore as p } from "../../../../stores/preview.js";
5
- import { InIcons as u } from "@useinsider/design-system-vue";
6
- const h = /* @__PURE__ */ m({
7
- __name: "ContentView",
8
- emits: ["back-to-inbox"],
9
- setup(v) {
10
- const i = a(), t = p(), n = c(), { setupResponsivePreview: r } = f(), s = (o) => {
11
- ["transform", "transform-origin", "height"].forEach((e) => {
12
- o.documentElement.style.removeProperty(e);
13
- });
14
- };
15
- return { __sfc: !0, trans: i, previewStore: t, iframeRef: n, setupResponsivePreview: r, clearAMPTransforms: s, onLoad: () => {
16
- const o = n.value, e = o == null ? void 0 : o.contentDocument;
17
- e && (r(o), t.isAMPResponsive && s(e));
18
- }, InIcons: u };
19
- }
20
- });
21
- export {
22
- h as default
23
- };
@@ -1,4 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
2
- "open-email": () => void;
3
- }, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
4
- export default _default;
@@ -1,20 +0,0 @@
1
- import c from "./InboxView.vue2.js";
2
- /* empty css */
3
- import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
- var a = function() {
5
- var s = this, t = s._self._c, e = s._self._setupProxy;
6
- return t("div", { staticClass: "p-y-13 p-x-3 bor-b-w-1 bor-b-s-s bor-b-c-50 cur-p b-c-4 b-c-h-5 p-3", on: { click: function(_) {
7
- return e.emit("open-email");
8
- } } }, [t("div", { staticClass: "d-f j-c-s-b a-i-c w-1" }, [t("div", { staticClass: "f-g-1 min-w-0-s" }, [t("div", { staticClass: "f-s-1 f-w-600 t-c-53 l-h-1 mb-12 cropped-text" }, [s._v(" " + s._s(e.senderName) + " ")]), t("div", { staticClass: "f-s-12 f-w-400 t-c-55 l-h-1 cropped-text" }, [s._v(" " + s._s(e.subject) + " ")])]), t("div", { staticClass: "f-sh-0 ml-2 f-s-12 f-w-400 t-c-55 l-h-1" }, [s._v(" " + s._s(e.trans("product-catalog.today")) + " ")]), t(e.InIcons, { staticClass: "i-c-52", attrs: { name: "line-chevron-right" } })], 1)]);
9
- }, i = [], n = /* @__PURE__ */ r(
10
- c,
11
- a,
12
- i,
13
- !1,
14
- null,
15
- "8490e490"
16
- );
17
- const m = n.exports;
18
- export {
19
- m as default
20
- };
@@ -1,21 +0,0 @@
1
- import { defineComponent as a, computed as o } from "vue";
2
- import { useConfig as i } from "../../../../composables/useConfig.js";
3
- import { useTranslations as c } from "../../../../composables/useTranslations.js";
4
- import { InIcons as f } from "@useinsider/design-system-vue";
5
- const b = /* @__PURE__ */ a({
6
- __name: "InboxView",
7
- emits: ["open-email"],
8
- setup(p, { emit: s }) {
9
- const t = c(), { config: n } = i(), r = o(() => {
10
- var e;
11
- return ((e = n.emailHeader) == null ? void 0 : e.senderName) || t("settings.sender-name");
12
- }), m = o(() => {
13
- var e;
14
- return ((e = n.emailHeader) == null ? void 0 : e.subject) || t("email-editor.default-subject");
15
- });
16
- return { __sfc: !0, emit: s, trans: t, config: n, senderName: r, subject: m, InIcons: f };
17
- }
18
- });
19
- export {
20
- b as default
21
- };
@@ -1,2 +0,0 @@
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<{}>>, {}>;
2
- export default _default;
@@ -1,17 +0,0 @@
1
- import t from "./MobilePreview.vue2.js";
2
- import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
4
- var o = this, s = o._self._c, e = o._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: e.mockup.alt, src: e.mockup.image } }), s("div", { staticClass: "p-a w-21-s h-24-s o-h", style: { top: e.phoneScreenTopMargin, left: "20px" } }, [e.showInbox ? s(e.InboxView, { on: { "open-email": e.openEmail } }) : s(e.ContentView, { on: { "back-to-inbox": e.backToInbox } })], 1)])]);
6
- }, r = [], i = /* @__PURE__ */ n(
7
- t,
8
- a,
9
- r,
10
- !1,
11
- null,
12
- null
13
- );
14
- const _ = i.exports;
15
- export {
16
- _ as default
17
- };
@@ -1,22 +0,0 @@
1
- import { defineComponent as m, ref as i, computed as e } from "vue";
2
- import a from "../../../../static/assets/inbox-mockup.svg.js";
3
- import c from "../../../../static/assets/phone-mockup.svg.js";
4
- import s from "./ContentView.vue.js";
5
- import u from "./InboxView.vue.js";
6
- const w = /* @__PURE__ */ m({
7
- __name: "MobilePreview",
8
- setup(f) {
9
- const o = i(!1), n = e(() => ({
10
- image: o.value ? a : c,
11
- alt: o.value ? "Inbox mockup" : "Phone mockup"
12
- })), r = () => {
13
- o.value = !1;
14
- }, t = () => {
15
- o.value = !0;
16
- }, p = e(() => o.value ? "88px" : "44px");
17
- return { __sfc: !0, showInbox: o, mockup: n, openEmail: r, backToInbox: t, phoneScreenTopMargin: p, ContentView: s, InboxView: u };
18
- }
19
- });
20
- export {
21
- w as default
22
- };
@@ -1,76 +0,0 @@
1
- interface FooterButtonGroup {
2
- primaryButton?: {
3
- type: string;
4
- labelText: string;
5
- disabledStatus?: boolean;
6
- };
7
- cancelOrBackButton?: {
8
- type: string;
9
- labelText: string;
10
- styling: string;
11
- };
12
- }
13
- type __VLS_Props = {
14
- id: string;
15
- title: string;
16
- description?: string;
17
- size?: 'small' | 'medium' | 'large';
18
- footerButtonOptions?: FooterButtonGroup;
19
- closeButtonStatus?: boolean;
20
- closeOnOutsideClick?: boolean;
21
- footerStatus?: boolean;
22
- };
23
- declare var __VLS_13: {};
24
- type __VLS_Slots = {} & {
25
- default?: (props: typeof __VLS_13) => any;
26
- };
27
- declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
28
- description: string;
29
- size: string;
30
- footerButtonOptions: undefined;
31
- closeButtonStatus: boolean;
32
- closeOnOutsideClick: boolean;
33
- footerStatus: boolean;
34
- }>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
35
- close: () => void;
36
- "primary-action": () => void;
37
- "secondary-action": () => void;
38
- }, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<__VLS_Props>, {
39
- description: string;
40
- size: string;
41
- footerButtonOptions: undefined;
42
- closeButtonStatus: boolean;
43
- closeOnOutsideClick: boolean;
44
- footerStatus: boolean;
45
- }>>>, {
46
- size: "small" | "medium" | "large";
47
- description: string;
48
- footerButtonOptions: FooterButtonGroup;
49
- closeButtonStatus: boolean;
50
- closeOnOutsideClick: boolean;
51
- footerStatus: boolean;
52
- }>;
53
- declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
54
- export default _default;
55
- type __VLS_WithDefaults<P, D> = {
56
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
57
- default: D[K];
58
- }> : P[K];
59
- };
60
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
61
- type __VLS_TypePropsToOption<T> = {
62
- [K in keyof T]-?: {} extends Pick<T, K> ? {
63
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
64
- } : {
65
- type: import('vue').PropType<T[K]>;
66
- required: true;
67
- };
68
- };
69
- type __VLS_WithSlots<T, S> = T & {
70
- new (): {
71
- $scopedSlots: S;
72
- };
73
- };
74
- type __VLS_PrettifyLocal<T> = {
75
- [K in keyof T]: T[K];
76
- } & {};
@@ -1,27 +0,0 @@
1
- import r from "./WpModal.vue2.js";
2
- import s from "../../_virtual/_plugin-vue2_normalizer.js";
3
- var i = function() {
4
- var t = this, o = t._self._c, e = t._self._setupProxy;
5
- return o(e.InModalV2, { attrs: { id: t.id, "description-status": "", status: "", "close-button-status": t.closeButtonStatus, "close-on-outside-click": t.closeOnOutsideClick, "description-text": t.description, "footer-button-group-options": t.footerButtonOptions, "footer-status": t.footerStatus, size: t.size, "title-text": t.title }, on: { cancelOrBackButtonEvent: function(n) {
6
- return e.emit("close");
7
- }, onCloseEvent: function(n) {
8
- return e.emit("close");
9
- }, primaryButtonEvent: function(n) {
10
- return e.emit("primary-action");
11
- }, secondaryButtonEvent: function(n) {
12
- return e.emit("secondary-action");
13
- } }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
14
- return [t._t("default")];
15
- }, proxy: !0 }], null, !0) });
16
- }, u = [], c = /* @__PURE__ */ s(
17
- r,
18
- i,
19
- u,
20
- !1,
21
- null,
22
- null
23
- );
24
- const p = c.exports;
25
- export {
26
- p as default
27
- };
@@ -1,22 +0,0 @@
1
- import { defineComponent as e } from "vue";
2
- import { InModalV2 as o } from "@useinsider/design-system-vue";
3
- const u = /* @__PURE__ */ e({
4
- __name: "WpModal",
5
- props: {
6
- id: null,
7
- title: null,
8
- description: { default: "" },
9
- size: { default: "small" },
10
- footerButtonOptions: { default: void 0 },
11
- closeButtonStatus: { type: Boolean, default: !0 },
12
- closeOnOutsideClick: { type: Boolean, default: !0 },
13
- footerStatus: { type: Boolean, default: !0 }
14
- },
15
- emits: ["close", "primary-action", "secondary-action"],
16
- setup(l, { emit: t }) {
17
- return { __sfc: !0, emit: t, InModalV2: o };
18
- }
19
- });
20
- export {
21
- u as default
22
- };
@@ -1,4 +0,0 @@
1
- export declare const useCodeEditorApi: () => {
2
- openCodeEditor: () => void;
3
- closeCodeEditor: () => void;
4
- };
@@ -1,11 +0,0 @@
1
- const i = () => ({
2
- openCodeEditor: () => {
3
- window.StripoEditorApi.codeEditorApi.openCodeEditor();
4
- },
5
- closeCodeEditor: () => {
6
- window.StripoEditorApi.codeEditorApi.closeCodeEditor();
7
- }
8
- });
9
- export {
10
- i as useCodeEditorApi
11
- };
@@ -1,4 +0,0 @@
1
- import type { GuidoConfig } from '@@/Types/generic';
2
- export declare const useConfig: () => {
3
- config: GuidoConfig;
4
- };
@@ -1,7 +0,0 @@
1
- import { DefaultGuidoConfig as o } from "../enums/defaults.js";
2
- const t = () => ({
3
- config: typeof window > "u" ? o : window.GuidoConfig || o
4
- });
5
- export {
6
- t as useConfig
7
- };
@@ -1,46 +0,0 @@
1
- import type { Template } from '@@/Types/stripo';
2
- import type { InjectionKey } from 'vue';
3
- export type BackHandler = () => void;
4
- export type SaveStartHandler = () => void;
5
- export type SaveCompleteHandler = (template: Omit<Template, 'forceRecreate'>) => void;
6
- export declare const BACK_KEY: InjectionKey<BackHandler>;
7
- export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
8
- export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
9
- /**
10
- * Provides Guido action handlers to child components
11
- */
12
- export declare const provideGuidoActions: (actions: {
13
- onBack: BackHandler;
14
- onSaveStart: SaveStartHandler;
15
- onSaveComplete: SaveCompleteHandler;
16
- }) => void;
17
- /**
18
- * Provides individual Guido action handlers
19
- */
20
- export declare const provideBackHandler: (handler: BackHandler) => void;
21
- export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
22
- export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler) => void;
23
- /**
24
- * Hook to use the back navigation handler
25
- * @returns Back navigation function
26
- */
27
- export declare const useBack: () => BackHandler;
28
- /**
29
- * Hook to use the save start handler
30
- * @returns Save start function
31
- */
32
- export declare const useSaveStart: () => SaveStartHandler;
33
- /**
34
- * Hook to use the save complete handler
35
- * @returns Save complete function
36
- */
37
- export declare const useSaveComplete: () => SaveCompleteHandler;
38
- /**
39
- * Convenience hook to get all Guido actions
40
- * @returns Object containing all action handlers
41
- */
42
- export declare const useGuidoActions: () => {
43
- back: BackHandler;
44
- saveStart: SaveStartHandler;
45
- saveComplete: SaveCompleteHandler;
46
- };
@@ -1,37 +0,0 @@
1
- import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
2
- const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
3
- o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
4
- }, u = () => {
5
- try {
6
- return t(r);
7
- } catch {
8
- throw new Error(
9
- "useBack: No back handler provided. Make sure Guido component is in the component tree."
10
- );
11
- }
12
- }, d = () => {
13
- try {
14
- return t(n);
15
- } catch {
16
- throw new Error(
17
- "useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
18
- );
19
- }
20
- }, i = () => {
21
- try {
22
- return t(a);
23
- } catch {
24
- throw new Error(
25
- "useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
26
- );
27
- }
28
- };
29
- export {
30
- r as BACK_KEY,
31
- a as SAVE_COMPLETE_KEY,
32
- n as SAVE_START_KEY,
33
- s as provideGuidoActions,
34
- u as useBack,
35
- i as useSaveComplete,
36
- d as useSaveStart
37
- };
@@ -1,14 +0,0 @@
1
- import { type InjectionKey } from 'vue';
2
- /**
3
- * Provides a value using Vue's provide/inject system
4
- * @param key - The injection key
5
- * @param value - The value to provide
6
- */
7
- export declare const provideValue: <T>(key: InjectionKey<T>, value: T) => void;
8
- /**
9
- * Injects a value using Vue's provide/inject system
10
- * @param key - The injection key
11
- * @param defaultValue - Optional default value if injection fails
12
- * @returns The injected value
13
- */
14
- export declare const useInjectedValue: <T>(key: InjectionKey<T>, defaultValue?: T) => T;
@@ -1,17 +0,0 @@
1
- import { provide as t, inject as i } from "vue";
2
- const d = (e, o) => {
3
- t(e, o);
4
- }, s = (e, o) => {
5
- const r = i(e, o);
6
- if (r === void 0 && o === void 0) {
7
- const n = e.description || String(e);
8
- throw new Error(
9
- `useInjectedValue: No provider found for key "${n}". Make sure a parent component provides this value.`
10
- );
11
- }
12
- return r;
13
- };
14
- export {
15
- d as provideValue,
16
- s as useInjectedValue
17
- };
@@ -1,5 +0,0 @@
1
- export declare const useResponsivePreview: () => {
2
- setupResponsivePreview: (iframe: HTMLIFrameElement) => void;
3
- tearDownEmailResponsiveFit: (iframe: HTMLIFrameElement) => void;
4
- hasResponsiveMetaViewport: (doc: Document) => boolean;
5
- };
@@ -1,86 +0,0 @@
1
- import { useDebounce as p } from "./useDebounce.js";
2
- import { ResponsivePreviewRegex as c, ResponsivePreviewSelectors as v, ResponsivePreviewConfig as a } from "../enums/preview.js";
3
- let i = null, l = null;
4
- const { debounce: y } = p(), h = (t) => {
5
- if (!t)
6
- return null;
7
- const e = t.match(c.TABLE_WIDTH);
8
- if (!e)
9
- return null;
10
- const n = Number(e[1]);
11
- return Number.isNaN(n) ? null : n;
12
- }, w = (t) => Array.from(t.querySelectorAll("table[width]")).reduce((e, n) => {
13
- const o = h(n.getAttribute("width"));
14
- return o && o > e ? o : e;
15
- }, 0), f = (t) => Array.from(t.querySelectorAll('[style*="width"]')).reduce((e, n) => {
16
- const r = (n.getAttribute("style") || "").match(c.INLINE_WIDTH);
17
- if (!r)
18
- return e;
19
- const s = Number(r[1]);
20
- return !Number.isNaN(s) && s > e ? s : e;
21
- }, 0), W = (t) => v.CONTAINERS.reduce((e, n) => {
22
- const o = t.querySelector(n);
23
- if (!o)
24
- return e;
25
- const r = Math.max(o.offsetWidth, o.scrollWidth);
26
- return r > e ? r : e;
27
- }, 0), E = (t) => {
28
- const e = {
29
- maxTableWidth: w(t),
30
- maxInlineWidth: f(t),
31
- maxContainerWidth: W(t)
32
- }, { maxTableWidth: n, maxInlineWidth: o, maxContainerWidth: r } = e;
33
- return Math.max(n, o, r) || a.DEFAULT_WIDTH;
34
- }, b = (t) => {
35
- const { documentElement: e, body: n } = t;
36
- e.style.setProperty("overflow-x", "visible", "important"), n.style.setProperty("visibility", "visible", "important");
37
- }, g = (t) => {
38
- const { documentElement: e, body: n } = t;
39
- e.style.removeProperty("transform"), e.style.removeProperty("transform-origin"), e.style.removeProperty("height"), n.style.removeProperty("overflow-x");
40
- }, S = (t) => {
41
- const { targetWidth: e, deviceWidth: n, minScale: o, maxScale: r } = t, s = n / e;
42
- return Math.min(Math.max(s, o), r);
43
- }, P = (t, e) => {
44
- const n = E(t), o = S({
45
- targetWidth: n,
46
- deviceWidth: e,
47
- minScale: a.MIN_SCALE,
48
- maxScale: 1
49
- }), { documentElement: r, body: s } = t;
50
- r.style.setProperty("height", "100%", "important"), r.style.setProperty("transform", `scale(${o})`, "important"), r.style.setProperty("transform-origin", "top left", "important"), s.style.setProperty("overflow-x", "hidden", "important");
51
- }, u = (t) => {
52
- const e = t.querySelector('meta[name="viewport"]');
53
- if (!e)
54
- return !1;
55
- const n = e.getAttribute("content") || "";
56
- return c.META_VIEWPORT.test(n);
57
- }, R = (t) => t.clientWidth || t.getBoundingClientRect().width || 375, d = (t) => {
58
- const e = t.contentWindow;
59
- l && e && e.removeEventListener("resize", l), i && window.removeEventListener("resize", i), l = null, i = null;
60
- }, x = (t, e) => {
61
- const n = t.contentWindow;
62
- if (!n)
63
- return;
64
- d(t);
65
- const o = () => y(e, a.RESIZE_DEBOUNCE_MS);
66
- l = o, n.addEventListener("resize", l), i = o, window.addEventListener("resize", i);
67
- }, M = () => ({
68
- setupResponsivePreview: (n) => {
69
- const o = n.contentDocument, r = n.contentWindow;
70
- if (!o || !r)
71
- return;
72
- b(o);
73
- const s = () => {
74
- const m = R(n);
75
- u(o) ? g(o) : P(o, m);
76
- };
77
- s(), x(n, s);
78
- },
79
- tearDownEmailResponsiveFit: (n) => {
80
- d(n);
81
- },
82
- hasResponsiveMetaViewport: u
83
- });
84
- export {
85
- M as useResponsivePreview
86
- };
@@ -1,13 +0,0 @@
1
- export declare const ResponsivePreviewConfig: {
2
- DEFAULT_WIDTH: number;
3
- MIN_SCALE: number;
4
- RESIZE_DEBOUNCE_MS: number;
5
- };
6
- export declare const ResponsivePreviewRegex: {
7
- INLINE_WIDTH: RegExp;
8
- TABLE_WIDTH: RegExp;
9
- META_VIEWPORT: RegExp;
10
- };
11
- export declare const ResponsivePreviewSelectors: {
12
- CONTAINERS: string[];
13
- };