@useinsider/guido 1.0.0-beta.02a8faf → 1.0.0-beta.03871da
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +386 -21
- package/dist/@types/generic.d.ts +16 -9
- package/dist/App.vue.d.ts +1 -1
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +20 -3
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +78 -23
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/LeftSlot.vue2.js +10 -6
- package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
- package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -12
- package/dist/components/organisms/header/RightSlot.vue.js +7 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +29 -17
- package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +10 -8
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
- package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +3 -0
- package/dist/composables/useActionsApi.js +62 -34
- package/dist/composables/useApiExample.d.ts +6 -4
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +4 -0
- package/dist/composables/useConfig.js +7 -0
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useDebounce.d.ts +4 -0
- package/dist/composables/useDebounce.js +12 -0
- package/dist/composables/useExport.d.ts +1 -1
- package/dist/composables/useExport.js +35 -20
- package/dist/composables/useGuidoActions.d.ts +46 -0
- package/dist/composables/useGuidoActions.js +37 -0
- package/dist/composables/useHtmlCompiler.d.ts +4 -0
- package/dist/composables/useHtmlCompiler.js +16 -0
- package/dist/composables/usePreviewMode.d.ts +5 -0
- package/dist/composables/usePreviewMode.js +31 -0
- package/dist/composables/useProvideInject.d.ts +14 -0
- package/dist/composables/useProvideInject.js +17 -0
- package/dist/composables/useResponsivePreview.d.ts +5 -0
- package/dist/composables/useResponsivePreview.js +86 -0
- package/dist/composables/useStripo.js +53 -30
- package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
- package/dist/config/compiler/htmlCompilerRules.js +145 -0
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/enums/defaults.js +9 -5
- package/dist/enums/displayConditions.d.ts +2 -0
- package/dist/enums/displayConditions.js +80 -0
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
- package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
- package/dist/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/extensions/DynamicContent/extension.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/default-template.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
- package/dist/services/stripoApi.d.ts +2 -1
- package/dist/services/stripoApi.js +27 -7
- package/dist/static/assets/inbox-mockup.svg.js +4 -0
- package/dist/static/assets/phone-mockup.svg.js +4 -0
- package/dist/static/styles/base.css.js +11 -0
- package/dist/static/styles/components/alert-message.css.js +39 -0
- package/dist/static/styles/components/amp-block.css.js +18 -0
- package/dist/static/styles/components/base-input.css.js +47 -0
- package/dist/static/styles/components/button-group.css.js +54 -0
- package/dist/static/styles/components/button.css.js +106 -0
- package/dist/static/styles/components/combobox.css.js +49 -0
- package/dist/static/styles/components/counter.css.js +42 -0
- package/dist/static/styles/components/dropdown-menu.css.js +52 -0
- package/dist/static/styles/components/narrow-panel.css.js +38 -0
- package/dist/static/styles/components/switcher.css.js +11 -0
- package/dist/static/styles/components/tabs.css.js +97 -0
- package/dist/static/styles/components/tools.css.js +23 -0
- package/dist/static/styles/components/version-history.css.js +30 -0
- package/dist/static/styles/components/wide-panel.css.js +135 -0
- package/dist/static/styles/variables.css.js +23 -0
- package/dist/stores/dynamic-content.d.ts +27 -0
- package/dist/stores/dynamic-content.js +23 -0
- package/dist/stores/preview.d.ts +46 -0
- package/dist/stores/preview.js +53 -0
- package/dist/utils/arrayUtil.d.ts +1 -0
- package/dist/utils/arrayUtil.js +10 -0
- package/dist/utils/genericUtil.d.ts +2 -0
- package/dist/utils/genericUtil.js +7 -0
- package/dist/utils/htmlCompiler.d.ts +12 -0
- package/dist/utils/htmlCompiler.js +70 -0
- package/package.json +6 -5
- package/dist/composables/useTemplates.d.ts +0 -5
- package/dist/composables/useTemplates.js +0 -27
- package/dist/static/editor.css.js +0 -232
- package/dist/static/templates/default/index.html.js +0 -5
- package/dist/static/templates/default/style.css.js +0 -119
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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 +1,7 @@
|
|
|
1
|
+
import type { CompileEmailOptions } from '@@/Types/actions-api';
|
|
1
2
|
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
2
3
|
export declare const useActionsApi: () => {
|
|
3
4
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
|
+
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
6
|
+
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
4
7
|
};
|
|
@@ -1,36 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
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 = { ...{
|
|
5
|
+
minimize: !0,
|
|
6
|
+
utmEntity: {
|
|
7
|
+
utmSource: "",
|
|
8
|
+
utmMedium: "",
|
|
9
|
+
utmCampaign: "",
|
|
10
|
+
utmContent: "",
|
|
11
|
+
utmTerm: "",
|
|
12
|
+
customUtms: [
|
|
13
|
+
{
|
|
14
|
+
name1: "val1",
|
|
15
|
+
name2: "val2"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
mergeTags: ["Tag1", "Tag2"],
|
|
20
|
+
forseAmp: !1,
|
|
21
|
+
resetDataSavedFlag: !1,
|
|
22
|
+
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
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
...i
|
|
33
|
+
};
|
|
34
|
+
window.StripoEditorApi.actionsApi.compileEmail(n);
|
|
35
|
+
});
|
|
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
|
+
}
|
|
60
|
+
} };
|
|
61
|
+
};
|
|
34
62
|
export {
|
|
35
|
-
|
|
63
|
+
E as useActionsApi
|
|
36
64
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
interface User {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
}
|
|
5
6
|
export declare const useApiExample: () => {
|
|
6
7
|
loading: import("vue").ComputedRef<boolean>;
|
|
7
8
|
error: import("vue").ComputedRef<{
|
|
@@ -59,3 +60,4 @@ export declare const useApiExample: () => {
|
|
|
59
60
|
uploadFile: (file: File) => Promise<string>;
|
|
60
61
|
clearError: () => void;
|
|
61
62
|
};
|
|
63
|
+
export {};
|
|
@@ -1,13 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import S from "../static/styles/base.css.js";
|
|
2
|
+
import e from "../static/styles/components/alert-message.css.js";
|
|
3
|
+
import m from "../static/styles/components/amp-block.css.js";
|
|
4
|
+
import i from "../static/styles/components/base-input.css.js";
|
|
5
|
+
import p from "../static/styles/components/button-group.css.js";
|
|
6
|
+
import n from "../static/styles/components/button.css.js";
|
|
7
|
+
import s from "../static/styles/components/combobox.css.js";
|
|
8
|
+
import C from "../static/styles/components/counter.css.js";
|
|
9
|
+
import f from "../static/styles/components/dropdown-menu.css.js";
|
|
10
|
+
import a from "../static/styles/components/narrow-panel.css.js";
|
|
11
|
+
import u from "../static/styles/components/switcher.css.js";
|
|
12
|
+
import c from "../static/styles/components/tabs.css.js";
|
|
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,
|
|
19
|
+
// Must be on top
|
|
20
|
+
S,
|
|
21
|
+
// Must be on top
|
|
22
|
+
e,
|
|
23
|
+
m,
|
|
24
|
+
i,
|
|
25
|
+
p,
|
|
26
|
+
n,
|
|
27
|
+
s,
|
|
28
|
+
C,
|
|
29
|
+
f,
|
|
30
|
+
a,
|
|
31
|
+
u,
|
|
32
|
+
c,
|
|
33
|
+
d,
|
|
34
|
+
l,
|
|
35
|
+
h
|
|
36
|
+
].join(`
|
|
37
|
+
|
|
38
|
+
`), N = () => ({ importCss: () => {
|
|
39
|
+
const o = new CSSStyleSheet();
|
|
40
|
+
o.replaceSync(y);
|
|
41
|
+
const r = document.querySelector("ui-editor");
|
|
42
|
+
if (!r)
|
|
7
43
|
return;
|
|
8
|
-
const
|
|
9
|
-
|
|
44
|
+
const t = r.shadowRoot;
|
|
45
|
+
t && (t.adoptedStyleSheets = [o]);
|
|
10
46
|
} });
|
|
11
47
|
export {
|
|
12
|
-
|
|
48
|
+
N as useCustomInterfaceAppearance
|
|
13
49
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ref as c } from "vue";
|
|
2
|
+
const r = () => {
|
|
3
|
+
const e = c(void 0);
|
|
4
|
+
return { debounce: (o, u = 150) => {
|
|
5
|
+
e.value && window.clearTimeout(e.value), e.value = window.setTimeout(o, u);
|
|
6
|
+
}, clearDebounce: () => {
|
|
7
|
+
e.value && (window.clearTimeout(e.value), e.value = void 0);
|
|
8
|
+
} };
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
r as useDebounce
|
|
12
|
+
};
|
|
@@ -1,30 +1,45 @@
|
|
|
1
1
|
import { useActionsApi as l } from "./useActionsApi.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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`;
|
|
10
11
|
};
|
|
11
|
-
return { exportHtml: async () => {
|
|
12
|
-
const { getCompiledEmail:
|
|
12
|
+
return { exportHtml: async (s = !0) => {
|
|
13
|
+
const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
|
|
13
14
|
try {
|
|
14
|
-
const { html:
|
|
15
|
-
|
|
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({
|
|
16
37
|
type: "error",
|
|
17
|
-
message:
|
|
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}`
|
|
38
|
+
message: `Error compiling email: ${e}`
|
|
24
39
|
});
|
|
25
40
|
}
|
|
26
41
|
} };
|
|
27
42
|
};
|
|
28
43
|
export {
|
|
29
|
-
|
|
44
|
+
h as useExport
|
|
30
45
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defaultHtmlCompilerRules as r } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
+
import { createHtmlCompiler as p } from "../utils/htmlCompiler.js";
|
|
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) => ({
|
|
7
|
+
...o,
|
|
8
|
+
priority: o.priority + 1e3 + m
|
|
9
|
+
// Ensure additional rules run after default rules
|
|
10
|
+
}))
|
|
11
|
+
], i = p(t);
|
|
12
|
+
return { compileHtml: (o) => i.compile(o) };
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
a as useHtmlCompiler
|
|
16
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEditorStore as n } from "../stores/editor.js";
|
|
2
|
+
import { usePreviewStore as m } from "../stores/preview.js";
|
|
3
|
+
import { useActionsApi as p } from "./useActionsApi.js";
|
|
4
|
+
import { useCodeEditorApi as l } from "./useCodeEditorApi.js";
|
|
5
|
+
const E = () => {
|
|
6
|
+
const i = n(), e = m(), { closeCodeEditor: s } = l(), { getPreviewData: a } = p(), r = () => {
|
|
7
|
+
e.isPreviewModeOpen = !1, e.$reset();
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
closePreviewMode: r,
|
|
11
|
+
openPreviewMode: () => {
|
|
12
|
+
i.isCodeEditorOpen && s(), e.isPreviewModeOpen = !0;
|
|
13
|
+
},
|
|
14
|
+
loadPreviewData: async () => {
|
|
15
|
+
if (!(e.isLoading || e.isLoaded)) {
|
|
16
|
+
e.isLoading = !0;
|
|
17
|
+
try {
|
|
18
|
+
const { html: o, ampHtml: t, ampErrors: d } = await a();
|
|
19
|
+
e.templateHtml = o || "", e.ampHtml = t || "", e.ampErrors = d || [], e.setEmailFormat(t ? "AMP" : "html"), e.isLoaded = !0;
|
|
20
|
+
} catch (o) {
|
|
21
|
+
console.error("Failed to load preview data:", o), r();
|
|
22
|
+
} finally {
|
|
23
|
+
e.isLoading = !1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
E as usePreviewMode
|
|
31
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
};
|