@designcrowd/library.brand-page 6.1.0-websitev2-dev-2 → 6.1.0

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 (97) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-D_qQ0sPW.js → CreatedOnBrandCrowd-de-de-CW5bD06L.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-CNMxavFU.js → CreatedOnBrandCrowd-en-us-CofG4e3V.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-Cyaiw1-R.js → CreatedOnBrandCrowd-es-es-XpL0-LWx.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-DbniOtuE.js → CreatedOnBrandCrowd-fr-ca-dlVN3zaX.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-fr-ca-DbniOtuE.js → CreatedOnBrandCrowd-fr-fr-dlVN3zaX.js} +1 -1
  6. package/lib/src/{CreatedOnBrandCrowd-pt-pt-DI3JfwR8.js → CreatedOnBrandCrowd-pt-br-98gqdDVF.js} +1 -1
  7. package/lib/src/{CreatedOnBrandCrowd-pt-br-DI3JfwR8.js → CreatedOnBrandCrowd-pt-pt-98gqdDVF.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-de-de-DqBzJ_O9.js → CreatedOnDcom-de-de-Dbmlc0i1.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-en-us-B8uZjYMi.js → CreatedOnDcom-en-us-Dy9z7h1o.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-es-es-BOLxcx3H.js → CreatedOnDcom-es-es-B3ksvNj9.js} +1 -1
  11. package/lib/src/{CreatedOnDcom-fr-ca-CbGneDvu.js → CreatedOnDcom-fr-ca-CC9ieRzX.js} +1 -1
  12. package/lib/src/{CreatedOnDcom-fr-fr-B-UwXpW3.js → CreatedOnDcom-fr-fr-BtnGJjF2.js} +1 -1
  13. package/lib/src/{CreatedOnDcom-pt-br-CRPrLx5_.js → CreatedOnDcom-pt-br-DT4doFYO.js} +1 -1
  14. package/lib/src/{CreatedOnDcom-pt-pt-4p2rdAnc.js → CreatedOnDcom-pt-pt-CloXyOe6.js} +1 -1
  15. package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +3 -5
  16. package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +4 -6
  17. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +0 -1
  18. package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +1 -4
  19. package/lib/src/brand-page/components/payment/Payment.mixin.js +3 -4
  20. package/lib/src/brand-page/components/payment/__fixtures__/request-payment.d.ts +0 -1
  21. package/lib/src/brand-page/components/payment/__fixtures__/support-me.d.ts +0 -1
  22. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.d.ts +0 -1
  23. package/lib/src/brand-page/components/payment/request-payment/RequestPayment.mixin.js +1 -4
  24. package/lib/src/brand-page/composables/consent.composable.d.ts +0 -2
  25. package/lib/src/brand-page/composables/consent.composable.js +3 -9
  26. package/lib/src/brand-page/models/brand-page-context.model.d.ts +0 -7
  27. package/lib/src/brand-page/utils/context.util.d.ts +0 -8
  28. package/lib/src/brand-page/utils/context.util.js +0 -8
  29. package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +3 -7
  30. package/lib/src/clients/ai-assistant-client.d.ts +0 -1
  31. package/lib/src/clients/ai-assistant-client.js +0 -1
  32. package/lib/src/css/library.brand-page-brandCrowd.min.css +60 -60
  33. package/lib/src/css/library.brand-page-brandPage.min.css +60 -60
  34. package/lib/src/css/library.brand-page-designCom.min.css +60 -60
  35. package/lib/src/css/library.brand-page-preview.min.css +60 -60
  36. package/lib/src/index.d.ts +0 -1
  37. package/lib/src/index.mjs +217 -220
  38. package/lib/src/{lib-DhEJMZFn.js → lib-D7ubPlpu.js} +18168 -18341
  39. package/lib/src/lib.js +0 -1
  40. package/lib/src/metadata-builder/builders/global-styles-builder.js +0 -16
  41. package/lib/src/metadata-builder/builders/section-builders/index.d.ts +0 -1
  42. package/lib/src/metadata-builder/builders/section-builders/index.js +0 -1
  43. package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +2 -5
  44. package/lib/src/metadata-builder/builders/section-field-maps.js +0 -15
  45. package/lib/src/metadata-builder/builders/section-field-utils.d.ts +1 -6
  46. package/lib/src/metadata-builder/builders/section-field-utils.js +12 -48
  47. package/lib/src/metadata-builder/metadata-executor.js +1 -3
  48. package/lib/src/metadata-builder/models.d.ts +0 -2
  49. package/lib/src/metadata-builder/models.js +0 -2
  50. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +0 -1
  51. package/lib/src/metadata-builder/parsers/ai-toolcall-parser.js +0 -4
  52. package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +2 -14
  53. package/lib/src/utils/minify-brand-page-metadata.js +0 -7
  54. package/package.json +1 -1
  55. package/src/brand-page/components/contact-form/ContactForm.mixin.ts +2 -7
  56. package/src/brand-page/components/cookie-consent/CookieConsent.vue +0 -1
  57. package/src/brand-page/components/mailing-list/MailingList.mixin.ts +3 -8
  58. package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +1 -5
  59. package/src/brand-page/components/page-footer/PageFooter.mixin.ts +1 -4
  60. package/src/brand-page/components/page-footer/PageFooter.vue +1 -1
  61. package/src/brand-page/components/payment/Payment.mixin.ts +3 -4
  62. package/src/brand-page/components/payment/request-payment/RequestPayment.mixin.ts +1 -8
  63. package/src/brand-page/components/payment/request-payment/RequestPayment.vue +1 -1
  64. package/src/brand-page/components/save-contact/SaveContactWidget.vue +1 -2
  65. package/src/brand-page/components/shop/Shop.vue +3 -6
  66. package/src/brand-page/components/social-links/SocialLinks.vue +2 -5
  67. package/src/brand-page/composables/consent.composable.ts +4 -18
  68. package/src/brand-page/models/brand-page-context.model.ts +0 -7
  69. package/src/brand-page/utils/context.util.ts +0 -10
  70. package/src/brand-page-maker/components/ai-website-builder/AiWebsiteBuilder.vue +1 -1
  71. package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +3 -7
  72. package/src/clients/ai-assistant-client.ts +0 -1
  73. package/src/lib.ts +0 -1
  74. package/src/metadata-builder/builders/global-styles-builder.ts +0 -21
  75. package/src/metadata-builder/builders/section-builders/index.ts +0 -1
  76. package/src/metadata-builder/builders/section-builders/text-section-builder.ts +2 -5
  77. package/src/metadata-builder/builders/section-field-maps.ts +0 -18
  78. package/src/metadata-builder/builders/section-field-utils.ts +18 -69
  79. package/src/metadata-builder/metadata-executor.ts +0 -3
  80. package/src/metadata-builder/models.ts +0 -2
  81. package/src/metadata-builder/parsers/ai-toolcall-parser.ts +0 -4
  82. package/src/metadata-builder/parsers/section-tool-arguments.ts +1 -14
  83. package/src/utils/minify-brand-page-metadata.ts +0 -8
  84. package/lib/src/metadata-builder/builders/global-font-propagation.d.ts +0 -28
  85. package/lib/src/metadata-builder/builders/global-font-propagation.js +0 -125
  86. package/lib/src/metadata-builder/builders/section-builders/support-me-builder.d.ts +0 -8
  87. package/lib/src/metadata-builder/builders/section-builders/support-me-builder.js +0 -25
  88. package/lib/src/metadata-builder/builders/section-rules/support-me.rules.d.ts +0 -2
  89. package/lib/src/metadata-builder/builders/section-rules/support-me.rules.js +0 -17
  90. package/src/brand-page/utils/context.util.test.ts +0 -43
  91. package/src/metadata-builder/builders/global-font-propagation.test.ts +0 -269
  92. package/src/metadata-builder/builders/global-font-propagation.ts +0 -205
  93. package/src/metadata-builder/builders/section-builders/support-me-builder.test.ts +0 -177
  94. package/src/metadata-builder/builders/section-builders/support-me-builder.ts +0 -43
  95. package/src/metadata-builder/builders/section-field-utils.test.ts +0 -83
  96. package/src/metadata-builder/builders/section-rules/support-me.rules.ts +0 -39
  97. package/src/utils/minify-brand-page-metadata.test.ts +0 -61
