@useinsider/guido 1.0.0-beta.de03990 → 1.0.0-beta.df613dd

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 (290) hide show
  1. package/README.md +21 -410
  2. package/dist/@types/generic.d.ts +0 -35
  3. package/dist/App.vue.d.ts +1 -1
  4. package/dist/components/Guido.vue.d.ts +3 -20
  5. package/dist/components/Guido.vue.js +8 -8
  6. package/dist/components/Guido.vue2.js +25 -79
  7. package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
  8. package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +6 -10
  10. package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
  11. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
  12. package/dist/components/organisms/header/RightSlot.vue.js +14 -12
  13. package/dist/components/organisms/header/RightSlot.vue2.js +17 -32
  14. package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
  15. package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
  16. package/dist/components/organisms/header/ViewOptions.vue2.js +10 -30
  17. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
  20. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
  21. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
  22. package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
  23. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  24. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
  25. package/dist/composables/useActionsApi.d.ts +0 -3
  26. package/dist/composables/useActionsApi.js +34 -62
  27. package/dist/composables/useCustomInterfaceAppearance.js +9 -45
  28. package/dist/composables/useExport.d.ts +1 -1
  29. package/dist/composables/useExport.js +22 -37
  30. package/dist/composables/useStripo.js +30 -53
  31. package/dist/composables/useTemplates.d.ts +5 -0
  32. package/dist/composables/useTemplates.js +27 -0
  33. package/dist/composables/useToaster.d.ts +16 -1
  34. package/dist/composables/useToaster.js +30 -23
  35. package/dist/composables/useTranslations.js +2 -3
  36. package/dist/composables/useVersionHistoryApi.js +4 -4
  37. package/dist/enums/defaults.js +5 -14
  38. package/dist/guido.css +1 -1
  39. package/dist/services/stripoApi.d.ts +1 -2
  40. package/dist/services/stripoApi.js +7 -27
  41. package/dist/static/editor.css.js +232 -0
  42. package/dist/static/templates/default/index.html.js +5 -0
  43. package/dist/static/templates/default/style.css.js +119 -0
  44. package/dist/stores/editor.d.ts +0 -1
  45. package/dist/stores/editor.js +2 -3
  46. package/package.json +5 -6
  47. package/dist/_virtual/AddCustomFont.js +0 -4
  48. package/dist/_virtual/AiAssistantValueType.js +0 -4
  49. package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
  50. package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
  51. package/dist/_virtual/Block.js +0 -4
  52. package/dist/_virtual/BlockAttributes.js +0 -4
  53. package/dist/_virtual/BlockCompositionType.js +0 -4
  54. package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
  55. package/dist/_virtual/BlockRenderer.js +0 -4
  56. package/dist/_virtual/BlockType.js +0 -4
  57. package/dist/_virtual/BlocksPanel.js +0 -4
  58. package/dist/_virtual/BuiltInControl.js +0 -4
  59. package/dist/_virtual/BuiltInControlTypes.js +0 -4
  60. package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
  61. package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
  62. package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
  63. package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
  64. package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
  65. package/dist/_virtual/ContextAction.js +0 -4
  66. package/dist/_virtual/ContextActionType.js +0 -4
  67. package/dist/_virtual/Control.js +0 -4
  68. package/dist/_virtual/EditorStatePropertyType.js +0 -4
  69. package/dist/_virtual/Extension.js +0 -4
  70. package/dist/_virtual/ExtensionBuilder.js +0 -4
  71. package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
  72. package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
  73. package/dist/_virtual/ModificationDescription.js +0 -4
  74. package/dist/_virtual/PanelPosition.js +0 -4
  75. package/dist/_virtual/PreviewDeviceMode.js +0 -4
  76. package/dist/_virtual/SettingsPanelRegistry.js +0 -4
  77. package/dist/_virtual/SettingsPanelTab.js +0 -4
  78. package/dist/_virtual/SettingsTab.js +0 -4
  79. package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
  80. package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
  81. package/dist/_virtual/TextColorBuiltInControl.js +0 -4
  82. package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
  83. package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
  84. package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
  85. package/dist/_virtual/UIElement.js +0 -4
  86. package/dist/_virtual/UIElementTagRegistry.js +0 -4
  87. package/dist/_virtual/UIElementType.js +0 -4
  88. package/dist/_virtual/UIElementsAttributes.js +0 -4
  89. package/dist/_virtual/index.js +0 -5
  90. package/dist/_virtual/index2.js +0 -4
  91. package/dist/components/organisms/base/Toaster.vue.d.ts +0 -2
  92. package/dist/components/organisms/base/Toaster.vue.js +0 -17
  93. package/dist/components/organisms/base/Toaster.vue2.js +0 -15
  94. package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
  95. package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
  96. package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
  97. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
  98. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
  99. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
  100. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
  101. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
  102. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
  103. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
  104. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
  105. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
  106. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
  107. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  108. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  109. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
  110. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
  111. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
  112. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
  113. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
  114. package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
  115. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
  116. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
  117. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
  118. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
  119. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
  120. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
  121. package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
  122. package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
  123. package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
  124. package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
  125. package/dist/components/wrappers/WpModal.vue.js +0 -27
  126. package/dist/components/wrappers/WpModal.vue2.js +0 -22
  127. package/dist/composables/useCodeEditorApi.d.ts +0 -4
  128. package/dist/composables/useCodeEditorApi.js +0 -11
  129. package/dist/composables/useConfig.d.ts +0 -4
  130. package/dist/composables/useConfig.js +0 -7
  131. package/dist/composables/useDebounce.d.ts +0 -4
  132. package/dist/composables/useDebounce.js +0 -12
  133. package/dist/composables/useGuidoActions.d.ts +0 -46
  134. package/dist/composables/useGuidoActions.js +0 -37
  135. package/dist/composables/useHtmlCompiler.d.ts +0 -4
  136. package/dist/composables/useHtmlCompiler.js +0 -17
  137. package/dist/composables/usePreviewMode.d.ts +0 -5
  138. package/dist/composables/usePreviewMode.js +0 -31
  139. package/dist/composables/useProvideInject.d.ts +0 -14
  140. package/dist/composables/useProvideInject.js +0 -17
  141. package/dist/composables/useResponsivePreview.d.ts +0 -5
  142. package/dist/composables/useResponsivePreview.js +0 -86
  143. package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
  144. package/dist/config/compiler/htmlCompilerRules.js +0 -145
  145. package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
  146. package/dist/enums/displayConditions.d.ts +0 -2
  147. package/dist/enums/displayConditions.js +0 -80
  148. package/dist/enums/preview.d.ts +0 -13
  149. package/dist/enums/preview.js +0 -23
  150. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
  151. package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
  152. package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
  153. package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
  154. package/dist/extensions/DynamicContent/dynamic-content.js +0 -61
  155. package/dist/extensions/DynamicContent/extension.d.ts +0 -2
  156. package/dist/extensions/DynamicContent/extension.js +0 -11
  157. package/dist/mock/api/default-template.d.ts +0 -2
  158. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
  159. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
  160. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
  161. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
  162. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
  163. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
  164. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
  165. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
  166. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
  167. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
  168. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
  169. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
  170. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
  171. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
  172. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
  173. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
  174. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
  175. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
  176. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
  177. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
  178. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
  179. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
  180. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
  181. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
  182. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
  183. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
  184. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
  185. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
  186. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
  187. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
  188. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
  189. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
  190. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
  191. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
  192. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
  193. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
  194. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
  195. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
  196. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
  197. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
  198. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
  199. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
  200. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
  201. package/dist/node_modules/lodash-es/_Stack.js +0 -18
  202. package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
  203. package/dist/node_modules/lodash-es/_apply.js +0 -16
  204. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
  205. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  206. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  207. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  208. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  209. package/dist/node_modules/lodash-es/_baseFor.js +0 -5
  210. package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
  211. package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
  212. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  213. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  214. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  215. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  216. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  217. package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
  218. package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
  219. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  220. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  221. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  222. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  223. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  224. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  225. package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
  226. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  227. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  228. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  229. package/dist/node_modules/lodash-es/_isIndex.js +0 -8
  230. package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
  231. package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
  232. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  233. package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
  234. package/dist/node_modules/lodash-es/_overArg.js +0 -8
  235. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  236. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  237. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  238. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  239. package/dist/node_modules/lodash-es/_stackClear.js +0 -7
  240. package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
  241. package/dist/node_modules/lodash-es/_stackGet.js +0 -6
  242. package/dist/node_modules/lodash-es/_stackHas.js +0 -6
  243. package/dist/node_modules/lodash-es/_stackSet.js +0 -17
  244. package/dist/node_modules/lodash-es/constant.js +0 -8
  245. package/dist/node_modules/lodash-es/identity.js +0 -6
  246. package/dist/node_modules/lodash-es/isArguments.js +0 -10
  247. package/dist/node_modules/lodash-es/isArray.js +0 -4
  248. package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
  249. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  250. package/dist/node_modules/lodash-es/isBuffer.js +0 -6
  251. package/dist/node_modules/lodash-es/isLength.js +0 -7
  252. package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
  253. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  254. package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
  255. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  256. package/dist/node_modules/lodash-es/merge.js +0 -8
  257. package/dist/node_modules/lodash-es/stubFalse.js +0 -6
  258. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  259. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  260. package/dist/static/assets/phone-mockup.svg.js +0 -4
  261. package/dist/static/styles/base.css.js +0 -11
  262. package/dist/static/styles/components/alert-message.css.js +0 -39
  263. package/dist/static/styles/components/amp-block.css.js +0 -18
  264. package/dist/static/styles/components/base-input.css.js +0 -47
  265. package/dist/static/styles/components/button-group.css.js +0 -54
  266. package/dist/static/styles/components/button.css.js +0 -106
  267. package/dist/static/styles/components/combobox.css.js +0 -49
  268. package/dist/static/styles/components/counter.css.js +0 -42
  269. package/dist/static/styles/components/dropdown-menu.css.js +0 -52
  270. package/dist/static/styles/components/narrow-panel.css.js +0 -38
  271. package/dist/static/styles/components/switcher.css.js +0 -11
  272. package/dist/static/styles/components/tabs.css.js +0 -97
  273. package/dist/static/styles/components/tools.css.js +0 -23
  274. package/dist/static/styles/components/version-history.css.js +0 -30
  275. package/dist/static/styles/components/wide-panel.css.js +0 -135
  276. package/dist/static/styles/variables.css.js +0 -23
  277. package/dist/stores/dynamic-content.d.ts +0 -27
  278. package/dist/stores/dynamic-content.js +0 -23
  279. package/dist/stores/preview.d.ts +0 -46
  280. package/dist/stores/preview.js +0 -53
  281. package/dist/stores/toaster.d.ts +0 -25
  282. package/dist/stores/toaster.js +0 -28
  283. package/dist/utils/arrayUtil.d.ts +0 -1
  284. package/dist/utils/arrayUtil.js +0 -10
  285. package/dist/utils/genericUtil.d.ts +0 -2
  286. package/dist/utils/genericUtil.js +0 -7
  287. package/dist/utils/htmlCompiler.d.ts +0 -12
  288. package/dist/utils/htmlCompiler.js +0 -70
  289. package/dist/utils/tooltipUtils.d.ts +0 -2
  290. package/dist/utils/tooltipUtils.js +0 -11
