@remotion/studio 4.0.424 → 4.0.426

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.
Files changed (88) hide show
  1. package/dist/api/create-composition.d.ts +1 -2
  2. package/dist/api/helpers/calc-new-props.d.ts +1 -2
  3. package/dist/components/AssetSelector.js +1 -1
  4. package/dist/components/AssetSelectorItem.d.ts +1 -0
  5. package/dist/components/AssetSelectorItem.js +9 -8
  6. package/dist/components/InitialCompositionLoader.js +13 -1
  7. package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
  8. package/dist/components/NewComposition/CodemodFooter.js +3 -1
  9. package/dist/components/NewComposition/DeleteComposition.js +1 -1
  10. package/dist/components/NewComposition/DuplicateComposition.js +5 -1
  11. package/dist/components/NewComposition/RenameComposition.js +1 -1
  12. package/dist/components/RenderModal/DataEditor.d.ts +2 -1
  13. package/dist/components/RenderModal/DataEditor.js +6 -6
  14. package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +2 -2
  15. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +3 -2
  16. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +3 -3
  17. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -5
  18. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +3 -3
  19. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +1 -0
  20. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.d.ts +2 -2
  21. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +4 -3
  22. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +2 -2
  23. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +3 -6
  24. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +2 -1
  25. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +2 -2
  26. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -2
  27. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +2 -2
  28. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +2 -2
  29. package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.d.ts +3 -3
  30. package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.js +2 -1
  31. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.d.ts +2 -2
  32. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +18 -18
  33. package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +2 -2
  34. package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.js +6 -10
  35. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +2 -2
  36. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +4 -12
  37. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +2 -2
  38. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +2 -2
  39. package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +4 -3
  40. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.d.ts +2 -2
  41. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +3 -2
  42. package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +2 -2
  43. package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.js +2 -1
  44. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +2 -2
  45. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +49 -21
  46. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +2 -2
  47. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +4 -9
  48. package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +2 -2
  49. package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +2 -1
  50. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +3 -3
  51. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.d.ts +2 -2
  52. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +0 -10
  53. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +2 -2
  54. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +2 -2
  55. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +38 -33
  56. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.d.ts +2 -2
  57. package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.d.ts +2 -2
  58. package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +3 -6
  59. package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.d.ts +2 -1
  60. package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.js +2 -2
  61. package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +2 -2
  62. package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.js +11 -15
  63. package/dist/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
  64. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +108 -110
  65. package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +3 -3
  66. package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.js +72 -87
  67. package/dist/components/RenderModal/SchemaEditor/local-state.d.ts +3 -3
  68. package/dist/components/RenderModal/SchemaEditor/local-state.js +5 -4
  69. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.d.ts +176 -0
  70. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.js +330 -0
  71. package/dist/components/Tabs/index.js +2 -0
  72. package/dist/components/Tabs/vertical.js +2 -0
  73. package/dist/components/TimeValue.js +0 -2
  74. package/dist/components/Timeline/TimelineDragHandler.js +6 -0
  75. package/dist/components/get-zod-if-possible.d.ts +3 -0
  76. package/dist/components/get-zod-if-possible.js +23 -2
  77. package/dist/esm/{chunk-3g77e2p9.js → chunk-kde77jse.js} +589 -373
  78. package/dist/esm/index.mjs +170 -81
  79. package/dist/esm/internals.mjs +589 -373
  80. package/dist/esm/previewEntry.mjs +598 -375
  81. package/dist/esm/renderEntry.mjs +1 -1
  82. package/dist/helpers/inject-css.js +2 -1
  83. package/dist/index.d.ts +2 -2
  84. package/dist/previewEntry.d.ts +5 -0
  85. package/dist/previewEntry.js +11 -2
  86. package/dist/visual-controls/VisualControls.d.ts +4 -4
  87. package/dist/visual-controls/VisualControls.js +1 -1
  88. package/package.json +11 -11
