@designcrowd/library.brand-page 6.2.13 → 6.2.14
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-COhZYMwW.js → CreatedOnBrandCrowd-de-de-Deoc6s8r.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-en-us-De5eIVfZ.js → CreatedOnBrandCrowd-en-us-BxDzsLl-.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-es-es-D7Bk2q4d.js → CreatedOnBrandCrowd-es-es-B-5VS2MV.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-fr-BBCuO0D-.js → CreatedOnBrandCrowd-fr-ca-C6h05sUZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-fr-ca-BBCuO0D-.js → CreatedOnBrandCrowd-fr-fr-C6h05sUZ.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-pt-B5MrGFq-.js → CreatedOnBrandCrowd-pt-br-BC6XU3ev.js} +1 -1
- package/lib/src/{CreatedOnBrandCrowd-pt-br-B5MrGFq-.js → CreatedOnBrandCrowd-pt-pt-BC6XU3ev.js} +1 -1
- package/lib/src/{CreatedOnDcom-de-de-CJSWCbRg.js → CreatedOnDcom-de-de-dUTedh8v.js} +1 -1
- package/lib/src/{CreatedOnDcom-en-us-OO0s0TRW.js → CreatedOnDcom-en-us-DY0jkOeW.js} +1 -1
- package/lib/src/{CreatedOnDcom-es-es-DQX1lZq7.js → CreatedOnDcom-es-es-DRioej2A.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-ca-C5cQ3rla.js → CreatedOnDcom-fr-ca-CcglfcUU.js} +1 -1
- package/lib/src/{CreatedOnDcom-fr-fr-UdyUX0b_.js → CreatedOnDcom-fr-fr-B7v_e6HI.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-br-C0FiDCQG.js → CreatedOnDcom-pt-br-5XGcKJb7.js} +1 -1
- package/lib/src/{CreatedOnDcom-pt-pt-CbbnZ7aN.js → CreatedOnDcom-pt-pt-DepC53tO.js} +1 -1
- package/lib/src/brand-page/utils/container-text-color.util.d.ts +12 -2
- package/lib/src/brand-page/utils/container-text-color.util.js +1 -1
- package/lib/src/brand-page/utils/migration/migration-22.d.ts +3 -2
- package/lib/src/brand-page/utils/migration/migration-22.js +8 -3
- package/lib/src/brand-page-maker/models/content-settings.js +3 -1
- package/lib/src/index.mjs +1 -1
- package/lib/src/{lib-DgFekeRm.js → lib-CidddZOL.js} +2810 -2801
- package/package.json +1 -1
- package/src/brand-page/utils/container-text-color.util.ts +3 -3
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandcontact-every-section.v22.json +4 -8
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandpage-every-section.v22.json +4 -8
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/new-brandsite-every-section.v22.json +4 -8
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandcontact.v22.json +1 -2
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-general-link.v22.json +3 -6
- package/src/brand-page/utils/migration/__snapshots__/migration-22-output/real-brandpage-links.v22.json +1 -2
- package/src/brand-page/utils/migration/migration-22.test.ts +88 -0
- package/src/brand-page/utils/migration/migration-22.ts +9 -2
- package/src/brand-page-maker/models/content-settings.test.ts +49 -1
- package/src/brand-page-maker/models/content-settings.ts +3 -1
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* reason `resolveTextColor` lives in one place (`text-style.util.ts`).
|
|
10
10
|
*
|
|
11
11
|
* MIGRATION-22 SNAPSHOT DEPENDENCY: the v21 -> v22 colour bake calls
|
|
12
|
-
* `containerTextColorDefaults` and `
|
|
13
|
-
* before changing
|
|
12
|
+
* `containerTextColorDefaults`, `titleSurfaceContrastFill` and `isButtonLabelField`. Pin that
|
|
13
|
+
* migration's behaviour before changing any of them after it releases.
|
|
14
14
|
*/
|
|
15
15
|
import type { Content, PageStyles, BrandPageType, ColorItem } from '../models';
|
|
16
16
|
import { type ContentTextStylePropertyKey } from '../constants';
|
|
@@ -33,6 +33,16 @@ export declare const CONTAINER_BOUND_TEXT_STYLE_KEYS: Partial<Record<Content['ty
|
|
|
33
33
|
* scope here).
|
|
34
34
|
*/
|
|
35
35
|
export declare const containerSurfaceForContent: (content: Content, styles: PageStyles, brandPageType?: BrandPageType) => BrandPageCssStyle | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* A standalone button's LABEL (`isButtonContent` → general-link, website, email, phone, and the
|
|
38
|
+
* social buttons — all store the label in `titleStyle`). Like `buttonTextStyle`, the label sits on
|
|
39
|
+
* the button fill, not a section surface: the button owns its own fill/text pairing, so it must not
|
|
40
|
+
* bake. With no baked colour the label inherits the button's on-fill text colour at render
|
|
41
|
+
* (`buttonStyles.style.color`), which is guaranteed to contrast the fill — whereas baking would
|
|
42
|
+
* contrast the PAGE instead and collide with the fill (the default theme paints both from the same
|
|
43
|
+
* brand role, hiding the text).
|
|
44
|
+
*/
|
|
45
|
+
export declare const isButtonLabelField: (content: Content, key: ContentTextStylePropertyKey) => boolean;
|
|
36
46
|
/**
|
|
37
47
|
* The colour the maker's Text Style swatch shows for a STANDALONE button's LABEL. The label is left
|
|
38
48
|
* uncoloured on the element (`isButtonLabelField` exempts it from the birth-time bake) and inherits
|
|
@@ -107,7 +107,7 @@ const NON_SECTION_SURFACE_KEYS = new Set([
|
|
|
107
107
|
* contrast the PAGE instead and collide with the fill (the default theme paints both from the same
|
|
108
108
|
* brand role, hiding the text).
|
|
109
109
|
*/
|
|
110
|
-
const isButtonLabelField = (content, key) => key === 'titleStyle' && isButtonContent(content);
|
|
110
|
+
export const isButtonLabelField = (content, key) => key === 'titleStyle' && isButtonContent(content);
|
|
111
111
|
/**
|
|
112
112
|
* The colour the maker's Text Style swatch shows for a STANDALONE button's LABEL. The label is left
|
|
113
113
|
* uncoloured on the element (`isButtonLabelField` exempts it from the birth-time bake) and inherits
|
|
@@ -86,8 +86,9 @@ type NoRoleTextStyles = WeakMap<object, Set<string>>;
|
|
|
86
86
|
* and the role colour (E) changes no pixels. migration-21 already baked element→frame→role
|
|
87
87
|
* colour into RTE runs, so the only uncoloured runs reaching here inherit the base coat;
|
|
88
88
|
* non-RTE fields (21 left them alone) resolve element→container-default→role→base coat.
|
|
89
|
-
* `buttonTextStyle`
|
|
90
|
-
* never the base coat. A social-links section's unset icon fill is
|
|
89
|
+
* `buttonTextStyle` and a link button's `titleStyle` are excluded — the button label takes its
|
|
90
|
+
* colour from `buttonStyles`, never the base coat. A social-links section's unset icon fill is
|
|
91
|
+
* frozen here too.
|
|
91
92
|
*/
|
|
92
93
|
export declare const bakeElementColours: (brandPageModel: BrandPageModel, options: TextStyleOptions, noRoleTextStyles?: NoRoleTextStyles) => void;
|
|
93
94
|
/** E — clear the retired role colour from every role definition (run after D reads it). */
|
|
@@ -3,7 +3,7 @@ import { TEXT_STYLE_TYPES, isCanonicalTextStyleType, isLegacyTextStyleType, } fr
|
|
|
3
3
|
import { CONTENT_TEXT_STYLE_PROPERTY_KEYS, FONT_FAMILY_CONFIGS, DEFAULT_FONT_FAMILY_KEY, FONT_SIZE_BODY, LINE_HEIGHT_BODY, ALIGN_LEFT_ALIGNED, ALIGN_RIGHT_ALIGNED, MAX_IMAGES_SECTION_ALIGNMENT_ITEMS_LENGTH, } from '../../constants';
|
|
4
4
|
import { computeLegacyTargets, reconnectTextStyleRoles, contentFieldReconnectSpec, drawnFontFamily, siteTextFontName, FAMILY_TIERS, } from '../text-role-reconnect.util';
|
|
5
5
|
import { pairedRteTextField, rteStyleFieldsFor, } from '@shared/color-strategies/rte-field-pairs';
|
|
6
|
-
import { containerTextColorDefaults, titleSurfaceContrastFill, } from '../container-text-color.util';
|
|
6
|
+
import { containerTextColorDefaults, isButtonLabelField, titleSurfaceContrastFill, } from '../container-text-color.util';
|
|
7
7
|
import { stripLiftContentRte, textRunFontFamilies, } from '../rte-role-lift.util';
|
|
8
8
|
import { collectRteTextColors, fillUncolouredRteText, } from '@shared/color-strategies/rte-color';
|
|
9
9
|
import { isBlankColorValue } from '../color-palette.util';
|
|
@@ -515,8 +515,9 @@ const roleColour = (options, textStyleType) => textStyleType
|
|
|
515
515
|
* and the role colour (E) changes no pixels. migration-21 already baked element→frame→role
|
|
516
516
|
* colour into RTE runs, so the only uncoloured runs reaching here inherit the base coat;
|
|
517
517
|
* non-RTE fields (21 left them alone) resolve element→container-default→role→base coat.
|
|
518
|
-
* `buttonTextStyle`
|
|
519
|
-
* never the base coat. A social-links section's unset icon fill is
|
|
518
|
+
* `buttonTextStyle` and a link button's `titleStyle` are excluded — the button label takes its
|
|
519
|
+
* colour from `buttonStyles`, never the base coat. A social-links section's unset icon fill is
|
|
520
|
+
* frozen here too.
|
|
520
521
|
*/
|
|
521
522
|
export const bakeElementColours = (brandPageModel, options, noRoleTextStyles = new WeakMap()) => {
|
|
522
523
|
const baseCoat = roleColour(options, 'paragraph1');
|
|
@@ -535,6 +536,10 @@ export const bakeElementColours = (brandPageModel, options, noRoleTextStyles = n
|
|
|
535
536
|
for (const key of Object.keys(CONTENT_TEXT_STYLE_PROPERTY_KEYS)) {
|
|
536
537
|
if (key === 'buttonTextStyle' || rteStyleFields.has(key))
|
|
537
538
|
continue;
|
|
539
|
+
// A link button's label sits on the global button fill, not the page the base coat
|
|
540
|
+
// contrasts: left bare it inherits the button text colour (`isButtonLabelField`).
|
|
541
|
+
if (isButtonLabelField(content, key))
|
|
542
|
+
continue;
|
|
538
543
|
const style = fields[key];
|
|
539
544
|
if (!style || !isBlankColorValue(style.color))
|
|
540
545
|
continue;
|
|
@@ -216,7 +216,9 @@ export const createInitialMailingListContent = (options) => {
|
|
|
216
216
|
type: 'mailing-list',
|
|
217
217
|
topPadding: 0,
|
|
218
218
|
bottomPadding: 0,
|
|
219
|
-
|
|
219
|
+
// Centred in the doc itself: the editor fills a loaded block's missing title from this factory
|
|
220
|
+
// alone, without the add-content step that stamps alignment from `titleStyle`.
|
|
221
|
+
title: rteDoc(contentSettingsTr(`mailingListTitle`), 'center'),
|
|
220
222
|
buttonText: contentSettingsTr(`subscribePlaceholder`),
|
|
221
223
|
acceptedFields: 'emailOnly',
|
|
222
224
|
titleStyle: {
|
package/lib/src/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, a as S, b as I, c as N, d as e, e as A, f as O, g as t, B as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as c, r as i, s as l, t as b, u as F, v as g, w as B, x as Y, y as d, z as U, C as u, D as p, E as H, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as x, O as f, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ta, $ as Ea, a0 as _a, a1 as sa, a2 as Sa, a3 as Ia, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ca, ak as ia, al as la, am as ba, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as da, as as Ua, at as ua, au as pa, av as Ha, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as xa, aF as fa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aT, aQ as TT, aR as ET, aS as _T, aT as sT, aU as ST, aV as IT, aW as NT, aX as eT, aY as AT, aZ as OT, a_ as tT, a$ as CT, b0 as DT, b1 as GT, b2 as PT, b3 as RT, b4 as oT, b5 as LT, b6 as MT, b7 as rT, b8 as nT, b9 as cT, ba as iT, bb as lT, bc as bT, bd as FT, be as gT, bf as BT, bg as YT, bh as dT, bi as UT, bj as uT, bk as pT, bl as HT, bm as yT, bn as mT, bo as KT, bp as kT, bq as VT, br as vT, bs as XT, bt as hT, bu as xT, bv as fT, bw as WT, bx as zT, by as wT, bz as JT, bA as ZT, bB as jT, bC as qT, bD as QT, bE as $T, bF as aE, bG as TE, bH as EE, bI as _E, bJ as sE, bK as SE, bL as IE, bM as NE, bN as eE, bO as AE, bP as OE, bQ as tE, bR as CE, bS as DE, bT as GE, bU as PE, bV as RE, bW as oE, bX as LE, bY as ME, bZ as rE, b_ as nE, b$ as cE, c0 as iE, c1 as lE, c2 as bE, c3 as FE, c4 as gE, c5 as BE, c6 as YE, c7 as dE, c8 as UE, c9 as uE, ca as pE, cb as HE, cc as yE, cd as mE, ce as KE, cf as kE, cg as VE, ch as vE, ci as XE, cj as hE, ck as xE, cl as fE, cm as WE, cn as zE, co as wE, cp as JE, cq as ZE, cr as jE, cs as qE, ct as QE, cu as $E, cv as a_, cw as T_, cx as E_, cy as __, cz as s_, cA as S_, cB as I_, cC as N_, cD as e_, cE as A_, cF as O_, cG as t_, cH as C_, cI as D_, cJ as G_ } from "./lib-
|
|
1
|
+
import { A as s, a as S, b as I, c as N, d as e, e as A, f as O, g as t, B as C, h as D, i as G, j as P, k as R, l as o, m as L, n as M, o as r, p as n, q as c, r as i, s as l, t as b, u as F, v as g, w as B, x as Y, y as d, z as U, C as u, D as p, E as H, F as y, G as m, H as K, I as k, J as V, K as v, L as X, M as h, N as x, O as f, P as W, Q as z, R as w, S as J, T as Z, U as j, V as q, W as Q, X as $, Y as aa, Z as Ta, $ as Ea, a0 as _a, a1 as sa, a2 as Sa, a3 as Ia, a4 as Na, a5 as ea, a6 as Aa, a7 as Oa, a8 as ta, a9 as Ca, aa as Da, ab as Ga, ac as Pa, ad as Ra, ae as oa, af as La, ag as Ma, ah as ra, ai as na, aj as ca, ak as ia, al as la, am as ba, an as Fa, ao as ga, ap as Ba, aq as Ya, ar as da, as as Ua, at as ua, au as pa, av as Ha, aw as ya, ax as ma, ay as Ka, az as ka, aA as Va, aB as va, aC as Xa, aD as ha, aE as xa, aF as fa, aG as Wa, aH as za, aI as wa, aJ as Ja, aK as Za, aL as ja, aM as qa, aN as Qa, aO as $a, aP as aT, aQ as TT, aR as ET, aS as _T, aT as sT, aU as ST, aV as IT, aW as NT, aX as eT, aY as AT, aZ as OT, a_ as tT, a$ as CT, b0 as DT, b1 as GT, b2 as PT, b3 as RT, b4 as oT, b5 as LT, b6 as MT, b7 as rT, b8 as nT, b9 as cT, ba as iT, bb as lT, bc as bT, bd as FT, be as gT, bf as BT, bg as YT, bh as dT, bi as UT, bj as uT, bk as pT, bl as HT, bm as yT, bn as mT, bo as KT, bp as kT, bq as VT, br as vT, bs as XT, bt as hT, bu as xT, bv as fT, bw as WT, bx as zT, by as wT, bz as JT, bA as ZT, bB as jT, bC as qT, bD as QT, bE as $T, bF as aE, bG as TE, bH as EE, bI as _E, bJ as sE, bK as SE, bL as IE, bM as NE, bN as eE, bO as AE, bP as OE, bQ as tE, bR as CE, bS as DE, bT as GE, bU as PE, bV as RE, bW as oE, bX as LE, bY as ME, bZ as rE, b_ as nE, b$ as cE, c0 as iE, c1 as lE, c2 as bE, c3 as FE, c4 as gE, c5 as BE, c6 as YE, c7 as dE, c8 as UE, c9 as uE, ca as pE, cb as HE, cc as yE, cd as mE, ce as KE, cf as kE, cg as VE, ch as vE, ci as XE, cj as hE, ck as xE, cl as fE, cm as WE, cn as zE, co as wE, cp as JE, cq as ZE, cr as jE, cs as qE, ct as QE, cu as $E, cv as a_, cw as T_, cx as E_, cy as __, cz as s_, cA as S_, cB as I_, cC as N_, cD as e_, cE as A_, cF as O_, cG as t_, cH as C_, cI as D_, cJ as G_ } from "./lib-CidddZOL.js";
|
|
2
2
|
import { U as R_, u as o_ } from "./useEventTracker-DwPTmzpa.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "vue-cropperjs";
|