@putdotio/design 1.4.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putdotio/design",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Public put.io design tokens, brand assets, and design-system guidance.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -67,11 +67,12 @@
67
67
  "tokens:build": "node scripts/build-tokens.ts",
68
68
  "tokens:check": "node scripts/check-generated-tokens.ts && node scripts/verify-design-system.ts",
69
69
  "design:mirror": "node scripts/export-design-mirror.ts",
70
+ "test:mirror": "node --test tests/export-design-mirror.test.mjs",
70
71
  "typecheck:scripts": "tsc --noEmit --ignoreConfig --skipLibCheck --module ESNext --moduleResolution Bundler --target ES2022 --strict --types node scripts/*.ts playwright.config.ts tests/e2e/*.ts sst.config.ts infra/*.ts",
71
72
  "smoke": "node scripts/smoke-static.ts",
72
73
  "html:check": "html-validate \"system/**/*.html\"",
73
74
  "e2e": "playwright test",
74
- "verify": "pnpm typecheck:scripts && pnpm tokens:check && pnpm html:check && pnpm smoke && sst version",
75
+ "verify": "pnpm typecheck:scripts && pnpm tokens:check && pnpm test:mirror && pnpm html:check && pnpm smoke && sst version",
75
76
  "verify:full": "pnpm verify && pnpm e2e && npm pack --dry-run",
76
77
  "check": "pnpm verify",
77
78
  "deploy:production": "sst deploy --stage production"
@@ -83,7 +84,7 @@
83
84
  "html-validate": "^11.2.0",
84
85
  "sst": "^4.14.3",
85
86
  "style-dictionary": "^5.4.1",
86
- "typescript": "^6.0.2",
87
+ "typescript": "^7.0.2",
87
88
  "yaml": "^2.9.0"
88
89
  },
89
90
  "packageManager": "pnpm@11.2.2"
package/system/README.md CHANGED
@@ -20,14 +20,18 @@ project root/
20
20
 
21
21
  Preview pages load the public put.io font CSS from `static.put.io` (the same
22
22
  source as the product), so the design system always matches production. Do not
23
- commit font files here. Each HTML file links three stylesheets in `<head>`:
23
+ commit font files here. Two families, so each HTML file links two stylesheets in
24
+ `<head>`:
24
25
 
25
26
  ```html
26
27
  <link rel="stylesheet" href="https://static.put.io/fonts/gt-america/standard/font.css">
27
- <link rel="stylesheet" href="https://static.put.io/fonts/gt-america/mono/font.css">
28
28
  <link rel="stylesheet" href="https://static.put.io/fonts/berkeley-mono/variable/font.css">
29
29
  ```
30
30
 
31
+ GT America Mono is retired. `--font-ui-mono` no longer exists and everything mono
32
+ reads `--font-mono` (Berkeley Mono), whose tabular figures carry the numerics the
33
+ UI mono used to. Do not re-add the `gt-america/mono/font.css` load.
34
+
31
35
  Canonical weight mapping (matches the brand font host):
32
36
  `100 ultra-light · 200 thin · 300 light · 400 regular · 500 medium · 700 bold · 900 black`
33
37
 
@@ -61,13 +65,31 @@ Web package consumers import the package CSS export:
61
65
  @import "@putdotio/design/css";
62
66
  ```
63
67
 
64
- For **TV preview cards**, also load `preview/tv-shell.css` — it adds the `.tv`, `.topnav`, `.scr`, glass tiers, and player chrome on top of the tokens. Every component selector is scoped under `.tv`, so the file is safe to bundle globally without bleeding into web components. This is preview-only support CSS; platform repos implement TV components in their native UI stacks:
68
+ For **TV preview cards**, also load `preview/tv-shell.css` — it adds the `.tv`,
69
+ `.scr`, `.row`, solid surface tiers, and player chrome on top of the tokens.
70
+ Every component selector is scoped under `.tv`, so the file is safe to bundle
71
+ globally without bleeding into web components. This is preview-only support CSS;
72
+ platform repos implement TV components in their native UI stacks:
65
73
 
66
74
  ```html
67
75
  <link rel="stylesheet" href="./tokens.css">
68
76
  <link rel="stylesheet" href="./preview/tv-shell.css">
69
77
  ```
70
78
 
79
+ TV surfaces are **solid token colors** — no `backdrop-filter`, no translucent
80
+ white fills. Focus is a fill: rows go transparent → `--component-bg-active`,
81
+ buttons go `--component-bg` → `--component-bg-active` with the border stepping
82
+ to `--border-hover`. There is no scale, shadow, halo, or white invert.
83
+
84
+ The 10-foot scale itself is graph data, not CSS. The `tv` token group
85
+ (`--tv-text-*`, `--tv-space-*`, `--tv-overscan-*`,
86
+ `--tv-radius`, `--tv-z-*`) carries the 1:1 values for native emitters and is
87
+ `mode: "tv"`, so it is deliberately **not** emitted into `tokens.css` — read it
88
+ from `dist/tokens.flat.json`. Only `--radius-tv` (12px, the single radius for
89
+ every TV surface) is global and reachable in CSS. Two things must not be folded
90
+ into the web scales: TV has no mono face, and TV orders `--tv-z-overlay` (300)
91
+ *above* `--tv-z-toast` (200), the opposite of the web `--z-*` stack.
92
+
71
93
  ## Core rules
72
94
 
73
95
  - **Yellow `#FDCE45` is the brand constant at rest** — full rule and approved uses in [`../DESIGN.md`](../DESIGN.md) (Colors). Guide specifics: `--yellow-solid-hover` (`#F3C435`) is the hover peer with its own canonical hex in both modes, and focus rings use the yellow at 35% alpha (`--shadow-focus-color`).
@@ -89,10 +111,9 @@ the parent broadcast when embedded. A URL query (`?theme=light` or
89
111
  `?theme=dark`) overrides both — useful for screenshots.
90
112
 
91
113
  Fixed-mode previews opt out with `<html data-theme-lock="dark">`. This is only
92
- for product mockups whose visual language is intrinsically one mode — TV's
93
- translucent glass material and on-video player chrome can't render on a light
94
- surface, so `tv-*.html`, `mobile-shell.html`, and `components-player-web.html`
95
- are locked. Locked previews ignore both `localStorage` and parent broadcasts.
114
+ for product mockups whose visual language is intrinsically one mode — a 10-foot
115
+ screen and on-video player chrome are dark-only surfaces, so `tv-*.html`,
116
+ `mobile-shell.html`, and `components-player-web.html` are locked. Locked previews ignore both `localStorage` and parent broadcasts.
96
117
  If you write a new component preview, you almost certainly don't want the
97
118
  lock — let the tokens do the work and your specimen will render correctly in
98
119
  both modes.
@@ -118,6 +139,12 @@ the two name systems can't drift.
118
139
  | `--ring` | `--shadow-focus-color` |
119
140
  | `--background` / `--foreground` | `--bg` / `--text` |
120
141
 
142
+ There is also a full `--input-*` set (`-bg`, `-border`, `-border-hover`,
143
+ `-border-focus`, `-ring`, `-text`, `-placeholder`, `-radius`) that aliases the
144
+ `--field-*` tokens one-for-one, so shadcn-shaped input code themes without
145
+ renaming. **Author against `--field-*`;** the `--input-*` names exist only as the
146
+ alias bridge and must never carry their own value.
147
+
121
148
  The foreground tokens (`--primary-foreground`, `--destructive-foreground`,
122
149
  `--success-foreground`) encode the mode-safe inverse pair — always read these
123
150
  instead of writing literal `#000` / `#fff` on a solid surface.