@designcrowd/library.brand-page 5.18.7-ast-ai-tab-2 → 5.18.7

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 (87) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-DckAzXwS.js → CreatedOnBrandCrowd-de-de-CZmqvsOT.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DZtkkOuW.js → CreatedOnBrandCrowd-en-us-5nTR1eLT.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-D-cTvYkn.js → CreatedOnBrandCrowd-es-es-xLvoayrw.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-Bu-gxn7L.js → CreatedOnBrandCrowd-fr-ca-CN5n8X8v.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-Bu-gxn7L.js → CreatedOnBrandCrowd-fr-fr-CN5n8X8v.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-Crq_UfGO.js → CreatedOnBrandCrowd-pt-br-CdkYC12E.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-Crq_UfGO.js → CreatedOnBrandCrowd-pt-pt-CdkYC12E.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Cvqe8_oh.js → CreatedOnDcom-de-de-B8rV2rD7.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-FPobbwat.js → CreatedOnDcom-en-us-C4WaRIpF.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DKsGlrMf.js → CreatedOnDcom-es-es-BPHPey0b.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-By218_c_.js → CreatedOnDcom-fr-ca-xrMr4xlv.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BFjfB-ra.js → CreatedOnDcom-fr-fr-BEozL-o2.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-B7Dibff5.js → CreatedOnDcom-pt-br-CoN-ZhjG.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-AYHMrLEG.js → CreatedOnDcom-pt-pt-9vfUJ3ks.js} +1 -1
  15. package/lib/src/brand-page/models/index.d.ts +0 -1
  16. package/lib/src/brand-page/models/index.js +0 -4
  17. package/lib/src/brand-page/utils/personalisation.util.js +14 -76
  18. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
  19. package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +0 -6
  20. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -12
  21. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -2
  22. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
  23. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
  24. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
  25. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
  26. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
  27. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
  28. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
  29. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +3 -2
  30. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +4 -16
  31. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +0 -6
  32. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +0 -1
  33. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +0 -3
  34. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -3
  35. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +1 -5
  36. package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +0 -6
  37. package/lib/src/brand-page-maker/stores/ui/ui-store.js +0 -8
  38. package/lib/src/clients/design-template-client.d.ts +0 -3
  39. package/lib/src/clients/models.d.ts +0 -2
  40. package/lib/src/css/library.brand-page-brandCrowd.min.css +7 -19
  41. package/lib/src/css/library.brand-page-brandPage.min.css +7 -19
  42. package/lib/src/css/library.brand-page-designCom.min.css +7 -19
  43. package/lib/src/css/library.brand-page-preview.min.css +7 -19
  44. package/lib/src/index.mjs +1 -1
  45. package/lib/src/{lib-zYuG2y1l.js → lib-xHNclG2R.js} +17209 -17312
  46. package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +13 -0
  47. package/lib/src/metadata-builder/builders/reorder-pages-builder.js +49 -0
  48. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
  49. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  50. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -7
  51. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +0 -9
  52. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
  53. package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +0 -6
  54. package/lib/src/shared/models.d.ts +0 -2
  55. package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +0 -6
  56. package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +0 -6
  57. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +0 -6
  58. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -7
  59. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -7
  60. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
  61. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -7
  62. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +439 -10
  63. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
  64. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +0 -4
  65. package/lib/src/shared/template-settings/store/template-settings-store.js +11 -84
  66. package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +0 -6
  67. package/package.json +1 -1
  68. package/src/brand-page/models/index.ts +0 -5
  69. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -3
  70. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
  71. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
  72. package/src/brand-page/utils/personalisation.util.test.ts +0 -35
  73. package/src/brand-page/utils/personalisation.util.ts +23 -123
  74. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +0 -4
  75. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
  76. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +7 -22
  77. package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +10 -5
  78. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +0 -5
  79. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -10
  80. package/src/brand-page-maker/stores/ui/ui-store.ts +0 -16
  81. package/src/clients/design-template-client.ts +0 -3
  82. package/src/clients/models.ts +0 -2
  83. package/src/metadata-builder/builders/reorder-pages-builder.ts +80 -0
  84. package/src/shared/models.ts +0 -6
  85. package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +2 -2
  86. package/src/shared/template-settings/store/template-settings-store.ts +18 -110
  87. package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +0 -12
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as t } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as e } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as e } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as e } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as e } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as e } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as M } from "./lib-xHNclG2R.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-zYuG2y1l.js";
2
+ import { _ as M } from "./lib-xHNclG2R.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -547,7 +547,6 @@ export interface SaveContactOptions {
547
547
  }
