@useinsider/guido 3.30.0-beta.d4ab5c4 → 3.30.0-beta.da531c5

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 (29) hide show
  1. package/README.md +1 -12
  2. package/dist/components/Guido.vue.js +6 -6
  3. package/dist/components/Guido.vue2.js +95 -97
  4. package/dist/composables/useModuleRepair.js +50 -56
  5. package/dist/composables/useStripo.js +63 -67
  6. package/dist/config/migrator/index.js +14 -15
  7. package/dist/config/migrator/recommendation/cssCascade.js +84 -0
  8. package/dist/config/migrator/recommendation/extractors.js +195 -89
  9. package/dist/config/migrator/recommendation/themeMapper.js +33 -21
  10. package/dist/config/migrator/recommendationMigrator.js +70 -63
  11. package/dist/enums/academy.js +1 -2
  12. package/dist/guido.css +1 -1
  13. package/dist/package.json.js +1 -1
  14. package/dist/src/composables/useModuleRepair.d.ts +1 -1
  15. package/dist/src/config/migrator/index.d.ts +1 -1
  16. package/dist/src/config/migrator/recommendation/cssCascade.d.ts +24 -0
  17. package/dist/src/config/migrator/recommendation/extractors.d.ts +18 -1
  18. package/dist/src/config/migrator/recommendationMigrator.d.ts +2 -1
  19. package/dist/src/enums/academy.d.ts +0 -1
  20. package/dist/src/stores/editor.d.ts +0 -54
  21. package/dist/src/utils/legacyUnsubscribeConversion.d.ts +0 -3
  22. package/dist/stores/editor.js +0 -2
  23. package/dist/utils/legacyUnsubscribeConversion.js +28 -69
  24. package/package.json +1 -1
  25. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.js +0 -17
  26. package/dist/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue2.js +0 -30
  27. package/dist/config/migrator/sfmcUnsubscribeTextMigrator.js +0 -20
  28. package/dist/src/components/organisms/unsubscribe/SfmcUnsubscribeConvertedModal.vue.d.ts +0 -2
  29. package/dist/src/config/migrator/sfmcUnsubscribeTextMigrator.d.ts +0 -1
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-e3abc4e4]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-e3abc4e4]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-e3abc4e4]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
1
+ @charset "UTF-8";.auth-error-modal[data-v-b4d7ae51]{position:relative;z-index:145}.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-9d988e4b] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.color-vision-select__dropdown[data-v-64cb50da]{z-index:20;width:387px}.accessibility-toolbar[data-v-391019bc]{gap:16px}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button svg{margin-right:0}.accessibility-toolbar[data-v-391019bc] .in-segments-wrapper__button .clearfix:after{content:none}.view-options-wrapper[data-v-87033101]{position:relative;display:inline-block}.new-tag[data-v-87033101]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-87033101] .guido__view-option-selection-desktop svg,[data-v-87033101] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-87033101] .in-segments-wrapper__button_selected,[data-v-87033101] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-87033101] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.view-options-wrapper[data-v-6ebabfe4]{position:relative;display:inline-block}.new-tag[data-v-6ebabfe4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-6ebabfe4] .guido__verion-history-view-option-selection-desktop svg,[data-v-6ebabfe4] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6ebabfe4] .in-segments-wrapper__button_selected,[data-v-6ebabfe4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-6ebabfe4] .in-tooltip-wrapper-v2__icon{cursor:pointer}.editor-actions-menu__dropdown[data-v-bdb3b37a]{z-index:20;width:222px}.editor-actions[data-v-9a028d08]{gap:16px}.editor-actions__divider[data-v-9a028d08]{width:1px;height:40px;background-color:#e1e1e1}.right-slot[data-v-77451c9a]{gap:16px}.header-wrapper[data-v-3c713746]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.validation-error-list[data-v-e48cebe9]{gap:16px}.validation-error-row[data-v-e48cebe9]{gap:8px;padding:24px;border:1px solid #E1E1E1;border-radius:8px}.validation-error-row__icon[data-v-e48cebe9]{flex-shrink:0;font-size:24px;line-height:0}.validation-error-row__text[data-v-e48cebe9]{font-size:13px;line-height:16px;color:#292929;word-break:break-word}.guido-editor__wrapper[data-v-4eea8564]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-4eea8564]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-4eea8564]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-eaf8e461]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-eaf8e461]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-eaf8e461]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-eaf8e461]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-eaf8e461]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.guido-tab-bar-onboarding[data-v-219b4f7c]{z-index:21}[data-v-fcba7e99] .vueperslides__bullets{pointer-events:none!important}[data-v-fcba7e99] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-1a34025a] .vueperslides__bullets{pointer-events:none!important}[data-v-1a34025a] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-8fc96a58] .vueperslides__bullets,[data-v-ec2027ff] .vueperslides__bullets,[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}.assign-strategy-drawer .spaced-dot-sep{background-image:linear-gradient(90deg,#91949f 20%,#fff0 0);background-position:center bottom;background-repeat:repeat-x;background-size:5px 1px}.assign-strategy-drawer .spaced-dot-sep--top{background-position:center top}.assign-strategy-drawer .spaced-dot-sep--fc-n:first-child{background:none}.guido-display-condition-create__separator[data-v-929822bc]{height:1px;margin:0 0 24px;background-image:linear-gradient(to right,currentColor 1px,transparent 1px);background-size:5px 1px}.guido-display-condition-create__methods[data-v-929822bc]{gap:16px}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__footer{justify-content:flex-start}.guido-display-condition-select__delete-modal[data-v-0d740001]{position:relative;z-index:145}.guido-display-condition-select__delete-modal[data-v-0d740001] .in-modal-v2-wrapper__header-title{margin-bottom:0}.guido-display-condition-select-root[data-v-0d740001] .in-drawer__content>div{display:flex;flex-direction:column;min-height:100%}.guido-display-condition-select__list[data-v-0d740001]{display:flex;flex-direction:column;gap:24px;margin:0;padding:0;list-style:none}.guido-display-condition-card__header[data-v-0d740001]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px}.guido-display-condition-card__text[data-v-0d740001]{min-width:0}.guido-display-condition-card__name[data-v-0d740001],.guido-display-condition-card__description[data-v-0d740001]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guido-display-condition-card__actions[data-v-0d740001]{display:flex;flex-shrink:0;align-items:center;gap:16px}.guido-display-condition-card__split[data-v-0d740001]{position:relative;display:flex;gap:1px}.guido-display-condition-card__menu[data-v-0d740001]{z-index:2;min-width:115px}.guido-display-condition-card__divider[data-v-0d740001]{width:1px;height:24px}.guido-display-condition-card__code[data-v-0d740001]{margin:1px 15px 15px;padding:8px;font-family:inherit;white-space:pre-wrap;word-break:break-word}.legacy-strategy-updated-modal[data-v-da2225a1]{position:relative;z-index:145}.ambiguous-dynamic-content-modal__content[data-v-2643213c]{padding-bottom:150px}
@@ -1,4 +1,4 @@
1
- const o = "3.30.0-beta.d4ab5c4", s = { stripo: { version: "2.87.0" } }, t = {
1
+ const o = "3.30.0-beta.da531c5", s = { stripo: { version: "2.87.0" } }, t = {
2
2
  version: o,
3
3
  guido: s
4
4
  };
@@ -4,7 +4,7 @@ import { type DynamicContentConversionResult } from '@@/Utils/dynamicContentConv
4
4
  export declare const UNRESOLVED_DYNAMIC_CONTENT_ON_DROP_KEY = "dynamic-content.unresolved-attributes-on-drop";
5
5
  export declare const registerUsedAttributes: (html: string, candidates: DynamicContentCandidate[]) => void;
6
6
  /**
7
- * Repairs dropped/copied saved modules (items currency, unsubscribe → text block,
7
+ * Repairs dropped/copied saved modules (items currency, linkless legacy unsubscribe → text block,
8
8
  * dynamic-content labels → tokens) in one write-back; wired via Stripo's `onModuleAdd` (see `useStripo`).
9
9
  */
10
10
  export declare const useModuleRepair: () => {
@@ -3,4 +3,4 @@ import { type PartnerScopeMigrationOptions } from './recommendationPartnerMigrat
3
3
  export interface MigrationFeatureFlags {
4
4
  itemsPriceFormatting?: boolean;
5
5
  }
6
- export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions, features?: MigrationFeatureFlags) => Promise<string>;
6
+ export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, partnerScope?: PartnerScopeMigrationOptions, features?: MigrationFeatureFlags, css?: string) => Promise<string>;
@@ -0,0 +1,24 @@
1
+ export type StyleDeclaration = {
2
+ prop: string;
3
+ value: string;
4
+ important: boolean;
5
+ };
6
+ export type CssRule = {
7
+ selectors: string[];
8
+ declarations: StyleDeclaration[];
9
+ };
10
+ export type ResolvedStyle = Map<string, {
11
+ value: string;
12
+ position: number;
13
+ }>;
14
+ export declare function parseDeclarations(text: string): StyleDeclaration[];
15
+ /**
16
+ * Parses the top-level style rules of a stylesheet; at-rules such as `@media` are skipped
17
+ * because they apply only to other screen sizes or clients, not to the desktop render.
18
+ */
19
+ export declare function parseCssRules(css: string): CssRule[];
20
+ /**
21
+ * Resolves the element's declared style the way the legacy editor rendered it: matching stylesheet rules,
22
+ * then the inline style, ordered by the CSS cascade (importance, inline over stylesheet, specificity, order).
23
+ */
24
+ export declare function resolveDeclaredStyle(element: Element | null, rules: CssRule[]): ResolvedStyle;
@@ -1,4 +1,5 @@
1
- import type { LegacyPaddingViewport, LegacyVariable } from './types';
1
+ import type { CssRule } from './cssCascade';
2
+ import type { LegacyButtonTheme, LegacyPaddingViewport, LegacyVariable } from './types';
2
3
  export declare function extractTitleText(block: Element): string;
3
4
  /**
4
5
  * Fallback for legacy configs that carry no `p_recommendation_title` variable:
@@ -33,6 +34,22 @@ export declare function isPriceOnNextLine(block: Element): boolean;
33
34
  * @returns The variables, with `textColor` / `textTrimming` filled from the rendered HTML where the theme lacks them
34
35
  */
35
36
  export declare function withRenderedTextTheme(variables: LegacyVariable[] | undefined, block: Element): LegacyVariable[] | undefined;
37
+ /**
38
+ * Reads the first legacy product button's colors, border and internal padding as the legacy editor rendered them.
39
+ * @param block - The legacy recommendation block element
40
+ * @param theme - The legacy button theme; its colors and border are not read again, its internal padding is
41
+ * @param cssRules - The template stylesheet's rules; legacy templates keep the button's text color and border there
42
+ * @returns Only the keys filled from the rendered button, or an empty object
43
+ */
44
+ export declare function extractRenderedButtonTheme(block: Element, theme?: LegacyButtonTheme, cssRules?: CssRule[]): LegacyButtonTheme;
45
+ /**
46
+ * Legacy keeps the product button's colors, border and internal padding on the rendered button and its stylesheet.
47
+ * @param variables - The legacy composition variables
48
+ * @param block - The legacy recommendation block element
49
+ * @param cssRules - The template stylesheet's rules
50
+ * @returns The variables, with the `p_button` theme filled from the rendered button where the theme lacks a value
51
+ */
52
+ export declare function withRenderedButtonTheme(variables: LegacyVariable[] | undefined, block: Element, cssRules?: CssRule[]): LegacyVariable[] | undefined;
36
53
  /**
37
54
  * Card background lives on either the block (`bgcolor`/`style`) or per-card
38
55
  * cells (`.product-card`). Returns empty string when no background is set —
@@ -8,6 +8,7 @@ import type { LegacyRecommendationConfig } from '@@/Types/config';
8
8
  * Migrate all legacy Recommendation Blocks in the given HTML string.
9
9
  * @param html - Full template HTML.
10
10
  * @param recommendationConfigs - Map of campaign-id → legacy config (`Record<string, LegacyRecommendationConfig>`).
11
+ * @param css - The template stylesheet, where legacy templates keep the product button's colors and border.
11
12
  * @returns Migrated HTML, or the original HTML if no legacy blocks exist.
12
13
  */
13
- export declare function migrateRecommendation(html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>): string;
14
+ export declare function migrateRecommendation(html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>, css?: string): string;
@@ -11,6 +11,5 @@ export declare const ACADEMY_LINKS: {
11
11
  readonly EMAIL_DISPLAY_CONDITIONS: "https://academy.insiderone.com/docs/new-editor-add-display-conditions-to-an-email";
12
12
  readonly EMAIL_RECOMMENDATION_BLOCK: "https://academy.insiderone.com/docs/new-editor-email-recommendation-block";
13
13
  readonly LEGACY_UNSUBSCRIBE_MODULE: "https://academy.insiderone.com/docs/new-editor-add-unsubscribe-pages-into-emails";
14
- readonly SFMC_RELAY: "https://academy.insiderone.com/docs/sfmc-relay";
15
14
  };
16
15
  export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
@@ -13,8 +13,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
13
13
  changeSeq: number;
14
14
  isStripoInitialized: boolean;
15
15
  isLegacyUnsubscribeModalRequested: boolean;
16
- isSfmcUnsubscribeModalRequested: boolean;
17
- isUnsubscribeConvertedOnLoad: boolean;
18
16
  templateId: string;
19
17
  syncModulesEnabled: boolean;
20
18
  trackIdSessionFloor: number;
@@ -33,8 +31,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
33
31
  changeSeq: number;
34
32
  isStripoInitialized: boolean;
35
33
  isLegacyUnsubscribeModalRequested: boolean;
36
- isSfmcUnsubscribeModalRequested: boolean;
37
- isUnsubscribeConvertedOnLoad: boolean;
38
34
  templateId: string;
39
35
  syncModulesEnabled: boolean;
40
36
  trackIdSessionFloor: number;
@@ -52,8 +48,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
52
48
  changeSeq: number;
53
49
  isStripoInitialized: boolean;
54
50
  isLegacyUnsubscribeModalRequested: boolean;
55
- isSfmcUnsubscribeModalRequested: boolean;
56
- isUnsubscribeConvertedOnLoad: boolean;
57
51
  templateId: string;
58
52
  syncModulesEnabled: boolean;
59
53
  trackIdSessionFloor: number;
@@ -72,8 +66,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
72
66
  changeSeq: number;
73
67
  isStripoInitialized: boolean;
74
68
  isLegacyUnsubscribeModalRequested: boolean;
75
- isSfmcUnsubscribeModalRequested: boolean;
76
- isUnsubscribeConvertedOnLoad: boolean;
77
69
  templateId: string;
78
70
  syncModulesEnabled: boolean;
79
71
  trackIdSessionFloor: number;
@@ -91,8 +83,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
91
83
  changeSeq: number;
92
84
  isStripoInitialized: boolean;
93
85
  isLegacyUnsubscribeModalRequested: boolean;
94
- isSfmcUnsubscribeModalRequested: boolean;
95
- isUnsubscribeConvertedOnLoad: boolean;
96
86
  templateId: string;
97
87
  syncModulesEnabled: boolean;
98
88
  trackIdSessionFloor: number;
@@ -111,8 +101,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
111
101
  changeSeq: number;
112
102
  isStripoInitialized: boolean;
113
103
  isLegacyUnsubscribeModalRequested: boolean;
114
- isSfmcUnsubscribeModalRequested: boolean;
115
- isUnsubscribeConvertedOnLoad: boolean;
116
104
  templateId: string;
117
105
  syncModulesEnabled: boolean;
118
106
  trackIdSessionFloor: number;
@@ -130,8 +118,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
130
118
  changeSeq: number;
131
119
  isStripoInitialized: boolean;
132
120
  isLegacyUnsubscribeModalRequested: boolean;
133
- isSfmcUnsubscribeModalRequested: boolean;
134
- isUnsubscribeConvertedOnLoad: boolean;
135
121
  templateId: string;
136
122
  syncModulesEnabled: boolean;
137
123
  trackIdSessionFloor: number;
@@ -150,8 +136,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
150
136
  changeSeq: number;
151
137
  isStripoInitialized: boolean;
152
138
  isLegacyUnsubscribeModalRequested: boolean;
153
- isSfmcUnsubscribeModalRequested: boolean;
154
- isUnsubscribeConvertedOnLoad: boolean;
155
139
  templateId: string;
156
140
  syncModulesEnabled: boolean;
157
141
  trackIdSessionFloor: number;
@@ -169,8 +153,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
169
153
  changeSeq: number;
170
154
  isStripoInitialized: boolean;
171
155
  isLegacyUnsubscribeModalRequested: boolean;
172
- isSfmcUnsubscribeModalRequested: boolean;
173
- isUnsubscribeConvertedOnLoad: boolean;
174
156
  templateId: string;
175
157
  syncModulesEnabled: boolean;
176
158
  trackIdSessionFloor: number;
@@ -189,8 +171,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
189
171
  changeSeq: number;
190
172
  isStripoInitialized: boolean;
191
173
  isLegacyUnsubscribeModalRequested: boolean;
192
- isSfmcUnsubscribeModalRequested: boolean;
193
- isUnsubscribeConvertedOnLoad: boolean;
194
174
  templateId: string;
195
175
  syncModulesEnabled: boolean;
196
176
  trackIdSessionFloor: number;
@@ -208,8 +188,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
208
188
  changeSeq: number;
209
189
  isStripoInitialized: boolean;
210
190
  isLegacyUnsubscribeModalRequested: boolean;
211
- isSfmcUnsubscribeModalRequested: boolean;
212
- isUnsubscribeConvertedOnLoad: boolean;
213
191
  templateId: string;
214
192
  syncModulesEnabled: boolean;
215
193
  trackIdSessionFloor: number;
@@ -228,8 +206,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
228
206
  changeSeq: number;
229
207
  isStripoInitialized: boolean;
230
208
  isLegacyUnsubscribeModalRequested: boolean;
231
- isSfmcUnsubscribeModalRequested: boolean;
232
- isUnsubscribeConvertedOnLoad: boolean;
233
209
  templateId: string;
234
210
  syncModulesEnabled: boolean;
235
211
  trackIdSessionFloor: number;
@@ -247,8 +223,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
247
223
  changeSeq: number;
248
224
  isStripoInitialized: boolean;
249
225
  isLegacyUnsubscribeModalRequested: boolean;
250
- isSfmcUnsubscribeModalRequested: boolean;
251
- isUnsubscribeConvertedOnLoad: boolean;
252
226
  templateId: string;
253
227
  syncModulesEnabled: boolean;
254
228
  trackIdSessionFloor: number;
@@ -267,8 +241,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
267
241
  changeSeq: number;
268
242
  isStripoInitialized: boolean;
269
243
  isLegacyUnsubscribeModalRequested: boolean;
270
- isSfmcUnsubscribeModalRequested: boolean;
271
- isUnsubscribeConvertedOnLoad: boolean;
272
244
  templateId: string;
273
245
  syncModulesEnabled: boolean;
274
246
  trackIdSessionFloor: number;
@@ -286,8 +258,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
286
258
  changeSeq: number;
287
259
  isStripoInitialized: boolean;
288
260
  isLegacyUnsubscribeModalRequested: boolean;
289
- isSfmcUnsubscribeModalRequested: boolean;
290
- isUnsubscribeConvertedOnLoad: boolean;
291
261
  templateId: string;
292
262
  syncModulesEnabled: boolean;
293
263
  trackIdSessionFloor: number;
@@ -306,8 +276,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
306
276
  changeSeq: number;
307
277
  isStripoInitialized: boolean;
308
278
  isLegacyUnsubscribeModalRequested: boolean;
309
- isSfmcUnsubscribeModalRequested: boolean;
310
- isUnsubscribeConvertedOnLoad: boolean;
311
279
  templateId: string;
312
280
  syncModulesEnabled: boolean;
313
281
  trackIdSessionFloor: number;
@@ -325,8 +293,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
325
293
  changeSeq: number;
326
294
  isStripoInitialized: boolean;
327
295
  isLegacyUnsubscribeModalRequested: boolean;
328
- isSfmcUnsubscribeModalRequested: boolean;
329
- isUnsubscribeConvertedOnLoad: boolean;
330
296
  templateId: string;
331
297
  syncModulesEnabled: boolean;
332
298
  trackIdSessionFloor: number;
@@ -345,8 +311,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
345
311
  changeSeq: number;
346
312
  isStripoInitialized: boolean;
347
313
  isLegacyUnsubscribeModalRequested: boolean;
348
- isSfmcUnsubscribeModalRequested: boolean;
349
- isUnsubscribeConvertedOnLoad: boolean;
350
314
  templateId: string;
351
315
  syncModulesEnabled: boolean;
352
316
  trackIdSessionFloor: number;
@@ -364,8 +328,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
364
328
  changeSeq: number;
365
329
  isStripoInitialized: boolean;
366
330
  isLegacyUnsubscribeModalRequested: boolean;
367
- isSfmcUnsubscribeModalRequested: boolean;
368
- isUnsubscribeConvertedOnLoad: boolean;
369
331
  templateId: string;
370
332
  syncModulesEnabled: boolean;
371
333
  trackIdSessionFloor: number;
@@ -384,8 +346,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
384
346
  changeSeq: number;
385
347
  isStripoInitialized: boolean;
386
348
  isLegacyUnsubscribeModalRequested: boolean;
387
- isSfmcUnsubscribeModalRequested: boolean;
388
- isUnsubscribeConvertedOnLoad: boolean;
389
349
  templateId: string;
390
350
  syncModulesEnabled: boolean;
391
351
  trackIdSessionFloor: number;
@@ -403,8 +363,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
403
363
  changeSeq: number;
404
364
  isStripoInitialized: boolean;
405
365
  isLegacyUnsubscribeModalRequested: boolean;
406
- isSfmcUnsubscribeModalRequested: boolean;
407
- isUnsubscribeConvertedOnLoad: boolean;
408
366
  templateId: string;
409
367
  syncModulesEnabled: boolean;
410
368
  trackIdSessionFloor: number;
@@ -423,8 +381,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
423
381
  changeSeq: number;
424
382
  isStripoInitialized: boolean;
425
383
  isLegacyUnsubscribeModalRequested: boolean;
426
- isSfmcUnsubscribeModalRequested: boolean;
427
- isUnsubscribeConvertedOnLoad: boolean;
428
384
  templateId: string;
429
385
  syncModulesEnabled: boolean;
430
386
  trackIdSessionFloor: number;
@@ -442,8 +398,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
442
398
  changeSeq: number;
443
399
  isStripoInitialized: boolean;
444
400
  isLegacyUnsubscribeModalRequested: boolean;
445
- isSfmcUnsubscribeModalRequested: boolean;
446
- isUnsubscribeConvertedOnLoad: boolean;
447
401
  templateId: string;
448
402
  syncModulesEnabled: boolean;
449
403
  trackIdSessionFloor: number;
@@ -462,8 +416,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
462
416
  changeSeq: number;
463
417
  isStripoInitialized: boolean;
464
418
  isLegacyUnsubscribeModalRequested: boolean;
465
- isSfmcUnsubscribeModalRequested: boolean;
466
- isUnsubscribeConvertedOnLoad: boolean;
467
419
  templateId: string;
468
420
  syncModulesEnabled: boolean;
469
421
  trackIdSessionFloor: number;
@@ -481,8 +433,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
481
433
  changeSeq: number;
482
434
  isStripoInitialized: boolean;
483
435
  isLegacyUnsubscribeModalRequested: boolean;
484
- isSfmcUnsubscribeModalRequested: boolean;
485
- isUnsubscribeConvertedOnLoad: boolean;
486
436
  templateId: string;
487
437
  syncModulesEnabled: boolean;
488
438
  trackIdSessionFloor: number;
@@ -501,8 +451,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
501
451
  changeSeq: number;
502
452
  isStripoInitialized: boolean;
503
453
  isLegacyUnsubscribeModalRequested: boolean;
504
- isSfmcUnsubscribeModalRequested: boolean;
505
- isUnsubscribeConvertedOnLoad: boolean;
506
454
  templateId: string;
507
455
  syncModulesEnabled: boolean;
508
456
  trackIdSessionFloor: number;
@@ -520,8 +468,6 @@ export declare const useEditorStore: import("pinia").StoreDefinition<"guidoEdito
520
468
  changeSeq: number;
521
469
  isStripoInitialized: boolean;
522
470
  isLegacyUnsubscribeModalRequested: boolean;
523
- isSfmcUnsubscribeModalRequested: boolean;
524
- isUnsubscribeConvertedOnLoad: boolean;
525
471
  templateId: string;
526
472
  syncModulesEnabled: boolean;
527
473
  trackIdSessionFloor: number;
@@ -5,9 +5,6 @@ export interface LegacyUnsubscribeConversionResult {
5
5
  converted: boolean;
6
6
  }
7
7
  export declare const hasLegacyUnsubscribeClass: (html: string) => boolean;
8
- export declare const hasAnyUnsubscribeClass: (html: string) => boolean;
9
8
  export declare const convertLinklessLegacyUnsubscribeBlocks: (root: ParentNode) => number;
10
9
  export declare const convertLegacyUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
11
10
  export declare const convertLegacyUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
12
- export declare const convertAllUnsubscribeInModuleHtml: (html: string) => LegacyUnsubscribeConversionResult;
13
- export declare const convertAllUnsubscribeInDocumentHtml: (html: string) => LegacyUnsubscribeConversionResult;
@@ -17,8 +17,6 @@ const o = e("guidoEditor", {
17
17
  changeSeq: 0,
18
18
  isStripoInitialized: !1,
19
19
  isLegacyUnsubscribeModalRequested: !1,
20
- isSfmcUnsubscribeModalRequested: !1,
21
- isUnsubscribeConvertedOnLoad: !1,
22
20
  templateId: "",
23
21
  syncModulesEnabled: !1,
24
22
  // In-session id high-water mark; floors tracking-id minting so ids
@@ -1,90 +1,49 @@
1
- import { hasInsiderUnsubscribeCode as f } from "../composables/validators/useUnsubscribeBlockValidator.js";
2
- import { UNSUBSCRIBE_LINK_SELECTOR as A } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
3
- import { protectLiquid as C, restoreLiquid as _ } from "./liquidProtection.js";
4
- const u = "td.unsubscribe-block", p = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], v = `${u}, .unsubscribe-block-v2`, y = "esd-block-text", U = [
1
+ import { protectLiquid as a, restoreLiquid as u } from "./liquidProtection.js";
2
+ const b = "td.unsubscribe-block", l = ["a.unsubscribe-link", 'a[href*="unsubscribe"]'], d = "esd-block-text", m = [
5
3
  "unsubscribe-block",
6
4
  "esd-extension",
7
5
  "esd-extension-block",
8
6
  "esd-unsubscribe-block",
9
7
  "esd-block-unsubscribe"
10
- ], h = "unsubscribe-block-v2", T = "esd-extension-block-id", l = "data-unsubscribe-", g = "unsubscribe-link", k = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", I = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), N = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?:-v2)?(?![\\w-])`, "i"), R = (e) => typeof e == "string" && I.test(e), B = (e) => p.some((t) => e.querySelector(t) !== null), b = (e) => {
11
- e.classList.remove(...U), e.classList.add(y), e.removeAttribute(T), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(l)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(k) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
12
- }, O = (e) => {
13
- const t = e.getAttribute("href") ?? "";
14
- return f(t) || t.trim() === "" && e.matches(A);
15
- }, M = (e) => {
16
- e.classList.remove(g), e.classList.length === 0 && e.removeAttribute("class"), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(l)).forEach(({ name: t }) => e.removeAttribute(t));
17
- }, x = (e) => {
18
- Array.from(e.querySelectorAll("a")).forEach((t) => {
19
- if (O(t)) {
20
- t.replaceWith(...Array.from(t.childNodes));
21
- return;
22
- }
23
- M(t);
24
- });
25
- }, q = (e) => typeof e == "string" && N.test(e), D = (e) => {
26
- const t = Array.from(e.querySelectorAll(v));
27
- return t.forEach((r) => {
28
- r.classList.remove(h), x(r), b(r);
29
- }), t.length;
30
- }, H = (e) => {
31
- const t = Array.from(e.querySelectorAll(u)).filter((r) => !B(r));
32
- return t.forEach(b), t.length;
33
- }, a = (e) => {
8
+ ], L = "esd-extension-block-id", S = "data-unsubscribe-", E = "address,article,aside,blockquote,center,details,dialog,dir,div,dd,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,li,listing,main,menu,nav,ol,p,plaintext,pre,search,section,summary,table,ul,xmp", f = new RegExp(`class\\s*=\\s*(?:["'][^"']*)?(?<![\\w-])unsubscribe-block(?![\\w-])`, "i"), p = (e) => typeof e == "string" && f.test(e), y = (e) => l.some((t) => e.querySelector(t) !== null), g = (e) => {
9
+ e.classList.remove(...m), e.classList.add(d), e.removeAttribute(L), Array.from(e.attributes).filter(({ name: t }) => t.startsWith(S)).forEach(({ name: t }) => e.removeAttribute(t)), e.querySelector(E) || (e.innerHTML = `<p path="1">${e.innerHTML}</p>`);
10
+ }, h = (e) => {
11
+ const t = Array.from(e.querySelectorAll(b)).filter((r) => !y(r));
12
+ return t.forEach(g), t.length;
13
+ }, v = (e) => {
34
14
  const t = e.trimStart(), r = new DOMParser();
35
15
  return /^<t[dh][\s>]/i.test(t) ? r.parseFromString(`<table><tbody><tr>${e}</tr></tbody></table>`, "text/html").querySelector("tr") : /^<tr[\s>]/i.test(t) ? r.parseFromString(`<table><tbody>${e}</tbody></table>`, "text/html").querySelector("tbody") : /^<table[\s>]/i.test(t) ? r.parseFromString(e, "text/html").body : (console.debug("[LegacyUnsubscribeConversion] Skipped module with a non-table root"), null);
36
- }, d = (e) => {
16
+ }, c = (e) => {
37
17
  const t = e.search(/<html[\s>]/i), r = [...e.matchAll(/<\/html\s*>/gi)].at(-1), s = (r == null ? void 0 : r.index) === void 0 ? -1 : r.index + r[0].length;
38
18
  return t < 0 || s <= t ? { head: "", root: e, tail: "" } : { head: e.slice(0, t), root: e.slice(t, s), tail: e.slice(s) };
39
- }, K = {
40
- detect: R,
41
- convertCells: H
42
- }, S = {
43
- detect: q,
44
- convertCells: D
45
- }, n = (e, t, r, s, i = K) => {
46
- if (!i.detect(e))
19
+ }, i = (e, t, r, s) => {
20
+ if (!p(e))
47
21
  return { html: e, converted: !1 };
48
22
  try {
49
- const o = C(e), c = t(o);
50
- return !c || i.convertCells(c) === 0 ? { html: e, converted: !1 } : { html: _(r(c, o)), converted: !0 };
23
+ const o = a(e), n = t(o);
24
+ return !n || h(n) === 0 ? { html: e, converted: !1 } : { html: u(r(n, o)), converted: !0 };
51
25
  } catch (o) {
52
26
  return console.error(`Failed to convert legacy unsubscribe blocks in ${s}:`, o), { html: e, converted: !1 };
53
27
  }
54
- }, m = (e) => e.innerHTML, E = (e) => new DOMParser().parseFromString(d(e).root, "text/html"), L = (e, t) => {
55
- const { head: r, tail: s } = d(t);
56
- return `${r}${e.documentElement.outerHTML}${s}`;
57
- }, F = (e) => n(
28
+ }, C = (e) => i(
58
29
  e,
59
- a,
60
- m,
30
+ v,
31
+ (t) => t.innerHTML,
61
32
  "module"
62
- ), G = (e) => n(
33
+ ), _ = (e) => i(
63
34
  e,
64
- E,
65
- L,
35
+ (t) => new DOMParser().parseFromString(c(t).root, "text/html"),
36
+ (t, r) => {
37
+ const { head: s, tail: o } = c(r);
38
+ return `${s}${t.documentElement.outerHTML}${o}`;
39
+ },
66
40
  "document"
67
- ), P = (e) => n(
68
- e,
69
- a,
70
- m,
71
- "module",
72
- S
73
- ), V = (e) => n(
74
- e,
75
- E,
76
- L,
77
- "document",
78
- S
79
41
  );
80
42
  export {
81
- p as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
82
- u as LEGACY_UNSUBSCRIBE_SELECTOR,
83
- V as convertAllUnsubscribeInDocumentHtml,
84
- P as convertAllUnsubscribeInModuleHtml,
85
- G as convertLegacyUnsubscribeInDocumentHtml,
86
- F as convertLegacyUnsubscribeInModuleHtml,
87
- H as convertLinklessLegacyUnsubscribeBlocks,
88
- q as hasAnyUnsubscribeClass,
89
- R as hasLegacyUnsubscribeClass
43
+ l as LEGACY_UNSUBSCRIBE_LINK_SELECTORS,
44
+ b as LEGACY_UNSUBSCRIBE_SELECTOR,
45
+ _ as convertLegacyUnsubscribeInDocumentHtml,
46
+ C as convertLegacyUnsubscribeInModuleHtml,
47
+ h as convertLinklessLegacyUnsubscribeBlocks,
48
+ p as hasLegacyUnsubscribeClass
90
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.30.0-beta.d4ab5c4",
3
+ "version": "3.30.0-beta.da531c5",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,17 +0,0 @@
1
- import t from "./SfmcUnsubscribeConvertedModal.vue2.js";
2
- import r from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var n = function() {
4
- var o = this, s = o._self._c, e = o._self._setupProxy;
5
- return e.isVisible ? s(e.WpModal, { attrs: { id: "guido__sfmc-unsubscribe-converted-modal", "close-on-outside-click": !1, "footer-button-options": e.footerButtonOptions, title: e.trans("email-editor.sfmc-unsubscribe-converted-modal-title") }, on: { close: e.close, "primary-action": e.close, "secondary-action": e.openAcademy } }, [s("p", [o._v(o._s(e.trans("email-editor.sfmc-unsubscribe-converted-modal-message")))])]) : o._e();
6
- }, c = [], i = /* @__PURE__ */ r(
7
- t,
8
- n,
9
- c,
10
- !1,
11
- null,
12
- null
13
- );
14
- const m = i.exports;
15
- export {
16
- m as default
17
- };
@@ -1,30 +0,0 @@
1
- import { defineComponent as n, computed as t } from "vue";
2
- import i from "../../wrappers/WpModal.vue.js";
3
- import { useTranslations as a } from "../../../composables/useTranslations.js";
4
- import { ACADEMY_LINKS as c } from "../../../enums/academy.js";
5
- import { useEditorStore as m } from "../../../stores/editor.js";
6
- const S = /* @__PURE__ */ n({
7
- __name: "SfmcUnsubscribeConvertedModal",
8
- setup(p) {
9
- const o = a(), e = m(), r = t(
10
- () => e.isSfmcUnsubscribeModalRequested && e.isStripoInitialized
11
- ), s = t(() => ({
12
- secondaryButton: {
13
- type: "subtle-primary",
14
- labelText: o("email-editor.legacy-unsubscribe-converted-modal-visit-academy")
15
- },
16
- primaryButton: {
17
- type: "primary",
18
- labelText: o("action-builder.ok")
19
- }
20
- }));
21
- return { __sfc: !0, trans: o, editorStore: e, isVisible: r, footerButtonOptions: s, close: () => {
22
- e.isSfmcUnsubscribeModalRequested = !1;
23
- }, openAcademy: () => {
24
- window.open(c.SFMC_RELAY, "_blank", "noopener,noreferrer");
25
- }, WpModal: i };
26
- }
27
- });
28
- export {
29
- S as default
30
- };
@@ -1,20 +0,0 @@
1
- import { useConfigStore as s } from "../../stores/config.js";
2
- import { useEditorStore as n } from "../../stores/editor.js";
3
- import { hasAnyUnsubscribeClass as i, convertAllUnsubscribeInDocumentHtml as c } from "../../utils/legacyUnsubscribeConversion.js";
4
- const a = (r) => {
5
- try {
6
- if (!i(r) || !s().isFeatureEnabled("blockUnsubscribeLinks"))
7
- return r;
8
- const { html: e, converted: o } = c(r);
9
- if (o) {
10
- const t = n();
11
- t.isSfmcUnsubscribeModalRequested = !0, t.isUnsubscribeConvertedOnLoad = !0;
12
- }
13
- return e;
14
- } catch (e) {
15
- return console.error("SfmcUnsubscribeTextMigrator failed:", e), r;
16
- }
17
- };
18
- export {
19
- a as migrateSfmcUnsubscribeText
20
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
2
- export default _default;
@@ -1 +0,0 @@
1
- export declare const migrateSfmcUnsubscribeText: (html: string) => string;