@useinsider/guido 1.4.4 → 2.0.0-beta.015a9b6

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 (115) hide show
  1. package/README.md +295 -664
  2. package/dist/@types/config/defaults.js +44 -0
  3. package/dist/@types/config/schemas.js +231 -0
  4. package/dist/@types/config/validator.js +56 -0
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +64 -86
  7. package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +7 -7
  8. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
  9. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +4 -3
  10. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
  11. package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -22
  12. package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
  13. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
  14. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
  15. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +10 -10
  16. package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
  17. package/dist/components/organisms/header/LeftSlot.vue.js +2 -2
  18. package/dist/components/organisms/header/LeftSlot.vue2.js +18 -15
  19. package/dist/components/organisms/header/MiddleSlot.vue.js +1 -1
  20. package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
  21. package/dist/components/organisms/header/RightSlot.vue.js +12 -12
  22. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +22 -19
  23. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
  24. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
  25. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  26. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
  27. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
  28. package/dist/composables/useActionsApi.js +42 -25
  29. package/dist/composables/useBlocksConfig.js +23 -20
  30. package/dist/composables/useConfig.js +51 -5
  31. package/dist/composables/useHtmlCompiler.js +20 -19
  32. package/dist/composables/useHtmlValidator.js +41 -41
  33. package/dist/composables/usePartner.js +19 -9
  34. package/dist/composables/useStripo.js +51 -50
  35. package/dist/composables/useTimerClone.js +53 -0
  36. package/dist/composables/useTranslations.js +3 -2
  37. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  38. package/dist/enums/defaults.js +4 -67
  39. package/dist/enums/unsubscribe.js +23 -20
  40. package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
  41. package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
  42. package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
  43. package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
  44. package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
  45. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +12 -11
  46. package/dist/extensions/Blocks/controlFactories.js +122 -111
  47. package/dist/guido.css +1 -1
  48. package/dist/library.js +12 -2
  49. package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
  50. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  51. package/dist/node_modules/valibot/dist/index.js +476 -103
  52. package/dist/services/stripoApi.js +13 -14
  53. package/dist/services/templateLibraryApi.js +18 -18
  54. package/dist/src/@types/config/defaults.d.ts +68 -0
  55. package/dist/src/@types/config/index.d.ts +14 -0
  56. package/dist/src/@types/config/schemas.d.ts +509 -0
  57. package/dist/src/@types/config/types.d.ts +142 -0
  58. package/dist/src/@types/config/validator.d.ts +119 -0
  59. package/dist/src/@types/generic.d.ts +4 -45
  60. package/dist/src/components/Guido.vue.d.ts +13 -12
  61. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  62. package/dist/src/composables/useActionsApi.d.ts +2 -0
  63. package/dist/src/composables/useConfig.d.ts +186 -2
  64. package/dist/src/composables/usePartner.d.ts +8 -0
  65. package/dist/src/composables/useTimerClone.d.ts +6 -0
  66. package/dist/src/enums/defaults.d.ts +5 -6
  67. package/dist/src/enums/unsubscribe.d.ts +5 -1
  68. package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
  69. package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
  70. package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
  71. package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
  72. package/dist/src/library.d.ts +3 -1
  73. package/dist/src/stores/config.d.ts +1564 -102
  74. package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
  75. package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
  76. package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
  77. package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
  78. package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
  79. package/dist/static/styles/components/narrow-panel.css.js +0 -10
  80. package/dist/stores/config.js +141 -9
  81. package/package.json +1 -1
  82. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
  83. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
  84. package/dist/node_modules/lodash-es/_apply.js +0 -16
  85. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  86. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  87. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  88. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  89. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  90. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  91. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  92. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  93. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  94. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  95. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  96. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  97. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  98. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  99. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  100. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  101. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  102. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  103. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  104. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  105. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  106. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  107. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  108. package/dist/node_modules/lodash-es/constant.js +0 -8
  109. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  110. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  111. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  112. package/dist/node_modules/lodash-es/merge.js +0 -8
  113. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
  114. package/dist/static/assets/inbox-mockup.svg.js +0 -4
  115. package/dist/static/assets/phone-mockup.svg.js +0 -4
@@ -12,8 +12,9 @@
12
12
  import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
13
13
  /**
14
14
  * Factory function to create text align controls for different block elements
15
+ * When targetBlockId and containerSelector are not provided, applies directly to root
15
16
  */