548
548
  export declare class BrandPageModel {
549
549
  v: number;
550
- userPromptContentKey?: string;
551
550
  styles: PageStyles;
552
551
  /** @deprecated */
553
552
  headerStyles?: AbstractPageHeaderStyles;
@@ -400,10 +400,6 @@ export class PageFooterMobile extends AbstractPageFooterStyles {
400
400
  export class BrandPageModel {
401
401
  // Model version
402
402
  v;
403
- // Pre-purchase AI personalisation content key, persisted with the draft so the
404
- // personalised AI template previews survive login / checkout-back / refresh - the
405
- // content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
406
- userPromptContentKey;
407
403
  styles;
408
404
  /** @deprecated */
409
405
  headerStyles;
@@ -206,61 +206,15 @@ const getPersonalisationValueAsync = async (section, property) => {
206
206
  }
207
207
  return { value: propertyValue, section };
208
208
  };
209
- // The userPrompt AI content generation only populates these content-bearing sections
210
- // (see GenerateAiDesignMakerContentService / GenerateWebsiteContentService - About,
211
- // Information, Profile, Media). Sections like email/website/phone are never generated, so
212
- // blocks whose role points at an ungenerated section fall back to this pool.
213
- const PERSONALISATION_FALLBACK_ROLES = [
214
- 'profile',
215
- 'about',
216
- 'information',
217
- 'media',
218
- ];
219
- // A section is "effectively empty" when it carries no renderable content. The userPrompt
220
- // AI content leaves ungenerated sections (e.g. email/website/phone) as empty objects (null
221
- // sections are normalised to `{ ...indices }` upstream), and those are what we fall back
222
- // from. A section that has data but lacks one specific property (e.g. no items, or an
223
- // invalid shape) is NOT empty - those intentionally keep the original content.
224
- const isSectionEffectivelyEmpty = (section) => {
225
- if (!section) {
226
- return true;
227
- }
228
- return (!section.title &&
229
- !section.name &&
230
- !section.url &&
231
- !section.description &&
232
- !section.descriptionShort &&
233
- !section.ctaTitle &&
234
- !section.imageUrls?.length &&
235
- !section.shapes?.length &&
236
- !section.items?.length &&
237
- !section.mainShapesCollection?.tall?.length &&
238
- !section.mainShapesCollection?.square?.length &&
239
- !section.mainShapesCollection?.wide?.length);
240
- };
241
- // Resolve a property from a specific role's section. Returns null when that section is
242
- // ungenerated (effectively empty) or cannot supply the property, so the caller can try the
243
- // next role.
244
- const resolvePersonalisationValueForRoleAsync = async (role, property, personalisation) => {
245
- const key = `${role}Section`;
246
- const section = personalisation[key];
247
- if (isSectionEffectivelyEmpty(section)) {
248
- return null;
249
- }
250
- const { value, section: updatedSection, valuesToUpdate, } = await getPersonalisationValueAsync(section, property);
251
- if (value === undefined || value === null) {
252
- return null;
253
- }
254
- return {
255
- value,
256
- personalisation: { ...personalisation, [key]: updatedSection },
257
- valuesToUpdate,
258
- };
259
- };
260
209
  const getPersonalisationValueFromPropertyAsync = async (propertyKey, propertyValue, personalisationRole, personalisationOverride, personalisation, contentType) => {
261
210
  if (!personalisationRole || personalisationOverride === 'none') {
262
211
  return { value: undefined, personalisation };
263
212
  }
213
+ const matchingValue = Object.entries(personalisation).find(([key]) => key === `${personalisationRole}Section`);
214
+ if (!matchingValue) {
215
+ return { value: undefined, personalisation };
216
+ }
217
+ const section = matchingValue[1];
264
218
  const mapping = getPersonalisationMappingForContentType(contentType);
265
219
  const matchingProperty = Object.entries(mapping).find(([, value]) => value.includes(propertyKey));
266
220
  if (!matchingProperty) {
@@ -271,31 +225,15 @@ const getPersonalisationValueFromPropertyAsync = async (propertyKey, propertyVal
271
225
  brandPageType: personalisation.type,
272
226
  isSvgShape: typeof propertyValue === 'string' && propertyValue.endsWith('.svg'),
273
227
  });
274
- const primaryKey = `${personalisationRole}Section`;
275
- const primarySection = personalisation[primaryKey];
276
- // When the block's own section has content, use it as-is - this preserves existing
277
- // behaviour, including legitimately keeping the original when that section lacks a
278
- // specific property (e.g. no items, or an invalid shape).
279
- if (!isSectionEffectivelyEmpty(primarySection)) {
280
- const { value, section: updatedSection, valuesToUpdate, } = await getPersonalisationValueAsync(primarySection, property);
281
- return {
282
- value,
283
- personalisation: { ...personalisation, [primaryKey]: updatedSection },
284
- valuesToUpdate,
285
- };
286
- }
287
- // The block's section was never generated (e.g. email/website/phone in the userPrompt
288
- // content). Fall back to the first populated content section that can supply this
289
- // property, so the block doesn't render the designer's "should be AI generated"
290
- // placeholder. When the section exists (handled above) or every section is populated
291
- // (e.g. the AI Website Builder), this fallback is never reached.
292
- for (const role of PERSONALISATION_FALLBACK_ROLES) {
293
- const resolved = await resolvePersonalisationValueForRoleAsync(role, property, personalisation);
294
- if (resolved) {
295
- return resolved;
296
- }
297
- }
298
- return { value: undefined, personalisation };
228
+ const { value, section: updatedSection, valuesToUpdate, } = await getPersonalisationValueAsync(section, property);
229
+ return {
230
+ value,
231
+ personalisation: {
232
+ ...personalisation,
233
+ [`${personalisationRole}Section`]: updatedSection,
234
+ },
235
+ valuesToUpdate,
236
+ };
299
237
  };
300
238
  const applyPersonalisationToBrandPageContentsRecursiveAsync = async (personalisation, mappingType, content, personalisationRole) => {
301
239
  let isApplied = false;
@@ -127,7 +127,7 @@ declare const _default: import("vue").DefineComponent<{}, {
127
127
  brandPageType: "default" | "brandSite" | "brandContact";
128
128
  }): void;
129
129
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page/models").BrandPageModel): Promise<void>;
130
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
130
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
131
131
  initialisePages({ pages, sections, }: {
132
132
  pages: import("@brand-page/models").PageModel[];
133
133
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -251,12 +251,6 @@ declare const _default: import("vue").DefineComponent<{}, {
251
251
  setUserPersonalisationData({ personalisationData, }: {
252
252
  personalisationData: import("../../../brand-page").UserPersonalisationContent[];
253
253
  }): void;
254
- setUserPromptContentKey({ userPromptContentKey, }: {
255
- userPromptContentKey: string | undefined;
256
- }): void;
257
- setShowAiTemplatesTab({ showAiTemplatesTab, }: {
258
- showAiTemplatesTab: boolean;
259
- }): void;
260
254
  onBackgroundChanged(): void;
261
255
  onContentChanged(): void;
262
256
  onStyleChanged(): void;
@@ -20,8 +20,6 @@ export interface BrandPageMakerViewModel {
20
20
  initialCategories: InitialCategories;
21
21
  personalisation?: UserPersonalisationContent[];
22
22
  isPersonalisationEnabled?: boolean;
23
- userPromptContentKey?: string;
24
- showAiTemplatesTab?: boolean;
25
23
  brandPageType?: BrandPageType;
26
24
  businessName?: string;
27
25
  industry?: string;
@@ -174,7 +172,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
174
172
  brandPageType: "default" | "brandSite" | "brandContact";
175
173
  }): void;
176
174
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
177
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
175
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
178
176
  initialisePages({ pages, sections, }: {
179
177
  pages: import("@brand-page").PageModel[];
180
178
  sections: import("@shared/page-settings/store").PageSettingsStateSections;
@@ -943,12 +941,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
943
941
  setUserPersonalisationData({ personalisationData, }: {
944
942
  personalisationData: UserPersonalisationContent[];
945
943
  }): void;
946
- setUserPromptContentKey({ userPromptContentKey, }: {
947
- userPromptContentKey: string | undefined;
948
- }): void;
949
- setShowAiTemplatesTab({ showAiTemplatesTab, }: {
950
- showAiTemplatesTab: boolean;
951
- }): void;
952
944
  onBackgroundChanged(): void;
953
945
  onContentChanged(): void;
954
946
  onStyleChanged(): void;
@@ -1095,9 +1087,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
1095
1087
  initialSearchTerm: string;
1096
1088
  onSearchTermChanged?: import("@shared/template-settings/store").OnSearchTermChangedCallback | undefined;
1097
1089
  }): void;
1098
- setAiTemplateKeywords(payload: {
1099
- aiTemplateKeywords: string;
1100
- }): void;
1101
1090
  notifySearchTermChanged(searchTerm: string | undefined): void;
1102
1091
  clearTemplates(): void;
1103
1092
  getTemplateByTemplateId(id: string): import("@shared/template-settings/models").TemplateSettingsTemplate | undefined;
@@ -150,8 +150,6 @@ export default defineComponent({
150
150
  templateCategories: this.viewModel.templateCategories,
151
151
  personalisationData: this.viewModel.personalisation,
152
152
  isPersonalisationEnabled: this.viewModel.isPersonalisationEnabled || false,
153
- userPromptContentKey: this.viewModel.userPromptContentKey,
154
- showAiTemplatesTab: this.viewModel.showAiTemplatesTab || false,
155
153
  brandPageType: this.viewModel.brandPageType,
156
154
  businessName: this.viewModel.businessName,
157
155
  industry: this.viewModel.industry,
@@ -179,7 +179,6 @@ const InitialiseMakerStores = (options) => {
179
179
  isContextualUpgradeModalVisible: false,
180
180
  gettyVideos: [],
181
181
  templateSearchTerm: undefined,
182
- aiTemplateKeywords: undefined,
183
182
  });
184
183
  userStore.setUserState({
185
184
  isAdmin: options.isAdmin,
@@ -116,7 +116,7 @@ declare const _default: import("vue").DefineComponent<{}, {
116
116
  brandPageType: "default" | "brandSite" | "brandContact";
117
117
  }): void;
118
118
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../lib").BrandPageModel): Promise<void>;
119
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
119
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("../../stores").InitialisePayload): Promise<void>;
120
120
  initialisePages({ pages, sections, }: {
121
121
  pages: import("../../../lib").PageModel[];
122
122
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -622,7 +622,7 @@ declare const _default: import("vue").DefineComponent<{}, {
622
622
  brandPageType: "default" | "brandSite" | "brandContact";
623
623
  }): void;
624
624
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
625
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
625
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
626
626
  initialisePages({ pages, sections, }: {
627
627
  pages: import("@brand-page").PageModel[];
628
628
  sections: import("@shared/page-settings/store").PageSettingsStateSections;
@@ -122,7 +122,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
122
122
  brandPageType: "default" | "brandSite" | "brandContact";
123
123
  }): void;
124
124
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
125
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
125
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
126
126
  initialisePages({ pages, sections, }: {
127
127
  pages: import("../../../brand-page").PageModel[];
128
128
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -400,7 +400,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
400
400
  brandPageType: "default" | "brandSite" | "brandContact";
401
401
  }): void;
402
402
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
403
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
403
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
404
404
  initialisePages({ pages, sections, }: {
405
405
  pages: import("../../../brand-page").PageModel[];
406
406
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -401,7 +401,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
401
401
  brandPageType: "default" | "brandSite" | "brandContact";
402
402
  }): void;
403
403
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
404
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
404
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
405
405
  initialisePages({ pages, sections, }: {
406
406
  pages: import("../../../brand-page").PageModel[];
407
407
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -132,7 +132,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
132
132
  brandPageType: "default" | "brandSite" | "brandContact";
133
133
  }): void;
134
134
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
135
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
135
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
136
136
  initialisePages({ pages, sections, }: {
137
137
  pages: import("../../../brand-page").PageModel[];
138
138
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="types/lodash-shims" />
2
2
  import type { PropType } from 'vue';
3
3
  import type { BrandPageContext, BrandPageViewModel, LogoImageModel, LogoTemplateImageModel, LogoTheme, UserPersonalisation } from '@brand-page';
4
- import type { TemplateSettingsTemplate } from '@shared/template-settings/models';
4
+ import { type TemplateSettingsTemplate } from '@shared/template-settings/models';
5
5
  import type { DebounceHandle } from 'lodash.debounce';
6
6
  interface TemplatePreviewData {
7
7
  containerStyle: BrandPageCssStyle;
@@ -68,6 +68,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
68
68
  isAdmin: import("vue").ComputedRef<boolean>;
69
69
  userToken: import("vue").ComputedRef<string | undefined>;
70
70
  isBrandSite: import("vue").ComputedRef<boolean>;
71
+ selectedTab: import("vue").ComputedRef<string>;
71
72
  renderAsImage: import("vue").ComputedRef<boolean>;
72
73
  brandPageMakerUserStore: import("pinia").Store<"brandPageMakerUser", import("@brand-page-maker/stores").UserState, {}, {
73
74
  setUserState(payload: {
@@ -451,7 +452,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
451
452
  brandPageType: "default" | "brandSite" | "brandContact";
452
453
  }): void;
453
454
  initialiseStoresByBrandPageModelAsync(brandPageModel: import("@brand-page").BrandPageModel): Promise<void>;
454
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
455
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
455
456
  initialisePages({ pages, sections, }: {
456
457
  pages: import("@brand-page").PageModel[];
457
458
  sections: import("../../../shared/page-settings/store").PageSettingsStateSections;
@@ -2,6 +2,7 @@ import { computed, defineComponent } from 'vue';
2
2
  import { BRAND_PAGE_TYPES, MEDIA_SIZES, VIEWPORTS } from '@brand-page';
3
3
  import { applyLogoThemeToBrandPageModel, applyUserPersonalisationToBrandPageModelAsync, getBrandPageViewModelFromBrandPageModel, } from '@brand-page/utils';
4
4
  import { STYLE_THEME_KEYS } from '@brand-page/constants';
5
+ import { TEMPLATE_TABS, } from '@shared/template-settings/models';
5
6
  import debounce from 'lodash.debounce';
6
7
  import { MOBILE_HEIGHT, MOBILE_WIDTH } from '@brand-page-maker/constants';
7
8
  import { useBrandPageContainerStore, useBrandPageMakerStore, useBrandPageMakerUserStore, } from '@brand-page-maker/stores';
@@ -23,6 +24,7 @@ export default defineComponent({
23
24
  isAdmin: computed(() => brandPageMakerUserStore.isAdmin),
24
25
  userToken: computed(() => brandPageMakerUserStore.userToken),
25
26
  isBrandSite: computed(() => brandPageMakerStore.brandPageType === BRAND_PAGE_TYPES.brandSite),
27
+ selectedTab: computed(() => templateSettingsStore.selectedTab.key),
26
28
  renderAsImage: computed(() => templateSettingsStore.renderAsImage),
27
29
  brandPageMakerUserStore,
28
30
  brandPageContainerStore,
@@ -169,23 +171,9 @@ export default defineComponent({
169
171
  if (!previewImageUrl) {
170
172
  return '';
171
173
  }
172
- // Interleaved AI templates (bp-5742) already have the personalisation key
173
- // baked into the URL by the backend. Appending our own (hash-derived) key
174
- // on top produces a second, mismatched key and breaks the preview, so only
175
- // append when the backend hasn't already personalised the URL.
176
- const isAlreadyPersonalised = previewImageUrl.includes('contentKey=') ||
177
- previewImageUrl.includes('userPromptContentKey=');
178
- if (this.isPersonalisable &&
179
- this.template.contentKey &&
180
- !isAlreadyPersonalised) {
174
+ if (this.selectedTab === TEMPLATE_TABS.AI && this.template.contentKey) {
181
175
  if (this.userToken) {
182
- previewImageUrl += `&contentKey=${this.template.contentKey}`;
183
- // The backend already bakes userToken into brand-site preview URLs. Only add
184
- // it when missing - two userToken params parse as an array and the preview
185
- // renderer rejects it ("userToken must be a string type") (bp-5765).
186
- if (!previewImageUrl.includes('userToken=')) {
187
- previewImageUrl += `&userToken=${this.userToken}`;
188
- }
176
+ previewImageUrl += `&contentKey=${this.template.contentKey}&userToken=${this.userToken}`;
189
177
  }
190
178
  else {
191
179
  previewImageUrl += `&userPromptContentKey=${this.template.contentKey}`;
@@ -8,7 +8,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
8
8
  userMessageId: string;
9
9
  model: {
10
10
  v: number;
11
- userPromptContentKey?: string | undefined;
12
11
  styles: {
13
12
  backgroundStyles: {
14
13
  style: {
@@ -5115,7 +5114,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
5115
5114
  userMessageId: string;
5116
5115
  model: {
5117
5116
  v: number;
5118
- userPromptContentKey?: string | undefined;
5119
5117
  styles: {
5120
5118
  backgroundStyles: {
5121
5119
  style: {
@@ -10228,7 +10226,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
10228
10226
  userMessageId: string;
10229
10227
  model: {
10230
10228
  v: number;
10231
- userPromptContentKey?: string | undefined;
10232
10229
  styles: {
10233
10230
  backgroundStyles: {
10234
10231
  style: {
@@ -15335,7 +15332,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
15335
15332
  userMessageId: string;
15336
15333
  model: {
15337
15334
  v: number;
15338
- userPromptContentKey?: string | undefined;
15339
15335
  styles: {
15340
15336
  backgroundStyles: {
15341
15337
  style: {
@@ -20448,7 +20444,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
20448
20444
  userMessageId: string;
20449
20445
  model: {
20450
20446
  v: number;
20451
- userPromptContentKey?: string | undefined;
20452
20447
  styles: {
20453
20448
  backgroundStyles: {
20454
20449
  style: {
@@ -25555,7 +25550,6 @@ export declare const useAiCheckpointStore: import("pinia").StoreDefinition<"aiCh
25555
25550
  userMessageId: string;
25556
25551
  model: {
25557
25552
  v: number;
25558
- userPromptContentKey?: string | undefined;
25559
25553
  styles: {
25560
25554
  backgroundStyles: {
25561
25555
  style: {
@@ -75,7 +75,6 @@ export type InitialisePayload = Omit<BrandPageContainerState, 'customDomain' | '
75
75
  logoDraftAssets: LogoDraftAsset[];
76
76
  gettyVideos: GettyVideoEditorViewModelResponse[];
77
77
  templateSearchTerm: string | undefined;
78
- aiTemplateKeywords: string | undefined;
79
78
  onSearchTermChanged?: OnSearchTermChangedCallback;
80
79
  };
81
80
  export declare const BRANDPAGE_STATUS: Readonly<{
@@ -137,9 +137,6 @@ export const useBrandPageContainerStore = defineStore('brandPageContainer', {
137
137
  initialSearchTerm: payload.templateSearchTerm ?? '',
138
138
  onSearchTermChanged: payload.onSearchTermChanged,
139
139
  });
140
- templateSettingsStore.setAiTemplateKeywords({
141
- aiTemplateKeywords: payload.aiTemplateKeywords ?? '',
142
- });
143
140
  brandPageMakerStore.setSelectedTemplateId({
144
141
  templateId: this.designTemplateToken,
145
142
  });
@@ -20,8 +20,6 @@ export interface InitialisePayload {
20
20
  templateCategories: TemplateCategory[];
21
21
  personalisationData?: UserPersonalisationContent[];
22
22
  isPersonalisationEnabled: boolean;
23
- userPromptContentKey?: string;
24
- showAiTemplatesTab?: boolean;
25
23
  businessName: string | undefined;
26
24
  industry: string | undefined;
27
25
  layout?: string;
@@ -233,7 +231,7 @@ export declare const useBrandPageMakerStore: import("pinia").StoreDefinition<"br
233
231
  brandPageType: BrandPageType;
234
232
  }): void;
235
233
  initialiseStoresByBrandPageModelAsync(brandPageModel: BrandPageModel): Promise<void>;
236
- initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: InitialisePayload): Promise<void>;
234
+ initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride, }: InitialisePayload): Promise<void>;
237
235
  initialisePages({ pages, sections, }: {
238
236
  pages: PageModel[];
239
237
  sections: PageSettingsStateSections;
@@ -824,7 +824,7 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
824
824
  transformToRTE(pageSettingsStore, externalEditor, undefined, undefined, TEXT_STYLE_TYPES.paragraphs, textStyles.textStyleOptions.paragraphs.style);
825
825
  externalEditor.destroy();
826
826
  },
827
- async initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab = false, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride = false, }) {
827
+ async initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, businessName, industry, layout, logoVariationImageUrls, shopConfigData, isServerRenderOverride = false, }) {
828
828
  const brandPageContainerStore = useBrandPageContainerStore();
829
829
  const userStore = useBrandPageMakerUserStore();
830
830
  const uiStore = useUiStore();
@@ -895,8 +895,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
895
895
  personalisationData: personalisationData,
896
896
  });
897
897
  }
898
- uiStore.setUserPromptContentKey({ userPromptContentKey });
899
- uiStore.setShowAiTemplatesTab({ showAiTemplatesTab });
900
898
  templateSettingsStore.setTemplateCategories({
901
899
  categories: templateCategories,
902
900
  });
@@ -1229,7 +1227,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1229
1227
  const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
1230
1228
  const shopStore = useShopConfigStore();
1231
1229
  const pageNavigationStore = usePageNavigationStore();
1232
- const uiStore = useUiStore();
1233
1230
  const pages = pageSettingsStore.pages.map((p) => ({
1234
1231
  ...p,
1235
1232
  contents: p.contents.map((c) => c.settings.content),
@@ -1243,7 +1240,6 @@ export const useBrandPageMakerStore = defineStore('brandPageMaker', {
1243
1240
  const pageNavStructure = pageNavigationStore.nav;
1244
1241
  return {
1245
1242
  v: GetLatestModelVersion(),
1246
- userPromptContentKey: uiStore.userPromptContentKey,
1247
1243
  pages,
1248
1244
  styles: {
1249
1245
  logoStyles,
@@ -23,12 +23,6 @@ export declare const useUiStore: import("pinia").StoreDefinition<"ui", UIRootSta
23
23
  setUserPersonalisationData({ personalisationData, }: {
24
24
  personalisationData: UserPersonalisationContent[];
25
25
  }): void;
26
- setUserPromptContentKey({ userPromptContentKey, }: {
27
- userPromptContentKey: string | undefined;
28
- }): void;
29
- setShowAiTemplatesTab({ showAiTemplatesTab, }: {
30
- showAiTemplatesTab: boolean;
31
- }): void;
32
26
  onBackgroundChanged(): void;
33
27
  onContentChanged(): void;
34
28
  onStyleChanged(): void;