package/lib/src/lib.js CHANGED
@@ -22,7 +22,6 @@ export { BrandPageMaker, SeoPageSettings, UrlSettings, GoogleAnalytics, PublishB
22
22
  import LogoRender from './brand-page/components/logo/LogoRender.vue';
23
23
  export { LogoRender };
24
24
  export { default as Page } from './brand-page/components/page/Page.vue';
25
- export { Loader } from '@designcrowd/fe-shared-lib';
26
25
  export { default as CookieConsent } from './brand-page/components/cookie-consent/CookieConsent.vue';
27
26
  export { default as SensitiveContentModal } from './brand-page/components/sensitive-content/SensitiveContentModal.vue';
28
27
  // functions
@@ -1,7 +1,6 @@
1
1
  import {} from '../../brand-page/models';
2
2
  import { BaseMetadataBuilder, } from '../models';
3
3
  import { GLOBAL_STYLE_CHECKS, TEXT_STYLE_OPTION_KEYS, } from './section-rules/global-styles.rules';
4
- import { collectChangedFontFamilies, propagateFontFamiliesToContents, } from './global-font-propagation';
5
4
  export class GlobalStylesBuilder extends BaseMetadataBuilder {
6
5
  constructor(request, logger) {
7
6
  super(request, logger);
@@ -31,21 +30,6 @@ export class GlobalStylesBuilder extends BaseMetadataBuilder {
31
30
  }
32
31
  if (args.textStyles) {
33
32
  this.applyTextStyles(model, args.textStyles);
34
- // A category font change only reaches preset-bound content by itself;
35
- // detached section styles and inline RTE font marks would still render
36
- // the old family. Propagate so the change is actually visible (BP-5780).
37
- const changedFamilies = collectChangedFontFamilies(args.textStyles);
38
- if (Object.keys(changedFamilies).length) {
39
- try {
40
- propagateFontFamiliesToContents(model, changedFamilies);
41
- }
42
- catch (error) {
43
- this.log({
44
- message: 'Global font propagation to existing contents failed — presets still updated',
45
- error,
46
- });
47
- }
48
- }
49
33
  }
50
34
  if (args.buttonStyles) {
51
35
  this.applyButtonStyles(model, args.buttonStyles);
@@ -1,7 +1,6 @@
1
1
  export { BaseSectionBuilder, type SectionBuilderPayload, } from './base-section-builder';
2
2
  export { BannerSectionBuilder } from './banner-section-builder';
3
3
  export { BookingSectionBuilder } from './booking-section-builder';
4
- export { SupportMeBuilder } from './support-me-builder';
5
4
  export { AboutSectionBuilder } from './about-section-builder';
6
5
  export { ContactFormBuilder } from './contact-form-builder';
7
6
  export { DividerSectionBuilder } from './divider-section-builder';
@@ -1,7 +1,6 @@
1
1
  export { BaseSectionBuilder, } from './base-section-builder';
2
2
  export { BannerSectionBuilder } from './banner-section-builder';
3
3
  export { BookingSectionBuilder } from './booking-section-builder';
4
- export { SupportMeBuilder } from './support-me-builder';
5
4
  export { AboutSectionBuilder } from './about-section-builder';
6
5
  export { ContactFormBuilder } from './contact-form-builder';
7
6
  export { DividerSectionBuilder } from './divider-section-builder';
@@ -131,17 +131,14 @@ export class TextSectionBuilder extends BaseSectionBuilder {
131
131
  applyTextItems(content, args.items, textStyleOptions);
132
132
  }
133
133
  else if (this.mode === 'create') {
134
- // An EMPTY items array must not shadow the single text field — the AI emits
135
- // `items: []` alongside `text` and the section rendered blank (QA 2026-07-05,
136
- // T06: items=[] set textItems=[] and `text` was silently discarded).
137
- if (args.items && Array.isArray(args.items) && args.items.length > 0) {
134
+ if (args.items && Array.isArray(args.items)) {
138
135
  applyTextItems(content, args.items, textStyleOptions);
139
136
  }
140
137
  else {
141
138
  applySingleTextField(content, args, textStyleOptions);
142
139
  }
143
140
  }
144
- else if ((args.items && Array.isArray(args.items) && args.items.length > 0) ||
141
+ else if ((args.items && Array.isArray(args.items)) ||
145
142
  args._remove_item_ids?.length) {
146
143
  // Update: id-based add / edit / move / remove in a single pass.
147
144
  mergeTextItems(content, args.items ?? [], args._remove_item_ids, textStyleOptions);
@@ -131,16 +131,9 @@ const socialButtonFields = defineFieldMap({
131
131
  title: 'title',
132
132
  url: 'url',
133
133
  });
134
- const supportMeFields = defineFieldMap({
135
- title: 'title',
136
- description: 'description',
137
- success_message: 'successMessage',
138
- display_style: 'displayStyle',
139
- });
140
134
  export const SECTION_FIELD_MAPS = {
141
135
  'banner-section': bannerFields,
142
136
  'booking-section': bookingFields,
143
- 'support-me': supportMeFields,
144
137
  'about-section': aboutFields,
145
138
  'testimonial-section': testimonialFields,
146
139
  'images-section': imagesSectionFields,
@@ -215,13 +208,6 @@ const mailingListStyleFields = defineFieldMap({
215
208
  title_style: 'titleStyle',
216
209
  button_text_style: 'buttonTextStyle',
217
210
  });
218
- const supportMeStyleFields = defineFieldMap({
219
- title_style: 'titleStyle',
220
- heading_style: 'headingStyle',
221
- description_style: 'descriptionStyle',
222
- item_text_style: 'itemTextStyle',
223
- button_text_style: 'buttonTextStyle',
224
- });
225
211
  const socialLinksStyleFields = defineFieldMap({
226
212
  icon_fill_style: 'iconFillStyles',
227
213
  icon_background_style: 'iconBackgroundStyles',
@@ -229,7 +215,6 @@ const socialLinksStyleFields = defineFieldMap({
229
215
  export const STYLE_FIELD_MAPS = {
230
216
  'banner-section': bannerStyleFields,
231
217
  'booking-section': bookingStyleFields,
232
- 'support-me': supportMeStyleFields,
233
218
  'about-section': aboutStyleFields,
234
219
  text: textStyleFields,
235
220
  'testimonial-section': testimonialStyleFields,
@@ -53,10 +53,5 @@ export declare const resolveGlobalPresetIntoStyle: (style: object | undefined, t
53
53
  * updates without re-resolving a preset.
54
54
  */
55
55
  export declare const applyDetachedStyleOverride: <T extends object>(current: T | undefined, updates: Partial<T>, textStyleOptions: TextStyleOptions | undefined) => T;
56
- /**
57
- * Rewrites the stored RTE HTML's inline colour marks. Injectable for tests;
58
- * the default uses the external Tiptap editor (font-propagation precedent).
59
- */
60
- export type ApplyColorToRTE = (html: string, color: string) => string;
61
- export declare const applyStyleFields: (content: Content, args: SectionToolArguments, sectionType: string, textStyleOptions?: TextStyleOptions, applyColor?: ApplyColorToRTE) => void;
56
+ export declare const applyStyleFields: (content: Content, args: SectionToolArguments, sectionType: string, textStyleOptions?: TextStyleOptions) => void;
62
57
  export {};
@@ -1,8 +1,5 @@
1
1
  import { BUTTON_LINK_TYPE } from '../../brand-page/models';
2
2
  import { isTiptapDocument, } from '../parsers/section-tool-arguments';
3
- import { hasRTEContent } from '../../brand-page-maker/utils';
4
- import { useExternalRichTextEditor } from '../../brand-page-maker/composables/rich-text-editor/useRichTextEditor';
5
- import { applyStyleToRTEText } from '../helpers/rte.helpers';
6
3
  import { getSectionFieldMap, getStyleFieldMap } from './section-field-maps';
7
4
  const isUrlField = (aiKey) => aiKey.endsWith('_url');
8
5
  export const isValidUrl = (value) => {
@@ -120,55 +117,22 @@ export const applyDetachedStyleOverride = (current, updates, textStyleOptions) =
120
117
  ...resolveGlobalPresetIntoStyle(current, textStyleOptions),
121
118
  ...updates,
122
119
  });
123
- export const applyStyleFields = (content, args, sectionType, textStyleOptions, applyColor) => {
120
+ export const applyStyleFields = (content, args, sectionType, textStyleOptions) => {
124
121
  const styleMap = getStyleFieldMap(sectionType);
125
122
  if (!styleMap)
126
123
  return;
127
124
  const record = content;
128
- let editor;
129
- const applyColorToHtml = applyColor ??
130
- ((html, color) => {
131
- editor = editor ?? useExternalRichTextEditor().externalEditor;
132
- return applyStyleToRTEText(editor, html, {
133
- color,
134
- });
135
- });
136
- try {
137
- for (const [aiKey, modelKey] of Object.entries(styleMap)) {
138
- if (!(aiKey in args) || !args[aiKey] || typeof args[aiKey] !== 'object')
139
- continue;
140
- const aiStyle = args[aiKey];
141
- const filtered = {};
142
- for (const [k, v] of Object.entries(aiStyle)) {
143
- const normalized = normalizeStyleValue(k, v);
144
- if (normalized !== undefined)
145
- filtered[k] = normalized;
146
- }
147
- const resolved = resolveGlobalPresetIntoStyle(content[modelKey], textStyleOptions);
148
- record[modelKey] = { ...resolved, ...filtered, textStyleType: undefined };
149
- // A colour patch without new text leaves the field's EXISTING inline
150
- // textStyle marks in place — and inline marks override every style layer
151
- // at render, so the old colour survives on a recoloured band (invisible
152
- // text, AI QA 2026-07-05 rerun). Propagate the new colour into the
153
- // stored HTML, mirroring global-font-propagation for font families.
154
- const textKey = modelKey.endsWith('Style')
155
- ? modelKey.slice(0, -'Style'.length)
156
- : undefined;
157
- const textAiKey = aiKey.endsWith('_style')
158
- ? aiKey.slice(0, -'_style'.length)
159
- : undefined;
160
- const newColor = filtered.color;
161
- if (textKey &&
162
- typeof newColor === 'string' &&
163
- newColor &&
164
- !(textAiKey && textAiKey in args) &&
165
- typeof record[textKey] === 'string' &&
166
- hasRTEContent(record[textKey])) {
167
- record[textKey] = applyColorToHtml(record[textKey], newColor);
168
- }
125
+ for (const [aiKey, modelKey] of Object.entries(styleMap)) {
126
+ if (!(aiKey in args) || !args[aiKey] || typeof args[aiKey] !== 'object')
127
+ continue;
128
+ const aiStyle = args[aiKey];
129
+ const filtered = {};
130
+ for (const [k, v] of Object.entries(aiStyle)) {
131
+ const normalized = normalizeStyleValue(k, v);
132
+ if (normalized !== undefined)
133
+ filtered[k] = normalized;
169
134
  }
170
- }
171
- finally {
172
- editor?.destroy();
135
+ const resolved = resolveGlobalPresetIntoStyle(content[modelKey], textStyleOptions);
136
+ record[modelKey] = { ...resolved, ...filtered, textStyleType: undefined };
173
137
  }
174
138
  };
@@ -3,7 +3,7 @@ import {} from '../brand-page/models';
3
3
  import { BUILDER_TYPES, } from './models';
4
4
  import { UpdateContentTextBuilder } from './builders/update-content-text-builder';
5
5
  import { UpdateContentTextStyleBuilder } from './builders/update-content-text-style-builder';
6
- import { BannerSectionBuilder, BookingSectionBuilder, SupportMeBuilder, AboutSectionBuilder, ContactFormBuilder, DividerSectionBuilder, TextSectionBuilder, TestimonialSectionBuilder, ImagesSectionBuilder, ShapesSectionBuilder, SocialLinksBuilder, ImageGalleryBuilder, ProfileSectionBuilder, MailingListSectionBuilder, ButtonSectionBuilder, DeleteSectionBuilder, MoveSectionBuilder, } from './builders/section-builders';
6
+ import { BannerSectionBuilder, BookingSectionBuilder, AboutSectionBuilder, ContactFormBuilder, DividerSectionBuilder, TextSectionBuilder, TestimonialSectionBuilder, ImagesSectionBuilder, ShapesSectionBuilder, SocialLinksBuilder, ImageGalleryBuilder, ProfileSectionBuilder, MailingListSectionBuilder, ButtonSectionBuilder, DeleteSectionBuilder, MoveSectionBuilder, } from './builders/section-builders';
7
7
  import { AddPageBuilder } from './builders/add-page-builder';
8
8
  import { RemovePageBuilder } from './builders/remove-page-builder';
9
9
  import { RenamePageBuilder } from './builders/rename-page-builder';
@@ -20,7 +20,6 @@ const getBuilderRegistry = () => ({
20
20
  // Section builders (create)
21
21
  [BUILDER_TYPES.CREATE_BANNER_SECTION]: BannerSectionBuilder,
22
22
  [BUILDER_TYPES.CREATE_BOOKING_SECTION]: BookingSectionBuilder,
23
- [BUILDER_TYPES.CREATE_SUPPORT_ME]: SupportMeBuilder,
24
23
  [BUILDER_TYPES.CREATE_ABOUT_SECTION]: AboutSectionBuilder,
25
24
  [BUILDER_TYPES.CREATE_CONTACT_FORM]: ContactFormBuilder,
26
25
  [BUILDER_TYPES.CREATE_DIVIDER_SECTION]: DividerSectionBuilder,
@@ -47,7 +46,6 @@ const getBuilderRegistry = () => ({
47
46
  // Section builders (update)
48
47
  [BUILDER_TYPES.UPDATE_BANNER_SECTION]: BannerSectionBuilder,
49
48
  [BUILDER_TYPES.UPDATE_BOOKING_SECTION]: BookingSectionBuilder,
50
- [BUILDER_TYPES.UPDATE_SUPPORT_ME]: SupportMeBuilder,
51
49
  [BUILDER_TYPES.UPDATE_ABOUT_SECTION]: AboutSectionBuilder,
52
50
  [BUILDER_TYPES.UPDATE_CONTACT_FORM]: ContactFormBuilder,
53
51
  [BUILDER_TYPES.UPDATE_DIVIDER_SECTION]: DividerSectionBuilder,
@@ -29,7 +29,6 @@ export declare const BUILDER_TYPES: {
29
29
  readonly CREATE_TWITCH: "create-twitch";
30
30
  readonly CREATE_TIKTOK: "create-tiktok";
31
31
  readonly CREATE_BOOKING_SECTION: "create-booking-section";
32
- readonly CREATE_SUPPORT_ME: "create-support-me";
33
32
  readonly UPDATE_BANNER_SECTION: "update-banner-section";
34
33
  readonly UPDATE_ABOUT_SECTION: "update-about-section";
35
34
  readonly UPDATE_CONTACT_FORM: "update-contact-form";
@@ -55,7 +54,6 @@ export declare const BUILDER_TYPES: {
55
54
  readonly UPDATE_TWITCH: "update-twitch";
56
55
  readonly UPDATE_TIKTOK: "update-tiktok";
57
56
  readonly UPDATE_BOOKING_SECTION: "update-booking-section";
58
- readonly UPDATE_SUPPORT_ME: "update-support-me";
59
57
  readonly DELETE_SECTION: "delete-section";
60
58
  readonly MOVE_SECTION: "move-section";
61
59
  readonly ADD_PAGE: "add-page";
@@ -28,7 +28,6 @@ export const BUILDER_TYPES = {
28
28
  CREATE_TWITCH: 'create-twitch',
29
29
  CREATE_TIKTOK: 'create-tiktok',
30
30
  CREATE_BOOKING_SECTION: 'create-booking-section',
31
- CREATE_SUPPORT_ME: 'create-support-me',
32
31
  // Per-section builder types (update)
33
32
  UPDATE_BANNER_SECTION: 'update-banner-section',
34
33
  UPDATE_ABOUT_SECTION: 'update-about-section',
@@ -55,7 +54,6 @@ export const BUILDER_TYPES = {
55
54
  UPDATE_TWITCH: 'update-twitch',
56
55
  UPDATE_TIKTOK: 'update-tiktok',
57
56
  UPDATE_BOOKING_SECTION: 'update-booking-section',
58
- UPDATE_SUPPORT_ME: 'update-support-me',
59
57
  // Section-level operations
60
58
  DELETE_SECTION: 'delete-section',
61
59
  MOVE_SECTION: 'move-section',
@@ -30,7 +30,6 @@ export declare const AI_ASSISTANT_TOOL_NAMES: {
30
30
  readonly BUILD_TESTIMONIAL_SECTION: "build_testimonial-section_section";
31
31
  readonly BUILD_DIVIDER_SECTION: "build_divider-section_section";
32
32
  readonly BUILD_BOOKING_SECTION: "build_booking-section_section";
33
- readonly BUILD_SUPPORT_ME_SECTION: "build_support-me_section";
34
33
  readonly DELETE_SECTION: "delete_section";
35
34
  readonly MOVE_SECTION: "move_section";
36
35
  readonly ADD_PAGE: "add_page";
@@ -34,7 +34,6 @@ export const AI_ASSISTANT_TOOL_NAMES = {
34
34
  BUILD_TESTIMONIAL_SECTION: 'build_testimonial-section_section',
35
35
  BUILD_DIVIDER_SECTION: 'build_divider-section_section',
36
36
  BUILD_BOOKING_SECTION: 'build_booking-section_section',
37
- BUILD_SUPPORT_ME_SECTION: 'build_support-me_section',
38
37
  // Section-level operation tools
39
38
  DELETE_SECTION: 'delete_section',
40
39
  MOVE_SECTION: 'move_section',
@@ -114,9 +113,6 @@ export const SECTION_TOOL_MAP = {
114
113
  [AI_ASSISTANT_TOOL_NAMES.BUILD_BOOKING_SECTION]: {
115
114
  sectionType: 'booking-section',
116
115
  },
117
- [AI_ASSISTANT_TOOL_NAMES.BUILD_SUPPORT_ME_SECTION]: {
118
- sectionType: 'support-me',
119
- },
120
116
  };
121
117
  export const parseToolCalls = (toolCalls) => {
122
118
  if (!toolCalls || toolCalls.length === 0) {
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import type { ContentType } from '../../brand-page/models';
8
8
  /** Content types not supported by the AI builder. */
9
- type UnsupportedContentType = 'logo' | 'video' | 'map' | 'request-payment' | 'shop-section';
9
+ type UnsupportedContentType = 'logo' | 'video' | 'map' | 'request-payment' | 'support-me' | 'shop-section';
10
10
  export type SectionType = Exclude<ContentType, UnsupportedContentType>;
11
11
  export interface TiptapMark {
12
12
  type: 'bold' | 'italic' | 'underline' | 'strike' | 'link' | 'textStyle' | 'highlight';
@@ -407,25 +407,13 @@ export interface BookingSectionArguments {
407
407
  padding_top?: number;
408
408
  padding_bottom?: number;
409
409
  }
410
- export interface SupportMeArguments {
411
- title?: string;
412
- description?: string;
413
- success_message?: string;
414
- /** Matches DISPLAY_STYLE_PREVIEW / DISPLAY_STYLE_COLLAPSED. */
415
- display_style?: 'preview' | 'collapsed';
416
- title_style?: TextStyleArguments;
417
- heading_style?: TextStyleArguments;
418
- description_style?: TextStyleArguments;
419
- item_text_style?: TextStyleArguments;
420
- button_text_style?: ButtonTextStyleArguments;
421
- }
422
410
  export interface DividerSectionArguments {
423
411
  divider_style?: 'none' | 'thin' | 'thick';
424
412
  divider_color?: string | null;
425
413
  background_color?: string | null;
426
414
  padding?: number;
427
415
  }
428
- export type SectionToolArguments = ProfileSectionArguments | TextSectionArguments | ImageSectionArguments | ImageGallerySectionArguments | GeneralLinkSectionArguments | WebsiteSectionArguments | EmailSectionArguments | PhoneSectionArguments | FacebookSectionArguments | XSectionArguments | InstagramSectionArguments | YoutubeSectionArguments | LinkedinSectionArguments | PinterestSectionArguments | TwitchSectionArguments | TiktokSectionArguments | SocialLinksSectionArguments | MailingListSectionArguments | ContactFormSectionArguments | BannerSectionArguments | AboutSectionArguments | ImagesSectionArguments | TestimonialSectionArguments | ShapesSectionArguments | BookingSectionArguments | SupportMeArguments | DividerSectionArguments;
416
+ export type SectionToolArguments = ProfileSectionArguments | TextSectionArguments | ImageSectionArguments | ImageGallerySectionArguments | GeneralLinkSectionArguments | WebsiteSectionArguments | EmailSectionArguments | PhoneSectionArguments | FacebookSectionArguments | XSectionArguments | InstagramSectionArguments | YoutubeSectionArguments | LinkedinSectionArguments | PinterestSectionArguments | TwitchSectionArguments | TiktokSectionArguments | SocialLinksSectionArguments | MailingListSectionArguments | ContactFormSectionArguments | BannerSectionArguments | AboutSectionArguments | ImagesSectionArguments | TestimonialSectionArguments | ShapesSectionArguments | BookingSectionArguments | DividerSectionArguments;
429
417
  export interface SectionToolCallShape {
430
418
  mode: 'create' | 'update';
431
419
  type: string;
@@ -355,18 +355,11 @@ const minifyContent = (content, editor, assets) => {
355
355
  case 'logo':
356
356
  return base;
357
357
  case 'request-payment':
358
- return {
359
- ...base,
360
- ...st('title', c.title, editor),
361
- ...st('description', c.description, editor),
362
- };
363
358
  case 'support-me':
364
359
  return {
365
360
  ...base,
366
361
  ...st('title', c.title, editor),
367
362
  ...st('description', c.description, editor),
368
- ...st('successMessage', c.successMessage, editor),
369
- ...(includeString(c.displayStyle) && { displayStyle: c.displayStyle }),
370
363
  };
371
364
  default:
372
365
  return base;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designcrowd/library.brand-page",
3
3
  "description": "A collection of Maker/Designer applications",
4
- "version": "6.1.0-websitev2-dev-2",
4
+ "version": "6.1.0",
5
5
  "author": "Design.com Eng",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -12,7 +12,6 @@ import {
12
12
  getMessageValidationError,
13
13
  getNameValidationError,
14
14
  getPhoneValidationError,
15
- isPreviewMode,
16
15
  } from '@brand-page/utils';
17
16
  import { isDecorativeButtonStyle } from '../../utils/button.util';
18
17
  import brandPageClient from '../../clients/brand-page.client';
@@ -263,11 +262,7 @@ export default defineComponent({
263
262
  }));
264
263
  },
265
264
  mounted(): void {
266
- if (
267
- this.context?.recaptchaSiteKey &&
268
- !isPreviewMode(this.context) &&
269
- this.recaptcha
270
- ) {
265
+ if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
271
266
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
272
267
  }
273
268
  },
@@ -279,7 +274,7 @@ export default defineComponent({
279
274
  return;
280
275
  }
281
276
 
282
- if (isPreviewMode(this.context) || !this.context.brandPageToken) {
277
+ if (this.isPreview || !this.context.brandPageToken) {
283
278
  if (
284
279
  process.env.NODE_ENV !== 'production' &&
285
280
  !this.context.brandPageSlug
@@ -21,7 +21,6 @@ watch(
21
21
  <div
22
22
  v-if="isEnabled"
23
23
  id="cookie-consent-modal"
24
- data-component="cookie-consent"
25
24
  class="c-container tw-fixed tw-bottom-0 tw-left-0 tw-right-0 tw-z-50 tw-p-6 tw-flex tw-gap-4 tw-justify-between tw-flex-col tw-bg-white tw-items-center"
26
25
  >
27
26
  <p class="c-text tw-font-sans tw-m-0 tw-text-grayscale-800">
@@ -5,7 +5,6 @@ import brandPageClient from '../../clients/brand-page.client';
5
5
  import {
6
6
  getEmailValidationError,
7
7
  contentPaddingStyle as toContentPaddingStyle,
8
- isPreviewMode,
9
8
  mutedTextForBackground,
10
9
  backgroundColorFromStyle,
11
10
  } from '@brand-page/utils';
@@ -62,11 +61,7 @@ export default defineComponent({
62
61
  mounted() {
63
62
  this.show = true;
64
63
 
65
- if (
66
- this.context?.recaptchaSiteKey &&
67
- !isPreviewMode(this.context) &&
68
- this.recaptcha
69
- ) {
64
+ if (this.context?.recaptchaSiteKey && !this.isPreview && this.recaptcha) {
70
65
  this.recaptcha.initialise({ siteKey: this.context.recaptchaSiteKey });
71
66
  }
72
67
  },
@@ -143,7 +138,7 @@ export default defineComponent({
143
138
  isFormDisabled(): boolean {
144
139
  return (
145
140
  this.hasFormError ||
146
- isPreviewMode(this.context) ||
141
+ this.isPreview ||
147
142
  !this.brandPageToken ||
148
143
  this.isSubmitting
149
144
  );
@@ -171,7 +166,7 @@ export default defineComponent({
171
166
  return;
172
167
  }
173
168
 
174
- if (isPreviewMode(this.context) || !this.brandPageToken) {
169
+ if (this.isPreview || !this.brandPageToken) {
175
170
  return;
176
171
  }
177
172
 
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <div
3
- ref="containerRef"
4
- data-component="navigation-carousel"
5
- class="tw-flex tw-items-center tw-gap-2"
6
- >
2
+ <div ref="containerRef" class="tw-flex tw-items-center tw-gap-2">
7
3
  <div
8
4
  :class="[
9
5
  'tw-flex-shrink-0',
@@ -2,7 +2,7 @@ import { defineComponent } from 'vue';
2
2
  import type { PageFooterViewModel } from '@brand-page/view-models';
3
3
  import type { PropType } from 'vue';
4
4
  import type { BrandPageContext } from '@brand-page/models';
5
- import { getRenderText, isPreviewMode } from '@brand-page/utils';
5
+ import { getRenderText } from '@brand-page/utils';
6
6
  import { FOOTER_DISPLAY } from '../../constants';
7
7
 
8
8
  export default defineComponent({
@@ -27,9 +27,6 @@ export default defineComponent({
27
27
  },
28
28
  emits: ['on-logo-click', 'footer-container-click'],
29
29
  computed: {
30
- isInPreviewMode(): boolean {
31
- return isPreviewMode(this.context);
32
- },
33
30
  containerStyle(): BrandPageCssStyle {
34
31
  return this.viewModel.backgroundStyle;
35
32
  },
@@ -46,7 +46,7 @@
46
46
  :icon-style="socialLinksIconStyle"
47
47
  :is-stack-layout-on-mobile="false"
48
48
  :links="viewModel.socialLinks"
49
- :is-preview="isInPreviewMode"
49
+ :is-preview="context.isPreview"
50
50
  :context="context"
51
51
  />
52
52
  <!-- end social links -->
@@ -18,7 +18,6 @@ import type {
18
18
  SupportMeViewModel,
19
19
  } from '@brand-page/view-models';
20
20
  import raygunUtil from '@brand-page/utils/raygun.util';
21
- import { isPreviewMode } from '@brand-page/utils';
22
21
  import { paymentTr } from '@src/composables/useTranslate';
23
22
 
24
23
  const DEFAULT_PAYMENT_SUCCESS_MESSAGE = paymentTr(
@@ -100,11 +99,11 @@ export default defineComponent({
100
99
  },
101
100
 
102
101
  canMakePayment(): boolean {
103
- return !isPreviewMode(this.context) && this.isPaymentConfigActive;
102
+ return !this.context.isPreview && this.isPaymentConfigActive;
104
103
  },
105
104
 
106
105
  showPaymentBlock(): boolean {
107
- return isPreviewMode(this.context) || this.isPaymentConfigActive;
106
+ return this.context.isPreview || this.isPaymentConfigActive;
108
107
  },
109
108
 
110
109
  paymentOptions(): PaymentOption[] {
@@ -215,7 +214,7 @@ export default defineComponent({
215
214
  ? paymentState.PaymentOptionSelection
216
215
  : paymentState.IncompleteConfig;
217
216
 
218
- if (isPreviewMode(this.context) || !paymentConfigId) {
217
+ if (this.context.isPreview || !paymentConfigId) {
219
218
  return;
220
219
  }
221
220
 
@@ -14,10 +14,7 @@ import type { RequestPaymentViewModel } from '../../../view-models';
14
14
  import type { PaymentRequestDetails } from '../Payment.mixin';
15
15
  import { DEFAULT_CURRENCY_SYMBOL } from '../../../constants';
16
16
  import { addOpacityToHex } from '../../../utils/color.util';
17
- import {
18
- contentPaddingStyle as toContentPaddingStyle,
19
- isPreviewMode,
20
- } from '../../../utils';
17
+ import { contentPaddingStyle as toContentPaddingStyle } from '../../../utils';
21
18
  import { RGBAtoHex } from '@utils/helpers';
22
19
 
23
20
  const MAX_CUSTOM_REQUEST_CHARS = 500;
@@ -46,10 +43,6 @@ export default defineComponent({
46
43
  };
47
44
  },
48
45
  computed: {
49
- isInPreviewMode(): boolean {
50
- return isPreviewMode(this.context);
51
- },
52
-
53
46
  contentPaddingStyle(): { paddingTop: string; paddingBottom: string } {
54
47
  return toContentPaddingStyle(this.viewModel);
55
48
  },
@@ -51,7 +51,7 @@
51
51
  <div
52
52
  v-if="
53
53
  !isTextDisplayStyle &&
54
- (paymentOption.imageUrl || isInPreviewMode)
54
+ (paymentOption.imageUrl || context.isPreview)
55
55
  "
56
56
  class="tw-rounded tw-overflow-hidden tw-shrink-0"
57
57
  :class="{
@@ -51,7 +51,6 @@ import {
51
51
  getCurrentLocale,
52
52
  } from '@src/composables/useTranslate';
53
53
  import { hasProfileContent, saveContact } from '@brand-page/utils/vcard.util';
54
- import { isPreviewMode } from '@brand-page/utils';
55
54
  import { useConsent } from '../../composables/consent.composable';
56
55
  import PopupCard from './popup-card/PopupCard.vue';
57
56
  import Button from '../button/Button.vue';
@@ -186,7 +185,7 @@ const url = computed((): string => {
186
185
  }
187
186
 
188
187
  return localisedRouteStore.getBuilderLandingPageByTypeUrl(
189
- isPreviewMode(props.context),
188
+ props.context.isPreview,
190
189
  props.context.brandPageType,
191
190
  props.context.isDesignCom,
192
191
  getCurrentLocale(),
@@ -148,10 +148,7 @@ import brandPageClient from '../../clients/brand-page.client';
148
148
  import raygunUtil from '@brand-page/utils/raygun.util';
149
149
  import { shopTr } from '@src/composables/useTranslate';
150
150
  import { useShopConfigStore } from '@shared/ecommerce-settings/store/shop-settings-store';
151
- import {
152
- contentPaddingStyle as toContentPaddingStyle,
153
- isPreviewMode,
154
- } from '@brand-page/utils';
151
+ import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
155
152
 
156
153
  const props = withDefaults(
157
154
  defineProps<{
@@ -169,13 +166,13 @@ const cart = computed(() => cartSettingsStore.cartItems);
169
166
  const PAYMENT_CONFIG_ACTIVE = 'Active';
170
167
 
171
168
  const shouldShowContainer = computed(() => {
172
- return isPreviewMode(props.context) || data.isActivePaymentProvider;
169
+ return props.context.isPreview || data.isActivePaymentProvider;
173
170
  });
174
171
 
175
172
  const checkPaymentConfigStatus = async () => {
176
173
  const paymentConfigId = props.viewModel.shopPaymentConfig.paymentConfig?.id;
177
174
 
178
- if (isPreviewMode(props.context) || !paymentConfigId) {
175
+ if (props.context.isPreview || !paymentConfigId) {
179
176
  return;
180
177
  }
181
178
 
@@ -33,10 +33,7 @@ import TextWrapper from '../text-wrapper/TextWrapper.vue';
33
33
  import type { SocialLinksViewModel } from 'src/brand-page/view-models';
34
34
  import { SOCIAL_LINKS_ICON_DISPLAY_STYLES } from '@brand-page/models';
35
35
  import type { BrandPageContext, LinksItem } from '@brand-page/models';
36
- import {
37
- contentPaddingStyle as toContentPaddingStyle,
38
- isPreviewMode,
39
- } from '@brand-page/utils';
36
+ import { contentPaddingStyle as toContentPaddingStyle } from '@brand-page/utils';
40
37
  import { computed } from 'vue';
41
38
 
42
39
  const props = withDefaults(
@@ -90,7 +87,7 @@ const id = computed((): string => {
90
87
  });
91
88
 
92
89
  const isPreview = computed((): boolean => {
93
- return isPreviewMode(props.context);
90
+ return props.context.isPreview;
94
91
  });
95
92
 
96
93
  const links = computed((): LinksItem[] => {