@designcrowd/library.brand-page 6.1.1-json-prereq-3 → 6.1.1

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 (216) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-hj_ievMc.js → CreatedOnBrandCrowd-de-de-B5B5ThJ6.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-jAOSpfCw.js → CreatedOnBrandCrowd-en-us-a48CaORy.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-DZMVc-y3.js → CreatedOnBrandCrowd-es-es-xpuZ317-.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DvB54H38.js → CreatedOnBrandCrowd-fr-ca-V-iUMArW.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DvB54H38.js → CreatedOnBrandCrowd-fr-fr-V-iUMArW.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-bf-x1xhi.js → CreatedOnBrandCrowd-pt-br-DZ0NKSAy.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-bf-x1xhi.js → CreatedOnBrandCrowd-pt-pt-DZ0NKSAy.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-B-NY1B44.js → CreatedOnDcom-de-de-_950cgGp.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Cd4C6KQf.js → CreatedOnDcom-en-us-DogKzH-g.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-DONlsQsm.js → CreatedOnDcom-es-es-CmGM3IPX.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-Dsv3FRpZ.js → CreatedOnDcom-fr-ca-BonEDkWZ.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DOgyvY5C.js → CreatedOnDcom-fr-fr-DQHtKrd_.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-DX66MhJS.js → CreatedOnDcom-pt-br-CtYJSBjs.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-COe2G0bU.js → CreatedOnDcom-pt-pt-DoO9r4lA.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +7 -8
  16. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +6 -4
  17. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +1 -0
  18. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +4 -1
  19. package/lib/src/brand-page/components/payment/Payment.mixin.js +4 -3
  20. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +1 -0
  21. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +1 -0
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +1 -0
  23. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -1
  24. package/lib/src/brand-page/composables/consent.composable.d.ts +2 -0
  25. package/lib/src/brand-page/composables/consent.composable.js +9 -3
  26. package/lib/src/brand-page/models/brand-page-context.model.d.ts +7 -0
  27. package/lib/src/brand-page/models/index.d.ts +26 -34
  28. package/lib/src/brand-page/utils/context.util.d.ts +8 -0
  29. package/lib/src/brand-page/utils/context.util.js +8 -0
  30. package/lib/src/brand-page/utils/migration.util.js +0 -11
  31. package/lib/src/brand-page/utils/text.util.d.ts +1 -13
  32. package/lib/src/brand-page/utils/text.util.js +0 -64
  33. package/lib/src/brand-page/utils/vcard.util.js +4 -4
  34. package/lib/src/brand-page/utils/view-model.util.d.ts +0 -1
  35. package/lib/src/brand-page/utils/view-model.util.js +20 -68
  36. package/lib/src/brand-page/view-models.d.ts +3 -3
  37. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
  38. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +51 -18
  39. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +1 -0
  40. package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.d.ts +9 -2
  41. package/lib/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.js +10 -6
  42. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/FontSize.d.ts +20 -0
  43. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/FontSize.js +44 -0
  44. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/LineHeight.d.ts +27 -0
  45. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/LineHeight.js +44 -0
  46. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +1 -1
  47. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +103 -24
  48. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +8 -0
  49. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +9 -3
  50. package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +1 -1
  51. package/lib/src/brand-page-maker/utils/index.d.ts +0 -2
  52. package/lib/src/brand-page-maker/utils/index.js +0 -2
  53. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +5 -28
  54. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +5 -48
  55. package/lib/src/brand-page-maker/validators/field.validator.js +2 -10
  56. package/lib/src/clients/models.d.ts +2 -0
  57. package/lib/src/css/library.brand-page-brandCrowd.min.css +99 -102
  58. package/lib/src/css/library.brand-page-brandPage.min.css +99 -102
  59. package/lib/src/css/library.brand-page-designCom.min.css +99 -102
  60. package/lib/src/css/library.brand-page-preview.min.css +99 -102
  61. package/lib/src/index.d.ts +1 -1
  62. package/lib/src/index.mjs +219 -221
  63. package/lib/src/{lib-scDtk-Pi.js → lib-DtalJKI3.js} +72445 -75920
  64. package/lib/src/lib.js +1 -2
  65. package/lib/src/metadata-builder/ai-metadata-executor.d.ts +1 -0
  66. package/lib/src/metadata-builder/ai-metadata-executor.js +19 -0
  67. package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +3 -2
  68. package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +3 -2
  69. package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.js +3 -2
  70. package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +4 -3
  71. package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +3 -2
  72. package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +2 -1
  73. package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +2 -1
  74. package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +4 -3
  75. package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +3 -2
  76. package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +2 -1
  77. package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +11 -15
  78. package/lib/src/metadata-builder/builders/update-content-text-builder.d.ts +17 -0
  79. package/lib/src/metadata-builder/builders/update-content-text-builder.js +103 -0
  80. package/lib/src/metadata-builder/builders/update-content-text-style-builder.d.ts +16 -0
  81. package/lib/src/metadata-builder/builders/update-content-text-style-builder.js +216 -0
  82. package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +13 -11
  83. package/lib/src/metadata-builder/helpers/rte.helpers.js +73 -14
  84. package/lib/src/metadata-builder/metadata-executor.js +4 -0
  85. package/lib/src/metadata-builder/models.d.ts +2 -0
  86. package/lib/src/metadata-builder/models.js +2 -0
  87. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +19 -0
  88. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +4 -0
  89. package/lib/src/metadata-builder/sanitizers/rte-schema-check.d.ts +8 -7
  90. package/lib/src/metadata-builder/sanitizers/rte-schema-check.js +52 -21
  91. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -1
  92. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.js +10 -35
  93. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  94. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +3 -12
  95. package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -1
  96. package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -1
  97. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +2 -3
  98. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.js +3 -10
  99. package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -1
  100. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +1 -2
  101. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -4
  102. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -1
  103. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -1
  104. package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -1
  105. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -1
  106. package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +1 -1
  107. package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +1 -1
  108. package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +1 -1
  109. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +1 -1
  110. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
  111. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
  112. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
  113. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +1 -1
  114. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +2 -0
  115. package/lib/src/shared/template-settings/store/template-settings-store.js +72 -24
  116. package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +1 -1
  117. package/lib/src/utils/minify-brand-page-metadata.js +1 -4
  118. package/package.json +15 -17
  119. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +9 -7
  120. package/src/brand-page/components/cookie-consent/CookieConsent.vue +1 -0
  121. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -3
  122. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +5 -1
  123. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +4 -1
  124. package/src/brand-page/components/page-footer/PageFooter.vue +1 -1
  125. package/src/brand-page/components/payment/Payment.mixin.ts +4 -3
  126. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +8 -1
  127. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -1
  128. package/src/brand-page/components/save-contact/SaveContactWidget.vue +2 -1
  129. package/src/brand-page/components/shop/Shop.vue +6 -3
  130. package/src/brand-page/components/social-links/SocialLinks.vue +5 -2
  131. package/src/brand-page/components/text-wrapper/TextWrapper.vue +6 -17
  132. package/src/brand-page/composables/consent.composable.ts +18 -4
  133. package/src/brand-page/models/brand-page-context.model.ts +7 -0
  134. package/src/brand-page/models/index.ts +26 -35
  135. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  136. package/src/brand-page/utils/context.util.test.ts +43 -0
  137. package/src/brand-page/utils/context.util.ts +10 -0
  138. package/src/brand-page/utils/migration.util.ts +0 -12
  139. package/src/brand-page/utils/style.util.test.ts +0 -51
  140. package/src/brand-page/utils/text.util.ts +4 -83
  141. package/src/brand-page/utils/vcard.util.ts +4 -6
  142. package/src/brand-page/utils/view-model.util.ts +26 -94
  143. package/src/brand-page/view-models.ts +2 -3
  144. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +4 -5
  145. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.test.ts +135 -0
  146. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +62 -21
  147. package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +1 -0
  148. package/src/brand-page-maker/composables/rich-text-editor/bubbleMenu.ts +10 -6
  149. package/src/brand-page-maker/composables/rich-text-editor/extensions/FontSize.ts +73 -0
  150. package/src/brand-page-maker/composables/rich-text-editor/extensions/LineHeight.ts +85 -0
  151. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +111 -27
  152. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +9 -0
  153. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +11 -3
  154. package/src/brand-page-maker/stores/ui/ui-store.ts +1 -1
  155. package/src/brand-page-maker/utils/index.ts +0 -2
  156. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +3 -37
  157. package/src/brand-page-maker/utils/rich-text-editor.util.ts +11 -66
  158. package/src/brand-page-maker/validators/field.validator.ts +2 -10
  159. package/src/clients/models.ts +3 -0
  160. package/src/lib.ts +1 -9
  161. package/src/metadata-builder/ai-metadata-executor.ts +26 -0
  162. package/src/metadata-builder/builders/section-builders/about-section-builder.ts +3 -2
  163. package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +3 -2
  164. package/src/metadata-builder/builders/section-builders/booking-section-builder.ts +5 -2
  165. package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +4 -3
  166. package/src/metadata-builder/builders/section-builders/images-section-builder.ts +3 -2
  167. package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +2 -1
  168. package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +2 -1
  169. package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +6 -3
  170. package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +3 -2
  171. package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +2 -1
  172. package/src/metadata-builder/builders/section-builders/text-section-builder.ts +13 -19
  173. package/src/metadata-builder/builders/update-content-text-builder.ts +148 -0
  174. package/src/metadata-builder/builders/update-content-text-style-builder.ts +352 -0
  175. package/src/metadata-builder/helpers/rte.helpers.ts +101 -15
  176. package/src/metadata-builder/metadata-executor.ts +5 -0
  177. package/src/metadata-builder/models.ts +3 -0
  178. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +27 -0
  179. package/src/metadata-builder/sanitizers/rte-schema-check.ts +53 -24
  180. package/src/shared/content-settings/components/GenericTextInput.mixin.ts +11 -42
  181. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +3 -16
  182. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.ts +4 -13
  183. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +4 -6
  184. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +3 -6
  185. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -6
  186. package/src/shared/content-settings/components/text-items-field/TextItemsField.vue +1 -1
  187. package/src/shared/template-settings/store/template-settings-store.ts +93 -27
  188. package/src/utils/minify-brand-page-metadata.ts +1 -4
  189. package/lib/src/brand-page/utils/migration/migration-20.d.ts +0 -2
  190. package/lib/src/brand-page/utils/migration/migration-20.js +0 -66
  191. package/lib/src/brand-page-maker/__fixtures__/complex-rte.fixture.d.ts +0 -22
  192. package/lib/src/brand-page-maker/__fixtures__/complex-rte.fixture.js +0 -22
  193. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.d.ts +0 -14
  194. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.js +0 -39
  195. package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.d.ts +0 -28
  196. package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.js +0 -117
  197. package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +0 -63
  198. package/lib/src/brand-page-maker/utils/rte-render.util.js +0 -95
  199. package/lib/src/brand-page-maker/utils/rte-sanitize.util.d.ts +0 -6
  200. package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +0 -156
  201. package/src/brand-page/utils/migration/migration-20.server.test.ts +0 -125
  202. package/src/brand-page/utils/migration/migration-20.test.ts +0 -72
  203. package/src/brand-page/utils/migration/migration-20.ts +0 -87
  204. package/src/brand-page/utils/text.util.test.ts +0 -106
  205. package/src/brand-page/utils/view-model.pageid-rte.test.ts +0 -104
  206. package/src/brand-page-maker/__fixtures__/complex-rte.fixture.ts +0 -23
  207. package/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.test.ts +0 -52
  208. package/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.ts +0 -42
  209. package/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.ts +0 -162
  210. package/src/brand-page-maker/utils/__snapshots__/rte-render-parity.test.ts.snap +0 -202
  211. package/src/brand-page-maker/utils/rte-features.test.ts +0 -378
  212. package/src/brand-page-maker/utils/rte-render-parity.test.ts +0 -164
  213. package/src/brand-page-maker/utils/rte-render.util.ts +0 -165
  214. package/src/brand-page-maker/utils/rte-sanitize-json.test.ts +0 -172
  215. package/src/brand-page-maker/utils/rte-sanitize.util.ts +0 -192
  216. package/src/brand-page-maker/validators/field.validator.test.ts +0 -55
