@designcrowd/library.brand-page 6.2.11-builder-v2-1 → 6.2.12

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 (579) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Dg2pOwbr.js → CreatedOnBrandCrowd-de-de-BtVKllNQ.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-BILs_hsB.js → CreatedOnBrandCrowd-en-us-CX5V0v8u.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-VpxQ0N5F.js → CreatedOnBrandCrowd-es-es-CbA02PCL.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CFHWRHzi.js → CreatedOnBrandCrowd-fr-ca-BQAKruBF.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CFHWRHzi.js → CreatedOnBrandCrowd-fr-fr-BQAKruBF.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-CZfs45s9.js → CreatedOnBrandCrowd-pt-br-Yk_yzB3s.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-CZfs45s9.js → CreatedOnBrandCrowd-pt-pt-Yk_yzB3s.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DYMQ6sIF.js → CreatedOnDcom-de-de-DJZQbPSD.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Dj5sdPid.js → CreatedOnDcom-en-us-BJvNAa4l.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-Cx9yNTro.js → CreatedOnDcom-es-es-CUwB1FRY.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-Bzr0SjGq.js → CreatedOnDcom-fr-ca-CK54U4oh.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-BgqKY35F.js → CreatedOnDcom-fr-fr-DuUNBGrM.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CXK6qfvL.js → CreatedOnDcom-pt-br-BfODpFNV.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-B8SggNTQ.js → CreatedOnDcom-pt-pt-Cf6u2GCg.js} +1 -1
  15. package/lib/src/brand-page/__fixtures__/production-text-style-resolver.fixture.d.ts +16 -0
  16. package/lib/src/brand-page/__fixtures__/production-text-style-resolver.fixture.js +35 -0
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +3 -0
  18. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +19 -13
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +3 -1
  20. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +17 -2
  21. package/lib/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.d.ts +11 -3
  22. package/lib/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.js +35 -1
  23. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +8 -2
  24. package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +27 -3
  25. package/lib/src/brand-page/components/page/Page.mixin.d.ts +5 -2
  26. package/lib/src/brand-page/components/page/Page.mixin.js +33 -27
  27. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +7 -2
  28. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +21 -1
  29. package/lib/src/brand-page/components/payment/Payment.mixin.d.ts +5 -2
  30. package/lib/src/brand-page/components/payment/Payment.mixin.js +22 -2
  31. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +6 -2
  32. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +32 -1
  33. package/lib/src/brand-page/components/social-links/SocialLinks.stories.js +0 -3
  34. package/lib/src/brand-page/components/testimonial-section/__fixtures__/data.js +0 -3
  35. package/lib/src/brand-page/components/text/Text.stories.js +0 -17
  36. package/lib/src/brand-page/constants/font.constants.d.ts +62 -0
  37. package/lib/src/brand-page/constants/font.constants.js +35 -0
  38. package/lib/src/brand-page/models/brand-page-context.model.d.ts +2 -0
  39. package/lib/src/brand-page/models/brand-page-context.model.js +7 -0
  40. package/lib/src/brand-page/models/index.d.ts +23 -24
  41. package/lib/src/brand-page/models/index.js +20 -7
  42. package/lib/src/brand-page/models/navigation-styles.model.d.ts +1 -1
  43. package/lib/src/brand-page/models/navigation-styles.model.js +17 -8
  44. package/lib/src/brand-page/models/payment.model.d.ts +11 -6
  45. package/lib/src/brand-page/models/styles.model.d.ts +53 -7
  46. package/lib/src/brand-page/models/styles.model.js +115 -27
  47. package/lib/src/brand-page/utils/color-palette.util.d.ts +43 -23
  48. package/lib/src/brand-page/utils/color-palette.util.js +65 -27
  49. package/lib/src/brand-page/utils/color.util.d.ts +13 -9
  50. package/lib/src/brand-page/utils/color.util.js +56 -15
  51. package/lib/src/brand-page/utils/container-text-color.util.d.ts +46 -13
  52. package/lib/src/brand-page/utils/container-text-color.util.js +321 -41
  53. package/lib/src/brand-page/utils/index.d.ts +1 -0
  54. package/lib/src/brand-page/utils/index.js +1 -0
  55. package/lib/src/brand-page/utils/migration/migration-20.js +6 -2
  56. package/lib/src/brand-page/utils/migration/migration-21.js +34 -6
  57. package/lib/src/brand-page/utils/migration/migration-22.d.ts +99 -0
  58. package/lib/src/brand-page/utils/migration/migration-22.js +909 -0
  59. package/lib/src/brand-page/utils/migration.util.js +17 -0
  60. package/lib/src/brand-page/utils/model.util.d.ts +4 -0
  61. package/lib/src/brand-page/utils/model.util.js +4 -0
  62. package/lib/src/brand-page/utils/personalisation.util.js +9 -1
  63. package/lib/src/brand-page/utils/rte-role-lift.util.d.ts +72 -0
  64. package/lib/src/brand-page/utils/rte-role-lift.util.js +275 -0
  65. package/lib/src/brand-page/utils/style.util.d.ts +5 -1
  66. package/lib/src/brand-page/utils/style.util.js +34 -11
  67. package/lib/src/brand-page/utils/text-role-css.util.d.ts +19 -0
  68. package/lib/src/brand-page/utils/text-role-css.util.js +186 -0
  69. package/lib/src/brand-page/utils/text-role-reconnect.util.d.ts +90 -0
  70. package/lib/src/brand-page/utils/text-role-reconnect.util.js +434 -0
  71. package/lib/src/brand-page/utils/text-style.util.d.ts +53 -23
  72. package/lib/src/brand-page/utils/text-style.util.js +122 -22
  73. package/lib/src/brand-page/utils/view-model.util.d.ts +9 -1
  74. package/lib/src/brand-page/utils/view-model.util.js +124 -111
  75. package/lib/src/brand-page/view-models.d.ts +1 -0
  76. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +4 -1
  77. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +34 -2
  78. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +4 -4
  79. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +4 -1
  80. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -10
  81. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +0 -1
  82. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +44 -138
  83. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -28
  84. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +4 -1
  85. package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -1
  86. package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +7 -0
  87. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +21 -0
  88. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +25 -1
  89. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +25 -1
  90. package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +21 -0
  91. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +4 -1
  92. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +25 -1
  93. package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +21 -0
  94. package/lib/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.d.ts +10 -0
  95. package/lib/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.js +11 -0
  96. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +1 -0
  97. package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +1 -0
  98. package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +14 -0
  99. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.d.ts +16 -0
  100. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.js +61 -0
  101. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.d.ts +11 -0
  102. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.js +236 -0
  103. package/lib/src/brand-page-maker/composables/rich-text-editor/font.d.ts +2 -1
  104. package/lib/src/brand-page-maker/composables/rich-text-editor/font.js +25 -6
  105. package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.d.ts +17 -4
  106. package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +204 -17
  107. package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.d.ts +1 -1
  108. package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.js +29 -31
  109. package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.d.ts +20 -0
  110. package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.js +60 -0
  111. package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.d.ts +2 -1
  112. package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.js +22 -6
  113. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +10 -4
  114. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +319 -275
  115. package/lib/src/brand-page-maker/constants/config-settings-constant.js +1 -5
  116. package/lib/src/brand-page-maker/convertors/text-css-style-options.convertor.js +6 -2
  117. package/lib/src/brand-page-maker/convertors/text-size-value.convertor.d.ts +1 -1
  118. package/lib/src/brand-page-maker/convertors/text-size-value.convertor.js +3 -1
  119. package/lib/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.js +7 -14
  120. package/lib/src/brand-page-maker/default-getters/text-color.default-getter.js +6 -13
  121. package/lib/src/brand-page-maker/models/content-settings.d.ts +8 -0
  122. package/lib/src/brand-page-maker/models/content-settings.js +112 -81
  123. package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.d.ts +2 -2
  124. package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.js +5 -2
  125. package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.js +4 -3
  126. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1257 -117
  127. package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +9 -2
  128. package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +20 -0
  129. package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +21 -0
  130. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +6 -1
  131. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +17 -9
  132. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +59 -5
  133. package/lib/src/brand-page-maker/stores/history/history-store.js +22 -2
  134. package/lib/src/brand-page-maker/utils/apply-color-strategy.js +26 -8
  135. package/lib/src/brand-page-maker/utils/index.d.ts +2 -1
  136. package/lib/src/brand-page-maker/utils/index.js +2 -1
  137. package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +117 -15
  138. package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +435 -281
  139. package/lib/src/brand-page-maker/utils/rte-authoring.util.d.ts +4 -0
  140. package/lib/src/brand-page-maker/utils/rte-authoring.util.js +101 -0
  141. package/lib/src/brand-page-maker/utils/rte-clipboard.util.d.ts +126 -0
  142. package/lib/src/brand-page-maker/utils/rte-clipboard.util.js +307 -0
  143. package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +13 -3
  144. package/lib/src/{bundled-translations-zfiA5Tsw.js → bundled-translations-yGrvPE5i.js} +17 -17
  145. package/lib/src/{bundled-translations.de-DE-ChsdSyAP.js → bundled-translations.de-DE-L4Znf8Hs.js} +17 -17
  146. package/lib/src/{bundled-translations.es-ES-DflsWQK0.js → bundled-translations.es-ES-D6iticrK.js} +15 -15
  147. package/lib/src/{bundled-translations.fr-CA-fpDRuZ52.js → bundled-translations.fr-CA-BgAVE-9k.js} +25 -25
  148. package/lib/src/{bundled-translations.fr-FR-Bub73Zt-.js → bundled-translations.fr-FR-B8GbyqxQ.js} +17 -17
  149. package/lib/src/{bundled-translations.pt-BR-BlnWE9TB.js → bundled-translations.pt-BR-DjPU3Db7.js} +25 -25
  150. package/lib/src/{bundled-translations.pt-PT-DmzXlnaS.js → bundled-translations.pt-PT-BaepaDpr.js} +23 -23
  151. package/lib/src/bundles/bundled-translations.de-DE.json +21 -2
  152. package/lib/src/bundles/bundled-translations.es-ES.json +21 -2
  153. package/lib/src/bundles/bundled-translations.fr-CA.json +21 -2
  154. package/lib/src/bundles/bundled-translations.fr-FR.json +21 -2
  155. package/lib/src/bundles/bundled-translations.json +21 -2
  156. package/lib/src/bundles/bundled-translations.pt-BR.json +21 -2
  157. package/lib/src/bundles/bundled-translations.pt-PT.json +21 -2
  158. package/lib/src/clients/ai-assistant-client.d.ts +7 -1
  159. package/lib/src/clients/ai-assistant-client.js +7 -15
  160. package/lib/src/composables/useTranslate.d.ts +1 -1
  161. package/lib/src/composables/useTranslate.js +1 -1
  162. package/lib/src/css/library.brand-page-brandCrowd.min.css +284 -188
  163. package/lib/src/css/library.brand-page-brandPage.min.css +284 -188
  164. package/lib/src/css/library.brand-page-designCom.min.css +284 -188
  165. package/lib/src/css/library.brand-page-preview.min.css +284 -188
  166. package/lib/src/index.d.ts +2 -1
  167. package/lib/src/index.mjs +195 -191
  168. package/lib/src/{lib-7gtW85nE.js → lib-kGRlD3_P.js} +39082 -36131
  169. package/lib/src/lib.js +2 -1
  170. package/lib/src/metadata-builder/builders/footer-builder.js +4 -5
  171. package/lib/src/metadata-builder/builders/global-role-propagation.d.ts +58 -0
  172. package/lib/src/metadata-builder/builders/global-role-propagation.js +246 -0
  173. package/lib/src/metadata-builder/builders/global-styles-builder.d.ts +1 -0
  174. package/lib/src/metadata-builder/builders/global-styles-builder.js +116 -45
  175. package/lib/src/metadata-builder/builders/header-builder.js +13 -4
  176. package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +3 -3
  177. package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +3 -3
  178. package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.js +3 -3
  179. package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +4 -4
  180. package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +3 -3
  181. package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +2 -2
  182. package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +2 -2
  183. package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +4 -4
  184. package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +3 -3
  185. package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +8 -2
  186. package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +2 -2
  187. package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +60 -29
  188. package/lib/src/metadata-builder/builders/section-field-maps.js +1 -0
  189. package/lib/src/metadata-builder/builders/section-field-utils.d.ts +48 -19
  190. package/lib/src/metadata-builder/builders/section-field-utils.js +128 -52
  191. package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.d.ts +4 -2
  192. package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.js +28 -12
  193. package/lib/src/metadata-builder/builders/section-rules/social-links.rules.js +5 -1
  194. package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +1 -1
  195. package/lib/src/metadata-builder/helpers/rte.helpers.js +97 -40
  196. package/lib/src/metadata-builder/metadata-executor.js +23 -1
  197. package/lib/src/metadata-builder/models.d.ts +2 -0
  198. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +18 -19
  199. package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +18 -1
  200. package/lib/src/metadata-builder/sanitizers/rte-schema-check.js +1 -1
  201. package/lib/src/metadata-builder/sanitizers/sanitizer-rules.d.ts +0 -1
  202. package/lib/src/metadata-builder/sanitizers/sanitizer-rules.js +5 -8
  203. package/lib/src/metadata-builder/sanitizers/section-args-validator.d.ts +7 -16
  204. package/lib/src/metadata-builder/sanitizers/section-args-validator.js +95 -22
  205. package/lib/src/shared/color-palette/section-color-matches.js +9 -25
  206. package/lib/src/shared/color-strategies/color-strategies.d.ts +15 -0
  207. package/lib/src/shared/color-strategies/color-strategies.js +31 -0
  208. package/lib/src/shared/color-strategies/rte-color.d.ts +8 -0
  209. package/lib/src/shared/color-strategies/rte-color.js +16 -0
  210. package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +23 -0
  211. package/lib/src/shared/color-strategies/rte-field-pairs.js +28 -0
  212. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +9 -135
  213. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -27
  214. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +12 -2
  215. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +7 -0
  216. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +75 -6
  217. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +18 -7
  218. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +6 -1
  219. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +0 -7
  220. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +22 -0
  221. package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +8 -4
  222. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +1255 -26
  223. package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +203 -59
  224. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +6 -0
  225. package/lib/src/shared/content-settings/store/content-settings-store.js +105 -8
  226. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +26 -1
  227. package/lib/src/shared/navigation-style-settings/store/index.d.ts +7 -3
  228. package/lib/src/shared/navigation-style-settings/store/index.js +40 -15
  229. package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -0
  230. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +38 -5
  231. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +91 -13
  232. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +10 -2
  233. package/lib/src/shared/page-settings/store/page-settings-store.d.ts +2 -1
  234. package/lib/src/shared/page-settings/store/page-settings-store.js +17 -0
  235. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +32 -1
  236. package/lib/src/shared/rte-extensions/AutoLink.d.ts +17 -0
  237. package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/AutoLink.js +67 -51
  238. package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.js +4 -1
  239. package/lib/src/shared/rte-extensions/TextEffects.d.ts +28 -0
  240. package/lib/src/shared/rte-extensions/TextEffects.js +96 -0
  241. package/lib/src/shared/rte-extensions/ViewDomParser.d.ts +2 -0
  242. package/lib/src/shared/rte-extensions/ViewDomParser.js +21 -0
  243. package/lib/src/shared/rte-extensions.util.d.ts +25 -0
  244. package/lib/src/{brand-page-maker/composables/rich-text-editor/getRteExtensions.js → shared/rte-extensions.util.js} +62 -7
  245. package/lib/src/shared/rte-link.util.d.ts +1 -0
  246. package/lib/src/shared/rte-link.util.js +1 -0
  247. package/lib/src/shared/rte-render.util.d.ts +112 -0
  248. package/lib/src/shared/rte-render.util.js +255 -0
  249. package/lib/src/shared/rte-shape.util.d.ts +6 -0
  250. package/lib/src/shared/rte-shape.util.js +18 -0
  251. package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +23 -1
  252. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +1 -0
  253. package/lib/src/shared/side-bar/store/side-bar-store.d.ts +2 -0
  254. package/lib/src/shared/side-bar/store/side-bar-store.js +9 -0
  255. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +176 -15
  256. package/lib/src/shared/style-settings/components/StyleSettings.mixin.js +7 -1
  257. package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -9
  258. package/lib/src/shared/style-settings/store/style-settings-store.js +3 -33
  259. package/lib/src/shared/style-settings/text-style-size-order.d.ts +2 -0
  260. package/lib/src/shared/style-settings/text-style-size-order.js +13 -0
  261. package/lib/src/shared/text-role-typography.util.d.ts +64 -0
  262. package/lib/src/shared/text-role-typography.util.js +183 -0
  263. package/lib/src/utils/minify-brand-page-metadata.d.ts +16 -1
  264. package/lib/src/utils/minify-brand-page-metadata.js +31 -9
  265. package/package.json +1 -1
  266. package/src/brand-page/__fixtures__/migration-22-v21/edited-brandsite-sections.v21.json +982 -0
  267. package/src/brand-page/__fixtures__/migration-22-v21/new-brandcontact-every-section.v21.json +1231 -0
  268. package/src/brand-page/__fixtures__/migration-22-v21/new-brandpage-every-section.v21.json +1231 -0
  269. package/src/brand-page/__fixtures__/migration-22-v21/new-brandsite-every-section.v21.json +1243 -0
  270. package/src/brand-page/__fixtures__/migration-22-v21/real-brandcontact.v21.json +755 -0
  271. package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-general-link.v21.json +527 -0
  272. package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-links.v21.json +755 -0
  273. package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-social-links.v21.json +514 -0
  274. package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-about.v21.json +459 -0
  275. package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-footer.v21.json +469 -0
  276. package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-header-banner.v21.json +481 -0
  277. package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-sections.v21.json +800 -0
  278. package/src/brand-page/__fixtures__/production-text-style-resolver.fixture.ts +52 -0
  279. package/src/brand-page/components/about-section/AboutSection.vue.test.ts +0 -10
  280. package/src/brand-page/components/contact-form/ContactForm.mixin.test.ts +127 -0
  281. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +31 -14
  282. package/src/brand-page/components/contact-form/ContactForm.vue +26 -12
  283. package/src/brand-page/components/contact-form/ContactForm.vue.test.ts +60 -0
  284. package/src/brand-page/components/mailing-list/MailingList.mixin.test.ts +92 -0
  285. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +28 -3
  286. package/src/brand-page/components/mailing-list/MailingList.vue +9 -4
  287. package/src/brand-page/components/mailing-list/MailingList.vue.test.ts +63 -0
  288. package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.ts +51 -1
  289. package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.test.ts +114 -0
  290. package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.vue +8 -2
  291. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.test.ts +182 -0
  292. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +58 -12
  293. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +40 -3
  294. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +15 -7
  295. package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue.test.ts +133 -3
  296. package/src/brand-page/components/page/Page.mixin.ts +41 -34
  297. package/src/brand-page/components/page/Page.vue +17 -6
  298. package/src/brand-page/components/page/Page.vue.test.ts +91 -1
  299. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +32 -2
  300. package/src/brand-page/components/page-footer/PageFooter.test.ts +79 -0
  301. package/src/brand-page/components/page-footer/PageFooter.vue +12 -4
  302. package/src/brand-page/components/payment/Payment.mixin.ts +34 -2
  303. package/src/brand-page/components/payment/Payment.test.ts +188 -0
  304. package/src/brand-page/components/payment/Payment.vue +12 -5
  305. package/src/brand-page/components/payment/RequestPaymentStripe.vue +1 -0
  306. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +49 -2
  307. package/src/brand-page/components/payment/support-me/SupportMe.test.ts +100 -0
  308. package/src/brand-page/components/payment/support-me/SupportMe.vue +7 -1
  309. package/src/brand-page/components/payment/support-me/SupportMe.vue.test.ts +66 -0
  310. package/src/brand-page/components/save-contact/SaveContactWidget.test.ts +100 -0
  311. package/src/brand-page/components/save-contact/SaveContactWidget.vue +6 -3
  312. package/src/brand-page/components/shop/PaymentModal.vue +2 -6
  313. package/src/brand-page/components/shop/PaymentShippingAddress.vue +6 -0
  314. package/src/brand-page/components/shop/Shop.vue +15 -2
  315. package/src/brand-page/components/shop/Shop.vue.test.ts +74 -2
  316. package/src/brand-page/components/social-links/SocialLinks.stories.ts +0 -3
  317. package/src/brand-page/components/social-links/SocialLinks.vue.test.ts +0 -3
  318. package/src/brand-page/components/testimonial-section/__fixtures__/data.ts +0 -3
  319. package/src/brand-page/components/text/Text.stories.ts +0 -17
  320. package/src/brand-page/components/text-wrapper/TextWrapper.parity.test.ts +136 -0
  321. package/src/brand-page/components/text-wrapper/TextWrapper.test.ts +358 -0
  322. package/src/brand-page/components/text-wrapper/TextWrapper.vue +82 -22
  323. package/src/brand-page/constants/font.constants.ts +37 -0
  324. package/src/brand-page/models/brand-page-context.model.ts +13 -0
  325. package/src/brand-page/models/footer-icon-color.test.ts +22 -0
  326. package/src/brand-page/models/index.ts +50 -28
  327. package/src/brand-page/models/navigation-styles.model.test.ts +77 -1
  328. package/src/brand-page/models/navigation-styles.model.ts +26 -9
  329. package/src/brand-page/models/payment.model.ts +15 -6
  330. package/src/brand-page/models/styles.model.test.ts +104 -0
  331. package/src/brand-page/models/styles.model.ts +181 -47
  332. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +619 -115
  333. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +150 -9
  334. package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +300 -18
  335. package/src/brand-page/utils/color-palette.util.test.ts +126 -1
  336. package/src/brand-page/utils/color-palette.util.ts +92 -26
  337. package/src/brand-page/utils/color.util.test.ts +62 -29
  338. package/src/brand-page/utils/color.util.ts +77 -14
  339. package/src/brand-page/utils/container-text-color.util.test.ts +672 -26
  340. package/src/brand-page/utils/container-text-color.util.ts +472 -46
  341. package/src/brand-page/utils/index.ts +1 -0
  342. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/edited-brandsite-sections.v22.json +1191 -0
  343. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandcontact-every-section.v22.json +2026 -0
  344. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandpage-every-section.v22.json +2017 -0
  345. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandsite-every-section.v22.json +2031 -0
  346. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandcontact.v22.json +1145 -0
  347. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-general-link.v22.json +645 -0
  348. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-links.v22.json +1136 -0
  349. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-social-links.v22.json +662 -0
  350. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-about.v22.json +638 -0
  351. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-footer.v22.json +610 -0
  352. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-header-banner.v22.json +660 -0
  353. package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-sections.v22.json +1132 -0
  354. package/src/brand-page/utils/migration/migration-01.ts +293 -237
  355. package/src/brand-page/utils/migration/migration-02.ts +8 -1
  356. package/src/brand-page/utils/migration/migration-20.ts +6 -3
  357. package/src/brand-page/utils/migration/migration-20_5.test.ts +5 -2
  358. package/src/brand-page/utils/migration/migration-21.test.ts +34 -0
  359. package/src/brand-page/utils/migration/migration-21.ts +46 -10
  360. package/src/brand-page/utils/migration/migration-22.fixed-input.test.ts +43 -0
  361. package/src/brand-page/utils/migration/migration-22.test.ts +4103 -0
  362. package/src/brand-page/utils/migration/migration-22.text-font-family.test.ts +72 -0
  363. package/src/brand-page/utils/migration/migration-22.ts +1336 -0
  364. package/src/brand-page/utils/migration.util.test.ts +146 -32
  365. package/src/brand-page/utils/migration.util.ts +18 -0
  366. package/src/brand-page/utils/model.util.ts +4 -0
  367. package/src/brand-page/utils/personalisation.util.test.ts +148 -3
  368. package/src/brand-page/utils/personalisation.util.ts +9 -1
  369. package/src/brand-page/utils/rte-role-lift.util.ts +409 -0
  370. package/src/brand-page/utils/style.util.test.ts +35 -2
  371. package/src/brand-page/utils/style.util.ts +45 -11
  372. package/src/brand-page/utils/text-role-css.util.test.ts +525 -0
  373. package/src/brand-page/utils/text-role-css.util.ts +321 -0
  374. package/src/brand-page/utils/text-role-reconnect.util.test.ts +604 -0
  375. package/src/brand-page/utils/text-role-reconnect.util.ts +727 -0
  376. package/src/brand-page/utils/text-style.util.test.ts +305 -0
  377. package/src/brand-page/utils/text-style.util.ts +198 -24
  378. package/src/brand-page/utils/view-model.page-data.test.ts +232 -0
  379. package/src/brand-page/utils/view-model.util.test.ts +954 -133
  380. package/src/brand-page/utils/view-model.util.ts +187 -139
  381. package/src/brand-page/view-models.ts +4 -0
  382. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.blank-site.test.ts +57 -0
  383. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +9 -5
  384. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -10
  385. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +0 -1
  386. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -44
  387. package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +253 -200
  388. package/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.test.ts +82 -0
  389. package/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.ts +19 -0
  390. package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +2 -0
  391. package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +19 -0
  392. package/src/brand-page-maker/composables/rich-text-editor/block-typography.test.ts +519 -0
  393. package/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.test.ts +1 -1
  394. package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.test.ts +26 -1
  395. package/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.test.ts +110 -0
  396. package/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.ts +99 -0
  397. package/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.ts +397 -0
  398. package/src/brand-page-maker/composables/rich-text-editor/extensions/ViewDomParser.test.ts +139 -0
  399. package/src/brand-page-maker/composables/rich-text-editor/font.ts +36 -5
  400. package/src/brand-page-maker/composables/rich-text-editor/formatting.test.ts +375 -1
  401. package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +301 -17
  402. package/src/brand-page-maker/composables/rich-text-editor/hyperlink.test.ts +82 -1
  403. package/src/brand-page-maker/composables/rich-text-editor/hyperlink.ts +28 -34
  404. package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.test.ts +80 -0
  405. package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.ts +75 -0
  406. package/src/brand-page-maker/composables/rich-text-editor/spacing.ts +31 -6
  407. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.test.ts +2485 -0
  408. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +435 -337
  409. package/src/brand-page-maker/constants/config-settings-constant.ts +0 -6
  410. package/src/brand-page-maker/convertors/text-css-style-options.convertor.test.ts +43 -0
  411. package/src/brand-page-maker/convertors/text-css-style-options.convertor.ts +6 -2
  412. package/src/brand-page-maker/convertors/text-size-value.convertor.test.ts +24 -0
  413. package/src/brand-page-maker/convertors/text-size-value.convertor.ts +17 -13
  414. package/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.ts +7 -22
  415. package/src/brand-page-maker/default-getters/text-color.default-getter.ts +5 -21
  416. package/src/brand-page-maker/models/content-settings.test.ts +708 -0
  417. package/src/brand-page-maker/models/content-settings.ts +133 -82
  418. package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.test.ts +63 -1
  419. package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.ts +16 -3
  420. package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.test.ts +34 -0
  421. package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +4 -2
  422. package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +30 -0
  423. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +185 -1
  424. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +22 -34
  425. package/src/brand-page-maker/stores/history/history-store.ts +35 -2
  426. package/src/brand-page-maker/utils/__snapshots__/apply-color-strategy.golden.test.ts.snap +528 -0
  427. package/src/brand-page-maker/utils/__snapshots__/rte-render-parity.test.ts.snap +12 -0
  428. package/src/brand-page-maker/utils/apply-color-strategy.golden.test.ts +2 -0
  429. package/src/brand-page-maker/utils/apply-color-strategy.test.ts +181 -3
  430. package/src/brand-page-maker/utils/apply-color-strategy.ts +36 -4
  431. package/src/brand-page-maker/utils/index.ts +2 -1
  432. package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +447 -410
  433. package/src/brand-page-maker/utils/rich-text-editor.util.ts +610 -506
  434. package/src/brand-page-maker/utils/rte-authoring.util.test.ts +244 -0
  435. package/src/brand-page-maker/utils/rte-authoring.util.ts +175 -0
  436. package/src/brand-page-maker/utils/rte-clipboard.util.test.ts +558 -0
  437. package/src/brand-page-maker/utils/rte-clipboard.util.ts +473 -0
  438. package/src/brand-page-maker/utils/rte-features.test.ts +99 -3
  439. package/src/brand-page-maker/utils/rte-render-parity.test.ts +1 -1
  440. package/src/brand-page-maker/utils/rte-render.util.test.ts +230 -0
  441. package/src/brand-page-maker/utils/rte-sanitize-json.test.ts +1 -1
  442. package/src/brand-page-maker/utils/rte-sanitize.util.ts +14 -3
  443. package/src/brand-page-maker/utils/rte-schema-version.test.ts +102 -0
  444. package/src/bundles/bundled-translations.de-DE.json +21 -2
  445. package/src/bundles/bundled-translations.es-ES.json +21 -2
  446. package/src/bundles/bundled-translations.fr-CA.json +21 -2
  447. package/src/bundles/bundled-translations.fr-FR.json +21 -2
  448. package/src/bundles/bundled-translations.json +21 -2
  449. package/src/bundles/bundled-translations.pt-BR.json +21 -2
  450. package/src/bundles/bundled-translations.pt-PT.json +21 -2
  451. package/src/clients/ai-assistant-client.ts +13 -18
  452. package/src/composables/useTranslate.ts +2 -1
  453. package/src/lib.ts +2 -2
  454. package/src/metadata-builder/builders/footer-builder.test.ts +70 -45
  455. package/src/metadata-builder/builders/footer-builder.ts +4 -8
  456. package/src/metadata-builder/builders/global-role-propagation.test.ts +907 -0
  457. package/src/metadata-builder/builders/global-role-propagation.ts +430 -0
  458. package/src/metadata-builder/builders/global-styles-builder.test.ts +1020 -0
  459. package/src/metadata-builder/builders/global-styles-builder.ts +194 -48
  460. package/src/metadata-builder/builders/header-builder.test.ts +112 -40
  461. package/src/metadata-builder/builders/header-builder.ts +18 -8
  462. package/src/metadata-builder/builders/section-builders/about-section-builder.ts +5 -3
  463. package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +5 -3
  464. package/src/metadata-builder/builders/section-builders/booking-section-builder.ts +5 -3
  465. package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +7 -4
  466. package/src/metadata-builder/builders/section-builders/images-section-builder.ts +5 -3
  467. package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +3 -2
  468. package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +3 -2
  469. package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +7 -7
  470. package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +5 -3
  471. package/src/metadata-builder/builders/section-builders/social-links-builder.test.ts +2 -2
  472. package/src/metadata-builder/builders/section-builders/social-links-builder.ts +21 -10
  473. package/src/metadata-builder/builders/section-builders/support-me-builder.test.ts +10 -0
  474. package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +3 -2
  475. package/src/metadata-builder/builders/section-builders/text-section-builder.ts +111 -61
  476. package/src/metadata-builder/builders/section-field-maps.ts +1 -0
  477. package/src/metadata-builder/builders/section-field-utils.test.ts +545 -2
  478. package/src/metadata-builder/builders/section-field-utils.ts +202 -69
  479. package/src/metadata-builder/builders/section-rules/global-styles.rules.ts +38 -13
  480. package/src/metadata-builder/builders/section-rules/social-links.rules.ts +5 -0
  481. package/src/metadata-builder/helpers/rte.helpers.test.ts +101 -0
  482. package/src/metadata-builder/helpers/rte.helpers.ts +129 -43
  483. package/src/metadata-builder/metadata-executor.test.ts +167 -0
  484. package/src/metadata-builder/metadata-executor.ts +34 -1
  485. package/src/metadata-builder/models.ts +2 -0
  486. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +23 -7
  487. package/src/metadata-builder/parsers/section-tool-arguments.ts +21 -1
  488. package/src/metadata-builder/sanitizers/__tests__/section-args-validator.test.ts +215 -0
  489. package/src/metadata-builder/sanitizers/rte-schema-check.ts +1 -1
  490. package/src/metadata-builder/sanitizers/sanitizer-rules.ts +4 -8
  491. package/src/metadata-builder/sanitizers/section-args-validator.ts +136 -53
  492. package/src/shared/color-palette/section-color-matches.test.ts +15 -11
  493. package/src/shared/color-palette/section-color-matches.ts +9 -28
  494. package/src/shared/color-strategies/color-strategies.ts +35 -0
  495. package/src/shared/color-strategies/rte-color.test.ts +1 -1
  496. package/src/shared/color-strategies/rte-color.ts +19 -0
  497. package/src/shared/color-strategies/rte-field-pairs.test.ts +26 -5
  498. package/src/shared/color-strategies/rte-field-pairs.ts +33 -0
  499. package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.test.ts +43 -66
  500. package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.vue +7 -1
  501. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -48
  502. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +33 -7
  503. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.test.ts +128 -1
  504. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +0 -6
  505. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.test.ts +56 -3
  506. package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +11 -4
  507. package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.test.ts +335 -25
  508. package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +248 -70
  509. package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +113 -25
  510. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.de-DE.json +17 -10
  511. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.es-ES.json +17 -10
  512. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-CA.json +17 -10
  513. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-FR.json +17 -10
  514. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.json +8 -1
  515. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-BR.json +17 -10
  516. package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-PT.json +17 -10
  517. package/src/shared/content-settings/components/text-style-role-dropdown/TextStyleRoleDropdown.test.ts +141 -0
  518. package/src/shared/content-settings/components/text-style-role-dropdown/TextStyleRoleDropdown.vue +136 -0
  519. package/src/shared/content-settings/store/content-settings-store.test.ts +491 -6
  520. package/src/shared/content-settings/store/content-settings-store.ts +159 -17
  521. package/src/shared/navigation-style-settings/store/index.test.ts +295 -0
  522. package/src/shared/navigation-style-settings/store/index.ts +65 -15
  523. package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.test.ts +44 -4
  524. package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.vue +13 -4
  525. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.navigation.test.ts +89 -0
  526. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.text-style.test.ts +91 -0
  527. package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +14 -2
  528. package/src/shared/page-settings/store/page-settings-store.text-style.test.ts +84 -0
  529. package/src/shared/page-settings/store/page-settings-store.ts +30 -1
  530. package/src/shared/rte-extensions/AutoLink.test.ts +98 -0
  531. package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/AutoLink.ts +87 -58
  532. package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.ts +4 -1
  533. package/src/shared/rte-extensions/TextEffects.ts +151 -0
  534. package/src/shared/rte-extensions/ViewDomParser.ts +27 -0
  535. package/src/{brand-page-maker/composables/rich-text-editor/getRteExtensions.ts → shared/rte-extensions.util.ts} +66 -9
  536. package/src/shared/rte-link.util.ts +2 -0
  537. package/src/shared/rte-render.util.ts +385 -0
  538. package/src/shared/rte-shape.util.ts +29 -0
  539. package/src/shared/side-bar/store/side-bar-store.test.ts +27 -1
  540. package/src/shared/side-bar/store/side-bar-store.ts +11 -0
  541. package/src/shared/style-settings/components/StyleSettings.mixin.ts +7 -3
  542. package/src/shared/style-settings/components/StyleSettings.test.ts +116 -0
  543. package/src/shared/style-settings/components/StyleSettings.vue +74 -25
  544. package/src/shared/style-settings/components/i18n/style-settings.de-DE.json +32 -20
  545. package/src/shared/style-settings/components/i18n/style-settings.es-ES.json +32 -20
  546. package/src/shared/style-settings/components/i18n/style-settings.fr-CA.json +32 -20
  547. package/src/shared/style-settings/components/i18n/style-settings.fr-FR.json +32 -20
  548. package/src/shared/style-settings/components/i18n/style-settings.json +13 -3
  549. package/src/shared/style-settings/components/i18n/style-settings.pt-BR.json +32 -20
  550. package/src/shared/style-settings/components/i18n/style-settings.pt-PT.json +32 -20
  551. package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +14 -34
  552. package/src/shared/style-settings/store/style-settings-store.ts +3 -49
  553. package/src/shared/style-settings/text-style-size-order.test.ts +76 -0
  554. package/src/shared/style-settings/text-style-size-order.ts +28 -0
  555. package/src/shared/text-role-typography.util.ts +277 -0
  556. package/src/utils/minify-brand-page-metadata.test.ts +102 -7
  557. package/src/utils/minify-brand-page-metadata.ts +62 -8
  558. package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.d.ts +0 -2
  559. package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.d.ts +0 -28
  560. package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +0 -63
  561. package/lib/src/brand-page-maker/utils/rte-render.util.js +0 -106
  562. package/lib/src/brand-page-maker/utils/rte-shape.d.ts +0 -18
  563. package/lib/src/brand-page-maker/utils/rte-shape.js +0 -21
  564. package/lib/src/metadata-builder/builders/global-font-propagation.d.ts +0 -41
  565. package/lib/src/metadata-builder/builders/global-font-propagation.js +0 -146
  566. package/src/brand-page/models/brand-page-context.model.test.ts +0 -38
  567. package/src/brand-page-maker/utils/rte-render.util.ts +0 -179
  568. package/src/brand-page-maker/utils/rte-shape.ts +0 -29
  569. package/src/clients/ai-assistant-client.test.ts +0 -135
  570. package/src/metadata-builder/builders/global-font-propagation.test.ts +0 -401
  571. package/src/metadata-builder/builders/global-font-propagation.ts +0 -238
  572. package/src/shared/style-settings/components/StyleSettingsSection.vue +0 -8
  573. /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.d.ts +0 -0
  574. /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.js +0 -0
  575. /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.d.ts +0 -0
  576. /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.js +0 -0
  577. /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.d.ts +0 -0
  578. /package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.ts +0 -0
  579. /package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.ts +0 -0
