@remotion/studio-shared 4.0.482 → 4.0.484

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.
@@ -4,6 +4,7 @@ import type { _InternalTypes, CannotUpdateSequenceReason, CanUpdateEffectPropsRe
4
4
  import type { RecastCodemod, VisualControlChange } from './codemods';
5
5
  import type { ComponentProp } from './component-drag-data';
6
6
  import type { EffectClipboardParam, EffectClipboardPasteType, EffectClipboardSnapshot } from './effect-clipboard-data';
7
+ import type { ElementDragData } from './element-drag-data';
7
8
  import type { PackageManager } from './package-manager';
8
9
  import type { ProjectInfo } from './project-info';
9
10
  import type { CompletedClientRender, RequiredChromiumOptions } from './render-job';
@@ -528,6 +529,19 @@ export type InsertJsxElementResponse = {
528
529
  reason: string;
529
530
  stack: string;
530
531
  };
532
+ export type InsertElementRequest = {
533
+ compositionFile: string;
534
+ compositionId: string;
535
+ element: ElementDragData['element'];
536
+ position: InsertableCompositionElementPosition | null;
537
+ };
538
+ export type InsertElementResponse = {
539
+ success: true;
540
+ } | {
541
+ success: false;
542
+ reason: string;
543
+ stack: string;
544
+ };
531
545
  export type DownloadRemoteAssetRequest = {
532
546
  url: string;
533
547
  };
@@ -613,6 +627,7 @@ export type ApiRoutes = {
613
627
  '/api/delete-jsx-node': ReqAndRes<DeleteJsxNodeRequest, DeleteJsxNodeResponse>;
614
628
  '/api/duplicate-jsx-node': ReqAndRes<DuplicateJsxNodeRequest, DuplicateJsxNodeResponse>;
615
629
  '/api/insert-jsx-element': ReqAndRes<InsertJsxElementRequest, InsertJsxElementResponse>;
630
+ '/api/insert-element': ReqAndRes<InsertElementRequest, InsertElementResponse>;
616
631
  '/api/download-remote-asset': ReqAndRes<DownloadRemoteAssetRequest, DownloadRemoteAssetResponse>;
617
632
  '/api/update-available': ReqAndRes<UpdateAvailableRequest, UpdateAvailableResponse>;
618
633
  '/api/apply-codemod': ReqAndRes<ApplyCodemodRequest, ApplyCodemodResponse>;
@@ -0,0 +1,13 @@
1
+ export declare const getDefinePluginDefinitions: ({ maxTimelineTracks, askAIEnabled, keyboardShortcutsEnabled, bufferStateDelayInMilliseconds, experimentalClientSideRenderingEnabled, }: {
2
+ maxTimelineTracks: number | null;
3
+ askAIEnabled: boolean;
4
+ keyboardShortcutsEnabled: boolean;
5
+ bufferStateDelayInMilliseconds: number | null;
6
+ experimentalClientSideRenderingEnabled: boolean;
7
+ }) => {
8
+ 'process.env.MAX_TIMELINE_TRACKS': number | null;
9
+ 'process.env.ASK_AI_ENABLED': boolean;
10
+ 'process.env.KEYBOARD_SHORTCUTS_ENABLED': boolean;
11
+ 'process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS': number | null;
12
+ 'process.env.EXPERIMENTAL_CLIENT_SIDE_RENDERING_ENABLED': boolean;
13
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefinePluginDefinitions = void 0;
4
+ const getDefinePluginDefinitions = ({ maxTimelineTracks, askAIEnabled, keyboardShortcutsEnabled, bufferStateDelayInMilliseconds, experimentalClientSideRenderingEnabled, }) => ({
5
+ 'process.env.MAX_TIMELINE_TRACKS': maxTimelineTracks,
6
+ 'process.env.ASK_AI_ENABLED': askAIEnabled,
7
+ 'process.env.KEYBOARD_SHORTCUTS_ENABLED': keyboardShortcutsEnabled,
8
+ 'process.env.BUFFER_STATE_DELAY_IN_MILLISECONDS': bufferStateDelayInMilliseconds,
9
+ 'process.env.EXPERIMENTAL_CLIENT_SIDE_RENDERING_ENABLED': experimentalClientSideRenderingEnabled,
10
+ });
11
+ exports.getDefinePluginDefinitions = getDefinePluginDefinitions;
@@ -19,8 +19,25 @@ const isEasing = (value) => {
19
19
  isFiniteNumber(value.damping) &&
20
20
  isFiniteNumber(value.mass) &&
21
21
  isFiniteNumber(value.stiffness) &&
22
+ (value.allowTail === undefined ||
23
+ value.allowTail === null ||
24
+ typeof value.allowTail === 'boolean') &&
25
+ (value.durationRestThreshold === undefined ||
26
+ value.durationRestThreshold === null ||
27
+ isFiniteNumber(value.durationRestThreshold)) &&
22
28
  typeof value.overshootClamping === 'boolean')));
23
29
  };
30
+ const normalizeEasing = (easing) => {
31
+ var _a, _b;
32
+ if (easing.type !== 'spring') {
33
+ return easing;
34
+ }
35
+ return {
36
+ ...easing,
37
+ allowTail: (_a = easing.allowTail) !== null && _a !== void 0 ? _a : null,
38
+ durationRestThreshold: (_b = easing.durationRestThreshold) !== null && _b !== void 0 ? _b : null,
39
+ };
40
+ };
24
41
  const parseEasingClipboardDataResult = (value) => {
25
42
  try {
26
43
  const parsed = JSON.parse(value);
@@ -45,7 +62,7 @@ const parseEasingClipboardDataResult = (value) => {
45
62
  type: 'easing',
46
63
  version: 1,
47
64
  remotionClipboard: 'easing',
48
- easing: parsed.easing,
65
+ easing: normalizeEasing(parsed.easing),
49
66
  },
50
67
  };
51
68
  }
@@ -160,6 +160,28 @@ exports.EFFECT_CATALOG = [
160
160
  },
161
161
  },
162
162
  },
163
+ {
164
+ id: 'effects-linear-gradient',
165
+ category: 'Color',
166
+ label: 'linearGradient()',
167
+ description: 'Two-stop gradient effect',
168
+ effect: {
169
+ name: 'linearGradient',
170
+ importPath: '@remotion/effects/linear-gradient',
171
+ config: {},
172
+ },
173
+ },
174
+ {
175
+ id: 'effects-linear-gradient-tint',
176
+ category: 'Color',
177
+ label: 'linearGradientTint()',
178
+ description: 'Gradient tint effect',
179
+ effect: {
180
+ name: 'linearGradientTint',
181
+ importPath: '@remotion/effects/linear-gradient-tint',
182
+ config: {},
183
+ },
184
+ },
163
185
  {
164
186
  id: 'effects-thermal-vision',
165
187
  category: 'Color',
@@ -195,6 +217,17 @@ exports.EFFECT_CATALOG = [
195
217
  config: {},
196
218
  },
197
219
  },
220
+ {
221
+ id: 'effects-radial-progressive-blur',
222
+ category: 'Blur & Shadow',
223
+ label: 'radialProgressiveBlur()',
224
+ description: 'Ellipse-controlled blur effect',
225
+ effect: {
226
+ name: 'radialProgressiveBlur',
227
+ importPath: '@remotion/effects/radial-progressive-blur',
228
+ config: {},
229
+ },
230
+ },
198
231
  {
199
232
  id: 'effects-zoom-blur',
200
233
  category: 'Blur & Shadow',
@@ -21,8 +21,43 @@ const isEasing = (value) => {
21
21
  isFiniteNumber(value.damping) &&
22
22
  isFiniteNumber(value.mass) &&
23
23
  isFiniteNumber(value.stiffness) &&
24
+ (value.allowTail === undefined ||
25
+ value.allowTail === null ||
26
+ typeof value.allowTail === 'boolean') &&
27
+ (value.durationRestThreshold === undefined ||
28
+ value.durationRestThreshold === null ||
29
+ isFiniteNumber(value.durationRestThreshold)) &&
24
30
  typeof value.overshootClamping === 'boolean')));
