Docs/API Sync Workflow
The component API source of truth is each package's maintained src/declarative/components/*.html
definition and adjacent controller. The API generator reads prop types and defaults, native roots,
property-only structured inputs, methods, events, slots, dependencies, and component CSS directly
from those files. It reads only the intro line from each component MDX page for a human-readable
description. Legacy classes and source decorators are not API inputs, and no migration converter
runs during normal development.
Commands
pnpm generate:apiregeneratesgenerated/component-api.jsonfor the docs and Storybook consumers.pnpm check:docs-syncfails if that generated public API output is stale.pnpm generate:docscurrently aliases API generation for docs consumers.pnpm --filter @threadlabs/looma-declarative-build registryrefreshes the shipping registries without rewriting component definitions or framework adapters.
Consumers
- Docusaurus API tabs render from
generated/component-api.jsonthrough reusable MDX components inapps/docs/src/components. - Storybook stories use
createComponentArgTypes()andcreateComponentDocsParameters()fromapps/storybook/stories/shared/componentApi.ts.
Updating Component APIs
- Update the package-owned declarative definition and controller directly.
- Regenerate metadata with
pnpm generate:api. - Run
pnpm check:docs-syncand commit generated output.
Vue adapters are regenerated only at an explicit release checkpoint after the declarative API has settled.