@json-render/remotion 0.4.0

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.
@@ -0,0 +1,166 @@
1
+ export { BuiltInTransition, ComponentDefinition, EffectDefinition, EffectFn, Effects, FrameContext, RemotionSchema, RemotionSpec, TransitionDefinition, TransitionFn, VideoComponentContext, VideoComponentFn, VideoComponents, schema, standardComponentDefinitions, standardEffectDefinitions, standardTransitionDefinitions } from './server.js';
2
+ export { Spec } from '@json-render/core';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import 'zod';
5
+ import 'react';
6
+
7
+ /**
8
+ * Types for Remotion timeline components
9
+ */
10
+ /**
11
+ * Clip data passed to components
12
+ */
13
+ interface Clip {
14
+ id: string;
15
+ trackId: string;
16
+ component: string;
17
+ props: Record<string, unknown>;
18
+ from: number;
19
+ durationInFrames: number;
20
+ transitionIn?: {
21
+ type: string;
22
+ durationInFrames: number;
23
+ };
24
+ transitionOut?: {
25
+ type: string;
26
+ durationInFrames: number;
27
+ };
28
+ }
29
+ /**
30
+ * Timeline spec structure
31
+ */
32
+ interface TimelineSpec {
33
+ composition?: {
34
+ id: string;
35
+ fps: number;
36
+ width: number;
37
+ height: number;
38
+ durationInFrames: number;
39
+ };
40
+ tracks?: {
41
+ id: string;
42
+ name: string;
43
+ type: string;
44
+ enabled: boolean;
45
+ }[];
46
+ clips?: Clip[];
47
+ audio?: {
48
+ tracks: AudioTrack[];
49
+ };
50
+ }
51
+ /**
52
+ * Audio track in the timeline
53
+ */
54
+ interface AudioTrack {
55
+ id: string;
56
+ src: string;
57
+ from: number;
58
+ durationInFrames: number;
59
+ volume: number;
60
+ }
61
+ /**
62
+ * Transition styles calculated by useTransition hook
63
+ */
64
+ interface TransitionStyles {
65
+ opacity: number;
66
+ translateX: number;
67
+ translateY: number;
68
+ scale: number;
69
+ }
70
+ /**
71
+ * Component render function type
72
+ */
73
+ type ClipComponent = React.ComponentType<{
74
+ clip: Clip;
75
+ }>;
76
+ /**
77
+ * Component registry type
78
+ */
79
+ type ComponentRegistry = Record<string, ClipComponent>;
80
+
81
+ /**
82
+ * Calculate transition styles based on clip configuration
83
+ *
84
+ * Handles both transitionIn and transitionOut with support for:
85
+ * - fade
86
+ * - slideLeft / slideRight
87
+ * - slideUp / slideDown
88
+ * - zoom
89
+ * - wipe
90
+ */
91
+ declare function useTransition(clip: Clip, frame: number): TransitionStyles;
92
+
93
+ interface ClipWrapperProps {
94
+ clip: Clip;
95
+ children: React.ReactNode;
96
+ }
97
+ /**
98
+ * Wrapper component that applies transition animations to clips
99
+ *
100
+ * Automatically handles transitionIn and transitionOut based on clip config.
101
+ */
102
+ declare function ClipWrapper({ clip, children }: ClipWrapperProps): react_jsx_runtime.JSX.Element;
103
+
104
+ declare function TitleCard({ clip }: {
105
+ clip: Clip;
106
+ }): react_jsx_runtime.JSX.Element;
107
+ declare function ImageSlide({ clip }: {
108
+ clip: Clip;
109
+ }): react_jsx_runtime.JSX.Element;
110
+ declare function SplitScreen({ clip }: {
111
+ clip: Clip;
112
+ }): react_jsx_runtime.JSX.Element;
113
+ declare function QuoteCard({ clip }: {
114
+ clip: Clip;
115
+ }): react_jsx_runtime.JSX.Element;
116
+ declare function StatCard({ clip }: {
117
+ clip: Clip;
118
+ }): react_jsx_runtime.JSX.Element;
119
+ declare function LowerThird({ clip }: {
120
+ clip: Clip;
121
+ }): react_jsx_runtime.JSX.Element;
122
+ declare function TextOverlay({ clip }: {
123
+ clip: Clip;
124
+ }): react_jsx_runtime.JSX.Element;
125
+ declare function TypingText({ clip }: {
126
+ clip: Clip;
127
+ }): react_jsx_runtime.JSX.Element;
128
+ declare function LogoBug({ clip }: {
129
+ clip: Clip;
130
+ }): react_jsx_runtime.JSX.Element;
131
+ declare function VideoClip({ clip }: {
132
+ clip: Clip;
133
+ }): react_jsx_runtime.JSX.Element;
134
+
135
+ /**
136
+ * Standard components provided by @json-render/remotion
137
+ */
138
+ declare const standardComponents: ComponentRegistry;
139
+ interface RendererProps {
140
+ /** The timeline spec to render */
141
+ spec: TimelineSpec;
142
+ /**
143
+ * Custom component registry to merge with standard components.
144
+ * Custom components override standard ones with the same name.
145
+ */
146
+ components?: ComponentRegistry;
147
+ }
148
+ /**
149
+ * Renders a timeline spec into Remotion components
150
+ *
151
+ * @example
152
+ * // Use with standard components only
153
+ * <Renderer spec={mySpec} />
154
+ *
155
+ * @example
156
+ * // Add custom components
157
+ * <Renderer
158
+ * spec={mySpec}
159
+ * components={{
160
+ * CustomScene: MyCustomSceneComponent,
161
+ * }}
162
+ * />
163
+ */
164
+ declare function Renderer({ spec, components: customComponents, }: RendererProps): react_jsx_runtime.JSX.Element;
165
+
166
+ export { type AudioTrack, type Clip, type ClipComponent, ClipWrapper, type ComponentRegistry, ImageSlide, LogoBug, LowerThird, QuoteCard, Renderer, SplitScreen, StatCard, TextOverlay, type TimelineSpec, TitleCard, type TransitionStyles, TypingText, VideoClip, standardComponents, useTransition };