@antv/g 5.0.23-alpha.14 → 5.0.23-alpha.15

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/es/css/CSS.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { GlobalContainer } from 'mana-syringe';
2
2
  import { CSSUnitValue } from './cssom';
3
- import { StyleValueRegistry } from './StyleValueRegistry';
3
+ import { StyleValueRegistry } from './interfaces';
4
4
  /**
5
5
  * holds useful CSS-related methods.
6
6
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS
@@ -1,5 +1,5 @@
1
1
  import type { IElement } from '../dom';
2
- import type { StyleValueRegistry } from './StyleValueRegistry';
2
+ import type { StyleValueRegistry } from './interfaces';
3
3
  export declare type Interpolatable = number | boolean | number[] | boolean[];
4
4
  declare type CSSPropertyMixer<Parsed = any, T extends Interpolatable = any> = (left: Parsed, right: Parsed, displayObject: IElement | null) => [T, T, (i: T) => string | any] | undefined;
5
5
  declare type CSSPropertyParser<Parsed> = (value: string | any) => Parsed;
@@ -1,7 +1,7 @@
1
- import { Syringe } from 'mana-syringe';
2
1
  import type { DisplayObject } from '../display-objects';
3
2
  import type { BaseStyleProps } from '../types';
4
3
  import { CSSStyleValue } from './cssom';
4
+ import { StyleValueRegistry } from './interfaces';
5
5
  export declare type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
6
6
  export interface PropertyParseOptions {
7
7
  skipUpdateAttribute: boolean;
@@ -66,10 +66,6 @@ export interface PropertyMetadata {
66
66
  * Blink used them in code generation(css_properties.json5)
67
67
  */
68
68
  export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
69
- export declare const StyleValueRegistry: Syringe.DefinedToken;
70
- export interface StyleValueRegistry {
71
- recalc(displayObject: DisplayObject): void;
72
- }
73
69
  export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
74
70
  /**
75
71
  * need recalc later
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata, __read, __spreadArray } from "tslib";
2
- import { postConstruct, singleton, GlobalContainer, Syringe } from 'mana-syringe';
2
+ import { postConstruct, singleton, GlobalContainer } from 'mana-syringe';
3
3
  import { vec3 } from 'gl-matrix';
4
4
  import { GeometryUpdaterFactory } from '../services/aabb/interfaces';
5
5
  import { dirtifyToRoot } from '../services/SceneGraphService';
@@ -10,6 +10,7 @@ import { convertPercentUnit } from './parser';
10
10
  import { CSSPropertyLocalPosition, CSSPropertyOpacity, CSSPropertyColor, CSSPropertyFilter, CSSPropertyLengthOrPercentage, CSSPropertyLineDash, CSSPropertyShadowBlur, CSSPropertyOffsetPath, CSSPropertyOffsetDistance, CSSPropertyAnchor, CSSPropertyZIndex, CSSPropertyTransform, CSSPropertyTransformOrigin, CSSPropertyPath, CSSPropertyClipPath, CSSPropertyPoints, CSSPropertyText, CSSPropertyTextTransform } from './properties';
11
11
  import { formatAttribute } from '../utils';
12
12
  import { AABB } from '../shapes';
13
+ import { StyleValueRegistry } from './interfaces';
13
14
  export var PropertySyntax = {
14
15
  COLOR: '<color>',
15
16
  PAINT: '<paint>',
@@ -411,7 +412,6 @@ export var BUILT_IN_PROPERTIES = [{
411
412
  name: 'whiteSpace',
412
413
  layoutDependent: true
413
414
  }];
414
- export var StyleValueRegistry = Syringe.defineToken('StyleValueRegistry');
415
415
 
416
416
  var DefaultStyleValueRegistry =
417
417
  /** @class */
package/es/css/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
3
3
  */
4
+ export * from './interfaces';
4
5
  export * from './cssom';
5
6
  export * from './parser';
6
7
  export * from './properties';
package/es/css/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
3
3
  */
4
+ export * from './interfaces';
4
5
  export * from './cssom';
5
6
  export * from './parser';
6
7
  export * from './properties';
