@designcrowd/library.brand-page 5.17.25-undo-12 → 5.17.25-undo-15

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 (63) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-4mxqeHPP.js → CreatedOnBrandCrowd-de-de-5QfzKqjC.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DQN_hGjC.js → CreatedOnBrandCrowd-en-us-Dy3tcwiJ.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-gijtJMPK.js → CreatedOnBrandCrowd-es-es-BJ8hjzNX.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BcOADD0V.js → CreatedOnBrandCrowd-fr-ca-Crc2IixX.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BcOADD0V.js → CreatedOnBrandCrowd-fr-fr-Crc2IixX.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-B5eEyjAo.js → CreatedOnBrandCrowd-pt-br-wWrA-4hb.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-B5eEyjAo.js → CreatedOnBrandCrowd-pt-pt-wWrA-4hb.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DSGP6AAT.js → CreatedOnDcom-de-de-CeYxTDS_.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BOuoJM_x.js → CreatedOnDcom-en-us-V7XXdsPr.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-kbiGFyBV.js → CreatedOnDcom-es-es-BIu7YLYP.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BVFxrE6-.js → CreatedOnDcom-fr-ca-bFnkqoIY.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-92xJGi0w.js → CreatedOnDcom-fr-fr-DVmgOG0x.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-C40X9FAV.js → CreatedOnDcom-pt-br-CnKjkT-U.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-CXxJUTUx.js → CreatedOnDcom-pt-pt-D9bVqfon.js} +1 -1
  15. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -1
  16. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +10 -9
  17. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +2 -1
  18. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +9 -8
  19. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +2 -1
  20. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +3 -2
  21. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -1
  22. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +2 -1
  23. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +2 -1
  24. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +11 -0
  25. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +15 -1
  26. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +61 -9
  27. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +22 -1
  28. package/lib/src/brand-page-maker/stores/history/history-store.js +88 -16
  29. package/lib/src/brand-page-maker/stores/logo-store/logo-store.d.ts +1 -0
  30. package/lib/src/index.mjs +1 -1
  31. package/lib/src/{lib-DaFVTyb9.js → lib-CptQVW37.js} +5667 -5597
  32. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
  33. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +10 -9
  34. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +10 -9
  35. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +7 -7
  36. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +9 -8
  37. package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
  38. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +7 -7
  39. package/lib/src/shared/content-settings/components/radio-field/RadioField.mixin.d.ts +1 -1
  40. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +1 -1
  41. package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
  42. package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
  43. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
  44. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
  45. package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
  46. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +2 -0
  47. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +4 -1
  48. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +9 -1
  49. package/lib/src/shared/logo-settings/store/editable-logo-store.js +33 -0
  50. package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
  51. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +9 -8
  52. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +11 -8
  53. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -1
  54. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +1 -1
  55. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -1
  56. package/package.json +1 -1
  57. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +13 -0
  58. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +45 -0
  59. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +74 -11
  60. package/src/brand-page-maker/stores/history/history-store.test.ts +187 -5
  61. package/src/brand-page-maker/stores/history/history-store.ts +123 -17
  62. package/src/brand-page-maker/stores/logo-store/logo-store.ts +5 -0
  63. package/src/shared/logo-settings/store/editable-logo-store.ts +45 -1
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as t } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as e } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as e } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as e } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as e } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as e } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as M } from "./lib-CptQVW37.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-DaFVTyb9.js";
2
+ import { _ as M } from "./lib-CptQVW37.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -118,8 +118,9 @@ declare const _default: import("vue").DefineComponent<{}, {
118
118
  content: TContent;
119
119
  }>(payload: P): Promise<void>;
120
120
  _captureTemplateSwitchIfEnabled(): void;
121
- applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel): Promise<void>;
121
+ applyHistorySnapshot(snapshot: import("@brand-page/models").BrandPageModel, activePageId?: string | undefined): Promise<void>;
122
122
  _syncLogoSettingsFromSnapshot(snapshot: import("@brand-page/models").BrandPageModel): void;
