@bitbaum/design-tokens 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/next-fonts.mjs +7 -4
  2. package/package.json +1 -1
package/next-fonts.mjs CHANGED
@@ -94,11 +94,14 @@ export function calls(spec) {
94
94
  if (!shipped.includes(s))
95
95
  throw new Error(`${spec.face} has no subset "${s}"; shipped: ${shipped.join(', ')}`);
96
96
  // Google's order is kept, because it decides which file wins a character two
97
- // subsets both list. The export itself is the first preloaded subset (else
98
- // the first), measured for the fallback metrics as next/font/google measures
99
- // its preloaded latin file.
97
+ // subsets both list. The export itself is latin when latin is declared,
98
+ // else the first preloaded subset, else the first: it is the file measured
99
+ // for the fallback metrics, and a cyrillic file has no latin letters to
100
+ // measure (Inter's gives size-adjust 100% where latin gives 107.89%).
100
101
  const ordered = shipped.filter((s) => subsets.includes(s));
101
- const primary = ordered.find((s) => preload.includes(s)) ?? ordered[0];
102
+ const primary = ordered.includes('latin')
103
+ ? 'latin'
104
+ : (ordered.find((s) => preload.includes(s)) ?? ordered[0]);
102
105
  return ordered.map((subset) => {
103
106
  const isPrimary = subset === primary;
104
107
  const src = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitbaum/design-tokens",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "packageManager": "pnpm@11.25.0",
5
5
  "engines": {
6
6
  "node": ">=20"