Skip to content

Commit

Permalink
Merge pull request #531 from VisActor/release/0.14.2
Browse files Browse the repository at this point in the history
[Auto release] release 0.14.2
  • Loading branch information
xile611 authored Sep 3, 2024
2 parents 6846a80 + d7471e7 commit ab20046
Show file tree
Hide file tree
Showing 24 changed files with 157 additions and 111 deletions.
96 changes: 48 additions & 48 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vgrammarMain","version":"0.14.1","mainProject":"@visactor/vgrammar-core","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vgrammarMain","version":"0.14.2","mainProject":"@visactor/vgrammar-core","nextBump":"patch"}]
20 changes: 10 additions & 10 deletions docs/dev-demos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
"@internal/eslint-config": "workspace:*",
"@internal/ts-config": "workspace:*",
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar": "workspace:0.14.1",
"@visactor/vgrammar-core": "workspace:0.14.1",
"@visactor/vgrammar-hierarchy": "workspace:0.14.1",
"@visactor/vgrammar-sankey": "workspace:0.14.1",
"@visactor/vgrammar-projection": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.1",
"@visactor/vgrammar-plot": "workspace:0.14.1",
"@visactor/vgrammar": "workspace:0.14.2",
"@visactor/vgrammar-core": "workspace:0.14.2",
"@visactor/vgrammar-hierarchy": "workspace:0.14.2",
"@visactor/vgrammar-sankey": "workspace:0.14.2",
"@visactor/vgrammar-projection": "workspace:0.14.2",
"@visactor/vgrammar-wordcloud": "workspace:0.14.2",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.2",
"@visactor/vgrammar-plot": "workspace:0.14.2",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
"@visactor/vrender": "0.20.1",
"d3-scale-chromatic": "^3.0.0",
"lodash": "4.17.21",
"typescript": "4.9.5",
"vite": "3.2.6",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@visactor/vgrammar-util": "workspace:0.14.2",
"@visactor/vgrammar-coordinate": "workspace:0.14.2",
"@vitejs/plugin-react": "3.1.0"
}
}
22 changes: 11 additions & 11 deletions docs/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
"dependencies": {
"@arco-design/web-react": "2.46.1",
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar": "workspace:0.14.1",
"@visactor/vgrammar-core": "workspace:0.14.1",
"@visactor/vgrammar-hierarchy": "workspace:0.14.1",
"@visactor/vgrammar-sankey": "workspace:0.14.1",
"@visactor/vgrammar-projection": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud": "workspace:0.14.1",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.1",
"@visactor/vgrammar-plot": "workspace:0.14.1",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@visactor/vgrammar-venn": "workspace:0.14.1",
"@visactor/vgrammar": "workspace:0.14.2",
"@visactor/vgrammar-core": "workspace:0.14.2",
"@visactor/vgrammar-hierarchy": "workspace:0.14.2",
"@visactor/vgrammar-sankey": "workspace:0.14.2",
"@visactor/vgrammar-projection": "workspace:0.14.2",
"@visactor/vgrammar-wordcloud": "workspace:0.14.2",
"@visactor/vgrammar-wordcloud-shape": "workspace:0.14.2",
"@visactor/vgrammar-plot": "workspace:0.14.2",
"@visactor/vgrammar-util": "workspace:0.14.2",
"@visactor/vgrammar-coordinate": "workspace:0.14.2",
"@visactor/vgrammar-venn": "workspace:0.14.2",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
"@visactor/vrender": "0.20.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/vgrammar-coordinate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vgrammar-coordinate",
"version": "0.14.1",
"version": "0.14.2",
"description": "Coordinates for VGrammar",
"keywords": [
"coordinate",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@visactor/vutils": "~0.18.15",
"@visactor/vgrammar-util": "workspace:0.14.1"
"@visactor/vgrammar-util": "workspace:0.14.2"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
15 changes: 15 additions & 0 deletions packages/vgrammar-core/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@visactor/vgrammar-core",
"entries": [
{
"version": "0.14.2",
"tag": "@visactor/vgrammar-core_v0.14.2",
"date": "Mon, 02 Sep 2024 10:59:02 GMT",
"comments": {
"none": [
{
"comment": "fix: fix the issue of merging data in label component"
},
{
"comment": "fix: fix animation of word-cloud-shape\n\n"
}
]
}
},
{
"version": "0.14.1",
"tag": "@visactor/vgrammar-core_v0.14.1",
Expand Down
12 changes: 11 additions & 1 deletion packages/vgrammar-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Change Log - @visactor/vgrammar-core

This log was last generated on Mon, 02 Sep 2024 02:02:24 GMT and should not be manually modified.
This log was last generated on Mon, 02 Sep 2024 10:59:02 GMT and should not be manually modified.

## 0.14.2
Mon, 02 Sep 2024 10:59:02 GMT

### Updates

- fix: fix the issue of merging data in label component
- fix: fix animation of word-cloud-shape



## 0.14.1
Mon, 02 Sep 2024 02:02:24 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/vgrammar-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vgrammar-core",
"version": "0.14.1",
"version": "0.14.2",
"description": "VGrammar is a visual grammar library",
"keywords": [
"grammar",
Expand Down Expand Up @@ -37,8 +37,8 @@
"dependencies": {
"@visactor/vutils": "~0.18.15",
"@visactor/vdataset": "~0.18.15",
"@visactor/vgrammar-coordinate": "workspace:0.14.1",
"@visactor/vgrammar-util": "workspace:0.14.1",
"@visactor/vgrammar-coordinate": "workspace:0.14.2",
"@visactor/vgrammar-util": "workspace:0.14.2",
"@visactor/vscale": "~0.18.15",
"@visactor/vrender-core": "0.20.1",
"@visactor/vrender-kits": "0.20.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/vgrammar-core/src/component/label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const generateLabelAttributes = (
} else {
const mergeAttributes = (attributes: any, themeDatum: any) => {
const { data: labelData, ...restAttribute } = attributes;
return { data: labelData, ...merge({}, themeDatum, restAttribute) };
return { ...merge({}, themeDatum, restAttribute), data: labelData };
};
// process by order of elements
mark.elements.forEach(element => {
Expand Down
2 changes: 2 additions & 0 deletions packages/vgrammar-core/src/types/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ export interface IProgressiveGrammar {
restartProgressive: () => void;
/** 分片执行 */
evaluateProgressive: () => void;
/** 增量流程后,是否执行动画 */
canAnimateAfterProgressive: () => boolean;
}

export interface IMark extends IGrammarBase, IProgressiveGrammar {
Expand Down
4 changes: 4 additions & 0 deletions packages/vgrammar-core/src/types/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ export interface IProgressiveTransformResult<Output = any> {
progressiveRun: () => void;
/** release the progressive context */
release: () => void;
/**
* can animate after progressive
*/
canAnimate?: () => boolean;
}

export interface IProgressiveTransform<Output = any> {
Expand Down
4 changes: 4 additions & 0 deletions packages/vgrammar-core/src/view/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,10 @@ export default class View extends EventEmitter implements IView {
if (this._progressiveMarks && this._progressiveMarks.some(mark => mark.isDoingProgressive())) {
const raf = vglobal.getRequestAnimationFrame();
this._progressiveRafId = raf(this.handleProgressiveFrame);
} else if (this._progressiveMarks && this._progressiveMarks.every(mark => mark.canAnimateAfterProgressive())) {
this.animate.animate();
} else if (this._progressiveMarks) {
this._progressiveMarks = null;
}
}

Expand Down
8 changes: 8 additions & 0 deletions packages/vgrammar-core/src/view/mark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,14 @@ export class Mark extends GrammarBase implements IMark {
return this.renderContext && (!!this.renderContext.progressive || !!this.renderContext.beforeTransformProgressive);
}

canAnimateAfterProgressive() {
return (
this.renderContext &&
this.renderContext.beforeTransformProgressive &&
this.renderContext.beforeTransformProgressive.canAnimate()
);
}

isDoingProgressive() {
return (
this.renderContext &&
Expand Down
Loading

0 comments on commit ab20046

Please sign in to comment.