cos-design 3.7.10 → 3.8.0

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 (32) hide show
  1. package/CHANGELOG.md +36 -7
  2. package/README.md +15 -9
  3. package/dist/index.cjs +159 -3
  4. package/dist/index.css +1 -1
  5. package/dist/index.js +4416 -1981
  6. package/dist/src/components/auroraVeil/index.d.ts +19 -0
  7. package/dist/src/components/confetti/index.d.ts +5 -1
  8. package/dist/src/components/dandelionField/constants.d.ts +72 -0
  9. package/dist/src/components/dandelionField/draw.d.ts +33 -0
  10. package/dist/src/components/dandelionField/frame-cache.d.ts +22 -0
  11. package/dist/src/components/dandelionField/index.d.ts +5 -0
  12. package/dist/src/components/dandelionField/plant.d.ts +106 -0
  13. package/dist/src/components/dandelionField/scene.d.ts +13 -0
  14. package/dist/src/components/dandelionField/seed.d.ts +15 -0
  15. package/dist/src/components/dandelionField/types.d.ts +193 -0
  16. package/dist/src/components/dandelionField/utils.d.ts +18 -0
  17. package/dist/src/components/fireworks/index.d.ts +5 -1
  18. package/dist/src/components/index.d.ts +10 -0
  19. package/dist/src/components/inkBloom/index.d.ts +21 -0
  20. package/dist/src/components/lavaBubble/gl.d.ts +3 -0
  21. package/dist/src/components/lavaBubble/index.d.ts +24 -0
  22. package/dist/src/components/lavaBubble/shaders.d.ts +2 -0
  23. package/dist/src/components/lavaBubble/sim.d.ts +60 -0
  24. package/dist/src/components/soapBubbles/draw-bubble.d.ts +20 -0
  25. package/dist/src/components/soapBubbles/film.d.ts +8 -0
  26. package/dist/src/components/soapBubbles/index.d.ts +20 -0
  27. package/dist/src/components/soapBubbles/lighting.d.ts +34 -0
  28. package/dist/src/components/soapBubbles/merge.d.ts +50 -0
  29. package/dist/src/components/soapBubbles/sky.d.ts +2 -0
  30. package/dist/src/components/soapBubbles/types.d.ts +40 -0
  31. package/dist/src/components/soapBubbles/utils.d.ts +12 -0
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,17 +5,41 @@ 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.10] - 2026-08-27
8
+ ## [Unreleased]
9
+
10
+ ## [3.8.0] - 2026-08-31
11
+
12
+ ### Added
13
+
14
+ - 背景动效:`AuroraVeil`(极光帷幕)、`DandelionField`(蒲公英播种)、`LavaBubble`(熔岩泡)、`InkBloom`(墨染清水)、`SoapBubbles`(肥皂泡)
15
+ - 对应 `@cos-design/*` 分包与 Playground 演示;Playwright smoke 覆盖新组件 canvas 挂载
16
+ - `@cos-design/shared`:`softSat` 等数学工具导出
9
17
 
10
18
  ### Changed
11
19
 
12
- - @cos-design/aurora: 3.5.4 → 3.5.5
13
- - @cos-design/nine-grid: 3.7.9 → 3.7.10
14
- - @cos-design/slot-machine: 3.5.5 → 3.5.6
15
- - @cos-design/turntable: 3.5.5 → 3.5.6
16
- - cos-design: 聚合包更新至 3.7.10
20
+ - `DandelionField`:模块化拆分(scene / plant / seed / draw)与帧级性能优化(植株几何缓存、附着种子计数)
21
+ - cos-design: 聚合包更新至 3.8.0(91 components)
17
22
 
18
- ## [Unreleased]
23
+ ## [3.7.11] - 2026-08-27
24
+
25
+ ### Removed
26
+
27
+ - Playground「活动配方」整页路由与导航(`#/recipes`);活动组合改走 [examples/next-app](./examples/next-app) 与 [docs/campaign-10-minutes.md](./docs/campaign-10-minutes.md)
28
+
29
+ ### Added
30
+
31
+ - Confetti / Fireworks:`interactive`(默认跟随 `auto`;`auto={false}` 不拦截指针)
32
+ - Next 示例 README「3-step fork」;活动页入口改指向 Next 示例与 10 分钟指南
33
+
34
+ ### Changed
35
+
36
+ - Confetti/Fireworks 在 `auto={false}` 时默认不拦截指针;交互 smoke 改在组件页(FlipCard / NineGrid / Turntable)
37
+ - campaign-patterns 补充 celebration vs controls 约定
38
+ - @cos-design/confetti: 3.5.5 → 3.5.6
39
+ - @cos-design/fireworks: 3.5.5 → 3.5.6
40
+ - cos-design: 聚合包更新至 3.7.11
41
+
42
+ ## [3.7.10] - 2026-08-27
19
43
 
