Registry

归属和沉淀规则

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

items

5

blocks

0

files

1

json

6

Registry items

名称类型文件输出
smo-ui-generation-rulesregistry:file1public/r/smo-ui-generation-rules.json
smo-miniprogram-half-screen-dialogregistry:component2public/r/smo-miniprogram-half-screen-dialog.json
smo-miniprogram-partner-operation-slotregistry:component2public/r/smo-miniprogram-partner-operation-slot.json
smo-miniprogram-benefit-passregistry:component2public/r/smo-miniprogram-benefit-pass.json
smo-miniprogram-bottom-navregistry:component2public/r/smo-miniprogram-bottom-nav.json

文件归属

路径归属用途
components/ui/*shadcn 源码组件由 shadcn/ui CLI 进入仓库,作为可审查、可版本化的 Web 组件底座。
components/smo/component-catalog/*组件文档组件一览、详情、示例、API 和 SmoUI 使用规则。
components/smo/create/*创建工作台preset、theme 调参和已确认 registry 资产预览;未沉淀内容不进入画布。
registry.json -> public/r代码分发用 shadcn build 生成可被 CLI 消费的已确认 components、rules 等 JSON。
components/smo/constants.ts产品数据产品边界、页面场景模板定义、token 和验证命令。
components/smo/site/*站点壳层全站导航、搜索、侧栏和文档阅读体验。
app/**/page.tsx路由组合仅导入页面组件并返回,不堆业务细节。
public/assets/regional-partner-visuals 和 public/assets/smofan-bottom-nav-icons/*SmoFan 视觉资产承载 SmoFan 头部视觉、底部导航图标、托底 PNG、Manifest 和规范文档;组件 registry 只分发结构源码,PNG 资产按包复制。

常用命令

终端命令
npx shadcn@latest init
npx shadcn@latest add https://smoui.xiaomolian.com/r/smo-ui-generation-rules.json
npx shadcn@latest add @smo/smo-ui-generation-rules
npx shadcn@latest view @smo/smo-ui-generation-rules
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"
  }
}