@designcrowd/library.brand-page 6.1.17 → 6.1.18-style-v2-4
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-CK6etjY1.js → CreatedOnBrandCrowd-de-de-T6IIvcWO.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-D2_dNMC_.js → CreatedOnBrandCrowd-en-us-CcakI_4t.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-DOfe1n1i.js → CreatedOnBrandCrowd-es-es-BuGC5ePC.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-8DzyX3jw.js → CreatedOnBrandCrowd-fr-ca-DLl1iE_a.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-8DzyX3jw.js → CreatedOnBrandCrowd-fr-fr-DLl1iE_a.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-Cv554e0a.js → CreatedOnBrandCrowd-pt-br-BPKSflng.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-Cv554e0a.js → CreatedOnBrandCrowd-pt-pt-BPKSflng.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-DvfcEbrX.js → CreatedOnDcom-de-de-XZW5aUpu.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-1CwdKDdv.js → CreatedOnDcom-en-us-BWMDFfWH.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DcYnDykc.js → CreatedOnDcom-es-es-DaMSB_Ks.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-BsFnW3Gm.js → CreatedOnDcom-fr-ca-vmogx8rl.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-CK2r77t1.js → CreatedOnDcom-fr-fr-BAwXuiS9.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-F9xrm0CV.js → CreatedOnDcom-pt-br-BWgKlfhZ.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-B1Cf7iLu.js → CreatedOnDcom-pt-pt-hj2Vs_8z.js} +1 -1
- package/lib/src/brand-page/components/page/Page.mixin.d.ts +4 -1
- package/lib/src/brand-page/components/page/Page.mixin.js +26 -9
- 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/index.d.ts +20 -20
- package/lib/src/brand-page/models/payment.model.d.ts +8 -6
- package/lib/src/brand-page/models/styles.model.d.ts +45 -1
- package/lib/src/brand-page/models/styles.model.js +106 -22
- package/lib/src/brand-page/utils/color-palette.util.d.ts +43 -23
- package/lib/src/brand-page/utils/color-palette.util.js +62 -27
- package/lib/src/brand-page/utils/container-text-color.util.d.ts +23 -13
- package/lib/src/brand-page/utils/container-text-color.util.js +211 -40
- 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 +4 -1
- package/lib/src/brand-page/utils/migration/migration-21.js +15 -4
- package/lib/src/brand-page/utils/migration/migration-22.d.ts +118 -0
- package/lib/src/brand-page/utils/migration/migration-22.js +622 -0
- package/lib/src/brand-page/utils/migration.util.js +16 -0
- package/lib/src/brand-page/utils/text-role-css.util.d.ts +112 -0
- package/lib/src/brand-page/utils/text-role-css.util.js +262 -0
- package/lib/src/brand-page/utils/text-style.util.d.ts +45 -18
- package/lib/src/brand-page/utils/text-style.util.js +69 -18
- package/lib/src/brand-page/utils/view-model.util.js +24 -19
- package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -0
- 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 +5 -134
- package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.js +0 -28
- package/lib/src/brand-page-maker/components/navigation/Navigation.mixin.d.ts +1 -1
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.d.ts +27 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.js +68 -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 -3
- package/lib/src/brand-page-maker/composables/rich-text-editor/formatting.js +108 -14
- package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.d.ts +10 -15
- package/lib/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.js +46 -1
- 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 +7 -0
- package/lib/src/brand-page-maker/composables/rich-text-editor/useRichTextEditor.js +216 -175
- 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.js +80 -75
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1016 -140
- package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -9
- package/lib/src/brand-page-maker/stores/history/history-store.d.ts +1 -1
- package/lib/src/brand-page-maker/utils/index.d.ts +1 -0
- package/lib/src/brand-page-maker/utils/index.js +1 -0
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.d.ts +52 -7
- package/lib/src/brand-page-maker/utils/rich-text-editor.util.js +212 -264
- package/lib/src/brand-page-maker/utils/rte-authoring.util.d.ts +2 -0
- package/lib/src/brand-page-maker/utils/rte-authoring.util.js +101 -0
- package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +26 -2
- package/lib/src/brand-page-maker/utils/rte-render.util.js +71 -6
- package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +7 -3
- package/lib/src/{bundled-translations-B2q5GWTQ.js → bundled-translations-CQ8dZIIe.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-FhH2H_rd.js → bundled-translations.de-DE-D10ohBT0.js} +9 -9
- package/lib/src/{bundled-translations.es-ES-_ZExxMi7.js → bundled-translations.es-ES-C1o3tbHg.js} +5 -5
- package/lib/src/{bundled-translations.fr-CA-Tg-ODIiC.js → bundled-translations.fr-CA-ClHWmoIS.js} +9 -9
- package/lib/src/{bundled-translations.fr-FR-C0sU51Mz.js → bundled-translations.fr-FR-C_PgkOpB.js} +9 -9
- package/lib/src/{bundled-translations.pt-BR-MYFIhA4u.js → bundled-translations.pt-BR-Csr8_jy7.js} +25 -25
- package/lib/src/{bundled-translations.pt-PT-DeUBSzCB.js → bundled-translations.pt-PT-D-vjMoOD.js} +17 -17
- package/lib/src/bundles/bundled-translations.de-DE.json +17 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +17 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +17 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +17 -1
- package/lib/src/bundles/bundled-translations.json +18 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +17 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +17 -1
- 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 +172 -106
- package/lib/src/css/library.brand-page-brandPage.min.css +172 -106
- package/lib/src/css/library.brand-page-designCom.min.css +172 -106
- package/lib/src/css/library.brand-page-preview.min.css +172 -106
- package/lib/src/index.mjs +192 -189
- package/lib/src/{lib-YpnLrt3k.js → lib-Ox43LM9t.js} +38373 -37443
- package/lib/src/metadata-builder/metadata-executor.js +16 -1
- package/lib/src/shared/color-palette/section-color-matches.js +8 -24
- package/lib/src/shared/color-strategies/rte-field-pairs.d.ts +20 -0
- package/lib/src/shared/color-strategies/rte-field-pairs.js +25 -0
- package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -134
- 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 +1 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItem.mixin.d.ts +1 -0
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +2 -1
- package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.js +8 -3
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.d.ts +1 -1
- package/lib/src/shared/content-settings/components/focused-content-item-settings/FocusedContentItemSettings.mixin.js +0 -7
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.d.ts +1238 -11
- package/lib/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.js +160 -47
- package/lib/src/shared/content-settings/store/content-settings-store.d.ts +1 -0
- package/lib/src/shared/content-settings/store/content-settings-store.js +75 -7
- package/lib/src/shared/navigation-style-settings/store/index.js +3 -2
- package/lib/src/shared/page-settings/components/delete-page-modal/DeletePageModal.mixin.d.ts +1 -1
- package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
- package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +150 -5
- package/lib/src/shared/style-settings/store/style-settings-store.d.ts +0 -1
- package/lib/src/shared/style-settings/store/style-settings-store.js +3 -4
- package/package.json +1 -1
- package/src/brand-page/components/about-section/AboutSection.vue.test.ts +0 -10
- package/src/brand-page/components/page/Page.mixin.ts +32 -11
- package/src/brand-page/components/page/Page.vue +6 -0
- 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.test.ts +116 -0
- package/src/brand-page/components/text-wrapper/TextWrapper.vue +139 -14
- package/src/brand-page/constants/font.constants.ts +37 -0
- package/src/brand-page/models/index.ts +20 -19
- package/src/brand-page/models/payment.model.ts +12 -6
- package/src/brand-page/models/styles.model.ts +161 -38
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +641 -32
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +150 -4
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +300 -8
- package/src/brand-page/utils/color-palette.util.test.ts +125 -0
- package/src/brand-page/utils/color-palette.util.ts +89 -26
- package/src/brand-page/utils/container-text-color.util.test.ts +467 -26
- package/src/brand-page/utils/container-text-color.util.ts +313 -47
- package/src/brand-page/utils/index.ts +1 -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 +4 -1
- package/src/brand-page/utils/migration/migration-20_5.test.ts +1 -1
- package/src/brand-page/utils/migration/migration-21.ts +24 -5
- package/src/brand-page/utils/migration/migration-22.test.ts +1014 -0
- package/src/brand-page/utils/migration/migration-22.ts +983 -0
- package/src/brand-page/utils/migration.util.test.ts +92 -31
- package/src/brand-page/utils/migration.util.ts +17 -0
- package/src/brand-page/utils/text-role-css.util.test.ts +268 -0
- package/src/brand-page/utils/text-role-css.util.ts +348 -0
- package/src/brand-page/utils/text-style.util.test.ts +138 -0
- package/src/brand-page/utils/text-style.util.ts +95 -20
- package/src/brand-page/utils/view-model.util.test.ts +218 -85
- package/src/brand-page/utils/view-model.util.ts +31 -25
- 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 +388 -181
- package/src/brand-page-maker/composables/rich-text-editor/block-typography.test.ts +163 -0
- package/src/brand-page-maker/composables/rich-text-editor/extensions/TextEffects.ts +110 -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 +88 -0
- package/src/brand-page-maker/composables/rich-text-editor/formatting.ts +153 -14
- package/src/brand-page-maker/composables/rich-text-editor/getRteExtensions.ts +40 -1
- 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.ts +285 -187
- 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 +153 -0
- package/src/brand-page-maker/models/content-settings.ts +80 -75
- package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +0 -35
- package/src/brand-page-maker/utils/__snapshots__/rte-render-parity.test.ts.snap +9 -0
- package/src/brand-page-maker/utils/index.ts +1 -0
- package/src/brand-page-maker/utils/rich-text-editor.util.test.ts +186 -409
- package/src/brand-page-maker/utils/rich-text-editor.util.ts +249 -484
- package/src/brand-page-maker/utils/rte-authoring.util.test.ts +244 -0
- package/src/brand-page-maker/utils/rte-authoring.util.ts +179 -0
- package/src/brand-page-maker/utils/rte-render.util.test.ts +44 -0
- package/src/brand-page-maker/utils/rte-render.util.ts +102 -5
- package/src/brand-page-maker/utils/rte-sanitize.util.ts +7 -3
- package/src/brand-page-maker/utils/rte-schema-version.test.ts +102 -0
- package/src/bundles/bundled-translations.de-DE.json +17 -1
- package/src/bundles/bundled-translations.es-ES.json +17 -1
- package/src/bundles/bundled-translations.fr-CA.json +17 -1
- package/src/bundles/bundled-translations.fr-FR.json +17 -1
- package/src/bundles/bundled-translations.json +18 -2
- package/src/bundles/bundled-translations.pt-BR.json +17 -1
- package/src/bundles/bundled-translations.pt-PT.json +17 -1
- package/src/composables/useTranslate.ts +2 -1
- package/src/metadata-builder/metadata-executor.ts +18 -1
- package/src/shared/color-palette/section-color-matches.test.ts +15 -11
- package/src/shared/color-palette/section-color-matches.ts +8 -27
- package/src/shared/color-strategies/rte-field-pairs.test.ts +26 -5
- package/src/shared/color-strategies/rte-field-pairs.ts +30 -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 +10 -3
- package/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.test.ts +47 -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 +0 -1
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.test.ts +247 -23
- package/src/shared/content-settings/components/text-style-field/TextStyleField.mixin.ts +179 -53
- package/src/shared/content-settings/components/text-style-field/TextStyleField.vue +39 -1
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.de-DE.json +15 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.es-ES.json +15 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-CA.json +15 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.fr-FR.json +15 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.json +6 -1
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-BR.json +15 -10
- package/src/shared/content-settings/components/text-style-field/i18n/text-style-field.pt-PT.json +15 -10
- package/src/shared/content-settings/store/content-settings-store.test.ts +111 -5
- package/src/shared/content-settings/store/content-settings-store.ts +107 -16
- package/src/shared/navigation-style-settings/store/index.ts +3 -3
- package/src/shared/style-settings/components/StyleSettings.vue +29 -25
- package/src/shared/style-settings/components/i18n/style-settings.de-DE.json +31 -20
- package/src/shared/style-settings/components/i18n/style-settings.es-ES.json +31 -20
- package/src/shared/style-settings/components/i18n/style-settings.fr-CA.json +31 -20
- package/src/shared/style-settings/components/i18n/style-settings.fr-FR.json +31 -20
- package/src/shared/style-settings/components/i18n/style-settings.json +12 -3
- package/src/shared/style-settings/components/i18n/style-settings.pt-BR.json +31 -20
- package/src/shared/style-settings/components/i18n/style-settings.pt-PT.json +31 -20
- package/src/shared/style-settings/components/text-style-options-settings-with-state/TextStyleOptionsSettingsWithState.vue +13 -34
- package/src/shared/style-settings/store/style-settings-store.ts +3 -4
- package/src/shared/style-settings/components/StyleSettingsSection.vue +0 -8
|
@@ -54,6 +54,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
54
54
|
}, {
|
|
55
55
|
brandPageToken(): string | null;
|
|
56
56
|
paletteStyleHtml(): string;
|
|
57
|
+
textRoleStyleHtml(): string;
|
|
57
58
|
pageScopeAttrs(): Record<string, string | undefined>;
|
|
58
59
|
contents(): ContentViewModel[];
|
|
59
60
|
/**
|
|
@@ -167,5 +168,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
167
168
|
isContentSelected: boolean;
|
|
168
169
|
isHeaderSelected: boolean;
|
|
169
170
|
isFooterSelected: boolean;
|
|
170
|
-
}, {}, {}, {}, string,
|
|
171
|
+
}, {}, {}, {}, string, () => {
|
|
172
|
+
[x: symbol]: import("vue").ComputedRef<any>;
|
|
173
|
+
}, true, {}, any>;
|
|
171
174
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent } from 'vue';
|
|
1
|
+
import { computed, defineComponent } from 'vue';
|
|
2
2
|
import { DEFAULT_FONT_FAMILY_KEY, FALLBACK_FONT_FAMILIES, FONT_FAMILY_CONFIGS, } from '../../constants';
|
|
3
|
-
import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, buildPaletteScopedCss, PAGE_SCOPE_ID_ATTRIBUTE, resolveColorReference, } from '@brand-page/utils';
|
|
3
|
+
import { getSlugFromContext, getPageHeadingText, buildPaletteRootCss, buildPaletteScopedCss, buildTextRoleRootCss, buildTextRoleScopedCss, TEXT_ROLE_OPTIONS_KEY, PAGE_SCOPE_ID_ATTRIBUTE, resolveColorReference, } from '@brand-page/utils';
|
|
4
4
|
import { findNavItemByRelativePath } from '@brand-page/utils/route.util';
|
|
5
5
|
import { BRAND_PAGE_TYPES } from '@brand-page/models';
|
|
6
6
|
import { hasProfileContent as checkHasProfileContent } from '@brand-page/utils/vcard.util';
|
|
@@ -72,6 +72,15 @@ export default defineComponent({
|
|
|
72
72
|
}),
|
|
73
73
|
};
|
|
74
74
|
},
|
|
75
|
+
// BP-5969: expose the live role options to every descendant TextWrapper so it can
|
|
76
|
+
// inline only its overrides and leave the role typography to the CSS class. A computed
|
|
77
|
+
// keeps it reactive (a role edit repaints), and `this` is the instance in Options-API
|
|
78
|
+
// provide(). Descendants that render outside a Page get `undefined` and bake inline.
|
|
79
|
+
provide() {
|
|
80
|
+
return {
|
|
81
|
+
[TEXT_ROLE_OPTIONS_KEY]: computed(() => this.viewModel?.styles?.textStyles?.textStyleOptions),
|
|
82
|
+
};
|
|
83
|
+
},
|
|
75
84
|
data() {
|
|
76
85
|
return {
|
|
77
86
|
isSideMenuOpen: false,
|
|
@@ -95,6 +104,17 @@ export default defineComponent({
|
|
|
95
104
|
? buildPaletteScopedCss(colors, this.pageScopeId)
|
|
96
105
|
: buildPaletteRootCss(colors);
|
|
97
106
|
},
|
|
107
|
+
// BP-5969: the global text roles as a page-scoped <style> of CSS classes
|
|
108
|
+
// (design-token render). Same root/scoped split as the palette above: a role
|
|
109
|
+
// edit is one CSS-rule change that repaints every block carrying the role class.
|
|
110
|
+
textRoleStyleHtml() {
|
|
111
|
+
const options = this.viewModel?.styles?.textStyles?.textStyleOptions;
|
|
112
|
+
if (!options)
|
|
113
|
+
return '';
|
|
114
|
+
return this.context?.isTemplate
|
|
115
|
+
? buildTextRoleScopedCss(options, this.pageScopeId)
|
|
116
|
+
: buildTextRoleRootCss(options);
|
|
117
|
+
},
|
|
98
118
|
// Spread onto EVERY top-level node of Page's fragment (template mode only).
|
|
99
119
|
// The root-background/overlay siblings paint values that can hold
|
|
100
120
|
// `var(--palette-…)`, and a custom property applies to its own node too.
|
|
@@ -161,13 +181,10 @@ export default defineComponent({
|
|
|
161
181
|
...this.viewModel?.styles?.backgroundStylesViewModel?.style,
|
|
162
182
|
};
|
|
163
183
|
}
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
if (baseTextColour) {
|
|
169
|
-
styles.color = baseTextColour;
|
|
170
|
-
}
|
|
184
|
+
// BP-5969 (ADR-0020): no page base coat. A role defines typography only, so `:root`
|
|
185
|
+
// no longer paints a text colour — every text element carries its own contrast-derived
|
|
186
|
+
// colour (baked at birth, or by migration-22 for existing sites). Form controls and SVG
|
|
187
|
+
// `currentColor` fills fall back to the browser default.
|
|
171
188
|
const textFontFamilyKey = this.viewModel.styles?.textStyles.textFontFamily ||
|
|
172
189
|
DEFAULT_FONT_FAMILY_KEY;
|
|
173
190
|
const textFontFamilyConfig = FONT_FAMILY_CONFIGS[textFontFamilyKey];
|
|
@@ -12,12 +12,7 @@ const BPviewModel = {
|
|
|
12
12
|
textItems: [],
|
|
13
13
|
type: 'text',
|
|
14
14
|
textStyle: {
|
|
15
|
-
fontSize: '1rem',
|
|
16
|
-
lineHeight: '1.5rem',
|
|
17
|
-
fontFamily: 'Lato',
|
|
18
15
|
textAlign: 'left',
|
|
19
|
-
overflowWrap: 'anywhere',
|
|
20
|
-
wordBreak: 'normal',
|
|
21
16
|
},
|
|
22
17
|
columnStyle: '1',
|
|
23
18
|
backgroundColor: {},
|
|
@@ -34,7 +29,6 @@ const BSviewModel = {
|
|
|
34
29
|
id: 'text-item-1',
|
|
35
30
|
text: 'lorem ipsum',
|
|
36
31
|
textStyle: {
|
|
37
|
-
fontSize: '1rem',
|
|
38
32
|
textAlign: 'left',
|
|
39
33
|
textStyleType: 'paragraphs',
|
|
40
34
|
},
|
|
@@ -43,7 +37,6 @@ const BSviewModel = {
|
|
|
43
37
|
id: 'text-item-2',
|
|
44
38
|
text: 'lorem ipsum',
|
|
45
39
|
textStyle: {
|
|
46
|
-
fontSize: '1rem',
|
|
47
40
|
textAlign: 'left',
|
|
48
41
|
textStyleType: 'paragraphs',
|
|
49
42
|
},
|
|
@@ -51,12 +44,7 @@ const BSviewModel = {
|
|
|
51
44
|
],
|
|
52
45
|
type: 'text',
|
|
53
46
|
textStyle: {
|
|
54
|
-
fontSize: '1rem',
|
|
55
|
-
lineHeight: '1.5rem',
|
|
56
|
-
fontFamily: 'Lato',
|
|
57
47
|
textAlign: 'left',
|
|
58
|
-
overflowWrap: 'anywhere',
|
|
59
|
-
wordBreak: 'normal',
|
|
60
48
|
},
|
|
61
49
|
columnStyle: '2',
|
|
62
50
|
backgroundColor: {},
|
|
@@ -71,12 +59,7 @@ const BSEmptyTextItem = {
|
|
|
71
59
|
textItems: [],
|
|
72
60
|
type: 'text',
|
|
73
61
|
textStyle: {
|
|
74
|
-
fontSize: '1rem',
|
|
75
|
-
lineHeight: '1.5rem',
|
|
76
|
-
fontFamily: 'Lato',
|
|
77
62
|
textAlign: 'left',
|
|
78
|
-
overflowWrap: 'anywhere',
|
|
79
|
-
wordBreak: 'normal',
|
|
80
63
|
},
|
|
81
64
|
columnStyle: '1',
|
|
82
65
|
backgroundColor: {},
|
|
@@ -2,6 +2,16 @@ export declare const DISPLAY_TEXT_TITLE = "Titles";
|
|
|
2
2
|
export declare const DISPLAY_TEXT_HEADINGS = "Headings";
|
|
3
3
|
export declare const DISPLAY_TEXT_BODY = "Paragraphs";
|
|
4
4
|
export declare const DISPlAY_TEXT_BUTTONS = "Button Texts";
|
|
5
|
+
export declare const DISPLAY_TEXT_HEADING_1 = "Heading 1";
|
|
6
|
+
export declare const DISPLAY_TEXT_HEADING_2 = "Heading 2";
|
|
7
|
+
export declare const DISPLAY_TEXT_HEADING_3 = "Heading 3";
|
|
8
|
+
export declare const DISPLAY_TEXT_HEADING_4 = "Heading 4";
|
|
9
|
+
export declare const DISPLAY_TEXT_HEADING_5 = "Heading 5";
|
|
10
|
+
export declare const DISPLAY_TEXT_HEADING_6 = "Heading 6";
|
|
11
|
+
export declare const DISPLAY_TEXT_PARAGRAPH_1 = "Paragraph 1";
|
|
12
|
+
export declare const DISPLAY_TEXT_PARAGRAPH_2 = "Paragraph 2";
|
|
13
|
+
export declare const DISPLAY_TEXT_PARAGRAPH_3 = "Paragraph 3";
|
|
14
|
+
export declare const DISPLAY_TEXT_BUTTON = "Button";
|
|
5
15
|
export declare const DEFAULT_TEXT_DECORATION: undefined;
|
|
6
16
|
export declare const DEFAULT_FONT_STYLE: undefined;
|
|
7
17
|
export declare const FONT_SIZE_TITLE = "2.25em";
|
|
@@ -13,6 +23,58 @@ export declare const FONT_WEIGHT_NORMAL = "normal";
|
|
|
13
23
|
export declare const LINE_HEIGHT_TITLE = "1.3";
|
|
14
24
|
export declare const LINE_HEIGHT_HEADINGS = "1.4";
|
|
15
25
|
export declare const LINE_HEIGHT_BODY = "1.5";
|
|
26
|
+
export declare const TEXT_ROLE_STYLE_DEFAULTS: {
|
|
27
|
+
readonly heading1: {
|
|
28
|
+
readonly fontSize: "6.875em";
|
|
29
|
+
readonly fontWeight: "bold";
|
|
30
|
+
readonly lineHeight: "1.2";
|
|
31
|
+
};
|
|
32
|
+
readonly heading2: {
|
|
33
|
+
readonly fontSize: "5.25em";
|
|
34
|
+
readonly fontWeight: "bold";
|
|
35
|
+
readonly lineHeight: "1.2";
|
|
36
|
+
};
|
|
37
|
+
readonly heading3: {
|
|
38
|
+
readonly fontSize: "3.1875em";
|
|
39
|
+
readonly fontWeight: "bold";
|
|
40
|
+
readonly lineHeight: "1.25";
|
|
41
|
+
};
|
|
42
|
+
readonly heading4: {
|
|
43
|
+
readonly fontSize: "2.1875em";
|
|
44
|
+
readonly fontWeight: "bold";
|
|
45
|
+
readonly lineHeight: "1.3";
|
|
46
|
+
};
|
|
47
|
+
readonly heading5: {
|
|
48
|
+
readonly fontSize: "1.4375em";
|
|
49
|
+
readonly fontWeight: "bold";
|
|
50
|
+
readonly lineHeight: "1.35";
|
|
51
|
+
};
|
|
52
|
+
readonly heading6: {
|
|
53
|
+
readonly fontSize: "1em";
|
|
54
|
+
readonly fontWeight: "bold";
|
|
55
|
+
readonly lineHeight: "1.4";
|
|
56
|
+
};
|
|
57
|
+
readonly paragraph1: {
|
|
58
|
+
readonly fontSize: "1.375em";
|
|
59
|
+
readonly fontWeight: "normal";
|
|
60
|
+
readonly lineHeight: "1.5";
|
|
61
|
+
};
|
|
62
|
+
readonly paragraph2: {
|
|
63
|
+
readonly fontSize: "1.125em";
|
|
64
|
+
readonly fontWeight: "normal";
|
|
65
|
+
readonly lineHeight: "1.5";
|
|
66
|
+
};
|
|
67
|
+
readonly paragraph3: {
|
|
68
|
+
readonly fontSize: "0.875em";
|
|
69
|
+
readonly fontWeight: "normal";
|
|
70
|
+
readonly lineHeight: "1.6";
|
|
71
|
+
};
|
|
72
|
+
readonly button: {
|
|
73
|
+
readonly fontSize: "1em";
|
|
74
|
+
readonly fontWeight: "normal";
|
|
75
|
+
readonly lineHeight: "1.2";
|
|
76
|
+
};
|
|
77
|
+
};
|
|
16
78
|
export declare const DEFAULT_FONT_SIZE = 12;
|
|
17
79
|
export declare const MIN_TEXT_SIZE_PX = 12;
|
|
18
80
|
export declare const MAX_TEXT_SIZE_PX = 128;
|
|
@@ -3,6 +3,18 @@ export const DISPLAY_TEXT_TITLE = 'Titles';
|
|
|
3
3
|
export const DISPLAY_TEXT_HEADINGS = 'Headings';
|
|
4
4
|
export const DISPLAY_TEXT_BODY = 'Paragraphs';
|
|
5
5
|
export const DISPlAY_TEXT_BUTTONS = 'Button Texts';
|
|
6
|
+
// BP-5969 — display names for the 10 global text roles (English fallback; the
|
|
7
|
+
// panel/picker use i18n `styleSettingsTr(<role>)`, these back it up).
|
|
8
|
+
export const DISPLAY_TEXT_HEADING_1 = 'Heading 1';
|
|
9
|
+
export const DISPLAY_TEXT_HEADING_2 = 'Heading 2';
|
|
10
|
+
export const DISPLAY_TEXT_HEADING_3 = 'Heading 3';
|
|
11
|
+
export const DISPLAY_TEXT_HEADING_4 = 'Heading 4';
|
|
12
|
+
export const DISPLAY_TEXT_HEADING_5 = 'Heading 5';
|
|
13
|
+
export const DISPLAY_TEXT_HEADING_6 = 'Heading 6';
|
|
14
|
+
export const DISPLAY_TEXT_PARAGRAPH_1 = 'Paragraph 1';
|
|
15
|
+
export const DISPLAY_TEXT_PARAGRAPH_2 = 'Paragraph 2';
|
|
16
|
+
export const DISPLAY_TEXT_PARAGRAPH_3 = 'Paragraph 3';
|
|
17
|
+
export const DISPLAY_TEXT_BUTTON = 'Button';
|
|
6
18
|
export const DEFAULT_TEXT_DECORATION = undefined;
|
|
7
19
|
export const DEFAULT_FONT_STYLE = undefined;
|
|
8
20
|
export const FONT_SIZE_TITLE = '2.25em';
|
|
@@ -14,6 +26,29 @@ export const FONT_WEIGHT_NORMAL = 'normal';
|
|
|
14
26
|
export const LINE_HEIGHT_TITLE = '1.3';
|
|
15
27
|
export const LINE_HEIGHT_HEADINGS = '1.4';
|
|
16
28
|
export const LINE_HEIGHT_BODY = '1.5';
|
|
29
|
+
// BP-5969 — §4 default typography for the 10 global text roles. Sizes in `em`
|
|
30
|
+
// (relative to the 16px root). Weights/letter-spacing are new: the legacy 4
|
|
31
|
+
// roles carried none, so these apply to new sites only — existing sites keep
|
|
32
|
+
// their persisted role definitions (migration-22 preserves appearance).
|
|
33
|
+
// Weight is strictly binary (BP-5969): headings default `bold`, body + button
|
|
34
|
+
// `normal`. No semibold tier — the RTE exposes only a normal/bold toggle, so the
|
|
35
|
+
// role defaults use the same `bold`/`normal` keywords that toggle (and every weight
|
|
36
|
+
// reader) speaks, not numeric weights.
|
|
37
|
+
//
|
|
38
|
+
// Sizes are a display scale in em @ 16px root; the px each em resolves to is noted
|
|
39
|
+
// inline. Headings anchor H1 110px → H6 16px; body runs 22/18/14; button stays 16px.
|
|
40
|
+
export const TEXT_ROLE_STYLE_DEFAULTS = {
|
|
41
|
+
heading1: { fontSize: '6.875em', fontWeight: 'bold', lineHeight: '1.2' }, // 110px
|
|
42
|
+
heading2: { fontSize: '5.25em', fontWeight: 'bold', lineHeight: '1.2' }, // 84px
|
|
43
|
+
heading3: { fontSize: '3.1875em', fontWeight: 'bold', lineHeight: '1.25' }, // 51px
|
|
44
|
+
heading4: { fontSize: '2.1875em', fontWeight: 'bold', lineHeight: '1.3' }, // 35px
|
|
45
|
+
heading5: { fontSize: '1.4375em', fontWeight: 'bold', lineHeight: '1.35' }, // 23px
|
|
46
|
+
heading6: { fontSize: '1em', fontWeight: 'bold', lineHeight: '1.4' }, // 16px
|
|
47
|
+
paragraph1: { fontSize: '1.375em', fontWeight: 'normal', lineHeight: '1.5' }, // 22px
|
|
48
|
+
paragraph2: { fontSize: '1.125em', fontWeight: 'normal', lineHeight: '1.5' }, // 18px
|
|
49
|
+
paragraph3: { fontSize: '0.875em', fontWeight: 'normal', lineHeight: '1.6' }, // 14px
|
|
50
|
+
button: { fontSize: '1em', fontWeight: 'normal', lineHeight: '1.2' }, // 16px
|
|
51
|
+
};
|
|
17
52
|
export const DEFAULT_FONT_SIZE = 12;
|
|
18
53
|
export const MIN_TEXT_SIZE_PX = 12;
|
|
19
54
|
export const MAX_TEXT_SIZE_PX = 128;
|
|
@@ -2,7 +2,7 @@ import type { FontFamilyKey, ImagesSectionContentDisplayStyle, HeaderDisplayStyl
|
|
|
2
2
|
import type { Content, PersonalisationRole } from './content.model';
|
|
3
3
|
import type { BrandPageType, ViewportsType } from './brand-page-context.model';
|
|
4
4
|
import { NavigationDesktop, NavigationMobile } from './navigation-styles.model';
|
|
5
|
-
import type { TextStyleDeclaration, LegacyTextStylesInput } from './styles.model';
|
|
5
|
+
import type { TextStyleDeclaration, RteTextRole, LegacyTextStylesInput } from './styles.model';
|
|
6
6
|
import { TextStyles } from './styles.model';
|
|
7
7
|
import { LogoStyles } from './logo.model';
|
|
8
8
|
import type { LogoImageModel, LogoTemplateImageModel } from './logo.model';
|
|
@@ -177,7 +177,7 @@ export interface TextContent extends Content {
|
|
|
177
177
|
* @deprecated Use `textStyle` instead. For backward compatibility.
|
|
178
178
|
*/
|
|
179
179
|
textSize: BrandPageCssStyle;
|
|
180
|
-
textStyle:
|
|
180
|
+
textStyle: RteTextRole;
|
|
181
181
|
/**
|
|
182
182
|
* @deprecated Use `textStyle` instead. For backward compatibility.
|
|
183
183
|
*/
|
|
@@ -197,9 +197,9 @@ export interface ProfileContent extends Content {
|
|
|
197
197
|
colorReplacements: ColorReplacement[];
|
|
198
198
|
mediaType?: string;
|
|
199
199
|
size?: string;
|
|
200
|
-
descriptionStyle:
|
|
201
|
-
nameStyle:
|
|
202
|
-
titleStyle:
|
|
200
|
+
descriptionStyle: RteTextRole;
|
|
201
|
+
nameStyle: RteTextRole;
|
|
202
|
+
titleStyle: RteTextRole;
|
|
203
203
|
}
|
|
204
204
|
export interface Address {
|
|
205
205
|
formattedAddress: string;
|
|
@@ -212,7 +212,7 @@ export interface MailingListContent extends Content {
|
|
|
212
212
|
acceptedFields?: 'emailOnly' | 'nameAndEmail';
|
|
213
213
|
title: RichTextValue;
|
|
214
214
|
buttonText: string;
|
|
215
|
-
titleStyle:
|
|
215
|
+
titleStyle: RteTextRole;
|
|
216
216
|
buttonTextStyle: TextStyleDeclaration;
|
|
217
217
|
backgroundStyle?: BrandPageCssStyle;
|
|
218
218
|
}
|
|
@@ -270,11 +270,11 @@ export interface ContactFormContent extends Content {
|
|
|
270
270
|
responseEmail: string;
|
|
271
271
|
imageUrl?: string;
|
|
272
272
|
layoutStyle?: string | null;
|
|
273
|
-
titleStyle?:
|
|
274
|
-
descriptionStyle?:
|
|
273
|
+
titleStyle?: RteTextRole;
|
|
274
|
+
descriptionStyle?: RteTextRole;
|
|
275
275
|
buttonTextStyle?: TextStyleDeclaration;
|
|
276
276
|
backgroundStyle?: BrandPageCssStyle;
|
|
277
|
-
successMessageStyle?:
|
|
277
|
+
successMessageStyle?: RteTextRole;
|
|
278
278
|
cardStyle?: BrandPageCssStyle;
|
|
279
279
|
colorReplacements?: ColorReplacement[];
|
|
280
280
|
mediaType?: string;
|
|
@@ -291,8 +291,8 @@ export interface BannerSectionContent extends Content {
|
|
|
291
291
|
email?: string;
|
|
292
292
|
tel?: string;
|
|
293
293
|
displayStyle: string;
|
|
294
|
-
titleStyle:
|
|
295
|
-
descriptionStyle:
|
|
294
|
+
titleStyle: RteTextRole;
|
|
295
|
+
descriptionStyle: RteTextRole;
|
|
296
296
|
backgroundStyle: BrandPageCssStyle;
|
|
297
297
|
cardStyle: BrandPageCssStyle;
|
|
298
298
|
colorReplacements: ColorReplacement[];
|
|
@@ -357,7 +357,7 @@ export interface TextItem {
|
|
|
357
357
|
/** Stable per-item identifier. See ImageItem.id. */
|
|
358
358
|
id: string;
|
|
359
359
|
text: RichTextValue;
|
|
360
|
-
textStyle:
|
|
360
|
+
textStyle: RteTextRole;
|
|
361
361
|
textOverride?: string;
|
|
362
362
|
}
|
|
363
363
|
export interface ShapesSectionContent extends Content, MediaSection {
|
|
@@ -377,8 +377,8 @@ export interface MediaSection extends Content {
|
|
|
377
377
|
description: RichTextValue;
|
|
378
378
|
displayStyle: ImagesSectionContentDisplayStyle;
|
|
379
379
|
items: TextShapeItem[] | TextMediaItem[];
|
|
380
|
-
titleStyle:
|
|
381
|
-
descriptionStyle:
|
|
380
|
+
titleStyle: RteTextRole;
|
|
381
|
+
descriptionStyle: RteTextRole;
|
|
382
382
|
headingStyle: TextStyleDeclaration;
|
|
383
383
|
paragraphStyle: TextStyleDeclaration;
|
|
384
384
|
backgroundStyle: BrandPageCssStyle;
|
|
@@ -406,7 +406,7 @@ export interface TestimonialSectionContent extends Content {
|
|
|
406
406
|
title: RichTextValue;
|
|
407
407
|
displayStyle: string;
|
|
408
408
|
items: TestimonialItems[];
|
|
409
|
-
titleStyle:
|
|
409
|
+
titleStyle: RteTextRole;
|
|
410
410
|
testimonialStyle: TextStyleDeclaration;
|
|
411
411
|
nameStyle: TextStyleDeclaration;
|
|
412
412
|
positionStyle: TextStyleDeclaration;
|
|
@@ -420,8 +420,8 @@ export interface AboutSectionContent extends Content {
|
|
|
420
420
|
title: RichTextValue;
|
|
421
421
|
paragraph: RichTextValue;
|
|
422
422
|
displayStyle: string;
|
|
423
|
-
titleStyle:
|
|
424
|
-
paragraphStyle:
|
|
423
|
+
titleStyle: RteTextRole;
|
|
424
|
+
paragraphStyle: RteTextRole;
|
|
425
425
|
backgroundStyle: BrandPageCssStyle;
|
|
426
426
|
colorReplacements: ColorReplacement[];
|
|
427
427
|
mediaType?: string;
|
|
@@ -448,7 +448,7 @@ export interface SocialLinksContent extends Content {
|
|
|
448
448
|
iconFillStyles: BrandPageCssStyle;
|
|
449
449
|
iconBackgroundStyles: BrandPageCssStyle;
|
|
450
450
|
backgroundStyles: BrandPageCssStyle;
|
|
451
|
-
titleStyle:
|
|
451
|
+
titleStyle: RteTextRole;
|
|
452
452
|
}
|
|
453
453
|
export declare const DIVIDER_STYLES: {
|
|
454
454
|
readonly none: "none";
|
|
@@ -471,8 +471,8 @@ export interface BookingSectionContent extends Content {
|
|
|
471
471
|
url: string;
|
|
472
472
|
email?: string;
|
|
473
473
|
tel?: string;
|
|
474
|
-
titleStyle:
|
|
475
|
-
descriptionStyle:
|
|
474
|
+
titleStyle: RteTextRole;
|
|
475
|
+
descriptionStyle: RteTextRole;
|
|
476
476
|
backgroundStyle: BrandPageCssStyle;
|
|
477
477
|
buttonPageId: string;
|
|
478
478
|
buttonLinkType: ButtonLinkType;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Content } from './content.model';
|
|
2
2
|
import type { ProductModel } from './shop.model';
|
|
3
3
|
import type { TextStyleDeclaration } from './styles.model';
|
|
4
|
+
import type { JSONContent } from '@tiptap/vue-3';
|
|
5
|
+
type RteText = string | JSONContent;
|
|
4
6
|
export declare const STRIPE_ADDRESS_LIMITS: {
|
|
5
7
|
readonly name: {
|
|
6
8
|
readonly min: 1;
|
|
@@ -118,11 +120,11 @@ export interface RequestPaymentConfig extends PaymentConfig {
|
|
|
118
120
|
}
|
|
119
121
|
export interface RequestPaymentContent extends Content {
|
|
120
122
|
type: 'request-payment';
|
|
121
|
-
description:
|
|
123
|
+
description: RteText;
|
|
122
124
|
displayStyle: string;
|
|
123
125
|
requestPaymentConfig: RequestPaymentConfig;
|
|
124
126
|
successMessage: string;
|
|
125
|
-
title:
|
|
127
|
+
title: RteText;
|
|
126
128
|
fillColor: BrandPageCssStyle;
|
|
127
129
|
defaultBorderColor: BrandPageCssStyle;
|
|
128
130
|
selectedBorderColor: BrandPageCssStyle;
|
|
@@ -144,12 +146,12 @@ export interface ShopContentConfig extends PaymentConfig {
|
|
|
144
146
|
}
|
|
145
147
|
export interface ShopContent extends Content {
|
|
146
148
|
type: 'shop-section';
|
|
147
|
-
description:
|
|
149
|
+
description: RteText;
|
|
148
150
|
successMessage: string;
|
|
149
151
|
products: ProductModel[];
|
|
150
152
|
displayStyle: string;
|
|
151
153
|
aspectRatio: string;
|
|
152
|
-
title:
|
|
154
|
+
title: RteText;
|
|
153
155
|
fillColor: BrandPageCssStyle;
|
|
154
156
|
defaultBorderColor: BrandPageCssStyle;
|
|
155
157
|
textColor?: BrandPageCssStyle;
|
|
@@ -165,8 +167,8 @@ export interface SupportMeConfig extends PaymentConfig {
|
|
|
165
167
|
}
|
|
166
168
|
export interface SupportMeContent extends Content {
|
|
167
169
|
type: 'support-me';
|
|
168
|
-
title:
|
|
169
|
-
description:
|
|
170
|
+
title: RteText;
|
|
171
|
+
description: RteText;
|
|
170
172
|
displayStyle: string;
|
|
171
173
|
successMessage: string;
|
|
172
174
|
supportMeConfig: SupportMeConfig;
|
|
@@ -1,12 +1,47 @@
|
|
|
1
1
|
import type { FontFamilyKey } from '../constants';
|
|
2
|
+
/**
|
|
3
|
+
* The 10 canonical global text roles (BP-5969) plus the 4 legacy roles.
|
|
4
|
+
*
|
|
5
|
+
* Legacy keys (`titles`/`headings`/`paragraphs`/`buttons`) are retained ONLY so
|
|
6
|
+
* pre-migration content keeps resolving until migration-22 converts it; they are
|
|
7
|
+
* hidden from the panel/picker (see `CANONICAL_TEXT_STYLE_TYPES`) and no new code
|
|
8
|
+
* should write them. See ADR-0019 and docs/plans/feat-bp-5969-*.
|
|
9
|
+
*/
|
|
2
10
|
export declare const TEXT_STYLE_TYPES: {
|
|
11
|
+
readonly heading1: "heading1";
|
|
12
|
+
readonly heading2: "heading2";
|
|
13
|
+
readonly heading3: "heading3";
|
|
14
|
+
readonly heading4: "heading4";
|
|
15
|
+
readonly heading5: "heading5";
|
|
16
|
+
readonly heading6: "heading6";
|
|
17
|
+
readonly paragraph1: "paragraph1";
|
|
18
|
+
readonly paragraph2: "paragraph2";
|
|
19
|
+
readonly paragraph3: "paragraph3";
|
|
20
|
+
readonly button: "button";
|
|
3
21
|
readonly titles: "titles";
|
|
4
22
|
readonly headings: "headings";
|
|
5
23
|
readonly paragraphs: "paragraphs";
|
|
6
24
|
readonly buttons: "buttons";
|
|
7
25
|
};
|
|
8
26
|
export type TextStyleType = keyof typeof TEXT_STYLE_TYPES;
|
|
27
|
+
/** The 10 roles shown in the panel/picker, in display order. */
|
|
28
|
+
export declare const CANONICAL_TEXT_STYLE_TYPES: readonly ["heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "paragraph1", "paragraph2", "paragraph3", "button"];
|
|
29
|
+
export type CanonicalTextStyleType = (typeof CANONICAL_TEXT_STYLE_TYPES)[number];
|
|
30
|
+
/** Legacy roles, retained for resolution of un-migrated content only. */
|
|
31
|
+
export declare const LEGACY_TEXT_STYLE_TYPES: readonly ["titles", "headings", "paragraphs", "buttons"];
|
|
32
|
+
export type LegacyTextStyleType = (typeof LEGACY_TEXT_STYLE_TYPES)[number];
|
|
33
|
+
export declare const isLegacyTextStyleType: (type: string | undefined) => type is LegacyTextStyleType;
|
|
9
34
|
export declare const TEXT_STYLE_TYPES_DISPLAY_NAME_MAP: () => {
|
|
35
|
+
heading1: any;
|
|
36
|
+
heading2: any;
|
|
37
|
+
heading3: any;
|
|
38
|
+
heading4: any;
|
|
39
|
+
heading5: any;
|
|
40
|
+
heading6: any;
|
|
41
|
+
paragraph1: any;
|
|
42
|
+
paragraph2: any;
|
|
43
|
+
paragraph3: any;
|
|
44
|
+
button: any;
|
|
10
45
|
titles: any;
|
|
11
46
|
headings: any;
|
|
12
47
|
paragraphs: any;
|
|
@@ -18,8 +53,17 @@ export type TextStyleDeclaration = BrandPageCssStyle & {
|
|
|
18
53
|
applyAutoScale?: boolean;
|
|
19
54
|
};
|
|
20
55
|
export type TextStyleDeclarationWithoutTextAlign = Omit<TextStyleDeclaration, 'textAlign'>;
|
|
56
|
+
/**
|
|
57
|
+
* BP-5969 (ADR-0020): an RTE-paired section field's style, with **colour decoupled**. Colour
|
|
58
|
+
* is the ONE thing removed from the style object — it lives in the RTE mark now (baked
|
|
59
|
+
* contrast at birth / by migration-22), so this type has no `color` and nothing can read a
|
|
60
|
+
* stale one off an RTE field. Everything else stays: typography here is a genuine per-block
|
|
61
|
+
* OVERRIDE (a title set to a non-role font/size) that the renderer applies via
|
|
62
|
+
* `overrideTypographyStyle`, and dropping it would lose that override through migration — so
|
|
63
|
+
* only `color` goes. Non-RTE per-item styles keep the full `TextStyleDeclaration`.
|
|
64
|
+
*/
|
|
65
|
+
export type RteTextRole = Omit<TextStyleDeclaration, 'color'>;
|
|
21
66
|
export interface GlobalTextStyleDeclaration {
|
|
22
|
-
color: string | undefined;
|
|
23
67
|
fontFamily: string | undefined;
|
|
24
68
|
fontSize: string | undefined;
|
|
25
69
|
fontStyle: string | undefined;
|