20
44
  ### Added
21
45
 
@@ -29,6 +53,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
29
53
 
30
54
  - `Aurora`:标签页隐藏时暂停 CSS 动画(`bindVisibilityPause`)
31
55
  - AGENTS / Cursor Skill 强化「何时不用 cos-design」;Context7 rules 补充活动页约定
56
+ - @cos-design/aurora: 3.5.4 → 3.5.5
57
+ - @cos-design/nine-grid: 3.7.9 → 3.7.10
58
+ - @cos-design/slot-machine: 3.5.5 → 3.5.6
59
+ - @cos-design/turntable: 3.5.5 → 3.5.6
60
+ - cos-design: 聚合包更新至 3.7.10
32
61
 
33
62
  ## [3.7.9] - 2026-08-27
34
63
 
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  # cos-design
4
4
 
5
- **86 React visual-effect components** for marketing pages, brand landings, and creative showcases
6
- **86 个 React 视觉特效组件 · 活动页 / 品牌页 / 创意展示开箱即用**
5
+ **91 React visual-effect components** for marketing pages, brand landings, and creative showcases
6
+ **91 个 React 视觉特效组件 · 活动页 / 品牌页 / 创意展示开箱即用**
7
7
 
8
8
  [![CI](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml/badge.svg)](https://github.com/jiaxiantao/cos-design/actions/workflows/ci.yml)
9
9
  [![npm version](https://img.shields.io/npm/v/cos-design.svg)](https://www.npmjs.com/package/cos-design)
@@ -11,7 +11,7 @@
11
11
  [![React](https://img.shields.io/badge/React-19-61dafb)](https://react.dev/)
12
12
  [![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6)](https://www.typescriptlang.org/)
13
13
 
14
- [Playground](https://jiaxiantao.github.io/cos-design/) · [Quickstart](./QUICKSTART.md) · [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) · [AI discovery](./docs/ai-discovery.md) · [Next.js example](./examples/next-app) · [EN guide](./website-content/cos-design-marketing-effects-en.md) · [中文指南](./website-content/cos-design-intro.md) · [Changelog](./CHANGELOG.md)
14
+ [Playground](https://jiaxiantao.github.io/cos-design/) · [Quickstart](./QUICKSTART.md) · [**10-minute campaign**](./docs/campaign-10-minutes.md) · [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) · [AI discovery](./docs/ai-discovery.md) · [Next.js example](./examples/next-app) · [EN guide](./website-content/cos-design-marketing-effects-en.md) · [中文指南](./website-content/cos-design-intro.md) · [Changelog](./CHANGELOG.md)
15
15
 
16
16
  </div>
17
17
 
@@ -43,6 +43,7 @@ export function Campaign() {
43
43
 
44
44
  - **Use for:** campaign / lottery / celebration UI, canvas backgrounds, animated headlines, dashboard decorations
45
45
  - **Do not use for:** tables, forms, nav shells → use Ant Design / shadcn / MUI
46
+ - **Start here (campaign):** [Build a campaign page in 10 minutes](./docs/campaign-10-minutes.md) · runnable [examples/next-app](./examples/next-app)
46
47
  - **AI index:** https://jiaxiantao.github.io/cos-design/llms.txt · **Context7:** `/jiaxiantao/cos-design`
47
48
  - **Cursor Skill install:** see [docs/ai-discovery.md](./docs/ai-discovery.md)
48
49
  - **Article:** [React marketing page effects with cos-design](./website-content/cos-design-marketing-effects-en.md)
@@ -62,7 +63,7 @@ export function Campaign() {
62
63
  | 数据大屏 | 翻牌器、数字递增、仪表盘、关系网络图 |
63
64
  | 创意作品集 | 牛顿摆、DNA 螺旋、迷宫生成、生命游戏 |
64
65
 
65
- > 从背景到物理、从文字到营销,86 个组件刚好组成一套完整的「视觉工具箱」。
66
+ > 从背景到物理、从文字到营销,91 个组件刚好组成一套完整的「视觉工具箱」。
66
67
 
67
68
  ---
68
69
 
@@ -113,7 +114,7 @@ export default function Page() {
113
114
  | ---------------------------------------------------------------------- | ------------------------------------------------------- |
114
115
  | [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) | 供 Agent 抓取的索引(场景 → 组件 → 安装命令) |
115
116
  | [llms-full.txt](https://jiaxiantao.github.io/cos-design/llms-full.txt) | 站点上的完整 AI 参考(与 docs/ai.md 同步) |
116
- | [docs/ai.md](./docs/ai.md) | 86 个组件的完整 AI 参考(安装 / import / 示例 / Props) |
117
+ | [docs/ai.md](./docs/ai.md) | 91 个组件的完整 AI 参考(安装 / import / 示例 / Props) |
117
118
  | [docs/examples/next-app-router.md](./docs/examples/next-app-router.md) | Next.js App Router 接入说明(SSR + fill) |
118
119
  | [examples/next-app](./examples/next-app) | 可运行 Next.js 示例(`pnpm install && pnpm dev`) |
119
120
  | [docs/ai-discovery.md](./docs/ai-discovery.md) | Context7 提交、校验、Cursor Skill 安装、项目 Rule 片段 |
@@ -153,10 +154,10 @@ Context7: /jiaxiantao/cos-design
153
154
 
154
155
  ---
155
156
 
156
- ## 组件一览(86 个 · 9 大分类)
157
+ ## 组件一览(91 个 · 9 大分类)
157
158
 
158
159
  <details open>
159
- <summary><strong>背景动效</strong> — 11 个 · 动态场景与粒子背景</summary>
160
+ <summary><strong>背景动效</strong> — 16 个 · 动态场景与粒子背景</summary>
160
161
 
161
162
  <br>
162
163
 
@@ -166,6 +167,11 @@ Context7: /jiaxiantao/cos-design
166
167
  | `RippleWater` | WebGL 水面涟漪 |
167
168
  | `SmokeFog` | 烟雾雾气飘动(支持点击驱散) |
168
169
  | `BubbleField` | 深海气泡上升 · 自动融合 · 鼠标扰动水流 |
170
+ | `SoapBubbles` | 肥皂泡天空 · 虹彩飘飞 · 点击爆裂 |
171
+ | `DandelionField` | 蒲公英播种 · 风吹绒毛 · 点击炸开重生 |
172
+ | `LavaBubble` | 熔岩泡 · 搅动岩浆 · 点击喷发 |
173
+ | `InkBloom` | 墨染清水 · 滴墨溶开 · 拖拽搅动 |
174
+ | `AuroraVeil` | 极光帷幕 · 鼠标弯曲光带 · 点击能量脉冲 |
169
175
  | `MatrixRain` | 黑客帝国数字雨 |
170
176
  | `MeteorRain` | 流星雨穿越 |
171
177
  | `ParticleNetwork` | 粒子连线网络(支持触摸) |
@@ -333,7 +339,7 @@ Context7: /jiaxiantao/cos-design
333
339
 
334
340
  ## 特性
335
341
 
336
- - **86 个组件**,覆盖背景、文字、图片、交互、营销、数据、物理、科学、特效九大场景
342
+ - **91 个组件**,覆盖背景、文字、图片、交互、营销、数据、物理、科学、特效九大场景
337
343
  - **React 19** + **Vite 8** + **TypeScript 5** 现代技术栈
338
344
  - **ESM / CJS** 双格式,完整 `.d.ts` 类型
339
345
  - **样式自动注入**,无需 `import 'cos-design/dist/index.css'`
@@ -354,7 +360,7 @@ npm run setup # 安装依赖(绕过 corepack 问题)
354
360
  npx --yes pnpm@9 dev # 启动 Playground
355
361
  ```
356
362
 
357
- 访问 **http://localhost:4000** — 按分类浏览全部 86 个组件,右侧可查看与复制示例代码。
363
+ 访问 **http://localhost:4000** — 按分类浏览全部 91 个组件,右侧可查看与复制示例代码。
358
364
 
359
365
  ---
360
366