@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
@@ -24,6 +24,7 @@ import {
24
24
  EMPTY_LOGO_IMAGE_MODEL,
25
25
  BRAND_PAGE_TYPES,
26
26
  SENSITIVE_CONTENT_TYPES,
27
+ CONTACT_FORM_LAYOUT_DEFAULT_PADDING,
27
28
  } from '@brand-page';
28
29
  import type {
29
30
  ButtonContent,
@@ -171,6 +172,8 @@ export const createInitialImageGalleryContent = (): ImageGalleryContent => {
171
172
  galleryStyles: {
172
173
  galleryType: 'grid',
173
174
  },
175
+ topPadding: 0,
176
+ bottomPadding: 0,
174
177
  };
175
178
  };
176
179
 
@@ -182,6 +185,8 @@ export const createInitialVideoContent = (): VideoContent => {
182
185
  displayStyle: DISPLAY_STYLE_PREVIEW,
183
186
  mute: false,
184
187
  videoUrl: '',
188
+ topPadding: 0,
189
+ bottomPadding: 0,
185
190
  };
186
191
  };
187
192
 
@@ -239,6 +244,8 @@ export const createInitialTextContent = (
239
244
  ]
240
245
  : undefined,
241
246
  type: 'text',
247
+ topPadding: 12,
248
+ bottomPadding: 12,
242
249
  textSize: {
243
250
  fontSize: FONT_SIZE_BODY,
244
251
  lineHeight: LINE_HEIGHT_BODY,
@@ -282,6 +289,8 @@ export const createInitialMapContent = (): MapContent => {
282
289
  formattedAddress: '',
283
290
  placeId: '',
284
291
  },
292
+ topPadding: 0,
293
+ bottomPadding: 0,
285
294
  };
286
295
  };
287
296
 
