@designcrowd/library.brand-page 5.18.5 → 5.18.6-ast-padding-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-ciKpCAd9.js → CreatedOnBrandCrowd-de-de-CAtPZtwo.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CZbTS1AZ.js → CreatedOnBrandCrowd-en-us-Dcx4yFkK.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-C8MExng5.js → CreatedOnBrandCrowd-es-es-DpodH0gD.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-CO0L9NK2.js → CreatedOnBrandCrowd-fr-ca-DZbMRJn-.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-CO0L9NK2.js → CreatedOnBrandCrowd-fr-fr-DZbMRJn-.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-zVDvBF2H.js → CreatedOnBrandCrowd-pt-br-C3gBveLk.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-zVDvBF2H.js → CreatedOnBrandCrowd-pt-pt-C3gBveLk.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-WrUSQdjf.js → CreatedOnDcom-de-de-DHNyyTV9.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-BqC9YtkL.js → CreatedOnDcom-en-us-BjqZ0Jmw.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BzH32Oya.js → CreatedOnDcom-es-es-tiNjDJmH.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-D7TYfCW0.js → CreatedOnDcom-fr-ca-COUSI6w1.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-DVlyfBtb.js → CreatedOnDcom-fr-fr-c3UCfh9A.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CSRB91ey.js → CreatedOnDcom-pt-br-U1jbo_g5.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-9KMj5gpc.js → CreatedOnDcom-pt-pt-BOW_n3bo.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +4 -0
  16. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +8 -4
  17. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.d.ts +4 -0
  18. package/lib/src/brand-page/components/image-gallery/ImageGallery.mixin.js +4 -0
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +4 -0
  20. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -1
  21. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +4 -0
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +4 -0
  23. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +4 -0
  24. package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +4 -1
  25. package/lib/src/brand-page/components/video/Video.mixin.d.ts +4 -0
  26. package/lib/src/brand-page/components/video/Video.mixin.js +4 -0
  27. package/lib/src/brand-page/constants/misc.constants.d.ts +30 -0
  28. package/lib/src/brand-page/constants/misc.constants.js +51 -0
  29. package/lib/src/brand-page/models/content.model.d.ts +2 -0
  30. package/lib/src/brand-page/utils/content-padding.util.d.ts +13 -0
  31. package/lib/src/brand-page/utils/content-padding.util.js +10 -0
  32. package/lib/src/brand-page/utils/index.d.ts +1 -0
  33. package/lib/src/brand-page/utils/index.js +1 -0
  34. package/lib/src/brand-page/utils/migration/migration-17.d.ts +2 -0
  35. package/lib/src/brand-page/utils/migration/migration-17.js +50 -0
  36. package/lib/src/brand-page/utils/migration.util.js +10 -0
  37. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +2 -7
  38. package/lib/src/brand-page-maker/components/admin-logo-settings/AdminLogoSettings.mixin.d.ts +2 -0
  39. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +14 -7
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +0 -8
  41. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +2 -7
  42. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1
  43. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +16 -87
  44. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -5
  45. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +2 -7
  46. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +0 -3
  47. package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.js +0 -11
  48. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +2 -7
  49. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +2 -7
  50. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +2 -7
  51. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +2 -7
  52. package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +0 -9
  53. package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +1 -20
  54. package/lib/src/brand-page-maker/composables/useEventTracker.d.ts +0 -20
  55. package/lib/src/brand-page-maker/composables/useEventTracker.js +0 -17
  56. package/lib/src/brand-page-maker/constants/config-settings-constant.js +37 -0
  57. package/lib/src/brand-page-maker/convertors/about-display-style.convertor.js +9 -1
  58. package/lib/src/brand-page-maker/convertors/banner-align-display-style.convertor.js +7 -1
  59. package/lib/src/brand-page-maker/convertors/contact-layout-style.convertor.js +6 -1
  60. package/lib/src/brand-page-maker/models/content-settings.js +36 -2
  61. package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +12 -0
  62. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +2 -41
  63. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +5 -307
  64. package/lib/src/brand-page-maker/stores/logo-store/logo-store.d.ts +0 -1
  65. package/lib/src/brand-page-maker/stores/user/user-store.js +0 -1
  66. package/lib/src/bundled-translations-Chw0nsFv.js +175 -0
  67. package/lib/src/bundled-translations.de-DE-cqBv7atZ.js +175 -0
  68. package/lib/src/bundled-translations.es-ES-D9VXftl_.js +175 -0
  69. package/lib/src/bundled-translations.fr-CA-BYstWXcO.js +175 -0
  70. package/lib/src/bundled-translations.fr-FR-D1H1hJD4.js +175 -0
  71. package/lib/src/bundled-translations.pt-BR-DqNFuNHX.js +175 -0
  72. package/lib/src/bundled-translations.pt-PT-tOic0FfQ.js +175 -0
  73. package/lib/src/bundles/bundled-translations.de-DE.json +3 -3
  74. package/lib/src/bundles/bundled-translations.es-ES.json +3 -3
  75. package/lib/src/bundles/bundled-translations.fr-CA.json +3 -3
  76. package/lib/src/bundles/bundled-translations.fr-FR.json +3 -3
  77. package/lib/src/bundles/bundled-translations.json +3 -3
  78. package/lib/src/bundles/bundled-translations.pt-BR.json +3 -3
  79. package/lib/src/bundles/bundled-translations.pt-PT.json +3 -3
  80. package/lib/src/constants/ui.d.ts +0 -1
  81. package/lib/src/css/library.brand-page-brandCrowd.min.css +123 -136
  82. package/lib/src/css/library.brand-page-brandPage.min.css +124 -136
  83. package/lib/src/css/library.brand-page-designCom.min.css +123 -136
  84. package/lib/src/css/library.brand-page-preview.min.css +123 -136
  85. package/lib/src/index.mjs +1 -1
  86. package/lib/src/{lib-BXbo_N88.js → lib-Bl7w5LQl.js} +28005 -28416
  87. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +16 -87
  88. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +0 -5
  89. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.stories.js +0 -1
  90. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +16 -23
  91. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +12 -16
  92. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +14 -7
  93. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.d.ts +0 -3
  94. package/lib/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.js +2 -19
  95. package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +12 -0
  96. package/lib/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.js +8 -18
  97. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +0 -64
  98. package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.js +0 -6
  99. package/lib/src/shared/content-settings/components/slider-field/SliderField.mixin.js +9 -0
  100. package/lib/src/shared/content-settings/store/content-settings-store.d.ts +12 -0
  101. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.d.ts +0 -19
  102. package/lib/src/shared/logo-settings/components/EditLogoSettings.mixin.js +0 -11
  103. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +2 -10
  104. package/lib/src/shared/logo-settings/store/editable-logo-store.d.ts +1 -5
  105. package/lib/src/shared/logo-settings/store/editable-logo-store.js +0 -31
  106. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +18 -24
  107. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +16 -10
  108. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +2 -23
  109. package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +0 -16
  110. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +2 -23
  111. package/lib/src/shared/template-settings/components/TemplatesSettings.mixin.d.ts +0 -16
  112. package/lib/src/utils/minify-brand-page-metadata.js +11 -1
  113. package/package.json +1 -1
  114. package/src/brand-page/components/about-section/AboutSection.vue +10 -4
  115. package/src/brand-page/components/banner-section/BannerSection.vue +11 -4
  116. package/src/brand-page/components/booking-section/BookingSection.vue +11 -3
  117. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +12 -6
  118. package/src/brand-page/components/contact-form/ContactForm.vue +115 -118
  119. package/src/brand-page/components/image-gallery/ImageGallery.mixin.ts +5 -0
  120. package/src/brand-page/components/image-gallery/ImageGallery.vue +1 -1
  121. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +8 -1
  122. package/src/brand-page/components/mailing-list/MailingList.vue +1 -1
  123. package/src/brand-page/components/map/Map.vue +5 -1
  124. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +5 -0
  125. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -0
  126. package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +8 -1
  127. package/src/brand-page/components/payment/support-me/SupportMe.vue +1 -0
  128. package/src/brand-page/components/shop/Shop.vue +7 -2
  129. package/src/brand-page/components/social-links/SocialLinks.vue +7 -3
  130. package/src/brand-page/components/text/Text.vue +12 -5
  131. package/src/brand-page/components/text-media-section/TextMediaSection.vue +11 -3
  132. package/src/brand-page/components/video/Video.mixin.ts +5 -0
  133. package/src/brand-page/components/video/Video.vue +1 -1
  134. package/src/brand-page/constants/misc.constants.ts +60 -0
  135. package/src/brand-page/models/content.model.ts +2 -0
  136. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +9 -3
  137. package/src/brand-page/utils/content-padding.util.test.ts +29 -0
  138. package/src/brand-page/utils/content-padding.util.ts +13 -0
  139. package/src/brand-page/utils/index.ts +1 -0
  140. package/src/brand-page/utils/migration/migration-17.ts +73 -0
  141. package/src/brand-page/utils/migration.util.test.ts +145 -0
  142. package/src/brand-page/utils/migration.util.ts +11 -0
  143. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +0 -9
  144. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.vue +3 -2
  145. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1
  146. package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -5
  147. package/src/brand-page-maker/components/cookie-collection/CookieSettings.vue +17 -18
  148. package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.ts +0 -13
  149. package/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.vue +3 -26
  150. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.de-DE.json +4 -6
  151. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.es-ES.json +4 -6
  152. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-CA.json +4 -6
  153. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.fr-FR.json +4 -6
  154. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.json +1 -3
  155. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-BR.json +4 -6
  156. package/src/brand-page-maker/components/quick-link-bar/i18n/quick-link-bar.pt-PT.json +4 -6
  157. package/src/brand-page-maker/components/save-contact/SaveContact.vue +19 -12
  158. package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +0 -10
  159. package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +1 -24
  160. package/src/brand-page-maker/composables/useEventTracker.ts +0 -29
  161. package/src/brand-page-maker/constants/config-settings-constant.ts +43 -0
  162. package/src/brand-page-maker/convertors/about-display-style.convertor.ts +10 -0
  163. package/src/brand-page-maker/convertors/banner-align-display-style.convertor.ts +8 -0
  164. package/src/brand-page-maker/convertors/contact-layout-style.convertor.test.ts +50 -0
  165. package/src/brand-page-maker/convertors/contact-layout-style.convertor.ts +8 -0
  166. package/src/brand-page-maker/models/content-settings.ts +38 -2
  167. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +0 -334
  168. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +4 -371
  169. package/src/brand-page-maker/stores/logo-store/logo-store.ts +0 -5
  170. package/src/brand-page-maker/stores/user/user-store.ts +0 -1
  171. package/src/bundles/bundled-translations.de-DE.json +3 -3
  172. package/src/bundles/bundled-translations.es-ES.json +3 -3
  173. package/src/bundles/bundled-translations.fr-CA.json +3 -3
  174. package/src/bundles/bundled-translations.fr-FR.json +3 -3
  175. package/src/bundles/bundled-translations.json +3 -3
  176. package/src/bundles/bundled-translations.pt-BR.json +3 -3
  177. package/src/bundles/bundled-translations.pt-PT.json +3 -3
  178. package/src/constants/ui.ts +0 -1
  179. package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +0 -5
  180. package/src/shared/content-settings/components/content-settings/ContentSettings.stories.ts +0 -1
  181. package/src/shared/content-settings/components/content-settings/i18n/content-settings.de-DE.json +2 -0
  182. package/src/shared/content-settings/components/content-settings/i18n/content-settings.es-ES.json +2 -0
  183. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-CA.json +2 -0
  184. package/src/shared/content-settings/components/content-settings/i18n/content-settings.fr-FR.json +2 -0
  185. package/src/shared/content-settings/components/content-settings/i18n/content-settings.json +2 -0
  186. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-BR.json +2 -0
  187. package/src/shared/content-settings/components/content-settings/i18n/content-settings.pt-PT.json +2 -0
  188. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.vue +1 -1
  189. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.mixin.ts +2 -19
  190. package/src/shared/content-settings/components/draggable-item-list/DraggableItemList.vue +1 -1
  191. package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.vue +2 -2
  192. package/src/shared/content-settings/components/form-fields-field/FormFieldsField.mixin.ts +10 -26
  193. package/src/shared/content-settings/components/logo-selection-field/LogoSelection.vue +48 -63
  194. package/src/shared/content-settings/components/page-dropdown-field/PageDropdownField.vue +0 -4
  195. package/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.ts +0 -7
  196. package/src/shared/content-settings/components/slider-field/SliderField.mixin.ts +9 -0
  197. package/src/shared/content-settings/components/text-field/TextField.vue +0 -1
  198. package/src/shared/content-settings/components/text-image-field/TextImageField.vue +4 -33
  199. package/src/shared/logo-settings/components/EditLogoSettings.mixin.ts +0 -11
  200. package/src/shared/logo-settings/store/editable-logo-store.ts +1 -42
  201. package/src/utils/minify-brand-page-metadata.ts +11 -1
  202. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.d.ts +0 -17
  203. package/lib/src/brand-page-maker/composables/useUndoRedoFlag.js +0 -25
  204. package/lib/src/brand-page-maker/stores/history/history-store.d.ts +0 -83
  205. package/lib/src/brand-page-maker/stores/history/history-store.js +0 -495
  206. package/lib/src/bundled-translations-D1q3rSEz.js +0 -175
  207. package/lib/src/bundled-translations.de-DE-BxqLLwbh.js +0 -175
  208. package/lib/src/bundled-translations.es-ES-uh249NlJ.js +0 -175
  209. package/lib/src/bundled-translations.fr-CA-BEQmv2fX.js +0 -175
  210. package/lib/src/bundled-translations.fr-FR-BnNuCojH.js +0 -175
  211. package/lib/src/bundled-translations.pt-BR-CJUOxVlq.js +0 -175
  212. package/lib/src/bundled-translations.pt-PT-Ds9cMEqK.js +0 -175
  213. package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
  214. package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
  215. package/src/brand-page-maker/components/quick-link-bar/RedoButton.vue +0 -66
  216. package/src/brand-page-maker/components/quick-link-bar/UndoButton.vue +0 -66
  217. package/src/brand-page-maker/components/quick-link-bar/undo-redo-buttons.test.ts +0 -116
  218. package/src/brand-page-maker/composables/useUndoRedoFlag.ts +0 -30
  219. package/src/brand-page-maker/stores/history/history-store.test.ts +0 -1120
  220. package/src/brand-page-maker/stores/history/history-store.ts +0 -660
  221. package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