16
- export declare function createTextAlignControl(controlId: string, targetBlockId: string, containerSelector: string): {
17
+ export declare function createTextAlignControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
17
18
  new (): {
18
19
  getId(): string;
19
20
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -27,8 +28,9 @@ export declare function createTextAlignControl(controlId: string, targetBlockId:
27
28
  };
28
29
  /**
29
30
  * Factory function to create text color controls for different block elements
31
+ * When targetBlockId and containerSelector are not provided, applies directly to root
30
32
  */
31
- export declare function createTextColorControl(controlId: string, targetBlockId: string, containerSelector?: string): {
33
+ export declare function createTextColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
32
34
  new (): {
33
35
  getId(): string;
34
36
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -42,8 +44,9 @@ export declare function createTextColorControl(controlId: string, targetBlockId:
42
44
  };
43
45
  /**
44
46
  * Factory function to create text size controls for different block elements
47
+ * When targetBlockId and containerSelector are not provided, applies directly to root
45
48
  */
46
- export declare function createTextSizeControl(controlId: string, targetBlockId: string, containerSelector?: string): {
49
+ export declare function createTextSizeControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
47
50
  new (): {
48
51
  getId(): string;
49
52
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -57,8 +60,9 @@ export declare function createTextSizeControl(controlId: string, targetBlockId:
57
60
  };
58
61
  /**
59
62
  * Factory function to create text style controls for different block elements
63
+ * When targetBlockId and containerSelector are not provided, applies directly to root
60
64
  */
61
- export declare function createTextStyleControl(controlId: string, targetBlockId: string, containerSelector?: string): {
65
+ export declare function createTextStyleControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
62
66
  new (): {
63
67
  getId(): string;
64
68
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -72,8 +76,9 @@ export declare function createTextStyleControl(controlId: string, targetBlockId:
72
76
  };
73
77
  /**
74
78
  * Factory function to create text font family controls for different block elements
79
+ * When targetBlockId and containerSelector are not provided, applies directly to root
75
80
  */
76
- export declare function createTextFontFamilyControl(controlId: string, targetBlockId: string, containerSelector?: string): {
81
+ export declare function createTextFontFamilyControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
77
82
  new (): {
78
83
  getId(): string;
79
84
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -87,8 +92,9 @@ export declare function createTextFontFamilyControl(controlId: string, targetBlo
87
92
  };
88
93
  /**
89
94
  * Factory function to create text background color controls for different block elements
95
+ * When targetBlockId and containerSelector are not provided, applies directly to root
90
96
  */
91
- export declare function createTextBackgroundColorControl(controlId: string, targetBlockId: string, containerSelector?: string): {
97
+ export declare function createTextBackgroundColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
92
98
  new (): {
93
99
  getId(): string;
94
100
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -102,8 +108,25 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
102
108
  };
103
109
  /**
104
110
  * Factory function to create paddings controls for different block elements
111
+ * When targetBlockId and containerSelector are not provided, applies directly to root
105
112
  */
106
- export declare function createPaddingsControl(controlId: string, targetBlockId: string, containerSelector?: string): {
113
+ export declare function createPaddingsControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
114
+ new (): {
115
+ getId(): string;
116
+ getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
117
+ getParentControlId(): string;
118
+ api: import("@stripoinc/ui-editor-extensions").ControlApi;
119
+ getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
120
+ getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
121
+ getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
122
+ isVisible(_node: ImmutableHtmlNode): boolean;
123
+ };
124
+ };
125
+ /**
126
+ * Factory function to create text line spacing controls for different block elements
127
+ * When targetBlockId and containerSelector are not provided, applies directly to root
128
+ */
129
+ export declare function createTextLineSpacingControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
107
130
  new (): {
108
131
  getId(): string;
109
132
  getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
@@ -1,3 +1,5 @@
1
1
  export { default as Guido } from './components/Guido.vue';
2
+ export type { GuidoConfig, GuidoConfigInput, IdentityConfig, PartnerConfig, TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, DynamicContent, EmailHeader, DefaultBlockType, CustomBlockType, ValidationResult, ValidationError, } from './@types/config';
3
+ export { validateConfig, parseConfig, parseConfigSafe, isValidConfig, getValidationErrors, MessageType, ProductType, } from './@types/config';
2
4
  export type { StripoEventType } from './@types/events';
3
- export type * from './@types/generic';
5
+ export type { PositionData, DynamicContentEvent, MergeTagClickEvent, MergeTag, BaseDynamicContent, TooltipOptions, TextValueObject, L10n, } from './@types/generic';