@antv/g2 4.2.0 → 4.2.1

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/esm/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.2.1";
2
2
  export { Chart, View, Event } from './chart';
3
3
  export { Controller as ComponentController } from './chart/controller/base';
4
4
  export { default as TooltipController } from './chart/controller/tooltip';
package/esm/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */
2
- export var VERSION = '4.2.0';
2
+ export var VERSION = '4.2.1';
3
3
  // 核心基类导出
4
4
  export { Chart, View, Event } from './chart'; // Chart, View 类
5
5
  export { Controller as ComponentController } from './chart/controller/base'; // G2 组件基类
package/esm/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,MAAM,CAAC,IAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,SAAS;AACT,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC,CAAC,gBAAgB;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC,CAAC,UAAU;AACvF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC,CAAC,kBAAkB;AAC7F,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC,CAAC,cAAc;AACrE,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC,CAAC,YAAY;AACrE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC,CAAC,oBAAoB;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC,CAAC,yBA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,iBAAiB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,CAAC,IAAM,IAAI,GAAG;IAClB,cAAc,gBAAA;IACd,SAAS,WAAA;IACT,MAAM,QAAA;IACN,IAAI,MAAA;IACJ,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,aAAa,eAAA;IACb,gBAAgB,kBAAA;IAChB,mBAAmB,qBAAA;IACnB,eAAe,iBAAA;IACf,eAAe,iBAAA;IACf,gBAAgB;IAChB,OAAO,SAAA;IACP,aAAa,eAAA;CACd,CAAC","sourcesContent":["/* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */\n\nexport const VERSION = '4.2.0';\n\n// 核心基类导出\nexport { Chart, View, Event } from './chart'; // Chart, View 类\nexport { Controller as ComponentController } from './chart/controller/base'; // G2 组件基类\nexport { default as TooltipController } from './chart/controller/tooltip'; // G2 tooltip 组件基类\nexport { default as Geometry } from './geometry/base'; // Geometry 基类\nexport { default as Element } from './geometry/element'; // Element 类\nexport { default as GeometryLabel } from './geometry/label/base'; // Geometry Label 基类\nexport { Interaction, Action } from './interaction'; // Interaction, Action 基类\nexport { Facet } from './facet'; // Facet 基类\nexport { default as InteractionAction } from './interaction/action/base'; // Interaction Action 基类\n\n// 注册 ComponentController\nexport { registerComponentController } from './chart';\n\n// 注册 Geometry\nexport { registerGeometry } from './chart';\n\n// 注册 Geometry Shape\nexport { registerShape, registerShapeFactory, getShapeFactory } from './geometry/shape/base';\n\n// 注册 Geometry label 以及 Geometry Label 布局函数\nexport {\n registerGeometryLabel,\n registerGeometryLabelLayout,\n getGeometryLabel,\n getGeometryLabelLayout,\n} from './geometry/label';\n\n// 注册 interaction\nexport { getInteraction, registerInteraction, registerAction, getActionClass } from './interaction';\n\n// 注册 facet\nexport { getFacet, registerFacet } from './facet';\n\n// 注册主题\nexport { getTheme, registerTheme } from './theme';\n\n// G engine 管理相关\nexport { registerEngine, getEngine } from './engine';\n\n// 注册动画函数\nexport { registerAnimation, getAnimation } from './animate/animation';\n\nexport { LAYER, DIRECTION } from './constant';\n\n// 因为 typescript 部分版本不支持 export * as 语法。\nimport * as Types from './interface';\nexport type { Types };\n\nexport { IGroup, ShapeAttrs, Coordinate, Scale, ScaleConfig } from './dependents';\n\n// 一些工具方法导出\nimport { getMappingValue } from './util/attr';\nimport { getLegendItems } from './util/legend';\nimport { getAngle, getSectorPath, polarToCartesian } from './util/graphics';\nimport { rotate, transform, translate, zoom } from './util/transform';\nimport { getTooltipItems } from './util/tooltip';\nimport { getDelegationObject } from './interaction/action/util';\nimport { getPathPoints } from './geometry/shape/util/get-path-points';\nimport { getPath } from './geometry/shape/line';\n\nexport const Util = {\n getLegendItems,\n translate,\n rotate,\n zoom,\n transform,\n getAngle,\n getSectorPath,\n polarToCartesian,\n getDelegationObject,\n getTooltipItems,\n getMappingValue,\n // shape 的一些操作方法\n getPath,\n getPathPoints,\n};\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,uCAAuC;AAEvC,MAAM,CAAC,IAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,SAAS;AACT,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC,CAAC,gBAAgB;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC,CAAC,UAAU;AACvF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC,CAAC,kBAAkB;AAC7F,OAAO,EAAE,OAAO,IA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OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAsB,UAAU,EAAE,KAAK,EAAe,MAAM,cAAc,CAAC;AAElF,WAAW;AACX,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,MAAM,CAAC,IAAM,IAAI,GAAG;IAClB,cAAc,gBAAA;IACd,SAAS,WAAA;IACT,MAAM,QAAA;IACN,IAAI,MAAA;IACJ,SAAS,WAAA;IACT,QAAQ,UAAA;IACR,aAAa,eAAA;IACb,gBAAgB,kBAAA;IAChB,mBAAmB,qBAAA;IACnB,eAAe,iBAAA;IACf,eAAe,iBAAA;IACf,gBAAgB;IAChB,OAAO,SAAA;IACP,aAAa,eAAA;CACd,CAAC","sourcesContent":["/* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */\n\nexport const VERSION = '4.2.1';\n\n// 核心基类导出\nexport { Chart, View, Event } from './chart'; // Chart, View 类\nexport { Controller as ComponentController } from './chart/controller/base'; // G2 组件基类\nexport { default as TooltipController } from './chart/controller/tooltip'; // G2 tooltip 组件基类\nexport { default as Geometry } from './geometry/base'; // Geometry 基类\nexport { default as Element } from './geometry/element'; // Element 类\nexport { default as GeometryLabel } from './geometry/label/base'; // Geometry Label 基类\nexport { Interaction, Action } from './interaction'; // Interaction, Action 基类\nexport { Facet } from './facet'; // Facet 基类\nexport { default as InteractionAction } from './interaction/action/base'; // Interaction Action 基类\n\n// 注册 ComponentController\nexport { registerComponentController } from './chart';\n\n// 注册 Geometry\nexport { registerGeometry } from './chart';\n\n// 注册 Geometry Shape\nexport { registerShape, registerShapeFactory, getShapeFactory } from './geometry/shape/base';\n\n// 注册 Geometry label 以及 Geometry Label 布局函数\nexport {\n registerGeometryLabel,\n registerGeometryLabelLayout,\n getGeometryLabel,\n getGeometryLabelLayout,\n} from './geometry/label';\n\n// 注册 interaction\nexport { getInteraction, registerInteraction, registerAction, getActionClass } from './interaction';\n\n// 注册 facet\nexport { getFacet, registerFacet } from './facet';\n\n// 注册主题\nexport { getTheme, registerTheme } from './theme';\n\n// G engine 管理相关\nexport { registerEngine, getEngine } from './engine';\n\n// 注册动画函数\nexport { registerAnimation, getAnimation } from './animate/animation';\n\nexport { LAYER, DIRECTION } from './constant';\n\n// 因为 typescript 部分版本不支持 export * as 语法。\nimport * as Types from './interface';\nexport type { Types };\n\nexport { IGroup, ShapeAttrs, Coordinate, Scale, ScaleConfig } from './dependents';\n\n// 一些工具方法导出\nimport { getMappingValue } from './util/attr';\nimport { getLegendItems } from './util/legend';\nimport { getAngle, getSectorPath, polarToCartesian } from './util/graphics';\nimport { rotate, transform, translate, zoom } from './util/transform';\nimport { getTooltipItems } from './util/tooltip';\nimport { getDelegationObject } from './interaction/action/util';\nimport { getPathPoints } from './geometry/shape/util/get-path-points';\nimport { getPath } from './geometry/shape/line';\n\nexport const Util = {\n getLegendItems,\n translate,\n rotate,\n zoom,\n transform,\n getAngle,\n getSectorPath,\n polarToCartesian,\n getDelegationObject,\n getTooltipItems,\n getMappingValue,\n // shape 的一些操作方法\n getPath,\n getPathPoints,\n};\n"]}
@@ -1,4 +1,6 @@
1
1
  export function createWorker(f) {
2
+ if (typeof window === "undefined")
3
+ return;
2
4
  var blob;
3
5
  try {
4
6
  blob = new Blob([f.toString()], { type: 'application/javascript' });
@@ -1 +1 @@
1
- {"version":3,"file":"createWorker.js","sourceRoot":"","sources":["../../../../src/geometry/label/util/createWorker.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,CAAM;IACjC,IAAI,IAAI,CAAC;IACT,IAAI;QACF,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;KACrE;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,IAAI,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;KACvB;IAED,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["export function createWorker(f: any) {\n let blob;\n try {\n blob = new Blob([f.toString()], { type: 'application/javascript' });\n } catch (e) {\n // @ts-ignore\n blob = new window.BlobBuilder();\n blob.append(f.toString());\n blob = blob.getBlob();\n }\n\n return new Worker(URL.createObjectURL(blob));\n}\n"]}
1
+ {"version":3,"file":"createWorker.js","sourceRoot":"","sources":["../../../../src/geometry/label/util/createWorker.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,CAAM;IACjC,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAE1C,IAAI,IAAI,CAAC;IACT,IAAI;QACF,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;KACrE;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,IAAI,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;KACvB;IAED,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["export function createWorker(f: any) {\n if (typeof window === \"undefined\") return;\n\n let blob;\n try {\n blob = new Blob([f.toString()], { type: 'application/javascript' });\n } catch (e) {\n // @ts-ignore\n blob = new window.BlobBuilder();\n blob.append(f.toString());\n blob = blob.getBlob();\n }\n\n return new Worker(URL.createObjectURL(blob));\n}\n"]}
package/lib/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "4.2.0";
1
+ export declare const VERSION = "4.2.1";
2
2
  export { Chart, View, Event } from './chart';
3
3
  export { Controller as ComponentController } from './chart/controller/base';
4
4
  export { default as TooltipController } from './chart/controller/tooltip';
package/lib/core.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Util = exports.Scale = exports.Coordinate = exports.DIRECTION = exports.LAYER = exports.getAnimation = exports.registerAnimation = exports.getEngine = exports.registerEngine = exports.registerTheme = exports.getTheme = exports.registerFacet = exports.getFacet = exports.getActionClass = exports.registerAction = exports.registerInteraction = exports.getInteraction = exports.getGeometryLabelLayout = exports.getGeometryLabel = exports.registerGeometryLabelLayout = exports.registerGeometryLabel = exports.getShapeFactory = exports.registerShapeFactory = exports.registerShape = exports.registerGeometry = exports.registerComponentController = exports.InteractionAction = exports.Facet = exports.Action = exports.Interaction = exports.GeometryLabel = exports.Element = exports.Geometry = exports.TooltipController = exports.ComponentController = exports.Event = exports.View = exports.Chart = exports.VERSION = void 0;
5
5
  var tslib_1 = require("tslib");
6
- exports.VERSION = '4.2.0';
6
+ exports.VERSION = '4.2.1';
7
7
  // 核心基类导出
8
8
  var chart_1 = require("./chart"); // Chart, View 类
9
9
  Object.defineProperty(exports, "Chart", { enumerable: true, get: function () {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AA,cAAc,OAAA;AAE5E,WAAW;AACX,iCAAkD;AAAzC,iGAAA,QAAQ,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,OAAO;AACP,iCAAkD;AAAzC,iGAAA,QAAQ,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,gBAAgB;AAChB,mCAAqD;AAA5C,wGAAA,cAAc,OAAA;AAAE,mGAAA,SAAS,OAAA;AAElC,SAAS;AACT,iDAAsE;AAA7D,8GAAA,iBAAiB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAExC,uCAA8C;AAArC,iGAAA,KAAK,OAAA;AAAE,qGAAA,SAAS,OAAA;AAEzB,wCAAwC;AACxC,yDAAqC;AAGrC,2CAAkF;AAArD,wGAAA,UAAU,OAAA;AAAE,mGAAA,KAAK,OAAA;AAE9C,WAAW;AACX,oCAA8C;AAC9C,wCAA+C;AAC/C,4CAA4E;AAC5E,8CAAsE;AACtE,0CAAiD;AACjD,kDAAgE;AAChE,yEAAsE;AACtE,8CAAgD;AAEnC,QAAA,IAAI,GAAG;IAClB,cAAc,yBAAA;IACd,SAAS,uBAAA;IACT,MAAM,oBAAA;IACN,IAAI,kBAAA;IACJ,SAAS,uBAAA;IACT,QAAQ,qBAAA;IACR,aAAa,0BAAA;IACb,gBAAgB,6BAAA;IAChB,mBAAmB,4BAAA;IACnB,eAAe,2BAAA;IACf,eAAe,wBAAA;IACf,gBAAgB;IAChB,OAAO,gBAAA;IACP,aAAa,iCAAA;CACd,CAAC","sourcesContent":["/* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */\n\nexport const VERSION = '4.2.0';\n\n// 核心基类导出\nexport { Chart, View, Event } from './chart'; // Chart, View 类\nexport { Controller as ComponentController } from './chart/controller/base'; // G2 组件基类\nexport { default as TooltipController } from './chart/controller/tooltip'; // G2 tooltip 组件基类\nexport { default as Geometry } from './geometry/base'; // Geometry 基类\nexport { default as Element } from './geometry/element'; // Element 类\nexport { default as GeometryLabel } from './geometry/label/base'; // Geometry Label 基类\nexport { Interaction, Action } from './interaction'; // Interaction, Action 基类\nexport { Facet } from './facet'; // Facet 基类\nexport { default as InteractionAction } from './interaction/action/base'; // Interaction Action 基类\n\n// 注册 ComponentController\nexport { registerComponentController } from './chart';\n\n// 注册 Geometry\nexport { registerGeometry } from './chart';\n\n// 注册 Geometry Shape\nexport { registerShape, registerShapeFactory, getShapeFactory } from './geometry/shape/base';\n\n// 注册 Geometry label 以及 Geometry Label 布局函数\nexport {\n registerGeometryLabel,\n registerGeometryLabelLayout,\n getGeometryLabel,\n getGeometryLabelLayout,\n} from './geometry/label';\n\n// 注册 interaction\nexport { getInteraction, registerInteraction, registerAction, getActionClass } from './interaction';\n\n// 注册 facet\nexport { getFacet, registerFacet } from './facet';\n\n// 注册主题\nexport { getTheme, registerTheme } from './theme';\n\n// G engine 管理相关\nexport { registerEngine, getEngine } from './engine';\n\n// 注册动画函数\nexport { registerAnimation, getAnimation } from './animate/animation';\n\nexport { LAYER, DIRECTION } from './constant';\n\n// 因为 typescript 部分版本不支持 export * as 语法。\nimport * as Types from './interface';\nexport type { Types };\n\nexport { IGroup, ShapeAttrs, Coordinate, Scale, ScaleConfig } from './dependents';\n\n// 一些工具方法导出\nimport { getMappingValue } from './util/attr';\nimport { getLegendItems } from './util/legend';\nimport { getAngle, getSectorPath, polarToCartesian } from './util/graphics';\nimport { rotate, transform, translate, zoom } from './util/transform';\nimport { getTooltipItems } from './util/tooltip';\nimport { getDelegationObject } from './interaction/action/util';\nimport { getPathPoints } from './geometry/shape/util/get-path-points';\nimport { getPath } from './geometry/shape/line';\n\nexport const Util = {\n getLegendItems,\n translate,\n rotate,\n zoom,\n transform,\n getAngle,\n getSectorPath,\n polarToCartesian,\n getDelegationObject,\n getTooltipItems,\n getMappingValue,\n // shape 的一些操作方法\n getPath,\n getPathPoints,\n};\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;AAE1B,QAAA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Q,OAAA;AAAE,sGAAA,aAAa,OAAA;AAEhC,gBAAgB;AAChB,mCAAqD;AAA5C,wGAAA,cAAc,OAAA;AAAE,mGAAA,SAAS,OAAA;AAElC,SAAS;AACT,iDAAsE;AAA7D,8GAAA,iBAAiB,OAAA;AAAE,yGAAA,YAAY,OAAA;AAExC,uCAA8C;AAArC,iGAAA,KAAK,OAAA;AAAE,qGAAA,SAAS,OAAA;AAEzB,wCAAwC;AACxC,yDAAqC;AAGrC,2CAAkF;AAArD,wGAAA,UAAU,OAAA;AAAE,mGAAA,KAAK,OAAA;AAE9C,WAAW;AACX,oCAA8C;AAC9C,wCAA+C;AAC/C,4CAA4E;AAC5E,8CAAsE;AACtE,0CAAiD;AACjD,kDAAgE;AAChE,yEAAsE;AACtE,8CAAgD;AAEnC,QAAA,IAAI,GAAG;IAClB,cAAc,yBAAA;IACd,SAAS,uBAAA;IACT,MAAM,oBAAA;IACN,IAAI,kBAAA;IACJ,SAAS,uBAAA;IACT,QAAQ,qBAAA;IACR,aAAa,0BAAA;IACb,gBAAgB,6BAAA;IAChB,mBAAmB,4BAAA;IACnB,eAAe,2BAAA;IACf,eAAe,wBAAA;IACf,gBAAgB;IAChB,OAAO,gBAAA;IACP,aAAa,iCAAA;CACd,CAAC","sourcesContent":["/* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */\n\nexport const VERSION = '4.2.1';\n\n// 核心基类导出\nexport { Chart, View, Event } from './chart'; // Chart, View 类\nexport { Controller as ComponentController } from './chart/controller/base'; // G2 组件基类\nexport { default as TooltipController } from './chart/controller/tooltip'; // G2 tooltip 组件基类\nexport { default as Geometry } from './geometry/base'; // Geometry 基类\nexport { default as Element } from './geometry/element'; // Element 类\nexport { default as GeometryLabel } from './geometry/label/base'; // Geometry Label 基类\nexport { Interaction, Action } from './interaction'; // Interaction, Action 基类\nexport { Facet } from './facet'; // Facet 基类\nexport { default as InteractionAction } from './interaction/action/base'; // Interaction Action 基类\n\n// 注册 ComponentController\nexport { registerComponentController } from './chart';\n\n// 注册 Geometry\nexport { registerGeometry } from './chart';\n\n// 注册 Geometry Shape\nexport { registerShape, registerShapeFactory, getShapeFactory } from './geometry/shape/base';\n\n// 注册 Geometry label 以及 Geometry Label 布局函数\nexport {\n registerGeometryLabel,\n registerGeometryLabelLayout,\n getGeometryLabel,\n getGeometryLabelLayout,\n} from './geometry/label';\n\n// 注册 interaction\nexport { getInteraction, registerInteraction, registerAction, getActionClass } from './interaction';\n\n// 注册 facet\nexport { getFacet, registerFacet } from './facet';\n\n// 注册主题\nexport { getTheme, registerTheme } from './theme';\n\n// G engine 管理相关\nexport { registerEngine, getEngine } from './engine';\n\n// 注册动画函数\nexport { registerAnimation, getAnimation } from './animate/animation';\n\nexport { LAYER, DIRECTION } from './constant';\n\n// 因为 typescript 部分版本不支持 export * as 语法。\nimport * as Types from './interface';\nexport type { Types };\n\nexport { IGroup, ShapeAttrs, Coordinate, Scale, ScaleConfig } from './dependents';\n\n// 一些工具方法导出\nimport { getMappingValue } from './util/attr';\nimport { getLegendItems } from './util/legend';\nimport { getAngle, getSectorPath, polarToCartesian } from './util/graphics';\nimport { rotate, transform, translate, zoom } from './util/transform';\nimport { getTooltipItems } from './util/tooltip';\nimport { getDelegationObject } from './interaction/action/util';\nimport { getPathPoints } from './geometry/shape/util/get-path-points';\nimport { getPath } from './geometry/shape/line';\n\nexport const Util = {\n getLegendItems,\n translate,\n rotate,\n zoom,\n transform,\n getAngle,\n getSectorPath,\n polarToCartesian,\n getDelegationObject,\n getTooltipItems,\n getMappingValue,\n // shape 的一些操作方法\n getPath,\n getPathPoints,\n};\n"]}
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createWorker = void 0;
4
4
  function createWorker(f) {
5
+ if (typeof window === "undefined")
6
+ return;
5
7
  var blob;
6
8
  try {
7
9
  blob = new Blob([f.toString()], { type: 'application/javascript' });
@@ -1 +1 @@
1
- {"version":3,"file":"createWorker.js","sourceRoot":"","sources":["../../../../src/geometry/label/util/createWorker.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,CAAM;IACjC,IAAI,IAAI,CAAC;IACT,IAAI;QACF,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;KACrE;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,IAAI,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;KACvB;IAED,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC;AAZD,oCAYC","sourcesContent":["export function createWorker(f: any) {\n let blob;\n try {\n blob = new Blob([f.toString()], { type: 'application/javascript' });\n } catch (e) {\n // @ts-ignore\n blob = new window.BlobBuilder();\n blob.append(f.toString());\n blob = blob.getBlob();\n }\n\n return new Worker(URL.createObjectURL(blob));\n}\n"]}
1
+ {"version":3,"file":"createWorker.js","sourceRoot":"","sources":["../../../../src/geometry/label/util/createWorker.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,CAAM;IACjC,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAE1C,IAAI,IAAI,CAAC;IACT,IAAI;QACF,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC,CAAC;KACrE;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,IAAI,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1B,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;KACvB;IAED,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC/C,CAAC;AAdD,oCAcC","sourcesContent":["export function createWorker(f: any) {\n if (typeof window === \"undefined\") return;\n\n let blob;\n try {\n blob = new Blob([f.toString()], { type: 'application/javascript' });\n } catch (e) {\n // @ts-ignore\n blob = new window.BlobBuilder();\n blob.append(f.toString());\n blob = blob.getBlob();\n }\n\n return new Worker(URL.createObjectURL(blob));\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g2",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "the Grammar of Graphics in Javascript",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
package/src/core.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /* G2 的一个壳子,不包含 Geometry,由开发者自己定义和引入 */
2
2
 
3
- export const VERSION = '4.2.0';
3
+ export const VERSION = '4.2.1';
4
4
 
5
5
  // 核心基类导出
6
6
  export { Chart, View, Event } from './chart'; // Chart, View 类
@@ -1,4 +1,6 @@
1
1
  export function createWorker(f: any) {
2
+ if (typeof window === "undefined") return;
3
+
2
4
  let blob;
3
5
  try {
4
6
  blob = new Blob([f.toString()], { type: 'application/javascript' });