@@ -1,24 +1,10 @@
1
1
  <template>
2
2
  <div
3
- v-if="shouldShowBar"
4
3
  data-component="quick-link-bar"
5
4
  class="c-quick-links tw-w-full tw-flex-none tw-bg-white md:tw-h-12 tw-border-b tw-border-grayscale-500 tw-px-2 lg:tw-px-4 tw-box-border tw-flex tw-items-center tw-text-grayscale-800 tw-fixed lg:tw-static"
6
5
  >
7
- <!-- Left slot: Undo/Redo buttons. Always rendered for layout balance
8
- (flex-1 reserves equal space on left and right) so the center
9
- cluster stays geometrically centered in the bar regardless of
10
- whether the buttons are visible. -->
11
- <div class="tw-flex tw-flex-1 tw-justify-start tw-gap-1">
12
- <template v-if="undoRedoEnabled">
13
- <UndoButton />
14
- <RedoButton />
15
- </template>
16
- </div>
17
-
18
- <!-- Center cluster: URL label, link, copy button -->
19
- <div
20
- v-if="isPublished"
21
- class="tw-flex tw-items-center tw-gap-2 tw-justify-center"
6
+ <p
7
+ class="tw-flex tw-items-center tw-justify-between lg:tw-justify-center tw-w-full"
22
8
  >
