@nadicodeai/design-system 1.1.0 → 2.0.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/AGENTS.md +3 -2
- package/CONTEXT.md +8 -0
- package/DESIGN.md +482 -92
- package/LICENSES/shadow-plugin-MIT.txt +21 -0
- package/README.md +30 -1
- package/dist/css/index.css +128 -69
- package/dist/tailwind/nadicode.tailwind.json +3 -49
- package/dist/tokens/nadicode.dtcg-resolved.json +5092 -0
- package/dist/tokens/nadicode.dtcg.json +4602 -2169
- package/package.json +5 -1
package/AGENTS.md
CHANGED
|
@@ -20,7 +20,8 @@ Proof escalates by the ladder in the root `AGENTS.md` "Commands": `npm run check
|
|
|
20
20
|
| Shared design-language terms | `CONTEXT.md` |
|
|
21
21
|
| Colors, tokens, typography, layout doctrine, seam ownership, component semantics | `DESIGN.md` (read it before stating any of these) |
|
|
22
22
|
| CSS layers, token pipeline, dark remaps, generated outputs, their guards | `DESIGN.md` "CSS Architecture & Token Pipeline". Decision history in `../../docs/adr/` |
|
|
23
|
-
|
|
|
23
|
+
| Where a token is authored, and what the build publishes | The YAML front matter for the four schema groups, the one `json design-tokens` fence for everything the schema has no group for (`DESIGN.md` "Authored token extension"). `scripts/sd/design-tokens-fence.ts` reads the fence and `scripts/sd/compose-token-graph.ts` merges it with the CLI export into `dist/tokens/nadicode.dtcg.json` (aliases preserved) and `dist/tokens/nadicode.dtcg-resolved.json` (aliases replaced by values) |
|
|
24
|
+
| Motion direction and runtime | `DESIGN.md` "Motion" for the direction and `core.motion` of the fence for the durations and easings, `src/css/motion.css` for the keyframes, the classes, and reduced motion, then the `product-design` skill for agent procedure |
|
|
24
25
|
| Package exports | `package.json` (guard: `../../scripts/check-export-targets.mjs`, run by the root `build` script, so root `npm run check` and the post-merge suite, never the workspace `check` or the required gate) |
|
|
25
26
|
| Static or non-React consumption | `README.md` |
|
|
26
27
|
| React consumption | `../ui/docs/consuming-cross-repo.md` |
|
|
@@ -35,7 +36,7 @@ Proof escalates by the ladder in the root `AGENTS.md` "Commands": `npm run check
|
|
|
35
36
|
- Token-only CSS: no raw color or radius literal in hand-authored `src/css/` or `examples/`, fallback-encoded or not. A new value enters `DESIGN.md` first (colors and the examples scan: `tests/guards/consumer-css-discipline.test.ts`; kit radius: `tests/guards/kernel-css-architecture.test.ts`).
|
|
36
37
|
- Emitted-but-unreferenced contract tokens are intentional. Runtime aliases and compatibility variables are different: each must have a live caller or be removed (`DESIGN.md` "CSS Architecture & Token Pipeline").
|
|
37
38
|
- `DESIGN.md` `## Components` is the semantic component catalog. CSS is its implementation, and `tests/guards/component-contract-matches-css.test.ts` derives the two-way fence without a copied inventory.
|
|
38
|
-
- `DESIGN.md` stays contract-only and spec-shaped: check `npm exec --package=@google/design.md -- design.md spec` before changing YAML fields. Exact reusable values go in YAML, application guidance in prose. Add a non-spec YAML field only when repo code or a test reads it (spec-shape don'ts: `DESIGN.md` "Do's and Don'ts").
|
|
39
|
+
- `DESIGN.md` stays contract-only and spec-shaped: check `npm exec --package=@google/design.md -- design.md spec` before changing YAML fields. Exact reusable values go in the YAML front matter where the schema has a group for them and in the one `json design-tokens` fence where it does not, application guidance in prose. Add a non-spec YAML field only when repo code or a test reads it (spec-shape don'ts: `DESIGN.md` "Do's and Don'ts").
|
|
39
40
|
- Seams and grids are computed, single-owner, never eyeballed (doctrine home: `DESIGN.md` "## Layout" and "Seam Ownership").
|
|
40
41
|
- Authoring is contract-first: a visual behavior comes from `DESIGN.md`, from our own shipped surfaces, or from an explicit user approval, never from another product's rendered output. Screenshots verify, they never author. Ask when the contract leaves a decision open, and stop and re-read `DESIGN.md` before a second visual patch to the same component.
|
|
41
42
|
- Name everything as NadicodeAI-owned primitives. A source brand never appears in a name, a comment, a contract, or any living design document.
|
package/CONTEXT.md
CHANGED
|
@@ -12,6 +12,14 @@ The normative specification for reusable design tokens, page grammar, component
|
|
|
12
12
|
**Design token**:
|
|
13
13
|
A named reusable visual value from the design contract, such as a color, spacing, radius, or typography value. A one-off component detail is not a token.
|
|
14
14
|
|
|
15
|
+
**Foundation**:
|
|
16
|
+
The design-contract values owned by no single product and available to every product: colour roles and their dark pairs, the two type families and the type scale, spacing, radius, material, elevation, motion, the icon render, and the brand marks and fonts. A value stays foundation whether one product renders it or three.
|
|
17
|
+
_Avoid_: Palette, base theme
|
|
18
|
+
|
|
19
|
+
**Register**:
|
|
20
|
+
One product's way of applying the foundation: its direction, density, which steps of each scale it uses and where, its dark-mode stance, its structural grammar, and its motion budget. There are three, one rulebook each: website, Portal, and the Nadia desktop app; a register adds rules and redefines no foundation value.
|
|
21
|
+
_Avoid_: Theme, skin
|
|
22
|
+
|
|
15
23
|
**Scale step**:
|
|
16
24
|
One numbered value in a functional color scale whose number carries the same interaction or contrast role across every scale.
|
|
17
25
|
_Avoid_: Shade, tint
|