cos-design 3.7.2 → 3.7.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/CHANGELOG.md +39 -0
- package/README.md +37 -16
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +5425 -2680
- package/dist/src/components/index.d.ts +22 -0
- package/dist/src/components/photoCarousel/index.d.ts +9 -0
- package/dist/src/components/photoCarousel/types.d.ts +47 -0
- package/dist/src/components/photoClothesline/constants.d.ts +44 -0
- package/dist/src/components/photoClothesline/layout.d.ts +23 -0
- package/dist/src/components/photoClothesline/math.d.ts +6 -0
- package/dist/src/components/photoClothesline/model.d.ts +110 -0
- package/dist/src/components/photoClothesline/ropePath.d.ts +5 -0
- package/dist/src/components/photoClothesline/simulation.d.ts +46 -0
- package/dist/src/components/photoFilmstrip/index.d.ts +5 -0
- package/dist/src/components/photoFilmstrip/types.d.ts +43 -0
- package/dist/src/components/photoFridge/index.d.ts +5 -0
- package/dist/src/components/photoFridge/types.d.ts +41 -0
- package/dist/src/components/photoLantern/accessories.d.ts +4 -0
- package/dist/src/components/photoLantern/constants.d.ts +5 -0
- package/dist/src/components/photoLantern/dispose.d.ts +4 -0
- package/dist/src/components/photoLantern/geometry.d.ts +5 -0
- package/dist/src/components/photoLantern/index.d.ts +5 -0
- package/dist/src/components/photoLantern/materials.d.ts +9 -0
- package/dist/src/components/photoLantern/scene.d.ts +32 -0
- package/dist/src/components/photoLantern/textures.d.ts +9 -0
- package/dist/src/components/photoLantern/types.d.ts +59 -0
- package/dist/src/components/photoLightbox/index.d.ts +5 -0
- package/dist/src/components/photoLightbox/types.d.ts +39 -0
- package/dist/src/components/photoPolaroid/index.d.ts +5 -0
- package/dist/src/components/photoPolaroid/types.d.ts +39 -0
- package/dist/src/components/photoPostcard/index.d.ts +8 -0
- package/dist/src/components/photoPostcard/types.d.ts +45 -0
- package/dist/src/components/photoPrism/index.d.ts +9 -0
- package/dist/src/components/photoPrism/types.d.ts +39 -0
- package/dist/src/components/photoScroll/index.d.ts +9 -0
- package/dist/src/components/photoScroll/types.d.ts +43 -0
- package/dist/src/components/photoTunnel/index.d.ts +9 -0
- package/dist/src/components/photoTunnel/types.d.ts +43 -0
- package/dist/src/components/photoViewMaster/index.d.ts +9 -0
- package/dist/src/components/photoViewMaster/types.d.ts +47 -0
- package/dist/src/components/slotMachine/index.d.ts +2 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ 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.3] - 2026-08-03
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- 新增图片预览分类 `photo`,并将 `PhotoAlbum` / `PhotoLantern` / `PhotoClothesline` 归入该类
|
|
13
|
+
- 新增 `PhotoFilmstrip` 胶卷条:横向齿孔胶卷、拖拽惯性与整帧吸附
|
|
14
|
+
- 新增 `PhotoPolaroid` 拍立得堆:桌面散落、拖拽置顶、松手留位
|
|
15
|
+
- 新增 `PhotoLightbox` 灯箱透片:发光灯箱上横向拖出切换
|
|
16
|
+
- 新增 `PhotoCarousel` 旋转木马托盘:环形立照、拖拽环绕与空闲自转
|
|
17
|
+
- 新增 `PhotoPrism` 棱镜立方:CSS 3D 六面贴图、拖拽翻滚与空闲自转
|
|
18
|
+
- 新增 `PhotoScroll` 卷轴照片:中式手卷、横向拖拽惯性与整帧吸附
|
|
19
|
+
- 新增 `PhotoPostcard` 旅行明信片:正反面翻转、横向拖拽切换
|
|
20
|
+
- 新增 `PhotoViewMaster` 观景器圆盘:玩具圆盘旋转、惯性吸附与空闲自转
|
|
21
|
+
- 新增 `PhotoFridge` 冰箱磁贴墙:散落磁贴、拖拽置顶并留位
|
|
22
|
+
- 新增 `PhotoTunnel` 纵深隧道:Z 轴穿行、惯性吸附与景深虚化
|
|
23
|
+
- 新增 `PhotoLantern` 走马灯图片预览:基于 Three.js 的六面灯笼、空闲顺时针自转、拖拽跟手旋转与惯性、灯芯暖光自然摆动
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- `PhotoLantern` 由 CSS 3D 改为 Three.js 实现,立体感与光照更真实;`three` 为 peer 依赖
|
|
28
|
+
- `PhotoClothesline` 拆分为 layout / simulation 等模块,交互与视觉保持不变
|
|
29
|
+
- `SlotMachine` 支持 `spinDuration`,并加固滚轮错峰停轮
|
|
30
|
+
- `Turntable` 小幅交互修正
|
|
31
|
+
- @cos-design/photo-carousel: 新增 3.7.3
|
|
32
|
+
- @cos-design/photo-clothesline: 3.7.2 → 3.7.3
|
|
33
|
+
- @cos-design/photo-filmstrip: 新增 3.7.3
|
|
34
|
+
- @cos-design/photo-fridge: 新增 3.7.3
|
|
35
|
+
- @cos-design/photo-lantern: 新增 3.7.3
|
|
36
|
+
- @cos-design/photo-lightbox: 新增 3.7.3
|
|
37
|
+
- @cos-design/photo-polaroid: 新增 3.7.3
|
|
38
|
+
- @cos-design/photo-postcard: 新增 3.7.3
|
|
39
|
+
- @cos-design/photo-prism: 新增 3.7.3
|
|
40
|
+
- @cos-design/photo-scroll: 新增 3.7.3
|
|
41
|
+
- @cos-design/photo-tunnel: 新增 3.7.3
|
|
42
|
+
- @cos-design/photo-view-master: 新增 3.7.3
|
|
43
|
+
- @cos-design/slot-machine: 3.5.3 → 3.5.4
|
|
44
|
+
- @cos-design/turntable: 3.5.3 → 3.5.4
|
|
45
|
+
- cos-design: 聚合包更新至 3.7.3
|
|
46
|
+
|
|
8
47
|
## [3.7.2] - 2026-07-31
|
|
9
48
|
|
|
10
49
|
### Added
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
| 数据大屏 | 翻牌器、数字递增、仪表盘、关系网络图 |
|
|
30
30
|
| 创意作品集 | 牛顿摆、DNA 螺旋、迷宫生成、生命游戏 |
|
|
31
31
|
|
|
32
|
-
> 从背景到物理、从文字到营销,
|
|
32
|
+
> 从背景到物理、从文字到营销,84 个组件刚好组成一套完整的「视觉工具箱」。
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
@@ -80,7 +80,7 @@ export default function Page() {
|
|
|
80
80
|
| ---------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
81
81
|
| [llms.txt](https://jiaxiantao.github.io/cos-design/llms.txt) | 供 Agent 抓取的索引(场景 → 组件 → 安装命令) |
|
|
82
82
|
| [llms-full.txt](https://jiaxiantao.github.io/cos-design/llms-full.txt) | 站点上的完整 AI 参考(与 docs/ai.md 同步) |
|
|
83
|
-
| [docs/ai.md](./docs/ai.md) |
|
|
83
|
+
| [docs/ai.md](./docs/ai.md) | 84 个组件的完整 AI 参考(安装 / import / 示例 / Props) |
|
|
84
84
|
| [AGENTS.md](./AGENTS.md) | 仓库级 Agent 规则,可复制到用户项目 |
|
|
85
85
|
| [.cursor/skills/cos-design](./.cursor/skills/cos-design/SKILL.md) | Cursor Skill,克隆本仓库或复制到你的 `~/.cursor/skills/` |
|
|
86
86
|
|
|
@@ -157,21 +157,42 @@ export default function Page() {
|
|
|
157
157
|
</details>
|
|
158
158
|
|
|
159
159
|
<details>
|
|
160
|
-
<summary><strong
|
|
160
|
+
<summary><strong>图片预览</strong> — 13 个 · 物件隐喻式图片浏览</summary>
|
|
161
161
|
|
|
162
162
|
<br>
|
|
163
163
|
|
|
164
|
-
| 组件 | 说明
|
|
165
|
-
| ------------------ |
|
|
166
|
-
| `
|
|
167
|
-
| `
|
|
168
|
-
| `
|
|
169
|
-
| `
|
|
170
|
-
| `
|
|
171
|
-
| `
|
|
172
|
-
| `
|
|
173
|
-
| `
|
|
174
|
-
| `
|
|
164
|
+
| 组件 | 说明 |
|
|
165
|
+
| ------------------ | ------------------ |
|
|
166
|
+
| `PhotoAlbum` | 真实翻页相册 |
|
|
167
|
+
| `PhotoLantern` | 走马灯(Three.js) |
|
|
168
|
+
| `PhotoClothesline` | 晾绳照片墙 |
|
|
169
|
+
| `PhotoFilmstrip` | 胶卷条 |
|
|
170
|
+
| `PhotoPolaroid` | 拍立得堆 |
|
|
171
|
+
| `PhotoLightbox` | 灯箱透片 |
|
|
172
|
+
| `PhotoCarousel` | 旋转木马托盘 |
|
|
173
|
+
| `PhotoPrism` | 棱镜立方 |
|
|
174
|
+
| `PhotoScroll` | 卷轴照片 |
|
|
175
|
+
| `PhotoPostcard` | 旅行明信片 |
|
|
176
|
+
| `PhotoViewMaster` | 观景器圆盘 |
|
|
177
|
+
| `PhotoFridge` | 冰箱磁贴墙 |
|
|
178
|
+
| `PhotoTunnel` | 纵深隧道 |
|
|
179
|
+
|
|
180
|
+
</details>
|
|
181
|
+
|
|
182
|
+
<details>
|
|
183
|
+
<summary><strong>交互玩具</strong> — 7 个 · 鼠标驱动的趣味反馈</summary>
|
|
184
|
+
|
|
185
|
+
<br>
|
|
186
|
+
|
|
187
|
+
| 组件 | 说明 |
|
|
188
|
+
| ----------------- | ------------ |
|
|
189
|
+
| `WaveButton` | 水波扩散按钮 |
|
|
190
|
+
| `Spotlight` | 手电筒照亮 |
|
|
191
|
+
| `MagneticButton` | 磁吸按钮 |
|
|
192
|
+
| `HolographicCard` | 全息反光卡片 |
|
|
193
|
+
| `ClickSpark` | 点击火花 |
|
|
194
|
+
| `CursorTrail` | 光标拖尾 |
|
|
195
|
+
| `LiquidGlass` | 液态毛玻璃 |
|
|
175
196
|
|
|
176
197
|
</details>
|
|
177
198
|
|
|
@@ -264,7 +285,7 @@ export default function Page() {
|
|
|
264
285
|
|
|
265
286
|
## 特性
|
|
266
287
|
|
|
267
|
-
- **
|
|
288
|
+
- **84 个组件**,覆盖背景、文字、交互、营销、数据、物理、科学、特效八大场景
|
|
268
289
|
- **React 19** + **Vite 8** + **TypeScript 5** 现代技术栈
|
|
269
290
|
- **ESM / CJS** 双格式,完整 `.d.ts` 类型
|
|
270
291
|
- **样式自动注入**,无需 `import 'cos-design/dist/index.css'`
|
|
@@ -285,7 +306,7 @@ npm run setup # 安装依赖(绕过 corepack 问题)
|
|
|
285
306
|
npx --yes pnpm@9 dev # 启动 Playground
|
|
286
307
|
```
|
|
287
308
|
|
|
288
|
-
访问 **http://localhost:4000** — 按分类浏览全部
|
|
309
|
+
访问 **http://localhost:4000** — 按分类浏览全部 84 个组件,右侧可查看与复制示例代码。
|
|
289
310
|
|
|
290
311
|
---
|
|
291
312
|
|