@designcrowd/library.brand-page 6.1.15 → 6.1.16-style-v2-2
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-a7cNT5AA.js → CreatedOnBrandCrowd-de-de-Bi-zaYmr.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-BpZ89I9T.js → CreatedOnBrandCrowd-en-us-SjIxE2Pg.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-Db0Ot-mQ.js → CreatedOnBrandCrowd-es-es-BYOu05ik.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-Mbd7Hhxh.js → CreatedOnBrandCrowd-fr-ca-emgmIyJV.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-Mbd7Hhxh.js → CreatedOnBrandCrowd-fr-fr-emgmIyJV.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-B98aoT6y.js → CreatedOnBrandCrowd-pt-br-m5RFTaxL.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-B98aoT6y.js → CreatedOnBrandCrowd-pt-pt-m5RFTaxL.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-b_GUYmhX.js → CreatedOnDcom-de-de-BeGHrZgm.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-BtTIwekM.js → CreatedOnDcom-en-us-DvVpYfyp.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-WbhHNEg-.js → CreatedOnDcom-es-es-D9khuP5r.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-DnQOAvS5.js → CreatedOnDcom-fr-ca-BNIVPoPK.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-D7Q-aBNQ.js → CreatedOnDcom-fr-fr-CtdfFR8H.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-DnqkF_ve.js → CreatedOnDcom-pt-br-nFGKCRjM.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-DNyyHF1o.js → CreatedOnDcom-pt-pt-BCFCFJoy.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 +24 -21
- package/lib/src/brand-page/models/index.js +4 -1
- 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/container-text-color.util.d.ts +21 -13
- package/lib/src/brand-page/utils/container-text-color.util.js +71 -27
- 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-21.js +15 -4
- package/lib/src/brand-page/utils/migration/migration-22.d.ts +102 -0
- package/lib/src/brand-page/utils/migration/migration-22.js +605 -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 +42 -21
- package/lib/src/brand-page/view-models.d.ts +2 -1
- 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.js +4 -0
- 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 +48 -48
- package/lib/src/brand-page-maker/stores/ai-checkpoint/ai-checkpoint-store.d.ts +1034 -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 +205 -262
- 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 +85 -0
- package/lib/src/brand-page-maker/utils/rte-render.util.d.ts +10 -0
- package/lib/src/brand-page-maker/utils/rte-render.util.js +19 -0
- package/lib/src/brand-page-maker/utils/rte-sanitize.util.js +7 -3
- package/lib/src/{bundled-translations-BiFAlQdC.js → bundled-translations-CQ8dZIIe.js} +9 -9
- package/lib/src/{bundled-translations.de-DE-DuRWnOP-.js → bundled-translations.de-DE-D10ohBT0.js} +11 -11
- package/lib/src/{bundled-translations.es-ES-CokHdZtW.js → bundled-translations.es-ES-C1o3tbHg.js} +9 -9
- package/lib/src/{bundled-translations.fr-CA-CJcMmubA.js → bundled-translations.fr-CA-ClHWmoIS.js} +9 -9
- package/lib/src/{bundled-translations.fr-FR-DYPup8fJ.js → bundled-translations.fr-FR-C_PgkOpB.js} +9 -9
- package/lib/src/{bundled-translations.pt-BR-GSsp1kuV.js → bundled-translations.pt-BR-Csr8_jy7.js} +29 -29
- package/lib/src/{bundled-translations.pt-PT-DbkY8UQ3.js → bundled-translations.pt-PT-D-vjMoOD.js} +9 -9
- package/lib/src/bundles/bundled-translations.de-DE.json +18 -1
- package/lib/src/bundles/bundled-translations.es-ES.json +18 -1
- package/lib/src/bundles/bundled-translations.fr-CA.json +18 -1
- package/lib/src/bundles/bundled-translations.fr-FR.json +18 -1
- package/lib/src/bundles/bundled-translations.json +19 -2
- package/lib/src/bundles/bundled-translations.pt-BR.json +18 -1
- package/lib/src/bundles/bundled-translations.pt-PT.json +18 -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 +173 -107
- package/lib/src/css/library.brand-page-brandPage.min.css +173 -107
- package/lib/src/css/library.brand-page-designCom.min.css +173 -107
- package/lib/src/css/library.brand-page-preview.min.css +173 -107
- package/lib/src/index.mjs +194 -191
- package/lib/src/{lib-33AmrlUy.js → lib-D8usF-qk.js} +37436 -36582
- 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 +14 -0
- package/lib/src/shared/color-strategies/rte-field-pairs.js +23 -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/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 +3 -0
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +6 -1
- package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.js +25 -0
- 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/lib/src/utils/minify-brand-page-metadata.d.ts +1 -0
- package/lib/src/utils/minify-brand-page-metadata.js +13 -3
- 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 +29 -21
- package/src/brand-page/models/styles.model.ts +161 -38
- package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +609 -38
- package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +156 -6
- package/src/brand-page/utils/__snapshots__/model.util.test.ts.snap +312 -12
- package/src/brand-page/utils/container-text-color.util.test.ts +106 -15
- package/src/brand-page/utils/container-text-color.util.ts +92 -32
- 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_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 +929 -0
- package/src/brand-page/utils/migration/migration-22.ts +876 -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 +363 -86
- package/src/brand-page/utils/view-model.util.ts +58 -27
- package/src/brand-page/view-models.ts +2 -0
- 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 +4 -0
- 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.ts +48 -48
- 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 +240 -485
- package/src/brand-page-maker/utils/rte-authoring.util.test.ts +202 -0
- package/src/brand-page-maker/utils/rte-authoring.util.ts +156 -0
- package/src/brand-page-maker/utils/rte-render.util.ts +26 -0
- package/src/brand-page-maker/utils/rte-sanitize.util.ts +7 -3
- package/src/bundles/bundled-translations.de-DE.json +18 -1
- package/src/bundles/bundled-translations.es-ES.json +18 -1
- package/src/bundles/bundled-translations.fr-CA.json +18 -1
- package/src/bundles/bundled-translations.fr-FR.json +18 -1
- package/src/bundles/bundled-translations.json +19 -2
- package/src/bundles/bundled-translations.pt-BR.json +18 -1
- package/src/bundles/bundled-translations.pt-PT.json +18 -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.ts +28 -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/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/page-settings/components/header-settings-panel/HeaderSettingsPanel.test.ts +111 -0
- package/src/shared/page-settings/components/header-settings-panel/HeaderSettingsPanel.vue +18 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.de-DE.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.es-ES.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-CA.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.fr-FR.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-BR.json +1 -0
- package/src/shared/page-settings/components/page-settings/i18n/page-settings.pt-PT.json +1 -0
- package/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.ts +33 -0
- 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/utils/minify-brand-page-metadata.test.ts +70 -1
- package/src/utils/minify-brand-page-metadata.ts +19 -4
- package/lib/src/metadata-builder/builders/reorder-pages-builder.d.ts +0 -13
- package/lib/src/metadata-builder/builders/reorder-pages-builder.js +0 -49
- package/src/metadata-builder/builders/reorder-pages-builder.ts +0 -80
- 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-0019): 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';
|
|
@@ -34,6 +34,9 @@ export declare class BackgroundShape {
|
|
|
34
34
|
constructor(option?: Partial<BackgroundShape>);
|
|
35
35
|
}
|
|
36
36
|
export type BackgroundStyle = Partial<Omit<BrandPageCssStyle, 'backgroundColor'>>;
|
|
37
|
+
export interface BackgroundColorStyle extends BrandPageCssStyle {
|
|
38
|
+
backgroundOpacity?: number;
|
|
39
|
+
}
|
|
37
40
|
/**
|
|
38
41
|
* The complete default for a page's background media overlay. Seeded into
|
|
39
42
|
* metadata (constructor for new models, migration-20.5 for persisted partials) so
|
|
@@ -174,7 +177,7 @@ export interface TextContent extends Content {
|
|
|
174
177
|
* @deprecated Use `textStyle` instead. For backward compatibility.
|
|
175
178
|
*/
|
|
176
179
|
textSize: BrandPageCssStyle;
|
|
177
|
-
textStyle:
|
|
180
|
+
textStyle: RteTextRole;
|
|
178
181
|
/**
|
|
179
182
|
* @deprecated Use `textStyle` instead. For backward compatibility.
|
|
180
183
|
*/
|
|
@@ -194,9 +197,9 @@ export interface ProfileContent extends Content {
|
|
|
194
197
|
colorReplacements: ColorReplacement[];
|
|
195
198
|
mediaType?: string;
|
|
196
199
|
size?: string;
|
|
197
|
-
descriptionStyle:
|
|
198
|
-
nameStyle:
|
|
199
|
-
titleStyle:
|
|
200
|
+
descriptionStyle: RteTextRole;
|
|
201
|
+
nameStyle: RteTextRole;
|
|
202
|
+
titleStyle: RteTextRole;
|
|
200
203
|
}
|
|
201
204
|
export interface Address {
|
|
202
205
|
formattedAddress: string;
|
|
@@ -209,7 +212,7 @@ export interface MailingListContent extends Content {
|
|
|
209
212
|
acceptedFields?: 'emailOnly' | 'nameAndEmail';
|
|
210
213
|
title: RichTextValue;
|
|
211
214
|
buttonText: string;
|
|
212
|
-
titleStyle:
|
|
215
|
+
titleStyle: RteTextRole;
|
|
213
216
|
buttonTextStyle: TextStyleDeclaration;
|
|
214
217
|
backgroundStyle?: BrandPageCssStyle;
|
|
215
218
|
}
|
|
@@ -267,11 +270,11 @@ export interface ContactFormContent extends Content {
|
|
|
267
270
|
responseEmail: string;
|
|
268
271
|
imageUrl?: string;
|
|
269
272
|
layoutStyle?: string | null;
|
|
270
|
-
titleStyle?:
|
|
271
|
-
descriptionStyle?:
|
|
273
|
+
titleStyle?: RteTextRole;
|
|
274
|
+
descriptionStyle?: RteTextRole;
|
|
272
275
|
buttonTextStyle?: TextStyleDeclaration;
|
|
273
276
|
backgroundStyle?: BrandPageCssStyle;
|
|
274
|
-
successMessageStyle?:
|
|
277
|
+
successMessageStyle?: RteTextRole;
|
|
275
278
|
cardStyle?: BrandPageCssStyle;
|
|
276
279
|
colorReplacements?: ColorReplacement[];
|
|
277
280
|
mediaType?: string;
|
|
@@ -288,8 +291,8 @@ export interface BannerSectionContent extends Content {
|
|
|
288
291
|
email?: string;
|
|
289
292
|
tel?: string;
|
|
290
293
|
displayStyle: string;
|
|
291
|
-
titleStyle:
|
|
292
|
-
descriptionStyle:
|
|
294
|
+
titleStyle: RteTextRole;
|
|
295
|
+
descriptionStyle: RteTextRole;
|
|
293
296
|
backgroundStyle: BrandPageCssStyle;
|
|
294
297
|
cardStyle: BrandPageCssStyle;
|
|
295
298
|
colorReplacements: ColorReplacement[];
|
|
@@ -354,7 +357,7 @@ export interface TextItem {
|
|
|
354
357
|
/** Stable per-item identifier. See ImageItem.id. */
|
|
355
358
|
id: string;
|
|
356
359
|
text: RichTextValue;
|
|
357
|
-
textStyle:
|
|
360
|
+
textStyle: RteTextRole;
|
|
358
361
|
textOverride?: string;
|
|
359
362
|
}
|
|
360
363
|
export interface ShapesSectionContent extends Content, MediaSection {
|
|
@@ -374,8 +377,8 @@ export interface MediaSection extends Content {
|
|
|
374
377
|
description: RichTextValue;
|
|
375
378
|
displayStyle: ImagesSectionContentDisplayStyle;
|
|
376
379
|
items: TextShapeItem[] | TextMediaItem[];
|
|
377
|
-
titleStyle:
|
|
378
|
-
descriptionStyle:
|
|
380
|
+
titleStyle: RteTextRole;
|
|
381
|
+
descriptionStyle: RteTextRole;
|
|
379
382
|
headingStyle: TextStyleDeclaration;
|
|
380
383
|
paragraphStyle: TextStyleDeclaration;
|
|
381
384
|
backgroundStyle: BrandPageCssStyle;
|
|
@@ -403,7 +406,7 @@ export interface TestimonialSectionContent extends Content {
|
|
|
403
406
|
title: RichTextValue;
|
|
404
407
|
displayStyle: string;
|
|
405
408
|
items: TestimonialItems[];
|
|
406
|
-
titleStyle:
|
|
409
|
+
titleStyle: RteTextRole;
|
|
407
410
|
testimonialStyle: TextStyleDeclaration;
|
|
408
411
|
nameStyle: TextStyleDeclaration;
|
|
409
412
|
positionStyle: TextStyleDeclaration;
|
|
@@ -417,8 +420,8 @@ export interface AboutSectionContent extends Content {
|
|
|
417
420
|
title: RichTextValue;
|
|
418
421
|
paragraph: RichTextValue;
|
|
419
422
|
displayStyle: string;
|
|
420
|
-
titleStyle:
|
|
421
|
-
paragraphStyle:
|
|
423
|
+
titleStyle: RteTextRole;
|
|
424
|
+
paragraphStyle: RteTextRole;
|
|
422
425
|
backgroundStyle: BrandPageCssStyle;
|
|
423
426
|
colorReplacements: ColorReplacement[];
|
|
424
427
|
mediaType?: string;
|
|
@@ -445,7 +448,7 @@ export interface SocialLinksContent extends Content {
|
|
|
445
448
|
iconFillStyles: BrandPageCssStyle;
|
|
446
449
|
iconBackgroundStyles: BrandPageCssStyle;
|
|
447
450
|
backgroundStyles: BrandPageCssStyle;
|
|
448
|
-
titleStyle:
|
|
451
|
+
titleStyle: RteTextRole;
|
|
449
452
|
}
|
|
450
453
|
export declare const DIVIDER_STYLES: {
|
|
451
454
|
readonly none: "none";
|
|
@@ -468,8 +471,8 @@ export interface BookingSectionContent extends Content {
|
|
|
468
471
|
url: string;
|
|
469
472
|
email?: string;
|
|
470
473
|
tel?: string;
|
|
471
|
-
titleStyle:
|
|
472
|
-
descriptionStyle:
|
|
474
|
+
titleStyle: RteTextRole;
|
|
475
|
+
descriptionStyle: RteTextRole;
|
|
473
476
|
backgroundStyle: BrandPageCssStyle;
|
|
474
477
|
buttonPageId: string;
|
|
475
478
|
buttonLinkType: ButtonLinkType;
|
|
@@ -519,7 +522,7 @@ export declare abstract class AbstractPageHeaderStyles {
|
|
|
519
522
|
logoImage: LogoImageModel;
|
|
520
523
|
logoTemplateImage: LogoTemplateImageModel | undefined;
|
|
521
524
|
logoImageBase64Url?: string;
|
|
522
|
-
backgroundStyle:
|
|
525
|
+
backgroundStyle: BackgroundColorStyle;
|
|
523
526
|
style: BrandPageCssStyle;
|
|
524
527
|
viewport: ViewportsType;
|
|
525
528
|
protected constructor(options?: AbstractPageHeaderStylesType);
|
|
@@ -253,7 +253,10 @@ export class AbstractPageHeaderStyles {
|
|
|
253
253
|
this.logoDraftToken = options.logoDraftToken || '';
|
|
254
254
|
this.logoVariation = options.logoVariation || 0;
|
|
255
255
|
this.style = options.style || {};
|
|
256
|
-
this.backgroundStyle =
|
|
256
|
+
this.backgroundStyle = {
|
|
257
|
+
...(options.backgroundStyle || {}),
|
|
258
|
+
backgroundOpacity: options.backgroundStyle?.backgroundOpacity ?? 100,
|
|
259
|
+
};
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
export class PageHeaderDesktop extends AbstractPageHeaderStyles {
|
|
@@ -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-0018 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-0019): 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;
|