25
31
  };
32
+ const normalizeEasing = (easing) => {
33
+ var _a, _b;
34
+ if (easing.type !== 'spring') {
35
+ return easing;
36
+ }
37
+ return {
38
+ ...easing,
39
+ allowTail: (_a = easing.allowTail) !== null && _a !== void 0 ? _a : null,
40
+ durationRestThreshold: (_b = easing.durationRestThreshold) !== null && _b !== void 0 ? _b : null,
41
+ };
42
+ };
43
+ const normalizeParam = (param) => {
44
+ if (param.type === 'static') {
45
+ return param;
46
+ }
47
+ return {
48
+ ...param,
49
+ easing: param.easing.map(normalizeEasing),
50
+ };
51
+ };
52
+ const normalizeSnapshot = (snapshot) => {
53
+ return {
54
+ ...snapshot,
55
+ params: Object.fromEntries(Object.entries(snapshot.params).map(([key, param]) => [
56
+ key,
57
+ normalizeParam(param),
58
+ ])),
59
+ };
60
+ };
26
61
  const isKeyframe = (value) => {
27
62
  return isRecord(value) && isFiniteNumber(value.frame) && 'value' in value;
28
63
  };
@@ -94,7 +129,7 @@ const parseEffectClipboardDataResult = (value) => {
94
129
  if (!isEffectClipboardSnapshotV3(effect)) {
95
130
  return { status: 'invalid' };
96
131
  }
97
- effects.push(effect);
132
+ effects.push(normalizeSnapshot(effect));
98
133
  }
99
134
  return {
100
135
  status: 'valid',
@@ -161,7 +196,7 @@ const parseEffectPropClipboardDataResult = (value) => {
161
196
  importPath: parsed.effect.importPath,
162
197
  },
163
198
  key: parsed.key,
164
- param: parsed.param,
199
+ param: normalizeParam(parsed.param),
165
200
  },
166
201
  };
167
202
  }
@@ -0,0 +1,22 @@
1
+ import { type ComponentDimensions } from './component-drag-data';
2
+ export declare const ELEMENT_DRAG_MIME_TYPE = "application/vnd.remotion.element+json";
3
+ export type ElementDragData = {
4
+ type: 'remotion-element';
5
+ version: 1;
6
+ element: {
7
+ slug: string;
8
+ displayName: string;
9
+ sourceCode: string;
10
+ dimensions: ComponentDimensions;
11
+ };
12
+ };
13
+ export declare const isLowercaseElementFileName: (value: unknown) => value is string;
14
+ export declare const makeElementFileNameFromSlug: (slug: string) => string | null;
15
+ export declare const getElementComponentNameFromSourceCode: (sourceCode: string) => string | null;
16
+ export declare const makeElementDragData: ({ dimensions, displayName, slug, sourceCode, }: {
17
+ slug: string;
18
+ displayName: string;
19
+ sourceCode: string;
20
+ dimensions: ComponentDimensions;
21
+ }) => ElementDragData;
22
+ export declare const parseElementDragData: (value: string) => ElementDragData | null;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseElementDragData = exports.makeElementDragData = exports.getElementComponentNameFromSourceCode = exports.makeElementFileNameFromSlug = exports.isLowercaseElementFileName = exports.ELEMENT_DRAG_MIME_TYPE = void 0;
4
+ const component_drag_data_1 = require("./component-drag-data");
5
+ exports.ELEMENT_DRAG_MIME_TYPE = 'application/vnd.remotion.element+json';
6
+ const isRecord = (value) => {
7
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
8
+ };
9
+ const isLowercaseElementFileName = (value) => {
10
+ return (typeof value === 'string' &&
11
+ value.length > 0 &&
12
+ value.length < 120 &&
13
+ value === value.toLowerCase() &&
14
+ value.endsWith('.tsx') &&
15
+ !value.includes('/') &&
16
+ !value.includes('\\') &&
17
+ !value.includes('\0') &&
18
+ !value.includes('..') &&
19
+ /^[a-z0-9][a-z0-9.-]*\.tsx$/.test(value));
20
+ };
21
+ exports.isLowercaseElementFileName = isLowercaseElementFileName;
22
+ const isSlug = (value) => {
23
+ return (typeof value === 'string' &&
24
+ value.length > 0 &&
25
+ value.length < 120 &&
26
+ /^[a-z0-9][a-z0-9/-]*$/.test(value) &&
27
+ !value.includes('..') &&
28
+ !value.includes('//'));
29
+ };
30
+ const makeElementFileNameFromSlug = (slug) => {
31
+ if (!isSlug(slug)) {
32
+ return null;
33
+ }
34
+ const lastSegment = slug.split('/').at(-1);
35
+ if (!lastSegment) {
36
+ return null;
37
+ }
38
+ const fileName = `${lastSegment}.element.tsx`;
39
+ return (0, exports.isLowercaseElementFileName)(fileName) ? fileName : null;
40
+ };
41
+ exports.makeElementFileNameFromSlug = makeElementFileNameFromSlug;
42
+ const isDisplayName = (value) => {
43
+ return typeof value === 'string' && value.length > 0 && value.length < 120;
44
+ };
45
+ const isSourceCode = (value) => {
46
+ return (typeof value === 'string' &&
47
+ value.trim().length > 0 &&
48
+ value.length < 200000);
49
+ };
50
+ const isDimensions = (value) => {
51
+ if (!isRecord(value)) {
52
+ return false;
53
+ }
54
+ return (typeof value.width === 'number' &&
55
+ Number.isFinite(value.width) &&
56
+ value.width > 0 &&
57
+ typeof value.height === 'number' &&
58
+ Number.isFinite(value.height) &&
59
+ value.height > 0);
60
+ };
61
+ const getElementComponentNameFromSourceCode = (sourceCode) => {
62
+ const componentNames = Array.from(sourceCode.matchAll(/export\s+(?:const|function)\s+([A-Z_$][A-Za-z0-9_$]*)\b/g)).map((match) => match[1]);
63
+ const uniqueComponentNames = Array.from(new Set(componentNames));
64
+ if (uniqueComponentNames.length !== 1) {
65
+ return null;
66
+ }
67
+ const [componentName] = uniqueComponentNames;
68
+ return (0, component_drag_data_1.isComponentIdentifier)(componentName) ? componentName : null;
69
+ };
70
+ exports.getElementComponentNameFromSourceCode = getElementComponentNameFromSourceCode;
71
+ const makeElementDragData = ({ dimensions, displayName, slug, sourceCode, }) => {
72
+ return {
73
+ type: 'remotion-element',
74
+ version: 1,
75
+ element: {
76
+ slug,
77
+ displayName,
78
+ sourceCode,
79
+ dimensions,
80
+ },
81
+ };
82
+ };
83
+ exports.makeElementDragData = makeElementDragData;
84
+ const parseElementDragData = (value) => {
85
+ try {
86
+ const parsed = JSON.parse(value);
87
+ if (!isRecord(parsed)) {
88
+ return null;
89
+ }
90
+ if (parsed.type !== 'remotion-element' || parsed.version !== 1) {
91
+ return null;
92
+ }
93
+ if (!isRecord(parsed.element)) {
94
+ return null;
95
+ }
96
+ const { dimensions, displayName, slug, sourceCode } = parsed.element;
97
+ if (!isSlug(slug) ||
98
+ !isDisplayName(displayName) ||
99
+ !isSourceCode(sourceCode) ||
100
+ (0, exports.getElementComponentNameFromSourceCode)(sourceCode) === null ||
101
+ (0, exports.makeElementFileNameFromSlug)(slug) === null ||
102
+ !isDimensions(dimensions)) {
103
+ return null;
104
+ }
105
+ return (0, exports.makeElementDragData)({
106
+ slug,
107
+ displayName,
108
+ sourceCode,
109
+ dimensions,
110
+ });
111
+ }
112
+ catch (_a) {
113
+ return null;
114
+ }
115
+ };
116
+ exports.parseElementDragData = parseElementDragData;
package/dist/index.d.ts CHANGED
@@ -1,15 +1,16 @@
1
1
  export { splitAnsi, stripAnsi } from './ansi';
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, DuplicateEffectRequest, DuplicateEffectRequestItem, DuplicateEffectResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InsertableCompositionElementPosition, 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';
2
+ export { AddEffectKeyframeRequest, AddEffectKeyframeResponse, AddEffectRequest, AddEffectResponse, AddKeyframesRequest, AddKeyframesResponse, 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, DuplicateEffectRequest, DuplicateEffectRequestItem, DuplicateEffectResponse, DuplicateJsxNodeRequest, DuplicateJsxNodeResponse, InsertElementRequest, InsertElementResponse, InsertJsxElementRequest, InsertJsxElementResponse, InsertableCompositionElement, InsertableCompositionElementPosition, 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 AddEffectKeyframe, type AddSequenceKeyframe, type KeyframeSettings, } 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
5
  export { COMPONENT_DRAG_MIME_TYPE, areComponentProps, isComponentIdentifier, isComponentImportPath, makeComponentDragData, parseComponentDragData, type ComponentDimensions, type ComponentDragData, type ComponentProp, } from './component-drag-data';
