@designcrowd/library.brand-page 6.0.19-ast-btns-6 → 6.0.19

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 (112) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-Dqv1385w.js → CreatedOnBrandCrowd-de-de-DCwwdYPj.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-DuA7uGNz.js → CreatedOnBrandCrowd-en-us-DTmZeDQ1.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-CaSTc5HM.js → CreatedOnBrandCrowd-es-es-Dbrz6TXv.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-C9VKny9y.js → CreatedOnBrandCrowd-fr-ca-DLQhgn8T.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-C9VKny9y.js → CreatedOnBrandCrowd-fr-fr-DLQhgn8T.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-ft2V8-xm.js → CreatedOnBrandCrowd-pt-br-yAzzD2ik.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-ft2V8-xm.js → CreatedOnBrandCrowd-pt-pt-yAzzD2ik.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-BdZxdxoi.js → CreatedOnDcom-de-de-CNmNNE5o.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-Dl0XbKU2.js → CreatedOnDcom-en-us-BUmLFlS_.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-WciMRblK.js → CreatedOnDcom-es-es-DfygM_0q.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CvjUqr4M.js → CreatedOnDcom-fr-ca-DIEft8xE.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-CMALFpBz.js → CreatedOnDcom-fr-fr-Cn3jWG2n.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-C0MjZ-_y.js → CreatedOnDcom-pt-br-DXhgGwEh.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-DV9I0m0I.js → CreatedOnDcom-pt-pt-BvE9ckw1.js} +1 -1
  15. package/lib/src/brand-page/components/collapsible/Collapsible.mixin.d.ts +0 -11
  16. package/lib/src/brand-page/components/collapsible/Collapsible.mixin.js +1 -13
  17. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +0 -1
  18. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +3 -12
  19. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +0 -5
  20. package/lib/src/brand-page/components/media/Media.mixin.d.ts +10 -1
  21. package/lib/src/brand-page/components/media/Media.mixin.js +13 -0
  22. package/lib/src/brand-page/components/page/Page.mixin.d.ts +5 -0
  23. package/lib/src/brand-page/components/page/Page.mixin.js +8 -1
  24. package/lib/src/brand-page/components/payment/Payment.mixin.js +0 -5
  25. package/lib/src/brand-page/models/index.d.ts +0 -1
  26. package/lib/src/brand-page/models/payment.model.d.ts +0 -2
  27. package/lib/src/brand-page/utils/button.util.d.ts +0 -5
  28. package/lib/src/brand-page/utils/button.util.js +0 -13
  29. package/lib/src/brand-page/utils/index.d.ts +1 -0
  30. package/lib/src/brand-page/utils/index.js +1 -0
  31. package/lib/src/brand-page/utils/migration.util.js +0 -19
  32. package/lib/src/brand-page/utils/page-heading.util.d.ts +13 -0
  33. package/lib/src/brand-page/utils/page-heading.util.js +24 -0
  34. package/lib/src/brand-page/utils/view-model.util.js +0 -1
  35. package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.d.ts +0 -1
  36. package/lib/src/brand-page-maker/assessors/contact-form-visibility.assessor.js +0 -6
  37. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -0
  38. package/lib/src/brand-page-maker/constants/config-settings-constant.js +3 -40
  39. package/lib/src/brand-page-maker/default-getters/index.d.ts +0 -1
  40. package/lib/src/brand-page-maker/default-getters/index.js +0 -1
  41. package/lib/src/brand-page-maker/models/button-styles-config.js +3 -15
  42. package/lib/src/brand-page-maker/models/content-settings-configs.d.ts +1 -2
  43. package/lib/src/brand-page-maker/models/content-settings.js +3 -15
  44. package/lib/src/css/library.brand-page-brandCrowd.min.css +189 -217
  45. package/lib/src/css/library.brand-page-brandPage.min.css +189 -217
  46. package/lib/src/css/library.brand-page-designCom.min.css +189 -217
  47. package/lib/src/css/library.brand-page-preview.min.css +189 -217
  48. package/lib/src/index.mjs +1 -1
  49. package/lib/src/{lib-CYYPMTsG.js → lib-Bm-fYap1.js} +19001 -19326
  50. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +0 -5
  51. package/lib/src/shared/content-settings/models.d.ts +0 -1
  52. package/lib/src/shared/content-settings/store/content-settings-store.js +0 -3
  53. package/package.json +2 -2
  54. package/src/brand-page/components/about-section/AboutSection.vue +1 -1
  55. package/src/brand-page/components/about-section/AboutSection.vue.test.ts +11 -0
  56. package/src/brand-page/components/banner-section/BannerSection.vue +5 -5
  57. package/src/brand-page/components/booking-section/BookingSection.vue +1 -1
  58. package/src/brand-page/components/button/ButtonStyleWrapper.vue +44 -112
  59. package/src/brand-page/components/collapsible/Collapsible.mixin.ts +1 -14
  60. package/src/brand-page/components/contact-form/ContactForm.mixin.test.ts +0 -18
  61. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +3 -15
  62. package/src/brand-page/components/contact-form/ContactForm.vue +39 -100
  63. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +0 -6
  64. package/src/brand-page/components/mailing-list/MailingList.vue +11 -19
  65. package/src/brand-page/components/media/Media.mixin.ts +13 -0
  66. package/src/brand-page/components/media/Media.test.ts +65 -0
  67. package/src/brand-page/components/media/Media.vue +1 -1
  68. package/src/brand-page/components/page/Page.mixin.ts +8 -1
  69. package/src/brand-page/components/page/Page.vue +8 -0
  70. package/src/brand-page/components/page/Page.vue.test.ts +142 -0
  71. package/src/brand-page/components/payment/Payment.mixin.ts +0 -6
  72. package/src/brand-page/components/payment/Payment.vue +25 -44
  73. package/src/brand-page/components/payment/RequestPaymentStripe.vue +22 -26
  74. package/src/brand-page/components/profile/Profile.vue +1 -1
  75. package/src/brand-page/components/shop/Shop.vue +6 -15
  76. package/src/brand-page/components/social-links/SocialLinks.vue +1 -1
  77. package/src/brand-page/components/testimonial-section/TestimonialSection.vue +1 -1
  78. package/src/brand-page/components/text-media-section/TextMediaSection.vue +1 -1
  79. package/src/brand-page/components/text-wrapper/TextWrapper.vue +6 -1
  80. package/src/brand-page/models/index.ts +0 -1
  81. package/src/brand-page/models/payment.model.ts +0 -2
  82. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +3 -3
  83. package/src/brand-page/utils/button.util.ts +0 -17
  84. package/src/brand-page/utils/image.util.test.ts +25 -0
  85. package/src/brand-page/utils/index.ts +1 -0
  86. package/src/brand-page/utils/migration.util.ts +0 -21
  87. package/src/brand-page/utils/page-heading.util.test.ts +116 -0
  88. package/src/brand-page/utils/page-heading.util.ts +33 -0
  89. package/src/brand-page/utils/view-model.util.ts +0 -1
  90. package/src/brand-page-maker/assessors/contact-form-visibility.assessor.ts +0 -11
  91. package/src/brand-page-maker/constants/config-settings-constant.ts +2 -43
  92. package/src/brand-page-maker/default-getters/index.ts +0 -1
  93. package/src/brand-page-maker/models/button-styles-config.ts +3 -15
  94. package/src/brand-page-maker/models/content-settings-configs.ts +1 -4
  95. package/src/brand-page-maker/models/content-settings.ts +3 -16
  96. package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +0 -6
  97. package/src/shared/content-settings/models.ts +0 -3
  98. package/src/shared/content-settings/store/content-settings-store.ts +0 -3
  99. package/src/shared/logo-settings/components/EditLogoSettings.vue +1 -0
  100. package/src/shared/style-settings/components/StyleSettings.vue +0 -1
  101. package/lib/src/brand-page/utils/migration/migration-20.d.ts +0 -2
  102. package/lib/src/brand-page/utils/migration/migration-20.js +0 -28
  103. package/lib/src/brand-page/utils/migration/migration-21.d.ts +0 -2
  104. package/lib/src/brand-page/utils/migration/migration-21.js +0 -27
  105. package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.d.ts +0 -8
  106. package/lib/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.js +0 -16
  107. package/src/brand-page/components/button/ButtonStyleWrapper.vue.test.ts +0 -167
  108. package/src/brand-page/utils/migration/migration-20.test.ts +0 -115
  109. package/src/brand-page/utils/migration/migration-20.ts +0 -44
  110. package/src/brand-page/utils/migration/migration-21.test.ts +0 -112
  111. package/src/brand-page/utils/migration/migration-21.ts +0 -45
  112. package/src/brand-page-maker/default-getters/contact-form-card-color.default-getter.ts +0 -23
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "275",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "251",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "250",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "237",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as e, createElementBlock as l, createStaticVNode as a } from "vue";
2
- import { _ as t } from "./lib-CYYPMTsG.js";
2
+ import { _ as t } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, h = {
4
4
  width: "263",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CYYPMTsG.js";
2
+ import { _ as e } from "./lib-Bm-fYap1.js";
3
3
  const M = {}, Z = {
4
4
  width: "242",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CYYPMTsG.js";
2
+ import { _ as e } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, M = {
4
4
  width: "231",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CYYPMTsG.js";
2
+ import { _ as e } from "./lib-Bm-fYap1.js";
3
3
  const M = {}, Z = {
4
4
  width: "230",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CYYPMTsG.js";
2
+ import { _ as e } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as e } from "./lib-CYYPMTsG.js";
2
+ import { _ as e } from "./lib-Bm-fYap1.js";
3
3
  const i = {}, l = {
4
4
  width: "216",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CYYPMTsG.js";
2
+ import { _ as M } from "./lib-Bm-fYap1.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -1,5 +1,5 @@
1
1
  import { openBlock as H, createElementBlock as V, createStaticVNode as t } from "vue";
2
- import { _ as M } from "./lib-CYYPMTsG.js";
2
+ import { _ as M } from "./lib-Bm-fYap1.js";
3
3
  const Z = {}, e = {
4
4
  width: "232",
5
5
  height: "36",
@@ -25,11 +25,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
25
25
  required: false;
26
26
  default: undefined;
27
27
  };
28
- backgroundStyle: {
29
- type: PropType<BrandPageCssStyle>;
30
- required: false;
31
- default: undefined;
32
- };
33
28
  context: {
34
29
  type: PropType<BrandPageContext>;
35
30
  required: true;
@@ -66,11 +61,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
66
61
  required: false;
67
62
  default: undefined;
68
63
  };
69
- backgroundStyle: {
70
- type: PropType<BrandPageCssStyle>;
71
- required: false;
72
- default: undefined;
73
- };
74
64
  context: {
75
65
  type: PropType<BrandPageContext>;
76
66
  required: true;
@@ -78,7 +68,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
78
68
  }>> & Readonly<{}>, {
79
69
  titleStyle: BrandPageCssStyle;
80
70
  cardStyle: BrandPageCssStyle;
81
- backgroundStyle: BrandPageCssStyle;
82
71
  buttonStyles: BrandPageCssStyle;
83
72
  canCollapse: boolean;
84
73
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -25,11 +25,6 @@ export default defineComponent({
25
25
  required: false,
26
26
  default: undefined,
27
27
  },
28
- backgroundStyle: {
29
- type: Object,
30
- required: false,
31
- default: undefined,
32
- },
33
28
  context: {
34
29
  type: Object,
35
30
  required: true,
@@ -45,16 +40,9 @@ export default defineComponent({
45
40
  if (borderRadius === '9999px') {
46
41
  containerStyle.borderRadius = '26px';
47
42
  }
48
- // Guarded on backgroundColor so an empty {} never blanks the container
49
- // (BP/BC contact-form card colour defaults to the button fill).
50
- if (this.cardStyle?.backgroundColor) {
43
+ if (this.cardStyle) {
51
44
  containerStyle.backgroundColor = this.cardStyle.backgroundColor;
52
45
  }
53
- // Own background colour decouples the container from the button fill (BP-5800).
54
- // Guarded on backgroundColor so an empty {} never blanks the container.
55
- if (this.backgroundStyle?.backgroundColor) {
56
- containerStyle.backgroundColor = this.backgroundStyle.backgroundColor;
57
- }
58
46
  return containerStyle;
59
47
  },
60
48
  arrowStyle() {
@@ -43,7 +43,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
43
43
  isSubmitting: boolean;
44
44
  submitError: string | undefined;
45
45
  }, {
46
- isDecorativeSubmitStyle(): boolean;
47
46
  submitButtonStyle(): BrandPageCssStyle;
48
47
  submitButtonTextStyle(): BrandPageCssStyle;
49
48
  contentPaddingStyle(): {
@@ -1,7 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { FORM_FIELD_TYPES } from '@brand-page/models';
3
3
  import { getEmailValidationError, getMessageValidationError, getNameValidationError, getPhoneValidationError, } from '@brand-page/utils';
4
- import { isDecorativeButtonStyle } from '../../utils/button.util';
5
4
  import brandPageClient from '../../clients/brand-page.client';
6
5
  import { isEmail } from '../../../utils/validator.util';
7
6
  import { ALIGN_CARD_CENTER, ALIGN_CARD_CENTER_IMAGE, ALIGN_CENTERED, ALIGN_LEFT_FULL_IMAGE, ALIGN_RIGHT_FULL_IMAGE, DISPLAY_STYLE_COLLAPSED, RECAPTCHA_ACTION_CONTACT_FORM, TEXT_ONLY, } from '../../constants';
@@ -45,12 +44,6 @@ export default defineComponent({
45
44
  submitError: undefined,
46
45
  }),
47
46
  computed: {
48
- // Decorative styles (brushstroke/arrow/paper) render a shape that needs width
49
- // to read — at pure w-fit the arrow chevron collapses. Give the submit button a
50
- // ~200px min-width so the decoration looks intentional without going full-width.
51
- isDecorativeSubmitStyle() {
52
- return isDecorativeButtonStyle(this.viewModel.buttonStyles?.selectedButtonStyleId);
53
- },
54
47
  submitButtonStyle() {
55
48
  const buttonStyle = { ...this.viewModel.buttonStyles?.style };
56
49
  const buttonTextStyle = {
@@ -161,8 +154,8 @@ export default defineComponent({
161
154
  // differs by website type:
162
155
  // - brandSite: the card style (card + divided layouts) or the section
163
156
  // background (other layouts).
164
- // - brand.page / brand.contact: the container is the collapsible, whose
165
- // colour is the card colour (defaulting to the global button fill).
157
+ // - brand.page / brand.contact: there's no section background, so the
158
+ // coloured surface is the global button fill.
166
159
  // Falls back to the title colour when there's no solid colour to anchor to.
167
160
  const style = this.context.isBrandSite
168
161
  ? this.hasCard || this.isDividedContent
@@ -170,9 +163,7 @@ export default defineComponent({
170
163
  : this.hasBgColor
171
164
  ? this.viewModel.backgroundStyle
172
165
  : undefined
173
- : this.viewModel.cardStyle?.backgroundColor
174
- ? this.viewModel.cardStyle
175
- : this.viewModel.buttonStyles?.style;
166
+ : this.viewModel.buttonStyles?.style;
176
167
  return (mutedTextForBackground(backgroundColorFromStyle(style)) ??
177
168
  this.viewModel.titleStyle?.color);
178
169
  },
@@ -94,11 +94,6 @@ export default defineComponent({
94
94
  if (borderRadius === '9999px') {
95
95
  buttonStyle.borderRadius = '24px';
96
96
  }
97
- // Own background colour decouples the container from the button fill (BP-5800).
98
- if (this.viewModel.backgroundStyle?.backgroundColor) {
99
- buttonStyle.backgroundColor =
100
- this.viewModel.backgroundStyle.backgroundColor;
101
- }
102
97
  return buttonStyle;
103
98
  },
104
99
  isFormDisabled() {
@@ -68,7 +68,16 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
68
68
  }>, {}, {
69
69
  type: string | undefined;
70
70
  isImageBroken: boolean;
71
- }, {}, {
71
+ }, {
72
+ /**
73
+ * BP-5866: content images must never emit an empty `alt`. Reuses the
74
+ * shared alt fallback (author title → "{business}'s image" → "image") so
75
+ * a caller that passes no `alt-text` still renders descriptive text.
76
+ * Only consumed by the content `<FallbackImage>`; decorative/background
77
+ * images (rendered via `media`) and shapes never reach this path.
78
+ */
79
+ effectiveAltText(): string;
80
+ }, {
72
81
  onImageError(): void;
73
82
  }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
74
83
  mediaType: {
@@ -1,4 +1,5 @@
1
1
  import { defineComponent } from 'vue';
2
+ import { getImageAltText } from '@brand-page/utils';
2
3
  export default defineComponent({
3
4
  props: {
4
5
  mediaType: {
@@ -71,6 +72,18 @@ export default defineComponent({
71
72
  isImageBroken: false,
72
73
  };
73
74
  },
75
+ computed: {
76
+ /**
77
+ * BP-5866: content images must never emit an empty `alt`. Reuses the
78
+ * shared alt fallback (author title → "{business}'s image" → "image") so
79
+ * a caller that passes no `alt-text` still renders descriptive text.
80
+ * Only consumed by the content `<FallbackImage>`; decorative/background
81
+ * images (rendered via `media`) and shapes never reach this path.
82
+ */
83
+ effectiveAltText() {
84
+ return getImageAltText({ imageTitle: this.altText }, this.context);
85
+ },
86
+ },
74
87
  methods: {
75
88
  onImageError() {
76
89
  this.isImageBroken = true;
@@ -75,6 +75,11 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
75
75
  bpShowTopNavigationMobile(): boolean;
76
76
  bpShowTopNavigationDesktop(): boolean;
77
77
  slug(): string;
78
+ /**
79
+ * Text for the single page-level `<h1>` (BP-5866). Sourced from the
80
+ * business/site name + page name so it mirrors the SSR document `<title>`.
81
+ */
82
+ pageHeadingText(): string;
78
83
  shouldShowSaveContactWidget(): boolean;
79
84
  isPremiumSubscription(): boolean;
80
85
  shouldShowPopupBranding(): boolean;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent } from 'vue';
2
2
  import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
3
- import { getSlugFromContext } from '@brand-page/utils';
3
+ import { getSlugFromContext, getPageHeadingText } from '@brand-page/utils';
4
4
  import { findNavItemByRelativePath } from '@brand-page/utils/route.util';
5
5
  import { BRAND_PAGE_TYPES } from '@brand-page/models';
6
6
  import { hasProfileContent as checkHasProfileContent } from '@brand-page/utils/vcard.util';
@@ -292,6 +292,13 @@ export default defineComponent({
292
292
  slug() {
293
293
  return getSlugFromContext(this.context);
294
294
  },
295
+ /**
296
+ * Text for the single page-level `<h1>` (BP-5866). Sourced from the
297
+ * business/site name + page name so it mirrors the SSR document `<title>`.
298
+ */
299
+ pageHeadingText() {
300
+ return getPageHeadingText(this.context);
301
+ },
295
302
  shouldShowSaveContactWidget() {
296
303
  try {
297
304
  if ((!this.context.isPreview &&
@@ -77,11 +77,6 @@ export default defineComponent({
77
77
  if (borderRadius === '9999px') {
78
78
  buttonStyle.borderRadius = '26px';
79
79
  }
80
- // Own background colour decouples the container from the button fill (BP-5800).
81
- if (this.viewModel.backgroundStyle?.backgroundColor) {
82
- buttonStyle.backgroundColor =
83
- this.viewModel.backgroundStyle.backgroundColor;
84
- }
85
80
  return buttonStyle;
86
81
  },
87
82
  continueButtonStyle() {
@@ -203,7 +203,6 @@ export interface MailingListContent extends Content {
203
203
  buttonText: string;
204
204
  titleStyle: TextStyleDeclaration;
205
205
  buttonTextStyle: TextStyleDeclaration;
206
- backgroundStyle?: BrandPageCssStyle;
207
206
  }
208
207
  export declare const FORM_FIELD_TYPES: {
209
208
  readonly text: "text";
@@ -134,7 +134,6 @@ export interface RequestPaymentContent extends Content {
134
134
  descriptionStyle?: TextStyleDeclaration;
135
135
  itemTextStyle: TextStyleDeclaration;
136
136
  buttonTextStyle?: TextStyleDeclaration;
137
- backgroundStyle?: BrandPageCssStyle;
138
137
  }
139
138
  export interface ShopContentConfig extends PaymentConfig {
140
139
  paymentOptionDisplayType: PaymentOptionDisplayType;
@@ -175,7 +174,6 @@ export interface SupportMeContent extends Content {
175
174
  descriptionStyle: TextStyleDeclaration;
176
175
  buttonTextStyle: TextStyleDeclaration;
177
176
  itemTextStyle: TextStyleDeclaration;
178
- backgroundStyle?: BrandPageCssStyle;
179
177
  }
180
178
  export interface CreateStripePaymentIntentResponse {
181
179
  paymentIntent: StripePaymentIntent;
@@ -5,8 +5,3 @@ import type { ButtonStyles } from '../models';
5
5
  * @returns The calculated box shadow CSS value
6
6
  */
7
7
  export declare const getBoxShadowValue: (buttonStyles: ButtonStyles) => string;
8
- export declare const BUTTON_STYLE_BRUSHSTROKE = "BUTTON_STYLE_19";
9
- export declare const BUTTON_STYLE_ARROW = "BUTTON_STYLE_20";
10
- export declare const BUTTON_STYLE_PAPER = "BUTTON_STYLE_21";
11
- export declare const DECORATIVE_BUTTON_STYLE_IDS: string[];
12
- export declare const isDecorativeButtonStyle: (styleId?: string) => boolean;
@@ -27,16 +27,3 @@ export const getBoxShadowValue = (buttonStyles) => {
27
27
  }
28
28
  return boxShadowValue;
29
29
  };
30
- // The "decorative" button styles — brushstroke / arrow / torn-paper — whose visual
31
- // is drawn by ButtonStyleWrapper rather than plain CSS. Their banner-like SVG
32
- // decoration needs the button to be reasonably wide to render legibly, so narrow
33
- // (w-fit) hosts should widen when one of these is active (BP-5800).
34
- export const BUTTON_STYLE_BRUSHSTROKE = 'BUTTON_STYLE_19';
35
- export const BUTTON_STYLE_ARROW = 'BUTTON_STYLE_20';
36
- export const BUTTON_STYLE_PAPER = 'BUTTON_STYLE_21';
37
- export const DECORATIVE_BUTTON_STYLE_IDS = [
38
- BUTTON_STYLE_BRUSHSTROKE,
39
- BUTTON_STYLE_ARROW,
40
- BUTTON_STYLE_PAPER,
41
- ];
42
- export const isDecorativeButtonStyle = (styleId) => !!styleId && DECORATIVE_BUTTON_STYLE_IDS.includes(styleId);
@@ -6,6 +6,7 @@ export * from './model.util';
6
6
  export * from './validation.util';
7
7
  export * from './payment.util';
8
8
  export * from './image.util';
9
+ export * from './page-heading.util';
9
10
  export * from './font-loader.util';
10
11
  export * from './aspect-ratio.util';
11
12
  export * from './context.util';
@@ -6,6 +6,7 @@ export * from './model.util';
6
6
  export * from './validation.util';
7
7
  export * from './payment.util';
8
8
  export * from './image.util';
9
+ export * from './page-heading.util';
9
10
  export * from './font-loader.util';
10
11
  export * from './aspect-ratio.util';
11
12
  export * from './context.util';
@@ -22,8 +22,6 @@ import { migration16 } from './migration/migration-16';
22
22
  import { migration17 } from './migration/migration-17';
23
23
  import { migration18 } from './migration/migration-18';
24
24
  import { migration19 } from './migration/migration-19';
25
- import { migration20 } from './migration/migration-20';
26
- import { migration21 } from './migration/migration-21';
27
25
  const MIGRATION_TABLE = [
28
26
  {
29
27
  version: 1,
@@ -151,23 +149,6 @@ const MIGRATION_TABLE = [
151
149
  runAlways: true,
152
150
  description: 'BP-5787: convert inline-HTML RTE content to Tiptap JSON on load (lazy migrate-on-read for web-renderer; persisted on next maker save; also normalises AI-built HTML)',
153
151
  },
154
- {
155
- version: 20,
156
- migrateFn: migration20,
157
- // runAlways: re-apply on every load so already-published sites pick up the seed
158
- // without a version bump. Idempotent — only seeds backgroundColor when unset.
159
- runAlways: true,
160
- description: 'BP-5800: seed own container backgroundStyle from the button fill colour for mailing-list, request-payment and support-me so the container background is independent of the site button (existing sites render unchanged)',
161
- },
162
- {
163
- version: 21,
164
- migrateFn: migration21,
165
- // runAlways: seed on every load so content already at the latest version
166
- // (skipped by a version gate) still detaches. Idempotent — only seeds
167
- // cardStyle.backgroundColor when unset, so a user colour is never clobbered.
168
- runAlways: true,
169
- description: 'BP-5800: contact-form BP/BC container colour moves to cardStyle — seed cardStyle from the button fill (its long-standing rendered colour) so existing sites render unchanged',
170
- },
171
152
  ];
172
153
  export const GetLatestModelVersion = () => Math.max(...MIGRATION_TABLE.map((x) => x.version));
173
154
  export const migrateBrandPageModel = async (brandPageModel, options) => {
@@ -0,0 +1,13 @@
1
+ import type { BrandPageContext } from '../models';
2
+ /**
3
+ * Resolves the text for the single page-level `<h1>` a published site renders
4
+ * (BP-5866 — Bing rejected indexing because every section emitted its own
5
+ * `<h1>`; the page now owns exactly one).
6
+ *
7
+ * Mirrors the SSR `<title>` rule so the crawlable heading matches the document
8
+ * title: a sub-page reads `"{business} - {page}"`, while the home/root page
9
+ * reads just the business/site name — never the weak, non-descriptive literal
10
+ * "Home". Falls back to the page name, then the slug, when the business name
11
+ * is unset.
12
+ */
13
+ export declare const getPageHeadingText: (context: BrandPageContext) => string;
@@ -0,0 +1,24 @@
1
+ import { findNavItemByRelativePath } from './route.util';
2
+ /**
3
+ * Resolves the text for the single page-level `<h1>` a published site renders
4
+ * (BP-5866 — Bing rejected indexing because every section emitted its own
5
+ * `<h1>`; the page now owns exactly one).
6
+ *
7
+ * Mirrors the SSR `<title>` rule so the crawlable heading matches the document
8
+ * title: a sub-page reads `"{business} - {page}"`, while the home/root page
9
+ * reads just the business/site name — never the weak, non-descriptive literal
10
+ * "Home". Falls back to the page name, then the slug, when the business name
11
+ * is unset.
12
+ */
13
+ export const getPageHeadingText = (context) => {
14
+ const businessName = (context.pageTitle || '').trim();
15
+ const navItem = findNavItemByRelativePath(context.nav?.navItems || [], context.currentPageRelativePath || '');
16
+ const pageName = (navItem?.displayName || '').trim();
17
+ const isSubPage = Boolean(navItem && !navItem.isRoot && pageName);
18
+ if (businessName) {
19
+ return isSubPage ? `${businessName} - ${pageName}` : businessName;
20
+ }
21
+ // No business name: use the sub-page's name, else the slug — never the
22
+ // root page's own display name (usually the literal "Home").
23
+ return (isSubPage ? pageName : '') || context.brandPageSlug || '';
24
+ };
@@ -526,7 +526,6 @@ const mapToShapesSectionViewModel = (content, styles, brandPageType) => {
526
526
  };
527
527
  const mapToShopViewModel = (content, styles) => {
528
528
  const buttonStyles = new ButtonStyles({
529
- selectedButtonStyleId: styles.buttonStyles.selectedButtonStyleId,
530
529
  style: {
531
530
  ...styles.buttonStyles.style,
532
531
  },
@@ -1,7 +1,6 @@
1
1
  import { type ContactFormContent } from '@brand-page';
2
2
  import type { VisibilityAssessor } from '../models';
3
3
  export declare const contactCardDisplayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
4
- export declare const contactCardColorVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
5
4
  export declare const displayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
6
5
  export declare const imageUrlVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
7
6
  export declare const contactBackgroundDisplayTypeVisibilityAssessor: VisibilityAssessor<ContactFormContent | undefined>;
@@ -9,12 +9,6 @@ export const contactCardDisplayTypeVisibilityAssessor = (content, context) => {
9
9
  ALIGN_RIGHT_FULL_IMAGE,
10
10
  ].includes(content?.layoutStyle)) && context.isBrandSite);
11
11
  };
12
- // Card colour picker: on brand-page/brand-contact it's the collapsible container
13
- // colour (shown for every layout); on brand-site it's the card in card layouts.
14
- export const contactCardColorVisibilityAssessor = (content, context) => {
15
- return (!context.isBrandSite ||
16
- contactCardDisplayTypeVisibilityAssessor(content, context));
17
- };
18
12
  export const displayTypeVisibilityAssessor = (content, context) => {
19
13
  return Boolean(content?.layoutStyle === '' || context.isBrandPage);
20
14
  };
@@ -1347,6 +1347,7 @@ declare const _default: import("vue").DefineComponent<{}, {
1347
1347
  bpShowTopNavigationMobile(): boolean;
1348
1348
  bpShowTopNavigationDesktop(): boolean;
1349
1349
  slug(): string;
1350
+ pageHeadingText(): string;
1350
1351
  shouldShowSaveContactWidget(): boolean;
1351
1352
  isPremiumSubscription(): boolean;
1352
1353
  shouldShowPopupBranding(): boolean;
@@ -3,8 +3,8 @@ import { createInitialButtonContent, createInitialImageContent, createInitialPro
3
3
  import * as uuid from 'uuid';
4
4
  import { colorConvertor, backgroundColorConvertor, borderColorConvertor, displayStyleConvertor, galleryTypeConvertor, imageAspectRatioConvertor, textAlignmentOptionsConvertor, videoContentStateConvertor, fillColorConvertor, bannerAlignDisplayStyleConvertor, aboutDisplayStyleConvertor, dividerStyleConvertor, shapeSizeOptionsConvertor, buttonLinkStyleConvertor, textSizeValueConvertor, textColumnStyleConvertor, contactLayoutStyleConvertor, paymentLinkDisplayStyleConvertor, shopDisplayConvertor, shopAspectRatioConvertor, } from '../convertors';
5
5
  import { ALIGN_CENTERED, DISPLAY_STYLE_COLLAPSED, DISPLAY_STYLE_PREVIEW, } from '@brand-page';
6
- import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor, contactCardColorVisibilityAssessor, imageUrlVisibilityAssessor, displayTypeVisibilityAssessor, logoFieldVisibilityAssessor, shapesSectionCardStyleVisibilityAssessor, shopImageOptionVisibilityAssessor, shopItemColorVisibility, personalisationOverrideVisibility, } from '../assessors';
7
- import { contactFormCardColorDefaultGetter, logoBackgroundColorDefaultGetter, paymentFillColorFieldDefaultGetter, paymentTextAndBorderColorFieldDefaultGetter, shopBorderColorFieldDefaultGetter, shopFillColorFieldDefaultGetter, textColorFieldDefaultGetter, } from '../default-getters';
6
+ import { imageFieldVisibilityAssessor, imageOptionVisibilityAssessor, imageGalleryFieldVisibilityAssessor, cardFillVisibilityAssessor, mediaSectionItemsFieldTypeAssessor, dividerToggleFieldVisibilityAssessor, shapeSectionItemsFieldTypeAssessor, colorReplacementVisibilityTypeAssessor, colorReplacementProfileVisibilityTypeAssessor, colorReplacementIconVisibilityTypeAssessor, imagesSectionCardStyleVisibilityAssessor, contactCardDisplayTypeVisibilityAssessor, imageUrlVisibilityAssessor, displayTypeVisibilityAssessor, logoFieldVisibilityAssessor, shapesSectionCardStyleVisibilityAssessor, shopImageOptionVisibilityAssessor, shopItemColorVisibility, personalisationOverrideVisibility, } from '../assessors';
7
+ import { logoBackgroundColorDefaultGetter, paymentFillColorFieldDefaultGetter, paymentTextAndBorderColorFieldDefaultGetter, shopBorderColorFieldDefaultGetter, shopFillColorFieldDefaultGetter, textColorFieldDefaultGetter, } from '../default-getters';
8
8
  import { socialLinksIconDisplayStyleConvertor } from '../convertors/social-links-icon-display-style.convertor';
9
9
  import { getTextMediaOptionsConverterByMediaType } from '../convertors/text-image-display-style.convertor';
10
10
  import { testimonialDisplayStyleConvertor } from '../convertors/testimonial-display-style-convertor';
@@ -455,7 +455,6 @@ const testimonialReplaceImageSettings = () => ({
455
455
  desiredWidth: undefined,
456
456
  mediaType: MEDIA_TYPES.image,
457
457
  });
458
- const disableTransparentOffBrandSite = (brandPageType) => brandPageType !== BRAND_PAGE_TYPES.brandSite;
459
458
  export const LOGO_SETTINGS_CONFIG = () => ({
460
459
  createInitialContent: createInitialLogoContent,
461
460
  type: 'logo',
@@ -1464,17 +1463,6 @@ export const MAILING_LIST_CONTENT_SETTINGS_CONFIG = () => ({
1464
1463
  titleStyle: DEFAULT_TITLE_STYLE_SETTINGS_FILED_WITH_TITLE(),
1465
1464
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1466
1465
  ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1467
- backgroundStyle: {
1468
- type: 'color',
1469
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1470
- defaultValue: {},
1471
- isInline: true,
1472
- showToggle: false,
1473
- title: contentSettingsTr(`backgroundColorTitle`),
1474
- disableTransparent: true,
1475
- valueConvertor: backgroundColorConvertor,
1476
- defaultGetter: paymentFillColorFieldDefaultGetter,
1477
- },
1478
1466
  },
1479
1467
  isEnabled: true,
1480
1468
  isLocked: false,
@@ -1646,17 +1634,6 @@ export const REQUEST_PAYMENT_CONTENT_SETTINGS_CONFIG = () => ({
1646
1634
  label: contentSettingsTr(`buttonTextStyleLabel`),
1647
1635
  },
1648
1636
  ...PADDING_CONTROL_FIELDS(REQUEST_PAYMENT_GROUPS.style),
1649
- backgroundStyle: {
1650
- type: 'color',
1651
- groupId: REQUEST_PAYMENT_GROUPS.style,
1652
- defaultValue: {},
1653
- isInline: true,
1654
- showToggle: false,
1655
- title: contentSettingsTr(`backgroundColorTitle`),
1656
- disableTransparent: true,
1657
- valueConvertor: backgroundColorConvertor,
1658
- defaultGetter: paymentFillColorFieldDefaultGetter,
1659
- },
1660
1637
  },
1661
1638
  isEnabled: (features) => features.canAddRequestPaymentContents,
1662
1639
  isLocked: false,
@@ -1722,17 +1699,6 @@ export const SUPPORT_ME_CONTENT_SETTINGS_CONFIG = () => ({
1722
1699
  },
1723
1700
  buttonTextStyle: DEFAULT_BUTTON_TEXT_STYLE_FIELD(),
1724
1701
  ...PADDING_CONTROL_FIELDS(SETTINGS_STYLE_FIELD_GROUP_IDS.style),
1725
- backgroundStyle: {
1726
- type: 'color',
1727
- groupId: SETTINGS_STYLE_FIELD_GROUP_IDS.style,
1728
- defaultValue: {},
1729
- isInline: true,
1730
- showToggle: false,
1731
- title: contentSettingsTr(`backgroundColorTitle`),
1732
- disableTransparent: true,
1733
- valueConvertor: backgroundColorConvertor,
1734
- defaultGetter: paymentFillColorFieldDefaultGetter,
1735
- },
1736
1702
  },
1737
1703
  isEnabled: (features) => features.canAddRequestPaymentContents,
1738
1704
  isLocked: false,
@@ -1871,8 +1837,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1871
1837
  disableTransparent: true,
1872
1838
  title: contentSettingsTr(`cardColorTitle`),
1873
1839
  valueConvertor: backgroundColorConvertor,
1874
- visibilityAssessor: contactCardColorVisibilityAssessor,
1875
- defaultGetter: contactFormCardColorDefaultGetter,
1840
+ visibilityAssessor: contactCardDisplayTypeVisibilityAssessor,
1876
1841
  },
1877
1842
  backgroundStyle: {
1878
1843
  type: 'color',
@@ -1881,9 +1846,7 @@ export const CONTACT_FORM_SETTINGS_CONFIG = () => ({
1881
1846
  isInline: true,
1882
1847
  showToggle: false,
1883
1848
  title: contentSettingsTr(`backgroundColorTitle`),
1884
- disableTransparent: disableTransparentOffBrandSite,
1885
1849
  valueConvertor: backgroundColorConvertor,
1886
- visibilityAssessor: brandSiteTypeVisibilityAssessor,
1887
1850
  },
1888
1851
  },
1889
1852
  isEnabled: true,
@@ -2,4 +2,3 @@ export * from './text-color.default-getter';
2
2
  export * from './payment-fill-color.default-getter';
3
3
  export * from './payment-text-and-border-color.default-getter';
4
4
  export * from './logo-background-fill.default-getter';
5
- export * from './contact-form-card-color.default-getter';
@@ -2,4 +2,3 @@ export * from './text-color.default-getter';
2
2
  export * from './payment-fill-color.default-getter';
3
3
  export * from './payment-text-and-border-color.default-getter';
4
4
  export * from './logo-background-fill.default-getter';
5
- export * from './contact-form-card-color.default-getter';