@useinsider/guido 1.0.0-beta.a09b7c4 → 1.0.0-beta.a0d6eee

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 (191) hide show
  1. package/README.md +386 -21
  2. package/dist/@types/generic.d.ts +23 -0
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/_virtual/AddCustomFont.js +4 -0
  5. package/dist/_virtual/AiAssistantValueType.js +4 -0
  6. package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
  7. package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
  8. package/dist/_virtual/Block.js +4 -0
  9. package/dist/_virtual/BlockAttributes.js +4 -0
  10. package/dist/_virtual/BlockCompositionType.js +4 -0
  11. package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
  12. package/dist/_virtual/BlockRenderer.js +4 -0
  13. package/dist/_virtual/BlockType.js +4 -0
  14. package/dist/_virtual/BlocksPanel.js +4 -0
  15. package/dist/_virtual/BuiltInControl.js +4 -0
  16. package/dist/_virtual/BuiltInControlTypes.js +4 -0
  17. package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
  18. package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
  19. package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
  20. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
  21. package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
  22. package/dist/_virtual/ContextAction.js +4 -0
  23. package/dist/_virtual/ContextActionType.js +4 -0
  24. package/dist/_virtual/Control.js +4 -0
  25. package/dist/_virtual/EditorStatePropertyType.js +4 -0
  26. package/dist/_virtual/Extension.js +4 -0
  27. package/dist/_virtual/ExtensionBuilder.js +4 -0
  28. package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
  29. package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
  30. package/dist/_virtual/ModificationDescription.js +4 -0
  31. package/dist/_virtual/PanelPosition.js +4 -0
  32. package/dist/_virtual/PreviewDeviceMode.js +4 -0
  33. package/dist/_virtual/SettingsPanelRegistry.js +4 -0
  34. package/dist/_virtual/SettingsPanelTab.js +4 -0
  35. package/dist/_virtual/SettingsTab.js +4 -0
  36. package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
  37. package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
  38. package/dist/_virtual/TextColorBuiltInControl.js +4 -0
  39. package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
  40. package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
  41. package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
  42. package/dist/_virtual/UIElement.js +4 -0
  43. package/dist/_virtual/UIElementTagRegistry.js +4 -0
  44. package/dist/_virtual/UIElementType.js +4 -0
  45. package/dist/_virtual/UIElementsAttributes.js +4 -0
  46. package/dist/_virtual/index.js +5 -0
  47. package/dist/_virtual/index2.js +4 -0
  48. package/dist/components/Guido.vue.d.ts +20 -3
  49. package/dist/components/Guido.vue.js +8 -8
  50. package/dist/components/Guido.vue2.js +75 -27
  51. package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
  52. package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
  53. package/dist/components/organisms/header/LeftSlot.vue2.js +10 -6
  54. package/dist/components/organisms/header/MiddleSlot.vue.js +8 -8
  55. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -15
  56. package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
  57. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  58. package/dist/components/organisms/header/RightSlot.vue2.js +30 -14
  59. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  60. package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
  61. package/dist/components/organisms/header/ViewOptions.vue2.js +34 -0
  62. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
  63. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
  64. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
  65. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
  66. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  67. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
  68. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  69. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  70. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  71. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
  72. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +41 -0
  73. package/dist/composables/useActionsApi.d.ts +1 -0
  74. package/dist/composables/useActionsApi.js +14 -12
  75. package/dist/composables/useCustomInterfaceAppearance.js +45 -9
  76. package/dist/composables/useExport.d.ts +1 -1
  77. package/dist/composables/useExport.js +35 -20
  78. package/dist/composables/useGuidoActions.d.ts +46 -0
  79. package/dist/composables/useGuidoActions.js +37 -0
  80. package/dist/composables/useHtmlCompiler.d.ts +4 -0
  81. package/dist/composables/useHtmlCompiler.js +16 -0
  82. package/dist/composables/useProvideInject.d.ts +14 -0
  83. package/dist/composables/useProvideInject.js +17 -0
  84. package/dist/composables/useStripo.js +53 -30
  85. package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
  86. package/dist/config/compiler/htmlCompilerRules.js +145 -0
  87. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  88. package/dist/enums/displayConditions.d.ts +2 -0
  89. package/dist/enums/displayConditions.js +80 -0
  90. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  91. package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
  92. package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
  93. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  94. package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
  95. package/dist/extensions/DynamicContent/extension.d.ts +2 -0
  96. package/dist/extensions/DynamicContent/extension.js +11 -0
  97. package/dist/guido.css +1 -1
  98. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
  99. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
  100. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
  101. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
  102. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
  103. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
  104. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
  105. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
  106. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
  107. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
  108. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
  109. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
  110. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
  111. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
  112. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
  113. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
  114. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
  115. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
  116. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
  117. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
  118. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
  119. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
  120. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
  121. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
  122. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
  123. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
  124. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
  125. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
  126. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
  127. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
  128. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
  129. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
  130. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
  131. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
  132. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
  133. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
  134. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
  135. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
  136. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
  137. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
  138. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
  139. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
  140. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
  141. package/dist/services/stripoApi.d.ts +2 -1
  142. package/dist/services/stripoApi.js +27 -7
  143. package/dist/static/styles/base.css.js +11 -0
  144. package/dist/static/styles/components/alert-message.css.js +39 -0
  145. package/dist/static/styles/components/amp-block.css.js +18 -0
  146. package/dist/static/styles/components/base-input.css.js +47 -0
  147. package/dist/static/styles/components/button-group.css.js +54 -0
  148. package/dist/static/styles/components/button.css.js +106 -0
  149. package/dist/static/styles/components/combobox.css.js +49 -0
  150. package/dist/static/styles/components/counter.css.js +42 -0
  151. package/dist/static/styles/components/dropdown-menu.css.js +52 -0
  152. package/dist/static/styles/components/narrow-panel.css.js +38 -0
  153. package/dist/static/styles/components/switcher.css.js +11 -0
  154. package/dist/static/styles/components/tabs.css.js +97 -0
  155. package/dist/static/styles/components/tools.css.js +23 -0
  156. package/dist/static/styles/components/version-history.css.js +30 -0
  157. package/dist/static/styles/components/wide-panel.css.js +135 -0
  158. package/dist/static/styles/variables.css.js +23 -0
  159. package/dist/stores/dynamic-content.d.ts +27 -0
  160. package/dist/stores/dynamic-content.js +23 -0
  161. package/dist/stores/editor.d.ts +1 -1
  162. package/dist/stores/editor.js +4 -4
  163. package/dist/utils/arrayUtil.d.ts +1 -0
  164. package/dist/utils/arrayUtil.js +10 -0
  165. package/dist/utils/genericUtil.d.ts +2 -0
  166. package/dist/utils/genericUtil.js +7 -0
  167. package/dist/utils/htmlCompiler.d.ts +12 -0
  168. package/dist/utils/htmlCompiler.js +70 -0
  169. package/dist/utils/tooltipUtils.d.ts +2 -0
  170. package/dist/utils/tooltipUtils.js +11 -0
  171. package/package.json +6 -5
  172. package/dist/components/organisms/base/ModalWrapper.vue.d.ts +0 -72
  173. package/dist/components/organisms/base/ModalWrapper.vue.js +0 -19
  174. package/dist/components/organisms/base/ModalWrapper.vue2.js +0 -43
  175. package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
  176. package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -22
  177. package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -86
  178. package/dist/composables/useSaveAsTemplate.d.ts +0 -17
  179. package/dist/composables/useSaveAsTemplate.js +0 -44
  180. package/dist/composables/useTemplateCategories.d.ts +0 -35
  181. package/dist/composables/useTemplateCategories.js +0 -78
  182. package/dist/composables/useTemplateNameValidation.d.ts +0 -13
  183. package/dist/composables/useTemplateNameValidation.js +0 -57
  184. package/dist/composables/useTemplates.d.ts +0 -5
  185. package/dist/composables/useTemplates.js +0 -27
  186. package/dist/static/editor.css.js +0 -232
  187. package/dist/static/templates/default/index.html.js +0 -5
  188. package/dist/static/templates/default/style.css.js +0 -119
  189. package/dist/utils/base64.d.ts +0 -1
  190. package/dist/utils/base64.js +0 -14
  191. /package/dist/mock/api/{template-library.d.ts → default-template.d.ts} +0 -0
