# @bpmn-io/shadcn-theme 中文文档

规范地址：https://npmcn.com/package/%40bpmn-io/shadcn-theme/

版本：0\.0\.1
npm 元数据更新时间：2026-08-21T12:38:19.073Z
中文译文更新时间：2026-11-08T13:10:03.657Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40bpmn-io/shadcn-theme
原文对照：https://npmcn.com/package/%40bpmn-io/shadcn-theme/?lang=original
项目主页：https://github.com/bpmn-io/shadcn-theme#readme
源码仓库：https://github.com/bpmn-io/shadcn-theme

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：53.1 kB，7 个文件
- TypeScript 类型：未声明
- 运行依赖：0 个
- 首次发布：2026-08-21T12:38:18.537Z
- 最新版本发布：2026-08-21T12:38:18.827Z
- 近 30 天下载量：17736（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：1（近 12 个月 1 个）

## 中文简介

Bpmn.io 的阴影主题

## 安装

```sh
npm install @bpmn-io/shadcn-theme
```

也可以使用：`pnpm add @bpmn-io/shadcn-theme`、`yarn add @bpmn-io/shadcn-theme`、`bun add @bpmn-io/shadcn-theme`

## README

# bpmn.io 沙德克恩语 主题

[![CI](https://github.com/bpmn-io/shadcn-theme/actions/workflows/CI.yml/badge.svg)](https://github.com/bpmn-io/shadcn-theme/actions/workflows/CI.yml)

便携式 [阴影/ ui](https://ui.shadcn.com/) bpmn.io 的主题,带有 选项 [卡蒙达设计系统](https://github.com/camunda/design-system) (C4级) 超过.

## 使用量

应用 `bpmn-io-shadcn-theme` 到共同祖先,装入基部组件CSS, 然后是每个使用的组件的共享令牌和适配器:

```html
<div class="bpmn-io-shadcn-theme">
  <div id="canvas"></div>
  <div id="properties-panel"></div>
</div>
```

```js
import '@bpmn-io/properties-panel/dist/assets/properties-panel.css';
import '@bpmn-io/shadcn-theme/assets/tokens.css';
import '@bpmn-io/shadcn-theme/assets/properties-panel.css';
```

每个适配器在其主题组件的基底CSS后加载. 另选主题 图表表面——调色板、搜索垫和弹出编辑器( 创建、附加和替换菜单)——负载 `diagram.css` bpmn -js 之后的游戏 样式表 :

```js
import 'bpmn-js/dist/assets/diagram-js.css';
import 'bpmn-js/dist/assets/bpmn-js.css';
import '@bpmn-io/shadcn-theme/assets/tokens.css';
import '@bpmn-io/shadcn-theme/assets/diagram.css';
```

添加 `dark` ,并覆盖 `--shadcn-*` 属性以匹配您的阴影配置 :

```css
.bpmn-io-shadcn-theme {
  --shadcn-primary: 221.2 83.2% 53.3%;
  --shadcn-radius: 0.75rem;
}
```

### Camunda 设计系统(C4)

C4曝光了自己的范围语义符号. 内部渲染 `C4Provider` 导入 `c4.css` 在适配器后; 只在下方应用 `.c4-ui`,离开库存 阴影消费者未受影响:

```js
import '@camunda/design-system/styles.css';
import '@bpmn-io/shadcn-theme/assets/tokens.css';
import '@bpmn-io/shadcn-theme/assets/properties-panel.css';
import '@bpmn-io/shadcn-theme/assets/diagram.css';
import '@bpmn-io/shadcn-theme/assets/c4.css';
```

## 构建和运行

通过安装所有依赖来准备工程 :

```sh
npm install
```

然后,根据您的使用大小写,您可以运行以下任何命令:

```sh
# lint and run all tests
npm run all

# run all tests
npm test

# spin up the canonical playground to try the theme end-to-end
npm start

# capture side-by-side theme comparison screenshots into .captures/
npm run capture
```

为了探索更狭窄的地表, `it.only` 假想或旋转其中之一 特定组成部分游乐场:

```sh
npm run start:properties-panel
npm run start:diagram
npm run start:bpmn
npm run start:element-template-chooser
```

## 许可证

麻省理工学院

## 常见问题

### @bpmn-io/shadcn-theme 是什么？

Bpmn\.io 的阴影主题

### 如何安装 @bpmn-io/shadcn-theme？

在项目目录运行 npm install @bpmn-io/shadcn-theme，或使用 pnpm add / yarn add / bun add。

### @bpmn-io/shadcn-theme 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/bpmn-io\_\_shadcn-theme 是否存在。

### @bpmn-io/shadcn-theme 可以商用吗？

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

### @bpmn-io/shadcn-theme 的下载量有多少？

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

### @bpmn-io/shadcn-theme 还在维护吗？

最新版本 0\.0\.1 发布于 2026/08/21（2 个月前）；至今共发布 1 个版本，其中过去 12 个月发布了 1 个；首次发布于 2026/08/21。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