23
9
  <strong class="tw-font-semibold tw-hidden xl:tw-inline-block">
24
10
  {{ quickLinkBarTr('myWebPageLabel') }}
@@ -41,12 +27,7 @@
41
27
  }"
42
28
  @on-click.stop="onCopyClick"
43
29
  />
44
- </div>
45
-
46
- <!-- Right spacer: balances the left slot so the center cluster is
47
- geometrically centered. -->
48
- <div class="tw-flex-1" />
49
-
30
+ </p>
50
31
  <textarea ref="textarea" :value="brandPageUrl" class="tw-sr-only" />
51
32
  </div>
52
33
  </template>
@@ -54,14 +35,10 @@
54
35
  import QuickLinkBarMixin from './QuickLinkBar.mixin.ts';
55
36
  import { Button } from '@designcrowd/fe-shared-lib';
56
37
  import { quickLinkBarTr } from '@src/composables/useTranslate';
57
- import UndoButton from './UndoButton.vue';
58
- import RedoButton from './RedoButton.vue';
59
38
 
60
39
  export default {
61
40
  components: {
62
41
  Button,
63
- UndoButton,
64
- RedoButton,
65
42
  },
66
43
  mixins: [QuickLinkBarMixin],
67
44
  setup(props, context) {
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "Meine Webseite:",
4
- "copyButton": "Kopieren",
5
- "copiedButton": "Kopiert!",
6
- "undoLabel": "Rückgängig machen",
7
- "redoLabel": "Wiederholen"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "Meine Webseite:",
4
+ "copyButton" : "Kopieren",
5
+ "copiedButton" : "Kopiert!"
8
6
  }
9
7
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "Mi página web:",
4
- "copyButton": "Copiar",
5
- "copiedButton": "¡Copiado!",
6
- "undoLabel": "Deshacer",
7
- "redoLabel": "Rehacer"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "Mi página web:",
4
+ "copyButton" : "Copiar",
5
+ "copiedButton" : "¡Copiado!"
8
6
  }
