Conversation
- Remove all future-state sections (TokenDictionary, Barrel) from consumer docs - Simplify maturity note to reflect current production-ready APIs - Align Storybook and markdown documentation for consistency - Remove legacy .d.mts migration section from Storybook guide - Focus docs on theme-scoped module imports currently available
- remove legacy cdr-tokens.d.mts generation and exports - make /types and /docsite/types type-only entrypoints - generate and validate NodeNext-compatible barrel declarations - align ADR, consumer docs, and Storybook guidance for type vs runtime imports
There was a problem hiding this comment.
Pull request overview
This PR formalizes a stable, theme-scoped TypeScript “barrel import” contract for token consumers by generating /types entrypoints, updating package exports accordingly, and removing the legacy monolithic cdr-tokens.d.mts declaration output.
Changes:
- Add a Style Dictionary action to generate
dist/<theme>/types/index.d.ts(+index.mjs) barrels and run it as part of thetypesplatform build. - Update
package.jsonexports to introduce./typesand./docsite/types, and remove legacycdr-tokens.d.mtsoutputs/validation entries. - Add consumer-facing documentation + Storybook guide describing the new TypeScript contract and migration direction.
Reviewed changes
Copilot reviewed 10 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| validate-structure.json | Updates expected dist structure: removes legacy .d.mts and adds new /types/index.* barrels. |
| style-dictionary/configs/types.ts | Runs the new generate-types-barrel action for the types platform. |
| style-dictionary/configs/js.ts | Stops generating the legacy root cdr-tokens.d.mts declaration file. |
| style-dictionary/build.ts | Registers the new generate-types-barrel Style Dictionary action. |
| style-dictionary/actions/generate-types-barrel.ts | Implements generation of index.d.ts/index.mjs barrels by globbing built outputs. |
| package.json | Adds ./types and ./docsite/types export entrypoints; removes root/runtime types wiring. |
| docs/CONSUMER_TYPESCRIPT_CONTRACT.md | Adds canonical docs describing the supported TypeScript consumer API surface. |
| stories/ConsumerTypeScriptContract.stories.ts | Adds Storybook page documenting the consumer TypeScript contract with examples. |
| adr/0002-typescript-pipeline-and-consumer-types.md | Adds ADR capturing the architecture, public API, and deprecation direction. |
| README.md | Links the new consumer contract doc + ADR. |
| dist/rei-dot-com/types/index.d.ts / index.mjs | Adds generated rei-dot-com type barrels. |
| dist/docsite/types/index.d.ts / index.mjs | Adds generated docsite type barrels. |
| dist/*/js/cdr-tokens.d.mts | Removes legacy monolithic TS declaration outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- generate cdr-tokens.d.ts for rei-dot-com and docsite runtime bundles - wire exports['.'] and exports['./docsite'] types metadata - restore top-level package types field for runtime consumers - refresh validate-structure snapshot for new declaration outputs
- add ticket draft for .d.mts declaration migration work - link follow-up ticket from ADR 0002 future direction - link follow-up ticket from Storybook consumer contract guide
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 26 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 20 out of 26 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.