@useinsider/guido 1.0.3-beta.a44b7cd → 1.0.3-beta.a5608d9

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 (510) hide show
  1. package/README.md +152 -632
  2. package/dist/@types/generic.d.ts +49 -0
  3. package/dist/{src/components → components}/Guido.vue.d.ts +3 -5
  4. package/dist/components/Guido.vue.js +9 -11
  5. package/dist/components/Guido.vue2.js +69 -81
  6. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  7. package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
  8. package/dist/components/organisms/header/RightSlot.vue.js +11 -11
  9. package/dist/components/organisms/header/RightSlot.vue2.js +22 -23
  10. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
  11. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +17 -30
  12. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +10 -12
  13. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -23
  14. package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
  15. package/dist/components/wrappers/WpDrawer.vue.js +4 -6
  16. package/dist/composables/useActionsApi.js +1 -1
  17. package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -9
  18. package/dist/composables/useGuidoActions.js +9 -19
  19. package/dist/composables/useHtmlCompiler.js +13 -15
  20. package/dist/composables/useHtmlValidator.js +35 -36
  21. package/dist/composables/useStripo.js +63 -69
  22. package/dist/config/compiler/unsubscribeCompilerRules.js +29 -47
  23. package/dist/config/migrator/index.d.ts +1 -0
  24. package/dist/config/migrator/index.js +6 -9
  25. package/dist/enums/defaults.js +9 -20
  26. package/dist/enums/onboarding.d.ts +1 -0
  27. package/dist/enums/onboarding.js +2 -7
  28. package/dist/enums/unsubscribe.d.ts +15 -0
  29. package/dist/enums/unsubscribe.js +7 -46
  30. package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -2
  31. package/dist/extensions/Blocks/Checkbox/block.js +24 -18
  32. package/dist/extensions/Blocks/Checkbox/control.js +65 -54
  33. package/dist/extensions/Blocks/Checkbox/extension.js +16 -5
  34. package/dist/extensions/Blocks/Checkbox/settingsPanel.js +25 -12
  35. package/dist/extensions/Blocks/Checkbox/template.d.ts +6 -0
  36. package/dist/extensions/Blocks/Checkbox/template.js +21 -15
  37. package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -2
  38. package/dist/extensions/Blocks/RadioButton/block.js +22 -16
  39. package/dist/extensions/Blocks/RadioButton/control.js +52 -41
  40. package/dist/extensions/Blocks/RadioButton/extension.js +15 -4
  41. package/dist/extensions/Blocks/RadioButton/settingsPanel.js +26 -13
  42. package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +1 -1
  43. package/dist/extensions/Blocks/RadioButton/template.js +29 -27
  44. package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -1
  45. package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
  46. package/dist/extensions/DynamicContent/dynamic-content-modal.js +19 -25
  47. package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
  48. package/dist/extensions/DynamicContent/dynamic-content.js +44 -125
  49. package/dist/extensions/DynamicContent/extension.js +18 -6
  50. package/dist/guido.css +1 -1
  51. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +75 -0
  52. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +77 -0
  53. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +123 -0
  54. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +7 -0
  55. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +7 -0
  56. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +12 -0
  57. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +7 -0
  58. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +119 -0
  59. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +7 -0
  60. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +7 -0
  61. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +7 -0
  62. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +12 -0
  63. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +7 -0
  64. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +7 -0
  65. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +7 -0
  66. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +24 -0
  67. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +24 -0
  68. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +11 -0
  69. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +33 -0
  70. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +22 -0
  71. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +40 -0
  72. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +5 -0
  73. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +12 -13
  74. package/dist/node_modules/lodash-es/keysIn.js +3 -3
  75. package/dist/services/stripoApi.js +1 -1
  76. package/dist/static/styles/components/narrow-panel.css.js +0 -10
  77. package/dist/static/styles/customEditorStyle.css.js +0 -5
  78. package/dist/{src/stores → stores}/dynamic-content.d.ts +3 -3
  79. package/dist/stores/dynamic-content.js +2 -2
  80. package/dist/{src/stores → stores}/editor.d.ts +1 -22
  81. package/dist/stores/editor.js +2 -3
  82. package/dist/{src/stores → stores}/onboarding.d.ts +1 -335
  83. package/dist/stores/onboarding.js +36 -44
  84. package/dist/{src/stores → stores}/preview.d.ts +1 -1
  85. package/dist/stores/preview.js +1 -1
  86. package/dist/{src/stores → stores}/recommendation.d.ts +1 -1
  87. package/dist/stores/recommendation.js +3 -3
  88. package/dist/{src/stores → stores}/save-as-template.d.ts +1 -1
  89. package/dist/stores/save-as-template.js +2 -2
  90. package/dist/{src/stores → stores}/toaster.d.ts +1 -1
  91. package/dist/stores/toaster.js +1 -1
  92. package/dist/stores/unsubscribe.d.ts +8 -0
  93. package/dist/stores/unsubscribe.js +6 -126
  94. package/dist/{src/stores → stores}/version-history.d.ts +1 -1
  95. package/dist/stores/version-history.js +4 -4
  96. package/dist/utils/dateUtil.d.ts +1 -0
  97. package/dist/utils/dateUtil.js +3 -24
  98. package/dist/{src/utils → utils}/genericUtil.d.ts +0 -2
  99. package/dist/utils/genericUtil.js +6 -17
  100. package/dist/utils/templatePreparation.js +16 -17
  101. package/package.json +4 -9
  102. package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +0 -28
  103. package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +0 -38
  104. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +0 -17
  105. package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +0 -37
  106. package/dist/components/organisms/extensions/recommendation/Filters.vue.js +0 -20
  107. package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +0 -44
  108. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +0 -17
  109. package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +0 -27
  110. package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +0 -21
  111. package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +0 -99
  112. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
  113. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
  114. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
  115. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
  116. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
  117. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
  118. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
  119. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
  120. package/dist/composables/useBlocksConfig.js +0 -48
  121. package/dist/config/compiler/itemsCompilerRules.js +0 -14
  122. package/dist/config/migrator/couponBlockMigrator.js +0 -67
  123. package/dist/config/migrator/recommendationMigrator.js +0 -293
  124. package/dist/config/migrator/unsubscribeMigrator.js +0 -124
  125. package/dist/enums/date.js +0 -6
  126. package/dist/enums/extensions/recommendationBlock.js +0 -80
  127. package/dist/extensions/Blocks/Checkbox/iconsRegistry.js +0 -18
  128. package/dist/extensions/Blocks/CouponBlock/block.js +0 -33
  129. package/dist/extensions/Blocks/CouponBlock/extension.js +0 -8
  130. package/dist/extensions/Blocks/CouponBlock/iconsRegistry.js +0 -33
  131. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +0 -24
  132. package/dist/extensions/Blocks/CouponBlock/template.js +0 -18
  133. package/dist/extensions/Blocks/Items/block.js +0 -67
  134. package/dist/extensions/Blocks/Items/controls/button/link.js +0 -68
  135. package/dist/extensions/Blocks/Items/controls/cardComposition.js +0 -193
  136. package/dist/extensions/Blocks/Items/controls/image/link.js +0 -68
  137. package/dist/extensions/Blocks/Items/controls/index.js +0 -217
  138. package/dist/extensions/Blocks/Items/controls/name/trimming.js +0 -70
  139. package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +0 -107
  140. package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +0 -123
  141. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +0 -76
  142. package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +0 -61
  143. package/dist/extensions/Blocks/Items/controls/price/priceOrientation.js +0 -92
  144. package/dist/extensions/Blocks/Items/controls/settingsControl.js +0 -316
  145. package/dist/extensions/Blocks/Items/enums/controlEnums.js +0 -5
  146. package/dist/extensions/Blocks/Items/enums/productEnums.js +0 -274
  147. package/dist/extensions/Blocks/Items/enums/settingsEnums.js +0 -77
  148. package/dist/extensions/Blocks/Items/extension.js +0 -20
  149. package/dist/extensions/Blocks/Items/iconsRegistry.js +0 -32
  150. package/dist/extensions/Blocks/Items/items.css.js +0 -23
  151. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +0 -62
  152. package/dist/extensions/Blocks/Items/layouts/vertical.html.js +0 -72
  153. package/dist/extensions/Blocks/Items/settingsPanel.js +0 -132
  154. package/dist/extensions/Blocks/Items/store/items-block.js +0 -75
  155. package/dist/extensions/Blocks/Items/template.js +0 -195
  156. package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
  157. package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
  158. package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
  159. package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
  160. package/dist/extensions/Blocks/RadioButton/iconsRegistry.js +0 -14
  161. package/dist/extensions/Blocks/Recommendation/block.js +0 -30
  162. package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -103
  163. package/dist/extensions/Blocks/Recommendation/constants.js +0 -5
  164. package/dist/extensions/Blocks/Recommendation/control.js +0 -306
  165. package/dist/extensions/Blocks/Recommendation/controls/button/align.js +0 -13
  166. package/dist/extensions/Blocks/Recommendation/controls/button/border.js +0 -13
  167. package/dist/extensions/Blocks/Recommendation/controls/button/borderRadius.js +0 -13
  168. package/dist/extensions/Blocks/Recommendation/controls/button/color.js +0 -13
  169. package/dist/extensions/Blocks/Recommendation/controls/button/fitToContent.js +0 -13
  170. package/dist/extensions/Blocks/Recommendation/controls/button/fontFamily.js +0 -13
  171. package/dist/extensions/Blocks/Recommendation/controls/button/margins.js +0 -13
  172. package/dist/extensions/Blocks/Recommendation/controls/button/paddings.js +0 -13
  173. package/dist/extensions/Blocks/Recommendation/controls/button/text.js +0 -13
  174. package/dist/extensions/Blocks/Recommendation/controls/button/textSize.js +0 -13
  175. package/dist/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.js +0 -13
  176. package/dist/extensions/Blocks/Recommendation/controls/image/margins.js +0 -13
  177. package/dist/extensions/Blocks/Recommendation/controls/image/size.js +0 -13
  178. package/dist/extensions/Blocks/Recommendation/controls/name/align.js +0 -13
  179. package/dist/extensions/Blocks/Recommendation/controls/name/background.js +0 -13
  180. package/dist/extensions/Blocks/Recommendation/controls/name/color.js +0 -13
  181. package/dist/extensions/Blocks/Recommendation/controls/name/fontFamily.js +0 -13
  182. package/dist/extensions/Blocks/Recommendation/controls/name/paddings.js +0 -13
  183. package/dist/extensions/Blocks/Recommendation/controls/name/size.js +0 -13
  184. package/dist/extensions/Blocks/Recommendation/controls/name/style.js +0 -13
  185. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/align.js +0 -13
  186. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/background.js +0 -13
  187. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/color.js +0 -13
  188. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.js +0 -13
  189. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/paddings.js +0 -13
  190. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/size.js +0 -13
  191. package/dist/extensions/Blocks/Recommendation/controls/oldPrice/style.js +0 -13
  192. package/dist/extensions/Blocks/Recommendation/controls/price/align.js +0 -13
  193. package/dist/extensions/Blocks/Recommendation/controls/price/background.js +0 -13
  194. package/dist/extensions/Blocks/Recommendation/controls/price/color.js +0 -13
  195. package/dist/extensions/Blocks/Recommendation/controls/price/fontFamily.js +0 -13
  196. package/dist/extensions/Blocks/Recommendation/controls/price/paddings.js +0 -13
  197. package/dist/extensions/Blocks/Recommendation/controls/price/size.js +0 -13
  198. package/dist/extensions/Blocks/Recommendation/controls/price/style.js +0 -13
  199. package/dist/extensions/Blocks/Recommendation/extension.js +0 -45
  200. package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +0 -51
  201. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -19
  202. package/dist/extensions/Blocks/Recommendation/settingsPanel.js +0 -117
  203. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +0 -266
  204. package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -160
  205. package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -152
  206. package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -180
  207. package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +0 -28
  208. package/dist/extensions/Blocks/Unsubscribe/block.js +0 -135
  209. package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
  210. package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
  211. package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
  212. package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
  213. package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
  214. package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
  215. package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
  216. package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
  217. package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
  218. package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
  219. package/dist/extensions/Blocks/common-control.js +0 -248
  220. package/dist/extensions/Blocks/controlFactories.js +0 -223
  221. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +0 -911
  222. package/dist/node_modules/lodash-es/_DataView.js +0 -6
  223. package/dist/node_modules/lodash-es/_Promise.js +0 -6
  224. package/dist/node_modules/lodash-es/_Set.js +0 -6
  225. package/dist/node_modules/lodash-es/_SetCache.js +0 -13
  226. package/dist/node_modules/lodash-es/_WeakMap.js +0 -6
  227. package/dist/node_modules/lodash-es/_arrayFilter.js +0 -10
  228. package/dist/node_modules/lodash-es/_arrayMap.js +0 -8
  229. package/dist/node_modules/lodash-es/_arrayPush.js +0 -8
  230. package/dist/node_modules/lodash-es/_arraySome.js +0 -9
  231. package/dist/node_modules/lodash-es/_baseEach.js +0 -6
  232. package/dist/node_modules/lodash-es/_baseFlatten.js +0 -13
  233. package/dist/node_modules/lodash-es/_baseForOwn.js +0 -8
  234. package/dist/node_modules/lodash-es/_baseGet.js +0 -11
  235. package/dist/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
  236. package/dist/node_modules/lodash-es/_baseHasIn.js +0 -6
  237. package/dist/node_modules/lodash-es/_baseIsEqual.js +0 -8
  238. package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +0 -32
  239. package/dist/node_modules/lodash-es/_baseIsMatch.js +0 -29
  240. package/dist/node_modules/lodash-es/_baseIteratee.js +0 -11
  241. package/dist/node_modules/lodash-es/_baseKeys.js +0 -14
  242. package/dist/node_modules/lodash-es/_baseMap.js +0 -11
  243. package/dist/node_modules/lodash-es/_baseMatches.js +0 -12
  244. package/dist/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
  245. package/dist/node_modules/lodash-es/_baseProperty.js +0 -8
  246. package/dist/node_modules/lodash-es/_basePropertyDeep.js +0 -9
  247. package/dist/node_modules/lodash-es/_baseRange.js +0 -9
  248. package/dist/node_modules/lodash-es/_baseToString.js +0 -18
  249. package/dist/node_modules/lodash-es/_baseTrim.js +0 -8
  250. package/dist/node_modules/lodash-es/_cacheHas.js +0 -6
  251. package/dist/node_modules/lodash-es/_castPath.js +0 -10
  252. package/dist/node_modules/lodash-es/_createBaseEach.js +0 -15
  253. package/dist/node_modules/lodash-es/_createRange.js +0 -11
  254. package/dist/node_modules/lodash-es/_equalArrays.js +0 -40
  255. package/dist/node_modules/lodash-es/_equalByTag.js +0 -45
  256. package/dist/node_modules/lodash-es/_equalObjects.js +0 -36
  257. package/dist/node_modules/lodash-es/_getAllKeys.js +0 -9
  258. package/dist/node_modules/lodash-es/_getMatchData.js +0 -12
  259. package/dist/node_modules/lodash-es/_getSymbols.js +0 -10
  260. package/dist/node_modules/lodash-es/_getTag.js +0 -28
  261. package/dist/node_modules/lodash-es/_hasPath.js +0 -19
  262. package/dist/node_modules/lodash-es/_isFlattenable.js +0 -10
  263. package/dist/node_modules/lodash-es/_isKey.js +0 -12
  264. package/dist/node_modules/lodash-es/_isStrictComparable.js +0 -7
  265. package/dist/node_modules/lodash-es/_mapToArray.js +0 -9
  266. package/dist/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
  267. package/dist/node_modules/lodash-es/_memoizeCapped.js +0 -11
  268. package/dist/node_modules/lodash-es/_nativeKeys.js +0 -5
  269. package/dist/node_modules/lodash-es/_setCacheAdd.js +0 -7
  270. package/dist/node_modules/lodash-es/_setCacheHas.js +0 -6
  271. package/dist/node_modules/lodash-es/_setToArray.js +0 -9
  272. package/dist/node_modules/lodash-es/_stringToPath.js +0 -10
  273. package/dist/node_modules/lodash-es/_toKey.js +0 -10
  274. package/dist/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  275. package/dist/node_modules/lodash-es/flatMap.js +0 -8
  276. package/dist/node_modules/lodash-es/get.js +0 -8
  277. package/dist/node_modules/lodash-es/hasIn.js +0 -8
  278. package/dist/node_modules/lodash-es/isSymbol.js +0 -9
  279. package/dist/node_modules/lodash-es/keys.js +0 -9
  280. package/dist/node_modules/lodash-es/map.js +0 -11
  281. package/dist/node_modules/lodash-es/property.js +0 -10
  282. package/dist/node_modules/lodash-es/range.js +0 -5
  283. package/dist/node_modules/lodash-es/stubArray.js +0 -6
  284. package/dist/node_modules/lodash-es/toFinite.js +0 -14
  285. package/dist/node_modules/lodash-es/toNumber.js +0 -22
  286. package/dist/node_modules/lodash-es/toString.js +0 -7
  287. package/dist/package.json.js +0 -7
  288. package/dist/services/recommendationApi.js +0 -37
  289. package/dist/services/unsubscribeApi.js +0 -16
  290. package/dist/src/@types/generic.d.ts +0 -98
  291. package/dist/src/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -19
  292. package/dist/src/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -16
  293. package/dist/src/components/organisms/onboarding/ItemsOnboarding.vue.d.ts +0 -2
  294. package/dist/src/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -4
  295. package/dist/src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -4
  296. package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
  297. package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
  298. package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
  299. package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
  300. package/dist/src/composables/useBlocksConfig.d.ts +0 -11
  301. package/dist/src/config/compiler/itemsCompilerRules.d.ts +0 -2
  302. package/dist/src/config/migrator/couponBlockMigrator.d.ts +0 -1
  303. package/dist/src/config/migrator/index.d.ts +0 -1
  304. package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
  305. package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
  306. package/dist/src/enums/date.d.ts +0 -4
  307. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -16
  308. package/dist/src/enums/onboarding.d.ts +0 -6
  309. package/dist/src/enums/unsubscribe.d.ts +0 -38
  310. package/dist/src/extensions/Blocks/Checkbox/iconsRegistry.d.ts +0 -4
  311. package/dist/src/extensions/Blocks/Checkbox/template.d.ts +0 -6
  312. package/dist/src/extensions/Blocks/CouponBlock/block.d.ts +0 -12
  313. package/dist/src/extensions/Blocks/CouponBlock/iconsRegistry.d.ts +0 -4
  314. package/dist/src/extensions/Blocks/CouponBlock/settingsPanel.d.ts +0 -4
  315. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +0 -3
  316. package/dist/src/extensions/Blocks/Items/block.d.ts +0 -27
  317. package/dist/src/extensions/Blocks/Items/controls/button/link.d.ts +0 -14
  318. package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +0 -33
  319. package/dist/src/extensions/Blocks/Items/controls/image/link.d.ts +0 -14
  320. package/dist/src/extensions/Blocks/Items/controls/index.d.ts +0 -501
  321. package/dist/src/extensions/Blocks/Items/controls/name/trimming.d.ts +0 -14
  322. package/dist/src/extensions/Blocks/Items/controls/price/currencyLocation.d.ts +0 -19
  323. package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -21
  324. package/dist/src/extensions/Blocks/Items/controls/price/formattedPrice.d.ts +0 -14
  325. package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +0 -13
  326. package/dist/src/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -15
  327. package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +0 -48
  328. package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -62
  329. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -163
  330. package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -50
  331. package/dist/src/extensions/Blocks/Items/iconsRegistry.d.ts +0 -4
  332. package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +0 -43
  333. package/dist/src/extensions/Blocks/Items/template.d.ts +0 -24
  334. package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
  335. package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
  336. package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
  337. package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
  338. package/dist/src/extensions/Blocks/RadioButton/iconsRegistry.d.ts +0 -4
  339. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -11
  340. package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -28
  341. package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -51
  342. package/dist/src/extensions/Blocks/Recommendation/control.d.ts +0 -35
  343. package/dist/src/extensions/Blocks/Recommendation/controls/button/align.d.ts +0 -5
  344. package/dist/src/extensions/Blocks/Recommendation/controls/button/border.d.ts +0 -5
  345. package/dist/src/extensions/Blocks/Recommendation/controls/button/borderRadius.d.ts +0 -5
  346. package/dist/src/extensions/Blocks/Recommendation/controls/button/color.d.ts +0 -5
  347. package/dist/src/extensions/Blocks/Recommendation/controls/button/fitToContent.d.ts +0 -5
  348. package/dist/src/extensions/Blocks/Recommendation/controls/button/fontFamily.d.ts +0 -5
  349. package/dist/src/extensions/Blocks/Recommendation/controls/button/margins.d.ts +0 -5
  350. package/dist/src/extensions/Blocks/Recommendation/controls/button/paddings.d.ts +0 -5
  351. package/dist/src/extensions/Blocks/Recommendation/controls/button/text.d.ts +0 -5
  352. package/dist/src/extensions/Blocks/Recommendation/controls/button/textSize.d.ts +0 -5
  353. package/dist/src/extensions/Blocks/Recommendation/controls/button/textStyleAndFontColor.d.ts +0 -5
  354. package/dist/src/extensions/Blocks/Recommendation/controls/image/margins.d.ts +0 -5
  355. package/dist/src/extensions/Blocks/Recommendation/controls/image/size.d.ts +0 -5
  356. package/dist/src/extensions/Blocks/Recommendation/controls/name/align.d.ts +0 -5
  357. package/dist/src/extensions/Blocks/Recommendation/controls/name/background.d.ts +0 -5
  358. package/dist/src/extensions/Blocks/Recommendation/controls/name/color.d.ts +0 -5
  359. package/dist/src/extensions/Blocks/Recommendation/controls/name/fontFamily.d.ts +0 -5
  360. package/dist/src/extensions/Blocks/Recommendation/controls/name/paddings.d.ts +0 -5
  361. package/dist/src/extensions/Blocks/Recommendation/controls/name/size.d.ts +0 -5
  362. package/dist/src/extensions/Blocks/Recommendation/controls/name/style.d.ts +0 -5
  363. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/align.d.ts +0 -5
  364. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/background.d.ts +0 -5
  365. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/color.d.ts +0 -5
  366. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/fontFamily.d.ts +0 -5
  367. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/paddings.d.ts +0 -5
  368. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/size.d.ts +0 -5
  369. package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/style.d.ts +0 -5
  370. package/dist/src/extensions/Blocks/Recommendation/controls/price/align.d.ts +0 -5
  371. package/dist/src/extensions/Blocks/Recommendation/controls/price/background.d.ts +0 -5
  372. package/dist/src/extensions/Blocks/Recommendation/controls/price/color.d.ts +0 -5
  373. package/dist/src/extensions/Blocks/Recommendation/controls/price/fontFamily.d.ts +0 -5
  374. package/dist/src/extensions/Blocks/Recommendation/controls/price/paddings.d.ts +0 -5
  375. package/dist/src/extensions/Blocks/Recommendation/controls/price/size.d.ts +0 -5
  376. package/dist/src/extensions/Blocks/Recommendation/controls/price/style.d.ts +0 -5
  377. package/dist/src/extensions/Blocks/Recommendation/extension.d.ts +0 -2
  378. package/dist/src/extensions/Blocks/Recommendation/iconsRegistry.d.ts +0 -4
  379. package/dist/src/extensions/Blocks/Recommendation/settingsPanel.d.ts +0 -4
  380. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -555
  381. package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
  382. package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +0 -16
  383. package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -44
  384. package/dist/src/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +0 -7
  385. package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -31
  386. package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
  387. package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
  388. package/dist/src/extensions/Blocks/Unsubscribe/extension.d.ts +0 -2
  389. package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
  390. package/dist/src/extensions/Blocks/Unsubscribe/settingsPanel.d.ts +0 -4
  391. package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
  392. package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
  393. package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
  394. package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
  395. package/dist/src/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
  396. package/dist/src/extensions/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -4
  397. package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
  398. package/dist/src/extensions/Blocks/common-control.d.ts +0 -124
  399. package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -312
  400. package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -13
  401. package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +0 -66
  402. package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
  403. package/dist/src/mock/api/recommendation.d.ts +0 -2
  404. package/dist/src/services/recommendationApi.d.ts +0 -6
  405. package/dist/src/services/unsubscribeApi.d.ts +0 -4
  406. package/dist/src/stores/config.d.ts +0 -104
  407. package/dist/src/stores/unsubscribe.d.ts +0 -256
  408. package/dist/src/utils/dateUtil.d.ts +0 -22
  409. package/dist/src/utils/environmentUtil.d.ts +0 -5
  410. package/dist/src/utils/pairProductVariables.d.ts +0 -7
  411. package/dist/stores/config.js +0 -17
  412. package/dist/utils/environmentUtil.js +0 -4
  413. package/dist/utils/pairProductVariables.js +0 -136
  414. package/dist/{src/@types → @types}/events.d.ts +0 -0
  415. package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
  416. package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
  417. package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
  418. package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
  419. package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
  420. package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
  421. package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
  422. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
  423. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
  424. package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
  425. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
  426. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
  427. package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
  428. package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
  429. package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
  430. package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
  431. package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
  432. package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
  433. package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
  434. package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
  435. package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
  436. package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
  437. package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
  438. package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
  439. package/dist/{src/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts → components/organisms/onboarding/NewVersionPopup.vue.d.ts} +0 -0
  440. package/dist/{src/components/organisms/extensions/recommendation/Filters.vue.d.ts → components/organisms/onboarding/OnboardingWrapper.vue.d.ts} +0 -0
  441. package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
  442. package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
  443. package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
  444. package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +1 -1
  445. /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
  446. /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
  447. /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
  448. /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
  449. /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
  450. /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
  451. /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
  452. /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
  453. /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
  454. /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
  455. /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
  456. /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
  457. /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
  458. /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
  459. /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
  460. /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
  461. /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
  462. /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
  463. /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
  464. /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
  465. /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
  466. /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
  467. /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
  468. /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
  469. /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
  470. /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
  471. /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
  472. /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
  473. /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
  474. /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
  475. /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
  476. /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
  477. /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
  478. /package/dist/{src/enums → enums}/preview.d.ts +0 -0
  479. /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
  480. /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
  481. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
  482. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
  483. /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
  484. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
  485. /package/dist/{src/extensions/Blocks/CouponBlock → extensions/Blocks/RadioButton}/extension.d.ts +0 -0
  486. /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
  487. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
  488. /package/dist/{src/extensions/Blocks/Items → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
  489. /package/dist/{src/extensions/Blocks/Items → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
  490. /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
  491. /package/dist/{src/extensions/Blocks/RadioButton → extensions/DynamicContent}/extension.d.ts +0 -0
  492. /package/dist/{src/library.d.ts → library.d.ts} +0 -0
  493. /package/dist/{src/main.d.ts → main.d.ts} +0 -0
  494. /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
  495. /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
  496. /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
  497. /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
  498. /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
  499. /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
  500. /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
  501. /package/dist/{src/mock → mock}/browser.d.ts +0 -0
  502. /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
  503. /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
  504. /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
  505. /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
  506. /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
  507. /package/dist/{src/utils → utils}/base64.d.ts +0 -0
  508. /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
  509. /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
  510. /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
package/README.md CHANGED
@@ -4,789 +4,309 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
-
8
7
  # @useinsider/guido
9
8
 
10
9
  Guido is a Vue 2 + TypeScript wrapper for the Stripo Email Editor plugin. Easily embed the professional email editor in your Vue applications with a clean, customizable interface.
11
10
 
11
+ ## 📚 Table of Contents
12
+
13
+ - [Install](#-install)
14
+ - [Quick Start](#-quick-start)
15
+ - [Documentation](#-documentation)
16
+ - [Development](#-development)
17
+ - [Contributing](#-contributing)
18
+ - [License](#-license)
19
+
20
+ ## 📖 Documentation
21
+
22
+ **For comprehensive documentation, visit our [Wiki](./wiki/Home.md):**
23
+
24
+ - **[Getting Started Guide](./wiki/Getting-Started.md)** - Installation, setup, and basic usage
25
+ - **[API Reference](./wiki/API-Reference.md)** - Complete API documentation with examples
26
+ - **[HTML Compiler Rules](./wiki/HTML-Compiler-Rules.md)** - Advanced HTML transformation guide
27
+ - **[Architecture](./wiki/Architecture.md)** - Project structure and design patterns
28
+ - **[Contributing Guide](./wiki/Contributing.md)** - Development workflow and coding standards
29
+
12
30
  ## 📦 Install
13
31
 
14
32
  ```bash
15
33
  npm install @useinsider/guido
16
34
  ```
35
+
36
+ Or using bun:
37
+
38
+ ```bash
39
+ bun add @useinsider/guido
40
+ ```
41
+
17
42
  ### Prerequisites
18
- 🍍 Your project should have `pinia`
19
- You need to be sure those lines added in your config file:
20
-
21
- ℹ️ It helps to optimize your dependencies and sharing by Guido. This is why Guido pretty fast and tiny.
22
-
23
- #### For Webpack
24
- `/webpack.config.js` or `/vue.config.js`
25
- ```js
26
- // ... Previous Configs
43
+
44
+ **Required:** Your project must have `pinia` installed.
45
+
46
+ **Bundler Configuration** (required for proper module sharing):
47
+
48
+ <details>
49
+ <summary>Webpack Configuration</summary>
50
+
51
+ ```js
52
+ // webpack.config.js or vue.config.js
53
+ {
27
54
  shared: {
28
55
  vue: { singleton: true },
29
56
  pinia: { singleton: true },
30
- },
31
- // ... Upcoming Configs
32
- ```
57
+ }
58
+ }
59
+ ```
60
+ </details>
61
+
62
+ <details>
63
+ <summary>Vite Configuration</summary>
33
64
 
34
- ##### For Vite:
35
- `/vite.config.js`
36
- ```js
37
- // ... Previous Configs
65
+ ```js
66
+ // vite.config.js
67
+ {
38
68
  resolve: {
39
69
  dedupe: ['vue', 'pinia'],
40
- },
41
- // ... Upcoming Configs
42
- ```
43
- ---
44
- ## 🚀 Usage
70
+ }
71
+ }
72
+ ```
73
+ </details>
45
74
 
46
- ### Basic Usage
75
+ ---
76
+ ## 🚀 Quick Start
47
77
 
48
- ```html
78
+ ```vue
49
79
  <template>
50
- <div>
51
- <Guido
52
- ref="guidoEditor"
53
- :template-id="templateId"
54
- :user-id="userId"
55
- :migration-date="migrationDate"
56
- :guido-config="guidoConfig"
57
- :html="initialHtml"
58
- :css="initialCss"
59
- @dynamic-content:open="handleDynamicContentOpen"
60
- @back="handleBack"
61
- @save:start="handleSaveStart"
62
- @save:complete="handleSaveComplete"
63
- />
64
- </div>
80
+ <Guido
81
+ ref="guidoEditor"
82
+ :template-id="templateId"
83
+ :user-id="userId"
84
+ :guido-config="guidoConfig"
85
+ @save:complete="handleSave"
86
+ />
65
87
  </template>
66
88
 
67
89
  <script lang="ts">
68
90
  import { Guido } from '@useinsider/guido';
91
+ import '@useinsider/guido/style';
69
92
 
70
93
  export default {
71
- components: {
72
- Guido
73
- },
94
+ components: { Guido },
95
+
74
96
  data() {
75
97
  return {
76
98
  templateId: 'template-123',
77
99
  userId: 'user-456',
78
- migrationDate: 1699488000,
79
- initialHtml: '<p>Initial HTML content</p>',
80
- initialCss: 'p { color: #333; }',
81
100
  guidoConfig: {
82
101
  translationsPath: 'window.trans.en',
83
- htmlCompilerRules: [],
84
- ignoreDefaultHtmlCompilerRules: false,
85
- backButtonLabel?: "Back to Design",
102
+ useHeader: true,
103
+ emailHeader: {
104
+ senderName: 'Your Company',
105
+ subject: 'Email Subject'
106
+ },
107
+ partner: {
108
+ partnerName: 'your-partner',
109
+ productType: 1,
110
+ messageType: 1
111
+ },
86
112
  features: {
87
113
  dynamicContent: true,
88
114
  saveAsTemplate: true,
89
- versionHistory: true,
90
- testMessage: true
115
+ versionHistory: true
91
116
  }
92
- },
93
- dynamicContentModalVisible: false
117
+ }
94
118
  };
95
119
  },
96
120
 
97
121
  methods: {
98
- handleDynamicContentOpen(detail) {
99
- console.log('Dynamic content requested:', detail);
100
- this.dynamicContentModalVisible = true;
101
- },
102
-
103
- handleBack() {
104
- console.log('User clicked back button');
105
- // Handle navigation back
106
- },
107
-
108
- handleSaveStart() {
109
- console.log('Save process started');
110
- // Show loading indicator
111
- },
112
-
113
- handleSaveComplete(template) {
114
- console.log('Save completed:', template);
115
- // Handle saved template data
116
- },
117
-
118
- // ⚠️ Your own Dynamic Content Modal should have this id: #guido-dynamic-content-modal
119
- handleDynamicContentInsert() {
120
- this.$refs.guidoEditor?.dynamicContent.insert({
121
- text: 'Display Text',
122
- value: 'actual-value',
123
- fallback: 'Fallback Text'
124
- });
125
-
126
- this.dynamicContentModalVisible = false;
127
- },
128
-
129
- // ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
130
- handleDynamicContentClose() {
131
- this.$refs.guidoEditor?.dynamicContent.close();
132
- },
133
-
134
- // If you need to trigger save manually like leave modal cases, you can use this method.
135
- save () {
136
- this.$refs.guidoEditor?.saveSilent();
122
+ handleSave(template) {
123
+ console.log('Template saved:', template);
137
124
  }
138
125
  }
139
126
  };
140
127
  </script>
141
128
  ```
142
129
 
143
- ## 📚 API
130
+ > For complete usage examples including dynamic content, see the [Getting Started Guide](./wiki/Getting-Started.md)
131
+
132
+ ## 📚 API Quick Reference
144
133
 
145
- ### Guido Component Props
134
+ ### Props
146
135
 
147
- | Prop | Type | Required | Default | Description |
148
- |------|------|----------|---------|-------------|
149
- | `templateId` | `string` | ✅ | - | Unique identifier for the email template |
150
- | `userId` | `string` | ✅ | - | Unique identifier for the user |
151
- | `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
152
- | `migrationDate` | `number` | ✅ | - | Stripo migration date in Unix timestamp (seconds). Retrieved from backend `/partner-settings` endpoint as `migrationDate`. Used for onboarding process |
153
- | `partnerName` | `string` | ⚪ | From URL host | Partner identifier |
154
- | `productType` | `string` | ⚪ | From URL path | Product type identifier |
155
- | `username` | `string` | ⚪ | `'Guido User'` | Display name for the user |
156
- | `html` | `string` | ⚪ | `''` | Initial HTML content for the template |
157
- | `css` | `string` | ⚪ | `''` | Initial CSS styles for the template |
136
+ | Prop | Type | Required | Description |
137
+ |------|------|----------|-------------|
138
+ | `templateId` | `string` | ✅ | Unique identifier for the email template |
139
+ | `userId` | `string` | ✅ | Unique identifier for the user |
140
+ | `guidoConfig` | `GuidoConfig` | ✅ | Configuration object for the editor |
141
+ | `html` | `string` | ⚪ | Initial HTML content |
142
+ | `css` | `string` | ⚪ | Initial CSS styles |
158
143
 
159
- ### Guido Component Events
144
+ ### Events
160
145
 
161
146
  | Event | Payload | Description |
162
147
  |-------|---------|-------------|
163
- | `dynamic-content:open` | `DynamicContent \| null` | Fired when user requests to insert dynamic content |
164
- | `back` | - | Fired when user clicks the back button |
165
- | `save:start` | - | Fired when the save process begins |
166
- | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
167
- | `on-change` | void | It Fires once for managing leave modal etc. |
168
- | `ready` | void | Fired when the editor is ready and template is loaded |
169
- | `onboarding-finished` | void | Fired when the onboarding popup is dismissed or completed, allowing parent applications to track onboarding state |
170
- | `test-email:click` | - | Fired when user clicks the test email button in the header |
171
-
172
- ### Guido Exposed Methods
173
- ```typescript
174
- dynamicContent.insert(DynamicContent);
175
- dynamicContent.close();
176
- saveSilent();
177
- ```
178
-
179
- ### Guido Interfaces
180
-
181
- ```typescript
182
- interface GuidoConfig {
183
- translationsPath: string;
184
- htmlCompilerRules?: CompilerRule[];
185
- ignoreDefaultHtmlCompilerRules?: boolean;
186
- useHeader: boolean
187
- emailHeader: {
188
- senderName: string;
189
- subject: string;
190
- };
191
- partner: {
192
- partnerName: string;
193
- productType: number;
194
- messageType: number;
195
- };
196
- features: {
197
- dynamicContent: boolean;
198
- saveAsTemplate: boolean;
199
- versionHistory: boolean;
200
- testMessage: boolean;
201
- displayConditions: boolean;
202
- };
203
- blocks?: {
204
- excludeDefaults?: GuidoBlockType[];
205
- includeCustoms?: GuidoCustomBlockType[];
206
- };
207
- }
208
- ```
209
-
210
- | Property | Type | Default | Description |
211
- |----------|------|---------|-------------|
212
- | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
213
- | `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
214
- | `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
215
- | `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
216
- | `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
217
- | `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
218
- | `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
219
- | `features.versionHistory` | `boolean` | `true` | Enable version history feature |
220
- | `features.displayConditions` | `boolean` | `true` | Enable display conditions |
221
- | `blocks` | `BlocksConfig` | `{ excludeDefaults: [], includeCustoms: [] }` | Block configuration for excluding default blocks and including custom blocks. See [Blocks Configuration](#-blocks-configuration) section below |
222
- | `blocks.excludeDefaults` | `GuidoBlockType[]` | `[]` | Array of default Stripo blocks to exclude from the editor |
223
- | `blocks.includeCustoms` | `GuidoCustomBlockType[]` | `[]` | Array of custom blocks to include in the editor |
224
-
225
- ```typescript
226
- interface DynamicContent {
227
- value: string;
228
- text: string;
229
- fallback?: string;
230
- }
231
- ```
232
- ---
233
-
234
- | Property | Type | Default | Description |
235
- |----------|------|---------|-------------|
236
- | `value` | `string` | '' | Value of the dynamic content |
237
- | `text` | `string` | '' | Visible value of the dynamic content |
238
- | `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
239
-
240
- ## 🧱 Blocks Configuration
241
-
242
- Guido allows you to customize which blocks are available in the editor. You can exclude default Stripo blocks and selectively include custom blocks to create tailored editing experiences for different product types.
243
-
244
- ### Block Types
245
-
246
- #### Default Blocks (GuidoBlockType)
247
-
248
- These are the standard Stripo email editor blocks that can be excluded:
148
+ | `save:complete` | `Template` | Fired when template is saved |
149
+ | `save:start` | - | Fired when save begins |
150
+ | `dynamic-content:open` | `DynamicContent \| null` | Dynamic content requested |
151
+ | `back` | - | Back button clicked |
152
+ | `ready` | - | Editor is ready |
153
+ | `on-change` | - | Template content changed |
249
154
 
250
- ```typescript
251
- type GuidoBlockType =
252
- | 'amp-accordion' // AMP accordion component
253
- | 'amp-carousel' // AMP image carousel
254
- | 'amp-form-controls' // AMP form elements
255
- | 'banner-block' // Banner/hero section
256
- | 'button-block' // Call-to-action buttons
257
- | 'html-block' // Custom HTML
258
- | 'image-block' // Image elements
259
- | 'menu-block' // Navigation menu
260
- | 'social-block' // Social media links
261
- | 'spacer-block' // Vertical spacing
262
- | 'text-block' // Text content
263
- | 'timer-block' // Countdown timer
264
- | 'video-block' // Video embeds
265
- ```
266
-
267
- #### Custom Blocks (GuidoCustomBlockType)
268
-
269
- These are custom blocks that can be selectively included:
270
-
271
- ```typescript
272
- type GuidoCustomBlockType =
273
- | 'dynamic-content' // Dynamic content merge tags
274
- | 'checkbox-block' // Checkbox form input
275
- | 'radio-button-block' // Radio button form input
276
- | 'recommendation-block' // Product recommendations
277
- | 'unsubscribe-block' // Unsubscribe link
278
- | 'coupon-block' // Coupon/promo code
279
- | 'items-block' // Cart items display
280
- ```
281
-
282
- ### Configuration Examples
283
-
284
- #### Example 1: Exclude Specific Default Blocks
285
-
286
- Disable button, image, and video blocks while keeping all custom blocks:
287
-
288
- ```typescript
289
- const guidoConfig = {
290
- translationsPath: 'window.trans.en',
291
- features: {
292
- dynamicContent: true,
293
- saveAsTemplate: true,
294
- versionHistory: true,
295
- testMessage: true
296
- },
297
- blocks: {
298
- excludeDefaults: ['button-block', 'image-block', 'video-block']
299
- }
300
- };
301
- ```
302
-
303
- **Result:**
304
- - Button, Image, Video blocks disabled
305
- - All other default blocks enabled
306
- - All custom blocks are disabled.
307
-
308
- #### Example 2: Include Only Specific Custom Blocks
309
-
310
- Enable only coupon and recommendation blocks:
311
-
312
- ```typescript
313
- const guidoConfig = {
314
- translationsPath: 'window.trans.en',
315
- features: {
316
- dynamicContent: true,
317
- saveAsTemplate: true,
318
- versionHistory: true,
319
- testMessage: true
320
- },
321
- blocks: {
322
- includeCustoms: ['coupon-block', 'recommendation-block']
323
- }
324
- };
325
- ```
326
-
327
- **Result:**
328
- - All default blocks enabled
329
- - Only Coupon and Recommendation extensions enabled.
330
- - Other custom blocks are disabled
331
-
332
- ### Default Behavior
333
-
334
- When `blocks` is not provided or is `undefined`:
155
+ ### Exposed Methods
335
156
 
336
157
  ```typescript
337
- const guidoConfig = {
338
- translationsPath: 'window.trans.en',
339
- features: {
340
- dynamicContent: true,
341
- saveAsTemplate: true,
342
- versionHistory: true,
343
- testMessage: true
344
- },
345
- // No blocks config
346
- };
347
- ```
348
-
349
- **Result:**
350
- - All 13 default Stripo blocks enabled
351
- - All custom blocks are disabled.
158
+ // Insert dynamic content
159
+ this.$refs.guidoEditor?.dynamicContent.insert({ value, text, fallback });
352
160
 
353
- ### Block Configuration Interface
161
+ // Close dynamic content modal
162
+ this.$refs.guidoEditor?.dynamicContent.close();
354
163
 
355
- ```typescript
356
- interface BlocksConfig {
357
- excludeDefaults?: GuidoBlockType[];
358
- includeCustoms?: GuidoCustomBlockType[];
359
- }
164
+ // Silent save (no notifications)
165
+ this.$refs.guidoEditor?.saveSilent();
360
166
  ```
361
167
 
362
- ### TypeScript Types
363
-
364
- The library exports the following TypeScript types:
365
-
366
- ```typescript
367
- // Main component
368
- import { Guido } from '@useinsider/guido';
369
-
370
- // Types
371
- import type { GuidoConfig } from '@useinsider/guido';
372
- import type { StripoEventType } from '@useinsider/guido';
373
- ```
168
+ > For complete API documentation, see [API Reference](./wiki/API-Reference.md)
374
169
 
375
170
  ## 🔨 HTML Compiler Rules
376
171
 
377
- 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.
172
+ Transform HTML content with custom rules before saving. Supports 4 rule types:
378
173
 
379
- ### Rule Types
380
-
381
- There are 4 types of compiler rules:
382
-
383
- #### 1. Replace Rule
384
- Replace specific strings in HTML content.
174
+ <details>
175
+ <summary><b>1. Replace Rule</b> - String replacement</summary>
385
176
 
386
177
  ```typescript
387
178
  {
388
179
  id: 'fix-encoding',
389
- description: 'Fix URL encoding issues',
390
180
  type: 'replace',
391
- search: '{%22', // String to find
392
- replacement: '%7B%22', // String to replace with
393
- replaceAll: true, // Replace all occurrences (default: true)
394
- priority: 10 // Execution priority (lower = earlier)
181
+ search: '{%22',
182
+ replacement: '%7B%22',
183
+ priority: 10
395
184
  }
396
185
  ```
186
+ </details>
397
187
 
398
- #### 2. Regex Rule
399
- Use regular expressions for complex pattern matching and replacement.
188
+ <details>
189
+ <summary><b>2. Regex Rule</b> - Pattern matching</summary>
400
190
 
401
191
  ```typescript
402
192
  {
403
193
  id: 'remove-comments',
404
- description: 'Remove HTML comments',
405
194
  type: 'regex',
406
- pattern: '<!--.*?-->', // Regex pattern
407
- replacement: '', // Replacement string
408
- flags: 'g', // Regex flags (default: 'g')
195
+ pattern: '<!--.*?-->',
196
+ replacement: '',
197
+ flags: 'g',
409
198
  priority: 20
410
199
  }
411
200
  ```
201
+ </details>
412
202
 
413
- #### 3. Remove Rule
414
- Remove specific strings or patterns from HTML content.
203
+ <details>
204
+ <summary><b>3. Remove Rule</b> - Remove content</summary>
415
205
 
416
206
  ```typescript
417
207
  {
418
208
  id: 'cleanup-scripts',
419
- description: 'Remove unwanted script tags',
420
209
  type: 'remove',
421
- targets: [ // Array of strings or RegExp objects
210
+ targets: [
422
211
  '<script src="unwanted.js"></script>',
423
212
  /onclick="[^"]*"/g
424
213
  ],
425
214
  priority: 30
426
215
  }
427
216
  ```
217
+ </details>
428
218
 
429
- #### 4. Custom Rule
430
- Define complex transformation logic with a custom processor function.
219
+ <details>
220
+ <summary><b>4. Custom Rule</b> - Custom processor</summary>
431
221
 
432
222
  ```typescript
433
223
  {
434
224
  id: 'add-meta-tags',
435
- description: 'Add custom meta tags to head',
436
225
  type: 'custom',
437
226
  processor: (html: string): string => {
438
- // Custom transformation logic
439
227
  const metaTags = '<meta name="custom" content="value">';
440
228
  return html.replace('</head>', `${metaTags}</head>`);
441
229
  },
442
230
  priority: 40
443
231
  }
444
232
  ```
233
+ </details>
445
234
 
446
- ### Using HTML Compiler Rules
447
-
448
- #### Basic Usage with Custom Rules
235
+ ### Quick Example
449
236
 
450
237
  ```typescript
451
238
  const guidoConfig = {
452
- translationsPath: 'window.trans.en',
453
- features: {
454
- dynamicContent: true,
455
- saveAsTemplate: true,
456
- versionHistory: false, // Disable version history
457
- testMessage: true
458
- },
459
239
  htmlCompilerRules: [
460
240
  {
461
241
  id: 'replace-domain',
462
- description: 'Replace old domain with new one',
463
242
  type: 'replace',
464
243
  search: 'old-domain.com',
465
244
  replacement: 'new-domain.com',
466
- replaceAll: true,
467
245
  priority: 10
468
- },
469
- {
470
- id: 'remove-tracking',
471
- description: 'Remove tracking pixels',
472
- type: 'regex',
473
- pattern: '<img[^>]*tracking[^>]*>',
474
- replacement: '',
475
- flags: 'gi',
476
- priority: 20
477
- }
478
- ]
479
- };
480
- ```
481
-
482
- #### Ignoring Default Rules
483
-
484
- ```typescript
485
- const guidoConfig = {
486
- translationsPath: 'window.trans.en',
487
- features: {
488
- dynamicContent: true,
489
- saveAsTemplate: true,
490
- versionHistory: true,
491
- testMessage: true
492
- },
493
- ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
494
- htmlCompilerRules: [
495
- // Only your custom rules will be applied
496
- {
497
- id: 'custom-transformation',
498
- type: 'replace',
499
- search: 'old-text',
500
- replacement: 'new-text',
501
- priority: 1
502
246
  }
503
247
  ]
504
248
  };
505
249
  ```
506
250
 
507
- ### Rule Execution Order
508
-
509
- Rules are executed in priority order (lower numbers first). Rules with the same priority are executed in array order.
510
-
511
- - **Priority 1-99**: Reserved for critical transformations
512
- - **Priority 100-999**: Standard transformations
513
- - **Priority 1000+**: Additional custom rules (automatically assigned)
514
-
515
- ### Default Rules
516
-
517
- Guido includes several default rules for common email HTML optimizations:
518
-
519
- - **URL encoding fixes**: Fixes malformed URL encoding in dynamic content
520
- - **Template tag restoration**: Restores `{{}}` template tags that got URL encoded
521
- - **HTML entity decoding**: Converts `&lt;` and `&gt;` back to `<` and `>`
522
- - **Cleanup rules**: Removes unwanted iframe and style elements
523
- - **MSO conditions**: Manages Outlook-specific conditional comments
524
- - **Domain replacement**: Updates old image domains to current ones
525
-
526
- You can view all default rules in: `src/config/compiler/htmlCompilerRules.ts`
527
-
528
- ### CompilerRule Interface
529
-
530
- ```typescript
531
- type CompilerRuleType = 'replace' | 'regex' | 'remove' | 'custom';
532
-
533
- interface BaseCompilerRule {
534
- id: string;
535
- description?: string;
536
- priority: number;
537
- }
538
-
539
- interface ReplaceRule extends BaseCompilerRule {
540
- type: 'replace';
541
- search: string;
542
- replacement: string;
543
- replaceAll?: boolean; // Default: true
544
- }
545
-
546
- interface RegexRule extends BaseCompilerRule {
547
- type: 'regex';
548
- pattern: string;
549
- replacement: string;
550
- flags?: string; // Default: 'g'
551
- }
552
-
553
- interface RemoveRule extends BaseCompilerRule {
554
- type: 'remove';
555
- targets: (string | RegExp)[]; // Array of strings or RegExp objects
556
- }
557
-
558
- interface CustomRule extends BaseCompilerRule {
559
- type: 'custom';
560
- processor: (html: string) => string;
561
- }
562
-
563
- type CompilerRule = ReplaceRule | RegexRule | RemoveRule | CustomRule;
564
- ```
251
+ > For comprehensive compiler rules documentation, see [HTML Compiler Rules Guide](./wiki/HTML-Compiler-Rules.md)
565
252
 
566
253
  ---
567
254
 
568
255
  ## 🔧 Development
569
256
 
570
- ### Prerequisites
571
-
572
- - 🧄 `Bun` (strongly recommended)
573
- or
574
- - NodeJS 18+ & `npm`
575
-
576
- ### Setup
257
+ ### Quick Commands
577
258
 
578
259
  ```bash
579
260
  # Install dependencies
580
261
  bun install
581
262
 
582
- # Start development server
263
+ # Start dev server (localhost:3000)
583
264
  bun start
584
265
 
585
- # Build for production
266
+ # Build library
586
267
  bun run build
587
268
 
588
- # Type checking
589
- bun run type-check
590
-
591
- # Linting
269
+ # Run linting & type checking
592
270
  bun run lint
593
271
  ```
594
272
 
595
- ### Environment Variables
596
-
597
- Create a `.env` file with the following variables: (You can get env variables from your senior)
598
-
599
- ```env
600
- VITE_STRIPO_PLUGIN_ID=your_plugin_id
601
- VITE_STRIPO_SECRET_KEY=your_secret_key
602
- VITE_STRIPO_ROLE=your_role
603
-
604
- # Playwright Test Configuration (Optional - for local debugging only)
605
- HEADED=false # Set to 'true' to run tests with visible browser
606
- ```
607
-
608
- ### Project Structure
609
-
610
- ```
611
- src/
612
- ├── components/ # Vue components
613
- ├── composables/ # Vue composables & business logic
614
- ├── services/ # API layer
615
- ├── stores/ # State management
616
- ├── @types/ # TypeScript definitions
617
- ├── static/ # Static assets & templates
618
- ├── utils/ # Utility functions
619
- ├── enums/ # Constants & enums
620
- ├── mock/ # Mock data for development
621
- ├── plugins/ # Vue plugins
622
- └── library.ts # Main export
623
- ```
624
-
625
- ## 🔌 Provide/Inject Utilities
626
-
627
- Guido includes type-safe utilities for Vue's provide/inject system to facilitate dependency injection between components.
628
-
629
- ### useProvideInject
630
-
631
- The `useProvideInject` composable provides two helper functions for type-safe dependency injection:
632
-
633
- #### Basic Usage
634
-
635
- ```typescript
636
- // Parent component
637
- import { provideValue } from '@useinsider/guido';
638
- import { InjectionKey } from 'vue';
639
-
640
- // Define a typed injection key
641
- const MyServiceKey: InjectionKey<MyService> = Symbol('MyService');
642
-
643
- // Provide the value
644
- const myService = new MyService();
645
- provideValue(MyServiceKey, myService);
646
-
647
- // Child component
648
- import { useInjectedValue } from '@useinsider/guido';
649
-
650
- // Inject the value with type safety
651
- const myService = useInjectedValue(MyServiceKey);
652
- ```
653
-
654
- #### With Default Value
655
-
656
- ```typescript
657
- // Inject with a fallback value
658
- const myService = useInjectedValue(MyServiceKey, new DefaultService());
659
- ```
660
-
661
- #### Error Handling
662
-
663
- The `useInjectedValue` function will throw a descriptive error if no provider is found and no default value is provided:
664
-
665
- ```typescript
666
- // This will throw an error if no provider exists
667
- try {
668
- const myService = useInjectedValue(MyServiceKey);
669
- } catch (error) {
670
- console.error('No provider found for MyService');
671
- }
672
- ```
673
-
674
- ### API Reference
675
-
676
- #### `provideValue`
677
-
678
- ```typescript
679
- provideValue<T>(key: InjectionKey<T>, value: T): void
680
- ```
681
-
682
- Provides a value using Vue's provide system with type safety.
683
-
684
- | Parameter | Type | Description |
685
- |-----------|------|-------------|
686
- | `key` | `InjectionKey<T>` | The typed injection key |
687
- | `value` | `T` | The value to provide |
688
-
689
- #### `useInjectedValue`
690
-
691
- ```typescript
692
- useInjectedValue<T>(key: InjectionKey<T>, defaultValue?: T): T
693
- ```
694
-
695
- Injects a value using Vue's inject system with type safety and error handling.
696
-
697
- | Parameter | Type | Required | Description |
698
- |-----------|------|----------|-------------|
699
- | `key` | `InjectionKey<T>` | ✅ | The typed injection key |
700
- | `defaultValue` | `T` | ⚪ | Optional fallback value |
701
-
702
- **Returns:** `T` - The injected value
703
-
704
- **Throws:** `Error` - When no provider is found and no default value is provided
705
-
706
- ## 🌐 i18n
707
- 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).
708
- It allows to use production or local translations on your code. 🚀
709
- Example usage:
710
- ```js
711
- import { useTranslations } from '@@/Composables/useTranslations';
712
-
713
- const trans = useTranslations();
714
-
715
- // use everywhere like this:
716
- trans('foo.bar')
717
- ```
718
-
719
- ## 📦 Local Building (Recommended)
273
+ ### Local Testing
720
274
 
721
- Run this commands if you want to test the package on your local before sending to NPM.
722
- ```sh
723
- bun run build
724
- ```
725
-
726
- Since bun does not have packaging yet, use npm here: 🥲
727
- ```sh
728
- npm pack
729
- ```
275
+ Test the package locally before publishing:
730
276
 
731
- It'll crate like `useinsider-guido-1.0.0.tgz` file.
732
-
733
- Move this file to your project path like: `email-fe` via:
734
- ```sh
735
- cp useinsider-guido-1.0.0.tgz ../email-fe
736
- ```
277
+ ```bash
278
+ # Build and create tarball
279
+ bun run build && npm pack
737
280
 
738
- Install the file to your project:
739
- ```sh
740
- npm i ./useinsider-guido-1.0.0.tgz
281
+ # Install in your project
282
+ npm i ./useinsider-guido-1.0.3.tgz
741
283
  ```
742
284
 
743
- Then you just need to rebuild to your project or restart the Container. 🎉
285
+ > For complete development setup, project structure, and contribution guidelines, see [Contributing Guide](./wiki/Contributing.md)
744
286
 
745
- For Future, we can create a shell script for it. Feel free to help 🙃
746
-
747
- ## 📦 Build Output
748
-
749
- The library builds to multiple formats:
287
+ ## 🤝 Contributing
750
288
 
751
- - **ES Module**: `dist/library.js` (recommended)
752
- - **CSS**: `dist/guido.css` (custom styles)
289
+ Contributions are welcome! Please follow these guidelines:
753
290
 
754
- ### Package Exports
291
+ - **PR Title Format**: `TASK-ID | EMOJI | Clear Description`
292
+ - Example: `SD-12345 | ✨ | Add new feature`
293
+ - **PR Requirements**:
294
+ - Fill PR labels
295
+ - Assign to yourself
296
+ - Include tests
297
+ - Pass all checks before review
755
298
 
756
- ```json
757
- {
758
- "exports": {
759
- ".": {
760
- "import": "./dist/library.js",
761
- "types": "./dist/components/Guido.vue.d.ts",
762
- "require": "./dist/components/Guido.vue.js"
763
- },
764
- "./style": "./dist/guido.css"
765
- }
766
- }
767
- ```
768
-
769
- ## 🤝 Contributing
770
- - PR Titles should be structured like `TASK-ID | 🔥 | Some Clear Task Descriptions`
771
- - PR Labels should be filled.
772
- - PR Assignee required.
773
- - Tests should be covered.
774
- - All required checks should be passed before sending review request.
299
+ > For detailed contribution guidelines, see [Contributing Guide](./wiki/Contributing.md)
775
300
 
776
301
  ## 📄 License
777
302
 
778
303
  ISC License
779
304
 
780
- ---
781
-
782
- ## 🔗 Related
305
+ ## 🔗 Related Resources
783
306
 
784
307
  - [Stripo Email Editor](https://stripo.email/) - The underlying email editor
785
308
  - [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
786
309
 
787
- ## 🎯 TODO:
788
- - CSS part should be optimized with variables & `sass-loader`.
789
- - Master Version Generator should be fixed.
790
- - Playwright integrationBoilerplate/control.ts
791
- - Commitlint & Precommit Hooks integration
792
- - Get Pre-built display conditions from API
310
+ ---
311
+
312
+ **Made with ❤️ by the Insider Team**