SmoUI

Registry

归属和沉淀规则

Registry 只登记已经确认的可分发资产。当前保留 ModuleCard 和规则文档; Create、Playground、Charts 等内部页面不会默认作为 registry item。

items

2

blocks

0

files

1

json

3

Registry items

名称类型文件输出
smo-module-cardregistry:component1public/r/smo-module-card.json
smo-ui-generation-rulesregistry:file1public/r/smo-ui-generation-rules.json

文件归属

路径归属用途
components/ui/*shadcn 源码组件由 shadcn/ui CLI 进入仓库,作为可审查、可版本化的 Web 组件底座。
components/smo/component-catalog/*组件文档组件一览、详情、示例、API 和 SmoUI 使用规则。
components/smo/create/*创建工作台preset、theme 预览,用于对齐 shadcn Create 的调参体验;不默认作为可分发资产。
registry.json -> public/r代码分发用 shadcn build 生成可被 CLI 消费的已确认 components、rules 等 JSON。
components/smo/constants.ts产品数据产品边界、页面场景模板定义、token 和验证命令。
components/smo/site/*站点壳层全站导航、搜索、侧栏和文档阅读体验。
app/**/page.tsx路由组合仅导入页面组件并返回,不堆业务细节。

常用命令

终端命令
npx shadcn@latest init
npx shadcn@latest add https://smoui.xiaomolian.com/r/smo-module-card.json
npx shadcn@latest add @smo/smo-module-card
npx shadcn@latest view @smo/smo-module-card
npx shadcn@latest build --output ./public/r
npm.cmd run lint
npm.cmd run typecheck
npm.cmd run build
components.json 摘要
{
  "style": "base-nova",
  "rsc": true,
  "tsx": true,
  "registries": {
    "@smo": "./public/r/{name}.json"
  },
  "aliases": {
    "ui": "@/components/ui",
    "components": "@/components",
    "smo": "@/components/smo",
    "utils": "@/lib/utils"
  }
}