Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #1782

Merged
merged 6 commits into from
Sep 27, 2024
Merged

Release #1782

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": [
"@commitlint/config-angular"
],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"ci",
"docs",
"site",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"chore"
]
],
"header-max-length": [
2,
"always",
100
]
}
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ rollup.config.js
site
rust
__tests__
scripts
23 changes: 23 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"globals": { "G": true, "window": true, "document": true, "module": true },
"ignorePatterns": ["packages/g-devtool", "packages/g-webgpu-compiler", "packages/site"],
"rules": {
"no-fallthrough": 0,
"no-empty": 0,
"no-param-reassign": 0,
"no-redeclare": "off",
"no-useless-escape": "off",
"no-case-declarations": "off",
"no-constant-condition": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-shadow": 0,
"@typescript-eslint/no-parameter-properties": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-invalid-this": 0,
"@typescript-eslint/no-use-before-define": ["error", { "functions": false, "classes": false }],
"@typescript-eslint/no-redeclare": ["error"],
"@typescript-eslint/no-unused-vars": ["error", { "args": "none", "ignoreRestSiblings": true }]
}
}
44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ esm
lib
dist
build
tsconfig.json
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always"
"arrowParens": "always",
"printWidth": 80,
"proseWrap": "never"
}
2 changes: 1 addition & 1 deletion __tests__/demos/2d/circle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Circle } from '../../../packages/g';
import { Circle } from '@antv/g';

export async function circle(context) {
const { canvas } = context;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/2d/clippath.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Circle, Rect, Path, Group } from '../../../packages/g';
import { Sector } from '../../../packages/g-components';
import { Circle, Rect, Path, Group } from '@antv/g';
import { Sector } from '@antv/g-components';

export async function clipPath(context) {
const { canvas } = context;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/2d/custom-element.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Path, Polyline, Line } from '../../../packages/g';
import { Arrow } from '../../../packages/g-components';
import { Path, Polyline, Line } from '@antv/g';
import { Arrow } from '@antv/g-components';

export async function customElement(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/ellipse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Ellipse } from '../../../packages/g';
import { Ellipse } from '@antv/g';

export async function ellipse(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/get-point.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Path, Polyline, Circle } from '../../../packages/g';
import { Path, Polyline, Circle } from '@antv/g';

export async function getPoint(context) {
const { canvas, gui } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/gradient.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rect, HTML, Line } from '../../../packages/g';
import { Rect, HTML, Line } from '@antv/g';

export async function gradient(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/html.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HTML, Line, Rect, Text, CustomElement } from '../../../packages/g';
import { HTML, Line, Rect, Text, CustomElement } from '@antv/g';

export async function html(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/image.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Image } from '../../../packages/g';
import { Image } from '@antv/g';

export async function image(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/line.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Line } from '../../../packages/g';
import { Line } from '@antv/g';

export async function line(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/marker.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Path, Circle, Line, Rect, Image } from '../../../packages/g';
import { Path, Circle, Line } from '@antv/g';

export async function marker(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Path, Rect, Group } from '../../../packages/g';
import { Path } from '@antv/g';

export async function path(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/pattern.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rect, HTML } from '../../../packages/g';
import { Rect, HTML } from '@antv/g';
import SimplexNoise from 'simplex-noise';

