@trading-game/design-intelligence-layer 1.0.0 → 1.0.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/AGENTS.md +1 -0
- package/README.md +11 -7
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/docs/components/badge.md +2 -2
- package/docs/foundations/colors.md +1 -0
- package/package.json +1 -1
- package/src/styles.css +18 -1
package/AGENTS.md
CHANGED
|
@@ -23,6 +23,7 @@ Rules of engagement for AI agents building with `@trading-game/design-intelligen
|
|
|
23
23
|
- **Menus**: Command, Context Menu, Dropdown Menu, Menubar, and Select rows share one look (`--menu-*` family): `rounded-lg` surface panel + hairline, `type-menu-item` rows with the hover glaze, `type-menu-heading` group labels. See [docs/patterns/menus.md](./docs/patterns/menus.md).
|
|
24
24
|
- **On brand/art surfaces**: use the `on-brand` variants (Button `primary/secondary/tertiary-on-brand`, Input/InputGroup `variant="on-brand"`, Link `tone="on-brand"`) and the frost recipe (`variant="frosted-on-brand"` on Button, NavigationButton, and Card); on page surfaces the tinted counterpart is Button `variant="frosted"`. See [docs/patterns/on-brand.md](./docs/patterns/on-brand.md).
|
|
25
25
|
- **State layers**: hover = `bg-background-hover-default` glaze; pressed = `bg-background-pressed-default`; brand fills derive hover/press via the built-in `brand-hover`/`brand-pressed` recipes.
|
|
26
|
+
- **Page canvas**: the app shell paints the page background once — plain `bg-background-primary-canvas`, or the tinted screen background via `background: var(--background-tinted-canvas)` (a layered gradient token; not a `bg-*` utility). Components never set the page background. See the demo's Canvas foundation page.
|
|
26
27
|
|
|
27
28
|
## Anti-patterns (seen in the wild — don't repeat)
|
|
28
29
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The component library and token architecture for **Champion Trade** (formerly Trading Game) — a Tailwind CSS v4 + React design system with a strict semantic token layer, per-component typography tokens, light and dark themes, and 57 production components.
|
|
4
4
|
|
|
5
|
-
> **Package name:**
|
|
5
|
+
> **Package name:** published as `@trading-game/design-intelligence-layer`. The Champion Trade npm scope rename is parked for a future major — install and import under the current name below.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -74,11 +74,15 @@ React 18+, ReactDOM, Tailwind CSS v4+.
|
|
|
74
74
|
|
|
75
75
|
## What's inside
|
|
76
76
|
|
|
77
|
-
- **57 components** — forms, overlays, menus, navigation, data display, plus trading-specific pieces (Numpad, Bottom Navigation, Profile Photo)
|
|
78
|
-
- **Three-layer token architecture** — primitives → semantics → component type tokens; components consume semantic colour tokens only
|
|
77
|
+
- **57 components** — forms, overlays, menus, navigation, data display, plus trading-specific pieces (Numpad, Bottom Navigation with its liquid selection bubble + AI circle, Profile Photo, Stepper)
|
|
78
|
+
- **Three-layer token architecture** — primitives → semantics → component type tokens; components consume semantic colour tokens only, and `npm run check:tokens` fails the build on any drift (undocumented tokens, primitives in components, alpha-modified colour constructions)
|
|
79
|
+
- **Three-layer motion system** — duration/easing primitives → semantic roles (hover, press, surface, overlay) → named signature moves (the liquid travel spring, the arrival pop); overlay animations ship with the package
|
|
79
80
|
- **Light + dark themes** — dark is designed, not mirrored: its own surface mixes, selection fills, and ink steps
|
|
80
|
-
- **
|
|
81
|
-
- **
|
|
81
|
+
- **Tinted canvas** — the signature screen background (`--background-tinted-canvas`): a blue aurora melting into the canvas, pure token math, applied once on the page root
|
|
82
|
+
- **The frosted family** — `variant="frosted"` (brand-tinted glass on page surfaces) and `variant="frosted-on-brand"` (white frost on art) across Button, NavigationButton, and Card
|
|
83
|
+
- **No shadows** — elevation is hairlines and surface steps, with one sanctioned exception: the Bottom Navigation's floating-chrome lift
|
|
84
|
+
- **Pill shape system** — buttons and chips are pills, icon buttons are circles, cards 18px, menus 10px, form fields 4px; every control on the 32/40/48 rail
|
|
85
|
+
- **AI-readable in `node_modules`** — AGENTS.md, all 57 component pages, foundations, and patterns ship inside the npm tarball
|
|
82
86
|
- **TypeScript, ESM + CJS**
|
|
83
87
|
|
|
84
88
|
## Documentation
|
|
@@ -91,7 +95,7 @@ React 18+, ReactDOM, Tailwind CSS v4+.
|
|
|
91
95
|
| [docs/foundations/shape-layout.md](./docs/foundations/shape-layout.md) | The 32/40/48 size rail, radius system, spacing, grid |
|
|
92
96
|
| [docs/foundations/motion.md](./docs/foundations/motion.md) | The three-layer motion system: primitives → semantic roles → signature moves |
|
|
93
97
|
| [docs/components/](./docs/components/) | One page per component: API, variants, tokens consumed, behaviour, do/don't |
|
|
94
|
-
| [docs/patterns/](./docs/patterns/) | Forms (Field cascade), menus (shared family), on-brand surfaces &
|
|
98
|
+
| [docs/patterns/](./docs/patterns/) | Forms (Field cascade), menus (shared family), on-brand surfaces & the frosted recipe |
|
|
95
99
|
|
|
96
100
|
## Demo app
|
|
97
101
|
|
|
@@ -105,4 +109,4 @@ npm run dev # Next.js demo at http://localhost:4000 — every component, light
|
|
|
105
109
|
npm install @trading-game/design-intelligence-layer@latest --safe-chain-skip-minimum-package-age
|
|
106
110
|
```
|
|
107
111
|
|
|
108
|
-
Deprecated token aliases and component aliases (e.g. Input `variant="inverse"`, NativeSelect `size="default"`) keep working
|
|
112
|
+
Deprecated token aliases and component aliases (e.g. Button `variant="glass"` → `frosted-on-brand`, Input `variant="inverse"`, NativeSelect `size="default"`) keep working throughout 1.x; they are removed in one breaking sweep at the **next major**, alongside the Champion Trade package rename.
|
package/dist/index.cjs
CHANGED
|
@@ -1257,10 +1257,10 @@ var badgeVariants = (0, import_class_variance_authority4.cva)(
|
|
|
1257
1257
|
// so it paints via `background`, not a bg-* utility).
|
|
1258
1258
|
tint: "[background:var(--background-brand-container)] border-transparent text-text-brand-container-static",
|
|
1259
1259
|
"tint-demo": "bg-background-demo-default border-transparent text-text-demo-default",
|
|
1260
|
-
"tint-neutral": "bg-background-secondary-surface border-
|
|
1261
|
-
"tint-success": "bg-background-success-default border-
|
|
1262
|
-
"tint-fail": "bg-background-error-default border-
|
|
1263
|
-
"tint-warning": "bg-background-warning-default border-
|
|
1260
|
+
"tint-neutral": "bg-background-secondary-surface border-transparent text-text-prominent-default",
|
|
1261
|
+
"tint-success": "bg-background-success-default border-transparent text-text-success-default",
|
|
1262
|
+
"tint-fail": "bg-background-error-default border-transparent text-text-error-default",
|
|
1263
|
+
"tint-warning": "bg-background-warning-default border-transparent text-text-warning-default"
|
|
1264
1264
|
},
|
|
1265
1265
|
size: {
|
|
1266
1266
|
xs: "type-badge-xs h-5 px-2 py-0.5",
|