@rowkit/tokens 0.3.0 → 1.0.0-beta.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # @rowkit/tokens
2
2
 
3
- [![npm](https://img.shields.io/npm/v/@rowkit/tokens?color=3b5bdb)](https://www.npmjs.com/package/@rowkit/tokens)
3
+ [![npm](https://img.shields.io/npm/v/@rowkit/tokens/beta?color=000080)](https://www.npmjs.com/package/@rowkit/tokens)
4
4
  [![license](https://img.shields.io/npm/l/@rowkit/tokens)](https://github.com/NikolaiKushner/rowkit/blob/main/LICENSE)
5
5
 
6
- The design tokens behind [rowkit](https://www.npmjs.com/package/rowkit) — colour, spacing, typography, radii, shadows, layers and motion.
6
+ The design tokens behind [rowkit](https://www.npmjs.com/package/rowkit) — the Windows 98 palette, bevels, type, spacing, radii, layers and motion.
7
7
 
8
8
  Usable on its own. Nothing here depends on Vue, so a chart library, a design tool or an email template can read the same values the components use.
9
9
 
@@ -12,14 +12,14 @@ Usable on its own. Nothing here depends on Vue, so a chart library, a design too
12
12
  ## Install
13
13
 
14
14
  ```bash
15
- npm i @rowkit/tokens
15
+ npm i @rowkit/tokens@beta
16
16
  ```
17
17
 
18
18
  ## Two layers
19
19
 
20
- **Primitives** are the raw ramps: `--color-primary-600` is one specific blue and means nothing on its own. **Semantic** tokens name a role — `--color-card`, `--color-muted-foreground`, `--color-border` — and point at a primitive through `var()`.
20
+ **Primitives** are the raw palette — the VGA colours and Windows 98's system colours: `--color-vga-navy` is one specific blue and means nothing on its own. **Semantic** tokens name a role — `--color-card`, `--color-muted-foreground`, `--color-border` — and point at a primitive through `var()`.
21
21
 
22
- Only the semantic layer changes under `.dark`, which is what makes dark mode a matter of repointing references rather than hunting hex codes.
22
+ Rebranding is a matter of repointing semantic references rather than hunting hex codes. There is one theme; rowkit has no dark mode.
23
23
 
24
24
  ## Use
25
25
 
@@ -30,7 +30,7 @@ As a Tailwind v4 theme:
30
30
  @import '@rowkit/tokens/css';
31
31
  ```
32
32
 
33
- Every token becomes a theme value, so `bg-card`, `text-muted-foreground`, `p-4`, `rounded-md` and `shadow-lg` resolve to the scales above.
33
+ Every token becomes a theme value, so `bg-card`, `text-ui`, `p-4` and `shadow-raised` resolve to the scales above.
34
34
 
35
35
  As CSS custom properties, for anything Tailwind does not cover:
36
36
 
@@ -46,18 +46,22 @@ Or in TypeScript, fully typed, when a value has to reach JavaScript:
46
46
  ```ts
47
47
  import { tokens } from '@rowkit/tokens'
48
48
 
49
- tokens.color.primary[800] // 'oklch(0.31 0.038 48)' — warm espresso
49
+ tokens.color.vga.silver // '#c0c0c0' — the face of every window
50
50
 
51
- const series = [tokens.color.primary[500], tokens.color.success[500]]
51
+ const series = [tokens.color.vga.navy, tokens.color.vga.green, tokens.color.vga.maroon]
52
52
  ```
53
53
 
54
- `tokens` is grouped by scale rather than flattened, so `tokens.color.primary[600]` narrows to its literal type and autocompletes at every level.
54
+ `tokens` is grouped by scale rather than flattened, so `tokens.color.vga.navy` narrows to its literal type and autocompletes at every level.
55
55
 
56
56
  ## Notes on the values
57
57
 
58
- **Colour is OKLCH, clamped to sRGB.** Every chromatic family shares one lightness ramp, so `primary-600`, `danger-600` and `success-600` carry the same perceptual weight. Chroma is clamped to the sRGB gamut on purpose: OKLCH can express colours outside it, and browsers gamut-map those by their own rules — which makes a token render differently on a P3 laptop than on an sRGB monitor.
58
+ **Colour is the exact Windows 98 palette.** Primitives are `#rrggbb` values from the VGA palette and the default Windows 98 scheme, named as in the design's Figma variables.
59
59
 
60
- **Contrast is asserted, not claimed.** Every semantic pairing is checked against WCAG AA in the package's own tests, in both themes.
60
+ **Depth is bevels, not elevation.** `shadow-raised`, `shadow-sunken`, `shadow-window` and the rest are hard inset lines in the four `bevel-*` colours. Corners are square: the radius scale multiplies `--radius`, which is `0rem` until you set it.
61
+
62
+ **Type is PT Sans and VT323.** The interface is set at 11px (`text-ui`). The font files are not shipped; load `@fontsource/pt-sans` and `@fontsource/vt323` in the app.
63
+
64
+ **Contrast is asserted, not claimed.** Every semantic text pairing is checked against WCAG AA, and every control boundary and focus ring against 3:1, in the package's own tests.
61
65
 
62
66
  **Spacing keys are multiples of 4px.** `4` is 1rem, `2` is 8px — the convention most Vue and Tailwind developers already carry.
63
67
 
@@ -67,4 +71,4 @@ const series = [tokens.color.primary[500], tokens.color.success[500]]
67
71
 
68
72
  MIT © Nikolai Kushner
69
73
 
70
- Design language based on [shadcn/ui](https://ui.shadcn.com) by shadcn, adapted for Vue. shadcn/ui is MIT licensed; rowkit adopts its token values and class recipes, not its code.
74
+ The visual language is a tribute to Windows 98. rowkit is not affiliated with or endorsed by Microsoft.