@designcrowd/library.brand-page 6.1.14 → 6.1.16

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 (93) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CNqGW-GB.js → CreatedOnBrandCrowd-de-de-CmNhDMIf.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BWZeor_R.js → CreatedOnBrandCrowd-en-us-DgplxxWa.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D_-5Qdpd.js → CreatedOnBrandCrowd-es-es-DFdhFOa1.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BC6Xo2uA.js → CreatedOnBrandCrowd-fr-ca-DjLCWBLB.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BC6Xo2uA.js → CreatedOnBrandCrowd-fr-fr-DjLCWBLB.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-D10DwNv3.js → CreatedOnBrandCrowd-pt-br-CI2XD0OS.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-D10DwNv3.js → CreatedOnBrandCrowd-pt-pt-CI2XD0OS.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BDHrHOOB.js → CreatedOnDcom-de-de-CkLkBztx.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-EbniAwLE.js → CreatedOnDcom-en-us-frnxBJJv.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BpAIMuUH.js → CreatedOnDcom-es-es-CrqgiERj.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BDSu4efU.js → CreatedOnDcom-fr-ca-CPoEcusj.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BR7f1SWB.js → CreatedOnDcom-fr-fr-BqrRH3dV.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DzY1XBcr.js → CreatedOnDcom-pt-br-CpbVi3Sw.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-1v5N9vgW.js → CreatedOnDcom-pt-pt-s0XZ3c7y.js} +1 -1
  15. package/lib/src/brand-page/models/index.d.ts +4 -1
  16. package/lib/src/brand-page/models/index.js +4 -1
  17. package/lib/src/brand-page/utils/view-model.util.js +18 -2
  18. package/lib/src/brand-page/view-models.d.ts +2 -1
  19. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +4 -1
  20. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +3 -0
  21. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +15 -0
  22. package/lib/src/brand-page-maker/composables/useEventTracker.js +36 -0
  23. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +18 -0
  24. package/lib/src/{bundled-translations-BiFAlQdC.js → bundled-translations-B2q5GWTQ.js} +1 -1
  25. package/lib/src/{bundled-translations.de-DE-DuRWnOP-.js → bundled-translations.de-DE-FhH2H_rd.js} +5 -5
  26. package/lib/src/{bundled-translations.es-ES-CokHdZtW.js → bundled-translations.es-ES-_ZExxMi7.js} +5 -5
  27. package/lib/src/{bundled-translations.fr-CA-CJcMmubA.js → bundled-translations.fr-CA-Tg-ODIiC.js} +1 -1
  28. package/lib/src/{bundled-translations.fr-FR-DYPup8fJ.js → bundled-translations.fr-FR-C0sU51Mz.js} +1 -1
  29. package/lib/src/{bundled-translations.pt-BR-GSsp1kuV.js → bundled-translations.pt-BR-MYFIhA4u.js} +9 -9
  30. package/lib/src/{bundled-translations.pt-PT-DbkY8UQ3.js → bundled-translations.pt-PT-DeUBSzCB.js} +9 -9
  31. package/lib/src/bundles/bundled-translations.de-DE.json +1 -0
  32. package/lib/src/bundles/bundled-translations.es-ES.json +1 -0
  33. package/lib/src/bundles/bundled-translations.fr-CA.json +1 -0
  34. package/lib/src/bundles/bundled-translations.fr-FR.json +1 -0
  35. package/lib/src/bundles/bundled-translations.json +1 -0
  36. package/lib/src/bundles/bundled-translations.pt-BR.json +1 -0
  37. package/lib/src/bundles/bundled-translations.pt-PT.json +1 -0
  38. package/lib/src/css/library.brand-page-brandCrowd.min.css +1 -1
  39. package/lib/src/css/library.brand-page-brandPage.min.css +1 -1
  40. package/lib/src/css/library.brand-page-designCom.min.css +1 -1
  41. package/lib/src/css/library.brand-page-preview.min.css +1 -1
  42. package/lib/src/index.mjs +2 -2
  43. package/lib/src/{lib-BMP5cseh.js → lib-O_eJgJHP.js} +16498 -16437
  44. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +3 -0
  45. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +3 -0
  46. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +3 -0
  47. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +3 -0
  48. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +5 -0
  49. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +5 -0
  50. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +25 -0
  51. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +3 -0
  52. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +3 -0
  53. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +3 -0
  54. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +3 -0
  55. package/lib/src/tracker.d.ts +1 -1
  56. package/lib/src/tracker.js +1 -1
  57. package/lib/src/tracker.mjs +9 -7
  58. package/lib/src/{useEventTracker-Dmc2jFdN.js → useEventTracker-C5Ql5p7u.js} +56 -22
  59. package/lib/src/utils/minify-brand-page-metadata.d.ts +1 -0
  60. package/lib/src/utils/minify-brand-page-metadata.js +13 -3
  61. package/package.json +1 -1
  62. package/src/brand-page/models/index.ts +9 -2
  63. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +18 -6
  64. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +6 -2
  65. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +12 -4
  66. package/src/brand-page/utils/view-model.util.test.ts +145 -1
  67. package/src/brand-page/utils/view-model.util.ts +27 -2
  68. package/src/brand-page/view-models.ts +2 -0
  69. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +9 -1
  70. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.preview-gate.test.ts +38 -1
  71. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.test.ts +123 -0
  72. package/src/brand-page-maker/components/preview-modal/PreviewModalWithState.vue +25 -0
  73. package/src/brand-page-maker/composables/useEventTracker.ts +41 -0
  74. package/src/bundles/bundled-translations.de-DE.json +1 -0
  75. package/src/bundles/bundled-translations.es-ES.json +1 -0
  76. package/src/bundles/bundled-translations.fr-CA.json +1 -0
  77. package/src/bundles/bundled-translations.fr-FR.json +1 -0
  78. package/src/bundles/bundled-translations.json +1 -0
  79. package/src/bundles/bundled-translations.pt-BR.json +1 -0
  80. package/src/bundles/bundled-translations.pt-PT.json +1 -0
  81. package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.test.ts +111 -0
  82. package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +18 -0
  83. package/src/shared/page-settings/components/page-settings/i18n/page-settings.de-DE.json +1 -0
  84. package/src/shared/page-settings/components/page-settings/i18n/page-settings.es-ES.json +1 -0
  85. package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-CA.json +1 -0
  86. package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-FR.json +1 -0
  87. package/src/shared/page-settings/components/page-settings/i18n/page-settings.json +1 -0
  88. package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-BR.json +1 -0
  89. package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-PT.json +1 -0
  90. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +33 -0
  91. package/src/tracker.ts +2 -0
  92. package/src/utils/minify-brand-page-metadata.test.ts +70 -1
  93. package/src/utils/minify-brand-page-metadata.ts +19 -4
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-BMP5cseh.js";
2
+ import { _ as t } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BMP5cseh.js";
2
+ import { _ as e } from "./lib-O_eJgJHP.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BMP5cseh.js";
2
+ import { _ as e } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BMP5cseh.js";
2
+ import { _ as e } from "./lib-O_eJgJHP.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BMP5cseh.js";
2
+ import { _ as e } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-BMP5cseh.js";
2
+ import { _ as e } from "./lib-O_eJgJHP.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BMP5cseh.js";
2
+ import { _ as M } from "./lib-O_eJgJHP.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-BMP5cseh.js";
2
+ import { _ as M } from "./lib-O_eJgJHP.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -34,6 +34,9 @@ export declare class BackgroundShape {
34
34
  constructor(option?: Partial<BackgroundShape>);
