@microfox/remotion 1.0.1 → 1.1.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.
package/dist/index.d.mts DELETED
@@ -1,1006 +0,0 @@
1
- import * as React$1 from 'react';
2
- import React__default, { CSSProperties, ReactNode, ComponentType as ComponentType$1 } from 'react';
3
- import { z } from 'zod';
4
- import { VideoConfig, CalculateMetadataFunction } from 'remotion';
5
-
6
- type Boundaries = {
7
- left?: number | string;
8
- top?: number | string;
9
- width?: number | string;
10
- height?: number | string;
11
- right?: number | string;
12
- bottom?: number | string;
13
- zIndex?: number;
14
- };
15
- type Timing = {
16
- start?: number;
17
- duration?: number;
18
- };
19
- type CalculatedBoundaries = {
20
- left?: number;
21
- top?: number;
22
- right?: number;
23
- bottom?: number;
24
- width?: number;
25
- height?: number;
26
- zIndex?: number;
27
- };
28
- type CalculatedTiming = {
29
- startInFrames?: number;
30
- durationInFrames?: number;
31
- start?: number;
32
- duration?: number;
33
- fitDurationTo?: string[] | string;
34
- };
35
- type Hierarchy = {
36
- depth: number;
37
- parentIds: string[];
38
- };
39
- interface BaseRenderableContext {
40
- overrideStyle?: CSSProperties;
41
- }
42
- interface RenderableContext extends BaseRenderableContext {
43
- boundaries?: CalculatedBoundaries;
44
- timing?: CalculatedTiming;
45
- hierarchy?: Hierarchy;
46
- }
47
- interface InternalRenderableContext extends BaseRenderableContext {
48
- boundaries: CalculatedBoundaries;
49
- timing?: CalculatedTiming;
50
- hierarchy: Hierarchy;
51
- }
52
- type RenderableData = {
53
- [key: string]: any;
54
- };
55
- interface BaseComponentData {
56
- id: string;
57
- componentId: string;
58
- type: ComponentType;
59
- data?: RenderableData;
60
- context?: RenderableContext;
61
- childrenData?: RenderableComponentData[];
62
- effects?: BaseEffect[];
63
- }
64
- type BaseEffect = string | {
65
- id: string;
66
- componentId: string;
67
- data?: RenderableData;
68
- context?: RenderableContext;
69
- };
70
- type ComponentType = 'atom' | 'layout' | 'frame' | 'scene' | 'transition';
71
- interface AtomComponentData extends BaseComponentData {
72
- type: 'atom';
73
- data?: RenderableData & {
74
- boundaries?: Boundaries;
75
- };
76
- context?: RenderableContext;
77
- }
78
- interface LayoutComponentData extends BaseComponentData {
79
- type: 'layout';
80
- data?: RenderableData & {
81
- boundaries?: Boundaries;
82
- timing?: Timing;
83
- };
84
- context?: RenderableContext;
85
- }
86
- interface FrameComponentData extends BaseComponentData {
87
- type: 'frame';
88
- data?: RenderableData & {
89
- boundaries?: Boundaries;
90
- timing?: Timing;
91
- };
92
- context?: RenderableContext;
93
- }
94
- interface SceneComponentData extends BaseComponentData {
95
- type: 'scene';
96
- data?: RenderableData & {
97
- timing?: Timing;
98
- };
99
- }
100
- interface TransitionComponentData extends BaseComponentData {
101
- type: 'transition';
102
- data?: RenderableData & {
103
- timing?: Timing;
104
- };
105
- }
106
- type RenderableComponentData = AtomComponentData | LayoutComponentData | FrameComponentData | SceneComponentData | TransitionComponentData;
107
- interface BaseRenderableProps {
108
- id: string;
109
- componentId: string;
110
- type: ComponentType;
111
- data?: RenderableData;
112
- context?: InternalRenderableContext;
113
- children?: ReactNode;
114
- }
115
- interface BaseRenderableData extends BaseComponentData {
116
- childrenData?: RenderableComponentData[];
117
- context?: RenderableContext;
118
- }
119
-
120
- interface BoundaryConstraints {
121
- x?: number | string;
122
- y?: number | string;
123
- width?: number | string;
124
- height?: number | string;
125
- zIndex?: number;
126
- }
127
- interface TimingConstraints {
128
- startFrame?: number;
129
- durationFrames?: number;
130
- delay?: number;
131
- }
132
- interface LayoutConstraints {
133
- alignment?: 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
134
- padding?: number;
135
- spacing?: number;
136
- columns?: number;
137
- rows?: number;
138
- }
139
-
140
- interface CompositionContext {
141
- childrenData?: RenderableComponentData[];
142
- width: number;
143
- height: number;
144
- duration: number;
145
- fps: number;
146
- currentFrame: number;
147
- }
148
-
149
- interface ComponentConfig {
150
- displayName: string;
151
- type?: ComponentType;
152
- isInnerSequence?: boolean;
153
- [key: string]: any;
154
- }
155
- interface ComponentRegistry {
156
- [key: string]: {
157
- component: React.ComponentType<BaseRenderableProps>;
158
- config: ComponentConfig;
159
- };
160
- }
161
- interface RegistryEntry {
162
- type: ComponentType;
163
- component: React.ComponentType<BaseRenderableProps>;
164
- config: ComponentConfig;
165
- package?: string;
166
- }
167
- interface PackageRegistry {
168
- [packageName: string]: {
169
- [componentName: string]: {
170
- component: React.ComponentType<BaseRenderableProps>;
171
- config: ComponentConfig;
172
- };
173
- };
174
- }
175
-
176
- declare class ComponentRegistryManager {
177
- private registry;
178
- private packageRegistry;
179
- registerComponent(name: string, component: React.ComponentType<any>, type: 'frame' | 'layout' | 'atom', config?: ComponentConfig, packageName?: string): void;
180
- registerEffect(name: string, component: React.ComponentType<any>, config?: ComponentConfig, packageName?: string): void;
181
- getComponent(name: string): React.ComponentType<any> | undefined;
182
- getComponentConfig(name: string): ComponentConfig | undefined;
183
- getComponentWithConfig(name: string): {
184
- component: React.ComponentType<any>;
185
- config: ComponentConfig;
186
- } | undefined;
187
- registerPackage(packageName: string, components: Record<string, {
188
- component: React.ComponentType<any>;
189
- config: ComponentConfig;
190
- }>): void;
191
- getPackageComponents(packageName: string): Record<string, {
192
- component: React.ComponentType<any>;
193
- config: ComponentConfig;
194
- }> | undefined;
195
- getAllComponents(): ComponentRegistry;
196
- clear(): void;
197
- }
198
- declare const componentRegistry: ComponentRegistryManager;
199
- declare const registerComponent: (name: string, component: React.ComponentType<any>, type: "frame" | "layout" | "atom", config?: ComponentConfig, packageName?: string) => void;
200
- declare const registerEffect: (name: string, component: React.ComponentType<any>, config?: ComponentConfig, packageName?: string) => void;
201
- declare const registerPackage: (packageName: string, components: Record<string, {
202
- component: React.ComponentType<any>;
203
- config: ComponentConfig;
204
- }>) => void;
205
- declare const getComponent: (name: string) => React$1.ComponentType<any>;
206
- declare const getComponentConfig: (name: string) => ComponentConfig;
207
- declare const getComponentWithConfig: (name: string) => {
208
- component: React.ComponentType<any>;
209
- config: ComponentConfig;
210
- };
211
-
212
- interface CompositionContextValue {
213
- root?: RenderableComponentData[];
214
- duration: number;
215
- }
216
- interface CompositionProviderProps {
217
- children: React__default.ReactNode;
218
- value: CompositionContextValue;
219
- }
220
- declare const CompositionProvider: React__default.FC<CompositionProviderProps>;
221
- declare const useComposition: () => CompositionContextValue;
222
-
223
- declare const useRenderContext: () => RenderableContext;
224
- declare const ComponentRenderer: React__default.FC<BaseRenderableData>;
225
-
226
- interface FrameProps extends BaseRenderableProps {
227
- data?: {
228
- style?: React__default.CSSProperties;
229
- };
230
- }
231
- declare const Frame: ({ children, data }: FrameProps) => React__default.JSX.Element;
232
-
233
- interface SceneFrameProps extends BaseRenderableProps {
234
- children?: ReactNode;
235
- }
236
- declare const SceneFrame: React__default.FC<SceneFrameProps>;
237
-
238
- interface BaseLayoutProps extends BaseRenderableProps {
239
- children?: ReactNode;
240
- }
241
- declare const Layout: ComponentType$1<BaseLayoutProps>;
242
- declare const config$a: ComponentConfig;
243
-
244
- type Shape = 'circle' | 'rectangle' | 'star' | 'triangle';
245
- interface ShapeAtomProps extends BaseRenderableProps {
246
- data: {
247
- shape: Shape;
248
- color: string;
249
- rotation?: {
250
- duration: number;
251
- };
252
- style?: React__default.CSSProperties;
253
- };
254
- }
255
- declare const Atom$5: React__default.FC<ShapeAtomProps>;
256
- declare const config$9: ComponentConfig;
257
-
258
- interface ImageAtomProps extends BaseRenderableProps {
259
- data: {
260
- src: string;
261
- style?: React__default.CSSProperties;
262
- className?: string;
263
- };
264
- }
265
- declare const Atom$4: React__default.FC<ImageAtomProps>;
266
- declare const config$8: ComponentConfig;
267
-
268
- interface TextAtomData {
269
- text: string;
270
- style?: React__default.CSSProperties;
271
- className?: string;
272
- font?: {
273
- family: string;
274
- weights?: string[];
275
- subsets?: string[];
276
- display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
277
- preload?: boolean;
278
- };
279
- fallbackFonts?: string[];
280
- }
281
- interface TextAtomProps$1 extends BaseRenderableProps {
282
- data: TextAtomData;
283
- }
284
- declare const Atom$3: React__default.FC<TextAtomProps$1>;
285
- declare const config$7: ComponentConfig;
286
-
287
- declare const VideoAtomDataProps: z.ZodObject<{
288
- src: z.ZodString;
289
- style: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
290
- className: z.ZodOptional<z.ZodString>;
291
- startFrom: z.ZodOptional<z.ZodNumber>;
292
- endAt: z.ZodOptional<z.ZodNumber>;
293
- playbackRate: z.ZodOptional<z.ZodNumber>;
294
- volume: z.ZodOptional<z.ZodNumber>;
295
- muted: z.ZodOptional<z.ZodBoolean>;
296
- loop: z.ZodOptional<z.ZodBoolean>;
297
- fit: z.ZodOptional<z.ZodEnum<["contain", "cover", "fill", "none", "scale-down"]>>;
298
- }, "strip", z.ZodTypeAny, {
299
- style?: Record<string, any>;
300
- className?: string;
301
- src?: string;
302
- startFrom?: number;
303
- endAt?: number;
304
- playbackRate?: number;
305
- volume?: number;
306
- muted?: boolean;
307
- loop?: boolean;
308
- fit?: "fill" | "none" | "contain" | "cover" | "scale-down";
309
- }, {
310
- style?: Record<string, any>;
311
- className?: string;
312
- src?: string;
313
- startFrom?: number;
314
- endAt?: number;
315
- playbackRate?: number;
316
- volume?: number;
317
- muted?: boolean;
318
- loop?: boolean;
319
- fit?: "fill" | "none" | "contain" | "cover" | "scale-down";
320
- }>;
321
- type VideoAtomDataProps = z.infer<typeof VideoAtomDataProps>;
322
- /**
323
- * Props interface for the VideoAtom component
324
- * Extends base renderable props with video-specific data
325
- */
326
- interface VideoAtomProps extends BaseRenderableProps {
327
- data: VideoAtomDataProps;
328
- }
329
- /**
330
- * VideoAtom Component
331
- *
332
- * A Remotion component that renders video with advanced control features:
333
- * - Time-based trimming (start/end points)
334
- * - Playback rate and volume control
335
- * - Flexible styling and object fit options
336
- * - Loop functionality
337
- *
338
- * @param data - Video configuration object containing all playback and styling settings
339
- * @returns Remotion Video component with applied configurations
340
- */
341
- declare const Atom$2: React__default.FC<VideoAtomProps>;
342
- declare const config$6: ComponentConfig;
343
-
344
- declare const AudioAtomDataProps: z.ZodObject<{
345
- src: z.ZodString;
346
- startFrom: z.ZodOptional<z.ZodNumber>;
347
- endAt: z.ZodOptional<z.ZodNumber>;
348
- volume: z.ZodOptional<z.ZodNumber>;
349
- playbackRate: z.ZodOptional<z.ZodNumber>;
350
- muted: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
351
- type: z.ZodLiteral<"full">;
352
- value: z.ZodBoolean;
353
- }, "strip", z.ZodTypeAny, {
354
- type?: "full";
355
- value?: boolean;
356
- }, {
357
- type?: "full";
358
- value?: boolean;
359
- }>, z.ZodObject<{
360
- type: z.ZodLiteral<"range">;
361
- values: z.ZodArray<z.ZodObject<{
362
- start: z.ZodNumber;
363
- end: z.ZodNumber;
364
- }, "strip", z.ZodTypeAny, {
365
- start?: number;
366
- end?: number;
367
- }, {
368
- start?: number;
369
- end?: number;
370
- }>, "many">;
371
- }, "strip", z.ZodTypeAny, {
372
- type?: "range";
373
- values?: {
374
- start?: number;
375
- end?: number;
376
- }[];
377
- }, {
378
- type?: "range";
379
- values?: {
380
- start?: number;
381
- end?: number;
382
- }[];
383
- }>]>>;
384
- }, "strip", z.ZodTypeAny, {
385
- src?: string;
386
- startFrom?: number;
387
- endAt?: number;
388
- playbackRate?: number;
389
- volume?: number;
390
- muted?: {
391
- type?: "range";
392
- values?: {
393
- start?: number;
394
- end?: number;
395
- }[];
396
- } | {
397
- type?: "full";
398
- value?: boolean;
399
- };
400
- }, {
401
- src?: string;
402
- startFrom?: number;
403
- endAt?: number;
404
- playbackRate?: number;
405
- volume?: number;
406
- muted?: {
407
- type?: "range";
408
- values?: {
409
- start?: number;
410
- end?: number;
411
- }[];
412
- } | {
413
- type?: "full";
414
- value?: boolean;
415
- };
416
- }>;
417
- type AudioAtomDataProps = z.infer<typeof AudioAtomDataProps>;
418
- /**
419
- * Props interface for the AudioAtom component
420
- * Extends base renderable props with audio-specific data
421
- */
422
- interface AudioAtomProps extends BaseRenderableProps {
423
- data: AudioAtomDataProps;
424
- }
425
- /**
426
- * AudioAtom Component
427
- *
428
- * A Remotion component that renders audio with advanced control features:
429
- * - Time-based trimming (start/end points)
430
- * - Volume and playback rate control
431
- * - Flexible muting (full track or specific time ranges)
432
- *
433
- * @param data - Audio configuration object containing all playback settings
434
- * @returns Remotion Audio component with applied configurations
435
- */
436
- declare const Atom$1: React__default.FC<AudioAtomProps>;
437
- declare const config$5: ComponentConfig;
438
-
439
- interface FontConfig$1 {
440
- family: string;
441
- weights?: string[];
442
- subsets?: string[];
443
- display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
444
- preload?: boolean;
445
- }
446
- interface TextAtomDataWithFonts {
447
- text: string;
448
- style?: React__default.CSSProperties;
449
- className?: string;
450
- font?: FontConfig$1;
451
- fallbackFonts?: string[];
452
- loadingState?: {
453
- showLoadingIndicator?: boolean;
454
- loadingText?: string;
455
- loadingStyle?: React__default.CSSProperties;
456
- };
457
- errorState?: {
458
- showErrorIndicator?: boolean;
459
- errorText?: string;
460
- errorStyle?: React__default.CSSProperties;
461
- };
462
- }
463
- interface TextAtomProps extends BaseRenderableProps {
464
- data: TextAtomDataWithFonts;
465
- }
466
- /**
467
- * Enhanced TextAtom with comprehensive dynamic font loading capabilities
468
- *
469
- * Features:
470
- * - Dynamic Google Font loading with simplified API
471
- * - Loading states with visual indicators
472
- * - Error handling with fallbacks
473
- * - Multiple font weights and subsets support
474
- * - Font preloading for performance
475
- * - Graceful degradation to system fonts
476
- */
477
- declare const Atom: React__default.FC<TextAtomProps>;
478
- declare const config$4: ComponentConfig;
479
-
480
- declare const BlurEffect: React__default.FC<BaseRenderableProps>;
481
- declare const config$3: {
482
- displayName: string;
483
- description: string;
484
- category: string;
485
- props: {
486
- blur: {
487
- type: string;
488
- description: string;
489
- default: number;
490
- };
491
- };
492
- };
493
-
494
- declare const LoopEffect: React__default.FC<BaseRenderableProps>;
495
- declare const config$2: ComponentConfig;
496
-
497
- interface PanEffectData {
498
- effectTiming?: 'start' | 'end';
499
- panDuration?: number | string;
500
- panStart?: number;
501
- panEnd?: number;
502
- panStartDelay?: number | string;
503
- panEndDelay?: number | string;
504
- panDirection?: 'left' | 'right' | 'up' | 'down' | 'diagonal' | 'custom';
505
- panDistance?: number | [number, number][];
506
- loopTimes?: number;
507
- panStartPosition?: [number, number] | string;
508
- panEndPosition?: [number, number] | string;
509
- animationType?: 'linear' | 'spring' | 'ease-in' | 'ease-out' | 'ease-in-out';
510
- }
511
- declare const PanEffect: React__default.FC<BaseRenderableProps>;
512
- declare const config$1: ComponentConfig;
513
-
514
- interface ZoomEffectData {
515
- effectTiming?: 'start' | 'end';
516
- zoomDuration?: number | string;
517
- zoomStart?: number;
518
- zoomEnd?: number;
519
- zoomStartDelay?: number | string;
520
- zoomEndDelay?: number | string;
521
- zoomDirection?: 'in' | 'out';
522
- zoomDepth?: number | [number, number][];
523
- loopTimes?: number;
524
- zoomPosition?: [number, number] | string;
525
- animationType?: 'linear' | 'spring' | 'ease-in' | 'ease-out' | 'ease-in-out';
526
- }
527
- declare const ZoomEffect: React__default.FC<BaseRenderableProps>;
528
- declare const config: ComponentConfig;
529
-
530
- declare const useComponentRegistry: () => {
531
- registerComponent: any;
532
- registerPackage: any;
533
- getComponent: any;
534
- getAllComponents: any;
535
- };
536
-
537
- interface UseBoundaryCalculationProps {
538
- parentBoundaries: {
539
- x: number;
540
- y: number;
541
- width: number;
542
- height: number;
543
- };
544
- constraints: BoundaryConstraints;
545
- layout?: LayoutConstraints;
546
- }
547
- declare const useBoundaryCalculation: ({ parentBoundaries, constraints, layout, }: UseBoundaryCalculationProps) => {
548
- x: number;
549
- y: number;
550
- width: number;
551
- height: number;
552
- zIndex: number;
553
- };
554
-
555
- declare function buildLayoutHook<T extends z.ZodSchema>(schema: T, defaultValue: z.infer<T>): () => any;
556
-
557
- interface FontConfig {
558
- family: string;
559
- weights?: string[];
560
- subsets?: string[];
561
- display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
562
- preload?: boolean;
563
- }
564
- interface FontLoadingOptions {
565
- subsets?: string[];
566
- weights?: string[];
567
- display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
568
- preload?: boolean;
569
- }
570
- /**
571
- * Load a Google Font dynamically using dynamic imports
572
- * @param fontFamily - The font family name (e.g., 'Inter', 'Roboto')
573
- * @param options - Font loading options
574
- * @returns Promise that resolves with the fontFamily CSS value
575
- */
576
- declare const loadGoogleFont: (fontFamily: string, options?: FontLoadingOptions) => Promise<string>;
577
- /**
578
- * Load multiple fonts in parallel
579
- * @param fonts - Array of font configurations
580
- * @returns Promise that resolves with a map of font family names to CSS values
581
- */
582
- declare const loadMultipleFonts: (fonts: Array<{
583
- family: string;
584
- options?: FontLoadingOptions;
585
- }>) => Promise<Map<string, string>>;
586
- /**
587
- * Get font family CSS value from cache
588
- * @param fontFamily - The font family name
589
- * @param options - Font loading options
590
- * @returns CSS font-family value or undefined if not loaded
591
- */
592
- declare const getLoadedFontFamily: (fontFamily: string, options?: FontLoadingOptions) => string | undefined;
593
- /**
594
- * Preload common fonts for better performance
595
- */
596
- declare const preloadCommonFonts: () => Promise<Map<string, string>>;
597
- /**
598
- * Check if a font is already loaded
599
- * @param fontFamily - The font family name
600
- * @param options - Font loading options
601
- * @returns boolean indicating if font is loaded
602
- */
603
- declare const isFontLoaded: (fontFamily: string, options?: FontLoadingOptions) => boolean;
604
- /**
605
- * Clear font cache (useful for testing or memory management)
606
- */
607
- declare const clearFontCache: () => void;
608
- /**
609
- * Get all loaded fonts
610
- * @returns Map of loaded fonts
611
- */
612
- declare const getLoadedFonts: () => Map<string, string>;
613
- /**
614
- * Check if a font is available in @remotion/google-fonts
615
- * @param fontFamily - The font family name to check
616
- * @returns Promise that resolves to boolean indicating if font is available
617
- */
618
- declare const isFontAvailable: (fontFamily: string) => Promise<boolean>;
619
- /**
620
- * Get normalized font name for import
621
- * @param fontFamily - The font family name
622
- * @returns Normalized font name suitable for import
623
- */
624
- declare const getNormalizedFontName: (fontFamily: string) => string;
625
-
626
- interface UseFontLoaderOptions {
627
- preload?: boolean;
628
- onLoad?: (fontFamily: string, cssValue: string) => void;
629
- onError?: (fontFamily: string, error: Error) => void;
630
- }
631
- interface FontLoaderState {
632
- loadedFonts: Map<string, string>;
633
- loadingFonts: Set<string>;
634
- errorFonts: Map<string, Error>;
635
- }
636
- /**
637
- * Hook for managing dynamic font loading in Remotion components
638
- */
639
- declare const useFontLoader: (options?: UseFontLoaderOptions) => {
640
- loadedFonts: Map<string, string>;
641
- loadingFonts: Set<string>;
642
- errorFonts: Map<string, Error>;
643
- loadFont: (fontFamily: string, fontOptions?: FontLoadingOptions) => Promise<string>;
644
- loadMultipleFonts: (fonts: Array<{
645
- family: string;
646
- options?: FontLoadingOptions;
647
- }>) => Promise<Map<string, string>>;
648
- isFontReady: (fontFamily: string, options?: FontLoadingOptions) => boolean;
649
- areFontsReady: (fontFamilies: Array<{
650
- family: string;
651
- options?: FontLoadingOptions;
652
- }>) => boolean;
653
- getFontFamily: (fontFamily: string, options?: FontLoadingOptions) => string | undefined;
654
- getFontError: (fontFamily: string) => Error | undefined;
655
- clearErrors: () => void;
656
- };
657
- /**
658
- * Hook for loading a single font with automatic loading
659
- */
660
- declare const useFont: (fontFamily: string, options?: FontLoadingOptions & UseFontLoaderOptions) => {
661
- loadedFonts: Map<string, string>;
662
- loadingFonts: Set<string>;
663
- errorFonts: Map<string, Error>;
664
- loadMultipleFonts: (fonts: Array<{
665
- family: string;
666
- options?: FontLoadingOptions;
667
- }>) => Promise<Map<string, string>>;
668
- areFontsReady: (fontFamilies: Array<{
669
- family: string;
670
- options?: FontLoadingOptions;
671
- }>) => boolean;
672
- clearErrors: () => void;
673
- isLoaded: boolean;
674
- error: Error;
675
- isReady: boolean;
676
- fontFamily: string;
677
- };
678
-
679
- declare const createRootContext: (width: number, height: number, duration: number, fps: number) => RenderableContext;
680
- declare const mergeContexts: (parent: RenderableContext, child: Partial<RenderableContext>) => RenderableContext;
681
-
682
- declare const calculateGridPosition: (index: number, columns: number, cellWidth: number, cellHeight: number, spacing: number) => {
683
- x: number;
684
- y: number;
685
- width: number;
686
- height: number;
687
- };
688
- declare const calculateCircularPosition: (index: number, total: number, radius: number, centerX: number, centerY: number) => {
689
- x: number;
690
- y: number;
691
- };
692
-
693
- /**
694
- * Finds a component in the root data by its ID
695
- */
696
- declare const findComponentById: (root: RenderableComponentData[] | undefined, targetId: string) => RenderableComponentData | null;
697
- /**
698
- * Finds the parent component of a given component
699
- */
700
- declare const findParentComponent: (root: RenderableComponentData[] | undefined, targetId: string) => RenderableComponentData | null;
701
- /**
702
- * Calculates the hierarchy for a component based on its position in the root data
703
- */
704
- declare const calculateHierarchy: (root: RenderableComponentData[] | undefined, componentId: string, currentContext?: RenderableContext) => Hierarchy;
705
- /**
706
- * Calculates timing for a component, inheriting from parent if duration is not provided
707
- */
708
- declare const calculateTimingWithInheritance: (component: RenderableComponentData, root: RenderableComponentData[] | undefined, videoConfig: VideoConfig) => CalculatedTiming;
709
-
710
- declare const NextjsLogo: React__default.FC;
711
- declare const nextjsLogoConfig: ComponentConfig;
712
-
713
- declare const Rings: React__default.FC<{
714
- context?: RenderableContext;
715
- data?: RenderableData;
716
- }>;
717
- declare const ringsConfig: ComponentConfig;
718
-
719
- interface LayoutProps$1 extends BaseRenderableProps {
720
- children: React__default.ReactNode | React__default.ReactNode[];
721
- }
722
-
723
- declare const RippleOutTransitionSchema: z.ZodObject<{
724
- progress: z.ZodNumber;
725
- logoOut: z.ZodNumber;
726
- }, "strip", z.ZodTypeAny, {
727
- progress?: number;
728
- logoOut?: number;
729
- }, {
730
- progress?: number;
731
- logoOut?: number;
732
- }>;
733
- declare const useRippleOutLayout: () => any;
734
- type RippleOutTransitionData = z.infer<typeof RippleOutTransitionSchema>;
735
- declare const RippleOutLayout: React__default.FC<LayoutProps$1>;
736
- declare const rippleOutLayoutConfig: ComponentConfig;
737
-
738
- interface LayoutProps extends BaseRenderableProps {
739
- children?: React__default.ReactNode;
740
- }
741
- declare const TextFade: (props: LayoutProps) => React__default.JSX.Element;
742
- declare const textFadeConfig: ComponentConfig;
743
-
744
- interface WaveformConfig {
745
- audioSrc: string;
746
- useFrequencyData?: boolean;
747
- numberOfSamples?: number;
748
- windowInSeconds?: number;
749
- dataOffsetInSeconds?: number;
750
- normalize?: boolean;
751
- height?: number;
752
- width?: number;
753
- color?: string;
754
- strokeWidth?: number;
755
- backgroundColor?: string;
756
- amplitude?: number;
757
- smoothing?: boolean;
758
- posterize?: number;
759
- }
760
- interface WaveformContextType {
761
- waveformData: number[] | null;
762
- frequencyData: number[] | null;
763
- amplitudes: number[] | null;
764
- audioData: any;
765
- frame: number;
766
- fps: number;
767
- config: WaveformConfig;
768
- width: number;
769
- height: number;
770
- bass: number | null;
771
- mid: number | null;
772
- treble: number | null;
773
- bassValues?: number[] | null;
774
- midValues?: number[] | null;
775
- trebleValues?: number[] | null;
776
- }
777
- declare const useWaveformContext: () => WaveformContextType;
778
- interface WaveformProps {
779
- config: WaveformConfig;
780
- children?: ReactNode;
781
- className?: string;
782
- style?: React__default.CSSProperties;
783
- }
784
- declare const Waveform: React__default.FC<WaveformProps>;
785
-
786
- interface UseWaveformDataConfig {
787
- audioSrc: string;
788
- numberOfSamples: number;
789
- windowInSeconds: number;
790
- dataOffsetInSeconds?: number;
791
- normalize?: boolean;
792
- frame: number;
793
- fps: number;
794
- posterize?: number;
795
- includeFrequencyData?: boolean;
796
- minDb?: number;
797
- maxDb?: number;
798
- }
799
- interface UseWaveformDataReturn {
800
- waveformData: number[] | null;
801
- frequencyData: number[] | null;
802
- amplitudes: number[] | null;
803
- audioData: any;
804
- isLoading: boolean;
805
- error: string | null;
806
- bass: number | null;
807
- bassValues?: number[] | null;
808
- mid: number | null;
809
- midValues?: number[] | null;
810
- treble: number | null;
811
- trebleValues?: number[] | null;
812
- }
813
- declare const useWaveformData: (config: UseWaveformDataConfig) => UseWaveformDataReturn;
814
-
815
- interface WaveformLineDataProps {
816
- config: WaveformConfig & {
817
- useFrequencyData?: boolean;
818
- };
819
- className?: string;
820
- style?: React__default.CSSProperties;
821
- strokeColor?: string;
822
- strokeWidth?: number;
823
- strokeLinecap?: 'butt' | 'round' | 'square';
824
- strokeLinejoin?: 'miter' | 'round' | 'bevel';
825
- fill?: string;
826
- opacity?: number;
827
- centerLine?: boolean;
828
- centerLineColor?: string;
829
- centerLineWidth?: number;
830
- beatSync?: boolean;
831
- bpm?: number;
832
- beatThreshold?: number;
833
- beatAmplitudeMultiplier?: number;
834
- beatAnimationDuration?: number;
835
- smoothAnimation?: boolean;
836
- waveSpacing?: number;
837
- waveSegments?: number;
838
- waveOffset?: number;
839
- waveDirection?: 'horizontal' | 'vertical';
840
- amplitudeCurve?: 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'bounce';
841
- animationSpeed?: number;
842
- pulseOnBeat?: boolean;
843
- pulseColor?: string;
844
- pulseScale?: number;
845
- }
846
- interface WaveformLineProps extends BaseRenderableData {
847
- data: WaveformLineDataProps;
848
- }
849
- declare const WaveformLine: React__default.FC<WaveformLineProps>;
850
-
851
- interface WaveformHistogramDataProps {
852
- config: any;
853
- className?: string;
854
- style?: React__default.CSSProperties;
855
- barColor?: string;
856
- barWidth?: number;
857
- barSpacing?: number;
858
- barBorderRadius?: number;
859
- opacity?: number;
860
- multiplier?: number;
861
- horizontalSymmetry?: boolean;
862
- verticalMirror?: boolean;
863
- waveDirection?: 'right-to-left' | 'left-to-right';
864
- histogramStyle?: 'centered' | 'full-width';
865
- amplitude?: number;
866
- gradientStartColor?: string;
867
- gradientEndColor?: string;
868
- gradientDirection?: 'vertical' | 'horizontal';
869
- gradientStyle?: 'mirrored' | 'normal';
870
- }
871
- interface WaveformHistogramProps extends BaseRenderableData {
872
- data: WaveformHistogramDataProps;
873
- }
874
- declare const WaveformHistogram: React__default.FC<WaveformHistogramProps>;
875
-
876
- interface WaveformHistogramRangedDataProps {
877
- config: any;
878
- className?: string;
879
- style?: React__default.CSSProperties;
880
- barColor?: string;
881
- barWidth?: number;
882
- barSpacing?: number;
883
- barBorderRadius?: number;
884
- opacity?: number;
885
- horizontalSymmetry?: boolean;
886
- verticalMirror?: boolean;
887
- histogramStyle?: 'centered' | 'full-width';
888
- waveDirection?: 'right-to-left' | 'left-to-right';
889
- amplitude?: number;
890
- showFrequencyRanges?: boolean;
891
- rangeDividerColor?: string;
892
- rangeLabels?: boolean;
893
- bassBarColor?: string;
894
- midBarColor?: string;
895
- trebleBarColor?: string;
896
- gradientStartColor?: string;
897
- gradientEndColor?: string;
898
- gradientDirection?: 'vertical' | 'horizontal';
899
- gradientStyle?: 'mirrored' | 'normal';
900
- }
901
- interface WaveformHistogramRangedProps extends BaseRenderableData {
902
- data: WaveformHistogramRangedDataProps;
903
- }
904
- declare const WaveformHistogramRanged: React__default.FC<WaveformHistogramRangedProps>;
905
-
906
- interface WaveformCircleDataProps {
907
- config: any;
908
- className?: string;
909
- style?: React__default.CSSProperties;
910
- strokeColor?: string;
911
- strokeWidth?: number;
912
- fill?: string;
913
- opacity?: number;
914
- radius?: number;
915
- centerX?: number;
916
- centerY?: number;
917
- startAngle?: number;
918
- endAngle?: number;
919
- amplitude?: number;
920
- rotationSpeed?: number;
921
- gradientStartColor?: string;
922
- gradientEndColor?: string;
923
- }
924
- interface WaveformCircleProps extends BaseRenderableData {
925
- data: WaveformCircleDataProps;
926
- }
927
- declare const WaveformCircle: React__default.FC<WaveformCircleProps>;
928
-
929
- declare const WaveformPresets: {
930
- stopgapLine: (props: WaveformLineDataProps) => {
931
- componentId: string;
932
- type: string;
933
- data: {
934
- config: {
935
- audioSrc: string;
936
- useFrequencyData?: boolean;
937
- numberOfSamples: number;
938
- windowInSeconds: number;
939
- dataOffsetInSeconds?: number;
940
- normalize?: boolean;
941
- height: number;
942
- width: number;
943
- color?: string;
944
- strokeWidth?: number;
945
- backgroundColor?: string;
946
- amplitude: number;
947
- smoothing?: boolean;
948
- posterize: number;
949
- };
950
- className?: string;
951
- style?: React.CSSProperties;
952
- strokeColor: string;
953
- strokeWidth: number;
954
- strokeLinecap: string;
955
- strokeLinejoin?: "miter" | "round" | "bevel";
956
- fill?: string;
957
- opacity: number;
958
- centerLine?: boolean;
959
- centerLineColor?: string;
960
- centerLineWidth?: number;
961
- beatSync?: boolean;
962
- bpm?: number;
963
- beatThreshold?: number;
964
- beatAmplitudeMultiplier?: number;
965
- beatAnimationDuration?: number;
966
- smoothAnimation: boolean;
967
- waveSpacing?: number;
968
- waveSegments?: number;
969
- waveOffset?: number;
970
- waveDirection?: "horizontal" | "vertical";
971
- amplitudeCurve: string;
972
- animationSpeed: number;
973
- pulseOnBeat?: boolean;
974
- pulseColor?: string;
975
- pulseScale?: number;
976
- };
977
- };
978
- };
979
-
980
- interface CompositionProps extends BaseRenderableData {
981
- id: string;
982
- style?: React__default.CSSProperties;
983
- config: {
984
- width: number;
985
- height: number;
986
- fps: number;
987
- duration: number;
988
- fitDurationTo?: string | string[];
989
- };
990
- }
991
- type InputCompositionProps = {
992
- childrenData?: RenderableComponentData[];
993
- style?: React__default.CSSProperties;
994
- config?: {
995
- width?: number;
996
- height?: number;
997
- fps?: number;
998
- duration?: number;
999
- fitDurationTo?: string;
1000
- };
1001
- };
1002
- declare const CompositionLayout: ({ childrenData, style, config }: InputCompositionProps) => React__default.JSX.Element;
1003
- declare const calculateCompositionLayoutMetadata: CalculateMetadataFunction<InputCompositionProps>;
1004
- declare const Composition: ({ id, childrenData, config, style }: CompositionProps) => React__default.JSX.Element;
1005
-
1006
- export { Atom$1 as AudioAtom, config$5 as AudioAtomConfig, type BaseComponentData, type BaseEffect, Layout as BaseLayout, config$a as BaseLayoutConfig, type BaseRenderableData, type BaseRenderableProps, BlurEffect, config$3 as BlurEffectConfig, type Boundaries, type BoundaryConstraints, type CalculatedBoundaries, type CalculatedTiming, type ComponentConfig, type ComponentRegistry, ComponentRenderer, type ComponentType, Composition, type CompositionContext, CompositionLayout, CompositionProvider, type FontConfig, type FontLoaderState, type FontLoadingOptions, Frame, type Hierarchy, Atom$4 as ImageAtom, config$8 as ImageAtomConfig, type InputCompositionProps, type InternalRenderableContext, type LayoutConstraints, LoopEffect, config$2 as LoopEffectConfig, NextjsLogo, type PackageRegistry, PanEffect, config$1 as PanEffectConfig, type PanEffectData, type RegistryEntry, type RenderableComponentData, type RenderableContext, type RenderableData, Rings, RippleOutLayout, type RippleOutTransitionData, SceneFrame, Atom$5 as ShapeAtom, config$9 as ShapeAtomConfig, Atom$3 as TextAtom, config$7 as TextAtomConfig, type TextAtomDataWithFonts, Atom as TextAtomWithFonts, config$4 as TextAtomWithFontsConfig, TextFade, type Timing, type TimingConstraints, type UseFontLoaderOptions, type UseWaveformDataConfig, type UseWaveformDataReturn, Atom$2 as VideoAtom, config$6 as VideoAtomConfig, Waveform, WaveformCircle, type WaveformCircleDataProps, type WaveformCircleProps, type WaveformConfig, type WaveformContextType, WaveformHistogram, type WaveformHistogramDataProps, type WaveformHistogramProps, WaveformHistogramRanged, type WaveformHistogramRangedDataProps, type WaveformHistogramRangedProps, WaveformLine, type WaveformLineDataProps, type WaveformLineProps, WaveformPresets, type WaveformProps, ZoomEffect, config as ZoomEffectConfig, type ZoomEffectData, buildLayoutHook, calculateCircularPosition, calculateCompositionLayoutMetadata, calculateGridPosition, calculateHierarchy, calculateTimingWithInheritance, clearFontCache, componentRegistry, createRootContext, findComponentById, findParentComponent, getComponent, getComponentConfig, getComponentWithConfig, getLoadedFontFamily, getLoadedFonts, getNormalizedFontName, isFontAvailable, isFontLoaded, loadGoogleFont, loadMultipleFonts, mergeContexts, nextjsLogoConfig, preloadCommonFonts, registerComponent, registerEffect, registerPackage, ringsConfig, rippleOutLayoutConfig, textFadeConfig, useBoundaryCalculation, useComponentRegistry, useComposition, useFont, useFontLoader, useRenderContext, useRippleOutLayout, useWaveformContext, useWaveformData };