@hirobius/design-system 0.13.0 β†’ 0.13.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/NOTICE.md ADDED
@@ -0,0 +1,9 @@
1
+ # License notice
2
+
3
+ `@hirobius/design-system` is not under a single license.
4
+
5
+ - **HDS code** (components, compiled JavaScript, types, CSS, and token files): MIT. See [LICENSE](LICENSE).
6
+ - **Satoshi** (weights 500 and 700, by Indian Type Foundry, distributed through [Fontshare](https://www.fontshare.com/fonts/satoshi)): ITF Free Font License.
7
+ - **Geist Mono** (weight 400, by Vercel, [source](https://github.com/vercel/geist-font)): SIL Open Font License 1.1.
8
+
9
+ Both fonts are embedded as base64 `@font-face` data in `dist/tokens.css` and `dist/styles.css`. The MIT license does not cover them; each font keeps its own license. `dist/variables.css` embeds no fonts.
package/README.md CHANGED
@@ -1,32 +1,27 @@
1
1
  # Hirobius Design System
2
2
 
3
- > ## 🧊 FROZEN β€” on the shelf (2026-07-09)
4
- >
5
- > **HDS is a complete, shelved package. Active development is paused.** It is not
6
- > being ditched β€” it's a finished, tested body of work kept in git to check out
7
- > later: 133 components (Radix + `cva`), 351 DTCG tokens, ~110 Storybook stories,
8
- > a full guardrail suite, and the published `@hirobius/design-system@0.13.0` on npm.
9
- >
10
- > **Why:** the design system was absorbing more maintenance (its highest-commit
11
- > month) than its two consumers justified β€” the marketing-site factory
12
- > (`hirobius/clients`) uses only its token spine (no React components), and the
13
- > only component consumer (the internal `hirobius/ops` dashboard) is dormant.
14
- >
15
- > **What "frozen" means:** no new development. `0.13.0` is the **final clean cut**
16
- > (it folds in the icon fix + the static-primitive CSS layer + the scroll recipe);
17
- > the release workflow was re-enabled just to ship it and may be re-frozen after.
18
- > Chromatic stays manual-only. The published package stays installable. All future
19
- > work is tracked in the wind-down epic **#80**.
20
- >
21
- > **To take it off the shelf:** restore the `pull_request`/`push` triggers in
22
- > `.github/workflows/{chromatic,release}.yml`, resume from `main`, and pick work
23
- > from #80.
24
- >
25
- > **One human step (credential-gated, not automatable):** optionally run `npm
26
- deprecate "@hirobius/design-system@<=0.12.0" "Frozen β€” see the repo README"` to
27
- > flag the package as paused for npm browsers. It does not break installs.
3
+ A publishable React + TypeScript component library backed by a governed design-token pipeline, published to npm as `@hirobius/design-system`.
4
+
5
+ <!--
6
+ PLACEHOLDER β€” ADRIAN TO WRITE (hds front-door PR).
7
+ If you want the README to mention the July–September 2026 pause, put one or
8
+ two sentences here in your own words, then delete this comment. Leaving the
9
+ comment in place publishes nothing. Do not restore the old status line this
10
+ PR removed: CI, release, and Chromatic triggers were restored in #204.
11
+ -->
28
12
 
29
- A publishable React + TypeScript component library, backed by a governed design-token pipeline, a documentation site, and an automated verification suite β€” all in one repository.
13
+ <!-- auto:start:front-door-counts -->
14
+
15
+ - **108** public component modules, exported from `src/index.ts`
16
+ - **362** DTCG tokens in `hirobius.tokens.json`, compiled to CSS variables and TypeScript constants
17
+ - **442** Storybook stories in **112** story files, reviewed visually in Chromatic
18
+
19
+ <!-- auto:end:front-door-counts -->
20
+
21
+ - Theming through four root attributes and CSS variables (theme, density, brand, font) that need no JavaScript
22
+ - Deterministic gates in git hooks and CI: typecheck, zero-warning ESLint, token validity and contrast, Vitest unit and contract tests, bundle budgets, a consumer smoke build, and a Storybook build
23
+
24
+ The counts are generated from source by `pnpm readme:counts`, which `pnpm tokens` also runs. `scripts/__tests__/front-door.test.mjs` fails if this README claims more than the source has.
30
25
 
31
26
  ## Using the published package
32
27
 
@@ -104,27 +99,43 @@ import { HdsThemeProvider } from '@hirobius/design-system';
104
99
  </HdsThemeProvider>;
105
100
  ```
106
101
 
102
+ ## Figma ↔ code
103
+
104
+ Code is the source of truth, and sync runs one way, from code to Figma. What exists today:
105
+
106
+ - **Tokens β†’ Figma model:** `pnpm figma:model` projects `hirobius.tokens.json` into `figma/model.json` β€” the Primitives, Semantic (Light/Dark), Component, Role, Brand and Density collections, plus text and effect styles. Light and Dark keep their own values.
107
+ - **Model β†’ Figma file:** `pnpm figma:push` writes the upsert scripts that apply that model to a Figma file, and `pnpm figma:native-import` writes DTCG files for Figma's own Variables β–Έ Import. Both are run by hand β€” no workflow pushes to Figma. The runbook is [`figma/README.md`](figma/README.md).
108
+ - **Figma β†’ repo:** `pnpm figma:snapshot --ingest` records the file's state in `figma/snapshot.json`, and `pnpm check:figma-drift` compares the model against that committed snapshot. A hand edit in Figma is drift, not a source change.
109
+ - **Legacy export:** `pnpm figma-variables` still writes the older plugin and REST export files, now projected from the same model.
110
+ - **Components β†’ Code Connect:** the v2 templates live in the repo, but no Code Connect mapping is published, so Dev Mode shows no snippets. Publishing Code Connect needs a Figma Organization plan.
111
+
112
+ What each Figma plan allows, and the Pro-plan architecture this follows, are in [ADR-025](docs/adr/025-figma-sync-pro-architecture.md).
113
+
107
114
  ## Developing this repo
108
115
 
109
116
  ```bash
110
117
  pnpm install
111
- pnpm dev
118
+ # Generated data files are gitignored; create them once (the same step CI runs):
119
+ node scripts/generate-manifest.mjs && node scripts/generate-component-api.mjs && node scripts/enrich-manifest.mjs && node scripts/sync-icons.mjs && node scripts/audit-tokens.mjs --full
120
+ pnpm storybook # component workbench on http://localhost:6006
112
121
  ```
113
122
 
114
123
  Core verification commands:
115
124
 
116
125
  ```bash
117
126
  pnpm typecheck
118
- pnpm run heal
119
- pnpm test:layout
127
+ pnpm lint
128
+ pnpm exec vitest run # unit + contract tests, as the pre-push hook and CI run them
129
+ pnpm tokens:verify
120
130
  pnpm check:size
131
+ pnpm build-storybook
121
132
  ```
122
133
 
123
134
  ## Architecture
124
135
 
125
136
  HDS is built around three structural rules:
126
137
 
127
- - **Strict semantics** β€” public surfaces prefer system primitives such as `HdsStack`, `HdsGrid`, `HdsSurface`, `HdsTextLockup`, `DocLayout`, and `CaseStudyLayout` instead of raw layout divs or ad hoc CSS.
138
+ - **Strict semantics** β€” public surfaces prefer system primitives such as `Stack`, `Grid`, `Surface`, and `TextLockup` instead of raw layout divs or ad hoc CSS.
128
139
  - **Polymorphism** β€” primitives preserve semantic HTML while staying composable through governed APIs such as `forwardRef`, `as`, and layout slots.
129
140
  - **12-column grid** β€” page structure follows a consistent editorial grid: readable center columns, intentional breakout zones, and explicit `gap` ownership rather than one-off spacing math.
130
141
 
@@ -136,6 +147,20 @@ Source-of-truth files:
136
147
  - `DESIGN.md` β€” lean visual spec for agents and engineers.
137
148
  - `DESIGN-HANDOFF.md` β€” verbose visual mirror for handoff and review.
138
149
 
150
+ <!-- design-links:start (generated by `pnpm figma:links`; edit the @figma JSDoc tag, not this section) -->
151
+
152
+ ## Design ↔ Code links
153
+
154
+ Each component has one Figma source: `figmaUrl` in `public/hds-manifest.json`, which `pnpm manifest:generate` sets from the `@figma` tag in the component JSDoc. `pnpm figma:links` keeps this table current and Storybook reads the same field (`parameters.design`). The Figma-side links (dev resources and component descriptions) exist only once someone runs their steps in [`figma/README.md`](figma/README.md).
155
+
156
+ **1 of 120** components link a Figma node.
157
+
158
+ | Component | Figma node | Story | Source |
159
+ | --------- | ------------------------------------------------------------------------------------------------ | -------------------------------------------------- | ----------------------------------------- |
160
+ | `Alert` | [33:34](https://www.figma.com/design/c8MaVgwxOlxm4wr8wnH0Z4/HDS-Tokens-Components?node-id=33-34) | [alert.stories.tsx](src/stories/alert.stories.tsx) | [alert.tsx](src/app/components/alert.tsx) |
161
+
162
+ <!-- design-links:end -->
163
+
139
164
  ## Visual direction: Editorial Enterprise
140
165
 
141
166
  The governing direction is "Editorial Enterprise" β€” enterprise rigor with editorial pacing. It favors sharp hierarchy, open whitespace, monochrome neutrals, and a single electric-blue accent. In practice:
@@ -147,26 +172,20 @@ The governing direction is "Editorial Enterprise" β€” enterprise rigor with edit
147
172
 
148
173
  ## Verification workflow
149
174
 
150
- Regression prevention is layered:
151
-
152
- - `CLAUDE.md` is the operating contract β€” agent execution protocol, UI guardrails, required validation steps, and the self-heal requirement before a task is considered done.
153
- - `scripts/self-heal.mjs` (`pnpm run heal`) runs the local static and smoke checks, captures failures, and gives a consistent path to fix type, layout, and runtime drift.
154
- - The Playwright suite covers accessibility, layout integrity, collision detection, responsiveness, and visual regression, so changes that break containment, overlap, or responsive behavior fail automatically.
175
+ The gates are deterministic and need no browser or live site:
155
176
 
156
- Typical loop:
177
+ - **pre-commit** (`.husky/pre-commit`): secrets scan, Prettier on staged files, typecheck, zero-warning ESLint, and token validity and contrast.
178
+ - **pre-push** (`.husky/pre-push`): Vitest unit and contract tests, then the consumer smoke build (library build, subpath resolution, publint, consumer typecheck).
179
+ - **CI** (`.github/workflows/ci.yml`): typecheck, zero-warning ESLint, token validity and contrast, Vitest, and the consumer smoke build, plus bundle budgets and a Storybook build.
180
+ - **Visual review:** Storybook is the visual verification surface, and Chromatic (`.github/workflows/chromatic.yml`) runs it on pull requests. The earlier browser test suite drove a docs site that no longer exists; it is archived in `tests-archive/`.
157
181
 
158
- 1. Change code within the token and component constraints.
159
- 2. Run `pnpm typecheck` and `pnpm run heal`.
160
- 3. Let Playwright catch runtime and visual regressions.
161
- 4. If self-healing fixes a regression, log the root cause and resolution.
162
- 5. Update the verification checklist and ship.
182
+ `CLAUDE.md` is the operating contract for agents working in this repo.
163
183
 
164
184
  ## Bundle and release hygiene
165
185
 
166
186
  - `pnpm check:size` builds the library bundle and runs `size-limit`.
167
- - `pnpm check:release` runs the full release gate (accessibility, responsive, collision, visual, and bundle-size checks).
168
187
 
169
- Releases are cut with [Changesets](https://github.com/changesets/changesets): a merged changeset opens a "Version Packages" PR, and merging that PR publishes the new version to public npm via `.github/workflows/release.yml`.
188
+ Releases are cut with [Changesets](https://github.com/changesets/changesets). A pull request that changes the published package adds a changeset (`pnpm changeset:add`). On a push to `main`, `.github/workflows/release.yml` opens or updates a "Version Packages" PR, and merging that PR publishes the new version to public npm.
170
189
 
171
190
  ## Repository shape
172
191
 
@@ -190,3 +209,7 @@ public/
190
209
  - `DESIGN-HANDOFF.md` β€” verbose visual mirror
191
210
  - `TOKEN_GOVERNANCE.md` β€” token system rules
192
211
  - `SYSTEMS_REGISTRY.md` β€” systems & guardrail registry
212
+
213
+ ## License
214
+
215
+ The HDS code is MIT ([LICENSE](LICENSE)). The package CSS also embeds the Satoshi and Geist Mono fonts, which keep their own licenses and are not covered by MIT. See [NOTICE.md](NOTICE.md).