@dotnaos/ui

中文文档
0.0.28发布于 2026/09/16MITTypeScriptES Module近 30 天下载 3773

Complete DotNaos UI bundle with primitives, layouts, editors, domain components, and review tooling.

此软件包已被标记为弃用

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

原始使用文档
文档目录3 节
  1. Packages
  2. Architecture rules
  3. Styling and previews

@dotnaos/ui

@dotnaos/ui is the complete public bundle for the DotNaos component system. Consumer-facing imports use slash-based subpaths:

import { Stack, Button } from "@dotnaos/ui/base";
import { ListDetailPageLayout } from "@dotnaos/ui/layout";
import { FileExplorer } from "@dotnaos/ui/file-tree";
import { GitClient } from "@dotnaos/ui/source-control";
import { Coverage, List, Navigation, Status, Tree } from "@dotnaos/ui/source-control/changes/review";
import { PdfViewer } from "@dotnaos/ui/pdf-viewer";

Internal workspace package names use npm-compatible hyphenated names such as @dotnaos/ui-base; those names are implementation details and do not define the public import style or the component-tree labels.

Packages

ui bundle
├── base                 generic primitives, controls, and surfaces
├── layout               panels, shells, and responsive page layouts
├── tree                 generic flat or nested tree behavior
├── file-tree            file navigation and actionable explorer
├── code                 editable and read-only code surfaces
├── markdown-editor      Markdown rendering and editing
├── chat                 backend-agnostic chat presentation
├── ai                   assistant controls and composed AI surfaces
├── source-control       changes, diffs, history, and complete Git client
├── canvas               drawing surface and editor
├── calendar             calendar parts and complete calendar
├── pdf-viewer           PDF render parts and complete viewer surfaces
├── settings             fields, groups, panels, and settings page
├── workspace-picker     workspace rows, tree, picker, dialog, and page
├── devtools             review and inspection tooling
├── web                  web runtime composition
└── native               native primitives and native-owned components

Every component domain is a real package under components/ui. git-client is part of source-control, and the former node-tree package is now the generic tree package. Primitives live directly in base; there is no separate primitives, shared, or adapter package.

Architecture rules

  • Feature packages depend on lower-level packages and never import from the @dotnaos/ui bundle.
  • Web components compose the theme-aware Container and semantic surfaces instead of repeating padding, radius, and background choices.
  • Native owns its renderer and shares only platform-neutral design tokens and deliberate contracts.
  • Public feature packages can export small rendering units, composed embedded experiences, and optional dialog or page surfaces.
  • A meaningful underscore-prefixed path is private and is never exported from its package.
  • Every exported React component has a colocated *.design.tsx definition.
  • Packages and folders organize source discovery only; runtime composition and Strict UI identity still come from JSX and typed Slots.

The authoritative architecture and refactor contract is ../../docs/ui-repository-refactor-plan.md.

Styling and previews

Web consumers import the complete shared stylesheet once. It contains the design foundation and the generated utilities used by all public components:

import "@dotnaos/ui/styles.css";

Design Space reads the real package and source folders from .designspace.ts; the library does not require its own development server just to be discovered or compiled.

版本与发布记录

@dotnaos/ui 共发布 21 个版本,首次发布于 2026/08/07;过去 12 个月发布了 21 个版本。

版本发布日期距今
0.0.28latest2026/09/161 个月前
0.0.272026/09/161 个月前
0.0.262026/09/062 个月前
0.0.252026/09/062 个月前
0.0.242026/09/052 个月前
0.0.232026/09/012 个月前

关于 @dotnaos/ui 的常见问题

@dotnaos/ui 是什么?

Complete DotNaos UI bundle with primitives, layouts, editors, domain components, and review tooling.注意:该包已被作者标记为弃用——Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

如何安装 @dotnaos/ui?

在项目目录运行 npm install @dotnaos/ui,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^18.0.0 || ^19.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@dotnaos/ui 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dotnaos/ui 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@dotnaos/ui 可以商用吗?

@dotnaos/ui 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dotnaos/ui 的下载量有多少?

根据 npm 官方下载统计,@dotnaos/ui 在 2026/10/13 – 2026/11/11 这 30 天内被下载 3,773 次,日均约 126 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dotnaos/ui 还在维护吗?

最新版本 0.0.28 发布于 2026/09/16(1 个月前);至今共发布 21 个版本,其中过去 12 个月发布了 21 个;首次发布于 2026/08/07。作者已将其标记为弃用,新项目建议寻找替代方案。