@unpunnyfuns/swatchbook-blocks 0.2.0 → 0.2.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.
package/dist/index.d.mts CHANGED
@@ -241,7 +241,7 @@ interface VirtualAxisShape {
241
241
  contexts: readonly string[];
242
242
  default: string;
243
243
  description?: string;
244
- source: 'resolver' | 'synthetic';
244
+ source: 'resolver' | 'layered' | 'synthetic';
245
245
  }
246
246
  interface VirtualThemeShape {
247
247
  name: string;
package/dist/index.mjs CHANGED
@@ -178,6 +178,61 @@ function stringifyFallback(value, fallback) {
178
178
  return fallback;
179
179
  }
180
180
  //#endregion
181
+ //#region src/internal/data-attr.ts
182
+ /**
183
+ * Produce a prefixed `data-*` attribute name when `prefix` is set, bare
184
+ * `data-<key>` otherwise. Mirrors `dataAttr` in `@unpunnyfuns/swatchbook-core`
185
+ * so block wrappers and emitted-CSS selectors stay in lockstep without
186
+ * blocks taking a runtime dep on core.
187
+ */
188
+ function dataAttr(prefix, key) {
189
+ return prefix ? `data-${prefix}-${key}` : `data-${key}`;
190
+ }
191
+ /**
192
+ * Spread helper for the common `<div data-<prefix>-theme="…">` block
193
+ * wrapper. Returns an object keyed on the prefixed attribute name so the
194
+ * call site stays readable: `<div {...themeAttrs(prefix, theme)} />`.
195
+ */
196
+ function themeAttrs(prefix, themeName) {
197
+ return { [dataAttr(prefix, "theme")]: themeName };
198
+ }
199
+ /**
200
+ * Vars block chrome reads by literal `var(--sb-*)` regardless of what the
201
+ * project's actual `cssVarPrefix` is. Keeping the literal spelling means we
202
+ * only need to alias these few names on each block wrapper; the bulk of
203
+ * block styling stays untouched.
204
+ */
205
+ const CHROME_VARS = [
206
+ "color-sys-border-default",
207
+ "color-sys-surface-default",
208
+ "color-sys-surface-muted",
209
+ "color-sys-surface-raised",
210
+ "color-sys-text-default",
211
+ "color-sys-text-muted",
212
+ "color-sys-accent-bg",
213
+ "color-sys-accent-fg",
214
+ "typography-sys-body-font-family",
215
+ "typography-sys-body-font-size"
216
+ ];
217
+ /**
218
+ * CSS custom-property aliases that redirect the block chrome's `var(--sb-*)`
219
+ * reads to the project's actual `cssVarPrefix`. Block components spread the
220
+ * return into their wrapper's inline `style`, so the aliases cascade down
221
+ * into every nested block / sample / token-detail piece without each one
222
+ * re-reading the prefix.
223
+ *
224
+ * When `prefix === 'sb'` the aliases are self-references — we skip emission
225
+ * to keep the inline style shorter. When `prefix === ''` (opt-out) the
226
+ * aliases point at the bare `var(--color-sys-…)` names core emitted.
227
+ */
228
+ function chromeAliases(prefix) {
229
+ if (prefix === "sb") return {};
230
+ const out = {};
231
+ const head = prefix ? `${prefix}-` : "";
232
+ for (const name of CHROME_VARS) out[`--sb-${name}`] = `var(--${head}${name})`;
233
+ return out;
234
+ }
235
+ //#endregion
181
236
  //#region src/internal/channel-globals.ts
182
237
  const AXES_GLOBAL_KEY = "swatchbookAxes";
183
238
  const THEME_GLOBAL_KEY = "swatchbookTheme";
@@ -420,6 +475,7 @@ function BorderSample({ path }) {
420
475
  const cssVar = makeCssVar(path, cssVarPrefix);
421
476
  return /* @__PURE__ */ jsx("div", {
422
477
  style: {
478
+ ...chromeAliases(cssVarPrefix),
423
479
  ...sampleStyle$1,
424
480
  border: cssVar
425
481
  },
@@ -450,25 +506,6 @@ const emptyStyle = {
450
506
  opacity: .6
451
507
  };
452
508
  //#endregion
453
- //#region src/internal/data-attr.ts
454
- /**
455
- * Produce a prefixed `data-*` attribute name when `prefix` is set, bare
456
- * `data-<key>` otherwise. Mirrors `dataAttr` in `@unpunnyfuns/swatchbook-core`
457
- * so block wrappers and emitted-CSS selectors stay in lockstep without
458
- * blocks taking a runtime dep on core.
459
- */
460
- function dataAttr(prefix, key) {
461
- return prefix ? `data-${prefix}-${key}` : `data-${key}`;
462
- }
463
- /**
464
- * Spread helper for the common `<div data-<prefix>-theme="…">` block
465
- * wrapper. Returns an object keyed on the prefixed attribute name so the
466
- * call site stays readable: `<div {...themeAttrs(prefix, theme)} />`.
467
- */
468
- function themeAttrs(prefix, themeName) {
469
- return { [dataAttr(prefix, "theme")]: themeName };
470
- }
471
- //#endregion
472
509
  //#region src/BorderPreview.tsx
473
510
  const styles$14 = {
474
511
  wrapper: surfaceStyle,
@@ -561,7 +598,10 @@ function BorderPreview({ filter = "border", caption }) {
561
598
  const captionText = caption ?? `${rows.length} border${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
562
599
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
563
600
  ...themeAttrs(cssVarPrefix, activeTheme),
564
- style: styles$14.wrapper,
601
+ style: {
602
+ ...chromeAliases(cssVarPrefix),
603
+ ...styles$14.wrapper
604
+ },
565
605
  children: /* @__PURE__ */ jsx("div", {
566
606
  style: styles$14.empty,
567
607
  children: "No border tokens match this filter."
@@ -569,7 +609,10 @@ function BorderPreview({ filter = "border", caption }) {
569
609
  });
570
610
  return /* @__PURE__ */ jsxs("div", {
571
611
  ...themeAttrs(cssVarPrefix, activeTheme),
572
- style: styles$14.wrapper,
612
+ style: {
613
+ ...chromeAliases(cssVarPrefix),
614
+ ...styles$14.wrapper
615
+ },
573
616
  children: [/* @__PURE__ */ jsx("div", {
574
617
  style: styles$14.caption,
575
618
  children: captionText
@@ -721,7 +764,10 @@ function ColorPalette({ filter = "color", groupBy, caption }) {
721
764
  const captionText = caption ?? `${totalCount} color${totalCount === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
722
765
  if (totalCount === 0) return /* @__PURE__ */ jsx("div", {
723
766
  ...themeAttrs(cssVarPrefix, activeTheme),
724
- style: styles$13.wrapper,
767
+ style: {
768
+ ...chromeAliases(cssVarPrefix),
769
+ ...styles$13.wrapper
770
+ },
725
771
  children: /* @__PURE__ */ jsx("div", {
726
772
  style: styles$13.empty,
727
773
  children: "No color tokens match this filter."
@@ -814,9 +860,11 @@ function DimensionBar({ path, kind = "length" }) {
814
860
  const token = resolved[path];
815
861
  const pxValue = toPixels$1(token?.$value);
816
862
  const cappedValue = Number.isFinite(pxValue) && pxValue > MAX_RENDER_PX$1 ? `${MAX_RENDER_PX$1}px` : cssVar;
863
+ const aliases = chromeAliases(cssVarPrefix);
817
864
  switch (kind) {
818
865
  case "radius": return /* @__PURE__ */ jsx("div", {
819
866
  style: {
867
+ ...aliases,
820
868
  ...styles$12.radiusSample,
821
869
  borderRadius: cssVar
822
870
  },
@@ -824,6 +872,7 @@ function DimensionBar({ path, kind = "length" }) {
824
872
  });
825
873
  case "size": return /* @__PURE__ */ jsx("div", {
826
874
  style: {
875
+ ...aliases,
827
876
  ...styles$12.sizeSample,
828
877
  width: cappedValue,
829
878
  height: cappedValue
@@ -832,6 +881,7 @@ function DimensionBar({ path, kind = "length" }) {
832
881
  });
833
882
  default: return /* @__PURE__ */ jsx("div", {
834
883
  style: {
884
+ ...aliases,
835
885
  ...styles$12.bar,
836
886
  width: cappedValue
837
887
  },
@@ -934,7 +984,10 @@ function DimensionScale({ filter = "dimension", kind = "length", caption }) {
934
984
  const captionText = caption ?? `${rows.length} dimension${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
935
985
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
936
986
  ...themeAttrs(cssVarPrefix, activeTheme),
937
- style: styles$11.wrapper,
987
+ style: {
988
+ ...chromeAliases(cssVarPrefix),
989
+ ...styles$11.wrapper
990
+ },
938
991
  children: /* @__PURE__ */ jsx("div", {
939
992
  style: styles$11.empty,
940
993
  children: "No dimension tokens match this filter."
@@ -942,7 +995,10 @@ function DimensionScale({ filter = "dimension", kind = "length", caption }) {
942
995
  });
943
996
  return /* @__PURE__ */ jsxs("div", {
944
997
  ...themeAttrs(cssVarPrefix, activeTheme),
945
- style: styles$11.wrapper,
998
+ style: {
999
+ ...chromeAliases(cssVarPrefix),
1000
+ ...styles$11.wrapper
1001
+ },
946
1002
  children: [/* @__PURE__ */ jsx("div", {
947
1003
  style: styles$11.caption,
948
1004
  children: captionText
@@ -1047,7 +1103,10 @@ function FontFamilySample({ filter = "fontFamily", sample = "The quick brown fox
1047
1103
  const captionText = caption ?? `${rows.length} fontFamily token${rows.length === 1 ? "" : "s"}${filter && filter !== "fontFamily" ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
1048
1104
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
1049
1105
  ...themeAttrs(cssVarPrefix, activeTheme),
1050
- style: styles$10.wrapper,
1106
+ style: {
1107
+ ...chromeAliases(cssVarPrefix),
1108
+ ...styles$10.wrapper
1109
+ },
1051
1110
  children: /* @__PURE__ */ jsx("div", {
1052
1111
  style: styles$10.empty,
1053
1112
  children: "No fontFamily tokens match this filter."
@@ -1055,7 +1114,10 @@ function FontFamilySample({ filter = "fontFamily", sample = "The quick brown fox
1055
1114
  });
1056
1115
  return /* @__PURE__ */ jsxs("div", {
1057
1116
  ...themeAttrs(cssVarPrefix, activeTheme),
1058
- style: styles$10.wrapper,
1117
+ style: {
1118
+ ...chromeAliases(cssVarPrefix),
1119
+ ...styles$10.wrapper
1120
+ },
1059
1121
  children: [/* @__PURE__ */ jsx("div", {
1060
1122
  style: styles$10.caption,
1061
1123
  children: captionText
@@ -1164,7 +1226,10 @@ function FontWeightScale({ filter = "fontWeight", sample = "Aa", caption }) {
1164
1226
  const captionText = caption ?? `${rows.length} fontWeight token${rows.length === 1 ? "" : "s"}${filter && filter !== "fontWeight" ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
1165
1227
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
1166
1228
  ...themeAttrs(cssVarPrefix, activeTheme),
1167
- style: styles$9.wrapper,
1229
+ style: {
1230
+ ...chromeAliases(cssVarPrefix),
1231
+ ...styles$9.wrapper
1232
+ },
1168
1233
  children: /* @__PURE__ */ jsx("div", {
1169
1234
  style: styles$9.empty,
1170
1235
  children: "No fontWeight tokens match this filter."
@@ -1172,7 +1237,10 @@ function FontWeightScale({ filter = "fontWeight", sample = "Aa", caption }) {
1172
1237
  });
1173
1238
  return /* @__PURE__ */ jsxs("div", {
1174
1239
  ...themeAttrs(cssVarPrefix, activeTheme),
1175
- style: styles$9.wrapper,
1240
+ style: {
1241
+ ...chromeAliases(cssVarPrefix),
1242
+ ...styles$9.wrapper
1243
+ },
1176
1244
  children: [/* @__PURE__ */ jsx("div", {
1177
1245
  style: styles$9.caption,
1178
1246
  children: captionText
@@ -1301,7 +1369,10 @@ function GradientPalette({ filter = "gradient", caption }) {
1301
1369
  const captionText = caption ?? `${rows.length} gradient${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
1302
1370
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
1303
1371
  ...themeAttrs(cssVarPrefix, activeTheme),
1304
- style: styles$8.wrapper,
1372
+ style: {
1373
+ ...chromeAliases(cssVarPrefix),
1374
+ ...styles$8.wrapper
1375
+ },
1305
1376
  children: /* @__PURE__ */ jsx("div", {
1306
1377
  style: styles$8.empty,
1307
1378
  children: "No gradient tokens match this filter."
@@ -1309,7 +1380,10 @@ function GradientPalette({ filter = "gradient", caption }) {
1309
1380
  });
1310
1381
  return /* @__PURE__ */ jsxs("div", {
1311
1382
  ...themeAttrs(cssVarPrefix, activeTheme),
1312
- style: styles$8.wrapper,
1383
+ style: {
1384
+ ...chromeAliases(cssVarPrefix),
1385
+ ...styles$8.wrapper
1386
+ },
1313
1387
  children: [/* @__PURE__ */ jsx("div", {
1314
1388
  style: styles$8.caption,
1315
1389
  children: captionText
@@ -1476,7 +1550,7 @@ function resolveMotionSpec(token, themeTokens) {
1476
1550
  return null;
1477
1551
  }
1478
1552
  function MotionSample({ path, speed = 1, runKey = 0 }) {
1479
- const { resolved } = useProject();
1553
+ const { resolved, cssVarPrefix } = useProject();
1480
1554
  const reducedMotion = usePrefersReducedMotion();
1481
1555
  const spec = useMemo(() => resolveMotionSpec(resolved[path], resolved), [resolved, path]);
1482
1556
  const durationMs = spec?.durationMs ?? DEFAULT_DURATION_MS;
@@ -1500,11 +1574,17 @@ function MotionSample({ path, speed = 1, runKey = 0 }) {
1500
1574
  reducedMotion
1501
1575
  ]);
1502
1576
  if (reducedMotion) return /* @__PURE__ */ jsx("div", {
1503
- style: styles$7.reducedMotion,
1577
+ style: {
1578
+ ...chromeAliases(cssVarPrefix),
1579
+ ...styles$7.reducedMotion
1580
+ },
1504
1581
  children: "Animation suppressed by `prefers-reduced-motion: reduce`."
1505
1582
  });
1506
1583
  return /* @__PURE__ */ jsx("div", {
1507
- style: styles$7.track,
1584
+ style: {
1585
+ ...chromeAliases(cssVarPrefix),
1586
+ ...styles$7.track
1587
+ },
1508
1588
  children: /* @__PURE__ */ jsx("div", {
1509
1589
  style: {
1510
1590
  ...styles$7.ball,
@@ -1651,7 +1731,10 @@ function MotionPreview({ filter, caption }) {
1651
1731
  const captionText = caption ?? `${rows.length} motion token${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
1652
1732
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
1653
1733
  ...themeAttrs(cssVarPrefix, activeTheme),
1654
- style: styles$6.wrapper,
1734
+ style: {
1735
+ ...chromeAliases(cssVarPrefix),
1736
+ ...styles$6.wrapper
1737
+ },
1655
1738
  children: /* @__PURE__ */ jsx("div", {
1656
1739
  style: styles$6.empty,
1657
1740
  children: "No motion tokens match this filter."
@@ -1659,7 +1742,10 @@ function MotionPreview({ filter, caption }) {
1659
1742
  });
1660
1743
  return /* @__PURE__ */ jsxs("div", {
1661
1744
  ...themeAttrs(cssVarPrefix, activeTheme),
1662
- style: styles$6.wrapper,
1745
+ style: {
1746
+ ...chromeAliases(cssVarPrefix),
1747
+ ...styles$6.wrapper
1748
+ },
1663
1749
  children: [
1664
1750
  /* @__PURE__ */ jsx("div", {
1665
1751
  style: styles$6.caption,
@@ -1759,6 +1845,7 @@ function ShadowSample({ path }) {
1759
1845
  const cssVar = makeCssVar(path, cssVarPrefix);
1760
1846
  return /* @__PURE__ */ jsx("div", {
1761
1847
  style: {
1848
+ ...chromeAliases(cssVarPrefix),
1762
1849
  ...sampleStyle,
1763
1850
  boxShadow: cssVar
1764
1851
  },
@@ -1874,7 +1961,10 @@ function ShadowPreview({ filter = "shadow", caption }) {
1874
1961
  const captionText = caption ?? `${rows.length} shadow${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
1875
1962
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
1876
1963
  ...themeAttrs(cssVarPrefix, activeTheme),
1877
- style: styles$5.wrapper,
1964
+ style: {
1965
+ ...chromeAliases(cssVarPrefix),
1966
+ ...styles$5.wrapper
1967
+ },
1878
1968
  children: /* @__PURE__ */ jsx("div", {
1879
1969
  style: styles$5.empty,
1880
1970
  children: "No shadow tokens match this filter."
@@ -1882,7 +1972,10 @@ function ShadowPreview({ filter = "shadow", caption }) {
1882
1972
  });
1883
1973
  return /* @__PURE__ */ jsxs("div", {
1884
1974
  ...themeAttrs(cssVarPrefix, activeTheme),
1885
- style: styles$5.wrapper,
1975
+ style: {
1976
+ ...chromeAliases(cssVarPrefix),
1977
+ ...styles$5.wrapper
1978
+ },
1886
1979
  children: [/* @__PURE__ */ jsx("div", {
1887
1980
  style: styles$5.caption,
1888
1981
  children: captionText
@@ -2032,7 +2125,10 @@ function StrokeStyleSample({ filter = "strokeStyle", caption }) {
2032
2125
  const captionText = caption ?? `${rows.length} strokeStyle token${rows.length === 1 ? "" : "s"}${filter && filter !== "strokeStyle" ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
2033
2126
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
2034
2127
  ...themeAttrs(cssVarPrefix, activeTheme),
2035
- style: styles$4.wrapper,
2128
+ style: {
2129
+ ...chromeAliases(cssVarPrefix),
2130
+ ...styles$4.wrapper
2131
+ },
2036
2132
  children: /* @__PURE__ */ jsx("div", {
2037
2133
  style: styles$4.empty,
2038
2134
  children: "No strokeStyle tokens match this filter."
@@ -2040,7 +2136,10 @@ function StrokeStyleSample({ filter = "strokeStyle", caption }) {
2040
2136
  });
2041
2137
  return /* @__PURE__ */ jsxs("div", {
2042
2138
  ...themeAttrs(cssVarPrefix, activeTheme),
2043
- style: styles$4.wrapper,
2139
+ style: {
2140
+ ...chromeAliases(cssVarPrefix),
2141
+ ...styles$4.wrapper
2142
+ },
2044
2143
  children: [/* @__PURE__ */ jsx("div", {
2045
2144
  style: styles$4.caption,
2046
2145
  children: captionText
@@ -3167,7 +3266,10 @@ function TokenDetail({ path, heading }) {
3167
3266
  const colorFormat = useColorFormat();
3168
3267
  if (!token) return /* @__PURE__ */ jsx("div", {
3169
3268
  ...themeAttrs(cssVarPrefix, activeTheme),
3170
- style: styles$3.wrapper,
3269
+ style: {
3270
+ ...chromeAliases(cssVarPrefix),
3271
+ ...styles$3.wrapper
3272
+ },
3171
3273
  children: /* @__PURE__ */ jsxs("div", {
3172
3274
  style: styles$3.missing,
3173
3275
  children: [
@@ -3185,7 +3287,10 @@ function TokenDetail({ path, heading }) {
3185
3287
  const outOfGamut = formatted?.outOfGamut ?? false;
3186
3288
  return /* @__PURE__ */ jsxs("div", {
3187
3289
  ...themeAttrs(cssVarPrefix, activeTheme),
3188
- style: styles$3.wrapper,
3290
+ style: {
3291
+ ...chromeAliases(cssVarPrefix),
3292
+ ...styles$3.wrapper
3293
+ },
3189
3294
  children: [
3190
3295
  /* @__PURE__ */ jsx(TokenHeader, {
3191
3296
  path,
@@ -3446,7 +3551,10 @@ function TokenNavigator({ root, initiallyExpanded = 1, onSelect }) {
3446
3551
  }, [onSelect]);
3447
3552
  if (tree.length === 0) return /* @__PURE__ */ jsx("div", {
3448
3553
  ...themeAttrs(cssVarPrefix, activeTheme),
3449
- style: styles$2.wrapper,
3554
+ style: {
3555
+ ...chromeAliases(cssVarPrefix),
3556
+ ...styles$2.wrapper
3557
+ },
3450
3558
  children: /* @__PURE__ */ jsx("div", {
3451
3559
  style: styles$2.empty,
3452
3560
  children: root ? `No tokens under "${root}".` : "No tokens in the active theme."
@@ -3454,7 +3562,10 @@ function TokenNavigator({ root, initiallyExpanded = 1, onSelect }) {
3454
3562
  });
3455
3563
  return /* @__PURE__ */ jsxs("div", {
3456
3564
  ...themeAttrs(cssVarPrefix, activeTheme),
3457
- style: styles$2.wrapper,
3565
+ style: {
3566
+ ...chromeAliases(cssVarPrefix),
3567
+ ...styles$2.wrapper
3568
+ },
3458
3569
  children: [
3459
3570
  /* @__PURE__ */ jsxs("div", {
3460
3571
  style: styles$2.caption,
@@ -3772,7 +3883,10 @@ function TokenTable({ filter, type, showVar = true, caption }) {
3772
3883
  const captionText = caption ?? `${rows.length} token${rows.length === 1 ? "" : "s"}${filter ? ` matching \`${filter}\`` : ""}${type ? ` · $type=${type}` : ""} · ${activeTheme}`;
3773
3884
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
3774
3885
  ...themeAttrs(cssVarPrefix, activeTheme),
3775
- style: styles$1.wrapper,
3886
+ style: {
3887
+ ...chromeAliases(cssVarPrefix),
3888
+ ...styles$1.wrapper
3889
+ },
3776
3890
  children: /* @__PURE__ */ jsx("div", {
3777
3891
  style: styles$1.empty,
3778
3892
  children: "No tokens match this filter."
@@ -3780,7 +3894,10 @@ function TokenTable({ filter, type, showVar = true, caption }) {
3780
3894
  });
3781
3895
  return /* @__PURE__ */ jsx("div", {
3782
3896
  ...themeAttrs(cssVarPrefix, activeTheme),
3783
- style: styles$1.wrapper,
3897
+ style: {
3898
+ ...chromeAliases(cssVarPrefix),
3899
+ ...styles$1.wrapper
3900
+ },
3784
3901
  children: /* @__PURE__ */ jsxs("table", {
3785
3902
  style: styles$1.table,
3786
3903
  children: [
@@ -3952,7 +4069,10 @@ function TypographyScale({ filter = "typography", sample = "The quick brown fox
3952
4069
  const captionText = caption ?? `${rows.length} typography token${rows.length === 1 ? "" : "s"}${filter && filter !== "typography" ? ` matching \`${filter}\`` : ""} · ${activeTheme}`;
3953
4070
  if (rows.length === 0) return /* @__PURE__ */ jsx("div", {
3954
4071
  ...themeAttrs(cssVarPrefix, activeTheme),
3955
- style: styles.wrapper,
4072
+ style: {
4073
+ ...chromeAliases(cssVarPrefix),
4074
+ ...styles.wrapper
4075
+ },
3956
4076
  children: /* @__PURE__ */ jsx("div", {
3957
4077
  style: styles.empty,
3958
4078
  children: "No typography tokens match this filter."
@@ -3960,7 +4080,10 @@ function TypographyScale({ filter = "typography", sample = "The quick brown fox
3960
4080
  });
3961
4081
  return /* @__PURE__ */ jsxs("div", {
3962
4082
  ...themeAttrs(cssVarPrefix, activeTheme),
3963
- style: styles.wrapper,
4083
+ style: {
4084
+ ...chromeAliases(cssVarPrefix),
4085
+ ...styles.wrapper
4086
+ },
3964
4087
  children: [/* @__PURE__ */ jsx("div", {
3965
4088
  style: styles.caption,
3966
4089
  children: captionText