9
7
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "Ma page Web :",
4
- "copyButton": "Copier",
5
- "copiedButton": "Copié !",
6
- "undoLabel": "Annuler",
7
- "redoLabel": "Rétablir"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "Ma page Web :",
4
+ "copyButton" : "Copier",
5
+ "copiedButton" : "Copié !"
8
6
  }
9
7
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "Ma page Web :",
4
- "copyButton": "Copier",
5
- "copiedButton": "Copié !",
6
- "undoLabel": "Annuler",
7
- "redoLabel": "Rétablir"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "Ma page Web :",
4
+ "copyButton" : "Copier",
5
+ "copiedButton" : "Copié !"
8
6
  }
9
7
  }
@@ -2,8 +2,6 @@
2
2
  "quickLinkBar": {
3
3
  "myWebPageLabel": "My web page:",
4
4
  "copyButton": "Copy",
5
- "copiedButton": "Copied!",
6
- "undoLabel": "Undo",
7
- "redoLabel": "Redo"
5
+ "copiedButton": "Copied!"
8
6
  }
9
7
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "Minha página web:",
4
- "copyButton": "Copiar",
5
- "copiedButton": "Copiado!",
6
- "undoLabel": "Desfazer",
7
- "redoLabel": "Refazer"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "Minha página web:",
4
+ "copyButton" : "Copiar",
5
+ "copiedButton" : "Copiado!"
8
6
  }
9
7
  }
