Skip to content

Commit d3d95e8

Browse files
authored
Merge branch 'canary' into canary-stable
2 parents 7a3a784 + 4de6f84 commit d3d95e8

19 files changed

Lines changed: 367 additions & 116 deletions

app/components/media/TextEditor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
AlignCenter,
1212
AlignRight,
1313
Bold,
14+
ChevronDown,
1415
Type,
1516
Plus,
1617
ChevronDown,

app/components/timeline/MediaBin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const AudioPreview = ({ src }: { src: string }) => {
127127
window.addEventListener('pointerup', onUp, { once: true });
128128
return () => {
129129
window.removeEventListener('pointermove', onMove);
130-
window.removeEventListener('pointerup', onUp);
130+
window.removeEventListener('pointerup', onUp as EventListener);
131131
};
132132
}, [isScrubbing, seekFromClientX]);
133133

app/components/ui/KimuLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const KimuLogo: React.FC<KimuLogoProps> = ({
2727
? " animate-float-icon transition-all duration-700"
2828
: "")
2929
}
30-
style={{ color, opacity, ...(style) }}
30+
style={{ color, opacity, ...(style as React.CSSProperties) }}
3131
{...rest}
3232
aria-label="Kimu Logo"
3333
>

app/components/ui/ProfileMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function ProfileMenu({
4444
setLimitBytes(Number.isFinite(l) ? l : 2 * 1024 * 1024 * 1024);
4545
}
4646
} catch {
47-
// ignore
47+
console.error('Storage fetch failed');
4848
}
4949
})();
5050
return () => {

app/components/ui/text-hover-effect.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useRef, useEffect, useState } from "react";
2-
import { motion } from "framer-motion";
2+
import { motion, type TargetAndTransition } from "framer-motion";
33

44
export const TextHoverEffect = ({
55
text,
@@ -56,7 +56,7 @@ export const TextHoverEffect = ({
5656
gradientUnits="userSpaceOnUse"
5757
r="20%"
5858
initial={{ cx: "50%", cy: "50%" }}
59-
animate={maskPosition}
59+
animate={maskPosition as TargetAndTransition}
6060
transition={{ duration: duration ?? 0, ease: "easeOut" }}
6161
>
6262
<stop offset="0%" stopColor="white" />

app/hooks/useMediaBin.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,17 @@ export const useMediaBin = (handleDeleteScrubbersByMediaBinId: (mediaBinId: stri
336336
const setTextItems = useCallback((textItems: MediaBinItem[]) => {
337337
setMediaBinItems(prev => {
338338
const withoutText = prev.filter(i => i.mediaType !== 'text');
339-
return [...withoutText, ...textItems.map(t => ({
340-
...t,
341-
mediaType: 'text',
342-
mediaUrlLocal: null,
343-
mediaUrlRemote: null,
344-
isUploading: false,
345-
uploadProgress: null,
346-
}) as MediaBinItem)];
339+
return [
340+
...withoutText,
341+
...textItems.map((t): MediaBinItem => ({
342+
...t,
343+
mediaType: 'text' as const,
344+
mediaUrlLocal: null,
345+
mediaUrlRemote: null,
346+
isUploading: false,
347+
uploadProgress: null,
348+
})),
349+
];
347350
});
348351
}, []);
349352

app/lib/migrate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ async function run() {
1111
u.search = "";
1212
connectionString = u.toString();
1313
} catch {
14-
// ignore
14+
console.error("Invalid database URL");
15+
process.exitCode = 1;
16+
return;
1517
}
1618

1719
const pool = new Pool({ connectionString, ssl: { rejectUnauthorized: false } });

app/lib/projects.repo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function getPool(): Pool {
1212
u.search = "";
1313
connectionString = u.toString();
1414
} catch {
15-
// Ignore URL parsing errors, use raw connection string
15+
throw new Error("Invalid database URL");
1616
}
1717
pool = new Pool({ connectionString, ssl: { rejectUnauthorized: false } });
1818
}

app/lib/timeline.store.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from "fs";
22
import path from "path";
3+
import type { MediaBinItem, TimelineState } from "~/components/timeline/types";
34

45
const TIMELINE_DIR = process.env.TIMELINE_DIR || path.resolve("project_data");
56

@@ -13,11 +14,11 @@ function getFilePath(projectId: string): string {
1314
}
1415

1516
export type ProjectStateFile = {
16-
timeline: any;
17-
textBinItems: any[];
17+
timeline: TimelineState;
18+
textBinItems: MediaBinItem[];
1819
};
1920

20-
function defaultTimeline(): any {
21+
function defaultTimeline(): TimelineState {
2122
return {
2223
tracks: [
2324
{ id: "track-1", scrubbers: [], transitions: [] },
@@ -52,12 +53,12 @@ export async function saveProjectState(projectId: string, state: ProjectStateFil
5253
}
5354

5455
// Backwards-compatible helpers
55-
export async function loadTimeline(projectId: string): Promise<any> {
56+
export async function loadTimeline(projectId: string): Promise<TimelineState> {
5657
const state = await loadProjectState(projectId);
5758
return state.timeline;
5859
}
5960

60-
export async function saveTimeline(projectId: string, timeline: any): Promise<void> {
61+
export async function saveTimeline(projectId: string, timeline: TimelineState): Promise<void> {
6162
const prev = await loadProjectState(projectId);
6263
await saveProjectState(projectId, { timeline, textBinItems: prev.textBinItems });
6364
}

app/root.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ import {
1111
} from "react-router";
1212
import { useEffect, useState } from "react";
1313

14-
import type { Route } from "./+types/root";
1514
import "./app.css";
1615
import { Toaster } from "./components/ui/sonner";
1716
import { ThemeProvider } from "./components/ui/ThemeProvider";
1817
import { auth } from "~/lib/auth.server";
1918
import { Navbar } from "~/components/ui/Navbar";
2019
import { MarketingFooter } from "~/components/ui/MarketingFooter";
20+
import type { User } from "better-auth";
2121

2222

23-
export const links: Route.LinksFunction = () => [
23+
export const links = () => [
2424
{ rel: "icon", href: "/favicon.png" },
2525
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
2626
{
@@ -34,7 +34,7 @@ export const links: Route.LinksFunction = () => [
3434
},
3535
];
3636

37-
export async function loader({ request }: Route.LoaderArgs) {
37+
export async function loader({ request }: { request: Request }) {
3838
try {
3939
// @ts-ignore
4040
const session = await auth.api?.getSession?.({ headers: request.headers });
@@ -68,7 +68,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
6868
}
6969

7070
export default function App() {
71-
const data = useLoaderData<typeof loader>() as { user: any };
71+
const data = useLoaderData<typeof loader>() as { user: User };
7272
const location = useLocation();
7373
const matches = useMatches();
7474
const [showBrand, setShowBrand] = useState(true);
@@ -114,7 +114,7 @@ export default function App() {
114114
);
115115
}
116116

117-
export function ErrorBoundary({ error }: Route.ErrorBoundaryProps) {
117+
export function ErrorBoundary({ error }: { error: Error }) {
118118
let message = "Oops!";
119119
let details = "An unexpected error occurred.";
120120
let stack: string | undefined;

0 commit comments

Comments
 (0)