orbcafe-ui 1.2.2 → 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.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbcafe-ui",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Awesome UI components with Glassmorphism",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",