@@ -2,21 +2,21 @@ import o from "./VersionHistory.vue2.js";
2
2
  /* empty css */
3
3
  import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
4
  var n = function() {
5
- var r = this, e = r._self._c, t = r._self._setupProxy;
6
- return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-2" }, [e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(s) {
5
+ var s = this, e = s._self._c, t = s._self._setupProxy;
6
+ return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-3" }, [t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }) : s._e(), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(r) {
7
7
  return t.previewVersion(t.versionHistoryStore.previousPatch.id);
8
- } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(s) {
8
+ } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(r) {
9
9
  return t.previewVersion(t.versionHistoryStore.nextPatch.id);
10
- } } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
10
+ } } })], 1), t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } }) : s._e()], 1);
11
11
  }, a = [], c = /* @__PURE__ */ i(
12
12
  o,
13
13
  n,
14
14
  a,
15
15
  !1,
16
16
  null,
17
- "187d41fa"
17
+ "52a77eec"
18
18
  );
19
- const p = c.exports;
19
+ const _ = c.exports;
20
20
  export {
21
- p as default
21
+ _ as default
22
22
  };
@@ -1,15 +1,18 @@
1
- import { defineComponent as t } from "vue";
2
- import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
- import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
- import { InButtonV2 as i } from "@useinsider/design-system-vue";
5
- import n from "./VersionHistoryItem.vue.js";
6
- const c = /* @__PURE__ */ t({
1
+ import { defineComponent as i } from "vue";
2
+ import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as m } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as p } from "@useinsider/design-system-vue";
5
+ import f from "./VersionHistoryItem.vue.js";
6
+ const _ = /* @__PURE__ */ i({
7
7
  __name: "VersionHistory",
8
- setup(m) {
9
- const o = s(), { previewVersion: r } = e();
10
- return { __sfc: !0, versionHistoryStore: o, previewVersion: r, InButtonV2: i, VersionHistoryItem: n };
8
+ props: {
9
+ itemStatus: { type: Boolean }
10
+ },
11
+ setup(t) {
12
+ const o = t, r = m(), { previewVersion: e } = n(), { itemStatus: s = !1 } = o;
13
+ return { __sfc: !0, versionHistoryStore: r, previewVersion: e, props: o, itemStatus: s, InButtonV2: p, VersionHistoryItem: f };
11
14
  }
12
15
  });
13
16
  export {
14
- c as default
17
+ _ as default
15
18
  };
@@ -3,7 +3,7 @@ type __VLS_Props = {
3
3
  date: number;
4
4
  textAlign: string;
5
5
  };
6
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
7
7
  export default _default;
8
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
9
  type __VLS_TypePropsToOption<T> = {
@@ -10,7 +10,7 @@ var i = function() {
10
10
  a,
11
11
  !1,
12
12
  null,
13
- "0e2ff42d"
13
+ "ee4b9c3f"
14
14
  );
15
15
  const d = n.exports;
16
16
  export {
@@ -1,2 +1,2 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
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
2
  export default _default;
@@ -0,0 +1,18 @@
1
+ import s from "./ViewOptions.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var r = function() {
5
+ var t = this, o = t._self._c, e = t._self._setupProxy;
6
+ return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
7
+ }, n = [], _ = /* @__PURE__ */ i(
8
+ s,
9
+ r,
10
+ n,
11
+ !1,
12
+ null,
13
+ "421ffc13"
14
+ );
15
+ const f = _.exports;
16
+ export {
17
+ f as default
18
+ };
@@ -0,0 +1,41 @@
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({
8
+ __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();
33
+ return;
34
+ }
35
+ e();
36
+ }, InSegments: c };
37
+ }
38
+ });
39
+ export {
40
+ h as default
41
+ };
@@ -1,4 +1,5 @@
1
1
  import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
