orbcafe-ui 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -3
- package/dist/index.js +16 -16
- package/dist/index.mjs +13 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,36 @@
|
|
|
5
5
|
## Project Goal
|
|
6
6
|
|
|
7
7
|
- 组件可直接通过 NPM 安装并使用。
|
|
8
|
+
|
|
9
|
+
### 安装依赖
|
|
10
|
+
|
|
11
|
+
为了确保与 `orbcafe-ui` 的最佳兼容性,请使用以下命令安装精确版本的相关依赖(避免 `latest` 带来的破坏性更新):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install orbcafe-ui @mui/material@^7.3.9 @mui/icons-material@^7.3.9 @mui/x-date-pickers@^8.27.2 @emotion/react@^11.14.0 @emotion/styled@^11.14.1 dayjs@^1.11.20 lucide-react@^0.575.0 tailwind-merge@^3.5.0 clsx@^2.1.1 class-variance-authority@^0.7.1 @radix-ui/react-slot@^1.2.4
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 运行时环境与集成基线(重要)
|
|
18
|
+
|
|
19
|
+
1. **Tailwind CSS 编译要求**
|
|
20
|
+
本组件库严重依赖 Tailwind 实用类(utility classes,如 Glassmorphism 的 `backdrop-blur-xl` 等)。**发布在 NPM 的 `dist/index.css` 并不包含完整的样式!** 必须让宿主项目在构建时扫描并编译 `orbcafe-ui`。
|
|
21
|
+
- **如果你使用的是 Tailwind v3**,在 `tailwind.config.js` 中增加:
|
|
22
|
+
```js
|
|
23
|
+
content: ["./node_modules/orbcafe-ui/dist/**/*.{js,mjs}"]
|
|
24
|
+
```
|
|
25
|
+
- **如果你使用的是 Tailwind v4 + Next.js**(如我们的官方 examples),在 `globals.css` 中声明:
|
|
26
|
+
```css
|
|
27
|
+
@import "tailwindcss";
|
|
28
|
+
@source "../../node_modules/orbcafe-ui/dist";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. **Provider 注入要求**
|
|
32
|
+
部分组件(如通知、日期筛选、主题色)依赖 MUI 和内部的 Context。你的应用入口(如 `layout.tsx` 或 `_app.tsx`)必须提供以下 Provider 矩阵:
|
|
33
|
+
- `ThemeProvider` (MUI)
|
|
34
|
+
- `CssBaseline` (MUI)
|
|
35
|
+
- `LocalizationProvider` (MUI X)
|
|
36
|
+
- `GlobalMessage` (orbcafe-ui 导出)
|
|
37
|
+
|
|
8
38
|
- 组件 API 稳定、类型完整、目录结构一致。
|
|
9
39
|
- 组件公共 API、类型契约与回调契约稳定,文档与 examples 可追踪。
|
|
10
40
|
|
|
@@ -51,6 +81,24 @@
|
|
|
51
81
|
- `AgentUI` 模块文档:`src/components/AgentUI/README.md`
|
|
52
82
|
- `AI 模块契约索引`:`skills/orbcafe-ui-component-usage/references/module-contracts.md`
|
|
53
83
|
- `Pad skill`:`skills/orbcafe-pad-workflow/SKILL.md`
|
|
84
|
+
- `组件通俗名映射(多语言)`:`skills/orbcafe-ui-component-usage/references/component-glossary-i18n.md`
|
|
85
|
+
|
|
86
|
+
### 组件通俗名(Natural Name)对照
|
|
87
|
+
|
|
88
|
+
用于“用户自然语言 -> 组件 canonical API”映射,避免只有英文技术名才可路由。
|
|
89
|
+
|
|
90
|
+
| Canonical API | English natural name | 中文通俗名 | German cues |
|
|
91
|
+
| --- | --- | --- | --- |
|
|
92
|
+
| `CTable` | Desktop table | 电脑端表格 | Desktop Tabelle |
|
|
93
|
+
| `CSmartFilter` | Smart filter bar | 智能筛选条 | Filterleiste |
|
|
94
|
+
| `PTable` | Pad/touch table | 平板触摸表格 | Tablet Tabelle |
|
|
95
|
+
| `PSmartFilter` | Pad filter bar | 平板筛选条 | Tablet Filter |
|
|
96
|
+
| `PBarcodeScanner` | Camera barcode scanner | 摄像头扫码控件 | Barcode Scanner |
|
|
97
|
+
| `PNumericKeypad` | On-screen numeric keypad | 屏幕数字小键盘 | Ziffernblock |
|
|
98
|
+
| `CAppPageLayout` | App shell layout | 应用壳层布局 | App Layout |
|
|
99
|
+
| `CDetailInfoPage` | Detail page | 详情页 | Detailseite |
|
|
100
|
+
| `CPivotTable` | Pivot table | 透视表 | Pivot Tabelle |
|
|
101
|
+
| `AgentPanel` | Agent chat panel | 智能体聊天面板 | Agent Chat Panel |
|
|
54
102
|
|
|
55
103
|
---
|
|
56
104
|
|
|
@@ -108,15 +156,16 @@ import {
|
|
|
108
156
|
|
|
109
157
|
如果目标是让 AI 在 vibe coding 场景里稳定使用 ORBCAFE UI,推荐遵循这条顺序:
|
|
110
158
|
|
|
111
|
-
1.
|
|
112
|
-
2.
|
|
159
|
+
1. 先看 `skills/orbcafe-ui-component-usage/references/component-glossary-i18n.md`,把自然语言组件名映射到 canonical API。
|
|
160
|
+
2. 再用 `skills/orbcafe-ui-component-usage` 判定目标模块。
|
|
161
|
+
3. 再看 `skills/orbcafe-ui-component-usage/references/module-contracts.md`,确认:
|
|
113
162
|
- 公共导出入口
|
|
114
163
|
- 推荐标准组件
|
|
115
164
|
- 是否公开 hooks
|
|
116
165
|
- 最小状态结构
|
|
117
166
|
- 标准 example
|
|
118
167
|
- 验证与排障清单
|
|
119
|
-
|
|
168
|
+
4. 最后才看具体模块 README 和官方 examples。
|
|
120
169
|
|
|
121
170
|
### 当前标准化原则
|
|
122
171
|
|