@@ -21,6 +21,7 @@ import type {
21
21
  TestimonialSectionContent,
22
22
  TextContent,
23
23
  TextItem,
24
+ TextStyleDeclaration,
24
25
  } from '../../';
25
26
  import {
26
27
  DEFAULT_LETTER_SPACING,
@@ -70,6 +71,41 @@ import {
70
71
  } from '@brand-page/utils';
71
72
  import { createInitialLogoContent } from '@brand-page-maker/models';
72
73
 
74
+ // ADR-0020 retired `color` from roles and slimmed RTE-paired style fields to `RteTextRole`.
75
+ // This immutable migration manipulates those fields as full CSS style objects on legacy
76
+ // metadata (correct for the data it runs on). Restore that shape locally so it keeps
77
+ // compiling and behaves byte-identically — typing-only (see the migration immutability rules).
78
+ type FullStyle = TextStyleDeclaration;
79
+
80
+ type LegacyStyled<T> = Omit<
81
+ T,
82
+ | 'textStyle'
83
+ | 'titleStyle'
84
+ | 'descriptionStyle'
85
+ | 'nameStyle'
86
+ | 'paragraphStyle'
87
+ | 'positionStyle'
88
+ | 'testimonialStyle'
89
+ | 'headingStyle'
90
+ | 'successMessageStyle'
91
+ | 'itemTextStyle'
92
+ | 'buttonTextStyle'
93
+ | 'textItems'
94
+ > & {
95
+ textStyle: FullStyle;
96
+ titleStyle: FullStyle;
97
+ descriptionStyle: FullStyle;
98
+ nameStyle: FullStyle;
99
+ paragraphStyle: FullStyle;
100
+ positionStyle: FullStyle;
101
+ testimonialStyle: FullStyle;
102
+ headingStyle: FullStyle;
103
+ successMessageStyle: FullStyle;
104
+ itemTextStyle: FullStyle;
105
+ buttonTextStyle: FullStyle;
106
+ textItems?: (Omit<TextItem, 'textStyle'> & { textStyle: FullStyle })[];
107
+ };
108
+
73
109
  export const applyTextContentTextToTextItemsMigration = (
74
110
  brandPageModel: BrandPageModel,
75
111
  ): void => {
@@ -77,7 +113,7 @@ export const applyTextContentTextToTextItemsMigration = (
77
113
  return [...acc, ...(cur.contents.filter(isTextContent) as TextContent[])];
78
114
  }, [] as TextContent[]);
79
115
 
80
- textContents.forEach((item) => {
116
+ (textContents as unknown as LegacyStyled<TextContent>[]).forEach((item) => {
81
117
  if (brandPageModel.brandPageType === BRAND_PAGE_TYPES.brandSite) {
82
118
  if (!item.textItems) {
83
119
  item.textItems = [];
@@ -160,38 +196,40 @@ export const migrateProfileContentToHaveTextStyles = (
160
196
  ];
161
197
  }, [] as ProfileContent[]);
162
198
 
163
- profileContents.forEach((p) => {
164
- p.titleStyle = {
165
- ...p.titleStyle,
166
- textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
167
- fontFamily:
168
- p.titleStyle?.fontFamily ||
169
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
170
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
171
- ? LINE_HEIGHT_BODY
172
- : p.titleStyle?.lineHeight || LINE_HEIGHT_BODY,
173
- };
174
- p.nameStyle = {
175
- ...p.nameStyle,
176
- textAlign: p.nameStyle?.textAlign || DEFAULT_TEXT_ALIGN,
177
- fontFamily:
178
- p.nameStyle?.fontFamily ||
179
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
180
- lineHeight: p.nameStyle?.lineHeight?.includes('rem')
181
- ? LINE_HEIGHT_HEADINGS
182
- : p.nameStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
183
- };
184
- p.descriptionStyle = {
185
- ...p.descriptionStyle,
186
- textAlign: p.descriptionStyle?.textAlign || DEFAULT_TEXT_ALIGN,
187
- fontFamily:
188
- p.descriptionStyle?.fontFamily ||
189
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
190
- lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
191
- ? LINE_HEIGHT_BODY
192
- : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
193
- };
194
- });
199
+ (profileContents as unknown as LegacyStyled<ProfileContent>[]).forEach(
200
+ (p) => {
201
+ p.titleStyle = {
202
+ ...p.titleStyle,
203
+ textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
204
+ fontFamily:
205
+ p.titleStyle?.fontFamily ||
206
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
207
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
208
+ ? LINE_HEIGHT_BODY
209
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_BODY,
210
+ };
211
+ p.nameStyle = {
212
+ ...p.nameStyle,
213
+ textAlign: p.nameStyle?.textAlign || DEFAULT_TEXT_ALIGN,
214
+ fontFamily:
215
+ p.nameStyle?.fontFamily ||
216
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
217
+ lineHeight: p.nameStyle?.lineHeight?.includes('rem')
218
+ ? LINE_HEIGHT_HEADINGS
219
+ : p.nameStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
220
+ };
221
+ p.descriptionStyle = {
222
+ ...p.descriptionStyle,
223
+ textAlign: p.descriptionStyle?.textAlign || DEFAULT_TEXT_ALIGN,
224
+ fontFamily:
225
+ p.descriptionStyle?.fontFamily ||
226
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
227
+ lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
228
+ ? LINE_HEIGHT_BODY
229
+ : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
230
+ };
231
+ },
232
+ );
195
233
  };
196
234
 
197
235
  export const migrateMailingListContentToHaveTextStyles = (
@@ -204,7 +242,9 @@ export const migrateMailingListContentToHaveTextStyles = (
204
242
  ];
205
243
  }, [] as MailingListContent[]);
206
244
 
207
- mailingListContents.forEach((p) => {
245
+ (
246
+ mailingListContents as unknown as LegacyStyled<MailingListContent>[]
247
+ ).forEach((p) => {
208
248
  p.titleStyle = {
209
249
  ...p.titleStyle,
210
250
  textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
@@ -238,58 +278,60 @@ export const migrateSupportMeContentToHaveTextStyles = (
238
278
  ];
239
279
  }, [] as SupportMeContent[]);
240
280
 
241
- supportMeContents.forEach((p) => {
242
- p.titleStyle = {
243
- ...p.titleStyle,
244
- textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
245
- fontFamily:
246
- p.titleStyle?.fontFamily ||
247
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
248
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
249
- ? LINE_HEIGHT_HEADINGS
250
- : p.titleStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
251
- };
252
- p.headingStyle = {
253
- ...p.headingStyle,
254
- textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
255
- fontFamily:
256
- p.headingStyle?.fontFamily ||
257
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
258
- lineHeight: p.headingStyle?.lineHeight?.includes('rem')
259
- ? LINE_HEIGHT_BODY
260
- : p.headingStyle?.lineHeight || LINE_HEIGHT_BODY,
261
- };
262
- p.descriptionStyle = {
263
- ...p.descriptionStyle,
264
- textAlign: p.descriptionStyle?.textAlign || DEFAULT_TEXT_ALIGN,
265
- fontFamily:
266
- p.descriptionStyle?.fontFamily ||
267
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
268
- lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
269
- ? LINE_HEIGHT_BODY
270
- : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
271
- };
272
- p.buttonTextStyle = {
273
- ...p.buttonTextStyle,
274
- textAlign: p.buttonTextStyle?.textAlign || DEFAULT_TEXT_ALIGN,
275
- fontFamily:
276
- p.buttonTextStyle?.fontFamily ||
277
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
278
- lineHeight: p.buttonTextStyle?.lineHeight?.includes('rem')
279
- ? LINE_HEIGHT_BODY
280
- : p.buttonTextStyle?.lineHeight || LINE_HEIGHT_BODY,
281
- };
282
- p.itemTextStyle = {
283
- ...p.itemTextStyle,
284
- textAlign: p.itemTextStyle?.textAlign || DEFAULT_TEXT_ALIGN,
285
- fontFamily:
286
- p.itemTextStyle?.fontFamily ||
287
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
288
- lineHeight: p.itemTextStyle?.lineHeight?.includes('rem')
289
- ? LINE_HEIGHT_BODY
290
- : p.itemTextStyle?.lineHeight || LINE_HEIGHT_BODY,
291
- };
292
- });
281
+ (supportMeContents as unknown as LegacyStyled<SupportMeContent>[]).forEach(
282
+ (p) => {
283
+ p.titleStyle = {
284
+ ...p.titleStyle,
285
+ textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
286
+ fontFamily:
287
+ p.titleStyle?.fontFamily ||
288
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
289
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
290
+ ? LINE_HEIGHT_HEADINGS
291
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
292
+ };
293
+ p.headingStyle = {
294
+ ...p.headingStyle,
295
+ textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
296
+ fontFamily:
297
+ p.headingStyle?.fontFamily ||
298
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
299
+ lineHeight: p.headingStyle?.lineHeight?.includes('rem')
300
+ ? LINE_HEIGHT_BODY
301
+ : p.headingStyle?.lineHeight || LINE_HEIGHT_BODY,
302
+ };
303
+ p.descriptionStyle = {
304
+ ...p.descriptionStyle,
305
+ textAlign: p.descriptionStyle?.textAlign || DEFAULT_TEXT_ALIGN,
306
+ fontFamily:
307
+ p.descriptionStyle?.fontFamily ||
308
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
309
+ lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
310
+ ? LINE_HEIGHT_BODY
311
+ : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
312
+ };
313
+ p.buttonTextStyle = {
314
+ ...p.buttonTextStyle,
315
+ textAlign: p.buttonTextStyle?.textAlign || DEFAULT_TEXT_ALIGN,
316
+ fontFamily:
317
+ p.buttonTextStyle?.fontFamily ||
318
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
319
+ lineHeight: p.buttonTextStyle?.lineHeight?.includes('rem')
320
+ ? LINE_HEIGHT_BODY
321
+ : p.buttonTextStyle?.lineHeight || LINE_HEIGHT_BODY,
322
+ };
323
+ p.itemTextStyle = {
324
+ ...p.itemTextStyle,
325
+ textAlign: p.itemTextStyle?.textAlign || DEFAULT_TEXT_ALIGN,
326
+ fontFamily:
327
+ p.itemTextStyle?.fontFamily ||
328
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
329
+ lineHeight: p.itemTextStyle?.lineHeight?.includes('rem')
330
+ ? LINE_HEIGHT_BODY
331
+ : p.itemTextStyle?.lineHeight || LINE_HEIGHT_BODY,
332
+ };
333
+ },
334
+ );
293
335
  };
294
336
 
295
337
  export const migrateButtonContentToHaveTextStyles = (
@@ -302,18 +344,20 @@ export const migrateButtonContentToHaveTextStyles = (
302
344
  ];
303
345
  }, [] as ButtonWithModalContent[]);
304
346
 
305
- buttonContents.forEach((p) => {
306
- p.titleStyle = {
307
- ...p.titleStyle,
308
- textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
309
- fontFamily:
310
- p.titleStyle?.fontFamily ||
311
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
312
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
313
- ? LINE_HEIGHT_BODY
314
- : p.titleStyle?.lineHeight || LINE_HEIGHT_BODY,
315
- };
316
- });
347
+ (buttonContents as unknown as LegacyStyled<ButtonWithModalContent>[]).forEach(
348
+ (p) => {
349
+ p.titleStyle = {
350
+ ...p.titleStyle,
351
+ textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
352
+ fontFamily:
353
+ p.titleStyle?.fontFamily ||
354
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
355
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
356
+ ? LINE_HEIGHT_BODY
357
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_BODY,
358
+ };
359
+ },
360
+ );
317
361
  };
318
362
 
319
363
  export const migrateBannerContentToHaveTextStyles = (
@@ -326,55 +370,57 @@ export const migrateBannerContentToHaveTextStyles = (
326
370
  ];
327
371
  }, [] as BannerSectionContent[]);
328
372
 
329
- bannerContents.forEach((p) => {
330
- let textAlign = 'left';
373
+ (bannerContents as unknown as LegacyStyled<BannerSectionContent>[]).forEach(
374
+ (p) => {
375
+ let textAlign = 'left';
331
376
 
332
- if (
333
- p.displayStyle === ALIGN_CARD_CENTER_IMAGE ||
334
- p.displayStyle === BIG_IMAGE ||
335
- p.displayStyle === ALIGN_CENTERED
336
- ) {
337
- textAlign = DEFAULT_TEXT_ALIGN;
338
- }
377
+ if (
378
+ p.displayStyle === ALIGN_CARD_CENTER_IMAGE ||
379
+ p.displayStyle === BIG_IMAGE ||
380
+ p.displayStyle === ALIGN_CENTERED
381
+ ) {
382
+ textAlign = DEFAULT_TEXT_ALIGN;
383
+ }
339
384
 
340
- p.titleStyle = {
341
- ...p.titleStyle,
342
- textAlign: p.titleStyle?.textAlign || textAlign,
343
- fontFamily:
344
- p.titleStyle?.fontFamily ||
345
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
346
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
347
- ? LINE_HEIGHT_TITLE
348
- : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
349
- };
350
- p.descriptionStyle = {
351
- ...p.descriptionStyle,
352
- textAlign:
353
- p.descriptionStyle && p.descriptionStyle.textAlign
354
- ? p.descriptionStyle.textAlign
355
- : p.titleStyle?.textAlign,
356
- fontFamily:
357
- p.descriptionStyle?.fontFamily ||
358
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
359
- lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
360
- ? LINE_HEIGHT_BODY
361
- : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
362
- };
385
+ p.titleStyle = {
386
+ ...p.titleStyle,
387
+ textAlign: p.titleStyle?.textAlign || textAlign,
388
+ fontFamily:
389
+ p.titleStyle?.fontFamily ||
390
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
391
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
392
+ ? LINE_HEIGHT_TITLE
393
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
394
+ };
395
+ p.descriptionStyle = {
396
+ ...p.descriptionStyle,
397
+ textAlign:
398
+ p.descriptionStyle && p.descriptionStyle.textAlign
399
+ ? p.descriptionStyle.textAlign
400
+ : p.titleStyle?.textAlign,
401
+ fontFamily:
402
+ p.descriptionStyle?.fontFamily ||
403
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
404
+ lineHeight: p.descriptionStyle?.lineHeight?.includes('rem')
405
+ ? LINE_HEIGHT_BODY
406
+ : p.descriptionStyle?.lineHeight || LINE_HEIGHT_BODY,
407
+ };
363
408
 
364
- p.buttonTextStyle = {
365
- ...p.buttonTextStyle,
366
- textAlign:
367
- p.buttonTextStyle && p.buttonTextStyle.textAlign
368
- ? p.buttonTextStyle.textAlign
369
- : p.titleStyle?.textAlign,
370
- fontFamily:
371
- p.buttonTextStyle?.fontFamily ||
372
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
373
- lineHeight: p.buttonTextStyle?.lineHeight?.includes('rem')
374
- ? LINE_HEIGHT_BODY
375
- : p.buttonTextStyle?.lineHeight || LINE_HEIGHT_BODY,
376
- };
377
- });
409
+ p.buttonTextStyle = {
410
+ ...p.buttonTextStyle,
411
+ textAlign:
412
+ p.buttonTextStyle && p.buttonTextStyle.textAlign
413
+ ? p.buttonTextStyle.textAlign
414
+ : p.titleStyle?.textAlign,
415
+ fontFamily:
416
+ p.buttonTextStyle?.fontFamily ||
417
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
418
+ lineHeight: p.buttonTextStyle?.lineHeight?.includes('rem')
419
+ ? LINE_HEIGHT_BODY
420
+ : p.buttonTextStyle?.lineHeight || LINE_HEIGHT_BODY,
421
+ };
422
+ },
423
+ );
378
424
  };
379
425
 
380
426
  export const migrateBannerContentToRawImageUrl = (
@@ -426,34 +472,36 @@ export const migrateAboutContentToHaveTextStyles = (
426
472
  ];
427
473
  }, [] as AboutSectionContent[]);
