@antv/g 5.0.21 → 5.0.22-alpha.2
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 +7 -11
- package/es/DisplayObjectPool.js +1 -3
- package/es/camera/Camera.d.ts +12 -7
- package/es/camera/Camera.js +54 -24
- package/es/camera/Landmark.d.ts +2 -0
- package/es/camera/Landmark.js +10 -6
- 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/LayoutRegistry.js +1 -3
- package/es/css/StyleValueRegistry.js +1 -3
- 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 +10 -8
- 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 +5 -4
- package/es/plugins/FrustumCullingStrategy.js +1 -3
- package/es/plugins/PrepareRendererPlugin.js +1 -3
- package/es/services/EventService.js +26 -7
- package/es/services/OffscreenCanvasCreator.js +1 -3
- package/es/services/RenderingContext.d.ts +2 -1
- package/es/services/RenderingContext.js +3 -1
- package/es/services/RenderingService.js +1 -3
- package/es/services/SceneGraphSelector.js +1 -3
- package/es/services/SceneGraphService.d.ts +2 -1
- package/es/services/SceneGraphService.js +3 -5
- 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/services/aabb/interfaces.d.ts +3 -2
- package/es/services/aabb/interfaces.js +3 -2
- 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 +2 -1
- package/es/types.js +2 -1
- package/es/utils/custom-easing.d.ts +0 -9
- package/es/utils/custom-easing.js +38 -54
- 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 +8 -12
- package/lib/DisplayObjectPool.js +1 -3
- package/lib/camera/Camera.d.ts +12 -7
- package/lib/camera/Camera.js +59 -25
- package/lib/camera/Landmark.d.ts +2 -0
- package/lib/camera/Landmark.js +10 -6
- 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/LayoutRegistry.js +1 -3
- package/lib/css/StyleValueRegistry.js +1 -3
- 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 +9 -7
- 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 +5 -4
- package/lib/plugins/FrustumCullingStrategy.js +1 -3
- package/lib/plugins/PrepareRendererPlugin.js +1 -3
- package/lib/services/EventService.js +26 -7
- package/lib/services/OffscreenCanvasCreator.js +1 -3
- package/lib/services/RenderingContext.d.ts +2 -1
- package/lib/services/RenderingContext.js +4 -1
- package/lib/services/RenderingService.js +1 -3
- package/lib/services/SceneGraphSelector.js +2 -4
- package/lib/services/SceneGraphService.d.ts +2 -1
- package/lib/services/SceneGraphService.js +5 -6
- 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.d.ts +3 -2
- package/lib/services/aabb/interfaces.js +9 -3
- 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 +2 -1
- package/lib/types.js +6 -2
- package/lib/utils/animation.js +2 -3
- package/lib/utils/bezier-easing.js +1 -1
- package/lib/utils/custom-easing.d.ts +0 -9
- package/lib/utils/custom-easing.js +42 -66
- 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
|
@@ -18,9 +18,7 @@ var _manaSyringe = require("mana-syringe");
|
|
|
18
18
|
* // use with `display` property
|
|
19
19
|
* group.style.display = 'layout(centering)';
|
|
20
20
|
*/
|
|
21
|
-
var LayoutRegistry =
|
|
22
|
-
/** @class */
|
|
23
|
-
function () {
|
|
21
|
+
var LayoutRegistry = function () {
|
|
24
22
|
function LayoutRegistry() {}
|
|
25
23
|
|
|
26
24
|
LayoutRegistry = (0, _tslib.__decorate)([(0, _manaSyringe.singleton)()], LayoutRegistry);
|
|
@@ -420,9 +420,7 @@ var BUILT_IN_PROPERTIES = [{
|
|
|
420
420
|
}];
|
|
421
421
|
exports.BUILT_IN_PROPERTIES = BUILT_IN_PROPERTIES;
|
|
422
422
|
|
|
423
|
-
var StyleValueRegistry =
|
|
424
|
-
/** @class */
|
|
425
|
-
function () {
|
|
423
|
+
var StyleValueRegistry = function () {
|
|
426
424
|
function StyleValueRegistry() {
|
|
427
425
|
/**
|
|
428
426
|
* need recalc later
|
|
@@ -14,9 +14,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#colorvalue-objects
|
|
16
16
|
*/
|
|
17
|
-
var CSSColorValue =
|
|
18
|
-
/** @class */
|
|
19
|
-
function (_super) {
|
|
17
|
+
var CSSColorValue = function (_super) {
|
|
20
18
|
(0, _tslib.__extends)(CSSColorValue, _super);
|
|
21
19
|
|
|
22
20
|
function CSSColorValue(colorSpace) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.CSSGradientValue = exports.GradientPatternType = void 0;
|
|
7
7
|
|
|
8
8
|
var _tslib = require("tslib");
|
|
9
9
|
|
|
@@ -19,9 +19,7 @@ exports.GradientPatternType = GradientPatternType;
|
|
|
19
19
|
GradientPatternType[GradientPatternType["Pattern"] = 3] = "Pattern";
|
|
20
20
|
})(GradientPatternType || (exports.GradientPatternType = GradientPatternType = {}));
|
|
21
21
|
|
|
22
|
-
var CSSGradientValue =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSGradientValue = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSGradientValue, _super);
|
|
26
24
|
|
|
27
25
|
function CSSGradientValue(type, value) {
|
|
@@ -40,15 +38,15 @@ function (_super) {
|
|
|
40
38
|
var text = '';
|
|
41
39
|
|
|
42
40
|
if (this.type === GradientPatternType.LinearGradient) {
|
|
43
|
-
text = "linear-gradient("
|
|
41
|
+
text = "linear-gradient(" + this.value.steps.map(function (step) {
|
|
44
42
|
return step.join(',');
|
|
45
|
-
}).join(',')
|
|
43
|
+
}).join(',') + ")";
|
|
46
44
|
} else if (this.type === GradientPatternType.RadialGradient) {
|
|
47
|
-
text = "radial-gradient("
|
|
45
|
+
text = "radial-gradient(" + this.value.steps.map(function (step) {
|
|
48
46
|
return step.join(',');
|
|
49
|
-
}).join(',')
|
|
47
|
+
}).join(',') + ")";
|
|
50
48
|
} else if (this.type === GradientPatternType.Pattern) {
|
|
51
|
-
text = "url("
|
|
49
|
+
text = "url(" + this.value.src + ")";
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
return result += text;
|
|
@@ -15,9 +15,7 @@ var _CSSStyleValue = require("./CSSStyleValue");
|
|
|
15
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSKeywordValue
|
|
16
16
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_keyword_value.idl
|
|
17
17
|
*/
|
|
18
|
-
var CSSKeywordValue =
|
|
19
|
-
/** @class */
|
|
20
|
-
function (_super) {
|
|
18
|
+
var CSSKeywordValue = function (_super) {
|
|
21
19
|
(0, _tslib.__extends)(CSSKeywordValue, _super);
|
|
22
20
|
|
|
23
21
|
function CSSKeywordValue(value) {
|
|
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathInvert =
|
|
15
|
-
/** @class */
|
|
16
|
-
function (_super) {
|
|
14
|
+
var CSSMathInvert = function (_super) {
|
|
17
15
|
(0, _tslib.__extends)(CSSMathInvert, _super);
|
|
18
16
|
|
|
19
17
|
function CSSMathInvert(value, type) {
|
|
@@ -19,9 +19,7 @@ var _ = require(".");
|
|
|
19
19
|
*/
|
|
20
20
|
// Represents the maximum of one or more CSSNumericValues.
|
|
21
21
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
22
|
-
var CSSMathMax =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSMathMax = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSMathMax, _super);
|
|
26
24
|
|
|
27
25
|
function CSSMathMax() {
|
|
@@ -19,9 +19,7 @@ var _ = require(".");
|
|
|
19
19
|
*/
|
|
20
20
|
// Represents the minimum of one or more CSSNumericValues.
|
|
21
21
|
// @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
22
|
-
var CSSMathMin =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSMathMin = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSMathMin, _super);
|
|
26
24
|
|
|
27
25
|
function CSSMathMin() {
|
|
@@ -11,9 +11,7 @@ var _CSSMathValue = require("./CSSMathValue");
|
|
|
11
11
|
|
|
12
12
|
var _ = require(".");
|
|
13
13
|
|
|
14
|
-
var CSSMathNegate =
|
|
15
|
-
/** @class */
|
|
16
|
-
function (_super) {
|
|
14
|
+
var CSSMathNegate = function (_super) {
|
|
17
15
|
(0, _tslib.__extends)(CSSMathNegate, _super);
|
|
18
16
|
|
|
19
17
|
function CSSMathNegate(value, type) {
|
|
@@ -17,9 +17,7 @@ var _ = require(".");
|
|
|
17
17
|
* Represents the product of one or more CSSNumericValues.
|
|
18
18
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathproduct
|
|
19
19
|
*/
|
|
20
|
-
var CSSMathProduct =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSMathProduct = function (_super) {
|
|
23
21
|
(0, _tslib.__extends)(CSSMathProduct, _super);
|
|
24
22
|
|
|
25
23
|
function CSSMathProduct() {
|
|
@@ -17,9 +17,7 @@ var _ = require(".");
|
|
|
17
17
|
* Represents the sum of one or more CSSNumericValues.
|
|
18
18
|
* @see https://drafts.css-houdini.org/css-typed-om/#cssmathsum
|
|
19
19
|
*/
|
|
20
|
-
var CSSMathSum =
|
|
21
|
-
/** @class */
|
|
22
|
-
function (_super) {
|
|
20
|
+
var CSSMathSum = function (_super) {
|
|
23
21
|
(0, _tslib.__extends)(CSSMathSum, _super);
|
|
24
22
|
|
|
25
23
|
function CSSMathSum() {
|
|
@@ -15,9 +15,7 @@ var _CSSNumericValue = require("./CSSNumericValue");
|
|
|
15
15
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSMathValue
|
|
16
16
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_math_value.idl
|
|
17
17
|
*/
|
|
18
|
-
var CSSMathValue =
|
|
19
|
-
/** @class */
|
|
20
|
-
function (_super) {
|
|
18
|
+
var CSSMathValue = function (_super) {
|
|
21
19
|
(0, _tslib.__extends)(CSSMathValue, _super);
|
|
22
20
|
|
|
23
21
|
function CSSMathValue() {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CSSMathVariadic = void 0;
|
|
7
6
|
exports.typeCheck = typeCheck;
|
|
7
|
+
exports.CSSMathVariadic = void 0;
|
|
8
8
|
|
|
9
9
|
var _tslib = require("tslib");
|
|
10
10
|
|
|
@@ -23,9 +23,7 @@ function typeCheck(values, op, error) {
|
|
|
23
23
|
} // Represents an arithmetic operation with one or more CSSNumericValues.
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var CSSMathVariadic =
|
|
27
|
-
/** @class */
|
|
28
|
-
function (_super) {
|
|
26
|
+
var CSSMathVariadic = function (_super) {
|
|
29
27
|
(0, _tslib.__extends)(CSSMathVariadic, _super);
|
|
30
28
|
|
|
31
29
|
function CSSMathVariadic(values, type) {
|
|
@@ -19,9 +19,7 @@ var _ = require(".");
|
|
|
19
19
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
|
|
20
20
|
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
|
|
21
21
|
*/
|
|
22
|
-
var CSSNumericValue =
|
|
23
|
-
/** @class */
|
|
24
|
-
function (_super) {
|
|
22
|
+
var CSSNumericValue = function (_super) {
|
|
25
23
|
(0, _tslib.__extends)(CSSNumericValue, _super);
|
|
26
24
|
|
|
27
25
|
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;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CSSNumericValueType = exports.BaseType = void 0;
|
|
7
|
-
exports.baseTypeToString = baseTypeToString;
|
|
8
6
|
exports.unitTypeToBaseType = unitTypeToBaseType;
|
|
7
|
+
exports.baseTypeToString = baseTypeToString;
|
|
8
|
+
exports.CSSNumericValueType = exports.BaseType = void 0;
|
|
9
9
|
|
|
10
10
|
var _utils = require("../../utils");
|
|
11
11
|
|
|
@@ -134,9 +134,7 @@ function baseTypeToString(baseType) {
|
|
|
134
134
|
return '';
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
var CSSNumericValueType =
|
|
138
|
-
/** @class */
|
|
139
|
-
function () {
|
|
137
|
+
var CSSNumericValueType = function () {
|
|
140
138
|
function CSSNumericValueType(unit, exponent) {
|
|
141
139
|
if (unit === void 0) {
|
|
142
140
|
unit = _.UnitType.kNumber;
|
package/lib/css/cssom/CSSRGB.js
CHANGED
|
@@ -14,9 +14,7 @@ var _CSSColorValue = require("./CSSColorValue");
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
|
|
16
16
|
*/
|
|
17
|
-
var CSSRGB =
|
|
18
|
-
/** @class */
|
|
19
|
-
function (_super) {
|
|
17
|
+
var CSSRGB = function (_super) {
|
|
20
18
|
(0, _tslib.__extends)(CSSRGB, _super);
|
|
21
19
|
|
|
22
20
|
function CSSRGB(r, g, b, alpha,
|
|
@@ -47,7 +45,7 @@ function (_super) {
|
|
|
47
45
|
};
|
|
48
46
|
|
|
49
47
|
CSSRGB.prototype.buildCSSText = function (n, p, result) {
|
|
50
|
-
return result + "rgba("
|
|
48
|
+
return result + ("rgba(" + this.r + "," + this.g + "," + this.b + "," + this.alpha + ")");
|
|
51
49
|
};
|
|
52
50
|
|
|
53
51
|
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
|
/**
|