@antv/g 5.0.23-alpha.9 → 5.1.0
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 +4 -3
- package/es/AbstractRenderer.d.ts +11 -0
- package/es/AbstractRenderer.js +17 -2
- package/es/Canvas.d.ts +1 -1
- package/es/Canvas.js +2 -0
- package/es/css/CSS.d.ts +2 -1
- package/es/css/CSS.js +6 -2
- package/es/css/CSSProperty.d.ts +3 -2
- package/es/css/StyleValueRegistry.d.ts +4 -2
- package/es/css/StyleValueRegistry.js +100 -95
- package/es/css/cssom/CSSNumericValue.js +1 -1
- package/es/css/index.d.ts +2 -1
- package/es/css/index.js +2 -1
- package/es/css/interfaces.d.ts +6 -0
- package/es/css/interfaces.js +2 -0
- package/es/css/layout/FragmentResult.d.ts +32 -0
- package/es/css/layout/FragmentResult.js +32 -0
- package/es/css/layout/LayoutChildren.d.ts +23 -0
- package/es/css/layout/LayoutChildren.js +55 -0
- package/es/css/layout/LayoutContext.d.ts +35 -0
- package/es/css/layout/LayoutContext.js +35 -0
- package/es/css/layout/LayoutDefinition.d.ts +20 -0
- package/es/css/layout/LayoutDefinition.js +9 -0
- package/es/css/layout/LayoutEdges.d.ts +24 -0
- package/es/css/layout/LayoutEdges.js +41 -0
- package/es/css/layout/LayoutEngine.d.ts +41 -0
- package/es/css/layout/LayoutEngine.js +332 -0
- package/es/css/layout/LayoutFragment.d.ts +26 -0
- package/es/css/layout/LayoutFragment.js +28 -0
- package/es/css/layout/LayoutObject.d.ts +46 -0
- package/es/css/layout/LayoutObject.js +172 -0
- package/es/css/layout/LayoutRegistry.d.ts +16 -0
- package/es/css/layout/LayoutRegistry.js +78 -0
- package/es/css/layout/LayoutWorkTask.d.ts +14 -0
- package/es/css/layout/LayoutWorkTask.js +1 -0
- package/es/css/layout/index.d.ts +11 -0
- package/es/css/layout/index.js +11 -0
- package/es/css/layout/types.d.ts +104 -0
- package/es/css/layout/types.js +66 -0
- package/es/css/parser/color.d.ts +1 -1
- package/es/css/parser/color.js +2 -2
- package/es/css/parser/dimension.js +5 -1
- package/es/css/parser/path.d.ts +2 -2
- package/es/css/parser/path.js +9 -2
- package/es/css/parser/points.d.ts +8 -1
- package/es/css/parser/points.js +33 -3
- package/es/css/parser/transform.js +1 -1
- package/es/css/properties/CSSPropertyClipPath.js +7 -1
- package/es/css/properties/CSSPropertyColor.d.ts +1 -1
- package/es/css/properties/CSSPropertyLengthOrPercentage.d.ts +1 -1
- package/es/css/properties/CSSPropertyLocalPosition.d.ts +0 -9
- package/es/css/properties/CSSPropertyLocalPosition.js +64 -20
- package/es/css/properties/CSSPropertyPath.d.ts +2 -2
- package/es/css/properties/CSSPropertyPath.js +7 -5
- package/es/css/properties/CSSPropertyPoints.js +3 -4
- package/es/css/properties/CSSPropertyTransform.d.ts +1 -1
- package/es/css/properties/CSSPropertyTransform.js +76 -104
- package/es/display-objects/Circle.d.ts +4 -0
- package/es/display-objects/Circle.js +2 -0
- package/es/display-objects/DisplayObject.d.ts +2 -9
- package/es/display-objects/DisplayObject.js +8 -27
- package/es/display-objects/Ellipse.d.ts +4 -0
- package/es/display-objects/Ellipse.js +2 -0
- package/es/display-objects/Group.d.ts +4 -0
- package/es/display-objects/Group.js +2 -0
- package/es/display-objects/HTML.d.ts +4 -4
- package/es/display-objects/HTML.js +5 -3
- package/es/display-objects/Image.d.ts +4 -0
- package/es/display-objects/Image.js +2 -0
- package/es/display-objects/Line.js +2 -0
- package/es/display-objects/Path.d.ts +2 -2
- package/es/display-objects/Polygon.js +1 -1
- package/es/display-objects/Polyline.js +1 -1
- package/es/display-objects/Rect.d.ts +6 -2
- package/es/display-objects/Rect.js +2 -0
- package/es/display-objects/Text.d.ts +4 -0
- package/es/display-objects/Text.js +2 -0
- package/es/dom/Document.js +2 -2
- package/es/dom/Element.js +1 -0
- package/es/global-module.js +91 -8
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/plugins/CullingPlugin.d.ts +1 -0
- package/es/plugins/CullingPlugin.js +8 -3
- package/es/plugins/DirtyCheckPlugin.d.ts +1 -0
- package/es/plugins/DirtyCheckPlugin.js +7 -2
- package/es/plugins/EventPlugin.d.ts +1 -0
- package/es/plugins/EventPlugin.js +14 -9
- package/es/plugins/PrepareRendererPlugin.d.ts +1 -0
- package/es/plugins/PrepareRendererPlugin.js +10 -5
- package/es/services/EventService.js +14 -10
- package/es/services/OffscreenCanvasCreator.d.ts +1 -1
- package/es/services/OffscreenCanvasCreator.js +1 -1
- package/es/services/RenderingService.d.ts +18 -18
- package/es/services/RenderingService.js +26 -23
- package/es/services/SceneGraphService.d.ts +2 -0
- package/es/services/SceneGraphService.js +12 -1
- package/es/services/aabb/CircleUpdater.d.ts +0 -2
- package/es/services/aabb/CircleUpdater.js +2 -6
- package/es/services/aabb/EllipseUpdater.d.ts +0 -2
- package/es/services/aabb/EllipseUpdater.js +2 -6
- package/es/services/aabb/LineUpdater.d.ts +0 -2
- package/es/services/aabb/LineUpdater.js +1 -3
- package/es/services/aabb/PathUpdater.d.ts +0 -2
- package/es/services/aabb/PathUpdater.js +1 -5
- package/es/services/aabb/PolylineUpdater.d.ts +0 -2
- package/es/services/aabb/PolylineUpdater.js +1 -3
- package/es/services/aabb/RectUpdater.d.ts +0 -2
- package/es/services/aabb/RectUpdater.js +1 -5
- package/es/services/aabb/TextUpdater.d.ts +7 -0
- package/es/services/aabb/TextUpdater.js +0 -4
- package/es/services/aabb/interfaces.d.ts +0 -3
- package/es/types.d.ts +12 -23
- package/es/types.js +1 -0
- package/es/utils/deferred.d.ts +43 -0
- package/es/utils/deferred.js +117 -0
- package/es/utils/dom.d.ts +2 -0
- package/es/utils/dom.js +8 -0
- package/es/utils/index.d.ts +2 -1
- package/es/utils/index.js +2 -1
- package/es/utils/interpolation.js +3 -9
- package/es/utils/math.js +4 -3
- package/es/utils/path.d.ts +2 -2
- package/es/utils/path.js +61 -24
- package/lib/AbstractRenderer.d.ts +11 -0
- package/lib/AbstractRenderer.js +17 -2
- package/lib/Canvas.d.ts +1 -1
- package/lib/Canvas.js +2 -0
- package/lib/css/CSS.d.ts +2 -1
- package/lib/css/CSS.js +9 -3
- package/lib/css/CSSProperty.d.ts +3 -2
- package/lib/css/StyleValueRegistry.d.ts +4 -2
- package/lib/css/StyleValueRegistry.js +104 -96
- package/lib/css/cssom/CSSNumericValue.js +17 -17
- package/lib/css/index.d.ts +2 -1
- package/lib/css/index.js +25 -12
- package/lib/css/interfaces.d.ts +6 -0
- package/lib/css/interfaces.js +12 -0
- package/lib/css/layout/FragmentResult.d.ts +32 -0
- package/lib/css/layout/FragmentResult.js +51 -0
- package/lib/css/layout/LayoutChildren.d.ts +23 -0
- package/lib/css/layout/LayoutChildren.js +72 -0
- package/lib/css/layout/LayoutContext.d.ts +35 -0
- package/lib/css/layout/LayoutContext.js +49 -0
- package/lib/css/layout/LayoutDefinition.d.ts +20 -0
- package/lib/css/layout/LayoutDefinition.js +16 -0
- package/lib/css/layout/LayoutEdges.d.ts +24 -0
- package/lib/css/layout/LayoutEdges.js +56 -0
- package/lib/css/layout/LayoutEngine.d.ts +41 -0
- package/lib/css/layout/LayoutEngine.js +345 -0
- package/lib/css/layout/LayoutFragment.d.ts +26 -0
- package/lib/css/layout/LayoutFragment.js +44 -0
- package/lib/css/layout/LayoutObject.d.ts +46 -0
- package/lib/css/layout/LayoutObject.js +182 -0
- package/lib/css/layout/LayoutRegistry.d.ts +16 -0
- package/lib/css/layout/LayoutRegistry.js +87 -0
- package/lib/css/layout/LayoutWorkTask.d.ts +14 -0
- package/lib/css/layout/LayoutWorkTask.js +5 -0
- package/lib/css/layout/index.d.ts +11 -0
- package/lib/css/layout/index.js +148 -0
- package/lib/css/layout/types.d.ts +104 -0
- package/lib/css/layout/types.js +74 -0
- package/lib/css/parser/color.d.ts +1 -1
- package/lib/css/parser/color.js +1 -1
- package/lib/css/parser/dimension.js +4 -0
- package/lib/css/parser/path.d.ts +2 -2
- package/lib/css/parser/path.js +9 -2
- package/lib/css/parser/points.d.ts +8 -1
- package/lib/css/parser/points.js +33 -3
- package/lib/css/parser/transform.js +1 -1
- package/lib/css/properties/CSSPropertyClipPath.js +8 -1
- package/lib/css/properties/CSSPropertyColor.d.ts +1 -1
- package/lib/css/properties/CSSPropertyLengthOrPercentage.d.ts +1 -1
- package/lib/css/properties/CSSPropertyLocalPosition.d.ts +0 -9
- package/lib/css/properties/CSSPropertyLocalPosition.js +65 -20
- package/lib/css/properties/CSSPropertyPath.d.ts +2 -2
- package/lib/css/properties/CSSPropertyPath.js +7 -5
- package/lib/css/properties/CSSPropertyPoints.js +3 -4
- package/lib/css/properties/CSSPropertyTransform.d.ts +1 -1
- package/lib/css/properties/CSSPropertyTransform.js +75 -103
- package/lib/display-objects/Circle.d.ts +4 -0
- package/lib/display-objects/Circle.js +2 -0
- package/lib/display-objects/DisplayObject.d.ts +2 -9
- package/lib/display-objects/DisplayObject.js +9 -29
- package/lib/display-objects/Ellipse.d.ts +4 -0
- package/lib/display-objects/Ellipse.js +2 -0
- package/lib/display-objects/Group.d.ts +4 -0
- package/lib/display-objects/Group.js +2 -0
- package/lib/display-objects/HTML.d.ts +4 -4
- package/lib/display-objects/HTML.js +5 -3
- package/lib/display-objects/Image.d.ts +4 -0
- package/lib/display-objects/Image.js +2 -0
- package/lib/display-objects/Line.js +2 -0
- package/lib/display-objects/Path.d.ts +2 -2
- package/lib/display-objects/Polygon.js +1 -1
- package/lib/display-objects/Polyline.js +1 -1
- package/lib/display-objects/Rect.d.ts +6 -2
- package/lib/display-objects/Rect.js +2 -0
- package/lib/display-objects/Text.d.ts +4 -0
- package/lib/display-objects/Text.js +2 -0
- package/lib/dom/Document.js +2 -2
- package/lib/dom/Element.js +1 -0
- package/lib/global-module.js +91 -6
- package/lib/index.d.ts +3 -0
- package/lib/index.js +7 -2
- package/lib/plugins/CullingPlugin.d.ts +1 -0
- package/lib/plugins/CullingPlugin.js +7 -3
- package/lib/plugins/DirtyCheckPlugin.d.ts +1 -0
- package/lib/plugins/DirtyCheckPlugin.js +6 -2
- package/lib/plugins/EventPlugin.d.ts +1 -0
- package/lib/plugins/EventPlugin.js +13 -9
- package/lib/plugins/PrepareRendererPlugin.d.ts +1 -0
- package/lib/plugins/PrepareRendererPlugin.js +9 -5
- package/lib/services/EventService.js +14 -10
- package/lib/services/OffscreenCanvasCreator.d.ts +1 -1
- package/lib/services/OffscreenCanvasCreator.js +1 -1
- package/lib/services/RenderingService.d.ts +18 -18
- package/lib/services/RenderingService.js +26 -23
- package/lib/services/SceneGraphService.d.ts +2 -0
- package/lib/services/SceneGraphService.js +15 -1
- package/lib/services/aabb/CircleUpdater.d.ts +0 -2
- package/lib/services/aabb/CircleUpdater.js +2 -6
- package/lib/services/aabb/EllipseUpdater.d.ts +0 -2
- package/lib/services/aabb/EllipseUpdater.js +2 -6
- package/lib/services/aabb/LineUpdater.d.ts +0 -2
- package/lib/services/aabb/LineUpdater.js +1 -3
- package/lib/services/aabb/PathUpdater.d.ts +0 -2
- package/lib/services/aabb/PathUpdater.js +1 -5
- package/lib/services/aabb/PolylineUpdater.d.ts +0 -2
- package/lib/services/aabb/PolylineUpdater.js +1 -3
- package/lib/services/aabb/RectUpdater.d.ts +0 -2
- package/lib/services/aabb/RectUpdater.js +1 -5
- package/lib/services/aabb/TextUpdater.d.ts +7 -0
- package/lib/services/aabb/TextUpdater.js +0 -4
- package/lib/services/aabb/interfaces.d.ts +0 -3
- package/lib/types.d.ts +12 -23
- package/lib/types.js +1 -0
- package/lib/utils/deferred.d.ts +43 -0
- package/lib/utils/deferred.js +131 -0
- package/lib/utils/dom.d.ts +2 -0
- package/lib/utils/dom.js +17 -0
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/index.js +17 -4
- package/lib/utils/interpolation.js +4 -10
- package/lib/utils/math.js +4 -3
- package/lib/utils/path.d.ts +2 -2
- package/lib/utils/path.js +55 -24
- package/package.json +4 -3
- package/es/css/LayoutRegistry.d.ts +0 -11
- package/es/css/LayoutRegistry.js +0 -22
- package/es/utils/hooks.d.ts +0 -280
- package/es/utils/hooks.js +0 -753
- package/lib/css/LayoutRegistry.d.ts +0 -11
- package/lib/css/LayoutRegistry.js +0 -30
- package/lib/utils/hooks.d.ts +0 -280
- package/lib/utils/hooks.js +0 -759
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.PropertySyntax = exports.DefaultStyleValueRegistry = 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
|
|
|
@@ -27,13 +29,16 @@ var _utils = require("../utils");
|
|
|
27
29
|
|
|
28
30
|
var _shapes = require("../shapes");
|
|
29
31
|
|
|
32
|
+
var _interfaces2 = require("./interfaces");
|
|
33
|
+
|
|
30
34
|
var PropertySyntax = {
|
|
31
35
|
COLOR: '<color>',
|
|
32
36
|
PAINT: '<paint>',
|
|
33
37
|
NUMBER: '<number>',
|
|
34
38
|
LENGTH: '<length>',
|
|
35
39
|
PERCENTAGE: '<percentage>',
|
|
36
|
-
LENGTH_PERCENTAGE: '<length> | <percentage>'
|
|
40
|
+
LENGTH_PERCENTAGE: '<length> | <percentage>',
|
|
41
|
+
LIST_OF_POINTS: '<list-of-points>'
|
|
37
42
|
};
|
|
38
43
|
/**
|
|
39
44
|
* Blink used them in code generation(css_properties.json5)
|
|
@@ -47,29 +52,6 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
47
52
|
*/
|
|
48
53
|
name: 'display',
|
|
49
54
|
keywords: ['none']
|
|
50
|
-
}, {
|
|
51
|
-
// x in local space
|
|
52
|
-
name: 'x',
|
|
53
|
-
interpolable: true,
|
|
54
|
-
alias: ['cx'],
|
|
55
|
-
defaultValue: '0',
|
|
56
|
-
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
57
|
-
handler: _properties.CSSPropertyLocalPosition
|
|
58
|
-
}, {
|
|
59
|
-
// y in local space
|
|
60
|
-
name: 'y',
|
|
61
|
-
interpolable: true,
|
|
62
|
-
alias: ['cy'],
|
|
63
|
-
defaultValue: '0',
|
|
64
|
-
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
65
|
-
handler: _properties.CSSPropertyLocalPosition
|
|
66
|
-
}, {
|
|
67
|
-
// z in local space
|
|
68
|
-
name: 'z',
|
|
69
|
-
interpolable: true,
|
|
70
|
-
defaultValue: '0',
|
|
71
|
-
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
72
|
-
handler: _properties.CSSPropertyLocalPosition
|
|
73
55
|
}, {
|
|
74
56
|
/**
|
|
75
57
|
* range [0.0, 1.0]
|
|
@@ -154,6 +136,13 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
154
136
|
alias: ['strokeWidth'],
|
|
155
137
|
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
156
138
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
139
|
+
}, {
|
|
140
|
+
name: 'increasedLineWidthForHitTesting',
|
|
141
|
+
inherited: true,
|
|
142
|
+
defaultValue: '0',
|
|
143
|
+
layoutDependent: true,
|
|
144
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
145
|
+
handler: _properties.CSSPropertyLengthOrPercentage
|
|
157
146
|
}, {
|
|
158
147
|
name: 'lineJoin',
|
|
159
148
|
inherited: true,
|
|
@@ -235,6 +224,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
235
224
|
handler: _properties.CSSPropertyClipPath
|
|
236
225
|
}, {
|
|
237
226
|
name: 'transform',
|
|
227
|
+
parsePriority: 100,
|
|
238
228
|
interpolable: true,
|
|
239
229
|
keywords: ['none'],
|
|
240
230
|
defaultValue: 'none',
|
|
@@ -251,8 +241,20 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
251
241
|
parsePriority: 99,
|
|
252
242
|
layoutDependent: true,
|
|
253
243
|
handler: _properties.CSSPropertyAnchor
|
|
254
|
-
}, //
|
|
244
|
+
}, // <circle> & <ellipse>
|
|
255
245
|
{
|
|
246
|
+
name: 'cx',
|
|
247
|
+
interpolable: true,
|
|
248
|
+
defaultValue: '0',
|
|
249
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
250
|
+
handler: _properties.CSSPropertyLocalPosition
|
|
251
|
+
}, {
|
|
252
|
+
name: 'cy',
|
|
253
|
+
interpolable: true,
|
|
254
|
+
defaultValue: '0',
|
|
255
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
256
|
+
handler: _properties.CSSPropertyLocalPosition
|
|
257
|
+
}, {
|
|
256
258
|
name: 'r',
|
|
257
259
|
interpolable: true,
|
|
258
260
|
layoutDependent: true,
|
|
@@ -270,8 +272,29 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
270
272
|
layoutDependent: true,
|
|
271
273
|
defaultValue: 'auto',
|
|
272
274
|
handler: _properties.CSSPropertyLengthOrPercentage
|
|
273
|
-
}, // Rect Image
|
|
275
|
+
}, // Rect Image Group
|
|
274
276
|
{
|
|
277
|
+
// x in local space
|
|
278
|
+
name: 'x',
|
|
279
|
+
interpolable: true,
|
|
280
|
+
defaultValue: '0',
|
|
281
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
282
|
+
handler: _properties.CSSPropertyLocalPosition
|
|
283
|
+
}, {
|
|
284
|
+
// y in local space
|
|
285
|
+
name: 'y',
|
|
286
|
+
interpolable: true,
|
|
287
|
+
defaultValue: '0',
|
|
288
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
289
|
+
handler: _properties.CSSPropertyLocalPosition
|
|
290
|
+
}, {
|
|
291
|
+
// z in local space
|
|
292
|
+
name: 'z',
|
|
293
|
+
interpolable: true,
|
|
294
|
+
defaultValue: '0',
|
|
295
|
+
syntax: PropertySyntax.LENGTH_PERCENTAGE,
|
|
296
|
+
handler: _properties.CSSPropertyLocalPosition
|
|
297
|
+
}, {
|
|
275
298
|
name: 'width',
|
|
276
299
|
interpolable: true,
|
|
277
300
|
layoutDependent: true,
|
|
@@ -336,11 +359,13 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
336
359
|
interpolable: true,
|
|
337
360
|
layoutDependent: true,
|
|
338
361
|
defaultValue: '',
|
|
362
|
+
alias: ['d'],
|
|
339
363
|
handler: _properties.CSSPropertyPath
|
|
340
|
-
}, // Polyline
|
|
364
|
+
}, // Polyline & Polygon
|
|
341
365
|
{
|
|
342
366
|
name: 'points',
|
|
343
367
|
layoutDependent: true,
|
|
368
|
+
syntax: PropertySyntax.LIST_OF_POINTS,
|
|
344
369
|
handler: _properties.CSSPropertyPoints
|
|
345
370
|
}, // Text
|
|
346
371
|
{
|
|
@@ -431,10 +456,10 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
431
456
|
}];
|
|
432
457
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
433
458
|
|
|
434
|
-
var
|
|
459
|
+
var DefaultStyleValueRegistry =
|
|
435
460
|
/** @class */
|
|
436
461
|
function () {
|
|
437
|
-
function
|
|
462
|
+
function DefaultStyleValueRegistry() {
|
|
438
463
|
/**
|
|
439
464
|
* need recalc later
|
|
440
465
|
*/
|
|
@@ -470,7 +495,7 @@ function () {
|
|
|
470
495
|
// > = {};
|
|
471
496
|
|
|
472
497
|
|
|
473
|
-
|
|
498
|
+
DefaultStyleValueRegistry.prototype.init = function () {
|
|
474
499
|
var _this = this;
|
|
475
500
|
|
|
476
501
|
BUILT_IN_PROPERTIES.forEach(function (property) {
|
|
@@ -478,7 +503,7 @@ function () {
|
|
|
478
503
|
});
|
|
479
504
|
};
|
|
480
505
|
|
|
481
|
-
|
|
506
|
+
DefaultStyleValueRegistry.prototype.registerMetadata = function (metadata) {
|
|
482
507
|
var _this = this;
|
|
483
508
|
|
|
484
509
|
(0, _tslib.__spreadArray)([metadata.name], (0, _tslib.__read)(metadata.alias || []), false).forEach(function (name) {
|
|
@@ -486,7 +511,7 @@ function () {
|
|
|
486
511
|
});
|
|
487
512
|
};
|
|
488
513
|
|
|
489
|
-
|
|
514
|
+
DefaultStyleValueRegistry.prototype.getMetadata = function (name) {
|
|
490
515
|
return this.cache[name];
|
|
491
516
|
};
|
|
492
517
|
/**
|
|
@@ -500,7 +525,7 @@ function () {
|
|
|
500
525
|
*/
|
|
501
526
|
|
|
502
527
|
|
|
503
|
-
|
|
528
|
+
DefaultStyleValueRegistry.prototype.processProperties = function (object, attributes, options) {
|
|
504
529
|
var _this = this;
|
|
505
530
|
|
|
506
531
|
if (options === void 0) {
|
|
@@ -537,7 +562,7 @@ function () {
|
|
|
537
562
|
|
|
538
563
|
if (!skipParse) {
|
|
539
564
|
sortedNames.forEach(function (name) {
|
|
540
|
-
object.computedStyle[name] = _this.parseProperty(name, object.attributes[name]);
|
|
565
|
+
object.computedStyle[name] = _this.parseProperty(name, object.attributes[name], object);
|
|
541
566
|
});
|
|
542
567
|
}
|
|
543
568
|
|
|
@@ -581,11 +606,11 @@ function () {
|
|
|
581
606
|
*/
|
|
582
607
|
|
|
583
608
|
|
|
584
|
-
|
|
609
|
+
DefaultStyleValueRegistry.prototype.parseProperty = function (name, value, object) {
|
|
585
610
|
var metadata = this.getMetadata(name);
|
|
586
611
|
var computed = value;
|
|
587
612
|
|
|
588
|
-
if (value === '') {
|
|
613
|
+
if (value === '' || (0, _utils.isNil)(value)) {
|
|
589
614
|
value = 'unset';
|
|
590
615
|
}
|
|
591
616
|
|
|
@@ -604,7 +629,7 @@ function () {
|
|
|
604
629
|
|
|
605
630
|
if (propertyHandler && propertyHandler.parser) {
|
|
606
631
|
// try to parse it to CSSStyleValue, eg. '10px' -> CSS.px(10)
|
|
607
|
-
computed = propertyHandler.parser(value);
|
|
632
|
+
computed = propertyHandler.parser(value, object);
|
|
608
633
|
}
|
|
609
634
|
}
|
|
610
635
|
}
|
|
@@ -617,7 +642,7 @@ function () {
|
|
|
617
642
|
*/
|
|
618
643
|
|
|
619
644
|
|
|
620
|
-
|
|
645
|
+
DefaultStyleValueRegistry.prototype.computeProperty = function (name, computed, object) {
|
|
621
646
|
var metadata = this.getMetadata(name);
|
|
622
647
|
var isDocumentElement = object.id === 'g-root';
|
|
623
648
|
var used = computed instanceof _cssom.CSSStyleValue ? computed.clone() : computed;
|
|
@@ -643,8 +668,8 @@ function () {
|
|
|
643
668
|
|
|
644
669
|
if (value === 'initial') {
|
|
645
670
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/initial
|
|
646
|
-
if (defaultValue) {
|
|
647
|
-
computed = this.parseProperty(name, defaultValue);
|
|
671
|
+
if (!(0, _utils.isNil)(defaultValue)) {
|
|
672
|
+
computed = this.parseProperty(name, defaultValue, object);
|
|
648
673
|
}
|
|
649
674
|
} else if (value === 'inherit') {
|
|
650
675
|
// @see https://developer.mozilla.org/en-US/docs/Web/CSS/inherit
|
|
@@ -682,7 +707,7 @@ function () {
|
|
|
682
707
|
return false;
|
|
683
708
|
};
|
|
684
709
|
|
|
685
|
-
|
|
710
|
+
DefaultStyleValueRegistry.prototype.postProcessProperty = function (name, object) {
|
|
686
711
|
var metadata = this.getMetadata(name);
|
|
687
712
|
|
|
688
713
|
if (metadata && metadata.handler) {
|
|
@@ -694,7 +719,7 @@ function () {
|
|
|
694
719
|
}
|
|
695
720
|
};
|
|
696
721
|
|
|
697
|
-
|
|
722
|
+
DefaultStyleValueRegistry.prototype.isPropertyResolved = function (object, name) {
|
|
698
723
|
if (!this.unresolvedProperties[object.entity] || this.unresolvedProperties[object.entity].length === 0) {
|
|
699
724
|
return true;
|
|
700
725
|
}
|
|
@@ -706,7 +731,7 @@ function () {
|
|
|
706
731
|
*/
|
|
707
732
|
|
|
708
733
|
|
|
709
|
-
|
|
734
|
+
DefaultStyleValueRegistry.prototype.addUnresolveProperty = function (object, name) {
|
|
710
735
|
if (!this.unresolvedProperties[object.entity]) {
|
|
711
736
|
this.unresolvedProperties[object.entity] = [];
|
|
712
737
|
}
|
|
@@ -716,7 +741,7 @@ function () {
|
|
|
716
741
|
}
|
|
717
742
|
};
|
|
718
743
|
|
|
719
|
-
|
|
744
|
+
DefaultStyleValueRegistry.prototype.tryToResolveProperty = function (object, name, options) {
|
|
720
745
|
if (options === void 0) {
|
|
721
746
|
options = {};
|
|
722
747
|
}
|
|
@@ -740,7 +765,7 @@ function () {
|
|
|
740
765
|
return false;
|
|
741
766
|
};
|
|
742
767
|
|
|
743
|
-
|
|
768
|
+
DefaultStyleValueRegistry.prototype.recalc = function (object) {
|
|
744
769
|
var properties = this.unresolvedProperties[object.entity];
|
|
745
770
|
|
|
746
771
|
if (properties && properties.length) {
|
|
@@ -758,10 +783,10 @@ function () {
|
|
|
758
783
|
*/
|
|
759
784
|
|
|
760
785
|
|
|
761
|
-
|
|
786
|
+
DefaultStyleValueRegistry.prototype.updateGeometry = function (object) {
|
|
762
787
|
var _a;
|
|
763
788
|
|
|
764
|
-
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(
|
|
789
|
+
var geometryUpdaterFactory = _manaSyringe.GlobalContainer.get(_interfaces.GeometryUpdaterFactory);
|
|
765
790
|
|
|
766
791
|
var geometryUpdater = geometryUpdaterFactory(object.nodeName);
|
|
767
792
|
|
|
@@ -783,41 +808,24 @@ function () {
|
|
|
783
808
|
height = _b.height,
|
|
784
809
|
_c = _b.depth,
|
|
785
810
|
depth = _c === void 0 ? 0 : _c,
|
|
786
|
-
_d = _b.
|
|
787
|
-
|
|
788
|
-
_e = _b.
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
// z = 0,
|
|
793
|
-
offsetX = _f === void 0 ? 0 : _f,
|
|
794
|
-
_g = _b.offsetY,
|
|
795
|
-
offsetY = _g === void 0 ? 0 : _g,
|
|
796
|
-
_h = _b.offsetZ,
|
|
797
|
-
offsetZ = _h === void 0 ? 0 : _h;
|
|
798
|
-
|
|
799
|
-
if (object.nodeName === _types.Shape.LINE || object.nodeName === _types.Shape.POLYLINE || object.nodeName === _types.Shape.POLYGON || object.nodeName === _types.Shape.PATH) {
|
|
800
|
-
parsedStyle.offsetX = x - (parsedStyle.defX || 0);
|
|
801
|
-
parsedStyle.offsetY = y - (parsedStyle.defY || 0);
|
|
802
|
-
parsedStyle.defX = x;
|
|
803
|
-
parsedStyle.defY = y; // modify x/y/z
|
|
804
|
-
|
|
805
|
-
object.attributes.x += parsedStyle.offsetX;
|
|
806
|
-
object.attributes.y += parsedStyle.offsetY;
|
|
807
|
-
parsedStyle.x = parsedStyle.x.add(new _cssom.CSSUnitValue(parsedStyle.offsetX, 'px'));
|
|
808
|
-
parsedStyle.y = parsedStyle.y.add(new _cssom.CSSUnitValue(parsedStyle.offsetY, 'px'));
|
|
809
|
-
} // init with content box
|
|
811
|
+
_d = _b.offsetX,
|
|
812
|
+
offsetX = _d === void 0 ? 0 : _d,
|
|
813
|
+
_e = _b.offsetY,
|
|
814
|
+
offsetY = _e === void 0 ? 0 : _e,
|
|
815
|
+
_f = _b.offsetZ,
|
|
816
|
+
offsetZ = _f === void 0 ? 0 : _f; // init with content box
|
|
810
817
|
|
|
811
818
|
|
|
812
819
|
var halfExtents = _glMatrix.vec3.fromValues(width / 2, height / 2, depth / 2); // anchor is center by default, don't account for lineWidth here
|
|
813
820
|
|
|
814
821
|
|
|
815
|
-
var
|
|
816
|
-
lineWidth =
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
822
|
+
var _g = parsedStyle,
|
|
823
|
+
lineWidth = _g.lineWidth,
|
|
824
|
+
increasedLineWidthForHitTesting = _g.increasedLineWidthForHitTesting,
|
|
825
|
+
shadowColor = _g.shadowColor,
|
|
826
|
+
_h = _g.filter,
|
|
827
|
+
filter = _h === void 0 ? [] : _h,
|
|
828
|
+
transformOrigin = _g.transformOrigin;
|
|
821
829
|
var anchor = parsedStyle.anchor; // <Text> use textAlign & textBaseline instead of anchor
|
|
822
830
|
|
|
823
831
|
if (object.nodeName === _types.Shape.TEXT) {
|
|
@@ -828,22 +836,20 @@ function () {
|
|
|
828
836
|
|
|
829
837
|
|
|
830
838
|
geometry_1.contentBounds.update(center, halfExtents);
|
|
839
|
+
var halfLineWidth = (((lineWidth === null || lineWidth === void 0 ? void 0 : lineWidth.value) || 0) + ((increasedLineWidthForHitTesting === null || increasedLineWidthForHitTesting === void 0 ? void 0 : increasedLineWidthForHitTesting.value) || 0)) / 2; // append border
|
|
831
840
|
|
|
832
|
-
|
|
833
|
-
// append border
|
|
834
|
-
_glMatrix.vec3.add(halfExtents, halfExtents, _glMatrix.vec3.fromValues(lineWidth.value / 2, lineWidth.value / 2, 0));
|
|
835
|
-
}
|
|
841
|
+
_glMatrix.vec3.add(halfExtents, halfExtents, _glMatrix.vec3.fromValues(halfLineWidth, halfLineWidth, 0));
|
|
836
842
|
|
|
837
843
|
geometry_1.renderBounds.update(center, halfExtents); // account for shadow, only support constant value now
|
|
838
844
|
|
|
839
845
|
if (shadowColor) {
|
|
840
|
-
var
|
|
841
|
-
min =
|
|
842
|
-
max =
|
|
843
|
-
var
|
|
844
|
-
shadowBlur =
|
|
845
|
-
shadowOffsetX =
|
|
846
|
-
shadowOffsetY =
|
|
846
|
+
var _j = geometry_1.renderBounds,
|
|
847
|
+
min = _j.min,
|
|
848
|
+
max = _j.max;
|
|
849
|
+
var _k = parsedStyle,
|
|
850
|
+
shadowBlur = _k.shadowBlur,
|
|
851
|
+
shadowOffsetX = _k.shadowOffsetX,
|
|
852
|
+
shadowOffsetY = _k.shadowOffsetY;
|
|
847
853
|
var shadowBlurInPixels = shadowBlur && shadowBlur.value || 0;
|
|
848
854
|
var shadowOffsetXInPixels = shadowOffsetX && shadowOffsetX.value || 0;
|
|
849
855
|
var shadowOffsetYInPixels = shadowOffsetY && shadowOffsetY.value || 0;
|
|
@@ -892,11 +898,11 @@ 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
|
|
|
899
|
-
|
|
905
|
+
DefaultStyleValueRegistry.prototype.isPropertyInheritable = function (name) {
|
|
900
906
|
var metadata = this.getMetadata(name);
|
|
901
907
|
|
|
902
908
|
if (!metadata) {
|
|
@@ -906,9 +912,11 @@ function () {
|
|
|
906
912
|
return metadata.inherited;
|
|
907
913
|
};
|
|
908
914
|
|
|
909
|
-
(0, _tslib.__decorate)([(0, _manaSyringe.postConstruct)(), (0, _tslib.__metadata)("design:type", Function), (0, _tslib.__metadata)("design:paramtypes", []), (0, _tslib.__metadata)("design:returntype", void 0)],
|
|
910
|
-
|
|
911
|
-
|
|
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)], DefaultStyleValueRegistry.prototype, "init", null);
|
|
916
|
+
DefaultStyleValueRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)({
|
|
917
|
+
token: _interfaces2.StyleValueRegistry
|
|
918
|
+
})], DefaultStyleValueRegistry);
|
|
919
|
+
return DefaultStyleValueRegistry;
|
|
912
920
|
}();
|
|
913
921
|
|
|
914
|
-
exports.
|
|
922
|
+
exports.DefaultStyleValueRegistry = DefaultStyleValueRegistry;
|
|
@@ -10,7 +10,7 @@ exports.unitTypeToBaseType = unitTypeToBaseType;
|
|
|
10
10
|
|
|
11
11
|
var _tslib = require("tslib");
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _assert = require("../../utils/assert");
|
|
14
14
|
|
|
15
15
|
var _CSSMathOperator = require("./CSSMathOperator");
|
|
16
16
|
|
|
@@ -34,7 +34,7 @@ exports.BaseType = BaseType;
|
|
|
34
34
|
})(BaseType || (exports.BaseType = BaseType = {}));
|
|
35
35
|
|
|
36
36
|
function unitTypeToBaseType(unit) {
|
|
37
|
-
(0,
|
|
37
|
+
(0, _assert.DCHECK_NE)(unit, _types.UnitType.kNumber);
|
|
38
38
|
|
|
39
39
|
switch (unit) {
|
|
40
40
|
case _types.UnitType.kEms:
|
|
@@ -165,7 +165,7 @@ function () {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
CSSNumericValueType.prototype.applyPercentHint = function (hint) {
|
|
168
|
-
(0,
|
|
168
|
+
(0, _assert.DCHECK_NE)(hint, BaseType.kPercent);
|
|
169
169
|
this.setExponent(hint, this.exponent(hint) + this.exponent(BaseType.kPercent));
|
|
170
170
|
this.setExponent(BaseType.kPercent, 0);
|
|
171
171
|
this.percentHint = hint;
|
|
@@ -177,7 +177,7 @@ function () {
|
|
|
177
177
|
};
|
|
178
178
|
|
|
179
179
|
CSSNumericValueType.prototype.isOnlyNonZeroEntry = function (baseType, value) {
|
|
180
|
-
(0,
|
|
180
|
+
(0, _assert.DCHECK_NE)(value, 0);
|
|
181
181
|
return this.numNonZeroEntries === 1 && this.exponent(baseType) === value;
|
|
182
182
|
};
|
|
183
183
|
|
|
@@ -205,7 +205,7 @@ function () {
|
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
CSSNumericValueType.prototype.matchesBaseType = function (baseType) {
|
|
208
|
-
(0,
|
|
208
|
+
(0, _assert.DCHECK_NE)(baseType, BaseType.kPercent);
|
|
209
209
|
return this.isOnlyNonZeroEntry(baseType, 1) && !this.hasPercentHint;
|
|
210
210
|
};
|
|
211
211
|
|
|
@@ -214,7 +214,7 @@ function () {
|
|
|
214
214
|
};
|
|
215
215
|
|
|
216
216
|
CSSNumericValueType.prototype.matchesBaseTypePercentage = function (baseType) {
|
|
217
|
-
(0,
|
|
217
|
+
(0, _assert.DCHECK_NE)(baseType, BaseType.kPercent);
|
|
218
218
|
return this.isOnlyNonZeroEntry(baseType, 1) || this.isOnlyNonZeroEntry(BaseType.kPercent, 1);
|
|
219
219
|
};
|
|
220
220
|
|
|
@@ -233,7 +233,7 @@ function () {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
if (type1.hasPercentHint) type2.applyPercentHint(type1.percentHint);else if (type2.hasPercentHint) type1.applyPercentHint(type2.percentHint);
|
|
236
|
-
(0,
|
|
236
|
+
(0, _assert.DCHECK_EQ)(type1.percentHint, type2.percentHint); // Match up base types. Try to use the percent hint to match up any
|
|
237
237
|
// differences.
|
|
238
238
|
|
|
239
239
|
for (var i = 0; i < BaseType.kNumBaseTypes; ++i) {
|
|
@@ -567,7 +567,7 @@ function (_super) {
|
|
|
567
567
|
}); // We got 'values' from a sum value, so it must be a valid CSSMathSum.
|
|
568
568
|
|
|
569
569
|
var result_1 = CSSMathSum.create(values);
|
|
570
|
-
(0,
|
|
570
|
+
(0, _assert.DCHECK)(!!result_1);
|
|
571
571
|
return result_1;
|
|
572
572
|
}
|
|
573
573
|
|
|
@@ -575,7 +575,7 @@ function (_super) {
|
|
|
575
575
|
|
|
576
576
|
var _loop_1 = function _loop_1(unit_string) {
|
|
577
577
|
var target_unit = CSSNumericValue.unitFromName(unit_string);
|
|
578
|
-
(0,
|
|
578
|
+
(0, _assert.DCHECK)(CSSNumericValue.isValidUnit(target_unit)); // Collect all the terms that are compatible with this unit.
|
|
579
579
|
// We mark used terms as null so we don't use them again.
|
|
580
580
|
|
|
581
581
|
var total_value = values.reduce(function (cur_sum, value, i) {
|
|
@@ -710,7 +710,7 @@ function cssNumberishesToNumericValues(values) {
|
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
function prependValueForArithmetic(type, values, value) {
|
|
713
|
-
(0,
|
|
713
|
+
(0, _assert.DCHECK)(!!value);
|
|
714
714
|
|
|
715
715
|
if (value.getType() === type) {
|
|
716
716
|
values.unshift.apply(values, (0, _tslib.__spreadArray)([], (0, _tslib.__read)(value.numericValues()), false));
|
|
@@ -732,7 +732,7 @@ function cssNumericSumValueEntryToUnitValue(term) {
|
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
function maybeSimplifyAsUnitValue(values, operator) {
|
|
735
|
-
(0,
|
|
735
|
+
(0, _assert.DCHECK)(!!values.length);
|
|
736
736
|
var first_unit_value = values[0] instanceof CSSUnitValue ? values[0] : null;
|
|
737
737
|
if (!first_unit_value) return null;
|
|
738
738
|
var final_value = first_unit_value.value;
|
|
@@ -754,7 +754,7 @@ function maybeSimplifyAsUnitValue(values, operator) {
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
function maybeMultiplyAsUnitValue(values) {
|
|
757
|
-
(0,
|
|
757
|
+
(0, _assert.DCHECK)(!!values.length); // We are allowed one unit value with type other than kNumber.
|
|
758
758
|
|
|
759
759
|
var unit_other_than_number = _types.UnitType.kNumber;
|
|
760
760
|
var final_value = 1.0;
|
|
@@ -800,7 +800,7 @@ function (_super) {
|
|
|
800
800
|
unit = unitOrName;
|
|
801
801
|
}
|
|
802
802
|
|
|
803
|
-
(0,
|
|
803
|
+
(0, _assert.DCHECK)(CSSUnitValue.isValidUnit(unit));
|
|
804
804
|
_this = _super.call(this, new CSSNumericValueType(unit)) || this;
|
|
805
805
|
_this.unit = unit;
|
|
806
806
|
_this.value = value;
|
|
@@ -833,7 +833,7 @@ function (_super) {
|
|
|
833
833
|
if (!Number.isFinite(number)) {
|
|
834
834
|
if (number > 0) result = 'infinity';else result = '-infinity';
|
|
835
835
|
} else {
|
|
836
|
-
(0,
|
|
836
|
+
(0, _assert.DCHECK)(Number.isNaN(number));
|
|
837
837
|
result = 'NaN';
|
|
838
838
|
}
|
|
839
839
|
|
|
@@ -1490,7 +1490,7 @@ function (_super) {
|
|
|
1490
1490
|
var exp = units[key];
|
|
1491
1491
|
var error = false;
|
|
1492
1492
|
type = CSSNumericValueType.multiply(type, new CSSNumericValueType(Number(key), exp), error);
|
|
1493
|
-
(0,
|
|
1493
|
+
(0, _assert.DCHECK)(!error);
|
|
1494
1494
|
});
|
|
1495
1495
|
return type;
|
|
1496
1496
|
};
|
|
@@ -1498,7 +1498,7 @@ function (_super) {
|
|
|
1498
1498
|
CSSMathSum.canCreateNumericTypeFromSumValue = function (sum) {
|
|
1499
1499
|
var _this = this;
|
|
1500
1500
|
|
|
1501
|
-
(0,
|
|
1501
|
+
(0, _assert.DCHECK)(!!sum.length);
|
|
1502
1502
|
var first_type = this.numericTypeFromUnitMap(sum[0].units);
|
|
1503
1503
|
return sum.every(function (term) {
|
|
1504
1504
|
var error = false;
|
|
@@ -1599,7 +1599,7 @@ function (_super) {
|
|
|
1599
1599
|
|
|
1600
1600
|
CSSMathProduct.multiplyUnitMaps = function (a, b) {
|
|
1601
1601
|
Object.keys(b).forEach(function (key) {
|
|
1602
|
-
(0,
|
|
1602
|
+
(0, _assert.DCHECK_NE)(b[key].value, 0);
|
|
1603
1603
|
var old_value = key in a ? a[key].value : 0;
|
|
1604
1604
|
|
|
1605
1605
|
if (old_value + b[key].value === 0) {
|
package/lib/css/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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';
|
|
8
|
+
export * from './layout';
|
|
7
9
|
export * from './CSS';
|
|
8
10
|
export * from './CSSProperty';
|
|
9
|
-
export * from './LayoutRegistry';
|
|
10
11
|
export * from './StyleValueRegistry';
|
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) {
|
|
@@ -43,41 +56,41 @@ Object.keys(_properties).forEach(function (key) {
|
|
|
43
56
|
});
|
|
44
57
|
});
|
|
45
58
|
|
|
46
|
-
var
|
|
59
|
+
var _layout = require("./layout");
|
|
47
60
|
|
|
48
|
-
Object.keys(
|
|
61
|
+
Object.keys(_layout).forEach(function (key) {
|
|
49
62
|
if (key === "default" || key === "__esModule") return;
|
|
50
|
-
if (key in exports && exports[key] ===
|
|
63
|
+
if (key in exports && exports[key] === _layout[key]) return;
|
|
51
64
|
Object.defineProperty(exports, key, {
|
|
52
65
|
enumerable: true,
|
|
53
66
|
get: function get() {
|
|
54
|
-
return
|
|
67
|
+
return _layout[key];
|
|
55
68
|
}
|
|
56
69
|
});
|
|
57
70
|
});
|
|
58
71
|
|
|
59
|
-
var
|
|
72
|
+
var _CSS = require("./CSS");
|
|
60
73
|
|
|
61
|
-
Object.keys(
|
|
74
|
+
Object.keys(_CSS).forEach(function (key) {
|
|
62
75
|
if (key === "default" || key === "__esModule") return;
|
|
63
|
-
if (key in exports && exports[key] ===
|
|
76
|
+
if (key in exports && exports[key] === _CSS[key]) return;
|
|
64
77
|
Object.defineProperty(exports, key, {
|
|
65
78
|
enumerable: true,
|
|
66
79
|
get: function get() {
|
|
67
|
-
return
|
|
80
|
+
return _CSS[key];
|
|
68
81
|
}
|
|
69
82
|
});
|
|
70
83
|
});
|
|
71
84
|
|
|
72
|
-
var
|
|
85
|
+
var _CSSProperty = require("./CSSProperty");
|
|
73
86
|
|
|
74
|
-
Object.keys(
|
|
87
|
+
Object.keys(_CSSProperty).forEach(function (key) {
|
|
75
88
|
if (key === "default" || key === "__esModule") return;
|
|
76
|
-
if (key in exports && exports[key] ===
|
|
89
|
+
if (key in exports && exports[key] === _CSSProperty[key]) return;
|
|
77
90
|
Object.defineProperty(exports, key, {
|
|
78
91
|
enumerable: true,
|
|
79
92
|
get: function get() {
|
|
80
|
-
return
|
|
93
|
+
return _CSSProperty[key];
|
|
81
94
|
}
|
|
82
95
|
});
|
|
83
96
|
});
|
|
@@ -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;
|