diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 107aea6ee..72bb6be83 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -14,7 +14,7 @@ importers: '@types/react-dom': ^18.0.0 '@visactor/vchart': 1.3.0 '@visactor/vgrammar': ~0.5.7 - '@visactor/vrender': workspace:0.19.17 + '@visactor/vrender': workspace:0.19.18 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 @@ -71,7 +71,7 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@types/react-reconciler': ^0.28.2 - '@visactor/vrender': workspace:0.19.17 + '@visactor/vrender': workspace:0.19.18 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 cross-env: ^7.0.3 @@ -111,8 +111,8 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/react-vrender': workspace:0.19.17 - '@visactor/vrender': workspace:0.19.17 + '@visactor/react-vrender': workspace:0.19.18 + '@visactor/vrender': workspace:0.19.18 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 cross-env: ^7.0.3 @@ -153,8 +153,8 @@ importers: '@types/jest': ^26.0.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vrender-core': workspace:0.19.17 - '@visactor/vrender-kits': workspace:0.19.17 + '@visactor/vrender-core': workspace:0.19.18 + '@visactor/vrender-kits': workspace:0.19.18 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -200,8 +200,8 @@ importers: '@internal/ts-config': workspace:* '@rushstack/eslint-patch': ~1.1.4 '@types/jest': ^26.0.0 - '@visactor/vrender-core': workspace:0.19.17 - '@visactor/vrender-kits': workspace:0.19.17 + '@visactor/vrender-core': workspace:0.19.18 + '@visactor/vrender-kits': workspace:0.19.18 '@visactor/vscale': ~0.18.9 '@visactor/vutils': ~0.18.10 cross-env: ^7.0.3 @@ -287,7 +287,7 @@ importers: '@types/node-fetch': 2.6.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vrender-core': workspace:0.19.17 + '@visactor/vrender-core': workspace:0.19.18 '@visactor/vutils': ~0.18.10 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -369,10 +369,10 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/node': '*' '@types/node-fetch': 2.6.4 - '@visactor/vrender': workspace:0.19.17 - '@visactor/vrender-components': workspace:0.19.17 - '@visactor/vrender-core': workspace:0.19.17 - '@visactor/vrender-kits': workspace:0.19.17 + '@visactor/vrender': workspace:0.19.18 + '@visactor/vrender-components': workspace:0.19.18 + '@visactor/vrender-core': workspace:0.19.18 + '@visactor/vrender-kits': workspace:0.19.18 cross-env: ^7.0.3 eslint: ~8.18.0 form-data: ~4.0.0 diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index d774f89db..608e0c289 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -1 +1 @@ -[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.19.17","nextBump":"patch"}] +[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.19.18","nextBump":"patch"}] diff --git a/docs/assets/changelog/en/changelog.md b/docs/assets/changelog/en/changelog.md index 9ee2eddf2..c89a97435 100644 --- a/docs/assets/changelog/en/changelog.md +++ b/docs/assets/changelog/en/changelog.md @@ -1,3 +1,33 @@ +# v0.19.17 + +2024-07-11 + + +**What's Changed** + +* [Auto release] release 0.19.17 by @github-actions in https://github.com/VisActor/VRender/pull/1295 + + +**Full Changelog**: https://github.com/VisActor/VRender/compare/v0.19.16...v0.19.17 + +[more detail about v0.19.17](https://github.com/VisActor/VRender/releases/tag/v0.19.17) + +# v0.19.16 + +2024-07-10 + + +**🐛 Bug fix** + +- **@visactor/vrender-components**: fix the issue where the arc label is still truncated despite setting `ellipsis: false` +- **@visactor/vrender-components**: fix syncState of label when re-render stage +- **@visactor/vrender-core**: fix syncState of label when re-render stage +- **@visactor/vrender-core**: fix issue with setAttribute while play with startAt + + + +[more detail about v0.19.16](https://github.com/VisActor/VRender/releases/tag/v0.19.16) + # v0.19.15 2024-07-01 diff --git a/docs/assets/changelog/zh/changelog.md b/docs/assets/changelog/zh/changelog.md index 9d9da9a77..5b3fef09f 100644 --- a/docs/assets/changelog/zh/changelog.md +++ b/docs/assets/changelog/zh/changelog.md @@ -1,3 +1,33 @@ +# v0.19.17 + +2024-07-11 + + +**What's Changed** + +* [Auto release] release 0.19.17 by @github-actions in https://github.com/VisActor/VRender/pull/1295 + + +**Full Changelog**: https://github.com/VisActor/VRender/compare/v0.19.16...v0.19.17 + +[更多详情请查看 v0.19.17](https://github.com/VisActor/VRender/releases/tag/v0.19.17) + +# v0.19.16 + +2024-07-10 + + +**🐛 功能修复** + +- **@visactor/vrender-components**: fix the issue where the arc label is still truncated despite setting `ellipsis: false` +- **@visactor/vrender-components**: fix syncState of label when re-render stage +- **@visactor/vrender-core**: fix syncState of label when re-render stage +- **@visactor/vrender-core**: fix issue with setAttribute while play with startAt + + + +[更多详情请查看 v0.19.16](https://github.com/VisActor/VRender/releases/tag/v0.19.16) + # v0.19.15 2024-07-01 diff --git a/docs/package.json b/docs/package.json index e57d5083d..7830bb931 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,7 +13,7 @@ "@visactor/vchart": "1.3.0", "@visactor/vutils": "~0.18.10", "@visactor/vgrammar": "~0.5.7", - "@visactor/vrender": "workspace:0.19.17", + "@visactor/vrender": "workspace:0.19.18", "markdown-it": "^13.0.0", "highlight.js": "^11.8.0", "axios": "^1.4.0", diff --git a/packages/react-vrender-utils/CHANGELOG.json b/packages/react-vrender-utils/CHANGELOG.json index 8da415609..1a6baacdc 100644 --- a/packages/react-vrender-utils/CHANGELOG.json +++ b/packages/react-vrender-utils/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/react-vrender-utils", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/react-vrender-utils_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": {} + }, { "version": "0.19.17", "tag": "@visactor/react-vrender-utils_v0.19.17", diff --git a/packages/react-vrender-utils/CHANGELOG.md b/packages/react-vrender-utils/CHANGELOG.md index 53ba99402..490b23a4f 100644 --- a/packages/react-vrender-utils/CHANGELOG.md +++ b/packages/react-vrender-utils/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/react-vrender-utils -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +_Version update only_ ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/react-vrender-utils/package.json b/packages/react-vrender-utils/package.json index b7156b85b..293228577 100644 --- a/packages/react-vrender-utils/package.json +++ b/packages/react-vrender-utils/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/react-vrender-utils", - "version": "0.19.17", + "version": "0.19.18", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "react-dom": "^18.2.0" }, "dependencies": { - "@visactor/vrender": "workspace:0.19.17", - "@visactor/react-vrender": "workspace:0.19.17", + "@visactor/vrender": "workspace:0.19.18", + "@visactor/react-vrender": "workspace:0.19.18", "@visactor/vutils": "~0.18.10", "react-reconciler": "^0.29.0", "tslib": "^2.3.1" diff --git a/packages/react-vrender/CHANGELOG.json b/packages/react-vrender/CHANGELOG.json index 991853c05..f22d22d20 100644 --- a/packages/react-vrender/CHANGELOG.json +++ b/packages/react-vrender/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/react-vrender", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/react-vrender_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": {} + }, { "version": "0.19.17", "tag": "@visactor/react-vrender_v0.19.17", diff --git a/packages/react-vrender/CHANGELOG.md b/packages/react-vrender/CHANGELOG.md index 362bb4229..307ee9f49 100644 --- a/packages/react-vrender/CHANGELOG.md +++ b/packages/react-vrender/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/react-vrender -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +_Version update only_ ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/react-vrender/package.json b/packages/react-vrender/package.json index eeffba61b..af8181a46 100644 --- a/packages/react-vrender/package.json +++ b/packages/react-vrender/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/react-vrender", - "version": "0.19.17", + "version": "0.19.18", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -23,7 +23,7 @@ "react": "^18.2.0" }, "dependencies": { - "@visactor/vrender": "workspace:0.19.17", + "@visactor/vrender": "workspace:0.19.18", "@visactor/vutils": "~0.18.10", "react-reconciler": "^0.29.0", "tslib": "^2.3.1" diff --git a/packages/vrender-components/CHANGELOG.json b/packages/vrender-components/CHANGELOG.json index 46400dac5..8fab3ae69 100644 --- a/packages/vrender-components/CHANGELOG.json +++ b/packages/vrender-components/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/vrender-components", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/vrender-components_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": {} + }, { "version": "0.19.17", "tag": "@visactor/vrender-components_v0.19.17", diff --git a/packages/vrender-components/CHANGELOG.md b/packages/vrender-components/CHANGELOG.md index a5664ed39..c73a12b7d 100644 --- a/packages/vrender-components/CHANGELOG.md +++ b/packages/vrender-components/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/vrender-components -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +_Version update only_ ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/vrender-components/package.json b/packages/vrender-components/package.json index ae7bb2817..4ee4df539 100644 --- a/packages/vrender-components/package.json +++ b/packages/vrender-components/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-components", - "version": "0.19.17", + "version": "0.19.18", "description": "components library for dp visualization", "sideEffects": false, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "analysis-core": "cross-env DEBUG='Bundler*' bundle -f umd -a -i core.ts" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.19.17", - "@visactor/vrender-kits": "workspace:0.19.17", + "@visactor/vrender-core": "workspace:0.19.18", + "@visactor/vrender-kits": "workspace:0.19.18", "@visactor/vutils": "~0.18.10", "@visactor/vscale": "~0.18.9" }, diff --git a/packages/vrender-core/CHANGELOG.json b/packages/vrender-core/CHANGELOG.json index 95b6c36d7..125e21e10 100644 --- a/packages/vrender-core/CHANGELOG.json +++ b/packages/vrender-core/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@visactor/vrender-core", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/vrender-core_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": { + "none": [ + { + "comment": "fix: support react 17 in react attributes\n\n" + } + ] + } + }, { "version": "0.19.17", "tag": "@visactor/vrender-core_v0.19.17", diff --git a/packages/vrender-core/CHANGELOG.md b/packages/vrender-core/CHANGELOG.md index 00c67319a..ea807c1bc 100644 --- a/packages/vrender-core/CHANGELOG.md +++ b/packages/vrender-core/CHANGELOG.md @@ -1,6 +1,15 @@ # Change Log - @visactor/vrender-core -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +### Updates + +- fix: support react 17 in react attributes + + ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/vrender-core/package.json b/packages/vrender-core/package.json index f739bbf6b..6aee8f2df 100644 --- a/packages/vrender-core/package.json +++ b/packages/vrender-core/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-core", - "version": "0.19.17", + "version": "0.19.18", "description": "", "sideEffects": [ "./src/modules.ts", diff --git a/packages/vrender-core/src/plugins/builtin-plugin/react-attribute-plugin.ts b/packages/vrender-core/src/plugins/builtin-plugin/react-attribute-plugin.ts index 942f7c5b9..eab886abc 100644 --- a/packages/vrender-core/src/plugins/builtin-plugin/react-attribute-plugin.ts +++ b/packages/vrender-core/src/plugins/builtin-plugin/react-attribute-plugin.ts @@ -14,7 +14,8 @@ export class ReactAttributePlugin extends HtmlAttributePlugin implements IPlugin htmlMap: Record< string, { - root: any; + root?: any; + unmount?: () => void; wrapContainer: HTMLElement; nativeContainer: HTMLElement; container: string | HTMLElement | null; @@ -27,13 +28,15 @@ export class ReactAttributePlugin extends HtmlAttributePlugin implements IPlugin return; } - const { root, wrapContainer } = this.htmlMap[id]; + const { root, wrapContainer, unmount } = this.htmlMap[id]; if (root) { const raf = application.global.getRequestAnimationFrame(); raf(() => { root.unmount(); }); + } else if (unmount) { + unmount(); } wrapContainer && application.global.removeDom(wrapContainer); @@ -52,7 +55,7 @@ export class ReactAttributePlugin extends HtmlAttributePlugin implements IPlugin } const ReactDOM = stage.params.ReactDOM; const { element, container } = react; - if (!(element && ReactDOM && ReactDOM.createRoot)) { + if (!(element && ReactDOM && (ReactDOM.createRoot || ReactDOM.render))) { return; } const id = isNil(react.id) ? `${graphic.id ?? graphic._uid}_react` : react.id; @@ -66,18 +69,35 @@ export class ReactAttributePlugin extends HtmlAttributePlugin implements IPlugin const { wrapContainer, nativeContainer } = this.getWrapContainer(stage, container); if (wrapContainer) { - const root = ReactDOM.createRoot(wrapContainer); - root.render(element); - if (!this.htmlMap) { this.htmlMap = {}; } - - this.htmlMap[id] = { root, wrapContainer, nativeContainer, container, renderId: this.renderId }; + if (ReactDOM.createRoot) { + const root = ReactDOM.createRoot(wrapContainer); + root.render(element); + + this.htmlMap[id] = { root, wrapContainer, nativeContainer, container, renderId: this.renderId }; + } else { + ReactDOM.render(element, wrapContainer); + + this.htmlMap[id] = { + wrapContainer, + nativeContainer, + container, + renderId: this.renderId, + unmount: () => { + ReactDOM.unmountComponentAtNode(wrapContainer); + } + }; + } } } else { // update react element - this.htmlMap[id].root.render(element); + if (ReactDOM.createRoot) { + this.htmlMap[id].root.render(element); + } else { + ReactDOM.render(element, this.htmlMap[id].wrapContainer); + } } if (!this.htmlMap || !this.htmlMap[id]) { diff --git a/packages/vrender-kits/CHANGELOG.json b/packages/vrender-kits/CHANGELOG.json index eee13d39c..ac567247a 100644 --- a/packages/vrender-kits/CHANGELOG.json +++ b/packages/vrender-kits/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/vrender-kits", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/vrender-kits_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": {} + }, { "version": "0.19.17", "tag": "@visactor/vrender-kits_v0.19.17", diff --git a/packages/vrender-kits/CHANGELOG.md b/packages/vrender-kits/CHANGELOG.md index 4aacd13fc..ae8d34dd4 100644 --- a/packages/vrender-kits/CHANGELOG.md +++ b/packages/vrender-kits/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/vrender-kits -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +_Version update only_ ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/vrender-kits/package.json b/packages/vrender-kits/package.json index 9073f1875..9eeec97b6 100644 --- a/packages/vrender-kits/package.json +++ b/packages/vrender-kits/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-kits", - "version": "0.19.17", + "version": "0.19.18", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -20,7 +20,7 @@ "test": "" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.19.17", + "@visactor/vrender-core": "workspace:0.19.18", "@visactor/vutils": "~0.18.10", "@resvg/resvg-js": "2.4.1", "roughjs": "4.5.2" diff --git a/packages/vrender/CHANGELOG.json b/packages/vrender/CHANGELOG.json index 8497d12f2..cb06446db 100644 --- a/packages/vrender/CHANGELOG.json +++ b/packages/vrender/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/vrender", "entries": [ + { + "version": "0.19.18", + "tag": "@visactor/vrender_v0.19.18", + "date": "Fri, 12 Jul 2024 07:18:10 GMT", + "comments": {} + }, { "version": "0.19.17", "tag": "@visactor/vrender_v0.19.17", diff --git a/packages/vrender/CHANGELOG.md b/packages/vrender/CHANGELOG.md index 8448cdd81..2509dd513 100644 --- a/packages/vrender/CHANGELOG.md +++ b/packages/vrender/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/vrender -This log was last generated on Fri, 05 Jul 2024 17:26:17 GMT and should not be manually modified. +This log was last generated on Fri, 12 Jul 2024 07:18:10 GMT and should not be manually modified. + +## 0.19.18 +Fri, 12 Jul 2024 07:18:10 GMT + +_Version update only_ ## 0.19.17 Fri, 05 Jul 2024 17:26:17 GMT diff --git a/packages/vrender/package.json b/packages/vrender/package.json index 215a20d7c..c481bd6c5 100644 --- a/packages/vrender/package.json +++ b/packages/vrender/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender", - "version": "0.19.17", + "version": "0.19.18", "description": "", "sideEffects": true, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "test-watch": "cross-env DEBUG_MODE=1 jest --watch" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.19.17", - "@visactor/vrender-kits": "workspace:0.19.17" + "@visactor/vrender-core": "workspace:0.19.18", + "@visactor/vrender-kits": "workspace:0.19.18" }, "devDependencies": { "@internal/bundler": "workspace:*", diff --git a/tools/bugserver-trigger/package.json b/tools/bugserver-trigger/package.json index c6cf5df86..ea306d305 100644 --- a/tools/bugserver-trigger/package.json +++ b/tools/bugserver-trigger/package.json @@ -8,10 +8,10 @@ "ci": "ts-node --transpileOnly --skipProject ./scripts/trigger-test.ts" }, "dependencies": { - "@visactor/vrender": "workspace:0.19.17", - "@visactor/vrender-core": "workspace:0.19.17", - "@visactor/vrender-kits": "workspace:0.19.17", - "@visactor/vrender-components": "workspace:0.19.17" + "@visactor/vrender": "workspace:0.19.18", + "@visactor/vrender-core": "workspace:0.19.18", + "@visactor/vrender-kits": "workspace:0.19.18", + "@visactor/vrender-components": "workspace:0.19.18" }, "devDependencies": { "@rushstack/eslint-patch": "~1.1.4",