remotion 4.0.533 → 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 +4 -4
- package/dist/cjs/CompositionManagerContext.d.ts +1 -6
- package/dist/cjs/CompositionManagerContext.js +0 -4
- package/dist/cjs/CompositionManagerProvider.js +77 -172
- 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 +179 -31
- 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 +6 -2
- package/dist/cjs/Sequence.js +107 -40
- 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 +13 -29
- package/dist/cjs/SequenceManager.js +36 -176
- package/dist/cjs/SequenceRegistryProvider.d.ts +4 -0
- package/dist/cjs/SequenceRegistryProvider.js +292 -0
- package/dist/cjs/Track.d.ts +13 -0
- package/dist/cjs/Track.js +33 -0
- package/dist/cjs/animated-image/AnimatedImage.js +42 -30
- 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 +4 -2
- 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 +5 -3
- 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.d.ts +3 -1
- package/dist/cjs/effects/use-memoized-effects.js +104 -21
- package/dist/cjs/enable-sequence-stack-traces.d.ts +2 -8
- package/dist/cjs/enable-sequence-stack-traces.js +7 -38
- package/dist/cjs/evaluate-source-expressions.d.ts +5 -0
- package/dist/cjs/evaluate-source-expressions.js +98 -0
- package/dist/cjs/freeze.js +9 -8
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/interactivity-schema.d.ts +45 -9
- package/dist/cjs/interactivity-schema.js +30 -3
- package/dist/cjs/internals.d.ts +113 -27
- package/dist/cjs/internals.js +37 -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 +6 -0
- package/dist/cjs/no-react.js +9 -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 +15 -5
- package/dist/cjs/timeline-position-state.js +11 -3
- package/dist/cjs/timeline-track-context.d.ts +10 -0
- package/dist/cjs/timeline-track-context.js +6 -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 +29 -119
- package/dist/cjs/use-premounting.js +3 -4
- package/dist/cjs/use-schema.d.ts +32 -18
- 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/video/html5-video.js +1 -1
- package/dist/cjs/with-interactivity-schema.js +48 -16
- package/dist/cjs/wrap-remotion-context.d.ts +17 -2
- package/dist/cjs/wrap-remotion-context.js +108 -4
- package/dist/esm/index.mjs +3526 -2259
- package/dist/esm/no-react.mjs +149 -35
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
|
@@ -105,9 +105,9 @@ const runEffectChain = async ({ state, source, effects, output, width, height, }
|
|
|
105
105
|
let flipWebGLSourceY = true;
|
|
106
106
|
for (let runIndex = 0; runIndex < runs.length; runIndex++) {
|
|
107
107
|
const run = runs[runIndex];
|
|
108
|
-
|
|
109
|
-
let dst = a;
|
|
108
|
+
let canvasIndex = 0;
|
|
110
109
|
for (const eff of run.effects) {
|
|
110
|
+
const dst = state.pool.getCanvas(run.backend, canvasIndex);
|
|
111
111
|
const def = eff.definition;
|
|
112
112
|
if (run.backend === 'webgl2') {
|
|
113
113
|
// Checked before `setup()`: a lost context cannot compile shaders,
|
|
@@ -132,7 +132,7 @@ const runEffectChain = async ({ state, source, effects, output, width, height, }
|
|
|
132
132
|
flipWebGLSourceY = true;
|
|
133
133
|
}
|
|
134
134
|
currentImage = dst;
|
|
135
|
-
|
|
135
|
+
canvasIndex = canvasIndex === 0 ? 1 : 0;
|
|
136
136
|
}
|
|
137
137
|
lastTarget = (_a = currentImage) !== null && _a !== void 0 ? _a : lastTarget;
|
|
138
138
|
const nextRun = runs[runIndex + 1];
|
|
@@ -2,6 +2,7 @@ import type { RuntimeValueStore } from '../runtime-value-store.js';
|
|
|
2
2
|
import type { CannotUpdateEffectReason, CannotUpdateSequenceReason } from '../SequenceManager.js';
|
|
3
3
|
import { type SequencePropsSubscriptionKey } from '../SequenceManager.js';
|
|
4
4
|
import { type CanUpdateSequencePropStatus, type PropStatuses } from '../use-schema.js';
|
|
5
|
+
import type { VideoConfigValues } from '../video-config.js';
|
|
5
6
|
import type { EffectDefinitionAndStack, EffectDescriptor, EffectDefinition } from './effect-types.js';
|
|
6
7
|
export declare const useMemoizedEffectDefinitions: (effects: readonly EffectDescriptor<unknown>[]) => readonly EffectDefinition<unknown>[] & {
|
|
7
8
|
readonly runtimeValues: readonly RuntimeValueStore[];
|
|
@@ -23,8 +24,9 @@ export declare const getEffectPropStatusesCtx: ({ propStatuses, nodePath, effect
|
|
|
23
24
|
}) => EffectStatus;
|
|
24
25
|
export declare const getPropStatusesCtx: (propStatuses: PropStatuses, nodePath: SequencePropsSubscriptionKey) => Record<string, CanUpdateSequencePropStatus> | undefined;
|
|
25
26
|
export type GetPropStatusesType = typeof getPropStatusesCtx;
|
|
26
|
-
export declare const useMemoizedEffects: ({ effects, overrideId, }: {
|
|
27
|
+
export declare const useMemoizedEffects: ({ effects, overrideId, videoConfigValues, }: {
|
|
27
28
|
effects: readonly EffectDescriptor<unknown>[];
|
|
28
29
|
readonly overrideId: string | null;
|
|
30
|
+
videoConfigValues: VideoConfigValues | null;
|
|
29
31
|
}) => EffectDefinitionAndStack<unknown>[];
|
|
30
32
|
export {};
|
|
@@ -1,14 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var _a;
|
|
2
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
37
|
exports.useMemoizedEffects = exports.getPropStatusesCtx = exports.getEffectPropStatusesCtx = exports.useMemoizedEffectDefinitions = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const evaluate_source_expressions_js_1 = require("../evaluate-source-expressions.js");
|
|
5
40
|
const get_effective_visual_mode_value_js_1 = require("../get-effective-visual-mode-value.js");
|
|
6
41
|
const interpolate_keyframed_status_js_1 = require("../interpolate-keyframed-status.js");
|
|
7
42
|
const runtime_value_store_js_1 = require("../runtime-value-store.js");
|
|
43
|
+
const sequence_activity_context_js_1 = require("../sequence-activity-context.js");
|
|
8
44
|
const sequence_node_path_js_1 = require("../sequence-node-path.js");
|
|
9
45
|
const SequenceManager_js_1 = require("../SequenceManager.js");
|
|
10
46
|
const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
11
47
|
const emptyDragOverrides = {};
|
|
48
|
+
const useCacheCommitEffect = (_a = react_1.default.useInsertionEffect) !== null && _a !== void 0 ? _a : react_1.useLayoutEffect;
|
|
12
49
|
const mergeOverrides = ({ descriptor, propStatusOverrides, dragOverrides, frame, }) => {
|
|
13
50
|
if (!propStatusOverrides && !dragOverrides) {
|
|
14
51
|
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
@@ -66,6 +103,7 @@ const resolvePropStatusOverrides = (propStatus, frame) => {
|
|
|
66
103
|
return hasAny ? out : null;
|
|
67
104
|
};
|
|
68
105
|
const useMemoizedEffectDefinitions = (effects) => {
|
|
106
|
+
const activityDormant = (0, react_1.useContext)(sequence_activity_context_js_1.SequenceActivityDormantContext);
|
|
69
107
|
const previousRef = (0, react_1.useRef)(null);
|
|
70
108
|
const definitions = effects.map((descriptor) => descriptor.definition);
|
|
71
109
|
const previous = previousRef.current;
|
|
@@ -75,7 +113,51 @@ const useMemoizedEffectDefinitions = (effects) => {
|
|
|
75
113
|
const controllers = isSame
|
|
76
114
|
? previous.controllers
|
|
77
115
|
: effects.map((effect) => (0, runtime_value_store_js_1.createRuntimeValueStore)(effect.params));
|
|
78
|
-
const stableDefinitions = isSame
|
|
116
|
+
const stableDefinitions = isSame
|
|
117
|
+
? previous.definitions
|
|
118
|
+
: Object.assign(definitions, {
|
|
119
|
+
runtimeValues: controllers.map((controller) => controller.store),
|
|
120
|
+
});
|
|
121
|
+
useCacheCommitEffect(() => {
|
|
122
|
+
// Insertion effects also run for hidden Activity commits. Store listeners
|
|
123
|
+
// must run after React finishes committing, never inside an insertion effect.
|
|
124
|
+
previousRef.current = { definitions: stableDefinitions, controllers };
|
|
125
|
+
if (!activityDormant || controllers.length === 0) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let cancelled = false;
|
|
129
|
+
queueMicrotask(() => {
|
|
130
|
+
if (cancelled) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
controllers.forEach((controller, index) => {
|
|
134
|
+
var _a;
|
|
135
|
+
const snapshot = (_a = effects[index]) === null || _a === void 0 ? void 0 : _a.params;
|
|
136
|
+
const currentSnapshot = controller.store.getSnapshot();
|
|
137
|
+
if (Object.is(snapshot, currentSnapshot)) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
// Equivalent inline params should not notify inspector subscribers on
|
|
141
|
+
// every dormant render. Preserve changes to keys and leaf references.
|
|
142
|
+
if (snapshot !== null &&
|
|
143
|
+
currentSnapshot !== null &&
|
|
144
|
+
typeof snapshot === 'object' &&
|
|
145
|
+
typeof currentSnapshot === 'object') {
|
|
146
|
+
const keys = Object.keys(snapshot);
|
|
147
|
+
if (keys.length === Object.keys(currentSnapshot).length &&
|
|
148
|
+
keys.every((key) => Object.prototype.hasOwnProperty.call(currentSnapshot, key) &&
|
|
149
|
+
Object.is(snapshot[key], currentSnapshot[key]))) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
controller.setSnapshot(snapshot);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
return () => {
|
|
157
|
+
// A newer commit or unmount supersedes this pending publication.
|
|
158
|
+
cancelled = true;
|
|
159
|
+
};
|
|
160
|
+
}, [activityDormant, controllers, effects, stableDefinitions]);
|
|
79
161
|
(0, react_1.useLayoutEffect)(() => {
|
|
80
162
|
// Stores are intentionally updated without changing the registered effect
|
|
81
163
|
// array, so frame-dependent parameters don't re-register the Sequence.
|
|
@@ -85,10 +167,7 @@ const useMemoizedEffectDefinitions = (effects) => {
|
|
|
85
167
|
controllers[index].setSnapshot(snapshot);
|
|
86
168
|
});
|
|
87
169
|
}, [controllers, effects, stableDefinitions]);
|
|
88
|
-
|
|
89
|
-
return Object.assign(stableDefinitions, {
|
|
90
|
-
runtimeValues: controllers.map((controller) => controller.store),
|
|
91
|
-
});
|
|
170
|
+
return stableDefinitions;
|
|
92
171
|
};
|
|
93
172
|
exports.useMemoizedEffectDefinitions = useMemoizedEffectDefinitions;
|
|
94
173
|
const getEffectPropStatusesCtx = ({ propStatuses, nodePath, effectIndex, }) => {
|
|
@@ -106,7 +185,10 @@ const getEffectPropStatusesCtx = ({ propStatuses, nodePath, effectIndex, }) => {
|
|
|
106
185
|
if (!effect.canUpdate) {
|
|
107
186
|
return { type: 'cannot-update-effect', reason: effect.reason };
|
|
108
187
|
}
|
|
109
|
-
return {
|
|
188
|
+
return {
|
|
189
|
+
type: 'can-update-effect',
|
|
190
|
+
props: (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(effect.props, nodePath.videoConfigValues),
|
|
191
|
+
};
|
|
110
192
|
};
|
|
111
193
|
exports.getEffectPropStatusesCtx = getEffectPropStatusesCtx;
|
|
112
194
|
const getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
@@ -117,10 +199,10 @@ const getPropStatusesCtx = (propStatuses, nodePath) => {
|
|
|
117
199
|
if (!status.canUpdate) {
|
|
118
200
|
return undefined;
|
|
119
201
|
}
|
|
120
|
-
return status.props;
|
|
202
|
+
return (0, evaluate_source_expressions_js_1.evaluateSourcePropStatuses)(status.props, nodePath.videoConfigValues);
|
|
121
203
|
};
|
|
122
204
|
exports.getPropStatusesCtx = getPropStatusesCtx;
|
|
123
|
-
const useMemoizedEffects = ({ effects, overrideId, }) => {
|
|
205
|
+
const useMemoizedEffects = ({ effects, overrideId, videoConfigValues, }) => {
|
|
124
206
|
var _a;
|
|
125
207
|
const previousRef = (0, react_1.useRef)(null);
|
|
126
208
|
const { propStatuses } = (0, react_1.useContext)(SequenceManager_js_1.VisualModePropStatusesContext);
|
|
@@ -130,7 +212,7 @@ const useMemoizedEffects = ({ effects, overrideId, }) => {
|
|
|
130
212
|
const nodePath = overrideId
|
|
131
213
|
? ((_a = overrideIdToNodePathMappings[overrideId]) !== null && _a !== void 0 ? _a : null)
|
|
132
214
|
: null;
|
|
133
|
-
const effectDragOverrides = (0, SequenceManager_js_1.useEffectDragOverridesForNodePath)(nodePath
|
|
215
|
+
const effectDragOverrides = (0, SequenceManager_js_1.useEffectDragOverridesForNodePath)(nodePath);
|
|
134
216
|
const resolved = effects.map((descriptor, index) => {
|
|
135
217
|
var _a;
|
|
136
218
|
if (nodePath === null) {
|
|
@@ -142,7 +224,7 @@ const useMemoizedEffects = ({ effects, overrideId, }) => {
|
|
|
142
224
|
}
|
|
143
225
|
const effectStatus = (0, exports.getEffectPropStatusesCtx)({
|
|
144
226
|
propStatuses,
|
|
145
|
-
nodePath,
|
|
227
|
+
nodePath: { ...nodePath, videoConfigValues },
|
|
146
228
|
effectIndex: index,
|
|
147
229
|
});
|
|
148
230
|
const propStatusOverrides = effectStatus.type === 'can-update-effect'
|
|
@@ -162,16 +244,17 @@ const useMemoizedEffects = ({ effects, overrideId, }) => {
|
|
|
162
244
|
previous.length === resolved.length &&
|
|
163
245
|
previous.every((p, i) => p.definition === resolved[i].descriptor.definition &&
|
|
164
246
|
p.effectKey === resolved[i].effectKey);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
247
|
+
const next = isSame
|
|
248
|
+
? previous
|
|
249
|
+
: resolved.map(({ descriptor, params, effectKey }) => ({
|
|
250
|
+
definition: descriptor.definition,
|
|
251
|
+
effectKey,
|
|
252
|
+
params,
|
|
253
|
+
memoized: true,
|
|
254
|
+
}));
|
|
255
|
+
useCacheCommitEffect(() => {
|
|
256
|
+
previousRef.current = next;
|
|
257
|
+
}, [next]);
|
|
175
258
|
return next;
|
|
176
259
|
};
|
|
177
260
|
exports.useMemoizedEffects = useMemoizedEffects;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { SequenceControls } from './CompositionManager.js';
|
|
3
|
-
|
|
2
|
+
export declare const setSequenceComponent: (component: unknown) => void;
|
|
3
|
+
export declare const getSequenceComponent: () => unknown;
|
|
4
4
|
export declare const REMOTION_INTERNAL_STACK_PROP = "_remotionInternalStack";
|
|
5
5
|
export type OriginalSourceLocation = {
|
|
6
6
|
fileName: string;
|
|
@@ -15,11 +15,5 @@ export declare const makeOriginalSourceStack: ({ fileName, lineNumber, columnNum
|
|
|
15
15
|
export declare const parseOriginalSourceStack: (stack: string | null) => OriginalSourceLocation | null;
|
|
16
16
|
export declare const getComponentsToAddStacksTo: () => unknown[];
|
|
17
17
|
export declare const addSequenceStackTraces: (component: unknown) => void;
|
|
18
|
-
export declare const setSequenceComponent: (component: unknown) => void;
|
|
19
|
-
export declare const getSequenceComponent: () => unknown;
|
|
20
|
-
export declare const setComponentIdentityResolver: (resolver: ComponentIdentityResolver | null) => void;
|
|
21
|
-
export declare const resolveComponentIdentity: (component: unknown) => unknown;
|
|
22
18
|
export declare const setStackForControls: (controls: SequenceControls, stack: string | undefined) => void;
|
|
23
19
|
export declare const getStackForControls: (controls: SequenceControls) => string | null;
|
|
24
|
-
export declare const getSingleChildComponent: (children: React.ReactNode) => unknown;
|
|
25
|
-
export {};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
3
|
+
exports.getStackForControls = exports.setStackForControls = exports.addSequenceStackTraces = exports.getComponentsToAddStacksTo = exports.parseOriginalSourceStack = exports.makeOriginalSourceStack = exports.REMOTION_INTERNAL_STACK_PROP = exports.getSequenceComponent = exports.setSequenceComponent = void 0;
|
|
8
4
|
const componentsToAddStacksTo = [];
|
|
9
5
|
let sequenceComponent = null;
|
|
6
|
+
const setSequenceComponent = (component) => {
|
|
7
|
+
sequenceComponent = component;
|
|
8
|
+
};
|
|
9
|
+
exports.setSequenceComponent = setSequenceComponent;
|
|
10
|
+
const getSequenceComponent = () => sequenceComponent;
|
|
11
|
+
exports.getSequenceComponent = getSequenceComponent;
|
|
10
12
|
const stacksByControls = new WeakMap();
|
|
11
|
-
// Studio installs a resolver that maps refreshed component implementations to
|
|
12
|
-
// the stable family object maintained by React Refresh.
|
|
13
|
-
let componentIdentityResolver = null;
|
|
14
13
|
exports.REMOTION_INTERNAL_STACK_PROP = '_remotionInternalStack';
|
|
15
14
|
// Bundlers that know where a JSX element was written encode its source
|
|
16
15
|
// location as a synthetic stack frame, so consumers can skip symbolication.
|
|
@@ -41,21 +40,6 @@ const addSequenceStackTraces = (component) => {
|
|
|
41
40
|
componentsToAddStacksTo.push(component);
|
|
42
41
|
};
|
|
43
42
|
exports.addSequenceStackTraces = addSequenceStackTraces;
|
|
44
|
-
const setSequenceComponent = (component) => {
|
|
45
|
-
sequenceComponent = component;
|
|
46
|
-
};
|
|
47
|
-
exports.setSequenceComponent = setSequenceComponent;
|
|
48
|
-
const getSequenceComponent = () => sequenceComponent;
|
|
49
|
-
exports.getSequenceComponent = getSequenceComponent;
|
|
50
|
-
const setComponentIdentityResolver = (resolver) => {
|
|
51
|
-
componentIdentityResolver = resolver;
|
|
52
|
-
};
|
|
53
|
-
exports.setComponentIdentityResolver = setComponentIdentityResolver;
|
|
54
|
-
const resolveComponentIdentity = (component) => {
|
|
55
|
-
var _a;
|
|
56
|
-
return (_a = componentIdentityResolver === null || componentIdentityResolver === void 0 ? void 0 : componentIdentityResolver(component)) !== null && _a !== void 0 ? _a : component;
|
|
57
|
-
};
|
|
58
|
-
exports.resolveComponentIdentity = resolveComponentIdentity;
|
|
59
43
|
const setStackForControls = (controls, stack) => {
|
|
60
44
|
if (stack === undefined) {
|
|
61
45
|
stacksByControls.delete(controls);
|
|
@@ -69,18 +53,3 @@ const getStackForControls = (controls) => {
|
|
|
69
53
|
return (_a = stacksByControls.get(controls)) !== null && _a !== void 0 ? _a : null;
|
|
70
54
|
};
|
|
71
55
|
exports.getStackForControls = getStackForControls;
|
|
72
|
-
const getSingleChildComponent = (children) => {
|
|
73
|
-
const mountedChildren = react_1.default.Children.toArray(children);
|
|
74
|
-
if (mountedChildren.length !== 1) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const child = mountedChildren[0];
|
|
78
|
-
if (!react_1.default.isValidElement(child)) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
if (typeof child.type !== 'function' && typeof child.type !== 'object') {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
return (0, exports.resolveComponentIdentity)(child.type);
|
|
85
|
-
};
|
|
86
|
-
exports.getSingleChildComponent = getSingleChildComponent;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CanUpdateSequencePropSource, CanUpdateSequencePropStatus, SourceNumericValue } from './use-schema.js';
|
|
2
|
+
import type { VideoConfigValues } from './video-config.js';
|
|
3
|
+
export declare const evaluateSourceNumericValue: (expression: SourceNumericValue, config: VideoConfigValues | null) => number;
|
|
4
|
+
/** Resolve at the consumer, never in the shared source subscription cache. */
|
|
5
|
+
export declare const evaluateSourcePropStatuses: (props: Record<string, CanUpdateSequencePropSource>, config: VideoConfigValues | null) => Record<string, CanUpdateSequencePropStatus>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.evaluateSourcePropStatuses = exports.evaluateSourceNumericValue = void 0;
|
|
4
|
+
const evaluateSourceNumericValue = (expression, config) => {
|
|
5
|
+
var _a;
|
|
6
|
+
if (typeof expression === 'number') {
|
|
7
|
+
return expression;
|
|
8
|
+
}
|
|
9
|
+
if (expression.type === 'literal') {
|
|
10
|
+
return expression.value;
|
|
11
|
+
}
|
|
12
|
+
if (expression.type === 'binary') {
|
|
13
|
+
const left = (0, exports.evaluateSourceNumericValue)(expression.left, config);
|
|
14
|
+
const right = (0, exports.evaluateSourceNumericValue)(expression.right, config);
|
|
15
|
+
switch (expression.operator) {
|
|
16
|
+
case '+':
|
|
17
|
+
return left + right;
|
|
18
|
+
case '-':
|
|
19
|
+
return left - right;
|
|
20
|
+
case '*':
|
|
21
|
+
return left * right;
|
|
22
|
+
case '/':
|
|
23
|
+
return left / right;
|
|
24
|
+
default:
|
|
25
|
+
throw new Error('Unknown source expression operator');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const value = expression.binding.type === 'constant'
|
|
29
|
+
? expression.binding.value
|
|
30
|
+
: ((_a = config === null || config === void 0 ? void 0 : config[expression.binding.field]) !== null && _a !== void 0 ? _a : NaN);
|
|
31
|
+
if (expression.type === 'video-config-multiplication') {
|
|
32
|
+
return value * expression.multiplier;
|
|
33
|
+
}
|
|
34
|
+
if (expression.type === 'video-config-subtraction') {
|
|
35
|
+
return value - expression.subtrahend;
|
|
36
|
+
}
|
|
37
|
+
return value;
|
|
38
|
+
};
|
|
39
|
+
exports.evaluateSourceNumericValue = evaluateSourceNumericValue;
|
|
40
|
+
const evaluatedProps = new WeakMap();
|
|
41
|
+
/** Resolve at the consumer, never in the shared source subscription cache. */
|
|
42
|
+
const evaluateSourcePropStatuses = (props, config) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const configKey = config === null
|
|
45
|
+
? ''
|
|
46
|
+
: `${config.durationInFrames}:${config.fps}:${config.width}:${config.height}`;
|
|
47
|
+
const cached = (_a = evaluatedProps.get(props)) !== null && _a !== void 0 ? _a : new Map();
|
|
48
|
+
const existing = cached.get(configKey);
|
|
49
|
+
if (existing)
|
|
50
|
+
return existing;
|
|
51
|
+
const result = Object.fromEntries(Object.entries(props).map(([key, status]) => {
|
|
52
|
+
var _a;
|
|
53
|
+
if (status.status === 'computed') {
|
|
54
|
+
return [key, status];
|
|
55
|
+
}
|
|
56
|
+
const adjustment = status.keyframeDisplayOffsetAdjustment === null
|
|
57
|
+
? null
|
|
58
|
+
: (0, exports.evaluateSourceNumericValue)(status.keyframeDisplayOffsetAdjustment, config);
|
|
59
|
+
const rate = (0, exports.evaluateSourceNumericValue)((_a = status.keyframePlaybackRateAdjustment) !== null && _a !== void 0 ? _a : 1, config);
|
|
60
|
+
if ((adjustment !== null && !Number.isFinite(adjustment)) ||
|
|
61
|
+
!Number.isFinite(rate) ||
|
|
62
|
+
rate <= 0) {
|
|
63
|
+
return [key, { status: 'computed' }];
|
|
64
|
+
}
|
|
65
|
+
const timing = {
|
|
66
|
+
keyframeDisplayOffsetAdjustment: adjustment,
|
|
67
|
+
...(status.keyframePlaybackRateAdjustment === undefined
|
|
68
|
+
? {}
|
|
69
|
+
: { keyframePlaybackRateAdjustment: rate }),
|
|
70
|
+
};
|
|
71
|
+
if (status.status === 'static') {
|
|
72
|
+
const value = status.numericExpression === undefined
|
|
73
|
+
? status.codeValue
|
|
74
|
+
: (0, exports.evaluateSourceNumericValue)(status.numericExpression, config);
|
|
75
|
+
return [
|
|
76
|
+
key,
|
|
77
|
+
status.numericExpression !== undefined && !Number.isFinite(value)
|
|
78
|
+
? { status: 'computed' }
|
|
79
|
+
: { ...status, ...timing, codeValue: value },
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
const keyframes = status.keyframes.map((keyframe) => ({
|
|
83
|
+
...keyframe,
|
|
84
|
+
frame: (0, exports.evaluateSourceNumericValue)(keyframe.frame, config),
|
|
85
|
+
}));
|
|
86
|
+
if (keyframes.some((keyframe, index) => !Number.isFinite(keyframe.frame) ||
|
|
87
|
+
(index > 0 && keyframe.frame <= keyframes[index - 1].frame))) {
|
|
88
|
+
return [key, { status: 'computed' }];
|
|
89
|
+
}
|
|
90
|
+
return [key, { ...status, ...timing, keyframes }];
|
|
91
|
+
}));
|
|
92
|
+
cached.set(configKey, result);
|
|
93
|
+
if (cached.size > 8)
|
|
94
|
+
cached.delete(cached.keys().next().value);
|
|
95
|
+
evaluatedProps.set(props, cached);
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
exports.evaluateSourcePropStatuses = evaluateSourcePropStatuses;
|
package/dist/cjs/freeze.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Freeze = exports.useIsInsideNonPremountFreeze = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const sequence_activity_context_js_1 = require("./sequence-activity-context.js");
|
|
6
7
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
7
8
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
8
9
|
const TimelineContext_js_1 = require("./TimelineContext.js");
|
|
@@ -40,16 +41,16 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, _remotionIntern
|
|
|
40
41
|
}
|
|
41
42
|
}, [active, frame]);
|
|
42
43
|
const timelineContext = (0, timeline_position_state_js_1.useTimelineContext)();
|
|
44
|
+
const activityDormant = (0, react_1.useContext)(sequence_activity_context_js_1.SequenceActivityDormantContext);
|
|
43
45
|
const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext);
|
|
44
46
|
const isInsideNonPremountFreeze = (0, exports.useIsInsideNonPremountFreeze)();
|
|
45
47
|
const relativeFrom = (_a = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom) !== null && _a !== void 0 ? _a : 0;
|
|
46
48
|
const playbackRate = (_b = sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.playbackRate) !== null && _b !== void 0 ? _b : 1;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
49
|
+
const { audioAndVideoTags } = timelineContext;
|
|
50
|
+
// Advancing the outer timeline must not invalidate the frozen clock.
|
|
51
|
+
const frozenTimelineValue = (0, react_1.useMemo)(() => {
|
|
51
52
|
return {
|
|
52
|
-
|
|
53
|
+
audioAndVideoTags,
|
|
53
54
|
isPlaying: () => false,
|
|
54
55
|
isInsideFreeze: true,
|
|
55
56
|
frame: {
|
|
@@ -57,8 +58,7 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, _remotionIntern
|
|
|
57
58
|
},
|
|
58
59
|
};
|
|
59
60
|
}, [
|
|
60
|
-
|
|
61
|
-
timelineContext,
|
|
61
|
+
audioAndVideoTags,
|
|
62
62
|
videoConfig.id,
|
|
63
63
|
frameToFreeze,
|
|
64
64
|
relativeFrom,
|
|
@@ -76,7 +76,8 @@ const Freeze = ({ frame: frameToFreeze, children, active = true, _remotionIntern
|
|
|
76
76
|
cumulatedFrom: 0,
|
|
77
77
|
};
|
|
78
78
|
}, [sequenceContext, isActive]);
|
|
79
|
+
const providedTimeline = isActive ? frozenTimelineValue : timelineContext;
|
|
79
80
|
return (jsx_runtime_1.jsx(NonPremountFreezeContext.Provider, { value: isInsideNonPremountFreeze ||
|
|
80
|
-
(Boolean(isActive) && !_remotionInternalIsPremounting), children: jsx_runtime_1.jsx(TimelineContext_js_1.TimelineContext.Provider, { value:
|
|
81
|
+
(Boolean(isActive) && !_remotionInternalIsPremounting), children: jsx_runtime_1.jsx(TimelineContext_js_1.TimelineContext.Provider, { value: providedTimeline, children: jsx_runtime_1.jsx(sequence_activity_context_js_1.SequenceActivityTimelineContext.Provider, { value: activityDormant ? providedTimeline : null, children: jsx_runtime_1.jsx(SequenceContext_js_1.SequenceContext.Provider, { value: newSequenceContext, children: children }) }) }) }));
|
|
81
82
|
};
|
|
82
83
|
exports.Freeze = Freeze;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare global {
|
|
|
34
34
|
remotion_calculateComposition: (compId: string) => Promise<VideoConfigWithSerializedProps>;
|
|
35
35
|
remotion_setBundleMode: (bundleMode: BundleState) => void;
|
|
36
36
|
remotion_staticBase: string;
|
|
37
|
+
remotion_outputsBase: string | null;
|
|
37
38
|
remotion_staticFiles: StaticFile[];
|
|
38
39
|
remotion_publicPath: string;
|
|
39
40
|
remotion_publicFolderExists: string | null;
|
|
@@ -145,6 +146,7 @@ export * from './spring/index.js';
|
|
|
145
146
|
export { staticFile } from './static-file.js';
|
|
146
147
|
export * from './Still.js';
|
|
147
148
|
export type { PlayableMediaTag } from './timeline-position-state.js';
|
|
149
|
+
export { Track, type TrackProps } from './Track.js';
|
|
148
150
|
export { useBufferState } from './use-buffer-state';
|
|
149
151
|
export { useCurrentFrame } from './use-current-frame.js';
|
|
150
152
|
export { CurrentScaleContextType, PreviewSize, PreviewSizeCtx, Translation, useCurrentScale, } from './use-current-scale';
|
|
@@ -162,12 +164,10 @@ export { watchStaticFile } from './watch-static-file.js';
|
|
|
162
164
|
export declare const Experimental: {
|
|
163
165
|
/**
|
|
164
166
|
* @description This is a special component that will cause Remotion to only partially capture the frame of the video.
|
|
165
|
-
* @see [Documentation](https://www.remotion.dev/docs/clipper)
|
|
166
167
|
*/
|
|
167
168
|
Clipper: import("react").FC<{}>;
|
|
168
169
|
/**
|
|
169
170
|
* @description This is a special component, that, when rendered, will skip rendering the frame altogether.
|
|
170
|
-
* @see [Documentation](https://www.remotion.dev/docs/null)
|
|
171
171
|
*/
|
|
172
172
|
Null: import("react").FC<{}>;
|
|
173
173
|
useIsPlayer: () => boolean;
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Config = exports.Experimental = exports.watchStaticFile = exports.MediaPlaybackError = exports.Video = exports.OffthreadVideo = exports.Html5Video = exports.useRemotionEnvironment = exports.usePixelDensity = exports.useDelayRender = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.assertValidInterpolatePosterizeOption = exports.assertValidInterpolateEasingOption = exports.Loop = exports.interpolateColors = exports.Interactive = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.CanvasImage = exports.isHtmlInCanvasSupported = exports.HtmlInCanvas = exports.getHtmlInCanvasUnsupportedMessage = exports.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = exports.Solid = exports.cancelRender = exports.Html5Audio = exports.Audio = exports.Artifact = exports.createEffect = void 0;
|
|
17
|
+
exports.Config = exports.Experimental = exports.watchStaticFile = exports.MediaPlaybackError = exports.Video = exports.OffthreadVideo = exports.Html5Video = exports.useRemotionEnvironment = exports.usePixelDensity = exports.useDelayRender = exports.useCurrentScale = exports.useCurrentFrame = exports.useBufferState = exports.Track = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.prefetch = exports.random = exports.interpolate = exports.assertValidInterpolatePosterizeOption = exports.assertValidInterpolateEasingOption = exports.Loop = exports.interpolateColors = exports.Interactive = exports.Img = exports.getStaticFiles = exports.getRemotionEnvironment = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Composition = exports.CanvasImage = exports.isHtmlInCanvasSupported = exports.HtmlInCanvas = exports.getHtmlInCanvasUnsupportedMessage = exports.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = exports.Solid = exports.cancelRender = exports.Html5Audio = exports.Audio = exports.Artifact = exports.createEffect = void 0;
|
|
18
18
|
require("./_check-rsc.js");
|
|
19
19
|
require("./asset-types.js");
|
|
20
20
|
const Clipper_js_1 = require("./Clipper.js");
|
|
@@ -91,6 +91,8 @@ __exportStar(require("./spring/index.js"), exports);
|
|
|
91
91
|
const static_file_js_1 = require("./static-file.js");
|
|
92
92
|
Object.defineProperty(exports, "staticFile", { enumerable: true, get: function () { return static_file_js_1.staticFile; } });
|
|
93
93
|
__exportStar(require("./Still.js"), exports);
|
|
94
|
+
const Track_js_1 = require("./Track.js");
|
|
95
|
+
Object.defineProperty(exports, "Track", { enumerable: true, get: function () { return Track_js_1.Track; } });
|
|
94
96
|
const use_buffer_state_1 = require("./use-buffer-state");
|
|
95
97
|
Object.defineProperty(exports, "useBufferState", { enumerable: true, get: function () { return use_buffer_state_1.useBufferState; } });
|
|
96
98
|
const use_current_frame_js_1 = require("./use-current-frame.js");
|
|
@@ -117,12 +119,10 @@ Object.defineProperty(exports, "watchStaticFile", { enumerable: true, get: funct
|
|
|
117
119
|
exports.Experimental = {
|
|
118
120
|
/**
|
|
119
121
|
* @description This is a special component that will cause Remotion to only partially capture the frame of the video.
|
|
120
|
-
* @see [Documentation](https://www.remotion.dev/docs/clipper)
|
|
121
122
|
*/
|
|
122
123
|
Clipper: Clipper_js_1.Clipper,
|
|
123
124
|
/**
|
|
124
125
|
* @description This is a special component, that, when rendered, will skip rendering the frame altogether.
|
|
125
|
-
* @see [Documentation](https://www.remotion.dev/docs/null)
|
|
126
126
|
*/
|
|
127
127
|
Null: Null_js_1.Null,
|
|
128
128
|
useIsPlayer: is_player_js_1.useIsPlayer,
|
|
@@ -86,12 +86,17 @@ export type ColorFieldSchema = {
|
|
|
86
86
|
description?: string;
|
|
87
87
|
keyframable?: boolean;
|
|
88
88
|
};
|
|
89
|
-
export type
|
|
90
|
-
type: '
|
|
89
|
+
export type StringFieldSchema = {
|
|
90
|
+
type: 'string';
|
|
91
91
|
default: string;
|
|
92
92
|
description?: string;
|
|
93
93
|
keyframable?: false;
|
|
94
94
|
};
|
|
95
|
+
/** @deprecated Use StringFieldSchema with type: 'string' instead. */
|
|
96
|
+
export type TextContentFieldSchema = Omit<StringFieldSchema, 'type'> & {
|
|
97
|
+
/** @deprecated Use 'string' instead. */
|
|
98
|
+
type: 'text-content';
|
|
99
|
+
};
|
|
95
100
|
export type SvgPathFieldSchema = {
|
|
96
101
|
type: 'svg-path';
|
|
97
102
|
default: string | undefined;
|
|
@@ -152,7 +157,7 @@ export type CaptionsFieldSchema = {
|
|
|
152
157
|
description?: string;
|
|
153
158
|
keyframable: false;
|
|
154
159
|
};
|
|
155
|
-
export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | TextContentFieldSchema | SvgPathFieldSchema | FontFamilyFieldSchema | FontWeightFieldSchema | AssetFieldSchema | ArrayFieldSchema | CaptionsFieldSchema | EnumFieldSchema;
|
|
160
|
+
export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | StringFieldSchema | TextContentFieldSchema | SvgPathFieldSchema | FontFamilyFieldSchema | FontWeightFieldSchema | AssetFieldSchema | ArrayFieldSchema | CaptionsFieldSchema | EnumFieldSchema;
|
|
156
161
|
export type InteractivitySchemaField = VisibleFieldSchema | HiddenFieldSchema;
|
|
157
162
|
export type InteractivitySchema = {
|
|
158
163
|
[key: string]: InteractivitySchemaField;
|
|
@@ -431,13 +436,16 @@ export declare const svgPaintSchema: {
|
|
|
431
436
|
readonly description: "Fill";
|
|
432
437
|
};
|
|
433
438
|
};
|
|
439
|
+
/**
|
|
440
|
+
* Controls for children content. Currently uses a string field, but the field
|
|
441
|
+
* type may evolve to support richer content.
|
|
442
|
+
*/
|
|
443
|
+
export declare const childrenSchema: {
|
|
444
|
+
children: InteractivitySchemaField;
|
|
445
|
+
};
|
|
446
|
+
/** @deprecated Use childrenSchema instead. */
|
|
434
447
|
export declare const textContentSchema: {
|
|
435
|
-
|
|
436
|
-
readonly type: "text-content";
|
|
437
|
-
readonly default: "";
|
|
438
|
-
readonly description: "Text";
|
|
439
|
-
readonly keyframable: false;
|
|
440
|
-
};
|
|
448
|
+
children: InteractivitySchemaField;
|
|
441
449
|
};
|
|
442
450
|
export declare const premountSchema: {
|
|
443
451
|
readonly premountFor: {
|
|
@@ -756,6 +764,34 @@ export declare const trimBeforeField: {
|
|
|
756
764
|
readonly step: 1;
|
|
757
765
|
readonly hiddenFromList: true;
|
|
758
766
|
};
|
|
767
|
+
export declare const sequenceTimingSchema: {
|
|
768
|
+
readonly from: {
|
|
769
|
+
readonly type: "number";
|
|
770
|
+
readonly default: 0;
|
|
771
|
+
readonly step: 1;
|
|
772
|
+
readonly description: "From";
|
|
773
|
+
readonly hiddenFromList: false;
|
|
774
|
+
readonly keyframable: false;
|
|
775
|
+
};
|
|
776
|
+
readonly durationInFrames: {
|
|
777
|
+
readonly type: "number";
|
|
778
|
+
readonly default: undefined;
|
|
779
|
+
readonly min: 1;
|
|
780
|
+
readonly step: 1;
|
|
781
|
+
readonly description: "Duration";
|
|
782
|
+
readonly hiddenFromList: false;
|
|
783
|
+
readonly keyframable: false;
|
|
784
|
+
};
|
|
785
|
+
readonly trimBefore: {
|
|
786
|
+
readonly type: "number";
|
|
787
|
+
readonly default: 0;
|
|
788
|
+
readonly min: 0;
|
|
789
|
+
readonly step: 1;
|
|
790
|
+
readonly description: "Trim before";
|
|
791
|
+
readonly hiddenFromList: false;
|
|
792
|
+
readonly keyframable: false;
|
|
793
|
+
};
|
|
794
|
+
};
|
|
759
795
|
export declare const trimAfterField: {
|
|
760
796
|
readonly type: "number";
|
|
761
797
|
readonly default: undefined;
|