package/README.md CHANGED
@@ -14,10 +14,7 @@ Guido is a Vue 2 + TypeScript wrapper for the Stripo Email Editor plugin. Easily
14
14
  ```bash
15
15
  npm install @useinsider/guido
16
16
  ```
17
- ### Prerequisites
18
- 🍍 Your project should have `pinia`
19
17
 
20
- ---
21
18
  ## 🚀 Usage
22
19
 
23
20
  ### Basic Usage
@@ -26,16 +23,9 @@ npm install @useinsider/guido
26
23
  <template>
27
24
  <div>
28
25
  <Guido
29
- ref="guidoEditor"
30
- :template-id="templateId"
26
+ :email-id="emailId"
31
27
  :user-id="userId"
32
28
  :guido-config="guidoConfig"
33
- :html="initialHtml"
34
- :css="initialCss"
35
- @dynamic-content:open="handleDynamicContentOpen"
36
- @back="handleBack"
37
- @save:start="handleSaveStart"
38
- @save:complete="handleSaveComplete"
39
29
  />
40
30
  </div>
41
31
  </template>
@@ -49,60 +39,12 @@ export default {
49
39
  },
50
40
  data() {
51
41
  return {
52
- templateId: 'template-123',
53
- userId: 'user-456',
54
- initialHtml: '<p>Initial HTML content</p>',
55
- initialCss: 'p { color: #333; }',
42
+ emailId: 'abc123',
43
+ userId: '12345',
56
44
  guidoConfig: {
57
- translationsPath: 'window.trans.en',
58
- htmlCompilerRules: [],
59
- ignoreDefaultHtmlCompilerRules: false,
60
- features: {
61
- dynamicContent: true,
62
- saveAsTemplate: true,
63
- versionHistory: true
64
- }
65
- },
66
- dynamicContentModalVisible: false
45
+ translationsPath: 'window.trans.en'
46
+ }
67
47
  };
