Skip to content

Commit

Permalink
Merge b89f166 into 5432c47
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed Jan 17, 2023
2 parents 5432c47 + b89f166 commit 8ca9d06
Show file tree
Hide file tree
Showing 57 changed files with 128 additions and 115 deletions.
13 changes: 13 additions & 0 deletions __tests__/unit/util/assert.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import {
definedProps,
formatAttributeName,
} from '../../../packages/g-lite/src/utils';
import {
isDisplayObject,
Circle,
} from '../../../packages/g-lite/src/display-objects';
import chaiAlmost from 'chai-almost';
import sinonChai from 'sinon-chai';

Expand All @@ -32,6 +36,15 @@ describe('Assert utils', () => {
expect(isSymbol(Symbol('test'))).to.be.true;
});

it('should check isDisplayObject correctly', () => {
expect(isDisplayObject(undefined)).to.be.false;
expect(isDisplayObject(null)).to.be.false;
expect(isDisplayObject('')).to.be.false;
expect(isDisplayObject(() => {})).to.be.false;
expect(isDisplayObject(20)).to.be.false;
expect(isDisplayObject(new Circle())).to.be.true;
});

it('should assert correctly', () => {
expect(() => DCHECK(true)).to.not.throw();
expect(() => DCHECK(false)).to.throw();
Expand Down
2 changes: 1 addition & 1 deletion packages/g-camera-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-camera-api",
"version": "1.0.25",
"version": "1.0.26",
"description": "A simple implementation of Camera API.",
"keywords": [
"antv",
Expand Down
14 changes: 7 additions & 7 deletions packages/g-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvas",
"version": "1.9.27",
"version": "1.9.28",
"description": "A renderer implemented by Canvas 2D API",
"keywords": [
"antv",
Expand Down Expand Up @@ -32,12 +32,12 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.38",
"@antv/g-plugin-canvas-picker": "^1.8.36",
"@antv/g-plugin-canvas-renderer": "^1.7.41",
"@antv/g-plugin-dom-interaction": "^1.7.37",
"@antv/g-plugin-html-renderer": "^1.7.38",
"@antv/g-plugin-image-loader": "^1.1.39",
"@antv/g-plugin-canvas-path-generator": "^1.1.39",
"@antv/g-plugin-canvas-picker": "^1.8.37",
"@antv/g-plugin-canvas-renderer": "^1.7.42",
"@antv/g-plugin-dom-interaction": "^1.7.38",
"@antv/g-plugin-html-renderer": "^1.7.39",
"@antv/g-plugin-image-loader": "^1.1.40",
"@antv/util": "^3.3.1",
"@types/offscreencanvas": "^2019.6.4",
"tslib": "^2.3.1"
Expand Down
14 changes: 7 additions & 7 deletions packages/g-canvaskit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-canvaskit",
"version": "0.8.27",
"version": "0.8.28",
"description": "A renderer implemented by CanvasKit",
"keywords": [
"antv",
Expand Down Expand Up @@ -32,12 +32,12 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.38",
"@antv/g-plugin-canvas-picker": "^1.8.36",
"@antv/g-plugin-canvaskit-renderer": "^1.1.39",
"@antv/g-plugin-dom-interaction": "^1.7.37",
"@antv/g-plugin-html-renderer": "^1.7.38",
"@antv/g-plugin-image-loader": "^1.1.39",
"@antv/g-plugin-canvas-path-generator": "^1.1.39",
"@antv/g-plugin-canvas-picker": "^1.8.37",
"@antv/g-plugin-canvaskit-renderer": "^1.1.40",
"@antv/g-plugin-dom-interaction": "^1.7.38",
"@antv/g-plugin-html-renderer": "^1.7.39",
"@antv/g-plugin-image-loader": "^1.1.40",
"@antv/util": "^3.3.1",
"canvaskit-wasm": "^0.34.0",
"tslib": "^2.3.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/g-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-components",
"version": "1.7.36",
"version": "1.7.37",
"description": "Components for g",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-css-layout-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-css-layout-api",
"version": "1.0.25",
"version": "1.0.26",
"description": "A simple implementation of CSS Layout API.",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-css-typed-om-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-css-typed-om-api",
"version": "1.0.25",
"version": "1.0.26",
"description": "A simple implementation of CSS Typed OM API.",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-devtool/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-devtool",
"version": "0.10.36",
"version": "0.10.37",
"private": true,
"description": "devtool for g in browser",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-dom-mutation-observer-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-dom-mutation-observer-api",
"version": "1.0.25",
"version": "1.0.26",
"description": "A simple implementation of DOM MutationObserver API.",
"keywords": [
"antv",
Expand Down
6 changes: 3 additions & 3 deletions packages/g-gesture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-gesture",
"version": "0.0.62",
"version": "0.0.63",
"description": "G Gesture",
"keywords": [
"antv",
Expand Down Expand Up @@ -34,8 +34,8 @@
"eventemitter3": "^4.0.0"
},
"devDependencies": {
"@antv/g-mobile-canvas": "^0.8.36",
"@antv/g-mobile-canvas-element": "^0.6.36"
"@antv/g-mobile-canvas": "^0.8.37",
"@antv/g-mobile-canvas-element": "^0.6.37"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/g-image-exporter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-image-exporter",
"version": "0.5.37",
"version": "0.5.38",
"description": "A image exporter for G using DOM API",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-layout-blocklike/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-layout-blocklike",
"version": "1.7.36",
"version": "1.7.37",
"description": "A blocklike layout",
"keywords": [
"antv",
Expand Down
4 changes: 2 additions & 2 deletions packages/g-lite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lite",
"version": "1.0.32",
"version": "1.0.33",
"description": "A core module for rendering engine implements DOM API.",
"keywords": [
"antv",
Expand Down Expand Up @@ -32,7 +32,7 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-math": "^1.7.36",
"@antv/g-math": "^1.7.37",
"@antv/util": "^3.3.1",
"@types/offscreencanvas": "^2019.6.4",
"d3-color": "^1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lite/src/display-objects/DisplayObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type { CustomElement } from './CustomElement';
import { runtime } from '../global-runtime';

export function isDisplayObject(value: any): value is DisplayObject {
return !!(value as DisplayObject).nodeName;
return !!(value as DisplayObject)?.nodeName;
}

type ConstructorTypeOf<T> = new (...args: any[]) => T;
Expand Down
2 changes: 1 addition & 1 deletion packages/g-lottie-player/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-lottie-player",
"version": "0.0.25",
"version": "0.0.26",
"description": "A lottie player for G",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-math/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-math",
"version": "1.7.36",
"version": "1.7.37",
"description": "Geometry util",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-mobile-canvas-element/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas-element",
"version": "0.6.36",
"version": "0.6.37",
"description": "Create a CanvasLike element from existed context in mobile environment",
"keywords": [
"antv",
Expand Down
12 changes: 6 additions & 6 deletions packages/g-mobile-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-canvas",
"version": "0.8.36",
"version": "0.8.37",
"description": "A renderer implemented with Canvas2D API in mobile environment",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,11 +30,11 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.38",
"@antv/g-plugin-canvas-picker": "^1.8.36",
"@antv/g-plugin-canvas-renderer": "^1.7.41",
"@antv/g-plugin-image-loader": "^1.1.39",
"@antv/g-plugin-mobile-interaction": "^0.7.36",
"@antv/g-plugin-canvas-path-generator": "^1.1.39",
"@antv/g-plugin-canvas-picker": "^1.8.37",
"@antv/g-plugin-canvas-renderer": "^1.7.42",
"@antv/g-plugin-image-loader": "^1.1.40",
"@antv/g-plugin-mobile-interaction": "^0.7.37",
"@antv/util": "^3.3.1",
"tslib": "^2.3.1"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/g-mobile-svg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-svg",
"version": "0.8.35",
"version": "0.8.36",
"description": "A renderer implemented by SVG in mobile environment",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,9 +30,9 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-mobile-interaction": "^0.7.36",
"@antv/g-plugin-svg-picker": "^1.7.37",
"@antv/g-plugin-svg-renderer": "^1.8.35",
"@antv/g-plugin-mobile-interaction": "^0.7.37",
"@antv/g-plugin-svg-picker": "^1.7.38",
"@antv/g-plugin-svg-renderer": "^1.8.36",
"@antv/util": "^3.3.1",
"tslib": "^2.3.1"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/g-mobile-webgl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-mobile-webgl",
"version": "0.7.42",
"version": "0.7.43",
"description": "A renderer implemented by WebGL1/2 in mobile environment",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,12 +30,12 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-device-renderer": "^1.7.41",
"@antv/g-plugin-dragndrop": "^1.6.36",
"@antv/g-plugin-html-renderer": "^1.7.38",
"@antv/g-plugin-image-loader": "^1.1.39",
"@antv/g-plugin-mobile-interaction": "^0.7.36",
"@antv/g-plugin-webgl-device": "^1.7.37",
"@antv/g-plugin-device-renderer": "^1.7.42",
"@antv/g-plugin-dragndrop": "^1.6.37",
"@antv/g-plugin-html-renderer": "^1.7.39",
"@antv/g-plugin-image-loader": "^1.1.40",
"@antv/g-plugin-mobile-interaction": "^0.7.37",
"@antv/g-plugin-webgl-device": "^1.7.38",
"@antv/util": "^3.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/g-pattern/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-pattern",
"version": "1.0.6",
"version": "1.0.7",
"description": "A pattern libs for G",
"keywords": [
"antv",
Expand Down
4 changes: 2 additions & 2 deletions packages/g-plugin-3d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-3d",
"version": "1.7.38",
"version": "1.7.39",
"description": "Provide 3D extension for G",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,7 +30,7 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-shader-components": "^1.7.36",
"@antv/g-shader-components": "^1.7.37",
"gl-matrix": "^3.1.0",
"tslib": "^2.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/g-plugin-a11y/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-a11y",
"version": "0.4.36",
"version": "0.4.37",
"description": "A G plugin for accessibility",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-plugin-annotation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-annotation",
"version": "0.2.35",
"version": "0.2.36",
"description": "A G plugin for annotation",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g-plugin-box2d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-box2d",
"version": "1.7.37",
"version": "1.7.38",
"description": "A G plugin for Box2D",
"keywords": [
"antv",
Expand Down
4 changes: 2 additions & 2 deletions packages/g-plugin-canvas-path-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-canvas-path-generator",
"version": "1.1.38",
"version": "1.1.39",
"description": "A G plugin of path generator with Canvas2D API",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,7 +30,7 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-math": "^1.7.36",
"@antv/g-math": "^1.7.37",
"@antv/util": "^3.3.1",
"tslib": "^2.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/g-plugin-canvas-picker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-canvas-picker",
"version": "1.8.36",
"version": "1.8.37",
"description": "A G plugin for picking in canvas",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,7 +30,7 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-plugin-canvas-path-generator": "^1.1.38",
"@antv/g-plugin-canvas-path-generator": "^1.1.39",
"@antv/util": "^3.3.1",
"gl-matrix": "^3.1.0",
"tslib": "^2.3.1"
Expand Down
8 changes: 4 additions & 4 deletions packages/g-plugin-canvas-renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g-plugin-canvas-renderer",
"version": "1.7.41",
"version": "1.7.42",
"description": "A G plugin of renderer implementation with Canvas2D API",
"keywords": [
"antv",
Expand Down Expand Up @@ -30,9 +30,9 @@
"sync": "tnpm sync"
},
"dependencies": {
"@antv/g-math": "^1.7.36",
"@antv/g-plugin-canvas-path-generator": "^1.1.38",
"@antv/g-plugin-image-loader": "^1.1.39",
"@antv/g-math": "^1.7.37",
"@antv/g-plugin-canvas-path-generator": "^1.1.39",
"@antv/g-plugin-image-loader": "^1.1.40",
"@antv/util": "^3.3.1",
"gl-matrix": "^3.1.0",
"tslib": "^2.3.1"
Expand Down

0 comments on commit 8ca9d06

Please sign in to comment.