@designcrowd/library.brand-page 6.0.3 → 6.0.4

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 (383) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-BctSP4tp.js → CreatedOnBrandCrowd-de-de-Ruu5Az32.js} +3 -3
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BeNytcxt.js → CreatedOnBrandCrowd-en-us-DGUJtvld.js} +3 -3
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-hY12f5TN.js → CreatedOnBrandCrowd-es-es-Dg-1uOfV.js} +3 -3
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-C4SCU39P.js → CreatedOnBrandCrowd-fr-ca-CRKraZl8.js} +3 -3
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-C4SCU39P.js → CreatedOnBrandCrowd-fr-fr-CRKraZl8.js} +3 -3
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-C5J5kWiD.js → CreatedOnBrandCrowd-pt-br-bZ9VlEAu.js} +3 -3
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-C5J5kWiD.js → CreatedOnBrandCrowd-pt-pt-bZ9VlEAu.js} +3 -3
  8. package/lib/src/{CreatedOnDcom-de-de-DXCeZZLg.js → CreatedOnDcom-de-de-CJYfwZx8.js} +3 -3
  9. package/lib/src/{CreatedOnDcom-en-us-GeBTaofv.js → CreatedOnDcom-en-us-rzA1lVxH.js} +3 -3
  10. package/lib/src/{CreatedOnDcom-es-es-BiPmv1q-.js → CreatedOnDcom-es-es-CNwGPjik.js} +3 -3
  11. package/lib/src/{CreatedOnDcom-fr-ca-Cns_iX4-.js → CreatedOnDcom-fr-ca-DKw7OGIz.js} +3 -3
  12. package/lib/src/{CreatedOnDcom-fr-fr-CC-f_hUR.js → CreatedOnDcom-fr-fr-WzOEaAZG.js} +3 -3
  13. package/lib/src/{CreatedOnDcom-pt-br-DnhSuPKo.js → CreatedOnDcom-pt-br-DkualVhm.js} +3 -3
  14. package/lib/src/{CreatedOnDcom-pt-pt-BCgbUsqY.js → CreatedOnDcom-pt-pt-w4Nnsdzq.js} +3 -3
  15. package/lib/src/brand-page/clients/brand-page.client.d.ts +9 -9
  16. package/lib/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.d.ts +2 -1
  17. package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.d.ts +2 -4
  18. package/lib/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.js +0 -1
  19. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +2 -4
  20. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +4 -5
  21. package/lib/src/brand-page/components/page/Page.mixin.d.ts +1 -1
  22. package/lib/src/brand-page/components/page/PageComponent.mixin.d.ts +1 -1
  23. package/lib/src/brand-page/components/payment/Payment.mixin.d.ts +3 -3
  24. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +13 -13
  25. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +13 -13
  26. package/lib/src/brand-page/constants/sections/footer-display.constants.js +1 -1
  27. package/lib/src/brand-page/models/index.d.ts +13 -2
  28. package/lib/src/brand-page/models/index.js +0 -3
  29. package/lib/src/brand-page/models/payment.model.d.ts +1 -1
  30. package/lib/src/brand-page/utils/personalisation.util.js +14 -72
  31. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +19 -21
  32. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.js +0 -1
  33. package/lib/src/brand-page-maker/components/admin-background-settings/AdminBackgroundSettings.mixin.d.ts +10 -16
  34. package/lib/src/brand-page-maker/components/admin-background-settings/ShapePositionSlider.mixin.d.ts +1 -1
  35. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +3 -3
  36. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +170 -181
  37. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -3
  38. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +0 -1
  39. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +12 -12
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.js +2 -2
  41. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.js +7 -0
  42. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +149 -148
  43. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +21 -21
  44. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.js +1 -1
  45. package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.d.ts +2 -4
  46. package/lib/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.js +0 -1
  47. package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.d.ts +2 -4
  48. package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.js +0 -1
  49. package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.d.ts +2 -5
  50. package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.js +0 -1
  51. package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.d.ts +2 -4
  52. package/lib/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.js +0 -1
  53. package/lib/src/brand-page-maker/components/device/Device.mixin.d.ts +2 -4
  54. package/lib/src/brand-page-maker/components/device/Device.mixin.js +0 -1
  55. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +2 -4
  56. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.js +0 -1
  57. package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +3 -3
  58. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +11 -11
  59. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +25 -27
  60. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.js +0 -1
  61. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +27 -27
  62. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.js +1 -1
  63. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +12 -17
  64. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +12 -12
  65. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +32 -30
  66. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +5 -16
  67. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +11 -11
  68. package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +6 -3
  69. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +1 -1
  70. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +6 -6
  71. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +2 -2
  72. package/lib/src/brand-page-maker/constants/config-settings-constant.d.ts +6 -6
  73. package/lib/src/brand-page-maker/constants/config-settings-constant.js +3 -3
  74. package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.d.ts +1 -1
  75. package/lib/src/brand-page-maker/convertors/text-image-display-style.convertor.js +1 -1
  76. package/lib/src/brand-page-maker/models/content-settings.d.ts +1 -1
  77. package/lib/src/brand-page-maker/models/navigation-style-configs.js +1 -1
  78. package/lib/src/brand-page-maker/routing/brand-page-maker-router.d.ts +2 -1
  79. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +378 -366
  80. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +4 -5
  81. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +5 -8
  82. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -3
  83. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +3 -7
  84. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +15 -15
  85. package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +0 -6
  86. package/lib/src/brand-page-maker/stores/ui/ui-store.js +0 -8
  87. package/lib/src/brand-page-maker/utils/content-settings.util.js +1 -1
  88. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +1 -1
  89. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +4 -4
  90. package/lib/src/clients/ai-assistant-client.d.ts +0 -7
  91. package/lib/src/clients/brand-page-client.d.ts +15 -16
  92. package/lib/src/clients/design-template-client.d.ts +0 -3
  93. package/lib/src/clients/media-client.d.ts +2 -2
  94. package/lib/src/clients/models.d.ts +0 -2
  95. package/lib/src/composables/useSnapshot.js +18 -18
  96. package/lib/src/css/library.brand-page-brandCrowd.min.css +324 -342
  97. package/lib/src/css/library.brand-page-brandPage.min.css +324 -620
  98. package/lib/src/css/library.brand-page-designCom.min.css +324 -342
  99. package/lib/src/css/library.brand-page-preview.min.css +324 -598
  100. package/lib/src/index.d.ts +1 -5
  101. package/lib/src/index.mjs +106 -110
  102. package/lib/src/{lib-Cw6L6CfQ.js → lib-Dy7MYyqz.js} +33240 -36457
  103. package/lib/src/lib.js +1 -11
  104. package/lib/src/metadata-builder/builders/footer-builder.js +62 -105
  105. package/lib/src/metadata-builder/builders/item-id-utils.d.ts +54 -0
  106. package/lib/src/metadata-builder/builders/item-id-utils.js +96 -0
  107. package/lib/src/metadata-builder/builders/section-builders/image-gallery-builder.js +57 -68
  108. package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +58 -93
  109. package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +66 -99
  110. package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +57 -17
  111. package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +51 -85
  112. package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +49 -74
  113. package/lib/src/metadata-builder/builders/section-field-utils.d.ts +0 -7
  114. package/lib/src/metadata-builder/builders/section-field-utils.js +1 -1
  115. package/lib/src/metadata-builder/builders/shape-color-utils.js +1 -1
  116. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +16 -7
  117. package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +66 -48
  118. package/lib/src/plugins/google-maps-plugin/google-maps-plugin.d.ts +1 -1
  119. package/lib/src/plugins/google-maps-plugin/google-maps-plugin.js +8 -8
  120. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +13 -13
  121. package/lib/src/shared/background-settings/store/background-settings-store.d.ts +3 -3
  122. package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +2 -4
  123. package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +2 -2
  124. package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.d.ts +2 -4
  125. package/lib/src/shared/color-picker/components/ColorPickerSwatch.mixin.js +0 -1
  126. package/lib/src/shared/confirm-modal/ConfirmModal.mixin.d.ts +2 -5
  127. package/lib/src/shared/confirm-modal/ConfirmModal.mixin.js +0 -1
  128. package/lib/src/shared/content-settings/components/GenericTextInput.mixin.d.ts +1 -0
  129. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +129 -131
  130. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -2
  131. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +110 -111
  132. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +81 -84
  133. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +0 -5
  134. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +109 -117
  135. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +14 -1
  136. package/lib/src/shared/content-settings/components/email-field/EmailField.mixin.d.ts +1 -0
  137. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +70 -72
  138. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +3 -4
  139. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.d.ts +4 -4
  140. package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.d.ts +1 -3
  141. package/lib/src/shared/content-settings/components/icon-library/IconLibrary.mixin.js +0 -1
  142. package/lib/src/shared/content-settings/components/images-field/ImagesField.mixin.d.ts +2 -2
  143. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.d.ts +3 -4
  144. package/lib/src/shared/content-settings/components/items-field/ItemsField.mixin.js +1 -1
  145. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +40 -40
  146. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigOptionField.mixin.d.ts +6 -5
  147. package/lib/src/shared/content-settings/components/shape-field/ShapeField.mixin.d.ts +1 -0
  148. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.d.ts +2 -2
  149. package/lib/src/shared/content-settings/components/tel-field/TelField.mixin.d.ts +1 -0
  150. package/lib/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.mixin.d.ts +2 -1
  151. package/lib/src/shared/content-settings/components/text-field/TextField.mixin.d.ts +1 -0
  152. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.d.ts +2 -1
  153. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +1 -1
  154. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +28 -28
  155. package/lib/src/shared/content-settings/components/textarea-field/TextareaField.mixin.d.ts +1 -0
  156. package/lib/src/shared/content-settings/components/toggle-field/ToggleField.mixin.d.ts +2 -2
  157. package/lib/src/shared/content-settings/components/url-field/UrlField.mixin.d.ts +1 -0
  158. package/lib/src/shared/content-settings/components/youtube-video-field/YoutubeVideoField.mixin.d.ts +1 -0
  159. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +39 -39
  160. package/lib/src/shared/content-settings/utils.js +1 -0
  161. package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.d.ts +4 -6
  162. package/lib/src/shared/font-family-selector/FontFamilySelector.mixin.js +0 -1
  163. package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.d.ts +2 -4
  164. package/lib/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.js +0 -1
  165. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +21 -29
  166. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +1 -1
  167. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +51 -50
  168. package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.d.ts +4 -6
  169. package/lib/src/shared/logo-settings/components/LogoSettingsHeader.mixin.js +0 -1
  170. package/lib/src/shared/logo-settings/store/editable-logo-store.js +1 -1
  171. package/lib/src/shared/logo-settings/store/logo-settings-store.d.ts +1 -1
  172. package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +5 -13
  173. package/lib/src/shared/logo-versions/LogoVersions.mixin.js +0 -1
  174. package/lib/src/shared/models.d.ts +0 -2
  175. package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +6 -14
  176. package/lib/src/shared/my-designs/MyDesigns.mixin.js +0 -1
  177. package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +5 -14
  178. package/lib/src/shared/my-uploads/MyMedia.mixin.js +0 -1
  179. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +5 -14
  180. package/lib/src/shared/my-uploads/MyUploads.mixin.js +0 -1
  181. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +3 -5
  182. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +0 -1
  183. package/lib/src/shared/navigation-style-settings/store/index.d.ts +2 -2
  184. package/lib/src/shared/page-navigation/store/page-navigation-store.d.ts +2 -2
  185. package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +28 -27
  186. package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.js +2 -0
  187. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +179 -188
  188. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +177 -181
  189. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +1 -1
  190. package/lib/src/shared/page-settings/store/page-settings-store.d.ts +9 -9
  191. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +39 -39
  192. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.js +1 -0
  193. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +18 -18
  194. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +6 -6
  195. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +60 -66
  196. package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -1
  197. package/lib/src/shared/style-settings/store/style-settings-store.js +1 -1
  198. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +450 -20
  199. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.js +2 -2
  200. package/lib/src/shared/template-settings/models.d.ts +0 -1
  201. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +0 -4
  202. package/lib/src/shared/template-settings/store/template-settings-store.js +11 -79
  203. package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +4 -9
  204. package/lib/src/utils/build-asset-manifest.d.ts +0 -4
  205. package/lib/src/utils/build-asset-manifest.js +0 -8
  206. package/lib/src/utils/minify-brand-page-metadata.d.ts +2 -0
  207. package/lib/src/utils/minify-brand-page-metadata.js +17 -2
  208. package/package.json +56 -60
  209. package/src/brand-page/components/about-section/AboutSection.vue.test.ts +5 -7
  210. package/src/brand-page/components/brand-page-footer/BrandPageFooter.vue +1 -1
  211. package/src/brand-page/components/image/Image.mixin.ts +1 -1
  212. package/src/brand-page/components/image/Image.test.ts +1 -1
  213. package/src/brand-page/components/image-gallery/masonry/MasonryGallery.mixin.ts +2 -1
  214. package/src/brand-page/components/images-section/ImagesSection.vue +1 -0
  215. package/src/brand-page/components/logo/LogoRender.vue +188 -188
  216. package/src/brand-page/components/navigation/hamburger/HamburgerNavigation.mixin.ts +0 -1
  217. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +6 -15
  218. package/src/brand-page/components/page-footer/PageFooter.vue +0 -1
  219. package/src/brand-page/components/page-header/HeaderLayout.vue +6 -12
  220. package/src/brand-page/components/page-header/PageHeader.vue +0 -1
  221. package/src/brand-page/components/shapes-section/ShapesSection.vue +1 -1
  222. package/src/brand-page/components/shop/CartModal.vue +3 -1
  223. package/src/brand-page/components/shop/FeaturedDisplay.vue +2 -2
  224. package/src/brand-page/components/shop/PaymentModal.vue +5 -1
  225. package/src/brand-page/components/shop/ProductDetailModal.vue +1 -1
  226. package/src/brand-page/components/shop/Shop.vue +1 -1
  227. package/src/brand-page/components/shop/TextDisplay.vue +1 -1
  228. package/src/brand-page/components/shop/ThumbnailDisplay.vue +2 -2
  229. package/src/brand-page/components/testimonial-section/TestimonialSection.vue +3 -3
  230. package/src/brand-page/components/text-wrapper/TextWrapper.vue +1 -3
  231. package/src/brand-page/constants/sections/footer-display.constants.ts +1 -1
  232. package/src/brand-page/models/index.ts +12 -4
  233. package/src/brand-page/models/payment.model.ts +1 -2
  234. package/src/brand-page/models/shop.model.ts +2 -0
  235. package/src/brand-page/models/user-personalisation.model.ts +2 -1
  236. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +0 -3
  237. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +0 -1
  238. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +0 -2
  239. package/src/brand-page/utils/migration/migration-01_1.ts +1 -1
  240. package/src/brand-page/utils/migration/migration-02.ts +1 -0
  241. package/src/brand-page/utils/migration/migration-03.ts +1 -0
  242. package/src/brand-page/utils/migration/migration-04.ts +1 -0
  243. package/src/brand-page/utils/migration/migration-05.ts +5 -1
  244. package/src/brand-page/utils/migration/migration-05_2.ts +1 -1
  245. package/src/brand-page/utils/migration/migration-08.test.ts +1 -1
  246. package/src/brand-page/utils/personalisation.util.test.ts +0 -35
  247. package/src/brand-page/utils/personalisation.util.ts +23 -119
  248. package/src/brand-page/view-models.ts +56 -38
  249. package/src/brand-page-maker/assessors/banner-section-description-visibility.assessor.ts +6 -6
  250. package/src/brand-page-maker/assessors/color-replacement-icon-visibility.assessor.ts +2 -2
  251. package/src/brand-page-maker/assessors/color-replacement-profile-visibility.assessor.ts +2 -2
  252. package/src/brand-page-maker/assessors/color-replacement-visibility.assessor.ts +2 -2
  253. package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +14 -14
  254. package/src/brand-page-maker/components/action-bar/ActionBar.mixin.ts +0 -1
  255. package/src/brand-page-maker/components/ai-text-edit/TextBubble.vue +0 -1
  256. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +1 -5
  257. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +0 -1
  258. package/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.stories.ts +5 -2
  259. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +5 -0
  260. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-payment.ts +8 -0
  261. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-site-template.examples.ts +2 -0
  262. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.vue +0 -1
  263. package/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.ts +1 -1
  264. package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +2 -1
  265. package/src/brand-page-maker/components/color-picker/components/ColorModeSelect.mixin.ts +0 -1
  266. package/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.ts +0 -1
  267. package/src/brand-page-maker/components/color-picker/components/GradientColorSliderHandler.mixin.ts +0 -1
  268. package/src/brand-page-maker/components/color-picker/components/GradientTypeSelector.mixin.ts +0 -1
  269. package/src/brand-page-maker/components/device/Device.mixin.ts +0 -1
  270. package/src/brand-page-maker/components/navigation/Navigation.mixin.ts +0 -1
  271. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +1 -3
  272. package/src/brand-page-maker/components/sensitive-content/SensitiveContent.vue +4 -1
  273. package/src/brand-page-maker/components/seo-settings/DeleteDomainModal.vue +1 -1
  274. package/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.ts +0 -1
  275. package/src/brand-page-maker/components/seo-settings/SeoPageSettings.vue +1 -1
  276. package/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.ts +1 -0
  277. package/src/brand-page-maker/components/seo-settings/UrlSettings.vue +1 -0
  278. package/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.vue +5 -1
  279. package/src/brand-page-maker/components/shop/AddOrEditProductContainer.vue +1 -1
  280. package/src/brand-page-maker/components/shop/ReplaceImageSettingsForShop.vue +1 -1
  281. package/src/brand-page-maker/components/social-share/SocialShare.vue +1 -1
  282. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +8 -22
  283. package/src/brand-page-maker/components/template-preview/TemplatePreview.vue +10 -5
  284. package/src/brand-page-maker/components/video-play/VideoPlayButton.vue +1 -1
  285. package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +7 -3
  286. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +6 -6
  287. package/src/brand-page-maker/constants/config-settings-constant.ts +5 -5
  288. package/src/brand-page-maker/convertors/text-image-display-style.convertor.ts +1 -1
  289. package/src/brand-page-maker/models/button-styles-config.ts +2 -4
  290. package/src/brand-page-maker/models/content-settings-configs.ts +2 -4
  291. package/src/brand-page-maker/models/navigation-style-configs.ts +6 -5
  292. package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +1 -0
  293. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +5 -8
  294. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +3 -1
  295. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -12
  296. package/src/brand-page-maker/stores/ui/ui-store.ts +0 -16
  297. package/src/brand-page-maker/utils/content-settings.util.ts +1 -1
  298. package/src/brand-page-maker/utils/rich-text-editor.util.ts +4 -4
  299. package/src/clients/ai-assistant-client.ts +0 -7
  300. package/src/clients/design-template-client.ts +0 -3
  301. package/src/clients/models.ts +0 -2
  302. package/src/composables/useSnapshot.ts +22 -19
  303. package/src/lib.ts +0 -13
  304. package/src/metadata-builder/builders/footer-builder.test.ts +229 -130
  305. package/src/metadata-builder/builders/footer-builder.ts +90 -155
  306. package/src/metadata-builder/builders/item-id-utils.test.ts +184 -0
  307. package/src/metadata-builder/builders/item-id-utils.ts +117 -0
  308. package/src/metadata-builder/builders/section-builders/image-gallery-builder.ts +62 -88
  309. package/src/metadata-builder/builders/section-builders/images-section-builder.ts +66 -129
  310. package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +105 -160
  311. package/src/metadata-builder/builders/section-builders/social-links-builder.ts +65 -20
  312. package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +83 -146
  313. package/src/metadata-builder/builders/section-builders/text-section-builder.ts +70 -122
  314. package/src/metadata-builder/builders/section-field-utils.ts +1 -1
  315. package/src/metadata-builder/builders/shape-color-utils.ts +2 -2
  316. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +16 -7
  317. package/src/metadata-builder/parsers/section-tool-arguments.ts +66 -48
  318. package/src/plugins/google-maps-plugin/google-maps-plugin.ts +8 -8
  319. package/src/shared/background-settings/components/BackgroundSettings.vue +1 -1
  320. package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +1 -1
  321. package/src/shared/color-picker/components/ColorPicker.mixin.ts +7 -2
  322. package/src/shared/color-picker/components/ColorPickerSwatch.mixin.ts +0 -1
  323. package/src/shared/common/NumberInput.vue +0 -1
  324. package/src/shared/common/SideBarSettingsHeader.vue +2 -2
  325. package/src/shared/confirm-modal/ConfirmModal.mixin.ts +0 -1
  326. package/src/shared/content-settings/components/booking-url-field/BookingUrlField.vue +0 -1
  327. package/src/shared/content-settings/components/button-configuration-field/ButtonConfigurationField.vue +0 -1
  328. package/src/shared/content-settings/components/color-field/ColorField.vue +10 -3
  329. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -1
  330. package/src/shared/content-settings/components/content-settings/ContentSettingsLockedButton.vue +0 -1
  331. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +0 -5
  332. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +14 -1
  333. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +6 -4
  334. package/src/shared/content-settings/components/icon-library/IconLibrary.mixin.ts +0 -1
  335. package/src/shared/content-settings/components/items-field/ItemsField.mixin.ts +1 -1
  336. package/src/shared/content-settings/components/logo-selection-field/LogoSelectionField.vue +1 -1
  337. package/src/shared/content-settings/components/logo-size-field/LogoSizeSliderField.vue +1 -1
  338. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +1 -1
  339. package/src/shared/content-settings/components/personalisation-role-field/PersonalisationRoleField.vue +4 -4
  340. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +8 -2
  341. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +1 -1
  342. package/src/shared/content-settings/models.ts +2 -3
  343. package/src/shared/content-settings/utils.ts +1 -0
  344. package/src/shared/dropzone-image-uploader/components/DropzoneImageUploader.vue +0 -1
  345. package/src/shared/ecommerce-settings/store/cart-store.test.ts +1 -1
  346. package/src/shared/font-family-selector/FontFamilySelector.mixin.ts +0 -1
  347. package/src/shared/image-gallery-style-settings/ImageGalleryStyleSettings.mixin.ts +0 -1
  348. package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +1 -1
  349. package/src/shared/logo-settings/components/LogoSettings.mixin.ts +1 -0
  350. package/src/shared/logo-settings/components/LogoSettingsHeader.mixin.ts +0 -1
  351. package/src/shared/logo-settings/components/LogoStyleSettingsWithState.vue +2 -2
  352. package/src/shared/logo-settings/components/LogoTemplateSearch.vue +1 -1
  353. package/src/shared/logo-settings/store/editable-logo-store.ts +1 -1
  354. package/src/shared/logo-settings/store/logo-settings-store.test.ts +4 -4
  355. package/src/shared/logo-versions/LogoVersions.mixin.ts +0 -1
  356. package/src/shared/models.ts +0 -6
  357. package/src/shared/my-designs/MyDesigns.mixin.ts +0 -1
  358. package/src/shared/my-uploads/MyMedia.mixin.ts +0 -1
  359. package/src/shared/my-uploads/MyMediaSelectionItem.vue +1 -2
  360. package/src/shared/my-uploads/MyUploads.mixin.ts +0 -1
  361. package/src/shared/my-uploads/models.ts +2 -1
  362. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +0 -1
  363. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +1 -1
  364. package/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.ts +3 -0
  365. package/src/shared/page-settings/components/page-settings/NestedDraggable.vue +1 -1
  366. package/src/shared/page-settings/components/page-settings/PageSettings.vue +2 -1
  367. package/src/shared/page-settings/components/page-settings-section-styles/HeaderDisplayStyle.vue +1 -1
  368. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +1 -1
  369. package/src/shared/page-settings/store/page-settings-store.test.ts +8 -4
  370. package/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.ts +1 -0
  371. package/src/shared/shape-library/ShapeLibrary.vue +2 -2
  372. package/src/shared/style-settings/store/style-settings-store.ts +1 -1
  373. package/src/shared/template-settings/components/TemplatesSettings.mixin.ts +2 -2
  374. package/src/shared/template-settings/models.ts +0 -1
  375. package/src/shared/template-settings/store/template-settings-store.ts +18 -105
  376. package/src/shared/unsplash-library/UnsplashLibrary.vue +6 -2
  377. package/src/shared/video-library/VideoLibrary.vue +1 -1
  378. package/src/utils/build-asset-manifest.ts +0 -12
  379. package/src/utils/minify-brand-page-metadata.ts +27 -7
  380. package/lib/src/brand-page/components/banner-section/BannerSection.mixin.d.ts +0 -103
  381. package/lib/src/brand-page/components/banner-section/BannerSection.mixin.js +0 -178
  382. package/src/brand-page/components/banner-section/BannerSection.mixin.ts +0 -210
  383. package/src/brand-page-maker/components/template-preview/TemplatePreviewAiBadge.vue +0 -12
