@antv/g 5.0.23-alpha.10 → 5.0.23-alpha.11
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/dist/index.umd.min.js +2 -2
- package/es/css/StyleValueRegistry.d.ts +2 -0
- package/es/css/StyleValueRegistry.js +7 -3
- package/es/plugins/PrepareRendererPlugin.js +2 -2
- package/es/services/RenderingService.js +2 -2
- package/lib/css/StyleValueRegistry.d.ts +2 -0
- package/lib/css/StyleValueRegistry.js +13 -5
- package/lib/plugins/PrepareRendererPlugin.js +1 -1
- package/lib/services/RenderingService.js +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Syringe } from 'mana-syringe';
|
|
1
2
|
import type { DisplayObject } from '../display-objects';
|
|
2
3
|
import type { BaseStyleProps } from '../types';
|
|
3
4
|
import { CSSStyleValue } from './cssom';
|
|
@@ -65,6 +66,7 @@ export interface PropertyMetadata {
|
|
|
65
66
|
* Blink used them in code generation(css_properties.json5)
|
|
66
67
|
*/
|
|
67
68
|
export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
|
|
69
|
+
export declare const StyleValueRegistryContribution: Syringe.DefinedToken;
|
|
68
70
|
export declare class StyleValueRegistry {
|
|
69
71
|
/**
|
|
70
72
|
* need recalc later
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate, __metadata, __read, __spreadArray } from "tslib";
|
|
2
|
-
import { postConstruct, singleton, GlobalContainer } from 'mana-syringe';
|
|
2
|
+
import { postConstruct, singleton, GlobalContainer, Syringe } from 'mana-syringe';
|
|
3
3
|
import { vec3 } from 'gl-matrix';
|
|
4
|
-
import {
|
|
4
|
+
import { GeometryUpdaterFactory } from '../services/aabb/interfaces';
|
|
5
|
+
import { dirtifyToRoot } from '../services/SceneGraphService';
|
|
5
6
|
import { ElementEvent } from '../dom';
|
|
6
7
|
import { Shape } from '../types';
|
|
7
8
|
import { CSSKeywordValue, CSSStyleValue, CSSUnitValue } from './cssom';
|
|
@@ -410,6 +411,7 @@ export var BUILT_IN_PROPERTIES = [{
|
|
|
410
411
|
name: 'whiteSpace',
|
|
411
412
|
layoutDependent: true
|
|
412
413
|
}];
|
|
414
|
+
export var StyleValueRegistryContribution = Syringe.defineToken('StyleValueRegistry');
|
|
413
415
|
|
|
414
416
|
var StyleValueRegistry =
|
|
415
417
|
/** @class */
|
|
@@ -884,7 +886,9 @@ function () {
|
|
|
884
886
|
|
|
885
887
|
__decorate([postConstruct(), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", void 0)], StyleValueRegistry.prototype, "init", null);
|
|
886
888
|
|
|
887
|
-
StyleValueRegistry = __decorate([singleton(
|
|
889
|
+
StyleValueRegistry = __decorate([singleton({
|
|
890
|
+
token: StyleValueRegistryContribution
|
|
891
|
+
})], StyleValueRegistry);
|
|
888
892
|
return StyleValueRegistry;
|
|
889
893
|
}();
|
|
890
894
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter, __decorate, __generator, __metadata } from "tslib";
|
|
2
2
|
import { inject, singleton } from 'mana-syringe';
|
|
3
|
-
import {
|
|
3
|
+
import { StyleValueRegistryContribution } from '../css/StyleValueRegistry';
|
|
4
4
|
import { ElementEvent } from '../dom';
|
|
5
5
|
import { RenderingContext, RenderingPluginContribution, dirtifyToRoot } from '../services';
|
|
6
6
|
|
|
@@ -63,7 +63,7 @@ function () {
|
|
|
63
63
|
|
|
64
64
|
__decorate([inject(RenderingContext), __metadata("design:type", Object)], PrepareRendererPlugin.prototype, "renderingContext", void 0);
|
|
65
65
|
|
|
66
|
-
__decorate([inject(
|
|
66
|
+
__decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
|
|
67
67
|
|
|
68
68
|
PrepareRendererPlugin = __decorate([singleton({
|
|
69
69
|
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 {
|
|
4
|
+
import { StyleValueRegistryContribution } 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(
|
|
222
|
+
__decorate([inject(StyleValueRegistryContribution), __metadata("design:type", Function)], RenderingService.prototype, "styleValueRegistry", void 0);
|
|
223
223
|
|
|
224
224
|
RenderingService = __decorate([singleton()], RenderingService);
|
|
225
225
|
return RenderingService;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Syringe } from 'mana-syringe';
|
|
1
2
|
import type { DisplayObject } from '../display-objects';
|
|
2
3
|
import type { BaseStyleProps } from '../types';
|
|
3
4
|
import { CSSStyleValue } from './cssom';
|
|
@@ -65,6 +66,7 @@ export interface PropertyMetadata {
|
|
|
65
66
|
* Blink used them in code generation(css_properties.json5)
|
|
66
67
|
*/
|
|
67
68
|
export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
|
|
69
|
+
export declare const StyleValueRegistryContribution: Syringe.DefinedToken;
|
|
68
70
|
export declare class StyleValueRegistry {
|
|
69
71
|
/**
|
|
70
72
|
* 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.BUILT_IN_PROPERTIES = void 0;
|
|
6
|
+
exports.StyleValueRegistryContribution = exports.StyleValueRegistry = exports.PropertySyntax = exports.BUILT_IN_PROPERTIES = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -11,7 +11,9 @@ var _manaSyringe = require("mana-syringe");
|
|
|
11
11
|
|
|
12
12
|
var _glMatrix = require("gl-matrix");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _interfaces = require("../services/aabb/interfaces");
|
|
15
|
+
|
|
16
|
+
var _SceneGraphService = require("../services/SceneGraphService");
|
|
15
17
|
|
|
16
18
|
var _dom = require("../dom");
|
|
17
19
|
|
|
@@ -431,6 +433,10 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
431
433
|
}];
|
|
432
434
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
433
435
|
|
|
436
|
+
var StyleValueRegistryContribution = _manaSyringe.Syringe.defineToken('StyleValueRegistry');
|
|
437
|
+
|
|
438
|
+
exports.StyleValueRegistryContribution = StyleValueRegistryContribution;
|
|
439
|
+
|
|
434
440
|
var StyleValueRegistry =
|
|
435
441
|
/** @class */
|
|
436
442
|
function () {
|
|
@@ -761,7 +767,7 @@ function () {
|
|
|
761
767
|
StyleValueRegistry.prototype.updateGeometry = function (object) {
|
|
762
768
|
var _a;
|
|
763
769
|
|
|
764
|
-
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(
|
|
770
|
+
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_interfaces.GeometryUpdaterFactory);
|
|
765
771
|
|
|
766
772
|
var geometryUpdater = geometryUpdaterFactory(object.nodeName);
|
|
767
773
|
|
|
@@ -892,7 +898,7 @@ function () {
|
|
|
892
898
|
usedOriginYValue -= (anchor && anchor[1].value || 0) * geometry_1.contentBounds.halfExtents[1] * 2;
|
|
893
899
|
object.setOrigin(usedOriginXValue, usedOriginYValue);
|
|
894
900
|
object.emit(_dom.ElementEvent.GEOMETRY_BOUNDS_CHANGED, {});
|
|
895
|
-
(0,
|
|
901
|
+
(0, _SceneGraphService.dirtifyToRoot)(object);
|
|
896
902
|
}
|
|
897
903
|
};
|
|
898
904
|
|
|
@@ -907,7 +913,9 @@ function () {
|
|
|
907
913
|
};
|
|
908
914
|
|
|
909
915
|
(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);
|
|
910
|
-
StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)(
|
|
916
|
+
StyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
917
|
+
token: StyleValueRegistryContribution
|
|
918
|
+
})], StyleValueRegistry);
|
|
911
919
|
return StyleValueRegistry;
|
|
912
920
|
}();
|
|
913
921
|
|
|
@@ -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.
|
|
76
|
+
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistryContribution), (0, _tslib.__metadata)("design:type", Function)], PrepareRendererPlugin.prototype, "styleValueRegistry", void 0);
|
|
77
77
|
PrepareRendererPlugin = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
78
78
|
contrib: _services.RenderingPluginContribution
|
|
79
79
|
})], 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.
|
|
236
|
+
(0, _tslib.__decorate)([(0, _manaSyringe.inject)(_StyleValueRegistry.StyleValueRegistryContribution), (0, _tslib.__metadata)("design:type", Function)], 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.
|
|
3
|
+
"version": "5.0.23-alpha.11",
|
|
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.
|
|
41
|
+
"@antv/g-math": "^1.0.20-alpha.11",
|
|
42
42
|
"@antv/util": "^3.0.0",
|
|
43
43
|
"@types/offscreencanvas": "^2019.6.4",
|
|
44
44
|
"d3-color": "^1.4.0",
|