@designcrowd/library.brand-page 6.1.1-json-prereq-4 → 6.1.2-color-v2-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Dk-G3RbI.js → CreatedOnBrandCrowd-de-de-dmDPJ3B5.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-AVAWRjbj.js → CreatedOnBrandCrowd-en-us-enXUVsBp.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-C5Xq4Jln.js → CreatedOnBrandCrowd-es-es-C3MEil9A.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-BQXjmcrr.js → CreatedOnBrandCrowd-fr-ca-BZTF6RtW.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-BQXjmcrr.js → CreatedOnBrandCrowd-fr-fr-BZTF6RtW.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DRMRc1Zk.js → CreatedOnBrandCrowd-pt-br-0mwjA9fv.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DRMRc1Zk.js → CreatedOnBrandCrowd-pt-pt-0mwjA9fv.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-Dd9-oQ34.js → CreatedOnDcom-de-de-Bk2_qT2O.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-CnDfLzF4.js → CreatedOnDcom-en-us-Ddfk_ipz.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-bvqvI9gT.js → CreatedOnDcom-es-es-5bvFd1op.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-BG7UGFe8.js → CreatedOnDcom-fr-ca-BwLVAwM8.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-xdz35O_B.js → CreatedOnDcom-fr-fr-BVT4iQTJ.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CLfHnCkk.js → CreatedOnDcom-pt-br-BX-jIWSe.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-Z7FY0BXt.js → CreatedOnDcom-pt-pt-VvU6cH6q.js} +1 -1
  15. package/lib/src/brand-page/components/background-shape/BackgroundShape.mixin.d.ts +1 -0
  16. package/lib/src/brand-page/components/background-shape/BackgroundShape.mixin.js +18 -3
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +2 -1
  18. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +14 -10
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +6 -4
  20. package/lib/src/brand-page/components/media/Shape.mixin.d.ts +1 -0
  21. package/lib/src/brand-page/components/media/Shape.mixin.js +20 -2
  22. package/lib/src/brand-page/components/page/Page.mixin.d.ts +2 -0
  23. package/lib/src/brand-page/components/page/Page.mixin.js +21 -2
  24. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +1 -0
  25. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +4 -1
  26. package/lib/src/brand-page/components/payment/Payment.mixin.js +4 -3
  27. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +1 -0
  28. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +1 -0
  29. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +1 -0
  30. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -1
  31. package/lib/src/brand-page/composables/consent.composable.d.ts +2 -0
  32. package/lib/src/brand-page/composables/consent.composable.js +9 -3
  33. package/lib/src/brand-page/models/brand-page-context.model.d.ts +7 -0
  34. package/lib/src/brand-page/models/index.d.ts +13 -0
  35. package/lib/src/brand-page/models/index.js +4 -0
  36. package/lib/src/brand-page/utils/color-palette.util.d.ts +179 -0
  37. package/lib/src/brand-page/utils/color-palette.util.js +372 -0
  38. package/lib/src/brand-page/utils/color.util.js +18 -0
  39. package/lib/src/brand-page/utils/context.util.d.ts +8 -0
  40. package/lib/src/brand-page/utils/context.util.js +8 -0
  41. package/lib/src/brand-page/utils/index.d.ts +2 -0
  42. package/lib/src/brand-page/utils/index.js +2 -0
  43. package/lib/src/brand-page/utils/migration/migration-13.js +2 -2
  44. package/lib/src/brand-page/utils/migration/migration-20.js +26 -7
  45. package/lib/src/brand-page/utils/migration/migration-21.d.ts +2 -0
  46. package/lib/src/brand-page/utils/migration/migration-21.js +332 -0
  47. package/lib/src/brand-page/utils/migration/migration-22.d.ts +2 -0
  48. package/lib/src/brand-page/utils/migration/migration-22.js +177 -0
  49. package/lib/src/brand-page/utils/migration.util.d.ts +2 -1
  50. package/lib/src/brand-page/utils/migration.util.js +29 -1
  51. package/lib/src/brand-page/utils/style.util.d.ts +14 -1
  52. package/lib/src/brand-page/utils/style.util.js +48 -7
  53. package/lib/src/brand-page/utils/text-style.util.d.ts +41 -0
  54. package/lib/src/brand-page/utils/text-style.util.js +37 -0
  55. package/lib/src/brand-page/utils/view-model.util.js +22 -22
  56. package/lib/src/brand-page/view-models.d.ts +2 -1
  57. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
  58. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +2 -0
  59. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +18 -14
  60. package/lib/src/brand-page-maker/components/color-picker/components/GradientColorSlider.mixin.d.ts +1 -1
  61. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.js +68 -32
  62. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +25 -10
  63. package/lib/src/brand-page-maker/constants/sidebar-constant.d.ts +1 -0
  64. package/lib/src/brand-page-maker/constants/sidebar-constant.js +12 -0
  65. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +30 -0
  66. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.js +8 -0
  67. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +52 -38
  68. package/lib/src/brand-page-maker/stores/ui/ui-store.d.ts +1 -1
  69. package/lib/src/brand-page-maker/utils/apply-color-strategy.d.ts +61 -0
  70. package/lib/src/brand-page-maker/utils/apply-color-strategy.js +136 -0
  71. package/lib/src/brand-page-maker/utils/index.d.ts +0 -1
  72. package/lib/src/brand-page-maker/utils/index.js +0 -13
  73. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +32 -0
  74. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +52 -57
  75. package/lib/src/brand-page-maker/utils/rte-field-pairs.d.ts +24 -0
  76. package/lib/src/brand-page-maker/utils/rte-field-pairs.js +84 -0
  77. package/lib/src/brand-page-maker/utils/rte-render.util.js +12 -1
  78. package/lib/src/brand-page-maker/utils/rte-sanitize.util.d.ts +12 -0
  79. package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +12 -0
  80. package/lib/src/bundled-translations-Cdaimg3K.js +177 -0
  81. package/lib/src/bundled-translations.de-DE--RgmAzqM.js +177 -0
  82. package/lib/src/bundled-translations.es-ES-CdwBqPR4.js +177 -0
  83. package/lib/src/bundled-translations.fr-CA-TlHb3mW5.js +177 -0
  84. package/lib/src/bundled-translations.fr-FR-CUgtJXTn.js +177 -0
  85. package/lib/src/bundled-translations.pt-BR-BFtnOkWA.js +177 -0
  86. package/lib/src/bundled-translations.pt-PT-D-csapLA.js +177 -0
  87. package/lib/src/bundles/bundled-translations.de-DE.json +3 -4
  88. package/lib/src/bundles/bundled-translations.es-ES.json +3 -4
  89. package/lib/src/bundles/bundled-translations.fr-CA.json +3 -4
  90. package/lib/src/bundles/bundled-translations.fr-FR.json +3 -4
  91. package/lib/src/bundles/bundled-translations.json +10 -5
  92. package/lib/src/bundles/bundled-translations.pt-BR.json +3 -4
  93. package/lib/src/bundles/bundled-translations.pt-PT.json +3 -4
  94. package/lib/src/clients/models.d.ts +2 -0
  95. package/lib/src/css/library.brand-page-brandCrowd.min.css +205 -147
  96. package/lib/src/css/library.brand-page-brandPage.min.css +205 -147
  97. package/lib/src/css/library.brand-page-designCom.min.css +205 -147
  98. package/lib/src/css/library.brand-page-preview.min.css +205 -147
  99. package/lib/src/index.d.ts +1 -0
  100. package/lib/src/index.mjs +225 -222
  101. package/lib/src/{lib-uYwxz8qR.js → lib-D3mtUOE0.js} +35216 -34274
  102. package/lib/src/lib.js +1 -0
  103. package/lib/src/shared/background-settings/composables/useSingleBackgroundShape.js +5 -7
  104. package/lib/src/shared/background-settings/shape-color.util.d.ts +16 -0
  105. package/lib/src/shared/background-settings/shape-color.util.js +26 -0
  106. package/lib/src/shared/color-palette/color-match-state.d.ts +57 -0
  107. package/lib/src/shared/color-palette/color-match-state.js +48 -0
  108. package/lib/src/shared/color-palette/store/color-palette-store.d.ts +92 -0
  109. package/lib/src/shared/color-palette/store/color-palette-store.js +171 -0
  110. package/lib/src/shared/color-palette/store/index.d.ts +1 -0
  111. package/lib/src/shared/color-palette/store/index.js +1 -0
  112. package/lib/src/shared/color-picker/components/ColorPicker.mixin.d.ts +30 -1
  113. package/lib/src/shared/color-picker/components/ColorPicker.mixin.js +76 -6
  114. package/lib/src/shared/color-picker/models.d.ts +2 -0
  115. package/lib/src/shared/color-strategies/color-strategies.d.ts +143 -0
  116. package/lib/src/shared/color-strategies/color-strategies.js +276 -0
  117. package/lib/src/shared/color-strategies/models.d.ts +149 -0
  118. package/lib/src/shared/color-strategies/models.js +5 -0
  119. package/lib/src/shared/color-strategies/page-anchors.d.ts +38 -0
  120. package/lib/src/shared/color-strategies/page-anchors.js +24 -0
  121. package/lib/src/shared/color-strategies/rte-color.d.ts +16 -0
  122. package/lib/src/shared/color-strategies/rte-color.js +96 -0
  123. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +3 -0
  124. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.js +32 -0
  125. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  126. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +3 -0
  127. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +38 -0
  128. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +9 -0
  129. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +27 -0
  130. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +1 -1
  131. package/lib/src/shared/logo-versions/LogoVersions.mixin.d.ts +1 -1
  132. package/lib/src/shared/my-designs/MyDesigns.mixin.d.ts +1 -1
  133. package/lib/src/shared/my-uploads/MyMedia.mixin.d.ts +1 -1
  134. package/lib/src/shared/my-uploads/MyUploads.mixin.d.ts +1 -1
  135. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.d.ts +0 -5
  136. package/lib/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.js +3 -50
  137. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
  138. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
  139. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +44 -53
  140. package/lib/src/shared/style-settings/components/StyleSettings.mixin.js +11 -56
  141. package/lib/src/shared/style-settings/models.d.ts +0 -1
  142. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +1 -1
  143. package/lib/src/shared/template-settings/store/template-settings-store.d.ts +2 -0
  144. package/lib/src/shared/template-settings/store/template-settings-store.js +72 -24
  145. package/lib/src/shared/unsplash-library/UnsplashLibrary.mixin.d.ts +1 -1
  146. package/package.json +1 -1
  147. package/src/brand-page/components/background-shape/BackgroundShape.mixin.ts +23 -3
  148. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +17 -10
  149. package/src/brand-page/components/cookie-consent/CookieConsent.vue +1 -0
  150. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -3
  151. package/src/brand-page/components/media/Shape.mixin.ts +25 -2
  152. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +5 -1
  153. package/src/brand-page/components/page/Page.mixin.ts +28 -2
  154. package/src/brand-page/components/page/Page.vue +6 -0
  155. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +4 -1
  156. package/src/brand-page/components/page-footer/PageFooter.vue +1 -1
  157. package/src/brand-page/components/payment/Payment.mixin.ts +4 -3
  158. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +8 -1
  159. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -1
  160. package/src/brand-page/components/save-contact/SaveContactWidget.vue +2 -1
  161. package/src/brand-page/components/shop/Shop.vue +6 -3
  162. package/src/brand-page/components/social-links/SocialLinks.vue +5 -2
  163. package/src/brand-page/composables/consent.composable.ts +18 -4
  164. package/src/brand-page/models/brand-page-context.model.ts +7 -0
  165. package/src/brand-page/models/index.ts +18 -0
  166. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +108 -27
  167. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +1 -0
  168. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +2 -0
  169. package/src/brand-page/utils/color-palette.util.test.ts +554 -0
  170. package/src/brand-page/utils/color-palette.util.ts +520 -0
  171. package/src/brand-page/utils/color.util.test.ts +35 -0
  172. package/src/brand-page/utils/color.util.ts +24 -0
  173. package/src/brand-page/utils/context.util.test.ts +43 -0
  174. package/src/brand-page/utils/context.util.ts +10 -0
  175. package/src/brand-page/utils/index.ts +2 -0
  176. package/src/brand-page/utils/migration/migration-13.ts +2 -2
  177. package/src/brand-page/utils/migration/migration-20.test.ts +21 -0
  178. package/src/brand-page/utils/migration/migration-20.ts +31 -6
  179. package/src/brand-page/utils/migration/migration-21.test.ts +762 -0
  180. package/src/brand-page/utils/migration/migration-21.ts +437 -0
  181. package/src/brand-page/utils/migration/migration-22.test.ts +367 -0
  182. package/src/brand-page/utils/migration/migration-22.ts +245 -0
  183. package/src/brand-page/utils/migration.util.ts +39 -2
  184. package/src/brand-page/utils/style.util.test.ts +54 -0
  185. package/src/brand-page/utils/style.util.ts +62 -9
  186. package/src/brand-page/utils/text-style.util.ts +45 -0
  187. package/src/brand-page/utils/view-model.util.test.ts +186 -3
  188. package/src/brand-page/utils/view-model.util.ts +22 -22
  189. package/src/brand-page/view-models.ts +2 -0
  190. package/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.vue +2 -5
  191. package/src/brand-page-maker/components/admin-settings/AdminSettings.vue +54 -0
  192. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +2 -0
  193. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +21 -15
  194. package/src/brand-page-maker/components/color-palette/BpColorPalette.vue +75 -6
  195. package/src/brand-page-maker/components/color-palette/BpColorPicker.vue +91 -20
  196. package/src/brand-page-maker/components/color-palette/i18n/color-palette.de-DE.json +2 -1
  197. package/src/brand-page-maker/components/color-palette/i18n/color-palette.es-ES.json +2 -1
  198. package/src/brand-page-maker/components/color-palette/i18n/color-palette.fr-CA.json +2 -1
  199. package/src/brand-page-maker/components/color-palette/i18n/color-palette.fr-FR.json +2 -1
  200. package/src/brand-page-maker/components/color-palette/i18n/color-palette.json +2 -1
  201. package/src/brand-page-maker/components/color-palette/i18n/color-palette.pt-BR.json +2 -1
  202. package/src/brand-page-maker/components/color-palette/i18n/color-palette.pt-PT.json +2 -1
  203. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +4 -21
  204. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.test.ts +135 -0
  205. package/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.ts +79 -35
  206. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +30 -10
  207. package/src/brand-page-maker/constants/sidebar-constant.ts +12 -0
  208. package/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.ts +9 -0
  209. package/src/brand-page-maker/stores/brandpage-maker/__snapshots__/brandpage-maker-store.test.ts.snap +3 -3
  210. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +80 -9
  211. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +58 -65
  212. package/src/brand-page-maker/stores/ui/ui-store.ts +1 -1
  213. package/src/brand-page-maker/utils/__snapshots__/apply-color-strategy.golden.test.ts.snap +26599 -0
  214. package/src/brand-page-maker/utils/apply-color-strategy.golden.test.ts +164 -0
  215. package/src/brand-page-maker/utils/apply-color-strategy.test.ts +1185 -0
  216. package/src/brand-page-maker/utils/apply-color-strategy.ts +240 -0
  217. package/src/brand-page-maker/utils/index.ts +0 -18
  218. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +108 -0
  219. package/src/brand-page-maker/utils/rich-text-editor.util.ts +63 -63
  220. package/src/brand-page-maker/utils/rte-features.test.ts +37 -0
  221. package/src/brand-page-maker/utils/rte-field-pairs.test.ts +50 -0
  222. package/src/brand-page-maker/utils/rte-field-pairs.ts +98 -0
  223. package/src/brand-page-maker/utils/rte-render-parity.test.ts +8 -5
  224. package/src/brand-page-maker/utils/rte-render.util.ts +15 -1
  225. package/src/brand-page-maker/utils/rte-sanitize-json.test.ts +54 -1
  226. package/src/brand-page-maker/utils/rte-sanitize.util.ts +17 -0
  227. package/src/bundles/bundled-translations.de-DE.json +3 -4
  228. package/src/bundles/bundled-translations.es-ES.json +3 -4
  229. package/src/bundles/bundled-translations.fr-CA.json +3 -4
  230. package/src/bundles/bundled-translations.fr-FR.json +3 -4
  231. package/src/bundles/bundled-translations.json +10 -5
  232. package/src/bundles/bundled-translations.pt-BR.json +3 -4
  233. package/src/bundles/bundled-translations.pt-PT.json +3 -4
  234. package/src/clients/models.ts +3 -0
  235. package/src/lib.ts +1 -0
  236. package/src/shared/background-settings/components/BackgroundSettings.vue +0 -1
  237. package/src/shared/background-settings/components/MultiBackgroundShapes.vue +4 -10
  238. package/src/shared/background-settings/components/SingleBackgroundShape.vue +0 -2
  239. package/src/shared/background-settings/components/background-color/BackgroundColorSettings.vue +5 -26
  240. package/src/shared/background-settings/composables/useSingleBackgroundShape.ts +5 -8
  241. package/src/shared/background-settings/shape-color.util.test.ts +35 -0
  242. package/src/shared/background-settings/shape-color.util.ts +28 -0
  243. package/src/shared/color-palette/color-match-state.test.ts +153 -0
  244. package/src/shared/color-palette/color-match-state.ts +109 -0
  245. package/src/shared/color-palette/store/color-palette-store.test.ts +325 -0
  246. package/src/shared/color-palette/store/color-palette-store.ts +251 -0
  247. package/src/shared/color-palette/store/index.ts +1 -0
  248. package/src/shared/color-picker/components/ColorPicker.mixin.ts +81 -7
  249. package/src/shared/color-picker/models.ts +7 -0
  250. package/src/shared/color-strategies/color-strategies.test.ts +548 -0
  251. package/src/shared/color-strategies/color-strategies.ts +359 -0
  252. package/src/shared/color-strategies/models.ts +173 -0
  253. package/src/shared/color-strategies/page-anchors.ts +45 -0
  254. package/src/shared/color-strategies/rte-color.test.ts +209 -0
  255. package/src/shared/color-strategies/rte-color.ts +116 -0
  256. package/src/shared/content-settings/components/color-field/ColorField.test.ts +209 -0
  257. package/src/shared/content-settings/components/color-field/ColorField.vue +181 -122
  258. package/src/shared/content-settings/components/color-field/i18n/color-field.json +4 -1
  259. package/src/shared/content-settings/components/color-match-indicator/ColorMatchIndicator.test.ts +109 -0
  260. package/src/shared/content-settings/components/color-match-indicator/ColorMatchIndicator.vue +146 -0
  261. package/src/shared/content-settings/components/color-replacements-field/ColorReplacementsField.test.ts +112 -0
  262. package/src/shared/content-settings/components/color-replacements-field/ColorReplacementsField.vue +8 -87
  263. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.de-DE.json +1 -3
  264. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.es-ES.json +1 -3
  265. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.fr-CA.json +1 -3
  266. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.fr-FR.json +1 -3
  267. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.json +1 -3
  268. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.pt-BR.json +1 -3
  269. package/src/shared/content-settings/components/color-replacements-field/i18n/color-replacement-field.pt-PT.json +1 -3
  270. package/src/shared/content-settings/components/color-strategy-panel/ColorStrategyPanel.test.ts +131 -0
  271. package/src/shared/content-settings/components/color-strategy-panel/ColorStrategyPanel.vue +98 -0
  272. package/src/shared/content-settings/components/color-strategy-panel/color-strategy-gate.test.ts +113 -0
  273. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.ts +45 -0
  274. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +15 -0
  275. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.vue +0 -1
  276. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.vue +0 -1
  277. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +53 -0
  278. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +10 -0
  279. package/src/shared/content-settings/components/shape-field/ShapeField.vue +100 -101
  280. package/src/shared/content-settings/components/testimonial-items-field/TestimonialItemsField.vue +227 -228
  281. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +0 -1
  282. package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.test.ts +96 -0
  283. package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +29 -0
  284. package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +9 -15
  285. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.mixin.ts +3 -64
  286. package/src/shared/navigation-style-settings/components/navigation-style-settings/NavigationStyleSettings.vue +18 -66
  287. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.vue +0 -4
  288. package/src/shared/side-bar/components/SideBar.tabs.test.ts +64 -0
  289. package/src/shared/style-settings/components/StyleSettings.mixin.ts +14 -67
  290. package/src/shared/style-settings/components/StyleSettings.vue +32 -213
  291. package/src/shared/style-settings/components/color-palette-settings-with-state/ColorPaletteSettingsWithState.vue +85 -0
  292. package/src/shared/style-settings/components/i18n/style-settings.json +3 -0
  293. package/src/shared/style-settings/components/style-option-color-field-with-state/StyleOptionColorFieldWithState.test.ts +105 -0
  294. package/src/shared/style-settings/components/style-option-color-field-with-state/StyleOptionColorFieldWithState.vue +80 -0
  295. package/src/shared/style-settings/models.ts +0 -1
  296. package/src/shared/template-settings/store/template-settings-store.ts +93 -27
  297. package/lib/src/bundled-translations-2HkRBbBD.js +0 -177
  298. package/lib/src/bundled-translations.de-DE-CL9ZEhU2.js +0 -177
  299. package/lib/src/bundled-translations.es-ES-uj7Sliu0.js +0 -177
  300. package/lib/src/bundled-translations.fr-CA-BMnBtr_w.js +0 -177
  301. package/lib/src/bundled-translations.fr-FR-9PEZedzq.js +0 -177
  302. package/lib/src/bundled-translations.pt-BR-B3oNDkoe.js +0 -177
  303. package/lib/src/bundled-translations.pt-PT-DM7Vsf-h.js +0 -177
  304. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.d.ts +0 -286
  305. package/lib/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.js +0 -60
  306. package/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.mixin.ts +0 -66
  307. package/src/shared/background-settings/components/background-shapes/BackgroundShapeSettings.vue +0 -28
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-uYwxz8qR.js";
2
+ import { _ as t } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-uYwxz8qR.js";
2
+ import { _ as e } from "./lib-D3mtUOE0.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-uYwxz8qR.js";
2
+ import { _ as e } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-uYwxz8qR.js";
2
+ import { _ as e } from "./lib-D3mtUOE0.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-uYwxz8qR.js";
2
+ import { _ as e } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-uYwxz8qR.js";
2
+ import { _ as e } from "./lib-D3mtUOE0.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-uYwxz8qR.js";
2
+ import { _ as M } from "./lib-D3mtUOE0.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-uYwxz8qR.js";
2
+ import { _ as M } from "./lib-D3mtUOE0.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -16,6 +16,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
16
16
  backgroundShapesStyle(): BrandPageCssStyle;