@@ -234,6 +234,13 @@ export interface ImageContent extends Content {
234
234
  }
235
235
 
236
236
  export interface ImageItem {
237
+ /**
238
+ * Stable per-item identifier. Mirrors the section-level `Content.id` one
239
+ * level deeper so AI tool calls can reference items by id rather than by
240
+ * positional index. Optional for backward compatibility with persisted data
241
+ * that predates item ids — backfilled on load (see ensureItemIds).
242
+ */
243
+ id?: string;
237
244
  imageUrl: string;
238
245
  imageTitle: string;
239
246
  width: number;
@@ -466,6 +473,8 @@ export interface ShapeItem extends ImageItem {
466
473
  }
467
474
 
468
475
  export interface TestimonialItems {
476
+ /** Stable per-item identifier. See ImageItem.id. */
477
+ id?: string;
469
478
  imageUrl: string;
470
479
  name: string;
471
480
  position: string;
@@ -483,6 +492,8 @@ export interface TestimonialItems {
483
492
  }
484
493
 
485
494
  export interface TextItem {
495
+ /** Stable per-item identifier. See ImageItem.id. */
496
+ id?: string;
486
497
  text: string;
487
498
  textStyle: TextStyleDeclaration;
488
499
 
@@ -552,6 +563,7 @@ export interface AboutSectionContent extends Content {
552
563
  }
553
564
 
554
565
  export interface LinksItem {
566
+ id?: string;
555
567
  imageUrl: string;
556
568
  url: string;
557
569
  size?: string;
@@ -929,10 +941,6 @@ export class BrandPageModel {
929
941
  // Model version
930
942
  v: number;
931
943
 
932
- // AI personalisation key persisted with the draft so previews survive login/checkout-back/
933
- // refresh - content is retrieved by this token (user-agnostic), not regenerated (bp-5742).
934
- userPromptContentKey?: string;
935
-
936
944
  styles: PageStyles;
937
945
 
938
946
  /** @deprecated */
@@ -44,8 +44,7 @@ export const isStripePaymentIntent = (
44
44
  );
45
45
  };
46
46
 
47
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
48
- export interface CreateCartResult<T = unknown> {
47
+ export interface CreateCartResult<T> {
49
48
  cartId: string;
50
49
  paymentProviderName: string;
51
50
  paymentProviderExternalId: string;
@@ -1,3 +1,5 @@
1
+ import type { PaymentConfig } from './payment.model';
2
+
1
3
  export interface VariantOptionModel {
2
4
  id: string;
3
5
  name: string;
@@ -84,7 +84,8 @@ export type ContentPersonalisationMapping<T extends Content> = {
84
84
  | keyof UserPersonalisationSection
85
85
  | keyof UserPersonalisationItem]?: (keyof T)[];
86
86
  };
87
- export interface UserPersonalisationSectionWithIndices extends UserPersonalisationSection {
87
+ export interface UserPersonalisationSectionWithIndices
88
+ extends UserPersonalisationSection {
88
89
  imageIndex: number;
89
90
  shapeIndex: number;
90
91
  itemTitleIndex: number;
@@ -456,7 +456,6 @@ exports[`migration.util > Banner Contents - text Align and Font Family should no
456
456
  },
457
457
  },
458
458
  },
459
- "userPromptContentKey": undefined,
460
459
  "v": 17,
461
460
  },
462
461
  "useOldLogoRenderSize": true,
@@ -902,7 +901,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
902
901
  },
903
902
  },
904
903
  },
905
- "userPromptContentKey": undefined,
906
904
  "v": 17,
907
905
  },
908
906
  "useOldLogoRenderSize": true,
@@ -1355,7 +1353,6 @@ exports[`migration.util > migrateBrandPageModel should return brand page model w
1355
1353
  },
1356
1354
  },
1357
1355
  },
1358
- "userPromptContentKey": undefined,
1359
1356
  "v": 17,
1360
1357
  },
1361
1358
  "useOldLogoRenderSize": true,
@@ -472,7 +472,6 @@ exports[`migration02.ts > migration02 should return converted letterspacing 1`]
472
472
  },
473
473
  },
474
474
  },
475
- "userPromptContentKey": undefined,
476
475
  "v": 0,
477
476
  },
478
477
  "useOldLogoRenderSize": false,
@@ -446,7 +446,6 @@ BrandPageModel {
446
446
  },
447
447
  },