@@ -0,0 +1,6 @@
1
+ import { Syringe } from 'mana-syringe';
2
+ import type { DisplayObject } from '../display-objects';
3
+ export declare const StyleValueRegistry: Syringe.DefinedToken;
4
+ export interface StyleValueRegistry {
5
+ recalc(displayObject: DisplayObject): void;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { Syringe } from 'mana-syringe';
2
+ export var StyleValueRegistry = Syringe.defineToken('StyleValueRegistry');
@@ -3,7 +3,7 @@ import type { DisplayObject } from '../../display-objects';
3
3
  import { parseColor, mergeColors } from '../parser';
4
4
  import type { CSSGradientValue } from '../cssom';
5
5
  import { CSSKeywordValue, CSSRGB } from '../cssom';
6
- import type { StyleValueRegistry } from '../StyleValueRegistry';
6
+ import type { StyleValueRegistry } from '../interfaces';
7
7
  /**
8
8
  * opacity
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import { CSSUnitValue } from '../cssom';
2
2
  import { mergeDimensions } from '../parser';
3
- import type { StyleValueRegistry } from '../StyleValueRegistry';
3
+ import type { StyleValueRegistry } from '../interfaces';
4
4
  import type { DisplayObject } from '../../display-objects';
5
5
  import type { CSSProperty } from '../CSSProperty';
6
6
  /**
@@ -10,7 +10,7 @@ import { createVec3, decompose, formatAttribute, fromRotationTranslationScale, g
10
10
  import { dirtifyToRoot } from '../services';
11
11
  import { MutationEvent } from '../dom/MutationEvent';
12
12
  import { Rectangle } from '../shapes';
13
- import { StyleValueRegistry } from '../css/StyleValueRegistry';
13
+ import { StyleValueRegistry } from '../css/interfaces';
14
14
  import { CSSUnitValue } from '../css';
15
15
  var DEFAULT_STYLE_PROPS = {
16
16
  x: '',
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata } from "tslib";
2
2
  import { inject, singleton } from 'mana-syringe';
3
- import { StyleValueRegistry } from '../css/StyleValueRegistry';
3
+ import { StyleValueRegistry } from '../css/interfaces';
4
4
  import { ElementEvent } from '../dom';
5
5
  import { RenderingContext, RenderingPluginContribution, dirtifyToRoot } from '../services';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata } from "tslib";
2
2
  import { inject, singleton, contrib, Syringe, Contribution } from 'mana-syringe';
3
3
  import { SyncHook, SyncWaterfallHook, AsyncParallelHook, AsyncSeriesWaterfallHook } from '../utils';
4
- import { StyleValueRegistry } from '../css/StyleValueRegistry';
4
+ import { StyleValueRegistry } from '../css/interfaces';
5
5
  import { ElementEvent } from '../dom';
6
6
  import { RenderingContext, RenderReason } from './RenderingContext';
7
7
  import { SceneGraphService, sortByZIndex } from './SceneGraphService';
@@ -1,6 +1,6 @@
1
1
  import { __read, __spreadArray } from "tslib";
2
2
  import { GlobalContainer } from 'mana-syringe';
3
- import { StyleValueRegistry } from '../css';
3
+ import { StyleValueRegistry } from '../css/interfaces';
4
4
  import { parseEasingFunction } from './animation';
5
5
  import { camelCase } from './string';
6
6
  export function convertEffectInput(keyframes, timing, target) {
package/lib/css/CSS.js CHANGED
@@ -9,7 +9,7 @@ var _manaSyringe = require("mana-syringe");
9
9
 
10
10
  var _cssom = require("./cssom");
11
11
 
12
- var _StyleValueRegistry = require("./StyleValueRegistry");
12
+ var _interfaces = require("./interfaces");
13
13
 
14
14
  /**
15
15
  * holds useful CSS-related methods.
@@ -104,7 +104,7 @@ var CSS = {
104
104
  inherits = definition.inherits,
105
105
  initialValue = definition.initialValue;
106
106
 
107
- var registry = _manaSyringe.GlobalContainer.get(_StyleValueRegistry.StyleValueRegistry);
107
+ var registry = _manaSyringe.GlobalContainer.get(_interfaces.StyleValueRegistry);
108
108
 
109
109
  registry.registerMetadata({
110
110
  name: name,
@@ -1,5 +1,5 @@
1
1
  import type { IElement } from '../dom';
2
- import type { StyleValueRegistry } from './StyleValueRegistry';
2
+ import type { StyleValueRegistry } from './interfaces';
3
3
  export declare type Interpolatable = number | boolean | number[] | boolean[];
4
4
  declare type CSSPropertyMixer<Parsed = any, T extends Interpolatable = any> = (left: Parsed, right: Parsed, displayObject: IElement | null) => [T, T, (i: T) => string | any] | undefined;
5
5
  declare type CSSPropertyParser<Parsed> = (value: string | any) => Parsed;
@@ -1,7 +1,7 @@
1
- import { Syringe } from 'mana-syringe';
2
1
  import type { DisplayObject } from '../display-objects';
3
2
  import type { BaseStyleProps } from '../types';
4
3
  import { CSSStyleValue } from './cssom';
4
+ import { StyleValueRegistry } from './interfaces';
5
5
  export declare type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
6
6
  export interface PropertyParseOptions {
7
7
  skipUpdateAttribute: boolean;
@@ -66,10 +66,6 @@ export interface PropertyMetadata {
66
66
  * Blink used them in code generation(css_properties.json5)
67
67
  */
68
68
  export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
69
- export declare const StyleValueRegistry: Syringe.DefinedToken;
70
- export interface StyleValueRegistry {
71
- recalc(displayObject: DisplayObject): void;
72
- }
73
69
  export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
74
70
  /**
75
71
  * need recalc later
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyleValueRegistry = exports.PropertySyntax = exports.DefaultStyleValueRegistry = exports.BUILT_IN_PROPERTIES = void 0;
6
+ exports.PropertySyntax = exports.DefaultStyleValueRegistry = exports.BUILT_IN_PROPERTIES = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -29,6 +29,8 @@ var _utils = require("../utils");
29
29
 
30
30
  var _shapes = require("../shapes");
31
31
 
32
+ var _interfaces2 = require("./interfaces");
33
+
32
34
  var PropertySyntax = {
33
35
  COLOR: '<color>',
34
36
  PAINT: '<paint>',
@@ -433,10 +435,6 @@ var BUILT_IN_PROPERTIES = [{
433
435
  }];
434
436
  exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
435
437
 
436
- var StyleValueRegistry = _manaSyringe.Syringe.defineToken('StyleValueRegistry');
437
-
438
- exports.StyleValueRegistry = StyleValueRegistry;
439
-
440
438
  var DefaultStyleValueRegistry =
441
439
  /** @class */
442
440
  function () {
@@ -914,7 +912,7 @@ function () {
914
912
 
915
913
  (0, _tslib.__decorate)([(0, _manaSyringe.postConstruct)(), (0, _tslib.__metadata)("design:type", Function), (0, _tslib.__metadata)("design:paramtypes", []), (0, _tslib.__metadata)("design:returntype", void 0)], DefaultStyleValueRegistry.prototype, "init", null);
916
914
  DefaultStyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
917
- token: StyleValueRegistry
915
+ token: _interfaces2.StyleValueRegistry
918
916
  })], DefaultStyleValueRegistry);
