@antv/g2 5.2.2 → 5.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/g2.lite.min.js +1 -1
- package/dist/g2.min.js +1 -1
- package/esm/api/library.d.ts +2 -1
- package/esm/api/library.js +5 -1
- package/esm/api/library.js.map +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js.map +1 -1
- package/lib/api/library.d.ts +2 -1
- package/lib/api/library.js +5 -1
- package/lib/api/library.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -3
- package/src/api/library.ts +6 -3
- package/src/index.ts +2 -1
package/esm/api/library.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { G2ComponentNamespaces, G2Component } from '../runtime';
|
|
2
|
+
import { type SymbolFactor } from '../utils/marker';
|
|
2
3
|
export declare const library: {};
|
|
3
|
-
export declare function register(key: `${G2ComponentNamespaces}.${any}`, component: G2Component): void;
|
|
4
|
+
export declare function register(key: `${G2ComponentNamespaces | 'symbol'}.${any}`, component: G2Component | SymbolFactor): void;
|
package/esm/api/library.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { registerSymbol } from '../utils/marker';
|
|
1
2
|
export const library = {};
|
|
2
3
|
// @todo Warn if override existing key.
|
|
3
4
|
export function register(key, component) {
|
|
4
|
-
|
|
5
|
+
if (key.startsWith('symbol.'))
|
|
6
|
+
registerSymbol(key.split('.').pop(), component);
|
|
7
|
+
else
|
|
8
|
+
Object.assign(library, { [key]: component });
|
|
5
9
|
}
|
|
6
10
|
//# sourceMappingURL=library.js.map
|
package/esm/api/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAqB,MAAM,iBAAiB,CAAC;AAEpE,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAE1B,uCAAuC;AACvC,MAAM,UAAU,QAAQ,CACtB,GAAiD,EACjD,SAAqC;IAErC,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3B,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,SAAyB,CAAC,CAAC;;QAC7D,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { corelib, plotlib, graphlib, geolib, stdlib } from './lib';
|
|
2
2
|
import { API, CompositionAPI } from './api/extend';
|
|
3
3
|
import { G2Spec } from './spec';
|
|
4
|
+
import type { SymbolFactor } from './utils/marker';
|
|
4
5
|
export { corelib, plotlib, graphlib, geolib, stdlib };
|
|
5
6
|
export * from './exports';
|
|
6
7
|
/**
|
|
@@ -175,6 +176,7 @@ declare const library: {
|
|
|
175
176
|
'composition.geoView': import("./runtime").CompositionComponent<import("./composition/geoView").GeoViewOptions>;
|
|
176
177
|
'composition.geoPath': import("./runtime").CompositionComponent<import("./composition/geoPath").GeoPathOptions>;
|
|
177
178
|
};
|
|
179
|
+
export type { SymbolFactor };
|
|
178
180
|
export declare const Chart: new (options?: import("./api/runtime").RuntimeOptions) => API<G2Spec, {
|
|
179
181
|
'data.fetch': import("./runtime").DataComponent<import("./data").FetchOptions>;
|
|
180
182
|
'data.inline': import("./runtime").DataComponent<import("./data").InlineOptions>;
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAEtD,cAAc,WAAW,CAAC;AAE1B;;GAEG;AACH,MAAM,OAAO,qBAAQ,MAAM,EAAE,CAAE,CAAC;AAEhC,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}
|
package/lib/api/library.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { G2ComponentNamespaces, G2Component } from '../runtime';
|
|
2
|
+
import { type SymbolFactor } from '../utils/marker';
|
|
2
3
|
export declare const library: {};
|
|
3
|
-
export declare function register(key: `${G2ComponentNamespaces}.${any}`, component: G2Component): void;
|
|
4
|
+
export declare function register(key: `${G2ComponentNamespaces | 'symbol'}.${any}`, component: G2Component | SymbolFactor): void;
|
package/lib/api/library.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = exports.library = void 0;
|
|
4
|
+
const marker_1 = require("../utils/marker");
|
|
4
5
|
exports.library = {};
|
|
5
6
|
// @todo Warn if override existing key.
|
|
6
7
|
function register(key, component) {
|
|
7
|
-
|
|
8
|
+
if (key.startsWith('symbol.'))
|
|
9
|
+
(0, marker_1.registerSymbol)(key.split('.').pop(), component);
|
|
10
|
+
else
|
|
11
|
+
Object.assign(exports.library, { [key]: component });
|
|
8
12
|
}
|
|
9
13
|
exports.register = register;
|
|
10
14
|
//# sourceMappingURL=library.js.map
|
package/lib/api/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"src/","sources":["api/library.ts"],"names":[],"mappings":";;;AACA,4CAAoE;AAEvD,QAAA,OAAO,GAAG,EAAE,CAAC;AAE1B,uCAAuC;AACvC,SAAgB,QAAQ,CACtB,GAAiD,EACjD,SAAqC;IAErC,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;QAC3B,IAAA,uBAAc,EAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,SAAyB,CAAC,CAAC;;QAC7D,MAAM,CAAC,MAAM,CAAC,eAAO,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AACpD,CAAC;AAPD,4BAOC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { corelib, plotlib, graphlib, geolib, stdlib } from './lib';
|
|
2
2
|
import { API, CompositionAPI } from './api/extend';
|
|
3
3
|
import { G2Spec } from './spec';
|
|
4
|
+
import type { SymbolFactor } from './utils/marker';
|
|
4
5
|
export { corelib, plotlib, graphlib, geolib, stdlib };
|
|
5
6
|
export * from './exports';
|
|
6
7
|
/**
|
|
@@ -175,6 +176,7 @@ declare const library: {
|
|
|
175
176
|
'composition.geoView': import("./runtime").CompositionComponent<import("./composition/geoView").GeoViewOptions>;
|
|
176
177
|
'composition.geoPath': import("./runtime").CompositionComponent<import("./composition/geoPath").GeoPathOptions>;
|
|
177
178
|
};
|
|
179
|
+
export type { SymbolFactor };
|
|
178
180
|
export declare const Chart: new (options?: import("./api/runtime").RuntimeOptions) => API<G2Spec, {
|
|
179
181
|
'data.fetch': import("./runtime").DataComponent<import("./data").FetchOptions>;
|
|
180
182
|
'data.inline': import("./runtime").DataComponent<import("./data").InlineOptions>;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+BAAmE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+BAAmE;AAM1D,wFANA,aAAO,OAMA;AAAE,wFANA,aAAO,OAMA;AAAE,yFANA,cAAQ,OAMA;AAAE,uFANA,YAAM,OAMA;AAAE,uFANA,YAAM,OAMA;AALnD,+BAAwC;AAOxC,4CAA0B;AAE1B;;GAEG;AACH,MAAM,OAAO,qBAAQ,IAAA,YAAM,GAAE,CAAE,CAAC;AAEnB,QAAA,KAAK,GAAG,IAAA,YAAM,EAAC,aAAO,EAAE,OAAO,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/g2",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.3",
|
|
4
4
|
"description": "the Grammar of Graphics in Javascript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"@antv/g": "^6.0.0",
|
|
66
66
|
"@antv/g-canvas": "^2.0.0",
|
|
67
67
|
"@antv/g-plugin-dragndrop": "^2.0.0",
|
|
68
|
-
"@antv/path-util": "^3.0.1",
|
|
69
68
|
"@antv/scale": "^0.4.12",
|
|
70
69
|
"@antv/util": "^3.3.5",
|
|
71
70
|
"d3-array": "^3.2.4",
|
|
@@ -77,7 +76,6 @@
|
|
|
77
76
|
"d3-path": "^3.1.0",
|
|
78
77
|
"d3-scale-chromatic": "^3.0.0",
|
|
79
78
|
"d3-shape": "^3.2.0",
|
|
80
|
-
"d3-voronoi": "^1.1.4",
|
|
81
79
|
"flru": "^1.0.2",
|
|
82
80
|
"fmin": "^0.0.2",
|
|
83
81
|
"pdfast": "^0.2.0"
|
package/src/api/library.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { G2ComponentNamespaces, G2Component } from '../runtime';
|
|
2
|
+
import { registerSymbol, type SymbolFactor } from '../utils/marker';
|
|
2
3
|
|
|
3
4
|
export const library = {};
|
|
4
5
|
|
|
5
6
|
// @todo Warn if override existing key.
|
|
6
7
|
export function register(
|
|
7
|
-
key: `${G2ComponentNamespaces}.${any}`,
|
|
8
|
-
component: G2Component,
|
|
8
|
+
key: `${G2ComponentNamespaces | 'symbol'}.${any}`,
|
|
9
|
+
component: G2Component | SymbolFactor,
|
|
9
10
|
) {
|
|
10
|
-
|
|
11
|
+
if (key.startsWith('symbol.'))
|
|
12
|
+
registerSymbol(key.split('.').pop(), component as SymbolFactor);
|
|
13
|
+
else Object.assign(library, { [key]: component });
|
|
11
14
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { corelib, plotlib, graphlib, geolib, stdlib } from './lib';
|
|
|
2
2
|
import { extend, Runtime } from './api';
|
|
3
3
|
import { API, CompositionAPI } from './api/extend';
|
|
4
4
|
import { G2Spec } from './spec';
|
|
5
|
+
import type { SymbolFactor } from './utils/marker';
|
|
5
6
|
|
|
6
7
|
export { corelib, plotlib, graphlib, geolib, stdlib };
|
|
7
8
|
|
|
@@ -11,7 +12,7 @@ export * from './exports';
|
|
|
11
12
|
* G2 standard library initial all the libs except 3D and auto.
|
|
12
13
|
*/
|
|
13
14
|
const library = { ...stdlib() };
|
|
14
|
-
|
|
15
|
+
export type { SymbolFactor };
|
|
15
16
|
export const Chart = extend(Runtime, library);
|
|
16
17
|
export interface Chart extends API<G2Spec, typeof library> {}
|
|
17
18
|
export interface CompositionNode extends CompositionAPI<typeof library> {}
|