@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
@@ -637,6 +637,9 @@ declare const _default: import("vue").DefineComponent<{}, {
637
637
  }>;
638
638
  eventTracker: {
639
639
  sendShippingToggleEvent: (isEnabled: boolean) => void;
640
+ sendPreviewClickEvent: (ctaLocation: string) => void;
641
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
642
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
640
643
  sendUndoEvent: (props: {
641
644
  entries_count: number;
642
645
  actor: string | undefined;
@@ -757,6 +757,9 @@ declare const _default: import("vue").DefineComponent<{}, {
757
757
  }>;
758
758
  bpEventTracker: {
759
759
  sendShippingToggleEvent: (isEnabled: boolean) => void;
760
+ sendPreviewClickEvent: (ctaLocation: string) => void;
761
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
762
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
760
763
  sendUndoEvent: (props: {
761
764
  entries_count: number;
762
765
  actor: string | undefined;
@@ -489,6 +489,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
489
489
  }>;
490
490
  eventTracker: {
491
491
  sendShippingToggleEvent: (isEnabled: boolean) => void;
492
+ sendPreviewClickEvent: (ctaLocation: string) => void;
493
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
494
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
492
495
  sendUndoEvent: (props: {
493
496
  entries_count: number;
494
497
  actor: string | undefined;
@@ -256,6 +256,9 @@ declare const _default: import("vue").DefineComponent<{}, {
256
256
  }>;
257
257
  eventTracker: {
258
258
  sendShippingToggleEvent: (isEnabled: boolean) => void;
259
+ sendPreviewClickEvent: (ctaLocation: string) => void;
260
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
261
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
259
262
  sendUndoEvent: (props: {
260
263
  entries_count: number;
261
264
  actor: string | undefined;
@@ -1277,6 +1277,7 @@ declare const _default: import("vue").DefineComponent<{}, {
1277
1277
  } | undefined;
1278
1278
  logoImageBase64Url?: string | undefined;
1279
1279
  backgroundStyle: {
1280
+ backgroundOpacity?: number | undefined;
1280
1281
  aspectRatio?: string | undefined;
1281
1282
  backgroundAttachment?: string | undefined;
1282
1283
  background?: string | undefined;
@@ -2569,6 +2570,7 @@ declare const _default: import("vue").DefineComponent<{}, {
2569
2570
  } | undefined;
2570
2571
  logoImageBase64Url?: string | undefined;
2571
2572
  backgroundStyle: {
2573
+ backgroundOpacity?: number | undefined;
2572
2574
  aspectRatio?: string | undefined;
2573
2575
  backgroundAttachment?: string | undefined;
2574
2576
  background?: string | undefined;
@@ -4935,6 +4937,9 @@ declare const _default: import("vue").DefineComponent<{}, {
4935
4937
  onDraggingEnd: (ev?: any, routeId?: string, previousParentRouteId?: string) => void;
4936
4938
  eventTracker: {
4937
4939
  sendShippingToggleEvent: (isEnabled: boolean) => void;
4940
+ sendPreviewClickEvent: (ctaLocation: string) => void;
4941
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
4942
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
4938
4943
  sendUndoEvent: (props: {
4939
4944
  entries_count: number;
4940
4945
  actor: string | undefined;
@@ -1235,6 +1235,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1235
1235
  } | undefined;
1236
1236
  logoImageBase64Url?: string | undefined;
1237
1237
  backgroundStyle: {
1238
+ backgroundOpacity?: number | undefined;
1238
1239
  aspectRatio?: string | undefined;
1239
1240
  backgroundAttachment?: string | undefined;
1240
1241
  background?: string | undefined;
@@ -2527,6 +2528,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2527
2528
  } | undefined;
2528
2529
  logoImageBase64Url?: string | undefined;
2529
2530
  backgroundStyle: {
2531
+ backgroundOpacity?: number | undefined;
2530
2532
  aspectRatio?: string | undefined;
2531
2533
  backgroundAttachment?: string | undefined;
2532
2534
  background?: string | undefined;
@@ -4638,6 +4640,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4638
4640
  logoSliderMax(): number;
4639
4641
  backgroundColor(): string;
4640
4642
  isBackgroundColorEnabled(): boolean;
4643
+ backgroundOpacity(): number;
4644
+ showBackgroundOpacity(): boolean;
4641
4645
  copyrightPlaceholder(): string;
4642
4646
  copyrightText: {
4643
4647
  get(): string;
@@ -4689,6 +4693,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
4689
4693
  logoImageBase64Url?: string;
4690
4694
  }): void;
4691
4695
  onSelectColor(selectedColor: UpdateItemValuePayload<string>): void;
4696
+ onBackgroundOpacityChange(value: number | string): void;
4692
4697
  onBackgroundEnable(enabled: UpdateItemValuePayload<boolean>): void;
4693
4698
  onLogoVisibleChanged(showLogo: boolean): void;
4694
4699
  onLogoVariationSelected(selectedLogoVariationIndex: number): void;
@@ -3,6 +3,7 @@ import { PAGE_SECTION_STYLE_OPTIONS } from '@brand-page-maker/models/page-sectio
3
3
  import { PAGE_SECTIONS } from '../../models';
4
4
  import { LOGO_SLIDER_DESKTOP_MAX, LOGO_SLIDER_DESKTOP_MIN, LOGO_SLIDER_MOBILE_MAX, LOGO_SLIDER_MOBILE_MIN, VIEWPORTS, getNavigationType, NAVIGATION_TYPE_DEFAULT_DISPLAY_TYPE, } from '@brand-page';
5
5
  import { UI_DEVICE_MODES, UI_EVENT_SOURCES } from '../../../models';
6
+ import { isTransparentColour } from '@brand-page/utils/color.util';
6
7
  import { useUiPageSettingsStore } from '../../store';
7
8
  import { useUiNavigationStyleSettingsStore } from '../../../navigation-style-settings/store';
8
9
  import { useUiStyleSettingsStore } from '../../../style-settings/store';
@@ -141,6 +142,15 @@ export default defineComponent({
141
142
  return this.sections[this.sectionName][this.viewport]
142
143
  .backgroundColorEnabled;
143
144
  },
145
+ backgroundOpacity() {
146
+ // Real default: an un-constructed (JSON.parse'd) header never saw the constructor's default.
147
+ return (this.sections[this.sectionName][this.viewport].backgroundStyle
148
+ ?.backgroundOpacity ?? 100);
149
+ },
150
+ showBackgroundOpacity() {
151
+ // isTransparentColour('') is false, so an unset color needs its own check.
152
+ return (!!this.backgroundColor && !isTransparentColour(this.backgroundColor));
153
+ },
144
154
  copyrightPlaceholder() {
145
155
  return commonTr(`copyrightTextPlaceholder`);
146
156
  },
@@ -394,6 +404,21 @@ export default defineComponent({
394
404
  viewport: this.viewport,
395
405
  });
396
406
  },
407
+ onBackgroundOpacityChange(value) {
408
+ // Clamped here: the Slider's text field can emit an out-of-range value mid-typing.
409
+ const clamped = Math.min(100, Math.max(0, Number(value) || 0));
410
+ // A variable, not an inline literal — backgroundOpacity isn't on BrandPageCssStyle.
411
+ const backgroundStyle = {
412
+ backgroundOpacity: clamped,
413
+ };
414
+ this.pageSettingsStore.setPageSettingsSectionValue({
415
+ sectionName: this.sectionName,
416
+ propName: 'backgroundStyle',
417
+ value: backgroundStyle,
418
+ merge: true,
419
+ viewport: this.viewport,
420
+ });
421
+ },
397
422
  onBackgroundEnable(enabled) {
398
423
  this.pageSettingsStore.setPageSettingsSectionValue({
399
424
  sectionName: this.sectionName,
@@ -607,6 +607,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
607
607
  }>;
608
608
  eventTracker: {
609
609
  sendShippingToggleEvent: (isEnabled: boolean) => void;
610
+ sendPreviewClickEvent: (ctaLocation: string) => void;
611
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
612
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
610
613
  sendUndoEvent: (props: {
611
614
  entries_count: number;
612
615
  actor: string | undefined;
@@ -17,6 +17,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
17
17
  isDesignCom: import("vue").ComputedRef<boolean>;
18
18
  eventTracker: {
19
19
  sendShippingToggleEvent: (isEnabled: boolean) => void;
20
+ sendPreviewClickEvent: (ctaLocation: string) => void;
21
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
22
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
20
23
  sendUndoEvent: (props: {
21
24
  entries_count: number;
22
25
  actor: string | undefined;
@@ -948,6 +948,9 @@ declare const _default: import("vue").DefineComponent<{}, {
948
948
  }>;
949
949
  eventTracker: {
950
950
  sendShippingToggleEvent: (isEnabled: boolean) => void;
951
+ sendPreviewClickEvent: (ctaLocation: string) => void;
952
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
953
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
951
954
  sendUndoEvent: (props: {
952
955
  entries_count: number;
953
956
  actor: string | undefined;
@@ -132,6 +132,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
132
132
  isDesignCom: import("vue").ComputedRef<boolean>;
133
133
  eventTracker: {
134
134
  sendShippingToggleEvent: (isEnabled: boolean) => void;
135
+ sendPreviewClickEvent: (ctaLocation: string) => void;
136
+ sendPreviewModalOpenEvent: (ctaLocation: string) => void;
137
+ sendPreviewModalContinuationEvent: (continuation: string, ctaLocation: string) => void;
135
138
  sendUndoEvent: (props: {
136
139
  entries_count: number;
137
140
  actor: string | undefined;
@@ -1,2 +1,2 @@
1
- export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
1
+ export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, PREVIEW_CTA_LOCATIONS, PREVIEW_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
2
2
  export type { EventTracker, BpEventTrackerEvent, BpGlobalEventProps, BpUpsellEventProps, } from './brand-page-maker/composables/useEventTracker';
@@ -9,4 +9,4 @@
9
9
  // entry and the root `.` entry, or subscribers registered here won't receive
10
10
  // events published via the root. The multi-entry build hoists it into a shared
11
11
  // chunk (both `index` and `tracker` import it) — verified at build time.
12
- export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
12
+ export { useEventTracker, EVENTS, SELECT_LOCATIONS, UPGRADE_CTA_LOCATIONS, AI_CTA_LOCATIONS, TRIGGER_TYPE, PUBLISH_MODAL_CONTINUATION_EVENTS, GENERATE_TEXT_CONTINUATION_EVENTS, PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS, PREVIEW_CTA_LOCATIONS, PREVIEW_MODAL_CONTINUATION_EVENTS, } from './brand-page-maker/composables/useEventTracker';
@@ -1,12 +1,14 @@
1
- import { A as N, E as O, G as _, P as A, a as I, S as a, T as S, U as s, u as C } from "./useEventTracker-Dmc2jFdN.js";
1
+ import { A as N, E as O, G as _, P as I, a as A, b as a, c as S, S as s, T as C, U as L, u as P } from "./useEventTracker-C5Ql5p7u.js";
2
2
  export {
3
3
  N as AI_CTA_LOCATIONS,
4
4
  O as EVENTS,
5
5
  _ as GENERATE_TEXT_CONTINUATION_EVENTS,
6
- A as PUBLISH_MODAL_CONTINUATION_EVENTS,
7
- I as PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS,
8
- a as SELECT_LOCATIONS,
9
- S as TRIGGER_TYPE,
10
- s as UPGRADE_CTA_LOCATIONS,
11
- C as useEventTracker
6
+ I as PREVIEW_CTA_LOCATIONS,
7
+ A as PREVIEW_MODAL_CONTINUATION_EVENTS,
8
+ a as PUBLISH_MODAL_CONTINUATION_EVENTS,
9
+ S as PUBLISH_OPTION_MODAL_CONTINUATION_EVENTS,
10
+ s as SELECT_LOCATIONS,
11
+ C as TRIGGER_TYPE,
12
+ L as UPGRADE_CTA_LOCATIONS,
13
+ P as useEventTracker
12
14
  };
@@ -38,11 +38,23 @@ const E = {
38
38
  WEBSITE_MAKER_UNDO: "website_maker_undo",
39
39
  WEBSITE_MAKER_REDO: "website_maker_redo",
40
40
  WEBSITE_MAKER_HISTORY_CAPPED: "website_maker_history_capped",
41
- WEBSITE_MAKER_HISTORY_OVERSIZED: "website_maker_history_oversized"
42
- }, R = {
41
+ WEBSITE_MAKER_HISTORY_OVERSIZED: "website_maker_history_oversized",
42
+ WEBSITE_MAKER_LIVE_PREVIEW_CLICK: "website_maker_live_preview_click",
43
+ WEBSITE_MAKER_LIVE_PREVIEW_MODAL: "website_maker_live_preview_modal"
44
+ }, r = {
45
+ MAKER: "maker",
46
+ MANAGE_WEBSITE: "manage_website"
47
+ }, p = {
48
+ EXIT: "exit",
49
+ // The same button reads "Back to Editor" on the editor and "Edit" on other
50
+ // surfaces — the continuation mirrors the label the user actually clicked.
51
+ BACK_TO_EDITOR: "back_to_editor",
52
+ EDIT: "edit",
53
+ PUBLISH: "publish"
54
+ }, O = {
43
55
  MAKER_PREVIEW: "maker_preview",
44
56
  SIDEBAR: "sidebar"
45
- }, p = {
57
+ }, M = {
46
58
  MANAGE_WEBSITE: "manage_website",
47
59
  MANAGE_WEBSITE_PUBLISH: "manage_website_publish",
48
60
  MANAGE_WEBSITE_UPGRADE: "manage_website_upgrade",
@@ -61,14 +73,14 @@ const E = {
61
73
  SAVE_CONTACT_SETTINGS: "save_contact_settings",
62
74
  NAV_TOP: "nav_top",
63
75
  NAV_BOTTOM: "nav_bottom"
64
- }, O = {
76
+ }, d = {
65
77
  AI_BUILDER_TAB: "ai_builder_tab",
66
78
  AI_BUILDER_CHAT_UPSELL: "ai_builder_chat_upsell"
67
79
  }, S = {
68
80
  AUTOMATIC: "automatic",
69
81
  USER_TRIGGERED: "user_triggered",
70
82
  AI_BUILDER: "ai_builder"
71
- }, d = {
83
+ }, P = {
72
84
  PUBLISH: "publish",
73
85
  EXIT: "exit",
74
86
  BUY_A_DOMAIN: "buy_a_domain",
@@ -76,14 +88,14 @@ const E = {
76
88
  COPY_LINK: "copy_link",
77
89
  VIEW_WEBSITE: "view_website",
78
90
  USE_EXISTING_DOMAIN: "use_existing_domain"
79
- }, M = {
91
+ }, L = {
80
92
  USE_TEXT: "use_text",
81
93
  EXIT: "exit"
82
- }, T = {
94
+ }, i = {
83
95
  PREMIUM: "premium",
84
96
  EXIT: "exit",
85
97
  FREEMIUM: "freemium"
86
- }, i = I(), n = I({
98
+ }, T = I(), n = I({
87
99
  upsellOpenEventProps: {},
88
100
  domainUpsellOpenEventProps: {},
89
101
  publishOpenEventProps: {}
@@ -93,12 +105,12 @@ const E = {
93
105
  scope: t,
94
106
  eventName: o,
95
107
  eventProps: {
96
- ...e ? {} : i.value,
108
+ ...e ? {} : T.value,
97
109
  ...A
98
110
  }
99
111
  });
100
112
  });
101
- }, P = () => ({
113
+ }, B = () => ({
102
114
  sendExperimentStartedEvent: (e, t) => {
103
115
  _(
104
116
  E.EXPERIMENT_STARTED,
@@ -116,10 +128,10 @@ const E = {
116
128
  location: "post_purchase",
117
129
  domain_type: "Free"
118
130
  };
119
- i.value = { ...t, ...e };
131
+ T.value = { ...t, ...e };
120
132
  },
121
133
  setCustomGlobalEventProps: (e) => {
122
- i.value = e;
134
+ T.value = e;
123
135
  },
124
136
  setUpsellBridgeState: (e) => {
125
137
  n.value.upsellOpenEventProps = e;
@@ -206,17 +218,17 @@ const E = {
206
218
  },
207
219
  sendPublishOptionsForFreeEvent: () => {
208
220
  _(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
209
- upsell_option_continuation: T.FREEMIUM
221
+ upsell_option_continuation: i.FREEMIUM
210
222
  });
211
223
  },
212
224
  sendPublishOptionsForPremiumEvent: () => {
213
225
  _(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
214
- upsell_option_continuation: T.PREMIUM
226
+ upsell_option_continuation: i.PREMIUM
215
227
  });
216
228
  },
217
229
  sendPublishOptionsForExitEvent: () => {
218
230
  _(E.WEBSITE_MAKER_PUBLISH_UPSELL_OPTION_MODAL, {
219
- upsell_option_continuation: T.EXIT
231
+ upsell_option_continuation: i.EXIT
220
232
  });
221
233
  },
222
234
  // Template sidebar events
@@ -330,6 +342,26 @@ const E = {
330
342
  is_enabled: e
331
343
  });
332
344
  },
345
+ // Live preview: the click is tracked separately from the modal opening —
346
+ // sign-in/save gating means a click doesn't always open the modal, and the
347
+ // post-sign-in return trip opens it without a click.
348
+ sendPreviewClickEvent: (e) => {
349
+ _(E.WEBSITE_MAKER_LIVE_PREVIEW_CLICK, {
350
+ cta_location: e
351
+ });
352
+ },
353
+ sendPreviewModalOpenEvent: (e) => {
354
+ _(E.WEBSITE_MAKER_LIVE_PREVIEW_MODAL, {
355
+ cta_location: e,
356
+ continuation: null
357
+ });
358
+ },
359
+ sendPreviewModalContinuationEvent: (e, t) => {
360
+ _(E.WEBSITE_MAKER_LIVE_PREVIEW_MODAL, {
361
+ cta_location: t,
362
+ continuation: e
363
+ });
364
+ },
333
365
  // Undo / Redo (BP-5506)
334
366
  sendUndoEvent: (e) => {
335
367
  _(E.WEBSITE_MAKER_UNDO, e);
@@ -345,13 +377,15 @@ const E = {
345
377
  }
346
378
  });
347
379
  export {
348
- O as A,
380
+ d as A,
349
381
  E,
350
- M as G,
351
- d as P,
352
- R as S,
382
+ L as G,
383
+ r as P,
384
+ O as S,
353
385
  S as T,
354
- p as U,
355
- T as a,
356
- P as u
386
+ M as U,
387
+ p as a,
388
+ P as b,
389
+ i as c,
390
+ B as u
357
391
  };
@@ -24,6 +24,7 @@ type MinifiedHeader = {
24
24
  logoAssetKey?: string;
25
25
  backgroundStyle?: {
26
26
  backgroundColor?: string;
27
+ backgroundOpacity?: number;
27
28
  };
28
29
  navigation?: {
29
30
  displayType?: string;
@@ -389,6 +389,18 @@ const minifyFooter = (footer, logoAssetKey) => {
389
389
  : undefined,
390
390
  };
391
391
  };
392
+ // Fully opaque (100) is the default, so it's omitted to keep the AI payload small.
393
+ const minifyHeaderBackgroundStyle = (backgroundStyle) => {
394
+ const backgroundColor = backgroundStyle?.backgroundColor;
395
+ if (!backgroundColor)
396
+ return undefined;
397
+ const backgroundOpacity = backgroundStyle.backgroundOpacity;
398
+ return {
399
+ backgroundColor,
400
+ ...(backgroundOpacity !== undefined &&
401
+ backgroundOpacity < 100 && { backgroundOpacity }),
402
+ };
403
+ };
392
404
  const minifyHeader = (header, logoAssetKey) => {
393
405
  if (!header)
394
406
  return undefined;
@@ -399,9 +411,7 @@ const minifyHeader = (header, logoAssetKey) => {
399
411
  logoImageHeight: header.logoImageHeight || undefined,
400
412
  logoImageWidth: header.logoImageWidth || undefined,
401
413
  ...(logoAssetKey && { logoAssetKey }),
402
- backgroundStyle: header.backgroundStyle?.backgroundColor
403
- ? { backgroundColor: header.backgroundStyle.backgroundColor }
404
- : undefined,
414
+ backgroundStyle: minifyHeaderBackgroundStyle(header.backgroundStyle),
405
415
  navigation: nav
406
416
  ? {
407
417
  displayType: nav.displayType || undefined,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.1.14",
4
+ "version": "6.1.16",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -90,6 +90,10 @@ export type BackgroundStyle = Partial<
90
90
  Omit<BrandPageCssStyle, 'backgroundColor'>
91
91
  >;
92
92
 
93
+ export interface BackgroundColorStyle extends BrandPageCssStyle {
94
+ backgroundOpacity?: number;
95
+ }
96
+
93
97
  /**
94
98
  * The complete default for a page's background media overlay. Seeded into
95
99
  * metadata (constructor for new models, migration-20.5 for persisted partials) so
@@ -734,7 +738,7 @@ export abstract class AbstractPageHeaderStyles {
734
738
  logoImage: LogoImageModel;
735
739
  logoTemplateImage: LogoTemplateImageModel | undefined;
736
740
  logoImageBase64Url?: string;
737
- backgroundStyle: BrandPageCssStyle;
741
+ backgroundStyle: BackgroundColorStyle;
738
742
  style: BrandPageCssStyle;
739
743
  viewport: ViewportsType;
740
744
 
@@ -771,7 +775,10 @@ export abstract class AbstractPageHeaderStyles {
771
775
  this.logoVariation = options.logoVariation || 0;
772
776
 
773
777
  this.style = options.style || {};
774
- this.backgroundStyle = options.backgroundStyle || {};
778
+ this.backgroundStyle = {
779
+ ...(options.backgroundStyle || {}),
780
+ backgroundOpacity: options.backgroundStyle?.backgroundOpacity ?? 100,
781
+ };
775
782
  }
776
783
  }
777
784
 
@@ -152,7 +152,9 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
152
152
  "viewport": "mobile",
153
153
  },
154
154
  "pageHeaderDesktop": PageHeaderDesktop {
155
- "backgroundStyle": {},
155
+ "backgroundStyle": {
156
+ "backgroundOpacity": 100,
157
+ },
156
158
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
157
159
  "isLogoOptional": false,
158
160
  "isLogoVisible": true,
@@ -225,7 +227,9 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
225
227
  "viewport": "desktop",
226
228
  },
227
229
  "pageHeaderMobile": PageHeaderMobile {
228
- "backgroundStyle": {},
230
+ "backgroundStyle": {
231
+ "backgroundOpacity": 100,
232
+ },
229
233
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
230
234
  "isLogoOptional": false,
231
235
  "isLogoVisible": true,
@@ -645,7 +649,9 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
645
649
  "viewport": "mobile",
646
650
  },
647
651
  "pageHeaderDesktop": PageHeaderDesktop {
648
- "backgroundStyle": {},
652
+ "backgroundStyle": {
653
+ "backgroundOpacity": 100,
654
+ },
649
655
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
650
656
  "isLogoOptional": false,
651
657
  "isLogoVisible": true,
@@ -718,7 +724,9 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
718
724
  "viewport": "desktop",
719
725
  },
720
726
  "pageHeaderMobile": PageHeaderMobile {
721
- "backgroundStyle": {},
727
+ "backgroundStyle": {
728
+ "backgroundOpacity": 100,
729
+ },
722
730
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
723
731
  "isLogoOptional": false,
724
732
  "isLogoVisible": true,
@@ -1122,7 +1130,9 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1122
1130
  "viewport": "mobile",
1123
1131
  },
1124
1132
  "pageHeaderDesktop": PageHeaderDesktop {
1125
- "backgroundStyle": {},
1133
+ "backgroundStyle": {
1134
+ "backgroundOpacity": 100,
1135
+ },
1126
1136
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
1127
1137
  "isLogoOptional": false,
1128
1138
  "isLogoVisible": true,
@@ -1195,7 +1205,9 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1195
1205
  "viewport": "desktop",
1196
1206
  },
1197
1207
  "pageHeaderMobile": PageHeaderMobile {
1198
- "backgroundStyle": {},
1208
+ "backgroundStyle": {
1209
+ "backgroundOpacity": 100,
1210
+ },
1199
1211
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
1200
1212
  "isLogoOptional": false,
1201
1213
  "isLogoVisible": true,
@@ -137,7 +137,9 @@ exports[`migration02.ts > migration02 should return converted letterspacing 1`]
137
137
  "viewport": "mobile",
138
138
  },
139
139
  "pageHeaderDesktop": PageHeaderDesktop {
140
- "backgroundStyle": {},
140
+ "backgroundStyle": {
141
+ "backgroundOpacity": 100,
142
+ },
141
143
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
142
144
  "isLogoOptional": false,
143
145
  "isLogoVisible": true,
@@ -211,7 +213,9 @@ exports[`migration02.ts > migration02 should return converted letterspacing 1`]
211
213
  "viewport": "desktop",
212
214
  },
213
215
  "pageHeaderMobile": PageHeaderMobile {
214
- "backgroundStyle": {},
216
+ "backgroundStyle": {
217
+ "backgroundOpacity": 100,
218
+ },
215
219
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
216
220
  "isLogoOptional": false,
217
221
  "isLogoVisible": true,
@@ -136,7 +136,9 @@ BrandPageModel {
136
136
  "viewport": "mobile",
137
137
  },
138
138
  "pageHeaderDesktop": PageHeaderDesktop {
139
- "backgroundStyle": {},
139
+ "backgroundStyle": {
140
+ "backgroundOpacity": 100,
141
+ },
140
142
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
141
143
  "isLogoOptional": false,
142
144
  "isLogoVisible": true,
@@ -210,7 +212,9 @@ BrandPageModel {
210
212
  "viewport": "desktop",
211
213
  },
212
214
  "pageHeaderMobile": PageHeaderMobile {
213
- "backgroundStyle": {},
215
+ "backgroundStyle": {
216
+ "backgroundOpacity": 100,
217
+ },
214
218
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
215
219
  "isLogoOptional": false,
216
220
  "isLogoVisible": true,
@@ -593,7 +597,9 @@ BrandPageModel {
593
597
  "viewport": "mobile",
594
598
  },
595
599
  "pageHeaderDesktop": PageHeaderDesktop {
596
- "backgroundStyle": {},
600
+ "backgroundStyle": {
601
+ "backgroundOpacity": 100,
602
+ },
597
603
  "displayStyle": "desktop-tab-vertical-stack-centered-logo-centered-menu",
598
604
  "isLogoOptional": false,
599
605
  "isLogoVisible": true,
@@ -667,7 +673,9 @@ BrandPageModel {
667
673
  "viewport": "desktop",
668
674
  },
669
675
  "pageHeaderMobile": PageHeaderMobile {
670
- "backgroundStyle": {},
676
+ "backgroundStyle": {
677
+ "backgroundOpacity": 100,
678
+ },
671
679
  "displayStyle": "mobile-tab-vertical-stack-centered-logo-centered-menu",
672
680
  "isLogoOptional": false,
673
681
  "isLogoVisible": true,