919
917
  return DefaultStyleValueRegistry;
920
918
  }();
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
3
3
  */
4
+ export * from './interfaces';
4
5
  export * from './cssom';
5
6
  export * from './parser';
6
7
  export * from './properties';
package/lib/css/index.js CHANGED
@@ -4,6 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
+ var _interfaces = require("./interfaces");
8
+
9
+ Object.keys(_interfaces).forEach(function (key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ if (key in exports && exports[key] === _interfaces[key]) return;
12
+ Object.defineProperty(exports, key, {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _interfaces[key];
16
+ }
17
+ });
18
+ });
19
+
7
20
  var _cssom = require("./cssom");
8
21
 
9
22
  Object.keys(_cssom).forEach(function (key) {
@@ -0,0 +1,6 @@
1
+ import { Syringe } from 'mana-syringe';
2
+ import type { DisplayObject } from '../display-objects';
3
+ export declare const StyleValueRegistry: Syringe.DefinedToken;
4
+ export interface StyleValueRegistry {
5
+ recalc(displayObject: DisplayObject): void;
6
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyleValueRegistry = void 0;
7
+
8
+ var _manaSyringe = require("mana-syringe");
9
+
10
+ var StyleValueRegistry = _manaSyringe.Syringe.defineToken('StyleValueRegistry');
11
+
12
+ exports.StyleValueRegistry = StyleValueRegistry;
@@ -3,7 +3,7 @@ import type { DisplayObject } from '../../display-objects';
3
3
  import { parseColor, mergeColors } from '../parser';
4
4
  import type { CSSGradientValue } from '../cssom';
5
5
  import { CSSKeywordValue, CSSRGB } from '../cssom';
6
- import type { StyleValueRegistry } from '../StyleValueRegistry';
6
+ import type { StyleValueRegistry } from '../interfaces';
7
7
  /**
8
8
  * opacity
9
9
  */
@@ -1,6 +1,6 @@
1
1
  import { CSSUnitValue } from '../cssom';
2
2
  import { mergeDimensions } from '../parser';
3
- import type { StyleValueRegistry } from '../StyleValueRegistry';
3
+ import type { StyleValueRegistry } from '../interfaces';
4
4
  import type { DisplayObject } from '../../display-objects';
5
5
  import type { CSSProperty } from '../CSSProperty';
6
6
  /**
@@ -29,7 +29,7 @@ var _MutationEvent = require("../dom/MutationEvent");
29
29
 
30
30
  var _shapes = require("../shapes");
31
31
 
32
- var _StyleValueRegistry = require("../css/StyleValueRegistry");
32
+ var _interfaces2 = require("../css/interfaces");
33
33
 
34
34
  var _css = require("../css");
35
35
 
@@ -87,7 +87,7 @@ function (_super) {
87
87
  var _a, _b, _c;
88
88
 
89
89
  _this = _super.call(this) || this;
90
- _this.styleValueRegistry = _manaSyringe.GlobalContainer.get(_StyleValueRegistry.StyleValueRegistry);
90
+ _this.styleValueRegistry = _manaSyringe.GlobalContainer.get(_interfaces2.StyleValueRegistry);
91
91
  /**
92
92
  * push to active animations after calling `animate()`
93
93
  */
@@ -9,7 +9,7 @@ var _tslib = require("tslib");
9
9
 
10
10
  var _manaSyringe = require("mana-syringe");
11
11
 
12
- var _StyleValueRegistry = require("../css/StyleValueRegistry");
12
+ var _interfaces = require("../css/interfaces");
13
13
 
14
14
  var _dom = require("../dom");
15
15
 
@@ -73,7 +73,7 @@ function () {
73
73
  };
74
74
 
75
75
  (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_services.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], PrepareRendererPlugin.prototype, "renderingContext", void 0);
76
- (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
76
+ (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_interfaces.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
77
77
  PrepareRendererPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
78
78
  contrib: _services.RenderingPluginContribution
79
79
  })], PrepareRendererPlugin);
