@siyahi/tools 0.1.9-next.29 → 0.1.9-next.30

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/contrast.mjs +23 -9
  2. package/package.json +1 -1
package/contrast.mjs CHANGED
@@ -91,9 +91,18 @@ const PAIRS = [
91
91
  ...["", "muted", "muted/50"].map((bg) => ({ fg: "input", bg, min: MARK })),
92
92
  { fg: "input", bg: "input/30", min: MARK, scheme: "dark" },
93
93
  ...["ring", "destructive"].map((fg) => ({ fg, bg: "", min: MARK })),
94
- // A toggle's focus ring also meets the button it rings: a selected one's
95
- // foreground fill, or a hovered one's muted fill.
96
- ...["foreground", "muted"].map((bg) => ({ fg: "ring", bg, min: MARK })),
94
+ // Focus is a 2px ring of --ring on the control's edge with a 2px ring of the
95
+ // page colour inside it. The outer ring meets what lies around the control:
96
+ // the page and the card (above), a tab list's muted fill and the sidebar.
97
+ // The inner ring meets the control's own fill, which matters where that is
98
+ // dark: a primary button's (a pressed toggle's foreground fill is checked
99
+ // with the selected toggle's text, above).
100
+ ...["muted", "sidebar"].map((bg) => ({ fg: "ring", bg, min: MARK })),
101
+ { fg: "background", bg: "primary", min: MARK },
102
+ // An invalid field's red wash (--field-wash): the value and placeholder on
103
+ // it, and its red edge against it.
104
+ ...["foreground", "muted-foreground"].map((fg) => ({ fg, bg: "destructive@field-wash", min: TEXT })),
105
+ { fg: "destructive", bg: "destructive@field-wash", min: MARK },
97
106
  // A tone's icon or StatusBadge dot against the tone's own wash (lib/tone.ts).
98
107
  ...[
99
108
  ["link", "chart-1/8"],
@@ -127,16 +136,21 @@ const PAIRS = [
127
136
  ["negative", ["negative/wash", "negative/8"]],
128
137
  ["warning", ["warning/wash", "warning/10"]],
129
138
  ].map(([fg, bg]) => ({ fg: String(fg), bg: /** @type {Paint[]} */ (bg), min: MARK })),
139
+ // A chart's forecast stretch is hatched with 1px stripes of the text colour
140
+ // at 16% (lib/chart-marks). Its dashed lines and its FORECAST and TODAY
141
+ // labels sit on card-coloured halos, so no stripe runs beside them; the
142
+ // today rule in the link colour does meet the stripes.
143
+ { fg: "link", bg: "foreground/16", min: MARK, surface: "card" },
130
144
  // The selected tab's fill against its list.
131
145
  { fg: "foreground", bg: "muted", min: MARK },
132
- // Chart marks on the canvas and the card. A dimmed bar keeps its full colour
133
- // as its outline, so these are the outlines too.
146
+ // Chart marks on the canvas and the card. A bar is read by its full-colour
147
+ // edge, so these are the edges too; the tint inside is carried by the edge and
148
+ // has no pair of its own, nor has a dimmed bar's fainter tint. A stale
149
+ // block's marks (greyed, at 65%) are exempt: stale is meant to read faintly.
134
150
  ...[...CHARTS, "positive", "negative"].map((fg) => ({ fg, bg: "", min: MARK })),
135
151
  ...CHARTS.slice(0, -1).map((fg, i) => ({ fg, bg: CHARTS[i + 1] ?? "", min: MARK })),
136
- // A waterfall's rise and fall: the full-colour edge against the tint it
137
- // encloses, on the bar and its legend chip; and every bar colour against the
138
- // 40% muted band a chart card lays behind a hovered category (lib/chart-frame).
139
- ...["positive", "negative"].map((side) => ({ fg: side, bg: `${side}@35`, min: MARK })),
152
+ // Every bar colour against the 40% muted band a chart card lays behind a
153
+ // hovered category (lib/chart-frame).
140
154
  ...[...CHARTS, "positive", "negative"].map((fg) => ({ fg, bg: "muted/40", min: MARK, surface: "card" })),
141
155
  // A chart card's footer text, on the footer's muted wash.
142
156
  { fg: "foreground", bg: "muted/50", min: TEXT },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siyahi/tools",
3
- "version": "0.1.9-next.29",
3
+ "version": "0.1.9-next.30",
4
4
  "description": "Checks and build helpers for Siyahi pages: a lint plugin, a font preload plugin, a theme contrast check, and screenshot and layout shift scripts.",
5
5
  "homepage": "https://siyahi.jatinbansal.com",
6
6
  "license": "MIT",