@nadicodeai/design-system 0.7.0 → 0.8.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 CHANGED
@@ -14,7 +14,7 @@ Plain imperatives are the default. The few hard prohibitions below use `never`/`
14
14
  - Preserve approved `DESIGN.md` token and component families unless the user explicitly approves a palette/component migration. Website/kernel CSS is implementation evidence, not the complete palette authority; never delete tokens because current prototypes do not use them or because `@google/design.md lint` reports them as unused.
15
15
  - Name implemented grids, components, modules, and page elements as NadicodeAI-owned primitives; source brands such as Vercel or Attio may appear only in reference notes, never in component names, CSS comments, `data-module` values, or public-facing contracts.
16
16
  - Calculate page grids, module spans, seams, borders, and element placement from explicit grid math; never hand-place visual structure by eye.
17
- - Author CSS-bundle work as a reusable design-system component architecture first, not as showcase/page-specific code. The design-system CSS lives in `src/css/` (`tokens.generated` [built from `DESIGN.md`] + `tokens.local` [hand-authored] / `reset`/`foundation`/`motion`/`layout`/`primitives` + `components/*`, mirrored to `dist/css/` and exported as `@nadicodeai/design-system/css`). Since the Tailwind+shadcn migration (ADR 0007) the bundle ships only framework-agnostic brand/display CSS components: the cascade is `@layer tokens, reset, foundation, motion, layout, primitives, components;` (no `sections` layer), and `components/*` holds the agent-chat CSS component family, the run-state `state-tag` family, the entity-status `status-tag` family, and `image` — the generic marketing/SaaS component CSS and the whole `sections/*` layer retired to React shadcn components in `@nadicodeai/ui`. The delivery tiers map to real authoring homes: tokens → `tokens.generated`/`tokens.local`; page grammar → `layout.css`; CSS primitives/components → `primitives.css` + `components/*`; specimens → `examples/`. Contracted CSS components are paired with `DESIGN.md components:` entries; the three named CSS-internal components are deliberate no-token exceptions. Pages, site-specific page assemblies, and the standard/interactive/section UI belong to consuming surfaces (`../website/`, `../portal/`, sibling Nadia apps) and to the React package (`@nadicodeai/ui`), not this package. Study current source HTML/CSS for approved external references before implementing similar NadicodeAI primitives, then adapt the structure into NadicodeAI-owned tokens, primitives, and components. Specimen HTML demonstrates only already-defined primitives/components; it never invents component geometry, seams, borders, fillers, heights, or responsive behavior inline. The generated token layer (`tokens.generated.css`) and the Tailwind adapter (`nadicode.theme.css`) are emitted by Style Dictionary (`scripts/sd/`, driven from `scripts/build.ts`) as a complete projection of the `@google/design.md` export — never an allowlist or subset; responsive `@media` switching and composed/`calc` vars live in `layout.css`/`tokens.local.css` and reference emitted `--nc-*` tokens only, while the `.nc-type-*` utility classes live in `foundation.css`. Emitted-but-unreferenced tokens are intentional (the contract drives emission, not consumption), and the generated Tailwind adapter owns standard shadcn role maps for both `:root` and `.dark` using generated `--color-*`/`--radius-*` references, plus a small set of `--nc-*` remaps in the `.dark` block (the `state-*`, `selection-*`, and `cross` families → their `--nc-dark-*` counterparts) so design-system CSS components that read those raw brand tokens directly flip on the dark console; `@nadicodeai/ui/globals.css` keeps the Tailwind role bridge plus UI-local product aliases. Correctness is enforced by export-derived structural parity (`tests/guards/token-structural-parity.test.ts` for the `--nc-*` layer; the per-token `@theme` value loops and light/dark role-integrity checks in `tests/guards/tailwind-v4-theme.test.ts` for the adapter), the narrowed two-way parity between `DESIGN.md` component YAML/prose and the retained CSS component surface (`tests/guards/components-yaml-matches-css.test.ts`, ADR 0007 D4), plus consumer discipline (`tests/guards/consumer-css-discipline.test.ts`), not a byte snapshot (ADR 0006 supersedes ADR 0005 D1–D3/D5; ADR 0008 supersedes ADR 0005 D4).
17
+ - Author CSS-bundle work as a reusable design-system component architecture first, not as showcase/page-specific code. The design-system CSS lives in `src/css/` (`tokens.generated` [built from `DESIGN.md`] + `tokens.local` [hand-authored] / `reset`/`foundation`/`motion`/`layout`/`primitives` + `components/*`, mirrored to `dist/css/` and exported as `@nadicodeai/design-system/css`). Since the Tailwind+shadcn migration (ADR 0007) the bundle ships only framework-agnostic brand/display CSS components: the cascade is `@layer tokens, reset, foundation, motion, layout, primitives, components;` (no `sections` layer), and `components/*` holds the agent-chat CSS component family, the run-state `state-tag` family, the entity-status `status-tag` family, and `image` — the generic marketing/SaaS component CSS and the whole `sections/*` layer retired to React shadcn components in `@nadicodeai/ui`. The delivery tiers map to real authoring homes: tokens → `tokens.generated`/`tokens.local`; page grammar → `layout.css`; CSS primitives/components → `primitives.css` + `components/*`; specimens → `examples/`. Contracted CSS components are paired with `DESIGN.md components:` entries; the three named CSS-internal components are deliberate no-token exceptions. Pages, site-specific page assemblies, and the standard/interactive/section UI belong to consuming surfaces (`../website/`, `../portal/`, sibling Nadia apps) and to the React package (`@nadicodeai/ui`), not this package. Study current source HTML/CSS for approved external references before implementing similar NadicodeAI primitives, then adapt the structure into NadicodeAI-owned tokens, primitives, and components. Specimen HTML demonstrates only already-defined primitives/components; it never invents component geometry, seams, borders, fillers, heights, or responsive behavior inline. The generated token layer (`tokens.generated.css`) and the Tailwind adapter (`nadicode.theme.css`) are emitted by Style Dictionary (`scripts/sd/`, driven from `scripts/build.ts`) as a complete projection of the `@google/design.md` export — never an allowlist or subset; responsive `@media` switching and composed/`calc` vars live in `layout.css`/`tokens.local.css` and reference emitted `--nc-*` tokens only, while the `.nc-type-*` utility classes live in `foundation.css`. Emitted-but-unreferenced tokens are intentional (the contract drives emission, not consumption), and the generated Tailwind adapter owns standard shadcn role maps for both `:root` and `.dark` using generated `--color-*`/`--radius-*` references, plus a set of `--nc-*` remaps in the `:root.dark` block (the surface palette — `canvas*`, `ink`, `body`, `muted`, `line`, `warning-soft`/`-deep` — and the `state-*`, `selection-*`, `cross`, and chart families → their `--nc-dark-*` counterparts) so design-system CSS components that read those raw brand tokens directly flip on the dark console; `@nadicodeai/ui/globals.css` keeps the Tailwind role bridge plus UI-local product aliases. Correctness is enforced by export-derived structural parity (`tests/guards/token-structural-parity.test.ts` for the `--nc-*` layer; the per-token `@theme` value loops and light/dark role-integrity checks in `tests/guards/tailwind-v4-theme.test.ts` for the adapter), the narrowed two-way parity between `DESIGN.md` component YAML/prose and the retained CSS component surface (`tests/guards/components-yaml-matches-css.test.ts`, ADR 0007 D4), plus consumer discipline (`tests/guards/consumer-css-discipline.test.ts`), not a byte snapshot (ADR 0006 supersedes ADR 0005 D1–D3/D5; ADR 0008 supersedes ADR 0005 D4).
18
18
  - Follow a source-first reference workflow for external visual references: inspect live/source DOM, stylesheet/CSSOM rules, inline styles, custom properties, computed styles, grid tracks, spans, seam ownership, colors, heights, and breakpoints before writing NadicodeAI code. Screenshots are verification evidence only after implementation; never use them as the source for authoring structure, geometry, or CSS.
19
19
  - Never derive reusable kernel geometry from screenshots, eyeballing, one-off browser coordinates, or local patch experiments. Browser measurements may verify an implementation after the source CSS/DOM model is understood, but they do not replace reading the source rules that create the behavior.
20
20
  - Map every imported visual behavior to either `DESIGN.md`, an existing kernel token/primitive, or an explicit user-approved change before implementation. If the reference leaves a required decision open, or if `DESIGN.md` does not decide it, ask before coding the missing decision, including height/row span, surface color, visual payload, content slots, crosshair placement, and responsive behavior.
@@ -56,8 +56,10 @@
56
56
  margin-top: 2px;
57
57
  }
58
58
 
59
- /* Approve / Edit affordance. Approve is the ink primary; Edit is the canvas
60
- secondary. Shape and color reuse the existing chrome button vocabulary. */
59
+ /* Choice affordances. The unmarked button is the ink primary (approve / run);
60
+ `secondary` is the canvas neutral, `outline` a lighter panel-transparent
61
+ neutral, and `destructive` carries the error affordance for a deny/reject.
62
+ Shape and color reuse the existing chrome button vocabulary. */
61
63
  .nc-approval-gate-actions button {
62
64
  padding: 5px 10px;
63
65
  border: var(--nc-guide) solid var(--nc-ink);
@@ -77,6 +79,27 @@
77
79
  color: var(--nc-ink);
78
80
  }