@@ -208,7 +208,7 @@ var renderContent = (Root) => {
208
208
  renderToDOM(/* @__PURE__ */ jsx("div", {
209
209
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
210
210
  }));
211
- import("./chunk-3g77e2p9.js").then(({ StudioInternals }) => {
211
+ import("./chunk-kde77jse.js").then(({ StudioInternals }) => {
212
212
  window.remotion_isStudio = true;
213
213
  window.remotion_isReadOnlyStudio = true;
214
214
  window.remotion_inputProps = "{}";
@@ -21,9 +21,10 @@ const makeDefaultGlobalCSS = () => {
21
21
  /* Override Chakra UI position: relative on body */
22
22
  position: static !important;
23
23
  }
24
-
24
+
25
25
  .remotion-splitter {
26
26
  user-select: none;
27
+ -webkit-user-select: none;
27
28
  }
28
29
 
29
30
  .remotion-splitter-horizontal {
package/dist/index.d.ts CHANGED
@@ -16,6 +16,6 @@ export { watchPublicFolder } from './api/watch-public-folder';
16
16
  export { watchStaticFile } from './api/watch-static-file';
17
17
  export { writeStaticFile } from './api/write-static-file';
18
18
  export declare const StudioInternals: {
19
- createComposition: <Schema extends import("zod").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").CompositionProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
20
- createStill: <Schema extends import("zod").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").StillProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
19
+ createComposition: <Schema extends import("remotion").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").CompositionProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
20
+ createStill: <Schema extends import("remotion").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").StillProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
21
21
  };
@@ -1 +1,6 @@
1
+ declare global {
2
+ interface Window {
3
+ __remotionOverlayStarted: boolean;
4
+ }
5
+ }
1
6
  export {};
@@ -12,6 +12,17 @@ const NoRegisterRoot_1 = require("./components/NoRegisterRoot");
12
12
  const entry_basic_1 = require("./error-overlay/entry-basic");
13
13
  const client_2 = require("./hot-middleware-client/client");
14
14
  remotion_1.Internals.CSSUtils.injectCSS(remotion_1.Internals.CSSUtils.makeDefaultPreviewCSS(null, '#1f2428'));
15
+ if (!window.__remotionOverlayStarted) {
16
+ window.__remotionOverlayStarted = true;
17
+ try {
18
+ (0, entry_basic_1.startErrorOverlay)();
19
+ (0, client_2.enableHotMiddleware)();
20
+ }
21
+ catch (err) {
22
+ // eslint-disable-next-line no-console
23
+ console.error('Failed to initialize error overlay', err);
24
+ }
25
+ }
15
26
  let root = null;
16
27
  const getRootForElement = () => {
17
28
  if (root) {
@@ -36,5 +47,3 @@ remotion_1.Internals.waitForRoot((NewRoot) => {
36
47
  remotion_1.Internals.enableSequenceStackTraces();
37
48
  renderToDOM(jsx_runtime_1.jsx(Studio_1.Studio, { readOnly: false, rootComponent: NewRoot }));
38
49
  });
39
- (0, entry_basic_1.startErrorOverlay)();
40
- (0, client_2.enableHotMiddleware)();
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import type { z, ZodTypeAny } from 'zod';
2
+ import type { AnyZodSchema } from '../components/RenderModal/SchemaEditor/zod-schema-type';
3
3
  export type VisualControlValueWithoutUnsaved = {
4
4
  valueInCode: unknown;
5
- schema: ZodTypeAny;
5
+ schema: AnyZodSchema;
6
6
  stack: string;
7
7
  };
8
8
  export type VisualControlValue = VisualControlValueWithoutUnsaved & {
@@ -16,11 +16,11 @@ export declare const VisualControlsTabActivatedContext: React.Context<boolean>;
16
16
  export type SetVisualControlsContextType = {
17
17
  updateHandles: () => void;
18
18
  updateValue: (key: string, value: unknown) => void;
19
- visualControl: <T>(key: string, value: T, schema?: z.ZodTypeAny) => T;
19
+ visualControl: <T>(key: string, value: T, schema?: AnyZodSchema) => T;
20
20
  };
21
21
  export declare const VisualControlsContext: React.Context<VisualControlsContextType>;
22
22
  export type VisualControlRef = {
23
- globalVisualControl: <T>(key: string, value: T, schema?: z.ZodTypeAny) => T;
23
+ globalVisualControl: <T>(key: string, value: T, schema?: AnyZodSchema) => T;
24
24
  };
25
25
  export declare const visualControlRef: React.RefObject<VisualControlRef | null>;
26
26
  export declare const SetVisualControlsContext: React.Context<SetVisualControlsContextType>;
@@ -71,7 +71,7 @@ const VisualControlsProvider = ({ children }) => {
71
71
  }
72
72
  const { changed, currentValue } = setControl(key, {
73
73
  valueInCode: value,
74
- schema: schema !== null && schema !== void 0 ? schema : (0, get_zod_schema_from_primitive_1.getZodSchemaFromPrimitive)(value, z),
74
+ schema: (schema !== null && schema !== void 0 ? schema : (0, get_zod_schema_from_primitive_1.getZodSchemaFromPrimitive)(value, z)),
75
75
  stack: new Error().stack,
76
76
  });
77
77
  if (changed) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
4
  },
5
5
  "name": "@remotion/studio",
6
- "version": "4.0.424",
6
+ "version": "4.0.426",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "sideEffects": false,
@@ -11,7 +11,7 @@
11
11
  "lint": "eslint src",
12
12
  "make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts",
13
13
  "test": "bun test src",
14
- "formatting": "prettier --experimental-cli src --check"
14
+ "formatting": "prettier src --check"
15
15
  },
16
16
  "author": "Jonny Burger <jonny@remotion.dev>",
17
17
  "contributors": [],
@@ -25,24 +25,24 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "semver": "7.5.3",
28
- "remotion": "4.0.424",
29
- "@remotion/player": "4.0.424",
30
- "@remotion/media-utils": "4.0.424",
31
- "@remotion/renderer": "4.0.424",
32
- "@remotion/web-renderer": "4.0.424",
33
- "@remotion/studio-shared": "4.0.424",
34
- "@remotion/zod-types": "4.0.424",
28
+ "remotion": "4.0.426",
29
+ "@remotion/player": "4.0.426",
30
+ "@remotion/media-utils": "4.0.426",
31
+ "@remotion/renderer": "4.0.426",
32
+ "@remotion/web-renderer": "4.0.426",
33
+ "@remotion/studio-shared": "4.0.426",
34
+ "@remotion/zod-types": "4.0.426",
35
35
  "mediabunny": "1.34.4",
36
36
  "memfs": "3.4.3",
37
37
  "source-map": "0.7.3",
38
38
  "open": "^8.4.2",
39
- "zod": "3.22.3"
39
+ "zod": "4.3.6"
40
40
  },
41
41
  "devDependencies": {
42
42
  "react": "19.2.3",
43
43
  "react-dom": "19.2.3",
44
44
  "@types/semver": "^7.3.4",
45
- "@remotion/eslint-config-internal": "4.0.424",
45
+ "@remotion/eslint-config-internal": "4.0.426",
46
46
  "eslint": "9.19.0",
47
47
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
48
48
  },