@@ -1,9 +1,7 @@
1
1
  {
2
- "quickLinkBar": {
3
- "myWebPageLabel": "A minha página Web:",
4
- "copyButton": "Copiar",
5
- "copiedButton": "Copiado!",
6
- "undoLabel": "Desfazer",
7
- "redoLabel": "Refazer"
2
+ "quickLinkBar" : {
3
+ "myWebPageLabel" : "A minha página Web:",
4
+ "copyButton" : "Copiar",
5
+ "copiedButton" : "Copiado!"
8
6
  }
9
7
  }
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
  <Toggle
21
21
  id="save-contact-enabled"
22
- :model-value="isSavingEnabled"
22
+ :model-value="data.isToggled"
23
23
  color="primary"
24
24
  @update:model-value="onSavingEnabled()"
25
25
  />
@@ -27,7 +27,7 @@
27
27
  </div>
28
28
  <div class="tw-flex-none tw-mt-4">
29
29
  <div
30
- v-if="!isAdmin && !isPrePurchase && isSavingEnabled"
30
+ v-if="!isAdmin && !isPrePurchase && data.isToggled"
31
31
  class="tw-flex tw-items-center tw-justify-between tw-cursor-pointer tw-gap-1"
32
32
  @click="onHideBranding"
33
33
  >
@@ -62,7 +62,7 @@
62
62
  </div>
63
63
  <Toggle
64
64
  id="show-preview-cookie-banner"
65
- :model-value="hideBranding"
65
+ :model-value="data.hideBranding"
66
66
  color="primary"
67
67
  @update:model-value="onHideBranding()"
68
68
  />
@@ -78,7 +78,7 @@ import {
78
78
  useBrandPageContainerStore,
79
79
  } from '@brand-page-maker/stores';
80
80
  import { saveContactSettingsTr } from '@src/composables/useTranslate';
81
- import { computed } from 'vue';
81
+ import { computed, reactive } from 'vue';
82
82
  import {
83
83
  EVENTS,
84
84
  useEventTracker,
@@ -107,6 +107,11 @@ const showBrandCrowdLogo = computed(
107
107
  () => brandPageMakerStore.showBrandCrowdLogo,
108
108
  );
109
109
 
110
+ const data = reactive({
111
+ isToggled: isSavingEnabled.value,
112
+ hideBranding: hideBranding.value,
113
+ });
114
+
110
115
  const siteName = computed((): string => {
111
116
  return props.isDesignCom ? 'Design.com' : 'BrandCrowd';
112
117
  });
@@ -122,28 +127,30 @@ const hideBrandingTooltip = computed((): string => {
122
127
  });
123
128
 
124
129
  const onSavingEnabled = () => {
125
- const next = !isSavingEnabled.value;
126
-
127
- brandPageMakerStore.setSavingEnabled({ isSavingEnabled: next });
130
+ data.isToggled = !data.isToggled;
131
+ brandPageMakerStore.setSavingEnabled({
132
+ isSavingEnabled: data.isToggled,
133
+ });
128
134
  eventTracker.sendWebsiteEvent({
129
135
  eventName: EVENTS.WEBSITE_MAKER_DIGITAL_BUSINESS_CARDS_SAVE_CONTACT_TOGGLE,
130
136
  eventProps: {
131
137
  cta_location: UPGRADE_CTA_LOCATIONS.SAVE_CONTACT_SETTINGS,
132
- toggle_value: next ? 'enabled' : 'disabled',
138
+ toggle_value: data.isToggled ? 'enabled' : 'disabled',
133
139
  },
134
140
  });
135
141
  };
136
142
 
137
143
  const onHideBranding = async () => {
138
144
  if (!showBrandCrowdLogo.value) {
139
- const next = !hideBranding.value;
140
-
141
- brandPageMakerStore.setHideBranding({ hideBranding: next });
145
+ data.hideBranding = !data.hideBranding;
146
+ brandPageMakerStore.setHideBranding({
147
+ hideBranding: data.hideBranding,
148
+ });
142
149
  eventTracker.sendWebsiteEvent({
143
150
  eventName: EVENTS.WEBSITE_MAKER_DIGITAL_BUSINESS_CARDS_HIDE_POPUP,
144
151
  eventProps: {
145
152
  cta_location: UPGRADE_CTA_LOCATIONS.SAVE_CONTACT_SETTINGS,
146
- toggle_value: next ? 'enabled' : 'disabled',
153
+ toggle_value: data.hideBranding ? 'enabled' : 'disabled',
147
154
  },
148
155
  });
149
156
  } else {
@@ -29,8 +29,6 @@ import {
29
29
  useUiStore,
30
30
  } from '../../stores';
31
31
  import { useBrandPageMakerStore } from '../../stores';
32
- import { useHistoryStore } from '../../stores/history/history-store';
33
- import { useUndoRedoFlag } from '../useUndoRedoFlag';
34
32
  import { useBrandPageMakerUserStore } from '../../stores/user/user-store';
35
33
  import { useAiMetadataBuilder } from './useAiMetadataBuilder';
36
34
  import {
@@ -57,8 +55,6 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
57
55
  const aiThreadStore = useAiWebsiteBuilderThreadStore();
58
56
  const snapshotStore = useSnapshotStore();
59
57
  const brandPageMakerStore = useBrandPageMakerStore();
60
- const historyStore = useHistoryStore();
61
- const undoRedoEnabled = useUndoRedoFlag();
62
58
  const containerStore = useBrandPageContainerStore();
63
59
  const userStore = useBrandPageMakerUserStore();
64
60
  const uiStore = useUiStore();
@@ -445,12 +441,6 @@ export function useAiWebsiteBuilderChat(): UseAiChatResult {
445
441
 
446
442
  await nextTick();
447
443
 
448
- // One history entry per AI prompt (US-E1). `captureAiChangeset` cancels
449
- // the auto-watcher's pending flush so the apply doesn't double-capture.
450
- if (undoRedoEnabled.value) {
451
- historyStore.captureAiChangeset();
452
- }
453
-
454
444
  // Re-capture snapshot so subsequent messages reflect the updated page
455
445
  await snapshotStore.refreshSnapshotAsync();
456
446
 
@@ -47,7 +47,6 @@ import {
47
47
  backgroundColorConvertor,
48
48
  } from '@brand-page-maker/convertors';
49
49
  import { useUiContentSettingsStore } from '@shared/content-settings/store';
50
- import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
51
50
  import { AllSelection } from 'prosemirror-state';
52
51
  import { MaxLength } from './extensions/MaxLength';
53
52
  import { AutoLink } from './extensions/AutoLink';
@@ -209,12 +208,6 @@ export const useRichTextEditor = (
209
208
  isHyperlinkPopupOpen: Ref<boolean>,
210
209
  selectedLinkTypeValue: Ref<HyperlinkType>,
211
210
  ): UseRichTextEditorReturn => {
212
- const historyStore = useHistoryStore();
213
-
214
- // TipTap rehydrates and writes back canonical HTML on mount — fold
215
- // that into the current head instead of pushing a phantom entry.
216
- historyStore.mergeNextMutation();
217
-
218
211
  const editor = new Editor({
219
212
  content: model.value ?? '',
220
213
  editable: !props.readOnly,
@@ -463,16 +456,7 @@ export const useRichTextEditor = (
463
456
  watch(
464
457
  () => model.value,
465
458
  (newValue) => {
466
- // Re-seed the editor when the model has been mutated from outside
467
- // (history undo/redo, template switch, reorder). `!editor.isFocused`
468
- // distinguishes "external mutation" from "user is typing in me" — the
469
- // latter would wipe the user's cursor if we called setContent.
470
- // `updateRichTextEditor.value` is retained as an explicit override for
471
- // callers (reorder) that need to force a re-seed while focused.
472
- const isExternalMutation =
473
- updateRichTextEditor.value || !editor.isFocused;
474
-
475
- if (isExternalMutation && editor.getHTML() !== newValue) {
459
+ if (updateRichTextEditor.value && editor.getHTML() !== newValue) {
476
460
  editor.commands.setContent(newValue, false);
477
461
  updateRichTextEditor.value = false;
478
462
  //text style type is not switching when reordering
@@ -503,13 +487,6 @@ export const useRichTextEditor = (
503
487
  });
504
488
 
505
489
  editor.on('selectionUpdate', () => {
506
- // Skip while a history snapshot is being applied — `setContent` fires
507
- // selectionUpdate before the editor has fully rehydrated, which causes
508
- // toolbar buttons (alignment, letter-spacing) to flash through bogus
509
- // active states before settling. The editor emits a final selectionUpdate
510
- // after apply completes, which lands the correct values (BP-5506).
511
- if (historyStore.isApplyingSnapshot) return;
512
-
513
490
  const textStyleAttributes = editor.getAttributes('textStyle');
514
491
  const highlightAttributes = editor.getAttributes('highlight');
515
492
  const focusedAlignment = editor.getAttributes(
@@ -70,10 +70,6 @@ export const EVENTS = {
70
70
  'website_maker_digital_business_cards_hide_popup',
71
71
  WEBSITE_MAKER_GETTY_VIDEO: 'website_maker_getty_video',
72
72
  WEBSITE_MAKER_SHIPPING_TOGGLE: 'website_maker_shipping_toggle',
73
- WEBSITE_MAKER_UNDO: 'website_maker_undo',
74
- WEBSITE_MAKER_REDO: 'website_maker_redo',
75
- WEBSITE_MAKER_HISTORY_CAPPED: 'website_maker_history_capped',
76
- WEBSITE_MAKER_HISTORY_OVERSIZED: 'website_maker_history_oversized',
77
73
  };
78
74
 
79
75
  export const SELECT_LOCATIONS = {
@@ -424,31 +420,6 @@ const useEventTracker = () => {
424
420
  is_enabled: isEnabled,
425
421
  });
426
422
  },
427
- // Undo / Redo (BP-5506)
428
- sendUndoEvent: (props: {
429
- entries_count: number;
430
- actor: string | undefined;
431
- }) => {
432
- _publishEvent(EVENTS.WEBSITE_MAKER_UNDO, props);
433
- },
434
- sendRedoEvent: (props: {
435
- entries_count: number;
436
- actor: string | undefined;
437
- }) => {
438
- _publishEvent(EVENTS.WEBSITE_MAKER_REDO, props);
439
- },
440
- sendHistoryCappedEvent: (props: {
441
- entries_count: number;
442
- size_bytes: number;
443
- }) => {
444
- _publishEvent(EVENTS.WEBSITE_MAKER_HISTORY_CAPPED, props);
445
- },
446
- sendHistoryOversizedEvent: (props: {
447
- attempted_bytes: number;
448
- source: string;
449
- }) => {
450
- _publishEvent(EVENTS.WEBSITE_MAKER_HISTORY_OVERSIZED, props);
451
- },
452
423
  };
453
424
  };
454
425
 
@@ -201,6 +201,34 @@ const SETTINGS_STYLE_FIElD_GROUPS = (): ContentSettingsFieldGroup[] => {
201
201
  ];
202
202
  };
203
203
 
204
+ /**
205
+ * Shared Top/Bottom padding sliders (BP-5687). Reuses the same `slider` control
206
+ * as the Divider block (track + editable number box), range 0–100, continuous.
207
+ * Spread into a block's `fields` to expose the Padding Control on that block.
208
+ * Pass the Style field-group id for blocks that use grouped panels.
209
+ */
210
+ const PADDING_CONTROL_FIELDS = (
211
+ groupId?: string,
212
+ ): {
213
+ topPadding: ContentSettingsField<Content>;
214
+ bottomPadding: ContentSettingsField<Content>;
215
+ } => ({
216
+ topPadding: {
217
+ type: 'slider',
218
+ title: contentSettingsTr(`topPaddingTitle`),
219
+ minLength: 0,
220
+ maxLength: 100,
221
+ groupId,
222
+ },
223
+ bottomPadding: {
224
+ type: 'slider',
225
+ title: contentSettingsTr(`bottomPaddingTitle`),
226
+ minLength: 0,
227
+ maxLength: 100,
228
+ groupId,
229
+ },
230
+ });
231
+
204
232
  const DEFAULT_TITLE_STYLE_SETTINGS_FILED =
205
233
  (): ContentSettingsField<Content> => ({
206
234
  type: 'text-style',
@@ -1097,6 +1125,7 @@ export const IMAGE_GALLERY_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
1097
1125
  defaultValue: false,
1098
1126
  visibilityAssessor: imageGalleryFieldVisibilityAssessor,
1099
1127
  },
1128
+ ...PADDING_CONTROL_FIELDS(),
1100
1129
  },
1101
1130
  isEnabled: true,
1102
1131
  isLocked: (features) => !features.canAddImageContents,
@@ -1136,6 +1165,7 @@ export const VIDEO_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
1136
1165
  label: contentSettingsTr(`muteLabel`),
1137
1166
  valueConvertor: videoContentStateConvertor,
1138
1167
  },
1168
+ ...PADDING_CONTROL_FIELDS(),
1139
1169
  },
1140
1170
  isEnabled: true,
1141
1171
  isLocked: (features) => !features.canAddVideoContents,
@@ -1278,6 +1308,7 @@ export const TEXT_CONTENT_SETTINGS_CONFIG = (): ContentSettingsConfig<
1278
1308
  variant: 'icon',
1279
1309
  visibilityAssessor: brandSiteTypeVisibilityAssessor,
1280
1310
  },
1311
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1281
1312
  backgroundColor: {
1282
1313
  type: 'color',
1283
1314
  defaultValue: {},
@@ -1736,6 +1767,7 @@ export const MAP_CONTENT_SETTINGS_CONFIG =
1736
1767
  type: 'address',
1737
1768
  title: contentSettingsTr(`addressTitle`),
1738
1769
  },
1770
+ ...PADDING_CONTROL_FIELDS(),
1739
1771
  },
1740
1772
  isEnabled: true,
1741
1773
  isLocked: (features) => !features.canAddMapContents,
@@ -1787,6 +1819,7 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG =
1787
1819
  },
1788
1820
  titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
1789
1821
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1822
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1790
1823
  },
1791
1824
  isEnabled: true,
1792
1825
  isLocked: false,
@@ -1971,6 +2004,7 @@ export const REQUEST_PAYMENT_CONTENT_SETTINGS_CONFIG =
1971
2004
  defaultValue: {},
1972
2005
  label: contentSettingsTr(`buttonTextStyleLabel`),
1973
2006
  },
2007
+ ...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
1974
2008
  },
1975
2009
  isEnabled: (features) => features.canAddRequestPaymentContents,
1976
2010
  isLocked: false,
@@ -2038,6 +2072,7 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG =
2038
2072
  label: contentSettingsTr(`itemStyleLabel`),
2039
2073
  },
2040
2074
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
2075
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2041
2076
  },
2042
2077
  isEnabled: (features) => features.canAddRequestPaymentContents,
2043
2078
  isLocked: false,
@@ -2170,6 +2205,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG =
2170
2205
  variant: 'icon',
2171
2206
  visibilityAssessor: brandSiteTypeVisibilityAssessor,
2172
2207
  },
2208
+ ...PADDING_CONTROL_FIELDS(CONTACT_FORM_GROUPS.style),
2173
2209
  titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
2174
2210
  descriptionStyle: DEFAULT_DESCRIPTION_STYLE_FILED(),
2175
2211
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
@@ -2229,6 +2265,7 @@ export const BANNER_SECTION_SETTINGS_CONFIG =
2229
2265
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
2230
2266
  variant: 'icon',
2231
2267
  },
