@designcrowd/library.brand-page 6.2.11-builder-v2-1 → 6.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/{CreatedOnBrandCrowd-de-de-Dg2pOwbr.js → CreatedOnBrandCrowd-de-de-BtVKllNQ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BILs_hsB.js → CreatedOnBrandCrowd-en-us-CX5V0v8u.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-VpxQ0N5F.js → CreatedOnBrandCrowd-es-es-CbA02PCL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-CFHWRHzi.js → CreatedOnBrandCrowd-fr-ca-BQAKruBF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-CFHWRHzi.js → CreatedOnBrandCrowd-fr-fr-BQAKruBF.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-CZfs45s9.js → CreatedOnBrandCrowd-pt-br-Yk_yzB3s.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-CZfs45s9.js → CreatedOnBrandCrowd-pt-pt-Yk_yzB3s.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DYMQ6sIF.js → CreatedOnDcom-de-de-DJZQbPSD.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-Dj5sdPid.js → CreatedOnDcom-en-us-BJvNAa4l.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-Cx9yNTro.js → CreatedOnDcom-es-es-CUwB1FRY.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-Bzr0SjGq.js → CreatedOnDcom-fr-ca-CK54U4oh.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-BgqKY35F.js → CreatedOnDcom-fr-fr-DuUNBGrM.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-CXK6qfvL.js → CreatedOnDcom-pt-br-BfODpFNV.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-B8SggNTQ.js → CreatedOnDcom-pt-pt-Cf6u2GCg.js} +1 -1
- package/lib/src/brand-page/__fixtures__/production-text-style-resolver.fixture.d.ts +16 -0
- package/lib/src/brand-page/__fixtures__/production-text-style-resolver.fixture.js +35 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.d.ts +3 -0
- package/lib/src/brand-page/components/contact-form/ContactForm.mixin.js +19 -13
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.d.ts +3 -1
- package/lib/src/brand-page/components/mailing-list/MailingList.mixin.js +17 -2
- package/lib/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.d.ts +11 -3
- package/lib/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.js +35 -1
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.d.ts +8 -2
- package/lib/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.js +27 -3
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +5 -2
- package/lib/src/brand-page/components/page/Page.mixin.js +33 -27
- package/lib/src/brand-page/components/page-footer/PageFooter.mixin.d.ts +7 -2
- package/lib/src/brand-page/components/page-footer/PageFooter.mixin.js +21 -1
- package/lib/src/brand-page/components/payment/Payment.mixin.d.ts +5 -2
- package/lib/src/brand-page/components/payment/Payment.mixin.js +22 -2
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.d.ts +6 -2
- package/lib/src/brand-page/components/payment/support-me/SupportMe.mixin.js +32 -1
- package/lib/src/brand-page/components/social-links/SocialLinks.stories.js +0 -3
- package/lib/src/brand-page/components/testimonial-section/__fixtures__/data.js +0 -3
- package/lib/src/brand-page/components/text/Text.stories.js +0 -17
- package/lib/src/brand-page/constants/font.constants.d.ts +62 -0
- package/lib/src/brand-page/constants/font.constants.js +35 -0
- package/lib/src/brand-page/models/brand-page-context.model.d.ts +2 -0
- package/lib/src/brand-page/models/brand-page-context.model.js +7 -0
- package/lib/src/brand-page/models/index.d.ts +23 -24
- package/lib/src/brand-page/models/index.js +20 -7
- package/lib/src/brand-page/models/navigation-styles.model.d.ts +1 -1
- package/lib/src/brand-page/models/navigation-styles.model.js +17 -8
- package/lib/src/brand-page/models/payment.model.d.ts +11 -6
- package/lib/src/brand-page/models/styles.model.d.ts +53 -7
- package/lib/src/brand-page/models/styles.model.js +115 -27
- package/lib/src/brand-page/utils/color-palette.util.d.ts +43 -23
- package/lib/src/brand-page/utils/color-palette.util.js +65 -27
- package/lib/src/brand-page/utils/color.util.d.ts +13 -9
- package/lib/src/brand-page/utils/color.util.js +56 -15
- package/lib/src/brand-page/utils/container-text-color.util.d.ts +46 -13
- package/lib/src/brand-page/utils/container-text-color.util.js +321 -41
- package/lib/src/brand-page/utils/index.d.ts +1 -0
- package/lib/src/brand-page/utils/index.js +1 -0
- package/lib/src/brand-page/utils/migration/migration-20.js +6 -2
- package/lib/src/brand-page/utils/migration/migration-21.js +34 -6
- package/lib/src/brand-page/utils/migration/migration-22.d.ts +99 -0
- package/lib/src/brand-page/utils/migration/migration-22.js +909 -0
- package/lib/src/brand-page/utils/migration.util.js +17 -0
- package/lib/src/brand-page/utils/model.util.d.ts +4 -0
- package/lib/src/brand-page/utils/model.util.js +4 -0
- package/lib/src/brand-page/utils/personalisation.util.js +9 -1
- package/lib/src/brand-page/utils/rte-role-lift.util.d.ts +72 -0
- package/lib/src/brand-page/utils/rte-role-lift.util.js +275 -0
- package/lib/src/brand-page/utils/style.util.d.ts +5 -1
- package/lib/src/brand-page/utils/style.util.js +34 -11
- package/lib/src/brand-page/utils/text-role-css.util.d.ts +19 -0
- package/lib/src/brand-page/utils/text-role-css.util.js +186 -0
- package/lib/src/brand-page/utils/text-role-reconnect.util.d.ts +90 -0
- package/lib/src/brand-page/utils/text-role-reconnect.util.js +434 -0
- package/lib/src/brand-page/utils/text-style.util.d.ts +53 -23
- package/lib/src/brand-page/utils/text-style.util.js +122 -22
- package/lib/src/brand-page/utils/view-model.util.d.ts +9 -1
- package/lib/src/brand-page/utils/view-model.util.js +124 -111
- package/lib/src/brand-page/view-models.d.ts +1 -0
- package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +4 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +34 -2
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.js +4 -4
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +4 -1
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -10
- package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.js +0 -1
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +44 -138
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -28
- package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +4 -1
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/components/preview/Preview.mixin.d.ts +7 -0
- package/lib/src/brand-page-maker/components/quick-link-bar/QuickLinkBar.mixin.d.ts +21 -0
- package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +25 -1
- package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +25 -1
- package/lib/src/brand-page-maker/components/seo-settings/UseExistingDomainModal.mixin.d.ts +21 -0
- package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +4 -1
- package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +25 -1
- package/lib/src/brand-page-maker/components/upgrade-to-premium-button/UpgradeToPremiumButton.mixin.d.ts +21 -0
- package/lib/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.d.ts +10 -0
- package/lib/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.js +11 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.d.ts +1 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.js +1 -0
- package/lib/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.js +14 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.d.ts +16 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.js +61 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.d.ts +11 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.js +236 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.d.ts +2 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/font.js +25 -6
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.d.ts +17 -4
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +204 -17
- package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/hyperlink.js +29 -31
- package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.d.ts +20 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.js +60 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.d.ts +2 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/spacing.js +22 -6
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.d.ts +10 -4
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +319 -275
- package/lib/src/brand-page-maker/constants/config-settings-constant.js +1 -5
- package/lib/src/brand-page-maker/convertors/text-css-style-options.convertor.js +6 -2
- package/lib/src/brand-page-maker/convertors/text-size-value.convertor.d.ts +1 -1
- package/lib/src/brand-page-maker/convertors/text-size-value.convertor.js +3 -1
- package/lib/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.js +7 -14
- package/lib/src/brand-page-maker/default-getters/text-color.default-getter.js +6 -13
- package/lib/src/brand-page-maker/models/content-settings.d.ts +8 -0
- package/lib/src/brand-page-maker/models/content-settings.js +112 -81
- package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.d.ts +2 -2
- package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.js +5 -2
- package/lib/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.js +4 -3
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1257 -117
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.d.ts +9 -2
- package/lib/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.js +20 -0
- package/lib/src/brand-page-maker/stores/brandpage-container/brand-page-container-store.d.ts +21 -0
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +6 -1
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +17 -9
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +59 -5
- package/lib/src/brand-page-maker/stores/history/history-store.js +22 -2
- package/lib/src/brand-page-maker/utils/apply-color-strategy.js +26 -8
- package/lib/src/brand-page-maker/utils/index.d.ts +2 -1
- package/lib/src/brand-page-maker/utils/index.js +2 -1
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +117 -15
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +435 -281
- package/lib/src/brand-page-maker/utils/rte-authoring.util.d.ts +4 -0
- package/lib/src/brand-page-maker/utils/rte-authoring.util.js +101 -0
- package/lib/src/brand-page-maker/utils/rte-clipboard.util.d.ts +126 -0
- package/lib/src/brand-page-maker/utils/rte-clipboard.util.js +307 -0
- package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +13 -3
- package/lib/src/{bundled-translations-zfiA5Tsw.js → bundled-translations-yGrvPE5i.js} +17 -17
- package/lib/src/{bundled-translations.de-DE-ChsdSyAP.js → bundled-translations.de-DE-L4Znf8Hs.js} +17 -17
- package/lib/src/{bundled-translations.es-ES-DflsWQK0.js → bundled-translations.es-ES-D6iticrK.js} +15 -15
- package/lib/src/{bundled-translations.fr-CA-fpDRuZ52.js → bundled-translations.fr-CA-BgAVE-9k.js} +25 -25
- package/lib/src/{bundled-translations.fr-FR-Bub73Zt-.js → bundled-translations.fr-FR-B8GbyqxQ.js} +17 -17
- package/lib/src/{bundled-translations.pt-BR-BlnWE9TB.js → bundled-translations.pt-BR-DjPU3Db7.js} +25 -25
- package/lib/src/{bundled-translations.pt-PT-DmzXlnaS.js → bundled-translations.pt-PT-BaepaDpr.js} +23 -23
- package/lib/src/bundles/bundled-translations.de-DE.json +21 -2
- package/lib/src/bundles/bundled-translations.es-ES.json +21 -2
- package/lib/src/bundles/bundled-translations.fr-CA.json +21 -2
- package/lib/src/bundles/bundled-translations.fr-FR.json +21 -2
- package/lib/src/bundles/bundled-translations.json +21 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +21 -2
- package/lib/src/bundles/bundled-translations.pt-PT.json +21 -2
- package/lib/src/clients/ai-assistant-client.d.ts +7 -1
- package/lib/src/clients/ai-assistant-client.js +7 -15
- package/lib/src/composables/useTranslate.d.ts +1 -1
- package/lib/src/composables/useTranslate.js +1 -1
- package/lib/src/css/library.brand-page-brandCrowd.min.css +284 -188
- package/lib/src/css/library.brand-page-brandPage.min.css +284 -188
- package/lib/src/css/library.brand-page-designCom.min.css +284 -188
- package/lib/src/css/library.brand-page-preview.min.css +284 -188
- package/lib/src/index.d.ts +2 -1
- package/lib/src/index.mjs +195 -191
- package/lib/src/{lib-7gtW85nE.js → lib-kGRlD3_P.js} +39082 -36131
- package/lib/src/lib.js +2 -1
- package/lib/src/metadata-builder/builders/footer-builder.js +4 -5
- package/lib/src/metadata-builder/builders/global-role-propagation.d.ts +58 -0
- package/lib/src/metadata-builder/builders/global-role-propagation.js +246 -0
- package/lib/src/metadata-builder/builders/global-styles-builder.d.ts +1 -0
- package/lib/src/metadata-builder/builders/global-styles-builder.js +116 -45
- package/lib/src/metadata-builder/builders/header-builder.js +13 -4
- package/lib/src/metadata-builder/builders/section-builders/about-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/banner-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/booking-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/contact-form-builder.js +4 -4
- package/lib/src/metadata-builder/builders/section-builders/images-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/mailing-list-section-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/profile-section-builder.js +4 -4
- package/lib/src/metadata-builder/builders/section-builders/shapes-section-builder.js +3 -3
- package/lib/src/metadata-builder/builders/section-builders/social-links-builder.js +8 -2
- package/lib/src/metadata-builder/builders/section-builders/testimonial-section-builder.js +2 -2
- package/lib/src/metadata-builder/builders/section-builders/text-section-builder.js +60 -29
- package/lib/src/metadata-builder/builders/section-field-maps.js +1 -0
- package/lib/src/metadata-builder/builders/section-field-utils.d.ts +48 -19
- package/lib/src/metadata-builder/builders/section-field-utils.js +128 -52
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.d.ts +4 -2
- package/lib/src/metadata-builder/builders/section-rules/global-styles.rules.js +28 -12
- package/lib/src/metadata-builder/builders/section-rules/social-links.rules.js +5 -1
- package/lib/src/metadata-builder/helpers/rte.helpers.d.ts +1 -1
- package/lib/src/metadata-builder/helpers/rte.helpers.js +97 -40
- package/lib/src/metadata-builder/metadata-executor.js +23 -1
- package/lib/src/metadata-builder/models.d.ts +2 -0
- package/lib/src/metadata-builder/parsers/ai-toolcall-parser.d.ts +18 -19
- package/lib/src/metadata-builder/parsers/section-tool-arguments.d.ts +18 -1
- package/lib/src/metadata-builder/sanitizers/rte-schema-check.js +1 -1
- package/lib/src/metadata-builder/sanitizers/sanitizer-rules.d.ts +0 -1
- package/lib/src/metadata-builder/sanitizers/sanitizer-rules.js +5 -8
- package/lib/src/metadata-builder/sanitizers/section-args-validator.d.ts +7 -16
- package/lib/src/metadata-builder/sanitizers/section-args-validator.js +95 -22
- package/lib/src/shared/color-palette/section-color-matches.js +9 -25
- package/lib/src/shared/color-strategies/color-strategies.d.ts +15 -0
- package/lib/src/shared/color-strategies/color-strategies.js +31 -0
- package/lib/src/shared/color-strategies/rte-color.d.ts +8 -0
- package/lib/src/shared/color-strategies/rte-color.js +16 -0
- package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +23 -0
- package/lib/src/shared/color-strategies/rte-field-pairs.js +28 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +9 -135
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.js +1 -27
- package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +12 -2
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +7 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +75 -6
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +18 -7
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +6 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +0 -7
- package/lib/src/shared/content-settings/components/payment-config-field/PaymentConfigField.mixin.d.ts +22 -0
- package/lib/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.js +8 -4
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +1255 -26
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +203 -59
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +6 -0
- package/lib/src/shared/content-settings/store/content-settings-store.js +105 -8
- package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +26 -1
- package/lib/src/shared/navigation-style-settings/store/index.d.ts +7 -3
- package/lib/src/shared/navigation-style-settings/store/index.js +40 -15
- package/lib/src/shared/page-settings/components/new-page-modal/NewPageModal.mixin.d.ts +1 -0
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +38 -5
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +91 -13
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +10 -2
- package/lib/src/shared/page-settings/store/page-settings-store.d.ts +2 -1
- package/lib/src/shared/page-settings/store/page-settings-store.js +17 -0
- package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +32 -1
- package/lib/src/shared/rte-extensions/AutoLink.d.ts +17 -0
- package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/AutoLink.js +67 -51
- package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.js +4 -1
- package/lib/src/shared/rte-extensions/TextEffects.d.ts +28 -0
- package/lib/src/shared/rte-extensions/TextEffects.js +96 -0
- package/lib/src/shared/rte-extensions/ViewDomParser.d.ts +2 -0
- package/lib/src/shared/rte-extensions/ViewDomParser.js +21 -0
- package/lib/src/shared/rte-extensions.util.d.ts +25 -0
- package/lib/src/{brand-page-maker/composables/rich-text-editor/getRteExtensions.js → shared/rte-extensions.util.js} +62 -7
- package/lib/src/shared/rte-link.util.d.ts +1 -0
- package/lib/src/shared/rte-link.util.js +1 -0
- package/lib/src/shared/rte-render.util.d.ts +112 -0
- package/lib/src/shared/rte-render.util.js +255 -0
- package/lib/src/shared/rte-shape.util.d.ts +6 -0
- package/lib/src/shared/rte-shape.util.js +18 -0
- package/lib/src/shared/side-bar/components/SideBar.mixin.d.ts +23 -1
- package/lib/src/shared/side-bar/components/SideBarTabButton.mixin.d.ts +1 -0
- package/lib/src/shared/side-bar/store/side-bar-store.d.ts +2 -0
- package/lib/src/shared/side-bar/store/side-bar-store.js +9 -0
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +176 -15
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.js +7 -1
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +1 -9
- package/lib/src/shared/style-settings/store/style-settings-store.js +3 -33
- package/lib/src/shared/style-settings/text-style-size-order.d.ts +2 -0
- package/lib/src/shared/style-settings/text-style-size-order.js +13 -0
- package/lib/src/shared/text-role-typography.util.d.ts +64 -0
- package/lib/src/shared/text-role-typography.util.js +183 -0
- package/lib/src/utils/minify-brand-page-metadata.d.ts +16 -1
- package/lib/src/utils/minify-brand-page-metadata.js +31 -9
- package/package.json +1 -1
- package/src/brand-page/__fixtures__/migration-22-v21/edited-brandsite-sections.v21.json +982 -0
- package/src/brand-page/__fixtures__/migration-22-v21/new-brandcontact-every-section.v21.json +1231 -0
- package/src/brand-page/__fixtures__/migration-22-v21/new-brandpage-every-section.v21.json +1231 -0
- package/src/brand-page/__fixtures__/migration-22-v21/new-brandsite-every-section.v21.json +1243 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandcontact.v21.json +755 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-general-link.v21.json +527 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-links.v21.json +755 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandpage-social-links.v21.json +514 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-about.v21.json +459 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-footer.v21.json +469 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-header-banner.v21.json +481 -0
- package/src/brand-page/__fixtures__/migration-22-v21/real-brandsite-sections.v21.json +800 -0
- package/src/brand-page/__fixtures__/production-text-style-resolver.fixture.ts +52 -0
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +0 -10
- package/src/brand-page/components/contact-form/ContactForm.mixin.test.ts +127 -0
- package/src/brand-page/components/contact-form/ContactForm.mixin.ts +31 -14
- package/src/brand-page/components/contact-form/ContactForm.vue +26 -12
- package/src/brand-page/components/contact-form/ContactForm.vue.test.ts +60 -0
- package/src/brand-page/components/mailing-list/MailingList.mixin.test.ts +92 -0
- package/src/brand-page/components/mailing-list/MailingList.mixin.ts +28 -3
- package/src/brand-page/components/mailing-list/MailingList.vue +9 -4
- package/src/brand-page/components/mailing-list/MailingList.vue.test.ts +63 -0
- package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.mixin.ts +51 -1
- package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.test.ts +114 -0
- package/src/brand-page/components/navigation/button-carousel/ButtonCarouselNavigation.vue +8 -2
- package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.test.ts +182 -0
- package/src/brand-page/components/navigation/navigation-carousel/NavigationCarousel.vue +58 -12
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.mixin.ts +40 -3
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue +15 -7
- package/src/brand-page/components/navigation/navigation-side-menu/NavigationSideMenu.vue.test.ts +133 -3
- package/src/brand-page/components/page/Page.mixin.ts +41 -34
- package/src/brand-page/components/page/Page.vue +17 -6
- package/src/brand-page/components/page/Page.vue.test.ts +91 -1
- package/src/brand-page/components/page-footer/PageFooter.mixin.ts +32 -2
- package/src/brand-page/components/page-footer/PageFooter.test.ts +79 -0
- package/src/brand-page/components/page-footer/PageFooter.vue +12 -4
- package/src/brand-page/components/payment/Payment.mixin.ts +34 -2
- package/src/brand-page/components/payment/Payment.test.ts +188 -0
- package/src/brand-page/components/payment/Payment.vue +12 -5
- package/src/brand-page/components/payment/RequestPaymentStripe.vue +1 -0
- package/src/brand-page/components/payment/support-me/SupportMe.mixin.ts +49 -2
- package/src/brand-page/components/payment/support-me/SupportMe.test.ts +100 -0
- package/src/brand-page/components/payment/support-me/SupportMe.vue +7 -1
- package/src/brand-page/components/payment/support-me/SupportMe.vue.test.ts +66 -0
- package/src/brand-page/components/save-contact/SaveContactWidget.test.ts +100 -0
- package/src/brand-page/components/save-contact/SaveContactWidget.vue +6 -3
- package/src/brand-page/components/shop/PaymentModal.vue +2 -6
- package/src/brand-page/components/shop/PaymentShippingAddress.vue +6 -0
- package/src/brand-page/components/shop/Shop.vue +15 -2
- package/src/brand-page/components/shop/Shop.vue.test.ts +74 -2
- package/src/brand-page/components/social-links/SocialLinks.stories.ts +0 -3
- package/src/brand-page/components/social-links/SocialLinks.vue.test.ts +0 -3
- package/src/brand-page/components/testimonial-section/__fixtures__/data.ts +0 -3
- package/src/brand-page/components/text/Text.stories.ts +0 -17
- package/src/brand-page/components/text-wrapper/TextWrapper.parity.test.ts +136 -0
- package/src/brand-page/components/text-wrapper/TextWrapper.test.ts +358 -0
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +82 -22
- package/src/brand-page/constants/font.constants.ts +37 -0
- package/src/brand-page/models/brand-page-context.model.ts +13 -0
- package/src/brand-page/models/footer-icon-color.test.ts +22 -0
- package/src/brand-page/models/index.ts +50 -28
- package/src/brand-page/models/navigation-styles.model.test.ts +77 -1
- package/src/brand-page/models/navigation-styles.model.ts +26 -9
- package/src/brand-page/models/payment.model.ts +15 -6
- package/src/brand-page/models/styles.model.test.ts +104 -0
- package/src/brand-page/models/styles.model.ts +181 -47
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +619 -115
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +150 -9
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +300 -18
- package/src/brand-page/utils/color-palette.util.test.ts +126 -1
- package/src/brand-page/utils/color-palette.util.ts +92 -26
- package/src/brand-page/utils/color.util.test.ts +62 -29
- package/src/brand-page/utils/color.util.ts +77 -14
- package/src/brand-page/utils/container-text-color.util.test.ts +672 -26
- package/src/brand-page/utils/container-text-color.util.ts +472 -46
- package/src/brand-page/utils/index.ts +1 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/edited-brandsite-sections.v22.json +1191 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandcontact-every-section.v22.json +2026 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandpage-every-section.v22.json +2017 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandsite-every-section.v22.json +2031 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandcontact.v22.json +1145 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-general-link.v22.json +645 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-links.v22.json +1136 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-social-links.v22.json +662 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-about.v22.json +638 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-footer.v22.json +610 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-header-banner.v22.json +660 -0
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandsite-sections.v22.json +1132 -0
- package/src/brand-page/utils/migration/migration-01.ts +293 -237
- package/src/brand-page/utils/migration/migration-02.ts +8 -1
- package/src/brand-page/utils/migration/migration-20.ts +6 -3
- package/src/brand-page/utils/migration/migration-20_5.test.ts +5 -2
- package/src/brand-page/utils/migration/migration-21.test.ts +34 -0
- package/src/brand-page/utils/migration/migration-21.ts +46 -10
- package/src/brand-page/utils/migration/migration-22.fixed-input.test.ts +43 -0
- package/src/brand-page/utils/migration/migration-22.test.ts +4103 -0
- package/src/brand-page/utils/migration/migration-22.text-font-family.test.ts +72 -0
- package/src/brand-page/utils/migration/migration-22.ts +1336 -0
- package/src/brand-page/utils/migration.util.test.ts +146 -32
- package/src/brand-page/utils/migration.util.ts +18 -0
- package/src/brand-page/utils/model.util.ts +4 -0
- package/src/brand-page/utils/personalisation.util.test.ts +148 -3
- package/src/brand-page/utils/personalisation.util.ts +9 -1
- package/src/brand-page/utils/rte-role-lift.util.ts +409 -0
- package/src/brand-page/utils/style.util.test.ts +35 -2
- package/src/brand-page/utils/style.util.ts +45 -11
- package/src/brand-page/utils/text-role-css.util.test.ts +525 -0
- package/src/brand-page/utils/text-role-css.util.ts +321 -0
- package/src/brand-page/utils/text-role-reconnect.util.test.ts +604 -0
- package/src/brand-page/utils/text-role-reconnect.util.ts +727 -0
- package/src/brand-page/utils/text-style.util.test.ts +305 -0
- package/src/brand-page/utils/text-style.util.ts +198 -24
- package/src/brand-page/utils/view-model.page-data.test.ts +232 -0
- package/src/brand-page/utils/view-model.util.test.ts +954 -133
- package/src/brand-page/utils/view-model.util.ts +187 -139
- package/src/brand-page/view-models.ts +4 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.blank-site.test.ts +57 -0
- package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.ts +9 -5
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -10
- package/src/brand-page-maker/components/brand-page-maker/__fixtures__/content-settings-items.fixture.ts +0 -1
- package/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.ts +0 -44
- package/src/brand-page-maker/components/rich-text-editor/RichTextEditor.vue +253 -200
- package/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.test.ts +82 -0
- package/src/brand-page-maker/composables/ai-chat/ai-builder-experiment.ts +19 -0
- package/src/brand-page-maker/composables/ai-chat/useAiMetadataBuilder.ts +2 -0
- package/src/brand-page-maker/composables/ai-chat/useAiWebsiteBuilderChat.ts +19 -0
- package/src/brand-page-maker/composables/rich-text-editor/block-typography.test.ts +519 -0
- package/src/brand-page-maker/composables/rich-text-editor/extensions/FontFamily.test.ts +1 -1
- package/src/brand-page-maker/composables/rich-text-editor/extensions/MaxLength.test.ts +26 -1
- package/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.test.ts +110 -0
- package/src/brand-page-maker/composables/rich-text-editor/extensions/RoleTypographyFill.ts +99 -0
- package/src/brand-page-maker/composables/rich-text-editor/extensions/RteClipboard.ts +397 -0
- package/src/brand-page-maker/composables/rich-text-editor/extensions/ViewDomParser.test.ts +139 -0
- package/src/brand-page-maker/composables/rich-text-editor/font.ts +36 -5
- package/src/brand-page-maker/composables/rich-text-editor/formatting.test.ts +375 -1
- package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +301 -17
- package/src/brand-page-maker/composables/rich-text-editor/hyperlink.test.ts +82 -1
- package/src/brand-page-maker/composables/rich-text-editor/hyperlink.ts +28 -34
- package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.test.ts +80 -0
- package/src/brand-page-maker/composables/rich-text-editor/keepMarksOnEmpty.ts +75 -0
- package/src/brand-page-maker/composables/rich-text-editor/spacing.ts +31 -6
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.test.ts +2485 -0
- package/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.ts +435 -337
- package/src/brand-page-maker/constants/config-settings-constant.ts +0 -6
- package/src/brand-page-maker/convertors/text-css-style-options.convertor.test.ts +43 -0
- package/src/brand-page-maker/convertors/text-css-style-options.convertor.ts +6 -2
- package/src/brand-page-maker/convertors/text-size-value.convertor.test.ts +24 -0
- package/src/brand-page-maker/convertors/text-size-value.convertor.ts +17 -13
- package/src/brand-page-maker/default-getters/payment-text-and-border-color.default-getter.ts +7 -22
- package/src/brand-page-maker/default-getters/text-color.default-getter.ts +5 -21
- package/src/brand-page-maker/models/content-settings.test.ts +708 -0
- package/src/brand-page-maker/models/content-settings.ts +133 -82
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.test.ts +63 -1
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store-utils.ts +16 -3
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.test.ts +34 -0
- package/src/brand-page-maker/stores/admin-logo-settings/admin-logo-settings-store.ts +4 -2
- package/src/brand-page-maker/stores/ai-thread/ai-website-builder-thread-store.ts +30 -0
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.test.ts +185 -1
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +22 -34
- package/src/brand-page-maker/stores/history/history-store.ts +35 -2
- package/src/brand-page-maker/utils/__snapshots__/apply-color-strategy.golden.test.ts.snap +528 -0
- package/src/brand-page-maker/utils/__snapshots__/rte-render-parity.test.ts.snap +12 -0
- package/src/brand-page-maker/utils/apply-color-strategy.golden.test.ts +2 -0
- package/src/brand-page-maker/utils/apply-color-strategy.test.ts +181 -3
- package/src/brand-page-maker/utils/apply-color-strategy.ts +36 -4
- package/src/brand-page-maker/utils/index.ts +2 -1
- package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +447 -410
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +610 -506
- package/src/brand-page-maker/utils/rte-authoring.util.test.ts +244 -0
- package/src/brand-page-maker/utils/rte-authoring.util.ts +175 -0
- package/src/brand-page-maker/utils/rte-clipboard.util.test.ts +558 -0
- package/src/brand-page-maker/utils/rte-clipboard.util.ts +473 -0
- package/src/brand-page-maker/utils/rte-features.test.ts +99 -3
- package/src/brand-page-maker/utils/rte-render-parity.test.ts +1 -1
- package/src/brand-page-maker/utils/rte-render.util.test.ts +230 -0
- package/src/brand-page-maker/utils/rte-sanitize-json.test.ts +1 -1
- package/src/brand-page-maker/utils/rte-sanitize.util.ts +14 -3
- package/src/brand-page-maker/utils/rte-schema-version.test.ts +102 -0
- package/src/bundles/bundled-translations.de-DE.json +21 -2
- package/src/bundles/bundled-translations.es-ES.json +21 -2
- package/src/bundles/bundled-translations.fr-CA.json +21 -2
- package/src/bundles/bundled-translations.fr-FR.json +21 -2
- package/src/bundles/bundled-translations.json +21 -2
- package/src/bundles/bundled-translations.pt-BR.json +21 -2
- package/src/bundles/bundled-translations.pt-PT.json +21 -2
- package/src/clients/ai-assistant-client.ts +13 -18
- package/src/composables/useTranslate.ts +2 -1
- package/src/lib.ts +2 -2
- package/src/metadata-builder/builders/footer-builder.test.ts +70 -45
- package/src/metadata-builder/builders/footer-builder.ts +4 -8
- package/src/metadata-builder/builders/global-role-propagation.test.ts +907 -0
- package/src/metadata-builder/builders/global-role-propagation.ts +430 -0
- package/src/metadata-builder/builders/global-styles-builder.test.ts +1020 -0
- package/src/metadata-builder/builders/global-styles-builder.ts +194 -48
- package/src/metadata-builder/builders/header-builder.test.ts +112 -40
- package/src/metadata-builder/builders/header-builder.ts +18 -8
- package/src/metadata-builder/builders/section-builders/about-section-builder.ts +5 -3
- package/src/metadata-builder/builders/section-builders/banner-section-builder.ts +5 -3
- package/src/metadata-builder/builders/section-builders/booking-section-builder.ts +5 -3
- package/src/metadata-builder/builders/section-builders/contact-form-builder.ts +7 -4
- package/src/metadata-builder/builders/section-builders/images-section-builder.ts +5 -3
- package/src/metadata-builder/builders/section-builders/mailing-list-builder.ts +3 -2
- package/src/metadata-builder/builders/section-builders/mailing-list-section-builder.ts +3 -2
- package/src/metadata-builder/builders/section-builders/profile-section-builder.ts +7 -7
- package/src/metadata-builder/builders/section-builders/shapes-section-builder.ts +5 -3
- package/src/metadata-builder/builders/section-builders/social-links-builder.test.ts +2 -2
- package/src/metadata-builder/builders/section-builders/social-links-builder.ts +21 -10
- package/src/metadata-builder/builders/section-builders/support-me-builder.test.ts +10 -0
- package/src/metadata-builder/builders/section-builders/testimonial-section-builder.ts +3 -2
- package/src/metadata-builder/builders/section-builders/text-section-builder.ts +111 -61
- package/src/metadata-builder/builders/section-field-maps.ts +1 -0
- package/src/metadata-builder/builders/section-field-utils.test.ts +545 -2
- package/src/metadata-builder/builders/section-field-utils.ts +202 -69
- package/src/metadata-builder/builders/section-rules/global-styles.rules.ts +38 -13
- package/src/metadata-builder/builders/section-rules/social-links.rules.ts +5 -0
- package/src/metadata-builder/helpers/rte.helpers.test.ts +101 -0
- package/src/metadata-builder/helpers/rte.helpers.ts +129 -43
- package/src/metadata-builder/metadata-executor.test.ts +167 -0
- package/src/metadata-builder/metadata-executor.ts +34 -1
- package/src/metadata-builder/models.ts +2 -0
- package/src/metadata-builder/parsers/ai-toolcall-parser.ts +23 -7
- package/src/metadata-builder/parsers/section-tool-arguments.ts +21 -1
- package/src/metadata-builder/sanitizers/__tests__/section-args-validator.test.ts +215 -0
- package/src/metadata-builder/sanitizers/rte-schema-check.ts +1 -1
- package/src/metadata-builder/sanitizers/sanitizer-rules.ts +4 -8
- package/src/metadata-builder/sanitizers/section-args-validator.ts +136 -53
- package/src/shared/color-palette/section-color-matches.test.ts +15 -11
- package/src/shared/color-palette/section-color-matches.ts +9 -28
- package/src/shared/color-strategies/color-strategies.ts +35 -0
- package/src/shared/color-strategies/rte-color.test.ts +1 -1
- package/src/shared/color-strategies/rte-color.ts +19 -0
- package/src/shared/color-strategies/rte-field-pairs.test.ts +26 -5
- package/src/shared/color-strategies/rte-field-pairs.ts +33 -0
- package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.test.ts +43 -66
- package/src/shared/content-settings/components/color-matches-panel/ColorMatchesPanel.vue +7 -1
- package/src/shared/content-settings/components/content-settings/ContentSettings.mixin.ts +1 -48
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.ts +33 -7
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.test.ts +128 -1
- package/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.ts +0 -6
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.test.ts +56 -3
- package/src/shared/content-settings/components/text-items-field/TextItemsField.mixin.ts +11 -4
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.test.ts +335 -25
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +248 -70
- package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +113 -25
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.de-DE.json +17 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.es-ES.json +17 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-CA.json +17 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-FR.json +17 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.json +8 -1
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-BR.json +17 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-PT.json +17 -10
- package/src/shared/content-settings/components/text-style-role-dropdown/TextStyleRoleDropdown.test.ts +141 -0
- package/src/shared/content-settings/components/text-style-role-dropdown/TextStyleRoleDropdown.vue +136 -0
- package/src/shared/content-settings/store/content-settings-store.test.ts +491 -6
- package/src/shared/content-settings/store/content-settings-store.ts +159 -17
- package/src/shared/navigation-style-settings/store/index.test.ts +295 -0
- package/src/shared/navigation-style-settings/store/index.ts +65 -15
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.test.ts +44 -4
- package/src/shared/page-settings/components/page-settings-section-styles/HeaderButtonSettings.vue +13 -4
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.navigation.test.ts +89 -0
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.text-style.test.ts +91 -0
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +14 -2
- package/src/shared/page-settings/store/page-settings-store.text-style.test.ts +84 -0
- package/src/shared/page-settings/store/page-settings-store.ts +30 -1
- package/src/shared/rte-extensions/AutoLink.test.ts +98 -0
- package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/AutoLink.ts +87 -58
- package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.ts +4 -1
- package/src/shared/rte-extensions/TextEffects.ts +151 -0
- package/src/shared/rte-extensions/ViewDomParser.ts +27 -0
- package/src/{brand-page-maker/composables/rich-text-editor/getRteExtensions.ts → shared/rte-extensions.util.ts} +66 -9
- package/src/shared/rte-link.util.ts +2 -0
- package/src/shared/rte-render.util.ts +385 -0
- package/src/shared/rte-shape.util.ts +29 -0
- package/src/shared/side-bar/store/side-bar-store.test.ts +27 -1
- package/src/shared/side-bar/store/side-bar-store.ts +11 -0
- package/src/shared/style-settings/components/StyleSettings.mixin.ts +7 -3
- package/src/shared/style-settings/components/StyleSettings.test.ts +116 -0
- package/src/shared/style-settings/components/StyleSettings.vue +74 -25
- package/src/shared/style-settings/components/i18n/style-settings.de-DE.json +32 -20
- package/src/shared/style-settings/components/i18n/style-settings.es-ES.json +32 -20
- package/src/shared/style-settings/components/i18n/style-settings.fr-CA.json +32 -20
- package/src/shared/style-settings/components/i18n/style-settings.fr-FR.json +32 -20
- package/src/shared/style-settings/components/i18n/style-settings.json +13 -3
- package/src/shared/style-settings/components/i18n/style-settings.pt-BR.json +32 -20
- package/src/shared/style-settings/components/i18n/style-settings.pt-PT.json +32 -20
- package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +14 -34
- package/src/shared/style-settings/store/style-settings-store.ts +3 -49
- package/src/shared/style-settings/text-style-size-order.test.ts +76 -0
- package/src/shared/style-settings/text-style-size-order.ts +28 -0
- package/src/shared/text-role-typography.util.ts +277 -0
- package/src/utils/minify-brand-page-metadata.test.ts +102 -7
- package/src/utils/minify-brand-page-metadata.ts +62 -8
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/AutoLink.d.ts +0 -2
- package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.d.ts +0 -28
- package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +0 -63
- package/lib/src/brand-page-maker/utils/rte-render.util.js +0 -106
- package/lib/src/brand-page-maker/utils/rte-shape.d.ts +0 -18
- package/lib/src/brand-page-maker/utils/rte-shape.js +0 -21
- package/lib/src/metadata-builder/builders/global-font-propagation.d.ts +0 -41
- package/lib/src/metadata-builder/builders/global-font-propagation.js +0 -146
- package/src/brand-page/models/brand-page-context.model.test.ts +0 -38
- package/src/brand-page-maker/utils/rte-render.util.ts +0 -179
- package/src/brand-page-maker/utils/rte-shape.ts +0 -29
- package/src/clients/ai-assistant-client.test.ts +0 -135
- package/src/metadata-builder/builders/global-font-propagation.test.ts +0 -401
- package/src/metadata-builder/builders/global-font-propagation.ts +0 -238
- package/src/shared/style-settings/components/StyleSettingsSection.vue +0 -8
- /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.d.ts +0 -0
- /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.js +0 -0
- /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.d.ts +0 -0
- /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.js +0 -0
- /package/lib/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/MaxLength.d.ts +0 -0
- /package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/FontFamily.ts +0 -0
- /package/src/{brand-page-maker/composables/rich-text-editor/extensions → shared/rte-extensions}/LetterSpacing.ts +0 -0
|
@@ -4,9 +4,14 @@ import { ref } from 'vue';
|
|
|
4
4
|
import { v4 as uuidV4 } from 'uuid';
|
|
5
5
|
import { backgroundColorConvertor, colorConvertor, textAlignmentOptionsConvertor, textCSSStyleOptionsConvertor, textSizeValueConvertor, letterSpacingValueConvertor, lineHeightValueConvertor, } from '@brand-page-maker/convertors';
|
|
6
6
|
import { useUiStyleSettingsStore } from '../../../style-settings/store';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { useUiContentSettingsStore } from '../../store';
|
|
8
|
+
import { resolveTextStyle, TEXT_STYLE_CASCADE_PROPS, normalizeTextStyleAgainstRole, omitTypography, } from '@brand-page/utils/text-style.util';
|
|
9
|
+
import { composeTextDecoration } from '@shared/text-role-typography.util';
|
|
10
|
+
import { FONT_FAMILY_CONFIGS, MIN_TEXT_SIZE_PX, MAX_TEXT_SIZE_PX, MIN_LETTER_SPACING_PERCENT, MAX_LETTER_SPACING_PERCENT, MIN_LINE_HEIGHT, MAX_LINE_HEIGHT, CANONICAL_TEXT_STYLE_TYPES, TEXT_STYLE_TYPES_DISPLAY_NAME_MAP, } from '@brand-page';
|
|
9
11
|
const TEXT_SIZE_CHANGE_DEBOUNCE_WAIT_IN_MS = 5;
|
|
12
|
+
// BP-5969: cap the collapsed-card live preview so large roles (e.g. H1) fit the
|
|
13
|
+
// header row. The subtitle still reports the real edited size uncapped.
|
|
14
|
+
const TEXT_STYLE_PREVIEW_MAX_SIZE_PX = 28;
|
|
10
15
|
export default defineComponent({
|
|
11
16
|
props: {
|
|
12
17
|
id: {
|
|
@@ -79,6 +84,23 @@ export default defineComponent({
|
|
|
79
84
|
required: false,
|
|
80
85
|
default: false,
|
|
81
86
|
},
|
|
87
|
+
// BP-5969: opt in to rendering the collapsed-card header in the role's own
|
|
88
|
+
// live typography (name at its font/size/weight + a `Family • Sizepx`
|
|
89
|
+
// subtitle). Only the global Style tab enables this; block-level fields
|
|
90
|
+
// (nav/footer/content) keep the plain bold label.
|
|
91
|
+
showTypographyPreview: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
required: false,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
// BP-5969 (ADR-0020): a role defines typography only — colour is contrast-derived per
|
|
97
|
+
// surface, not a role property. The role editor (global Style tab) hides the colour picker;
|
|
98
|
+
// element-level fields keep it (an element may still carry an explicit colour override).
|
|
99
|
+
showColor: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
required: false,
|
|
102
|
+
default: true,
|
|
103
|
+
},
|
|
82
104
|
// Container-aware default colour from the parent field wrapper: text on a filled
|
|
83
105
|
// block must contrast that fill, so the swatch shows the same colour the renderer
|
|
84
106
|
// paints. Both sides derive it from one helper (`container-text-color.util.ts`).
|
|
@@ -90,11 +112,13 @@ export default defineComponent({
|
|
|
90
112
|
},
|
|
91
113
|
setup() {
|
|
92
114
|
const styleSettingsStore = useUiStyleSettingsStore();
|
|
115
|
+
const contentSettingsStore = useUiContentSettingsStore();
|
|
93
116
|
const textStyleTypeDropdownRef = `text-style-dropdown-${uuidV4()}`;
|
|
94
117
|
return {
|
|
95
118
|
availableTextFontFamilyOptions: computed(() => styleSettingsStore.availableTextFontFamilyOptions),
|
|
96
119
|
textStyleOptions: computed(() => styleSettingsStore.textStyles.textStyleOptions),
|
|
97
120
|
styleSettingsStore,
|
|
121
|
+
contentSettingsStore,
|
|
98
122
|
textStyleTypeDropdownRef,
|
|
99
123
|
[textStyleTypeDropdownRef]: ref(null),
|
|
100
124
|
};
|
|
@@ -103,25 +127,23 @@ export default defineComponent({
|
|
|
103
127
|
data: () => {
|
|
104
128
|
return {
|
|
105
129
|
isCollapsed: true,
|
|
130
|
+
// BP-5969: the "style modified" popup next to the role dropdown (apply/reset overrides).
|
|
131
|
+
isStyleModifiedPopupOpen: false,
|
|
106
132
|
MIN_TEXT_SIZE_PX,
|
|
107
133
|
MAX_TEXT_SIZE_PX,
|
|
108
134
|
MIN_LETTER_SPACING_PERCENT,
|
|
109
135
|
MAX_LETTER_SPACING_PERCENT,
|
|
110
136
|
MIN_LINE_HEIGHT,
|
|
111
137
|
MAX_LINE_HEIGHT,
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
TEXT_STYLE_TYPES_DISPLAY_NAME_MAP()[key].slice(1),
|
|
122
|
-
isSelected: false,
|
|
123
|
-
})),
|
|
124
|
-
],
|
|
138
|
+
// BP-5969 (ADR-0019): every text block is always linked to exactly one canonical
|
|
139
|
+
// role — there is no "none"/detached option. Legacy roles stay resolvable for
|
|
140
|
+
// un-migrated content but are never pickable (migration-22 reconnects them).
|
|
141
|
+
textStyleTypeOptions: CANONICAL_TEXT_STYLE_TYPES.map((key) => ({
|
|
142
|
+
value: key,
|
|
143
|
+
label: TEXT_STYLE_TYPES_DISPLAY_NAME_MAP()[key][0].toUpperCase() +
|
|
144
|
+
TEXT_STYLE_TYPES_DISPLAY_NAME_MAP()[key].slice(1),
|
|
145
|
+
isSelected: false,
|
|
146
|
+
})),
|
|
125
147
|
debounceOnTextSizeChange: undefined,
|
|
126
148
|
debounceOnLetterSpacingChange: undefined,
|
|
127
149
|
debounceOnLineHeightChange: undefined,
|
|
@@ -149,18 +171,17 @@ export default defineComponent({
|
|
|
149
171
|
if (!selectedTextStyleOption) {
|
|
150
172
|
return theValue;
|
|
151
173
|
}
|
|
152
|
-
|
|
174
|
+
// Typography must follow the RENDERER's per-property cascade (ADR-0019): each prop
|
|
175
|
+
// resolves element-first over the role, so the panel shows the same size/family/weight
|
|
176
|
+
// the canvas paints — a per-block override stays visible in the sliders instead of
|
|
177
|
+
// snapping back to the role. `resolveTextStyle` is the shared resolver (colour included,
|
|
178
|
+
// element-first via `resolveTextColor` with the container-aware middle rung); mirroring it
|
|
179
|
+
// here is what keeps the panel and canvas from drifting, and it protects the handlers below
|
|
180
|
+
// that spread `selectedTextStyle`. The role style is spread first to keep its non-cascade
|
|
181
|
+
// props (e.g. backgroundColor); alignment stays role-first and applyAutoScale is re-layered.
|
|
182
|
+
return Object.assign({}, selectedTextStyleOption.style, resolveTextStyle(theValue, selectedTextStyleOption.style, this.containerDefaultColor), {
|
|
153
183
|
applyAutoScale: theValue.applyAutoScale,
|
|
154
184
|
textAlign: selectedTextStyleOption.style.textAlign || theValue.textAlign,
|
|
155
|
-
// `color` must follow the RENDERER's cascade (element first, then the global
|
|
156
|
-
// style) or the panel shows one colour while the canvas paints another. It
|
|
157
|
-
// also protects the handlers below, which all spread `selectedTextStyle`:
|
|
158
|
-
// without it, editing e.g. font size replaces the element's colour with the
|
|
159
|
-
// global one. Shared with the renderer via `resolveTextColor` — don't restate
|
|
160
|
-
// the chain here, a second copy is how the two drifted apart. The
|
|
161
|
-
// container-aware default is the resolver's middle rung (below the element
|
|
162
|
-
// colour, above the global style), fed from the same helper the renderer uses.
|
|
163
|
-
color: resolveTextColor(theValue, selectedTextStyleOption.style, this.containerDefaultColor),
|
|
164
185
|
});
|
|
165
186
|
},
|
|
166
187
|
textCSSStyleOptions() {
|
|
@@ -240,33 +261,88 @@ export default defineComponent({
|
|
|
240
261
|
this.debounceOnLineHeightChange(val);
|
|
241
262
|
},
|
|
242
263
|
},
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
264
|
+
// The plain role name: the dropdown title (its asterisk is the dropdown's own) and the
|
|
265
|
+
// "Apply changes to all '<role>'" popup label.
|
|
266
|
+
selectedRoleLabel() {
|
|
267
|
+
const selected = this.textStyleTypeOptions.find((x) => x.isSelected);
|
|
268
|
+
return selected?.label ?? '';
|
|
269
|
+
},
|
|
270
|
+
selectedRoleType() {
|
|
271
|
+
return this.textStyleTypeOptions.find((x) => x.isSelected)?.value;
|
|
272
|
+
},
|
|
273
|
+
// A block has a typography override when it carries any cascade prop of its own. The
|
|
274
|
+
// store normalizes role-equal props away on write, so a present prop is a real override.
|
|
275
|
+
hasTypographyOverride() {
|
|
276
|
+
if (!this.showTextStyleTypeOptions)
|
|
277
|
+
return false;
|
|
278
|
+
const value = this.value;
|
|
279
|
+
if (!value?.textStyleType)
|
|
280
|
+
return false;
|
|
281
|
+
return TEXT_STYLE_CASCADE_PROPS.some((prop) => value[prop] != null);
|
|
282
|
+
},
|
|
283
|
+
// BP-5969: the collapsed card header renders the role name in its OWN
|
|
284
|
+
// typography. We derive the inline style from the same resolved style the
|
|
285
|
+
// controls edit (`selectedTextStyle`), so the preview repaints live as the
|
|
286
|
+
// sliders/pickers move. Size is capped so a large role (e.g. H1 at 60px)
|
|
287
|
+
// still fits the header row rather than overflowing the card.
|
|
288
|
+
//
|
|
289
|
+
// Family/weight/style/decoration are applied so the preview shows the role's
|
|
290
|
+
// font AND its B/I/U/S styling. The family is quoted (multi-word names like
|
|
291
|
+
// "PT Serif" must be a single CSS token) and given a generic fallback.
|
|
292
|
+
textStylePreviewStyle() {
|
|
293
|
+
const style = this.selectedTextStyle;
|
|
294
|
+
const sizePx = Math.min(Number(textSizeValueConvertor.convert(style)) ||
|
|
295
|
+
TEXT_STYLE_PREVIEW_MAX_SIZE_PX, TEXT_STYLE_PREVIEW_MAX_SIZE_PX);
|
|
296
|
+
// Strip any quotes the value already carries, then re-quote once.
|
|
297
|
+
const family = (style.fontFamily || '').replace(/^['"]|['"]$/g, '');
|
|
298
|
+
return {
|
|
299
|
+
fontFamily: family ? `"${family}", sans-serif` : 'inherit',
|
|
300
|
+
fontSize: `${sizePx}px`,
|
|
301
|
+
fontWeight: style.fontWeight || 'normal',
|
|
302
|
+
fontStyle: style.fontStyle || 'normal',
|
|
303
|
+
letterSpacing: style.letterSpacing || 'normal',
|
|
304
|
+
// lineHeight is intentionally omitted: the preview is a single truncated
|
|
305
|
+
// line, so the role's line-height only adds vertical padding that
|
|
306
|
+
// misaligns the header row. Let it inherit the panel's default instead.
|
|
307
|
+
textDecoration: style.textDecoration || 'none',
|
|
308
|
+
};
|
|
309
|
+
},
|
|
310
|
+
// BP-5969: the `Family • Sizepx` line shown under the role name when
|
|
311
|
+
// collapsed. Size is the true edited size (uncapped, unlike the preview).
|
|
312
|
+
textStylePreviewSubtitle() {
|
|
313
|
+
const style = this.selectedTextStyle;
|
|
314
|
+
const family = style.fontFamily || '';
|
|
315
|
+
const sizePx = textSizeValueConvertor.convert(style);
|
|
316
|
+
const parts = [family, sizePx ? `${sizePx}px` : ''].filter(Boolean);
|
|
317
|
+
return parts.join(' • ');
|
|
249
318
|
},
|
|
250
319
|
},
|
|
251
320
|
methods: {
|
|
252
321
|
emitChange(style, textStyleType) {
|
|
322
|
+
// BP-5969 (ADR-0020): linking a role is a TYPOGRAPHY action and no longer touches
|
|
323
|
+
// colour — a role carries none, and colour is a separate axis, so switching roles
|
|
324
|
+
// keeps the element's own colour + background (a full clean slate is the explicit
|
|
325
|
+
// "reset to global" action). A whole-box edit likewise keeps the current link (it no
|
|
326
|
+
// longer detaches).
|
|
253
327
|
if (!this.showTextStyleTypeOptions) {
|
|
254
328
|
textStyleType = undefined;
|
|
255
329
|
}
|
|
330
|
+
else if (textStyleType === undefined) {
|
|
331
|
+
textStyleType = this.value
|
|
332
|
+
?.textStyleType;
|
|
333
|
+
}
|
|
256
334
|
const { backgroundColor, ...filteredStyle } = style;
|
|
257
|
-
|
|
335
|
+
// Normalise here, not only downstream: content-settings-store does this for its own
|
|
336
|
+
// fields, but nav, header-button and footer text write straight to their own stores,
|
|
337
|
+
// which keep what they're given without checking it against the role. Without this, one
|
|
338
|
+
// B/I/U/S click bakes fontStyle/textDecoration in as a permanent override
|
|
339
|
+
// (`text-css-style-options.convertor` always writes all four props), and a later role
|
|
340
|
+
// edit can never repaint it back.
|
|
341
|
+
const value = normalizeTextStyleAgainstRole({
|
|
258
342
|
...(backgroundColor === undefined ? filteredStyle : style),
|
|
259
343
|
textAlign: style.textAlign, //text align should never be empty (setting a textalign here causes text alignment changes when changing global text styles)
|
|
260
344
|
textStyleType,
|
|
261
|
-
};
|
|
262
|
-
// Linking to a global style drops the element's own colour override: the
|
|
263
|
-
// renderer resolves colour element-first (see resolveTextColor), so a colour
|
|
264
|
-
// parked before the link would keep winning. Colours are the only element-first
|
|
265
|
-
// properties, so nothing else needs clearing.
|
|
266
|
-
if (textStyleType) {
|
|
267
|
-
value.color = undefined;
|
|
268
|
-
value.backgroundColor = undefined;
|
|
269
|
-
}
|
|
345
|
+
}, this.textStyleOptions);
|
|
270
346
|
this.$emit('update:modelValue', { id: this.id, name: this.name, value });
|
|
271
347
|
if (!textStyleType) {
|
|
272
348
|
this.textStyleTypeOptions.forEach((option) => {
|
|
@@ -277,9 +353,20 @@ export default defineComponent({
|
|
|
277
353
|
toggleCollapsed() {
|
|
278
354
|
this.isCollapsed = !this.isCollapsed;
|
|
279
355
|
},
|
|
356
|
+
// BP-5969: a whole-box edit layers a SPARSE override on the element's own style (not
|
|
357
|
+
// the resolved role), so the role's colour/typography is never baked in as an
|
|
358
|
+
// override. Store normalization then drops any prop equal to the role. For an unlinked
|
|
359
|
+
// field (e.g. the role-definition editor, `showTextStyleTypeOptions` false) there is no
|
|
360
|
+
// role class, so the full resolved style is the base.
|
|
361
|
+
overrideBaseStyle() {
|
|
362
|
+
const value = this.value;
|
|
363
|
+
return this.showTextStyleTypeOptions && value?.textStyleType
|
|
364
|
+
? { ...value }
|
|
365
|
+
: this.selectedTextStyle;
|
|
366
|
+
},
|
|
280
367
|
onSelectFont(font) {
|
|
281
368
|
const newValue = {
|
|
282
|
-
...this.
|
|
369
|
+
...this.overrideBaseStyle(),
|
|
283
370
|
fontFamily: FONT_FAMILY_CONFIGS[font.key].name,
|
|
284
371
|
};
|
|
285
372
|
this.emitChange(newValue);
|
|
@@ -290,7 +377,7 @@ export default defineComponent({
|
|
|
290
377
|
isSelected: option.value === e.value ? !option.isSelected : option.isSelected,
|
|
291
378
|
}));
|
|
292
379
|
const newValue = {
|
|
293
|
-
...this.
|
|
380
|
+
...this.overrideBaseStyle(),
|
|
294
381
|
...textCSSStyleOptionsConvertor.convertBack({ options }),
|
|
295
382
|
};
|
|
296
383
|
this.emitChange(newValue);
|
|
@@ -304,11 +391,14 @@ export default defineComponent({
|
|
|
304
391
|
this.textStyleTypeOptions.forEach((option) => {
|
|
305
392
|
option.isSelected = option.value === e.value;
|
|
306
393
|
});
|
|
307
|
-
|
|
394
|
+
// Picking a role gives that role's look, as the RTE picker does: overrides kept from the
|
|
395
|
+
// previous role would otherwise win the per-property cascade. Colour is not typography,
|
|
396
|
+
// so it stays (global-text-style.md).
|
|
397
|
+
this.emitChange(omitTypography(this.value), e.value);
|
|
308
398
|
},
|
|
309
399
|
onSelectAlignment(e) {
|
|
310
400
|
const newValue = {
|
|
311
|
-
...this.
|
|
401
|
+
...this.overrideBaseStyle(),
|
|
312
402
|
...textAlignmentOptionsConvertor.convertBack({
|
|
313
403
|
options: [{ ...e, isSelected: true }],
|
|
314
404
|
}),
|
|
@@ -319,18 +409,14 @@ export default defineComponent({
|
|
|
319
409
|
const current = this.value;
|
|
320
410
|
// A colour edit on a linked element keeps the link and layers a sticky colour
|
|
321
411
|
// override rather than detaching. The renderer resolves colour element-first
|
|
322
|
-
// (resolveTextColor), so it wins over the
|
|
323
|
-
//
|
|
324
|
-
// auto-scale, colour) with no baked-in typography; re-selecting the style from
|
|
325
|
-
// the dropdown resets it back to the style's colour.
|
|
412
|
+
// (resolveTextColor), so it wins over the role's colour while typography stays
|
|
413
|
+
// driven by the role class. Preserve the element's existing (typography) overrides.
|
|
326
414
|
if (this.showTextStyleTypeOptions && current.textStyleType) {
|
|
327
415
|
this.$emit('update:modelValue', {
|
|
328
416
|
id: this.id,
|
|
329
417
|
name: this.name,
|
|
330
418
|
value: {
|
|
331
|
-
|
|
332
|
-
textAlign: current.textAlign,
|
|
333
|
-
applyAutoScale: current.applyAutoScale,
|
|
419
|
+
...current,
|
|
334
420
|
...colorConvertor.convertBack(color.value),
|
|
335
421
|
},
|
|
336
422
|
});
|
|
@@ -343,32 +429,92 @@ export default defineComponent({
|
|
|
343
429
|
},
|
|
344
430
|
onSelectBackgroundColor(color) {
|
|
345
431
|
const newValue = {
|
|
346
|
-
...this.
|
|
432
|
+
...this.overrideBaseStyle(),
|
|
347
433
|
...backgroundColorConvertor.convertBack(color.value),
|
|
348
434
|
};
|
|
349
435
|
this.emitChange(newValue);
|
|
350
436
|
},
|
|
351
437
|
onTextSizeChange(textSize) {
|
|
352
438
|
const newValue = {
|
|
353
|
-
...this.
|
|
439
|
+
...this.overrideBaseStyle(),
|
|
354
440
|
...textSizeValueConvertor.convertBack(textSize),
|
|
355
441
|
};
|
|
356
442
|
this.emitChange(newValue);
|
|
357
443
|
},
|
|
358
444
|
onLetterSpacingChange(spacing) {
|
|
359
445
|
const newValue = {
|
|
360
|
-
...this.
|
|
446
|
+
...this.overrideBaseStyle(),
|
|
361
447
|
...letterSpacingValueConvertor.convertBack(spacing),
|
|
362
448
|
};
|
|
363
449
|
this.emitChange(newValue);
|
|
364
450
|
},
|
|
365
451
|
onLineHeightChange(lineHeight) {
|
|
366
452
|
const newValue = {
|
|
367
|
-
...this.
|
|
453
|
+
...this.overrideBaseStyle(),
|
|
368
454
|
...lineHeightValueConvertor.convertBack(lineHeight),
|
|
369
455
|
};
|
|
370
456
|
this.emitChange(newValue);
|
|
371
457
|
},
|
|
458
|
+
// Clear the typography overrides so the block follows its role. Colour and background stay:
|
|
459
|
+
// a role carries no colour to fall back to (ADR 0020).
|
|
460
|
+
resetToGlobal() {
|
|
461
|
+
this.$emit('update:modelValue', {
|
|
462
|
+
id: this.id,
|
|
463
|
+
name: this.name,
|
|
464
|
+
value: omitTypography(this.value),
|
|
465
|
+
});
|
|
466
|
+
},
|
|
467
|
+
// BP-5969 (A5): promote this block's typography overrides into the role definition, so
|
|
468
|
+
// every block linked to the role adopts them. Then reset this block to fully-linked and
|
|
469
|
+
// re-normalize its siblings (their now-role-equal overrides drop away).
|
|
470
|
+
saveToGlobal() {
|
|
471
|
+
const value = this.value;
|
|
472
|
+
const type = value.textStyleType;
|
|
473
|
+
if (!type)
|
|
474
|
+
return;
|
|
475
|
+
const role = this.textStyleOptions[type]?.style;
|
|
476
|
+
if (!role)
|
|
477
|
+
return;
|
|
478
|
+
const overrides = {};
|
|
479
|
+
TEXT_STYLE_CASCADE_PROPS.forEach((prop) => {
|
|
480
|
+
const propValue = value[prop];
|
|
481
|
+
if (propValue != null) {
|
|
482
|
+
overrides[prop] =
|
|
483
|
+
prop === 'textDecoration'
|
|
484
|
+
? composeTextDecoration(role.textDecoration, propValue)
|
|
485
|
+
: propValue;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
const previousRole = { ...role };
|
|
489
|
+
this.styleSettingsStore.setTextStyleOption({
|
|
490
|
+
type,
|
|
491
|
+
style: { ...role, ...overrides },
|
|
492
|
+
});
|
|
493
|
+
this.resetToGlobal();
|
|
494
|
+
this.contentSettingsStore.renormalizeTextStylesForRole(type, previousRole);
|
|
495
|
+
},
|
|
496
|
+
// The role dropdown pairs with a "style modified" toggle that opens this popup
|
|
497
|
+
// (apply to all / reset to default), mirroring the RTE toolbar affordance.
|
|
498
|
+
toggleStyleModifiedPopup() {
|
|
499
|
+
this.isStyleModifiedPopupOpen = !this.isStyleModifiedPopupOpen;
|
|
500
|
+
},
|
|
501
|
+
onClickOutsideStyleModified(event) {
|
|
502
|
+
// v-click-outside also fires on window blur (its iframe detection), where the
|
|
503
|
+
// target is `window` and has no `closest` — treat a non-element target as outside.
|
|
504
|
+
const { target } = event;
|
|
505
|
+
const outside = !(target instanceof Element) ||
|
|
506
|
+
!target.closest('.text-style-field__modified-popup');
|
|
507
|
+
if (outside)
|
|
508
|
+
this.isStyleModifiedPopupOpen = false;
|
|
509
|
+
},
|
|
510
|
+
onApplyStyleToRole() {
|
|
511
|
+
this.saveToGlobal();
|
|
512
|
+
this.isStyleModifiedPopupOpen = false;
|
|
513
|
+
},
|
|
514
|
+
onResetStyleToRole() {
|
|
515
|
+
this.resetToGlobal();
|
|
516
|
+
this.isStyleModifiedPopupOpen = false;
|
|
517
|
+
},
|
|
372
518
|
generateFontFamilySelectorKey() {
|
|
373
519
|
return `fontFamilySelector-${this.id}-${Date.now()}`;
|
|
374
520
|
},
|
|
@@ -377,9 +523,7 @@ export default defineComponent({
|
|
|
377
523
|
syncTextStyleTypeSelection() {
|
|
378
524
|
const value = this.value;
|
|
379
525
|
this.textStyleTypeOptions.forEach((option) => {
|
|
380
|
-
//
|
|
381
|
-
// option's value is `undefined`, so that form would SELECT it whenever no
|
|
382
|
-
// style is set, but the convention (see emitChange) is all-flags-false.
|
|
526
|
+
// A value with no role selects nothing (see emitChange): every option stays unselected.
|
|
383
527
|
option.isSelected =
|
|
384
528
|
Boolean(value?.textStyleType) && option.value === value.textStyleType;
|
|
385
529
|
});
|
|
@@ -399,6 +399,12 @@ export declare const useUiContentSettingsStore: import("pinia").StoreDefinition<
|
|
|
399
399
|
id: string;
|
|
400
400
|
name: string;
|
|
401
401
|
}): unknown;
|
|
402
|
+
renormalizeTextStylesForRole(type: string, previousRole?: Record<string, unknown>, active?: {
|
|
403
|
+
id: string;
|
|
404
|
+
name: string;
|
|
405
|
+
index?: number;
|
|
406
|
+
doc: unknown;
|
|
407
|
+
}): void;
|
|
402
408
|
applyCardContrastToItem({ id }: {
|
|
403
409
|
id: string;
|
|
404
410
|
}): void;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { defineStore } from 'pinia';
|
|
2
|
-
import {
|
|
2
|
+
import { CONTENT_TEXT_STYLE_PROPERTY_KEYS } from '@brand-page';
|
|
3
|
+
import { applyTextContrast } from '@brand-page/utils/container-text-color.util';
|
|
4
|
+
import { normalizeTextStyleAgainstRole as normalizeAgainstRole } from '@brand-page/utils/text-style.util';
|
|
5
|
+
import { authorContentRteFields, isTiptapDocument, relinkRoleEqualMarks, } from '@brand-page-maker/utils';
|
|
6
|
+
import { pairedRteTextField } from '../../color-strategies/rte-field-pairs';
|
|
3
7
|
import { CONTENT_SETTINGS_CONFIGS, SIDE_BAR_TAB_NAMES, } from '@brand-page-maker/constants';
|
|
4
8
|
import { RESERVED_FIELD_NAMES } from '../constants';
|
|
5
9
|
import { UI_EVENT_SOURCES } from '../../models';
|
|
@@ -7,7 +11,8 @@ import { CONTENT_SETTINGS_DISPLAY_MODES, ITEM_CATEGORIES, ITEM_CATEGORY_NAMES, }
|
|
|
7
11
|
import { useUiStore, useBrandPageMakerUserStore, useBrandPageMakerStore, useBrandPageContainerStore, useVideoStore, } from '@brand-page-maker/stores';
|
|
8
12
|
import { useHistoryStore } from '@brand-page-maker/stores/history/history-store';
|
|
9
13
|
import { useUiSideBarStore } from '../../side-bar/store';
|
|
10
|
-
import { createDefaultContentItemGroupState, createDefaultContentItemState, } from '../../navigation-style-settings/store';
|
|
14
|
+
import { createDefaultContentItemGroupState, createDefaultContentItemState, useUiNavigationStyleSettingsStore, } from '../../navigation-style-settings/store';
|
|
15
|
+
import { useUiPageSettingsStore } from '../../page-settings/store';
|
|
11
16
|
import { adminValidatorsDict, dummyValidator, validatorDict, } from '@brand-page-maker/validators';
|
|
12
17
|
import { vueDeepMerge } from '../../../helpers/vue.helper';
|
|
13
18
|
import {} from '@brand-page-maker/stores/video';
|
|
@@ -36,6 +41,16 @@ const armHistoryMergeForHydrationWrite = (isHydrationWrite) => {
|
|
|
36
41
|
return;
|
|
37
42
|
useHistoryStore().mergeNextMutation();
|
|
38
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* BP-5969 (ADR-0019): drop typography overrides equal to the block's current role value so the
|
|
46
|
+
* page-scoped role CSS class drives them — and a later role edit repaints the block instead of a
|
|
47
|
+
* stale value pinning it. Runs on every text-style write (sidebar edit, RTE link, mount
|
|
48
|
+
* re-derivation), keeping the persisted style sparse. Delegates to the shared, pure normalizer so
|
|
49
|
+
* the maker and the AI metadata builder share one authority; this wrapper supplies the store's
|
|
50
|
+
* live role table.
|
|
51
|
+
*/
|
|
52
|
+
const normalizeTextStyleAgainstRole = (value) => normalizeAgainstRole(value, useBrandPageMakerStore().brandPageData?.styles?.textStyles
|
|
53
|
+
?.textStyleOptions);
|
|
39
54
|
export const CONTENT_SETTINGS_MODES = {
|
|
40
55
|
edit: 'edit',
|
|
41
56
|
add: 'add',
|
|
@@ -231,11 +246,13 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
231
246
|
if (!item) {
|
|
232
247
|
return;
|
|
233
248
|
}
|
|
234
|
-
|
|
249
|
+
// BP-5969: a text-style write drops overrides equal to the role (no-op otherwise).
|
|
250
|
+
const value = normalizeTextStyleAgainstRole(payload.value);
|
|
251
|
+
if (isSameValue(item.settings.content[payload.name], value)) {
|
|
235
252
|
return; // no-op write: don't validate, don't flip the modified flag
|
|
236
253
|
}
|
|
237
254
|
armHistoryMergeForHydrationWrite(payload.isHydrationWrite);
|
|
238
|
-
item.settings.content[payload.name] =
|
|
255
|
+
item.settings.content[payload.name] = value;
|
|
239
256
|
this.validateItem({
|
|
240
257
|
id: payload.id,
|
|
241
258
|
name: payload.name,
|
|
@@ -275,7 +292,9 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
275
292
|
// open a plain capture burst that swallows the flagged text write
|
|
276
293
|
// (BP-5810's second act).
|
|
277
294
|
armHistoryMergeForHydrationWrite(isHydrationWrite);
|
|
278
|
-
|
|
295
|
+
// BP-5969: normalize the merged style so an override equal to the role is dropped
|
|
296
|
+
// (the class supplies it) — keeps the block following its role after a role edit.
|
|
297
|
+
item.settings.content[`${name}Style`] = normalizeTextStyleAgainstRole(vueDeepMerge(item.settings.content[`${name}Style`], value));
|
|
279
298
|
this.validateItem({ id, name });
|
|
280
299
|
this.onContentChanged();
|
|
281
300
|
},
|
|
@@ -286,6 +305,77 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
286
305
|
}
|
|
287
306
|
return item.settings.content[`${name}Style`];
|
|
288
307
|
},
|
|
308
|
+
// BP-5969 (A5 save-to-global): after a role's definition changes, re-normalize every
|
|
309
|
+
// block linked to it so any override that now equals the new role value is dropped and
|
|
310
|
+
// the block follows the role again. Walks the content text-style fields + text items.
|
|
311
|
+
// After "Apply changes to all": drop each sibling style override that now equals the role, and
|
|
312
|
+
// relink each sibling RTE run literal equal to the role before (`previousRole`) or after. The
|
|
313
|
+
// `active` editor has already relinked its own doc and still holds its debounced write, so that
|
|
314
|
+
// doc is written as given and that editor isn't remounted.
|
|
315
|
+
renormalizeTextStylesForRole(type, previousRole, active) {
|
|
316
|
+
const styleKeys = Object.keys(CONTENT_TEXT_STYLE_PROPERTY_KEYS);
|
|
317
|
+
const textStyleOptions = useBrandPageMakerStore().brandPageData?.styles?.textStyles
|
|
318
|
+
?.textStyleOptions;
|
|
319
|
+
const roles = [
|
|
320
|
+
textStyleOptions?.[type]?.style,
|
|
321
|
+
previousRole,
|
|
322
|
+
];
|
|
323
|
+
let relinkedRte = false;
|
|
324
|
+
// A text item's editors share one field, so a relinked sibling item remounts the active one too.
|
|
325
|
+
let relinkedInActiveField = false;
|
|
326
|
+
const relink = (doc, inActiveField = false) => {
|
|
327
|
+
if (!isTiptapDocument(doc))
|
|
328
|
+
return doc;
|
|
329
|
+
const relinked = relinkRoleEqualMarks(doc, roles);
|
|
330
|
+
if (relinked !== doc) {
|
|
331
|
+
relinkedRte = true;
|
|
332
|
+
relinkedInActiveField ||= inActiveField;
|
|
333
|
+
}
|
|
334
|
+
return relinked;
|
|
335
|
+
};
|
|
336
|
+
for (const item of this.items) {
|
|
337
|
+
const content = item.settings.content;
|
|
338
|
+
const sectionType = content.type ?? item.type;
|
|
339
|
+
for (const key of styleKeys) {
|
|
340
|
+
const style = content[key];
|
|
341
|
+
if (style?.textStyleType !== type)
|
|
342
|
+
continue;
|
|
343
|
+
content[key] = normalizeTextStyleAgainstRole(style);
|
|
344
|
+
const textField = pairedRteTextField(sectionType, key);
|
|
345
|
+
if (!textField)
|
|
346
|
+
continue;
|
|
347
|
+
if (active && active.id === item.id && active.name === textField) {
|
|
348
|
+
content[textField] = active.doc;
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
content[textField] = relink(content[textField]);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
const textItems = content.textItems;
|
|
355
|
+
if (Array.isArray(textItems)) {
|
|
356
|
+
const isActiveField = !!active && active.id === item.id && active.name === 'textItems';
|
|
357
|
+
textItems.forEach((textItem, index) => {
|
|
358
|
+
if (textItem.textStyle?.textStyleType !== type)
|
|
359
|
+
return;
|
|
360
|
+
textItem.textStyle = normalizeTextStyleAgainstRole(textItem.textStyle);
|
|
361
|
+
textItem.text =
|
|
362
|
+
isActiveField && active?.index === index
|
|
363
|
+
? active.doc
|
|
364
|
+
: relink(textItem.text, isActiveField);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
// Header and footer text links to the same roles but lives in its own stores.
|
|
369
|
+
useUiNavigationStyleSettingsStore().renormalizeTextStylesForRole(type, textStyleOptions);
|
|
370
|
+
useUiPageSettingsStore().renormalizeTextStylesForRole(type, textStyleOptions);
|
|
371
|
+
// A mounted sibling editor holds its own copy of the doc and would write it back.
|
|
372
|
+
if (relinkedRte) {
|
|
373
|
+
useHistoryStore().markRteResync(active && !relinkedInActiveField
|
|
374
|
+
? { except: { id: active.id, name: active.name } }
|
|
375
|
+
: undefined);
|
|
376
|
+
}
|
|
377
|
+
this.onContentChanged();
|
|
378
|
+
},
|
|
289
379
|
// Re-bake a container-bound block's card text contrast after a text-style change cleared
|
|
290
380
|
// the element colour (a reset), so a card title switched to another style still uses the
|
|
291
381
|
// higher-contrast brand colour. A no-op for non-card content and for fields that keep an
|
|
@@ -301,7 +391,7 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
301
391
|
if (!styles) {
|
|
302
392
|
return;
|
|
303
393
|
}
|
|
304
|
-
|
|
394
|
+
applyTextContrast(item.settings.content, styles, brandPageMakerStore.brandPageType);
|
|
305
395
|
this.onContentChanged();
|
|
306
396
|
},
|
|
307
397
|
updateTextItemTextStyleType({ id, name, value, index, isHydrationWrite, }) {
|
|
@@ -321,7 +411,9 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
321
411
|
return;
|
|
322
412
|
}
|
|
323
413
|
armHistoryMergeForHydrationWrite(isHydrationWrite);
|
|
324
|
-
item
|
|
414
|
+
// BP-5969: normalize so a text-item override equal to the role is dropped.
|
|
415
|
+
item.settings.content.textItems[index].textStyle =
|
|
416
|
+
normalizeTextStyleAgainstRole(vueDeepMerge(item.settings.content.textItems[index].textStyle, value));
|
|
325
417
|
this.validateItem({ id, name });
|
|
326
418
|
this.onContentChanged();
|
|
327
419
|
},
|
|
@@ -385,8 +477,13 @@ export const useUiContentSettingsStore = defineStore('uiContentSettings', {
|
|
|
385
477
|
// readable brand-role colour baked in here rather than derived at render.
|
|
386
478
|
const styles = brandPageMakerStore.brandPageData?.styles;
|
|
387
479
|
if (styles) {
|
|
388
|
-
|
|
480
|
+
applyTextContrast(content, styles, brandPageMakerStore.brandPageType);
|
|
389
481
|
}
|
|
482
|
+
// Author RTE-eligible fields as Tiptap docs at birth — the replacement for the retired
|
|
483
|
+
// runtime plain→RTE rewrap. Runs after applyTextContrast has resolved the element colour
|
|
484
|
+
// onto style.color; it moves that colour into the mark and clears the object (matching
|
|
485
|
+
// migration-22's B1→D→G), so new content shares the migrated shape.
|
|
486
|
+
authorContentRteFields(content, styles?.textStyles?.textStyleOptions);
|
|
390
487
|
const settingsConfig = CONTENT_SETTINGS_CONFIGS()[content.type];
|
|
391
488
|
const fields = Object.keys(content)
|
|
392
489
|
.filter((k) => RESERVED_FIELD_NAMES.every((n) => n !== k))
|
|
@@ -82,6 +82,9 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
82
82
|
setHideBranding(payload: {
|
|
83
83
|
hideBranding: boolean;
|
|
84
84
|
}): void;
|
|
85
|
+
setSaveContactButtonTextStyle(payload: {
|
|
86
|
+
buttonTextStyle: import("../../../brand-page").SaveContactOptions["buttonTextStyle"];
|
|
87
|
+
}): void;
|
|
85
88
|
setSensitiveContent(payload: {
|
|
86
89
|
sensitiveContent: string;
|
|
87
90
|
}): void;
|
|
@@ -144,7 +147,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
144
147
|
brandPageType: import("../../../brand-page").BrandPageType;
|
|
145
148
|
}): void;
|
|
146
149
|
initialiseStoresByBrandPageModelAsync(brandPageModel: import("../../../brand-page").BrandPageModel): Promise<void>;
|
|
147
|
-
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData: _shopConfigData, isServerRenderOverride, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
150
|
+
initialise({ brandPage, brandPageType, logoDraftDesignAttributes, unsplashApplicationName, templateCategories, personalisationData, isPersonalisationEnabled, userPromptContentKey, showAiTemplatesTab, businessName, industry, layout, logoVariationImageUrls, shopConfigData: _shopConfigData, isServerRenderOverride, isBlankSite, }: import("@brand-page-maker/stores").InitialisePayload): Promise<void>;
|
|
148
151
|
initialisePages({ pages, sections, }: {
|
|
149
152
|
pages: import("../../../brand-page").PageModel[];
|
|
150
153
|
sections: import("@shared/page-settings/store").PageSettingsStateSections;
|
|
@@ -387,6 +390,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
387
390
|
isVariation: boolean;
|
|
388
391
|
isExcluded: boolean;
|
|
389
392
|
} | undefined;
|
|
393
|
+
bp_6136_v2_ai_builder?: {
|
|
394
|
+
key: string;
|
|
395
|
+
value: string;
|
|
396
|
+
isControl: boolean;
|
|
397
|
+
isVariation: boolean;
|
|
398
|
+
isExcluded: boolean;
|
|
399
|
+
} | undefined;
|
|
390
400
|
};
|
|
391
401
|
isSubsequentPublish: boolean;
|
|
392
402
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -462,6 +472,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
462
472
|
isVariation: boolean;
|
|
463
473
|
isExcluded: boolean;
|
|
464
474
|
} | undefined;
|
|
475
|
+
bp_6136_v2_ai_builder?: {
|
|
476
|
+
key: string;
|
|
477
|
+
value: string;
|
|
478
|
+
isControl: boolean;
|
|
479
|
+
isVariation: boolean;
|
|
480
|
+
isExcluded: boolean;
|
|
481
|
+
} | undefined;
|
|
465
482
|
};
|
|
466
483
|
isSubsequentPublish: boolean;
|
|
467
484
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -537,6 +554,13 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
537
554
|
isVariation: boolean;
|
|
538
555
|
isExcluded: boolean;
|
|
539
556
|
} | undefined;
|
|
557
|
+
bp_6136_v2_ai_builder?: {
|
|
558
|
+
key: string;
|
|
559
|
+
value: string;
|
|
560
|
+
isControl: boolean;
|
|
561
|
+
isVariation: boolean;
|
|
562
|
+
isExcluded: boolean;
|
|
563
|
+
} | undefined;
|
|
540
564
|
};
|
|
541
565
|
isSubsequentPublish: boolean;
|
|
542
566
|
isContextualUpgradeModalVisible: boolean;
|
|
@@ -684,6 +708,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
684
708
|
isHidden: boolean;
|
|
685
709
|
pageId: string;
|
|
686
710
|
}): void;
|
|
711
|
+
renormalizeTextStylesForRole(type: string, textStyleOptions: import("../../../brand-page").TextStyleOptions | undefined): void;
|
|
687
712
|
setPageSettingsSectionValue({ sectionName, propName, index, value, merge, viewport, }: {
|
|
688
713
|
sectionName: import("@shared/page-settings/store").PageSettingsSection;
|
|
689
714
|
propName: keyof import("@shared/page-settings/store").PageSettingsStateSectionStyles;
|