17
17
  isFullBackground(): boolean;
18
18
  objectUrl(): string;
19
+ resolvedShapeColor(): string;
19
20
  }, {
20
21
  isValidSvgUrl(url: string): boolean;
21
22
  applySvgAttributes(svgData: string): string;
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import ComponentCommonMixin from '../mixins/component-common.mixin';
3
3
  import axios from 'axios';
4
4
  import { applyColorToSvgString } from '@brand-page/utils/svg-color.util';
5
+ import { resolveColorReference, } from '@brand-page/utils/color-palette.util';
5
6
  import { isURL } from '../../../utils/validator.util';
6
7
  import { PROXY_SHAPE_URL_REGEX } from '@brand-page/constants';
7
8
  import { getRegexToMatchAttributeInSvgTag } from '@brand-page/utils/svg.util';
@@ -17,6 +18,11 @@ export default defineComponent({
17
18
  required: true,
18
19
  },
19
20
  },
21
+ inject: {
22
+ // BP-5886: getter for the page palette (provided by <Page>) to resolve
23
+ // `var(--id)` fills.
24
+ getPaletteColors: { default: undefined },
25
+ },
20
26
  data() {
21
27
  return {
22
28
  svgData: '',
@@ -48,9 +54,18 @@ export default defineComponent({
48
54
  }
49
55
  return this.viewModel.name;
50
56
  },
57
+ // BP-5886: the shape's colour with any palette `var(--id)` resolved to its
58
+ // concrete value — `var()` can't resolve inside the <img>-embedded SVG.
59
+ resolvedShapeColor() {
60
+ const getColors = this.getPaletteColors;
61
+ const colors = getColors?.() ?? [];
62
+ return resolveColorReference(this.viewModel?.style?.color, colors);
63
+ },
51
64
  },
52
65
  watch: {
53
- 'viewModel.style.color': {
66
+ // BP-5886: re-render when the resolved colour changes — covers both a direct
67
+ // colour edit and an edit to a referenced palette role.
68
+ resolvedShapeColor: {
54
69
  handler() {
55
70
  this.render();
56
71
  },
@@ -146,8 +161,8 @@ export default defineComponent({
146
161
  else {
147
162
  this.originalSvgData = this.viewModel.name;
148
163
  }
149
- if (this.viewModel.style.color) {
150
- this.svgData = applyColorToSvgString(this.originalSvgData, this.viewModel.style.color);
164
+ if (this.resolvedShapeColor) {
165
+ this.svgData = applyColorToSvgString(this.originalSvgData, this.resolvedShapeColor);
151
166
  }
152
167
  else {
153
168
  this.svgData = this.originalSvgData;
@@ -1,6 +1,7 @@
1
1
  import type { PropType } from 'vue';
2
2
  import type { ContactFormViewModel } from '@brand-page/view-models';
3
3
  import type { BrandPageContext, FormField, FormFieldType } from '@brand-page/models';
4
+ import { type RichTextValue } from '@brand-page-maker/utils';
4
5
  export interface FieldValue {
5
6
  value: string;
6
7
  error?: string;
@@ -62,7 +63,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
62
63
  hasFormError(): boolean;
63
64
  hasSubmitError(): boolean;
64
65
  isSubmitButtonVisible(): boolean;
65
- title(): string;
66
+ title(): RichTextValue;
66
67
  renderText(): string;
67
68
  renderSuccessText(): string;
68
69
  successMessageColorStyle(): BrandPageCssStyle;
@@ -1,12 +1,12 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { FORM_FIELD_TYPES } from '@brand-page/models';
3
- import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, } from '@brand-page/utils';
3
+ import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, isPreviewMode, } from '@brand-page/utils';
4
4
  import { isDecorativeButtonStyle } from '../../utils/button.util';
5
5
  import brandPageClient from '../../clients/brand-page.client';
6
6
  import { isEmail } from '../../../utils/validator.util';
7
7
  import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, DISPLAY_STYLE_COLLAPSED, RECAPTCHA_ACTION_CONTACT_FORM, TEXT_ONLY, } from '../../constants';
8
8
  import { getRenderText, contentPaddingStyle as toContentPaddingStyle, mutedTextForBackground, backgroundColorFromStyle, } from '@brand-page/utils';
9
- import { hasRTEContent, getPlainTextFromRTE } from '@brand-page-maker/utils';
9
+ import { hasRTEContent } from '@brand-page-maker/utils';
10
10
  import { useReCaptcha } from '../../composables/recaptcha.composable';
11
11
  export default defineComponent({
12
12
  props: {
@@ -120,12 +120,14 @@ export default defineComponent({
120
120
  isEmail(this.viewModel.responseEmail));
121
121
  },
122
122
  title() {
123
- // BP-5787: title may be RTE JSON (not a string), so `.trim()` would
124
- // throw — read the visible text via getPlainTextFromRTE to decide
125
- // whether to fall back to the default.
126
- return getPlainTextFromRTE(this.viewModel.title)
127
- ? this.viewModel.title
128
- : 'Contact Us';
123
+ // Render exactly what's in the data — no render-time default. The block
124
+ // factory seeds a localised title (contentSettingsTr('contactUsTitle')) on
125
+ // creation and it flows through the translation pipeline, so a hardcoded
126
+ // 'Contact Us' fallback here would (a) override a user who deliberately
127
+ // cleared the title and (b) paint untranslated English on non-English
128
+ // sites. This is also the one section that had such a fallback — every
129
+ // other section renders its data title directly (BP-5787).
130
+ return this.viewModel.title;
129
131
  },
130
132
  renderText() {
131
133
  if (!this.viewModel.description) {
@@ -196,7 +198,9 @@ export default defineComponent({
196
198
  }));
197
199
  },
198
200
  mounted() {
199
- if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
201
+ if (this.context?.recaptchaSiteKey &&
202
+ !isPreviewMode(this.context) &&
203
+ this.recaptcha) {
200
204
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
201
205
  }
202
206
  },
@@ -206,7 +210,7 @@ export default defineComponent({
206
210
  if (this.hasFormError) {
207
211
  return;
208
212
  }
209
- if (this.isPreview || !this.context.brandPageToken) {
213
+ if (isPreviewMode(this.context) || !this.context.brandPageToken) {
210
214
  if (process.env.NODE_ENV !== 'production' &&
211
215
  !this.context.brandPageSlug) {
212
216
  console.error('brandPageToken is not defined');
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import brandPageClient from '../../clients/brand-page.client';
3
- import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, mutedTextForBackground, backgroundColorFromStyle, } from '@brand-page/utils';
3
+ import { getEmailValidationError, contentPaddingStyle as toContentPaddingStyle, isPreviewMode, mutedTextForBackground, backgroundColorFromStyle, } from '@brand-page/utils';
4
4
  import { contentSettingsTr, mailingListTr, } from '@src/composables/useTranslate';
5
5
  import { useReCaptcha } from '../../composables/recaptcha.composable';
6
6
  import { RECAPTCHA_ACTION_MAILING_LIST } from '../../constants';
@@ -46,7 +46,9 @@ export default defineComponent({
46
46
  },
47
47
  mounted() {
48
48
  this.show = true;
49
- if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
49
+ if (this.context?.recaptchaSiteKey &&
50
+ !isPreviewMode(this.context) &&
51
+ this.recaptcha) {
50
52
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
51
53
  }
52
54
  },
@@ -103,7 +105,7 @@ export default defineComponent({
103
105
  },
104
106
  isFormDisabled() {
105
107
  return (this.hasFormError ||
106
- this.isPreview ||
108
+ isPreviewMode(this.context) ||
107
109
  !this.brandPageToken ||
108
110
  this.isSubmitting);
109
111
  },
@@ -125,7 +127,7 @@ export default defineComponent({
125
127
  if (this.hasFormError) {
126
128
  return;
127
129
  }
128
- if (this.isPreview || !this.brandPageToken) {
130
+ if (isPreviewMode(this.context) || !this.brandPageToken) {
129
131
  return;
130
132
  }
131
133
  this.isSubmitting = true;
@@ -30,6 +30,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
30
30
  originalSvgData: string;
31
31
  }, {
32
32
  useObjectElement(): boolean;
33
+ resolvedColorReplacements(): ColorReplacement[];
33
34
  objectStyle(): {
34
35
  width?: undefined;
35
36
  height?: undefined;
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import ComponentCommonMixin from '../mixins/component-common.mixin';
3
3
  import axios from 'axios';
4
4
  import { applyColorReplacementsToSvgString } from '@brand-page/utils/svg-color.util';
5
+ import { resolveColorReference, } from '@brand-page/utils/color-palette.util';
5
6
  import { PROXY_SHAPE_URL_REGEX } from '@brand-page/constants';
6
7
  import { getRegexToMatchAttributeInSvgTag } from '@brand-page/utils/svg.util';
7
8
  export default defineComponent({
@@ -31,6 +32,11 @@ export default defineComponent({
31
32
  default: undefined,
32
33
  },
33
34
  },
35
+ inject: {
36
+ // BP-5886: getter for the page palette (provided by <Page>) — used to resolve
37
+ // `var(--id)` fills to concrete colours before the SVG is built.
38
+ getPaletteColors: { default: undefined },
39
+ },
34
40
  data() {
35
41
  return { svgData: '', svgDataObjectUrl: '', originalSvgData: '' };
36
42
  },
@@ -38,6 +44,16 @@ export default defineComponent({
38
44
  useObjectElement() {
39
45
  return !!this.imageUrl.match(PROXY_SHAPE_URL_REGEX);
40
46
  },
47
+ // BP-5886: colour replacements with any palette `var(--id)` resolved to its
48
+ // concrete value — `var()` can't resolve inside the <img>-embedded SVG.
49
+ resolvedColorReplacements() {
50
+ const getColors = this.getPaletteColors;
51
+ const colors = getColors?.() ?? [];
52
+ return (this.colorReplacements ?? []).map((c) => ({
53
+ ...c,
54
+ replacementColor: resolveColorReference(c.replacementColor, colors),
55
+ }));
56
+ },
41
57
  objectStyle() {
42
58
  if (!this.size) {
43
59
  return {};
@@ -60,7 +76,9 @@ export default defineComponent({
60
76
  },
61
77
  },
62
78
  watch: {
63
- colorReplacements: {
79
+ // BP-5886: watch the RESOLVED replacements so the shape re-renders both when
80
+ // its own colours change and when a referenced palette colour is edited.
81
+ resolvedColorReplacements: {
64
82
  handler(newVal, oldVal) {
65
83
  if (newVal &&
66
84
  oldVal &&
@@ -136,7 +154,7 @@ export default defineComponent({
136
154
  if (!this.originalSvgData) {
137
155
  return;
138
156
  }
139
- this.svgData = applyColorReplacementsToSvgString(this.originalSvgData, this.colorReplacements);
157
+ this.svgData = applyColorReplacementsToSvgString(this.originalSvgData, this.resolvedColorReplacements);
140
158
  this.svgData = this.applySvgAttributes(this.svgData);
141
159
  const blob = new Blob([this.svgData], { type: 'image/svg+xml' });
142
160
  const oldSvgDataObjectUrl = this.svgDataObjectUrl;
@@ -52,6 +52,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
52
52
  styles: {};
53
53
  }, {
54
54
  brandPageToken(): string | null;
55
+ shouldEmitPaletteRoot(): boolean;
56
+ paletteRootStyleHtml(): string;
55
57
  contents(): ContentViewModel[];
56
58
  backgroundShapes(): BackgroundShape[];
57
59
  rootElementStyles(): BrandPageCssStyle;
@@ -1,6 +1,6 @@
1
- import { defineComponent } from 'vue';
1
+ import { defineComponent, provide } from 'vue';
2
2
  import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
3
- import { getSlugFromContext, getPageHeadingText } from '@brand-page/utils';
3
+ import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, } from '@brand-page/utils';
4
4
  import { findNavItemByRelativePath } from '@brand-page/utils/route.util';
5
5
  import { BRAND_PAGE_TYPES } from '@brand-page/models';
6
6
  import { hasProfileContent as checkHasProfileContent } from '@brand-page/utils/vcard.util';
@@ -59,6 +59,14 @@ export default defineComponent({
59
59
  'save-contact-widget-click',
60
60
  ],
61
61
  setup(props) {
62
+ // BP-5886: shapes render as <img>-embedded SVG, an isolated document the
63
+ // `:root` palette block can't reach, so a `var(--id)` fill won't resolve.
64
+ // Provide the palette as a getter so the shape mixins can resolve their refs
65
+ // to concrete colours before building the SVG. A getter (not a provided ref)
66
+ // sidesteps Options-API inject ref-unwrapping ambiguity and stays reactive:
67
+ // calling it inside a shape's computed tracks `viewModel.styles.colors`, so
68
+ // shapes recolour when a referenced palette colour is edited.
69
+ provide('getPaletteColors', () => props.viewModel?.styles?.colors ?? []);
62
70
  return {
63
71
  fluidText: JSON.stringify({
64
72
  default: props.context.brandPageType === BRAND_PAGE_TYPES.brandSite
@@ -77,6 +85,17 @@ export default defineComponent({
77
85
  brandPageToken() {
78
86
  return this.viewModel?.brandPageToken || null;
79
87
  },
88
+ // BP-5886 — global colour palette emitted as a single `:root` block.
89
+ // Only the published single-document surfaces emit the global block:
90
+ // template-grid cards get scoped vars (TemplatePreview) and the maker main
91
+ // preview emits from BrandPageMakerPage, so guard those out to avoid a
92
+ // duplicate / colliding `:root`.
93
+ shouldEmitPaletteRoot() {
94
+ return !this.context?.isTemplate && !this.context?.isPreview;
95
+ },
96
+ paletteRootStyleHtml() {
97
+ return buildPaletteRootCss(this.viewModel?.styles?.colors ?? []);
98
+ },
80
99
  contents() {
81
100
  return this.pageViewModel?.contents || [];
82
101
  },
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
20
20
  default: boolean;
21
21
  };
22
22
  }>, {}, {}, {
23
+ isInPreviewMode(): boolean;
23
24
  containerStyle(): BrandPageCssStyle;
24
25
  socialLinksIconStyle(): BrandPageCssStyle;
25
26
  isDisplayStyleCentered(): boolean;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
- import { getRenderText } from '@brand-page/utils';
2
+ import { getRenderText, isPreviewMode } from '@brand-page/utils';
3
3
  import { FOOTER_DISPLAY } from '../../constants';
4
4
  export default defineComponent({
5
5
  props: {
@@ -23,6 +23,9 @@ export default defineComponent({
23
23
  },
24
24
  emits: ['on-logo-click', 'footer-container-click'],
25
25
  computed: {
26
+ isInPreviewMode() {
27
+ return isPreviewMode(this.context);
28
+ },
26
29
  containerStyle() {
27
30
  return this.viewModel.backgroundStyle;
28
31
  },
@@ -2,6 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import brandPageClient from '../../clients/brand-page.client';
3
3
  import { DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, paymentProviders, } from '../../constants';
4
4
  import raygunUtil from '@brand-page/utils/raygun.util';
5
+ import { isPreviewMode } from '@brand-page/utils';
5
6
  import { paymentTr } from '@src/composables/useTranslate';
6
7
  const DEFAULT_PAYMENT_SUCCESS_MESSAGE = paymentTr(`defaultPaymentSuccessMessage`);
7
8
  const PAYMENT_CONFIG_ACTIVE = 'Active';
@@ -60,10 +61,10 @@ export default defineComponent({
60
61
  }
61
62
  },
62
63
  canMakePayment() {
63
- return !this.context.isPreview && this.isPaymentConfigActive;
64
+ return !isPreviewMode(this.context) && this.isPaymentConfigActive;
64
65
  },
65
66
  showPaymentBlock() {
66
- return this.context.isPreview || this.isPaymentConfigActive;
67
+ return isPreviewMode(this.context) || this.isPaymentConfigActive;
67
68
  },
68
69
  paymentOptions() {
69
70
  return this.paymentConfig.paymentOptions;
@@ -147,7 +148,7 @@ export default defineComponent({
147
148
  this.state = paymentConfigId
148
149
  ? paymentState.PaymentOptionSelection
149
150
  : paymentState.IncompleteConfig;
150
- if (this.context.isPreview || !paymentConfigId) {
151
+ if (isPreviewMode(this.context) || !paymentConfigId) {
151
152
  return;
152
153
  }
153
154
  try {
@@ -3,6 +3,7 @@ export declare const context: {
3
3
  stripePublishableKey: string;
4
4
  isTemplate: boolean;
5
5
  isPreview: boolean;
6
+ isLivePreview?: boolean;
6
7
  isMobile?: boolean;
7
8
  isDesignCom: boolean;
8
9
  isProduction: boolean;
@@ -3,6 +3,7 @@ export declare const context: {
3
3
  stripePublishableKey: string;
4
4
  isTemplate: boolean;
5
5
  isPreview: boolean;
6
+ isLivePreview?: boolean;
6
7
  isMobile?: boolean;
7
8
  isDesignCom: boolean;
8
9
  isProduction: boolean;
@@ -21,6 +21,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
21
21
  selectedPaymentOptionIds: string[];
22
22
  imageType: string;
23
23
  }, {
24
+ isInPreviewMode(): boolean;
24
25
  contentPaddingStyle(): {
25
26
  paddingTop: string;
26
27
  paddingBottom: string;
@@ -2,7 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import { PAYMENT_OPTION_DISPLAY_TYPES, PAYMENT_OPTION_IMAGE_TYPES, } from '../../../models';
3
3
  import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
4
4
  import { addOpacityToHex } from '../../../utils/color.util';
5
- import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
5
+ import { contentPaddingStyle as toContentPaddingStyle, isPreviewMode, } from '../../../utils';
6
6
  import { RGBAtoHex } from '@utils/helpers';
7
7
  const MAX_CUSTOM_REQUEST_CHARS = 500;
8
8
  export default defineComponent({
@@ -29,6 +29,9 @@ export default defineComponent({
29
29
  };
30
30
  },
31
31
  computed: {
32
+ isInPreviewMode() {
33
+ return isPreviewMode(this.context);
34
+ },
32
35
  contentPaddingStyle() {
33
36
  return toContentPaddingStyle(this.viewModel);
34
37
  },
@@ -4,8 +4,10 @@ export declare const useConsent: () => {
4
4
  updateConsent: import("vue").Ref<(c: ConsentType) => void, (c: ConsentType) => void>;
5
5
  featureEnabled: import("vue").Ref<boolean, boolean>;
6
6
  showConsentModal: import("vue").Ref<boolean, boolean>;
7
+ persist: import("vue").Ref<boolean, boolean>;
7
8
  initialise: (options: {
8
9
  featureEnabled: boolean;
10
+ persist?: boolean;
9
11
  }) => ConsentType;
10
12
  grant: (cb?: () => unknown) => void;
11
13
  deny: (cb?: () => unknown) => void;
@@ -28,6 +28,7 @@ const store = reactive({
28
28
  consent: undefined,
29
29
  featureEnabled: false,
30
30
  showConsentModal: false,
31
+ persist: true,
31
32
  updateConsent(c) {
32
33
  this.consent = c;
33
34
  },
@@ -38,7 +39,8 @@ export const useConsent = () => {
38
39
  return undefined;
39
40
  }
40
41
  store.featureEnabled = options.featureEnabled;
41
- store.consent = getStoredConsent();
42
+ store.persist = options.persist ?? true;
43
+ store.consent = store.persist ? getStoredConsent() : undefined;
42
44
  store.showConsentModal =
43
45
  options.featureEnabled && !accepted.value && !declined.value;
44
46
  return store.consent;
@@ -46,13 +48,17 @@ export const useConsent = () => {
46
48
  const accepted = computed(() => Boolean(store.consent && store.consent === 'granted'));
47
49
  const declined = computed(() => Boolean(store.consent && store.consent === 'denied'));
48
50
  const grant = (cb) => {
49
- storeConsent('granted');
51
+ if (store.persist) {
52
+ storeConsent('granted');
53
+ }
50
54
  store.updateConsent('granted');
51
55
  store.showConsentModal = store.featureEnabled && !accepted.value;
52
56
  cb && cb();
53
57
  };
54
58
  const deny = (cb) => {
55
- storeConsent('denied');
59
+ if (store.persist) {
60
+ storeConsent('denied');
61
+ }
56
62
  store.updateConsent('denied');
57
63
  store.showConsentModal = false;
58
64
  cb && cb();
@@ -47,6 +47,13 @@ export type MediaSizes = keyof typeof MEDIA_SIZES;
47
47
  export interface BrandPageContext {
48
48
  isTemplate: boolean;
49
49
  isPreview: boolean;
50
+ /**
51
+ * Rendered as a customer-facing live preview (safe/inert actions, no
52
+ * watermark, ephemeral consent). Distinct from the editor `isPreview`, which
53
+ * also drives editor/thumbnail-only behaviour. Use `isPreviewMode()` to gate
54
+ * inert-action behaviour that applies to both.
55
+ */
56
+ isLivePreview?: boolean;
50
57
  /** @deprecated should be used on maker only */
51
58
  isMobile?: boolean;
52
59
  isDesignCom: boolean;
@@ -61,6 +61,7 @@ export declare class PageStyles {
61
61
  logoStyles: LogoStyles;
62
62
  textStyles: TextStyles;
63
63
  galleryStyles: GalleryStyles;
64
+ colors: ColorItem[];
64
65
  constructor(option?: Partial<Omit<PageStyles, 'logoStyles' | 'buttonStyles' | 'backgroundStyles' | 'textStyles'>> & {
65
66
  logoStyles?: Partial<LogoStyles>;
66
67
  buttonStyles?: Partial<ButtonStyles>;
@@ -378,6 +379,18 @@ export interface ColorReplacement {
378
379
  originalColor: string;
379
380
  replacementColor: string;
380
381
  }
382
+ /**
383
+ * A single entry in the global colour palette (BP-5886).
384
+ * `id` is the CSS-variable name emitted at :root (`--<id>`); elements reference
385
+ * the colour via `var(--<id>)`. `value` is a concrete literal (rgb/#hex or a
386
+ * gradient string). `palette` = the 4 static brand roles (`palette-0`…`palette-3`);
387
+ * `custom` = one-off colours chosen on elements (`palette-custom-<uuid>`).
388
+ */
389
+ export interface ColorItem {
390
+ id: string;
391
+ value: string;
392
+ type: 'palette' | 'custom';
393
+ }
381
394
  export interface TestimonialSectionContent extends Content {
382
395
  type: 'testimonial-section';
383
396
  title: RichTextValue;
@@ -85,6 +85,9 @@ export class PageStyles {
85
85
  logoStyles;
86
86
  textStyles;
87
87
  galleryStyles;
88
+ // BP-5886 global colour palette. Non-nullable (default []) per the model
89
+ // reactivity rule; old persisted `styles` that omit it hydrate to [].
90
+ colors;
88
91
  constructor(option = {}) {
89
92
  this.backgroundStyles = new BackgroundStyles(option.backgroundStyles || {
90
93
  backgroundImageUrl: '',
@@ -109,6 +112,7 @@ export class PageStyles {
109
112
  ? new TextStyles(option.textStyles)
110
113
  : TextStyles.GetDefaultTextStyle();
111
114
  this.galleryStyles = new GalleryStyles(option.galleryStyles);
115
+ this.colors = option.colors ? option.colors.map((c) => ({ ...c })) : [];
112
116
  }
113
117
  }
114
118
  export const ASPECT_RATIOS = {