@remotion/studio-shared 4.0.491 → 4.0.493
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 +2 -0
- package/dist/codemods.d.ts +7 -0
- package/dist/composition-drag-data.d.ts +2 -0
- package/dist/composition-drag-data.js +14 -1
- package/dist/easing-clipboard-data.d.ts +2 -0
- package/dist/easing-clipboard-data.js +7 -5
- package/dist/effect-catalog.js +11 -0
- package/dist/get-all-keys.d.ts +1 -0
- package/dist/get-all-keys.js +7 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +10 -2
- package/dist/keyframe-clipboard-data.d.ts +46 -0
- package/dist/keyframe-clipboard-data.js +104 -0
- package/dist/keyframe-interpolation-function.d.ts +1 -0
- package/dist/keyframe-interpolation-function.js +49 -17
- package/dist/schema-field-info.d.ts +25 -3
- package/dist/schema-field-info.js +28 -26
- package/dist/studio-html.d.ts +2 -1
- package/dist/studio-html.js +2 -1
- package/package.json +4 -4
package/dist/api-requests.d.ts
CHANGED
|
@@ -204,6 +204,7 @@ export type SubscribeToSequencePropsRequest = {
|
|
|
204
204
|
nodePath: SequenceNodePath | null;
|
|
205
205
|
componentIdentity: JsxComponentIdentity | null;
|
|
206
206
|
keys: string[];
|
|
207
|
+
assetKeys: string[];
|
|
207
208
|
effects: string[][];
|
|
208
209
|
clientId: string;
|
|
209
210
|
videoConfigValues: VideoConfigValues;
|
|
@@ -221,6 +222,7 @@ export type UnsubscribeFromSequencePropsRequest = {
|
|
|
221
222
|
nodePath: SequencePropsSubscriptionKey;
|
|
222
223
|
clientId: string;
|
|
223
224
|
sequenceKeys: string[];
|
|
225
|
+
assetKeys: string[];
|
|
224
226
|
effectKeys: string[][];
|
|
225
227
|
};
|
|
226
228
|
export type GoogleFontSourceEdit = {
|
package/dist/codemods.d.ts
CHANGED
|
@@ -33,6 +33,13 @@ export type RecastCodemod = {
|
|
|
33
33
|
type: 'rename-composition';
|
|
34
34
|
idToRename: string;
|
|
35
35
|
newId: string;
|
|
36
|
+
} | {
|
|
37
|
+
type: 'update-composition-metadata';
|
|
38
|
+
idToUpdate: string;
|
|
39
|
+
newDurationInFrames: number | null;
|
|
40
|
+
newFps: number | null;
|
|
41
|
+
newHeight: number | null;
|
|
42
|
+
newWidth: number | null;
|
|
36
43
|
} | {
|
|
37
44
|
type: 'delete-composition';
|
|
38
45
|
idToDelete: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SymbolicatedStackFrame } from './stack-types';
|
|
1
2
|
export { COMPOSITION_DRAG_MIME_TYPE } from './drag-mime-types';
|
|
2
3
|
export type CompositionDragData = {
|
|
3
4
|
type: 'remotion-composition';
|
|
@@ -9,4 +10,5 @@ export declare const makeCompositionDragData: ({ compositionFile, compositionId,
|
|
|
9
10
|
compositionFile: string | null;
|
|
10
11
|
compositionId: string;
|
|
11
12
|
}) => CompositionDragData;
|
|
13
|
+
export declare const compositionDragDataToSymbolicatedStack: (dragData: CompositionDragData) => SymbolicatedStackFrame | null;
|
|
12
14
|
export declare const parseCompositionDragData: (value: string) => CompositionDragData | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseCompositionDragData = exports.makeCompositionDragData = exports.COMPOSITION_DRAG_MIME_TYPE = void 0;
|
|
3
|
+
exports.parseCompositionDragData = exports.compositionDragDataToSymbolicatedStack = exports.makeCompositionDragData = exports.COMPOSITION_DRAG_MIME_TYPE = void 0;
|
|
4
4
|
const drag_mime_types_1 = require("./drag-mime-types");
|
|
5
5
|
Object.defineProperty(exports, "COMPOSITION_DRAG_MIME_TYPE", { enumerable: true, get: function () { return drag_mime_types_1.COMPOSITION_DRAG_MIME_TYPE; } });
|
|
6
6
|
const isRecord = (value) => {
|
|
@@ -36,6 +36,19 @@ const makeCompositionDragData = ({ compositionFile, compositionId, }) => {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
exports.makeCompositionDragData = makeCompositionDragData;
|
|
39
|
+
const compositionDragDataToSymbolicatedStack = (dragData) => {
|
|
40
|
+
if (dragData.compositionFile === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
originalColumnNumber: null,
|
|
45
|
+
originalFileName: dragData.compositionFile,
|
|
46
|
+
originalFunctionName: null,
|
|
47
|
+
originalLineNumber: null,
|
|
48
|
+
originalScriptCode: null,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.compositionDragDataToSymbolicatedStack = compositionDragDataToSymbolicatedStack;
|
|
39
52
|
const parseCompositionDragData = (value) => {
|
|
40
53
|
try {
|
|
41
54
|
const parsed = JSON.parse(value);
|
|
@@ -14,5 +14,7 @@ export type EasingClipboardDataParseResult = {
|
|
|
14
14
|
} | {
|
|
15
15
|
readonly status: 'invalid';
|
|
16
16
|
};
|
|
17
|
+
export declare const isKeyframeEasing: (value: unknown) => value is import("remotion").CanUpdateSequencePropStatusEasing;
|
|
18
|
+
export declare const normalizeKeyframeEasing: (easing: import("remotion").CanUpdateSequencePropStatusEasing) => import("remotion").CanUpdateSequencePropStatusEasing;
|
|
17
19
|
export declare const parseEasingClipboardDataResult: (value: string) => EasingClipboardDataParseResult;
|
|
18
20
|
export declare const parseEasingClipboardData: (value: string) => EasingClipboardData | null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseEasingClipboardData = exports.parseEasingClipboardDataResult = void 0;
|
|
3
|
+
exports.parseEasingClipboardData = exports.parseEasingClipboardDataResult = exports.normalizeKeyframeEasing = exports.isKeyframeEasing = void 0;
|
|
4
4
|
const isRecord = (value) => {
|
|
5
5
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
6
|
};
|
|
7
7
|
const isFiniteNumber = (value) => {
|
|
8
8
|
return typeof value === 'number' && Number.isFinite(value);
|
|
9
9
|
};
|
|
10
|
-
const
|
|
10
|
+
const isKeyframeEasing = (value) => {
|
|
11
11
|
return (isRecord(value) &&
|
|
12
12
|
(value.type === 'linear' ||
|
|
13
13
|
(value.type === 'bezier' &&
|
|
@@ -27,7 +27,8 @@ const isEasing = (value) => {
|
|
|
27
27
|
isFiniteNumber(value.durationRestThreshold)) &&
|
|
28
28
|
typeof value.overshootClamping === 'boolean')));
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
exports.isKeyframeEasing = isKeyframeEasing;
|
|
31
|
+
const normalizeKeyframeEasing = (easing) => {
|
|
31
32
|
var _a, _b;
|
|
32
33
|
if (easing.type !== 'spring') {
|
|
33
34
|
return easing;
|
|
@@ -38,6 +39,7 @@ const normalizeEasing = (easing) => {
|
|
|
38
39
|
durationRestThreshold: (_b = easing.durationRestThreshold) !== null && _b !== void 0 ? _b : null,
|
|
39
40
|
};
|
|
40
41
|
};
|
|
42
|
+
exports.normalizeKeyframeEasing = normalizeKeyframeEasing;
|
|
41
43
|
const parseEasingClipboardDataResult = (value) => {
|
|
42
44
|
try {
|
|
43
45
|
const parsed = JSON.parse(value);
|
|
@@ -53,7 +55,7 @@ const parseEasingClipboardDataResult = (value) => {
|
|
|
53
55
|
version: parsed.version,
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
|
-
if (parsed.type !== 'easing' || !
|
|
58
|
+
if (parsed.type !== 'easing' || !(0, exports.isKeyframeEasing)(parsed.easing)) {
|
|
57
59
|
return { status: 'invalid' };
|
|
58
60
|
}
|
|
59
61
|
return {
|
|
@@ -62,7 +64,7 @@ const parseEasingClipboardDataResult = (value) => {
|
|
|
62
64
|
type: 'easing',
|
|
63
65
|
version: 1,
|
|
64
66
|
remotionClipboard: 'easing',
|
|
65
|
-
easing:
|
|
67
|
+
easing: (0, exports.normalizeKeyframeEasing)(parsed.easing),
|
|
66
68
|
},
|
|
67
69
|
};
|
|
68
70
|
}
|
package/dist/effect-catalog.js
CHANGED
|
@@ -663,6 +663,17 @@ exports.EFFECT_CATALOG = [
|
|
|
663
663
|
config: {},
|
|
664
664
|
},
|
|
665
665
|
},
|
|
666
|
+
{
|
|
667
|
+
id: 'effects-flannel',
|
|
668
|
+
category: 'Generate',
|
|
669
|
+
label: 'flannel()',
|
|
670
|
+
description: 'Plaid woven fabric pattern',
|
|
671
|
+
effect: {
|
|
672
|
+
name: 'flannel',
|
|
673
|
+
importPath: '@remotion/effects/flannel',
|
|
674
|
+
config: {},
|
|
675
|
+
},
|
|
676
|
+
},
|
|
666
677
|
{
|
|
667
678
|
id: 'effects-halftone-linear-gradient',
|
|
668
679
|
category: 'Generate',
|
package/dist/get-all-keys.d.ts
CHANGED
package/dist/get-all-keys.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAllSchemaKeys = void 0;
|
|
3
|
+
exports.getAssetSchemaKeys = exports.getAllSchemaKeys = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const getAllSchemaKeys = (schema) => {
|
|
6
6
|
return Object.keys(remotion_1.Internals.getFlatSchemaWithAllKeys(schema));
|
|
7
7
|
};
|
|
8
8
|
exports.getAllSchemaKeys = getAllSchemaKeys;
|
|
9
|
+
const getAssetSchemaKeys = (schema) => {
|
|
10
|
+
return Object.entries(remotion_1.Internals.getFlatSchemaWithAllKeys(schema))
|
|
11
|
+
.filter(([, field]) => (field === null || field === void 0 ? void 0 : field.type) === 'asset')
|
|
12
|
+
.map(([key]) => key);
|
|
13
|
+
};
|
|
14
|
+
exports.getAssetSchemaKeys = getAssetSchemaKeys;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest,
|
|
|
3
3
|
export { ASSET_DRAG_MIME_TYPE, makeAssetDragData, parseAssetDragData, type AssetDragData, } from './asset-drag-data';
|
|
4
4
|
export type { ApplyVisualControlCodemod, RecastCodemod } from './codemods';
|
|
5
5
|
export { COMPONENT_DRAG_MIME_TYPE, areComponentProps, isComponentIdentifier, isComponentImportPath, makeComponentDragData, parseComponentDragData, type ComponentDimensions, type ComponentDragData, type ComponentProp, } from './component-drag-data';
|
|
6
|
-
export { COMPOSITION_DRAG_MIME_TYPE, makeCompositionDragData, parseCompositionDragData, type CompositionDragData, } from './composition-drag-data';
|
|
6
|
+
export { COMPOSITION_DRAG_MIME_TYPE, compositionDragDataToSymbolicatedStack, makeCompositionDragData, parseCompositionDragData, type CompositionDragData, } from './composition-drag-data';
|
|
7
7
|
export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
|
|
8
8
|
export { getDefinePluginDefinitions } from './define-plugin-definitions';
|
|
9
9
|
export { detectFileType, isImageFileType, type FileDimensions, type FileType, type ImageFileType, } from './detect-file-type';
|
|
@@ -15,14 +15,15 @@ export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from
|
|
|
15
15
|
export { ELEMENT_DRAG_MIME_TYPE, getElementComponentNameFromSourceCode, isLowercaseElementFileName, makeElementDragData, makeElementFileNameFromSlug, parseElementDragData, type ElementDragData, } from './element-drag-data';
|
|
16
16
|
export { EventSourceEvent } from './event-source-event';
|
|
17
17
|
export { formatBytes } from './format-bytes';
|
|
18
|
-
export { getAllSchemaKeys } from './get-all-keys';
|
|
18
|
+
export { getAllSchemaKeys, getAssetSchemaKeys } from './get-all-keys';
|
|
19
19
|
export { getDefaultOutLocation } from './get-default-out-name';
|
|
20
20
|
export { ErrorLocation, getLocationFromBuildError, } from './get-location-from-build-error';
|
|
21
21
|
export { getProjectName } from './get-project-name';
|
|
22
22
|
export type { GitSource } from './git-source';
|
|
23
23
|
export { HotMiddlewareMessage, HotMiddlewareOptions, ModuleMap, hotMiddlewareOptions, } from './hot-middleware';
|
|
24
24
|
export { CUBIC_KEYFRAME_EASING, EASE_KEYFRAME_EASING, KEYFRAME_EASING_PRESETS, LINEAR_KEYFRAME_EASING, QUAD_KEYFRAME_EASING, getBackKeyframeEasing, getOutKeyframeEasing, getPolyKeyframeEasing, type KeyframeEasing, type KeyframeEasingPreset, } from './keyframe-easing-presets';
|
|
25
|
-
export { getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isInteractivitySchemaFieldKeyframable, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
|
|
25
|
+
export { canEditEasingForInterpolationFunction, getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isInteractivitySchemaFieldKeyframable, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
|
|
26
|
+
export { isKeyframeClipboardFieldType, parseKeyframeClipboardData, parseKeyframeClipboardDataResult, type KeyframeClipboardData, type KeyframeClipboardDataParseResult, type KeyframeClipboardFieldType, } from './keyframe-clipboard-data';
|
|
26
27
|
export { DEFAULT_TIMELINE_TRACKS } from './max-timeline-tracks';
|
|
27
28
|
export { Pkgs, apiDocs, descriptions, extraPackages, installableMap, packages, type ExtraPackage, } from './package-info';
|
|
28
29
|
export { PackageManager } from './package-manager';
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,9 @@ 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.
|
|
17
|
+
exports.CUBIC_KEYFRAME_EASING = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAssetSchemaKeys = exports.getAllSchemaKeys = exports.formatBytes = exports.parseElementDragData = exports.makeElementFileNameFromSlug = exports.makeElementDragData = exports.isLowercaseElementFileName = exports.getElementComponentNameFromSourceCode = exports.ELEMENT_DRAG_MIME_TYPE = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.makeEffectDragDataFromCatalogItem = exports.getEffectPreviewSource = exports.getEffectPreviewAlt = exports.getEffectDocumentationPath = exports.getEffectDocumentationLink = exports.getEffectCatalogCategories = exports.EFFECT_CATALOG = exports.parseEasingClipboardDataResult = exports.parseEasingClipboardData = exports.isRemotionDragMimeType = exports.REMOTION_DRAG_MIME_TYPES = exports.isImageFileType = exports.detectFileType = exports.getDefinePluginDefinitions = exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = exports.parseCompositionDragData = exports.makeCompositionDragData = exports.compositionDragDataToSymbolicatedStack = exports.COMPOSITION_DRAG_MIME_TYPE = 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.optimisticUpdateForPropStatuses = exports.optimisticUpdateForEffectPropStatuses = exports.optimisticMoveSequenceKeyframes = exports.optimisticMoveEffectKeyframes = exports.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.studioHtml = exports.getStudioEntryPoints = exports.stringifyDefaultProps = exports.parseSfxDragData = exports.SFX_DRAG_MIME_TYPE = exports.getSchemaFieldGroup = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_GROUPS = exports.isValidPackageName = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForEffectImportPath = exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.parseKeyframeClipboardDataResult = exports.parseKeyframeClipboardData = exports.isKeyframeClipboardFieldType = exports.keyframeInterpolationFunctions = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.isInteractivitySchemaFieldKeyframable = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.canEditEasingForInterpolationFunction = exports.getPolyKeyframeEasing = exports.getOutKeyframeEasing = exports.getBackKeyframeEasing = exports.QUAD_KEYFRAME_EASING = exports.LINEAR_KEYFRAME_EASING = exports.KEYFRAME_EASING_PRESETS = exports.EASE_KEYFRAME_EASING = void 0;
|
|
19
|
+
exports.isUrl = exports.stringifySequenceSubscriptionKey = exports.stringifySequenceExpandedRowKey = exports.optimisticUpdateSequenceKeyframeSettings = exports.optimisticUpdateEffectKeyframeSettings = void 0;
|
|
19
20
|
const ansi_1 = require("./ansi");
|
|
20
21
|
Object.defineProperty(exports, "splitAnsi", { enumerable: true, get: function () { return ansi_1.splitAnsi; } });
|
|
21
22
|
Object.defineProperty(exports, "stripAnsi", { enumerable: true, get: function () { return ansi_1.stripAnsi; } });
|
|
@@ -33,6 +34,7 @@ Object.defineProperty(exports, "makeComponentDragData", { enumerable: true, get:
|
|
|
33
34
|
Object.defineProperty(exports, "parseComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.parseComponentDragData; } });
|
|
34
35
|
const composition_drag_data_1 = require("./composition-drag-data");
|
|
35
36
|
Object.defineProperty(exports, "COMPOSITION_DRAG_MIME_TYPE", { enumerable: true, get: function () { return composition_drag_data_1.COMPOSITION_DRAG_MIME_TYPE; } });
|
|
37
|
+
Object.defineProperty(exports, "compositionDragDataToSymbolicatedStack", { enumerable: true, get: function () { return composition_drag_data_1.compositionDragDataToSymbolicatedStack; } });
|
|
36
38
|
Object.defineProperty(exports, "makeCompositionDragData", { enumerable: true, get: function () { return composition_drag_data_1.makeCompositionDragData; } });
|
|
37
39
|
Object.defineProperty(exports, "parseCompositionDragData", { enumerable: true, get: function () { return composition_drag_data_1.parseCompositionDragData; } });
|
|
38
40
|
const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-state-delay-in-milliseconds");
|
|
@@ -75,6 +77,7 @@ const format_bytes_1 = require("./format-bytes");
|
|
|
75
77
|
Object.defineProperty(exports, "formatBytes", { enumerable: true, get: function () { return format_bytes_1.formatBytes; } });
|
|
76
78
|
const get_all_keys_1 = require("./get-all-keys");
|
|
77
79
|
Object.defineProperty(exports, "getAllSchemaKeys", { enumerable: true, get: function () { return get_all_keys_1.getAllSchemaKeys; } });
|
|
80
|
+
Object.defineProperty(exports, "getAssetSchemaKeys", { enumerable: true, get: function () { return get_all_keys_1.getAssetSchemaKeys; } });
|
|
78
81
|
const get_default_out_name_1 = require("./get-default-out-name");
|
|
79
82
|
Object.defineProperty(exports, "getDefaultOutLocation", { enumerable: true, get: function () { return get_default_out_name_1.getDefaultOutLocation; } });
|
|
80
83
|
const get_location_from_build_error_1 = require("./get-location-from-build-error");
|
|
@@ -93,12 +96,17 @@ Object.defineProperty(exports, "getBackKeyframeEasing", { enumerable: true, get:
|
|
|
93
96
|
Object.defineProperty(exports, "getOutKeyframeEasing", { enumerable: true, get: function () { return keyframe_easing_presets_1.getOutKeyframeEasing; } });
|
|
94
97
|
Object.defineProperty(exports, "getPolyKeyframeEasing", { enumerable: true, get: function () { return keyframe_easing_presets_1.getPolyKeyframeEasing; } });
|
|
95
98
|
const keyframe_interpolation_function_1 = require("./keyframe-interpolation-function");
|
|
99
|
+
Object.defineProperty(exports, "canEditEasingForInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.canEditEasingForInterpolationFunction; } });
|
|
96
100
|
Object.defineProperty(exports, "getKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.getKeyframeInterpolationFunction; } });
|
|
97
101
|
Object.defineProperty(exports, "getKeyframeInterpolationFunctionForSchemaField", { enumerable: true, get: function () { return keyframe_interpolation_function_1.getKeyframeInterpolationFunctionForSchemaField; } });
|
|
98
102
|
Object.defineProperty(exports, "isInteractivitySchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isInteractivitySchemaFieldKeyframable; } });
|
|
99
103
|
Object.defineProperty(exports, "isKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isKeyframeInterpolationFunction; } });
|
|
100
104
|
Object.defineProperty(exports, "isSchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isSchemaFieldKeyframable; } });
|
|
101
105
|
Object.defineProperty(exports, "keyframeInterpolationFunctions", { enumerable: true, get: function () { return keyframe_interpolation_function_1.keyframeInterpolationFunctions; } });
|
|
106
|
+
const keyframe_clipboard_data_1 = require("./keyframe-clipboard-data");
|
|
107
|
+
Object.defineProperty(exports, "isKeyframeClipboardFieldType", { enumerable: true, get: function () { return keyframe_clipboard_data_1.isKeyframeClipboardFieldType; } });
|
|
108
|
+
Object.defineProperty(exports, "parseKeyframeClipboardData", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardData; } });
|
|
109
|
+
Object.defineProperty(exports, "parseKeyframeClipboardDataResult", { enumerable: true, get: function () { return keyframe_clipboard_data_1.parseKeyframeClipboardDataResult; } });
|
|
102
110
|
const max_timeline_tracks_1 = require("./max-timeline-tracks");
|
|
103
111
|
Object.defineProperty(exports, "DEFAULT_TIMELINE_TRACKS", { enumerable: true, get: function () { return max_timeline_tracks_1.DEFAULT_TIMELINE_TRACKS; } });
|
|
104
112
|
const package_info_1 = require("./package-info");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { KeyframeEasing } from './keyframe-easing-presets';
|
|
2
|
+
declare const KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT: {
|
|
3
|
+
readonly array: false;
|
|
4
|
+
readonly asset: false;
|
|
5
|
+
readonly boolean: false;
|
|
6
|
+
readonly color: true;
|
|
7
|
+
readonly enum: false;
|
|
8
|
+
readonly 'font-family': false;
|
|
9
|
+
readonly hidden: false;
|
|
10
|
+
readonly number: true;
|
|
11
|
+
readonly 'rotation-css': true;
|
|
12
|
+
readonly 'rotation-degrees': true;
|
|
13
|
+
readonly scale: true;
|
|
14
|
+
readonly 'text-content': false;
|
|
15
|
+
readonly 'transform-origin': true;
|
|
16
|
+
readonly translate: true;
|
|
17
|
+
readonly 'uv-coordinate': true;
|
|
18
|
+
};
|
|
19
|
+
type KeyframeClipboardFieldTypeSupport = typeof KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT;
|
|
20
|
+
export type KeyframeClipboardFieldType = {
|
|
21
|
+
[FieldType in keyof KeyframeClipboardFieldTypeSupport]: KeyframeClipboardFieldTypeSupport[FieldType] extends true ? FieldType : never;
|
|
22
|
+
}[keyof KeyframeClipboardFieldTypeSupport];
|
|
23
|
+
export type KeyframeClipboardData = {
|
|
24
|
+
readonly type: 'keyframe';
|
|
25
|
+
readonly version: 1;
|
|
26
|
+
readonly remotionClipboard: 'keyframe';
|
|
27
|
+
readonly fieldType: KeyframeClipboardFieldType | null;
|
|
28
|
+
readonly keyframes: readonly {
|
|
29
|
+
readonly frameOffset: number;
|
|
30
|
+
readonly value: unknown;
|
|
31
|
+
}[];
|
|
32
|
+
readonly easing: readonly KeyframeEasing[];
|
|
33
|
+
};
|
|
34
|
+
export type KeyframeClipboardDataParseResult = {
|
|
35
|
+
readonly status: 'valid';
|
|
36
|
+
readonly data: KeyframeClipboardData;
|
|
37
|
+
} | {
|
|
38
|
+
readonly status: 'unsupported-version';
|
|
39
|
+
readonly version: unknown;
|
|
40
|
+
} | {
|
|
41
|
+
readonly status: 'invalid';
|
|
42
|
+
};
|
|
43
|
+
export declare const isKeyframeClipboardFieldType: (value: unknown) => value is KeyframeClipboardFieldType;
|
|
44
|
+
export declare const parseKeyframeClipboardDataResult: (value: string) => KeyframeClipboardDataParseResult;
|
|
45
|
+
export declare const parseKeyframeClipboardData: (value: string) => KeyframeClipboardData | null;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseKeyframeClipboardData = exports.parseKeyframeClipboardDataResult = exports.isKeyframeClipboardFieldType = void 0;
|
|
4
|
+
const easing_clipboard_data_1 = require("./easing-clipboard-data");
|
|
5
|
+
// Keep this exhaustive so every new schema field requires an explicit clipboard
|
|
6
|
+
// compatibility decision.
|
|
7
|
+
const KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT = {
|
|
8
|
+
array: false,
|
|
9
|
+
asset: false,
|
|
10
|
+
boolean: false,
|
|
11
|
+
color: true,
|
|
12
|
+
enum: false,
|
|
13
|
+
'font-family': false,
|
|
14
|
+
hidden: false,
|
|
15
|
+
number: true,
|
|
16
|
+
'rotation-css': true,
|
|
17
|
+
'rotation-degrees': true,
|
|
18
|
+
scale: true,
|
|
19
|
+
'text-content': false,
|
|
20
|
+
'transform-origin': true,
|
|
21
|
+
translate: true,
|
|
22
|
+
'uv-coordinate': true,
|
|
23
|
+
};
|
|
24
|
+
const isRecord = (value) => {
|
|
25
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
26
|
+
};
|
|
27
|
+
const isKeyframeClipboardFieldType = (value) => {
|
|
28
|
+
return (typeof value === 'string' &&
|
|
29
|
+
Object.hasOwn(KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT, value) &&
|
|
30
|
+
KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT[value]);
|
|
31
|
+
};
|
|
32
|
+
exports.isKeyframeClipboardFieldType = isKeyframeClipboardFieldType;
|
|
33
|
+
const isKeyframeClipboardEntry = (value) => {
|
|
34
|
+
return (isRecord(value) &&
|
|
35
|
+
Number.isInteger(value.frameOffset) &&
|
|
36
|
+
Object.hasOwn(value, 'value'));
|
|
37
|
+
};
|
|
38
|
+
const areValidKeyframes = (value) => {
|
|
39
|
+
var _a;
|
|
40
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
let previousOffset = -1;
|
|
44
|
+
for (const keyframe of value) {
|
|
45
|
+
if (!isKeyframeClipboardEntry(keyframe) ||
|
|
46
|
+
keyframe.frameOffset <= previousOffset) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
previousOffset = keyframe.frameOffset;
|
|
50
|
+
}
|
|
51
|
+
return ((_a = value[0]) === null || _a === void 0 ? void 0 : _a.frameOffset) === 0;
|
|
52
|
+
};
|
|
53
|
+
const parseEasings = ({ value, keyframeCount, }) => {
|
|
54
|
+
if (Array.isArray(value) &&
|
|
55
|
+
value.length === Math.max(0, keyframeCount - 1) &&
|
|
56
|
+
value.every(easing_clipboard_data_1.isKeyframeEasing)) {
|
|
57
|
+
return value.map(easing_clipboard_data_1.normalizeKeyframeEasing);
|
|
58
|
+
}
|
|
59
|
+
return null;
|
|
60
|
+
};
|
|
61
|
+
const parseKeyframeClipboardDataResult = (value) => {
|
|
62
|
+
try {
|
|
63
|
+
const parsed = JSON.parse(value);
|
|
64
|
+
if (!isRecord(parsed) || parsed.remotionClipboard !== 'keyframe') {
|
|
65
|
+
return { status: 'invalid' };
|
|
66
|
+
}
|
|
67
|
+
if (parsed.version !== 1) {
|
|
68
|
+
return { status: 'unsupported-version', version: parsed.version };
|
|
69
|
+
}
|
|
70
|
+
const easing = parseEasings({
|
|
71
|
+
value: parsed.easing,
|
|
72
|
+
keyframeCount: Array.isArray(parsed.keyframes)
|
|
73
|
+
? parsed.keyframes.length
|
|
74
|
+
: 0,
|
|
75
|
+
});
|
|
76
|
+
if (parsed.type !== 'keyframe' ||
|
|
77
|
+
!areValidKeyframes(parsed.keyframes) ||
|
|
78
|
+
easing === null ||
|
|
79
|
+
(parsed.fieldType !== null &&
|
|
80
|
+
!(0, exports.isKeyframeClipboardFieldType)(parsed.fieldType))) {
|
|
81
|
+
return { status: 'invalid' };
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
status: 'valid',
|
|
85
|
+
data: {
|
|
86
|
+
type: 'keyframe',
|
|
87
|
+
version: 1,
|
|
88
|
+
remotionClipboard: 'keyframe',
|
|
89
|
+
fieldType: parsed.fieldType,
|
|
90
|
+
keyframes: parsed.keyframes,
|
|
91
|
+
easing,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
catch (_a) {
|
|
96
|
+
return { status: 'invalid' };
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
exports.parseKeyframeClipboardDataResult = parseKeyframeClipboardDataResult;
|
|
100
|
+
const parseKeyframeClipboardData = (value) => {
|
|
101
|
+
const result = (0, exports.parseKeyframeClipboardDataResult)(value);
|
|
102
|
+
return result.status === 'valid' ? result.data : null;
|
|
103
|
+
};
|
|
104
|
+
exports.parseKeyframeClipboardData = parseKeyframeClipboardData;
|
|
@@ -2,6 +2,7 @@ import type { InteractivitySchemaField, InteractivitySchema } from 'remotion';
|
|
|
2
2
|
export declare const keyframeInterpolationFunctions: readonly ["interpolate", "interpolateColors"];
|
|
3
3
|
export type KeyframeInterpolationFunction = (typeof keyframeInterpolationFunctions)[number];
|
|
4
4
|
export declare const isKeyframeInterpolationFunction: (name: string) => name is "interpolate" | "interpolateColors";
|
|
5
|
+
export declare const canEditEasingForInterpolationFunction: (interpolationFunction: string) => boolean;
|
|
5
6
|
export declare const isInteractivitySchemaFieldKeyframable: (field: InteractivitySchemaField | undefined) => boolean;
|
|
6
7
|
export declare const isSchemaFieldKeyframable: ({ schema, key, }: {
|
|
7
8
|
schema: InteractivitySchema | null;
|
|
@@ -1,25 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.isSchemaFieldKeyframable = exports.isInteractivitySchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.keyframeInterpolationFunctions = void 0;
|
|
3
|
+
exports.getKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.isSchemaFieldKeyframable = exports.isInteractivitySchemaFieldKeyframable = exports.canEditEasingForInterpolationFunction = exports.isKeyframeInterpolationFunction = exports.keyframeInterpolationFunctions = void 0;
|
|
4
4
|
exports.keyframeInterpolationFunctions = [
|
|
5
5
|
'interpolate',
|
|
6
6
|
'interpolateColors',
|
|
7
7
|
];
|
|
8
|
+
// Keep these tables exhaustive so every schema field requires explicit
|
|
9
|
+
// keyframe and interpolation decisions.
|
|
10
|
+
const KEYFRAME_FIELD_TYPE_SUPPORT = {
|
|
11
|
+
array: false,
|
|
12
|
+
asset: false,
|
|
13
|
+
boolean: false,
|
|
14
|
+
color: true,
|
|
15
|
+
enum: false,
|
|
16
|
+
'font-family': false,
|
|
17
|
+
hidden: true,
|
|
18
|
+
number: true,
|
|
19
|
+
'rotation-css': true,
|
|
20
|
+
'rotation-degrees': true,
|
|
21
|
+
scale: true,
|
|
22
|
+
'text-content': false,
|
|
23
|
+
'transform-origin': true,
|
|
24
|
+
translate: true,
|
|
25
|
+
'uv-coordinate': true,
|
|
26
|
+
};
|
|
27
|
+
const KEYFRAME_FIELD_TYPE_INTERPOLATION = {
|
|
28
|
+
array: 'unsupported',
|
|
29
|
+
asset: 'unsupported',
|
|
30
|
+
boolean: 'unsupported',
|
|
31
|
+
color: 'interpolateColors',
|
|
32
|
+
enum: 'unsupported',
|
|
33
|
+
'font-family': 'unsupported',
|
|
34
|
+
hidden: 'infer',
|
|
35
|
+
number: 'infer',
|
|
36
|
+
'rotation-css': 'interpolate',
|
|
37
|
+
'rotation-degrees': 'infer',
|
|
38
|
+
scale: 'interpolate',
|
|
39
|
+
'text-content': 'unsupported',
|
|
40
|
+
'transform-origin': 'interpolate',
|
|
41
|
+
translate: 'interpolate',
|
|
42
|
+
'uv-coordinate': 'infer',
|
|
43
|
+
};
|
|
44
|
+
const KEYFRAME_INTERPOLATION_EASING_SUPPORT = {
|
|
45
|
+
interpolate: true,
|
|
46
|
+
interpolateColors: true,
|
|
47
|
+
};
|
|
8
48
|
const isKeyframeInterpolationFunction = (name) => {
|
|
9
49
|
return exports.keyframeInterpolationFunctions.includes(name);
|
|
10
50
|
};
|
|
11
51
|
exports.isKeyframeInterpolationFunction = isKeyframeInterpolationFunction;
|
|
52
|
+
const canEditEasingForInterpolationFunction = (interpolationFunction) => (0, exports.isKeyframeInterpolationFunction)(interpolationFunction) &&
|
|
53
|
+
KEYFRAME_INTERPOLATION_EASING_SUPPORT[interpolationFunction];
|
|
54
|
+
exports.canEditEasingForInterpolationFunction = canEditEasingForInterpolationFunction;
|
|
12
55
|
const isInteractivitySchemaFieldKeyframable = (field) => {
|
|
13
56
|
if (!field) {
|
|
14
57
|
return true;
|
|
15
58
|
}
|
|
16
|
-
|
|
17
|
-
field.type === 'boolean' ||
|
|
18
|
-
field.type === 'enum' ||
|
|
19
|
-
field.type === 'font-family') {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return field.keyframable !== false;
|
|
59
|
+
return KEYFRAME_FIELD_TYPE_SUPPORT[field.type] && field.keyframable !== false;
|
|
23
60
|
};
|
|
24
61
|
exports.isInteractivitySchemaFieldKeyframable = isInteractivitySchemaFieldKeyframable;
|
|
25
62
|
const findFieldInSchema = (schema, key) => {
|
|
@@ -46,16 +83,11 @@ const isSchemaFieldKeyframable = ({ schema, key, }) => {
|
|
|
46
83
|
exports.isSchemaFieldKeyframable = isSchemaFieldKeyframable;
|
|
47
84
|
const getKeyframeInterpolationFunctionForSchemaField = ({ schema, key, }) => {
|
|
48
85
|
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
if ((field === null || field === void 0 ? void 0 : field.type) === 'scale' ||
|
|
53
|
-
(field === null || field === void 0 ? void 0 : field.type) === 'translate' ||
|
|
54
|
-
(field === null || field === void 0 ? void 0 : field.type) === 'transform-origin' ||
|
|
55
|
-
(field === null || field === void 0 ? void 0 : field.type) === 'rotation-css') {
|
|
56
|
-
return 'interpolate';
|
|
86
|
+
if (!field) {
|
|
87
|
+
return null;
|
|
57
88
|
}
|
|
58
|
-
|
|
89
|
+
const strategy = KEYFRAME_FIELD_TYPE_INTERPOLATION[field.type];
|
|
90
|
+
return strategy === 'infer' || strategy === 'unsupported' ? null : strategy;
|
|
59
91
|
};
|
|
60
92
|
exports.getKeyframeInterpolationFunctionForSchemaField = getKeyframeInterpolationFunctionForSchemaField;
|
|
61
93
|
const getKeyframeInterpolationFunction = ({ schema, key, staticValue, newValue, }) => {
|
|
@@ -18,12 +18,15 @@ export type EffectSchemaFieldInfo = SchemaFieldInfo & {
|
|
|
18
18
|
};
|
|
19
19
|
export type AnySchemaFieldInfo = InteractivitySchemaFieldInfo | EffectSchemaFieldInfo;
|
|
20
20
|
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
21
|
-
export type SchemaFieldGroup = 'controls' | 'transforms' | 'text';
|
|
21
|
+
export type SchemaFieldGroup = 'source' | 'controls' | 'transforms' | 'text';
|
|
22
22
|
export type SchemaFieldGroupInfo = {
|
|
23
23
|
readonly id: SchemaFieldGroup;
|
|
24
24
|
readonly label: string;
|
|
25
25
|
};
|
|
26
26
|
export declare const SCHEMA_FIELD_GROUPS: readonly [{
|
|
27
|
+
readonly id: "source";
|
|
28
|
+
readonly label: "Source";
|
|
29
|
+
}, {
|
|
27
30
|
readonly id: "controls";
|
|
28
31
|
readonly label: "Controls";
|
|
29
32
|
}, {
|
|
@@ -34,8 +37,27 @@ export declare const SCHEMA_FIELD_GROUPS: readonly [{
|
|
|
34
37
|
readonly label: "Text";
|
|
35
38
|
}];
|
|
36
39
|
export declare const getSchemaFieldGroup: (key: string) => SchemaFieldGroup;
|
|
37
|
-
declare const
|
|
38
|
-
|
|
40
|
+
declare const TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT: {
|
|
41
|
+
readonly array: true;
|
|
42
|
+
readonly asset: true;
|
|
43
|
+
readonly boolean: true;
|
|
44
|
+
readonly color: true;
|
|
45
|
+
readonly enum: true;
|
|
46
|
+
readonly 'font-family': true;
|
|
47
|
+
readonly hidden: false;
|
|
48
|
+
readonly number: true;
|
|
49
|
+
readonly 'rotation-css': true;
|
|
50
|
+
readonly 'rotation-degrees': true;
|
|
51
|
+
readonly scale: true;
|
|
52
|
+
readonly 'text-content': true;
|
|
53
|
+
readonly 'transform-origin': true;
|
|
54
|
+
readonly translate: true;
|
|
55
|
+
readonly 'uv-coordinate': true;
|
|
56
|
+
};
|
|
57
|
+
type TimelineSchemaFieldTypeSupport = typeof TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT;
|
|
58
|
+
type SupportedSchemaType = {
|
|
59
|
+
[FieldType in keyof TimelineSchemaFieldTypeSupport]: TimelineSchemaFieldTypeSupport[FieldType] extends true ? FieldType : never;
|
|
60
|
+
}[keyof TimelineSchemaFieldTypeSupport];
|
|
39
61
|
export declare const getFieldsToShow: ({ getDragOverrides, propStatuses, nodePath, schema, currentRuntimeValueDotNotation, includeTextContent, }: {
|
|
40
62
|
schema: InteractivitySchema;
|
|
41
63
|
currentRuntimeValueDotNotation: Record<string, unknown>;
|
|
@@ -5,6 +5,7 @@ const remotion_1 = require("remotion");
|
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
7
7
|
exports.SCHEMA_FIELD_GROUPS = [
|
|
8
|
+
{ id: 'source', label: 'Source' },
|
|
8
9
|
{ id: 'controls', label: 'Controls' },
|
|
9
10
|
{ id: 'transforms', label: 'Transform' },
|
|
10
11
|
{ id: 'text', label: 'Text' },
|
|
@@ -32,6 +33,9 @@ const TEXT_FIELD_KEYS = new Set([
|
|
|
32
33
|
'style.textAlign',
|
|
33
34
|
]);
|
|
34
35
|
const getSchemaFieldGroup = (key) => {
|
|
36
|
+
if (key === 'src') {
|
|
37
|
+
return 'source';
|
|
38
|
+
}
|
|
35
39
|
if (TRANSFORM_FIELD_KEYS.has(key)) {
|
|
36
40
|
return 'transforms';
|
|
37
41
|
}
|
|
@@ -51,22 +55,26 @@ const sortSchemaFields = (fields) => {
|
|
|
51
55
|
})
|
|
52
56
|
.map(({ field }) => field);
|
|
53
57
|
};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
'
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
|
|
68
|
-
'
|
|
69
|
-
|
|
58
|
+
// Keep this exhaustive so every schema field requires an explicit timeline UI
|
|
59
|
+
// support decision.
|
|
60
|
+
const TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT = {
|
|
61
|
+
array: true,
|
|
62
|
+
asset: true,
|
|
63
|
+
boolean: true,
|
|
64
|
+
color: true,
|
|
65
|
+
enum: true,
|
|
66
|
+
'font-family': true,
|
|
67
|
+
hidden: false,
|
|
68
|
+
number: true,
|
|
69
|
+
'rotation-css': true,
|
|
70
|
+
'rotation-degrees': true,
|
|
71
|
+
scale: true,
|
|
72
|
+
'text-content': true,
|
|
73
|
+
'transform-origin': true,
|
|
74
|
+
translate: true,
|
|
75
|
+
'uv-coordinate': true,
|
|
76
|
+
};
|
|
77
|
+
const isTimelineSchemaFieldSupported = (field) => TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT[field.type];
|
|
70
78
|
const getArrayRowCount = ({ fieldSchema, value, }) => {
|
|
71
79
|
var _a, _b;
|
|
72
80
|
const items = Array.isArray(value)
|
|
@@ -111,13 +119,10 @@ const getFieldsToShow = ({ getDragOverrides, propStatuses, nodePath, schema, cur
|
|
|
111
119
|
const activeSchema = remotion_1.Internals.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
|
|
112
120
|
const fields = Object.entries(activeSchema)
|
|
113
121
|
.map(([key, fieldSchema]) => {
|
|
114
|
-
|
|
115
|
-
if (SUPPORTED_SCHEMA_TYPES.indexOf(typeName) === -1) {
|
|
116
|
-
throw new Error(`Unsupported field type: ${typeName}`);
|
|
117
|
-
}
|
|
118
|
-
if (typeName === 'hidden') {
|
|
122
|
+
if (!isTimelineSchemaFieldSupported(fieldSchema)) {
|
|
119
123
|
return null;
|
|
120
124
|
}
|
|
125
|
+
const typeName = fieldSchema.type;
|
|
121
126
|
if (fieldSchema.type === 'number' && fieldSchema.hiddenFromList) {
|
|
122
127
|
return null;
|
|
123
128
|
}
|
|
@@ -160,10 +165,10 @@ const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, ge
|
|
|
160
165
|
});
|
|
161
166
|
const fields = Object.entries(activeSchema)
|
|
162
167
|
.map(([key, fieldSchema]) => {
|
|
163
|
-
|
|
164
|
-
if (typeName === 'hidden') {
|
|
168
|
+
if (!isTimelineSchemaFieldSupported(fieldSchema)) {
|
|
165
169
|
return null;
|
|
166
170
|
}
|
|
171
|
+
const typeName = fieldSchema.type;
|
|
167
172
|
if (fieldSchema.type === 'number' && fieldSchema.hiddenFromList) {
|
|
168
173
|
return null;
|
|
169
174
|
}
|
|
@@ -172,9 +177,6 @@ const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, ge
|
|
|
172
177
|
if (key === 'disabled') {
|
|
173
178
|
return null;
|
|
174
179
|
}
|
|
175
|
-
if (SUPPORTED_SCHEMA_TYPES.indexOf(typeName) === -1) {
|
|
176
|
-
throw new Error(`Unsupported field type: ${typeName}`);
|
|
177
|
-
}
|
|
178
180
|
return {
|
|
179
181
|
kind: 'effect-field',
|
|
180
182
|
key,
|
package/dist/studio-html.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export type StudioHtmlOptions = {
|
|
|
18
18
|
sampleRate: number | null;
|
|
19
19
|
publicFiles: StaticFile[];
|
|
20
20
|
publicFolderExists: string | null;
|
|
21
|
+
fileSystemPlatform: string | null;
|
|
21
22
|
includeFavicon: boolean;
|
|
22
23
|
title: string;
|
|
23
24
|
renderDefaults: RenderDefaults | undefined;
|
|
@@ -31,4 +32,4 @@ export type StudioHtmlOptions = {
|
|
|
31
32
|
readOnlyStudio?: boolean;
|
|
32
33
|
studioRuntimeConfig?: StudioRuntimeConfig;
|
|
33
34
|
};
|
|
34
|
-
export declare const studioHtml: ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, sampleRate, logLevel, mode, bundleScriptUrl, readOnlyStudio, studioRuntimeConfig, }: StudioHtmlOptions) => string;
|
|
35
|
+
export declare const studioHtml: ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, fileSystemPlatform, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, sampleRate, logLevel, mode, bundleScriptUrl, readOnlyStudio, studioRuntimeConfig, }: StudioHtmlOptions) => string;
|
package/dist/studio-html.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.studioHtml = void 0;
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
|
-
const studioHtml = ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, sampleRate, logLevel, mode, bundleScriptUrl, readOnlyStudio, studioRuntimeConfig, }) => {
|
|
5
|
+
const studioHtml = ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, fileSystemPlatform, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, sampleRate, logLevel, mode, bundleScriptUrl, readOnlyStudio, studioRuntimeConfig, }) => {
|
|
6
6
|
const scriptUrl = bundleScriptUrl !== null && bundleScriptUrl !== void 0 ? bundleScriptUrl : `${publicPath}bundle.js`;
|
|
7
7
|
return `
|
|
8
8
|
<!DOCTYPE html>
|
|
@@ -32,6 +32,7 @@ const studioHtml = ({ publicPath, editorName, inputProps, envVariables, staticHa
|
|
|
32
32
|
<script>window.remotion_studioConfig = ${JSON.stringify(studioRuntimeConfig !== null && studioRuntimeConfig !== void 0 ? studioRuntimeConfig : null)};</script>
|
|
33
33
|
<script>window.remotion_renderDefaults = ${JSON.stringify(renderDefaults)};</script>
|
|
34
34
|
<script>window.remotion_cwd = ${JSON.stringify(remotionRoot)};</script>
|
|
35
|
+
<script>window.remotion_fileSystemPlatform = ${JSON.stringify(fileSystemPlatform)};</script>
|
|
35
36
|
<script>window.remotion_studioServerCommand = ${studioServerCommand ? JSON.stringify(studioServerCommand) : 'null'};</script>
|
|
36
37
|
${inputProps
|
|
37
38
|
? `<script>window.remotion_inputProps = ${JSON.stringify(JSON.stringify(inputProps))};</script>`
|
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.493",
|
|
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.493"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.493",
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.493",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
30
|
},
|