drawui-react 0.5.2 → 0.5.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 +21 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
基于 [drawui-core](https://www.npmjs.com/package/drawui-core) 的 React 封装,提供开箱即用的画布组件。
|
|
6
6
|
|
|
7
|
-
> 🛠 **图片上传对接**(接 OSS /
|
|
7
|
+
> 🛠 **图片上传对接**(接 OSS / 自建后端):完整指南随包发布,安装后直接打开 `node_modules/drawui-react/IMAGE_UPLOAD.md` 查看。含 `imageUpload` prop 的两种通道(`ImageUploadConfig` 与 `ImageUploader` 函数)、30 MB 体积上限、60 s 超时、OSS CORS 与 STS 直传示例。
|
|
8
8
|
|
|
9
9
|
## 安装
|
|
10
10
|
|
|
@@ -61,6 +61,15 @@ export function App() {
|
|
|
61
61
|
|
|
62
62
|
## 更新日志
|
|
63
63
|
|
|
64
|
+
### v0.5.3
|
|
65
|
+
|
|
66
|
+
> 主题:**继承 core 的连线避让 / 线段手柄 / 橡皮擦渐隐**(依赖 `drawui-core@0.5.3`)
|
|
67
|
+
|
|
68
|
+
- 🧭 **连线不再压线**:绕行路由随 core 生效 —— 从右边缘出线、目标在左边时,末段不再横穿目标图形。
|
|
69
|
+
- 🎚️ **线段手柄收敛**:只有折线与直角折线会显示可拖动的线段手柄,直线与曲线移除(绘制与命中都关掉)。
|
|
70
|
+
- 🫥 **橡皮擦渐隐**:擦除时图形 200ms 内淡出再消失,React 层无需任何配置;`CanvasBoard` 未改动。
|
|
71
|
+
- 📄 `IMAGE_UPLOAD.md` 入口说明改为「随包发布,安装后在 `node_modules/drawui-react/` 下查看」。
|
|
72
|
+
|
|
64
73
|
### v0.5.2
|
|
65
74
|
|
|
66
75
|
> 主题:**思维导图升降层级入口 + 拖拽换层级提示**(依赖 `drawui-core@0.5.2`)
|
|
@@ -89,7 +98,7 @@ export function App() {
|
|
|
89
98
|
- ⏱ **上传超时 30 s → 60 s**:默认 `timeoutMs` 从 30000 调整为 60000。
|
|
90
99
|
- 🧰 **`imageUpload` 现在支持两种通道**:`ImageUploadConfig`(配 `{ url, method, headers, responseUrlPath, timeoutMs, maxSizeBytes }`)或 `ImageUploader` 函数(`(file: File) => Promise<string>`),函数优先级高于配置。
|
|
91
100
|
- 🌐 **多语言新增 `image.tooLarge` 文案**:7 种语言全部同步,体积超限时 toast 用对应语言提示用户。
|
|
92
|
-
- 📄
|
|
101
|
+
- 📄 **图片上传对接指南**:见 `node_modules/drawui-react/IMAGE_UPLOAD.md`(随包发布)。
|
|
93
102
|
|
|
94
103
|
### v0.4.2
|
|
95
104
|
|
|
@@ -257,6 +266,15 @@ export function App() {
|
|
|
257
266
|
|
|
258
267
|
## Changelog
|
|
259
268
|
|
|
269
|
+
### v0.5.3
|
|
270
|
+
|
|
271
|
+
> Theme: **inherits core's connector detour, narrower segment handles and eraser fade-out** (depends on `drawui-core@0.5.3`)
|
|
272
|
+
|
|
273
|
+
- 🧭 **Connectors no longer overlap shapes**: detour routing from core — exiting the right edge towards a target on the left no longer runs the last leg through the target.
|
|
274
|
+
- 🎚️ **Segment handles narrowed**: only polyline and orthogonal connectors show draggable segment handles; straight and curve connectors drop them (both drawing and hit-testing).
|
|
275
|
+
- 🫥 **Eraser fade-out**: shapes fade over 200 ms before being removed. No React API changes; `CanvasBoard` is untouched.
|
|
276
|
+
- 📄 The `IMAGE_UPLOAD.md` entry now points at `node_modules/drawui-react/` instead of a relative link.
|
|
277
|
+
|
|
260
278
|
### v0.5.2
|
|
261
279
|
|
|
262
280
|
> Theme: **Mind map level controls + drag-to-re-parent hints** (depends on `drawui-core@0.5.2`)
|
|
@@ -285,7 +303,7 @@ export function App() {
|
|
|
285
303
|
- ⏱ **Upload timeout 30 s → 60 s**: default `timeoutMs` bumped from 30000 to 60000.
|
|
286
304
|
- 🧰 **`imageUpload` now accepts two channels**: `ImageUploadConfig` (with `{ url, method, headers, responseUrlPath, timeoutMs, maxSizeBytes }`) **or** an `ImageUploader` function (`(file: File) => Promise<string>`); the function takes priority over the config.
|
|
287
305
|
- 🌐 **`image.tooLarge` localized**: added in all 7 supported languages so the size-cap toast always uses the user's language.
|
|
288
|
-
- 📄 **Image upload integration guide**: see
|
|
306
|
+
- 📄 **Image upload integration guide**: see `node_modules/drawui-react/IMAGE_UPLOAD.md` (ships with the package).
|
|
289
307
|
|
|
290
308
|
### v0.4.2
|
|
291
309
|
|