6
6
  export { DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS } from './default-buffer-state-delay-in-milliseconds';
7
- export { KEYFRAME_EASING_PRESETS, LINEAR_KEYFRAME_EASING, type KeyframeEasing, type KeyframeEasingPreset, } from './keyframe-easing-presets';
7
+ export { getDefinePluginDefinitions } from './define-plugin-definitions';
8
8
  export { detectFileType, isImageFileType, type FileDimensions, type FileType, type ImageFileType, } from './detect-file-type';
9
9
  export { parseEasingClipboardData, parseEasingClipboardDataResult, type EasingClipboardData, type EasingClipboardDataParseResult, } from './easing-clipboard-data';
10
+ export { EFFECT_CATALOG, getEffectCatalogCategories, getEffectDocumentationLink, getEffectDocumentationPath, getEffectPreviewAlt, getEffectPreviewSource, makeEffectDragDataFromCatalogItem, type EffectCatalogCategory, type EffectCatalogItem, } from './effect-catalog';
10
11
  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';
11
12
  export { EFFECT_DRAG_MIME_TYPE, parseEffectDragData, type EffectDragData, } from './effect-drag-data';
12
- export { EFFECT_CATALOG, getEffectCatalogCategories, getEffectDocumentationLink, getEffectDocumentationPath, getEffectPreviewAlt, getEffectPreviewSource, makeEffectDragDataFromCatalogItem, type EffectCatalogCategory, type EffectCatalogItem, } from './effect-catalog';
13
+ export { ELEMENT_DRAG_MIME_TYPE, getElementComponentNameFromSourceCode, isLowercaseElementFileName, makeElementDragData, makeElementFileNameFromSlug, parseElementDragData, type ElementDragData, } from './element-drag-data';
13
14
  export { EventSourceEvent } from './event-source-event';
14
15
  export { formatBytes } from './format-bytes';
15
16
  export { getAllSchemaKeys } from './get-all-keys';
@@ -18,20 +19,23 @@ export { ErrorLocation, getLocationFromBuildError, } from './get-location-from-b
18
19
  export { getProjectName } from './get-project-name';
19
20
  export type { GitSource } from './git-source';
20
21
  export { HotMiddlewareMessage, HotMiddlewareOptions, ModuleMap, hotMiddlewareOptions, } from './hot-middleware';
21
- export { getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, isInteractivitySchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
22
- export { DEFAULT_SPRING_EASING, parseSpringEasingConfig, type SpringKeyframeEasing, } from './parse-spring-easing-config';
22
+ export { KEYFRAME_EASING_PRESETS, LINEAR_KEYFRAME_EASING, type KeyframeEasing, type KeyframeEasingPreset, } from './keyframe-easing-presets';
23
+ export { getKeyframeInterpolationFunction, getKeyframeInterpolationFunctionForSchemaField, isInteractivitySchemaFieldKeyframable, isKeyframeInterpolationFunction, isSchemaFieldKeyframable, keyframeInterpolationFunctions, type KeyframeInterpolationFunction, } from './keyframe-interpolation-function';
23
24
  export { DEFAULT_TIMELINE_TRACKS } from './max-timeline-tracks';
24
25
  export { Pkgs, apiDocs, descriptions, extraPackages, installableMap, packages, type ExtraPackage, } from './package-info';
25
26
  export { PackageManager } from './package-manager';
27
+ export { DEFAULT_SPRING_EASING, parseSpringEasingConfig, type SpringKeyframeEasing, } from './parse-spring-easing-config';
26
28
  export { ProjectInfo } from './project-info';
27
29
  export type { RenderDefaults } from './render-defaults';
28
30
  export { AggregateRenderProgress, ArtifactProgress, BrowserDownloadState, BrowserProgressLog, BundlingState, CopyingState, DownloadProgress, JobProgressCallback, RenderJob, RenderJobWithCleanup, RenderingProgressInput, RequiredChromiumOptions, StitchingProgressInput, UiOpenGlOptions, } from './render-job';
29
31
  export type { CompletedClientRender } from './render-job';
30
32
  export { getRequiredPackageForEffectImportPath, getRequiredPackageForInsertableElement, } from './required-package';
31
- export { SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, } from './schema-field-info';
32
- export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, PropStatuses, SchemaFieldInfo, SequenceControls, InteractivitySchemaFieldInfo, } from './schema-field-info';
33
+ export { SCHEMA_FIELD_GROUPS, SCHEMA_FIELD_ROW_HEIGHT, getEffectFieldsToShow, getFieldsToShow, getSchemaFieldGroup, } from './schema-field-info';
34
+ export type { AnySchemaFieldInfo, DragOverrides, EffectSchemaFieldInfo, InteractivitySchemaFieldInfo, PropStatuses, SchemaFieldGroup, SchemaFieldGroupInfo, SchemaFieldInfo, SequenceControls, } from './schema-field-info';
33
35
  export { SFX_DRAG_MIME_TYPE, parseSfxDragData, type SfxDragData, } from './sfx-drag-data';
34
36
  export { ScriptLine, SomeStackFrame, StackFrame, SymbolicatedStackFrame, } from './stack-types';
37
+ export { getStudioEntryPoints, type StudioEntryPointPaths, } from './studio-entry-points';
38
+ export { studioHtml, type StudioHtmlOptions } from './studio-html';
35
39
  export { EnumPath, stringifyDefaultProps } from './stringify-default-props';
36
40
  export type { VisualControlChange } from './codemods';
