@mano8/astro-ui-m8
v1.3.1
Published
Canonical shared shadcn UI registry, design-token bridge, generic list-params, and test harness for the M8 astro-*-m8 plugin fleet.
Maintainers
Readme
@mano8/astro-ui-m8
Canonical shared UI foundation for the M8 astro-*-m8 plugin fleet. It is not
a business plugin and not an Astro integration — it registers no routes,
injects no integration, and fronts no backend service.
It owns:
- the canonical shadcn registry —
data-tableand its parts,statecomponents (loading/empty/error/unauthorized), and thedialog-form/table-pagerecipes; - the design-token bridge (
src/lib/tokens.css); - generic list-params helpers (
src/lib/list-params.ts); - the shared test harness (
@mano8/astro-ui-m8/testing).
Delivery model — registry-copy first
Shared UI is consumed via shadcn add against
./node_modules/@mano8/astro-ui-m8/registry/r/{name}.json; the files are
copied into the consumer app. This package is a build/registry source, not a
runtime import of those components. Runtime exports (., ./testing) are
minimal by design.
Business plugins list @mano8/astro-ui-m8 in dependencies (not
devDependencies) and declare their registryDependencies on its registry items.
Prerequisite runtime packages for copied blocks are declared as
peerDependencies and documented in registry/README.md.
Frozen Phase 1 contract
Phase 1 Step 2 freezes the shared naming and host import assumptions before any consumer depends on the generated registry output.
Frozen registry item names:
data-tabledata-table-column-headerdata-table-paginationdata-table-view-optionsdata-table-server-toolbardata-table-server-faceted-filtertoast-notificationstate-loadingstate-emptystate-errorstate-unauthorizeddialog-formtable-page
Host alias/import contract for copied registry blocks:
- shadcn primitives resolve from
@/components/ui/* - utility helpers resolve from
@/lib/utils - hosts import the canonical token bridge from
@mano8/astro-ui-m8/src/lib/tokens.css
These names are frozen. As of 1.0.0 the package follows strict semver:
breaking changes to registry item names, copied-file structure, or required host
aliases are major-version changes.
Commands
npm run build—tsc→dist/, thenbuild:registry.npm run build:registry— generateregistry/r/*.jsonfromregistry.json.npm run typecheck—tsc --noEmit.npm test— Vitest with coverage.npm run test:unit— Vitest without coverage.
Status: stable (
1.0.0). Registry blocks, recipes, token bridge, list-params, and the test harness are in place and follow strict semver.
