Repository navigation
UI Packs
A pack is a reusable visual system (foundation tokens, components, patterns, presets) consumed by prototype generation. Official packs are prototype visual simulations, not production component libraries.
Official packs (registry.json)
| id | Description | version | schema | components / patterns / presets |
|---|---|---|---|---|
admin-desktop |
Desktop admin: forms, tables, navigation, dashboard charts | 7 | 2 | 51 / 3 / 2 |
mobile-vant |
Phone-width Vant-style H5 | 3 | 2 | 21 / 3 / 2 |
Providers for both: action, navigation, form, data, feedback. Both include the same ECharts set (Chart Plugin). Registry defaultRef is pinned to v0.5.3.
-
--pack-root=andHTML_PROTOTYPE_PACK_ROOT(path-delimiter separated) -
.html-prototype/packs/in the working directory and every parent ~/.html-prototype/packs/
Project packs win over the user cache. Use namespaced ids (e.g. mycompany-admin) for your own packs.
Install (install-pack.mjs)
- Registry:
--registry=→HTML_PROTOTYPE_PACK_REGISTRY→ GitHub rawregistry.json; on failure falls back to bundledui/pack-registry.fallback.json. - Download: GitHub codeload tarball for the entry's
ref(override base withHTML_PROTOTYPE_PACK_SOURCE, or--ref=). Tar is parsed in pure Node. -
--from-local=<dir>installs a local pack; a target containing a local-origin pack is protected unless--force(exit 3,install-blocked). - Agent protocol:
--list-remote, present options, wait for the user to choose, never invent a kit when no pack is available. pack-install.md.
Resolve (resolve-pack.mjs)
--list returns installed packs ({ "packs": [] }, exit 0 when empty). --pack=<id> --select=<ids> returns the minimal file closure plus deliver[]; optional dependencies only via --optional=. Missing pack → exit 2 with remediation; unsupported schemaVersion → exit 4.
Consumer rules: ui/catalog.md, ui/contract.md. Authoring: Pack Authoring.
Getting started
Concepts
Authoring
UI packs
Reference