448
448
  },
449
- "userPromptContentKey": undefined,
450
449
  "v": 0,
451
450
  }
452
451
  `;
@@ -912,7 +911,6 @@ BrandPageModel {
912
911
  },
913
912
  },
914
913
  },
915
- "userPromptContentKey": undefined,
916
914
  "v": 0,
917
915
  }
918
916
  `;
@@ -1,4 +1,4 @@
1
- import type { LogoImageModel } from '../..';
1
+ import type { BrandPageModel, LogoImageModel } from '../..';
2
2
  import type { MigrationData } from '../migration.util';
3
3
 
4
4
  import { migrateLogoImage } from './logo/logo.migration.util';
@@ -3,6 +3,7 @@ import {
3
3
  FONT_SIZE_HEADINGS,
4
4
  type AboutSectionContent,
5
5
  type BannerSectionContent,
6
+ type BrandPageModel,
6
7
  type ButtonContent,
7
8
  type ContactFormContent,
8
9
  type GlobalTextStyleDeclaration,
@@ -2,6 +2,7 @@ import {
2
2
  BRAND_PAGE_TYPES,
3
3
  type AboutSectionContent,
4
4
  type BannerSectionContent,
5
+ type BrandPageModel,
5
6
  type BrandPageType,
6
7
  type ButtonContent,
7
8
  type ContactFormContent,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  type AboutSectionContent,
3
3
  type BannerSectionContent,
4
+ type BrandPageModel,
4
5
  type ButtonContent,
5
6
  type ContactFormContent,
6
7
  type Content,
@@ -1,4 +1,8 @@
1
- import { type TextContent, type LogoImageModel } from '../..';
1
+ import {
2
+ type BrandPageModel,
3
+ type TextContent,
4
+ type LogoImageModel,
5
+ } from '../..';
2
6
  import type { MigrationData } from '../migration.util';
3
7
  import { isTextContent } from '../model.util';
4
8
 
@@ -1,4 +1,4 @@
1
- import { type ButtonContent } from '../..';
1
+ import { type BrandPageModel, type ButtonContent } from '../..';
2
2
  import type { MigrationData } from '../migration.util';
3
3
 
4
4
  export const migration05_2 = (
@@ -341,7 +341,7 @@ describe('migration08', () => {
341
341
  data: 'test-template-svg-data',
342
342
  });
343
343
 
344
- const _result = await migration08(migrationData, {
344
+ const result = await migration08(migrationData, {
345
345
  isServerRender: false,
346
346
  isUserDraft: false,
347
347
  });
@@ -701,41 +701,6 @@ describe('personalisation.util', async () => {
701
701
  ).toBe(title);
702
702
  });
703
703
 
704
- test('applyUserPersonalisationToBrandPageModelAsync should fall back to a populated section when the block section was not generated', async () => {
705
- // Arrange - simulate userPrompt AI content that only generated the core sections
706
- // (profile/about/information/media); email/website/phone are never generated.
707
- const personalisation = {
708
- ...PERSONALISATION,
709
- websiteSection: undefined,
710
- emailSection: undefined,
711
- phoneSection: undefined,
712
- } as unknown as typeof PERSONALISATION;
713
-
714
- // A block whose role points at the ungenerated website section - without the fallback
715
- // this renders the designer's placeholder instead of personalised content.
716
- const model = new BrandPageModel({
717
- brandPageType: BRAND_PAGE_TYPES.brandSite,
718
- styles: {
719
- backgroundStyles: {
720
- backgroundImageUrl: faker.internet.url(),
721
- personalisationRole: 'website',
722
- },
723
- },
724
- });
725
-
726
- // Act
727
- const result = await applyUserPersonalisationToBrandPageModelAsync(
728
- personalisation,
729
- model,
730
- );
731
-
732
- // Assert - it borrowed the first populated fallback section (profile).
733
- expect(result.isModified).toBe(true);
734
- expect(result.model.styles.backgroundStyles.backgroundImageUrl).toBe(
735
- PERSONALISATION.profileSection.imageUrls?.[0].imageUrl,
736
- );
737
- });
738
-
739
704
  test('applyUserPersonalisationToBrandPageModelAsync should return modified text items when input has text with multiple items', async () => {
740
705
  // Arrange
741
706
  const textContent = {
@@ -326,84 +326,6 @@ const getPersonalisationValueAsync = async (
326
326
  return { value: propertyValue, section };
327
327
  };
328
328
 
329
- // The userPrompt AI content generation only populates these content-bearing sections
330
- // (see GenerateAiDesignMakerContentService / GenerateWebsiteContentService - About,
331
- // Information, Profile, Media). Sections like email/website/phone are never generated, so
332
- // blocks whose role points at an ungenerated section fall back to this pool.
333
- const PERSONALISATION_FALLBACK_ROLES: PersonalisationRole[] = [
334
- 'profile',
335
- 'about',
336
- 'information',
337
- 'media',
338
- ];
339
-
340
- // "Effectively empty" = no renderable content (ungenerated userPrompt sections like
341
- // email/website/phone). A section that has data but lacks one property is NOT empty - it
342
- // intentionally keeps its original content.
343
- const isSectionEffectivelyEmpty = (
344
- section: UserPersonalisationSectionWithIndices | undefined,
345
- ): boolean => {
346
- if (!section) {
347
- return true;
348
- }
349
-
350
- return (
351
- !section.title &&
352
- !section.name &&
353
- !section.url &&
354
- !section.description &&
355
- !section.descriptionShort &&
356
- !section.ctaTitle &&
357
- !section.imageUrls?.length &&
358
- !section.shapes?.length &&
359
- !section.items?.length &&
360
- !section.mainShapesCollection?.tall?.length &&
361
- !section.mainShapesCollection?.square?.length &&
362
- !section.mainShapesCollection?.wide?.length
363
- );
364
- };
365
-
366
- // Resolve a property from a specific role's section. Returns null when that section is
367
- // ungenerated (effectively empty) or cannot supply the property, so the caller can try the
368
- // next role.
369
- const resolvePersonalisationValueForRoleAsync = async (
370
- role: PersonalisationRole,
371
- property: keyof UserPersonalisationSection | keyof UserPersonalisationItem,
372
- personalisation: UserPersonalisationWithIndices,
373
- ): Promise<{
374
- value: any;
375
- personalisation: UserPersonalisationWithIndices;
376
- valuesToUpdate?: Record<string, any>;
377
- } | null> => {
378
- const key = `${role}Section` as keyof UserPersonalisationWithIndices;
379
- const section = personalisation[key] as
380
- | UserPersonalisationSectionWithIndices
381
- | undefined;
382
-
383
- if (isSectionEffectivelyEmpty(section)) {
384
- return null;
385
- }
386
-
387
- const {
388
- value,
389
- section: updatedSection,
390
- valuesToUpdate,
391
- } = await getPersonalisationValueAsync(
392
- section as UserPersonalisationSectionWithIndices,
393
- property,
394
- );
395
-
396
- if (value === undefined || value === null) {
397
- return null;
398
- }
399
-
400
- return {
401
- value,
402
- personalisation: { ...personalisation, [key]: updatedSection },
403
- valuesToUpdate,
404
- };
405
- };
406
-
407
329
  const getPersonalisationValueFromPropertyAsync = async (
408
330
  propertyKey: string,
409
331
  propertyValue: any,
@@ -420,6 +342,16 @@ const getPersonalisationValueFromPropertyAsync = async (
420
342
  return { value: undefined, personalisation };
421
343
  }
422
344
 
345
+ const matchingValue = Object.entries(personalisation).find(
346
+ ([key]) => key === `${personalisationRole}Section`,
347
+ );
348
+
349
+ if (!matchingValue) {
350
+ return { value: undefined, personalisation };
351
+ }
352
+
353
+ const section = matchingValue[1] as UserPersonalisationSectionWithIndices;
354
+
423
355
  const mapping = getPersonalisationMappingForContentType(contentType);
424
356
 
425
357
  const matchingProperty = Object.entries(mapping).find(([, value]) =>
@@ -440,48 +372,20 @@ const getPersonalisationValueFromPropertyAsync = async (
440
372
  typeof propertyValue === 'string' && propertyValue.endsWith('.svg'),
441
373
  });
442
374
 
443
- const primaryKey =
444
- `${personalisationRole}Section` as keyof UserPersonalisationWithIndices;
445
- const primarySection = personalisation[primaryKey] as
446
- | UserPersonalisationSectionWithIndices
447
- | undefined;
448
-
449
- // When the block's own section has content, use it as-is - this preserves existing
450
- // behaviour, including legitimately keeping the original when that section lacks a
451
- // specific property (e.g. no items, or an invalid shape).
452
- if (!isSectionEffectivelyEmpty(primarySection)) {
453
- const {
454
- value,
455
- section: updatedSection,
456
- valuesToUpdate,
457
- } = await getPersonalisationValueAsync(
458
- primarySection as UserPersonalisationSectionWithIndices,
459
- property,
460
- );
461
-
462
- return {
463
- value,
464
- personalisation: { ...personalisation, [primaryKey]: updatedSection },
465
- valuesToUpdate,
466
- };
467
- }
468
-
469
- // The block's section was never generated - fall back to the first populated section that
470
- // can supply this property, so it doesn't render the "should be AI generated" placeholder.
471
- // Never reached when the section exists (above) or all are populated (AI Website Builder).
472
- for (const role of PERSONALISATION_FALLBACK_ROLES) {
473
- const resolved = await resolvePersonalisationValueForRoleAsync(
474
- role,
475
- property,
476
- personalisation,
477
- );
478
-
479
- if (resolved) {
480
- return resolved;
481
- }
482
- }
375
+ const {
376
+ value,
377
+ section: updatedSection,
378
+ valuesToUpdate,
379
+ } = await getPersonalisationValueAsync(section, property);
483
380
 
484
- return { value: undefined, personalisation };
381
+ return {
382
+ value,
383
+ personalisation: {
384
+ ...personalisation,
385
+ [`${personalisationRole}Section`]: updatedSection,
386
+ },
387
+ valuesToUpdate,
388
+ };
485
389
  };
486
390
 
487
391
  type ContentProperty = Record<string, string | any>;
@@ -1,4 +1,5 @@
1
1
  import type {
2
+ PageStyles,
2
3
  ButtonWithModalContent,
3
4
  ProfileContent,
4
5
  TextContent,
@@ -31,9 +32,11 @@ import type {
31
32
  TextShapeItem,
32
33
  TextStyleDeclaration,
33
34
  AspectRatio,
35
+ LogoVariation,
34
36
  LogoImageModel,
35
37
  LogoTemplateImageModel,
36
38
  CookieOptions,
39
+ SensitiveContent,
37
40
  BookingSectionContent,
38
41
  MediaTypes,
39
42
  TextStyles,
@@ -81,7 +84,8 @@ export interface PageViewModel {
81
84
  }
82
85
 
83
86
  export interface ButtonViewModel
84
- extends ContentViewModel, Omit<ButtonWithModalContent, 'type'> {
87
+ extends ContentViewModel,
88
+ Omit<ButtonWithModalContent, 'type'> {
85
89
  styles: Omit<ButtonStyles, 'templates'>;
86
90
  onClicked: (vm: ButtonViewModel) => void;
87
91
  buttonLinkType: ButtonLinkType;
@@ -91,8 +95,7 @@ export interface ButtonViewModel
91
95
  export type ImageViewModel = ContentViewModel & Omit<ImageContent, 'type'>;
92
96
 
93
97
  export interface ImageGalleryViewModel
94
- extends
95
- ContentViewModel,
98
+ extends ContentViewModel,
96
99
  Omit<ImageGalleryContent, 'type' | 'galleryStyles'> {
97
100
  styles: GalleryStyles;
98
101
  }
@@ -111,12 +114,14 @@ export interface LogoViewModel extends ContentViewModel {
111
114
  }
112
115
 
113
116
  export interface ProfileViewModel
114
- extends ContentViewModel, Omit<ProfileContent, 'type'> {
117
+ extends ContentViewModel,
118
+ Omit<ProfileContent, 'type'> {
115
119
  containerStyle?: BrandPageCssStyle;
116
120
  }
117
121
 
118
122
  export interface ShapesSectionViewModel
119
- extends ContentViewModel, Omit<ShapesSectionContent, 'type' | 'items'> {
123
+ extends ContentViewModel,
124
+ Omit<ShapesSectionContent, 'type' | 'items'> {
120
125
  items: TextShapeItem[];
121
126
  isFullWidth: boolean;
122
127
  }
@@ -135,35 +140,41 @@ export type VideoViewModel = ContentViewModel &
135
140
  export type MapViewModel = ContentViewModel & Omit<MapContent, 'type'>;
136
141
 
137
142
  export interface MailingListViewModel
138
- extends ContentViewModel, Omit<MailingListContent, 'type'> {
143
+ extends ContentViewModel,
144
+ Omit<MailingListContent, 'type'> {
139
145
  styles: Omit<ButtonStyles, 'templates'>;
140
146
  }
141
147
 
142
148
  export interface SupportMeViewModel
143
- extends ContentViewModel, Omit<SupportMeContent, 'type'> {
149
+ extends ContentViewModel,
150
+ Omit<SupportMeContent, 'type'> {
144
151
  buttonStyles: ButtonStyles;
145
152
  }
146
153
 
147
154
  export interface RequestPaymentViewModel
148
- extends ContentViewModel, Omit<RequestPaymentContent, 'type'> {
155
+ extends ContentViewModel,
156
+ Omit<RequestPaymentContent, 'type'> {
149
157
  buttonStyles: ButtonStyles;
150
158
  }
151
159
 
152
160
  export interface ShopViewModel
153
- extends ContentViewModel, Omit<ShopContent, 'type'> {
161
+ extends ContentViewModel,
162
+ Omit<ShopContent, 'type'> {
154
163
  buttonStyles: ButtonStyles;
155
164
  isFullWidth: boolean;
156
165
  isShippingEnabled: boolean;
157
166
  }
158
167
 
159
168
  export interface ContactFormViewModel
160
- extends ContentViewModel, Omit<ContactFormContent, 'type'> {
169
+ extends ContentViewModel,
170
+ Omit<ContactFormContent, 'type'> {
161
171
  buttonStyles: ButtonStyles;
162
172
  isFullWidth: boolean;
163
173
  }
164
174
 
165
175
  export interface BannerSectionViewModel
166
- extends ContentViewModel, Omit<BannerSectionContent, 'type'> {
176
+ extends ContentViewModel,
177
+ Omit<BannerSectionContent, 'type'> {
167
178
  buttonViewModel: ButtonViewModel;
168
179
  isFullWidth: boolean;
169
180
  isBigImageType: boolean;
@@ -214,57 +225,64 @@ export interface TextImageSectionViewModel {
214
225
  }
215
226
 
216
227
  export interface TestimonialSectionViewModel
217
- extends ContentViewModel, Omit<TestimonialSectionContent, 'type'> {
228
+ extends ContentViewModel,
229
+ Omit<TestimonialSectionContent, 'type'> {
218
230
  isFullWidth: boolean;
219
231
  }
220
232
 
221
233
  export interface AboutSectionViewModel
222
- extends ContentViewModel, Omit<AboutSectionContent, 'type'> {
234
+ extends ContentViewModel,
235
+ Omit<AboutSectionContent, 'type'> {
223
236
  isFullWidth: boolean;
224
237
  }
225
238
 
226
239
  export interface SocialLinksViewModel
227
- extends ContentViewModel, Omit<SocialLinksContent, 'type'> {
240
+ extends ContentViewModel,
241
+ Omit<SocialLinksContent, 'type'> {
228
242
  isFullWidth: boolean;
229
243
  }
230
244
 
231
245
  export interface DividerSectionViewModel
232
- extends ContentViewModel, Omit<DividerSectionContent, 'type'> {
246
+ extends ContentViewModel,
247
+ Omit<DividerSectionContent, 'type'> {
233
248
  isFullWidth: boolean;
234
249
  }
235
250
 
236
251
  export interface BookingSectionViewModel
237
- extends ContentViewModel, Omit<BookingSectionContent, 'type'> {
252
+ extends ContentViewModel,
253
+ Omit<BookingSectionContent, 'type'> {
238
254
  buttonViewModel: ButtonViewModel;
239
255
  isFullWidth: boolean;
240
256
  }
241
257
 
242
- export interface PageHeaderViewModel extends Omit<
243
- PageHeaderDesktop | PageHeaderMobile,
244
- | 'logoImage'
245
- | 'logoImageStyle'
246
- | 'isLogoOptional'
247
- | 'viewport'
248
- | 'isLogoVisible'
249
- | 'logoTemplateImage'
250
- | 'logoImageHeight'
251
- | 'logoImageWidth'
252
- > {
258
+ export interface PageHeaderViewModel
259
+ extends Omit<
260
+ PageHeaderDesktop | PageHeaderMobile,
261
+ | 'logoImage'
262
+ | 'logoImageStyle'
263
+ | 'isLogoOptional'
264
+ | 'viewport'
265
+ | 'isLogoVisible'
266
+ | 'logoTemplateImage'
267
+ | 'logoImageHeight'
268
+ | 'logoImageWidth'
269
+ > {
253
270
  logo: LogoViewModel;
254
271
  pages: PageViewModel[];
255
272
  }
256
273
 
257
- export interface PageFooterViewModel extends Omit<
258
- PageFooterDesktop | PageFooterMobile,
259
- | 'logoImage'
260
- | 'logoImageStyle'
261
- | 'isLogoOptional'
262
- | 'viewport'
263
- | 'isLogoVisible'
264
- | 'logoTemplateImage'
265
- | 'logoImageHeight'
266
- | 'logoImageWidth'
267
- > {
274
+ export interface PageFooterViewModel
275
+ extends Omit<
276
+ PageFooterDesktop | PageFooterMobile,
277
+ | 'logoImage'
278
+ | 'logoImageStyle'
279
+ | 'isLogoOptional'
280
+ | 'viewport'
281
+ | 'isLogoVisible'
282
+ | 'logoTemplateImage'
283
+ | 'logoImageHeight'
284
+ | 'logoImageWidth'
285
+ > {
268
286
  logo: LogoViewModel;
269
287
  }
270
288
 
@@ -48,11 +48,11 @@ export const bannerOverlayOptionsVisibilityAssessor: VisibilityAssessor<
48
48
  > = (content) => {
49
49
  return Boolean(
50
50
  (content.media?.type === 'getty-video' || content.imageUrl) &&
51
- [
52
- ALIGN_CARD_CENTER_IMAGE,
53
- ALIGN_CARD_LEFT_IMAGE,
54
- BIG_IMAGE,
55
- ALIGN_LEFT_BIG_IMAGE,
56
- ].includes(content.displayStyle),
51
+ [
52
+ ALIGN_CARD_CENTER_IMAGE,
53
+ ALIGN_CARD_LEFT_IMAGE,
54
+ BIG_IMAGE,
55
+ ALIGN_LEFT_BIG_IMAGE,
56
+ ].includes(content.displayStyle),
57
57
  );
58
58
  };
@@ -6,7 +6,7 @@ export const colorReplacementIconVisibilityTypeAssessor: VisibilityAssessor<
6
6
  > = (content) => {
7
7
  return Boolean(
8
8
  content?.colorReplacements &&
9
- content?.iconUrl &&
10
- content?.mediaType === 'shape',
9
+ content?.iconUrl &&
10
+ content?.mediaType === 'shape',
11
11
  );
12
12
  };
@@ -6,7 +6,7 @@ export const colorReplacementProfileVisibilityTypeAssessor: VisibilityAssessor<
6
6
  > = (content) => {
7
7
  return Boolean(
8
8
  content?.colorReplacements &&
9
- content?.avatarImageUrl &&
10
- content?.mediaType === 'shape',
9
+ content?.avatarImageUrl &&
10
+ content?.mediaType === 'shape',
11
11
  );
12
12
  };
@@ -10,7 +10,7 @@ export const colorReplacementVisibilityTypeAssessor: VisibilityAssessor<
10
10
  > = (content) => {
11
11
  return Boolean(
12
12
  content?.colorReplacements &&
13
- content?.imageUrl &&
14
- content?.mediaType === 'shape',
13
+ content?.imageUrl &&
14
+ content?.mediaType === 'shape',
15
15
  );
16
16
  };