@remotion/studio-shared 4.0.473 → 4.0.475
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/api-requests.d.ts +27 -0
- package/dist/component-drag-data.d.ts +27 -0
- package/dist/component-drag-data.js +101 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +20 -6
- package/dist/keyframe-easing-presets.d.ts +7 -0
- package/dist/keyframe-easing-presets.js +8 -0
- package/dist/keyframe-interpolation-function.js +1 -0
- package/dist/optimistic-add-keyframe.js +0 -1
- package/dist/optimistic-update-for-effect-prop-statuses.d.ts +8 -0
- package/dist/optimistic-update-for-effect-prop-statuses.js +43 -0
- package/dist/optimistic-update-for-prop-statuses.d.ts +7 -0
- package/dist/optimistic-update-for-prop-statuses.js +30 -0
- package/dist/optimistic-update-keyframe-settings.js +27 -2
- package/dist/package-info.d.ts +1 -1
- package/dist/package-info.js +4 -0
- package/dist/required-package.d.ts +1 -0
- package/dist/required-package.js +16 -1
- package/dist/schema-field-info.d.ts +7 -7
- package/dist/schema-field-info.js +6 -5
- package/dist/sfx-drag-data.d.ts +10 -0
- package/dist/sfx-drag-data.js +41 -0
- package/dist/url.d.ts +1 -0
- package/dist/url.js +13 -0
- package/package.json +4 -4
package/dist/api-requests.d.ts
CHANGED
|
@@ -2,12 +2,16 @@ import type { AudioCodec, ChromeMode, Codec, ColorSpace, LogLevel, PixelFormat,
|
|
|
2
2
|
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
3
3
|
import type { _InternalTypes, CannotUpdateSequenceReason, CanUpdateEffectPropsResponse, CanUpdateSequencePropsResponseFalse, CanUpdateSequencePropsResponseTrue, CanUpdateSequencePropStatus, ExtrapolateType, SequenceNodePath, SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
|
|
4
4
|
import type { RecastCodemod, VisualControlChange } from './codemods';
|
|
5
|
+
import type { ComponentProp } from './component-drag-data';
|
|
5
6
|
import type { EffectClipboardParam, EffectClipboardPasteType, EffectClipboardSnapshot } from './effect-clipboard-data';
|
|
6
7
|
import type { PackageManager } from './package-manager';
|
|
7
8
|
import type { ProjectInfo } from './project-info';
|
|
8
9
|
import type { CompletedClientRender, RequiredChromiumOptions } from './render-job';
|
|
9
10
|
import type { SymbolicatedStackFrame } from './stack-types';
|
|
10
11
|
import type { EnumPath } from './stringify-default-props';
|
|
12
|
+
type KeyframeEasing = Extract<CanUpdateSequencePropStatus, {
|
|
13
|
+
status: 'keyframed';
|
|
14
|
+
}>['easing'][number];
|
|
11
15
|
export type OpenInFileExplorerRequest = {
|
|
12
16
|
directory: string;
|
|
13
17
|
};
|
|
@@ -329,6 +333,7 @@ export type AddSequenceKeyframeRequest = {
|
|
|
329
333
|
clientId: string;
|
|
330
334
|
};
|
|
331
335
|
export type AddSequenceKeyframeResponse = SaveSequencePropsResponse;
|
|
336
|
+
export type AddSequenceKeyframe = Omit<AddSequenceKeyframeRequest, 'clientId'>;
|
|
332
337
|
export type DeleteEffectKeyframe = {
|
|
333
338
|
fileName: string;
|
|
334
339
|
sequenceNodePath: SequencePropsSubscriptionKey;
|
|
@@ -373,12 +378,26 @@ export type AddEffectKeyframeRequest = {
|
|
|
373
378
|
clientId: string;
|
|
374
379
|
};
|
|
375
380
|
export type AddEffectKeyframeResponse = SaveEffectPropsResponse;
|
|
381
|
+
export type AddEffectKeyframe = Omit<AddEffectKeyframeRequest, 'clientId'>;
|
|
382
|
+
export type AddKeyframesRequest = {
|
|
383
|
+
sequenceKeyframes: AddSequenceKeyframe[];
|
|
384
|
+
effectKeyframes: AddEffectKeyframe[];
|
|
385
|
+
clientId: string;
|
|
386
|
+
};
|
|
387
|
+
export type AddKeyframesResponse = {
|
|
388
|
+
success: true;
|
|
389
|
+
};
|
|
376
390
|
export type KeyframeSettings = {
|
|
391
|
+
type: 'settings';
|
|
377
392
|
clamping: {
|
|
378
393
|
left: ExtrapolateType;
|
|
379
394
|
right: ExtrapolateType;
|
|
380
395
|
} | undefined;
|
|
381
396
|
posterize: number | undefined;
|
|
397
|
+
} | {
|
|
398
|
+
type: 'easing';
|
|
399
|
+
segmentIndex: number;
|
|
400
|
+
easing: KeyframeEasing;
|
|
382
401
|
};
|
|
383
402
|
export type UpdateSequenceKeyframeSettingsRequest = {
|
|
384
403
|
fileName: string;
|
|
@@ -460,10 +479,17 @@ export type InsertableCompositionElement = {
|
|
|
460
479
|
type: 'solid';
|
|
461
480
|
width: number;
|
|
462
481
|
height: number;
|
|
482
|
+
} | {
|
|
483
|
+
type: 'component';
|
|
484
|
+
componentName: string;
|
|
485
|
+
importName: string;
|
|
486
|
+
importPath: string;
|
|
487
|
+
props: ComponentProp[];
|
|
463
488
|
} | {
|
|
464
489
|
type: 'asset';
|
|
465
490
|
assetType: 'image' | 'video' | 'gif' | 'audio';
|
|
466
491
|
src: string;
|
|
492
|
+
srcType: 'static' | 'remote';
|
|
467
493
|
dimensions: {
|
|
468
494
|
width: number;
|
|
469
495
|
height: number;
|
|
@@ -557,6 +583,7 @@ export type ApiRoutes = {
|
|
|
557
583
|
'/api/move-keyframes': ReqAndRes<MoveKeyframesRequest, MoveKeyframesResponse>;
|
|
558
584
|
'/api/add-sequence-keyframe': ReqAndRes<AddSequenceKeyframeRequest, AddSequenceKeyframeResponse>;
|
|
559
585
|
'/api/add-effect-keyframe': ReqAndRes<AddEffectKeyframeRequest, AddEffectKeyframeResponse>;
|
|
586
|
+
'/api/add-keyframes': ReqAndRes<AddKeyframesRequest, AddKeyframesResponse>;
|
|
560
587
|
'/api/update-sequence-keyframe-settings': ReqAndRes<UpdateSequenceKeyframeSettingsRequest, UpdateSequenceKeyframeSettingsResponse>;
|
|
561
588
|
'/api/update-effect-keyframe-settings': ReqAndRes<UpdateEffectKeyframeSettingsRequest, UpdateEffectKeyframeSettingsResponse>;
|
|
562
589
|
'/api/delete-effect': ReqAndRes<DeleteEffectRequest, DeleteEffectResponse>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const COMPONENT_DRAG_MIME_TYPE = "application/vnd.remotion.component+json";
|
|
2
|
+
export type ComponentProp = {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string | number | boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ComponentDragData = {
|
|
7
|
+
type: 'remotion-component';
|
|
8
|
+
version: 1;
|
|
9
|
+
component: {
|
|
10
|
+
componentName: string;
|
|
11
|
+
importName: string;
|
|
12
|
+
importPath: string;
|
|
13
|
+
props: ComponentProp[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const isComponentIdentifier: (value: unknown) => value is string;
|
|
17
|
+
export declare const isComponentImportPath: (value: unknown) => value is string;
|
|
18
|
+
export declare const isComponentPropName: (value: unknown) => value is string;
|
|
19
|
+
export declare const isComponentProp: (value: unknown) => value is ComponentProp;
|
|
20
|
+
export declare const areComponentProps: (value: unknown) => value is ComponentProp[];
|
|
21
|
+
export declare const makeComponentDragData: ({ componentName, importName, importPath, props, }: {
|
|
22
|
+
componentName: string;
|
|
23
|
+
importName: string;
|
|
24
|
+
importPath: string;
|
|
25
|
+
props: ComponentProp[];
|
|
26
|
+
}) => ComponentDragData;
|
|
27
|
+
export declare const parseComponentDragData: (value: string) => ComponentDragData | null;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseComponentDragData = exports.makeComponentDragData = exports.areComponentProps = exports.isComponentProp = exports.isComponentPropName = exports.isComponentImportPath = exports.isComponentIdentifier = exports.COMPONENT_DRAG_MIME_TYPE = void 0;
|
|
4
|
+
exports.COMPONENT_DRAG_MIME_TYPE = 'application/vnd.remotion.component+json';
|
|
5
|
+
const isRecord = (value) => {
|
|
6
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
7
|
+
};
|
|
8
|
+
const isComponentIdentifier = (value) => {
|
|
9
|
+
return typeof value === 'string' && /^[A-Z_$][A-Za-z0-9_$]*$/.test(value);
|
|
10
|
+
};
|
|
11
|
+
exports.isComponentIdentifier = isComponentIdentifier;
|
|
12
|
+
const isComponentImportPath = (value) => {
|
|
13
|
+
return (typeof value === 'string' &&
|
|
14
|
+
value.length > 0 &&
|
|
15
|
+
value.length < 200 &&
|
|
16
|
+
!value.includes('\\') &&
|
|
17
|
+
!value.includes('\0') &&
|
|
18
|
+
!value.startsWith('/') &&
|
|
19
|
+
/^[A-Za-z0-9@._/-]+$/.test(value));
|
|
20
|
+
};
|
|
21
|
+
exports.isComponentImportPath = isComponentImportPath;
|
|
22
|
+
const isComponentPropName = (value) => {
|
|
23
|
+
return (typeof value === 'string' &&
|
|
24
|
+
value !== 'style' &&
|
|
25
|
+
/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value));
|
|
26
|
+
};
|
|
27
|
+
exports.isComponentPropName = isComponentPropName;
|
|
28
|
+
const isComponentProp = (value) => {
|
|
29
|
+
if (!isRecord(value)) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (!(0, exports.isComponentPropName)(value.name)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return (typeof value.value === 'string' ||
|
|
36
|
+
typeof value.value === 'boolean' ||
|
|
37
|
+
(typeof value.value === 'number' && Number.isFinite(value.value)));
|
|
38
|
+
};
|
|
39
|
+
exports.isComponentProp = isComponentProp;
|
|
40
|
+
const areComponentProps = (value) => {
|
|
41
|
+
if (!Array.isArray(value)) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const seen = new Set();
|
|
45
|
+
for (const prop of value) {
|
|
46
|
+
if (!(0, exports.isComponentProp)(prop) || seen.has(prop.name)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
seen.add(prop.name);
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
};
|
|
53
|
+
exports.areComponentProps = areComponentProps;
|
|
54
|
+
const makeComponentDragData = ({ componentName, importName, importPath, props, }) => {
|
|
55
|
+
return {
|
|
56
|
+
type: 'remotion-component',
|
|
57
|
+
version: 1,
|
|
58
|
+
component: {
|
|
59
|
+
componentName,
|
|
60
|
+
importName,
|
|
61
|
+
importPath,
|
|
62
|
+
props,
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
exports.makeComponentDragData = makeComponentDragData;
|
|
67
|
+
const parseComponentDragData = (value) => {
|
|
68
|
+
try {
|
|
69
|
+
const parsed = JSON.parse(value);
|
|
70
|
+
if (!isRecord(parsed)) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
if (parsed.type !== 'remotion-component' || parsed.version !== 1) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
if (!isRecord(parsed.component)) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const { componentName, importName, importPath, props } = parsed.component;
|
|
80
|
+
if (!(0, exports.isComponentIdentifier)(componentName) ||
|
|
81
|
+
!(0, exports.isComponentIdentifier)(importName) ||
|
|
82
|
+
!(0, exports.isComponentImportPath)(importPath) ||
|
|
83
|
+
!(0, exports.areComponentProps)(props)) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
type: 'remotion-component',
|
|
88
|
+
version: 1,
|
|
89
|
+
component: {
|
|
90
|
+
componentName,
|
|
91
|
+
importName,
|
|
92
|
+
importPath,
|
|
93
|
+
props,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
catch (_a) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.parseComponentDragData = parseComponentDragData;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export { splitAnsi, stripAnsi } from './ansi';
|
|
2
|
-
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DownloadRemoteAssetRequest, DownloadRemoteAssetResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InstallPackageRequest, InstallPackageResponse, LogStudioErrorRequest, LogStudioErrorResponse, MoveEffectKeyframe, MoveKeyframesRequest, MoveKeyframesResponse, MoveSequenceKeyframe, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, ReorderEffectRequest, ReorderEffectResponse, ReorderSequencePosition, ReorderSequenceRequest, ReorderSequenceResponse,
|
|
2
|
+
export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddKeyframesRequest, AddKeyframesResponse, AddEffectRequest, AddEffectResponse, AddRenderRequest, AddSequenceKeyframeRequest, AddSequenceKeyframeResponse, ApiRoutes, ApplyCodemodRequest, ApplyCodemodResponse, ApplyVisualControlRequest, ApplyVisualControlResponse, CanUpdateDefaultPropsResponse, CanUpdateSequencePropsRequest, CancelRenderRequest, CancelRenderResponse, CompositionComponentInfoRequest, CompositionComponentInfoResponse, CopyStillToClipboardRequest, DeleteEffectKeyframe, DeleteEffectRequest, DeleteEffectRequestItem, DeleteEffectResponse, DeleteJsxNodeRequest, DeleteJsxNodeRequestItem, DeleteJsxNodeResponse, DeleteKeyframesRequest, DeleteKeyframesResponse, DeleteSequenceKeyframe, DeleteStaticFileRequest, DeleteStaticFileResponse, DownloadRemoteAssetRequest, DownloadRemoteAssetResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InstallPackageRequest, InstallPackageResponse, LogStudioErrorRequest, LogStudioErrorResponse, MoveEffectKeyframe, MoveKeyframesRequest, MoveKeyframesResponse, MoveSequenceKeyframe, OpenInEditorRequest, OpenInEditorResponse, OpenInFileExplorerRequest, PasteEffectsRequest, PasteEffectsResponse, ProjectInfoRequest, ProjectInfoResponse, RedoRequest, RedoResponse, RemoveRenderRequest, RenameStaticFileRequest, RenameStaticFileResponse, ReorderEffectRequest, ReorderEffectResponse, ReorderSequencePosition, ReorderSequenceRequest, ReorderSequenceResponse, RestartStudioRequest, RestartStudioResponse, SaveEffectPropsRequest, SaveEffectPropsResponse, SaveSequencePropEdit, SaveSequencePropsRequest, SaveSequencePropsResponse, SaveSequencePropsResult, SimpleDiff, SubscribeToDefaultPropsRequest, SubscribeToDefaultPropsResponse, SubscribeToFileExistenceRequest, SubscribeToFileExistenceResponse, SubscribeToSequencePropsRequest, SubscribeToSequencePropsResponse, UndoRequest, UndoResponse, UnsubscribeFromDefaultPropsRequest, UnsubscribeFromFileExistenceRequest, UnsubscribeFromSequencePropsRequest, UpdateAvailableRequest, UpdateAvailableResponse, UpdateDefaultPropsRequest, UpdateDefaultPropsResponse, UpdateEffectKeyframeSettingsRequest, UpdateEffectKeyframeSettingsResponse, UpdateSequenceKeyframeSettingsRequest, UpdateSequenceKeyframeSettingsResponse, type KeyframeSettings, type AddEffectKeyframe, type AddSequenceKeyframe, } from './api-requests';
|
|
3
3
|
export { ASSET_DRAG_MIME_TYPE, makeAssetDragData, parseAssetDragData, type AssetDragData, } from './asset-drag-data';
|
|
4
4
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
5
|
+
export { COMPONENT_DRAG_MIME_TYPE, areComponentProps, isComponentIdentifier, isComponentImportPath, makeComponentDragData, parseComponentDragData, type ComponentDragData, type ComponentProp, } from './component-drag-data';
|
|
5
6
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
7
|
+
export { KEYFRAME_EASING_PRESETS, type KeyframeEasingPreset, } from './keyframe-easing-presets';
|
|
6
8
|
export { detectFileType, isImageFileType, type FileDimensions, type FileType, type ImageFileType, } from './detect-file-type';
|
|
7
9
|
export { parseEffectClipboardData, parseEffectClipboardDataResult, parseEffectPropClipboardData, parseEffectPropClipboardDataResult, type EffectClipboardClamping, type EffectClipboardData, type EffectClipboardDataParseResult, type EffectClipboardEasing, type EffectClipboardExtrapolateType, type EffectClipboardInterpolationFunction, type EffectClipboardKeyframe, type EffectClipboardKeyframedParam, type EffectClipboardParam, type EffectClipboardPasteType, type EffectClipboardSnapshot, type EffectClipboardStaticParam, type EffectPropClipboardData, type EffectPropClipboardDataParseResult, } from './effect-clipboard-data';
|
|
8
10
|
export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from './effect-drag-data';
|
|
@@ -24,14 +26,16 @@ export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, Browse
|
|
|
24
26
|
export type { CompletedClientRender } from './render-job';
|
|
25
27
|
export { getRequiredPackageForEffectImportPath, getRequiredPackageForInsertableElement, } from './required-package';
|
|
26
28
|
export { SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, } from './schema-field-info';
|
|
27
|
-
export type { AnySchemaFieldInfo,
|
|
29
|
+
export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, PropStatuses, SchemaFieldInfo, SequenceControls, SequenceSchemaFieldInfo, } from './schema-field-info';
|
|
30
|
+
export { SFX_DRAG_MIME_TYPE, parseSfxDragData, type SfxDragData, } from './sfx-drag-data';
|
|
28
31
|
export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
|
|
29
32
|
export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
|
|
30
33
|
export type { VisualControlChange } from './codemods';
|
|
31
34
|
export { optimisticAddEffectKeyframe, optimisticAddSequenceKeyframe, } from './optimistic-add-keyframe';
|
|
32
35
|
export { optimisticDeleteEffectKeyframe, optimisticDeleteEffectKeyframes, optimisticDeleteSequenceKeyframe, optimisticDeleteSequenceKeyframes, } from './optimistic-delete-keyframe';
|
|
33
36
|
export { canMoveKeyframesWithoutCollisions, optimisticMoveEffectKeyframes, optimisticMoveSequenceKeyframes, type OptimisticKeyframeMove, } from './optimistic-move-keyframe';
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
37
|
+
export { optimisticUpdateForEffectPropStatuses } from './optimistic-update-for-effect-prop-statuses';
|
|
38
|
+
export { optimisticUpdateForPropStatuses } from './optimistic-update-for-prop-statuses';
|
|
36
39
|
export { optimisticUpdateEffectKeyframeSettings, optimisticUpdateSequenceKeyframeSettings, } from './optimistic-update-keyframe-settings';
|
|
37
40
|
export { stringifySequenceExpandedRowKey, stringifySequenceSubscriptionKey, } from './stringify-sequence-subscription-key';
|
|
41
|
+
export { isUrl } from './url';
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ 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.
|
|
18
|
-
exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = void 0;
|
|
17
|
+
exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.stringifyDefaultProps = exports.parseSfxDragData = exports.SFX_DRAG_MIME_TYPE = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForEffectImportPath = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.keyframeInterpolationFunctions = exports.isSequenceFieldSchemaKeyframable = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.isImageFileType = exports.detectFileType = exports.KEYFRAME_EASING_PRESETS = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.parseComponentDragData = exports.makeComponentDragData = exports.isComponentImportPath = exports.isComponentIdentifier = exports.areComponentProps = exports.COMPONENT_DRAG_MIME_TYPE = exports.parseAssetDragData = exports.makeAssetDragData = exports.ASSET_DRAG_MIME_TYPE = exports.stripAnsi = exports.splitAnsi = void 0;
|
|
18
|
+
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = void 0;
|
|
19
19
|
const ansi_1 = require("./ansi");
|
|
20
20
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
21
21
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
@@ -24,8 +24,17 @@ const asset_drag_data_1 = require("./asset-drag-data");
|
|
|
24
24
|
Object.defineProperty(exports, "ASSET_DRAG_MIME_TYPE", { enumerable: true, get: function () { return asset_drag_data_1.ASSET_DRAG_MIME_TYPE; } });
|
|
25
25
|
Object.defineProperty(exports, "makeAssetDragData", { enumerable: true, get: function () { return asset_drag_data_1.makeAssetDragData; } });
|
|
26
26
|
Object.defineProperty(exports, "parseAssetDragData", { enumerable: true, get: function () { return asset_drag_data_1.parseAssetDragData; } });
|
|
27
|
+
const component_drag_data_1 = require("./component-drag-data");
|
|
28
|
+
Object.defineProperty(exports, "COMPONENT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return component_drag_data_1.COMPONENT_DRAG_MIME_TYPE; } });
|
|
29
|
+
Object.defineProperty(exports, "areComponentProps", { enumerable: true, get: function () { return component_drag_data_1.areComponentProps; } });
|
|
30
|
+
Object.defineProperty(exports, "isComponentIdentifier", { enumerable: true, get: function () { return component_drag_data_1.isComponentIdentifier; } });
|
|
31
|
+
Object.defineProperty(exports, "isComponentImportPath", { enumerable: true, get: function () { return component_drag_data_1.isComponentImportPath; } });
|
|
32
|
+
Object.defineProperty(exports, "makeComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.makeComponentDragData; } });
|
|
33
|
+
Object.defineProperty(exports, "parseComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.parseComponentDragData; } });
|
|
27
34
|
const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-state-delay-in-milliseconds");
|
|
28
35
|
Object.defineProperty(exports, "DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS", { enumerable: true, get: function () { return default_buffer_state_delay_in_milliseconds_1.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS; } });
|
|
36
|
+
const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
|
|
37
|
+
Object.defineProperty(exports, "KEYFRAME_EASING_PRESETS", { enumerable: true, get: function () { return keyframe_easing_presets_1.KEYFRAME_EASING_PRESETS; } });
|
|
29
38
|
const detect_file_type_1 = require("./detect-file-type");
|
|
30
39
|
Object.defineProperty(exports, "detectFileType", { enumerable: true, get: function () { return detect_file_type_1.detectFileType; } });
|
|
31
40
|
Object.defineProperty(exports, "isImageFileType", { enumerable: true, get: function () { return detect_file_type_1.isImageFileType; } });
|
|
@@ -71,6 +80,9 @@ const schema_field_info_1 = require("./schema-field-info");
|
|
|
71
80
|
Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return schema_field_info_1.SCHEMA_FIELD_ROW_HEIGHT; } });
|
|
72
81
|
Object.defineProperty(exports, "getEffectFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getEffectFieldsToShow; } });
|
|
73
82
|
Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getFieldsToShow; } });
|
|
83
|
+
const sfx_drag_data_1 = require("./sfx-drag-data");
|
|
84
|
+
Object.defineProperty(exports, "SFX_DRAG_MIME_TYPE", { enumerable: true, get: function () { return sfx_drag_data_1.SFX_DRAG_MIME_TYPE; } });
|
|
85
|
+
Object.defineProperty(exports, "parseSfxDragData", { enumerable: true, get: function () { return sfx_drag_data_1.parseSfxDragData; } });
|
|
74
86
|
const stringify_default_props_1 = require("./stringify-default-props");
|
|
75
87
|
Object.defineProperty(exports, "stringifyDefaultProps", { enumerable: true, get: function () { return stringify_default_props_1.stringifyDefaultProps; } });
|
|
76
88
|
const optimistic_add_keyframe_1 = require("./optimistic-add-keyframe");
|
|
@@ -85,13 +97,15 @@ const optimistic_move_keyframe_1 = require("./optimistic-move-keyframe");
|
|
|
85
97
|
Object.defineProperty(exports, "canMoveKeyframesWithoutCollisions", { enumerable: true, get: function () { return optimistic_move_keyframe_1.canMoveKeyframesWithoutCollisions; } });
|
|
86
98
|
Object.defineProperty(exports, "optimisticMoveEffectKeyframes", { enumerable: true, get: function () { return optimistic_move_keyframe_1.optimisticMoveEffectKeyframes; } });
|
|
87
99
|
Object.defineProperty(exports, "optimisticMoveSequenceKeyframes", { enumerable: true, get: function () { return optimistic_move_keyframe_1.optimisticMoveSequenceKeyframes; } });
|
|
88
|
-
const
|
|
89
|
-
Object.defineProperty(exports, "
|
|
90
|
-
const
|
|
91
|
-
Object.defineProperty(exports, "
|
|
100
|
+
const optimistic_update_for_effect_prop_statuses_1 = require("./optimistic-update-for-effect-prop-statuses");
|
|
101
|
+
Object.defineProperty(exports, "optimisticUpdateForEffectPropStatuses", { enumerable: true, get: function () { return optimistic_update_for_effect_prop_statuses_1.optimisticUpdateForEffectPropStatuses; } });
|
|
102
|
+
const optimistic_update_for_prop_statuses_1 = require("./optimistic-update-for-prop-statuses");
|
|
103
|
+
Object.defineProperty(exports, "optimisticUpdateForPropStatuses", { enumerable: true, get: function () { return optimistic_update_for_prop_statuses_1.optimisticUpdateForPropStatuses; } });
|
|
92
104
|
const optimistic_update_keyframe_settings_1 = require("./optimistic-update-keyframe-settings");
|
|
93
105
|
Object.defineProperty(exports, "optimisticUpdateEffectKeyframeSettings", { enumerable: true, get: function () { return optimistic_update_keyframe_settings_1.optimisticUpdateEffectKeyframeSettings; } });
|
|
94
106
|
Object.defineProperty(exports, "optimisticUpdateSequenceKeyframeSettings", { enumerable: true, get: function () { return optimistic_update_keyframe_settings_1.optimisticUpdateSequenceKeyframeSettings; } });
|
|
95
107
|
const stringify_sequence_subscription_key_1 = require("./stringify-sequence-subscription-key");
|
|
96
108
|
Object.defineProperty(exports, "stringifySequenceExpandedRowKey", { enumerable: true, get: function () { return stringify_sequence_subscription_key_1.stringifySequenceExpandedRowKey; } });
|
|
97
109
|
Object.defineProperty(exports, "stringifySequenceSubscriptionKey", { enumerable: true, get: function () { return stringify_sequence_subscription_key_1.stringifySequenceSubscriptionKey; } });
|
|
110
|
+
const url_1 = require("./url");
|
|
111
|
+
Object.defineProperty(exports, "isUrl", { enumerable: true, get: function () { return url_1.isUrl; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type KeyframeEasing = 'linear' | [number, number, number, number];
|
|
2
|
+
export type KeyframeEasingPreset = {
|
|
3
|
+
readonly id: 'ease-in' | 'ease-out' | 'ease-in-out';
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly easing: KeyframeEasing;
|
|
6
|
+
};
|
|
7
|
+
export declare const KEYFRAME_EASING_PRESETS: KeyframeEasingPreset[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KEYFRAME_EASING_PRESETS = void 0;
|
|
4
|
+
exports.KEYFRAME_EASING_PRESETS = [
|
|
5
|
+
{ id: 'ease-in', label: 'Ease in', easing: [0.42, 0, 1, 1] },
|
|
6
|
+
{ id: 'ease-out', label: 'Ease out', easing: [0, 0, 0.58, 1] },
|
|
7
|
+
{ id: 'ease-in-out', label: 'Ease in-out', easing: [0.42, 0, 0.58, 1] },
|
|
8
|
+
];
|
|
@@ -48,6 +48,7 @@ const getKeyframeInterpolationFunctionForSchemaField = ({ schema, key, }) => {
|
|
|
48
48
|
}
|
|
49
49
|
if ((field === null || field === void 0 ? void 0 : field.type) === 'scale' ||
|
|
50
50
|
(field === null || field === void 0 ? void 0 : field.type) === 'translate' ||
|
|
51
|
+
(field === null || field === void 0 ? void 0 : field.type) === 'transform-origin' ||
|
|
51
52
|
(field === null || field === void 0 ? void 0 : field.type) === 'rotation-css') {
|
|
52
53
|
return 'interpolate';
|
|
53
54
|
}
|
|
@@ -28,7 +28,6 @@ const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) =>
|
|
|
28
28
|
const staticValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : value;
|
|
29
29
|
return {
|
|
30
30
|
status: 'keyframed',
|
|
31
|
-
codeValue: undefined,
|
|
32
31
|
interpolationFunction: (0, keyframe_interpolation_function_1.getKeyframeInterpolationFunction)({
|
|
33
32
|
schema,
|
|
34
33
|
key: fieldKey,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type SequenceSchema } from 'remotion';
|
|
2
|
+
export declare const optimisticUpdateForEffectPropStatuses: ({ previous, effectIndex, fieldKey, value, schema, }: {
|
|
3
|
+
previous: CanUpdateSequencePropsResponse;
|
|
4
|
+
effectIndex: number;
|
|
5
|
+
fieldKey: string;
|
|
6
|
+
value: unknown;
|
|
7
|
+
schema: SequenceSchema;
|
|
8
|
+
}) => CanUpdateSequencePropsResponse;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optimisticUpdateForEffectPropStatuses = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const optimisticUpdateForEffectPropStatuses = ({ previous, effectIndex, fieldKey, value, schema, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (!previous.canUpdate) {
|
|
8
|
+
return previous;
|
|
9
|
+
}
|
|
10
|
+
const targetIndex = previous.effects.findIndex((e) => e.effectIndex === effectIndex);
|
|
11
|
+
if (targetIndex === -1) {
|
|
12
|
+
return previous;
|
|
13
|
+
}
|
|
14
|
+
const target = previous.effects[targetIndex];
|
|
15
|
+
if (!target.canUpdate) {
|
|
16
|
+
return previous;
|
|
17
|
+
}
|
|
18
|
+
const props = {
|
|
19
|
+
...target.props,
|
|
20
|
+
[fieldKey]: { status: 'static', codeValue: value },
|
|
21
|
+
};
|
|
22
|
+
if (((_a = schema[fieldKey]) === null || _a === void 0 ? void 0 : _a.type) === 'enum') {
|
|
23
|
+
const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
|
|
24
|
+
schema,
|
|
25
|
+
key: fieldKey,
|
|
26
|
+
value,
|
|
27
|
+
});
|
|
28
|
+
for (const propToDelete of propsToDelete) {
|
|
29
|
+
delete props[propToDelete];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const updatedEffect = {
|
|
33
|
+
...target,
|
|
34
|
+
props,
|
|
35
|
+
};
|
|
36
|
+
const effects = [...previous.effects];
|
|
37
|
+
effects[targetIndex] = updatedEffect;
|
|
38
|
+
return {
|
|
39
|
+
...previous,
|
|
40
|
+
effects,
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
exports.optimisticUpdateForEffectPropStatuses = optimisticUpdateForEffectPropStatuses;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CanUpdateSequencePropsResponse, type SequenceSchema } from 'remotion';
|
|
2
|
+
export declare const optimisticUpdateForPropStatuses: ({ previous, fieldKey, value, schema, }: {
|
|
3
|
+
previous: CanUpdateSequencePropsResponse;
|
|
4
|
+
fieldKey: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
schema: SequenceSchema;
|
|
7
|
+
}) => CanUpdateSequencePropsResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.optimisticUpdateForPropStatuses = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const optimisticUpdateForPropStatuses = ({ previous, fieldKey, value, schema, }) => {
|
|
6
|
+
var _a;
|
|
7
|
+
if (!previous.canUpdate) {
|
|
8
|
+
return previous;
|
|
9
|
+
}
|
|
10
|
+
const props = {
|
|
11
|
+
...previous.props,
|
|
12
|
+
[fieldKey]: { status: 'static', codeValue: value },
|
|
13
|
+
};
|
|
14
|
+
if (((_a = schema[fieldKey]) === null || _a === void 0 ? void 0 : _a.type) === 'enum') {
|
|
15
|
+
const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
|
|
16
|
+
schema,
|
|
17
|
+
key: fieldKey,
|
|
18
|
+
value,
|
|
19
|
+
});
|
|
20
|
+
for (const propToDelete of propsToDelete) {
|
|
21
|
+
delete props[propToDelete];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
canUpdate: true,
|
|
26
|
+
props,
|
|
27
|
+
effects: previous.effects,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.optimisticUpdateForPropStatuses = optimisticUpdateForPropStatuses;
|
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.optimisticUpdateEffectKeyframeSettings = exports.optimisticUpdateSequenceKeyframeSettings = void 0;
|
|
4
|
+
const updateEasing = ({ easing, segmentCount, segmentIndex, value, }) => {
|
|
5
|
+
if (!Number.isInteger(segmentIndex) ||
|
|
6
|
+
segmentIndex < 0 ||
|
|
7
|
+
segmentIndex >= segmentCount) {
|
|
8
|
+
throw new Error('Cannot update easing: segment index out of range');
|
|
9
|
+
}
|
|
10
|
+
const nextEasing = Array.from({ length: segmentCount }, (_, index) => {
|
|
11
|
+
var _a;
|
|
12
|
+
return (_a = easing[index]) !== null && _a !== void 0 ? _a : 'linear';
|
|
13
|
+
});
|
|
14
|
+
nextEasing[segmentIndex] = value;
|
|
15
|
+
return nextEasing;
|
|
16
|
+
};
|
|
4
17
|
const applySettingsToStatus = (status, settings) => {
|
|
5
18
|
if (!status || status.status !== 'keyframed') {
|
|
6
19
|
throw new Error('Expected keyframed status');
|
|
7
20
|
}
|
|
8
21
|
return {
|
|
9
22
|
...status,
|
|
10
|
-
...(settings.
|
|
11
|
-
|
|
23
|
+
...(settings.type === 'settings' && settings.clamping
|
|
24
|
+
? { clamping: settings.clamping }
|
|
25
|
+
: {}),
|
|
26
|
+
...(settings.type === 'settings' ? { posterize: settings.posterize } : {}),
|
|
27
|
+
...(settings.type === 'easing'
|
|
28
|
+
? {
|
|
29
|
+
easing: updateEasing({
|
|
30
|
+
easing: status.easing,
|
|
31
|
+
segmentCount: Math.max(0, status.keyframes.length - 1),
|
|
32
|
+
segmentIndex: settings.segmentIndex,
|
|
33
|
+
value: settings.easing,
|
|
34
|
+
}),
|
|
35
|
+
}
|
|
36
|
+
: {}),
|
|
12
37
|
};
|
|
13
38
|
};
|
|
14
39
|
const optimisticUpdateSequenceKeyframeSettings = ({ previous, fieldKey, settings, }) => {
|
package/dist/package-info.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const packages: readonly ["svg-3d-engine", "animation-utils", "animated-emoji", "astro-example", "babel-loader", "bugs", "brand", "bundler", "cli", "cloudrun", "codex-plugin", "compositor-darwin-arm64", "compositor-darwin-x64", "compositor-linux-arm64-gnu", "compositor-linux-arm64-musl", "compositor-linux-x64-gnu", "compositor-linux-x64-musl", "compositor-win32-x64-msvc", "core", "create-video", "discord-poster", "docusaurus-plugin", "docs", "enable-scss", "eslint-config", "eslint-config-flat", "eslint-config-internal", "eslint-plugin", "example-without-zod", "example", "fonts", "gif", "google-fonts", "install-whisper-cpp", "it-tests", "react18-tests", "lambda-go-example", "lambda-go", "lambda-php", "lambda-ruby", "lambda-python", "lambda", "lambda-client", "layout-utils", "rounded-text-box", "licensing", "lottie", "mcp", "media-utils", "motion-blur", "noise", "paths", "player-a11y", "player-example", "player", "preload", "renderer", "rive", "shapes", "skia", "promo-pages", "streaming", "serverless", "serverless-client", "skills", "skills-evals", "studio-server", "studio-shared", "studio", "tailwind", "tailwind-v4", "timeline-utils", "test-utils", "three", "transitions", "media-parser", "zod-types", "zod-types-v3", "webcodecs", "convert", "captions", "openai-whisper", "elevenlabs", "compositor", "example-videos", "whisper-web", "media", "remotion-media", "web-renderer", "design", "light-leaks", "starburst", "vercel", "sfx", "effects"];
|
|
1
|
+
export declare const packages: readonly ["svg-3d-engine", "animation-utils", "animated-emoji", "astro-example", "babel-loader", "bugs", "brand", "bundler", "canvas-capture", "cli", "cloudrun", "codex-plugin", "compositor-darwin-arm64", "compositor-darwin-x64", "compositor-linux-arm64-gnu", "compositor-linux-arm64-musl", "compositor-linux-x64-gnu", "compositor-linux-x64-musl", "compositor-win32-x64-msvc", "core", "create-video", "discord-poster", "docusaurus-plugin", "docs", "enable-scss", "eslint-config", "eslint-config-flat", "eslint-config-internal", "eslint-plugin", "example-without-zod", "example", "fonts", "gif", "google-fonts", "install-whisper-cpp", "it-tests", "react18-tests", "lambda-go-example", "lambda-go", "lambda-php", "lambda-ruby", "lambda-python", "lambda", "lambda-client", "layout-utils", "rounded-text-box", "licensing", "lottie", "mcp", "media-utils", "motion-blur", "noise", "paths", "player-a11y", "player-example", "player", "preload", "renderer", "rive", "shapes", "skia", "promo-pages", "streaming", "serverless", "serverless-client", "skills", "skills-evals", "studio-server", "studio-shared", "studio", "tailwind", "tailwind-v4", "timeline-utils", "test-utils", "three", "transitions", "media-parser", "zod-types", "zod-types-v3", "webcodecs", "convert", "captions", "openai-whisper", "elevenlabs", "compositor", "example-videos", "whisper-web", "media", "remotion-media", "web-renderer", "design", "light-leaks", "starburst", "vercel", "sfx", "effects"];
|
|
2
2
|
export type Pkgs = (typeof packages)[number];
|
|
3
3
|
export type ExtraPackage = {
|
|
4
4
|
name: string;
|
package/dist/package-info.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.packages = [
|
|
|
10
10
|
'bugs',
|
|
11
11
|
'brand',
|
|
12
12
|
'bundler',
|
|
13
|
+
'canvas-capture',
|
|
13
14
|
'cli',
|
|
14
15
|
'cloudrun',
|
|
15
16
|
'codex-plugin',
|
|
@@ -128,6 +129,7 @@ exports.descriptions = {
|
|
|
128
129
|
core: 'Make videos programmatically',
|
|
129
130
|
lambda: 'Render Remotion videos on AWS Lambda',
|
|
130
131
|
bundler: 'Bundle Remotion compositions using Webpack',
|
|
132
|
+
'canvas-capture': 'Capture HTML-in-canvas content as a video',
|
|
131
133
|
'studio-server': 'Run a Remotion Studio with a server backend',
|
|
132
134
|
'install-whisper-cpp': 'Helpers for installing and using Whisper.cpp',
|
|
133
135
|
'whisper-web': 'Helpers for using Whisper.cpp in browser using WASM',
|
|
@@ -224,6 +226,7 @@ exports.installableMap = {
|
|
|
224
226
|
bugs: false,
|
|
225
227
|
brand: false,
|
|
226
228
|
bundler: false,
|
|
229
|
+
'canvas-capture': false,
|
|
227
230
|
cli: false,
|
|
228
231
|
cloudrun: true,
|
|
229
232
|
'codex-plugin': false,
|
|
@@ -321,6 +324,7 @@ exports.apiDocs = {
|
|
|
321
324
|
core: 'https://www.remotion.dev/docs/remotion',
|
|
322
325
|
lambda: 'https://www.remotion.dev/docs/lambda',
|
|
323
326
|
bundler: 'https://www.remotion.dev/docs/bundler',
|
|
327
|
+
'canvas-capture': null,
|
|
324
328
|
'lambda-client': null,
|
|
325
329
|
'serverless-client': null,
|
|
326
330
|
'studio-server': null,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { InsertableCompositionElement } from './api-requests';
|
|
2
|
+
export declare const getRequiredPackageForImportPath: (importPath: string) => string | null;
|
|
2
3
|
export declare const getRequiredPackageForInsertableElement: (element: InsertableCompositionElement) => string | null;
|
|
3
4
|
export declare const getRequiredPackageForEffectImportPath: (importPath: string) => string | null;
|
package/dist/required-package.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRequiredPackageForEffectImportPath = exports.getRequiredPackageForInsertableElement = void 0;
|
|
3
|
+
exports.getRequiredPackageForEffectImportPath = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForImportPath = void 0;
|
|
4
|
+
const getRequiredPackageForImportPath = (importPath) => {
|
|
5
|
+
if (importPath === 'remotion' || importPath.startsWith('.')) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
if (importPath.startsWith('@')) {
|
|
9
|
+
const [scope, scopedPackageName] = importPath.split('/');
|
|
10
|
+
return scope && scopedPackageName ? `${scope}/${scopedPackageName}` : null;
|
|
11
|
+
}
|
|
12
|
+
const [packageName] = importPath.split('/');
|
|
13
|
+
return packageName || null;
|
|
14
|
+
};
|
|
15
|
+
exports.getRequiredPackageForImportPath = getRequiredPackageForImportPath;
|
|
4
16
|
const getRequiredPackageForInsertableElement = (element) => {
|
|
5
17
|
if (element.type === 'solid') {
|
|
6
18
|
return null;
|
|
7
19
|
}
|
|
20
|
+
if (element.type === 'component') {
|
|
21
|
+
return (0, exports.getRequiredPackageForImportPath)(element.importPath);
|
|
22
|
+
}
|
|
8
23
|
if (element.assetType === 'video' || element.assetType === 'audio') {
|
|
9
24
|
return '@remotion/media';
|
|
10
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type {
|
|
1
|
+
import type { DragOverrides, EffectDefinition, GetDragOverrides, GetEffectDragOverrides, PropStatuses, SequenceControls, SequencePropsSubscriptionKey, SequenceSchema, VisibleFieldSchema } from 'remotion';
|
|
2
|
+
export type { DragOverrides, PropStatuses, SequenceControls };
|
|
3
3
|
export type SchemaFieldInfo = {
|
|
4
4
|
key: string;
|
|
5
5
|
description: string | undefined;
|
|
@@ -17,19 +17,19 @@ export type EffectSchemaFieldInfo = SchemaFieldInfo & {
|
|
|
17
17
|
};
|
|
18
18
|
export type AnySchemaFieldInfo = SequenceSchemaFieldInfo | EffectSchemaFieldInfo;
|
|
19
19
|
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
20
|
-
declare const SUPPORTED_SCHEMA_TYPES: readonly ["number", "boolean", "rotation-css", "rotation-degrees", "translate", "scale", "uv-coordinate", "color", "array", "enum", "hidden"];
|
|
20
|
+
declare const SUPPORTED_SCHEMA_TYPES: readonly ["number", "boolean", "rotation-css", "rotation-degrees", "translate", "transform-origin", "scale", "uv-coordinate", "color", "array", "enum", "hidden"];
|
|
21
21
|
type SupportedSchemaType = (typeof SUPPORTED_SCHEMA_TYPES)[number];
|
|
22
|
-
export declare const getFieldsToShow: ({ getDragOverrides,
|
|
22
|
+
export declare const getFieldsToShow: ({ getDragOverrides, propStatuses, nodePath, schema, currentRuntimeValueDotNotation, }: {
|
|
23
23
|
schema: SequenceSchema;
|
|
24
24
|
currentRuntimeValueDotNotation: Record<string, unknown>;
|
|
25
25
|
getDragOverrides: GetDragOverrides;
|
|
26
|
-
|
|
26
|
+
propStatuses: PropStatuses;
|
|
27
27
|
nodePath: SequencePropsSubscriptionKey;
|
|
28
28
|
}) => SequenceSchemaFieldInfo[] | null;
|
|
29
|
-
export declare const getEffectFieldsToShow: ({ effect, effectIndex, nodePath,
|
|
29
|
+
export declare const getEffectFieldsToShow: ({ effect, effectIndex, nodePath, propStatuses, getEffectDragOverrides, }: {
|
|
30
30
|
effect: EffectDefinition<unknown>;
|
|
31
31
|
effectIndex: number;
|
|
32
32
|
nodePath: SequencePropsSubscriptionKey | null;
|
|
33
|
-
|
|
33
|
+
propStatuses: PropStatuses;
|
|
34
34
|
getEffectDragOverrides: GetEffectDragOverrides;
|
|
35
35
|
}) => EffectSchemaFieldInfo[];
|
|
@@ -10,6 +10,7 @@ const SUPPORTED_SCHEMA_TYPES = [
|
|
|
10
10
|
'rotation-css',
|
|
11
11
|
'rotation-degrees',
|
|
12
12
|
'translate',
|
|
13
|
+
'transform-origin',
|
|
13
14
|
'scale',
|
|
14
15
|
'uv-coordinate',
|
|
15
16
|
'color',
|
|
@@ -50,12 +51,12 @@ const getEffectFieldValue = ({ key, dragOverrides, effectStatus, }) => {
|
|
|
50
51
|
}
|
|
51
52
|
return propStatus.codeValue;
|
|
52
53
|
};
|
|
53
|
-
const getFieldsToShow = ({ getDragOverrides,
|
|
54
|
+
const getFieldsToShow = ({ getDragOverrides, propStatuses, nodePath, schema, currentRuntimeValueDotNotation, }) => {
|
|
54
55
|
const { merged: valuesDotNotation } = remotion_1.Internals.computeEffectiveSchemaValuesDotNotation({
|
|
55
56
|
schema,
|
|
56
57
|
currentValue: currentRuntimeValueDotNotation,
|
|
57
58
|
overrideValues: getDragOverrides(nodePath),
|
|
58
|
-
propStatus: remotion_1.Internals.
|
|
59
|
+
propStatus: remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath),
|
|
59
60
|
frame: null,
|
|
60
61
|
});
|
|
61
62
|
const activeSchema = remotion_1.Internals.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
|
|
@@ -91,11 +92,11 @@ const getFieldsToShow = ({ getDragOverrides, codeValues, nodePath, schema, curre
|
|
|
91
92
|
.filter(no_react_1.NoReactInternals.truthy);
|
|
92
93
|
};
|
|
93
94
|
exports.getFieldsToShow = getFieldsToShow;
|
|
94
|
-
const getEffectFieldsToShow = ({ effect, effectIndex, nodePath,
|
|
95
|
+
const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, getEffectDragOverrides, }) => {
|
|
95
96
|
const effectStatus = nodePath === null
|
|
96
97
|
? null
|
|
97
|
-
: remotion_1.Internals.
|
|
98
|
-
|
|
98
|
+
: remotion_1.Internals.getEffectPropStatusesCtx({
|
|
99
|
+
propStatuses,
|
|
99
100
|
nodePath,
|
|
100
101
|
effectIndex,
|
|
101
102
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const SFX_DRAG_MIME_TYPE = "application/vnd.remotion.sfx+json";
|
|
2
|
+
export type SfxDragData = {
|
|
3
|
+
type: 'remotion-sfx';
|
|
4
|
+
version: 1;
|
|
5
|
+
sfx: {
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const parseSfxDragData: (value: string) => SfxDragData | null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseSfxDragData = exports.SFX_DRAG_MIME_TYPE = void 0;
|
|
4
|
+
const url_1 = require("./url");
|
|
5
|
+
exports.SFX_DRAG_MIME_TYPE = 'application/vnd.remotion.sfx+json';
|
|
6
|
+
const isRecord = (value) => {
|
|
7
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
8
|
+
};
|
|
9
|
+
const parseSfxDragData = (value) => {
|
|
10
|
+
try {
|
|
11
|
+
const parsed = JSON.parse(value);
|
|
12
|
+
if (!isRecord(parsed)) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (parsed.type !== 'remotion-sfx' || parsed.version !== 1) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
if (!isRecord(parsed.sfx)) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const { name, url } = parsed.sfx;
|
|
22
|
+
if (typeof name !== 'string' ||
|
|
23
|
+
name.length === 0 ||
|
|
24
|
+
typeof url !== 'string' ||
|
|
25
|
+
!(0, url_1.isUrl)(url)) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
type: 'remotion-sfx',
|
|
30
|
+
version: 1,
|
|
31
|
+
sfx: {
|
|
32
|
+
name,
|
|
33
|
+
url,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (_a) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.parseSfxDragData = parseSfxDragData;
|
package/dist/url.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isUrl: (value: string) => boolean;
|
package/dist/url.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isUrl = void 0;
|
|
4
|
+
const isUrl = (value) => {
|
|
5
|
+
try {
|
|
6
|
+
const parsed = new URL(value);
|
|
7
|
+
return parsed.href.length > 0;
|
|
8
|
+
}
|
|
9
|
+
catch (_a) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.isUrl = isUrl;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-shared"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio-shared",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.475",
|
|
7
7
|
"description": "Internal package for shared objects between the Studio backend and frontend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"remotion": "4.0.
|
|
23
|
+
"remotion": "4.0.475"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.475",
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.475",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
30
|
},
|