@designcrowd/library.brand-page 5.16.24-pre-temp-7 → 5.16.25-2

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 (65) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-CKSMoYph.js → CreatedOnBrandCrowd-de-de-Ch0n753P.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BE826zG3.js → CreatedOnBrandCrowd-en-us-B48UACQl.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BT1_CiIR.js → CreatedOnBrandCrowd-es-es-BUFUO_0v.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Dd7QbEx8.js → CreatedOnBrandCrowd-fr-ca-DkM45w95.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-Dd7QbEx8.js → CreatedOnBrandCrowd-fr-fr-DkM45w95.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-Cj3w8Tzr.js → CreatedOnBrandCrowd-pt-br-BrfXhDcV.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-Cj3w8Tzr.js → CreatedOnBrandCrowd-pt-pt-BrfXhDcV.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DgG4EwAb.js → CreatedOnDcom-de-de-BXtSjuuW.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Zf_zsQD-.js → CreatedOnDcom-en-us-0YJL5DzN.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BI5_Uta1.js → CreatedOnDcom-es-es-DL_QwZzN.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-Bwc9B1Ma.js → CreatedOnDcom-fr-ca-Bv3VkWWL.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CdUHAhrh.js → CreatedOnDcom-fr-fr-BT5nAd3W.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CnqCmpYk.js → CreatedOnDcom-pt-br-O4Y_UNoK.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-B20uZkxO.js → CreatedOnDcom-pt-pt-D06bNEGa.js} +1 -1
  15. package/lib/src/brand-page/constants/logo.constants.d.ts +0 -1
  16. package/lib/src/brand-page/constants/logo.constants.js +0 -2
  17. package/lib/src/brand-page/utils/logo.util.d.ts +4 -1
  18. package/lib/src/brand-page/utils/logo.util.js +21 -18
  19. package/lib/src/brand-page/utils/migration/migration-07.d.ts +2 -4
  20. package/lib/src/brand-page/utils/migration/migration-07.js +1 -1
  21. package/lib/src/brand-page/utils/migration/migration-08.d.ts +2 -5
  22. package/lib/src/brand-page/utils/migration/migration-08.js +2 -5
  23. package/lib/src/brand-page/utils/migration.util.d.ts +5 -3
  24. package/lib/src/brand-page/utils/migration.util.js +0 -1
  25. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -0
  26. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.js +8 -3
  27. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +4 -4
  28. package/lib/src/brand-page-maker/constants/template-constants.d.ts +1 -0
  29. package/lib/src/brand-page-maker/constants/template-constants.js +1 -0
  30. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +6 -7
  31. package/lib/src/clients/design-template-client.d.ts +0 -2
  32. package/lib/src/clients/fabric-render-client.d.ts +0 -3
  33. package/lib/src/css/library.brand-page-brandCrowd.min.css +84 -82
  34. package/lib/src/css/library.brand-page-brandPage.min.css +84 -82
  35. package/lib/src/css/library.brand-page-designCom.min.css +84 -82
  36. package/lib/src/css/library.brand-page-preview.min.css +84 -82
  37. package/lib/src/index.d.ts +1 -1
  38. package/lib/src/index.mjs +97 -97
  39. package/lib/src/{lib-CUR1pqIf.js → lib-CtPHohpu.js} +8791 -8820
  40. package/lib/src/lib.js +1 -1
  41. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +0 -2
  42. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +0 -2
  43. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +0 -4
  44. package/lib/src/shared/logo-settings/store/editable-logo-store.js +0 -11
  45. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +0 -2
  46. package/lib/src/shared/template-settings/store/template-settings-store.js +8 -39
  47. package/package.json +1 -1
  48. package/src/brand-page/components/page-header/HeaderLayout.vue +5 -3
  49. package/src/brand-page/constants/logo.constants.ts +0 -3
  50. package/src/brand-page/utils/logo.util.test.ts +0 -37
  51. package/src/brand-page/utils/logo.util.ts +28 -31
  52. package/src/brand-page/utils/migration/migration-07.test.ts +32 -8
  53. package/src/brand-page/utils/migration/migration-07.ts +3 -3
  54. package/src/brand-page/utils/migration/migration-08.test.ts +38 -10
  55. package/src/brand-page/utils/migration/migration-08.ts +4 -14
  56. package/src/brand-page/utils/migration.util.ts +10 -11
  57. package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.ts +12 -2
  58. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +4 -4
  59. package/src/brand-page-maker/constants/template-constants.ts +1 -0
  60. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +7 -9
  61. package/src/clients/design-template-client.ts +0 -2
  62. package/src/clients/fabric-render-client.ts +0 -3
  63. package/src/lib.ts +0 -1
  64. package/src/shared/logo-settings/store/editable-logo-store.ts +0 -13
  65. package/src/shared/template-settings/store/template-settings-store.ts +9 -52
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as e, openBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CUR1pqIf.js";
2
+ import { _ as t } from "./lib-CtPHohpu.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CUR1pqIf.js";
2
+ import { _ as e } from "./lib-CtPHohpu.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CUR1pqIf.js";
2
+ import { _ as e } from "./lib-CtPHohpu.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CUR1pqIf.js";
2
+ import { _ as e } from "./lib-CtPHohpu.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CUR1pqIf.js";
2
+ import { _ as e } from "./lib-CtPHohpu.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CUR1pqIf.js";
2
+ import { _ as e } from "./lib-CtPHohpu.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CUR1pqIf.js";
2
+ import { _ as M } from "./lib-CtPHohpu.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as H, openBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CUR1pqIf.js";
2
+ import { _ as M } from "./lib-CtPHohpu.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -5,4 +5,3 @@ export declare const LOGO_VARIATION: {
5
5
  TEXT_ONLY_WITH_TRANSPARENT_BACKGROUND: number;
