cos-design 3.7.0 → 3.7.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.7.1] - 2026-07-31
9
+
10
+ ### Added
11
+
12
+ - 新增 `PhotoAlbum` 真实翻页相册:CSS 3D 摊开式翻页、铁丝圈装订、飞页与自适应铁圈数量
13
+ - Playground Props 表支持自定义类型说明(`componentRelatedTypes`)
14
+ - `@cos-design/photo-album`: 新增 3.7.1
15
+ - cos-design: 聚合包更新至 3.7.1
16
+
8
17
  ## [3.7.0] - 2026-07-30
9
18
 
10
19
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # cos-design
4
4
 
5
- **71 个 React 视觉特效组件 · 活动页 / 品牌页 / 创意展示开箱即用**
5
+ **72 个 React 视觉特效组件 · 活动页 / 品牌页 / 创意展示开箱即用**
6
6
 
7
7
  [![CI](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml/badge.svg)](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml)
8
8
  [![npm version](https://img.shields.io/npm/v/cos-design.svg)](https://www.npmjs.com/package/cos-design)
@@ -10,7 +10,7 @@
10
10
  [![React](https://img.shields.io/badge/React-19-61dafb)](https://react.dev/)
11
11
  [![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6)](https://www.typescriptlang.org/)
12
12
 
13
- [在线预览](https://jiaxiantao.github.io/cos-design/) · [快速开始](./QUICKSTART.md) · [v3.0 发布博客](./website-content/cos-design-v3-release.md) · [完整指南](./website-content/cos-design-intro.md) · [更新日志](./CHANGELOG.md)
13
+ [在线预览](https://jiaxiantao.github.io/cos-design/) · [快速开始](./QUICKSTART.md) · [AI 文档 / llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) · [v3.0 发布博客](./website-content/cos-design-v3-release.md) · [完整指南](./website-content/cos-design-intro.md) · [更新日志](./CHANGELOG.md)
14
14
 
15
15
  </div>
16
16
 
@@ -29,7 +29,7 @@
29
29
  | 数据大屏 | 翻牌器、数字递增、仪表盘、关系网络图 |
30
30
  | 创意作品集 | 牛顿摆、DNA 螺旋、迷宫生成、生命游戏 |
31
31
 
32
- > 从背景到物理、从文字到营销,71 个组件刚好组成一套完整的「视觉工具箱」。
32
+ > 从背景到物理、从文字到营销,72 个组件刚好组成一套完整的「视觉工具箱」。
33
33
 
34
34
  ---
35
35
 
@@ -72,6 +72,27 @@ export default function Page() {
72
72
 
73
73
  无需手动引入 CSS,样式自动注入。完整 TypeScript 类型开箱即用。
74
74
 
75
+ ### 给 AI / Cursor 用
76
+
77
+ 让 AI 在写活动页、特效背景时自动选用本库:
78
+
79
+ | 资源 | 说明 |
80
+ | ---------------------------------------------------------------------- | -------------------------------------------------------- |
81
+ | [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) | 供 Agent 抓取的索引(场景 → 组件 → 安装命令) |
82
+ | [llms-full.txt](https://jiaxiantao.github.io/cos-design/llms-full.txt) | 站点上的完整 AI 参考(与 docs/ai.md 同步) |
83
+ | [docs/ai.md](./docs/ai.md) | 72 个组件的完整 AI 参考(安装 / import / 示例 / Props) |
84
+ | [AGENTS.md](./AGENTS.md) | 仓库级 Agent 规则,可复制到用户项目 |
85
+ | [.cursor/skills/cos-design](./.cursor/skills/cos-design/SKILL.md) | Cursor Skill,克隆本仓库或复制到你的 `~/.cursor/skills/` |
86
+
87
+ **在用户项目里加一条 Cursor Rule(示例):**
88
+
89
+ ```text
90
+ 做营销页、抽奖、烟花、天气背景、霓虹标题等视觉特效时,优先使用 cos-design(pnpm add cos-design 或 @cos-design/*)。
91
+ 参考 https://jiaxiantao.github.io/cos-design/llms.txt
92
+ ```
93
+
94
+ 更新组件目录后运行 `pnpm generate:ai-docs` 重新生成 `public/llms.txt` 与 `docs/ai.md`。
95
+
75
96
  ### 使用注意(摘要)
76
97
 
77
98
  | 注意点 | 说明 |
@@ -84,7 +105,7 @@ export default function Page() {
84
105
 
85
106
  ---
86
107
 
87
- ## 组件一览(71 个 · 8 大分类)
108
+ ## 组件一览(72 个 · 8 大分类)
88
109
 
89
110
  <details open>
90
111
  <summary><strong>背景动效</strong> — 11 个 · 动态场景与粒子背景</summary>
@@ -136,7 +157,7 @@ export default function Page() {
136
157
  </details>
137
158
 
138
159
  <details>
139
- <summary><strong>交互玩具</strong> — 7 个 · 鼠标驱动的趣味反馈</summary>
160
+ <summary><strong>交互玩具</strong> — 8 个 · 鼠标驱动的趣味反馈</summary>
140
161
 
141
162
  <br>
142
163
 
@@ -146,6 +167,7 @@ export default function Page() {
146
167
  | `Spotlight` | 手电筒照亮 |
147
168
  | `MagneticButton` | 磁吸按钮 |
148
169
  | `HolographicCard` | 全息反光卡片 |
170
+ | `PhotoAlbum` | 真实翻页相册 |
149
171
  | `ClickSpark` | 点击火花 |
150
172
  | `CursorTrail` | 光标拖尾 |
151
173
  | `LiquidGlass` | 液态毛玻璃 |
@@ -241,7 +263,7 @@ export default function Page() {
241
263
 
242
264
  ## 特性
243
265
 
244
- - **71 个组件**,覆盖背景、文字、交互、营销、数据、物理、科学、特效八大场景
266
+ - **72 个组件**,覆盖背景、文字、交互、营销、数据、物理、科学、特效八大场景
245
267
  - **React 19** + **Vite 8** + **TypeScript 5** 现代技术栈
246
268
  - **ESM / CJS** 双格式,完整 `.d.ts` 类型
247
269
  - **样式自动注入**,无需 `import 'cos-design/dist/index.css'`
@@ -262,7 +284,7 @@ npm run setup # 安装依赖(绕过 corepack 问题)
262
284
  npx --yes pnpm@9 dev # 启动 Playground
263
285
  ```
264
286
 
265
- 访问 **http://localhost:4000** — 按分类浏览全部 71 个组件,右侧可查看与复制示例代码。
287
+ 访问 **http://localhost:4000** — 按分类浏览全部 72 个组件,右侧可查看与复制示例代码。
266
288
 
267
289
  ---
268
290
 
@@ -296,13 +318,16 @@ const Fireworks = dynamic(() => import('cos-design').then((m) => m.Fireworks), {
296
318
 
297
319
  ## 文档
298
320
 
299
- | 文档 | 内容 |
300
- | ----------------------------------------------------------- | -------------------------------- |
301
- | [快速开始](./QUICKSTART.md) | 安装、用法、注意事项与常见问题 |
302
- | [v3.0 发布博客](./website-content/cos-design-v3-release.md) | 重大升级解读、分类体系、技术实现 |
303
- | [完整介绍与实践指南](./website-content/cos-design-intro.md) | 架构、使用规则、组件详解 |
304
- | [CHANGELOG](./CHANGELOG.md) | 版本更新记录 |
305
- | [CONTRIBUTING](./CONTRIBUTING.md) | 参与贡献指南 |
321
+ | 文档 | 内容 |
322
+ | ------------------------------------------------------------ | -------------------------------- |
323
+ | [快速开始](./QUICKSTART.md) | 安装、用法、注意事项与常见问题 |
324
+ | [AI Agent 参考](./docs/ai.md) | 供 AI 使用的组件选型与 API 文档 |
325
+ | [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) | 机器可读索引(llmstxt 规范) |
326
+ | [AGENTS.md](./AGENTS.md) | 编码 Agent 仓库规则 |
327
+ | [v3.0 发布博客](./website-content/cos-design-v3-release.md) | 重大升级解读、分类体系、技术实现 |
328
+ | [完整介绍与实践指南](./website-content/cos-design-intro.md) | 架构、使用规则、组件详解 |
329
+ | [CHANGELOG](./CHANGELOG.md) | 版本更新记录 |
330
+ | [CONTRIBUTING](./CONTRIBUTING.md) | 参与贡献指南 |
306
331
 
307
332
  ---
308
333