123
+ _navigateToActivePage(activePageId?: string | undefined): void;
123
124
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page/models").BrandPageModel): void;
124
125
  export(): import("@brand-page/models").BrandPageModel;
125
126
  setBrandPageType({ brandPageType }: {
@@ -58,7 +58,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
58
58
  selectedTabName: import("vue").ComputedRef<string>;
59
59
  isAdmin: import("vue").ComputedRef<boolean>;
60
60
  contentErrorCount: import("vue").ComputedRef<number>;
61
- mode: import("vue").ComputedRef<"images" | "pages" | "add" | "edit" | "focusedContentItem">;
61
+ mode: import("vue").ComputedRef<"images" | "add" | "pages" | "edit" | "focusedContentItem">;
62
62
  brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("@brand-page-maker/stores").BrandPageMakerState, {
63
63
  contentErrorCount(): number;
64
64
  brandPageBaseUrl(): string;
@@ -163,8 +163,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
163
163
  content: TContent;
164
164
  }>(payload: P): Promise<void>;
165
165
  _captureTemplateSwitchIfEnabled(): void;
166
- applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
166
+ applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
167
167
  _syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
168
+ _navigateToActivePage(activePageId?: string | undefined): void;
168
169
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
169
170
  export(): import("@brand-page").BrandPageModel;
170
171
  setBrandPageType({ brandPageType }: {
@@ -548,7 +549,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
548
549
  }[];
549
550
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
550
551
  modeStack: {
551
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
552
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
552
553
  selectedItemId?: string | undefined;
553
554
  selectedItemFieldName?: string | undefined;
554
555
  selectedItemIndex?: number | undefined;
@@ -597,7 +598,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
597
598
  }[];
598
599
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
599
600
  modeStack: {
600
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
601
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
601
602
  selectedItemId?: string | undefined;
602
603
  selectedItemFieldName?: string | undefined;
603
604
  selectedItemIndex?: number | undefined;
@@ -646,7 +647,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
646
647
  }[];
647
648
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
648
649
  modeStack: {
649
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
650
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
650
651
  selectedItemId?: string | undefined;
651
652
  selectedItemFieldName?: string | undefined;
652
653
  selectedItemIndex?: number | undefined;
@@ -695,7 +696,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
695
696
  }[];
696
697
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
697
698
  modeStack: {
698
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
699
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
699
700
  selectedItemId?: string | undefined;
700
701
  selectedItemFieldName?: string | undefined;
701
702
  selectedItemIndex?: number | undefined;
@@ -744,7 +745,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
744
745
  }[];
745
746
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
746
747
  modeStack: {
747
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
748
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
748
749
  selectedItemId?: string | undefined;
749
750
  selectedItemFieldName?: string | undefined;
750
751
  selectedItemIndex?: number | undefined;
@@ -793,7 +794,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
793
794
  }[];
794
795
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
795
796
  modeStack: {
796
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
797
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
797
798
  selectedItemId?: string | undefined;
798
799
  selectedItemFieldName?: string | undefined;
799
800
  selectedItemIndex?: number | undefined;
@@ -805,7 +806,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
805
806
  selectedItemIndex: number | null;
806
807
  activeCategoryTab: string;
807
808
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("@shared/content-settings/models").ContentSettingsItemGroupState;
808
- mode(): "images" | "pages" | "add" | "edit" | "focusedContentItem";
809
+ mode(): "images" | "add" | "pages" | "edit" | "focusedContentItem";
809
810
  selectedItem(): import("@shared/content-settings/models").ContentItem<any> | undefined;
810
811
  selectedItemTemplate(): import("@brand-page-maker/models").ContentSettingsConfig<any, {}> | undefined;
811
812
  }, {
@@ -107,8 +107,9 @@ declare const _default: import("vue").DefineComponent<{}, {
107
107
  content: TContent;
108
108
  }>(payload: P): Promise<void>;
109
109
  _captureTemplateSwitchIfEnabled(): void;
110
- applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel): Promise<void>;
110
+ applyHistorySnapshot(snapshot: import("../../../lib").BrandPageModel, activePageId?: string | undefined): Promise<void>;
111
111
  _syncLogoSettingsFromSnapshot(snapshot: import("../../../lib").BrandPageModel): void;
112
+ _navigateToActivePage(activePageId?: string | undefined): void;
112
113
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../lib").BrandPageModel): void;
113
114
  export(): import("../../../lib").BrandPageModel;
114
115
  setBrandPageType({ brandPageType }: {
@@ -108,7 +108,7 @@ declare const _default: import("vue").DefineComponent<{}, {
108
108
  }[];
109
109
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
110
110
  modeStack: {
111
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
111
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
112
112
  selectedItemId?: string | undefined;
113
113
  selectedItemFieldName?: string | undefined;
114
114
  selectedItemIndex?: number | undefined;
@@ -157,7 +157,7 @@ declare const _default: import("vue").DefineComponent<{}, {
157
157
  }[];
158
158
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
159
159
  modeStack: {
160
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
160
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
161
161
  selectedItemId?: string | undefined;
162
162
  selectedItemFieldName?: string | undefined;
163
163
  selectedItemIndex?: number | undefined;
@@ -206,7 +206,7 @@ declare const _default: import("vue").DefineComponent<{}, {
206
206
  }[];
207
207
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
208
208
  modeStack: {
209
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
209
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
210
210
  selectedItemId?: string | undefined;
211
211
  selectedItemFieldName?: string | undefined;
212
212
  selectedItemIndex?: number | undefined;
@@ -255,7 +255,7 @@ declare const _default: import("vue").DefineComponent<{}, {
255
255
  }[];
256
256
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
257
257
  modeStack: {
258
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
258
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
259
259
  selectedItemId?: string | undefined;
260
260
  selectedItemFieldName?: string | undefined;
261
261
  selectedItemIndex?: number | undefined;
@@ -304,7 +304,7 @@ declare const _default: import("vue").DefineComponent<{}, {
304
304
  }[];
305
305
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
306
306
  modeStack: {
307
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
307
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
308
308
  selectedItemId?: string | undefined;
309
309
  selectedItemFieldName?: string | undefined;
310
310
  selectedItemIndex?: number | undefined;
@@ -353,7 +353,7 @@ declare const _default: import("vue").DefineComponent<{}, {
353
353
  }[];
354
354
  itemStates: Record<string, import("@shared/content-settings/models").ContentSettingsItemState>;
355
355
  modeStack: {
356
- mode: "images" | "pages" | "add" | "edit" | "focusedContentItem";
356
+ mode: "images" | "add" | "pages" | "edit" | "focusedContentItem";
357
357
  selectedItemId?: string | undefined;
358
358
  selectedItemFieldName?: string | undefined;
359
359
  selectedItemIndex?: number | undefined;
@@ -365,7 +365,7 @@ declare const _default: import("vue").DefineComponent<{}, {
365
365
  selectedItemIndex: number | null;
366
366
  activeCategoryTab: string;
367
367
  } & import("pinia").PiniaCustomStateProperties<import("@shared/content-settings/store").ContentSettingsState>): (id: string, groupId: string) => import("@shared/content-settings/models").ContentSettingsItemGroupState;
368
- mode(): "images" | "pages" | "add" | "edit" | "focusedContentItem";
368
+ mode(): "images" | "add" | "pages" | "edit" | "focusedContentItem";
369
369
  selectedItem(): ContentItem<any> | undefined;
370
370
  selectedItemTemplate(): import("../../models").ContentSettingsConfig<any, {}> | undefined;
371
371
  }, {
@@ -613,8 +613,9 @@ declare const _default: import("vue").DefineComponent<{}, {
613
613
  content: TContent;
614
614
  }>(payload: P): Promise<void>;
615
615
  _captureTemplateSwitchIfEnabled(): void;
616
- applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
616
+ applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
617
617
  _syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
618
+ _navigateToActivePage(activePageId?: string | undefined): void;
618
619
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
619
620
  export(): import("@brand-page").BrandPageModel;
620
621
  setBrandPageType({ brandPageType }: {
@@ -113,8 +113,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
113
113
  content: TContent;
114
114
  }>(payload: P): Promise<void>;
115
115
  _captureTemplateSwitchIfEnabled(): void;
116
- applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
116
+ applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
117
117
  _syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
118
+ _navigateToActivePage(activePageId?: string | undefined): void;
118
119
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
119
120
  export(): import("../../../brand-page").BrandPageModel;
120
121
  setBrandPageType({ brandPageType }: {
@@ -419,8 +419,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
419
419
  content: TContent;
420
420
  }>(payload: P): Promise<void>;
421
421
  _captureTemplateSwitchIfEnabled(): void;
422
- applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
422
+ applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
423
423
  _syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
424
+ _navigateToActivePage(activePageId?: string | undefined): void;
424
425
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
425
426
  export(): import("../../../brand-page").BrandPageModel;
426
427
  setBrandPageType({ brandPageType }: {
@@ -506,8 +507,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
506
507
  };
507
508
  }>> & Readonly<{}>, {
508
509
  pageTitle: string;
509
- brandPageType: string;
510
510
  designDraftToken: string;
511
+ brandPageType: string;
511
512
  pageDescription: string;
512
513
  isMaker: boolean;
513
514
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -420,8 +420,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
420
420
  content: TContent;
421
421
  }>(payload: P): Promise<void>;
422
422
  _captureTemplateSwitchIfEnabled(): void;
423
- applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
423
+ applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
424
424
  _syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
425
+ _navigateToActivePage(activePageId?: string | undefined): void;
425
426
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
426
427
  export(): import("../../../brand-page").BrandPageModel;
427
428
  setBrandPageType({ brandPageType }: {
@@ -123,8 +123,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
123
123
  content: TContent;
124
124
  }>(payload: P): Promise<void>;
125
125
  _captureTemplateSwitchIfEnabled(): void;
126
- applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel): Promise<void>;
126
+ applyHistorySnapshot(snapshot: import("../../../brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
127
127
  _syncLogoSettingsFromSnapshot(snapshot: import("../../../brand-page").BrandPageModel): void;
128
+ _navigateToActivePage(activePageId?: string | undefined): void;
128
129
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("../../../brand-page").BrandPageModel): void;
129
130
  export(): import("../../../brand-page").BrandPageModel;
130
131
  setBrandPageType({ brandPageType }: {
@@ -471,8 +471,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
471
471
  content: TContent;
472
472
  }>(payload: P): Promise<void>;
473
473
  _captureTemplateSwitchIfEnabled(): void;
474
- applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel): Promise<void>;
474
+ applyHistorySnapshot(snapshot: import("@brand-page").BrandPageModel, activePageId?: string | undefined): Promise<void>;
475
475
  _syncLogoSettingsFromSnapshot(snapshot: import("@brand-page").BrandPageModel): void;
476
+ _navigateToActivePage(activePageId?: string | undefined): void;
476
477
  _fallbackSidebarIfSelectedContentMissing(snapshot: import("@brand-page").BrandPageModel): void;
477
478
  export(): import("@brand-page").BrandPageModel;
478
479
  setBrandPageType({ brandPageType }: {
@@ -1,6 +1,7 @@
1
1
  import { defineStore } from 'pinia';
2
2
  import brandPageClient, {} from '../../../clients/brand-page-client';
3
3
  import { useBrandPageMakerStore, useBrandPageMakerUserStore, useLocalisedRouteStore, useLogoStore, useUiStore, useVideoStore, } from '@brand-page-maker/stores';
4
+ import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
4
5
  import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
5
6
  import { BRAND_PAGE_TYPES, SENSITIVE_CONTENT_TYPES, getAbTestResults, getValueType, } from '@brand-page';
6
7
  import { isLogoContent } from '@brand-page/utils';
@@ -636,6 +637,16 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
636
637
  await this.showSaveSuccessMessage();
637
638
  await brandPageMakerStore.showNextNotificationMessage();
638
639
  }
640
+ // PRD §3 Non-Goals: undo history resets on save/publish so the
641
+ // saved state becomes the new clean baseline. Gate on
642
+ // `baselineCaptured` so non-undo-redo sessions are no-ops (the
643
+ // baseline is only captured when the feature flag is on — see
644
+ // BrandPageMaker.mixin.ts). Both Save Progress and Publish funnel
645
+ // here (publish via `saveAndPublishBrandPage` → `saveBrandPage`).
646
+ const historyStore = useHistoryStore();
647
+ if (historyStore.baselineCaptured) {
648
+ historyStore.reset();
649
+ }
639
650
  return {
640
651
  saved: true,
641
652
  canPublish: response.canPublish,
@@ -209,8 +209,22 @@ export declare const useBrandPageMakerStore: import("pinia").StoreDefinition<"br
209
209
  * feature flag is on — see `BrandPageMaker.mixin.ts`).
210
210
  */
211
211
  _captureTemplateSwitchIfEnabled(): void;
212
- applyHistorySnapshot(snapshot: BrandPageModel): Promise<void>;
212
+ applyHistorySnapshot(snapshot: BrandPageModel, activePageId?: string): Promise<void>;
213
213
  _syncLogoSettingsFromSnapshot(snapshot: BrandPageModel): void;
214
+ /**
215
+ * Restore the active page after a history apply. The id passed in is
216
+ * already validated against the restored nav by the history store; if
217
+ * it's undefined (no entry walking back had a viable page), fall back
218
+ * to the first/default route so the URL, `routeStore.currentRoute.params`,
219
+ * `pageNavigation.activePageId`, and the page-tab highlight all line up.
220
+ *
221
+ * `setCurrentActivePage` is called explicitly in addition to
222
+ * `navigateToPageByPageId` because `navigateToPageByPageId` is a no-op
223
+ * when the router instance is undefined (e.g. SSR / unit tests), but the
224
+ * Pinia state must still be updated so the sidebar's `currentPage`
225
+ * getter returns the right page.
226
+ */
227
+ _navigateToActivePage(activePageId?: string): void;
214
228
  _fallbackSidebarIfSelectedContentMissing(snapshot: BrandPageModel): void;
215
229
  export(): BrandPageModel;
216
230
  setBrandPageType({ brandPageType }: {
@@ -483,7 +483,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
483
483
  return;
484
484
  historyStore.captureTemplateSwitch();
485
485
  },
486
- async applyHistorySnapshot(snapshot) {
486
+ async applyHistorySnapshot(snapshot, activePageId) {
487
487
  const styleSettingsStore = useUiStyleSettingsStore();
488
488
  const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
489
489
  const backgroundSettingsStore = useUiBackgroundSettingsStore();
@@ -567,11 +567,25 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
567
567
  // restored header logo. The preview rehydrates via the page contents,
568
568
  // but `uiLogoSettings` holds its own copy that drives the sidebar
569
569
  // "current logo" state — same pattern as `initialiseStoresByBrandPageModelAsync`.
570
+ // Also restores the variations grid + template asset for the
571
+ // snapshot's draft token (both are sidecars to `brandPageData` —
572
+ // BYO upload mutates them out of band).
570
573
  this._syncLogoSettingsFromSnapshot(snapshot);
571
574
  // 9. If the sidebar is editing a content item that no longer exists in
572
575
  // the restored page, fall back to the Content tab so the user doesn't
573
576
  // stare at a blank settings panel.
574
577
  this._fallbackSidebarIfSelectedContentMissing(snapshot);
578
+ // 10. Switch to the page the user was viewing when this entry was
579
+ // captured (or the closest still-existing page if the captured
580
+ // page was the one being undone-away). The history store does the
581
+ // walk-back resolution and passes us a pageId that's guaranteed to
582
+ // exist in the restored nav — or undefined if no entry walking
583
+ // back has a viable id, in which case we fall through to the
584
+ // first/default route. Without this, the page-tabs carousel keeps
585
+ // highlighting whatever page slug is in the URL (which can no
586
+ // longer match any nav item after a page-add undo) and the
587
+ // sidebar's `currentPage` getter silently falls back to page 0.
588
+ this._navigateToActivePage(activePageId);
575
589
  },
576
590
  _syncLogoSettingsFromSnapshot(snapshot) {
577
591
  const logoSettingsStore = useUiLogoSettingsStore();
@@ -585,15 +599,53 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
585
599
  logoSettingsStore.setState({
586
600
  newState: { selectedLogoImage: logoImage },
587
601
  });
588
- // Re-derive `enableEditMode` so the sidebar's design/upload tabs
589
- // reflect the restored logo. BYO logos can't be edited in the design
590
- // surface, so `enableEditMode` must flip false on undo back to a BYO
591
- // upload and true on redo back to a designed logo. Logo drafts are
592
- // append-only during a session, so a token in the snapshot always
593
- // resolves here.
594
- const draft = logoStore.getLogoDraftAssetByToken(logoImage.logoDraftToken);
595
- if (draft)
602
+ const draftToken = logoImage.logoDraftToken;
603
+ if (!draftToken)
604
+ return;
605
+ // Re-derive `enableEditMode` and the active template asset from the
606
+ // logo-store's draft registry. Drafts are append-only for the session,
607
+ // and BYO upload stamps `templateAsset` onto the registered draft when
608
+ // it lands — so the registered draft is enough to fully restore the
609
+ // sidebar's design/upload chooser without storing anything inside
610
+ // each history entry. The variations grid is restored from the
611
+ // editable-logo store's per-token cache (populated by every
612
+ // `updateEditableLogoImageUrlAsync` render).
613
+ const draft = logoStore.getLogoDraftAssetByToken(draftToken);
614
+ if (draft) {
596
615
  editableLogoStore.setEnableEditMode(!draft.isByo);
616
+ if (draft.templateAsset) {
617
+ logoStore.setLogoTemplateAsset(draft.templateAsset);
618
+ }
619
+ }
620
+ editableLogoStore.setLogoDraftToken(draftToken);
621
+ editableLogoStore.restoreVariationsForDraftToken(draftToken);
622
+ },
623
+ /**
624
+ * Restore the active page after a history apply. The id passed in is
625
+ * already validated against the restored nav by the history store; if
626
+ * it's undefined (no entry walking back had a viable page), fall back
627
+ * to the first/default route so the URL, `routeStore.currentRoute.params`,
628
+ * `pageNavigation.activePageId`, and the page-tab highlight all line up.
629
+ *
630
+ * `setCurrentActivePage` is called explicitly in addition to
631
+ * `navigateToPageByPageId` because `navigateToPageByPageId` is a no-op
632
+ * when the router instance is undefined (e.g. SSR / unit tests), but the
633
+ * Pinia state must still be updated so the sidebar's `currentPage`
634
+ * getter returns the right page.
635
+ */
636
+ _navigateToActivePage(activePageId) {
637
+ const pageNavigationStore = usePageNavigationStore();
638
+ let targetPageId = activePageId;
639
+ if (!targetPageId) {
640
+ const fallbackRoute = pageNavigationStore.routes.length
641
+ ? pageNavigationStore.getFirstOrDefaultRoute()
642
+ : undefined;
643
+ targetPageId = fallbackRoute?.pageId;
644
+ }
645
+ if (!targetPageId)
646
+ return;
647
+ pageNavigationStore.setCurrentActivePage({ pageId: targetPageId });
648
+ navigateToPageByPageId(targetPageId);
597
649
  },
598
650
  _fallbackSidebarIfSelectedContentMissing(snapshot) {
599
651
  const contentSettingsStore = useUiContentSettingsStore();
@@ -8,6 +8,12 @@
8
8
  * with the live store.
9
9
  * 2. `sizeBytes === snapshot.length` is automatic and accurate for the V2
10
10
  * memory-budget instrumentation.
11
+ *
12
+ * Sidecar state that doesn't live on `brandPageData` (the variations grid in
13
+ * the Logo sidebar, the active `logoTemplateAsset`, the active
14
+ * `logoDraftToken`) is restored on undo by `_syncLogoSettingsFromSnapshot`
15
+ * via per-draft-token caches on the logo / editable-logo stores — keyed off
16
+ * `logoImage.logoDraftToken` which IS in the snapshot.
11
17
  */
12
18
  export interface HistoryEntry {
13
19
  /** JSON.stringify(BrandPageModel) at the moment of capture. */
@@ -22,6 +28,18 @@ export interface HistoryEntry {
22
28
  label?: string;
23
29
  /** Serialized size in bytes (= snapshot.length in JS string semantics). */
24
30
  sizeBytes: number;
31
+ /**
32
+ * The page the user was viewing when this entry was captured. Sidecar to the
33
+ * `BrandPageModel` snapshot — page-tab "selected" styling and the sidebar's
34
+ * `currentPage` getter both key off this id (via the route URL → routeStore →
35
+ * `pageNavigation.activePageId`). Snapshots only contain the document model,
36
+ * so without this we can't restore the URL/active-page on undo and the
37
+ * carousel highlight bleeds through to the page that no longer exists.
38
+ *
39
+ * Empty string when no page is active yet (e.g. earliest baseline before
40
+ * first router push). Always a real id once the editor has settled.
41
+ */
42
+ activePageId: string;
25
43
  }
26
44
  export declare const useHistoryStore: import("pinia").StoreDefinition<"history", Pick<{
27
45
  entries: import("vue").ShallowRef<HistoryEntry[], HistoryEntry[]>;
@@ -40,6 +58,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
40
58
  captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
41
59
  undo: () => Promise<void>;
42
60
  redo: () => Promise<void>;
61
+ reset: () => void;
43
62
  getCurrentSizeBytes: () => number;
44
63
  getCurrentEntryCount: () => number;
45
64
  }, "entries" | "currentIndex" | "isApplyingSnapshot" | "baselineCaptured">, Pick<{
@@ -59,6 +78,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
59
78
  captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
60
79
  undo: () => Promise<void>;
61
80
  redo: () => Promise<void>;
81
+ reset: () => void;
62
82
  getCurrentSizeBytes: () => number;
63
83
  getCurrentEntryCount: () => number;
64
84
  }, "canUndo" | "canRedo">, Pick<{
@@ -78,6 +98,7 @@ export declare const useHistoryStore: import("pinia").StoreDefinition<"history",
78
98
  captureAiChangeset: (label?: string) => 'committed' | 'oversized' | 'noop' | 'skipped';
79
99
  undo: () => Promise<void>;
80
100
  redo: () => Promise<void>;
101
+ reset: () => void;
81
102
  getCurrentSizeBytes: () => number;
82
103
  getCurrentEntryCount: () => number;
83
- }, "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;
104
+ }, "reset" | "undo" | "redo" | "captureBaseline" | "capture" | "captureTemplateSwitch" | "captureAiChangeset" | "getCurrentSizeBytes" | "getCurrentEntryCount">>;