68
- },
69
-
70
- methods: {
71
- handleDynamicContentOpen(detail) {
72
- console.log('Dynamic content requested:', detail);
73
- this.dynamicContentModalVisible = true;
74
- },
75
-
76
- handleBack() {
77
- console.log('User clicked back button');
78
- // Handle navigation back
79
- },
80
-
81
- handleSaveStart() {
82
- console.log('Save process started');
83
- // Show loading indicator
84
- },
85
-
86
- handleSaveComplete(template) {
87
- console.log('Save completed:', template);
88
- // Handle saved template data
89
- },
90
-
91
- // ⚠️ Your own Dynamic Content Modal should have this id: #guido-dynamic-content-modal
92
- handleDynamicContentInsert() {
93
- this.$refs.guidoEditor?.dynamicContent.insert({
94
- text: 'Display Text',
95
- value: 'actual-value',
96
- fallback: 'Fallback Text'
97
- });
98
-
99
- this.dynamicContentModalVisible = false;
100
- },
101
-
102
- // ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
103
- handleDynamicContentClose() {
104
- this.$refs.guidoEditor?.dynamicContent.close();
105
- }
106
48
  }
107
49
  };
108
50
  </script>
@@ -114,69 +56,24 @@ export default {
114
56
 
115
57
  | Prop | Type | Required | Default | Description |
116
58
  |------|------|----------|---------|-------------|
117
- | `templateId` | `string` | ✅ | - | Unique identifier for the email template |
118
- | `userId` | `string` | ✅ | - | Unique identifier for the user |
59
+ | `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
60
+ | `userId` | `string` | ✅ | - | Unique identifier for the user draft |
61
+ | `username` | `string` | ⚪ | Guido User | User name |
62
+ | `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
63
+ | `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
119
64
  | `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
120
- | `partnerName` | `string` | ⚪ | From URL host | Partner identifier |
121
- | `productType` | `string` | ⚪ | From URL path | Product type identifier |
122
- | `username` | `string` | ⚪ | `'Guido User'` | Display name for the user |
123
- | `html` | `string` | ⚪ | `''` | Initial HTML content for the template |
124
- | `css` | `string` | ⚪ | `''` | Initial CSS styles for the template |
125
-
126
- ### Guido Component Events
127
-
128
- | Event | Payload | Description |
129
- |-------|---------|-------------|
130
- | `dynamic-content:open` | `DynamicContent \| null` | Fired when user requests to insert dynamic content |
131
- | `back` | - | Fired when user clicks the back button |
132
- | `save:start` | - | Fired when the save process begins |
133
- | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
134
-
135
- ### Guido Exposed Methods
136
- ```typescript
137
- dynamicContent.insert(DynamicContent);
138
- dynamicContent.close();
139
- ```
140
65
 
141
- ### Guido Interfaces
66
+ ### GuidoConfig Interface
142
67
 
143
68
  ```typescript
144
69
  interface GuidoConfig {
145
70
  translationsPath: string;
146
- htmlCompilerRules?: CompilerRule[];
147
- ignoreDefaultHtmlCompilerRules?: boolean;
148
- features: {
149
- dynamicContent: boolean;
150
- saveAsTemplate: boolean;
151
- versionHistory: boolean;
152
- };
153
71
  }
154
72
  ```
155
73
 
156
74
  | Property | Type | Default | Description |
157
75
  |----------|------|---------|-------------|
158
76
  | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
159
- | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
160
- | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
161
- | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
162
- | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
163
- | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
164
- | `features.versionHistory` | `boolean` | `true` | Enable version history feature |
165
-
166
- ```typescript
167
- interface DynamicContent {
168
- value: string;
169
- text: string;
170
- fallback?: string;
171
- }
172
- ```
173
- ---
174
-
175
- | Property | Type | Default | Description |
176
- |----------|------|---------|-------------|
177
- | `value` | `string` | '' | Value of the dynamic content |
178
- | `text` | `string` | '' | Visible value of the dynamic content |
179
- | `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
180
77
 
181
78
  ### TypeScript Types
182
79
 
@@ -191,193 +88,17 @@ import type { GuidoConfig } from '@useinsider/guido';
191
88
  import type { StripoEventType } from '@useinsider/guido';
192
89
  ```
193
90
 
194
- ## 🔨 HTML Compiler Rules
195
-
196
- Guido includes a powerful HTML compiler system that allows you to transform HTML content with custom rules. You can define additional rules and optionally ignore the default rules.
197
-
198
- ### Rule Types
199
-
200
- There are 4 types of compiler rules:
201
-
202
- #### 1. Replace Rule
203
- Replace specific strings in HTML content.
204
-
205
- ```typescript
206
- {
207
- id: 'fix-encoding',
208
- description: 'Fix URL encoding issues',
209
- type: 'replace',
210
- search: '{%22', // String to find
211
- replacement: '%7B%22', // String to replace with
212
- replaceAll: true, // Replace all occurrences (default: true)
213
- priority: 10 // Execution priority (lower = earlier)
214
- }
215
- ```
216
-
217
- #### 2. Regex Rule
218
- Use regular expressions for complex pattern matching and replacement.
219
-
220
- ```typescript
221
- {
222
- id: 'remove-comments',
223
- description: 'Remove HTML comments',
224
- type: 'regex',
225
- pattern: '<!--.*?-->', // Regex pattern
226
- replacement: '', // Replacement string
227
- flags: 'g', // Regex flags (default: 'g')
228
- priority: 20
229
- }
230
- ```
231
-
232
- #### 3. Remove Rule
233
- Remove specific strings or patterns from HTML content.
234
-
235
- ```typescript
236
- {
237
- id: 'cleanup-scripts',
238
- description: 'Remove unwanted script tags',
239
- type: 'remove',
240
- targets: [ // Array of strings or RegExp objects
241
- '<script src="unwanted.js"></script>',
242
- /onclick="[^"]*"/g
243
- ],
244
- priority: 30
245
- }
246
- ```
247
-
248
- #### 4. Custom Rule
249
- Define complex transformation logic with a custom processor function.
250
-
251
- ```typescript
252
- {
253
- id: 'add-meta-tags',
254
- description: 'Add custom meta tags to head',
255
- type: 'custom',
256
- processor: (html: string): string => {
257
- // Custom transformation logic
258
- const metaTags = '<meta name="custom" content="value">';
259
- return html.replace('</head>', `${metaTags}</head>`);
260
- },
261
- priority: 40
262
- }
263
- ```
264
-
265
- ### Using HTML Compiler Rules
266
-
267
- #### Basic Usage with Custom Rules
268
-
269
- ```typescript
270
- const guidoConfig = {
271
- translationsPath: 'window.trans.en',
272
- features: {
273
- dynamicContent: true,
274
- saveAsTemplate: true,
275
- versionHistory: false // Disable version history
276
- },
277
- htmlCompilerRules: [
278
- {
279
- id: 'replace-domain',
280
- description: 'Replace old domain with new one',
281
- type: 'replace',
282
- search: 'old-domain.com',
283
- replacement: 'new-domain.com',
284
- replaceAll: true,
285
- priority: 10
286
- },
287
- {
288
- id: 'remove-tracking',
289
- description: 'Remove tracking pixels',
290
- type: 'regex',
291
- pattern: '<img[^>]*tracking[^>]*>',
292
- replacement: '',
293
- flags: 'gi',
294
- priority: 20
295
- }
296
- ]
297
- };
298
- ```
299
-
300
- #### Ignoring Default Rules
301
-
302
- ```typescript
303
- const guidoConfig = {
304
- translationsPath: 'window.trans.en',
305
- features: {
306
- dynamicContent: true,
307
- saveAsTemplate: true,
308
- versionHistory: true
309
- },
310
- ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
311
- htmlCompilerRules: [
312
- // Only your custom rules will be applied
313
- {
314
- id: 'custom-transformation',
315
- type: 'replace',
316
- search: 'old-text',
317
- replacement: 'new-text',
318
- priority: 1
319
- }
320
- ]
321
- };
322
- ```
323
-
324
- ### Rule Execution Order
325
-
326
- Rules are executed in priority order (lower numbers first). Rules with the same priority are executed in array order.
327
-
328
- - **Priority 1-99**: Reserved for critical transformations
329
- - **Priority 100-999**: Standard transformations
330
- - **Priority 1000+**: Additional custom rules (automatically assigned)
331
-
332
- ### Default Rules
333
-
334
- Guido includes several default rules for common email HTML optimizations:
335
-
336
- - **URL encoding fixes**: Fixes malformed URL encoding in dynamic content
337
- - **Template tag restoration**: Restores `{{}}` template tags that got URL encoded
338
- - **HTML entity decoding**: Converts `&lt;` and `&gt;` back to `<` and `>`
339
- - **Cleanup rules**: Removes unwanted iframe and style elements
340
- - **MSO conditions**: Manages Outlook-specific conditional comments
341
- - **Domain replacement**: Updates old image domains to current ones
342
-
343
- You can view all default rules in: `src/config/compiler/htmlCompilerRules.ts`
344
-
345
- ### CompilerRule Interface
91
+ ### StripoEventType
346
92
 
347
93
  ```typescript
348
- type CompilerRuleType = 'replace' | 'regex' | 'remove' | 'custom';
349
-
350
- interface BaseCompilerRule {
351
- id: string;
352
- description?: string;
353
- priority: number;
354
- }
355
-
356
- interface ReplaceRule extends BaseCompilerRule {
357
- type: 'replace';
358
- search: string;
359
- replacement: string;
360
- replaceAll?: boolean; // Default: true
361
- }
362
-
363
- interface RegexRule extends BaseCompilerRule {
364
- type: 'regex';
365
- pattern: string;
366
- replacement: string;
367
- flags?: string; // Default: 'g'
368
- }
369
-
370
- interface RemoveRule extends BaseCompilerRule {
371
- type: 'remove';
372
- targets: (string | RegExp)[]; // Array of strings or RegExp objects
373
- }
374
-
375
- interface CustomRule extends BaseCompilerRule {
376
- type: 'custom';
377
- processor: (html: string) => string;
378
- }
379
-
380
- type CompilerRule = ReplaceRule | RegexRule | RemoveRule | CustomRule;
94
+ type StripoEventType =
95
+ | 'save'
96
+ | 'export'
97
+ | 'close'
98
+ | 'autosave'
99
+ | 'publish'
100
+ | 'export:requested'
101
+ | 'export:ready';
381
102
  ```
382
103
 
383
104
  ---
@@ -436,87 +157,6 @@ src/
436
157
  └── library.ts # Main export
437
158
  ```
438
159
 
439
- ## 🔌 Provide/Inject Utilities
440
-
441
- Guido includes type-safe utilities for Vue's provide/inject system to facilitate dependency injection between components.
442
-
443
- ### useProvideInject
444
-
445
- The `useProvideInject` composable provides two helper functions for type-safe dependency injection:
446
-
447
- #### Basic Usage
448
-
449
- ```typescript
450
- // Parent component
451
- import { provideValue } from '@useinsider/guido';
452
- import { InjectionKey } from 'vue';
453
-
454
- // Define a typed injection key
455
- const MyServiceKey: InjectionKey<MyService> = Symbol('MyService');
456
-
457
- // Provide the value
458
- const myService = new MyService();
459
- provideValue(MyServiceKey, myService);
460
-
461
- // Child component
462
- import { useInjectedValue } from '@useinsider/guido';
463
-
464
- // Inject the value with type safety
465
- const myService = useInjectedValue(MyServiceKey);
466
- ```
467
-
468
- #### With Default Value
469
-
470
- ```typescript
471
- // Inject with a fallback value
472
- const myService = useInjectedValue(MyServiceKey, new DefaultService());
473
- ```
474
-
475
- #### Error Handling
476
-
477
- The `useInjectedValue` function will throw a descriptive error if no provider is found and no default value is provided:
478
-
479
- ```typescript
480
- // This will throw an error if no provider exists
481
- try {
482
- const myService = useInjectedValue(MyServiceKey);
483
- } catch (error) {
484
- console.error('No provider found for MyService');
485
- }
486
- ```
487
-
488
- ### API Reference
489
-
490
- #### `provideValue`
491
-
492
- ```typescript
493
- provideValue<T>(key: InjectionKey<T>, value: T): void
494
- ```
495
-
496
- Provides a value using Vue's provide system with type safety.
497
-
498
- | Parameter | Type | Description |
499
- |-----------|------|-------------|
500
- | `key` | `InjectionKey<T>` | The typed injection key |
501
- | `value` | `T` | The value to provide |
502
-
503
- #### `useInjectedValue`
504
-
505
- ```typescript
506
- useInjectedValue<T>(key: InjectionKey<T>, defaultValue?: T): T
507
- ```
508
-
509
- Injects a value using Vue's inject system with type safety and error handling.
510
-
511
- | Parameter | Type | Required | Description |
512
- |-----------|------|----------|-------------|
513
- | `key` | `InjectionKey<T>` | ✅ | The typed injection key |
514
- | `defaultValue` | `T` | ⚪ | Optional fallback value |
515
-
516
- **Returns:** `T` - The injected value
517
-
518
- **Throws:** `Error` - When no provider is found and no default value is provided
519
-
520
160
  ## 🌐 i18n
521
161
  Before running the project, it sends to request to inone.useinsider.com/translations and writes the JSON file into - [trans.json](src/mock/responses/trans.json).
522
162
  It allows to use production or local translations on your code. 🚀
@@ -530,34 +170,6 @@ const trans = useTranslations();
530
170
  trans('foo.bar')
531
171
  ```
532
172
 
533
- ## 📦 Local Building (Recommended)
534
-
535
- Run this commands if you want to test the package on your local before sending to NPM.
536
- ```sh
537
- bun run build
538
- ```
539
-
540
- Since bun does not have packaging yet, use npm here: 🥲
541
- ```sh
542
- npm pack
543
- ```
544
-
545
- It'll crate like `useinsider-guido-1.0.0.tgz` file.
546
-
547
- Move this file to your project path like: `email-fe` via:
548
- ```sh
549
- cp useinsider-guido-1.0.0.tgz ../email-fe
550
- ```
551
-
552
- Install the file to your project:
553
- ```sh
554
- npm i ./useinsider-guido-1.0.0.tgz
555
- ```
556
-
557
- Then you just need to rebuild to your project or restart the Container. 🎉
558
-
559
- For Future, we can create a shell script for it. Feel free to help 🙃
560
-
561
173
  ## 📦 Build Output
562
174
 
563
175
  The library builds to multiple formats:
@@ -599,8 +211,7 @@ ISC License
599
211
  - [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
600
212
 
601
213
  ## 🎯 TODO:
602
- - CSS part should be optimized with variables & `sass-loader`.
214
+ - [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
603
215
  - Master Version Generator should be fixed.
604
216
  - Playwright integration
605
217
  - Commitlint & Precommit Hooks integration
606
- - Get Pre-built display conditions from API
@@ -1,38 +1,3 @@
1
- import type { CompilerRule } from './html-compiler';
2
- type Features = {
3
- dynamicContent?: boolean;
4
- saveAsTemplate?: boolean;
5
- versionHistory?: boolean;
6
- };
7
1
  export type GuidoConfig = {
8
2
  translationsPath: string;
9
- htmlCompilerRules?: CompilerRule[];
10
- ignoreDefaultHtmlCompilerRules?: boolean;
11
- emailHeader: EmailHeader;
12
- features?: Features;
13
- };
14
- export type DynamicContent = {
15
- value: string;
16
- text: string;
17
- fallback?: string;
18
- };
19
- export interface EmailHeader {
20
- senderName: string;
21
- subject: string;
22
- }
23
- export interface TooltipOptions {
24
- id: string;
25
- dynamicPosition: boolean;
26
- staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
27
- iconStatus: boolean;
28
- offset?: {
29
- x: number;
30
- y: number;
31
- };
32
- preventXss?: boolean;
33
- }
34
- export type MergeTag = {
35
- label: string;
36
- value: string;
37
3
  };
38
- export {};
package/dist/App.vue.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import '../node_modules/@useinsider/design-system-vue/dist/design-system-vue.css';
2
- 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
+ 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<{}>>, {}>;
3
3
  export default _default;
@@ -1,30 +1,13 @@
1
- import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
2
- import type { Template } from '@@/Types/stripo';
1
+ import type { GuidoConfig } from '@@/Types/generic';
3
2
  type __VLS_Props = {
4
- templateId: string;
3
+ emailId: string;
5
4
  userId: string;
6
5
  partnerName?: string;
7
6
  productType?: string;
8
7
  username?: string;
9
- html?: string;
10
- css?: string;
11
- preselectedDynamicContentList: DynamicContent[];
12
8
  guidoConfig: GuidoConfig;
13
9
  };
14
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
15
- dynamicContent: {
16
- insert: (data: DynamicContent) => void;
17
- close: () => void;
18
- };
19
- }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
20
- "dynamic-content:open": (detail: DynamicContent | null) => void;
21
- back: () => void;
22
- "save:start": () => void;
23
- "save:complete": (data: {
24
- template: Omit<Template, "forceRecreate">;
25
- dynamicContentList: DynamicContent[];
26
- }) => void;
27
- }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
10
+ 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>>>, {}>;
28
11
  export default _default;
29
12
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
13
  type __VLS_TypePropsToOption<T> = {
@@ -1,18 +1,18 @@
1
1
  import o from "./Guido.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue2_normalizer.js";
3
+ import i from "../_virtual/_plugin-vue2_normalizer.js";
4
4
  var s = function() {
5
- var i = this, e = i._self._c, r = i._self._setupProxy;
6
- return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), r.previewStore.isPreviewModeOpen ? e(r.PreviewContainer) : i._e(), e("div", { directives: [{ name: "show", rawName: "v-show", value: !r.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.Toaster)], 1);
7
- }, a = [], n = /* @__PURE__ */ t(
5
+ var e = this, r = e._self._c, t = e._self._setupProxy;
6
+ return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
7
+ }, _ = [], a = /* @__PURE__ */ i(
8
8
  o,
9
9
  s,
10
- a,
10
+ _,
11
11
  !1,
12
12
  null,
13
- "09c28ccc"
13
+ "d4a5c957"
14
14
  );
15
- const v = n.exports;
15
+ const f = a.exports;
16
16
  export {
17
- v as default
17
+ f as default
18
18
  };