@antv/g 5.0.22-alpha.0 → 5.0.22-alpha.3
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/AbstractRenderer.js +1 -3
- package/es/Canvas.js +1 -3
- package/es/DisplayObjectPool.js +1 -3
- package/es/camera/Camera.js +1 -3
- package/es/camera/Landmark.js +1 -3
- package/es/components/Cullable.js +1 -3
- package/es/components/Geometry.js +1 -3
- package/es/components/Renderable.js +1 -3
- package/es/components/Sortable.js +1 -3
- package/es/components/Transform.js +1 -3
- package/es/css/CSSProperty.d.ts +1 -1
- package/es/css/LayoutRegistry.js +1 -3
- package/es/css/StyleValueRegistry.js +2 -4
- package/es/css/cssom/CSSColorValue.js +1 -3
- package/es/css/cssom/CSSGradientValue.js +6 -8
- package/es/css/cssom/CSSKeywordValue.js +1 -3
- package/es/css/cssom/CSSMathInvert.js +1 -3
- package/es/css/cssom/CSSMathMax.js +1 -3
- package/es/css/cssom/CSSMathMin.js +1 -3
- package/es/css/cssom/CSSMathNegate.js +1 -3
- package/es/css/cssom/CSSMathProduct.js +1 -3
- package/es/css/cssom/CSSMathSum.js +1 -3
- package/es/css/cssom/CSSMathValue.js +1 -3
- package/es/css/cssom/CSSMathVariadic.js +1 -3
- package/es/css/cssom/CSSNumericValue.js +1 -3
- package/es/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/es/css/cssom/CSSNumericValueType.js +1 -3
- package/es/css/cssom/CSSRGB.js +2 -4
- package/es/css/cssom/CSSStyleValue.d.ts +2 -2
- package/es/css/cssom/CSSStyleValue.js +2 -4
- package/es/css/cssom/CSSTransformComponent.js +1 -3
- package/es/css/cssom/CSSTransformValue.js +1 -3
- package/es/css/cssom/CSSTranslate.js +1 -3
- package/es/css/cssom/CSSUnitValue.js +2 -4
- package/es/css/parser/color.js +1 -1
- package/es/css/parser/dimension.js +1 -1
- package/es/css/parser/transform.d.ts +1 -1
- package/es/css/parser/transform.js +2 -2
- package/es/css/properties/CSSPropertyAnchor.js +1 -3
- package/es/css/properties/CSSPropertyClipPath.js +1 -3
- package/es/css/properties/CSSPropertyColor.js +1 -3
- package/es/css/properties/CSSPropertyFilter.js +1 -3
- package/es/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/es/css/properties/CSSPropertyLineDash.js +1 -3
- package/es/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/es/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/es/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/es/css/properties/CSSPropertyOpacity.js +1 -3
- package/es/css/properties/CSSPropertyPath.js +1 -3
- package/es/css/properties/CSSPropertyPoints.js +1 -3
- package/es/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/es/css/properties/CSSPropertyText.js +2 -4
- package/es/css/properties/CSSPropertyTextTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransform.js +1 -3
- package/es/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/es/css/properties/CSSPropertyVisibility.js +1 -3
- package/es/css/properties/CSSPropertyZIndex.js +1 -3
- package/es/display-objects/Circle.js +1 -3
- package/es/display-objects/CustomElement.js +1 -3
- package/es/display-objects/DisplayObject.js +3 -6
- package/es/display-objects/Ellipse.js +1 -3
- package/es/display-objects/Group.js +1 -3
- package/es/display-objects/HTML.js +3 -6
- package/es/display-objects/Image.js +1 -3
- package/es/display-objects/Line.js +1 -3
- package/es/display-objects/Path.js +1 -3
- package/es/display-objects/Polygon.js +1 -3
- package/es/display-objects/Polyline.js +1 -3
- package/es/display-objects/Rect.js +1 -3
- package/es/display-objects/Text.js +3 -6
- package/es/dom/Animation.js +2 -4
- package/es/dom/AnimationEffectTiming.js +1 -3
- package/es/dom/AnimationEvent.js +1 -3
- package/es/dom/AnimationTimeline.js +1 -3
- package/es/dom/CustomElementRegistry.js +1 -3
- package/es/dom/CustomEvent.js +1 -3
- package/es/dom/Document.js +1 -3
- package/es/dom/Element.js +4 -6
- package/es/dom/EventTarget.js +3 -5
- package/es/dom/FederatedEvent.js +1 -3
- package/es/dom/FederatedMouseEvent.js +1 -3
- package/es/dom/FederatedPointerEvent.js +1 -3
- package/es/dom/FederatedWheelEvent.js +1 -3
- package/es/dom/KeyframeEffect.js +1 -3
- package/es/dom/KeyframeList.js +1 -1
- package/es/dom/MutationEvent.js +1 -3
- package/es/dom/MutationObserver.js +3 -10
- package/es/dom/MutationRecord.js +1 -3
- package/es/dom/Node.js +2 -4
- package/es/plugins/CullingPlugin.js +1 -3
- package/es/plugins/DirtyCheckPlugin.js +1 -3
- package/es/plugins/EventPlugin.js +1 -3
- package/es/plugins/FrustumCullingStrategy.js +2 -4
- package/es/plugins/PrepareRendererPlugin.js +1 -3
- package/es/services/EventService.js +3 -5
- package/es/services/OffscreenCanvasCreator.js +1 -3
- package/es/services/RenderingService.js +1 -3
- package/es/services/SceneGraphSelector.js +1 -3
- package/es/services/SceneGraphService.js +1 -3
- package/es/services/TextService.js +3 -5
- package/es/services/aabb/CircleUpdater.js +1 -3
- package/es/services/aabb/EllipseUpdater.js +1 -3
- package/es/services/aabb/LineUpdater.js +1 -3
- package/es/services/aabb/PathUpdater.js +1 -3
- package/es/services/aabb/PolylineUpdater.js +1 -3
- package/es/services/aabb/RectUpdater.js +1 -3
- package/es/services/aabb/TextUpdater.js +1 -3
- package/es/shapes/AABB.js +1 -3
- package/es/shapes/BoundingSphere.js +1 -3
- package/es/shapes/Frustum.js +1 -3
- package/es/shapes/Plane.js +1 -3
- package/es/shapes/Point.js +1 -3
- package/es/shapes/Ray.js +1 -3
- package/es/shapes/Rectangle.js +1 -3
- package/es/types.d.ts +1 -2
- package/es/utils/custom-easing.js +1 -1
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +3 -3
- package/es/utils/text.js +3 -3
- package/lib/AbstractRenderer.js +1 -3
- package/lib/Canvas.js +2 -4
- package/lib/DisplayObjectPool.js +1 -3
- package/lib/camera/Camera.js +2 -4
- package/lib/camera/Landmark.js +1 -3
- package/lib/components/Cullable.js +2 -4
- package/lib/components/Geometry.js +1 -3
- package/lib/components/Renderable.js +1 -3
- package/lib/components/Sortable.js +1 -3
- package/lib/components/Transform.js +1 -3
- package/lib/css/CSSProperty.d.ts +1 -1
- package/lib/css/LayoutRegistry.js +1 -3
- package/lib/css/StyleValueRegistry.js +4 -4
- package/lib/css/cssom/CSSColorValue.js +1 -3
- package/lib/css/cssom/CSSGradientValue.js +7 -9
- package/lib/css/cssom/CSSKeywordValue.js +1 -3
- package/lib/css/cssom/CSSMathInvert.js +1 -3
- package/lib/css/cssom/CSSMathMax.js +1 -3
- package/lib/css/cssom/CSSMathMin.js +1 -3
- package/lib/css/cssom/CSSMathNegate.js +1 -3
- package/lib/css/cssom/CSSMathOperator.js +1 -1
- package/lib/css/cssom/CSSMathProduct.js +1 -3
- package/lib/css/cssom/CSSMathSum.js +1 -3
- package/lib/css/cssom/CSSMathValue.js +1 -3
- package/lib/css/cssom/CSSMathVariadic.js +2 -4
- package/lib/css/cssom/CSSNumericValue.js +1 -3
- package/lib/css/cssom/CSSNumericValueType.d.ts +1 -1
- package/lib/css/cssom/CSSNumericValueType.js +3 -5
- package/lib/css/cssom/CSSRGB.js +2 -4
- package/lib/css/cssom/CSSStyleValue.d.ts +2 -2
- package/lib/css/cssom/CSSStyleValue.js +108 -110
- package/lib/css/cssom/CSSTransformComponent.js +2 -4
- package/lib/css/cssom/CSSTransformValue.js +1 -3
- package/lib/css/cssom/CSSTranslate.js +1 -3
- package/lib/css/cssom/CSSUnitValue.js +2 -4
- package/lib/css/cssom/types.js +1 -1
- package/lib/css/parser/color.js +3 -3
- package/lib/css/parser/dimension.js +6 -7
- package/lib/css/parser/numeric.js +3 -3
- package/lib/css/parser/path.js +1 -1
- package/lib/css/parser/transform.d.ts +1 -1
- package/lib/css/parser/transform.js +11 -11
- package/lib/css/properties/CSSPropertyAnchor.js +1 -3
- package/lib/css/properties/CSSPropertyClipPath.js +1 -3
- package/lib/css/properties/CSSPropertyColor.js +1 -3
- package/lib/css/properties/CSSPropertyFilter.js +1 -3
- package/lib/css/properties/CSSPropertyLengthOrPercentage.js +1 -3
- package/lib/css/properties/CSSPropertyLineDash.js +1 -3
- package/lib/css/properties/CSSPropertyLocalPosition.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetDistance.js +1 -3
- package/lib/css/properties/CSSPropertyOffsetPath.js +1 -3
- package/lib/css/properties/CSSPropertyOpacity.js +1 -3
- package/lib/css/properties/CSSPropertyPath.js +1 -3
- package/lib/css/properties/CSSPropertyPoints.js +1 -3
- package/lib/css/properties/CSSPropertyShadowBlur.js +1 -3
- package/lib/css/properties/CSSPropertyText.js +2 -4
- package/lib/css/properties/CSSPropertyTextTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransform.js +1 -3
- package/lib/css/properties/CSSPropertyTransformOrigin.js +1 -3
- package/lib/css/properties/CSSPropertyVisibility.js +1 -3
- package/lib/css/properties/CSSPropertyZIndex.js +1 -3
- package/lib/display-objects/Circle.js +1 -3
- package/lib/display-objects/CustomElement.js +1 -3
- package/lib/display-objects/DisplayObject.js +3 -6
- package/lib/display-objects/Ellipse.js +1 -3
- package/lib/display-objects/Group.js +1 -3
- package/lib/display-objects/HTML.js +4 -6
- package/lib/display-objects/Image.js +1 -3
- package/lib/display-objects/Line.js +1 -3
- package/lib/display-objects/Path.js +1 -3
- package/lib/display-objects/Polygon.js +1 -3
- package/lib/display-objects/Polyline.js +1 -3
- package/lib/display-objects/Rect.js +1 -3
- package/lib/display-objects/Text.js +4 -6
- package/lib/dom/Animation.js +2 -4
- package/lib/dom/AnimationEffectTiming.js +1 -3
- package/lib/dom/AnimationEvent.js +1 -3
- package/lib/dom/AnimationTimeline.js +2 -4
- package/lib/dom/CustomElementRegistry.js +1 -3
- package/lib/dom/CustomEvent.js +1 -3
- package/lib/dom/Document.js +1 -3
- package/lib/dom/Element.js +4 -6
- package/lib/dom/EventTarget.js +3 -5
- package/lib/dom/FederatedEvent.js +1 -3
- package/lib/dom/FederatedMouseEvent.js +1 -3
- package/lib/dom/FederatedPointerEvent.js +1 -3
- package/lib/dom/FederatedWheelEvent.js +1 -3
- package/lib/dom/KeyframeEffect.js +2 -4
- package/lib/dom/KeyframeList.js +1 -1
- package/lib/dom/MutationEvent.js +1 -3
- package/lib/dom/MutationObserver.js +4 -11
- package/lib/dom/MutationRecord.js +1 -3
- package/lib/dom/Node.js +2 -4
- package/lib/index.js +1 -1
- package/lib/plugins/CullingPlugin.js +2 -4
- package/lib/plugins/DirtyCheckPlugin.js +1 -3
- package/lib/plugins/EventPlugin.js +1 -3
- package/lib/plugins/FrustumCullingStrategy.js +3 -5
- package/lib/plugins/PrepareRendererPlugin.js +1 -3
- package/lib/services/EventService.js +3 -5
- package/lib/services/OffscreenCanvasCreator.js +1 -3
- package/lib/services/RenderingService.js +1 -3
- package/lib/services/SceneGraphSelector.js +2 -4
- package/lib/services/SceneGraphService.js +3 -5
- package/lib/services/TextService.js +3 -5
- package/lib/services/aabb/CircleUpdater.js +1 -3
- package/lib/services/aabb/EllipseUpdater.js +1 -3
- package/lib/services/aabb/LineUpdater.js +1 -3
- package/lib/services/aabb/PathUpdater.js +1 -3
- package/lib/services/aabb/PolylineUpdater.js +1 -3
- package/lib/services/aabb/RectUpdater.js +1 -3
- package/lib/services/aabb/TextUpdater.js +1 -3
- package/lib/services/aabb/index.js +10 -10
- package/lib/services/aabb/interfaces.js +1 -1
- package/lib/shapes/AABB.js +1 -3
- package/lib/shapes/BoundingSphere.js +1 -3
- package/lib/shapes/Frustum.js +2 -4
- package/lib/shapes/Plane.js +1 -3
- package/lib/shapes/Point.js +1 -3
- package/lib/shapes/Ray.js +1 -3
- package/lib/shapes/Rectangle.js +1 -3
- package/lib/types.d.ts +1 -2
- package/lib/types.js +1 -1
- package/lib/utils/animation.js +2 -3
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.js +2 -2
- package/lib/utils/math.js +9 -9
- package/lib/utils/path.d.ts +1 -1
- package/lib/utils/path.js +6 -6
- package/lib/utils/text.js +3 -3
- package/package.json +3 -3
- package/dist/index.umd.min.js +0 -30
package/es/AbstractRenderer.js
CHANGED
package/es/Canvas.js
CHANGED
package/es/DisplayObjectPool.js
CHANGED
package/es/camera/Camera.js
CHANGED
package/es/camera/Landmark.js
CHANGED
|
@@ -7,9 +7,7 @@ export var Strategy;
|
|
|
7
7
|
Strategy[Strategy["Standard"] = 0] = "Standard";
|
|
8
8
|
})(Strategy || (Strategy = {}));
|
|
9
9
|
|
|
10
|
-
var Cullable =
|
|
11
|
-
/** @class */
|
|
12
|
-
function () {
|
|
10
|
+
var Cullable = function () {
|
|
13
11
|
function Cullable() {
|
|
14
12
|
this.strategy = Strategy.Standard;
|
|
15
13
|
this.visibilityPlaneMask = -1;
|
package/es/css/CSSProperty.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IElement } from '
|
|
1
|
+
import type { IElement } from '../dom';
|
|
2
2
|
import type { StyleValueRegistry } from './StyleValueRegistry';
|
|
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;
|
package/es/css/LayoutRegistry.js
CHANGED
|
@@ -10,9 +10,7 @@ import { singleton } from 'mana-syringe';
|
|
|
10
10
|
* group.style.display = 'layout(centering)';
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
var LayoutRegistry =
|
|
14
|
-
/** @class */
|
|
15
|
-
function () {
|
|
13
|
+
var LayoutRegistry = function () {
|
|
16
14
|
function LayoutRegistry() {}
|
|
17
15
|
|
|
18
16
|
LayoutRegistry = __decorate([singleton()], LayoutRegistry);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata, __read, __spreadArray } from "tslib";
|
|
2
2
|
import { postConstruct, singleton, GlobalContainer } from 'mana-syringe';
|
|
3
3
|
import { vec3 } from 'gl-matrix';
|
|
4
|
-
import { ElementEvent } from '
|
|
4
|
+
import { ElementEvent } from '../dom';
|
|
5
5
|
import { dirtifyToRoot, Shape, GeometryUpdaterFactory, AABB } from '..';
|
|
6
6
|
import { CSSStyleValue, CSSUnitValue } from './cssom';
|
|
7
7
|
import { CSSKeywordValue } from './cssom';
|
|
@@ -407,9 +407,7 @@ export var BUILT_IN_PROPERTIES = [{
|
|
|
407
407
|
layoutDependent: true
|
|
408
408
|
}];
|
|
409
409
|
|
|
410
|
-
var StyleValueRegistry =
|
|
411
|
-
/** @class */
|
|
412
|
-
function () {
|
|
410
|
+
var StyleValueRegistry = function () {
|
|
413
411
|
function StyleValueRegistry() {
|
|
414
412
|
/**
|
|
415
413
|
* need recalc later
|
|
@@ -6,9 +6,7 @@ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
|
6
6
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#colorvalue-objects
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSColorValue =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSColorValue = function (_super) {
|
|
12
10
|
__extends(CSSColorValue, _super);
|
|
13
11
|
|
|
14
12
|
function CSSColorValue(colorSpace) {
|
|
@@ -9,9 +9,7 @@ export var GradientPatternType;
|
|
|
9
9
|
GradientPatternType[GradientPatternType["Pattern"] = 3] = "Pattern";
|
|
10
10
|
})(GradientPatternType || (GradientPatternType = {}));
|
|
11
11
|
|
|
12
|
-
var CSSGradientValue =
|
|
13
|
-
/** @class */
|
|
14
|
-
function (_super) {
|
|
12
|
+
var CSSGradientValue = function (_super) {
|
|
15
13
|
__extends(CSSGradientValue, _super);
|
|
16
14
|
|
|
17
15
|
function CSSGradientValue(type, value) {
|
|
@@ -30,15 +28,15 @@ function (_super) {
|
|
|
30
28
|
var text = '';
|
|
31
29
|
|
|
32
30
|
if (this.type === GradientPatternType.LinearGradient) {
|
|
33
|
-
text = "linear-gradient("
|
|
31
|
+
text = "linear-gradient(" + this.value.steps.map(function (step) {
|
|
34
32
|
return step.join(',');
|
|
35
|
-
}).join(',')
|
|
33
|
+
}).join(',') + ")";
|
|
36
34
|
} else if (this.type === GradientPatternType.RadialGradient) {
|
|
37
|
-
text = "radial-gradient("
|
|
35
|
+
text = "radial-gradient(" + this.value.steps.map(function (step) {
|
|
38
36
|
return step.join(',');
|
|
39
|
-
}).join(',')
|
|
37
|
+
}).join(',') + ")";
|
|
40
38
|
} else if (this.type === GradientPatternType.Pattern) {
|
|
41
|
-
text = "url("
|
|
39
|
+
text = "url(" + this.value.src + ")";
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
return result += text;
|
|
@@ -7,9 +7,7 @@ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
|
7
7
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_keyword_value.idl
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var CSSKeywordValue =
|
|
11
|
-
/** @class */
|
|
12
|
-
function (_super) {
|
|
10
|
+
var CSSKeywordValue = function (_super) {
|
|
13
11
|
__extends(CSSKeywordValue, _super);
|
|
14
12
|
|
|
15
13
|
function CSSKeywordValue(value) {
|
|
@@ -2,9 +2,7 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import { CSSMathValue } from './CSSMathValue';
|
|
3
3
|
import { CSSNumericValueType, CSSStyleValueType, Nested, ParenLess } from '.';
|
|
4
4
|
|
|
5
|
-
var CSSMathInvert =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var CSSMathInvert = function (_super) {
|
|
8
6
|
__extends(CSSMathInvert, _super);
|
|
9
7
|
|
|
10
8
|
function CSSMathInvert(value, type) {
|
|
@@ -9,9 +9,7 @@ import { CSSMathVariadic } from './CSSMathVariadic';
|
|
|
9
9
|
import { Nested, ParenLess, CSSNumericValueType, CSSStyleValueType, typeCheck } from '.'; // Represents the maximum of one or more CSSNumericValues.
|
|
10
10
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
11
11
|
|
|
12
|
-
var CSSMathMax =
|
|
13
|
-
/** @class */
|
|
14
|
-
function (_super) {
|
|
12
|
+
var CSSMathMax = function (_super) {
|
|
15
13
|
__extends(CSSMathMax, _super);
|
|
16
14
|
|
|
17
15
|
function CSSMathMax() {
|
|
@@ -10,9 +10,7 @@ import { CSSMathVariadic } from './CSSMathVariadic';
|
|
|
10
10
|
import { CSSNumericValueType, CSSStyleValueType, typeCheck, Nested, ParenLess } from '.'; // Represents the minimum of one or more CSSNumericValues.
|
|
11
11
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
12
12
|
|
|
13
|
-
var CSSMathMin =
|
|
14
|
-
/** @class */
|
|
15
|
-
function (_super) {
|
|
13
|
+
var CSSMathMin = function (_super) {
|
|
16
14
|
__extends(CSSMathMin, _super);
|
|
17
15
|
|
|
18
16
|
function CSSMathMin() {
|
|
@@ -2,9 +2,7 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import { CSSMathValue } from './CSSMathValue';
|
|
3
3
|
import { Nested, ParenLess, CSSStyleValueType } from '.';
|
|
4
4
|
|
|
5
|
-
var CSSMathNegate =
|
|
6
|
-
/** @class */
|
|
7
|
-
function (_super) {
|
|
5
|
+
var CSSMathNegate = function (_super) {
|
|
8
6
|
__extends(CSSMathNegate, _super);
|
|
9
7
|
|
|
10
8
|
function CSSMathNegate(value, type) {
|
|
@@ -7,9 +7,7 @@ import { typeCheck, CSSStyleValueType, CSSNumericValueType, Nested, ParenLess }
|
|
|
7
7
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var CSSMathProduct =
|
|
11
|
-
/** @class */
|
|
12
|
-
function (_super) {
|
|
10
|
+
var CSSMathProduct = function (_super) {
|
|
13
11
|
__extends(CSSMathProduct, _super);
|
|
14
12
|
|
|
15
13
|
function CSSMathProduct() {
|
|
@@ -7,9 +7,7 @@ import { typeCheck, CSSStyleValueType, CSSNumericValueType, Nested, ParenLess }
|
|
|
7
7
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var CSSMathSum =
|
|
11
|
-
/** @class */
|
|
12
|
-
function (_super) {
|
|
10
|
+
var CSSMathSum = function (_super) {
|
|
13
11
|
__extends(CSSMathSum, _super);
|
|
14
12
|
|
|
15
13
|
function CSSMathSum() {
|
|
@@ -7,9 +7,7 @@ import { CSSNumericValue } from './CSSNumericValue';
|
|
|
7
7
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
var CSSMathValue =
|
|
11
|
-
/** @class */
|
|
12
|
-
function (_super) {
|
|
10
|
+
var CSSMathValue = function (_super) {
|
|
13
11
|
__extends(CSSMathValue, _super);
|
|
14
12
|
|
|
15
13
|
function CSSMathValue() {
|
|
@@ -12,9 +12,7 @@ export function typeCheck(values, op, error) {
|
|
|
12
12
|
return final_type;
|
|
13
13
|
} // Represents an arithmetic operation with one or more CSSNumericValues.
|
|
14
14
|
|
|
15
|
-
var CSSMathVariadic =
|
|
16
|
-
/** @class */
|
|
17
|
-
function (_super) {
|
|
15
|
+
var CSSMathVariadic = function (_super) {
|
|
18
16
|
__extends(CSSMathVariadic, _super);
|
|
19
17
|
|
|
20
18
|
function CSSMathVariadic(values, type) {
|
|
@@ -9,9 +9,7 @@ import { UnitType, CSSStyleValueType, BaseType, baseTypeToString, CSSUnitValue,
|
|
|
9
9
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
var CSSNumericValue =
|
|
13
|
-
/** @class */
|
|
14
|
-
function (_super) {
|
|
12
|
+
var CSSNumericValue = function (_super) {
|
|
15
13
|
__extends(CSSNumericValue, _super);
|
|
16
14
|
|
|
17
15
|
function CSSNumericValue(type_) {
|
|
@@ -10,7 +10,7 @@ export declare enum BaseType {
|
|
|
10
10
|
kNumBaseTypes = 7
|
|
11
11
|
}
|
|
12
12
|
export declare function unitTypeToBaseType(unit: UnitType): BaseType.kLength | BaseType.kAngle | BaseType.kTime | BaseType.kFrequency | BaseType.kResolution | BaseType.kFlex | BaseType.kPercent;
|
|
13
|
-
export declare function baseTypeToString(baseType: BaseType): "" | "
|
|
13
|
+
export declare function baseTypeToString(baseType: BaseType): "" | "time" | "flex" | "percent" | "length" | "angle" | "frequency" | "resolution";
|
|
14
14
|
export declare class CSSNumericValueType {
|
|
15
15
|
private exponents;
|
|
16
16
|
private numNonZeroEntries;
|
|
@@ -121,9 +121,7 @@ export function baseTypeToString(baseType) {
|
|
|
121
121
|
return '';
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
var CSSNumericValueType =
|
|
125
|
-
/** @class */
|
|
126
|
-
function () {
|
|
124
|
+
var CSSNumericValueType = function () {
|
|
127
125
|
function CSSNumericValueType(unit, exponent) {
|
|
128
126
|
if (unit === void 0) {
|
|
129
127
|
unit = UnitType.kNumber;
|
package/es/css/cssom/CSSRGB.js
CHANGED
|
@@ -6,9 +6,7 @@ import { CSSColorValue } from './CSSColorValue';
|
|
|
6
6
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSRGB =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSRGB = function (_super) {
|
|
12
10
|
__extends(CSSRGB, _super);
|
|
13
11
|
|
|
14
12
|
function CSSRGB(r, g, b, alpha,
|
|
@@ -39,7 +37,7 @@ function (_super) {
|
|
|
39
37
|
};
|
|
40
38
|
|
|
41
39
|
CSSRGB.prototype.buildCSSText = function (n, p, result) {
|
|
42
|
-
return result + "rgba("
|
|
40
|
+
return result + ("rgba(" + this.r + "," + this.g + "," + this.b + "," + this.alpha + ")");
|
|
43
41
|
};
|
|
44
42
|
|
|
45
43
|
return CSSRGB;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nested, ParenLess, UnitType, UnitCategory } from '
|
|
1
|
+
import { Nested, ParenLess, UnitType, UnitCategory } from './types';
|
|
2
2
|
export declare enum CSSStyleValueType {
|
|
3
3
|
kUnknownType = 0,
|
|
4
4
|
kUnparsedType = 1,
|
|
@@ -29,7 +29,7 @@ export declare abstract class CSSStyleValue {
|
|
|
29
29
|
static parseAll(propertyName: string, value: string): CSSStyleValue[];
|
|
30
30
|
static unitFromName(name: string): UnitType;
|
|
31
31
|
static unitTypeToUnitCategory(type: UnitType): UnitCategory;
|
|
32
|
-
static unitTypeToString(type: UnitType): "" | "em" | "px" | "deg" | "rad" | "grad" | "ms" | "
|
|
32
|
+
static unitTypeToString(type: UnitType): "" | "em" | "s" | "px" | "deg" | "rad" | "grad" | "ms" | "rem" | "turn" | "%";
|
|
33
33
|
static stringToUnitType(name: string): UnitType;
|
|
34
34
|
static canonicalUnitTypeForCategory(category: UnitCategory): UnitType.kUnknown | UnitType.kNumber | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds | UnitType.kHertz | UnitType.kDotsPerPixel;
|
|
35
35
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// import type { CSSValue } from '../CSSValue';
|
|
2
2
|
// import { CSSPropertyID, cssPropertyID } from '../properties/CSSPropertyNames';
|
|
3
3
|
// import { fromString } from '../parser/StyleValueFactory';
|
|
4
|
-
import { Nested, ParenLess, UnitType, UnitCategory } from '
|
|
4
|
+
import { Nested, ParenLess, UnitType, UnitCategory } from './types'; // This file specifies the unit strings used in CSSPrimitiveValues.
|
|
5
5
|
|
|
6
6
|
var data = [{
|
|
7
7
|
name: 'em',
|
|
@@ -256,9 +256,7 @@ function parseCSSStyleValue(propertyName, value) {
|
|
|
256
256
|
*/
|
|
257
257
|
|
|
258
258
|
|
|
259
|
-
var CSSStyleValue =
|
|
260
|
-
/** @class */
|
|
261
|
-
function () {
|
|
259
|
+
var CSSStyleValue = function () {
|
|
262
260
|
function CSSStyleValue() {}
|
|
263
261
|
|
|
264
262
|
CSSStyleValue.parse = function (propertyName, value) {
|
|
@@ -6,9 +6,7 @@ import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
|
6
6
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSTransformValue
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSTransformValue =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSTransformValue = function (_super) {
|
|
12
10
|
__extends(CSSTransformValue, _super);
|
|
13
11
|
|
|
14
12
|
function CSSTransformValue(transforms) {
|
|
@@ -8,9 +8,7 @@ import { CSSTransformComponent } from './CSSTransformComponent'; // import { Uni
|
|
|
8
8
|
* @see https://drafts.css-houdini.org/css-typed-om/#csstranslate
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var CSSTranslate =
|
|
12
|
-
/** @class */
|
|
13
|
-
function (_super) {
|
|
11
|
+
var CSSTranslate = function (_super) {
|
|
14
12
|
__extends(CSSTranslate, _super);
|
|
15
13
|
|
|
16
14
|
function CSSTranslate(x, y, z, is2D) {
|
|
@@ -17,9 +17,7 @@ import { CSSStyleValue } from './CSSStyleValue';
|
|
|
17
17
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
var CSSUnitValue =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSUnitValue = function (_super) {
|
|
23
21
|
__extends(CSSUnitValue, _super);
|
|
24
22
|
|
|
25
23
|
function CSSUnitValue(value, unitOrName) {
|
|
@@ -237,7 +235,7 @@ function (_super) {
|
|
|
237
235
|
text = CSSUnitValue.formatNumber(value, unit_1);
|
|
238
236
|
}
|
|
239
237
|
} else {
|
|
240
|
-
text = ""
|
|
238
|
+
text = "" + value + unit;
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
241
|
}
|
package/es/css/parser/color.js
CHANGED
|
@@ -4,7 +4,7 @@ import { rad2deg, turn2deg } from '../../utils';
|
|
|
4
4
|
import { UnitType } from '../cssom';
|
|
5
5
|
import { CSSUnitValue } from '../cssom';
|
|
6
6
|
export function parseDimension(unitRegExp, string) {
|
|
7
|
-
string = ""
|
|
7
|
+
string = ("" + string).trim().toLowerCase();
|
|
8
8
|
|
|
9
9
|
if (isFinite(Number(string))) {
|
|
10
10
|
if ('px'.search(unitRegExp) >= 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UnitType } from '../cssom';
|
|
1
|
+
import { parseNumber, mergeNumbers, parseAngle, parseLength, parseLengthOrPercentage, mergeDimensions } from './';
|
|
2
|
+
import { UnitType, CSSUnitValue } from '../cssom';
|
|
3
3
|
var _ = null;
|
|
4
4
|
export var Opx = new CSSUnitValue(0, 'px');
|
|
5
5
|
export var Odeg = new CSSUnitValue(0, 'deg');
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { CSSUnitValue, parseNumberList } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyAnchor =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyAnchor = function () {
|
|
8
6
|
function CSSPropertyAnchor() {
|
|
9
7
|
this.parser = parseNumberList;
|
|
10
8
|
}
|
|
@@ -19,9 +19,7 @@ import { dirtifyToRoot } from '../..';
|
|
|
19
19
|
});
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
var CSSPropertyClipPath =
|
|
23
|
-
/** @class */
|
|
24
|
-
function () {
|
|
22
|
+
var CSSPropertyClipPath = function () {
|
|
25
23
|
function CSSPropertyClipPath() {}
|
|
26
24
|
|
|
27
25
|
CSSPropertyClipPath.prototype.calculator = function (name, oldClipPath, newClipPath, object) {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseFilter } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyFilter =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyFilter = function () {
|
|
8
6
|
function CSSPropertyFilter() {
|
|
9
7
|
this.parser = parseFilter;
|
|
10
8
|
}
|
|
@@ -5,9 +5,7 @@ import { UnitType, CSSUnitValue, parseLengthOrPercentage, mergeDimensions } from
|
|
|
5
5
|
* <length> & <percentage>
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var CSSPropertyLengthOrPercentage =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var CSSPropertyLengthOrPercentage = function () {
|
|
11
9
|
function CSSPropertyLengthOrPercentage() {
|
|
12
10
|
this.parser = parseLengthOrPercentage;
|
|
13
11
|
this.mixer = mergeDimensions;
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseDimensionArray, mergeDimensionList } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyLineDash =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyLineDash = function () {
|
|
8
6
|
function CSSPropertyLineDash() {
|
|
9
7
|
this.parser = parseDimensionArray;
|
|
10
8
|
this.mixer = mergeDimensionList;
|
|
@@ -6,9 +6,7 @@ import { CSSPropertyLengthOrPercentage } from './CSSPropertyLengthOrPercentage';
|
|
|
6
6
|
* local position
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
var CSSPropertyLocalPosition =
|
|
10
|
-
/** @class */
|
|
11
|
-
function (_super) {
|
|
9
|
+
var CSSPropertyLocalPosition = function (_super) {
|
|
12
10
|
__extends(CSSPropertyLocalPosition, _super);
|
|
13
11
|
|
|
14
12
|
function CSSPropertyLocalPosition() {
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parseNumber, clampedMergeNumbers, Shape } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyOffsetDistance =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyOffsetDistance = function () {
|
|
8
6
|
function CSSPropertyOffsetDistance() {
|
|
9
7
|
this.parser = parseNumber;
|
|
10
8
|
this.mixer = clampedMergeNumbers(0, 1);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
|
|
4
|
-
var CSSPropertyOffsetPath =
|
|
5
|
-
/** @class */
|
|
6
|
-
function () {
|
|
4
|
+
var CSSPropertyOffsetPath = function () {
|
|
7
5
|
function CSSPropertyOffsetPath() {}
|
|
8
6
|
|
|
9
7
|
CSSPropertyOffsetPath.prototype.calculator = function (name, oldOffsetPath, newOffsetPath, object) {
|
|
@@ -5,9 +5,7 @@ import { parseNumber, clampedMergeNumbers } from '../..';
|
|
|
5
5
|
* opacity
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
var CSSPropertyOpacity =
|
|
9
|
-
/** @class */
|
|
10
|
-
function () {
|
|
8
|
+
var CSSPropertyOpacity = function () {
|
|
11
9
|
function CSSPropertyOpacity() {
|
|
12
10
|
this.parser = parseNumber;
|
|
13
11
|
this.mixer = clampedMergeNumbers(0, 1);
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parsePath, mergePaths, CSSKeywordValue, Rectangle } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyPath =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyPath = function () {
|
|
8
6
|
function CSSPropertyPath() {
|
|
9
7
|
/**
|
|
10
8
|
* path2Curve
|
|
@@ -2,9 +2,7 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { singleton } from 'mana-syringe';
|
|
3
3
|
import { parsePoints } from '../..';
|
|
4
4
|
|
|
5
|
-
var CSSPropertyPoints =
|
|
6
|
-
/** @class */
|
|
7
|
-
function () {
|
|
5
|
+
var CSSPropertyPoints = function () {
|
|
8
6
|
function CSSPropertyPoints() {
|
|
9
7
|
this.parser = parsePoints;
|
|
10
8
|
}
|