@@ -8,7 +8,7 @@ import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
8
8
  import { ITEM_FIELD_TYPES } from '@brand-page-maker/models';
9
9
  import { useUiPageSettingsStore } from '../../../page-settings/store';
10
10
  import { PAGE_SECTIONS } from '../../../page-settings/models';
11
- import { getPlainTextFromRTE, replaceTextInRTE, RTE_ALLOWED_SECTION_TYPES, isRTEManagedStyleField, isTiptapDocument, renderRteToHtml, toRteJson, } from '@brand-page-maker/utils';
11
+ import { getPlainTextFromRTE, replaceTextInRTE, RTE_ALLOWED_SECTION_TYPES, isRTEManagedStyleField, } from '@brand-page-maker/utils';
12
12
  import { isDefaultContentText } from '@shared/content-settings/utils';
13
13
  import { useUiLogoSettingsStore } from '../../../logo-settings/store';
14
14
  const RTE_DISALLOWED_FIELD_NAMES = ['buttonText'];
@@ -267,17 +267,8 @@ export default defineComponent({
267
267
  },
268
268
  onUseGeneratedText(generatedText) {
269
269
  let formattedText = generatedText;
270
- // BP-5787: preserve the field's formatting when dropping in AI text.
271
- // replaceTextInRTE is HTML-based, so JSON is rendered/parsed around it
272
- // (cold AI path, shared editor); string fields use it directly.
273
- if (this.showRichTextEditor) {
274
- if (isTiptapDocument(this.value)) {
275
- formattedText =
276
- toRteJson(replaceTextInRTE(renderRteToHtml(this.value), generatedText)) ?? generatedText;
277
- }
278
- else if (typeof this.value === 'string') {
279
- formattedText = replaceTextInRTE(this.value, generatedText);
280
- }
270
+ if (this.showRichTextEditor && typeof this.value === 'string') {
271
+ formattedText = replaceTextInRTE(this.value, generatedText);
281
272
  }
282
273
  this.contentSettingsStore.updateItemValue({
283
274
  id: this.id,
@@ -80,13 +80,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
80
80
  _oldValue: string;
81
81
  isDirty: boolean;
82
82
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
83
+ lengthError: boolean;
83
84
  burstIsHydration: boolean | undefined;
84
85
  pendingWriteIsHydration: boolean;
85
86
  }, {
86
87
  errorMessage(): string | undefined;
87
88
  isErrorVisible(): boolean;
88
89
  isValid(): boolean | undefined;
89
- lengthError(): boolean;
90
90
  label(): string;
91
91
  text: {
92
92
  get(): string | false;
@@ -80,13 +80,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
80
80
  _oldValue: string;
81
81
  isDirty: boolean;
82
82
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
83
+ lengthError: boolean;
83
84
  burstIsHydration: boolean | undefined;
84
85
  pendingWriteIsHydration: boolean;
85
86
  }, {
86
87
  errorMessage(): string | undefined;
87
88
  isErrorVisible(): boolean;
88
89
  isValid(): boolean | undefined;
89
- lengthError(): boolean;
90
90
  label(): string;
91
91
  text: {
92
92
  get(): string | false;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { ColorReplacement, Content, LogoTheme, RichTextValue, TestimonialItems } from '@brand-page';
2
+ import type { ColorReplacement, Content, LogoTheme, TestimonialItems } from '@brand-page';
3
3
  import type { DebounceHandle } from 'lodash.debounce';
4
4
  import type { UpdateItemValuePayload } from '../../models';
5
5
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
@@ -64,8 +64,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
64
64
  name: string;
65
65
  value: string;
66
66
  }, index: number): void;
67
- getItemTextPreview(text: RichTextValue): string;
68
- rteTextLength(value: RichTextValue): number;
67
+ getItemTextPreview(text: string): string;
69
68
  getPlainTextValue(index: number): string;
70
69
  onCaptureSnapshot(): void;
71
70
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "capture-preview-snapshot" | "on-intent-image-replace")[], "update:modelValue" | "capture-preview-snapshot" | "on-intent-image-replace", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -3,7 +3,7 @@ import { EMPTY_TESTIMONIAL, MAX_DESCRIPTION_LENGTH, MAX_LENGTH_ERROR_MESSAGE, MA
3
3
  import debounce from 'lodash.debounce';
4
4
  import cloneDeep from 'lodash.clonedeep';
5
5
  import { useSnapshotStore } from '@brand-page-maker/stores';
6
- import { getPlainTextFromRTE, getRteTextLength } from '@brand-page-maker/utils';
6
+ import { getPlainTextFromRTE } from '@brand-page-maker/utils';
7
7
  import { isDefaultContentText } from '../../utils';
8
8
  import { decodeHtmlEntities } from '@brand-page/utils';
9
9
  import { ESCAPED_NEWLINE_CHARACTER } from '../../../../constants/ui';
@@ -73,9 +73,7 @@ export default defineComponent({
73
73
  },
74
74
  created() {
75
75
  this.options = cloneDeep(this.value);
76
- // BP-5787: testimonials may be Tiptap JSON (migrated legacy content), so
77
- // read visible text via getPlainTextFromRTE rather than `.trim()` on a doc.
78
- this.isEmpty = this.options.map((option) => getPlainTextFromRTE(option.testimonials).length === 0);
76
+ this.isEmpty = this.options.map((option) => option.testimonials.trim().length === 0);
79
77
  if (!this.changeDebounce) {
80
78
  this.changeDebounce = debounce(this.emitChange, DEBOUNCE_IN_MS);
81
79
  }
@@ -162,12 +160,7 @@ export default defineComponent({
162
160
  this.emitChange();
163
161
  },
164
162
  getItemTextPreview(text) {
165
- // BP-5787: a JSON doc has no `.replace` — take its visible text first.
166
- const value = typeof text === 'string' ? text : getPlainTextFromRTE(text);
167
- return decodeHtmlEntities(value.replace(new RegExp(ESCAPED_NEWLINE_CHARACTER, 'g'), ' '));
168
- },
169
- rteTextLength(value) {
170
- return getRteTextLength(value);
163
+ return decodeHtmlEntities(text.replace(new RegExp(ESCAPED_NEWLINE_CHARACTER, 'g'), ' '));
171
164
  },
172
165
  getPlainTextValue(index) {
173
166
  const text = this.options[index]?.testimonials || '';
@@ -80,13 +80,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import
80
80
  _oldValue: string;
81
81
  isDirty: boolean;
82
82
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
83
+ lengthError: boolean;
83
84
  burstIsHydration: boolean | undefined;
84
85
  pendingWriteIsHydration: boolean;
85
86
  }, {
86
87
  errorMessage(): string | undefined;
87
88
  isErrorVisible(): boolean;
88
89
  isValid(): boolean | undefined;
89
- lengthError(): boolean;
90
90
  label(): string;
91
91
  text: {
92
92
  get(): string | false;
@@ -1,5 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- import type { Content, LogoTheme, RichTextValue, TextItem, TextStyleDeclaration } from '@brand-page/models';
2
+ import type { Content, LogoTheme, TextItem, TextStyleDeclaration } from '@brand-page/models';
3
3
  import type { DebounceHandle } from 'lodash.debounce';
4
4
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
5
  id: {
@@ -79,7 +79,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
79
79
  name: string;
80
80
  value: string;
81
81
  }, index: number): void;
82
- rteTextLength(value: RichTextValue): number;
83
82
  getPlainTextValue(index: number): string;
84
83
  onCaptureSnapshot(): void;
85
84
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("capture-preview-snapshot" | "update:model-value")[], "capture-preview-snapshot" | "update:model-value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -4,7 +4,7 @@ import debounce from 'lodash.debounce';
4
4
  import cloneDeep from 'lodash.clonedeep';
5
5
  import { decodeHtmlEntities, escapeContentText } from '@brand-page/utils';
6
6
  import { useSnapshotStore } from '@brand-page-maker/stores';
7
- import { getPlainTextFromRTE, getRteTextLength } from '@brand-page-maker/utils';
7
+ import { getPlainTextFromRTE } from '@brand-page-maker/utils';
8
8
  import { isDefaultContentText } from '../../utils';
9
9
  const DEBOUNCE_IN_MS = 250;
10
10
  export default defineComponent({
@@ -172,9 +172,6 @@ export default defineComponent({
172
172
  this.options[index][payload.name] = payload.value;
173
173
  this.emitChange();
174
174
  },
175
- rteTextLength(value) {
176
- return getRteTextLength(value);
177
- },
178
175
  getPlainTextValue(index) {
179
176
  const text = this.options[index]?.text || '';
180
177
  const plainText = getPlainTextFromRTE(text);
@@ -94,13 +94,13 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
94
94
  _oldValue: string;
95
95
  isDirty: boolean;
96
96
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
97
+ lengthError: boolean;
97
98
  burstIsHydration: boolean | undefined;
98
99
  pendingWriteIsHydration: boolean;
99
100
  }, {
100
101
  errorMessage(): string | undefined;
101
102
  isErrorVisible(): boolean;
102
103
  isValid(): boolean | undefined;
103
- lengthError(): boolean;
104
104
  label(): string;
105
105
  text: {
106
106
  get(): string | false;
@@ -87,13 +87,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, Record<string, any
87
87
  _oldValue: string;
88
88
  isDirty: boolean;
89
89
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
90
+ lengthError: boolean;
90
91
  burstIsHydration: boolean | undefined;
91
92
  pendingWriteIsHydration: boolean;
92
93
  }, {
93
94
  errorMessage(): string | undefined;
94
95
  isErrorVisible(): boolean;
95
96
  isValid(): boolean | undefined;
96
- lengthError(): boolean;
97
97
  label(): string;
98
98
  text: {
99
99
  get(): string | false;
@@ -83,13 +83,13 @@ declare const _default: import("vue").DefineComponent<{}, {}, Record<string, any
83
83
  _oldValue: string;
84
84
  isDirty: boolean;
85
85
  emitChangeDebounce: import("lodash.debounce").DebounceHandle | undefined;
86
+ lengthError: boolean;
86
87
  burstIsHydration: boolean | undefined;
87
88
  pendingWriteIsHydration: boolean;
88
89
  }, {
89
90
  errorMessage(): string | undefined;
90
91
  isErrorVisible(): boolean;
91
92
  isValid(): boolean | undefined;
92
- lengthError(): boolean;
93
93
  label(): string;
94
94
  text: {
95
95
  get(): string | false;
@@ -168,7 +168,7 @@ declare const _default: import("vue").DefineComponent<{}, {
168
168
  mode: import("../../models").UiScreenSizeMode;
169
169
  }): void;
170
170
  setUserPersonalisationData({ personalisationData, }: {
171
- personalisationData: import("../../../brand-page").UserPersonalisationContent[];
171
+ personalisationData: import("../../../brand-page").UserPersonalisationContent[] | undefined;
172
172
  }): void;
173
173
  setUserPromptContentKey({ userPromptContentKey, }: {
174
174
  userPromptContentKey: string | undefined;
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
25
  mode: import("../models").UiScreenSizeMode;
26
26
  }): void;
27
27
  setUserPersonalisationData({ personalisationData, }: {
28
- personalisationData: import("../../brand-page").UserPersonalisationContent[];
28
+ personalisationData: import("../../brand-page").UserPersonalisationContent[] | undefined;
29
29
  }): void;
30
30
  setUserPromptContentKey({ userPromptContentKey, }: {
31
31
  userPromptContentKey: string | undefined;
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{}, {
20
20
  mode: import("../models").UiScreenSizeMode;
21
21
  }): void;
22
22
  setUserPersonalisationData({ personalisationData, }: {
23
- personalisationData: import("../../brand-page").UserPersonalisationContent[];
23
+ personalisationData: import("../../brand-page").UserPersonalisationContent[] | undefined;
24
24
  }): void;
25
25
  setUserPromptContentKey({ userPromptContentKey, }: {
26
26
  userPromptContentKey: string | undefined;
@@ -37,7 +37,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
37
37
  mode: import("../models").UiScreenSizeMode;
38
38
  }): void;
39
39
  setUserPersonalisationData({ personalisationData, }: {
40
- personalisationData: import("../../brand-page").UserPersonalisationContent[];
40
+ personalisationData: import("../../brand-page").UserPersonalisationContent[] | undefined;
41
41
  }): void;
42
42
  setUserPromptContentKey({ userPromptContentKey, }: {
43
43
  userPromptContentKey: string | undefined;
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
60
60
  mode: import("../models").UiScreenSizeMode;
61
61
  }): void;
62
62
  setUserPersonalisationData({ personalisationData, }: {
63
- personalisationData: import("../../brand-page").UserPersonalisationContent[];
63
+ personalisationData: import("../../brand-page").UserPersonalisationContent[] | undefined;
64
64
  }): void;
65
65
  setUserPromptContentKey({ userPromptContentKey, }: {
66
66
  userPromptContentKey: string | undefined;
@@ -3916,7 +3916,7 @@ declare const _default: import("vue").DefineComponent<{}, {
3916
3916
  mode: import("../../../models").UiScreenSizeMode;
3917
3917
  }): void;
3918
3918
  setUserPersonalisationData({ personalisationData, }: {
3919
- personalisationData: import("@brand-page").UserPersonalisationContent[];
3919
+ personalisationData: import("@brand-page").UserPersonalisationContent[] | undefined;
3920
3920
  }): void;
3921
3921
  setUserPromptContentKey({ userPromptContentKey, }: {
3922
3922
  userPromptContentKey: string | undefined;
@@ -3897,7 +3897,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
3897
3897
  mode: import("../../../models").UiScreenSizeMode;
3898
3898
  }): void;
3899
3899
  setUserPersonalisationData({ personalisationData, }: {
3900
- personalisationData: import("@brand-page").UserPersonalisationContent[];
3900
+ personalisationData: import("@brand-page").UserPersonalisationContent[] | undefined;
3901
3901
  }): void;
3902
3902
  setUserPromptContentKey({ userPromptContentKey, }: {
3903
3903
  userPromptContentKey: string | undefined;
@@ -379,7 +379,7 @@ declare const _default: import("vue").DefineComponent<{}, {
379
379
  mode: import("../../models").UiScreenSizeMode;
380
380
  }): void;
381
381
  setUserPersonalisationData({ personalisationData, }: {
382
- personalisationData: import("@brand-page").UserPersonalisationContent[];
382
+ personalisationData: import("@brand-page").UserPersonalisationContent[] | undefined;
383
383
  }): void;
384
384
  setUserPromptContentKey({ userPromptContentKey, }: {
385
385
  userPromptContentKey: string | undefined;
@@ -107,7 +107,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
107
107
  mode: import("../../models").UiScreenSizeMode;
108
108
  }): void;
109
109
  setUserPersonalisationData({ personalisationData, }: {
110
- personalisationData: import("../../../brand-page").UserPersonalisationContent[];
110
+ personalisationData: import("../../../brand-page").UserPersonalisationContent[] | undefined;
111
111
  }): void;
112
112
  setUserPromptContentKey({ userPromptContentKey, }: {
113
113
  userPromptContentKey: string | undefined;
@@ -1,5 +1,6 @@
1
1
  import type { TemplateSettingsTemplate, DesignTemplateType, OnTemplateSelectedPayload, TemplateTab, OnSearchPayload, OnTabSelectedPayload, TemplateCategory, OnCategorySelectedPayload, SetTemplateCategoriesPayload } from '../models';
2
2
  import { type DesignTemplate } from '../../../clients/models';
3
+ import { type UserPersonalisationContent } from '@brand-page/models';
3
4
  export declare const DEFAULT_PAGE_SIZE = 6;
4
5
  type SelectedTabType = {
5
6
  key: string;
@@ -19,6 +20,7 @@ export interface TemplatesSettingState {
19
20
  selectedTab: SelectedTabType;
20
21
  selectedCategory: string | undefined;
21
22
  searchTerm: string | undefined;
23
+ searchPersonalisationData: UserPersonalisationContent[] | undefined;
22
24
  tabsWithTranslations: SelectedTabType[];
23
25
  logoChangeWatcherInitialized: boolean;
24
26
  initialSearchTerm: string | undefined;
@@ -5,7 +5,7 @@ import { BP_DEFAULT_TEMPLATE_TYPE_NAME, BP_BRAND_SITE_TEMPLATE_TYPE_NAME, SIDE_B
5
5
  import { defineStore, storeToRefs } from 'pinia';
6
6
  import { useBrandPageContainerStore, useBrandPageMakerStore, useBrandPageMakerUserStore, useLogoStore, useUiStore, } from '@brand-page-maker/stores';
7
7
  import { useUiSideBarStore } from '../../side-bar/store';
8
- import { BrandPageModel } from '@brand-page/models';
8
+ import { BrandPageModel, } from '@brand-page/models';
9
9
  import { migrateBrandPageModel } from '@brand-page/utils';
10
10
  import { getAiContentIndexByTemplateTokenAndNumberOfVariations } from '@brand-page-maker/utils/ai-content-selection.util';
11
11
  import { useUiEditableLogoStore, useUiLogoSettingsStore, } from '../../logo-settings/store';
@@ -20,6 +20,7 @@ const POST_PURCHASE_PAGE_SECTION_BY_TAB = {
20
20
  };
21
21
  const PRE_PURCHASE_PAGE_SECTION_BY_TAB = {
22
22
  [TEMPLATE_TABS.all]: 'MakerPrePurchaseSidebarTemplatesAllTab',
23
+ [TEMPLATE_TABS.AI]: 'MakerPrePurchaseSidebarTemplatesAiTab',
23
24
  [TEMPLATE_TABS.categories]: 'MakerPrePurchaseSidebarTemplatesCategoryTab',
24
25
  };
25
26
  const LOAD_PAGE_RETRY_DELAY = 250;
@@ -38,6 +39,7 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
38
39
  displayName: templateSettingsTr(`headerAll`),
39
40
  },
40
41
  searchTerm: undefined,
42
+ searchPersonalisationData: undefined,
41
43
  selectedCategory: undefined,
42
44
  templateCategories: [],
43
45
  tabsWithTranslations: [
@@ -200,15 +202,21 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
200
202
  const editableLogoVariation = editableLogoStore.editableLogoVariations[logoVariation];
201
203
  const isPrePurchase = brandPageContainerStore.isPrePurchase;
202
204
  const isBrandSite = this.templateType === BP_BRAND_SITE_TEMPLATE_TYPE_NAME;
203
- // Pre-purchase has no logo draft for logo-based recommendation, so fall back to the seeded
204
- // search term (the keyword from the URL/cookie - never the business name) so the All tab
205
- // stays relevant instead of generic (bp-5454).
206
- const effectiveSearchTerm = !this.searchTerm &&
205
+ // With no user search, the All tab must still show industry-relevant templates rather than
206
+ // generic ones (searchIndustries alone doesn't rank the non-AI half). Seed searchTerm as an
207
+ // invisible default: pre-purchase has no logo to read an industry from, so it uses the seeded
208
+ // keyword from the URL/cookie (bp-5454); post-purchase falls back to the logo draft's industry
209
+ // (bp-5789). Once the user searches, this.searchTerm takes over. this.searchTerm stays unset
210
+ // here, so AI content-key resolution below is unaffected.
211
+ const useSeededSearchTerm = !this.searchTerm &&
207
212
  !this.selectedCategory &&
208
- isPrePurchase &&
209
213
  isBrandSite &&
210
- this.selectedTab.key === TEMPLATE_TABS.all
214
+ this.selectedTab.key === TEMPLATE_TABS.all;
215
+ const seededSearchTerm = isPrePurchase
211
216
  ? this.initialSearchTerm
217
+ : brandPageMakerStore.industry;
218
+ const effectiveSearchTerm = useSeededSearchTerm
219
+ ? seededSearchTerm
212
220
  : this.searchTerm;
213
221
  const pageSection = isBrandSite
214
222
  ? (isPrePurchase
@@ -254,6 +262,22 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
254
262
  eventTracker.sendExperimentStartedEvent(experimentName, experimentValue);
255
263
  }
256
264
  }
265
+ // searchPersonalisation is a per-search payload established on page 1; only set it there
266
+ // (like abTestValuesToBePushed above) so paginating to page 2+ can't reset it to undefined.
267
+ // Every context change (search/clear/category/logo swap) reloads from page 1, so this still
268
+ // clears stale search content on a new search.
269
+ //
270
+ // Set BEFORE the mapping loop so tiles and the apply path read the same value — reading the
271
+ // per-page `result.searchPersonalisation` here made page-2 tiles fall back to page-load
272
+ // content while applying used page-1 search content.
273
+ //
274
+ // Empty [] is stored as undefined: it wins `??` but fails `?.length`, so it would strand
275
+ // the downstream fallback to uiStore.personalisationData and silently skip the apply.
276
+ if (pageNo === 1) {
277
+ this.searchPersonalisationData = result.searchPersonalisation?.length
278
+ ? result.searchPersonalisation
279
+ : undefined;
280
+ }
257
281
  const templates = await Promise.all(result.paginatedItems.map(async (item) => {
258
282
  try {
259
283
  if (brandPageMakerUserStore.isAdmin) {
@@ -263,14 +287,15 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
263
287
  else {
264
288
  let personalisationContentIndex;
265
289
  let contentKey;
266
- if (uiStore.personalisationData?.length) {
290
+ const activePersonalisation = this.searchPersonalisationData ?? uiStore.personalisationData;
291
+ if (activePersonalisation?.length) {
267
292
  personalisationContentIndex =
268
- await getAiContentIndexByTemplateTokenAndNumberOfVariations(item.designTemplateToken, uiStore.personalisationData.length);
293
+ await getAiContentIndexByTemplateTokenAndNumberOfVariations(item.designTemplateToken, activePersonalisation.length);
269
294
  contentKey =
270
- uiStore.personalisationData[personalisationContentIndex]
295
+ activePersonalisation[personalisationContentIndex]
271
296
  .contentKey;
272
297
  }
273
- else if (item.isPersonalisable) {
298
+ else if (item.isPersonalisable && !this.searchTerm) {
274
299
  // Pre-purchase has no personalisationData; personalise AI
275
300
  // template previews with the prompt content key (bp-5742).
276
301
  contentKey = uiStore.userPromptContentKey;
@@ -279,10 +304,9 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
279
304
  id: item.designTemplateToken,
280
305
  isPersonalisable: item.isPersonalisable,
281
306
  contentKey,
282
- // A userPromptContentKey signals this design's real AI images live
283
- // in the userPrompt bucket (post- or pre-purchase). The preview must
284
- // then resolve via userPromptContentKey, not the regular bucket which
285
- // holds placeholders post-purchase (bp-5454).
307
+ // userPromptContentKey signals the content lives in the userPrompt S3
308
+ // bucket (post- or pre-purchase); the preview must resolve via
309
+ // userPromptContentKey, not the regular bucket (bp-5454).
286
310
  usesUserPromptContentKey: !!uiStore.userPromptContentKey,
287
311
  previewImageUrl: item.previewImageUrl,
288
312
  };
@@ -294,12 +318,21 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
294
318
  }));
295
319
  // Filter out null templates before adding
296
320
  const validTemplates = templates.filter((t) => t !== null);
297
- // The Categories tab must never surface AI templates or the AI badge
298
- // (bp-5454 scenario 5). The badge is driven purely by isPersonalisable,
299
- // so clear it for category results regardless of the template's catalog flag.
300
- const displayTemplates = this.selectedTab.key === TEMPLATE_TABS.categories
301
- ? validTemplates.map((t) => ({ ...t, isPersonalisable: false }))
302
- : validTemplates;
321
+ let displayTemplates = validTemplates;
322
+ // The All tab shows backend-interleaved AI templates (gated server-side on the AB
323
+ // variation) even when the dedicated AI tab is hidden — e.g. regular templates
324
+ // pre-purchase (bp-5789). So only strip AI when the AI tab is hidden AND we're not on
325
+ // the All tab; the backend is the interleave gate, control buckets return no AI here.
326
+ if (!uiStore.showAiTemplatesTab &&
327
+ this.selectedTab.key !== TEMPLATE_TABS.all) {
328
+ displayTemplates = displayTemplates.filter((t) => !t.isPersonalisable);
329
+ }
330
+ else if (this.selectedTab.key === TEMPLATE_TABS.categories) {
331
+ displayTemplates = displayTemplates.map((t) => ({
332
+ ...t,
333
+ isPersonalisable: false,
334
+ }));
335
+ }
303
336
  this._addTemplates({ templates: displayTemplates });
304
337
  this._setPageNoLoaded({ pageNoLoaded: pageNo });
305
338
  }
@@ -364,6 +397,10 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
364
397
  await this._setSearchTerm({
365
398
  searchTerm: payload.searchTerm,
366
399
  });
400
+ // Drive AI industry selection from the typed term; fall back to the
401
+ // seeded keyword on clear so the AI tab doesn't go generic (bp-5789).
402
+ this.aiTemplateKeywords =
403
+ payload.searchTerm || this.initialSearchTerm || '';
367
404
  this.onSearchTermChanged?.(payload.searchTerm);
368
405
  await this._setPageNo({ pageNo: 1 });
369
406
  await this.loadPageNo({ pageNo: 1 });
@@ -434,14 +471,25 @@ export const useUiTemplateSettingsStore = defineStore('uiTemplateSettings', {
434
471
  if (!oldLogoImage) {
435
472
  return;
436
473
  }
437
- // Only refetch for post-purchase users and when logo actually changes
474
+ // Refetch previews on any logo change (pre- and post-purchase) so the new logo
475
+ // shows in the thumbnails.
438
476
  const hasLogoChanged = newLogoImage.logoDraftToken !== oldLogoImage.logoDraftToken ||
439
477
  newLogoImage.logoVariation !== oldLogoImage.logoVariation;
440
478
  if (!brandPageMakerUserStore.isAdmin &&
441
479
  newLogoImage.logoDraftToken &&
442
480
  hasLogoChanged) {
443
- // Reset templates state and reload with new logo
444
- // Use the same pattern as onCategorySelected and onSearch
481
+ const uiStore = useUiStore();
482
+ const isPrePurchase = useBrandPageContainerStore().isPrePurchase;
483
+ uiStore.setUserPersonalisationData({
484
+ personalisationData: undefined,
485
+ });
486
+ if (!isPrePurchase &&
487
+ newLogoImage.logoDraftToken !== oldLogoImage.logoDraftToken) {
488
+ uiStore.setUserPromptContentKey({
489
+ userPromptContentKey: undefined,
490
+ });
491
+ uiStore.setShowAiTemplatesTab({ showAiTemplatesTab: false });
492
+ }
445
493
  await this._setTemplates({ templates: [] });
446
494
  await this._setPageNoLoaded({ pageNoLoaded: 0 });
447
495
  await this._setPageNo({ pageNo: 1 });
@@ -35,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{}, {
35
35
  mode: import("../models").UiScreenSizeMode;
36
36
  }): void;
37
37
  setUserPersonalisationData({ personalisationData, }: {
38
- personalisationData: import("../../brand-page").UserPersonalisationContent[];
38
+ personalisationData: import("../../brand-page").UserPersonalisationContent[] | undefined;
39
39
  }): void;
40
40
  setUserPromptContentKey({ userPromptContentKey, }: {
41
41
  userPromptContentKey: string | undefined;
@@ -1,5 +1,5 @@
1
1
  import { BRAND_PAGE_TYPES, } from '../brand-page/models';
2
- import { hasRTEContent, isTiptapDocument } from '../brand-page-maker/utils';
2
+ import { hasRTEContent } from '../brand-page-maker/utils';
3
3
  import { useExternalRichTextEditor } from '../brand-page-maker/composables/rich-text-editor/useRichTextEditor';
4
4
  import { findAssetKey, resolveLogoData, } from './build-asset-manifest';
5
5
  const BUTTON_TYPES = [
@@ -17,9 +17,6 @@ const BUTTON_TYPES = [
17
17
  'tiktok',
18
18
  ];
19
19
  const convertText = (value, editor) => {
20
- // Already Tiptap JSON (BP-5787 storage) — keep as-is.
21
- if (isTiptapDocument(value))
22
- return value;
23
20
  if (typeof value !== 'string' || !value)
24
21
  return undefined;
25
22
  if (hasRTEContent(value)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.1.1-json-prereq-3",
4
+ "version": "6.1.1",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -74,20 +74,19 @@
74
74
  "@designcrowd/fe-shared-lib": "2.0.9",
75
75
  "@pinia/nuxt": "0.11.3",
76
76
  "@storybook/react": "9.0.4",
77
- "@tiptap/extension-bubble-menu": "3.28.0",
78
- "@tiptap/extension-character-count": "3.28.0",
79
- "@tiptap/extension-color": "3.28.0",
80
- "@tiptap/extension-font-family": "3.28.0",
81
- "@tiptap/extension-hard-break": "3.28.0",
82
- "@tiptap/extension-highlight": "3.28.0",
83
- "@tiptap/extension-link": "3.28.0",
84
- "@tiptap/extension-placeholder": "3.28.0",
85
- "@tiptap/extension-text-align": "3.28.0",
86
- "@tiptap/extension-text-style": "3.28.0",
87
- "@tiptap/extension-underline": "3.28.0",
88
- "@tiptap/starter-kit": "3.28.0",
89
- "@tiptap/static-renderer": "3.28.0",
90
- "@tiptap/vue-3": "3.28.0",
77
+ "@tiptap/extension-bubble-menu": "^2.14.0",
78
+ "@tiptap/extension-character-count": "2.11.7",
79
+ "@tiptap/extension-color": "2.11.5",
80
+ "@tiptap/extension-font-family": "2.11.5",
81
+ "@tiptap/extension-hard-break": "2.12.0",
82
+ "@tiptap/extension-highlight": "2.11.5",
83
+ "@tiptap/extension-link": "2.11.5",
84
+ "@tiptap/extension-placeholder": "2.11.5",
85
+ "@tiptap/extension-text-align": "2.11.5",
86
+ "@tiptap/extension-text-style": "2.11.5",
87
+ "@tiptap/extension-underline": "2.11.5",
88
+ "@tiptap/starter-kit": "2.11.5",
89
+ "@tiptap/vue-3": "2.11.5",
91
90
  "axios": "1.13.5",
92
91
  "chroma-js": "2.4.2",
93
92
  "click-outside-vue3": "4.0.1",
@@ -105,7 +104,6 @@
105
104
  "http-proxy-middleware": "2.0.6",
106
105
  "i18next": "25.8.5",
107
106
  "jquery": "3.7.1",
108
- "jsdom": "27.4.0",
109
107
  "lodash.clonedeep": "4.5.0",
110
108
  "lodash.debounce": "4.0.8",
111
109
  "lodash.throttle": "4.1.1",
@@ -168,7 +166,6 @@
168
166
  "@types/google.maps": "3.65.1",
169
167
  "@types/istanbul-lib-report": "3.0.3",
170
168
  "@types/jquery": "3.5.33",
171
- "@types/jsdom": "21.1.6",
172
169
  "@types/lodash.clonedeep": "4.5.9",
173
170
  "@types/mssql": "9.1.9",
174
171
  "@types/multer": "1.4.11",
@@ -207,6 +204,7 @@
207
204
  "imports-loader": "5.0.0",
208
205
  "jest-image-snapshot": "6.5.1",
209
206
  "js-base64": "3.7.8",
207
+ "jsdom": "27.4.0",
210
208
  "jsdom-global": "3.0.2",
211
209
  "lint-staged": "15.2.0",
212
210
  "mini-css-extract-plugin": "2.10.0",