2
2
  export declare const useActionsApi: () => {
3
3
  getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
4
+ activateCustomViewStyles: (isActive?: boolean) => void;
4
5
  };
@@ -1,5 +1,5 @@
1
- const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
2
- const m = { ...{
1
+ const g = () => ({ getCompiledEmail: (t = {}) => new Promise((i, a) => {
2
+ const s = { ...{
3
3
  minimize: !0,
4
4
  utmEntity: {
5
5
  utmSource: "",
@@ -18,19 +18,21 @@ const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
18
18
  forseAmp: !1,
19
19
  resetDataSavedFlag: !1,
20
20
  disableLineHeightsReplace: !0
21
- }, ...t }, s = {
22
- callback: (e, l, n, o, c) => {
23
- e ? i(e) : a({
24
- html: l,
25
- ampHtml: n,
26
- ampErrors: o,
21
+ }, ...t }, o = {
22
+ callback: (e, m, l, n, c) => {
23
+ e ? a(e) : i({
24
+ html: m,
25
+ ampHtml: l,
26
+ ampErrors: n,
27
27
  displayConditions: c
28
28
  });
29
29
  },
30
- ...m
30
+ ...s
31
31
  };
32
- window.StripoEditorApi.actionsApi.compileEmail(s);
33
- }) });
32
+ window.StripoEditorApi.actionsApi.compileEmail(o);
33
+ }), activateCustomViewStyles: (t = !0) => {
34
+ window.StripoEditorApi.actionsApi.activateCustomViewStyles(t);
35
+ } });
34
36
  export {
35
- d as useActionsApi
37
+ g as useActionsApi
36
38
  };
@@ -1,13 +1,49 @@
1
- import r from "../static/editor.css.js";
2
- const c = () => ({ importCss: () => {
3
- const e = new CSSStyleSheet();
4
- e.replaceSync(r);
5
- const t = document.querySelector("ui-editor");
6
- if (!t)
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 o = t.shadowRoot;
9
- o && (o.adoptedStyleSheets = [e]);
44
+ const t = r.shadowRoot;
45
+ t && (t.adoptedStyleSheets = [o]);
10
46
  } });
11
47
  export {
12
- c as useCustomInterfaceAppearance
48
+ N as useCustomInterfaceAppearance
13
49
  };
@@ -1,3 +1,3 @@
1
1
  export declare const useExport: () => {
2
- exportHtml: () => Promise<void>;
2
+ exportHtml: (compile?: boolean) => Promise<void>;
3
3
  };
@@ -1,30 +1,45 @@
1
1
  import { useActionsApi as l } from "./useActionsApi.js";
2
- import { useToaster as m } from "./useToaster.js";
3
- const u = () => {
4
- const a = (r, t, e) => {
5
- const n = new Blob([r], { type: e }), s = URL.createObjectURL(n), o = document.createElement("a");
6
- o.href = s, o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(s);
7
- }, c = (r) => {
8
- const t = /* @__PURE__ */ new Date(), e = String(t.getDate()).padStart(2, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), s = t.getFullYear(), o = String(t.getHours()).padStart(2, "0"), i = String(t.getMinutes()).padStart(2, "0");
9
- return `${r}_${e}-${n}-${s}_${o}-${i}.html`;
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: r } = l(), { showToaster: t } = m();
12
+ return { exportHtml: async (s = !0) => {
13
+ const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
13
14
  try {
14
- const { html: e } = await r();
15
- e ? a(e, c("HTML"), "text/html") : t({
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: "No HTML content to download"
18
- });
19
- } catch (e) {
20
- const n = e instanceof Error ? e.message : String(e);
21
- t({
22
- type: "error",
23
- message: `Error compiling email: ${n}`
38
+ message: `Error compiling email: ${e}`
24
39
  });
25
40
  }
26
41
  } };
27
42
  };
28
43
  export {
29
- u as useExport
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,4 @@
1
+ import type { CompilationResult } from '@@/Types/html-compiler';
2
+ export declare const useHtmlCompiler: () => {
3
+ compileHtml: (html: string) => CompilationResult;
4
+ };
@@ -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,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
+ };
@@ -1,74 +1,97 @@
1
- import { useCustomInterfaceAppearance as m } from "./useCustomInterfaceAppearance.js";
2
- import { useToaster as g } from "./useToaster.js";
3
- import { useStripoApi as E } from "../services/stripoApi.js";
4
- import { useEditorStore as S } from "../stores/editor.js";
5
- const _ = (c) => {
6
- const { handleError: d } = g(), { getToken: u, getCustomFonts: a } = E(), l = (e, i = []) => {
7
- const r = S(), { html: t, css: n } = e;
1
+ import { useActionsApi as g } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
+ import { useToaster as y } from "./useToaster.js";
4
+ import { displayConditions as C } from "../enums/displayConditions.js";
5
+ import E from "../extensions/DynamicContent/extension.js";
6
+ import { useStripoApi as S } from "../services/stripoApi.js";
7
+ import { useEditorStore as w } from "../stores/editor.js";
8
+ import { dynamicContentToMergeTags as b } from "../utils/genericUtil.js";
9
+ const M = (d) => {
10
+ const { handleError: c } = y(), { getToken: a, getCustomFonts: u } = S(), l = (e, r = []) => {
11
+ const i = w(), { html: t, css: s, forceRecreate: p } = e;
8
12
  window.UIEditor.initEditor(
9
13
  document.querySelector("#guido-editor"),
10
14
  {
11
- metadata: c,
15
+ metadata: d,
12
16
  html: t,
13
- css: n,
17
+ css: s,
18
+ forceRecreate: p,
14
19
  locale: "en",
15
20
  undoButtonSelector: "#guido__undo-button",
16
21
  redoButtonSelector: "#guido__redo-button",
17
22
  mobileViewButtonSelector: ".guido__view-option-selection-mobile",
18
23
  desktopViewButtonSelector: ".guido__view-option-selection-desktop",
19
24
  codeEditorButtonSelector: "#guido__code-button",
25
+ customAppearanceMergetags: !0,
26
+ customAppearanceMergetagsBorderColor: "#f1f3fe",
27
+ customAppearanceMergetagsBackgroundColor: "#f1f3fe",
28
+ customViewStyles: `
29
+ .esd-x, .esd-merge-tag {color: #0a2ecc !important; box-shadow: none !important;}
30
+ .esd-merge-tag {border: 1px solid #b5c1f1; border-radius: 4px !important;}
31
+ `,
32
+ conditionsEnabled: !0,
33
+ customConditionsEnabled: !0,
34
+ conditionCategories: C,
35
+ messageSettingsEnabled: !1,
20
36
  editorFonts: {
21
37
  showDefaultStandardFonts: !0,
22
38
  showDefaultNotStandardFonts: !0,
23
- customFonts: i
39
+ customFonts: r
24
40
  },
41
+ mergeTags: [
42
+ {
43
+ entries: b(d.preselectedDynamicContentList)
44
+ }
45
+ ],
25
46
  async onTokenRefreshRequest(o) {
26
47
  try {
27
- const s = await u();
28
- o(s);
29
- } catch (s) {
30
- d(s, "Failed to refresh token");
48
+ const n = await a();
49
+ o(n);
50
+ } catch (n) {
51
+ c(n, "Failed to refresh token");
31
52
  }
32
53
  },
33
54
  onTemplateLoaded() {
34
55
  try {
35
- const { importCss: o } = m();
36
- o();
56
+ const { importCss: o } = f(), { activateCustomViewStyles: n } = g();
57
+ o(), n();
37
58
  } catch (o) {
38
- d(o, "Failed to load custom interface appearance");
59
+ c(o, "Failed to load custom interface appearance");
39
60
  }
40
61
  },
41
62
  onCodeEditorVisibilityChanged(o) {
42
- r.isCodeEditorOpen = o;
63
+ i.isCodeEditorOpen = o;
43
64
  },
44
65
  onEditorVisualModeChanged(o) {
45
- r.editorVisualMode = o.toLowerCase();
66
+ i.editorVisualMode = o.toLowerCase();
46
67
  },
47
68
  onVersionHistoryVisibilityChanged(o) {
48
- r.isVersionHistoryOpen = o;
49
- }
69
+ i.isVersionHistoryOpen = o;
70
+ },
71
+ ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
72
+ extensions: [E]
50
73
  }
51
74
  );
52
- }, p = (e) => new Promise((i, r) => {
75
+ }, m = (e) => new Promise((r, i) => {
53
76
  if (document.getElementById("UiEditorScript")) {
54
- e(), i();
77
+ e(), r();
55
78
  return;
56
79
  }
57
80
  const t = document.createElement("script");
58
81
  t.id = "UiEditorScript", t.type = "module", t.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", t.onload = () => {
59
- e(), i();
82
+ e(), r();
60
83
  }, t.onerror = () => {
61
- const n = new Error("Failed to load Stripo UIEditor script");
62
- r(n);
84
+ const s = new Error("Failed to load Stripo UIEditor script");
85
+ i(s);
63
86
  }, document.body.appendChild(t);
64
87
  });
65
88
  return { initPlugin: async (e) => {
66
- await p(async () => {
67
- const i = await a();
68
- l(e, i);
89
+ await m(async () => {
90
+ const r = await u();
91
+ l(e, r);
69
92
  });
70
93
  } };
71
94
  };
72
95
  export {
73
- _ as useStripo
96
+ M as useStripo
74
97
  };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const defaultHtmlCompilerRules: CompilerRule[];