@antv/g-lite 1.0.70 → 1.1.0-beta.1
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/AbstractRenderer.d.ts +49 -50
- package/dist/Canvas.d.ts +149 -150
- package/dist/camera/Camera.d.ts +279 -280
- package/dist/camera/Landmark.d.ts +23 -24
- package/dist/camera/index.d.ts +3 -4
- package/dist/camera/interfaces.d.ts +194 -195
- package/dist/components/Cullable.d.ts +12 -13
- package/dist/components/Geometry.d.ts +11 -12
- package/dist/components/RBushNode.d.ts +11 -12
- package/dist/components/Renderable.d.ts +27 -28
- package/dist/components/Sortable.d.ts +25 -26
- package/dist/components/Transform.d.ts +31 -32
- package/dist/components/index.d.ts +6 -7
- package/dist/css/CSS.d.ts +87 -88
- package/dist/css/CSSProperty.d.ts +43 -44
- package/dist/css/CSSStyleValuePool.d.ts +19 -20
- package/dist/css/StyleValueRegistry.d.ts +54 -53
- package/dist/css/cssom/CSSColorValue.d.ts +23 -24
- package/dist/css/cssom/CSSGradientValue.d.ts +31 -32
- package/dist/css/cssom/CSSKeywordValue.d.ts +15 -16
- package/dist/css/cssom/CSSMathOperator.d.ts +11 -12
- package/dist/css/cssom/CSSNumericSumValue.d.ts +7 -8
- package/dist/css/cssom/CSSNumericValue.d.ts +28 -29
- package/dist/css/cssom/CSSRGB.d.ts +25 -26
- package/dist/css/cssom/CSSStyleValue.d.ts +45 -46
- package/dist/css/cssom/index.d.ts +16 -17
- package/dist/css/cssom/types.d.ts +38 -39
- package/dist/css/index.d.ts +11 -12
- package/dist/css/interfaces.d.ts +136 -137
- package/dist/css/parser/color.d.ts +22 -23
- package/dist/css/parser/dimension.d.ts +46 -47
- package/dist/css/parser/filter.d.ts +7 -8
- package/dist/css/parser/gradient.d.ts +4 -5
- package/dist/css/parser/index.d.ts +15 -16
- package/dist/css/parser/numeric.d.ts +24 -25
- package/dist/css/parser/path.d.ts +5 -6
- package/dist/css/parser/points.d.ts +23 -24
- package/dist/css/parser/transform-origin.d.ts +8 -9
- package/dist/css/parser/transform.d.ts +15 -16
- package/dist/css/parser/types.d.ts +2 -3
- package/dist/css/properties/CSSPropertyAngle.d.ts +13 -14
- package/dist/css/properties/CSSPropertyClipPath.d.ts +9 -9
- package/dist/css/properties/CSSPropertyColor.d.ts +18 -19
- package/dist/css/properties/CSSPropertyFilter.d.ts +7 -8
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts +20 -21
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts +16 -17
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts +26 -27
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts +13 -14
- package/dist/css/properties/CSSPropertyMarker.d.ts +5 -6
- package/dist/css/properties/CSSPropertyNumber.d.ts +12 -13
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts +13 -14
- package/dist/css/properties/CSSPropertyOpacity.d.ts +14 -15
- package/dist/css/properties/CSSPropertyPath.d.ts +27 -28
- package/dist/css/properties/CSSPropertyPoints.d.ts +19 -20
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts +4 -5
- package/dist/css/properties/CSSPropertyText.d.ts +7 -8
- package/dist/css/properties/CSSPropertyTextTransform.d.ts +11 -12
- package/dist/css/properties/CSSPropertyTransform.d.ts +42 -43
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts +13 -14
- package/dist/css/properties/CSSPropertyZIndex.d.ts +11 -12
- package/dist/css/properties/index.d.ts +20 -21
- package/dist/display-objects/Circle.d.ts +20 -21
- package/dist/display-objects/CustomElement.d.ts +24 -25
- package/dist/display-objects/DisplayObject.d.ts +273 -274
- package/dist/display-objects/Ellipse.d.ts +22 -23
- package/dist/display-objects/Group.d.ts +29 -30
- package/dist/display-objects/HTML.d.ts +41 -42
- package/dist/display-objects/Image.d.ts +26 -27
- package/dist/display-objects/Line.d.ts +60 -61
- package/dist/display-objects/Path.d.ts +123 -134
- package/dist/display-objects/Polygon.d.ts +49 -50
- package/dist/display-objects/Polyline.d.ts +48 -49
- package/dist/display-objects/Rect.d.ts +27 -28
- package/dist/display-objects/Text.d.ts +180 -181
- package/dist/display-objects/constants.d.ts +12 -0
- package/dist/display-objects/index.d.ts +13 -14
- package/dist/dom/CustomElementRegistry.d.ts +15 -16
- package/dist/dom/CustomEvent.d.ts +15 -16
- package/dist/dom/Document.d.ts +77 -78
- package/dist/dom/Element.d.ts +206 -208
- package/dist/dom/EventTarget.d.ts +40 -41
- package/dist/dom/FederatedEvent.d.ts +147 -148
- package/dist/dom/FederatedMouseEvent.d.ts +52 -53
- package/dist/dom/FederatedPointerEvent.d.ts +87 -88
- package/dist/dom/FederatedWheelEvent.d.ts +18 -22
- package/dist/dom/MutationEvent.d.ts +15 -16
- package/dist/dom/Node.d.ts +138 -139
- package/dist/dom/index.d.ts +12 -13
- package/dist/dom/interfaces.d.ts +440 -441
- package/dist/global-runtime.d.ts +35 -36
- package/dist/index.d.ts +15 -15
- package/dist/index.esm.js +15091 -14804
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +15168 -14857
- package/dist/index.js.map +1 -0
- package/dist/index.umd.min.js +2 -1
- package/dist/index.umd.min.js.map +1 -0
- package/dist/plugins/CullingPlugin.d.ts +17 -18
- package/dist/plugins/DirtyCheckPlugin.d.ts +8 -9
- package/dist/plugins/EventPlugin.d.ts +26 -27
- package/dist/plugins/FrustumCullingStrategy.d.ts +21 -22
- package/dist/plugins/PrepareRendererPlugin.d.ts +11 -12
- package/dist/services/ContextService.d.ts +28 -29
- package/dist/services/EventService.d.ts +82 -83
- package/dist/services/OffscreenCanvasCreator.d.ts +15 -16
- package/dist/services/RenderingContext.d.ts +26 -27
- package/dist/services/RenderingService.d.ts +112 -113
- package/dist/services/SceneGraphSelector.d.ts +23 -24
- package/dist/services/SceneGraphService.d.ts +127 -128
- package/dist/services/TextService.d.ts +47 -48
- package/dist/services/aabb/CircleUpdater.d.ts +8 -9
- package/dist/services/aabb/EllipseUpdater.d.ts +8 -9
- package/dist/services/aabb/LineUpdater.d.ts +8 -9
- package/dist/services/aabb/PathUpdater.d.ts +8 -9
- package/dist/services/aabb/PolylineUpdater.d.ts +8 -9
- package/dist/services/aabb/RectUpdater.d.ts +8 -9
- package/dist/services/aabb/TextUpdater.d.ts +23 -24
- package/dist/services/aabb/index.d.ts +8 -9
- package/dist/services/aabb/interfaces.d.ts +12 -13
- package/dist/services/index.d.ts +11 -12
- package/dist/services/interfaces.d.ts +48 -49
- package/dist/shapes/AABB.d.ts +33 -34
- package/dist/shapes/Frustum.d.ts +16 -17
- package/dist/shapes/Plane.d.ts +14 -15
- package/dist/shapes/Point.d.ts +11 -12
- package/dist/shapes/Rectangle.d.ts +12 -13
- package/dist/shapes/index.d.ts +5 -6
- package/dist/types.d.ts +327 -328
- package/dist/utils/assert.d.ts +12 -13
- package/dist/utils/canvas.d.ts +6 -7
- package/dist/utils/dom.d.ts +11 -11
- package/dist/utils/error.d.ts +3 -4
- package/dist/utils/event.d.ts +35 -36
- package/dist/utils/gradient.d.ts +106 -107
- package/dist/utils/index.d.ts +15 -15
- package/dist/utils/math.d.ts +36 -40
- package/dist/utils/memoize.d.ts +7 -8
- package/dist/utils/path.d.ts +24 -29
- package/dist/utils/pointer-events.d.ts +2 -3
- package/dist/utils/raf.d.ts +14 -15
- package/dist/utils/string.d.ts +5 -6
- package/dist/utils/tapable/AsyncParallelHook.d.ts +6 -7
- package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts +6 -7
- package/dist/utils/tapable/Hook.d.ts +1 -2
- package/dist/utils/tapable/SyncHook.d.ts +6 -7
- package/dist/utils/tapable/SyncWaterfallHook.d.ts +6 -7
- package/dist/utils/tapable/index.d.ts +4 -5
- package/dist/utils/text.d.ts +2 -3
- package/dist/utils/transform-mat4.d.ts +4 -0
- package/package.json +20 -13
- package/dist/AbstractRenderer.d.ts.map +0 -1
- package/dist/Canvas.d.ts.map +0 -1
- package/dist/camera/Camera.d.ts.map +0 -1
- package/dist/camera/Landmark.d.ts.map +0 -1
- package/dist/camera/index.d.ts.map +0 -1
- package/dist/camera/interfaces.d.ts.map +0 -1
- package/dist/components/Cullable.d.ts.map +0 -1
- package/dist/components/Geometry.d.ts.map +0 -1
- package/dist/components/RBushNode.d.ts.map +0 -1
- package/dist/components/Renderable.d.ts.map +0 -1
- package/dist/components/Sortable.d.ts.map +0 -1
- package/dist/components/Transform.d.ts.map +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/css/CSS.d.ts.map +0 -1
- package/dist/css/CSSProperty.d.ts.map +0 -1
- package/dist/css/CSSStyleValuePool.d.ts.map +0 -1
- package/dist/css/StyleValueRegistry.d.ts.map +0 -1
- package/dist/css/cssom/CSSColorValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSGradientValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSKeywordValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSMathOperator.d.ts.map +0 -1
- package/dist/css/cssom/CSSNumericSumValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSNumericValue.d.ts.map +0 -1
- package/dist/css/cssom/CSSRGB.d.ts.map +0 -1
- package/dist/css/cssom/CSSStyleValue.d.ts.map +0 -1
- package/dist/css/cssom/index.d.ts.map +0 -1
- package/dist/css/cssom/types.d.ts.map +0 -1
- package/dist/css/index.d.ts.map +0 -1
- package/dist/css/interfaces.d.ts.map +0 -1
- package/dist/css/parser/color.d.ts.map +0 -1
- package/dist/css/parser/dimension.d.ts.map +0 -1
- package/dist/css/parser/filter.d.ts.map +0 -1
- package/dist/css/parser/gradient.d.ts.map +0 -1
- package/dist/css/parser/index.d.ts.map +0 -1
- package/dist/css/parser/numeric.d.ts.map +0 -1
- package/dist/css/parser/path.d.ts.map +0 -1
- package/dist/css/parser/points.d.ts.map +0 -1
- package/dist/css/parser/transform-origin.d.ts.map +0 -1
- package/dist/css/parser/transform.d.ts.map +0 -1
- package/dist/css/parser/types.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyAngle.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyClipPath.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyColor.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyFilter.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage12.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLengthOrPercentage14.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyLocalPosition.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyMarker.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyNumber.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyOffsetDistance.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyOpacity.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyPath.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyPoints.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyShadowBlur.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyText.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTextTransform.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTransform.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyTransformOrigin.d.ts.map +0 -1
- package/dist/css/properties/CSSPropertyZIndex.d.ts.map +0 -1
- package/dist/css/properties/index.d.ts.map +0 -1
- package/dist/display-objects/Circle.d.ts.map +0 -1
- package/dist/display-objects/CustomElement.d.ts.map +0 -1
- package/dist/display-objects/DisplayObject.d.ts.map +0 -1
- package/dist/display-objects/Ellipse.d.ts.map +0 -1
- package/dist/display-objects/Group.d.ts.map +0 -1
- package/dist/display-objects/HTML.d.ts.map +0 -1
- package/dist/display-objects/Image.d.ts.map +0 -1
- package/dist/display-objects/Line.d.ts.map +0 -1
- package/dist/display-objects/Path.d.ts.map +0 -1
- package/dist/display-objects/Polygon.d.ts.map +0 -1
- package/dist/display-objects/Polyline.d.ts.map +0 -1
- package/dist/display-objects/Rect.d.ts.map +0 -1
- package/dist/display-objects/Text.d.ts.map +0 -1
- package/dist/display-objects/index.d.ts.map +0 -1
- package/dist/dom/CustomElementRegistry.d.ts.map +0 -1
- package/dist/dom/CustomEvent.d.ts.map +0 -1
- package/dist/dom/Document.d.ts.map +0 -1
- package/dist/dom/Element.d.ts.map +0 -1
- package/dist/dom/EventTarget.d.ts.map +0 -1
- package/dist/dom/FederatedEvent.d.ts.map +0 -1
- package/dist/dom/FederatedMouseEvent.d.ts.map +0 -1
- package/dist/dom/FederatedPointerEvent.d.ts.map +0 -1
- package/dist/dom/FederatedWheelEvent.d.ts.map +0 -1
- package/dist/dom/MutationEvent.d.ts.map +0 -1
- package/dist/dom/Node.d.ts.map +0 -1
- package/dist/dom/index.d.ts.map +0 -1
- package/dist/dom/interfaces.d.ts.map +0 -1
- package/dist/global-runtime.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.umd.js +0 -22112
- package/dist/plugins/CullingPlugin.d.ts.map +0 -1
- package/dist/plugins/DirtyCheckPlugin.d.ts.map +0 -1
- package/dist/plugins/EventPlugin.d.ts.map +0 -1
- package/dist/plugins/FrustumCullingStrategy.d.ts.map +0 -1
- package/dist/plugins/PrepareRendererPlugin.d.ts.map +0 -1
- package/dist/services/ContextService.d.ts.map +0 -1
- package/dist/services/EventService.d.ts.map +0 -1
- package/dist/services/OffscreenCanvasCreator.d.ts.map +0 -1
- package/dist/services/RenderingContext.d.ts.map +0 -1
- package/dist/services/RenderingService.d.ts.map +0 -1
- package/dist/services/SceneGraphSelector.d.ts.map +0 -1
- package/dist/services/SceneGraphService.d.ts.map +0 -1
- package/dist/services/TextService.d.ts.map +0 -1
- package/dist/services/aabb/CircleUpdater.d.ts.map +0 -1
- package/dist/services/aabb/EllipseUpdater.d.ts.map +0 -1
- package/dist/services/aabb/LineUpdater.d.ts.map +0 -1
- package/dist/services/aabb/PathUpdater.d.ts.map +0 -1
- package/dist/services/aabb/PolylineUpdater.d.ts.map +0 -1
- package/dist/services/aabb/RectUpdater.d.ts.map +0 -1
- package/dist/services/aabb/TextUpdater.d.ts.map +0 -1
- package/dist/services/aabb/index.d.ts.map +0 -1
- package/dist/services/aabb/interfaces.d.ts.map +0 -1
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/interfaces.d.ts.map +0 -1
- package/dist/shapes/AABB.d.ts.map +0 -1
- package/dist/shapes/Frustum.d.ts.map +0 -1
- package/dist/shapes/Plane.d.ts.map +0 -1
- package/dist/shapes/Point.d.ts.map +0 -1
- package/dist/shapes/Rectangle.d.ts.map +0 -1
- package/dist/shapes/index.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/utils/assert.d.ts.map +0 -1
- package/dist/utils/canvas.d.ts.map +0 -1
- package/dist/utils/dom.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/event.d.ts.map +0 -1
- package/dist/utils/gradient.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/math.d.ts.map +0 -1
- package/dist/utils/memoize.d.ts.map +0 -1
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/pointer-events.d.ts.map +0 -1
- package/dist/utils/raf.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/tapable/AsyncParallelHook.d.ts.map +0 -1
- package/dist/utils/tapable/AsyncSeriesWaterfallHook.d.ts.map +0 -1
- package/dist/utils/tapable/Hook.d.ts.map +0 -1
- package/dist/utils/tapable/SyncHook.d.ts.map +0 -1
- package/dist/utils/tapable/SyncWaterfallHook.d.ts.map +0 -1
- package/dist/utils/tapable/index.d.ts.map +0 -1
- package/dist/utils/text.d.ts.map +0 -1
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
2
|
-
import { Nested, ParenLess, UnitType } from './types';
|
|
3
|
-
export type CSSNumberish = number;
|
|
4
|
-
export declare const toCanonicalUnit: (unit: UnitType) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
|
|
5
|
-
/**
|
|
6
|
-
* CSSNumericValue is the base class for numeric and length typed CSS Values.
|
|
7
|
-
* @see https://drafts.css-houdini.org/css-typed-om/#numeric-objects
|
|
8
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
|
|
9
|
-
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Represents numeric values that can be expressed as a single number plus a
|
|
13
|
-
* unit (or a naked number or percentage).
|
|
14
|
-
* @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
|
|
15
|
-
*/
|
|
16
|
-
export declare class CSSUnitValue extends CSSStyleValue {
|
|
17
|
-
unit: UnitType;
|
|
18
|
-
value: number;
|
|
19
|
-
constructor(value: number, unitOrName?: UnitType | string);
|
|
20
|
-
clone(): CSSUnitValue;
|
|
21
|
-
equals(other: CSSUnitValue): boolean;
|
|
22
|
-
getType(): CSSStyleValueType;
|
|
23
|
-
convertTo(target_unit: UnitType): CSSUnitValue;
|
|
24
|
-
buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
25
|
-
}
|
|
26
|
-
export declare const Opx: CSSUnitValue;
|
|
27
|
-
export declare const Lpx: CSSUnitValue;
|
|
28
|
-
export declare const Odeg: CSSUnitValue;
|
|
29
|
-
//# sourceMappingURL=CSSNumericValue.d.ts.map
|
|
1
|
+
import { CSSStyleValue, CSSStyleValueType } from './CSSStyleValue';
|
|
2
|
+
import { Nested, ParenLess, UnitType } from './types';
|
|
3
|
+
export type CSSNumberish = number;
|
|
4
|
+
export declare const toCanonicalUnit: (unit: UnitType) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
|
|
5
|
+
/**
|
|
6
|
+
* CSSNumericValue is the base class for numeric and length typed CSS Values.
|
|
7
|
+
* @see https://drafts.css-houdini.org/css-typed-om/#numeric-objects
|
|
8
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSSNumericValue
|
|
9
|
+
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/cssom/css_numeric_value.idl
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Represents numeric values that can be expressed as a single number plus a
|
|
13
|
+
* unit (or a naked number or percentage).
|
|
14
|
+
* @see https://drafts.css-houdini.org/css-typed-om/#cssunitvalue
|
|
15
|
+
*/
|
|
16
|
+
export declare class CSSUnitValue extends CSSStyleValue {
|
|
17
|
+
unit: UnitType;
|
|
18
|
+
value: number;
|
|
19
|
+
constructor(value: number, unitOrName?: UnitType | string);
|
|
20
|
+
clone(): CSSUnitValue;
|
|
21
|
+
equals(other: CSSUnitValue): boolean;
|
|
22
|
+
getType(): CSSStyleValueType;
|
|
23
|
+
convertTo(target_unit: UnitType): CSSUnitValue;
|
|
24
|
+
buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
25
|
+
}
|
|
26
|
+
export declare const Opx: CSSUnitValue;
|
|
27
|
+
export declare const Lpx: CSSUnitValue;
|
|
28
|
+
export declare const Odeg: CSSUnitValue;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import type { CSSColorPercent, CSSColorRGBComp } from './CSSColorValue';
|
|
2
|
-
import { CSSColorValue } from './CSSColorValue';
|
|
3
|
-
import type { Nested, ParenLess } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* The CSSRGB class represents the CSS rgb()/rgba() functions.
|
|
6
|
-
*
|
|
7
|
-
* @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
|
|
8
|
-
*/
|
|
9
|
-
export declare class CSSRGB extends CSSColorValue {
|
|
10
|
-
r: CSSColorRGBComp;
|
|
11
|
-
g: CSSColorRGBComp;
|
|
12
|
-
b: CSSColorRGBComp;
|
|
13
|
-
alpha: CSSColorPercent;
|
|
14
|
-
/**
|
|
15
|
-
* 'transparent' & 'none' has the same rgba data
|
|
16
|
-
*/
|
|
17
|
-
isNone: boolean;
|
|
18
|
-
constructor(r: CSSColorRGBComp, g: CSSColorRGBComp, b: CSSColorRGBComp, alpha?: CSSColorPercent,
|
|
19
|
-
/**
|
|
20
|
-
* 'transparent' & 'none' has the same rgba data
|
|
21
|
-
*/
|
|
22
|
-
isNone?: boolean);
|
|
23
|
-
clone(): CSSRGB;
|
|
24
|
-
buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=CSSRGB.d.ts.map
|
|
1
|
+
import type { CSSColorPercent, CSSColorRGBComp } from './CSSColorValue';
|
|
2
|
+
import { CSSColorValue } from './CSSColorValue';
|
|
3
|
+
import type { Nested, ParenLess } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The CSSRGB class represents the CSS rgb()/rgba() functions.
|
|
6
|
+
*
|
|
7
|
+
* @see https://drafts.css-houdini.org/css-typed-om-1/#cssrgb
|
|
8
|
+
*/
|
|
9
|
+
export declare class CSSRGB extends CSSColorValue {
|
|
10
|
+
r: CSSColorRGBComp;
|
|
11
|
+
g: CSSColorRGBComp;
|
|
12
|
+
b: CSSColorRGBComp;
|
|
13
|
+
alpha: CSSColorPercent;
|
|
14
|
+
/**
|
|
15
|
+
* 'transparent' & 'none' has the same rgba data
|
|
16
|
+
*/
|
|
17
|
+
isNone: boolean;
|
|
18
|
+
constructor(r: CSSColorRGBComp, g: CSSColorRGBComp, b: CSSColorRGBComp, alpha?: CSSColorPercent,
|
|
19
|
+
/**
|
|
20
|
+
* 'transparent' & 'none' has the same rgba data
|
|
21
|
+
*/
|
|
22
|
+
isNone?: boolean);
|
|
23
|
+
clone(): CSSRGB;
|
|
24
|
+
buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
25
|
+
}
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { Nested, ParenLess, UnitCategory, UnitType } from './types';
|
|
2
|
-
export declare enum CSSStyleValueType {
|
|
3
|
-
kUnknownType = 0,
|
|
4
|
-
kUnparsedType = 1,
|
|
5
|
-
kKeywordType = 2,
|
|
6
|
-
kUnitType = 3,
|
|
7
|
-
kSumType = 4,
|
|
8
|
-
kProductType = 5,
|
|
9
|
-
kNegateType = 6,
|
|
10
|
-
kInvertType = 7,
|
|
11
|
-
kMinType = 8,
|
|
12
|
-
kMaxType = 9,
|
|
13
|
-
kClampType = 10,
|
|
14
|
-
kTransformType = 11,
|
|
15
|
-
kPositionType = 12,
|
|
16
|
-
kURLImageType = 13,
|
|
17
|
-
kColorType = 14,
|
|
18
|
-
kUnsupportedColorType = 15
|
|
19
|
-
}
|
|
20
|
-
export declare const unitFromName: (name: string) => UnitType;
|
|
21
|
-
export declare const unitTypeToUnitCategory: (type: UnitType) => UnitCategory;
|
|
22
|
-
export declare const canonicalUnitTypeForCategory: (category: UnitCategory) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
|
|
23
|
-
/**
|
|
24
|
-
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/css_primitive_value.cc#353
|
|
25
|
-
*/
|
|
26
|
-
export declare const conversionToCanonicalUnitsScaleFactor: (unit_type: UnitType) => number;
|
|
27
|
-
export declare const unitTypeToString: (type: UnitType) => "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "" | "%";
|
|
28
|
-
/**
|
|
29
|
-
* CSSStyleValue is the base class for all CSS values accessible from Typed OM.
|
|
30
|
-
* Values that are not yet supported as specific types are also returned as base CSSStyleValues.
|
|
31
|
-
*
|
|
32
|
-
* Spec @see https://drafts.css-houdini.org/css-typed-om/#stylevalue-objects
|
|
33
|
-
* Docs @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleValue
|
|
34
|
-
*/
|
|
35
|
-
export declare abstract class CSSStyleValue {
|
|
36
|
-
static isAngle(unit: UnitType): boolean;
|
|
37
|
-
static isLength(type: UnitType): boolean;
|
|
38
|
-
static isRelativeUnit(type: UnitType): boolean;
|
|
39
|
-
static isTime(unit: UnitType): boolean;
|
|
40
|
-
protected abstract getType(): CSSStyleValueType;
|
|
41
|
-
abstract buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
42
|
-
abstract clone(): CSSStyleValue;
|
|
43
|
-
toString(): string;
|
|
44
|
-
isNumericValue(): boolean;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=CSSStyleValue.d.ts.map
|
|
1
|
+
import { Nested, ParenLess, UnitCategory, UnitType } from './types';
|
|
2
|
+
export declare enum CSSStyleValueType {
|
|
3
|
+
kUnknownType = 0,
|
|
4
|
+
kUnparsedType = 1,
|
|
5
|
+
kKeywordType = 2,
|
|
6
|
+
kUnitType = 3,
|
|
7
|
+
kSumType = 4,
|
|
8
|
+
kProductType = 5,
|
|
9
|
+
kNegateType = 6,
|
|
10
|
+
kInvertType = 7,
|
|
11
|
+
kMinType = 8,
|
|
12
|
+
kMaxType = 9,
|
|
13
|
+
kClampType = 10,
|
|
14
|
+
kTransformType = 11,
|
|
15
|
+
kPositionType = 12,
|
|
16
|
+
kURLImageType = 13,
|
|
17
|
+
kColorType = 14,
|
|
18
|
+
kUnsupportedColorType = 15
|
|
19
|
+
}
|
|
20
|
+
export declare const unitFromName: (name: string) => UnitType;
|
|
21
|
+
export declare const unitTypeToUnitCategory: (type: UnitType) => UnitCategory;
|
|
22
|
+
export declare const canonicalUnitTypeForCategory: (category: UnitCategory) => UnitType.kUnknown | UnitType.kNumber | UnitType.kPercentage | UnitType.kPixels | UnitType.kDegrees | UnitType.kSeconds;
|
|
23
|
+
/**
|
|
24
|
+
* @see https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/css/css_primitive_value.cc#353
|
|
25
|
+
*/
|
|
26
|
+
export declare const conversionToCanonicalUnitsScaleFactor: (unit_type: UnitType) => number;
|
|
27
|
+
export declare const unitTypeToString: (type: UnitType) => "em" | "px" | "deg" | "rad" | "grad" | "ms" | "s" | "rem" | "turn" | "" | "%";
|
|
28
|
+
/**
|
|
29
|
+
* CSSStyleValue is the base class for all CSS values accessible from Typed OM.
|
|
30
|
+
* Values that are not yet supported as specific types are also returned as base CSSStyleValues.
|
|
31
|
+
*
|
|
32
|
+
* Spec @see https://drafts.css-houdini.org/css-typed-om/#stylevalue-objects
|
|
33
|
+
* Docs @see https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleValue
|
|
34
|
+
*/
|
|
35
|
+
export declare abstract class CSSStyleValue {
|
|
36
|
+
static isAngle(unit: UnitType): boolean;
|
|
37
|
+
static isLength(type: UnitType): boolean;
|
|
38
|
+
static isRelativeUnit(type: UnitType): boolean;
|
|
39
|
+
static isTime(unit: UnitType): boolean;
|
|
40
|
+
protected abstract getType(): CSSStyleValueType;
|
|
41
|
+
abstract buildCSSText(n: Nested, p: ParenLess, result: string): string;
|
|
42
|
+
abstract clone(): CSSStyleValue;
|
|
43
|
+
toString(): string;
|
|
44
|
+
isNumericValue(): boolean;
|
|
45
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* implements CSS_Typed_OM_API
|
|
3
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API/Guide
|
|
4
|
-
* @see https://github.dev/WebKit/WebKit/blob/main/Source/WebCore/css
|
|
5
|
-
*
|
|
6
|
-
* add CSSProperty API:
|
|
7
|
-
* @see https://codereview.chromium.org/2735093005
|
|
8
|
-
*/
|
|
9
|
-
export * from './CSSColorValue';
|
|
10
|
-
export * from './CSSGradientValue';
|
|
11
|
-
export * from './CSSKeywordValue';
|
|
12
|
-
export * from './CSSNumericSumValue';
|
|
13
|
-
export * from './CSSNumericValue';
|
|
14
|
-
export * from './CSSRGB';
|
|
15
|
-
export * from './CSSStyleValue';
|
|
16
|
-
export * from './types';
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
/**
|
|
2
|
+
* implements CSS_Typed_OM_API
|
|
3
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Typed_OM_API/Guide
|
|
4
|
+
* @see https://github.dev/WebKit/WebKit/blob/main/Source/WebCore/css
|
|
5
|
+
*
|
|
6
|
+
* add CSSProperty API:
|
|
7
|
+
* @see https://codereview.chromium.org/2735093005
|
|
8
|
+
*/
|
|
9
|
+
export * from './CSSColorValue';
|
|
10
|
+
export * from './CSSGradientValue';
|
|
11
|
+
export * from './CSSKeywordValue';
|
|
12
|
+
export * from './CSSNumericSumValue';
|
|
13
|
+
export * from './CSSNumericValue';
|
|
14
|
+
export * from './CSSRGB';
|
|
15
|
+
export * from './CSSStyleValue';
|
|
16
|
+
export * from './types';
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
-
export declare enum UnitType {
|
|
2
|
-
kUnknown = 0,
|
|
3
|
-
kNumber = 1,
|
|
4
|
-
kPercentage = 2,
|
|
5
|
-
kEms = 3,
|
|
6
|
-
kPixels = 4,
|
|
7
|
-
kRems = 5,
|
|
8
|
-
kDegrees = 6,
|
|
9
|
-
kRadians = 7,
|
|
10
|
-
kGradians = 8,
|
|
11
|
-
kTurns = 9,
|
|
12
|
-
kMilliseconds = 10,
|
|
13
|
-
kSeconds = 11,
|
|
14
|
-
kInteger = 12
|
|
15
|
-
}
|
|
16
|
-
export declare enum UnitCategory {
|
|
17
|
-
kUNumber = 0,
|
|
18
|
-
kUPercent = 1,
|
|
19
|
-
kULength = 2,
|
|
20
|
-
kUAngle = 3,
|
|
21
|
-
kUTime = 4,
|
|
22
|
-
kUOther = 5
|
|
23
|
-
}
|
|
24
|
-
export declare enum ValueRange {
|
|
25
|
-
kAll = 0,
|
|
26
|
-
kNonNegative = 1,
|
|
27
|
-
kInteger = 2,
|
|
28
|
-
kNonNegativeInteger = 3,
|
|
29
|
-
kPositiveInteger = 4
|
|
30
|
-
}
|
|
31
|
-
export declare enum Nested {
|
|
32
|
-
kYes = 0,
|
|
33
|
-
kNo = 1
|
|
34
|
-
}
|
|
35
|
-
export declare enum ParenLess {
|
|
36
|
-
kYes = 0,
|
|
37
|
-
kNo = 1
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
export declare enum UnitType {
|
|
2
|
+
kUnknown = 0,
|
|
3
|
+
kNumber = 1,
|
|
4
|
+
kPercentage = 2,
|
|
5
|
+
kEms = 3,
|
|
6
|
+
kPixels = 4,
|
|
7
|
+
kRems = 5,
|
|
8
|
+
kDegrees = 6,
|
|
9
|
+
kRadians = 7,
|
|
10
|
+
kGradians = 8,
|
|
11
|
+
kTurns = 9,
|
|
12
|
+
kMilliseconds = 10,
|
|
13
|
+
kSeconds = 11,
|
|
14
|
+
kInteger = 12
|
|
15
|
+
}
|
|
16
|
+
export declare enum UnitCategory {
|
|
17
|
+
kUNumber = 0,
|
|
18
|
+
kUPercent = 1,
|
|
19
|
+
kULength = 2,
|
|
20
|
+
kUAngle = 3,
|
|
21
|
+
kUTime = 4,
|
|
22
|
+
kUOther = 5
|
|
23
|
+
}
|
|
24
|
+
export declare enum ValueRange {
|
|
25
|
+
kAll = 0,
|
|
26
|
+
kNonNegative = 1,
|
|
27
|
+
kInteger = 2,
|
|
28
|
+
kNonNegativeInteger = 3,
|
|
29
|
+
kPositiveInteger = 4
|
|
30
|
+
}
|
|
31
|
+
export declare enum Nested {
|
|
32
|
+
kYes = 0,
|
|
33
|
+
kNo = 1
|
|
34
|
+
}
|
|
35
|
+
export declare enum ParenLess {
|
|
36
|
+
kYes = 0,
|
|
37
|
+
kNo = 1
|
|
38
|
+
}
|
package/dist/css/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
|
|
3
|
-
*/
|
|
4
|
-
export * from './CSS';
|
|
5
|
-
export * from './cssom';
|
|
6
|
-
export * from './CSSProperty';
|
|
7
|
-
export * from './CSSStyleValuePool';
|
|
8
|
-
export * from './interfaces';
|
|
9
|
-
export * from './parser';
|
|
10
|
-
export * from './properties';
|
|
11
|
-
export * from './StyleValueRegistry';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
/**
|
|
2
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model
|
|
3
|
+
*/
|
|
4
|
+
export * from './CSS';
|
|
5
|
+
export * from './cssom';
|
|
6
|
+
export * from './CSSProperty';
|
|
7
|
+
export * from './CSSStyleValuePool';
|
|
8
|
+
export * from './interfaces';
|
|
9
|
+
export * from './parser';
|
|
10
|
+
export * from './properties';
|
|
11
|
+
export * from './StyleValueRegistry';
|
package/dist/css/interfaces.d.ts
CHANGED
|
@@ -1,137 +1,136 @@
|
|
|
1
|
-
import type { BaseStyleProps } from '..';
|
|
2
|
-
import type { DisplayObject } from '../display-objects';
|
|
3
|
-
import type { CSSStyleValue } from './cssom';
|
|
4
|
-
import type { CSSProperty } from './CSSProperty';
|
|
5
|
-
/**
|
|
6
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type
|
|
7
|
-
*/
|
|
8
|
-
export declare enum PropertySyntax {
|
|
9
|
-
/**
|
|
10
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#coordinate
|
|
11
|
-
*/
|
|
12
|
-
COORDINATE = "<coordinate>",
|
|
13
|
-
/**
|
|
14
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#color
|
|
15
|
-
*/
|
|
16
|
-
COLOR = "<color>",
|
|
17
|
-
/**
|
|
18
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#paint
|
|
19
|
-
*/
|
|
20
|
-
PAINT = "<paint>",
|
|
21
|
-
/**
|
|
22
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#number
|
|
23
|
-
*/
|
|
24
|
-
NUMBER = "<number>",
|
|
25
|
-
/**
|
|
26
|
-
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/angle
|
|
27
|
-
*/
|
|
28
|
-
ANGLE = "<angle>",
|
|
29
|
-
/**
|
|
30
|
-
* <number> with range 0..1
|
|
31
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#opacity_value
|
|
32
|
-
*/
|
|
33
|
-
OPACITY_VALUE = "<opacity-value>",
|
|
34
|
-
/**
|
|
35
|
-
* <number> with range 0..Infinity
|
|
36
|
-
*/
|
|
37
|
-
SHADOW_BLUR = "<shadow-blur>",
|
|
38
|
-
/**
|
|
39
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#length
|
|
40
|
-
*/
|
|
41
|
-
LENGTH = "<length>",
|
|
42
|
-
/**
|
|
43
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#percentage
|
|
44
|
-
*/
|
|
45
|
-
PERCENTAGE = "<percentage>",
|
|
46
|
-
LENGTH_PERCENTAGE = "<length> | <percentage>",
|
|
47
|
-
LENGTH_PERCENTAGE_12 = "[<length> | <percentage>]{1,2}",
|
|
48
|
-
/**
|
|
49
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#formal_syntax
|
|
50
|
-
*/
|
|
51
|
-
LENGTH_PERCENTAGE_14 = "[<length> | <percentage>]{1,4}",
|
|
52
|
-
/**
|
|
53
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts
|
|
54
|
-
*/
|
|
55
|
-
LIST_OF_POINTS = "<list-of-points>",
|
|
56
|
-
PATH = "<path>",
|
|
57
|
-
/**
|
|
58
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter#formal_syntax
|
|
59
|
-
*/
|
|
60
|
-
FILTER = "<filter>",
|
|
61
|
-
Z_INDEX = "<z-index>",
|
|
62
|
-
OFFSET_DISTANCE = "<offset-distance>",
|
|
63
|
-
DEFINED_PATH = "<defined-path>",
|
|
64
|
-
MARKER = "<marker>",
|
|
65
|
-
TRANSFORM = "<transform>",
|
|
66
|
-
TRANSFORM_ORIGIN = "<transform-origin>",
|
|
67
|
-
TEXT = "<text>",
|
|
68
|
-
TEXT_TRANSFORM = "<text-transform>"
|
|
69
|
-
}
|
|
70
|
-
export interface PropertyMetadata {
|
|
71
|
-
n: string;
|
|
72
|
-
/**
|
|
73
|
-
* The interpolable flag indicates whether a property can be animated smoothly.
|
|
74
|
-
* Default to `false`.
|
|
75
|
-
*/
|
|
76
|
-
int?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* The property will inherit by default if no value is specified.
|
|
79
|
-
* Default to `false`.
|
|
80
|
-
*/
|
|
81
|
-
inh?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* This property affects only one field on ComputedStyle, and can be set
|
|
84
|
-
* directly during inheritance instead of forcing a recalc.
|
|
85
|
-
*/
|
|
86
|
-
ind?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* This specifies the default value for this field.
|
|
89
|
-
* - for keyword fields, this is the initial keyword
|
|
90
|
-
* - for other fields, this is a string containg the C++ expression that is used to initialise the field.
|
|
91
|
-
*/
|
|
92
|
-
d?: string | ((nodeName: string) => string);
|
|
93
|
-
/**
|
|
94
|
-
* The resolved value used for getComputedStyle() depends on layout for this
|
|
95
|
-
* property, which means we may need to update layout to return the correct
|
|
96
|
-
* value from getComputedStyle().
|
|
97
|
-
*/
|
|
98
|
-
l?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* This specifies all valid keyword values for the property.
|
|
101
|
-
*/
|
|
102
|
-
k?: string[];
|
|
103
|
-
/**
|
|
104
|
-
* eg. strokeWidth is an alias of lineWidth
|
|
105
|
-
*/
|
|
106
|
-
a?: string[];
|
|
107
|
-
/**
|
|
108
|
-
* sort before init attributes according to this priority
|
|
109
|
-
*/
|
|
110
|
-
p?: number;
|
|
111
|
-
/**
|
|
112
|
-
* eg. <color> <paint> <number>
|
|
113
|
-
*/
|
|
114
|
-
syntax?: string;
|
|
115
|
-
}
|
|
116
|
-
export interface PropertyParseOptions {
|
|
117
|
-
skipUpdateAttribute: boolean;
|
|
118
|
-
skipParse: boolean;
|
|
119
|
-
forceUpdateGeometry: boolean;
|
|
120
|
-
usedAttributes: string[];
|
|
121
|
-
}
|
|
122
|
-
export interface StyleValueRegistry {
|
|
123
|
-
recalc: (displayObject: DisplayObject) => void;
|
|
124
|
-
registerMetadata: (metadata: PropertyMetadata) => void;
|
|
125
|
-
unregisterMetadata: (name: string) => void;
|
|
126
|
-
getPropertySyntax: (syntax: string) => CSSProperty<any, any>;
|
|
127
|
-
addUnresolveProperty: (object: DisplayObject, name: string) => void;
|
|
128
|
-
processProperties: (object: DisplayObject, attributes: BaseStyleProps, options?: Partial<PropertyParseOptions>) => void;
|
|
129
|
-
parseProperty: (name: string, value: any, object: DisplayObject) => CSSStyleValue;
|
|
130
|
-
computeProperty: (name: string, computed: CSSStyleValue, object: DisplayObject) => any;
|
|
131
|
-
}
|
|
132
|
-
export interface LayoutRegistry {
|
|
133
|
-
registerLayout: (name: string, ctor: any) => void;
|
|
134
|
-
hasLayout: (name: string) => boolean;
|
|
135
|
-
getLayout: (name: string) => any;
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=interfaces.d.ts.map
|
|
1
|
+
import type { BaseStyleProps } from '..';
|
|
2
|
+
import type { DisplayObject } from '../display-objects';
|
|
3
|
+
import type { CSSStyleValue } from './cssom';
|
|
4
|
+
import type { CSSProperty } from './CSSProperty';
|
|
5
|
+
/**
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PropertySyntax {
|
|
9
|
+
/**
|
|
10
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#coordinate
|
|
11
|
+
*/
|
|
12
|
+
COORDINATE = "<coordinate>",
|
|
13
|
+
/**
|
|
14
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#color
|
|
15
|
+
*/
|
|
16
|
+
COLOR = "<color>",
|
|
17
|
+
/**
|
|
18
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#paint
|
|
19
|
+
*/
|
|
20
|
+
PAINT = "<paint>",
|
|
21
|
+
/**
|
|
22
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#number
|
|
23
|
+
*/
|
|
24
|
+
NUMBER = "<number>",
|
|
25
|
+
/**
|
|
26
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/CSS/angle
|
|
27
|
+
*/
|
|
28
|
+
ANGLE = "<angle>",
|
|
29
|
+
/**
|
|
30
|
+
* <number> with range 0..1
|
|
31
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#opacity_value
|
|
32
|
+
*/
|
|
33
|
+
OPACITY_VALUE = "<opacity-value>",
|
|
34
|
+
/**
|
|
35
|
+
* <number> with range 0..Infinity
|
|
36
|
+
*/
|
|
37
|
+
SHADOW_BLUR = "<shadow-blur>",
|
|
38
|
+
/**
|
|
39
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#length
|
|
40
|
+
*/
|
|
41
|
+
LENGTH = "<length>",
|
|
42
|
+
/**
|
|
43
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#percentage
|
|
44
|
+
*/
|
|
45
|
+
PERCENTAGE = "<percentage>",
|
|
46
|
+
LENGTH_PERCENTAGE = "<length> | <percentage>",
|
|
47
|
+
LENGTH_PERCENTAGE_12 = "[<length> | <percentage>]{1,2}",
|
|
48
|
+
/**
|
|
49
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin#formal_syntax
|
|
50
|
+
*/
|
|
51
|
+
LENGTH_PERCENTAGE_14 = "[<length> | <percentage>]{1,4}",
|
|
52
|
+
/**
|
|
53
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#list-of-ts
|
|
54
|
+
*/
|
|
55
|
+
LIST_OF_POINTS = "<list-of-points>",
|
|
56
|
+
PATH = "<path>",
|
|
57
|
+
/**
|
|
58
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/filter#formal_syntax
|
|
59
|
+
*/
|
|
60
|
+
FILTER = "<filter>",
|
|
61
|
+
Z_INDEX = "<z-index>",
|
|
62
|
+
OFFSET_DISTANCE = "<offset-distance>",
|
|
63
|
+
DEFINED_PATH = "<defined-path>",
|
|
64
|
+
MARKER = "<marker>",
|
|
65
|
+
TRANSFORM = "<transform>",
|
|
66
|
+
TRANSFORM_ORIGIN = "<transform-origin>",
|
|
67
|
+
TEXT = "<text>",
|
|
68
|
+
TEXT_TRANSFORM = "<text-transform>"
|
|
69
|
+
}
|
|
70
|
+
export interface PropertyMetadata {
|
|
71
|
+
n: string;
|
|
72
|
+
/**
|
|
73
|
+
* The interpolable flag indicates whether a property can be animated smoothly.
|
|
74
|
+
* Default to `false`.
|
|
75
|
+
*/
|
|
76
|
+
int?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* The property will inherit by default if no value is specified.
|
|
79
|
+
* Default to `false`.
|
|
80
|
+
*/
|
|
81
|
+
inh?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* This property affects only one field on ComputedStyle, and can be set
|
|
84
|
+
* directly during inheritance instead of forcing a recalc.
|
|
85
|
+
*/
|
|
86
|
+
ind?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* This specifies the default value for this field.
|
|
89
|
+
* - for keyword fields, this is the initial keyword
|
|
90
|
+
* - for other fields, this is a string containg the C++ expression that is used to initialise the field.
|
|
91
|
+
*/
|
|
92
|
+
d?: string | ((nodeName: string) => string);
|
|
93
|
+
/**
|
|
94
|
+
* The resolved value used for getComputedStyle() depends on layout for this
|
|
95
|
+
* property, which means we may need to update layout to return the correct
|
|
96
|
+
* value from getComputedStyle().
|
|
97
|
+
*/
|
|
98
|
+
l?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* This specifies all valid keyword values for the property.
|
|
101
|
+
*/
|
|
102
|
+
k?: string[];
|
|
103
|
+
/**
|
|
104
|
+
* eg. strokeWidth is an alias of lineWidth
|
|
105
|
+
*/
|
|
106
|
+
a?: string[];
|
|
107
|
+
/**
|
|
108
|
+
* sort before init attributes according to this priority
|
|
109
|
+
*/
|
|
110
|
+
p?: number;
|
|
111
|
+
/**
|
|
112
|
+
* eg. <color> <paint> <number>
|
|
113
|
+
*/
|
|
114
|
+
syntax?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface PropertyParseOptions {
|
|
117
|
+
skipUpdateAttribute: boolean;
|
|
118
|
+
skipParse: boolean;
|
|
119
|
+
forceUpdateGeometry: boolean;
|
|
120
|
+
usedAttributes: string[];
|
|
121
|
+
}
|
|
122
|
+
export interface StyleValueRegistry {
|
|
123
|
+
recalc: (displayObject: DisplayObject) => void;
|
|
124
|
+
registerMetadata: (metadata: PropertyMetadata) => void;
|
|
125
|
+
unregisterMetadata: (name: string) => void;
|
|
126
|
+
getPropertySyntax: (syntax: string) => CSSProperty<any, any>;
|
|
127
|
+
addUnresolveProperty: (object: DisplayObject, name: string) => void;
|
|
128
|
+
processProperties: (object: DisplayObject, attributes: BaseStyleProps, options?: Partial<PropertyParseOptions>) => void;
|
|
129
|
+
parseProperty: (name: string, value: any, object: DisplayObject) => CSSStyleValue;
|
|
130
|
+
computeProperty: (name: string, computed: CSSStyleValue, object: DisplayObject) => any;
|
|
131
|
+
}
|
|
132
|
+
export interface LayoutRegistry {
|
|
133
|
+
registerLayout: (name: string, ctor: any) => void;
|
|
134
|
+
hasLayout: (name: string) => boolean;
|
|
135
|
+
getLayout: (name: string) => any;
|
|
136
|
+
}
|