@revideo/2d 0.3.5-yellow.968 → 0.3.5
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 +151 -380
- package/editor/index.js.map +1 -1
- package/lib/code/CodeCursor.d.ts +74 -74
- package/lib/code/CodeDiffer.d.ts +16 -21
- package/lib/code/CodeDiffer.js +41 -39
- package/lib/code/CodeFragment.d.ts +8 -16
- 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 +8 -12
- package/lib/code/CodeMetrics.js +24 -26
- package/lib/code/CodeRange.d.ts +5 -21
- package/lib/code/CodeRange.js +124 -131
- package/lib/code/CodeScope.d.ts +8 -18
- package/lib/code/CodeSelection.d.ts +4 -9
- package/lib/code/CodeSelection.js +8 -8
- package/lib/code/CodeSignal.d.ts +47 -74
- 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 +19 -21
- package/lib/code/diff.d.ts +9 -12
- package/lib/code/diff.js +205 -218
- package/lib/code/extractRange.d.ts +4 -7
- package/lib/code/extractRange.js +71 -79
- 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 +90 -95
- package/lib/components/Code.d.ts +211 -244
- package/lib/components/CubicBezier.d.ts +36 -36
- package/lib/components/Curve.d.ts +198 -208
- package/lib/components/Grid.d.ts +42 -47
- package/lib/components/Icon.d.ts +50 -55
- package/lib/components/Img.d.ts +79 -86
- package/lib/components/Knot.d.ts +78 -97
- package/lib/components/Latex.d.ts +12 -12
- package/lib/components/Layout.d.ts +413 -455
- package/lib/components/Line.d.ts +49 -61
- package/lib/components/Media.d.ts +36 -36
- package/lib/components/Polygon.d.ts +55 -60
- package/lib/components/QuadBezier.d.ts +29 -29
- package/lib/components/Ray.d.ts +28 -28
- package/lib/components/Rect.d.ts +108 -115
- package/lib/components/Spline.d.ts +40 -46
- package/lib/components/Txt.d.ts +44 -55
- package/lib/components/TxtLeaf.d.ts +16 -20
- package/lib/components/View2D.d.ts +22 -22
- package/lib/components/index.d.ts +1 -1
- package/lib/components/types.d.ts +9 -22
- package/lib/curves/ArcSegment.d.ts +24 -36
- package/lib/curves/CircleSegment.d.ts +16 -26
- package/lib/curves/CubicBezierSegment.d.ts +13 -18
- 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 +14 -19
- package/lib/curves/Polynomial.d.ts +110 -110
- package/lib/curves/Polynomial2D.d.ts +20 -20
- package/lib/curves/PolynomialSegment.d.ts +37 -42
- package/lib/curves/QuadBezierSegment.d.ts +12 -12
- package/lib/curves/Segment.d.ts +7 -12
- package/lib/curves/UniformPolynomialCurveSampler.d.ts +34 -34
- package/lib/curves/createCurveProfileLerp.d.ts +6 -17
- package/lib/curves/getBezierSplineProfile.d.ts +4 -8
- package/lib/curves/getCircleProfile.d.ts +4 -10
- package/lib/curves/getPathProfile.d.ts +2 -2
- package/lib/curves/getPointAtDistance.d.ts +4 -7
- package/lib/curves/getPolylineProfile.d.ts +4 -8
- package/lib/curves/getRectProfile.d.ts +4 -9
- 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 +2 -4
- package/lib/decorators/computed.d.ts +1 -1
- package/lib/decorators/defaultStyle.d.ts +2 -5
- package/lib/decorators/filtersSignal.d.ts +8 -28
- package/lib/decorators/index.d.ts +1 -1
- package/lib/decorators/index.js +1 -1
- package/lib/decorators/initializers.d.ts +2 -5
- package/lib/decorators/initializers.js +19 -18
- package/lib/decorators/nodeName.d.ts +1 -1
- package/lib/decorators/nodeName.js +4 -4
- package/lib/decorators/signal.d.ts +20 -40
- package/lib/decorators/spacingSignal.d.ts +1 -1
- package/lib/decorators/vector2Signal.d.ts +7 -13
- 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 +9 -19
- package/lib/jsx-runtime.js +18 -18
- package/lib/partials/Filter.d.ts +16 -24
- package/lib/partials/Gradient.d.ts +24 -30
- package/lib/partials/Pattern.d.ts +9 -14
- package/lib/partials/ShaderConfig.d.ts +74 -81
- package/lib/partials/index.d.ts +1 -1
- package/lib/partials/index.js +1 -1
- package/lib/partials/types.d.ts +6 -19
- package/lib/scenes/Scene2D.d.ts +23 -42
- package/lib/scenes/index.d.ts +1 -1
- package/lib/scenes/index.js +1 -1
- package/lib/scenes/makeScene2D.d.ts +5 -7
- package/lib/scenes/useScene2D.d.ts +2 -2
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/utils/diff.d.ts +18 -25
- package/lib/utils/diff.js +87 -84
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/is.d.ts +2 -4
- package/lib/utils/is.js +2 -2
- package/lib/utils/makeSignalExtensions.d.ts +4 -11
- package/package.json +5 -5
package/lib/components/Rect.d.ts
CHANGED
|
@@ -1,119 +1,112 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
SerializedVector2,
|
|
5
|
-
SignalValue,
|
|
6
|
-
SimpleSignal,
|
|
7
|
-
SpacingSignal,
|
|
8
|
-
} from '@revideo/core';
|
|
9
|
-
import {DesiredLength} from '../partials';
|
|
10
|
-
import {Curve, CurveProps} from './Curve';
|
|
1
|
+
import { BBox, PossibleSpacing, SerializedVector2, SignalValue, SimpleSignal, SpacingSignal } from '@revideo/core';
|
|
2
|
+
import { DesiredLength } from '../partials';
|
|
3
|
+
import { Curve, CurveProps } from './Curve';
|
|
11
4
|
export interface RectProps extends CurveProps {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
/**
|
|
6
|
+
* {@inheritDoc Rect.radius}
|
|
7
|
+
*/
|
|
8
|
+
radius?: SignalValue<PossibleSpacing>;
|
|
9
|
+
/**
|
|
10
|
+
* {@inheritDoc Rect.smoothCorners}
|
|
11
|
+
*/
|
|
12
|
+
smoothCorners?: SignalValue<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* {@inheritDoc Rect.cornerSharpness}
|
|
15
|
+
*/
|
|
16
|
+
cornerSharpness?: SignalValue<number>;
|
|
24
17
|
}
|
|
25
18
|
export declare class Rect extends Curve {
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Rounds the corners of this rectangle.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* The value represents the radius of the quarter circle that is used to round
|
|
24
|
+
* the corners. If the value is a number, the same radius is used for all
|
|
25
|
+
* corners. Passing an array of two to four numbers will set individual radii
|
|
26
|
+
* for each corner. Individual radii correspond to different corners depending
|
|
27
|
+
* on the number of values passed:
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* // top-left-and-bottom-right | top-right-and-bottom-left
|
|
31
|
+
* [10, 30]
|
|
32
|
+
* // top-left | top-right-and-bottom-left | bottom-right
|
|
33
|
+
* [10, 20, 30]
|
|
34
|
+
* // top-left | top-right | bottom-right | bottom-left
|
|
35
|
+
* [10, 20, 30, 40]
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* One uniform radius:
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Rect
|
|
42
|
+
* size={320}
|
|
43
|
+
* radius={40}
|
|
44
|
+
* fill={'white'}
|
|
45
|
+
* />
|
|
46
|
+
* ```
|
|
47
|
+
* @example
|
|
48
|
+
* Individual radii for each corner:
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <Rect
|
|
51
|
+
* size={320}
|
|
52
|
+
* radius={[10, 20, 30, 40]}
|
|
53
|
+
* fill={'white'}
|
|
54
|
+
* />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
readonly radius: SpacingSignal<this>;
|
|
58
|
+
/**
|
|
59
|
+
* Enables corner smoothing.
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* This property only affects the way rounded corners are drawn. To control
|
|
63
|
+
* the corner radius use the {@link radius} property.
|
|
64
|
+
*
|
|
65
|
+
* When enabled, rounded corners are drawn continuously using Bézier curves
|
|
66
|
+
* rather than quarter circles. The sharpness of the curve can be controlled
|
|
67
|
+
* with {@link cornerSharpness}.
|
|
68
|
+
*
|
|
69
|
+
* You can read more about corner smoothing in
|
|
70
|
+
* [this article by Nick Lawrence](https://uxplanet.org/ui-ux-design-corner-smoothing-720509d1ae48).
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <Rect
|
|
75
|
+
* width={300}
|
|
76
|
+
* height={300}
|
|
77
|
+
* smoothCorners={true}
|
|
78
|
+
* />
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
readonly smoothCorners: SimpleSignal<boolean, this>;
|
|
82
|
+
/**
|
|
83
|
+
* Controls the sharpness of {@link smoothCorners}.
|
|
84
|
+
*
|
|
85
|
+
* @remarks
|
|
86
|
+
* This property only affects the way rounded corners are drawn. To control
|
|
87
|
+
* the corner radius use the {@link radius} property.
|
|
88
|
+
*
|
|
89
|
+
* Requires {@link smoothCorners} to be enabled to have any effect.
|
|
90
|
+
* By default, corner sharpness is set to `0.6` which represents a smooth,
|
|
91
|
+
* circle-like rounding. At `0` the edges are squared off.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* <Rect
|
|
96
|
+
* size={300}
|
|
97
|
+
* smoothCorners={true}
|
|
98
|
+
* cornerSharpness={0.7}
|
|
99
|
+
* />
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
readonly cornerSharpness: SimpleSignal<number, this>;
|
|
103
|
+
constructor(props: RectProps);
|
|
104
|
+
profile(): import("..").CurveProfile;
|
|
105
|
+
protected desiredSize(): SerializedVector2<DesiredLength>;
|
|
106
|
+
protected offsetComputedLayout(box: BBox): BBox;
|
|
107
|
+
protected childrenBBox(): BBox;
|
|
108
|
+
protected getPath(): Path2D;
|
|
109
|
+
protected getCacheBBox(): BBox;
|
|
110
|
+
protected getRipplePath(): Path2D;
|
|
118
111
|
}
|
|
119
|
-
//# sourceMappingURL=Rect.d.ts.map
|
|
112
|
+
//# sourceMappingURL=Rect.d.ts.map
|
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
SignalValue,
|
|
6
|
-
SimpleSignal,
|
|
7
|
-
} from '@revideo/core';
|
|
8
|
-
import {CurveProfile, KnotInfo} from '../curves';
|
|
9
|
-
import {DesiredLength} from '../partials';
|
|
10
|
-
import {Curve, CurveProps} from './Curve';
|
|
1
|
+
import { BBox, PossibleVector2, SerializedVector2, SignalValue, SimpleSignal } from '@revideo/core';
|
|
2
|
+
import { CurveProfile, KnotInfo } from '../curves';
|
|
3
|
+
import { DesiredLength } from '../partials';
|
|
4
|
+
import { Curve, CurveProps } from './Curve';
|
|
11
5
|
export interface SplineProps extends CurveProps {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
/**
|
|
7
|
+
* {@inheritDoc Spline.smoothness}
|
|
8
|
+
*/
|
|
9
|
+
smoothness?: SignalValue<number>;
|
|
10
|
+
/**
|
|
11
|
+
* {@inheritDoc Spline.points}
|
|
12
|
+
*/
|
|
13
|
+
points?: SignalValue<SignalValue<PossibleVector2[]>>;
|
|
20
14
|
}
|
|
21
15
|
/**
|
|
22
16
|
* A node for drawing a smooth line through a number of points.
|
|
@@ -62,32 +56,32 @@ export interface SplineProps extends CurveProps {
|
|
|
62
56
|
* ```
|
|
63
57
|
*/
|
|
64
58
|
export declare class Spline extends Curve {
|
|
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
|
-
|
|
59
|
+
/**
|
|
60
|
+
* The smoothness of the spline when using auto-calculated handles.
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* This property is only applied to knots that don't use explicit handles.
|
|
64
|
+
*
|
|
65
|
+
* @defaultValue 0.4
|
|
66
|
+
*/
|
|
67
|
+
readonly smoothness: SimpleSignal<number>;
|
|
68
|
+
/**
|
|
69
|
+
* The knots of the spline as an array of knots with auto-calculated handles.
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* You can control the smoothness of the resulting curve
|
|
73
|
+
* via the {@link smoothness} property.
|
|
74
|
+
*/
|
|
75
|
+
readonly points: SimpleSignal<SignalValue<PossibleVector2>[] | null, this>;
|
|
76
|
+
constructor(props: SplineProps);
|
|
77
|
+
profile(): CurveProfile;
|
|
78
|
+
knots(): KnotInfo[];
|
|
79
|
+
protected childrenBBox(): BBox;
|
|
80
|
+
protected lineWidthCoefficient(): number;
|
|
81
|
+
protected desiredSize(): SerializedVector2<DesiredLength>;
|
|
82
|
+
protected offsetComputedLayout(box: BBox): BBox;
|
|
83
|
+
private getTightBBox;
|
|
84
|
+
drawOverlay(context: CanvasRenderingContext2D, matrix: DOMMatrix): void;
|
|
85
|
+
private isKnot;
|
|
92
86
|
}
|
|
93
|
-
//# sourceMappingURL=Spline.d.ts.map
|
|
87
|
+
//# sourceMappingURL=Spline.d.ts.map
|
package/lib/components/Txt.d.ts
CHANGED
|
@@ -1,62 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
TimingFunction,
|
|
7
|
-
} from '@revideo/core';
|
|
8
|
-
import {Node} from './Node';
|
|
9
|
-
import {Shape, ShapeProps} from './Shape';
|
|
10
|
-
import {TxtLeaf} from './TxtLeaf';
|
|
11
|
-
import {ComponentChildren} from './types';
|
|
1
|
+
import { InterpolationFunction, SignalValue, SimpleSignal, ThreadGenerator, TimingFunction } from '@revideo/core';
|
|
2
|
+
import { Node } from './Node';
|
|
3
|
+
import { Shape, ShapeProps } from './Shape';
|
|
4
|
+
import { TxtLeaf } from './TxtLeaf';
|
|
5
|
+
import { ComponentChildren } from './types';
|
|
12
6
|
type TxtChildren = string | Node | (string | Node)[];
|
|
13
7
|
type AnyTxt = Txt | TxtLeaf;
|
|
14
8
|
export interface TxtProps extends ShapeProps {
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
children?: TxtChildren;
|
|
10
|
+
text?: SignalValue<string>;
|
|
17
11
|
}
|
|
18
12
|
export declare class Txt extends Shape {
|
|
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
|
-
protected innerText(): string;
|
|
56
|
-
protected parentTxt(): Txt | null;
|
|
57
|
-
protected parseChildren(children: ComponentChildren): AnyTxt[];
|
|
58
|
-
protected applyFlex(): void;
|
|
59
|
-
protected draw(context: CanvasRenderingContext2D): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Create a bold text node.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* This is a shortcut for
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Txt fontWeight={700} />
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param props - Additional text properties.
|
|
23
|
+
*/
|
|
24
|
+
static b(props: TxtProps): Txt;
|
|
25
|
+
/**
|
|
26
|
+
* Create an italic text node.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is a shortcut for
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <Txt fontStyle={'italic'} />
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param props - Additional text properties.
|
|
35
|
+
*/
|
|
36
|
+
static i(props: TxtProps): Txt;
|
|
37
|
+
readonly text: SimpleSignal<string, this>;
|
|
38
|
+
protected getText(): string;
|
|
39
|
+
protected setText(value: SignalValue<string>): void;
|
|
40
|
+
protected setChildren(value: SignalValue<ComponentChildren>): void;
|
|
41
|
+
protected tweenText(value: SignalValue<string>, time: number, timingFunction: TimingFunction, interpolationFunction: InterpolationFunction<string>): ThreadGenerator;
|
|
42
|
+
protected getLayout(): boolean;
|
|
43
|
+
constructor({ children, text, ...props }: TxtProps);
|
|
44
|
+
protected innerText(): string;
|
|
45
|
+
protected parentTxt(): Txt | null;
|
|
46
|
+
protected parseChildren(children: ComponentChildren): AnyTxt[];
|
|
47
|
+
protected applyFlex(): void;
|
|
48
|
+
protected draw(context: CanvasRenderingContext2D): Promise<void>;
|
|
60
49
|
}
|
|
61
50
|
export {};
|
|
62
|
-
//# sourceMappingURL=Txt.d.ts.map
|
|
51
|
+
//# sourceMappingURL=Txt.d.ts.map
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
import {BBox, SignalValue, SimpleSignal} from '@revideo/core';
|
|
2
|
-
import {Shape, ShapeProps} from './Shape';
|
|
3
|
-
import {Txt} from './Txt';
|
|
1
|
+
import { BBox, SignalValue, SimpleSignal } from '@revideo/core';
|
|
2
|
+
import { Shape, ShapeProps } from './Shape';
|
|
3
|
+
import { Txt } from './Txt';
|
|
4
4
|
export interface TxtLeafProps extends ShapeProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
children?: string;
|
|
6
|
+
text?: SignalValue<string>;
|
|
7
7
|
}
|
|
8
8
|
export declare class TxtLeaf extends Shape {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
): Promise<void>;
|
|
20
|
-
protected getCacheBBox(): BBox;
|
|
21
|
-
protected applyFlex(): void;
|
|
22
|
-
protected updateLayout(): void;
|
|
9
|
+
protected static formatter: HTMLDivElement;
|
|
10
|
+
protected static readonly segmenter: any;
|
|
11
|
+
readonly text: SimpleSignal<string, this>;
|
|
12
|
+
constructor({ children, ...rest }: TxtLeafProps);
|
|
13
|
+
protected parentTxt(): Txt | null;
|
|
14
|
+
protected draw(context: CanvasRenderingContext2D): Promise<void>;
|
|
15
|
+
protected drawText(context: CanvasRenderingContext2D, text: string, box: BBox): Promise<void>;
|
|
16
|
+
protected getCacheBBox(): BBox;
|
|
17
|
+
protected applyFlex(): void;
|
|
18
|
+
protected updateLayout(): void;
|
|
23
19
|
}
|
|
24
|
-
//# sourceMappingURL=TxtLeaf.d.ts.map
|
|
20
|
+
//# sourceMappingURL=TxtLeaf.d.ts.map
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {PlaybackState, SimpleSignal} from '@revideo/core';
|
|
2
|
-
import type {Node} from './Node';
|
|
3
|
-
import {Rect, RectProps} from './Rect';
|
|
1
|
+
import { PlaybackState, SimpleSignal } from '@revideo/core';
|
|
2
|
+
import type { Node } from './Node';
|
|
3
|
+
import { Rect, RectProps } from './Rect';
|
|
4
4
|
export interface View2DProps extends RectProps {
|
|
5
|
-
|
|
5
|
+
assetHash: string;
|
|
6
6
|
}
|
|
7
7
|
export declare class View2D extends Rect {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
static shadowRoot: ShadowRoot;
|
|
9
|
+
readonly playbackState: SimpleSignal<PlaybackState, this>;
|
|
10
|
+
readonly globalTime: SimpleSignal<number, this>;
|
|
11
|
+
readonly fps: SimpleSignal<number, this>;
|
|
12
|
+
readonly assetHash: SimpleSignal<string, this>;
|
|
13
|
+
constructor(props: View2DProps);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
render(context: CanvasRenderingContext2D): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Find a node by its key.
|
|
18
|
+
*
|
|
19
|
+
* @param key - The key of the node.
|
|
20
|
+
*/
|
|
21
|
+
findKey<T extends Node = Node>(key: string): T | null;
|
|
22
|
+
protected requestLayoutUpdate(): void;
|
|
23
|
+
protected requestFontUpdate(): void;
|
|
24
|
+
view(): View2D;
|
|
25
25
|
}
|
|
26
|
-
//# sourceMappingURL=View2D.d.ts.map
|
|
26
|
+
//# sourceMappingURL=View2D.d.ts.map
|
|
@@ -1,30 +1,17 @@
|
|
|
1
|
-
import type {ReferenceReceiver} from '@revideo/core';
|
|
2
|
-
import type {Node} from './Node';
|
|
3
|
-
export type ComponentChild =
|
|
4
|
-
| Node
|
|
5
|
-
| object
|
|
6
|
-
| string
|
|
7
|
-
| number
|
|
8
|
-
| bigint
|
|
9
|
-
| boolean
|
|
10
|
-
| null
|
|
11
|
-
| undefined;
|
|
1
|
+
import type { ReferenceReceiver } from '@revideo/core';
|
|
2
|
+
import type { Node } from './Node';
|
|
3
|
+
export type ComponentChild = Node | object | string | number | bigint | boolean | null | undefined;
|
|
12
4
|
export type ComponentChildren = ComponentChild | ComponentChild[];
|
|
13
5
|
export type NodeChildren = Node | Node[];
|
|
14
|
-
export type PropsOf<T> =
|
|
15
|
-
T extends NodeConstructor<infer P>
|
|
16
|
-
? P
|
|
17
|
-
: T extends FunctionComponent<infer P>
|
|
18
|
-
? P
|
|
19
|
-
: never;
|
|
6
|
+
export type PropsOf<T> = T extends NodeConstructor<infer P> ? P : T extends FunctionComponent<infer P> ? P : never;
|
|
20
7
|
export interface JSXProps {
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
children?: ComponentChildren;
|
|
9
|
+
ref?: ReferenceReceiver<Node>;
|
|
23
10
|
}
|
|
24
11
|
export interface FunctionComponent<T = any> {
|
|
25
|
-
|
|
12
|
+
(props: T): Node | null;
|
|
26
13
|
}
|
|
27
14
|
export interface NodeConstructor<TProps = any, TNode = Node> {
|
|
28
|
-
|
|
15
|
+
new (props: TProps): TNode;
|
|
29
16
|
}
|
|
30
|
-
//# sourceMappingURL=types.d.ts.map
|
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,38 +1,26 @@
|
|
|
1
|
-
import {Vector2} from '@revideo/core';
|
|
2
|
-
import {CurvePoint} from './CurvePoint';
|
|
3
|
-
import {Segment} from './Segment';
|
|
1
|
+
import { Vector2 } from '@revideo/core';
|
|
2
|
+
import { CurvePoint } from './CurvePoint';
|
|
3
|
+
import { Segment } from './Segment';
|
|
4
4
|
export declare class ArcSegment extends Segment {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
endPoint: Vector2,
|
|
26
|
-
);
|
|
27
|
-
getAnglePosition(angle: number): Vector2;
|
|
28
|
-
getAngleDerivative(angle: number): Vector2;
|
|
29
|
-
draw(
|
|
30
|
-
context: CanvasRenderingContext2D | Path2D,
|
|
31
|
-
start: number,
|
|
32
|
-
end: number,
|
|
33
|
-
move: boolean,
|
|
34
|
-
): [CurvePoint, CurvePoint];
|
|
35
|
-
getPoint(distance: number): CurvePoint;
|
|
36
|
-
get arcLength(): number;
|
|
5
|
+
readonly startPoint: Vector2;
|
|
6
|
+
readonly radius: Vector2;
|
|
7
|
+
readonly xAxisRotationDegree: number;
|
|
8
|
+
readonly largeArcFlag: number;
|
|
9
|
+
readonly sweepFlag: number;
|
|
10
|
+
readonly endPoint: Vector2;
|
|
11
|
+
private static el;
|
|
12
|
+
readonly center: Vector2;
|
|
13
|
+
readonly startAngle: number;
|
|
14
|
+
readonly deltaAngle: number;
|
|
15
|
+
readonly xAxisRotation: number;
|
|
16
|
+
private xAxisRotationMatrix;
|
|
17
|
+
readonly points: Vector2[];
|
|
18
|
+
private length;
|
|
19
|
+
constructor(startPoint: Vector2, radius: Vector2, xAxisRotationDegree: number, largeArcFlag: number, sweepFlag: number, endPoint: Vector2);
|
|
20
|
+
getAnglePosition(angle: number): Vector2;
|
|
21
|
+
getAngleDerivative(angle: number): Vector2;
|
|
22
|
+
draw(context: CanvasRenderingContext2D | Path2D, start: number, end: number, move: boolean): [CurvePoint, CurvePoint];
|
|
23
|
+
getPoint(distance: number): CurvePoint;
|
|
24
|
+
get arcLength(): number;
|
|
37
25
|
}
|
|
38
|
-
//# sourceMappingURL=ArcSegment.d.ts.map
|
|
26
|
+
//# sourceMappingURL=ArcSegment.d.ts.map
|