From 02e79cc42681c6dab04b78cba5a7324b8a15658e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:07:48 +0530 Subject: [PATCH 1/3] Bump ajv in the npm_and_yarn group across 1 directory (#176) Bumps the npm_and_yarn group with 1 update in the / directory: [ajv](https://github.com/ajv-validator/ajv). Updates `ajv` from 6.12.6 to 6.14.0 - [Release notes](https://github.com/ajv-validator/ajv/releases) - [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.6...v6.14.0) --- updated-dependencies: - dependency-name: ajv dependency-version: 6.14.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6acb83b..1ee5ee1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2080,11 +2080,11 @@ packages: peerDependencies: ajv: ^8.8.2 - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ajv@6.14.0: + resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==} - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ajv@8.18.0: + resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -4958,7 +4958,7 @@ snapshots: '@eslint/eslintrc@3.3.1': dependencies: - ajv: 6.12.6 + ajv: 6.14.0 debug: 4.4.1 espree: 10.4.0 globals: 14.0.0 @@ -6272,27 +6272,27 @@ snapshots: acorn@8.15.0: {} - ajv-formats@2.1.1(ajv@8.17.1): + ajv-formats@2.1.1(ajv@8.18.0): optionalDependencies: - ajv: 8.17.1 + ajv: 8.18.0 - ajv-keywords@3.5.2(ajv@6.12.6): + ajv-keywords@3.5.2(ajv@6.14.0): dependencies: - ajv: 6.12.6 + ajv: 6.14.0 - ajv-keywords@5.1.0(ajv@8.17.1): + ajv-keywords@5.1.0(ajv@8.18.0): dependencies: - ajv: 8.17.1 + ajv: 8.18.0 fast-deep-equal: 3.1.3 - ajv@6.12.6: + ajv@6.14.0: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ajv@8.17.1: + ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 fast-uri: 3.0.6 @@ -6993,7 +6993,7 @@ snapshots: '@humanwhocodes/retry': 0.4.3 '@types/estree': 1.0.8 '@types/json-schema': 7.0.15 - ajv: 6.12.6 + ajv: 6.14.0 chalk: 4.1.2 cross-spawn: 7.0.6 debug: 4.4.1 @@ -8276,15 +8276,15 @@ snapshots: schema-utils@3.3.0: dependencies: '@types/json-schema': 7.0.15 - ajv: 6.12.6 - ajv-keywords: 3.5.2(ajv@6.12.6) + ajv: 6.14.0 + ajv-keywords: 3.5.2(ajv@6.14.0) schema-utils@4.3.3: dependencies: '@types/json-schema': 7.0.15 - ajv: 8.17.1 - ajv-formats: 2.1.1(ajv@8.17.1) - ajv-keywords: 5.1.0(ajv@8.17.1) + ajv: 8.18.0 + ajv-formats: 2.1.1(ajv@8.18.0) + ajv-keywords: 5.1.0(ajv@8.18.0) semver@6.3.1: {} From 13f8965a6fb095df778aedb88c209a4392285836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiberiu=20Sab=C4=83u?= Date: Sat, 28 Feb 2026 22:04:15 +0100 Subject: [PATCH 2/3] feat: Add import Icon in the media section --- app/components/timeline/MediaBin.tsx | 75 ++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 10 deletions(-) diff --git a/app/components/timeline/MediaBin.tsx b/app/components/timeline/MediaBin.tsx index 454fe96..ea9ce4d 100644 --- a/app/components/timeline/MediaBin.tsx +++ b/app/components/timeline/MediaBin.tsx @@ -251,6 +251,9 @@ export default function MediaBin() { // Drag & Drop state for external file imports const [isDragOver, setIsDragOver] = useState(false); + // File input ref for click-to-upload + const fileInputRef = useRef(null); + // Arrange & sorting state const [arrangeMode, setArrangeMode] = useState<"default" | "group">( "default" @@ -360,6 +363,28 @@ export default function MediaBin() { [onAddMedia] ); + const handleUploadClick = useCallback(() => { + fileInputRef.current?.click(); + }, []); + + const handleFileInputChange = useCallback( + async (e: React.ChangeEvent) => { + const files = Array.from(e.target.files || []); + for (const file of files) { + try { + await onAddMedia(file); + } catch (err) { + console.error("Failed to import file:", file.name, err); + } + } + // Reset input so same file can be selected again + if (fileInputRef.current) { + fileInputRef.current.value = ""; + } + }, + [onAddMedia] + ); + const getMediaIcon = (mediaType: string) => { switch (mediaType) { case "video": @@ -712,11 +737,21 @@ export default function MediaBin() { {defaultArrangedItems.length === 0 && (
- -

No media files

-

- Import videos, images, or audio to get started -

+
)} @@ -885,11 +920,21 @@ export default function MediaBin() { {counts.all === 0 && (
- -

No media files

-

- Import videos, images, or audio to get started -

+
)} @@ -1019,6 +1064,16 @@ export default function MediaBin() { )} + + {/* Hidden file input for click-to-upload */} + ); } From 8517181091b808a581a1fbb997dfb6e5b5fba31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiberiu=20Sab=C4=83u?= Date: Sun, 1 Mar 2026 00:03:42 +0100 Subject: [PATCH 3/3] fix: refactor to use reusable component --- app/components/timeline/MediaBin.tsx | 59 ++++++++++++---------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/app/components/timeline/MediaBin.tsx b/app/components/timeline/MediaBin.tsx index ea9ce4d..4c82127 100644 --- a/app/components/timeline/MediaBin.tsx +++ b/app/components/timeline/MediaBin.tsx @@ -230,6 +230,29 @@ const AudioPreview = ({ src }: { src: string }) => { ); }; +// Empty state component for when no media files are present +const EmptyState = memo(({ onUploadClick }: { onUploadClick: () => void }) => { + return ( +
+ +
+ ); +}); + // This is required for the data router export function loader() { return null; @@ -736,23 +759,7 @@ export default function MediaBin() { ))} {defaultArrangedItems.length === 0 && ( -
- -
+ )} )} @@ -919,23 +926,7 @@ export default function MediaBin() { ))} {counts.all === 0 && ( -
- -
+ )} )}