428
474
 
429
- aboutContents.forEach((p) => {
430
- let textAlign = 'left';
475
+ (aboutContents as unknown as LegacyStyled<AboutSectionContent>[]).forEach(
476
+ (p) => {
477
+ let textAlign = 'left';
431
478
 
432
- if (p.displayStyle === ALIGN_CENTERED) {
433
- textAlign = DEFAULT_TEXT_ALIGN;
434
- }
479
+ if (p.displayStyle === ALIGN_CENTERED) {
480
+ textAlign = DEFAULT_TEXT_ALIGN;
481
+ }
435
482
 
436
- p.titleStyle = {
437
- ...p.titleStyle,
438
- textAlign: p.titleStyle?.textAlign || textAlign,
439
- fontFamily:
440
- p.titleStyle?.fontFamily ||
441
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
442
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
443
- ? LINE_HEIGHT_TITLE
444
- : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
445
- };
446
- p.paragraphStyle = {
447
- ...p.paragraphStyle,
448
- textAlign: p.paragraphStyle?.textAlign || textAlign,
449
- fontFamily:
450
- p.paragraphStyle?.fontFamily ||
451
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
452
- lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
453
- ? LINE_HEIGHT_BODY
454
- : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
455
- };
456
- });
483
+ p.titleStyle = {
484
+ ...p.titleStyle,
485
+ textAlign: p.titleStyle?.textAlign || textAlign,
486
+ fontFamily:
487
+ p.titleStyle?.fontFamily ||
488
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
489
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
490
+ ? LINE_HEIGHT_TITLE
491
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
492
+ };
493
+ p.paragraphStyle = {
494
+ ...p.paragraphStyle,
495
+ textAlign: p.paragraphStyle?.textAlign || textAlign,
496
+ fontFamily:
497
+ p.paragraphStyle?.fontFamily ||
498
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
499
+ lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
500
+ ? LINE_HEIGHT_BODY
501
+ : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
502
+ };
503
+ },
504
+ );
457
505
  };