2268
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2232
2269
  overlayColor: {
2233
2270
  type: 'color',
2234
2271
  title: contentSettingsTr(`overlayColorTitle`),
@@ -2507,6 +2544,7 @@ export const ABOUT_SECTION_SETTINGS_CONFIG =
2507
2544
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
2508
2545
  variant: 'icon',
2509
2546
  },
2547
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2510
2548
  titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
2511
2549
  paragraphStyle: {
2512
2550
  type: 'text-style',
@@ -2594,6 +2632,7 @@ export const IMAGES_SECTION_SETTINGS_CONFIG =
2594
2632
  ],
2595
2633
  fields: {
2596
2634
  displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.image),
2635
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2597
2636
  aspectRatio: {
2598
2637
  type: 'radio',
2599
2638
  role: 'multi',
@@ -2793,6 +2832,7 @@ export const SOCIAL_LINKS_SETTINGS_CONFIG =
2793
2832
  optionsConvertor: socialLinksIconDisplayStyleConvertor,
2794
2833
  variant: 'icon',
2795
2834
  },
2835
+ ...PADDING_CONTROL_FIELDS(SOCIAL_LINKS_GROUPS.style),
2796
2836
  titleStyle: {
2797
2837
  type: 'text-style',
2798
2838
  groupId: SOCIAL_LINKS_GROUPS.style,
@@ -2905,6 +2945,7 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
2905
2945
  ],
