@trading-game/design-intelligence-layer 0.16.1 → 0.16.2
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 +21 -0
- package/dist/index.cjs +935 -780
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +906 -752
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -61,6 +61,27 @@ cp node_modules/@trading-game/design-intelligence-layer/guides/rules/design-syst
|
|
|
61
61
|
|
|
62
62
|
---
|
|
63
63
|
|
|
64
|
+
## Step 4 — New-component release checklist (MANDATORY)
|
|
65
|
+
|
|
66
|
+
Every time you add a new component (UI primitive or Block) to this package, **all** of the following must land in the same PR. Skipping any one of these has shipped broken releases before — npm consumers got a version where the component existed in the demo but couldn't be imported. Do not skip a step.
|
|
67
|
+
|
|
68
|
+
1. **Source file** — `components/ui/<name>.tsx` (or `components/blocks/<name>-block.tsx`)
|
|
69
|
+
2. **Public export** — add the matching `export * from "../components/<…>/<name>"` line to `src/index.ts`. **This is what gates whether npm consumers receive the component at all.** The demo at `app/page.tsx` imports via the `@/components/...` alias and will work without this — but the published package will not ship the component until this line exists.
|
|
70
|
+
3. **Auto-generated registry** — run `npm run generate:registry` so `app/component-registry.generated.ts` picks the new file up.
|
|
71
|
+
4. **Demo entry** — add a sidebar entry in the `componentNames` list in `app/page.tsx`, and a `case "<Name>":` block in the `SectionContent` switch that renders representative variants.
|
|
72
|
+
5. **README** — add a row in the "Available components" table and a per-component section explaining variants / slots / behaviour.
|
|
73
|
+
6. **Design system guide** (`guides/design-system-guide/trading-game-ds-guide.md`) — add a row in the §8 component list table and a styling-notes entry covering tokens used, edge cases, and `aria` posture.
|
|
74
|
+
7. **Build verification** — run `npm run build` and confirm the component name appears in `dist/index.js` and `dist/index.d.ts` before tagging a release:
|
|
75
|
+
```bash
|
|
76
|
+
npm run build
|
|
77
|
+
grep -c "<ComponentName>" dist/index.js dist/index.d.ts # both > 0
|
|
78
|
+
```
|
|
79
|
+
8. **Version + publish** — only after every step above is checked in, bump `package.json`, commit, push, tag `v<version>`, and let the workflow publish.
|
|
80
|
+
|
|
81
|
+
If any of these are missing at the time of release, the published package is broken — fix and re-release before moving on.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
64
85
|
## Reference
|
|
65
86
|
|
|
66
87
|
- Full token + component reference: `node_modules/@trading-game/design-intelligence-layer/README.md`
|