37
41
  export { optimisticAddEffectKeyframe, optimisticAddSequenceKeyframe, } from './optimistic-add-keyframe';
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.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = exports.keyframeInterpolationFunctions = exports.isInteractivitySchemaFieldKeyframable = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = exports.getAllSchemaKeys = exports.formatBytes = exports.makeEffectDragDataFromCatalogItem = exports.getEffectPreviewSource = exports.getEffectPreviewAlt = exports.getEffectDocumentationPath = exports.getEffectDocumentationLink = exports.getEffectCatalogCategories = exports.EFFECT_CATALOG = exports.parseEffectDragData = exports.EFFECT_DRAG_MIME_TYPE = exports.parseEffectPropClipboardDataResult = exports.parseEffectPropClipboardData = exports.parseEffectClipboardDataResult = exports.parseEffectClipboardData = exports.parseEasingClipboardDataResult = exports.parseEasingClipboardData = exports.isImageFileType = exports.detectFileType = exports.LINEAR_KEYFRAME_EASING = 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.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = 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 = void 0;
17
+ exports.keyframeInterpolationFunctions = exports.isSchemaFieldKeyframable = exports.isKeyframeInterpolationFunction = exports.isInteractivitySchemaFieldKeyframable = exports.getKeyframeInterpolationFunctionForSchemaField = exports.getKeyframeInterpolationFunction = exports.LINEAR_KEYFRAME_EASING = exports.KEYFRAME_EASING_PRESETS = exports.hotMiddlewareOptions = exports.getProjectName = exports.getLocationFromBuildError = exports.getDefaultOutLocation = 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.isImageFileType = exports.detectFileType = exports.getDefinePluginDefinitions = 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.moveKeyframesInPropStatus = exports.canMoveKeyframesWithoutCollisions = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticAddSequenceKeyframe = exports.optimisticAddEffectKeyframe = exports.stringifyDefaultProps = exports.studioHtml = exports.getStudioEntryPoints = exports.parseSfxDragData = exports.SFX_DRAG_MIME_TYPE = exports.getSchemaFieldGroup = exports.getFieldsToShow = exports.getEffectFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_GROUPS = exports.getRequiredPackageForInsertableElement = exports.getRequiredPackageForEffectImportPath = exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = exports.packages = exports.installableMap = exports.extraPackages = exports.descriptions = exports.apiDocs = exports.DEFAULT_TIMELINE_TRACKS = 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; } });
@@ -33,23 +33,14 @@ Object.defineProperty(exports, "makeComponentDragData", { enumerable: true, get:
33
33
  Object.defineProperty(exports, "parseComponentDragData", { enumerable: true, get: function () { return component_drag_data_1.parseComponentDragData; } });
34
34
  const default_buffer_state_delay_in_milliseconds_1 = require("./default-buffer-state-delay-in-milliseconds");
35
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; } });
38
- Object.defineProperty(exports, "LINEAR_KEYFRAME_EASING", { enumerable: true, get: function () { return keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING; } });
36
+ const define_plugin_definitions_1 = require("./define-plugin-definitions");
37
+ Object.defineProperty(exports, "getDefinePluginDefinitions", { enumerable: true, get: function () { return define_plugin_definitions_1.getDefinePluginDefinitions; } });
39
38
  const detect_file_type_1 = require("./detect-file-type");
40
39
  Object.defineProperty(exports, "detectFileType", { enumerable: true, get: function () { return detect_file_type_1.detectFileType; } });
41
40
  Object.defineProperty(exports, "isImageFileType", { enumerable: true, get: function () { return detect_file_type_1.isImageFileType; } });
42
41
  const easing_clipboard_data_1 = require("./easing-clipboard-data");
43
42
  Object.defineProperty(exports, "parseEasingClipboardData", { enumerable: true, get: function () { return easing_clipboard_data_1.parseEasingClipboardData; } });
44
43
  Object.defineProperty(exports, "parseEasingClipboardDataResult", { enumerable: true, get: function () { return easing_clipboard_data_1.parseEasingClipboardDataResult; } });
