From eceafba8c1343d97c409ca40eca79949e069d484 Mon Sep 17 00:00:00 2001 From: leaferjs Date: Tue, 21 Jan 2025 08:35:09 +0800 Subject: [PATCH] v1.3.3 --- contribute/index.md | 2 ++ create/leafer.md | 4 +-- guide/framework/html.md | 8 +++--- guide/index.md | 4 +-- guide/install/draw/miniapp/start.md | 4 +-- guide/install/draw/start.md | 8 +++--- guide/install/draw/worker/start.md | 4 +-- guide/install/editor/miniapp/start.md | 4 +-- guide/install/editor/start.md | 8 +++--- guide/install/editor/worker/start.md | 4 +-- guide/install/game/miniapp/start.md | 4 +-- guide/install/game/start.md | 8 +++--- guide/install/game/worker/start.md | 4 +-- guide/install/ui/miniapp/start.md | 4 +-- guide/install/ui/start.md | 8 +++--- guide/install/ui/worker/start.md | 4 +-- plugin/in/animate/index.md | 8 +++--- plugin/in/arrow/index.md | 4 +-- plugin/in/color/index.md | 4 +-- plugin/in/editor/index.md | 16 +++-------- plugin/in/export/index.md | 4 +-- plugin/in/find/index.md | 4 +-- plugin/in/flow/index.md | 8 +++--- plugin/in/html/index.md | 4 +-- plugin/in/motion-path/index.md | 4 +-- plugin/in/resize/index.md | 4 +-- plugin/in/robot/index.md | 4 +-- plugin/in/scroll/index.md | 4 +-- plugin/in/state/index.md | 4 +-- plugin/in/text-editor/index.md | 4 +-- plugin/in/view/index.md | 4 +-- plugin/in/viewport/index.md | 4 +-- reference/display/Leafer.md | 2 +- reference/property/export.md | 3 ++- update/index.md | 38 +++++++++++++++++++++++++++ 35 files changed, 121 insertions(+), 88 deletions(-) diff --git a/contribute/index.md b/contribute/index.md index 948ed6a..5d9feab 100644 --- a/contribute/index.md +++ b/contribute/index.md @@ -88,6 +88,8 @@ ## 产品 +[边框水印精灵](https://frameelf.com) 快速为您的照片添加水印 @ozar + [fig2leafer](https://fig2leafer.netlify.app) leafer 渲染 figma 文件 [@jianghanyue](https://github.com/jianghanyue) [趣设计](https://www.leaferjs.com/ui/guide/install/ui/miniapp/start.html#%E9%87%87%E7%94%A8%E5%B0%8F%E7%A8%8B%E5%BA%8F-web-view-%E7%BB%84%E4%BB%B6%E5%AE%9E%E7%8E%B0%E7%9A%84%E6%A1%88%E4%BE%8B) PS 海报头像拼图 LOGO @BO diff --git a/create/leafer.md b/create/leafer.md index b64ad79..13499ef 100644 --- a/create/leafer.md +++ b/create/leafer.md @@ -63,8 +63,8 @@ npm create leafer@latest update Fetching Leafer version... The following Leafer dependencies can be updated: { - "leafer-editor": "^1.3.2", - "@leafer-in/animate": "^1.3.2" + "leafer-editor": "^1.3.3", + "@leafer-in/animate": "^1.3.3" } Do you want to update them? yes Dependencies updated successfully! Please run npm install to install the latest versions. diff --git a/guide/framework/html.md b/guide/framework/html.md index b2fc821..333baec 100644 --- a/guide/framework/html.md +++ b/guide/framework/html.md @@ -15,7 +15,7 @@ import Case from '/component/Case.vue' ::: code-group ```html [web.min] - + + ``` ```html [module] ``` diff --git a/guide/index.md b/guide/index.md index 2246c97..fa4fec8 100644 --- a/guide/index.md +++ b/guide/index.md @@ -47,7 +47,7 @@ LeaferJS 是一款好用的 Canvas 引擎,革新的开发体验,可用于高 ::: tip 提交模版 **【Bug/建议】xxxxxxxxxxx 标题 xxxxxxxxxxxxxx** -环境:电脑 + window 11 + chrome 131 + leaferjs 1.3.2 +环境:电脑 + window 11 + chrome 131 + leaferjs 1.3.3 ::: @@ -62,7 +62,7 @@ LeaferJS 是一款好用的 Canvas 引擎,革新的开发体验,可用于高 ::: warning 提交模版 **【leaferjs】xxxxxxxxxxx 标题 xxxxxxxxxxxxxx** -环境:电脑 + window 11 + chrome 131 + leaferjs 1.3.2 +环境:电脑 + window 11 + chrome 131 + leaferjs 1.3.3 ::: 然后将链接发到 [技术交流群](https://leaferjs.com/#contact) 里,我和社区管理员们会安排固定的时间查看、回复大家的问题。 diff --git a/guide/install/draw/miniapp/start.md b/guide/install/draw/miniapp/start.md index 1ec944a..c8c70b0 100644 --- a/guide/install/draw/miniapp/start.md +++ b/guide/install/draw/miniapp/start.md @@ -32,9 +32,9 @@ bun add @leafer-draw/miniapp ```sh -https://unpkg.com/@leafer-draw/miniapp@1.3.2/dist/miniapp.module.js +https://unpkg.com/@leafer-draw/miniapp@1.3.3/dist/miniapp.module.js -https://unpkg.com/@leafer-draw/miniapp@1.3.2/dist/miniapp.module.min.js +https://unpkg.com/@leafer-draw/miniapp@1.3.3/dist/miniapp.module.min.js ``` diff --git a/guide/install/draw/start.md b/guide/install/draw/start.md index b3b82b5..4fd68f7 100644 --- a/guide/install/draw/start.md +++ b/guide/install/draw/start.md @@ -32,7 +32,7 @@ bun add leafer-draw ::: code-group ```html [web.min] - + + ``` ```html [module] ``` diff --git a/guide/install/draw/worker/start.md b/guide/install/draw/worker/start.md index 2092e4c..90bc8e5 100644 --- a/guide/install/draw/worker/start.md +++ b/guide/install/draw/worker/start.md @@ -33,11 +33,11 @@ bun add @leafer-draw/worker ::: code-group ```js [worker.min.js] -importScripts('https://unpkg.com/@leafer-draw/worker@1.3.2/dist/worker.min.js') +importScripts('https://unpkg.com/@leafer-draw/worker@1.3.3/dist/worker.min.js') ``` ```js [worker.js] -importScripts('https://unpkg.com/@leafer-draw/worker@1.3.2/dist/worker.js') +importScripts('https://unpkg.com/@leafer-draw/worker@1.3.3/dist/worker.js') ``` ::: diff --git a/guide/install/editor/miniapp/start.md b/guide/install/editor/miniapp/start.md index b9ed9f2..21830dc 100644 --- a/guide/install/editor/miniapp/start.md +++ b/guide/install/editor/miniapp/start.md @@ -32,9 +32,9 @@ bun add @leafer-editor/miniapp ```sh -https://unpkg.com/@leafer-editor/miniapp@1.3.2/dist/miniapp.module.js +https://unpkg.com/@leafer-editor/miniapp@1.3.3/dist/miniapp.module.js -https://unpkg.com/@leafer-editor/miniapp@1.3.2/dist/miniapp.module.min.js +https://unpkg.com/@leafer-editor/miniapp@1.3.3/dist/miniapp.module.min.js ``` diff --git a/guide/install/editor/start.md b/guide/install/editor/start.md index 9d4074b..d42b84e 100644 --- a/guide/install/editor/start.md +++ b/guide/install/editor/start.md @@ -37,7 +37,7 @@ bun add leafer-editor ::: code-group ```html [web.min] - + + ``` @@ -69,7 +69,7 @@ bun add leafer-editor Leafer, Editor, Arrow, - } from 'https://unpkg.com/leafer-editor@1.3.2/dist/web.module.js' + } from 'https://unpkg.com/leafer-editor@1.3.3/dist/web.module.js' // ... ``` diff --git a/guide/install/editor/worker/start.md b/guide/install/editor/worker/start.md index da4a461..44ee845 100644 --- a/guide/install/editor/worker/start.md +++ b/guide/install/editor/worker/start.md @@ -34,12 +34,12 @@ bun add @leafer-editor/worker ```js [worker.min.js] importScripts( - 'https://unpkg.com/@leafer-editor/worker@1.3.2/dist/worker.min.js' + 'https://unpkg.com/@leafer-editor/worker@1.3.3/dist/worker.min.js' ) ``` ```js [worker.js] -importScripts('https://unpkg.com/@leafer-editor/worker@1.3.2/dist/worker.js') +importScripts('https://unpkg.com/@leafer-editor/worker@1.3.3/dist/worker.js') ``` ::: diff --git a/guide/install/game/miniapp/start.md b/guide/install/game/miniapp/start.md index 2103fd7..d49a40a 100644 --- a/guide/install/game/miniapp/start.md +++ b/guide/install/game/miniapp/start.md @@ -32,9 +32,9 @@ bun add @leafer-game/miniapp ```sh -https://unpkg.com/@leafer-game/miniapp@1.3.2/dist/miniapp.module.js +https://unpkg.com/@leafer-game/miniapp@1.3.3/dist/miniapp.module.js -https://unpkg.com/@leafer-game/miniapp@1.3.2/dist/miniapp.module.min.js +https://unpkg.com/@leafer-game/miniapp@1.3.3/dist/miniapp.module.min.js ``` diff --git a/guide/install/game/start.md b/guide/install/game/start.md index 1864717..371c3e4 100644 --- a/guide/install/game/start.md +++ b/guide/install/game/start.md @@ -37,7 +37,7 @@ bun add leafer-game ::: code-group ```html [web.min] - + + ``` @@ -69,7 +69,7 @@ bun add leafer-game Leafer, Editor, Arrow, - } from 'https://unpkg.com/leafer-game@1.3.2/dist/web.module.js' + } from 'https://unpkg.com/leafer-game@1.3.3/dist/web.module.js' // ... ``` diff --git a/guide/install/game/worker/start.md b/guide/install/game/worker/start.md index 39818e3..f39d265 100644 --- a/guide/install/game/worker/start.md +++ b/guide/install/game/worker/start.md @@ -33,11 +33,11 @@ bun add @leafer-game/worker ::: code-group ```js [worker.min.js] -importScripts('https://unpkg.com/@leafer-game/worker@1.3.2/dist/worker.min.js') +importScripts('https://unpkg.com/@leafer-game/worker@1.3.3/dist/worker.min.js') ``` ```js [worker.js] -importScripts('https://unpkg.com/@leafer-game/worker@1.3.2/dist/worker.js') +importScripts('https://unpkg.com/@leafer-game/worker@1.3.3/dist/worker.js') ``` ::: diff --git a/guide/install/ui/miniapp/start.md b/guide/install/ui/miniapp/start.md index 55c5955..fcc5c81 100644 --- a/guide/install/ui/miniapp/start.md +++ b/guide/install/ui/miniapp/start.md @@ -46,9 +46,9 @@ var __TEMP2__ =__TEMP__; Object.defineProperty(exports, k, { enumerable: true, c ```sh -https://unpkg.com/@leafer-ui/miniapp@1.3.2/dist/miniapp.module.js +https://unpkg.com/@leafer-ui/miniapp@1.3.3/dist/miniapp.module.js -https://unpkg.com/@leafer-ui/miniapp@1.3.2/dist/miniapp.module.min.js +https://unpkg.com/@leafer-ui/miniapp@1.3.3/dist/miniapp.module.min.js ``` ## 环境 diff --git a/guide/install/ui/start.md b/guide/install/ui/start.md index 915612d..804bcf0 100644 --- a/guide/install/ui/start.md +++ b/guide/install/ui/start.md @@ -45,7 +45,7 @@ bun add leafer-ui ::: code-group ```html [web.min] - + + ``` ```html [module] ``` diff --git a/guide/install/ui/worker/start.md b/guide/install/ui/worker/start.md index 64a8ed9..2de3b00 100644 --- a/guide/install/ui/worker/start.md +++ b/guide/install/ui/worker/start.md @@ -33,11 +33,11 @@ bun add @leafer-ui/worker ::: code-group ```js [worker.min.js] -importScripts('https://unpkg.com/@leafer-ui/worker@1.3.2/dist/worker.min.js') +importScripts('https://unpkg.com/@leafer-ui/worker@1.3.3/dist/worker.min.js') ``` ```js [worker.js] -importScripts('https://unpkg.com/@leafer-ui/worker@1.3.2/dist/worker.js') +importScripts('https://unpkg.com/@leafer-ui/worker@1.3.3/dist/worker.js') ``` ::: diff --git a/plugin/in/animate/index.md b/plugin/in/animate/index.md index 5311f23..c19b0b5 100644 --- a/plugin/in/animate/index.md +++ b/plugin/in/animate/index.md @@ -46,16 +46,16 @@ bun add @leafer-in/color ::: code-group ```html [animate.min] - - + + ``` ```html [animate] - - + + diff --git a/plugin/in/arrow/index.md b/plugin/in/arrow/index.md index dda1801..ff86d29 100644 --- a/plugin/in/arrow/index.md +++ b/plugin/in/arrow/index.md @@ -42,14 +42,14 @@ bun add @leafer-in/arrow ::: code-group ```html [arrow.min] - + ``` ```html [arrow] - + diff --git a/plugin/in/color/index.md b/plugin/in/color/index.md index b4add90..fa0c224 100644 --- a/plugin/in/color/index.md +++ b/plugin/in/color/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/color ::: code-group ```html [color.min] - + ``` ```html [color] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/editor/index.md b/plugin/in/editor/index.md index f6cc2c7..4c909a2 100644 --- a/plugin/in/editor/index.md +++ b/plugin/in/editor/index.md @@ -24,25 +24,21 @@ web 版、小程序版。暂时与有 [自动布局](/plugin/in/flow/) 的元素 ```sh[npm] npm install @leafer-in/editor -npm install @leafer-in/find npm install @leafer-in/resize ``` ```sh[pnpm] pnpm add @leafer-in/editor -pnpm add @leafer-in/find pnpm add @leafer-in/resize ``` ```sh[yarn] yarn add @leafer-in/editor -yarn add @leafer-in/find yarn add @leafer-in/resize ``` ```sh[bun] bun add @leafer-in/editor -bun add @leafer-in/find bun add @leafer-in/resize ``` @@ -54,18 +50,16 @@ bun add @leafer-in/resize ::: code-group ```html [editor.min] - - - + + ``` ```html [editor] - - - + + @@ -76,8 +70,6 @@ https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm ## 依赖插件 -### [查找元素 插件](/plugin/in/find/index.md) - ### [resize 插件](/plugin/in/resize/) ## 开始体验 diff --git a/plugin/in/export/index.md b/plugin/in/export/index.md index 1a1dee9..159e67b 100644 --- a/plugin/in/export/index.md +++ b/plugin/in/export/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/export ::: code-group ```html [export.min] - + ``` ```html [export] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/find/index.md b/plugin/in/find/index.md index 5291be3..0d593f2 100644 --- a/plugin/in/find/index.md +++ b/plugin/in/find/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/find ::: code-group ```html [find.min] - + ``` ```html [find] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/flow/index.md b/plugin/in/flow/index.md index 1f9231c..c542f84 100644 --- a/plugin/in/flow/index.md +++ b/plugin/in/flow/index.md @@ -46,16 +46,16 @@ bun add @leafer-in/resize ::: code-group ```html [flow.min] - - + + ``` ```html [flow] - - + + diff --git a/plugin/in/html/index.md b/plugin/in/html/index.md index 55f0f3e..12517bf 100644 --- a/plugin/in/html/index.md +++ b/plugin/in/html/index.md @@ -42,14 +42,14 @@ bun add @leafer-in/html ::: code-group ```html [html.min] - + ``` ```html [html] - + diff --git a/plugin/in/motion-path/index.md b/plugin/in/motion-path/index.md index cc27510..c9711d3 100644 --- a/plugin/in/motion-path/index.md +++ b/plugin/in/motion-path/index.md @@ -42,11 +42,11 @@ bun add @leafer-in/motion-path ::: code-group ```html [motion-path.min] - + ``` ```html [motion-path] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/resize/index.md b/plugin/in/resize/index.md index 5e64829..92a4164 100644 --- a/plugin/in/resize/index.md +++ b/plugin/in/resize/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/resize ::: code-group ```html [resize.min] - + ``` ```html [resize] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/robot/index.md b/plugin/in/robot/index.md index d43d94b..ccadd86 100644 --- a/plugin/in/robot/index.md +++ b/plugin/in/robot/index.md @@ -44,14 +44,14 @@ bun add @leafer-in/robot ::: code-group ```html [robot.min] - + ``` ```html [robot] - + diff --git a/plugin/in/scroll/index.md b/plugin/in/scroll/index.md index 24bcbd7..5ebcccc 100644 --- a/plugin/in/scroll/index.md +++ b/plugin/in/scroll/index.md @@ -36,14 +36,14 @@ bun add @leafer-in/scroll ::: code-group ```html [scroll.min] - + ``` ```html [scroll] - + diff --git a/plugin/in/state/index.md b/plugin/in/state/index.md index ede33e8..fd2e97b 100644 --- a/plugin/in/state/index.md +++ b/plugin/in/state/index.md @@ -40,11 +40,11 @@ bun add @leafer-in/state ::: code-group ```html [state.min] - + ``` ```html [state] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/text-editor/index.md b/plugin/in/text-editor/index.md index c85302a..5e66a9a 100644 --- a/plugin/in/text-editor/index.md +++ b/plugin/in/text-editor/index.md @@ -48,14 +48,14 @@ bun add @leafer-in/text-editor ::: code-group ```html [text-editor.min] - + ``` ```html [text-editor] - + diff --git a/plugin/in/view/index.md b/plugin/in/view/index.md index dd6c6b0..2db80cc 100644 --- a/plugin/in/view/index.md +++ b/plugin/in/view/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/view ::: code-group ```html [view.min] - + ``` ```html [view] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/plugin/in/viewport/index.md b/plugin/in/viewport/index.md index 4fd6bff..22014af 100644 --- a/plugin/in/viewport/index.md +++ b/plugin/in/viewport/index.md @@ -36,11 +36,11 @@ bun add @leafer-in/viewport ::: code-group ```html [viewport.min] - + ``` ```html [viewport] - + ``` https://unpkg.com 无法访问时,可替换为 https://cdn.jsdelivr.net/npm diff --git a/reference/display/Leafer.md b/reference/display/Leafer.md index 6bbfeaf..5253661 100644 --- a/reference/display/Leafer.md +++ b/reference/display/Leafer.md @@ -14,7 +14,7 @@ Leafer  >  [Group](./Group.md)  >  [UI](./UI.md) ## 版本号 -当前的版本号,默认为 `1.3.2`。 +当前的版本号,默认为 `1.3.3`。 ```ts import { version } from 'leafer-ui' diff --git a/reference/property/export.md b/reference/property/export.md index ac9b7e3..a5da6d7 100644 --- a/reference/property/export.md +++ b/reference/property/export.md @@ -23,7 +23,7 @@ options 为数字时表示图片质量, 为布尔时表示二进制数据 。 ::: ```ts -type IExportFileType = 'canvas' | 'json' | 'jpg' | 'png' | 'webp' // 后续会支持svg、pdf +type IExportFileType = 'canvas' | 'json' | 'jpg' | 'png' | 'webp' | 'bmp' // 后续会支持svg、pdf, bmp 格式需平台自身支持 interface IExportOptions { quality?: number // 设置 jpg / webp 的图片质量 @@ -33,6 +33,7 @@ interface IExportOptions { scale?: number | IPointData // 缩放比例,默认为1,可用于生成小尺寸的缩略图 size?: number | ISizeData // 导出宽高(拉伸), 自动换算出缩放比例 scale + padding?: number | number[] // 设置一个padding, 支持数字或数组 [top, right, bottom, left] pixelRatio?: number // 像素比,默认为1倍图,可导出适配高清屏的2倍图、3倍图... smooth?: boolean // 设置画布的平滑绘制属性,默认同当前leafer画布 diff --git a/update/index.md b/update/index.md index 81284df..5b22677 100644 --- a/update/index.md +++ b/update/index.md @@ -10,6 +10,44 @@ ::: +## 2025 / 01 / 20 + +> v1.3.3 + +#### 🍇 社区 + +\- 🌸 [边框水印精灵](https://frameelf.com) 快速为您的照片添加水印 @ozar + +\- 🌸 骨骼动画插件(已完成,待发布) [@小羽](https://github.com/sulgweb) + +#### 🌱 新增 + +\- 🌸 导出图片增加 [padding](/reference/property/export.md) 参数 + +\- 🌸 导出图片增加 bmp 格式,需平台自身支持 + +#### 🪲 修复 + +\- 🌸 动画参数 loop 偶数循环的终点不正确 + +\- 🌸 交互状态 [state](/reference/property/state/state.md) 无法传递给子元素 + +\- 🌸 Box 的长宽未设置时,其内部元素移动后,Box 渲染错误 + +\- 阴影 中的 color 使用对象形式时不生效 + +#### 🌿 优化 + +\- 🌸 提供元素当前形状转路径 [path](/reference/property/path.md#path-ipathstring-ipathcommanddata) 属性的示例 + +\- 🌸 提供保持原位不动,切换 [origin](/reference/property/origin.md#origin-ialign-iunitpointdata) / [around](/reference/property/around.md#around-ialign-iunitpointdata) 点的示例 + +\- 从 [图形编辑器插件](/plugin/in/editor/index.md) 中剥离出 [查找元素插件](/plugin/in/find/index.md) 依赖 + +#### 🌷 感谢反馈 + +[@zhangsh666](https://github.com/zhangsh666) [@gavinkeh](https://github.com/gavinkeh) [@wzjiscode](https://github.com/wzjiscode) [@RJM1996](https://github.com/RJM1996) @BO @xiaou @Ethan @流云思水 @上了理想的当 @理直气壮张宝华 + ## 2025 / 01 / 09 > v1.3.2