@@ -291,6 +300,8 @@ export const createInitialMailingListContent = (
291
300
  return {
292
301
  id: uuid.v4(),
293
302
  type: 'mailing-list',
303
+ topPadding: 0,
304
+ bottomPadding: 0,
294
305
  title: contentSettingsTr(`mailingListTitle`),
295
306
  buttonText: contentSettingsTr(`subscribePlaceholder`),
296
307
  acceptedFields: 'emailOnly',
@@ -324,6 +335,8 @@ export const createInitialRequestPaymentContent = (
324
335
  successMessage: '',
325
336
  title: contentSettingsTr(`buyNowTitle`),
326
337
  type: 'request-payment',
338
+ topPadding: 0,
339
+ bottomPadding: 0,
327
340
  fillColor: {},
328
341
  defaultBorderColor: {},
329
342
  selectedBorderColor: {},
@@ -356,6 +369,8 @@ export const createInitialShopContent = (
356
369
  return {
357
370
  id: uuid.v4(),
358
371
  description: '',
372
+ topPadding: 16,
373
+ bottomPadding: 16,
359
374
  products: [],
360
375
  displayStyle: PAYMENT_OPTION_DISPLAY_TYPES.thumbnail,
361
376
  aspectRatio: PAYMENT_OPTION_IMAGE_TYPES.auto,
@@ -415,6 +430,8 @@ export const createInitialSupportMeContent = (
415
430
  successMessage: contentSettingsTr(`successSupportPlaceholder`),
416
431
  description: contentSettingsTr(`makeADonationDescription`),
417
432
  type: 'support-me',
433
+ topPadding: 0,
434
+ bottomPadding: 0,
418
435
  titleStyle: {
419
436
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
420
437
  textStyleType: TEXT_STYLE_TYPES.headings,
@@ -453,14 +470,21 @@ export const createInitialContactFormContent: CreateInitialContentFunction<
453
470
  console.error('userState.emailAddress should not be undefined');
454
471
  }
455
472
 
473
+ // New blocks inherit the padding their initial layout previously had
474
+ // hard-coded — same source as the migration backfill for existing pages.
475
+ const layoutStyle =
476
+ options?.brandPageType === 'brandSite' ? 'center-card-aligned' : '';
477
+ const padding = CONTACT_FORM_LAYOUT_DEFAULT_PADDING[layoutStyle] ?? 0;
478
+
456
479
  return {
457
480
  id: uuid.v4(),
458
481
  title: contentSettingsTr(`contactUsTitle`),
459
482
  description: '',
460
483
  buttonText: contentSettingsTr(`sendPlaceholder`),
461
484
  displayStyle: DISPLAY_STYLE_PREVIEW,
462
- layoutStyle:
463
- options?.brandPageType === 'brandSite' ? 'center-card-aligned' : '',
485
+ layoutStyle,
486
+ topPadding: padding,
487
+ bottomPadding: padding,
464
488
  imageUrl: '',
465
489
  fields: [
466
490
  {
@@ -553,6 +577,8 @@ export const createInitialBannerSectionContent: CreateInitialContentFunction<
553
577
  > = (options?: CreateInitialContentOptions) => {
554
578
  return {
555
579
  id: uuid.v4(),
580
+ topPadding: 32,
581
+ bottomPadding: 32,
556
582
  imageUrl: '',
557
583
  title: contentSettingsTr(`thisIsABannerTitle`),
558
584
  description: '',
@@ -599,6 +625,8 @@ export const createInitialBookingSectionContent: CreateInitialContentFunction<
599
625
  buttonText: contentSettingsTr(`bookNowLabel`),
600
626
  url: '',
601
627
  type: 'booking-section',
628
+ topPadding: 32,
629
+ bottomPadding: 32,
602
630
  descriptionStyle: {
603
631
  applyAutoScale: options?.brandPageType === BRAND_PAGE_TYPES.brandSite,
604
632
  textStyleType: TEXT_STYLE_TYPES.paragraphs,
@@ -628,6 +656,8 @@ export const createInitialImagesSectionContent: CreateInitialContentFunction<
628
656
  title: contentSettingsTr(`imagesTitle`),
629
657
  description: '',
630
658
  type: 'images-section',
659
+ topPadding: 32,
660
+ bottomPadding: 32,
631
661
  displayStyle: 'centered',
632
662
  aspectRatio: 'Default',
633
663
  areImagesFullWidth: false,
@@ -731,6 +761,8 @@ export const createInitialAboutSectionContent: CreateInitialContentFunction<
731
761
  textAlign: 'center',
732
762
  },
733
763
  backgroundStyle: {},
764
+ topPadding: 32,
765
+ bottomPadding: 32,
734
766
  };
735
767
  };
736
768
 
@@ -793,6 +825,8 @@ export const createInitialSocialLinksContent = (
793
825
  return {
794
826
  id: uuid.v4(),
795
827
  type: 'social-links',
828
+ topPadding: 32,
829
+ bottomPadding: 32,
796
830
  title: contentSettingsTr(`followUsOnTitle`),
797
831
  links: [
798
832
  {
@@ -846,6 +880,8 @@ export const createInitialShapesSectionContent: CreateInitialContentFunction<
846
880
  title: contentSettingsTr(`shapesTitle`),
847
881
  description: '',
848
882
  type: 'shapes-section',
883
+ topPadding: 32,
884
+ bottomPadding: 32,
849
885
  displayStyle: 'centered',
850
886
  items: [
851
887
  {
@@ -44,13 +44,6 @@ import { useUiBackgroundSettingsStore } from '@shared/background-settings/store'
44
44
  import { useBrandPageMakerUserStore } from '../user';
45
45
  import { useBrandPageContainerStore } from '../brandpage-container';
46
46
  import { useUiTemplateSettingsStore } from '@shared/template-settings/store';
47
- import {
48
- CONTENT_SETTINGS_MODES,
49
- useUiContentSettingsStore,
50
- } from '@shared/content-settings/store';
51
- import { useUiSideBarStore } from '@shared/side-bar/store';
52
- import { useUiEditableLogoStore } from '@shared/logo-settings/store/editable-logo-store';
53
- import { SIDE_BAR_TAB_NAMES } from '@brand-page-maker/constants';
54
47
  import { PAGE_SECTIONS } from '@shared/page-settings/models';
55
48
  import { FabricRenderClient } from '../../../clients/fabric-render-client';
56
49
  import { setLocaleAsync } from '@src/composables/useTranslate';
@@ -610,331 +603,4 @@ describe('brand page maker store module', () => {
610
603
  // Assert
611
604
  expect(setDesignTemplateTokenSpy).not.toHaveBeenCalled();
612
605
  });
613
-
614
- // BP-5506 regression: applyHistorySnapshot must replace nested navigation
615
- // style refs as a whole, not deep-merge them. The previous bug was that
616
- // object-form $patch would leave keys present in the live state but absent
617
- // from the snapshot in place — e.g. switching nav button styles then
618
- // undoing would leave the new style's borderColor / borderRadius applied.
619
- test('applyHistorySnapshot replaces navigation styles wholesale (no key bleed across undo)', async () => {
620
- // Arrange — initialise the maker so `applyHistorySnapshot` has a
621
- // populated set of dependent stores to write into.
622
- const makerStore = useBrandPageMakerStore();
623
- const navigationStyleSettingsStore = useUiNavigationStyleSettingsStore();
624
-
625
- await makerStore.initialise(INITIALISE_PAYLOAD);
626
-
627
- // Build snapshot A — the "older" state we'll undo back to. Keep the
628
- // navigation simple: only borderRadius is set on selectedButtonStyle.
629
- const snapshotA = {
630
- ...makerStore.brandPageData,
631
- pageHeaderDesktop: {
632
- ...makerStore.brandPageData.pageHeaderDesktop,
633
- navigation: {
634
- ...makerStore.brandPageData.pageHeaderDesktop?.navigation,
635
- selectedButtonStyle: {
636
- borderRadius: '0px',
637
- },
638
- },
639
- },
640
- } as BrandPageModel;
641
-
642
- // Build snapshot B — the "newer" state with extra keys that the
643
- // older snapshot does NOT have. If $patch deep-merged, these would
644
- // survive an undo back to A.
645
- const snapshotB = {
646
- ...snapshotA,
647
- pageHeaderDesktop: {
648
- ...snapshotA.pageHeaderDesktop,
649
- navigation: {
650
- ...snapshotA.pageHeaderDesktop?.navigation,
651
- selectedButtonStyle: {
652
- borderRadius: '12px',
653
- borderColor: 'rgb(255, 0, 0)',
654
- borderStyle: 'dashed',
655
- borderWidth: '4px',
656
- },
657
- },
658
- },
659
- } as BrandPageModel;
660
-
661
- // Act — apply newer first (simulates the user making the edit), then
662
- // older (simulates the undo). NavigationDesktop's constructor folds
663
- // its input over a defaults object, so we read the resulting state
664
- // and assert against the keys that came from snapshotB but NOT from
665
- // snapshotA.
666
- await makerStore.applyHistorySnapshot(snapshotB);
667
- await makerStore.applyHistorySnapshot(snapshotA);
668
-
669
- // Assert — after the undo, no keys from B should bleed through onto
670
- // A's selectedButtonStyle. Specifically the values that are unique to
671
- // B (red dashed border) must not be present.
672
- const restored =
673
- navigationStyleSettingsStore.navigation[PAGE_SECTIONS.header][
674
- VIEWPORTS.desktop
675
- ];
676
- const restoredSelected = restored.selectedButtonStyle;
677
-
678
- expect(restoredSelected.borderRadius).toBe('0px');
679
- // The B-only values must not survive the undo. NavigationStyles'
680
- // constructor seeds defaults for selectedButtonStyle, so we assert
681
- // the *exact* B-only values are gone rather than a strict superset.
682
- expect(restoredSelected.borderColor).not.toBe('rgb(255, 0, 0)');
683
- expect(restoredSelected.borderStyle).not.toBe('dashed');
684
- expect(restoredSelected.borderWidth).not.toBe('4px');
685
- });
686
-
687
- // BP-5506 regression: undoing a page-add must clear the URL/active-page
688
- // back to a page that exists in the restored snapshot. The page-tabs
689
- // carousel keys "selected" off the route URL; after `setNav` removes the
690
- // added route, no nav item matches the URL slug and the highlight
691
- // disappears. `applyHistorySnapshot` accepts an `activePageId` and writes
692
- // it through `pageNavigationStore.setCurrentActivePage` so the routeStore
693
- // and `currentPage` getter realign.
694
- test('applyHistorySnapshot updates pageNavigation.activePageId when given a valid id', async () => {
695
- const makerStore = useBrandPageMakerStore();
696
- const pageNavigationStore = usePageNavigationStore();
697
-
698
- await makerStore.initialise(INITIALISE_PAYLOAD);
699
-
700
- const restoredPageId = pageNavigationStore.routes[0]?.pageId;
701
-
702
- expect(restoredPageId).toBeDefined();
703
-
704
- pageNavigationStore.activePageId = '';
705
-
706
- await makerStore.applyHistorySnapshot(
707
- makerStore.brandPageData,
708
- restoredPageId,
709
- );
710
-
711
- expect(pageNavigationStore.activePageId).toBe(restoredPageId);
712
- });
713
-
714
- test('applyHistorySnapshot falls back to first/default route when no activePageId is provided', async () => {
715
- const makerStore = useBrandPageMakerStore();
716
- const pageNavigationStore = usePageNavigationStore();
717
-
718
- await makerStore.initialise(INITIALISE_PAYLOAD);
719
-
720
- const expectedFirstId =
721
- pageNavigationStore.getFirstOrDefaultRoute()?.pageId;
722
-
723
- expect(expectedFirstId).toBeDefined();
724
-
725
- pageNavigationStore.activePageId = 'stale-page-id-not-in-nav';
726
-
727
- await makerStore.applyHistorySnapshot(makerStore.brandPageData);
728
-
729
- expect(pageNavigationStore.activePageId).toBe(expectedFirstId);
730
- });
731
-
732
- // BP-5506 follow-up: undoing a non-page-structural edit (e.g. a title
733
- // change) must NOT push a new route. The router push fires
734
- // `router.afterEach`, and BrandPageMaker.mixin's afterEach hook resets
735
- // the content-settings modeStack — which would snap the sidebar back
736
- // to the default Content tab on every undo, even when the user was
737
- // deep-editing a content item. Same-page navigation MUST be skipped.
738
- test('applyHistorySnapshot does NOT touch modeStack when active page is unchanged', async () => {
739
- const makerStore = useBrandPageMakerStore();
740
- const pageNavigationStore = usePageNavigationStore();
741
- const contentSettingsStore = useUiContentSettingsStore();
742
-
743
- await makerStore.initialise(INITIALISE_PAYLOAD);
744
-
745
- const activePageId = pageNavigationStore.routes[0]?.pageId;
746
-
747
- expect(activePageId).toBeDefined();
748
-
749
- pageNavigationStore.activePageId = activePageId!;
750
-
751
- // User is deep-editing a content item — focused mode pushed onto the stack.
752
- const realItemId = contentSettingsStore.items[0]?.id;
753
-
754
- expect(realItemId).toBeDefined();
755
-
756
- contentSettingsStore.pushMode({
757
- mode: CONTENT_SETTINGS_MODES.focusedContentItem,
758
- selectedItemId: realItemId,
759
- });
760
- contentSettingsStore.selectedItemId = realItemId;
761
-
762
- expect(contentSettingsStore.mode).toBe(
763
- CONTENT_SETTINGS_MODES.focusedContentItem,
764
- );
765
-
766
- // Apply a snapshot whose activePageId equals the current page (i.e.
767
- // a non-structural edit that didn't change pages — title edit, color
768
- // change, etc.).
769
- await makerStore.applyHistorySnapshot(
770
- makerStore.brandPageData,
771
- activePageId,
772
- );
773
-
774
- // Mode stack is preserved — no router.afterEach was triggered.
775
- expect(contentSettingsStore.mode).toBe(
776
- CONTENT_SETTINGS_MODES.focusedContentItem,
777
- );
778
- expect(contentSettingsStore.selectedItemId).toBe(realItemId);
779
- });
780
-
781
- // BP-5506 regression: when undoing a content add, the selected item
782
- // disappears. The fallback must restore the Content tab's natural
783
- // landing state (mode = edit, selectedItemId = null), not just switch
784
- // tabs — otherwise `<FocusedContentItemSettings>` keeps rendering for
785
- // a missing item and paints a blank panel.
786
- test('applyHistorySnapshot resets sidebar to default Content tab when selected item is gone', async () => {
787
- const makerStore = useBrandPageMakerStore();
788
- const contentSettingsStore = useUiContentSettingsStore();
789
- const sideBarStore = useUiSideBarStore();
790
-
791
- await makerStore.initialise(INITIALISE_PAYLOAD);
792
-
793
- // Simulate the user opening a content item's focused settings.
794
- const orphanItemId = 'orphan-content-id-not-in-snapshot';
795
-
796
- contentSettingsStore.pushMode({
797
- mode: CONTENT_SETTINGS_MODES.focusedContentItem,
798
- selectedItemId: orphanItemId,
799
- });
800
- contentSettingsStore.selectedItemId = orphanItemId;
801
- sideBarStore.setSelectedTabName({
802
- tabName: SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
803
- });
804
-
805
- // Pre-condition: panel is showing the focused content item.
806
- expect(contentSettingsStore.mode).toBe(
807
- CONTENT_SETTINGS_MODES.focusedContentItem,
808
- );
809
- expect(contentSettingsStore.selectedItemId).toBe(orphanItemId);
810
-
811
- // Snapshot does NOT contain orphanItemId — simulates undo of an add.
812
- await makerStore.applyHistorySnapshot(makerStore.brandPageData);
813
-
814
- // Post-condition: same shape as a fresh Content tab click.
815
- expect(contentSettingsStore.mode).toBe(CONTENT_SETTINGS_MODES.edit);
816
- expect(contentSettingsStore.selectedItemId).toBeNull();
817
- expect(sideBarStore.selectedTabName).toBe(
818
- SIDE_BAR_TAB_NAMES.CONTENT_SETTINGS,
819
- );
820
- });
821
-
822
- // BP-5506 follow-up: applyHistorySnapshot accepts a `logoEdits` JSON
823
- // string (sidecar to brandPageData; pre-purchase logo-tab form-field
824
- // state). On undo it must wholesale-replace `editableLogoStore.logoEdits`
825
- // so the form fields reflect the pre-edit state. Wholesale replacement
826
- // matters because a previous entry's textObjects/colors must NOT leak
827
- // through (e.g. switching template A→B then undoing must NOT keep B's
828
- // textObject ids in A's restored state).
829
- test('applyHistorySnapshot restores editableLogoStore.logoEdits from sidecar', async () => {
830
- const makerStore = useBrandPageMakerStore();
831
- const editableLogoStore = useUiEditableLogoStore();
832
-
833
- await makerStore.initialise(INITIALISE_PAYLOAD);
834
-
835
- // User has typed "AcmeCo" — current logoEdits state.
836
- editableLogoStore.logoEdits.textObjects = [
837
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
838
- {
839
- id: 't1',
840
- role: 'primary-text',
841
- text: 'AcmeCo',
842
- textEnabled: true,
843
- } as any,
844
- ];
845
-
846
- // The history entry the user is undoing TO captured "Acme".
847
- const sidecar = JSON.stringify({
848
- backgroundObject: { id: 'bg', type: 'rect', role: 'background' },
849
- logoObject: {
850
- id: 'lg',
851
- type: 'group',
852
- role: 'logo',
853
- logoColors: [],
854
- logoStrokeColors: [],
855
- },
856
- textObjects: [
857
- { id: 't1', role: 'primary-text', text: 'Acme', textEnabled: true },
858
- ],
859
- });
860
-
861
- await makerStore.applyHistorySnapshot(
862
- makerStore.brandPageData,
863
- undefined,
864
- sidecar,
865
- );
866
-
867
- expect(editableLogoStore.logoEdits.textObjects).toEqual([
868
- { id: 't1', role: 'primary-text', text: 'Acme', textEnabled: true },
869
- ]);
870
- });
871
-
872
- test('applyHistorySnapshot wholesale-replaces logoEdits (no leak from prior state)', async () => {
873
- const makerStore = useBrandPageMakerStore();
874
- const editableLogoStore = useUiEditableLogoStore();
875
-
876
- await makerStore.initialise(INITIALISE_PAYLOAD);
877
-
878
- // Current state has TWO textObjects (e.g. user is on template B with a
879
- // logo + tagline).
880
- editableLogoStore.logoEdits.textObjects = [
881
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
882
- {
883
- id: 'b-1',
884
- role: 'primary-text',
885
- text: 'Brand B',
886
- textEnabled: true,
887
- } as any,
888
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
889
- { id: 'b-2', role: 'tagline', text: 'tagline', textEnabled: true } as any,
890
- ];
891
-
892
- // Undo target captured template A — only ONE textObject with a
893
- // different id. After restore, b-1 / b-2 must be gone.
894
- const sidecar = JSON.stringify({
895
- backgroundObject: { id: 'bg', type: 'rect', role: 'background' },
896
- logoObject: {
897
- id: 'lg',
898
- type: 'group',
899
- role: 'logo',
900
- logoColors: [],
901
- logoStrokeColors: [],
902
- },
903
- textObjects: [
904
- { id: 'a-1', role: 'primary-text', text: 'Brand A', textEnabled: true },
905
- ],
906
- });
907
-
908
- await makerStore.applyHistorySnapshot(
909
- makerStore.brandPageData,
910
- undefined,
911
- sidecar,
912
- );
913
-
914
- expect(editableLogoStore.logoEdits.textObjects).toHaveLength(1);
915
- expect(editableLogoStore.logoEdits.textObjects[0].id).toBe('a-1');
916
- });
917
-
918
- test('applyHistorySnapshot leaves logoEdits untouched when sidecar is undefined', async () => {
919
- const makerStore = useBrandPageMakerStore();
920
- const editableLogoStore = useUiEditableLogoStore();
921
-
922
- await makerStore.initialise(INITIALISE_PAYLOAD);
923
-
924
- editableLogoStore.logoEdits.textObjects = [
925
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
926
- {
927
- id: 't1',
928
- role: 'primary-text',
929
- text: 'Acme',
930
- textEnabled: true,
931
- } as any,
932
- ];
933
-
934
- // No third arg — pre-existing entries from before this feature shipped.
935
- await makerStore.applyHistorySnapshot(makerStore.brandPageData);
936
-
937
- // Still 'Acme' — no restore attempted.
938
- expect(editableLogoStore.logoEdits.textObjects[0].text).toBe('Acme');
939
- });
940
606
  });