@antv/g 5.0.23-alpha.12 → 5.0.23-alpha.13

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.
@@ -1,4 +1,3 @@
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';
@@ -66,7 +65,6 @@ export interface PropertyMetadata {
66
65
  * Blink used them in code generation(css_properties.json5)
67
66
  */
68
67
  export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
69
- export declare const StyleValueRegistryContribution: Syringe.DefinedToken;
70
68
  export declare class StyleValueRegistry {
71
69
  /**
72
70
  * 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';
@@ -410,8 +410,9 @@ export var BUILT_IN_PROPERTIES = [{
410
410
  }, {
411
411
  name: 'whiteSpace',
412
412
  layoutDependent: true
413
- }];
414
- export var StyleValueRegistryContribution = Syringe.defineToken('StyleValueRegistry');
413
+ }]; // export const StyleValueRegistryContribution = Syringe.defineToken('StyleValueRegistry', {
414
+ // multiple: false,
415
+ // });
415
416
 
416
417
  var StyleValueRegistry =
417
418
  /** @class */
@@ -886,9 +887,7 @@ function () {
886
887
 
887
888
  __decorate([postConstruct(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], StyleValueRegistry.prototype, "init", null);
888
889
 
889
- StyleValueRegistry = __decorate([singleton({
890
- token: StyleValueRegistryContribution
891
- })], StyleValueRegistry);
890
+ StyleValueRegistry = __decorate([singleton()], StyleValueRegistry);
892
891
  return StyleValueRegistry;
893
892
  }();
894
893
 
@@ -50,7 +50,8 @@ export var containerModule = Module(function (register) {
50
50
  }); // bind CSS property handlers
51
51
 
52
52
  register(LayoutRegistry);
53
- register(StyleValueRegistry);
53
+ register(StyleValueRegistry); // register({ token: StyleValueRegistryContribution, useClass: StyleValueRegistry });
54
+
54
55
  register(CSSPropertyLengthOrPercentage);
55
56
  register(CSSPropertyLocalPosition);
56
57
  register(CSSPropertyOpacity);
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate, __generator, __metadata } from "tslib";
2
2
  import { inject, singleton } from 'mana-syringe';
3
- import { StyleValueRegistryContribution } from '../css/StyleValueRegistry';
3
+ import { StyleValueRegistry } from '../css/StyleValueRegistry';
4
4
  import { ElementEvent } from '../dom';
5
5
  import { RenderingContext, RenderingPluginContribution, dirtifyToRoot } from '../services';
6
6
 
@@ -28,6 +28,7 @@ function () {
28
28
 
29
29
  _this.styleValueRegistry.recalc(object);
30
30
 
31
+ console.log(object);
31
32
  dirtifyToRoot(object);
32
33
  renderingService.dirtify();
33
34
  };
@@ -63,7 +64,7 @@ function () {
63
64
 
64
65
  __decorate([inject(RenderingContext), __metadata("design:type", Object)], PrepareRendererPlugin.prototype, "renderingContext", void 0);
65
66
 
66
- __decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
67
+ __decorate([inject(StyleValueRegistry), __metadata("design:type", StyleValueRegistry)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
67
68
 
68
69
  PrepareRendererPlugin = __decorate([singleton({
69
70
  contrib: RenderingPluginContribution
@@ -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 { StyleValueRegistryContribution } from '../css/StyleValueRegistry';
4
+ import { StyleValueRegistry } from '../css/StyleValueRegistry';
5
5
  import { ElementEvent } from '../dom';
6
6
  import { RenderingContext, RenderReason } from './RenderingContext';
7
7
  import { SceneGraphService, sortByZIndex } from './SceneGraphService';
@@ -219,7 +219,7 @@ function () {
219
219
 
220
220
  __decorate([inject(SceneGraphService), __metadata("design:type", Object)], RenderingService.prototype, "sceneGraphService", void 0);
221
221
 
222
- __decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], RenderingService.prototype, "styleValueRegistry", void 0);
222
+ __decorate([inject(StyleValueRegistry), __metadata("design:type", StyleValueRegistry)], RenderingService.prototype, "styleValueRegistry", void 0);
223
223
 
224
224
  RenderingService = __decorate([singleton()], RenderingService);
225
225
  return RenderingService;
@@ -1,4 +1,3 @@
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';
@@ -66,7 +65,6 @@ export interface PropertyMetadata {
66
65
  * Blink used them in code generation(css_properties.json5)
67
66
  */
68
67
  export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
69
- export declare const StyleValueRegistryContribution: Syringe.DefinedToken;
70
68
  export declare class StyleValueRegistry {
71
69
  /**
72
70
  * need recalc later
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyleValueRegistryContribution = exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
6
+ exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
7
7
 
8
8
  var _tslib = require("tslib");
9
9
 
@@ -430,12 +430,11 @@ var BUILT_IN_PROPERTIES = [{
430
430
  }, {
431
431
  name: 'whiteSpace',
432
432
  layoutDependent: true
433
- }];
434
- exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
435
-
436
- var StyleValueRegistryContribution = _manaSyringe.Syringe.defineToken('StyleValueRegistry');
433
+ }]; // export const StyleValueRegistryContribution = Syringe.defineToken('StyleValueRegistry', {
434
+ // multiple: false,
435
+ // });
437
436
 
438
- exports.StyleValueRegistryContribution = StyleValueRegistryContribution;
437
+ exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
439
438
 
440
439
  var StyleValueRegistry =
441
440
  /** @class */
@@ -913,9 +912,7 @@ function () {
913
912
  };
914
913
 
915
914
  (0, _tslib.__decorate)([(0, _manaSyringe.postConstruct)(), (0, _tslib.__metadata)("design:type", Function), (0, _tslib.__metadata)("design:paramtypes", []), (0, _tslib.__metadata)("design:returntype", void 0)], StyleValueRegistry.prototype, "init", null);
916
- StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
917
- token: StyleValueRegistryContribution
918
- })], StyleValueRegistry);
915
+ StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], StyleValueRegistry);
919
916
  return StyleValueRegistry;
920
917
  }();
921
918
 
@@ -62,7 +62,8 @@ var containerModule = (0, _manaSyringe.Module)(function (register) {
62
62
  }); // bind CSS property handlers
63
63
 
64
64
  register(_css.LayoutRegistry);
65
- register(_css.StyleValueRegistry);
65
+ register(_css.StyleValueRegistry); // register({ token: StyleValueRegistryContribution, useClass: StyleValueRegistry });
66
+
66
67
  register(_css.CSSPropertyLengthOrPercentage);
67
68
  register(_css.CSSPropertyLocalPosition);
68
69
  register(_css.CSSPropertyOpacity);
@@ -39,6 +39,7 @@ function () {
39
39
 
40
40
  _this.styleValueRegistry.recalc(object);
41
41
 
42
+ console.log(object);
42
43
  (0, _services.dirtifyToRoot)(object);
43
44
  renderingService.dirtify();
44
45
  };
@@ -73,7 +74,7 @@ function () {
73
74
  };
74
75
 
75
76
  (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.StyleValueRegistryContribution), (0, _tslib.__metadata)("design:type", Function)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
77
+ (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistry), (0, _tslib.__metadata)("design:type", _StyleValueRegistry.StyleValueRegistry)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
77
78
  PrepareRendererPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
78
79
  contrib: _services.RenderingPluginContribution
79
80
  })], PrepareRendererPlugin);
@@ -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.StyleValueRegistryContribution), (0, _tslib.__metadata)("design:type", Function)], RenderingService.prototype, "styleValueRegistry", void 0);
236
+ (0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistry), (0, _tslib.__metadata)("design:type", _StyleValueRegistry.StyleValueRegistry)], RenderingService.prototype, "styleValueRegistry", void 0);
237
237
  RenderingService = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], RenderingService);
238
238
  return RenderingService;
239
239
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g",
3
- "version": "5.0.23-alpha.12",
3
+ "version": "5.0.23-alpha.13",
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.12",
41
+ "@antv/g-math": "^1.0.20-alpha.13",
42
42
  "@antv/util": "^3.0.0",
43
43
  "@types/offscreencanvas": "^2019.6.4",
44
44
  "d3-color": "^1.4.0",