45
- const effect_clipboard_data_1 = require("./effect-clipboard-data");
46
- Object.defineProperty(exports, "parseEffectClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardData; } });
47
- Object.defineProperty(exports, "parseEffectClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardDataResult; } });
48
- Object.defineProperty(exports, "parseEffectPropClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardData; } });
49
- Object.defineProperty(exports, "parseEffectPropClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardDataResult; } });
50
- const effect_drag_data_1 = require("./effect-drag-data");
51
- Object.defineProperty(exports, "EFFECT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return effect_drag_data_1.EFFECT_DRAG_MIME_TYPE; } });
52
- Object.defineProperty(exports, "parseEffectDragData", { enumerable: true, get: function () { return effect_drag_data_1.parseEffectDragData; } });
53
44
  const effect_catalog_1 = require("./effect-catalog");
54
45
  Object.defineProperty(exports, "EFFECT_CATALOG", { enumerable: true, get: function () { return effect_catalog_1.EFFECT_CATALOG; } });
55
46
  Object.defineProperty(exports, "getEffectCatalogCategories", { enumerable: true, get: function () { return effect_catalog_1.getEffectCatalogCategories; } });
@@ -58,6 +49,21 @@ Object.defineProperty(exports, "getEffectDocumentationPath", { enumerable: true,
58
49
  Object.defineProperty(exports, "getEffectPreviewAlt", { enumerable: true, get: function () { return effect_catalog_1.getEffectPreviewAlt; } });
59
50
  Object.defineProperty(exports, "getEffectPreviewSource", { enumerable: true, get: function () { return effect_catalog_1.getEffectPreviewSource; } });
60
51
  Object.defineProperty(exports, "makeEffectDragDataFromCatalogItem", { enumerable: true, get: function () { return effect_catalog_1.makeEffectDragDataFromCatalogItem; } });
52
+ const effect_clipboard_data_1 = require("./effect-clipboard-data");
53
+ Object.defineProperty(exports, "parseEffectClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardData; } });
54
+ Object.defineProperty(exports, "parseEffectClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectClipboardDataResult; } });
55
+ Object.defineProperty(exports, "parseEffectPropClipboardData", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardData; } });
56
+ Object.defineProperty(exports, "parseEffectPropClipboardDataResult", { enumerable: true, get: function () { return effect_clipboard_data_1.parseEffectPropClipboardDataResult; } });
57
+ const effect_drag_data_1 = require("./effect-drag-data");
58
+ Object.defineProperty(exports, "EFFECT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return effect_drag_data_1.EFFECT_DRAG_MIME_TYPE; } });
59
+ Object.defineProperty(exports, "parseEffectDragData", { enumerable: true, get: function () { return effect_drag_data_1.parseEffectDragData; } });
60
+ const element_drag_data_1 = require("./element-drag-data");
61
+ Object.defineProperty(exports, "ELEMENT_DRAG_MIME_TYPE", { enumerable: true, get: function () { return element_drag_data_1.ELEMENT_DRAG_MIME_TYPE; } });
62
+ Object.defineProperty(exports, "getElementComponentNameFromSourceCode", { enumerable: true, get: function () { return element_drag_data_1.getElementComponentNameFromSourceCode; } });
63
+ Object.defineProperty(exports, "isLowercaseElementFileName", { enumerable: true, get: function () { return element_drag_data_1.isLowercaseElementFileName; } });
64
+ Object.defineProperty(exports, "makeElementDragData", { enumerable: true, get: function () { return element_drag_data_1.makeElementDragData; } });
65
+ Object.defineProperty(exports, "makeElementFileNameFromSlug", { enumerable: true, get: function () { return element_drag_data_1.makeElementFileNameFromSlug; } });
66
+ Object.defineProperty(exports, "parseElementDragData", { enumerable: true, get: function () { return element_drag_data_1.parseElementDragData; } });
61
67
  const format_bytes_1 = require("./format-bytes");
62
68
  Object.defineProperty(exports, "formatBytes", { enumerable: true, get: function () { return format_bytes_1.formatBytes; } });
63
69
  const get_all_keys_1 = require("./get-all-keys");
@@ -70,16 +76,16 @@ const get_project_name_1 = require("./get-project-name");
70
76
  Object.defineProperty(exports, "getProjectName", { enumerable: true, get: function () { return get_project_name_1.getProjectName; } });
71
77
  const hot_middleware_1 = require("./hot-middleware");
72
78
  Object.defineProperty(exports, "hotMiddlewareOptions", { enumerable: true, get: function () { return hot_middleware_1.hotMiddlewareOptions; } });
79
+ const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
80
+ Object.defineProperty(exports, "KEYFRAME_EASING_PRESETS", { enumerable: true, get: function () { return keyframe_easing_presets_1.KEYFRAME_EASING_PRESETS; } });
81
+ Object.defineProperty(exports, "LINEAR_KEYFRAME_EASING", { enumerable: true, get: function () { return keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING; } });
73
82
  const keyframe_interpolation_function_1 = require("./keyframe-interpolation-function");
74
83
  Object.defineProperty(exports, "getKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.getKeyframeInterpolationFunction; } });
75
84
  Object.defineProperty(exports, "getKeyframeInterpolationFunctionForSchemaField", { enumerable: true, get: function () { return keyframe_interpolation_function_1.getKeyframeInterpolationFunctionForSchemaField; } });
85
+ Object.defineProperty(exports, "isInteractivitySchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isInteractivitySchemaFieldKeyframable; } });
76
86
  Object.defineProperty(exports, "isKeyframeInterpolationFunction", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isKeyframeInterpolationFunction; } });
77
87
  Object.defineProperty(exports, "isSchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isSchemaFieldKeyframable; } });
78
- Object.defineProperty(exports, "isInteractivitySchemaFieldKeyframable", { enumerable: true, get: function () { return keyframe_interpolation_function_1.isInteractivitySchemaFieldKeyframable; } });
79
88
  Object.defineProperty(exports, "keyframeInterpolationFunctions", { enumerable: true, get: function () { return keyframe_interpolation_function_1.keyframeInterpolationFunctions; } });
80
- const parse_spring_easing_config_1 = require("./parse-spring-easing-config");
81
- Object.defineProperty(exports, "DEFAULT_SPRING_EASING", { enumerable: true, get: function () { return parse_spring_easing_config_1.DEFAULT_SPRING_EASING; } });
82
- Object.defineProperty(exports, "parseSpringEasingConfig", { enumerable: true, get: function () { return parse_spring_easing_config_1.parseSpringEasingConfig; } });
83
89
  const max_timeline_tracks_1 = require("./max-timeline-tracks");
84
90
  Object.defineProperty(exports, "DEFAULT_TIMELINE_TRACKS", { enumerable: true, get: function () { return max_timeline_tracks_1.DEFAULT_TIMELINE_TRACKS; } });
85
91
  const package_info_1 = require("./package-info");
@@ -88,16 +94,25 @@ Object.defineProperty(exports, "descriptions", { enumerable: true, get: function
88
94
  Object.defineProperty(exports, "extraPackages", { enumerable: true, get: function () { return package_info_1.extraPackages; } });
89
95
  Object.defineProperty(exports, "installableMap", { enumerable: true, get: function () { return package_info_1.installableMap; } });
90
96
  Object.defineProperty(exports, "packages", { enumerable: true, get: function () { return package_info_1.packages; } });
97
+ const parse_spring_easing_config_1 = require("./parse-spring-easing-config");
98
+ Object.defineProperty(exports, "DEFAULT_SPRING_EASING", { enumerable: true, get: function () { return parse_spring_easing_config_1.DEFAULT_SPRING_EASING; } });
99
+ Object.defineProperty(exports, "parseSpringEasingConfig", { enumerable: true, get: function () { return parse_spring_easing_config_1.parseSpringEasingConfig; } });
91
100
  const required_package_1 = require("./required-package");
92
101
  Object.defineProperty(exports, "getRequiredPackageForEffectImportPath", { enumerable: true, get: function () { return required_package_1.getRequiredPackageForEffectImportPath; } });
93
102
  Object.defineProperty(exports, "getRequiredPackageForInsertableElement", { enumerable: true, get: function () { return required_package_1.getRequiredPackageForInsertableElement; } });
94
103
  const schema_field_info_1 = require("./schema-field-info");
104
+ Object.defineProperty(exports, "SCHEMA_FIELD_GROUPS", { enumerable: true, get: function () { return schema_field_info_1.SCHEMA_FIELD_GROUPS; } });
95
105
  Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return schema_field_info_1.SCHEMA_FIELD_ROW_HEIGHT; } });
96
106
  Object.defineProperty(exports, "getEffectFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getEffectFieldsToShow; } });
97
107
  Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return schema_field_info_1.getFieldsToShow; } });
108
+ Object.defineProperty(exports, "getSchemaFieldGroup", { enumerable: true, get: function () { return schema_field_info_1.getSchemaFieldGroup; } });
98
109
  const sfx_drag_data_1 = require("./sfx-drag-data");
99
110
  Object.defineProperty(exports, "SFX_DRAG_MIME_TYPE", { enumerable: true, get: function () { return sfx_drag_data_1.SFX_DRAG_MIME_TYPE; } });
100
111
  Object.defineProperty(exports, "parseSfxDragData", { enumerable: true, get: function () { return sfx_drag_data_1.parseSfxDragData; } });
112
+ const studio_entry_points_1 = require("./studio-entry-points");
113
+ Object.defineProperty(exports, "getStudioEntryPoints", { enumerable: true, get: function () { return studio_entry_points_1.getStudioEntryPoints; } });
114
+ const studio_html_1 = require("./studio-html");
115
+ Object.defineProperty(exports, "studioHtml", { enumerable: true, get: function () { return studio_html_1.studioHtml; } });
101
116
  const stringify_default_props_1 = require("./stringify-default-props");
102
117
  Object.defineProperty(exports, "stringifyDefaultProps", { enumerable: true, get: function () { return stringify_default_props_1.stringifyDefaultProps; } });
103
118
  const optimistic_add_keyframe_1 = require("./optimistic-add-keyframe");
@@ -1,7 +1,7 @@
1
1
  import type { CanUpdateSequencePropStatusEasing } from 'remotion';
2
2
  export type KeyframeEasing = CanUpdateSequencePropStatusEasing;
3
3
  export type KeyframeEasingPreset = {
4
- readonly id: 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bouncy-spring';
4
+ readonly id: 'ease-in' | 'ease-out' | 'ease-in-out' | 'spring' | 'bouncy-spring' | 'tail-spring';
5
5
  readonly label: string;
6
6
  readonly easing: KeyframeEasing;
7
7
  };
@@ -18,12 +18,27 @@ exports.KEYFRAME_EASING_PRESETS = [
18
18
  label: 'Ease in-out',
19
19
  easing: { type: 'bezier', x1: 0.42, y1: 0, x2: 0.58, y2: 1 },
20
20
  },
21
+ {
22
+ id: 'tail-spring',
23
+ label: 'Tail spring',
24
+ easing: {
25
+ type: 'spring',
26
+ allowTail: true,
27
+ damping: 200,
28
+ durationRestThreshold: 0.02,
29
+ mass: 1,
30
+ overshootClamping: false,
31
+ stiffness: 100,
32
+ },
33
+ },
21
34
  {
22
35
  id: 'spring',
23
36
  label: 'Spring',
24
37
  easing: {
25
38
  type: 'spring',
39
+ allowTail: true,
26
40
  damping: 10,
41
+ durationRestThreshold: 0.02,
27
42
  mass: 1,
28
43
  overshootClamping: false,
29
44
  stiffness: 100,
@@ -34,7 +49,9 @@ exports.KEYFRAME_EASING_PRESETS = [
34
49
  label: 'Bouncy spring',
35
50
  easing: {
36
51
  type: 'spring',
52
+ allowTail: true,
37
53
  damping: 5,
54
+ durationRestThreshold: 0.02,
38
55
  mass: 1,
39
56
  overshootClamping: false,
40
57
  stiffness: 120,
@@ -3,6 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optimisticAddEffectKeyframe = exports.optimisticAddSequenceKeyframe = void 0;
4
4
  const keyframe_easing_presets_1 = require("./keyframe-easing-presets");
5
5
  const keyframe_interpolation_function_1 = require("./keyframe-interpolation-function");
6
+ const getEasingIndexToDuplicate = ({ insertedKeyframeIndex, easingLength, keyframeCount, }) => {
7
+ const isSplittingExistingSegment = insertedKeyframeIndex > 0 && insertedKeyframeIndex < keyframeCount - 1;
8
+ if (!isSplittingExistingSegment || easingLength === 0) {
9
+ return null;
10
+ }
11
+ return Math.min(insertedKeyframeIndex - 1, easingLength - 1);
12
+ };
6
13
  const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) => {
7
14
  var _a;
8
15
  if (status.status === 'keyframed') {
@@ -16,6 +23,16 @@ const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) =>
16
23
  }
17
24
  const keyframes = [...status.keyframes, { frame, value }].sort((first, second) => first.frame - second.frame);
18
25
  const easing = [...status.easing];
26
+ const insertedKeyframeIndex = keyframes.findIndex((keyframe) => keyframe.frame === frame);
27
+ const easingIndexToDuplicate = getEasingIndexToDuplicate({
28
+ insertedKeyframeIndex,
29
+ easingLength: easing.length,
30
+ keyframeCount: keyframes.length,
31
+ });
32
+ const easingToDuplicate = easingIndexToDuplicate === null
33
+ ? keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING
34
+ : easing[easingIndexToDuplicate];
35
+ easing.splice(insertedKeyframeIndex, 0, easingToDuplicate);
19
36
  while (easing.length < keyframes.length - 1) {
20
37
  easing.push(keyframe_easing_presets_1.LINEAR_KEYFRAME_EASING);
21
38
  }
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optimisticDeleteEffectKeyframes = exports.optimisticDeleteEffectKeyframe = exports.optimisticDeleteSequenceKeyframes = exports.optimisticDeleteSequenceKeyframe = void 0;
4
+ const getEasingIndexToRemove = ({ removedKeyframeIndex, keyframeCountBeforeRemoval, }) => {
5
+ if (removedKeyframeIndex === 0) {
6
+ return 0;
7
+ }
8
+ if (removedKeyframeIndex === keyframeCountBeforeRemoval - 1) {
9
+ return removedKeyframeIndex - 1;
10
+ }
11
+ return removedKeyframeIndex;
12
+ };
4
13
  const removeKeyframeFromPropStatus = ({ status, frame, }) => {
5
14
  if (status.status !== 'keyframed') {
6
15
  return status;
@@ -21,7 +30,10 @@ const removeKeyframeFromPropStatus = ({ status, frame, }) => {
21
30
  // keyframe so the invariant keeps holding until the server responds.
22
31
  const easing = [...status.easing];
23
32
  if (easing.length > 0) {
24
- const easingIndexToRemove = index === 0 ? 0 : index - 1;
33
+ const easingIndexToRemove = getEasingIndexToRemove({
34
+ removedKeyframeIndex: index,
35
+ keyframeCountBeforeRemoval: status.keyframes.length,
36
+ });
25
37
  easing.splice(easingIndexToRemove, 1);
26
38
  }
27
39
  return {
@@ -1,7 +1,8 @@
1
1
  import { type CanUpdateSequencePropsResponse, type InteractivitySchema } from 'remotion';
2
- export declare const optimisticUpdateForPropStatuses: ({ previous, fieldKey, value, schema, }: {
2
+ export declare const optimisticUpdateForPropStatuses: ({ previous, fieldKey, value, defaultValue, schema, }: {
3
3
  previous: CanUpdateSequencePropsResponse;
4
4
  fieldKey: string;
5
5
  value: unknown;
6
+ defaultValue?: string | null | undefined;
6
7
  schema: InteractivitySchema;
7
8
  }) => CanUpdateSequencePropsResponse;
@@ -2,14 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optimisticUpdateForPropStatuses = void 0;
4
4
  const no_react_1 = require("remotion/no-react");
5
- const optimisticUpdateForPropStatuses = ({ previous, fieldKey, value, schema, }) => {
5
+ const optimisticUpdateForPropStatuses = ({ previous, fieldKey, value, defaultValue, schema, }) => {
6
6
  var _a;
7
7
  if (!previous.canUpdate) {
8
8
  return previous;
9
9
  }
10
+ const serializedValue = JSON.stringify(value);
11
+ const optimisticValue = defaultValue !== null && defaultValue === serializedValue
12
+ ? undefined
13
+ : value;
10
14
  const props = {
11
15
  ...previous.props,
12
- [fieldKey]: { status: 'static', codeValue: value },
16
+ [fieldKey]: { status: 'static', codeValue: optimisticValue },
13
17
  };
14
18
  if (((_a = schema[fieldKey]) === null || _a === void 0 ? void 0 : _a.type) === 'enum') {
15
19
  const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
@@ -1,4 +1,4 @@
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"];
1
+ export declare const packages: readonly ["svg-3d-engine", "animation-utils", "animated-emoji", "astro-example", "babel-loader", "bugs", "brand", "bundler", "browser-studio", "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;
@@ -10,6 +10,7 @@ exports.packages = [
10
10
  'bugs',
11
11
  'brand',
12
12
  'bundler',
13
+ 'browser-studio',
13
14
  'canvas-capture',
14
15
  'cli',
15
16
  'cloudrun',
@@ -129,6 +130,7 @@ exports.descriptions = {
129
130
  core: 'Make videos programmatically',
130
131
  lambda: 'Render Remotion videos on AWS Lambda',
131
132
  bundler: 'Bundle Remotion compositions using Webpack',
133
+ 'browser-studio': 'Run Remotion Studio in the browser',
132
134
  'canvas-capture': 'Capture HTML-in-canvas content as a video',
133
135
  'studio-server': 'Run a Remotion Studio with a server backend',
134
136
  'install-whisper-cpp': 'Helpers for installing and using Whisper.cpp',
@@ -226,6 +228,7 @@ exports.installableMap = {
226
228
  bugs: false,
227
229
  brand: false,
228
230
  bundler: false,
231
+ 'browser-studio': false,
229
232
  'canvas-capture': false,
230
233
  cli: false,
231
234
  cloudrun: true,
@@ -324,6 +327,7 @@ exports.apiDocs = {
324
327
  core: 'https://www.remotion.dev/docs/remotion',
325
328
  lambda: 'https://www.remotion.dev/docs/lambda',
326
329
  bundler: 'https://www.remotion.dev/docs/bundler',
330
+ 'browser-studio': null,
327
331
  'canvas-capture': null,
328
332
  'lambda-client': null,
329
333
  'serverless-client': null,
@@ -1,6 +1,8 @@
1
1
  export type SpringKeyframeEasing = {
2
2
  readonly type: 'spring';
3
+ allowTail: boolean | null;
3
4
  damping: number;
5
+ durationRestThreshold: number | null;
4
6
  mass: number;
5
7
  overshootClamping: boolean;
6
8
  stiffness: number;
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseSpringEasingConfig = exports.DEFAULT_SPRING_EASING = void 0;
4
4
  exports.DEFAULT_SPRING_EASING = {
5
5
  type: 'spring',
6
+ allowTail: null,
6
7
  damping: 10,
8
+ durationRestThreshold: null,
7
9
  mass: 1,
8
10
  overshootClamping: false,
9
11
  stiffness: 100,
@@ -72,7 +74,10 @@ const parseSpringEasingConfig = (node) => {
72
74
  if (!key || !isAstNode(prop.value)) {
73
75
  return null;
74
76
  }
75
- if (key === 'damping' || key === 'mass' || key === 'stiffness') {
77
+ if (key === 'damping' ||
78
+ key === 'mass' ||
79
+ key === 'stiffness' ||
80
+ key === 'durationRestThreshold') {
76
81
  const numericValue = getNumericValue(prop.value);
77
82
  if (numericValue === null ||
78
83
  !Number.isFinite(numericValue) ||
@@ -82,12 +87,12 @@ const parseSpringEasingConfig = (node) => {
82
87
  spring[key] = numericValue;
83
88
  continue;
84
89
  }
85
- if (key === 'overshootClamping') {
90
+ if (key === 'overshootClamping' || key === 'allowTail') {
86
91
  const booleanValue = getBooleanValue(prop.value);
87
92
  if (booleanValue === null) {
88
93
  return null;
89
94
  }
90
- spring.overshootClamping = booleanValue;
95
+ spring[key] = booleanValue;
91
96
  continue;
92
97
  }
93
98
  return null;
@@ -6,6 +6,7 @@ export type SchemaFieldInfo = {
6
6
  typeName: SupportedSchemaType;
7
7
  rowHeight: number;
8
8
  fieldSchema: VisibleFieldSchema;
9
+ group: SchemaFieldGroup;
9
10
  };
10
11
  export type InteractivitySchemaFieldInfo = SchemaFieldInfo & {
11
12
  readonly kind: 'sequence-field';
@@ -17,6 +18,22 @@ export type EffectSchemaFieldInfo = SchemaFieldInfo & {
17
18
  };
18
19
  export type AnySchemaFieldInfo = InteractivitySchemaFieldInfo | EffectSchemaFieldInfo;
19
20
  export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
21
+ export type SchemaFieldGroup = 'controls' | 'transforms' | 'text';
22
+ export type SchemaFieldGroupInfo = {
23
+ readonly id: SchemaFieldGroup;
24
+ readonly label: string;
25
+ };
26
+ export declare const SCHEMA_FIELD_GROUPS: readonly [{
27
+ readonly id: "controls";
28
+ readonly label: "Controls";
29
+ }, {
30
+ readonly id: "transforms";
31
+ readonly label: "Transform";
32
+ }, {
33
+ readonly id: "text";
34
+ readonly label: "Text";
35
+ }];
36
+ export declare const getSchemaFieldGroup: (key: string) => SchemaFieldGroup;
20
37
  declare const SUPPORTED_SCHEMA_TYPES: readonly ["number", "boolean", "rotation-css", "rotation-degrees", "translate", "transform-origin", "scale", "uv-coordinate", "color", "array", "enum", "hidden"];
21
38
  type SupportedSchemaType = (typeof SUPPORTED_SCHEMA_TYPES)[number];
22
39
  export declare const getFieldsToShow: ({ getDragOverrides, propStatuses, nodePath, schema, currentRuntimeValueDotNotation, }: {
@@ -1,9 +1,54 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEffectFieldsToShow = exports.getFieldsToShow = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
3
+ exports.getEffectFieldsToShow = exports.getFieldsToShow = exports.getSchemaFieldGroup = exports.SCHEMA_FIELD_GROUPS = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const no_react_1 = require("remotion/no-react");
6
6
  exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
7
+ exports.SCHEMA_FIELD_GROUPS = [
8
+ { id: 'controls', label: 'Controls' },
9
+ { id: 'transforms', label: 'Transform' },
10
+ { id: 'text', label: 'Text' },
11
+ ];
12
+ const schemaFieldGroupOrder = exports.SCHEMA_FIELD_GROUPS.reduce((acc, group, index) => {
13
+ acc[group.id] = index;
14
+ return acc;
15
+ }, {});
16
+ const TRANSFORM_FIELD_KEYS = new Set([
17
+ 'style.transformOrigin',
18
+ 'style.translate',
19
+ 'style.scale',
20
+ 'style.rotate',
21
+ 'style.opacity',
22
+ ]);
23
+ const TEXT_FIELD_KEYS = new Set([
24
+ 'style.color',
25
+ 'style.fontSize',
26
+ 'style.lineHeight',
27
+ 'style.fontWeight',
28
+ 'style.fontStyle',
29
+ 'style.letterSpacing',
30
+ 'style.textAlign',
31
+ ]);
32
+ const getSchemaFieldGroup = (key) => {
33
+ if (TRANSFORM_FIELD_KEYS.has(key)) {
34
+ return 'transforms';
35
+ }
36
+ if (TEXT_FIELD_KEYS.has(key)) {
37
+ return 'text';
38
+ }
39
+ return 'controls';
40
+ };
41
+ exports.getSchemaFieldGroup = getSchemaFieldGroup;
42
+ const sortSchemaFields = (fields) => {
43
+ return fields
44
+ .map((field, index) => ({ field, index }))
45
+ .sort((a, b) => {
46
+ const groupDiff = schemaFieldGroupOrder[a.field.group] -
47
+ schemaFieldGroupOrder[b.field.group];
48
+ return groupDiff === 0 ? a.index - b.index : groupDiff;
49
+ })
50
+ .map(({ field }) => field);
51
+ };
7
52
  const SUPPORTED_SCHEMA_TYPES = [
8
53
  'number',
9
54
  'boolean',
@@ -60,7 +105,7 @@ const getFieldsToShow = ({ getDragOverrides, propStatuses, nodePath, schema, cur
60
105
  frame: null,
61
106
  });
62
107
  const activeSchema = remotion_1.Internals.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
63
- return Object.entries(activeSchema)
108
+ const fields = Object.entries(activeSchema)
64
109
  .map(([key, fieldSchema]) => {
65
110
  const typeName = fieldSchema.type;
66
111
  if (SUPPORTED_SCHEMA_TYPES.indexOf(typeName) === -1) {
@@ -87,9 +132,11 @@ const getFieldsToShow = ({ getDragOverrides, propStatuses, nodePath, schema, cur
87
132
  value: valuesDotNotation[key],
88
133
  }),
89
134
  fieldSchema,
135
+ group: (0, exports.getSchemaFieldGroup)(key),
90
136
  };
91
137
  })
92
138
  .filter(no_react_1.NoReactInternals.truthy);
139
+ return sortSchemaFields(fields);
93
140
  };
94
141
  exports.getFieldsToShow = getFieldsToShow;
95
142
  const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, getEffectDragOverrides, }) => {
@@ -104,7 +151,7 @@ const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, ge
104
151
  const activeSchema = remotion_1.Internals.flattenActiveSchema(effect.schema, (key) => {
105
152
  return getEffectFieldValue({ key, dragOverrides, effectStatus });
106
153
  });
107
- return Object.entries(activeSchema)
154
+ const fields = Object.entries(activeSchema)
108
155
  .map(([key, fieldSchema]) => {
109
156
  const typeName = fieldSchema.type;
110
157
  if (typeName === 'hidden') {
@@ -133,8 +180,10 @@ const getEffectFieldsToShow = ({ effect, effectIndex, nodePath, propStatuses, ge
133
180
  fieldSchema,
134
181
  effectSchema: effect.schema,
135
182
  effectIndex,
183
+ group: (0, exports.getSchemaFieldGroup)(key),
136
184
  };
137
185
  })
138
186
  .filter(no_react_1.NoReactInternals.truthy);
187
+ return sortSchemaFields(fields);
139
188
  };
140
189
  exports.getEffectFieldsToShow = getEffectFieldsToShow;
@@ -0,0 +1,9 @@
1
+ export type StudioEntryPointPaths = {
2
+ fastRefreshRuntime: string | null;
3
+ environmentSetup: string;
4
+ sequenceStackTraces: string | null;
5
+ userDefinedComponent: string;
6
+ reactShim: string;
7
+ studioRenderEntry: string;
8
+ };
9
+ export declare const getStudioEntryPoints: ({ fastRefreshRuntime, environmentSetup, sequenceStackTraces, userDefinedComponent, reactShim, studioRenderEntry, }: StudioEntryPointPaths) => [string, ...string[]];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStudioEntryPoints = void 0;
4
+ const getStudioEntryPoints = ({ fastRefreshRuntime, environmentSetup, sequenceStackTraces, userDefinedComponent, reactShim, studioRenderEntry, }) => [
5
+ // Fast Refresh must come first because setup-environment imports ReactDOM.
6
+ // If ReactDOM is imported before Fast Refresh, Fast Refresh does not work.
7
+ fastRefreshRuntime,
8
+ environmentSetup,
9
+ sequenceStackTraces,
10
+ userDefinedComponent,
11
+ reactShim,
12
+ studioRenderEntry,
13
+ ].filter(Boolean);
14
+ exports.getStudioEntryPoints = getStudioEntryPoints;
@@ -0,0 +1,32 @@
1
+ import type { LogLevel, StaticFile } from 'remotion';
2
+ import type { GitSource } from './git-source';
3
+ import type { PackageManager } from './package-manager';
4
+ import type { RenderDefaults } from './render-defaults';
5
+ export type StudioHtmlOptions = {
6
+ staticHash: string;
7
+ publicPath: string;
8
+ editorName: string | null;
9
+ inputProps: object | null;
10
+ envVariables?: Record<string, string>;
11
+ remotionRoot: string;
12
+ studioServerCommand: string | null;
13
+ renderQueue: unknown | null;
14
+ completedClientRenders?: unknown | null;
15
+ numberOfAudioTags: number;
16
+ audioLatencyHint: AudioContextLatencyCategory;
17
+ sampleRate: number | null;
18
+ publicFiles: StaticFile[];
19
+ publicFolderExists: string | null;
20
+ includeFavicon: boolean;
21
+ title: string;
22
+ renderDefaults: RenderDefaults | undefined;
23
+ gitSource: GitSource | null;
24
+ projectName: string;
25
+ installedDependencies: string[] | null;
26
+ packageManager: PackageManager | 'unknown';
27
+ logLevel: LogLevel;
28
+ mode: 'dev' | 'bundle';
29
+ bundleScriptUrl?: string;
30
+ readOnlyStudio?: boolean;
31
+ };
32
+ 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, }: StudioHtmlOptions) => string;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.studioHtml = void 0;
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, }) => {
6
+ const scriptUrl = bundleScriptUrl !== null && bundleScriptUrl !== void 0 ? bundleScriptUrl : `${publicPath}bundle.js`;
7
+ return `
8
+ <!DOCTYPE html>
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="UTF-8" />
12
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
13
+ ${includeFavicon
14
+ ? `<link id="__remotion_favicon" rel="icon" type="image/png" href="${publicPath}favicon.ico" />`
15
+ : ''}
16
+ <title>${title}</title>
17
+ </head>
18
+ <body>
19
+ <script>window.remotion_numberOfAudioTags = ${numberOfAudioTags};</script>
20
+ <script>window.remotion_audioLatencyHint = "${audioLatencyHint}";</script>
21
+ <script>window.remotion_sampleRate = ${sampleRate};</script>
22
+ <script>window.remotion_previewSampleRate = ${sampleRate};</script>
23
+ ${mode === 'dev' ? `<script>window.remotion_logLevel = "${logLevel}";</script>` : ''}
24
+ <script>window.remotion_staticBase = "${staticHash}";</script>
25
+ ${editorName
26
+ ? `<script>window.remotion_editorName = "${editorName}";</script>`
27
+ : '<script>window.remotion_editorName = null;</script>'}
28
+ <script>window.remotion_projectName = ${JSON.stringify(projectName)};</script>
29
+ <script>window.remotion_publicPath = ${JSON.stringify(publicPath)};</script>
30
+ <script>window.remotion_audioEnabled = true;</script>
31
+ <script>window.remotion_videoEnabled = true;</script>
32
+ <script>window.remotion_renderDefaults = ${JSON.stringify(renderDefaults)};</script>
33
+ <script>window.remotion_cwd = ${JSON.stringify(remotionRoot)};</script>
34
+ <script>window.remotion_studioServerCommand = ${studioServerCommand ? JSON.stringify(studioServerCommand) : 'null'};</script>
35
+ ${inputProps
36
+ ? `<script>window.remotion_inputProps = ${JSON.stringify(JSON.stringify(inputProps))};</script>`
37
+ : ''}
38
+ ${renderQueue
39
+ ? `<script>window.remotion_initialRenderQueue = ${JSON.stringify(renderQueue)};</script>`
40
+ : ''}
41
+ ${completedClientRenders
42
+ ? `<script>window.remotion_initialClientRenders = ${JSON.stringify(completedClientRenders)};</script>`
43
+ : ''}
44
+ ${envVariables
45
+ ? `<script>window.process = {env: ${JSON.stringify(envVariables)}};</script>`
46
+ : ''}
47
+ ${gitSource
48
+ ? `<script>window.remotion_gitSource = ${JSON.stringify(gitSource)};</script>`
49
+ : ''}
50
+ ${mode === 'dev'
51
+ ? `
52
+ <script>window.remotion_isStudio = true;</script>
53
+ <script>window.remotion_isReadOnlyStudio = ${readOnlyStudio ? 'true' : 'false'};</script>`.trimStart()
54
+ : ''}
55
+ <script>window.remotion_staticFiles = ${JSON.stringify(publicFiles)}</script>
56
+ <script>window.remotion_installedPackages = ${JSON.stringify(installedDependencies)}</script>
57
+ <script>window.remotion_packageManager = ${JSON.stringify(packageManager)}</script>
58
+ <script>window.remotion_publicFolderExists = ${JSON.stringify(publicFolderExists)};</script>
59
+ <script>
60
+ window.siteVersion = '11';
61
+ window.remotion_version = '${remotion_1.VERSION}';
62
+ </script>
63
+
64
+ <div id="video-container"></div>
65
+ <div id="${remotion_1.Internals.REMOTION_STUDIO_CONTAINER_ELEMENT}"></div>
66
+ <div id="remotion-error-overlay"></div>
67
+ <div id="server-disconnected-overlay"></div>
68
+ <div id="menuportal-0"></div>
69
+ <div id="menuportal-1"></div>
70
+ <div id="menuportal-2"></div>
71
+ <div id="menuportal-3"></div>
72
+ <div id="menuportal-4"></div>
73
+ <div id="menuportal-5"></div>
74
+ <script src="${scriptUrl}"></script>
75
+ </body>
76
+ </html>
77
+ `.trim();
78
+ };
79
+ exports.studioHtml = studioHtml;
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.482",
6
+ "version": "4.0.484",
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.482"
23
+ "remotion": "4.0.484"
24
24
  },
25
25
  "devDependencies": {
26
- "@remotion/renderer": "4.0.482",
27
- "@remotion/eslint-config-internal": "4.0.482",
26
+ "@remotion/renderer": "4.0.484",
27
+ "@remotion/eslint-config-internal": "4.0.484",
28
28
  "eslint": "9.19.0",
29
29
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
30
30
  },
@@ -33,6 +33,18 @@
33
33
  },
34
34
  "exports": {
35
35
  ".": "./dist/index.js",
36
+ "./define-plugin-definitions": {
37
+ "types": "./dist/define-plugin-definitions.d.ts",
38
+ "default": "./dist/define-plugin-definitions.js"
39
+ },
40
+ "./studio-entry-points": {
41
+ "types": "./dist/studio-entry-points.d.ts",
42
+ "default": "./dist/studio-entry-points.js"
43
+ },
44
+ "./studio-html": {
45
+ "types": "./dist/studio-html.d.ts",
46
+ "default": "./dist/studio-html.js"
47
+ },
36
48
  "./package.json": "./package.json"
37
49
  }
38
50
  }