458
506
 
459
507
  export const migrateTestimonialContentToHaveTextStyles = (
@@ -468,7 +516,9 @@ export const migrateTestimonialContentToHaveTextStyles = (
468
516
  ];
469
517
  }, [] as TestimonialSectionContent[]);
470
518
 
471
- testimonialContents.forEach((p) => {
519
+ (
520
+ testimonialContents as unknown as LegacyStyled<TestimonialSectionContent>[]
521
+ ).forEach((p) => {
472
522
  let textAlign = DEFAULT_TEXT_ALIGN;
473
523
 
474
524
  if (p.displayStyle === BIG_IMAGE) {
@@ -528,38 +578,40 @@ export const migrateShapesContentToHaveTextStyles = (
528
578
  ];
529
579
  }, [] as ShapesSectionContent[]);
530
580
 
531
- shapesContents.forEach((p) => {
532
- p.titleStyle = {
533
- ...p.titleStyle,
534
- textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
535
- fontFamily:
536
- p.titleStyle?.fontFamily ||
537
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
538
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
539
- ? LINE_HEIGHT_TITLE
540
- : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
541
- };
542
- p.headingStyle = {
543
- ...p.headingStyle,
544
- textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
545
- fontFamily:
546
- p.headingStyle?.fontFamily ||
547
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
548
- lineHeight: p.headingStyle?.lineHeight?.includes('rem')
549
- ? LINE_HEIGHT_HEADINGS
550
- : p.headingStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
551
- };
552
- p.paragraphStyle = {
553
- ...p.paragraphStyle,
554
- textAlign: p.paragraphStyle?.textAlign || DEFAULT_TEXT_ALIGN,
555
- fontFamily:
556
- p.paragraphStyle?.fontFamily ||
557
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
558
- lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
559
- ? LINE_HEIGHT_BODY
560
- : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
561
- };
562
- });
581
+ (shapesContents as unknown as LegacyStyled<ShapesSectionContent>[]).forEach(
582
+ (p) => {
583
+ p.titleStyle = {
584
+ ...p.titleStyle,
585
+ textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
586
+ fontFamily:
587
+ p.titleStyle?.fontFamily ||
588
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
589
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
590
+ ? LINE_HEIGHT_TITLE
591
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
592
+ };
593
+ p.headingStyle = {
594
+ ...p.headingStyle,
595
+ textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
596
+ fontFamily:
597
+ p.headingStyle?.fontFamily ||
598
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
599
+ lineHeight: p.headingStyle?.lineHeight?.includes('rem')
600
+ ? LINE_HEIGHT_HEADINGS
601
+ : p.headingStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
602
+ };
603
+ p.paragraphStyle = {
604
+ ...p.paragraphStyle,
605
+ textAlign: p.paragraphStyle?.textAlign || DEFAULT_TEXT_ALIGN,
606
+ fontFamily:
607
+ p.paragraphStyle?.fontFamily ||
608
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
609
+ lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
610
+ ? LINE_HEIGHT_BODY
611
+ : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
612
+ };
613
+ },
614
+ );
563
615
  };
564
616
 
565
617
  export const migrateImagesContentToHaveTextStyles = (
@@ -572,38 +624,40 @@ export const migrateImagesContentToHaveTextStyles = (
572
624
  ];
573
625
  }, [] as ImagesSectionContent[]);
574
626
 
575
- imagesContents.forEach((p) => {
576
- p.titleStyle = {
577
- ...p.titleStyle,
578
- textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
579
- fontFamily:
580
- p.titleStyle?.fontFamily ||
581
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
582
- lineHeight: p.titleStyle?.lineHeight?.includes('rem')
583
- ? LINE_HEIGHT_TITLE
584
- : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
585
- };
586
- p.headingStyle = {
587
- ...p.headingStyle,
588
- textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
589
- fontFamily:
590
- p.headingStyle?.fontFamily ||
591
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
592
- lineHeight: p.headingStyle?.lineHeight?.includes('rem')
593
- ? LINE_HEIGHT_HEADINGS
594
- : p.headingStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
595
- };
596
- p.paragraphStyle = {
597
- ...p.paragraphStyle,
598
- textAlign: p.paragraphStyle?.textAlign || DEFAULT_TEXT_ALIGN,
599
- fontFamily:
600
- p.paragraphStyle?.fontFamily ||
601
- FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
602
- lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
603
- ? LINE_HEIGHT_BODY
604
- : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
605
- };
606
- });
627
+ (imagesContents as unknown as LegacyStyled<ImagesSectionContent>[]).forEach(
628
+ (p) => {
629
+ p.titleStyle = {
630
+ ...p.titleStyle,
631
+ textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
632
+ fontFamily:
633
+ p.titleStyle?.fontFamily ||
634
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
635
+ lineHeight: p.titleStyle?.lineHeight?.includes('rem')
636
+ ? LINE_HEIGHT_TITLE
637
+ : p.titleStyle?.lineHeight || LINE_HEIGHT_TITLE,
638
+ };
639
+ p.headingStyle = {
640
+ ...p.headingStyle,
641
+ textAlign: p.headingStyle?.textAlign || DEFAULT_TEXT_ALIGN,
642
+ fontFamily:
643
+ p.headingStyle?.fontFamily ||
644
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
645
+ lineHeight: p.headingStyle?.lineHeight?.includes('rem')
646
+ ? LINE_HEIGHT_HEADINGS
647
+ : p.headingStyle?.lineHeight || LINE_HEIGHT_HEADINGS,
648
+ };
649
+ p.paragraphStyle = {
650
+ ...p.paragraphStyle,
651
+ textAlign: p.paragraphStyle?.textAlign || DEFAULT_TEXT_ALIGN,
652
+ fontFamily:
653
+ p.paragraphStyle?.fontFamily ||
654
+ FONT_FAMILY_CONFIGS[DEFAULT_FONT_FAMILY_KEY].name,
655
+ lineHeight: p.paragraphStyle?.lineHeight?.includes('rem')
656
+ ? LINE_HEIGHT_BODY
657
+ : p.paragraphStyle?.lineHeight || LINE_HEIGHT_BODY,
658
+ };
659
+ },
660
+ );
607
661
  };
