@remotion/studio 4.0.500 → 4.0.501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Studio.js +1 -1
- package/dist/api/delete-static-file.js +8 -3
- package/dist/api/rename-static-file.js +8 -0
- package/dist/api/watch-public-folder.js +2 -1
- package/dist/api/watch-static-file.js +2 -1
- package/dist/api/write-static-file.js +8 -3
- package/dist/components/AssetSelector.js +3 -1
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +5 -2
- package/dist/components/Canvas.js +6 -1
- package/dist/components/CaptionInspector.d.ts +10 -0
- package/dist/components/CaptionInspector.js +24 -0
- package/dist/components/CaptionTextEditor.d.ts +9 -0
- package/dist/components/CaptionTextEditor.js +132 -0
- package/dist/components/CurrentAsset.js +3 -2
- package/dist/components/EditorContexts.d.ts +0 -1
- package/dist/components/EditorContexts.js +2 -2
- package/dist/components/FpsCounter.js +3 -3
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +2 -0
- package/dist/components/InitialCompositionLoader.d.ts +1 -1
- package/dist/components/InlineAction.js +1 -0
- package/dist/components/InlineCaptionInspector.d.ts +11 -0
- package/dist/components/InlineCaptionInspector.js +108 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +5 -3
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -4
- package/dist/components/InspectorPanel/inspector-section-collapse.d.ts +22 -0
- package/dist/components/InspectorPanel/inspector-section-collapse.js +165 -0
- package/dist/components/InspectorPanel/styles.js +7 -1
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +3 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +91 -6
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.d.ts +2 -1
- package/dist/components/InspectorSequenceSection.js +238 -8
- package/dist/components/MenuToolbar.js +8 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +5 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +5 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +26 -8
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.d.ts +0 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +3 -14
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -2
- package/dist/components/SelectedOutlineElement.js +1 -4
- package/dist/components/SelectedOutlineOverlay.js +17 -8
- package/dist/components/ShowOutlinesProvider.js +4 -1
- package/dist/components/Timeline/Timeline.js +19 -5
- package/dist/components/Timeline/TimelineAssetField.js +1 -0
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +8 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.d.ts +7 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +3 -1
- package/dist/components/Timeline/TimelineRowChrome.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowChrome.js +4 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +4 -2
- package/dist/components/Timeline/TimelineSelection.js +9 -6
- package/dist/components/Timeline/TimelineSequence.js +1 -4
- package/dist/components/Timeline/TimelineSequenceItem.js +4 -5
- package/dist/components/Timeline/TimelineSequencePropItem.js +9 -10
- package/dist/components/Timeline/TimelineTrack.js +4 -2
- package/dist/components/Timeline/border-radius-representation.d.ts +16 -0
- package/dist/components/Timeline/border-radius-representation.js +60 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +1 -6
- package/dist/components/Timeline/get-sequence-prop-reset-changes.d.ts +10 -0
- package/dist/components/Timeline/get-sequence-prop-reset-changes.js +33 -0
- package/dist/components/Timeline/reset-selected-timeline-props.js +2 -8
- package/dist/components/Timeline/save-sequence-prop.d.ts +12 -1
- package/dist/components/Timeline/save-sequence-prop.js +25 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +4 -0
- package/dist/components/UndoRedoButtons.js +15 -6
- package/dist/components/handle-drop.d.ts +3 -2
- package/dist/components/handle-drop.js +2 -1
- package/dist/components/import-assets.d.ts +4 -2
- package/dist/components/import-assets.js +20 -7
- package/dist/components/use-element-overwrite-confirmation.d.ts +2 -0
- package/dist/components/use-element-overwrite-confirmation.js +73 -0
- package/dist/components/use-static-files.js +7 -2
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.js +13 -2
- package/dist/esm/{chunk-dr1y1vm3.js → chunk-n1kj09yv.js} +7634 -6308
- package/dist/esm/index.mjs +24 -8
- package/dist/esm/internals.mjs +7634 -6308
- package/dist/esm/previewEntry.mjs +7646 -6320
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/browser-studio-operations.d.ts +3 -0
- package/dist/helpers/browser-studio-operations.js +14 -0
- package/dist/helpers/client-id.d.ts +0 -1
- package/dist/helpers/client-id.js +15 -10
- package/dist/helpers/download-blob.d.ts +1 -0
- package/dist/helpers/download-blob.js +15 -0
- package/dist/helpers/inject-css.js +5 -3
- package/dist/helpers/open-in-editor.js +26 -5
- package/dist/helpers/preview-server-events.js +46 -9
- package/dist/helpers/use-create-composition.js +8 -6
- package/dist/helpers/use-menu-structure.js +29 -0
- package/dist/hot-middleware-client/client.js +3 -3
- package/dist/icons/border-radius.d.ts +4 -0
- package/dist/icons/border-radius.js +8 -0
- package/dist/icons/fullscreen.d.ts +4 -0
- package/dist/icons/fullscreen.js +6 -0
- package/dist/previewEntry.js +1 -1
- package/dist/state/modals.d.ts +4 -0
- package/dist/state/timeline-sequence-hover.d.ts +17 -0
- package/dist/state/timeline-sequence-hover.js +33 -0
- package/package.json +13 -12
package/dist/esm/index.mjs
CHANGED
|
@@ -65,17 +65,29 @@ var callApi = (endpoint, body, signal) => {
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
+
// src/helpers/browser-studio-operations.ts
|
|
69
|
+
var getBrowserStudioOperations = () => {
|
|
70
|
+
if (typeof window === "undefined") {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
return window.remotion_browserStudio ?? null;
|
|
74
|
+
};
|
|
75
|
+
|
|
68
76
|
// src/api/delete-static-file.ts
|
|
69
77
|
var deleteStaticFile = async (relativePath) => {
|
|
70
78
|
if (!getRemotionEnvironment().isStudio) {
|
|
71
79
|
throw new Error("deleteStaticFile() is only available in the Studio");
|
|
72
80
|
}
|
|
73
|
-
if (window.remotion_isReadOnlyStudio) {
|
|
74
|
-
throw new Error("deleteStaticFile() is not available in Read-Only Studio");
|
|
75
|
-
}
|
|
76
81
|
if (relativePath.startsWith(window.remotion_staticBase)) {
|
|
77
82
|
relativePath = relativePath.substring(window.remotion_staticBase.length + 1);
|
|
78
83
|
}
|
|
84
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
85
|
+
if (browserStudioOperations) {
|
|
86
|
+
return browserStudioOperations.deleteStaticFile({ relativePath });
|
|
87
|
+
}
|
|
88
|
+
if (window.remotion_isReadOnlyStudio) {
|
|
89
|
+
throw new Error("deleteStaticFile() is not available in Read-Only Studio");
|
|
90
|
+
}
|
|
79
91
|
const res = await callApi("/api/delete-static-file", { relativePath });
|
|
80
92
|
return res;
|
|
81
93
|
};
|
|
@@ -627,7 +639,7 @@ var watchPublicFolder = (callback) => {
|
|
|
627
639
|
return;
|
|
628
640
|
} };
|
|
629
641
|
}
|
|
630
|
-
if (window.remotion_isReadOnlyStudio) {
|
|
642
|
+
if (window.remotion_isReadOnlyStudio && !getBrowserStudioOperations()) {
|
|
631
643
|
throw new Error("watchPublicFolder() is not available in read-only Studio");
|
|
632
644
|
}
|
|
633
645
|
const emitUpdate = () => {
|
|
@@ -648,7 +660,7 @@ var watchStaticFile = (fileName, callback) => {
|
|
|
648
660
|
return;
|
|
649
661
|
} };
|
|
650
662
|
}
|
|
651
|
-
if (window.remotion_isReadOnlyStudio) {
|
|
663
|
+
if (window.remotion_isReadOnlyStudio && !getBrowserStudioOperations()) {
|
|
652
664
|
console.warn("watchStaticFile() is only available in an interactive Studio.");
|
|
653
665
|
return { cancel: () => {
|
|
654
666
|
return;
|
|
@@ -678,13 +690,17 @@ var writeStaticFile = async ({
|
|
|
678
690
|
contents,
|
|
679
691
|
filePath
|
|
680
692
|
}) => {
|
|
693
|
+
if (filePath.includes("\\")) {
|
|
694
|
+
return Promise.reject(new Error("File path cannot contain backslashes"));
|
|
695
|
+
}
|
|
696
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
697
|
+
if (browserStudioOperations) {
|
|
698
|
+
return browserStudioOperations.writeStaticFile({ contents, filePath });
|
|
699
|
+
}
|
|
681
700
|
if (window.remotion_isReadOnlyStudio) {
|
|
682
701
|
throw new Error("writeStaticFile() is not available in read-only Studio");
|
|
683
702
|
}
|
|
684
703
|
const url = new URL(`${window.remotion_staticBase}/api/add-asset`, window.location.origin);
|
|
685
|
-
if (filePath.includes("\\")) {
|
|
686
|
-
return Promise.reject(new Error("File path cannot contain backslashes"));
|
|
687
|
-
}
|
|
688
704
|
url.search = new URLSearchParams({
|
|
689
705
|
filePath
|
|
690
706
|
}).toString();
|