6
6
  };
7
7
  export declare const DEFAULT_LOGO_VARIATION: number;
8
- export declare const LOGO_MIGRATION_VERSION = 6;
@@ -5,5 +5,3 @@ export const LOGO_VARIATION = {
5
5
  TEXT_ONLY_WITH_TRANSPARENT_BACKGROUND: 3,
6
6
  };
7
7
  export const DEFAULT_LOGO_VARIATION = LOGO_VARIATION.LOGO_WITH_TRANSPARENT_BACKGROUND;
8
- // migrating logo images to a fixed height
9
- export const LOGO_MIGRATION_VERSION = 6;
@@ -1,3 +1,4 @@
1
+ import type { BrandPageType } from '../models';
1
2
  import { type BrandPageModel, type LogoImageModel, type LogoTemplateImageModel, type LogoVariation } from '../models';
2
3
  import { type LogoOutputFormat } from '../../clients/fabric-render-client';
3
4
  export declare const getLogoDraftTokenFromLogoImageUrl: (variationUrl?: string) => string;
@@ -12,7 +13,9 @@ export declare const applyLogoImageBase64UrlToBrandPageTemplateModel: (model: Br
12
13
  export declare const applyLogoTemplateImageToBrandPageTemplateModel: (model: BrandPageModel, logoTemplateImage: LogoTemplateImageModel) => BrandPageModel;
13
14
  export declare const getLogoVariationUrlByLogoImage: (logoImage: LogoImageModel) => string | undefined;
14
15
  export declare const getLogoTemplateUrlByLogoTemplateImage: (logoTemplateImage: LogoTemplateImageModel) => string;
15
- export declare const getOptimalLogoSize: (width: number, height: number, currentSize: string) => string;
16
+ export declare const getOptimalLogoSize: (brandPageType: BrandPageType, width: number, height: number) => {
17
+ newLogoSize: string;
18
+ };
16
19
  export declare const calculateLogoDimensions: (logoData: {
17
20
  width: number;
18
21
  height: number;
@@ -1,4 +1,4 @@
1
- import { DEFAULT_LOGO_VARIATION, LOGO_VARIATION, DEFAULT_LOGO_WIDTH, DEFAULT_LOGO_HEIGHT, } from '../constants';
1
+ import { DEFAULT_LOGO_VARIATION, LOGO_VARIATION } from '../constants';
2
2
  import { BRAND_PAGE_TYPES, } from '../models';
3
3
  import { FabricRenderClient, LogoVariationDefinitions, } from '../../clients/fabric-render-client';
4
4
  import { isLogoContent } from './model.util';
@@ -167,21 +167,26 @@ export const getLogoVariationUrlByLogoImage = (logoImage) => {
167
167
  export const getLogoTemplateUrlByLogoTemplateImage = (logoTemplateImage) => {
168
168
  return FabricRenderClient.getInstance().getLogoTemplateUrlByLogoTemplateImage(logoTemplateImage);
169
169
  };
170
- export const getOptimalLogoSize = (width, height, currentSize) => {
171
- if (parseFloat(currentSize) >= 16) {
172
- return currentSize;
173
- }
174
- const aspectRatio = width / height;
175
- if (!parseFloat(`${aspectRatio}`) || aspectRatio <= 1) {
176
- return currentSize;
177
- }
178
- const newSize = parseFloat(currentSize) + (aspectRatio - 1) * 4.5;
179
- if (newSize > 11) {
180
- return '11rem';
170
+ export const getOptimalLogoSize = (brandPageType, width, height) => {
171
+ const ratio = width / height;
172
+ let newLogoSize = '11rem'; // default size
173
+ if (brandPageType === BRAND_PAGE_TYPES.brandSite) {
174
+ if (ratio < 0.95) {
175
+ // tall logos
176
+ newLogoSize = '10rem';
177
+ }
178
+ else if (ratio >= 1.65) {
179
+ // wide logos
180
+ newLogoSize = '10rem';
181
+ }
181
182
  }
182
183
  else {
183
- return `${Math.round(newSize)}rem`;
184
+ // BP and BC default
185
+ newLogoSize = '8rem';
184
186
  }
187
+ return {
188
+ newLogoSize,
189
+ };
185
190
  };
186
191
  export const calculateLogoDimensions = (logoData, maxWidth, maxHeight) => {
187
192
  const maxWidthRem = parseFloat(maxWidth);
@@ -249,11 +254,9 @@ export const recalculateLogoContentDimensions = async (pageData, editableLogoVar
249
254
  }
250
255
  // Apply dimensions or fallback logic
251
256
  if (logoData && logoData.width && logoData.height) {
252
- const currentMaxWidth = content.logoImageWidth || DEFAULT_LOGO_WIDTH;
253
- const currentMaxHeight = content.logoImageHeight || DEFAULT_LOGO_HEIGHT;
254
- const dimensions = calculateOptimizedLogoDimensions(logoData, currentMaxWidth, currentMaxHeight);
255
- content.logoImageHeight = dimensions.height;
256
- content.logoImageWidth = dimensions.width;
257
+ const dimensions = getOptimalLogoSize(BRAND_PAGE_TYPES.default, logoData.width, logoData.height);
258
+ content.logoImageHeight = dimensions.newLogoSize;
259
+ content.logoImageWidth = dimensions.newLogoSize;
257
260
  }
258
261
  });
259
262
  }
@@ -1,4 +1,2 @@
1
- import type { MigrationData } from '../migration.util';
2
- export declare const migration07: (migrationResult: MigrationData, options: {
3
- isServerRender: boolean;
4
- }) => Promise<MigrationData>;
1
+ import type { MigrationData, MigrationOptions } from '../migration.util';
2
+ export declare const migration07: (migrationResult: MigrationData, options: MigrationOptions) => Promise<MigrationData>;
@@ -6,7 +6,7 @@ export const migration07 = async (migrationResult, options) => {
6
6
  if (brandPageModel.brandPageType !== BRAND_PAGE_TYPES.brandSite) {
7
7
  return migrationResult;
8
8
  }
9
- if (options.isServerRender !== undefined && options.isServerRender) {
9
+ if (options.disableLogoSizeMigration) {
10
10
  migrationResult.useOldLogoRenderSize = true;
11
11
  return migrationResult;
12
12
  }
@@ -1,5 +1,2 @@
1
- import type { MigrationData } from '../migration.util';
2
- export declare const migration08: (migrationResult: MigrationData, options: {
3
- isServerRender: boolean;
4
- isUserDraft?: boolean;
5
- }) => Promise<MigrationData>;
1
+ import type { MigrationData, MigrationOptions } from '../migration.util';
2
+ export declare const migration08: (migrationResult: MigrationData, options: MigrationOptions) => Promise<MigrationData>;
@@ -1,17 +1,14 @@
1
1
  import { DEFAULT_LOGO_HEIGHT, DEFAULT_LOGO_WIDTH, BRAND_PAGE_TYPES, } from '../..';
2
2
  import { FabricRenderClient } from '../../../clients/fabric-render-client';
3
3
  import { isLogoContent } from '../model.util';
4
- import { calculateLogoDimensions, safeGetLogoImageFromLogoImageUrl, } from '../logo.util';
4
+ import { calculateLogoDimensions } from '../logo.util';
5
5
  export const migration08 = async (migrationResult, options) => {
6
6
  const { brandPageModel } = migrationResult;
7
7
  if (brandPageModel.brandPageType !== BRAND_PAGE_TYPES.default &&
8
8
  brandPageModel.brandPageType !== BRAND_PAGE_TYPES.brandContact) {
9
9
  return migrationResult;
10
10
  }
11
- if (options.isUserDraft !== undefined && !options.isUserDraft) {
12
- return migrationResult;
13
- }
14
- if (options.isServerRender !== undefined && options.isServerRender) {
11
+ if (options.disableLogoSizeMigration) {
15
12
  migrationResult.useOldLogoRenderSize = true;
16
13
  return migrationResult;
17
14
  }
@@ -3,9 +3,11 @@ export interface MigrationData {
3
3
  brandPageModel: BrandPageModel;
4
4
  useOldLogoRenderSize: boolean;
5
5
  }
6
- export declare const GetLatestModelVersion: () => number;
7
- export declare const migrateBrandPageModel: (brandPageModel: BrandPageModel, options: {
6
+ export interface MigrationOptions {
8
7
  logoImage?: LogoImageModel;
9
8
  isUserDraft: boolean;
10
9
  isServerRender: boolean;
11
- }) => Promise<MigrationData>;
10
+ disableLogoSizeMigration?: boolean;
11
+ }
12
+ export declare const GetLatestModelVersion: () => number;
13
+ export declare const migrateBrandPageModel: (brandPageModel: BrandPageModel, options: MigrationOptions) => Promise<MigrationData>;
@@ -1,4 +1,3 @@
1
- import { LOGO_MIGRATION_VERSION } from '../constants';
2
1
  import {} from '../models';
3
2
  import { migration01 } from './migration/migration-01';
4
3
  import { migration01_1 } from './migration/migration-01_1';
@@ -1,6 +1,7 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
2
  brandPageType: import("vue").ComputedRef<"default" | "brandSite" | "brandContact">;
3
3
  isBrandSite: import("vue").ComputedRef<boolean>;
4
+ isPrePurchase: import("vue").ComputedRef<boolean>;
4
5
  isBrandPageOrIsBrandContact: import("vue").ComputedRef<boolean>;
5
6
  brandPageMakerStore: import("pinia").Store<"brandPageMaker", import("../../stores").BrandPageMakerState, {
6
7
  contentErrorCount(): number;
@@ -1,12 +1,14 @@
1
1
  import { computed, defineComponent } from 'vue';
2
- import { DESKTOP_HEIGHT, DESKTOP_WIDTH, MOBILE_HEIGHT, MOBILE_WIDTH, } from '../../constants';
3
- import { useBrandPageMakerStore } from '../../../lib';
2
+ import { DESKTOP_HEIGHT, DESKTOP_WIDTH, MOBILE_HEIGHT, MOBILE_WIDTH, MOBILE_HEIGHT_POST_PURCHASE, } from '../../constants';
3
+ import { useBrandPageMakerStore, useBrandPageContainerStore, } from '../../../lib';
4
4
  export default defineComponent({
5
5
  setup() {
6
6
  const brandPageMakerStore = useBrandPageMakerStore();
7
+ const brandPageContainerStore = useBrandPageContainerStore();
7
8
  return {
8
9
  brandPageType: computed(() => brandPageMakerStore.brandPageType),
9
10
  isBrandSite: computed(() => brandPageMakerStore.isBrandSite),
11
+ isPrePurchase: computed(() => brandPageContainerStore.isPrePurchase),
10
12
  isBrandPageOrIsBrandContact: computed(() => brandPageMakerStore.isBrandPageOrIsBrandContact),
11
13
  brandPageMakerStore,
12
14
  };
@@ -19,7 +21,10 @@ export default defineComponent({
19
21
  return this.isBrandSite ? DESKTOP_WIDTH : MOBILE_WIDTH;
20
22
  },
21
23
  height() {
22
- return this.isBrandSite ? DESKTOP_HEIGHT : MOBILE_HEIGHT;
24
+ if (this.isBrandSite) {
25
+ return DESKTOP_HEIGHT;
26
+ }
27
+ return this.isPrePurchase ? MOBILE_HEIGHT : MOBILE_HEIGHT_POST_PURCHASE;
23
28
  },
24
29
  },
25
30
  });
@@ -189,7 +189,7 @@ export default defineComponent({
189
189
  },
190
190
  watch: {
191
191
  template() {
192
- if (this.isAdmin) {
192
+ if (this.isAdmin || this.isPrePurchase) {
193
193
  this.updateViewModel();
194
194
  }
195
195
  else {
@@ -200,7 +200,7 @@ export default defineComponent({
200
200
  },
201
201
  logoTheme: {
202
202
  handler() {
203
- if (this.isAdmin) {
203
+ if (this.isAdmin || this.isPrePurchase) {
204
204
  this.updateViewModel();
205
205
  }
206
206
  },
@@ -208,7 +208,7 @@ export default defineComponent({
208
208
  },
209
209
  previewImageUrl() {
210
210
  // Reset loading state whenever the preview URL changes
211
- if (!this.isAdmin) {
211
+ if (!this.isAdmin && !this.isPrePurchase) {
212
212
  this.imageLoading = true;
213
213
  this.imageLoadError = false;
214
214
  }
@@ -267,7 +267,7 @@ export default defineComponent({
267
267
  },
268
268
  async updateViewModel(forceUpdate = true) {
269
269
  // Only update view model for admin or pre-purchase mode
270
- if (!this.isAdmin) {
270
+ if (!this.isAdmin && !this.isPrePurchase) {
271
271
  return;
272
272
  }
273
273
  const videoStore = useVideoStore();
@@ -1,4 +1,5 @@
1
1
  export declare const MOBILE_HEIGHT = 734;
2
+ export declare const MOBILE_HEIGHT_POST_PURCHASE = 636;
2
3
  export declare const MOBILE_WIDTH = 358;
3
4
  export declare const DESKTOP_HEIGHT = 600;
4
5
  export declare const DESKTOP_WIDTH = 1000;
@@ -1,4 +1,5 @@
1
1
  export const MOBILE_HEIGHT = 734;
2
+ export const MOBILE_HEIGHT_POST_PURCHASE = 636;
2
3
  export const MOBILE_WIDTH = 358;
3
4
  export const DESKTOP_HEIGHT = 600;
4
5
  export const DESKTOP_WIDTH = 1000;
@@ -176,7 +176,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
176
176
  const userStore = useBrandPageMakerUserStore();
177
177
  const containerStore = useBrandPageContainerStore();
178
178
  const uiContentSettings = useUiContentSettingsStore();
179
- // look into this
180
179
  if (!this.selectedTemplateId) {
181
180
  return;
182
181
  }
@@ -553,13 +552,14 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
553
552
  ? logoPrePurchase
554
553
  : logoPostPurchase;
555
554
  if (logo && logoImageHeight) {
556
- const newLogoSize = getOptimalLogoSize(logo.width, logo.height, logoImageHeight);
557
- pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageWidth = newLogoSize;
558
- pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageHeight = newLogoSize;
555
+ const optimalSize = getOptimalLogoSize(this.brandPageType, logo.width, logo.height);
556
+ pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageWidth = optimalSize.newLogoSize;
557
+ pageSettingsStore.sections[PAGE_SECTIONS.header][VIEWPORTS.desktop].logoImageHeight = optimalSize.newLogoSize;
559
558
  }
560
559
  }
561
- else if (this.isBrandPageOrIsBrandContact &&
562
- brandPageContainerStore.isPrePurchase) {
560
+ else if (!brandPageContainerStore.designDraftToken &&
561
+ !userStore.isAdmin &&
562
+ this.isBrandPageOrIsBrandContact) {
563
563
  recalculateLogoContentDimensions(pageSettingsStore, editableLogoStore.editableLogoVariations);
564
564
  }
565
565
  const backgroundStyles = new BackgroundStyles(brandPageModel.styles.backgroundStyles);
@@ -898,7 +898,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
898
898
  const uiStore = useUiStore();
899
899
  const videoStore = useVideoStore();
900
900
  if (userStore.isAdmin && uiStore.logoTheme) {
901
- // need something like this on template selection too
902
901
  const themedBrandPage = applyLogoThemeToBrandPageModel(uiStore.logoTheme, this.brandPageData).model;
903
902
  return getBrandPageViewModelFromBrandPageModel(themedBrandPage, this.brandPageToken, undefined, {
904
903
  useOldLogoRenderSize: false,
@@ -18,8 +18,6 @@ interface GetTemplatesAsyncOptions {
18
18
  personalisable?: boolean;
19
19
  selectedTemplateToken?: string | false;
20
20
  locale?: string;
21
- logoS3Token?: string;
22
- logoTemplateToken?: string;
23
21
  }
24
22
  export declare const getTemplatesEndpoint: (templateTypeName: string) => string;
25
23
  export declare const getTemplateEndpoint: (templateToken: any) => string;
@@ -26,7 +26,6 @@ export interface ModifyLogoDataRequest {
26
26
  dimensionsType: string;
27
27
  variation: string;
28
28
  primaryText?: string;
29
- generateS3Url?: boolean;
30
29
  logo: {
31
30
  template: {
32
31
  token: string;
@@ -50,8 +49,6 @@ export interface ModifyLogoDataResponse {
50
49
  metadata: string | null;
51
50
  width: number;
52
51
  height: number;
53
- expiryDate?: string;
54
- s3Token?: string;
55
52
  }
56
53
  export declare const LOGO_DIMENSION_TYPES: {
57
54
  PREVIEW_IMAGE_TRANSPARENT_NO_BUFFER: string;