@phcdevworks/spectre-tokens 3.0.0 → 3.1.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/dist/index.cjs CHANGED
@@ -929,7 +929,11 @@ var coreTokens = {
929
929
  "md": "1.5rem",
930
930
  "lg": "2rem"
931
931
  },
932
- "maxWidth": "72rem"
932
+ "maxWidth": "72rem",
933
+ "maxWidthProse": "65ch"
934
+ },
935
+ "sidebar": {
936
+ "width": "16rem"
933
937
  }
934
938
  },
935
939
  "font": {
@@ -1231,6 +1235,13 @@ var createCssVariableMap = (tokens2, options = {}) => {
1231
1235
  if (container?.maxWidth) {
1232
1236
  assign(toVariableName(prefix, "layout", "container", "max-width"), container.maxWidth);
1233
1237
  }
1238
+ if (container?.maxWidthProse) {
1239
+ assign(toVariableName(prefix, "layout", "container", "max-width-prose"), container.maxWidthProse);
1240
+ }
1241
+ const sidebar = layout.sidebar;
1242
+ if (sidebar?.width) {
1243
+ assign(toVariableName(prefix, "layout", "sidebar", "width"), sidebar.width);
1244
+ }
1234
1245
  }
1235
1246
  const border = baseTokens.border;
1236
1247
  if (border?.width) {
@@ -1332,6 +1343,7 @@ var generateCssVariables = (tokens2, options = {}) => {
1332
1343
  const surfaceAliases = tokens2.surface ?? {};
1333
1344
  const textAliases = tokens2.text ?? {};
1334
1345
  const componentAliases = tokens2.component ?? {};
1346
+ const linkTokens = tokens2.link ?? {};
1335
1347
  const semanticEntries = [
1336
1348
  { varParts: ["surface", "page"], modePath: ["surface", "page"], aliasSrc: surfaceAliases, aliasPath: ["page"] },
1337
1349
  { varParts: ["surface", "card"], modePath: ["surface", "card"], aliasSrc: surfaceAliases, aliasPath: ["card"] },
@@ -1339,6 +1351,10 @@ var generateCssVariables = (tokens2, options = {}) => {
1339
1351
  { varParts: ["surface", "overlay"], modePath: ["surface", "overlay"], aliasSrc: surfaceAliases, aliasPath: ["overlay"] },
1340
1352
  { varParts: ["surface", "subtle"], modePath: ["surface", "subtle"] },
1341
1353
  { varParts: ["surface", "hero"], modePath: ["surface", "hero"], aliasSrc: surfaceAliases, aliasPath: ["hero"] },
1354
+ { varParts: ["surface", "hover"], modePath: ["surface", "hover"], aliasSrc: surfaceAliases, aliasPath: ["hover"] },
1355
+ { varParts: ["surface", "selected"], modePath: ["surface", "selected"], aliasSrc: surfaceAliases, aliasPath: ["selected"] },
1356
+ { varParts: ["surface", "active"], modePath: ["surface", "active"], aliasSrc: surfaceAliases, aliasPath: ["active"] },
1357
+ { varParts: ["surface", "divider"], modePath: ["surface", "divider"], aliasSrc: surfaceAliases, aliasPath: ["divider"] },
1342
1358
  { varParts: ["text", "on", "page", "default"], modePath: ["text", "onPage", "default"], aliasSrc: textAliases, aliasPath: ["onPage", "default"] },
1343
1359
  { varParts: ["text", "on", "page", "muted"], modePath: ["text", "onPage", "muted"], aliasSrc: textAliases, aliasPath: ["onPage", "muted"] },
1344
1360
  { varParts: ["text", "on", "page", "subtle"], modePath: ["text", "onPage", "subtle"], aliasSrc: textAliases, aliasPath: ["onPage", "subtle"] },
@@ -1410,6 +1426,12 @@ var generateCssVariables = (tokens2, options = {}) => {
1410
1426
  addBase(varName, pickSemantic(tokens2, getPath(defaultMode, modePath), ...aliasCandidate));
1411
1427
  addDark(varName, pickSemantic(tokens2, getPath(darkMode, modePath), getPath(defaultMode, modePath), ...aliasCandidate));
1412
1428
  });
1429
+ Object.entries(linkTokens).forEach(([key, value]) => {
1430
+ const varName = toVariableName(prefix, "link", key);
1431
+ const resolved = pickSemantic(tokens2, value);
1432
+ addBase(varName, resolved);
1433
+ addDark(varName, resolved);
1434
+ });
1413
1435
  const rootBlock = `${selector} {
1414
1436
  ${[...baseLines, ...mapLines].join("\n")}
1415
1437
  }`;
@@ -1461,7 +1483,11 @@ var createTailwindTheme = (source = tokens) => {
1461
1483
  transitionTimingFunction: { ...source.transitions.easing },
1462
1484
  opacity: { ...source.opacity },
1463
1485
  maxWidth: {
1464
- container: source.layout?.container?.maxWidth
1486
+ container: source.layout?.container?.maxWidth,
1487
+ prose: source.layout?.container?.maxWidthProse
1488
+ },
1489
+ width: {
1490
+ sidebar: source.layout?.sidebar?.width
1465
1491
  },
1466
1492
  borderWidth: {
1467
1493
  DEFAULT: source.border?.width.base,