@vectoriox/iox-ui 5.45.0 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.45.0",
3
+ "version": "5.46.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -7,7 +7,7 @@ import {
7
7
  SeedExpectation, untouchedSeedRow,
8
8
  } from './flavor-seed';
9
9
  import { DesignChoices, DesignTokenRow, flavorSourceStamp, StoredDesignTokenRow } from './design-token.model';
10
- import { fontFamilyKey, FontFamilyToken, fontRoleReferences, parseFontFamilies } from './fonts';
10
+ import { FONT_FAMILY_TOKENS, fontFamilyKey, FontFamilyToken, fontRoleReferences, parseFontFamilies, withoutScriptPartners } from './fonts';
11
11
  import { DesignConfigEntry, DesignConfigKey, designConfigEntries, flavorPackById, isRetiredFlavorId, packDesignChoices, StoredDesign } from './design-settings';
12
12
 
13
13
  /**
@@ -63,6 +63,15 @@ function packDefaultsLookup(): (packId: string) => ReadonlyArray<Map<string, See
63
63
 
64
64
  const present = (list: ReadonlyArray<SeedExpectation | undefined>): SeedExpectation[] => list.filter((e): e is SeedExpectation => !!e);
65
65
 
66
+ const FONT_ROLES: ReadonlySet<string> = new Set(FONT_FAMILY_TOKENS);
67
+
68
+ /** What a font role held before H1-2 put the Hebrew partner second in every pairing's stacks. */
69
+ function beforeScriptPartners(name: string, e: SeedExpectation | undefined): SeedExpectation | undefined {
70
+ if (!e || !FONT_ROLES.has(name)) return undefined;
71
+ const value = withoutScriptPartners(e.value);
72
+ return value !== e.value ? { value } : undefined;
73
+ }
74
+
66
75
  /**
67
76
  * What the PREVIOUS design wrote, as a baseline keyed by the row's own stamp: a row Swiss stamped is
68
77
  * judged against what Swiss wrote, every other row against `buildFlavorTokens` of the stored choices
@@ -87,7 +96,8 @@ export function designBaseline(previous: StoredDesign): SeedBaseline {
87
96
  const stampedBy = SEED_STAMP.exec(row.source ?? '')?.[1];
88
97
  if (stampedBy === SWISS_FLAVOR.id) return swiss.get(row.name);
89
98
  const ownDefaults = stampedBy ? packDefaults(stampedBy).map(m => m.get(row.name)) : [];
90
- return present([current.get(row.name), beforeTint.get(row.name), ...ownDefaults]);
99
+ const expected = [current.get(row.name), beforeTint.get(row.name), ...ownDefaults];
100
+ return present([...expected, ...expected.map(e => beforeScriptPartners(row.name, e))]);
91
101
  };
92
102
  }
93
103
 
@@ -197,7 +207,10 @@ export function missingDesignRows(existing: ReadonlyArray<{ name: string }>, cho
197
207
  * whose brand colour never reached its accent;
198
208
  * - stamped by the current pack and still holding what the design wrote BEFORE DS9
199
209
  * (`legacyDesignTokenRows`): the contrast fixes — a 3:1 `line-strong`, a 3:1 focus ring, an
200
- * `accent-text` that reads on every ground — reach a studio that applied its look before them.
210
+ * `accent-text` that reads on every ground — reach a studio that applied its look before them;
211
+ * - stamped by the current pack and still holding a font stack WITHOUT the Hebrew partner the pairing now
212
+ * names second (H1-2): a Hebrew page of a studio seeded before it would draw its headings in the browser's
213
+ * default face for good.
201
214
  * No author edit produces any of these shapes — the Tokens panel edited the light value only, and since DS8 an
202
215
  * edit makes the row `source: user`, which this never touches.
203
216
  */
@@ -217,7 +230,7 @@ export function designTokenRepairs(existing: ReadonlyArray<StoredDesignTokenRow>
217
230
  const darkOnly = row.source === stamp && row.value === want.value;
218
231
  const machineWrote = present([
219
232
  ...(stampedBy ? packDefaults(stampedBy).map(m => m.get(row.name)) : []),
220
- ...(stampedBy === pack.id ? [beforeTint.get(row.name)] : []),
233
+ ...(stampedBy === pack.id ? [beforeTint.get(row.name), beforeScriptPartners(row.name, want), beforeScriptPartners(row.name, beforeTint.get(row.name))] : []),
221
234
  ]);
222
235
  if (!darkOnly && !untouchedSeedRow(row, machineWrote)) continue;
223
236
  out.push({ id: row._id, data: { value: want.value, values: want.values ?? {}, source: stamp, ...(want.group ? { group: want.group } : {}), ...(want.tier ? { tier: want.tier } : {}) } });
@@ -104,6 +104,8 @@ export interface FontPair {
104
104
  readonly label: string;
105
105
  readonly tokens: Readonly<Record<string, string>>;
106
106
  readonly families: ReadonlyArray<string>;
107
+ /** The Hebrew partner each stack names second (H1-2): a label takes the body's; mono none. */
108
+ readonly hebrew: { readonly display: string; readonly body: string };
107
109
  }
108
110
 
109
111
  /** A flavor's own colour palette (the Neutral tint): every colour token, light + the dark values that differ. */