/**
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/2d/pattern2.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Circle, Rect } from '../../../packages/g';
import { dots, lines } from '../../../packages/g-pattern';
import { Circle, Rect } from '@antv/g';
import { dots, lines } from '@antv/g-pattern';
import * as d3 from 'd3';

export async function pattern2(context) {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/polygon.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Polygon } from '../../../packages/g';
import { Polygon } from '@antv/g';

export async function polygon(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/polyline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Polyline } from '../../../packages/g';
import { Polyline } from '@antv/g';

export async function polyline(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/rect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rect } from '../../../packages/g';
import { Rect } from '@antv/g';

export async function rect(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/text.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Text, Group } from '../../../packages/g';
import { Text } from '@antv/g';

export async function text(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/transform-group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CanvasEvent, Circle, Rect, Path, Group } from '../../../packages/g';
import { CanvasEvent, Circle, Rect, Group } from '@antv/g';

export async function transformGroup(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/transform-origin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Circle, Line, Group } from '../../../packages/g';
import { Circle, Line, Group } from '@antv/g';

/**
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/transform-skew.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rect } from '../../../packages/g';
import { Rect } from '@antv/g';

/**
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skewX
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/transform-text.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Circle, Text } from '../../../packages/g';
import { Circle, Text } from '@antv/g';

export async function transformText(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/transform.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CanvasEvent, Circle, Rect, Path, Group } from '../../../packages/g';
import { Circle, Rect, Group } from '@antv/g';

export async function transform(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/2d/z-index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Rect, Text } from '../../../packages/g';
import { Rect, Text } from '@antv/g';

export async function zIndex(context) {
const { canvas, gui } = context;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/3d/cube.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
CubeGeometry,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';

export async function cube(context) {
const { canvas, renderer } = context;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/3d/cylinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
DirectionalLight,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';

export async function cylinder(context) {
const { canvas, renderer } = context;
Expand Down
15 changes: 4 additions & 11 deletions __tests__/demos/3d/force.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@ import {
forceManyBody,
forceCenter,
} from 'd3-force-3d';
import {
Line,
Text,
Rect,
Image,
Circle,
CanvasEvent,
} from '../../../packages/g';
import { Line, Text, CanvasEvent } from '@antv/g';
import {
SphereGeometry,
MeshPhongMaterial,
DirectionalLight,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
import { ARButton, DeviceRenderer } from '../../../packages/g-webgl';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';
import { ARButton } from '@antv/g-webgl';

// https://bl.ocks.org/vasturiano/f59675656258d3f490e9faa40828c0e7
const dataset = {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/demos/3d/hit-test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CanvasEvent, Canvas } from '../../../packages/g';
import { CanvasEvent, Canvas } from '@antv/g';
import {
CubeGeometry,
CylinderGeometry,
Expand All @@ -7,8 +7,8 @@ import {
DirectionalLight,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { ARButton, Renderer } from '../../../packages/g-webgl';
} from '@antv/g-plugin-3d';
import { ARButton, Renderer } from '@antv/g-webgl';

/**
* @see https://github.com/immersive-web/webxr-samples/blob/main/hit-test.html
Expand Down
6 changes: 3 additions & 3 deletions __tests__/demos/3d/sphere.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { CanvasEvent } from '../../../packages/g';
import { CanvasEvent } from '@antv/g';
import {
MeshPhongMaterial,
SphereGeometry,
Mesh,
Plugin as Plugin3D,
DirectionalLight,
AmbientLight,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';

export async function sphere(context) {
const { canvas, renderer } = context;
Expand Down
4 changes: 2 additions & 2 deletions __tests__/demos/3d/torus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
DirectionalLight,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';

export async function torus(context) {
const { canvas, renderer } = context;
Expand Down
8 changes: 4 additions & 4 deletions __tests__/demos/3d/webar.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { CanvasEvent } from '../../../packages/g';
import { CanvasEvent } from '@antv/g';
import {
MeshBasicMaterial,
CubeGeometry,
Mesh,
Plugin as Plugin3D,
} from '../../../packages/g-plugin-3d';
import { Plugin as PluginControl } from '../../../packages/g-plugin-control';
import { ARButton, DeviceRenderer } from '../../../packages/g-webgl';
} from '@antv/g-plugin-3d';
import { Plugin as PluginControl } from '@antv/g-plugin-control';
import { ARButton, DeviceRenderer } from '@antv/g-webgl';

export async function ar(context) {
const { canvas, renderer, container } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/animation/convert-to-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Polygon,
Rect,
convertToPath,
} from '../../../packages/g';
} from '@antv/g';

export async function convert2Path(context) {
const { canvas } = context;
Expand Down
2 changes: 1 addition & 1 deletion __tests__/demos/animation/effect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Circle, Group, Text } from '../../../packages/g';
import { Circle, Group, Text } from '@antv/g';

/**
* ported from https://github.com/wellyshen/use-web-animations/tree/master/src/animations
Expand Down
Loading
Loading