@revideo/2d 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/editor/editor/NodeInspectorConfig.d.ts +1 -1
- package/editor/editor/NodeInspectorConfig.d.ts.map +1 -1
- package/editor/editor/PreviewOverlayConfig.d.ts +1 -1
- package/editor/editor/PreviewOverlayConfig.d.ts.map +1 -1
- package/editor/editor/Provider.d.ts +3 -3
- package/editor/editor/Provider.d.ts.map +1 -1
- package/editor/editor/SceneGraphTabConfig.d.ts +1 -1
- package/editor/editor/SceneGraphTabConfig.d.ts.map +1 -1
- package/editor/editor/icons/IconMap.d.ts +1 -1
- package/editor/editor/icons/IconMap.d.ts.map +1 -1
- package/editor/editor/tree/NodeElement.d.ts +1 -1
- package/editor/editor/tree/NodeElement.d.ts.map +1 -1
- package/editor/editor/tree/TreeElement.d.ts +3 -3
- package/editor/editor/tree/TreeElement.d.ts.map +1 -1
- package/editor/editor/tree/TreeRoot.d.ts +1 -1
- package/editor/editor/tree/TreeRoot.d.ts.map +1 -1
- package/editor/editor/tsconfig.build.tsbuildinfo +1 -1
- package/editor/index.js +3 -2
- package/editor/index.js.map +1 -1
- package/lib/code/CodeCursor.d.ts +2 -2
- package/lib/code/CodeCursor.d.ts.map +1 -1
- package/lib/code/CodeCursor.js +2 -2
- package/lib/code/CodeDiffer.d.ts +2 -2
- package/lib/code/CodeDiffer.d.ts.map +1 -1
- package/lib/code/CodeDiffer.js +1 -1
- package/lib/code/CodeFragment.d.ts +1 -1
- package/lib/code/CodeFragment.d.ts.map +1 -1
- package/lib/code/CodeFragment.js +1 -1
- package/lib/code/CodeScope.d.ts +2 -2
- package/lib/code/CodeScope.d.ts.map +1 -1
- package/lib/code/CodeScope.js +1 -1
- package/lib/code/CodeSelection.d.ts +1 -1
- package/lib/code/CodeSelection.d.ts.map +1 -1
- package/lib/code/CodeSelection.js +2 -2
- package/lib/code/CodeSignal.d.ts +5 -4
- package/lib/code/CodeSignal.d.ts.map +1 -1
- package/lib/code/CodeSignal.js +2 -6
- package/lib/code/LezerHighlighter.d.ts +3 -3
- package/lib/code/LezerHighlighter.d.ts.map +1 -1
- package/lib/code/extractRange.d.ts +2 -2
- package/lib/code/extractRange.d.ts.map +1 -1
- package/lib/code/extractRange.js +1 -1
- package/lib/components/Audio.d.ts +2 -1
- package/lib/components/Audio.d.ts.map +1 -1
- package/lib/components/Audio.js +1 -1
- package/lib/components/Bezier.d.ts +5 -4
- package/lib/components/Bezier.d.ts.map +1 -1
- package/lib/components/Bezier.js +4 -3
- package/lib/components/Circle.d.ts +6 -4
- package/lib/components/Circle.d.ts.map +1 -1
- package/lib/components/Circle.js +2 -2
- package/lib/components/Code.d.ts +6 -4
- package/lib/components/Code.d.ts.map +1 -1
- package/lib/components/Code.js +1 -1
- package/lib/components/CodeBlock.d.ts +6 -4
- package/lib/components/CodeBlock.d.ts.map +1 -1
- package/lib/components/CodeBlock.js +2 -2
- package/lib/components/CubicBezier.d.ts +5 -4
- package/lib/components/CubicBezier.d.ts.map +1 -1
- package/lib/components/CubicBezier.js +1 -1
- package/lib/components/Curve.d.ts +8 -6
- package/lib/components/Curve.d.ts.map +1 -1
- package/lib/components/Curve.js +2 -2
- package/lib/components/Grid.d.ts +3 -2
- package/lib/components/Grid.d.ts.map +1 -1
- package/lib/components/Grid.js +2 -2
- package/lib/components/Icon.d.ts +3 -2
- package/lib/components/Icon.d.ts.map +1 -1
- package/lib/components/Icon.js +2 -2
- package/lib/components/Img.d.ts +5 -3
- package/lib/components/Img.d.ts.map +1 -1
- package/lib/components/Img.js +1 -1
- package/lib/components/Knot.d.ts +4 -3
- package/lib/components/Knot.d.ts.map +1 -1
- package/lib/components/Knot.js +4 -4
- package/lib/components/Latex.d.ts +4 -3
- package/lib/components/Latex.d.ts.map +1 -1
- package/lib/components/Latex.js +2 -2
- package/lib/components/Layout.d.ts +6 -4
- package/lib/components/Layout.d.ts.map +1 -1
- package/lib/components/Layout.js +11 -10
- package/lib/components/Line.d.ts +5 -3
- package/lib/components/Line.d.ts.map +1 -1
- package/lib/components/Line.js +6 -4
- package/lib/components/Media.d.ts +3 -2
- package/lib/components/Media.d.ts.map +1 -1
- package/lib/components/Media.js +1 -1
- package/lib/components/Node.d.ts +7 -6
- package/lib/components/Node.d.ts.map +1 -1
- package/lib/components/Node.js +10 -10
- package/lib/components/Path.d.ts +5 -3
- package/lib/components/Path.d.ts.map +1 -1
- package/lib/components/Path.js +4 -3
- package/lib/components/Polygon.d.ts +6 -4
- package/lib/components/Polygon.d.ts.map +1 -1
- package/lib/components/Polygon.js +2 -2
- package/lib/components/QuadBezier.d.ts +5 -4
- package/lib/components/QuadBezier.d.ts.map +1 -1
- package/lib/components/QuadBezier.js +1 -1
- package/lib/components/Ray.d.ts +5 -3
- package/lib/components/Ray.d.ts.map +1 -1
- package/lib/components/Ray.js +6 -5
- package/lib/components/Rect.d.ts +5 -3
- package/lib/components/Rect.d.ts.map +1 -1
- package/lib/components/Rect.js +2 -2
- package/lib/components/Rive.d.ts +3 -2
- package/lib/components/Rive.d.ts.map +1 -1
- package/lib/components/Rive.js +1 -1
- package/lib/components/SVG.d.ts +7 -4
- package/lib/components/SVG.d.ts.map +1 -1
- package/lib/components/SVG.js +1 -1
- package/lib/components/Shape.d.ts +5 -4
- package/lib/components/Shape.d.ts.map +1 -1
- package/lib/components/Shape.js +2 -2
- package/lib/components/Spline.d.ts +6 -4
- package/lib/components/Spline.d.ts.map +1 -1
- package/lib/components/Spline.js +5 -4
- package/lib/components/Txt.d.ts +7 -5
- package/lib/components/Txt.d.ts.map +1 -1
- package/lib/components/Txt.js +6 -3
- package/lib/components/TxtLeaf.d.ts +6 -4
- package/lib/components/TxtLeaf.d.ts.map +1 -1
- package/lib/components/TxtLeaf.js +19 -4
- package/lib/components/Video.d.ts +4 -3
- package/lib/components/Video.d.ts.map +1 -1
- package/lib/components/Video.js +4 -3
- package/lib/components/View2D.d.ts +4 -2
- package/lib/components/View2D.d.ts.map +1 -1
- package/lib/components/View2D.js +1 -1
- package/lib/curves/ArcSegment.d.ts +1 -1
- package/lib/curves/ArcSegment.d.ts.map +1 -1
- package/lib/curves/ArcSegment.js +10 -14
- package/lib/curves/CircleSegment.d.ts +1 -1
- package/lib/curves/CircleSegment.d.ts.map +1 -1
- package/lib/curves/CurveDrawingInfo.d.ts +1 -1
- package/lib/curves/CurveDrawingInfo.d.ts.map +1 -1
- package/lib/curves/CurveProfile.d.ts +1 -1
- package/lib/curves/CurveProfile.d.ts.map +1 -1
- package/lib/curves/KnotInfo.d.ts +1 -1
- package/lib/curves/KnotInfo.d.ts.map +1 -1
- package/lib/curves/LineSegment.d.ts +2 -2
- package/lib/curves/LineSegment.d.ts.map +1 -1
- package/lib/curves/PolynomialSegment.d.ts +3 -3
- package/lib/curves/PolynomialSegment.d.ts.map +1 -1
- package/lib/curves/PolynomialSegment.js +3 -2
- package/lib/curves/Segment.d.ts +2 -2
- package/lib/curves/Segment.d.ts.map +1 -1
- package/lib/curves/UniformPolynomialCurveSampler.d.ts +2 -2
- package/lib/curves/UniformPolynomialCurveSampler.d.ts.map +1 -1
- package/lib/curves/UniformPolynomialCurveSampler.js +1 -1
- package/lib/curves/createCurveProfileLerp.d.ts +1 -1
- package/lib/curves/createCurveProfileLerp.d.ts.map +1 -1
- package/lib/curves/getBezierSplineProfile.d.ts +2 -2
- package/lib/curves/getBezierSplineProfile.d.ts.map +1 -1
- package/lib/curves/getCircleProfile.d.ts +1 -1
- package/lib/curves/getCircleProfile.d.ts.map +1 -1
- package/lib/curves/getPathProfile.d.ts +1 -1
- package/lib/curves/getPathProfile.d.ts.map +1 -1
- package/lib/curves/getPathProfile.js +1 -1
- package/lib/curves/getPointAtDistance.d.ts +2 -2
- package/lib/curves/getPointAtDistance.d.ts.map +1 -1
- package/lib/curves/getPolylineProfile.d.ts +2 -2
- package/lib/curves/getPolylineProfile.d.ts.map +1 -1
- package/lib/curves/getPolylineProfile.js +1 -1
- package/lib/curves/getRectProfile.d.ts +2 -2
- package/lib/curves/getRectProfile.d.ts.map +1 -1
- package/lib/curves/getRectProfile.js +1 -1
- package/lib/decorators/canvasStyleSignal.d.ts +1 -1
- package/lib/decorators/canvasStyleSignal.d.ts.map +1 -1
- package/lib/decorators/canvasStyleSignal.js +1 -1
- package/lib/decorators/filtersSignal.d.ts +4 -2
- package/lib/decorators/filtersSignal.d.ts.map +1 -1
- package/lib/decorators/filtersSignal.js +1 -1
- package/lib/decorators/signal.d.ts +1 -1
- package/lib/decorators/signal.d.ts.map +1 -1
- package/lib/decorators/signal.js +2 -2
- package/lib/decorators/vector2Signal.d.ts +2 -1
- package/lib/decorators/vector2Signal.d.ts.map +1 -1
- package/lib/decorators/vector2Signal.js +1 -1
- package/lib/jsx-runtime.d.ts +1 -1
- package/lib/jsx-runtime.d.ts.map +1 -1
- package/lib/jsx-runtime.js +2 -2
- package/lib/partials/Filter.d.ts +1 -1
- package/lib/partials/Filter.d.ts.map +1 -1
- package/lib/partials/Filter.js +2 -2
- package/lib/partials/Gradient.d.ts +1 -1
- package/lib/partials/Gradient.d.ts.map +1 -1
- package/lib/partials/Gradient.js +2 -2
- package/lib/partials/Pattern.d.ts +1 -1
- package/lib/partials/Pattern.d.ts.map +1 -1
- package/lib/partials/ShaderConfig.d.ts +2 -2
- package/lib/partials/ShaderConfig.d.ts.map +1 -1
- package/lib/partials/ShaderConfig.js +2 -2
- package/lib/partials/types.d.ts +1 -1
- package/lib/partials/types.d.ts.map +1 -1
- package/lib/scenes/Scene2D.d.ts +4 -2
- package/lib/scenes/Scene2D.d.ts.map +1 -1
- package/lib/scenes/Scene2D.js +3 -3
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/utils/CanvasUtils.d.ts +5 -3
- package/lib/utils/CanvasUtils.d.ts.map +1 -1
- package/lib/utils/CanvasUtils.js +1 -1
- package/lib/utils/makeSignalExtensions.d.ts +2 -2
- package/lib/utils/makeSignalExtensions.d.ts.map +1 -1
- package/lib/utils/makeSignalExtensions.js +1 -1
- package/lib/utils/video/parser/parser.d.ts.map +1 -1
- package/lib/utils/video/parser/parser.js +1 -1
- package/lib/utils/video/parser/sampler.d.ts +1 -1
- package/lib/utils/video/parser/sampler.d.ts.map +1 -1
- package/lib/utils/video/parser/segment.d.ts +1 -1
- package/lib/utils/video/parser/segment.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/editor/NodeInspectorConfig.tsx +1 -1
- package/src/editor/PreviewOverlayConfig.tsx +6 -5
- package/src/editor/Provider.tsx +5 -9
- package/src/editor/SceneGraphTabConfig.tsx +1 -2
- package/src/editor/icons/IconMap.ts +1 -1
- package/src/editor/tree/NodeElement.tsx +2 -1
- package/src/editor/tree/TreeElement.tsx +3 -3
- package/src/editor/tree/TreeRoot.tsx +1 -1
- package/src/lib/code/CodeCursor.ts +10 -14
- package/src/lib/code/CodeDiffer.ts +3 -2
- package/src/lib/code/CodeFragment.ts +2 -1
- package/src/lib/code/CodeScope.ts +3 -2
- package/src/lib/code/CodeSelection.ts +2 -6
- package/src/lib/code/CodeSignal.ts +10 -18
- package/src/lib/code/LezerHighlighter.ts +3 -3
- package/src/lib/code/extractRange.ts +3 -2
- package/src/lib/components/Audio.ts +2 -1
- package/src/lib/components/Bezier.ts +7 -5
- package/src/lib/components/Circle.ts +7 -10
- package/src/lib/components/Code.ts +17 -12
- package/src/lib/components/CodeBlock.ts +8 -13
- package/src/lib/components/CubicBezier.ts +5 -4
- package/src/lib/components/Curve.ts +8 -8
- package/src/lib/components/Grid.ts +4 -3
- package/src/lib/components/Icon.ts +4 -3
- package/src/lib/components/Img.ts +9 -6
- package/src/lib/components/Knot.ts +7 -6
- package/src/lib/components/Latex.ts +5 -8
- package/src/lib/components/Layout.ts +28 -18
- package/src/lib/components/Line.ts +16 -9
- package/src/lib/components/Media.ts +3 -3
- package/src/lib/components/Node.ts +23 -15
- package/src/lib/components/Path.ts +12 -7
- package/src/lib/components/Polygon.ts +7 -10
- package/src/lib/components/QuadBezier.ts +5 -4
- package/src/lib/components/Ray.ts +10 -6
- package/src/lib/components/Rect.ts +5 -4
- package/src/lib/components/Rive.ts +6 -3
- package/src/lib/components/SVG.ts +20 -11
- package/src/lib/components/Shape.ts +6 -9
- package/src/lib/components/Spline.ts +14 -13
- package/src/lib/components/Txt.ts +9 -9
- package/src/lib/components/TxtLeaf.ts +24 -11
- package/src/lib/components/Video.ts +7 -11
- package/src/lib/components/View2D.ts +4 -2
- package/src/lib/components/__tests__/generatorTest.ts +3 -2
- package/src/lib/components/__tests__/mockScene2D.ts +2 -3
- package/src/lib/curves/ArcSegment.ts +25 -15
- package/src/lib/curves/CircleSegment.ts +1 -1
- package/src/lib/curves/CurveDrawingInfo.ts +1 -1
- package/src/lib/curves/CurveProfile.ts +1 -1
- package/src/lib/curves/KnotInfo.ts +1 -1
- package/src/lib/curves/LineSegment.ts +2 -2
- package/src/lib/curves/PolynomialSegment.ts +4 -4
- package/src/lib/curves/Segment.ts +2 -2
- package/src/lib/curves/UniformPolynomialCurveSampler.ts +4 -3
- package/src/lib/curves/createCurveProfileLerp.ts +1 -1
- package/src/lib/curves/getBezierSplineProfile.ts +3 -3
- package/src/lib/curves/getCircleProfile.ts +2 -2
- package/src/lib/curves/getPathProfile.ts +4 -3
- package/src/lib/curves/getPointAtDistance.ts +2 -2
- package/src/lib/curves/getPolylineProfile.ts +3 -2
- package/src/lib/curves/getRectProfile.ts +4 -3
- package/src/lib/decorators/canvasStyleSignal.ts +2 -1
- package/src/lib/decorators/defaultStyle.ts +1 -1
- package/src/lib/decorators/filtersSignal.ts +6 -3
- package/src/lib/decorators/signal.test.ts +2 -1
- package/src/lib/decorators/signal.ts +2 -5
- package/src/lib/decorators/vector2Signal.ts +2 -1
- package/src/lib/jsx-runtime.ts +2 -1
- package/src/lib/partials/Filter.ts +2 -7
- package/src/lib/partials/Gradient.ts +2 -3
- package/src/lib/partials/Pattern.ts +1 -1
- package/src/lib/partials/ShaderConfig.ts +3 -8
- package/src/lib/partials/types.ts +1 -1
- package/src/lib/scenes/Scene2D.ts +10 -5
- package/src/lib/utils/CanvasUtils.ts +4 -2
- package/src/lib/utils/makeSignalExtensions.ts +3 -2
- package/src/lib/utils/video/parser/parser.ts +2 -1
- package/src/lib/utils/video/parser/sampler.ts +1 -1
- package/src/lib/utils/video/parser/segment.ts +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
BBox,
|
|
3
3
|
SerializedVector2,
|
|
4
4
|
SignalValue,
|
|
5
5
|
SimpleSignal,
|
|
6
|
-
Vector2,
|
|
7
|
-
clamp,
|
|
8
6
|
} from '@revideo/core';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import {Vector2, clamp} from '@revideo/core';
|
|
8
|
+
import type {CurveDrawingInfo} from '../curves/CurveDrawingInfo';
|
|
9
|
+
import type {CurvePoint} from '../curves/CurvePoint';
|
|
10
|
+
import type {CurveProfile} from '../curves/CurveProfile';
|
|
12
11
|
import {getPointAtDistance} from '../curves/getPointAtDistance';
|
|
13
12
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
14
|
-
import {DesiredLength} from '../partials';
|
|
13
|
+
import type {DesiredLength} from '../partials';
|
|
15
14
|
import {lineTo, moveTo, resolveCanvasStyle} from '../utils';
|
|
16
|
-
import {
|
|
15
|
+
import type {ShapeProps} from './Shape';
|
|
16
|
+
import {Shape} from './Shape';
|
|
17
17
|
|
|
18
18
|
export interface CurveProps extends ShapeProps {
|
|
19
19
|
/**
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
PossibleVector2,
|
|
3
3
|
SignalValue,
|
|
4
4
|
SimpleSignal,
|
|
5
5
|
Vector2Signal,
|
|
6
|
-
map,
|
|
7
6
|
} from '@revideo/core';
|
|
7
|
+
import {map} from '@revideo/core';
|
|
8
8
|
import {initial, nodeName, signal, vector2Signal} from '../decorators';
|
|
9
|
-
import {
|
|
9
|
+
import type {ShapeProps} from './Shape';
|
|
10
|
+
import {Shape} from './Shape';
|
|
10
11
|
|
|
11
12
|
export interface GridProps extends ShapeProps {
|
|
12
13
|
/**
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
ColorSignal,
|
|
3
3
|
PossibleColor,
|
|
4
4
|
SignalValue,
|
|
5
5
|
SimpleSignal,
|
|
6
|
-
useLogger,
|
|
7
6
|
} from '@revideo/core';
|
|
7
|
+
import {useLogger} from '@revideo/core';
|
|
8
8
|
import {colorSignal, computed, initial, signal} from '../decorators';
|
|
9
|
-
import {
|
|
9
|
+
import type {ImgProps} from './Img';
|
|
10
|
+
import {Img} from './Img';
|
|
10
11
|
|
|
11
12
|
export interface IconProps extends ImgProps {
|
|
12
13
|
/**
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
PossibleVector2,
|
|
3
|
+
SerializedVector2,
|
|
4
|
+
SignalValue,
|
|
5
|
+
SimpleSignal,
|
|
6
|
+
} from '@revideo/core';
|
|
1
7
|
import {
|
|
2
8
|
BBox,
|
|
3
9
|
Color,
|
|
4
10
|
DependencyContext,
|
|
5
11
|
DetailedError,
|
|
6
|
-
PossibleVector2,
|
|
7
|
-
SerializedVector2,
|
|
8
|
-
SignalValue,
|
|
9
|
-
SimpleSignal,
|
|
10
12
|
Vector2,
|
|
11
13
|
useLogger,
|
|
12
14
|
} from '@revideo/core';
|
|
13
15
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
14
|
-
import {DesiredLength} from '../partials';
|
|
16
|
+
import type {DesiredLength} from '../partials';
|
|
15
17
|
import {drawImage} from '../utils';
|
|
16
|
-
import {
|
|
18
|
+
import type {RectProps} from './Rect';
|
|
19
|
+
import {Rect} from './Rect';
|
|
17
20
|
|
|
18
21
|
const imageWithoutSource = `
|
|
19
22
|
The image won't be visible unless you specify a source:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
PossibleVector2,
|
|
3
3
|
Signal,
|
|
4
4
|
SignalValue,
|
|
5
|
-
Vector2,
|
|
6
5
|
Vector2Signal,
|
|
7
6
|
} from '@revideo/core';
|
|
8
|
-
import {
|
|
7
|
+
import {transformVectorAsPoint, Vector2} from '@revideo/core';
|
|
8
|
+
import type {KnotInfo} from '../curves';
|
|
9
9
|
import {
|
|
10
10
|
cloneable,
|
|
11
11
|
compound,
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
signal,
|
|
16
16
|
wrapper,
|
|
17
17
|
} from '../decorators';
|
|
18
|
-
import {
|
|
18
|
+
import type {NodeProps} from './Node';
|
|
19
|
+
import {Node} from './Node';
|
|
19
20
|
|
|
20
21
|
export interface KnotProps extends NodeProps {
|
|
21
22
|
/**
|
|
@@ -140,8 +141,8 @@ export class Knot extends Node {
|
|
|
140
141
|
|
|
141
142
|
return {
|
|
142
143
|
position: this.position(),
|
|
143
|
-
startHandle: startHandle
|
|
144
|
-
endHandle: endHandle
|
|
144
|
+
startHandle: transformVectorAsPoint(startHandle, this.localToParent()),
|
|
145
|
+
endHandle: transformVectorAsPoint(endHandle, this.localToParent()),
|
|
145
146
|
auto: {start: this.startHandleAuto(), end: this.endHandleAuto()},
|
|
146
147
|
};
|
|
147
148
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
SignalValue,
|
|
4
|
-
SimpleSignal,
|
|
5
|
-
useLogger,
|
|
6
|
-
} from '@revideo/core';
|
|
1
|
+
import type {SignalValue, SimpleSignal} from '@revideo/core';
|
|
2
|
+
import {DependencyContext, useLogger} from '@revideo/core';
|
|
7
3
|
import {liteAdaptor} from 'mathjax-full/js/adaptors/liteAdaptor';
|
|
8
4
|
import {RegisterHTMLHandler} from 'mathjax-full/js/handlers/html';
|
|
9
5
|
import {TeX} from 'mathjax-full/js/input/tex';
|
|
10
6
|
import {AllPackages} from 'mathjax-full/js/input/tex/AllPackages';
|
|
11
7
|
import {mathjax} from 'mathjax-full/js/mathjax';
|
|
12
8
|
import {SVG} from 'mathjax-full/js/output/svg';
|
|
13
|
-
import {OptionList} from 'mathjax-full/js/util/Options';
|
|
9
|
+
import type {OptionList} from 'mathjax-full/js/util/Options';
|
|
14
10
|
import {initial, signal} from '../decorators';
|
|
15
|
-
import {
|
|
11
|
+
import type {ImgProps} from './Img';
|
|
12
|
+
import {Img} from './Img';
|
|
16
13
|
|
|
17
14
|
const Adaptor = liteAdaptor();
|
|
18
15
|
RegisterHTMLHandler(Adaptor);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BBox,
|
|
3
|
-
DependencyContext,
|
|
1
|
+
import type {
|
|
4
2
|
InterpolationFunction,
|
|
5
|
-
Origin,
|
|
6
3
|
PossibleSpacing,
|
|
7
4
|
PossibleVector2,
|
|
8
5
|
SerializedVector2,
|
|
@@ -13,16 +10,23 @@ import {
|
|
|
13
10
|
SpacingSignal,
|
|
14
11
|
ThreadGenerator,
|
|
15
12
|
TimingFunction,
|
|
16
|
-
Vector2,
|
|
17
13
|
Vector2Signal,
|
|
14
|
+
} from '@revideo/core';
|
|
15
|
+
import {
|
|
16
|
+
BBox,
|
|
17
|
+
DependencyContext,
|
|
18
|
+
Origin,
|
|
19
|
+
Vector2,
|
|
18
20
|
boolLerp,
|
|
19
21
|
modify,
|
|
20
22
|
originToOffset,
|
|
21
23
|
threadable,
|
|
24
|
+
transformVector,
|
|
25
|
+
transformVectorAsPoint,
|
|
22
26
|
tween,
|
|
23
27
|
} from '@revideo/core';
|
|
28
|
+
import type {Vector2LengthSignal} from '../decorators';
|
|
24
29
|
import {
|
|
25
|
-
Vector2LengthSignal,
|
|
26
30
|
addInitializer,
|
|
27
31
|
cloneable,
|
|
28
32
|
computed,
|
|
@@ -35,7 +39,7 @@ import {
|
|
|
35
39
|
vector2Signal,
|
|
36
40
|
} from '../decorators';
|
|
37
41
|
import {spacingSignal} from '../decorators/spacingSignal';
|
|
38
|
-
import {
|
|
42
|
+
import type {
|
|
39
43
|
DesiredLength,
|
|
40
44
|
FlexBasis,
|
|
41
45
|
FlexContent,
|
|
@@ -48,7 +52,8 @@ import {
|
|
|
48
52
|
TextWrap,
|
|
49
53
|
} from '../partials';
|
|
50
54
|
import {drawLine, drawPivot, is} from '../utils';
|
|
51
|
-
import {
|
|
55
|
+
import type {NodeProps} from './Node';
|
|
56
|
+
import {Node} from './Node';
|
|
52
57
|
|
|
53
58
|
export interface LayoutProps extends NodeProps {
|
|
54
59
|
layout?: LayoutMode;
|
|
@@ -843,7 +848,8 @@ export class Layout extends Node {
|
|
|
843
848
|
matrix: DOMMatrix,
|
|
844
849
|
) {
|
|
845
850
|
const size = this.computedSize();
|
|
846
|
-
const
|
|
851
|
+
const offsetVector = size.mul(this.offset()).scale(0.5);
|
|
852
|
+
const offset = transformVectorAsPoint(offsetVector, matrix);
|
|
847
853
|
const box = BBox.fromSizeCentered(size);
|
|
848
854
|
const layout = box.transformCorners(matrix);
|
|
849
855
|
const padding = box
|
|
@@ -1038,7 +1044,10 @@ export class Layout extends Node {
|
|
|
1038
1044
|
}
|
|
1039
1045
|
|
|
1040
1046
|
public override hit(position: Vector2): Node | null {
|
|
1041
|
-
const local =
|
|
1047
|
+
const local = transformVectorAsPoint(
|
|
1048
|
+
position,
|
|
1049
|
+
this.localToParent().inverse(),
|
|
1050
|
+
);
|
|
1042
1051
|
if (this.cacheBBox().includes(local)) {
|
|
1043
1052
|
return super.hit(position) ?? this;
|
|
1044
1053
|
}
|
|
@@ -1054,20 +1063,21 @@ function originSignal(origin: Origin): PropertyDecorator {
|
|
|
1054
1063
|
const meta = getPropertyMeta<any>(target, key);
|
|
1055
1064
|
meta!.parser = value => new Vector2(value);
|
|
1056
1065
|
meta!.getter = function (this: Layout) {
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
.transformAsPoint(this.localToParent());
|
|
1066
|
+
const originOffset = this.computedSize().getOriginOffset(origin);
|
|
1067
|
+
return transformVectorAsPoint(originOffset, this.localToParent());
|
|
1060
1068
|
};
|
|
1061
1069
|
meta!.setter = function (
|
|
1062
1070
|
this: Layout,
|
|
1063
1071
|
value: SignalValue<PossibleVector2>,
|
|
1064
1072
|
) {
|
|
1065
1073
|
this.position(
|
|
1066
|
-
modify(value, unwrapped =>
|
|
1067
|
-
this.getOriginDelta(origin)
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1074
|
+
modify(value, unwrapped => {
|
|
1075
|
+
const originDelta = this.getOriginDelta(origin);
|
|
1076
|
+
return transformVector(
|
|
1077
|
+
originDelta,
|
|
1078
|
+
this.scalingRotationMatrix(),
|
|
1079
|
+
).flipped.add(unwrapped);
|
|
1080
|
+
}),
|
|
1071
1081
|
);
|
|
1072
1082
|
return this;
|
|
1073
1083
|
};
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BBox,
|
|
3
|
-
createSignal,
|
|
1
|
+
import type {
|
|
4
2
|
PossibleVector2,
|
|
5
3
|
SignalValue,
|
|
6
4
|
SimpleSignal,
|
|
7
|
-
threadable,
|
|
8
5
|
ThreadGenerator,
|
|
9
6
|
TimingFunction,
|
|
7
|
+
} from '@revideo/core';
|
|
8
|
+
import {
|
|
9
|
+
BBox,
|
|
10
|
+
createSignal,
|
|
11
|
+
threadable,
|
|
12
|
+
transformVectorAsPoint,
|
|
10
13
|
tween,
|
|
11
14
|
unwrap,
|
|
12
15
|
useLogger,
|
|
13
16
|
Vector2,
|
|
14
17
|
} from '@revideo/core';
|
|
15
|
-
import {CurveProfile
|
|
18
|
+
import type {CurveProfile} from '../curves';
|
|
19
|
+
import {getPolylineProfile} from '../curves';
|
|
16
20
|
import {
|
|
17
21
|
calculateLerpDistance,
|
|
18
22
|
polygonLength,
|
|
@@ -20,7 +24,8 @@ import {
|
|
|
20
24
|
} from '../curves/createCurveProfileLerp';
|
|
21
25
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
22
26
|
import {arc, drawLine, drawPivot, lineTo, moveTo} from '../utils';
|
|
23
|
-
import {
|
|
27
|
+
import type {CurveProps} from './Curve';
|
|
28
|
+
import {Curve} from './Curve';
|
|
24
29
|
import {Layout} from './Layout';
|
|
25
30
|
|
|
26
31
|
const lineWithoutPoints = `
|
|
@@ -379,15 +384,17 @@ export class Line extends Curve {
|
|
|
379
384
|
) {
|
|
380
385
|
const box = this.childrenBBox().transformCorners(matrix);
|
|
381
386
|
const size = this.computedSize();
|
|
382
|
-
const
|
|
387
|
+
const offsetVector = size.mul(this.offset()).scale(0.5);
|
|
388
|
+
const offset = transformVectorAsPoint(offsetVector, matrix);
|
|
383
389
|
|
|
384
390
|
context.fillStyle = 'white';
|
|
385
391
|
context.strokeStyle = 'black';
|
|
386
392
|
context.lineWidth = 1;
|
|
387
393
|
|
|
388
394
|
const path = new Path2D();
|
|
389
|
-
const
|
|
390
|
-
|
|
395
|
+
const pointsPreTransformation = this.tweenedPoints() ?? this.parsedPoints();
|
|
396
|
+
const points = pointsPreTransformation.map(p =>
|
|
397
|
+
transformVectorAsPoint(p, matrix),
|
|
391
398
|
);
|
|
392
399
|
if (points.length > 0) {
|
|
393
400
|
moveTo(path, points[0]);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import type {SignalValue, SimpleSignal} from '@revideo/core';
|
|
1
2
|
import {
|
|
2
3
|
DependencyContext,
|
|
3
4
|
PlaybackState,
|
|
4
|
-
SignalValue,
|
|
5
|
-
SimpleSignal,
|
|
6
5
|
clamp,
|
|
7
6
|
isReactive,
|
|
8
7
|
useLogger,
|
|
9
8
|
useThread,
|
|
10
9
|
} from '@revideo/core';
|
|
11
10
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
12
|
-
import {
|
|
11
|
+
import type {RectProps} from './Rect';
|
|
12
|
+
import {Rect} from './Rect';
|
|
13
13
|
|
|
14
14
|
export interface MediaProps extends RectProps {
|
|
15
15
|
src?: SignalValue<string>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BBox,
|
|
1
|
+
import type {
|
|
3
2
|
ColorSignal,
|
|
4
|
-
DependencyContext,
|
|
5
3
|
PossibleColor,
|
|
6
4
|
PossibleSpacing,
|
|
7
5
|
PossibleVector2,
|
|
@@ -14,11 +12,15 @@ import {
|
|
|
14
12
|
SpacingSignal,
|
|
15
13
|
ThreadGenerator,
|
|
16
14
|
TimingFunction,
|
|
15
|
+
Vector2Signal,
|
|
16
|
+
} from '@revideo/core';
|
|
17
|
+
import {
|
|
18
|
+
BBox,
|
|
19
|
+
DependencyContext,
|
|
17
20
|
UNIFORM_DESTINATION_MATRIX,
|
|
18
21
|
UNIFORM_SOURCE_MATRIX,
|
|
19
22
|
UNIFORM_TIME,
|
|
20
23
|
Vector2,
|
|
21
|
-
Vector2Signal,
|
|
22
24
|
all,
|
|
23
25
|
clamp,
|
|
24
26
|
createSignal,
|
|
@@ -28,6 +30,8 @@ import {
|
|
|
28
30
|
threadable,
|
|
29
31
|
transformAngle,
|
|
30
32
|
transformScalar,
|
|
33
|
+
transformVector,
|
|
34
|
+
transformVectorAsPoint,
|
|
31
35
|
unwrap,
|
|
32
36
|
useLogger,
|
|
33
37
|
} from '@revideo/core';
|
|
@@ -46,14 +50,15 @@ import {
|
|
|
46
50
|
vector2Signal,
|
|
47
51
|
wrapper,
|
|
48
52
|
} from '../decorators';
|
|
49
|
-
import {FiltersSignal
|
|
53
|
+
import type {FiltersSignal} from '../decorators/filtersSignal';
|
|
54
|
+
import {filtersSignal} from '../decorators/filtersSignal';
|
|
50
55
|
import {spacingSignal} from '../decorators/spacingSignal';
|
|
51
|
-
import {Filter} from '../partials';
|
|
52
|
-
import {
|
|
56
|
+
import type {Filter} from '../partials';
|
|
57
|
+
import type {
|
|
53
58
|
PossibleShaderConfig,
|
|
54
59
|
ShaderConfig,
|
|
55
|
-
parseShader,
|
|
56
60
|
} from '../partials/ShaderConfig';
|
|
61
|
+
import {parseShader} from '../partials/ShaderConfig';
|
|
57
62
|
import {useScene2D} from '../scenes/useScene2D';
|
|
58
63
|
import {drawLine} from '../utils';
|
|
59
64
|
import type {View2D} from './View2D';
|
|
@@ -198,7 +203,7 @@ export class Node implements Promisable<Node> {
|
|
|
198
203
|
protected setAbsolutePosition(value: SignalValue<PossibleVector2>) {
|
|
199
204
|
this.position(
|
|
200
205
|
modify(value, unwrapped =>
|
|
201
|
-
new Vector2(unwrapped)
|
|
206
|
+
transformVectorAsPoint(new Vector2(unwrapped), this.worldToParent()),
|
|
202
207
|
),
|
|
203
208
|
);
|
|
204
209
|
}
|
|
@@ -557,7 +562,7 @@ export class Node implements Promisable<Node> {
|
|
|
557
562
|
* of the node:
|
|
558
563
|
* ```ts
|
|
559
564
|
* const local = new Vector2(0, 200);
|
|
560
|
-
* const world = local
|
|
565
|
+
* const world = transformVectorAsPoint(local, node.localToWorld());
|
|
561
566
|
* ```
|
|
562
567
|
*/
|
|
563
568
|
@computed()
|
|
@@ -580,7 +585,7 @@ export class Node implements Promisable<Node> {
|
|
|
580
585
|
* top-left corner of the screen:
|
|
581
586
|
* ```ts
|
|
582
587
|
* const world = new Vector2(0, 0);
|
|
583
|
-
* const local = world
|
|
588
|
+
* const local = transformVectorAsPoint(world, node.worldToLocal());
|
|
584
589
|
* ```
|
|
585
590
|
*/
|
|
586
591
|
@computed()
|
|
@@ -1404,7 +1409,7 @@ export class Node implements Promisable<Node> {
|
|
|
1404
1409
|
const childCache = child.fullCacheBBox();
|
|
1405
1410
|
const childMatrix = child.localToParent();
|
|
1406
1411
|
points.push(
|
|
1407
|
-
...childCache.corners.map(r => r
|
|
1412
|
+
...childCache.corners.map(r => transformVectorAsPoint(r, childMatrix)),
|
|
1408
1413
|
);
|
|
1409
1414
|
}
|
|
1410
1415
|
|
|
@@ -1422,7 +1427,7 @@ export class Node implements Promisable<Node> {
|
|
|
1422
1427
|
@computed()
|
|
1423
1428
|
protected fullCacheBBox(): BBox {
|
|
1424
1429
|
const matrix = this.compositeToLocal();
|
|
1425
|
-
const shadowOffset = this.shadowOffset()
|
|
1430
|
+
const shadowOffset = transformVector(this.shadowOffset(), matrix);
|
|
1426
1431
|
const shadowBlur = transformScalar(this.shadowBlur(), matrix);
|
|
1427
1432
|
|
|
1428
1433
|
const result = this.cacheBBox().expand(
|
|
@@ -1496,7 +1501,7 @@ export class Node implements Promisable<Node> {
|
|
|
1496
1501
|
}
|
|
1497
1502
|
if (this.hasShadow()) {
|
|
1498
1503
|
const matrix = this.compositeToWorld();
|
|
1499
|
-
const offset = this.shadowOffset()
|
|
1504
|
+
const offset = transformVector(this.shadowOffset(), matrix);
|
|
1500
1505
|
const blur = transformScalar(this.shadowBlur(), matrix);
|
|
1501
1506
|
|
|
1502
1507
|
context.shadowColor = this.shadowColor().serialize();
|
|
@@ -1731,7 +1736,10 @@ export class Node implements Promisable<Node> {
|
|
|
1731
1736
|
*/
|
|
1732
1737
|
public hit(position: Vector2): Node | null {
|
|
1733
1738
|
let hit: Node | null = null;
|
|
1734
|
-
const local =
|
|
1739
|
+
const local = transformVectorAsPoint(
|
|
1740
|
+
position,
|
|
1741
|
+
this.localToParent().inverse(),
|
|
1742
|
+
);
|
|
1735
1743
|
const children = this.children();
|
|
1736
1744
|
for (let i = children.length - 1; i >= 0; i--) {
|
|
1737
1745
|
hit = children[i].hit(local);
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
SignalValue,
|
|
3
|
+
SimpleSignal,
|
|
4
|
+
TimingFunction,
|
|
5
|
+
Vector2,
|
|
6
|
+
} from '@revideo/core';
|
|
1
7
|
import {
|
|
2
8
|
BBox,
|
|
3
9
|
createSignal,
|
|
4
10
|
isReactive,
|
|
5
|
-
SignalValue,
|
|
6
|
-
SimpleSignal,
|
|
7
11
|
threadable,
|
|
8
|
-
|
|
12
|
+
transformVectorAsPoint,
|
|
9
13
|
tween,
|
|
10
|
-
Vector2,
|
|
11
14
|
} from '@revideo/core';
|
|
12
|
-
import {CurveProfile} from '../curves';
|
|
15
|
+
import type {CurveProfile} from '../curves';
|
|
13
16
|
import {createCurveProfileLerp} from '../curves/createCurveProfileLerp';
|
|
14
17
|
import {getPathProfile} from '../curves/getPathProfile';
|
|
15
18
|
import {computed, signal} from '../decorators';
|
|
16
19
|
import {drawLine, drawPivot} from '../utils';
|
|
17
|
-
import {
|
|
20
|
+
import type {CurveProps} from './Curve';
|
|
21
|
+
import {Curve} from './Curve';
|
|
18
22
|
|
|
19
23
|
export interface PathProps extends CurveProps {
|
|
20
24
|
data: SignalValue<string>;
|
|
@@ -96,7 +100,8 @@ export class Path extends Curve {
|
|
|
96
100
|
): void {
|
|
97
101
|
const box = this.childrenBBox().transformCorners(matrix);
|
|
98
102
|
const size = this.computedSize();
|
|
99
|
-
const
|
|
103
|
+
const offsetVector = size.mul(this.offset()).scale(0.5);
|
|
104
|
+
const offset = transformVectorAsPoint(offsetVector, matrix);
|
|
100
105
|
const segments = this.profile().segments;
|
|
101
106
|
|
|
102
107
|
context.lineWidth = 1;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
SimpleSignal,
|
|
6
|
-
Vector2,
|
|
7
|
-
} from '@revideo/core';
|
|
8
|
-
import {CurveProfile, getPolylineProfile} from '../curves';
|
|
1
|
+
import type {SerializedVector2, SignalValue, SimpleSignal} from '@revideo/core';
|
|
2
|
+
import {BBox, Vector2} from '@revideo/core';
|
|
3
|
+
import type {CurveProfile} from '../curves';
|
|
4
|
+
import {getPolylineProfile} from '../curves';
|
|
9
5
|
import {computed, initial, signal} from '../decorators';
|
|
10
|
-
import {DesiredLength} from '../partials';
|
|
6
|
+
import type {DesiredLength} from '../partials';
|
|
11
7
|
import {drawPolygon} from '../utils';
|
|
12
|
-
import {
|
|
8
|
+
import type {CurveProps} from './Curve';
|
|
9
|
+
import {Curve} from './Curve';
|
|
13
10
|
|
|
14
11
|
export interface PolygonProps extends CurveProps {
|
|
15
12
|
/**
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {PossibleVector2, SignalValue, Vector2Signal} from '@revideo/core';
|
|
1
|
+
import type {PossibleVector2, SignalValue, Vector2Signal} from '@revideo/core';
|
|
2
2
|
import {QuadBezierSegment} from '../curves';
|
|
3
|
-
import {PolynomialSegment} from '../curves/PolynomialSegment';
|
|
3
|
+
import type {PolynomialSegment} from '../curves/PolynomialSegment';
|
|
4
4
|
import {computed, vector2Signal} from '../decorators';
|
|
5
5
|
import {lineTo, moveTo, quadraticCurveTo} from '../utils';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type {BezierOverlayInfo} from './Bezier';
|
|
7
|
+
import {Bezier} from './Bezier';
|
|
8
|
+
import type {CurveProps} from './Curve';
|
|
8
9
|
|
|
9
10
|
export interface QuadBezierProps extends CurveProps {
|
|
10
11
|
p0?: SignalValue<PossibleVector2>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type {PossibleVector2, SignalValue, Vector2Signal} from '@revideo/core';
|
|
2
|
+
import {BBox, transformVectorAsPoint} from '@revideo/core';
|
|
3
|
+
import type {CurveProfile} from '../curves';
|
|
4
|
+
import {LineSegment} from '../curves';
|
|
3
5
|
import {nodeName, vector2Signal} from '../decorators';
|
|
4
6
|
import {arc, drawLine, drawPivot} from '../utils';
|
|
5
|
-
import {
|
|
7
|
+
import type {CurveProps} from './Curve';
|
|
8
|
+
import {Curve} from './Curve';
|
|
6
9
|
|
|
7
10
|
export interface RayProps extends CurveProps {
|
|
8
11
|
/**
|
|
@@ -86,9 +89,10 @@ export class Ray extends Curve {
|
|
|
86
89
|
) {
|
|
87
90
|
const box = this.childrenBBox().transformCorners(matrix);
|
|
88
91
|
const size = this.computedSize();
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
+
const offsetVector = size.mul(this.offset()).scale(0.5);
|
|
93
|
+
const offset = transformVectorAsPoint(offsetVector, matrix);
|
|
94
|
+
const from = transformVectorAsPoint(this.from(), matrix);
|
|
95
|
+
const to = transformVectorAsPoint(this.to(), matrix);
|
|
92
96
|
|
|
93
97
|
context.fillStyle = 'white';
|
|
94
98
|
context.strokeStyle = 'black';
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BBox,
|
|
1
|
+
import type {
|
|
3
2
|
PossibleSpacing,
|
|
4
3
|
SerializedVector2,
|
|
5
4
|
SignalValue,
|
|
6
5
|
SimpleSignal,
|
|
7
6
|
SpacingSignal,
|
|
8
7
|
} from '@revideo/core';
|
|
8
|
+
import {BBox} from '@revideo/core';
|
|
9
9
|
import {getRectProfile} from '../curves/getRectProfile';
|
|
10
10
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
11
11
|
import {spacingSignal} from '../decorators/spacingSignal';
|
|
12
|
-
import {DesiredLength} from '../partials';
|
|
12
|
+
import type {DesiredLength} from '../partials';
|
|
13
13
|
import {drawRoundRect} from '../utils';
|
|
14
|
-
import {
|
|
14
|
+
import type {CurveProps} from './Curve';
|
|
15
|
+
import {Curve} from './Curve';
|
|
15
16
|
|
|
16
17
|
export interface RectProps extends CurveProps {
|
|
17
18
|
/**
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import type {SignalValue, SimpleSignal} from '@revideo/core';
|
|
2
|
+
import {BBox, useThread} from '@revideo/core';
|
|
3
|
+
import type {
|
|
3
4
|
Artboard,
|
|
4
5
|
File,
|
|
5
6
|
LinearAnimationInstance,
|
|
6
7
|
Renderer,
|
|
7
8
|
RiveCanvas,
|
|
8
9
|
} from '@rive-app/canvas-advanced';
|
|
10
|
+
import RiveInitializer from '@rive-app/canvas-advanced';
|
|
9
11
|
import {computed, initial, nodeName, signal} from '../decorators';
|
|
10
|
-
import {
|
|
12
|
+
import type {RectProps} from './Rect';
|
|
13
|
+
import {Rect} from './Rect';
|
|
11
14
|
|
|
12
15
|
export interface RiveProps extends RectProps {
|
|
13
16
|
src?: SignalValue<string>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BBox,
|
|
3
|
-
Matrix2D,
|
|
1
|
+
import type {
|
|
4
2
|
PossibleSpacing,
|
|
5
3
|
SerializedVector2,
|
|
6
4
|
SignalValue,
|
|
7
5
|
SimpleSignal,
|
|
8
6
|
ThreadGenerator,
|
|
9
7
|
TimingFunction,
|
|
8
|
+
} from '@revideo/core';
|
|
9
|
+
import {
|
|
10
|
+
BBox,
|
|
11
|
+
Matrix2D,
|
|
10
12
|
Vector2,
|
|
11
13
|
all,
|
|
12
14
|
clampRemap,
|
|
@@ -19,16 +21,23 @@ import {
|
|
|
19
21
|
useLogger,
|
|
20
22
|
} from '@revideo/core';
|
|
21
23
|
import {computed, signal} from '../decorators';
|
|
22
|
-
import {DesiredLength, PossibleCanvasStyle} from '../partials';
|
|
24
|
+
import type {DesiredLength, PossibleCanvasStyle} from '../partials';
|
|
23
25
|
import {applyTransformDiff, getTransformDiff} from '../utils/diff';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
+
import type {CircleProps} from './Circle';
|
|
27
|
+
import {Circle} from './Circle';
|
|
28
|
+
import type {ImgProps} from './Img';
|
|
29
|
+
import {Img} from './Img';
|
|
26
30
|
import {Layout} from './Layout';
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
31
|
+
import type {LineProps} from './Line';
|
|
32
|
+
import {Line} from './Line';
|
|
33
|
+
import type {NodeProps} from './Node';
|
|
34
|
+
import {Node} from './Node';
|
|
35
|
+
import type {PathProps} from './Path';
|
|
36
|
+
import {Path} from './Path';
|
|
37
|
+
import type {RectProps} from './Rect';
|
|
38
|
+
import {Rect} from './Rect';
|
|
39
|
+
import type {ShapeProps} from './Shape';
|
|
40
|
+
import {Shape} from './Shape';
|
|
32
41
|
import {View2D} from './View2D';
|
|
33
42
|
|
|
34
43
|
/**
|