Problem
@cratis/components is a framework library, so exported TypeScript is product surface. Components 4 documents the changed foundation APIs, stable parts/tokens, migration aliases, Canvas core, and command-field part types, but a static export audit still finds older exported declarations with missing TSDoc—especially PivotViewer internals, Filter helpers, notification dispatch types, lower-level Canvas chat/emoji/mention helpers, schema types, and TimeMachine types.
Missing source documentation makes editor IntelliSense incomplete and blurs whether a symbol is a supported contract or an implementation detail accidentally re-exported by a broad barrel.
Direction
Do not add prose indiscriminately to implementation internals. First decide whether each symbol should remain public:
- Build the actual export graph from every
Source/package.json subpath and barrel.
- Remove/narrow accidental exports in a semver-appropriate release.
- Add concise TSDoc to every intentional exported declaration and every public member/property.
- Include defaults, units, controlled/uncontrolled behavior, callback timing, precedence, accessibility expectations, token/part stability, and deprecated/no-op compatibility semantics where relevant.
- Generate or validate API reference output from declarations so documentation cannot silently regress.
Acceptance criteria
- Every intentional exported interface, type, enum, function, class, component, and constant has TSDoc.
- Every property/method of an exported interface/class has a useful description.
- Public component props document defaults and state ownership.
- Exported part types identify the rendered semantic element for each key.
- Deprecated/compatibility members carry
@deprecated and migration guidance.
- The gate follows package subpaths/barrels rather than scanning all source exports (internal files may export locally without becoming package API).
- A CI check fails when an intentional public declaration/member loses documentation.
- The published Components reference links generated API material from each component page where useful.
Initial audit groups
PivotViewer/** engine/hooks/utils and component props
Filter/** state and histogram helper types
Notifications/toast.ts dispatch/options/record types
- lower-level
Canvas/shapes/ChatBubble/** avatar/emoji/mention/helper contracts
types/JsonSchema.ts, types/TypeFormat.ts
- TimeMachine data types and remaining helper components
This is follow-up documentation debt, not a reason to expose React Aria or other implementation-library types. Public contracts remain Cratis-owned.
Problem
@cratis/componentsis a framework library, so exported TypeScript is product surface. Components 4 documents the changed foundation APIs, stable parts/tokens, migration aliases, Canvas core, and command-field part types, but a static export audit still finds older exported declarations with missing TSDoc—especially PivotViewer internals, Filter helpers, notification dispatch types, lower-level Canvas chat/emoji/mention helpers, schema types, and TimeMachine types.Missing source documentation makes editor IntelliSense incomplete and blurs whether a symbol is a supported contract or an implementation detail accidentally re-exported by a broad barrel.
Direction
Do not add prose indiscriminately to implementation internals. First decide whether each symbol should remain public:
Source/package.jsonsubpath and barrel.Acceptance criteria
@deprecatedand migration guidance.Initial audit groups
PivotViewer/**engine/hooks/utils and component propsFilter/**state and histogram helper typesNotifications/toast.tsdispatch/options/record typesCanvas/shapes/ChatBubble/**avatar/emoji/mention/helper contractstypes/JsonSchema.ts,types/TypeFormat.tsThis is follow-up documentation debt, not a reason to expose React Aria or other implementation-library types. Public contracts remain Cratis-owned.