35
35
  }
36
36
  export type BackgroundStyle = Partial<Omit<BrandPageCssStyle, 'backgroundColor'>>;
37
+ export interface BackgroundColorStyle extends BrandPageCssStyle {
38
+ backgroundOpacity?: number;
39
+ }
37
40
  /**
38
41
  * The complete default for a page's background media overlay. Seeded into
39
42
  * metadata (constructor for new models, migration-20.5 for persisted partials) so
@@ -519,7 +522,7 @@ export declare abstract class AbstractPageHeaderStyles {
519
522
  logoImage: LogoImageModel;
520
523
  logoTemplateImage: LogoTemplateImageModel | undefined;
521
524
  logoImageBase64Url?: string;
522
- backgroundStyle: BrandPageCssStyle;
525
+ backgroundStyle: BackgroundColorStyle;
523
526
  style: BrandPageCssStyle;
524
527
  viewport: ViewportsType;
525
528
  protected constructor(options?: AbstractPageHeaderStylesType);
@@ -253,7 +253,10 @@ export class AbstractPageHeaderStyles {
253
253
  this.logoDraftToken = options.logoDraftToken || '';
254
254
  this.logoVariation = options.logoVariation || 0;
255
255
  this.style = options.style || {};
256
- this.backgroundStyle = options.backgroundStyle || {};
256
+ this.backgroundStyle = {
257
+ ...(options.backgroundStyle || {}),
258
+ backgroundOpacity: options.backgroundStyle?.backgroundOpacity ?? 100,
259
+ };
257
260
  }
258
261
  }
259
262
  export class PageHeaderDesktop extends AbstractPageHeaderStyles {
@@ -2,7 +2,7 @@ import { reactive } from 'vue';
2
2
  import { assertUnreachable } from '../../helpers/ts.helper';
3
3
  import { ButtonStyles, VIEWPORTS } from '../models';
4
4
  import { NavigationMobile, NavigationDesktop, BRAND_PAGE_TYPES, BUTTON_LINK_TYPE, NavigationMenuStyles, } from '../models';
5
- import { isTransparentColour, mutedTextForBackground, backgroundColorFromStyle, } from './color.util';
5
+ import { backgroundColorFromStyle, isTransparentColour, mutedTextForBackground, withColorOpacity, } from './color.util';
6
6
  import { resolveColorReference } from './color-palette.util';
7
7
  import { containerTextColorDefaults, containerSurfaceForContent, } from './container-text-color.util';
8
8
  import { CONTENT_TEXT_STYLE_PROPERTY_KEYS, FALLBACK_DEFAULT_LINK_COLOR, FONT_SIZE_BODY, LINE_HEIGHT_BODY, DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH, FONT_FAMILY_CONFIGS, isGoogleType, LINE_HEIGHT_HEADINGS, FONT_SIZE_HEADINGS, DEFAULT_TEXT_ALIGN, IMAGE_RESOLUTION_PRESETS, BIG_IMAGE, ALIGN_LEFT_BIG_IMAGE, ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CARD_LEFT_IMAGE, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, } from '../constants';
@@ -737,7 +737,23 @@ export const mapToPageHeaderViewModel = (pageHeader, pageStyles, pages, useOldLo
737
737
  hamburgerMenuStyle,
738
738
  }),
739
739
  style: pageHeader.style,
740
- backgroundStyle: pageHeader.backgroundStyle,
740
+ backgroundStyle: getHeaderBackgroundStyleWithOpacity(pageHeader),
741
+ };
742
+ };
743
+ // Folds backgroundOpacity into backgroundColor's alpha so only the container's paint fades, not its children.
744
+ const getHeaderBackgroundStyleWithOpacity = (pageHeader) => {
745
+ // Real defaults: an un-constructed maker header, or metadata older than migration-11's backfill, can lack these entirely.
746
+ const { backgroundOpacity = 100, ...backgroundStyle } = pageHeader.backgroundStyle ?? {};
747
+ const { backgroundColor } = backgroundStyle;
748
+ if (backgroundOpacity >= 100 ||
749
+ !backgroundColor ||
750
+ isTransparentColour(backgroundColor)) {
751
+ return backgroundStyle;
752
+ }
753
+ // withColorOpacity, not setRgbAlpha: fades a var(--palette-n) reference too.
754
+ return {
755
+ ...backgroundStyle,
756
+ backgroundColor: withColorOpacity(backgroundColor, backgroundOpacity / 100),
741
757
  };
742
758
  };
743
759
  export const mapToPageFooterViewModel = (pageFooter, pageStyles, useOldLogoRenderSize = false) => {
@@ -132,9 +132,10 @@ export interface BookingSectionViewModel extends ContentViewModel, Omit<BookingS
132
132
  buttonViewModel: ButtonViewModel;
133
133
  isFullWidth: boolean;
134
134
  }
135
- export interface PageHeaderViewModel extends Omit<PageHeaderDesktop | PageHeaderMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth'> {
135
+ export interface PageHeaderViewModel extends Omit<PageHeaderDesktop | PageHeaderMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth' | 'backgroundStyle'> {
136
136
  logo: LogoViewModel;
137
137
  pages: PageViewModel[];
138
+ backgroundStyle: BrandPageCssStyle;
138
139
  }
139
140
  export interface PageFooterViewModel extends Omit<PageFooterDesktop | PageFooterMobile, 'logoImage' | 'logoImageStyle' | 'isLogoOptional' | 'viewport' | 'isLogoVisible' | 'logoTemplateImage' | 'logoImageHeight' | 'logoImageWidth'> {
140
141
  logo: LogoViewModel;
@@ -22,7 +22,7 @@ import { FabricRenderClient } from '../../../clients/fabric-render-client';
22
22
  import AssetLibraryClient from '../../../clients/asset-library-clients';
23
23
  import { useShopConfigStore } from '@shared/ecommerce-settings/store/shop-settings-store';
24
24
  import { useProductConfigStore } from '@brand-page-maker/stores/product-config/product-config-store';
25
- import { UPGRADE_CTA_LOCATIONS } from '../../composables/useEventTracker';
25
+ import { useEventTracker, UPGRADE_CTA_LOCATIONS, PREVIEW_CTA_LOCATIONS, } from '../../composables/useEventTracker';
26
26
  import { commonTr } from '@src/composables/useTranslate';
27
27
  import { useSnapshot } from '../../../composables/useSnapshot';
28
28
  import { usePageNavigationStore } from '@src/shared/page-navigation/store/page-navigation-store';
@@ -340,6 +340,9 @@ export default defineComponent({
340
340
  this.$emit(EVENTS.Back);
341
341
  },
342
342
  onPreview() {
343
+ // Every click is counted, before the gating below — the modal-open event
344
+ // fires separately, so click → open reads as a funnel.
345
+ useEventTracker().sendPreviewClickEvent(PREVIEW_CTA_LOCATIONS.MAKER);
343
346
  // The preview frames a SAVED, owned draft. A signed-out customer can't have
344
347
  // one, and the save needs an owner — so sign-in comes first, via the host's
345
348
  // Save Progress flow.
@@ -1152,6 +1152,9 @@ declare const _default: import("vue").DefineComponent<{}, {
1152
1152
  }>;
1153
1153
  eventTracker: {
1154
1154
  sendShippingToggleEvent: (isEnabled: boolean) => void;
1155
+ sendPreviewClickEvent: (ctaLocation: string) => void;
1156
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
1157
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
1155
1158
  sendUndoEvent: (props: {
1156
1159
  entries_count: number;
1157
1160
  actor: string | undefined;
@@ -59,6 +59,18 @@ export declare const EVENTS: {
59
59
  WEBSITE_MAKER_REDO: string;
60
60
  WEBSITE_MAKER_HISTORY_CAPPED: string;
61
61
  WEBSITE_MAKER_HISTORY_OVERSIZED: string;
62
+ WEBSITE_MAKER_LIVE_PREVIEW_CLICK: string;
63
+ WEBSITE_MAKER_LIVE_PREVIEW_MODAL: string;
64
+ };
65
+ export declare const PREVIEW_CTA_LOCATIONS: {
66
+ MAKER: string;
67
+ MANAGE_WEBSITE: string;
68
+ };
69
+ export declare const PREVIEW_MODAL_CONTINUATION_EVENTS: {
70
+ EXIT: string;
71
+ BACK_TO_EDITOR: string;
72
+ EDIT: string;
73
+ PUBLISH: string;
62
74
  };
63
75
  export declare const SELECT_LOCATIONS: {
64
76
  MAKER_PREVIEW: string;
@@ -113,6 +125,9 @@ export declare const PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS: {
113
125
  };
114
126
  declare const useEventTracker: () => {
115
127
  sendShippingToggleEvent: (isEnabled: boolean) => void;
128
+ sendPreviewClickEvent: (ctaLocation: string) => void;
129
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
130
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
116
131
  sendUndoEvent: (props: {
117
132
  entries_count: number;
118
133
  actor: string | undefined;
@@ -40,6 +40,22 @@ export const EVENTS = {
40
40
  WEBSITE_MAKER_REDO: 'website_maker_redo',
41
41
  WEBSITE_MAKER_HISTORY_CAPPED: 'website_maker_history_capped',
42
42
  WEBSITE_MAKER_HISTORY_OVERSIZED: 'website_maker_history_oversized',
43
+ WEBSITE_MAKER_LIVE_PREVIEW_CLICK: 'website_maker_live_preview_click',
44
+ WEBSITE_MAKER_LIVE_PREVIEW_MODAL: 'website_maker_live_preview_modal',
45
+ };
46
+ // The global `location` prop already means pre/post purchase, so the surface a
47
+ // preview was launched from rides on cta_location, reusing existing values.
48
+ export const PREVIEW_CTA_LOCATIONS = {
49
+ MAKER: 'maker',
50
+ MANAGE_WEBSITE: 'manage_website',
51
+ };
52
+ export const PREVIEW_MODAL_CONTINUATION_EVENTS = {
53
+ EXIT: 'exit',
54
+ // The same button reads "Back to Editor" on the editor and "Edit" on other
55
+ // surfaces — the continuation mirrors the label the user actually clicked.
56
+ BACK_TO_EDITOR: 'back_to_editor',
57
+ EDIT: 'edit',
58
+ PUBLISH: 'publish',
43
59
  };
44
60
  export const SELECT_LOCATIONS = {
45
61
  MAKER_PREVIEW: 'maker_preview',
@@ -327,6 +343,26 @@ const useEventTracker = () => {
327
343
  is_enabled: isEnabled,
328
344
  });
329
345
  },
346
+ // Live preview: the click is tracked separately from the modal opening —
347
+ // sign-in/save gating means a click doesn't always open the modal, and the
348
+ // post-sign-in return trip opens it without a click.
349
+ sendPreviewClickEvent: (ctaLocation) => {
350
+ _publishEvent(EVENTS.WEBSITE_MAKER_LIVE_PREVIEW_CLICK, {
351
+ cta_location: ctaLocation,
352
+ });
353
+ },
354
+ sendPreviewModalOpenEvent: (ctaLocation) => {
355
+ _publishEvent(EVENTS.WEBSITE_MAKER_LIVE_PREVIEW_MODAL, {
356
+ cta_location: ctaLocation,
357
+ continuation: null,
358
+ });
359
+ },
360
+ sendPreviewModalContinuationEvent: (continuation, ctaLocation) => {
361
+ _publishEvent(EVENTS.WEBSITE_MAKER_LIVE_PREVIEW_MODAL, {
362
+ cta_location: ctaLocation,
363
+ continuation,
364
+ });
365
+ },
330
366
  // Undo / Redo (BP-5506)
331
367
  sendUndoEvent: (props) => {
332
368
  _publishEvent(EVENTS.WEBSITE_MAKER_UNDO, props);
@@ -1616,6 +1616,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
1616
1616
  } | undefined;
1617
1617
  logoImageBase64Url?: string | undefined;
1618
1618
  backgroundStyle: {
1619
+ backgroundOpacity?: number | undefined;
1619
1620
  aspectRatio?: string | undefined;
1620
1621
  backgroundAttachment?: string | undefined;
1621
1622
  background?: string | undefined;
@@ -2908,6 +2909,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
2908
2909
  } | undefined;
2909
2910
  logoImageBase64Url?: string | undefined;
2910
2911
  backgroundStyle: {
2912
+ backgroundOpacity?: number | undefined;
2911
2913
  aspectRatio?: string | undefined;
2912
2914
  backgroundAttachment?: string | undefined;
2913
2915
  background?: string | undefined;
@@ -4200,6 +4202,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
4200
4202
  } | undefined;
4201
4203
  logoImageBase64Url?: string | undefined;
4202
4204
  backgroundStyle: {
4205
+ backgroundOpacity?: number | undefined;
4203
4206
  aspectRatio?: string | undefined;
4204
4207
  backgroundAttachment?: string | undefined;
4205
4208
  background?: string | undefined;
@@ -6642,6 +6645,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
6642
6645
  } | undefined;
6643
6646
  logoImageBase64Url?: string | undefined;
6644
6647
  backgroundStyle: {
6648
+ backgroundOpacity?: number | undefined;
6645
6649
  aspectRatio?: string | undefined;
6646
6650
  backgroundAttachment?: string | undefined;
6647
6651
  background?: string | undefined;
@@ -7934,6 +7938,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
7934
7938
  } | undefined;
7935
7939
  logoImageBase64Url?: string | undefined;
7936
7940
  backgroundStyle: {
7941
+ backgroundOpacity?: number | undefined;
7937
7942
  aspectRatio?: string | undefined;
7938
7943
  backgroundAttachment?: string | undefined;
7939
7944
  background?: string | undefined;
@@ -9226,6 +9231,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
9226
9231
  } | undefined;
9227
9232
  logoImageBase64Url?: string | undefined;
9228
9233
  backgroundStyle: {
9234
+ backgroundOpacity?: number | undefined;
9229
9235
  aspectRatio?: string | undefined;
9230
9236
  backgroundAttachment?: string | undefined;
9231
9237
  background?: string | undefined;
@@ -11674,6 +11680,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
11674
11680
  } | undefined;
11675
11681
  logoImageBase64Url?: string | undefined;
11676
11682
  backgroundStyle: {
11683
+ backgroundOpacity?: number | undefined;
11677
11684
  aspectRatio?: string | undefined;
11678
11685
  backgroundAttachment?: string | undefined;
11679
11686
  background?: string | undefined;
@@ -12966,6 +12973,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
12966
12973
  } | undefined;
12967
12974
  logoImageBase64Url?: string | undefined;
12968
12975
  backgroundStyle: {
12976
+ backgroundOpacity?: number | undefined;
12969
12977
  aspectRatio?: string | undefined;
12970
12978
  backgroundAttachment?: string | undefined;
12971
12979
  background?: string | undefined;
@@ -14258,6 +14266,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
14258
14266
  } | undefined;
14259
14267
  logoImageBase64Url?: string | undefined;
14260
14268
  backgroundStyle: {
14269
+ backgroundOpacity?: number | undefined;
14261
14270
  aspectRatio?: string | undefined;
14262
14271
  backgroundAttachment?: string | undefined;
14263
14272
  background?: string | undefined;
@@ -16700,6 +16709,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
16700
16709
  } | undefined;
16701
16710
  logoImageBase64Url?: string | undefined;
16702
16711
  backgroundStyle: {
16712
+ backgroundOpacity?: number | undefined;
16703
16713
  aspectRatio?: string | undefined;
16704
16714
  backgroundAttachment?: string | undefined;
16705
16715
  background?: string | undefined;
@@ -17992,6 +18002,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
17992
18002
  } | undefined;
17993
18003
  logoImageBase64Url?: string | undefined;
17994
18004
  backgroundStyle: {
18005
+ backgroundOpacity?: number | undefined;
17995
18006
  aspectRatio?: string | undefined;
17996
18007
  backgroundAttachment?: string | undefined;
17997
18008
  background?: string | undefined;
@@ -19284,6 +19295,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
19284
19295
  } | undefined;
19285
19296
  logoImageBase64Url?: string | undefined;
19286
19297
  backgroundStyle: {
19298
+ backgroundOpacity?: number | undefined;
19287
19299
  aspectRatio?: string | undefined;
19288
19300
  backgroundAttachment?: string | undefined;
19289
19301
  background?: string | undefined;
@@ -21732,6 +21744,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
21732
21744
  } | undefined;
21733
21745
  logoImageBase64Url?: string | undefined;
21734
21746
  backgroundStyle: {
21747
+ backgroundOpacity?: number | undefined;
21735
21748
  aspectRatio?: string | undefined;
21736
21749
  backgroundAttachment?: string | undefined;
21737
21750
  background?: string | undefined;
@@ -23024,6 +23037,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
23024
23037
  } | undefined;
23025
23038
  logoImageBase64Url?: string | undefined;
23026
23039
  backgroundStyle: {
23040
+ backgroundOpacity?: number | undefined;
23027
23041
  aspectRatio?: string | undefined;
23028
23042
  backgroundAttachment?: string | undefined;
23029
23043
  background?: string | undefined;
@@ -24316,6 +24330,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
24316
24330
  } | undefined;
24317
24331
  logoImageBase64Url?: string | undefined;
24318
24332
  backgroundStyle: {
24333
+ backgroundOpacity?: number | undefined;
24319
24334
  aspectRatio?: string | undefined;
24320
24335
  backgroundAttachment?: string | undefined;
24321
24336
  background?: string | undefined;
@@ -26758,6 +26773,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
26758
26773
  } | undefined;
26759
26774
  logoImageBase64Url?: string | undefined;
26760
26775
  backgroundStyle: {
26776
+ backgroundOpacity?: number | undefined;
26761
26777
  aspectRatio?: string | undefined;
26762
26778
  backgroundAttachment?: string | undefined;
26763
26779
  background?: string | undefined;
@@ -28050,6 +28066,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
28050
28066
  } | undefined;
28051
28067
  logoImageBase64Url?: string | undefined;
28052
28068
  backgroundStyle: {
28069
+ backgroundOpacity?: number | undefined;
28053
28070
  aspectRatio?: string | undefined;
28054
28071
  backgroundAttachment?: string | undefined;
28055
28072
  background?: string | undefined;
@@ -29342,6 +29359,7 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
29342
29359
  } | undefined;
29343
29360
  logoImageBase64Url?: string | undefined;
29344
29361
  backgroundStyle: {
29362
+ backgroundOpacity?: number | undefined;
29345
29363
  aspectRatio?: string | undefined;
29346
29364
  backgroundAttachment?: string | undefined;
29347
29365
  background?: string | undefined;