2906
2946
  fields: {
2907
2947
  displayStyle: TEXT_MEDIA_DISPLAY_STYLE_FIELD(MEDIA_TYPES.shape),
2948
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2908
2949
  size: IMAGE_SIZE_FIELD(),
2909
2950
  title: TEXT_MEDIA_TITLE_FIELD(),
2910
2951
  description: TEXT_MEDIA_DESCRIPTION_FIELD(),
@@ -2942,6 +2983,7 @@ export const SHAPES_SECTION_SETTINGS_CONFIG =
2942
2983
  ? MAX_BS_MEDIA_AND_IMAGE_ITEMS
2943
2984
  : MAX_BP_MEDIA_AND_IMAGE_ITEMS,
2944
2985
  },
2986
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
2945
2987
  },
2946
2988
  isEnabled: true,
2947
2989
  isLocked: false,
@@ -3166,6 +3208,7 @@ export const BOOKING_SECTION_SETTINGS_CONFIG =
3166
3208
  visibilityAssessor: (c, b) =>
3167
3209
  personalisationOverrideVisibility(c, b, 'buttonText'),
3168
3210
  },
3211
+ ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
3169
3212
  backgroundStyle: {
3170
3213
  type: 'color',
3171
3214
  groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
@@ -6,6 +6,7 @@ import {
6
6
  ALIGN_RIGHT_ALIGNED,
7
7
  ALIGN_RIGHT_FULL_IMAGE,
8
8
  TEXT_ONLY,
9
+ aboutDisplayStyleDefaultPadding,
9
10
  } from '@brand-page/constants';
10
11
 
11
12
  import type { AboutSectionContent } from '@brand-page';
@@ -76,11 +77,18 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
76
77
  convertBack(config: ButtonGroupConfig): Partial<AboutSectionContent> {
77
78
  const selectedOption = config.options.find((v) => v.isSelected);
78
79
 
80
+ // Switching display style adopts that style's canonical look — like the
81
+ // textAlign reset below — including its default block padding. The two
82
+ // full-image styles default to 0 (image flush to the edges); the rest to 32.
83
+ const padding = aboutDisplayStyleDefaultPadding(selectedOption?.value);
84
+
79
85
  if (!selectedOption || selectedOption.value === ALIGN_CENTERED) {
80
86
  const textAlign = 'center';
81
87
 
82
88
  return {
83
89
  displayStyle: selectedOption?.value,
90
+ topPadding: padding,
91
+ bottomPadding: padding,
84
92
  titleStyle: {
85
93
  textAlign,
86
94
  },
@@ -94,6 +102,8 @@ export const aboutDisplayStyleConvertor: ValueConvertor<
94
102
 
95
103
  return {
96
104
  displayStyle: selectedOption?.value,
105
+ topPadding: padding,
106
+ bottomPadding: padding,
97
107
  titleStyle: {
98
108
  textAlign,
99
109
  },
@@ -15,6 +15,7 @@ import {
15
15
  ALIGN_TOP_FULL_IMAGE,
16
16
  ALIGN_BOTTOM_FULL_IMAGE,
17
17
  ALIGN_MIDDLE_FULL_IMAGE,
18
+ bannerDisplayStyleDefaultPadding,
18
19
  } from '@brand-page/constants';
19
20
  import type { BannerSectionContent } from '@brand-page';
20
21
 
@@ -172,8 +173,15 @@ export const bannerAlignDisplayStyleConvertor: ValueConvertor<
172
173
  textAlign = 'center';
173
174
  }
174
175
 
176
+ // Switching display style adopts that style's canonical look — like the
177
+ // textAlign resets above — including its default block padding. Full-bleed
178
+ // image styles default to 0 (image flush to the edges); the rest to 32.
179
+ const padding = bannerDisplayStyleDefaultPadding(selectedOption?.value);
180
+
175
181
  return {
176
182
  displayStyle: selectedOption?.value,
183
+ topPadding: padding,
184
+ bottomPadding: padding,
177
185
  titleStyle: {
178
186
  textAlign,
179
187
  },
@@ -0,0 +1,50 @@
1
+ import { describe, test, expect } from 'vitest';
2
+ import { contactLayoutStyleConvertor } from './contact-layout-style.convertor';
3
+ import {
4
+ ALIGN_CENTERED,
5
+ ALIGN_CARD_CENTER,
6
+ ALIGN_CARD_CENTER_IMAGE,
7
+ ALIGN_LEFT_FULL_IMAGE,
8
+ TEXT_ONLY,
9
+ } from '@brand-page/constants';
10
+
11
+ const configWithSelected = (selected: string) => ({
12
+ options: contactLayoutStyleConvertor
13
+ .convert(selected)
14
+ .options.map((option) => ({
15
+ ...option,
16
+ isSelected: option.value === selected,
17
+ })),
18
+ });
19
+
20
+ describe('contact-layout-style.convertor', () => {
21
+ test.each([
22
+ [ALIGN_CARD_CENTER, 32, 'center'],
23
+ [ALIGN_CENTERED, 24, 'center'],
24
+ [ALIGN_CARD_CENTER_IMAGE, 0, 'center'],
25
+ [TEXT_ONLY, 32, 'left'],
26
+ [ALIGN_LEFT_FULL_IMAGE, 0, 'left'],
27
+ ])(
28
+ 'convertBack should apply the default padding and text alignment for %s',
29
+ (layoutStyle, padding, textAlign) => {
30
+ const result = contactLayoutStyleConvertor.convertBack(
31
+ configWithSelected(layoutStyle),
32
+ );
33
+
34
+ expect(result).toStrictEqual({
35
+ layoutStyle,
36
+ topPadding: padding,
37
+ bottomPadding: padding,
38
+ titleStyle: {
39
+ textAlign,
40
+ },
41
+ descriptionStyle: {
42
+ textAlign,
43
+ },
44
+ buttonTextStyle: {
45
+ textAlign: 'center',
46
+ },
47
+ });
48
+ },
49
+ );
50
+ });
@@ -6,6 +6,7 @@ import {
6
6
  ALIGN_CARD_CENTER_IMAGE,
7
7
  TEXT_ONLY,
8
8
  ALIGN_CARD_CENTER,
9
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
9
10
  } from '@brand-page/constants';
10
11
  import type { ContactFormContent } from '@brand-page';
11
12
 
@@ -84,8 +85,15 @@ export const contactLayoutStyleConvertor: ValueConvertor<
84
85
  textAlign = 'left';
85
86
  }
86
87
 
88
+ // Switching layout adopts that layout's canonical look — same as the
89
+ // textAlign resets below — including its default block padding.
90
+ const padding =
91
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING[selectedOption?.value ?? ''] ?? 0;
92
+
87
93
  return {
88
94
  layoutStyle: selectedOption?.value,
95
+ topPadding: padding,
96
+ bottomPadding: padding,
89
97
  titleStyle: {
90
98
  textAlign,
91
99
  },