@@ -11,7 +11,7 @@ var _manaSyringe = require("mana-syringe");
11
11
 
12
12
  var _utils = require("../utils");
13
13
 
14
- var _StyleValueRegistry = require("../css/StyleValueRegistry");
14
+ var _interfaces = require("../css/interfaces");
15
15
 
16
16
  var _dom = require("../dom");
17
17
 
@@ -233,7 +233,7 @@ function () {
233
233
  (0, _tslib.__decorate)([(0, _manaSyringe.contrib)(RenderingPluginContribution), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "renderingPluginProvider", void 0);
234
234
  (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_RenderingContext.RenderingContext), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "renderingContext", void 0);
235
235
  (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_SceneGraphService.SceneGraphService), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "sceneGraphService", void 0);
236
- (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "styleValueRegistry", void 0);
236
+ (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_interfaces.StyleValueRegistry), (0, _tslib.__metadata)("design:type", Object)], RenderingService.prototype, "styleValueRegistry", void 0);
237
237
  RenderingService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], RenderingService);
238
238
  return RenderingService;
239
239
  }();
@@ -10,7 +10,7 @@ var _tslib = require("tslib");
10
10
 
11
11
  var _manaSyringe = require("mana-syringe");
12
12
 
13
- var _css = require("../css");
13
+ var _interfaces = require("../css/interfaces");
14
14
 
15
15
  var _animation = require("./animation");
16
16
 
@@ -127,7 +127,7 @@ function propertyInterpolation(property, left, right, target) {
127
127
  var parsedLeft = left;
128
128
  var parsedRight = right;
129
129
 
130
- var registry = _manaSyringe.GlobalContainer.get(_css.StyleValueRegistry);
130
+ var registry = _manaSyringe.GlobalContainer.get(_interfaces.StyleValueRegistry);
131
131
 
132
132
  var metadata = registry.getMetadata(property);
133
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g",
3
- "version": "5.0.23-alpha.14",
3
+ "version": "5.0.23-alpha.15",
4
4
  "description": "A core module including ECS and DI container.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://github.com/antvis/g#readme",
40
40
  "dependencies": {
41
- "@antv/g-math": "^1.0.20-alpha.14",
41
+ "@antv/g-math": "^1.0.20-alpha.15",
42
42
  "@antv/util": "^3.0.0",
43
43
  "@types/offscreencanvas": "^2019.6.4",
44
44
  "d3-color": "^1.4.0",