remotion 4.0.534 → 4.0.535
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/README.md +1 -1
- package/dist/cjs/AbsoluteFill.d.ts +1 -6
- package/dist/cjs/AbsoluteFill.js +1 -1
- package/dist/cjs/Composition.js +15 -20
- package/dist/cjs/CompositionManager.d.ts +0 -4
- package/dist/cjs/CompositionManagerContext.d.ts +1 -6
- package/dist/cjs/CompositionManagerContext.js +0 -4
- package/dist/cjs/CompositionManagerProvider.js +77 -169
- package/dist/cjs/CompositionRegistryProvider.d.ts +5 -0
- package/dist/cjs/CompositionRegistryProvider.js +142 -0
- package/dist/cjs/DefaultPremountContext.d.ts +1 -0
- package/dist/cjs/DefaultPremountContext.js +6 -0
- package/dist/cjs/Folder.js +11 -20
- package/dist/cjs/HtmlInCanvas.d.ts +2 -2
- package/dist/cjs/HtmlInCanvas.js +177 -30
- package/dist/cjs/IFrame.js +40 -8
- package/dist/cjs/Img.js +2 -1
- package/dist/cjs/Interactive.d.ts +12 -0
- package/dist/cjs/Interactive.js +19 -8
- package/dist/cjs/RemotionRoot.js +2 -1
- package/dist/cjs/Sequence.d.ts +2 -3
- package/dist/cjs/Sequence.js +72 -38
- package/dist/cjs/SequenceActivityBoundary.d.ts +10 -0
- package/dist/cjs/SequenceActivityBoundary.js +88 -0
- package/dist/cjs/SequenceActivityBudget.d.ts +13 -0
- package/dist/cjs/SequenceActivityBudget.js +181 -0
- package/dist/cjs/SequenceManager.d.ts +4 -22
- package/dist/cjs/SequenceManager.js +36 -196
- package/dist/cjs/SequenceRegistryProvider.d.ts +4 -0
- package/dist/cjs/SequenceRegistryProvider.js +292 -0
- package/dist/cjs/Track.d.ts +10 -3
- package/dist/cjs/Track.js +7 -6
- package/dist/cjs/animated-image/AnimatedImage.js +42 -31
- package/dist/cjs/audio/AudioForPreview.js +54 -41
- package/dist/cjs/audio/get-audio-sync-anchor-tolerance.d.ts +1 -0
- package/dist/cjs/audio/get-audio-sync-anchor-tolerance.js +11 -0
- package/dist/cjs/audio/use-audio-context.js +26 -7
- package/dist/cjs/canvas-image/CanvasImage.js +2 -1
- package/dist/cjs/committed-metadata.d.ts +68 -0
- package/dist/cjs/committed-metadata.js +39 -0
- package/dist/cjs/component-identity.d.ts +6 -0
- package/dist/cjs/component-identity.js +39 -0
- package/dist/cjs/composition-registry-fallback.d.ts +14 -0
- package/dist/cjs/composition-registry-fallback.js +35 -0
- package/dist/cjs/create-element-source-proxy.d.ts +4 -0
- package/dist/cjs/create-element-source-proxy.js +46 -0
- package/dist/cjs/default-premount-in-seconds.d.ts +3 -0
- package/dist/cjs/default-premount-in-seconds.js +12 -0
- package/dist/cjs/effects/Solid.js +2 -1
- package/dist/cjs/effects/canvas-pool.d.ts +1 -0
- package/dist/cjs/effects/canvas-pool.js +15 -10
- package/dist/cjs/effects/run-effect-chain.js +3 -3
- package/dist/cjs/effects/use-memoized-effects.js +96 -17
- package/dist/cjs/enable-sequence-stack-traces.d.ts +2 -8
- package/dist/cjs/enable-sequence-stack-traces.js +7 -38
- package/dist/cjs/freeze.js +4 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/interactivity-schema.d.ts +45 -9
- package/dist/cjs/interactivity-schema.js +30 -3
- package/dist/cjs/internals.d.ts +104 -25
- package/dist/cjs/internals.js +29 -7
- package/dist/cjs/interpolate-keyframed-status.d.ts +4 -0
- package/dist/cjs/interpolate-keyframed-status.js +38 -1
- package/dist/cjs/interpolate.d.ts +12 -0
- package/dist/cjs/interpolate.js +7 -0
- package/dist/cjs/no-react.d.ts +4 -0
- package/dist/cjs/no-react.js +6 -0
- package/dist/cjs/optimistic-sequence-deletion.d.ts +17 -0
- package/dist/cjs/optimistic-sequence-deletion.js +114 -0
- package/dist/cjs/registry-store.d.ts +17 -0
- package/dist/cjs/registry-store.js +68 -0
- package/dist/cjs/sequence-activity-context.d.ts +13 -0
- package/dist/cjs/sequence-activity-context.js +20 -0
- package/dist/cjs/sequence-activity-defaults.d.ts +1 -0
- package/dist/cjs/sequence-activity-defaults.js +4 -0
- package/dist/cjs/sequence-outline.js +1 -2
- package/dist/cjs/sequence-registry-context.d.ts +26 -0
- package/dist/cjs/sequence-registry-context.js +71 -0
- package/dist/cjs/series/index.d.ts +2 -1
- package/dist/cjs/series/index.js +12 -4
- package/dist/cjs/timeline-position-state.js +11 -3
- package/dist/cjs/timeline-track-context.d.ts +1 -0
- package/dist/cjs/use-lazy-component.js +29 -15
- package/dist/cjs/use-media-in-timeline.d.ts +7 -14
- package/dist/cjs/use-media-in-timeline.js +15 -117
- package/dist/cjs/use-premounting.js +3 -4
- package/dist/cjs/use-sequence-registration.d.ts +1 -1
- package/dist/cjs/use-sequence-registration.js +22 -6
- package/dist/cjs/use-video.d.ts +7 -2
- package/dist/cjs/use-video.js +11 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/VideoForPreview.js +55 -42
- package/dist/cjs/with-interactivity-schema.js +40 -14
- package/dist/cjs/wrap-remotion-context.d.ts +15 -2
- package/dist/cjs/wrap-remotion-context.js +101 -4
- package/dist/esm/index.mjs +3352 -2284
- package/dist/esm/no-react.mjs +71 -35
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.baseSchemaWithoutFrom = exports.sequenceSchema = exports.baseSchemaWithoutPlaybackRate = exports.baseSchema = exports.freezeField = exports.loopField = exports.trimAfterField = exports.trimBeforeField = exports.fromField = exports.durationInFramesField = exports.extendSchemaWithSequenceName = exports.sequenceNameField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequenceCropSchema = exports.cropSchema = exports.sequencePremountSchema = exports.premountSchema = exports.textContentSchema = exports.svgPaintSchema = exports.svgStrokeSchema = exports.backgroundSchema = exports.borderRadiusSchema = exports.borderSchema = exports.textSchema = exports.sequenceVisualStyleSchema = exports.transformSchema = exports.captionsSchema = void 0;
|
|
3
|
+
exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.baseSchemaWithoutFrom = exports.sequenceSchema = exports.baseSchemaWithoutPlaybackRate = exports.baseSchema = exports.freezeField = exports.loopField = exports.trimAfterField = exports.sequenceTimingSchema = exports.trimBeforeField = exports.fromField = exports.durationInFramesField = exports.extendSchemaWithSequenceName = exports.sequenceNameField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequenceCropSchema = exports.cropSchema = exports.sequencePremountSchema = exports.premountSchema = exports.textContentSchema = exports.childrenSchema = exports.svgPaintSchema = exports.svgStrokeSchema = exports.backgroundSchema = exports.borderRadiusSchema = exports.borderSchema = exports.textSchema = exports.sequenceVisualStyleSchema = exports.transformSchema = exports.captionsSchema = void 0;
|
|
4
4
|
exports.captionsSchema = {
|
|
5
5
|
captions: {
|
|
6
6
|
type: 'remotion-captions',
|
|
@@ -228,14 +228,20 @@ exports.svgPaintSchema = {
|
|
|
228
228
|
},
|
|
229
229
|
...exports.svgStrokeSchema,
|
|
230
230
|
};
|
|
231
|
-
|
|
231
|
+
/**
|
|
232
|
+
* Controls for children content. Currently uses a string field, but the field
|
|
233
|
+
* type may evolve to support richer content.
|
|
234
|
+
*/
|
|
235
|
+
exports.childrenSchema = {
|
|
232
236
|
children: {
|
|
233
|
-
type: '
|
|
237
|
+
type: 'string',
|
|
234
238
|
default: '',
|
|
235
239
|
description: 'Text',
|
|
236
240
|
keyframable: false,
|
|
237
241
|
},
|
|
238
242
|
};
|
|
243
|
+
/** @deprecated Use childrenSchema instead. */
|
|
244
|
+
exports.textContentSchema = exports.childrenSchema;
|
|
239
245
|
exports.premountSchema = {
|
|
240
246
|
premountFor: {
|
|
241
247
|
type: 'number',
|
|
@@ -347,6 +353,27 @@ exports.trimBeforeField = {
|
|
|
347
353
|
step: 1,
|
|
348
354
|
hiddenFromList: true,
|
|
349
355
|
};
|
|
356
|
+
// Packed timeline containers expose timing through the inspector.
|
|
357
|
+
exports.sequenceTimingSchema = {
|
|
358
|
+
from: {
|
|
359
|
+
...exports.fromField,
|
|
360
|
+
description: 'From',
|
|
361
|
+
hiddenFromList: false,
|
|
362
|
+
keyframable: false,
|
|
363
|
+
},
|
|
364
|
+
durationInFrames: {
|
|
365
|
+
...exports.durationInFramesField,
|
|
366
|
+
description: 'Duration',
|
|
367
|
+
hiddenFromList: false,
|
|
368
|
+
keyframable: false,
|
|
369
|
+
},
|
|
370
|
+
trimBefore: {
|
|
371
|
+
...exports.trimBeforeField,
|
|
372
|
+
description: 'Trim before',
|
|
373
|
+
hiddenFromList: false,
|
|
374
|
+
keyframable: false,
|
|
375
|
+
},
|
|
376
|
+
};
|
|
350
377
|
exports.trimAfterField = {
|
|
351
378
|
type: 'number',
|
|
352
379
|
default: undefined,
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -7,24 +7,60 @@ import type { CompositionManagerContext } from './CompositionManagerContext.js';
|
|
|
7
7
|
import * as CSSUtils from './default-css.js';
|
|
8
8
|
import { type OriginalSourceLocation } from './enable-sequence-stack-traces.js';
|
|
9
9
|
import type { SerializedJSONWithCustomFields } from './input-props-serialization.js';
|
|
10
|
-
import { type
|
|
10
|
+
import { type ArrayFieldSchema, type ArrayItemFieldSchema, type AssetFieldSchema, type InteractivitySchema, type InteractivitySchemaField, type VisibleFieldSchema } from './interactivity-schema.js';
|
|
11
11
|
import type { LoggingContextValue } from './log-level-context.js';
|
|
12
12
|
import type { RemotionEnvironment } from './remotion-environment-context.js';
|
|
13
13
|
import type { OverrideIdToNodePaths, OverrideToNodePathGetters, OverrideToNodeSetters } from './sequence-node-path.js';
|
|
14
14
|
import { OverrideIdsToNodePathsGettersContext, OverrideIdsToNodePathsSettersContext } from './sequence-node-path.js';
|
|
15
15
|
import type { ResolvedStackLocation } from './sequence-stack-traces.js';
|
|
16
16
|
import type { CannotUpdateSequenceReason } from './SequenceManager.js';
|
|
17
|
-
import { type CanUpdateEffectPropsResponse, type CanUpdateEffectPropsResponseFalse, type CanUpdateEffectPropsResponseTrue, type CanUpdateSequencePropsResponse, type CanUpdateSequencePropsResponseFalse, type CanUpdateSequencePropsResponseTrue, type SequenceNodePath, type
|
|
17
|
+
import { type CanUpdateEffectPropsResponse, type CanUpdateEffectPropsResponseFalse, type CanUpdateEffectPropsResponseTrue, type CanUpdateSequencePropsResponse, type CanUpdateSequencePropsResponseFalse, type CanUpdateSequencePropsResponseTrue, type SequenceNodePath, type SequencePropsStatusRemapping, type SequencePropsSubscriptionKey, type VideoConfigValues } from './SequenceManager.js';
|
|
18
18
|
import * as TimelinePosition from './timeline-position-state.js';
|
|
19
19
|
import { type PlaybackRateContextValue, type SetTimelineContextValue, type TimelineContextValue } from './TimelineContext.js';
|
|
20
20
|
import { truthy } from './truthy.js';
|
|
21
|
-
import type {
|
|
21
|
+
import type { CanUpdateSequencePropStatusEasing, CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, DragOverrideValue, GetDragOverrides, GetEffectDragOverrides, GetEffectPropStatuses, GetPropStatuses, VideoConfigNumericExpression } from './use-schema.js';
|
|
22
22
|
import { type CanUpdateSequencePropStatus, type DragOverrides, type EffectDragOverrides, type PropStatuses } from './use-schema.js';
|
|
23
23
|
import type { MediaVolumeContextValue, SetMediaVolumeContextValue } from './volume-position-state.js';
|
|
24
24
|
import type { WatchRemotionStaticFilesPayload } from './watch-static-file.js';
|
|
25
25
|
import { useRemotionContexts } from './wrap-remotion-context.js';
|
|
26
26
|
export type { EffectChainState } from './effects/run-effect-chain.js';
|
|
27
27
|
export declare const Internals: {
|
|
28
|
+
readonly OptimisticSequenceDeletion: {
|
|
29
|
+
register: (stack: string | null, node: {
|
|
30
|
+
absolutePath: string;
|
|
31
|
+
nodePath: SequenceNodePath;
|
|
32
|
+
} | null) => void;
|
|
33
|
+
isDeleted: (node: {
|
|
34
|
+
absolutePath: string;
|
|
35
|
+
nodePath: SequenceNodePath;
|
|
36
|
+
} | null, pending: ReadonlySet<string>) => boolean;
|
|
37
|
+
isElementDeleted: (element: import("react").ReactNode, pending: ReadonlySet<string>) => boolean;
|
|
38
|
+
set: (nodes: readonly {
|
|
39
|
+
absolutePath: string;
|
|
40
|
+
nodePath: SequenceNodePath;
|
|
41
|
+
}[], revision: number, deleted: boolean) => void;
|
|
42
|
+
rollback: (nodes: readonly {
|
|
43
|
+
absolutePath: string;
|
|
44
|
+
nodePath: SequenceNodePath;
|
|
45
|
+
}[], revision: number) => void;
|
|
46
|
+
restore: (nodes: readonly {
|
|
47
|
+
absolutePath: string;
|
|
48
|
+
nodePath: SequenceNodePath;
|
|
49
|
+
}[], revision: number, deleted: boolean) => void;
|
|
50
|
+
prepareRetirement: (nodes: readonly {
|
|
51
|
+
absolutePath: string;
|
|
52
|
+
nodePath: SequenceNodePath;
|
|
53
|
+
}[], dispatchedRevision: number) => () => void;
|
|
54
|
+
};
|
|
55
|
+
readonly usePendingSequenceDeletions: () => ReadonlySet<string>;
|
|
56
|
+
readonly createElementSourceProxy: <T extends typeof import("react").createElement | typeof import("react/jsx-runtime").jsx | typeof import("react/jsx-dev-runtime").jsxDEV>(api: T, sourceArgumentIndex: number | null, getSourceFileName: (fileName: string) => string) => T;
|
|
57
|
+
readonly CommittedMetadataProvider: import("react").ProviderExoticComponent<import("react").ProviderProps<null> & {
|
|
58
|
+
readonly _remotionCommitMetadata: import("./committed-metadata.js").CommittedMetadata | null;
|
|
59
|
+
}>;
|
|
60
|
+
readonly withCommittedMetadata: <T>(provider: import("react").Provider<T>) => import("react").ProviderExoticComponent<import("react").ProviderProps<T> & {
|
|
61
|
+
readonly _remotionCommitMetadata: import("./committed-metadata.js").CommittedMetadata | null;
|
|
62
|
+
}>;
|
|
63
|
+
readonly DefaultPremountContext: import("react").Context<number>;
|
|
28
64
|
readonly evaluateSourceNumericValue: (expression: import("./use-schema.js").SourceNumericValue, config: VideoConfigValues | null) => number;
|
|
29
65
|
readonly evaluateSourcePropStatuses: (props: Record<string, import("./use-schema.js").CanUpdateSequencePropSource>, config: VideoConfigValues | null) => Record<string, CanUpdateSequencePropStatus>;
|
|
30
66
|
readonly AbsoluteFillElement: import("react").ForwardRefExoticComponent<Omit<import("./AbsoluteFillElement.js").AbsoluteFillElementProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -102,25 +138,26 @@ export declare const Internals: {
|
|
|
102
138
|
readonly VisualModePropStatusesRefContext: import("react").Context<import("./SequenceManager.js").VisualModePropStatusesRef>;
|
|
103
139
|
readonly VisualModeBatchSettersContext: import("react").Context<import("./SequenceManager.js").VisualModeBatchSetters | null>;
|
|
104
140
|
readonly VisualModeDragOverridesContext: import("react").Context<import("./SequenceManager.js").VisualModeDragOverrides>;
|
|
141
|
+
readonly VisualModeDragOverridesRefContext: import("react").Context<import("react").RefObject<import("./SequenceManager.js").VisualModeDragOverrides>>;
|
|
105
142
|
readonly VisualModeSettersContext: import("react").Context<import("./SequenceManager.js").VisualModeSetters>;
|
|
106
|
-
readonly SequenceManager: import("react").Context<import("./SequenceManager.js").SequenceManagerContext>;
|
|
107
143
|
readonly SequenceManagerProvider: import("react").FC<{
|
|
108
144
|
readonly children: import("react").ReactNode;
|
|
109
145
|
}>;
|
|
110
|
-
readonly SequenceManagerRefContext: import("react").Context<import("./
|
|
146
|
+
readonly SequenceManagerRefContext: import("react").Context<import("./sequence-registry-context.js").SequenceManagerRef>;
|
|
147
|
+
readonly SequenceRegistryContext: import("react").Context<import("./registry-store.js").RegistryStore<TSequence[]> | null>;
|
|
111
148
|
readonly useActiveFromDragOverrideKeys: () => ReadonlySet<string>;
|
|
149
|
+
readonly useDragOverridesForNodePath: (nodePath: SequencePropsSubscriptionKey | null) => Record<string, DragOverrideValue>;
|
|
112
150
|
readonly useSequenceManagerSequences: () => TSequence[];
|
|
113
151
|
readonly SequenceRegistrationContext: import("react").Context<boolean>;
|
|
114
152
|
readonly DisableSequenceRegistrationProvider: import("react").FC<{
|
|
115
153
|
readonly children: import("react").ReactNode;
|
|
116
154
|
}>;
|
|
117
|
-
readonly
|
|
118
|
-
|
|
119
|
-
compositionMarker: symbol;
|
|
120
|
-
folderMarker: symbol;
|
|
121
|
-
sequenceManagerMarker: symbol;
|
|
122
|
-
sequenceMarker: symbol;
|
|
155
|
+
readonly CommittedMetadataInternals: {
|
|
156
|
+
metadataProp: "_remotionCommitMetadata";
|
|
123
157
|
eventName: string;
|
|
158
|
+
installationMarker: symbol;
|
|
159
|
+
failureMarker: symbol;
|
|
160
|
+
registrationErrorEventName: string;
|
|
124
161
|
};
|
|
125
162
|
readonly SequenceOutlineInternals: {
|
|
126
163
|
createRef: () => import("react").RefObject<Element | null>;
|
|
@@ -387,6 +424,42 @@ export declare const Internals: {
|
|
|
387
424
|
};
|
|
388
425
|
};
|
|
389
426
|
};
|
|
427
|
+
readonly sequenceTimingSchema: {
|
|
428
|
+
readonly from: {
|
|
429
|
+
readonly type: "number";
|
|
430
|
+
readonly default: 0;
|
|
431
|
+
readonly step: 1;
|
|
432
|
+
readonly description: "From";
|
|
433
|
+
readonly hiddenFromList: false;
|
|
434
|
+
readonly keyframable: false;
|
|
435
|
+
};
|
|
436
|
+
readonly durationInFrames: {
|
|
437
|
+
readonly type: "number";
|
|
438
|
+
readonly default: undefined;
|
|
439
|
+
readonly min: 1;
|
|
440
|
+
readonly step: 1;
|
|
441
|
+
readonly description: "Duration";
|
|
442
|
+
readonly hiddenFromList: false;
|
|
443
|
+
readonly keyframable: false;
|
|
444
|
+
};
|
|
445
|
+
readonly trimBefore: {
|
|
446
|
+
readonly type: "number";
|
|
447
|
+
readonly default: 0;
|
|
448
|
+
readonly min: 0;
|
|
449
|
+
readonly step: 1;
|
|
450
|
+
readonly description: "Trim before";
|
|
451
|
+
readonly hiddenFromList: false;
|
|
452
|
+
readonly keyframable: false;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
readonly SequenceContent: import("react").FC<{
|
|
456
|
+
readonly children: import("react").ReactNode;
|
|
457
|
+
}>;
|
|
458
|
+
readonly DEFAULT_SEQUENCE_ACTIVITY_LIMIT: 20;
|
|
459
|
+
readonly SequenceActivitySettingsContext: import("react").Context<{
|
|
460
|
+
readonly enabled: boolean;
|
|
461
|
+
readonly limit: number;
|
|
462
|
+
} | null>;
|
|
390
463
|
readonly SequenceWithoutSchema: import("react").ForwardRefExoticComponent<import("./Sequence.js").SequenceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
391
464
|
readonly sequenceStyleSchema: {
|
|
392
465
|
readonly 'style.transformOrigin': {
|
|
@@ -796,15 +869,20 @@ export declare const Internals: {
|
|
|
796
869
|
readonly initialCompositions: import("./CompositionManager.js").AnyComposition[];
|
|
797
870
|
readonly initialCanvasContent: import("./CompositionManagerContext.js").CanvasContent | null;
|
|
798
871
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
872
|
+
readonly CompositionRegistryProvider: import("react").ForwardRefExoticComponent<{
|
|
873
|
+
readonly children: import("react").ReactNode;
|
|
874
|
+
readonly onSnapshot: (snapshot: import("./committed-metadata.js").CommittedCompositionSnapshot) => void;
|
|
875
|
+
} & import("react").RefAttributes<() => void>>;
|
|
799
876
|
readonly useVideo: () => (import("./video-config.js").VideoConfig & {
|
|
800
877
|
component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>> | import("react").ComponentType<Record<string, unknown>>;
|
|
801
878
|
}) | null;
|
|
879
|
+
readonly VideoProvider: import("react").FC<{
|
|
880
|
+
readonly children: import("react").ReactNode;
|
|
881
|
+
}>;
|
|
802
882
|
readonly getRoot: () => import("react").FC<{}> | null;
|
|
803
883
|
readonly useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
804
884
|
readonly usePlayerMutedState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
|
805
|
-
readonly useMediaInTimeline: ({
|
|
806
|
-
volume: import("./volume-prop.js").VolumeProp | undefined;
|
|
807
|
-
mediaVolume: number;
|
|
885
|
+
readonly useMediaInTimeline: ({ src, mediaType, playbackRate, displayName, id, getStack, showInTimeline, premountDisplay, postmountDisplay, loopDisplay, documentationLink, muted, }: {
|
|
808
886
|
src: string | undefined;
|
|
809
887
|
mediaType: "audio" | "video";
|
|
810
888
|
playbackRate: number;
|
|
@@ -815,10 +893,12 @@ export declare const Internals: {
|
|
|
815
893
|
premountDisplay: number | null;
|
|
816
894
|
postmountDisplay: number | null;
|
|
817
895
|
loopDisplay: import("./CompositionManager.js").LoopDisplay | undefined;
|
|
818
|
-
loopVolumeCurveBehavior: import("./index.js").LoopVolumeCurveBehavior;
|
|
819
896
|
documentationLink: string | null;
|
|
820
897
|
muted: boolean;
|
|
821
|
-
}) =>
|
|
898
|
+
}) => {
|
|
899
|
+
automaticOutlineRef: import("react").RefObject<Element | null> | null;
|
|
900
|
+
registration: TSequence | null;
|
|
901
|
+
};
|
|
822
902
|
readonly useLazyComponent: <Props>({ compProps, componentName, noSuspense, }: {
|
|
823
903
|
compProps: CompProps<Props>;
|
|
824
904
|
componentName: string;
|
|
@@ -830,7 +910,7 @@ export declare const Internals: {
|
|
|
830
910
|
readonly SequenceContext: import("react").Context<import("./SequenceContext.js").SequenceContextType | null>;
|
|
831
911
|
readonly TimelineTrackContext: import("react").Context<import("./timeline-track-context.js").TimelineTrack | null>;
|
|
832
912
|
readonly ExperimentalTracksEnabledContext: import("react").Context<boolean>;
|
|
833
|
-
readonly TrackWithoutSchema: import("react").FC<import("./
|
|
913
|
+
readonly TrackWithoutSchema: import("react").FC<import("./Track.js").TrackWithoutSchemaProps>;
|
|
834
914
|
readonly PremountContext: import("react").Context<import("./PremountContext.js").PremountContextValue>;
|
|
835
915
|
readonly usePremounting: ({ from, durationInFrames, premountFor, postmountFor, style, styleWhilePremounted, styleWhilePostmounted, hideWhilePremounted, }: {
|
|
836
916
|
readonly from: number;
|
|
@@ -923,6 +1003,7 @@ export declare const Internals: {
|
|
|
923
1003
|
readonly numberOfAudioTags: number;
|
|
924
1004
|
readonly children: import("react").ReactNode;
|
|
925
1005
|
}>;
|
|
1006
|
+
readonly getAudioSyncAnchorTolerance: (audioContext: AudioContext) => number;
|
|
926
1007
|
readonly invalidCompositionErrorMessage: string;
|
|
927
1008
|
readonly invalidFolderNameErrorMessage: string;
|
|
928
1009
|
readonly calculateMediaDuration: ({ trimAfter, mediaDurationInFrames, playbackRate, trimBefore, }: {
|
|
@@ -1069,7 +1150,6 @@ export declare const Internals: {
|
|
|
1069
1150
|
};
|
|
1070
1151
|
} | null>;
|
|
1071
1152
|
readonly getComponentsToAddStacksTo: () => unknown[];
|
|
1072
|
-
readonly getSequenceComponent: () => unknown;
|
|
1073
1153
|
readonly getSingleChildComponent: (children: import("react").ReactNode) => unknown;
|
|
1074
1154
|
readonly getStackForControls: (controls: import("./CompositionManager.js").SequenceControls) => string | null;
|
|
1075
1155
|
readonly makeOriginalSourceStack: ({ fileName, lineNumber, columnNumber, }: {
|
|
@@ -1194,9 +1274,7 @@ export declare const Internals: {
|
|
|
1194
1274
|
}, "ref"> & import("react").RefAttributes<HTMLAudioElement>>;
|
|
1195
1275
|
readonly OBJECTFIT_CONTAIN_CLASS_NAME: "__remotion_objectfitcontain";
|
|
1196
1276
|
readonly InnerOffthreadVideo: import("react").FC<import("./video/props.js").AllOffthreadVideoProps>;
|
|
1197
|
-
readonly useBasicMediaInTimeline: ({
|
|
1198
|
-
volume: import("./volume-prop.js").VolumeProp | undefined;
|
|
1199
|
-
mediaVolume: number;
|
|
1277
|
+
readonly useBasicMediaInTimeline: ({ src, displayName, trimBefore, trimAfter, playbackRate, sequenceDurationInFrames, mediaStartsAt, loop, muted, }: {
|
|
1200
1278
|
src: string | undefined;
|
|
1201
1279
|
displayName: string | null;
|
|
1202
1280
|
trimBefore: number | undefined;
|
|
@@ -1204,13 +1282,10 @@ export declare const Internals: {
|
|
|
1204
1282
|
playbackRate: number;
|
|
1205
1283
|
sequenceDurationInFrames: number;
|
|
1206
1284
|
mediaStartsAt: number;
|
|
1207
|
-
mediaFrom: number;
|
|
1208
1285
|
loop: boolean;
|
|
1209
1286
|
muted: boolean;
|
|
1210
1287
|
}) => {
|
|
1211
|
-
volumes: string | number;
|
|
1212
1288
|
duration: number;
|
|
1213
|
-
doesVolumeChange: boolean;
|
|
1214
1289
|
finalDisplayName: string;
|
|
1215
1290
|
startMediaFrom: number;
|
|
1216
1291
|
src: string;
|
|
@@ -1273,6 +1348,10 @@ export declare const Internals: {
|
|
|
1273
1348
|
forceSpringAllowTail: boolean | null;
|
|
1274
1349
|
status: CanUpdateSequencePropStatusKeyframed;
|
|
1275
1350
|
}) => string | number | boolean | readonly number[] | null;
|
|
1351
|
+
readonly prepareNumericKeyframedStatus: ({ forceSpringAllowTail, status, }: {
|
|
1352
|
+
forceSpringAllowTail: boolean | null;
|
|
1353
|
+
status: CanUpdateSequencePropStatusKeyframed;
|
|
1354
|
+
}) => ((frame: number) => number | null) | null;
|
|
1276
1355
|
readonly setInterpolatePaths: (interpolator: (input: number, inputRange: readonly number[], outputRange: readonly string[], options: Pick<Partial<{
|
|
1277
1356
|
easing: readonly import("./interpolate.js").EasingFunction[] | import("./interpolate.js").EasingFunction;
|
|
1278
1357
|
extrapolateLeft: import("./interpolate.js").ExtrapolateType;
|
|
@@ -1352,5 +1431,5 @@ export declare const Internals: {
|
|
|
1352
1431
|
readonly componentName: string;
|
|
1353
1432
|
}) => import("react").CSSProperties | null;
|
|
1354
1433
|
};
|
|
1355
|
-
export type { ArrayFieldSchema,
|
|
1434
|
+
export type { ArrayFieldSchema, ArrayItemFieldSchema, AssetFieldSchema, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateEffectPropsResponseFalse, CanUpdateEffectPropsResponseTrue, CanUpdateSequencePropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, CanUpdateSequencePropStatusEasing, CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusStatic, CompositionManagerContext, CompProps, DragOverrides, DragOverrideValue, EffectDragOverrides, GetDragOverrides, GetEffectDragOverrides, GetEffectPropStatuses, GetPropStatuses, InteractivitySchema, InteractivitySchemaField, JsxComponentIdentity, LoggingContextValue, MediaVolumeContextValue, OriginalSourceLocation, OverrideIdsToNodePathsGettersContext, OverrideIdsToNodePathsSettersContext, OverrideIdToNodePaths, OverrideToNodePathGetters, OverrideToNodeSetters, PlaybackRateContextValue, PropStatuses, RemotionAudioContextState, RemotionEnvironment, ResolvedStackLocation, ScheduleAudioNodeOptions, ScheduleAudioNodeResult, SequenceNodePath, SequencePropsStatusRemapping, SequencePropsSubscriptionKey, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TCompMetadata, TComposition, TimelineContextValue, TRenderAsset, TSequence, VideoConfigNumericExpression, VideoConfigValues, VisibleFieldSchema, WatchRemotionStaticFilesPayload, };
|
|
1356
1435
|
export type { CanUpdateSequencePropSource, SourceNumericValue, VideoConfigNumericBinding, } from './use-schema.js';
|
package/dist/cjs/internals.js
CHANGED
|
@@ -39,18 +39,24 @@ const absolute_src_js_1 = require("./absolute-src.js");
|
|
|
39
39
|
const AbsoluteFillElement_js_1 = require("./AbsoluteFillElement.js");
|
|
40
40
|
const get_duration_in_seconds_js_1 = require("./animated-image/get-duration-in-seconds.js");
|
|
41
41
|
const AudioForPreview_js_1 = require("./audio/AudioForPreview.js");
|
|
42
|
+
const get_audio_sync_anchor_tolerance_js_1 = require("./audio/get-audio-sync-anchor-tolerance.js");
|
|
42
43
|
const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
|
|
43
44
|
const use_audio_frame_js_1 = require("./audio/use-audio-frame.js");
|
|
44
45
|
const use_media_audio_state_js_1 = require("./audio/use-media-audio-state.js");
|
|
45
46
|
const buffering_js_1 = require("./buffering.js");
|
|
46
47
|
const calculate_media_duration_js_1 = require("./calculate-media-duration.js");
|
|
47
48
|
const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
49
|
+
const committed_metadata_js_1 = require("./committed-metadata.js");
|
|
50
|
+
const component_identity_js_1 = require("./component-identity.js");
|
|
48
51
|
const composition_render_error_context_js_1 = require("./composition-render-error-context.js");
|
|
49
52
|
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
50
53
|
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
51
54
|
const CompositionManagerProvider_js_1 = require("./CompositionManagerProvider.js");
|
|
55
|
+
const CompositionRegistryProvider_js_1 = require("./CompositionRegistryProvider.js");
|
|
56
|
+
const create_element_source_proxy_js_1 = require("./create-element-source-proxy.js");
|
|
52
57
|
const CSSUtils = __importStar(require("./default-css.js"));
|
|
53
58
|
const default_css_js_1 = require("./default-css.js");
|
|
59
|
+
const DefaultPremountContext_js_1 = require("./DefaultPremountContext.js");
|
|
54
60
|
const EditorProps_js_1 = require("./EditorProps.js");
|
|
55
61
|
const create_effect_js_1 = require("./effects/create-effect.js");
|
|
56
62
|
const run_effect_chain_js_1 = require("./effects/run-effect-chain.js");
|
|
@@ -74,6 +80,7 @@ const log_level_context_js_1 = require("./log-level-context.js");
|
|
|
74
80
|
const log_js_1 = require("./log.js");
|
|
75
81
|
const max_video_cache_size_js_1 = require("./max-video-cache-size.js");
|
|
76
82
|
const media_resource_manager_js_1 = require("./media-resource-manager.js");
|
|
83
|
+
const optimistic_sequence_deletion_js_1 = require("./optimistic-sequence-deletion.js");
|
|
77
84
|
const playback_logging_js_1 = require("./playback-logging.js");
|
|
78
85
|
const portal_node_js_1 = require("./portal-node.js");
|
|
79
86
|
const prefetch_state_js_1 = require("./prefetch-state.js");
|
|
@@ -89,9 +96,9 @@ const resolve_sequence_duration_js_1 = require("./resolve-sequence-duration.js")
|
|
|
89
96
|
const resolve_video_config_js_1 = require("./resolve-video-config.js");
|
|
90
97
|
const ResolveCompositionConfig_js_1 = require("./ResolveCompositionConfig.js");
|
|
91
98
|
const runtime_value_store_js_1 = require("./runtime-value-store.js");
|
|
99
|
+
const sequence_activity_context_js_1 = require("./sequence-activity-context.js");
|
|
92
100
|
const sequence_crop_js_1 = require("./sequence-crop.js");
|
|
93
101
|
const sequence_node_path_js_1 = require("./sequence-node-path.js");
|
|
94
|
-
const sequence_order_marker_js_1 = require("./sequence-order-marker.js");
|
|
95
102
|
const sequence_outline_js_1 = require("./sequence-outline.js");
|
|
96
103
|
const sequence_stack_traces_js_1 = require("./sequence-stack-traces.js");
|
|
97
104
|
const Sequence_js_1 = require("./Sequence.js");
|
|
@@ -139,6 +146,12 @@ const compositionSelectorRef = (0, react_1.createRef)();
|
|
|
139
146
|
// Mark them as Internals so use don't assume this is public
|
|
140
147
|
// API and are less likely to use it
|
|
141
148
|
exports.Internals = {
|
|
149
|
+
OptimisticSequenceDeletion: optimistic_sequence_deletion_js_1.OptimisticSequenceDeletion,
|
|
150
|
+
usePendingSequenceDeletions: optimistic_sequence_deletion_js_1.usePendingSequenceDeletions,
|
|
151
|
+
createElementSourceProxy: create_element_source_proxy_js_1.createElementSourceProxy,
|
|
152
|
+
CommittedMetadataProvider: committed_metadata_js_1.CommittedMetadataProvider,
|
|
153
|
+
withCommittedMetadata: committed_metadata_js_1.withCommittedMetadata,
|
|
154
|
+
DefaultPremountContext: DefaultPremountContext_js_1.DefaultPremountContext,
|
|
142
155
|
evaluateSourceNumericValue: evaluate_source_expressions_js_1.evaluateSourceNumericValue,
|
|
143
156
|
evaluateSourcePropStatuses: evaluate_source_expressions_js_1.evaluateSourcePropStatuses,
|
|
144
157
|
AbsoluteFillElement: AbsoluteFillElement_js_1.AbsoluteFillElement,
|
|
@@ -172,20 +185,26 @@ exports.Internals = {
|
|
|
172
185
|
VisualModePropStatusesRefContext: SequenceManager_js_1.VisualModePropStatusesRefContext,
|
|
173
186
|
VisualModeBatchSettersContext: SequenceManager_js_1.VisualModeBatchSettersContext,
|
|
174
187
|
VisualModeDragOverridesContext: SequenceManager_js_1.VisualModeDragOverridesContext,
|
|
188
|
+
VisualModeDragOverridesRefContext: SequenceManager_js_1.VisualModeDragOverridesRefContext,
|
|
175
189
|
VisualModeSettersContext: SequenceManager_js_1.VisualModeSettersContext,
|
|
176
|
-
SequenceManager: SequenceManager_js_1.SequenceManager,
|
|
177
190
|
SequenceManagerProvider: SequenceManager_js_1.SequenceManagerProvider,
|
|
178
191
|
SequenceManagerRefContext: SequenceManager_js_1.SequenceManagerRefContext,
|
|
192
|
+
SequenceRegistryContext: SequenceManager_js_1.SequenceRegistryContext,
|
|
179
193
|
useActiveFromDragOverrideKeys: SequenceManager_js_1.useActiveFromDragOverrideKeys,
|
|
194
|
+
useDragOverridesForNodePath: SequenceManager_js_1.useDragOverridesForNodePath,
|
|
180
195
|
useSequenceManagerSequences: SequenceManager_js_1.useSequenceManagerSequences,
|
|
181
196
|
SequenceRegistrationContext: SequenceManager_js_1.SequenceRegistrationContext,
|
|
182
197
|
DisableSequenceRegistrationProvider: SequenceManager_js_1.DisableSequenceRegistrationProvider,
|
|
183
|
-
|
|
198
|
+
CommittedMetadataInternals: committed_metadata_js_1.CommittedMetadataInternals,
|
|
184
199
|
SequenceOutlineInternals: sequence_outline_js_1.SequenceOutlineInternals,
|
|
185
200
|
SequenceOutlineContext: sequence_outline_js_1.SequenceOutlineContext,
|
|
186
201
|
SequenceStackTracesUpdateContext: sequence_stack_traces_js_1.SequenceStackTracesUpdateContext,
|
|
187
202
|
baseSchema: interactivity_schema_js_1.baseSchema,
|
|
188
203
|
sequenceSchema: interactivity_schema_js_1.sequenceSchema,
|
|
204
|
+
sequenceTimingSchema: interactivity_schema_js_1.sequenceTimingSchema,
|
|
205
|
+
SequenceContent: sequence_activity_context_js_1.SequenceContent,
|
|
206
|
+
DEFAULT_SEQUENCE_ACTIVITY_LIMIT: sequence_activity_context_js_1.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
|
|
207
|
+
SequenceActivitySettingsContext: sequence_activity_context_js_1.SequenceActivitySettingsContext,
|
|
189
208
|
SequenceWithoutSchema: Sequence_js_1.SequenceWithoutSchema,
|
|
190
209
|
sequenceStyleSchema: interactivity_schema_js_1.sequenceStyleSchema,
|
|
191
210
|
sequenceVisualStyleSchema: interactivity_schema_js_1.sequenceVisualStyleSchema,
|
|
@@ -198,11 +217,13 @@ exports.Internals = {
|
|
|
198
217
|
getFlatSchemaWithAllKeys: flatten_schema_js_1.getFlatSchemaWithAllKeys,
|
|
199
218
|
RemotionRootContexts: RemotionRoot_js_1.RemotionRootContexts,
|
|
200
219
|
CompositionManagerProvider: CompositionManagerProvider_js_1.CompositionManagerProvider,
|
|
220
|
+
CompositionRegistryProvider: CompositionRegistryProvider_js_1.CompositionRegistryProvider,
|
|
201
221
|
useVideo: use_video_js_1.useVideo,
|
|
222
|
+
VideoProvider: use_video_js_1.VideoProvider,
|
|
202
223
|
getRoot: register_root_js_1.getRoot,
|
|
203
224
|
useMediaVolumeState: volume_position_state_js_1.useMediaVolumeState,
|
|
204
225
|
usePlayerMutedState: volume_position_state_js_1.usePlayerMutedState,
|
|
205
|
-
useMediaInTimeline: use_media_in_timeline_js_1.
|
|
226
|
+
useMediaInTimeline: use_media_in_timeline_js_1.useMediaInTimelineRegistration,
|
|
206
227
|
useLazyComponent: use_lazy_component_js_1.useLazyComponent,
|
|
207
228
|
truthy: truthy_js_1.truthy,
|
|
208
229
|
SequenceContext: SequenceContext_js_1.SequenceContext,
|
|
@@ -223,6 +244,7 @@ exports.Internals = {
|
|
|
223
244
|
SharedAudioContextProvider: shared_audio_tags_js_1.SharedAudioContextProvider,
|
|
224
245
|
SharedAudioTagsContext: shared_audio_tags_js_1.SharedAudioTagsContext,
|
|
225
246
|
SharedAudioTagsContextProvider: shared_audio_tags_js_1.SharedAudioTagsContextProvider,
|
|
247
|
+
getAudioSyncAnchorTolerance: get_audio_sync_anchor_tolerance_js_1.getAudioSyncAnchorTolerance,
|
|
226
248
|
invalidCompositionErrorMessage: validate_composition_id_js_1.invalidCompositionErrorMessage,
|
|
227
249
|
invalidFolderNameErrorMessage: validate_folder_name_js_1.invalidFolderNameErrorMessage,
|
|
228
250
|
calculateMediaDuration: calculate_media_duration_js_1.calculateMediaDuration,
|
|
@@ -266,13 +288,12 @@ exports.Internals = {
|
|
|
266
288
|
BufferingProvider: buffering_js_1.BufferingProvider,
|
|
267
289
|
BufferingContextReact: buffering_js_1.BufferingContextReact,
|
|
268
290
|
getComponentsToAddStacksTo: enable_sequence_stack_traces_js_1.getComponentsToAddStacksTo,
|
|
269
|
-
|
|
270
|
-
getSingleChildComponent: enable_sequence_stack_traces_js_1.getSingleChildComponent,
|
|
291
|
+
getSingleChildComponent: component_identity_js_1.getSingleChildComponent,
|
|
271
292
|
getStackForControls: enable_sequence_stack_traces_js_1.getStackForControls,
|
|
272
293
|
makeOriginalSourceStack: enable_sequence_stack_traces_js_1.makeOriginalSourceStack,
|
|
273
294
|
parseOriginalSourceStack: enable_sequence_stack_traces_js_1.parseOriginalSourceStack,
|
|
274
295
|
REMOTION_INTERNAL_STACK_PROP: enable_sequence_stack_traces_js_1.REMOTION_INTERNAL_STACK_PROP,
|
|
275
|
-
setComponentIdentityResolver:
|
|
296
|
+
setComponentIdentityResolver: component_identity_js_1.setComponentIdentityResolver,
|
|
276
297
|
CurrentScaleContext: use_current_scale_js_1.CurrentScaleContext,
|
|
277
298
|
PixelDensityContext: use_pixel_density_js_1.PixelDensityContext,
|
|
278
299
|
PreviewSizeContext: use_current_scale_js_1.PreviewSizeContext,
|
|
@@ -316,6 +337,7 @@ exports.Internals = {
|
|
|
316
337
|
createWebGL2ContextError: webgl2_context_error_js_1.createWebGL2ContextError,
|
|
317
338
|
computeEffectiveSchemaValuesDotNotation: use_schema_js_1.computeEffectiveSchemaValuesDotNotation,
|
|
318
339
|
interpolateKeyframedStatus: interpolate_keyframed_status_js_1.interpolateKeyframedStatus,
|
|
340
|
+
prepareNumericKeyframedStatus: interpolate_keyframed_status_js_1.prepareNumericKeyframedStatus,
|
|
319
341
|
setInterpolatePaths: interpolate_keyframed_status_js_1.setInterpolatePaths,
|
|
320
342
|
makeStaticDragOverride: use_schema_js_1.makeStaticDragOverride,
|
|
321
343
|
makeKeyframedDragOverride: use_schema_js_1.makeKeyframedDragOverride,
|
|
@@ -6,6 +6,10 @@ type PathInterpolator = (input: number, inputRange: readonly number[], outputRan
|
|
|
6
6
|
extrapolateRight: Exclude<ExtrapolateType, 'identity'>;
|
|
7
7
|
}) => string;
|
|
8
8
|
export declare const setInterpolatePaths: (interpolator: PathInterpolator) => void;
|
|
9
|
+
export declare const prepareNumericKeyframedStatus: ({ forceSpringAllowTail, status, }: {
|
|
10
|
+
forceSpringAllowTail: boolean | null;
|
|
11
|
+
status: CanUpdateSequencePropStatusKeyframed;
|
|
12
|
+
}) => ((frame: number) => number | null) | null;
|
|
9
13
|
export declare const interpolateKeyframedStatus: ({ frame, forceSpringAllowTail, status, }: {
|
|
10
14
|
frame: number;
|
|
11
15
|
forceSpringAllowTail: boolean | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.interpolateKeyframedStatus = exports.setInterpolatePaths = void 0;
|
|
3
|
+
exports.interpolateKeyframedStatus = exports.prepareNumericKeyframedStatus = exports.setInterpolatePaths = void 0;
|
|
4
4
|
const bezier_js_1 = require("./bezier.js");
|
|
5
5
|
const easing_js_1 = require("./easing.js");
|
|
6
6
|
const interpolate_colors_js_1 = require("./interpolate-colors.js");
|
|
@@ -34,6 +34,43 @@ const easingToFn = ({ easing, forceSpringAllowTail, }) => {
|
|
|
34
34
|
throw new TypeError(`Unsupported easing: ${JSON.stringify(easing)}`);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
const prepareNumericKeyframedStatus = ({ forceSpringAllowTail, status, }) => {
|
|
38
|
+
if (status.interpolationFunction !== 'interpolate' ||
|
|
39
|
+
status.keyframes.length === 0) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
const sortedKeyframes = [...status.keyframes].sort((a, b) => a.frame - b.frame);
|
|
43
|
+
const inputRange = sortedKeyframes.map((keyframe) => keyframe.frame);
|
|
44
|
+
const outputRange = sortedKeyframes.map((keyframe) => keyframe.value);
|
|
45
|
+
if (!outputRange.every((value) => typeof value === 'number')) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const evaluate = (0, interpolate_js_1.prepareNumericInterpolation)({
|
|
50
|
+
inputRange,
|
|
51
|
+
outputRange,
|
|
52
|
+
options: {
|
|
53
|
+
easing: status.easing.map((easing) => easingToFn({ easing, forceSpringAllowTail })),
|
|
54
|
+
extrapolateLeft: status.clamping.left,
|
|
55
|
+
extrapolateRight: status.clamping.right,
|
|
56
|
+
output: status.output,
|
|
57
|
+
posterize: status.posterize,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
return (frame) => {
|
|
61
|
+
try {
|
|
62
|
+
return evaluate(frame);
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
catch (_a) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.prepareNumericKeyframedStatus = prepareNumericKeyframedStatus;
|
|
37
74
|
const interpolateKeyframedStatus = ({ frame, forceSpringAllowTail, status, }) => {
|
|
38
75
|
const { keyframes, easing, clamping, interpolationFunction } = status;
|
|
39
76
|
if (keyframes.length === 0) {
|
|
@@ -32,4 +32,16 @@ export declare function interpolate(input: number, inputRange: readonly number[]
|
|
|
32
32
|
export declare function interpolate<const Tuple extends NumericTuple>(input: number, inputRange: readonly number[], outputRange: readonly Tuple[], options?: InterpolateOptions): WidenNumericTuple<Tuple>;
|
|
33
33
|
export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly (readonly number[])[], options?: InterpolateOptions): number[];
|
|
34
34
|
export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly InterpolateOutputValue[], options?: InterpolateOptions): number | string | boolean | readonly number[];
|
|
35
|
+
export declare const prepareNumericInterpolation: ({ inputRange, outputRange, options, }: {
|
|
36
|
+
inputRange: readonly number[];
|
|
37
|
+
outputRange: readonly number[];
|
|
38
|
+
options: Omit<Partial<{
|
|
39
|
+
easing: readonly EasingFunction[] | EasingFunction;
|
|
40
|
+
extrapolateLeft: ExtrapolateType;
|
|
41
|
+
extrapolateRight: ExtrapolateType;
|
|
42
|
+
output: InterpolateOutputOption;
|
|
43
|
+
outputType: InterpolateOutputType;
|
|
44
|
+
posterize: number;
|
|
45
|
+
}>, "outputType">;
|
|
46
|
+
}) => (input: number) => number;
|
|
35
47
|
export {};
|
package/dist/cjs/interpolate.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareNumericInterpolation = void 0;
|
|
3
4
|
exports.assertValidInterpolateEasingOption = assertValidInterpolateEasingOption;
|
|
4
5
|
exports.assertValidInterpolatePosterizeOption = assertValidInterpolatePosterizeOption;
|
|
5
6
|
exports.interpolate = interpolate;
|
|
@@ -895,3 +896,9 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
895
896
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
896
897
|
}
|
|
897
898
|
/* eslint-enable no-redeclare */
|
|
899
|
+
const prepareNumericInterpolation = ({ inputRange, outputRange, options, }) => {
|
|
900
|
+
// Validate the fixed inputs once, using the same checks as interpolate().
|
|
901
|
+
interpolate(inputRange[0], inputRange, outputRange, options);
|
|
902
|
+
return (input) => interpolateNumber({ input, inputRange, outputRange, options });
|
|
903
|
+
};
|
|
904
|
+
exports.prepareNumericInterpolation = prepareNumericInterpolation;
|
package/dist/cjs/no-react.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ import { validateDimension } from './validation/validate-dimensions';
|
|
|
12
12
|
import { validateDurationInFrames } from './validation/validate-duration-in-frames';
|
|
13
13
|
import { validateFps } from './validation/validate-fps';
|
|
14
14
|
export declare const NoReactInternals: {
|
|
15
|
+
DEFAULT_PREMOUNT_IN_SECONDS: number;
|
|
16
|
+
DEFAULT_STUDIO_PREMOUNT_IN_SECONDS: number;
|
|
17
|
+
DEFAULT_SEQUENCE_ACTIVITY_LIMIT: number;
|
|
18
|
+
validateDefaultPremountInSeconds: (value: unknown) => void;
|
|
15
19
|
evaluateSourceNumericValue: (expression: import("./use-schema.js").SourceNumericValue, config: import("./video-config").VideoConfigValues | null) => number;
|
|
16
20
|
evaluateSourcePropStatuses: (props: Record<string, import("./use-schema.js").CanUpdateSequencePropSource>, config: import("./video-config").VideoConfigValues | null) => Record<string, import("./use-schema.js").CanUpdateSequencePropStatus>;
|
|
17
21
|
processColor: typeof processColor;
|
package/dist/cjs/no-react.js
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NoReactInternals = exports.random = exports.interpolate = exports.assertValidInterpolatePosterizeOption = exports.assertValidInterpolateEasingOption = void 0;
|
|
4
4
|
const evaluate_source_expressions_js_1 = require("./evaluate-source-expressions.js");
|
|
5
|
+
const sequence_activity_defaults_js_1 = require("./sequence-activity-defaults.js");
|
|
5
6
|
const interpolate_1 = require("./interpolate");
|
|
6
7
|
Object.defineProperty(exports, "assertValidInterpolateEasingOption", { enumerable: true, get: function () { return interpolate_1.assertValidInterpolateEasingOption; } });
|
|
7
8
|
Object.defineProperty(exports, "assertValidInterpolatePosterizeOption", { enumerable: true, get: function () { return interpolate_1.assertValidInterpolatePosterizeOption; } });
|
|
8
9
|
Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return interpolate_1.interpolate; } });
|
|
9
10
|
const random_js_1 = require("./random.js");
|
|
10
11
|
Object.defineProperty(exports, "random", { enumerable: true, get: function () { return random_js_1.random; } });
|
|
12
|
+
const default_premount_in_seconds_1 = require("./default-premount-in-seconds");
|
|
11
13
|
const delay_render_constants_1 = require("./delay-render-constants");
|
|
12
14
|
const find_props_to_delete_1 = require("./find-props-to-delete");
|
|
13
15
|
const font_face_registry_1 = require("./font-face-registry");
|
|
@@ -28,6 +30,10 @@ const validate_fps_1 = require("./validation/validate-fps");
|
|
|
28
30
|
const get_current_time_1 = require("./video/get-current-time");
|
|
29
31
|
const offthread_video_source_1 = require("./video/offthread-video-source");
|
|
30
32
|
exports.NoReactInternals = {
|
|
33
|
+
DEFAULT_PREMOUNT_IN_SECONDS: default_premount_in_seconds_1.DEFAULT_PREMOUNT_IN_SECONDS,
|
|
34
|
+
DEFAULT_STUDIO_PREMOUNT_IN_SECONDS: default_premount_in_seconds_1.DEFAULT_STUDIO_PREMOUNT_IN_SECONDS,
|
|
35
|
+
DEFAULT_SEQUENCE_ACTIVITY_LIMIT: sequence_activity_defaults_js_1.DEFAULT_SEQUENCE_ACTIVITY_LIMIT,
|
|
36
|
+
validateDefaultPremountInSeconds: default_premount_in_seconds_1.validateDefaultPremountInSeconds,
|
|
31
37
|
evaluateSourceNumericValue: evaluate_source_expressions_js_1.evaluateSourceNumericValue,
|
|
32
38
|
evaluateSourcePropStatuses: evaluate_source_expressions_js_1.evaluateSourcePropStatuses,
|
|
33
39
|
processColor: interpolate_colors_1.processColor,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { SequenceNodePath } from './SequenceManager.js';
|
|
3
|
+
type Node = {
|
|
4
|
+
absolutePath: string;
|
|
5
|
+
nodePath: SequenceNodePath;
|
|
6
|
+
};
|
|
7
|
+
export declare const usePendingSequenceDeletions: () => ReadonlySet<string>;
|
|
8
|
+
export declare const OptimisticSequenceDeletion: {
|
|
9
|
+
register: (stack: string | null, node: Node | null) => void;
|
|
10
|
+
isDeleted: (node: Node | null, pending: ReadonlySet<string>) => boolean;
|
|
11
|
+
isElementDeleted: (element: ReactNode, pending: ReadonlySet<string>) => boolean;
|
|
12
|
+
set: (nodes: readonly Node[], revision: number, deleted: boolean) => void;
|
|
13
|
+
rollback: (nodes: readonly Node[], revision: number) => void;
|
|
14
|
+
restore: (nodes: readonly Node[], revision: number, deleted: boolean) => void;
|
|
15
|
+
prepareRetirement: (nodes: readonly Node[], dispatchedRevision: number) => () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|