@remotion/studio 4.0.356 → 4.0.358
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/.turbo/turbo-formatting.log +4 -0
- package/.turbo/turbo-lint.log +28 -0
- package/.turbo/turbo-make.log +2 -5
- package/dist/api/get-static-files.d.ts +1 -1
- package/dist/components/Timeline/LoopedIndicator.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.js +6 -5
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.d.ts +9 -0
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +33 -0
- package/dist/error-overlay/remotion-overlay/CompositionIdsDropdown.d.ts +5 -0
- package/dist/error-overlay/remotion-overlay/CompositionIdsDropdown.js +103 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +11 -1
- package/dist/error-overlay/remotion-overlay/carets.d.ts +4 -1
- package/dist/error-overlay/remotion-overlay/carets.js +4 -4
- package/dist/esm/{chunk-genqsbxw.js → chunk-j2wqjmwz.js} +2743 -2548
- package/dist/esm/{chunk-ckeskzn9.js → chunk-wc2c2x4m.js} +2737 -2542
- package/dist/esm/internals.mjs +2736 -2541
- package/dist/esm/previewEntry.mjs +2750 -2555
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +2 -0
- package/dist/helpers/use-max-media-duration.d.ts +1 -1
- package/dist/helpers/use-max-media-duration.js +4 -3
- package/package.json +92 -92
- package/tsconfig.tsbuildinfo +1 -1
- package/.turbo/turbo-test.log +0 -86
- package/LICENSE.md +0 -49
- package/dist/esm/chunk-4pe36a6v.js +0 -46840
- package/dist/esm/chunk-537k7w8j.js +0 -46766
- package/dist/esm/chunk-621t537e.js +0 -46761
- package/dist/esm/chunk-7ebekhek.js +0 -46772
- package/dist/esm/chunk-bcs5xcvy.js +0 -46764
- package/dist/esm/chunk-cf4g1482.js +0 -25
- package/dist/esm/chunk-h0d5z5fq.js +0 -46840
- package/dist/esm/chunk-jj18anfn.js +0 -46774
- package/dist/esm/chunk-kdprv7ha.js +0 -46760
- package/dist/esm/chunk-qv5xwxwh.js +0 -46763
- package/dist/esm/chunk-r343ardc.js +0 -46773
- package/dist/esm/chunk-xnv9k83w.js +0 -46761
- package/dist/esm/chunk-z1myjaxv.js +0 -46764
- package/dist/esm/chunk-zjtmp09e.js +0 -46840
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mprettier --experimental-cli src --check[0m
|
|
3
|
+
[?25l[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m Checking formatting...[0K[1G[36m-[39m Checking formatting...[0K[1G[36m\[39m Checking formatting...[0K[1G[36m|[39m Checking formatting...[0K[1G[36m/[39m src/internals.ts[0K[1G[36m-[39m src/internals.ts[0K[1G[36m\[39m src/internals.ts[0K[1G[36m|[39m src/internals.ts[0K[1G[36m/[39m src/internals.ts[0K[1G[36m-[39m src/internals.ts[0K[1G[36m\[39m src/internals.ts[0K[1G[36m|[39m src/internals.ts[0K[1G[36m/[39m src/internals.ts[0K[1G[36m-[39m src/api/play.ts[0K[1G[36m\[39m src/api/play.ts[0K[1G[36m|[39m src/api/delete-static-file.ts[0K[1G[36m/[39m src/Studio.tsx[0K[1G[36m-[39m src/api/get-zod-schema-from-primitive.ts[0K[1G[36m\[39m src/api/write-static-file.ts[0K[1G[36m|[39m src/api/write-static-file.ts[0K[1G[36m/[39m src/api/write-static-file.ts[0K[1G[36m-[39m src/api/write-static-file.ts[0K[1G[36m\[39m src/api/write-static-file.ts[0K[1G[36m|[39m src/api/watch-static-file.ts[0K[1G[36m/[39m src/api/watch-static-file.ts[0K[1G[36m-[39m src/api/watch-static-file.ts[0K[1G[36m\[39m src/api/watch-static-file.ts[0K[1G[36m|[39m src/api/watch-static-file.ts[0K[1G[36m/[39m src/components/AskAiModal.tsx[0K[1G[36m-[39m src/components/AskAiModal.tsx[0K[1G[36m\[39m src/components/CheckboardToggle.tsx[0K[1G[36m|[39m src/components/CheckboardToggle.tsx[0K[1G[36m/[39m src/components/CheckboardToggle.tsx[0K[1G[36m-[39m src/api/seek.ts[0K[1G[36m\[39m src/api/update-default-props.ts[0K[1G[36m|[39m src/components/Checkbox.tsx[0K[1G[36m/[39m src/components/Checkbox.tsx[0K[1G[36m-[39m src/components/CanvasIfSizeIsAvailable.tsx[0K[1G[36m\[39m src/components/CanvasIfSizeIsAvailable.tsx[0K[1G[36m|[39m src/components/CanvasIfSizeIsAvailable.tsx[0K[1G[36m/[39m src/components/CanvasIfSizeIsAvailable.tsx[0K[1G[36m-[39m src/components/CopyButton.tsx[0K[1G[36m\[39m src/components/CopyButton.tsx[0K[1G[36m|[39m src/components/AssetSelector.tsx[0K[1G[36m/[39m src/components/CheckerboardProvider.tsx[0K[1G[36m-[39m src/components/EditorContent.tsx[0K[1G[36m\[39m src/components/ContextMenu.tsx[0K[1G[36m|[39m src/components/ContextMenu.tsx[0K[1G[36m/[39m src/components/CompSelectorRef.tsx[0K[1G[36m-[39m src/components/FramePersistor.tsx[0K[1G[36m\[39m src/components/GlobalKeybindings.tsx[0K[1G[36m|[39m src/components/ExplorerPanel.tsx[0K[1G[36m/[39m src/components/InitialCompositionLoader.tsx[0K[1G[36m-[39m src/components/InstallablePackage.tsx[0K[1G[36m\[39m src/components/Editor.tsx[0K[1G[36m|[39m src/components/FullscreenToggle.tsx[0K[1G[36m/[39m src/api/reevaluate-composition.ts[0K[1G[36m-[39m src/components/ModalFooter.tsx[0K[1G[36m\[39m src/components/MobilePanel.tsx[0K[1G[36m|[39m src/components/PlayBeepSound.tsx[0K[1G[36m/[39m src/components/NoRegisterRoot.tsx[0K[1G[36m-[39m src/components/PlaybackRateSelector.tsx[0K[1G[36m\[39m src/components/ShowRulersProvider.tsx[0K[1G[36m|[39m src/components/RenderPreview.tsx[0K[1G[36m/[39m src/components/TextViewer.tsx[0K[1G[36m-[39m src/components/PlayPause.tsx[0K[1G[36m\[39m src/components/PlayPause.tsx[0K[1G[36m|[39m src/components/RenderButton.tsx[0K[1G[36m/[39m src/error-overlay/entry-basic.ts[0K[1G[36m-[39m src/components/ZoomPersistor.tsx[0K[1G[36m\[39m src/helpers/calculate-timeline.ts[0K[1G[36m|[39m src/helpers/calculate-timeline.ts[0K[1G[36m/[39m src/components/load-canvas-content-from-url.ts[0K[1G[36m-[39m src/helpers/create-folder-tree.ts[0K[1G[36m\[39m src/helpers/copy-text.ts[0K[1G[36m|[39m src/helpers/get-timeline-nestedness.ts[0K[1G[36m/[39m src/components/TimelineInOutToggle.tsx[0K[1G[36m-[39m src/helpers/editor-ruler.ts[0K[1G[36m\[39m src/helpers/persist-open-folders.tsx[0K[1G[36m|[39m src/helpers/smooth-zoom.ts[0K[1G[36m/[39m src/helpers/use-max-media-duration.ts[0K[1G[36m-[39m src/helpers/use-file-existence.ts[0K[1G[36m\[39m src/helpers/noop.ts[0K[1G[36m|[39m src/icons/audio.tsx[0K[1G[36m/[39m src/helpers/validate-new-comp-data.ts[0K[1G[36m-[39m src/icons/render.tsx[0K[1G[36m\[39m src/state/input-dragger-click-lock.ts[0K[1G[36m|[39m src/state/keybindings.tsx[0K[1G[36m/[39m src/icons/plus.tsx[0K[1G[36m-[39m src/test/format-time.test.ts[0K[1G[36m\[39m src/test/color-math.test.ts[0K[1G[36m|[39m src/helpers/use-menu-structure.tsx[0K[1G[36m/[39m src/components/EditorRuler/use-is-ruler-visible.ts[0K[1G[36m-[39m src/components/EditorGuides/index.tsx[0K[1G[36m\[39m src/components/EditorGuides/index.tsx[0K[1G[36m|[39m src/state/modals.ts[0K[1G[36m/[39m src/components/Menu/portals.ts[0K[1G[36m-[39m src/components/NewComposition/DismissableModal.tsx[0K[1G[36m\[39m src/components/NewComposition/DiffPreview.tsx[0K[1G[36m|[39m src/components/NewComposition/DeleteComposition.tsx[0K[1G[36m/[39m src/components/NewComposition/InputDragger.tsx[0K[1G[36m-[39m src/components/Menu/MenuSubItem.tsx[0K[1G[36m\[39m src/components/Notifications/ServerDisconnected.tsx[0K[1G[36m|[39m src/components/NewComposition/RemInputTypeColor.tsx[0K[1G[36m/[39m src/components/NewComposition/RemInputTypeColor.tsx[0K[1G[36m-[39m src/components/NewComposition/render-aspect-ratio.tsx[0K[1G[36m\[39m src/components/QuickSwitcher/fuzzy-search.ts[0K[1G[36m|[39m src/components/QuickSwitcher/fuzzy-search.ts[0K[1G[36m/[39m src/components/NewComposition/ComboBox.tsx[0K[1G[36m-[39m src/components/RenderModal/CliCopyButton.tsx[0K[1G[36m\[39m src/components/RenderModal/EnforceAudioTrackSetting.tsx[0K[1G[36m|[39m src/components/RenderModal/FrameRangeSetting.tsx[0K[1G[36m/[39m src/components/RenderModal/FrameRangeSetting.tsx[0K[1G[36m-[39m src/components/RenderModal/NumberOfLoopsSetting.tsx[0K[1G[36m\[39m src/components/RenderModal/RenderModalGif.tsx[0K[1G[36m|[39m src/components/RenderModal/OptionExplainerBubble.tsx[0K[1G[36m/[39m src/components/RenderModal/OptionExplainer.tsx[0K[1G[36m-[39m src/components/RenderModal/RenderModalAdvanced.tsx[0K[1G[36m\[39m src/components/RenderModal/WarningIndicatorButton.tsx[0K[1G[36m|[39m src/components/RenderModal/RenderModalBasic.tsx[0K[1G[36m/[39m src/components/RenderModal/out-name-checker.ts[0K[1G[36m-[39m src/components/RenderModal/GuiRenderStatus.tsx[0K[1G[36m\[39m src/components/RenderModal/RenderModalJSONPropsEditor.tsx[0K[1G[36m|[39m src/components/RenderQueue/RenderQueueError.tsx[0K[1G[36m/[39m src/components/RenderQueue/RenderQueueOpenInFolder.tsx[0K[1G[36m-[39m src/components/RenderQueue/item-style.ts[0K[1G[36m\[39m src/components/Splitter/SplitterContext.tsx[0K[1G[36m|[39m src/components/Splitter/SplitterContext.tsx[0K[1G[36m/[39m src/components/Splitter/SplitterContext.tsx[0K[1G[36m-[39m src/components/Timeline/LoopedIndicator.tsx[0K[1G[36m\[39m src/components/Timeline/MaxTimelineTracks.tsx[0K[1G[36m|[39m src/components/Timeline/TimelineList.tsx[0K[1G[36m/[39m src/components/Tabs/vertical.tsx[0K[1G[36m-[39m src/components/Timeline/TimelineTracks.tsx[0K[1G[36m\[39m src/components/Timeline/imperative-state.ts[0K[1G[36m|[39m src/components/UpdateModal/OpenIssueButton.tsx[0K[1G[36m/[39m src/components/Timeline/is-collapsed.ts[0K[1G[36m-[39m src/components/WebRender/TriggerWebRender.tsx[0K[1G[36m\[39m src/components/VisualControls/get-original-stack-trace.ts[0K[1G[36m|[39m src/components/Timeline/TimelineTimeIndicators.tsx[0K[1G[36m/[39m src/components/Timeline/TimelineVideoInfo.tsx[0K[1G[36m-[39m src/error-overlay/react-overlay/listen-to-runtime-errors.ts[0K[1G[36m\[39m src/error-overlay/remotion-overlay/Retry.tsx[0K[1G[36m|[39m src/error-overlay/remotion-overlay/format-location.ts[0K[1G[36m/[39m src/error-overlay/remotion-overlay/get-help-link.ts[0K[1G[36m-[39m src/components/RenderModal/SchemaEditor/SchemaLabel.tsx[0K[1G[36m\[39m src/components/RenderModal/SchemaEditor/SchemaErrorMessages.tsx[0K[1G[36m|[39m src/components/Timeline/TimelineDragHandler.tsx[0K[1G[36m/[39m src/components/RenderModal/SchemaEditor/Fieldset.tsx[0K[1G[36m-[39m src/error-overlay/remotion-overlay/ErrorMessage.tsx[0K[1G[36m\[39m src/components/VisualControls/VisualControlHandle.tsx[0K[1G[36m|[39m src/components/RenderModal/SchemaEditor/SchemaVerticalGuide.tsx[0K[1G[36m/[39m src/components/RenderModal/SchemaEditor/ZodFieldValidation.tsx[0K[1G[36m-[39m src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx[0K[1G[36m\[39m src/components/RenderModal/SchemaEditor/ZodNonEditableValue.tsx[0K[1G[36m|[39m src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx[0K[1G[36m/[39m src/components/RenderModal/SchemaEditor/deep-equal.ts[0K[1G[36m-[39m src/components/RenderModal/SchemaEditor/scroll-to-default-props-path.ts[0K[1G[36m\[39m src/components/RenderModal/SchemaEditor/ZodStaticFileEditor.tsx[0K[1G[36m|[39m src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx[0K[1G[36m/[39m src/components/RenderModal/SchemaEditor/local-state.tsx[0K[1G[36m-[39m src/error-overlay/react-overlay/utils/get-stack-frames.ts[0K[1G[36m\[39m src/components/RenderModal/SchemaEditor/ZodUnionEditor.tsx[0K[1G[36m|[39m src/components/RenderModal/SchemaEditor/create-zod-values.ts[0K[1G[36m/[39m src/error-overlay/react-overlay/utils/parser.ts[0K[1G[36m-[39m src/error-overlay/react-overlay/utils/parser.ts[0K[1G[36m\[39m src/components/RenderModal/SchemaEditor/ZodSwitch.tsx[0K[?25h[1GChecking formatting...[0K
|
|
4
|
+
[?25hAll matched files use Prettier code style!
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
[0m[2m[35m$[0m [2m[1meslint src[0m
|
|
3
|
+
=============
|
|
4
|
+
|
|
5
|
+
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
|
|
6
|
+
|
|
7
|
+
You may find that it works just fine, or you may not.
|
|
8
|
+
|
|
9
|
+
SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.7.0
|
|
10
|
+
|
|
11
|
+
YOUR TYPESCRIPT VERSION: 5.8.2
|
|
12
|
+
|
|
13
|
+
Please only submit bug reports when using the officially supported version.
|
|
14
|
+
|
|
15
|
+
=============
|
|
16
|
+
[0m[0m
|
|
17
|
+
[0m[4m/Users/jonathanburger/remotion/packages/studio/src/components/QuickSwitcher/fuzzy-search.ts[24m[0m
|
|
18
|
+
[0m [2m23:3[22m [33mwarning[39m Unused eslint-disable directive (no problems were reported from 'no-bitwise')[0m
|
|
19
|
+
[0m[0m
|
|
20
|
+
[0m[4m/Users/jonathanburger/remotion/packages/studio/src/error-overlay/react-overlay/utils/get-source-map.ts[24m[0m
|
|
21
|
+
[0m [2m54:1[22m [33mwarning[39m Unexpected 'todo' comment: 'TODO: Can import this from...' [2mno-warning-comments[22m[0m
|
|
22
|
+
[0m[0m
|
|
23
|
+
[0m[4m/Users/jonathanburger/remotion/packages/studio/src/visual-controls/get-current-edited-value.ts[24m[0m
|
|
24
|
+
[0m [2m10:2[22m [33mwarning[39m Unexpected 'todo' comment: 'TODO: What if z.null()' [2mno-warning-comments[22m[0m
|
|
25
|
+
[0m[0m
|
|
26
|
+
[0m[33m[1m✖ 3 problems (0 errors, 3 warnings)[22m[39m[0m
|
|
27
|
+
[0m[33m[1m[22m[39m[33m[1m 0 errors and 1 warning potentially fixable with the `--fix` option.[22m[39m[0m
|
|
28
|
+
[0m[33m[1m[22m[39m[0m
|
package/.turbo/turbo-make.log
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
> tsc -d && bun --env-file=../.env.bundle bundle.ts
|
|
5
|
-
|
|
6
|
-
[0m[2m[[1m172.37ms[0m[2m][0m Generated.
|
|
2
|
+
[0m[2m[35m$[0m [2m[1mtsc -d && bun --env-file=../.env.bundle bundle.ts[0m
|
|
3
|
+
[0m[2m[[1m56.80ms[0m[2m][0m Generated.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const getStaticFiles: () => StaticFile[];
|
|
2
2
|
export type StaticFile = {
|
|
3
3
|
/**
|
|
4
|
-
* A string that you can pass to the `src` attribute of an `<Audio>`, `<Img>`
|
|
4
|
+
* A string that you can pass to the `src` attribute of an `<Audio>`, `<Img>`, `<Video>`, `<Html5Audio>`, `<Html5Video>` or `<OffthreadVideo>` element.
|
|
5
5
|
*/
|
|
6
6
|
src: string;
|
|
7
7
|
/**
|
|
@@ -13,10 +13,11 @@ const row = {
|
|
|
13
13
|
flexDirection: 'row',
|
|
14
14
|
};
|
|
15
15
|
const LoopedTimelineIndicator = ({ loops }) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const leftOver = loops % 1;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(remotion_1.AbsoluteFill, { style: row, children: [new Array(Math.floor(loops)).fill(true).map((_l, i) => {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment
|
|
19
|
+
// eslint-disable-next-line
|
|
20
|
+
, { children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, {}), i === loops - 1 ? null : (0, jsx_runtime_1.jsx)(LoopedIndicator_1.LoopedIndicator, {})] }, i));
|
|
21
|
+
}), leftOver > 0 ? (0, jsx_runtime_1.jsx)("div", { style: { flex: leftOver } }) : null] }));
|
|
21
22
|
};
|
|
22
23
|
exports.LoopedTimelineIndicator = LoopedTimelineIndicator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const listItemStyle: React.CSSProperties;
|
|
3
|
+
export declare const listItemActiveStyle: React.CSSProperties;
|
|
4
|
+
export declare const listItemHoverStyle: React.CSSProperties;
|
|
5
|
+
export declare const CompositionIdListItem: React.FC<{
|
|
6
|
+
readonly id: string;
|
|
7
|
+
readonly isActive?: boolean;
|
|
8
|
+
readonly onSelect: (id: string) => void;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CompositionIdListItem = exports.listItemHoverStyle = exports.listItemActiveStyle = exports.listItemStyle = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const colors_1 = require("../../helpers/colors");
|
|
10
|
+
exports.listItemStyle = {
|
|
11
|
+
padding: 8,
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
borderRadius: 4,
|
|
14
|
+
lineHeight: 1.4,
|
|
15
|
+
color: colors_1.TEXT_COLOR,
|
|
16
|
+
fontFamily: 'inherit',
|
|
17
|
+
fontSize: 14,
|
|
18
|
+
};
|
|
19
|
+
exports.listItemActiveStyle = {
|
|
20
|
+
backgroundColor: colors_1.SELECTED_BACKGROUND,
|
|
21
|
+
};
|
|
22
|
+
exports.listItemHoverStyle = {
|
|
23
|
+
backgroundColor: colors_1.CLEAR_HOVER,
|
|
24
|
+
};
|
|
25
|
+
const CompositionIdListItem = ({ id, isActive, onSelect }) => {
|
|
26
|
+
const [hover, setHover] = react_1.default.useState(false);
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: "button", onMouseEnter: () => setHover(true), onMouseLeave: () => setHover(false), onClick: () => onSelect(id), style: {
|
|
28
|
+
...exports.listItemStyle,
|
|
29
|
+
...(hover ? exports.listItemHoverStyle : {}),
|
|
30
|
+
...(isActive ? exports.listItemActiveStyle : {}),
|
|
31
|
+
}, title: id, children: id }));
|
|
32
|
+
};
|
|
33
|
+
exports.CompositionIdListItem = CompositionIdListItem;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompositionIdsDropdown = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Button_1 = require("../../components/Button");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
|
+
const CompositionIdListItem_1 = require("./CompositionIdListItem");
|
|
9
|
+
const carets_1 = require("./carets");
|
|
10
|
+
const containerStyle = {
|
|
11
|
+
display: 'inline-block',
|
|
12
|
+
position: 'relative',
|
|
13
|
+
};
|
|
14
|
+
// Button styling provided by shared Button component
|
|
15
|
+
const dropdownStyle = {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
top: '110%',
|
|
18
|
+
left: 0,
|
|
19
|
+
width: 320,
|
|
20
|
+
maxHeight: 300,
|
|
21
|
+
overflowY: 'auto',
|
|
22
|
+
backgroundColor: colors_1.INPUT_BACKGROUND,
|
|
23
|
+
border: `1px solid ${colors_1.INPUT_BORDER_COLOR_UNHOVERED}`,
|
|
24
|
+
borderRadius: 8,
|
|
25
|
+
padding: 8,
|
|
26
|
+
boxShadow: '0 6px 24px rgba(0,0,0,0.35)',
|
|
27
|
+
zIndex: 1000,
|
|
28
|
+
fontFamily: 'inherit',
|
|
29
|
+
fontSize: 14,
|
|
30
|
+
};
|
|
31
|
+
const searchStyle = {
|
|
32
|
+
width: '100%',
|
|
33
|
+
padding: '6px 8px',
|
|
34
|
+
borderRadius: 6,
|
|
35
|
+
border: `1px solid ${colors_1.INPUT_BORDER_COLOR_UNHOVERED}`,
|
|
36
|
+
background: colors_1.INPUT_BACKGROUND,
|
|
37
|
+
color: colors_1.TEXT_COLOR,
|
|
38
|
+
marginBottom: 8,
|
|
39
|
+
outline: 'none',
|
|
40
|
+
fontFamily: 'inherit',
|
|
41
|
+
fontSize: 14,
|
|
42
|
+
};
|
|
43
|
+
const CompositionIdsDropdown = ({ compositionIds, currentId }) => {
|
|
44
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
45
|
+
const [query, setQuery] = (0, react_1.useState)('');
|
|
46
|
+
const containerRef = (0, react_1.useRef)(null);
|
|
47
|
+
const filtered = (0, react_1.useMemo)(() => {
|
|
48
|
+
const q = query.trim().toLowerCase();
|
|
49
|
+
if (!q) {
|
|
50
|
+
return compositionIds;
|
|
51
|
+
}
|
|
52
|
+
return compositionIds.filter((id) => id.toLowerCase().includes(q));
|
|
53
|
+
}, [compositionIds, query]);
|
|
54
|
+
const onSelect = (id) => {
|
|
55
|
+
const isQuery = window.remotion_isReadOnlyStudio;
|
|
56
|
+
if (isQuery) {
|
|
57
|
+
window.location.href = `${window.location.pathname}?/${id}`;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
window.location.href = `/${id}`;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
(0, react_1.useEffect)(() => {
|
|
64
|
+
if (!open) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const onClickAway = (e) => {
|
|
68
|
+
if (!containerRef.current) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (!containerRef.current.contains(e.target)) {
|
|
72
|
+
setOpen(false);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const onKey = (e) => {
|
|
76
|
+
if (e.key === 'Escape') {
|
|
77
|
+
setOpen(false);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
document.addEventListener('mousedown', onClickAway);
|
|
81
|
+
document.addEventListener('touchstart', onClickAway, { passive: true });
|
|
82
|
+
document.addEventListener('keydown', onKey);
|
|
83
|
+
return () => {
|
|
84
|
+
document.removeEventListener('mousedown', onClickAway);
|
|
85
|
+
document.removeEventListener('touchstart', onClickAway);
|
|
86
|
+
document.removeEventListener('keydown', onKey);
|
|
87
|
+
};
|
|
88
|
+
}, [open, containerRef]);
|
|
89
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: containerRef, style: containerStyle, children: [(0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: () => setOpen((p) => !p), buttonContainerStyle: {
|
|
90
|
+
display: 'flex',
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
justifyContent: 'space-between',
|
|
93
|
+
gap: 8,
|
|
94
|
+
minWidth: 180,
|
|
95
|
+
}, children: [(0, jsx_runtime_1.jsx)("span", { style: {
|
|
96
|
+
overflow: 'hidden',
|
|
97
|
+
textOverflow: 'ellipsis',
|
|
98
|
+
whiteSpace: 'nowrap',
|
|
99
|
+
fontSize: '14px',
|
|
100
|
+
lineHeight: '24px',
|
|
101
|
+
}, children: currentId !== null && currentId !== void 0 ? currentId : 'Select composition' }), (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { size: 20, invert: open })] }), open ? ((0, jsx_runtime_1.jsxs)("div", { style: dropdownStyle, children: [(0, jsx_runtime_1.jsx)("input", { value: query, onChange: (e) => setQuery(e.target.value), placeholder: "Search compositions...", style: searchStyle, "aria-label": "Search compositions" }), (0, jsx_runtime_1.jsx)("div", { children: filtered.length === 0 ? ((0, jsx_runtime_1.jsx)("div", { style: { opacity: 0.7, padding: 8, textAlign: 'center' }, children: "No compositions found" })) : (filtered.map((id) => ((0, jsx_runtime_1.jsx)(CompositionIdListItem_1.CompositionIdListItem, { id: id, isActive: id === currentId, onSelect: onSelect }, id)))) })] })) : null] }));
|
|
102
|
+
};
|
|
103
|
+
exports.CompositionIdsDropdown = CompositionIdsDropdown;
|
|
@@ -6,8 +6,10 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const is_menu_item_1 = require("../../components/Menu/is-menu-item");
|
|
8
8
|
const layout_1 = require("../../components/layout");
|
|
9
|
+
const url_state_1 = require("../../helpers/url-state");
|
|
9
10
|
const AskOnDiscord_1 = require("./AskOnDiscord");
|
|
10
11
|
const CalculateMetadataErrorExplainer_1 = require("./CalculateMetadataErrorExplainer");
|
|
12
|
+
const CompositionIdsDropdown_1 = require("./CompositionIdsDropdown");
|
|
11
13
|
const ErrorTitle_1 = require("./ErrorTitle");
|
|
12
14
|
const HelpLink_1 = require("./HelpLink");
|
|
13
15
|
const OpenInEditor_1 = require("./OpenInEditor");
|
|
@@ -25,6 +27,8 @@ const spacer = {
|
|
|
25
27
|
display: 'inline-block',
|
|
26
28
|
};
|
|
27
29
|
const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButton, calculateMetadata, }) => {
|
|
30
|
+
var _a;
|
|
31
|
+
const compositionIds = (_a = window === null || window === void 0 ? void 0 : window.remotion_seenCompositionIds) !== null && _a !== void 0 ? _a : [];
|
|
28
32
|
const highestLineNumber = Math.max(...display.stackFrames
|
|
29
33
|
.map((s) => s.originalScriptCode)
|
|
30
34
|
.flat(1)
|
|
@@ -43,7 +47,13 @@ const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButto
|
|
|
43
47
|
}, [display.error]);
|
|
44
48
|
const lineNumberWidth = String(highestLineNumber).length;
|
|
45
49
|
const helpLink = (0, get_help_link_1.getHelpLink)(message);
|
|
46
|
-
|
|
50
|
+
const getCurrentCompositionId = () => {
|
|
51
|
+
var _a;
|
|
52
|
+
const route = (0, url_state_1.getRoute)();
|
|
53
|
+
const id = route.startsWith('/') ? route.slice(1) : route;
|
|
54
|
+
return compositionIds.includes(id) ? id : ((_a = compositionIds[0]) !== null && _a !== void 0 ? _a : null);
|
|
55
|
+
};
|
|
56
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message, canHaveDismissButton: canHaveDismissButton }), helpLink ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HelpLink_1.HelpLink, { link: helpLink, canHaveKeyboardShortcuts: keyboardShortcuts }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, display.stackFrames.length > 0 && window.remotion_editorName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, stack: display.stackFrames[0] }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, compositionIds.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CompositionIdsDropdown_1.CompositionIdsDropdown, { compositionIds: compositionIds, currentId: getCurrentCompositionId() }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(SearchGitHubIssues_1.SearchGithubIssues, { canHaveKeyboardShortcuts: keyboardShortcuts, message: display.error.message }), (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(AskOnDiscord_1.AskOnDiscord, { canHaveKeyboardShortcuts: keyboardShortcuts }), onRetry ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(Retry_1.RetryButton, { onClick: onRetry })] })) : null, calculateMetadata ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 0.5 }), (0, jsx_runtime_1.jsx)(CalculateMetadataErrorExplainer_1.CalculateMetadataErrorExplainer, {})] })) : null, (0, jsx_runtime_1.jsx)("div", { style: stack, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: display.stackFrames.map((s, i) => {
|
|
47
57
|
return ((0, jsx_runtime_1.jsx)(StackFrame_1.StackElement
|
|
48
58
|
// eslint-disable-next-line react/no-array-index-key
|
|
49
59
|
, { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)' }, i));
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const CaretRight: (
|
|
2
|
+
export declare const CaretRight: ({ size }: {
|
|
3
|
+
readonly size?: number;
|
|
4
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
export declare const CaretDown: React.FC<{
|
|
4
6
|
readonly invert: boolean;
|
|
7
|
+
readonly size?: number;
|
|
5
8
|
}>;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CaretDown = exports.CaretRight = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const CaretRight = () => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: { height: 20 }, "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 192 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
|
|
5
|
+
const CaretRight = ({ size }) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { style: { height: size !== null && size !== void 0 ? size : 20 }, "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 192 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
|
|
7
7
|
};
|
|
8
8
|
exports.CaretRight = CaretRight;
|
|
9
|
-
const CaretDown = ({ invert }) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: 20, transform: invert ? `rotate(180deg)` : '' }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
|
|
9
|
+
const CaretDown = ({ invert, size }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: size !== null && size !== void 0 ? size : 20, transform: invert ? `rotate(180deg)` : '' }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
|
|
11
11
|
};
|
|
12
12
|
exports.CaretDown = CaretDown;
|