From ee938ca12ac343d0506b7fa41bbd27d92fdd4d28 Mon Sep 17 00:00:00 2001 From: xiaoiver Date: Tue, 9 Apr 2024 11:49:15 +0800 Subject: [PATCH] Release (#1663) * Fix rough plugin (#1661) * fix: rough plugin should allow empty fill * chore: commit changeset * fix: set dx/dy default value in a11y plugin * chore: commit changeset * chore(release): bump version (#1662) Co-authored-by: github-actions[bot] --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] --- packages/g-plugin-a11y/CHANGELOG.md | 6 ++++++ packages/g-plugin-a11y/package.json | 2 +- packages/g-plugin-a11y/src/TextExtractor.ts | 9 +++++++-- packages/g-plugin-rough-canvas-renderer/CHANGELOG.md | 6 ++++++ packages/g-plugin-rough-canvas-renderer/package.json | 2 +- packages/g-plugin-rough-canvas-renderer/src/util.ts | 2 +- packages/g-plugin-rough-svg-renderer/CHANGELOG.md | 6 ++++++ packages/g-plugin-rough-svg-renderer/package.json | 2 +- packages/g-plugin-rough-svg-renderer/src/util.ts | 2 +- 9 files changed, 30 insertions(+), 7 deletions(-) diff --git a/packages/g-plugin-a11y/CHANGELOG.md b/packages/g-plugin-a11y/CHANGELOG.md index 48e990330..5edb0abe5 100644 --- a/packages/g-plugin-a11y/CHANGELOG.md +++ b/packages/g-plugin-a11y/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-plugin-a11y +## 1.0.2 + +### Patch Changes + +- cd5197e3: Set dx/dy default value in a11y plugin. + ## 1.0.1 ### Patch Changes diff --git a/packages/g-plugin-a11y/package.json b/packages/g-plugin-a11y/package.json index 17c87dd12..97c442cb7 100644 --- a/packages/g-plugin-a11y/package.json +++ b/packages/g-plugin-a11y/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-a11y", - "version": "1.0.1", + "version": "1.0.2", "description": "A G plugin for accessibility", "keywords": [ "antv", diff --git a/packages/g-plugin-a11y/src/TextExtractor.ts b/packages/g-plugin-a11y/src/TextExtractor.ts index eba693964..362cbe517 100644 --- a/packages/g-plugin-a11y/src/TextExtractor.ts +++ b/packages/g-plugin-a11y/src/TextExtractor.ts @@ -81,8 +81,13 @@ color: transparent !important; case 'textBaseline': case 'dx': case 'dy': - const { transformOrigin, textAlign, textBaseline, dx, dy } = - text.parsedStyle as ParsedTextStyleProps; + const { + transformOrigin, + textAlign, + textBaseline, + dx = 0, + dy = 0, + } = text.parsedStyle as ParsedTextStyleProps; $el.style['transform-origin'] = `${ (transformOrigin && transformOrigin[0].value) || 0 } ${(transformOrigin && transformOrigin[1].value) || 0}`; diff --git a/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md b/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md index 531385948..08d6da266 100644 --- a/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-canvas-renderer/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-plugin-rough-canvas-renderer +## 2.0.2 + +### Patch Changes + +- cd5197e3: Should keep fill empty when undefined. + ## 2.0.1 ### Patch Changes diff --git a/packages/g-plugin-rough-canvas-renderer/package.json b/packages/g-plugin-rough-canvas-renderer/package.json index 4405e236f..5d1a1bac5 100644 --- a/packages/g-plugin-rough-canvas-renderer/package.json +++ b/packages/g-plugin-rough-canvas-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-rough-canvas-renderer", - "version": "2.0.1", + "version": "2.0.2", "description": "A G plugin of renderer implementation with rough.js", "keywords": [ "antv", diff --git a/packages/g-plugin-rough-canvas-renderer/src/util.ts b/packages/g-plugin-rough-canvas-renderer/src/util.ts index 3632a46fc..9a03f6e5a 100644 --- a/packages/g-plugin-rough-canvas-renderer/src/util.ts +++ b/packages/g-plugin-rough-canvas-renderer/src/util.ts @@ -64,7 +64,7 @@ export function generateRoughOptions(object: DisplayObject) { bowing, roughness, seed: seed || object.entity, - fill: fill ? mergeOpacity(fill, fillOpacity) : 'none', + fill: fill ? mergeOpacity(fill, fillOpacity) : undefined, stroke: stroke ? mergeOpacity(stroke, strokeOpacity) : 'none', strokeWidth: lineWidth === 0 ? MIN_STROKE_WIDTH : lineWidth, fillStyle, diff --git a/packages/g-plugin-rough-svg-renderer/CHANGELOG.md b/packages/g-plugin-rough-svg-renderer/CHANGELOG.md index d0df3ba0a..8cbc218df 100644 --- a/packages/g-plugin-rough-svg-renderer/CHANGELOG.md +++ b/packages/g-plugin-rough-svg-renderer/CHANGELOG.md @@ -1,5 +1,11 @@ # @antv/g-plugin-rough-svg-renderer +## 2.0.3 + +### Patch Changes + +- cd5197e3: Should keep fill empty when undefined. + ## 2.0.2 ### Patch Changes diff --git a/packages/g-plugin-rough-svg-renderer/package.json b/packages/g-plugin-rough-svg-renderer/package.json index 0b48069eb..b2733fdb6 100644 --- a/packages/g-plugin-rough-svg-renderer/package.json +++ b/packages/g-plugin-rough-svg-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g-plugin-rough-svg-renderer", - "version": "2.0.2", + "version": "2.0.3", "description": "A G plugin of renderer implementation with rough.js", "keywords": [ "antv", diff --git a/packages/g-plugin-rough-svg-renderer/src/util.ts b/packages/g-plugin-rough-svg-renderer/src/util.ts index 07eddcedc..4e6e588cd 100644 --- a/packages/g-plugin-rough-svg-renderer/src/util.ts +++ b/packages/g-plugin-rough-svg-renderer/src/util.ts @@ -89,7 +89,7 @@ export function generateRoughOptions(object: DisplayObject) { // If seed is not defined, or set to 0, no seed is used when computing random values. // @see https://github.com/rough-stuff/rough/wiki#seed seed: seed || object.entity, - fill: fill ? mergeOpacity(fill, fillOpacity) : 'none', + fill: fill ? mergeOpacity(fill, fillOpacity) : undefined, stroke: stroke ? mergeOpacity(stroke, strokeOpacity) : 'none', strokeWidth: lineWidth === 0 ? MIN_STROKE_WIDTH : lineWidth, fillStyle,