@revideo/2d 0.4.0 → 0.4.1-cat.995
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/editor/editor/tsconfig.build.tsbuildinfo +1 -1
- package/editor/index.js +380 -151
- package/editor/index.js.map +1 -1
- package/lib/code/CodeCursor.d.ts +74 -74
- package/lib/code/CodeDiffer.d.ts +21 -16
- package/lib/code/CodeDiffer.js +39 -41
- package/lib/code/CodeFragment.d.ts +16 -8
- package/lib/code/CodeFragment.js +36 -36
- package/lib/code/CodeHighlighter.d.ts +59 -59
- package/lib/code/CodeHighlighter.js +1 -1
- package/lib/code/CodeMetrics.d.ts +12 -8
- package/lib/code/CodeMetrics.js +26 -24
- package/lib/code/CodeRange.d.ts +21 -5
- package/lib/code/CodeRange.js +131 -124
- package/lib/code/CodeScope.d.ts +18 -8
- package/lib/code/CodeSelection.d.ts +9 -4
- package/lib/code/CodeSelection.js +8 -8
- package/lib/code/CodeSignal.d.ts +74 -47
- package/lib/code/CodeTokenizer.d.ts +1 -1
- package/lib/code/CodeTokenizer.js +41 -41
- package/lib/code/DefaultHighlightStyle.d.ts +2 -2
- package/lib/code/DefaultHighlightStyle.js +96 -96
- package/lib/code/LezerHighlighter.d.ts +21 -19
- package/lib/code/diff.d.ts +12 -9
- package/lib/code/diff.js +218 -205
- package/lib/code/extractRange.d.ts +7 -4
- package/lib/code/extractRange.js +79 -71
- package/lib/code/index.d.ts +1 -1
- package/lib/code/index.js +1 -1
- package/lib/components/Audio.d.ts +11 -11
- package/lib/components/Bezier.d.ts +18 -18
- package/lib/components/Circle.d.ts +95 -90
- package/lib/components/Code.d.ts +244 -211
- package/lib/components/CodeBlock.d.ts +1 -1
- package/lib/components/CubicBezier.d.ts +36 -36
- package/lib/components/Curve.d.ts +208 -198
- package/lib/components/Grid.d.ts +47 -42
- package/lib/components/Icon.d.ts +55 -50
- package/lib/components/Img.d.ts +86 -79
- package/lib/components/Knot.d.ts +97 -78
- package/lib/components/Latex.d.ts +12 -12
- package/lib/components/Layout.d.ts +455 -413
- package/lib/components/Line.d.ts +61 -49
- package/lib/components/Node.d.ts +1 -1
- package/lib/components/Path.d.ts +1 -1
- package/lib/components/Polygon.d.ts +60 -55
- package/lib/components/QuadBezier.d.ts +29 -29
- package/lib/components/Ray.d.ts +28 -28
- package/lib/components/Rect.d.ts +115 -108
- package/lib/components/SVG.d.ts +1 -1
- package/lib/components/Shape.d.ts +1 -1
- package/lib/components/Spline.d.ts +46 -40
- package/lib/components/Txt.d.ts +55 -44
- package/lib/components/TxtLeaf.d.ts +20 -16
- package/lib/components/View2D.d.ts +22 -22
- package/lib/components/index.d.ts +1 -1
- package/lib/components/types.d.ts +22 -9
- package/lib/curves/ArcSegment.d.ts +36 -24
- package/lib/curves/CircleSegment.d.ts +26 -16
- package/lib/curves/CubicBezierSegment.d.ts +18 -13
- package/lib/curves/CurveDrawingInfo.d.ts +9 -9
- package/lib/curves/CurvePoint.d.ts +13 -13
- package/lib/curves/CurveProfile.d.ts +5 -5
- package/lib/curves/CurveProfile.js +1 -1
- package/lib/curves/KnotInfo.d.ts +8 -8
- package/lib/curves/LineSegment.d.ts +19 -14
- package/lib/curves/Polynomial.d.ts +110 -110
- package/lib/curves/Polynomial2D.d.ts +20 -20
- package/lib/curves/PolynomialSegment.d.ts +42 -37
- package/lib/curves/QuadBezierSegment.d.ts +12 -12
- package/lib/curves/Segment.d.ts +12 -7
- package/lib/curves/UniformPolynomialCurveSampler.d.ts +34 -34
- package/lib/curves/createCurveProfileLerp.d.ts +17 -6
- package/lib/curves/getBezierSplineProfile.d.ts +8 -4
- package/lib/curves/getCircleProfile.d.ts +10 -4
- package/lib/curves/getPathProfile.d.ts +2 -2
- package/lib/curves/getPointAtDistance.d.ts +7 -4
- package/lib/curves/getPolylineProfile.d.ts +8 -4
- package/lib/curves/getRectProfile.d.ts +9 -4
- package/lib/curves/index.d.ts +1 -1
- package/lib/curves/index.js +1 -1
- package/lib/decorators/canvasStyleSignal.d.ts +3 -3
- package/lib/decorators/colorSignal.d.ts +1 -1
- package/lib/decorators/compound.d.ts +4 -2
- package/lib/decorators/computed.d.ts +1 -1
- package/lib/decorators/defaultStyle.d.ts +5 -2
- package/lib/decorators/filtersSignal.d.ts +28 -8
- package/lib/decorators/index.d.ts +1 -1
- package/lib/decorators/index.js +1 -1
- package/lib/decorators/initializers.d.ts +5 -2
- package/lib/decorators/initializers.js +18 -19
- package/lib/decorators/nodeName.d.ts +1 -1
- package/lib/decorators/nodeName.js +4 -4
- package/lib/decorators/signal.d.ts +40 -20
- package/lib/decorators/spacingSignal.d.ts +1 -1
- package/lib/decorators/vector2Signal.d.ts +13 -7
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/jsx-dev-runtime.d.ts +3 -3
- package/lib/jsx-dev-runtime.js +3 -3
- package/lib/jsx-runtime.d.ts +19 -9
- package/lib/jsx-runtime.js +18 -18
- package/lib/partials/Filter.d.ts +24 -16
- package/lib/partials/Gradient.d.ts +30 -24
- package/lib/partials/Pattern.d.ts +14 -9
- package/lib/partials/ShaderConfig.d.ts +81 -74
- package/lib/partials/index.d.ts +1 -1
- package/lib/partials/index.js +1 -1
- package/lib/partials/types.d.ts +19 -6
- package/lib/scenes/Scene2D.d.ts +42 -23
- package/lib/scenes/index.d.ts +1 -1
- package/lib/scenes/index.js +1 -1
- package/lib/scenes/makeScene2D.d.ts +7 -5
- package/lib/scenes/useScene2D.d.ts +2 -2
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/utils/diff.d.ts +25 -18
- package/lib/utils/diff.js +84 -87
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/is.d.ts +4 -2
- package/lib/utils/is.js +2 -2
- package/lib/utils/makeSignalExtensions.d.ts +11 -4
- package/package.json +5 -5
package/lib/components/Line.d.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
BBox,
|
|
3
|
+
PossibleVector2,
|
|
4
|
+
SignalValue,
|
|
5
|
+
SimpleSignal,
|
|
6
|
+
ThreadGenerator,
|
|
7
|
+
TimingFunction,
|
|
8
|
+
Vector2,
|
|
9
|
+
} from '@revideo/core';
|
|
10
|
+
import {CurveProfile} from '../curves';
|
|
11
|
+
import {Curve, CurveProps} from './Curve';
|
|
4
12
|
export interface LineProps extends CurveProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* {@inheritDoc Line.radius}
|
|
15
|
+
*/
|
|
16
|
+
radius?: SignalValue<number>;
|
|
17
|
+
/**
|
|
18
|
+
* {@inheritDoc Line.points}
|
|
19
|
+
*/
|
|
20
|
+
points?: SignalValue<SignalValue<PossibleVector2>[]>;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
23
|
* A node for drawing lines and polygons.
|
|
@@ -117,42 +125,46 @@ export interface LineProps extends CurveProps {
|
|
|
117
125
|
* ```
|
|
118
126
|
*/
|
|
119
127
|
export declare class Line extends Curve {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Rotate the points to minimize the overall distance traveled when tweening.
|
|
130
|
+
*
|
|
131
|
+
* @param points - The points to rotate.
|
|
132
|
+
* @param reference - The reference points to which the distance is measured.
|
|
133
|
+
* @param closed - Whether the points form a closed polygon.
|
|
134
|
+
*/
|
|
135
|
+
private static rotatePoints;
|
|
136
|
+
/**
|
|
137
|
+
* Distribute additional points along the polyline.
|
|
138
|
+
*
|
|
139
|
+
* @param points - The points of a polyline along which new points should be
|
|
140
|
+
* distributed.
|
|
141
|
+
* @param count - The number of points to add.
|
|
142
|
+
*/
|
|
143
|
+
private static distributePoints;
|
|
144
|
+
/**
|
|
145
|
+
* The radius of the line's corners.
|
|
146
|
+
*/
|
|
147
|
+
readonly radius: SimpleSignal<number, this>;
|
|
148
|
+
/**
|
|
149
|
+
* The points of the line.
|
|
150
|
+
*
|
|
151
|
+
* @remarks
|
|
152
|
+
* When set to `null`, the Line will use the positions of its children as
|
|
153
|
+
* points.
|
|
154
|
+
*/
|
|
155
|
+
readonly points: SimpleSignal<SignalValue<PossibleVector2>[] | null, this>;
|
|
156
|
+
protected tweenPoints(
|
|
157
|
+
value: SignalValue<SignalValue<PossibleVector2>[] | null>,
|
|
158
|
+
time: number,
|
|
159
|
+
timingFunction: TimingFunction,
|
|
160
|
+
): ThreadGenerator;
|
|
161
|
+
private tweenedPoints;
|
|
162
|
+
constructor(props: LineProps);
|
|
163
|
+
protected childrenBBox(): BBox;
|
|
164
|
+
parsedPoints(): Vector2[];
|
|
165
|
+
profile(): CurveProfile;
|
|
166
|
+
protected lineWidthCoefficient(): number;
|
|
167
|
+
drawOverlay(context: CanvasRenderingContext2D, matrix: DOMMatrix): void;
|
|
168
|
+
private parsePoints;
|
|
157
169
|
}
|
|
158
|
-
//# sourceMappingURL=Line.d.ts.map
|
|
170
|
+
//# sourceMappingURL=Line.d.ts.map
|
package/lib/components/Node.d.ts
CHANGED
|
@@ -231,7 +231,7 @@ export declare class Node implements Promisable<Node> {
|
|
|
231
231
|
readonly composite: SimpleSignal<boolean, this>;
|
|
232
232
|
readonly compositeOperation: SimpleSignal<GlobalCompositeOperation, this>;
|
|
233
233
|
private readonly compositeOverride;
|
|
234
|
-
protected tweenCompositeOperation(value: SignalValue<GlobalCompositeOperation>, time: number, timingFunction: TimingFunction): Generator<void |
|
|
234
|
+
protected tweenCompositeOperation(value: SignalValue<GlobalCompositeOperation>, time: number, timingFunction: TimingFunction): Generator<void | Promise<any> | ThreadGenerator | Promisable<any>, void, any>;
|
|
235
235
|
/**
|
|
236
236
|
* Represents the opacity of this node in the range 0-1.
|
|
237
237
|
*
|
package/lib/components/Path.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare class Path extends Curve {
|
|
|
12
12
|
protected childrenBBox(): BBox;
|
|
13
13
|
protected lineWidthCoefficient(): number;
|
|
14
14
|
protected processSubpath(path: Path2D, startPoint: Vector2 | null, endPoint: Vector2 | null): void;
|
|
15
|
-
protected tweenData(newPath: SignalValue<string>, time: number, timingFunction: TimingFunction): Generator<void | import("@revideo/core").ThreadGenerator |
|
|
15
|
+
protected tweenData(newPath: SignalValue<string>, time: number, timingFunction: TimingFunction): Generator<void | Promise<any> | import("@revideo/core").ThreadGenerator | import("@revideo/core").Promisable<any>, void, any>;
|
|
16
16
|
drawOverlay(context: CanvasRenderingContext2D, matrix: DOMMatrix): void;
|
|
17
17
|
}
|
|
18
18
|
//# sourceMappingURL=Path.d.ts.map
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
BBox,
|
|
3
|
+
SerializedVector2,
|
|
4
|
+
SignalValue,
|
|
5
|
+
SimpleSignal,
|
|
6
|
+
} from '@revideo/core';
|
|
7
|
+
import {CurveProfile} from '../curves';
|
|
8
|
+
import {DesiredLength} from '../partials';
|
|
9
|
+
import {Curve, CurveProps} from './Curve';
|
|
5
10
|
export interface PolygonProps extends CurveProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* {@inheritDoc Polygon.sides}
|
|
13
|
+
*/
|
|
14
|
+
sides?: SignalValue<number>;
|
|
15
|
+
/**
|
|
16
|
+
* {@inheritDoc Polygon.radius}
|
|
17
|
+
*/
|
|
18
|
+
radius?: SignalValue<number>;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* A node for drawing regular polygons.
|
|
@@ -65,47 +70,47 @@ export interface PolygonProps extends CurveProps {
|
|
|
65
70
|
* ```
|
|
66
71
|
*/
|
|
67
72
|
export declare class Polygon extends Curve {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The number of sides of the polygon.
|
|
75
|
+
*
|
|
76
|
+
* @remarks
|
|
77
|
+
* For example, a value of 6 creates a hexagon.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Polygon
|
|
82
|
+
* size={320}
|
|
83
|
+
* sides={7}
|
|
84
|
+
* stroke={'#fff'}
|
|
85
|
+
* lineWidth={8}
|
|
86
|
+
* fill={'lightseagreen'}
|
|
87
|
+
* />
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
readonly sides: SimpleSignal<number, this>;
|
|
91
|
+
/**
|
|
92
|
+
* The radius of the polygon's corners.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* <Polygon
|
|
97
|
+
* radius={30}
|
|
98
|
+
* size={320}
|
|
99
|
+
* sides={3}
|
|
100
|
+
* stroke={'#fff'}
|
|
101
|
+
* lineWidth={8}
|
|
102
|
+
* />
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
readonly radius: SimpleSignal<number, this>;
|
|
106
|
+
constructor(props: PolygonProps);
|
|
107
|
+
profile(): CurveProfile;
|
|
108
|
+
protected desiredSize(): SerializedVector2<DesiredLength>;
|
|
109
|
+
protected offsetComputedLayout(box: BBox): BBox;
|
|
110
|
+
protected childrenBBox(): BBox;
|
|
111
|
+
protected requiresProfile(): boolean;
|
|
112
|
+
protected getPath(): Path2D;
|
|
113
|
+
protected getRipplePath(): Path2D;
|
|
114
|
+
protected createPath(expand?: number): Path2D;
|
|
110
115
|
}
|
|
111
|
-
//# sourceMappingURL=Polygon.d.ts.map
|
|
116
|
+
//# sourceMappingURL=Polygon.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import {PossibleVector2, SignalValue, Vector2Signal} from '@revideo/core';
|
|
2
|
+
import {PolynomialSegment} from '../curves/PolynomialSegment';
|
|
3
|
+
import {Bezier, BezierOverlayInfo} from './Bezier';
|
|
4
|
+
import {CurveProps} from './Curve';
|
|
5
5
|
export interface QuadBezierProps extends CurveProps {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
p0?: SignalValue<PossibleVector2>;
|
|
7
|
+
p0X?: SignalValue<number>;
|
|
8
|
+
p0Y?: SignalValue<number>;
|
|
9
|
+
p1?: SignalValue<PossibleVector2>;
|
|
10
|
+
p1X?: SignalValue<number>;
|
|
11
|
+
p1Y?: SignalValue<number>;
|
|
12
|
+
p2?: SignalValue<PossibleVector2>;
|
|
13
|
+
p2X?: SignalValue<number>;
|
|
14
|
+
p2Y?: SignalValue<number>;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A node for drawing a quadratic Bézier curve.
|
|
@@ -42,20 +42,20 @@ export interface QuadBezierProps extends CurveProps {
|
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
44
|
export declare class QuadBezier extends Bezier {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
/**
|
|
46
|
+
* The start point of the Bézier curve.
|
|
47
|
+
*/
|
|
48
|
+
readonly p0: Vector2Signal<this>;
|
|
49
|
+
/**
|
|
50
|
+
* The control point of the Bézier curve.
|
|
51
|
+
*/
|
|
52
|
+
readonly p1: Vector2Signal<this>;
|
|
53
|
+
/**
|
|
54
|
+
* The end point of the Bézier curve.
|
|
55
|
+
*/
|
|
56
|
+
readonly p2: Vector2Signal<this>;
|
|
57
|
+
constructor(props: QuadBezierProps);
|
|
58
|
+
protected segment(): PolynomialSegment;
|
|
59
|
+
protected overlayInfo(matrix: DOMMatrix): BezierOverlayInfo;
|
|
60
60
|
}
|
|
61
|
-
//# sourceMappingURL=QuadBezier.d.ts.map
|
|
61
|
+
//# sourceMappingURL=QuadBezier.d.ts.map
|
package/lib/components/Ray.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import {BBox, PossibleVector2, SignalValue, Vector2Signal} from '@revideo/core';
|
|
2
|
+
import {CurveProfile} from '../curves';
|
|
3
|
+
import {Curve, CurveProps} from './Curve';
|
|
4
4
|
export interface RayProps extends CurveProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
/**
|
|
6
|
+
* {@inheritDoc Ray.from}
|
|
7
|
+
*/
|
|
8
|
+
from?: SignalValue<PossibleVector2>;
|
|
9
|
+
fromX?: SignalValue<number>;
|
|
10
|
+
fromY?: SignalValue<number>;
|
|
11
|
+
/**
|
|
12
|
+
* {@inheritDoc Ray.to}
|
|
13
|
+
*/
|
|
14
|
+
to?: SignalValue<PossibleVector2>;
|
|
15
|
+
toX?: SignalValue<number>;
|
|
16
|
+
toY?: SignalValue<number>;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* A node for drawing an individual line segment.
|
|
@@ -44,17 +44,17 @@ export interface RayProps extends CurveProps {
|
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
46
|
export declare class Ray extends Curve {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
/**
|
|
48
|
+
* The starting point of the ray.
|
|
49
|
+
*/
|
|
50
|
+
readonly from: Vector2Signal<this>;
|
|
51
|
+
/**
|
|
52
|
+
* The ending point of the ray.
|
|
53
|
+
*/
|
|
54
|
+
readonly to: Vector2Signal<this>;
|
|
55
|
+
constructor(props: RayProps);
|
|
56
|
+
protected childrenBBox(): BBox;
|
|
57
|
+
profile(): CurveProfile;
|
|
58
|
+
drawOverlay(context: CanvasRenderingContext2D, matrix: DOMMatrix): void;
|
|
59
59
|
}
|
|
60
|
-
//# sourceMappingURL=Ray.d.ts.map
|
|
60
|
+
//# sourceMappingURL=Ray.d.ts.map
|
package/lib/components/Rect.d.ts
CHANGED
|
@@ -1,112 +1,119 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
BBox,
|
|
3
|
+
PossibleSpacing,
|
|
4
|
+
SerializedVector2,
|
|
5
|
+
SignalValue,
|
|
6
|
+
SimpleSignal,
|
|
7
|
+
SpacingSignal,
|
|
8
|
+
} from '@revideo/core';
|
|
9
|
+
import {DesiredLength} from '../partials';
|
|
10
|
+
import {Curve, CurveProps} from './Curve';
|
|
4
11
|
export interface RectProps extends CurveProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
/**
|
|
13
|
+
* {@inheritDoc Rect.radius}
|
|
14
|
+
*/
|
|
15
|
+
radius?: SignalValue<PossibleSpacing>;
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc Rect.smoothCorners}
|
|
18
|
+
*/
|
|
19
|
+
smoothCorners?: SignalValue<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* {@inheritDoc Rect.cornerSharpness}
|
|
22
|
+
*/
|
|
23
|
+
cornerSharpness?: SignalValue<number>;
|
|
17
24
|
}
|
|
18
25
|
export declare class Rect extends Curve {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Rounds the corners of this rectangle.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* The value represents the radius of the quarter circle that is used to round
|
|
31
|
+
* the corners. If the value is a number, the same radius is used for all
|
|
32
|
+
* corners. Passing an array of two to four numbers will set individual radii
|
|
33
|
+
* for each corner. Individual radii correspond to different corners depending
|
|
34
|
+
* on the number of values passed:
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* // top-left-and-bottom-right | top-right-and-bottom-left
|
|
38
|
+
* [10, 30]
|
|
39
|
+
* // top-left | top-right-and-bottom-left | bottom-right
|
|
40
|
+
* [10, 20, 30]
|
|
41
|
+
* // top-left | top-right | bottom-right | bottom-left
|
|
42
|
+
* [10, 20, 30, 40]
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* One uniform radius:
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <Rect
|
|
49
|
+
* size={320}
|
|
50
|
+
* radius={40}
|
|
51
|
+
* fill={'white'}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
* @example
|
|
55
|
+
* Individual radii for each corner:
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <Rect
|
|
58
|
+
* size={320}
|
|
59
|
+
* radius={[10, 20, 30, 40]}
|
|
60
|
+
* fill={'white'}
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
readonly radius: SpacingSignal<this>;
|
|
65
|
+
/**
|
|
66
|
+
* Enables corner smoothing.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* This property only affects the way rounded corners are drawn. To control
|
|
70
|
+
* the corner radius use the {@link radius} property.
|
|
71
|
+
*
|
|
72
|
+
* When enabled, rounded corners are drawn continuously using Bézier curves
|
|
73
|
+
* rather than quarter circles. The sharpness of the curve can be controlled
|
|
74
|
+
* with {@link cornerSharpness}.
|
|
75
|
+
*
|
|
76
|
+
* You can read more about corner smoothing in
|
|
77
|
+
* [this article by Nick Lawrence](https://uxplanet.org/ui-ux-design-corner-smoothing-720509d1ae48).
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Rect
|
|
82
|
+
* width={300}
|
|
83
|
+
* height={300}
|
|
84
|
+
* smoothCorners={true}
|
|
85
|
+
* />
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
readonly smoothCorners: SimpleSignal<boolean, this>;
|
|
89
|
+
/**
|
|
90
|
+
* Controls the sharpness of {@link smoothCorners}.
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* This property only affects the way rounded corners are drawn. To control
|
|
94
|
+
* the corner radius use the {@link radius} property.
|
|
95
|
+
*
|
|
96
|
+
* Requires {@link smoothCorners} to be enabled to have any effect.
|
|
97
|
+
* By default, corner sharpness is set to `0.6` which represents a smooth,
|
|
98
|
+
* circle-like rounding. At `0` the edges are squared off.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <Rect
|
|
103
|
+
* size={300}
|
|
104
|
+
* smoothCorners={true}
|
|
105
|
+
* cornerSharpness={0.7}
|
|
106
|
+
* />
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
readonly cornerSharpness: SimpleSignal<number, this>;
|
|
110
|
+
constructor(props: RectProps);
|
|
111
|
+
profile(): import('..').CurveProfile;
|
|
112
|
+
protected desiredSize(): SerializedVector2<DesiredLength>;
|
|
113
|
+
protected offsetComputedLayout(box: BBox): BBox;
|
|
114
|
+
protected childrenBBox(): BBox;
|
|
115
|
+
protected getPath(): Path2D;
|
|
116
|
+
protected getCacheBBox(): BBox;
|
|
117
|
+
protected getRipplePath(): Path2D;
|
|
111
118
|
}
|
|
112
|
-
//# sourceMappingURL=Rect.d.ts.map
|
|
119
|
+
//# sourceMappingURL=Rect.d.ts.map
|
package/lib/components/SVG.d.ts
CHANGED
|
@@ -95,7 +95,7 @@ export declare class SVG extends Shape {
|
|
|
95
95
|
* @param timing - The timing function.
|
|
96
96
|
*/
|
|
97
97
|
protected generateTransformer(from: Node, to: Node, duration: number, timing: TimingFunction): Generator<ThreadGenerator>;
|
|
98
|
-
protected tweenSvg(value: SignalValue<string>, time: number, timingFunction: TimingFunction): Generator<void |
|
|
98
|
+
protected tweenSvg(value: SignalValue<string>, time: number, timingFunction: TimingFunction): Generator<void | Promise<any> | ThreadGenerator | import("@revideo/core").Promisable<any>, void, any>;
|
|
99
99
|
private wrapperScale;
|
|
100
100
|
/**
|
|
101
101
|
* Get the current `SVGDocument`.
|
|
@@ -34,6 +34,6 @@ export declare abstract class Shape extends Layout {
|
|
|
34
34
|
protected getPath(): Path2D;
|
|
35
35
|
protected getRipplePath(): Path2D;
|
|
36
36
|
protected drawRipple(context: CanvasRenderingContext2D): void;
|
|
37
|
-
ripple(duration?: number): Generator<void | import("@revideo/core").ThreadGenerator |
|
|
37
|
+
ripple(duration?: number): Generator<void | Promise<any> | import("@revideo/core").ThreadGenerator | import("@revideo/core").Promisable<any>, void, any>;
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=Shape.d.ts.map
|