608
662
 
609
663
  export const migrateSocialLinksToHaveTextStyles = (
@@ -616,7 +670,9 @@ export const migrateSocialLinksToHaveTextStyles = (
616
670
  ];
617
671
  }, [] as SocialLinksContent[]);
618
672
 
619
- socialLinksContents.forEach((p) => {
673
+ (
674
+ socialLinksContents as unknown as LegacyStyled<SocialLinksContent>[]
675
+ ).forEach((p) => {
620
676
  p.titleStyle = {
621
677
  ...p.titleStyle,
622
678
  textAlign: p.titleStyle?.textAlign || DEFAULT_TEXT_ALIGN,
@@ -670,7 +726,7 @@ export const migrateContactToNotOverwriteLayoutStyle = (
670
726
  ];
671
727
  }, [] as ContactFormContent[]);
672
728
 
673
- contents.forEach((p) => {
729
+ (contents as unknown as LegacyStyled<ContactFormContent>[]).forEach((p) => {
674
730
  if (!p.layoutStyle) {
675
731
  p.layoutStyle = '';
676
732
  }
@@ -136,7 +136,14 @@ export const migration02 = async (
136
136
  handleConversion(textItem.textStyle);
137
137
  });
138
138
  } else if (isProfileContent(content)) {
139
- const profileContent = content as ProfileContent;
139
+ const profileContent = content as unknown as Omit<
140
+ ProfileContent,
141
+ 'nameStyle' | 'titleStyle' | 'descriptionStyle'
142
+ > & {
143
+ nameStyle: TextStyleDeclaration;
144
+ titleStyle: TextStyleDeclaration;
145
+ descriptionStyle: TextStyleDeclaration;
146
+ };
140
147
 
141
148
  profileContent.nameStyle.fontSize =
142
149
  profileContent.nameStyle.fontSize || FONT_SIZE_HEADINGS;