79
81
 
82
+ .nc-approval-gate-actions button[data-variant="outline"] {
83
+ border-color: var(--nc-line);
84
+ background: transparent;
85
+ color: var(--nc-ink);
86
+ }
87
+
88
+ /* Destructive deny/reject: an error-outlined chip so the panel keeps a single
89
+ filled primary while the reject reads as destructive, not neutral. Error is
90
+ not part of the global :root.dark --nc-* remap, so its dark counterpart is
91
+ flipped here (the state-tag pattern); canvas flips globally. */
92
+ .nc-approval-gate-actions button[data-variant="destructive"] {
93
+ border-color: var(--nc-error);
94
+ background: var(--nc-canvas);
95
+ color: var(--nc-error-deep);
96
+ }
97
+
98
+ .dark .nc-approval-gate-actions button[data-variant="destructive"] {
99
+ border-color: var(--nc-dark-error);
100
+ color: var(--nc-dark-error-deep);
101
+ }
102
+
80
103
  /* Leading affordance marks — Lucide check (Approve) and square-pen (Edit),
81
104
  painted via CSS mask with currentColor so each tracks its button's text
82
105
  color (canvas on the ink primary, ink on the canvas secondary). */
@@ -97,6 +120,25 @@
97
120
  mask-image: url("../../icons/square-pen.svg");
