@remotion/studio-shared 4.0.501 → 4.0.503

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.
@@ -1,6 +1,6 @@
1
- declare const allPackages: readonly ["svg-3d-engine", "animation-utils", "animated-emoji", "astro-example", "babel-loader", "bugs", "brand", "bundler", "browser-studio", "canvas-capture", "claude-code-plugin", "cli", "cloudrun", "codex-plugin", "kimi-code-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-codemods", "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", "drag-and-drop", "light-leaks", "rough-notation", "starburst", "vercel", "sfx", "effects"];
1
+ declare const allPackages: readonly ["svg-3d-engine", "animation-utils", "animated-emoji", "astro-example", "babel-loader", "bugs", "brand", "bundler", "browser-studio", "claude-code-plugin", "cli", "cloudrun", "codex-plugin", "kimi-code-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-codemods", "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", "studio-protocol", "light-leaks", "rough-notation", "starburst", "vercel", "sfx", "effects"];
2
2
  export type Pkgs = (typeof allPackages)[number];
3
- export declare const packages: ("animated-emoji" | "animation-utils" | "astro-example" | "babel-loader" | "brand" | "browser-studio" | "bugs" | "bundler" | "canvas-capture" | "captions" | "claude-code-plugin" | "cli" | "cloudrun" | "codex-plugin" | "compositor" | "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" | "convert" | "core" | "create-video" | "design" | "discord-poster" | "docs" | "docusaurus-plugin" | "drag-and-drop" | "effects" | "elevenlabs" | "enable-scss" | "eslint-config" | "eslint-config-flat" | "eslint-config-internal" | "eslint-plugin" | "example" | "example-videos" | "example-without-zod" | "fonts" | "gif" | "google-fonts" | "install-whisper-cpp" | "it-tests" | "kimi-code-plugin" | "lambda" | "lambda-client" | "lambda-go" | "lambda-go-example" | "lambda-php" | "lambda-python" | "lambda-ruby" | "layout-utils" | "licensing" | "light-leaks" | "lottie" | "mcp" | "media" | "media-parser" | "media-utils" | "motion-blur" | "noise" | "openai-whisper" | "paths" | "player" | "player-a11y" | "player-example" | "preload" | "promo-pages" | "react18-tests" | "remotion-media" | "renderer" | "rive" | "rough-notation" | "rounded-text-box" | "serverless" | "serverless-client" | "sfx" | "shapes" | "skia" | "skills" | "skills-evals" | "starburst" | "streaming" | "studio" | "studio-codemods" | "studio-server" | "studio-shared" | "svg-3d-engine" | "tailwind" | "tailwind-v4" | "test-utils" | "three" | "timeline-utils" | "transitions" | "vercel" | "web-renderer" | "webcodecs" | "whisper-web" | "zod-types" | "zod-types-v3")[];
3
+ export declare const packages: ("animated-emoji" | "animation-utils" | "astro-example" | "babel-loader" | "brand" | "browser-studio" | "bugs" | "bundler" | "captions" | "claude-code-plugin" | "cli" | "cloudrun" | "codex-plugin" | "compositor" | "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" | "convert" | "core" | "create-video" | "design" | "discord-poster" | "docs" | "docusaurus-plugin" | "effects" | "elevenlabs" | "enable-scss" | "eslint-config" | "eslint-config-flat" | "eslint-config-internal" | "eslint-plugin" | "example" | "example-videos" | "example-without-zod" | "fonts" | "gif" | "google-fonts" | "install-whisper-cpp" | "it-tests" | "kimi-code-plugin" | "lambda" | "lambda-client" | "lambda-go" | "lambda-go-example" | "lambda-php" | "lambda-python" | "lambda-ruby" | "layout-utils" | "licensing" | "light-leaks" | "lottie" | "mcp" | "media" | "media-parser" | "media-utils" | "motion-blur" | "noise" | "openai-whisper" | "paths" | "player" | "player-a11y" | "player-example" | "preload" | "promo-pages" | "react18-tests" | "remotion-media" | "renderer" | "rive" | "rough-notation" | "rounded-text-box" | "serverless" | "serverless-client" | "sfx" | "shapes" | "skia" | "skills" | "skills-evals" | "starburst" | "streaming" | "studio" | "studio-codemods" | "studio-protocol" | "studio-server" | "studio-shared" | "svg-3d-engine" | "tailwind" | "tailwind-v4" | "test-utils" | "three" | "timeline-utils" | "transitions" | "vercel" | "web-renderer" | "webcodecs" | "whisper-web" | "zod-types" | "zod-types-v3")[];
4
4
  export type ExtraPackage = {
5
5
  name: string;
6
6
  version: string;
@@ -13,7 +13,6 @@ const allPackages = [
13
13
  'brand',
14
14
  'bundler',
15
15
  'browser-studio',
16
- 'canvas-capture',
17
16
  'claude-code-plugin',
18
17
  'cli',
19
18
  'cloudrun',
@@ -99,7 +98,7 @@ const allPackages = [
99
98
  'remotion-media',
100
99
  'web-renderer',
101
100
  'design',
102
- 'drag-and-drop',
101
+ 'studio-protocol',
103
102
  'light-leaks',
104
103
  'rough-notation',
105
104
  'starburst',
@@ -150,7 +149,6 @@ exports.descriptions = {
150
149
  lambda: 'Render Remotion videos on AWS Lambda',
151
150
  bundler: 'Bundle Remotion compositions using Webpack',
152
151
  'browser-studio': 'Run Remotion Studio in the browser',
153
- 'canvas-capture': 'Capture HTML-in-canvas content as a video',
154
152
  'studio-codemods': 'Shared codemods for Remotion Studio',
155
153
  'studio-server': 'Run a Remotion Studio with a server backend',
156
154
  'install-whisper-cpp': 'Helpers for installing and using Whisper.cpp',
@@ -232,7 +230,7 @@ exports.descriptions = {
232
230
  'remotion-media': null,
233
231
  'web-renderer': 'Render videos in the browser',
234
232
  design: 'Design system',
235
- 'drag-and-drop': 'Construct and parse drag-and-drop payloads for Remotion',
233
+ 'studio-protocol': 'Create Element payloads and request installation into Remotion Studio',
236
234
  'light-leaks': 'Light leak effects for Remotion',
237
235
  'rough-notation': 'Rough annotation primitives for Remotion',
238
236
  'player-a11y': 'Internal accessibility wrapper around @remotion/player',
@@ -251,7 +249,6 @@ exports.installableMap = {
251
249
  brand: false,
252
250
  bundler: false,
253
251
  'browser-studio': false,
254
- 'canvas-capture': false,
255
252
  cli: false,
256
253
  cloudrun: true,
257
254
  'claude-code-plugin': false,
@@ -343,7 +340,7 @@ exports.installableMap = {
343
340
  'remotion-media': false,
344
341
  'web-renderer': false,
345
342
  design: false,
346
- 'drag-and-drop': true,
343
+ 'studio-protocol': true,
347
344
  'light-leaks': (0, release_package_policy_1.shouldReleasePackage)({
348
345
  packageName: '@remotion/light-leaks',
349
346
  releaseVersion: remotion_1.VERSION,
@@ -369,7 +366,6 @@ exports.apiDocs = {
369
366
  lambda: 'https://www.remotion.dev/docs/lambda',
370
367
  bundler: 'https://www.remotion.dev/docs/bundler',
371
368
  'browser-studio': null,
372
- 'canvas-capture': null,
373
369
  'studio-codemods': null,
374
370
  'lambda-client': null,
375
371
  'serverless-client': null,
@@ -453,7 +449,7 @@ exports.apiDocs = {
453
449
  media: 'https://remotion.dev/docs/media',
454
450
  'web-renderer': 'https://www.remotion.dev/docs/web-renderer/',
455
451
  design: 'https://www.remotion.dev/design',
456
- 'drag-and-drop': 'https://www.remotion.dev/docs/drag-and-drop',
452
+ 'studio-protocol': 'https://www.remotion.dev/docs/studio-protocol',
457
453
  'light-leaks': 'https://www.remotion.dev/docs/light-leaks',
458
454
  'rough-notation': 'https://www.remotion.dev/docs/rough-notation',
459
455
  starburst: 'https://www.remotion.dev/docs/starburst',
@@ -0,0 +1,22 @@
1
+ export declare const SHAPE_DRAG_MIME_TYPE = "application/vnd.remotion.shape+json";
2
+ export declare const shapeNames: readonly ["Arrow", "Circle", "Ellipse", "Heart", "Pie", "Polygon", "Rect", "Star", "Triangle"];
3
+ export type ShapeName = (typeof shapeNames)[number];
4
+ export type ShapeAttribute = {
5
+ name: string;
6
+ value: string | number | boolean;
7
+ };
8
+ export type ShapeDragData = {
9
+ type: 'remotion-shape';
10
+ version: 1;
11
+ shape: ShapeName;
12
+ attributes: ShapeAttribute[];
13
+ };
14
+ export declare const isShapeName: (value: unknown) => value is "Arrow" | "Circle" | "Ellipse" | "Heart" | "Pie" | "Polygon" | "Rect" | "Star" | "Triangle";
15
+ export declare const isShapeAttributeName: (value: unknown) => value is string;
16
+ export declare const isShapeAttribute: (value: unknown) => value is ShapeAttribute;
17
+ export declare const areShapeAttributes: (value: unknown) => value is ShapeAttribute[];
18
+ export declare const makeShapeDragData: ({ attributes, shape, }: {
19
+ attributes: ShapeAttribute[];
20
+ shape: "Arrow" | "Circle" | "Ellipse" | "Heart" | "Pie" | "Polygon" | "Rect" | "Star" | "Triangle";
21
+ }) => ShapeDragData;
22
+ export declare const parseShapeDragData: (value: string) => ShapeDragData | null;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseShapeDragData = exports.makeShapeDragData = exports.areShapeAttributes = exports.isShapeAttribute = exports.isShapeAttributeName = exports.isShapeName = exports.shapeNames = exports.SHAPE_DRAG_MIME_TYPE = void 0;
4
+ exports.SHAPE_DRAG_MIME_TYPE = 'application/vnd.remotion.shape+json';
5
+ exports.shapeNames = [
6
+ 'Arrow',
7
+ 'Circle',
8
+ 'Ellipse',
9
+ 'Heart',
10
+ 'Pie',
11
+ 'Polygon',
12
+ 'Rect',
13
+ 'Star',
14
+ 'Triangle',
15
+ ];
16
+ const isRecord = (value) => {
17
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
18
+ };
19
+ const isShapeName = (value) => {
20
+ return typeof value === 'string' && exports.shapeNames.includes(value);
21
+ };
22
+ exports.isShapeName = isShapeName;
23
+ const isShapeAttributeName = (value) => {
24
+ return (typeof value === 'string' &&
25
+ value !== 'style' &&
26
+ /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value));
27
+ };
28
+ exports.isShapeAttributeName = isShapeAttributeName;
29
+ const isShapeAttribute = (value) => {
30
+ if (!isRecord(value)) {
31
+ return false;
32
+ }
33
+ if (!(0, exports.isShapeAttributeName)(value.name)) {
34
+ return false;
35
+ }
36
+ return (typeof value.value === 'string' ||
37
+ typeof value.value === 'boolean' ||
38
+ (typeof value.value === 'number' && Number.isFinite(value.value)));
39
+ };
40
+ exports.isShapeAttribute = isShapeAttribute;
41
+ const areShapeAttributes = (value) => {
42
+ if (!Array.isArray(value)) {
43
+ return false;
44
+ }
45
+ const seen = new Set();
46
+ for (const attribute of value) {
47
+ if (!(0, exports.isShapeAttribute)(attribute) || seen.has(attribute.name)) {
48
+ return false;
49
+ }
50
+ seen.add(attribute.name);
51
+ }
52
+ return true;
53
+ };
54
+ exports.areShapeAttributes = areShapeAttributes;
55
+ const makeShapeDragData = ({ attributes, shape, }) => {
56
+ return {
57
+ type: 'remotion-shape',
58
+ version: 1,
59
+ shape,
60
+ attributes,
61
+ };
62
+ };
63
+ exports.makeShapeDragData = makeShapeDragData;
64
+ const parseShapeDragData = (value) => {
65
+ try {
66
+ const parsed = JSON.parse(value);
67
+ if (!isRecord(parsed)) {
68
+ return null;
69
+ }
70
+ if (parsed.type !== 'remotion-shape' || parsed.version !== 1) {
71
+ return null;
72
+ }
73
+ if (!(0, exports.isShapeName)(parsed.shape)) {
74
+ return null;
75
+ }
76
+ if (!(0, exports.areShapeAttributes)(parsed.attributes)) {
77
+ return null;
78
+ }
79
+ return {
80
+ type: 'remotion-shape',
81
+ version: 1,
82
+ shape: parsed.shape,
83
+ attributes: parsed.attributes,
84
+ };
85
+ }
86
+ catch (_a) {
87
+ return null;
88
+ }
89
+ };
90
+ exports.parseShapeDragData = parseShapeDragData;
package/package.json CHANGED
@@ -3,15 +3,16 @@
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.501",
6
+ "version": "4.0.503",
7
7
  "description": "Internal package for shared objects between the Studio backend and frontend",
8
8
  "main": "dist",
9
+ "module": "dist/esm/index.mjs",
9
10
  "scripts": {
10
11
  "lint": "eslint src",
11
12
  "test": "bun test src",
12
13
  "formatting": "oxfmt src --check",
13
14
  "format": "oxfmt src",
14
- "make": "tsgo -d"
15
+ "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts"
15
16
  },
16
17
  "author": "Jonny Burger <jonny@remotion.dev>",
17
18
  "contributors": [],
@@ -20,12 +21,12 @@
20
21
  "url": "https://github.com/remotion-dev/remotion/issues"
21
22
  },
22
23
  "dependencies": {
23
- "@remotion/drag-and-drop": "4.0.501",
24
- "remotion": "4.0.501"
24
+ "@remotion/studio-protocol": "4.0.503",
25
+ "remotion": "4.0.503"
25
26
  },
26
27
  "devDependencies": {
27
- "@remotion/renderer": "4.0.501",
28
- "@remotion/eslint-config-internal": "4.0.501",
28
+ "@remotion/renderer": "4.0.503",
29
+ "@remotion/eslint-config-internal": "4.0.503",
29
30
  "eslint": "9.19.0",
30
31
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
31
32
  },
@@ -33,15 +34,61 @@
33
34
  "access": "public"
34
35
  },
35
36
  "exports": {
36
- ".": "./dist/index.js",
37
+ ".": {
38
+ "types": "./dist/index.d.ts",
39
+ "require": "./dist/index.js",
40
+ "module": "./dist/esm/index.mjs",
41
+ "import": "./dist/esm/index.mjs"
42
+ },
37
43
  "./studio-entry-points": {
38
44
  "types": "./dist/studio-entry-points.d.ts",
39
- "default": "./dist/studio-entry-points.js"
45
+ "require": "./dist/studio-entry-points.js",
46
+ "module": "./dist/esm/studio-entry-points.mjs",
47
+ "import": "./dist/esm/studio-entry-points.mjs"
40
48
  },
41
49
  "./studio-html": {
42
50
  "types": "./dist/studio-html.d.ts",
43
- "default": "./dist/studio-html.js"
51
+ "require": "./dist/studio-html.js",
52
+ "module": "./dist/esm/studio-html.mjs",
53
+ "import": "./dist/esm/studio-html.mjs"
54
+ },
55
+ "./keyframe-easing-presets": {
56
+ "types": "./dist/keyframe-easing-presets.d.ts",
57
+ "require": "./dist/keyframe-easing-presets.js",
58
+ "module": "./dist/esm/keyframe-easing-presets.mjs",
59
+ "import": "./dist/esm/keyframe-easing-presets.mjs"
60
+ },
61
+ "./keyframe-interpolation-function": {
62
+ "types": "./dist/keyframe-interpolation-function.d.ts",
63
+ "require": "./dist/keyframe-interpolation-function.js",
64
+ "module": "./dist/esm/keyframe-interpolation-function.mjs",
65
+ "import": "./dist/esm/keyframe-interpolation-function.mjs"
66
+ },
67
+ "./parse-spring-easing-config": {
68
+ "types": "./dist/parse-spring-easing-config.d.ts",
69
+ "require": "./dist/parse-spring-easing-config.js",
70
+ "module": "./dist/esm/parse-spring-easing-config.mjs",
71
+ "import": "./dist/esm/parse-spring-easing-config.mjs"
44
72
  },
45
73
  "./package.json": "./package.json"
74
+ },
75
+ "typesVersions": {
76
+ ">=1.0": {
77
+ "studio-entry-points": [
78
+ "./dist/studio-entry-points.d.ts"
79
+ ],
80
+ "studio-html": [
81
+ "./dist/studio-html.d.ts"
82
+ ],
83
+ "keyframe-easing-presets": [
84
+ "./dist/keyframe-easing-presets.d.ts"
85
+ ],
86
+ "keyframe-interpolation-function": [
87
+ "./dist/keyframe-interpolation-function.d.ts"
88
+ ],
89
+ "parse-spring-easing-config": [
90
+ "./dist/parse-spring-easing-config.d.ts"
91
+ ]
92
+ }
46
93
  }
47
94
  }