98
121
  }
99
122
 
123
+ /* Per-choice leading marks for the React multi-choice gate. Keyed on the
124
+ semantic choice, not the variant, so they override the variant defaults
125
+ above (equal specificity, later in source) while the two-button HTML
126
+ Approve/Edit specimens keep check/square-pen. */
127
+ .nc-approval-gate-actions button[data-approval-choice="deny"]::before {
128
+ -webkit-mask-image: url("../../icons/ban.svg");
129
+ mask-image: url("../../icons/ban.svg");
130
+ }
131
+
132
+ .nc-approval-gate-actions button[data-approval-choice="session"]::before {
133
+ -webkit-mask-image: url("../../icons/clock.svg");
134
+ mask-image: url("../../icons/clock.svg");
135
+ }
136
+
137
+ .nc-approval-gate-actions button[data-approval-choice="always"]::before {
138
+ -webkit-mask-image: url("../../icons/shield.svg");
139
+ mask-image: url("../../icons/shield.svg");
140
+ }
141
+
100
142
  .nc-approval-gate-actions button:focus-visible {
101
143
  outline: var(--nc-focus-ring-width) solid var(--nc-focus-ring);
102
144
  outline-offset: 0;
@@ -110,6 +110,18 @@
110
110
  --nc-chart-div-warm: var(--nc-dark-chart-div-warm);
111
111
  --nc-chart-div-mid: var(--nc-dark-chart-div-mid);
112
112
  --nc-chart-div-cool: var(--nc-dark-chart-div-cool);
113
+ --nc-canvas: var(--nc-dark-canvas);
114
+ --nc-canvas-soft: var(--nc-dark-canvas-soft);
115
+ --nc-canvas-soft-2: var(--nc-dark-canvas-soft-2);
116
+ --nc-ink: var(--nc-dark-ink);
117
+ --nc-body: var(--nc-dark-body);
118
+ --nc-muted: var(--nc-dark-muted);
119
+ --nc-line: var(--nc-dark-line);
120
+ --nc-warning-soft: var(--nc-dark-warning-soft);
121
+ --nc-warning-deep: var(--nc-dark-warning-deep);
122
+ --nc-link: var(--nc-dark-link);
123
+ --nc-link-deep: var(--nc-dark-link-deep);
124
+ --nc-link-bg-soft: var(--nc-dark-link-bg-soft);
113
125
  }
114
126
 
115
127
  :root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/design-system",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"