repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/list/localEvent.ts
src/main/modules/sync/client/modules/list/localEvent.ts
import { SYNC_CLOSE_CODE } from '@common/constants_sync' import { registerListActionEvent } from '@main/modules/sync/listEvent' let unregisterLocalListAction: (() => void) | null export const registerEvent = (socket: LX.Sync.Client.Socket) => { // socket = _socket // socket.onClose(() => { // unregisterLocalL...
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/list/handler.ts
src/main/modules/sync/client/modules/list/handler.ts
// 这个文件导出的方法将暴露给服务端调用,第一个参数固定为当前 socket 对象 import { handleRemoteListAction, getLocalListData, setLocalListData, } from '@main/modules/sync/listEvent' import { toMD5 } from '@common/utils/nodejs' import { removeSelectModeListener, sendCloseSelectMode, sendSelectMode } from '@main/modules/winMain' import log from '...
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/list/index.ts
src/main/modules/sync/client/modules/list/index.ts
export { default as handler } from './handler' export * from './localEvent'
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/dislike/localEvent.ts
src/main/modules/sync/client/modules/dislike/localEvent.ts
import { SYNC_CLOSE_CODE } from '@common/constants_sync' import { registerDislikeActionEvent } from '@main/modules/sync/dislikeEvent' let unregisterLocalListAction: (() => void) | null export const registerEvent = (socket: LX.Sync.Client.Socket) => { // socket = _socket // socket.onClose(() => { // unregister...
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/dislike/handler.ts
src/main/modules/sync/client/modules/dislike/handler.ts
// 这个文件导出的方法将暴露给服务端调用,第一个参数固定为当前 socket 对象 import { handleRemoteDislikeAction, getLocalDislikeData, setLocalDislikeData } from '@main/modules/sync/dislikeEvent' import { toMD5 } from '@common/utils/nodejs' import { removeSelectModeListener, sendCloseSelectMode, sendSelectMode } from '@main/modules/winMain' import log f...
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/modules/dislike/index.ts
src/main/modules/sync/client/modules/dislike/index.ts
export { default as handler } from './handler' export * from './localEvent'
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/sync/handler.ts
src/main/modules/sync/client/sync/handler.ts
// 这个文件导出的方法将暴露给服务端调用,第一个参数固定为当前 socket 对象 // import { getUserSpace } from '@/user' // import { modules } from '../modules' import { featureVersion } from '../modules' const handler: Omit<LX.Sync.ClientSyncHandlerActions<LX.Sync.Client.Socket>, 'finished'> = { async getEnabledFeatures(socket, serverType, supported...
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
lyswhut/lx-music-desktop
https://github.com/lyswhut/lx-music-desktop/blob/8686ecfa54452562ef2ee74697f8e8a22c9788fa/src/main/modules/sync/client/sync/index.ts
src/main/modules/sync/client/sync/index.ts
import handler from './handler' import { callObj as _callObj } from '../modules' export { modules } from '../modules' export const callObj = { ...handler, ..._callObj, }
typescript
Apache-2.0
8686ecfa54452562ef2ee74697f8e8a22c9788fa
2026-01-04T15:37:58.950548Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/drizzle.config.ts
apps/web/drizzle.config.ts
import type { Config } from "drizzle-kit"; import * as dotenv from "dotenv"; // Load the right env file based on environment if (process.env.NODE_ENV === "production") { dotenv.config({ path: ".env.production" }); } else { dotenv.config({ path: ".env.local" }); } export default { schema: "../../packages/db/src/...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/next.config.ts
apps/web/next.config.ts
import type { NextConfig } from "next"; import { withBotId } from "botid/next/config"; const nextConfig: NextConfig = { compiler: { removeConsole: process.env.NODE_ENV === "production", }, reactStrictMode: true, productionBrowserSourceMaps: true, output: "standalone", images: { remotePatterns: [ ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/middleware.ts
apps/web/src/middleware.ts
import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; export async function middleware(request: NextRequest) { // Handle fuckcapcut.com domain redirect if (request.headers.get("host") === "fuckcapcut.com") { return NextResponse.redirect("https://opencut.app/why-not-capcut"...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/env.ts
apps/web/src/env.ts
import { vercel } from "@t3-oss/env-core/presets-zod"; import { createEnv } from "@t3-oss/env-nextjs"; import { z } from "zod"; import { keys as auth } from "@opencut/auth/keys"; import { keys as db } from "@opencut/db/keys"; export const env = createEnv({ extends: [vercel(), auth(), db()], server: { ANALYZE: ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/layout.tsx
apps/web/src/app/layout.tsx
import { ThemeProvider } from "next-themes"; import { Analytics } from "@vercel/analytics/react"; import Script from "next/script"; import "./globals.css"; import { Toaster } from "../components/ui/sonner"; import { TooltipProvider } from "../components/ui/tooltip"; import { StorageProvider } from "../components/storag...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/robots.ts
apps/web/src/app/robots.ts
import type { MetadataRoute } from "next"; import { SITE_URL } from "@/constants/site"; export default function robots(): MetadataRoute.Robots { return { rules: { userAgent: "*", allow: "/", disallow: ["/_next/", "/projects/", "/editor/"], }, sitemap: `${SITE_URL}/sitemap.xml`, }; }
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/metadata.ts
apps/web/src/app/metadata.ts
import type { Metadata } from "next"; import { SITE_INFO, SITE_URL } from "@/constants/site"; export const baseMetaData: Metadata = { metadataBase: new URL(SITE_URL), title: SITE_INFO.title, description: SITE_INFO.description, openGraph: { title: SITE_INFO.title, description: SITE_INFO.description, ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/page.tsx
apps/web/src/app/page.tsx
import { Hero } from "@/components/landing/hero"; import { Header } from "@/components/header"; import { Footer } from "@/components/footer"; import type { Metadata } from "next"; import { SITE_URL } from "@/constants/site"; export const metadata: Metadata = { alternates: { canonical: SITE_URL, }, }; export d...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/sitemap.ts
apps/web/src/app/sitemap.ts
import { SITE_URL } from "@/constants/site"; import { getPosts } from "@/lib/blog-query"; import type { MetadataRoute } from "next"; export default async function sitemap(): Promise<MetadataRoute.Sitemap> { const data = await getPosts(); const postPages: MetadataRoute.Sitemap = data?.posts?.map((post) => ({ ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/rss.xml/route.ts
apps/web/src/app/rss.xml/route.ts
import { Feed } from "feed"; import { getPosts } from "@/lib/blog-query"; import { SITE_INFO, SITE_URL } from "@/constants/site"; export async function GET() { try { const { posts } = await getPosts(); const feed = new Feed({ title: `${SITE_INFO.title} Blog`, description: SITE_INFO.description, ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/contributors/page.tsx
apps/web/src/app/contributors/page.tsx
import { Metadata } from "next"; import { Header } from "@/components/header"; import { Card, CardContent } from "@/components/ui/card"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { ExternalLink } from "lucide-react"; import Link...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/roadmap/page.tsx
apps/web/src/app/roadmap/page.tsx
import { Metadata } from "next"; import { Badge } from "@/components/ui/badge"; import { GithubIcon } from "@/components/icons"; import Link from "next/link"; import { Footer } from "@/components/footer"; import { Header } from "@/components/header"; import ReactMarkdown from "react-markdown"; import { cn } from "@/lib...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/terms/page.tsx
apps/web/src/app/terms/page.tsx
import { Metadata } from "next"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { GithubIcon } from "@/components/icons"; import Link from "next/link"; import { Footer } from "@/components/footer"; import { Header } from "@/components/header"; export con...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/editor/[project_id]/layout.tsx
apps/web/src/app/editor/[project_id]/layout.tsx
"use client"; export default function EditorLayout({ children, }: { children: React.ReactNode; }) { return <div>{children}</div>; }
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/editor/[project_id]/page.tsx
apps/web/src/app/editor/[project_id]/page.tsx
"use client"; import { useEffect, useRef } from "react"; import { useParams, useRouter } from "next/navigation"; import { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from "@/components/ui/resizable"; import { MediaPanel } from "@/components/editor/media-panel"; import { PropertiesPanel } from "@/comp...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/(auth)/login/page.tsx
apps/web/src/app/(auth)/login/page.tsx
"use client"; import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { memo, Suspense } from "react"; import { Input } from "@/components/ui/input"; import { Label ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/(auth)/signup/page.tsx
apps/web/src/app/(auth)/signup/page.tsx
"use client"; import { useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { memo, Suspense } from "react"; import { Input } from "@/components/ui/input"; import { Label ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/privacy/page.tsx
apps/web/src/app/privacy/page.tsx
import { Metadata } from "next"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { GithubIcon } from "@/components/icons"; import Link from "next/link"; import { Footer } from "@/components/footer"; import { Header } from "@/components/header"; export con...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/sounds/search/route.ts
apps/web/src/app/api/sounds/search/route.ts
import { NextRequest, NextResponse } from "next/server"; import { z } from "zod"; import { env } from "@/env"; import { baseRateLimit } from "@/lib/rate-limit"; const searchParamsSchema = z.object({ q: z.string().max(500, "Query too long").optional(), type: z.enum(["songs", "effects"]).optional(), page: z.coerce...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/auth/[...all]/route.ts
apps/web/src/app/api/auth/[...all]/route.ts
import { auth } from "@opencut/auth"; import { toNextJsHandler } from "better-auth/next-js"; export const { POST, GET } = toNextJsHandler(auth);
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/health/route.ts
apps/web/src/app/api/health/route.ts
import { NextRequest } from "next/server"; export async function GET(request: NextRequest) { return new Response("OK", { status: 200 }); }
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/get-upload-url/route.ts
apps/web/src/app/api/get-upload-url/route.ts
import { NextRequest, NextResponse } from "next/server"; import { z } from "zod"; import { AwsClient } from "aws4fetch"; import { nanoid } from "nanoid"; import { env } from "@/env"; import { baseRateLimit } from "@/lib/rate-limit"; import { isTranscriptionConfigured } from "@/lib/transcription-utils"; const uploadReq...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/waitlist/export/route.ts
apps/web/src/app/api/waitlist/export/route.ts
import { NextRequest, NextResponse } from "next/server"; import { baseRateLimit } from "@/lib/rate-limit"; import { db, exportWaitlist, eq } from "@opencut/db"; import { randomUUID } from "crypto"; import { exportWaitlistSchema, exportWaitlistResponseSchema, } from "@/lib/schemas/waitlist"; const requestSchema = e...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/api/transcribe/route.ts
apps/web/src/app/api/transcribe/route.ts
import { NextRequest, NextResponse } from "next/server"; import { z } from "zod"; import { env } from "@/env"; import { baseRateLimit } from "@/lib/rate-limit"; import { isTranscriptionConfigured } from "@/lib/transcription-utils"; const transcribeRequestSchema = z.object({ filename: z.string().min(1, "Filename is r...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/projects/page.tsx
apps/web/src/app/projects/page.tsx
"use client"; import { Calendar, ChevronLeft, Loader2, MoreHorizontal, ArrowDown01, Plus, Search, Trash2, Video, X, } from "lucide-react"; import Image from "next/image"; import Link from "next/link"; import { useRouter } from "next/navigation"; import { useCallback, useEffect, useState } from "rea...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/why-not-capcut/page.tsx
apps/web/src/app/why-not-capcut/page.tsx
import { Header } from "@/components/header"; export default function WhyNotCapcut() { return ( <div className="min-h-screen bg-background px-5"> <Header /> <main className="relative mt-12"> <div className="absolute inset-0 overflow-hidden pointer-events-none"> <div className="abso...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/blog/page.tsx
apps/web/src/app/blog/page.tsx
import { Metadata } from "next"; import { Header } from "@/components/header"; import { Card, CardContent } from "@/components/ui/card"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import Link from "next/link"; import { getPosts } from "@/lib/blog-query"; import Image from "next/image"...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/blog/[slug]/page.tsx
apps/web/src/app/blog/[slug]/page.tsx
import { Header } from "@/components/header"; import Prose from "@/components/ui/prose"; import { Separator } from "@/components/ui/separator"; import { getPosts, getSinglePost, processHtmlContent } from "@/lib/blog-query"; import { Metadata } from "next"; import Image from "next/image"; import { notFound } from "next/...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/app/animation/page.tsx
apps/web/src/app/animation/page.tsx
"use client"; import { InputWithBack } from "@/components/ui/input-with-back"; import { useState } from "react"; export default function AnimationPage() { const [isExpanded, setIsExpanded] = useState(false); return ( <div className="h-dvh flex"> <div className="bg-panel p-6 w-[20rem]"> <InputWi...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-timeline-element-resize.ts
apps/web/src/hooks/use-timeline-element-resize.ts
import { useState, useEffect } from "react"; import { ResizeState, TimelineElement, TimelineTrack } from "@/types/timeline"; import { useMediaStore } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { DEFAULT_FPS, useProjectStore } from "@/stores/project-store"; import { s...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-timeline-zoom.ts
apps/web/src/hooks/use-timeline-zoom.ts
import { useState, useCallback, useEffect, RefObject } from "react"; interface UseTimelineZoomProps { containerRef: RefObject<HTMLDivElement>; isInTimeline?: boolean; } interface UseTimelineZoomReturn { zoomLevel: number; setZoomLevel: (zoomLevel: number | ((prev: number) => number)) => void; handleWheel: (...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-edge-auto-scroll.ts
apps/web/src/hooks/use-edge-auto-scroll.ts
import { useEffect, useRef } from "react"; interface UseEdgeAutoScrollParams { isActive: boolean; getMouseClientX: () => number; rulerScrollRef: React.RefObject<HTMLDivElement>; tracksScrollRef: React.RefObject<HTMLDivElement>; contentWidth: number; edgeThreshold?: number; maxScrollSpeed?: number; } // ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-timeline-playhead.ts
apps/web/src/hooks/use-timeline-playhead.ts
import { snapTimeToFrame } from "@/constants/timeline-constants"; import { DEFAULT_FPS, useProjectStore } from "@/stores/project-store"; import { usePlaybackStore } from "@/stores/playback-store"; import { useState, useEffect, useCallback, useRef } from "react"; import { useEdgeAutoScroll } from "@/hooks/use-edge-auto-...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-keybinding-conflicts.ts
apps/web/src/hooks/use-keybinding-conflicts.ts
"use client"; import { useMemo } from "react"; import { useKeybindingsStore } from "@/stores/keybindings-store"; import { ActionWithOptionalArgs } from "@/constants/actions"; export interface KeybindingConflictInfo { key: string; actions: ActionWithOptionalArgs[]; isConflict: boolean; } export const useKeybind...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-editor-actions.ts
apps/web/src/hooks/use-editor-actions.ts
"use client"; import { useEffect } from "react"; import { useActionHandler } from "@/constants/actions"; import { useTimelineStore } from "@/stores/timeline-store"; import { usePlaybackStore } from "@/stores/playback-store"; import { DEFAULT_FPS, useProjectStore } from "@/stores/project-store"; import { toast } from "...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-aspect-ratio.ts
apps/web/src/hooks/use-aspect-ratio.ts
import { useEditorStore } from "@/stores/editor-store"; import { useMediaStore, getMediaAspectRatio } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { DEFAULT_CANVAS_SIZE, useProjectStore } from "@/stores/project-store"; export function useAspectRatio() { const { canv...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-toast.ts
apps/web/src/hooks/use-toast.ts
"use client"; // Inspired by react-hot-toast library import * as React from "react"; import type { ToastActionElement, ToastProps } from "../components/ui/toast"; const TOAST_LIMIT = 1; const TOAST_REMOVE_DELAY = 1_000_000; type ToasterToast = ToastProps & { id: string; title?: React.ReactNode; description?: ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-keyboard-shortcuts-help.ts
apps/web/src/hooks/use-keyboard-shortcuts-help.ts
"use client"; import { useMemo } from "react"; import { useKeybindingsStore } from "@/stores/keybindings-store"; import { Action } from "@/constants/actions"; import { getPlatformAlternateKey, getPlatformSpecialKey } from "@/lib/utils"; export interface KeyboardShortcut { id: string; keys: string[]; description...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-selection-box.ts
apps/web/src/hooks/use-selection-box.ts
import { useState, useEffect, useCallback } from "react"; interface UseSelectionBoxProps { containerRef: React.RefObject<HTMLElement>; playheadRef?: React.RefObject<HTMLElement>; onSelectionComplete: ( elements: { trackId: string; elementId: string }[] ) => void; isEnabled?: boolean; } interface Selecti...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-keybindings.ts
apps/web/src/hooks/use-keybindings.ts
import { useEffect } from "react"; import { invokeAction } from "../constants/actions"; import { useKeybindingsStore } from "@/stores/keybindings-store"; /** * A composable that hooks to the caller component's * lifecycle and hooks to the keyboard events to fire * the appropriate actions based on keybindings */ ex...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-highlight-scroll.ts
apps/web/src/hooks/use-highlight-scroll.ts
import { useEffect, useState, useRef } from "react"; export function useHighlightScroll( highlightId: string | null, onClearHighlight: () => void, highlightDuration = 1000 ) { const [highlightedId, setHighlightedId] = useState<string | null>(null); const elementRefs = useRef<Map<string, HTMLElement>>(new Map...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-mobile.tsx
apps/web/src/hooks/use-mobile.tsx
import * as React from "react"; const MOBILE_BREAKPOINT = 768; export function useIsMobile() { const [isMobile, setIsMobile] = React.useState<boolean | undefined>( undefined ); React.useEffect(() => { const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`); const onChange = () => {...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-timeline-snapping.ts
apps/web/src/hooks/use-timeline-snapping.ts
import { useCallback } from "react"; import { TimelineTrack } from "@/types/timeline"; import { TIMELINE_CONSTANTS } from "@/constants/timeline-constants"; export interface SnapPoint { time: number; type: "element-start" | "element-end" | "playhead"; elementId?: string; trackId?: string; } export interface Sn...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-drag-drop.ts
apps/web/src/hooks/use-drag-drop.ts
import { useState, useRef } from "react"; interface UseDragDropOptions { onDrop?: (files: FileList) => void; } // Helper function to check if drag contains files from external sources (not internal app drags) const containsFiles = (dataTransfer: DataTransfer): boolean => { // Check if this is an internal app drag...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-sound-search.ts
apps/web/src/hooks/use-sound-search.ts
import { useEffect } from "react"; import { useSoundsStore } from "@/stores/sounds-store"; /** * Custom hook for searching sound effects with race condition protection. * Uses global Zustand store to persist search state across tab switches. * - Debounced search (300ms) * - Race condition protection with cleanup ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-frame-cache.ts
apps/web/src/hooks/use-frame-cache.ts
import { useRef, useCallback } from "react"; import { TimelineTrack, TimelineElement, MediaElement, TextElement, } from "@/types/timeline"; import { MediaFile } from "@/types/media"; import { TProject } from "@/types/project"; interface CachedFrame { imageData: ImageData; timelineHash: string; timestamp:...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-playback-controls.ts
apps/web/src/hooks/use-playback-controls.ts
import { useEffect, useCallback } from "react"; import { usePlaybackStore } from "@/stores/playback-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { toast } from "sonner"; export const usePlaybackControls = () => { const { isPlaying, currentTime, play, pause, seek } = usePlaybackStore(); ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/use-infinite-scroll.ts
apps/web/src/hooks/use-infinite-scroll.ts
import { useRef, useCallback } from "react"; interface UseInfiniteScrollOptions { onLoadMore: () => void; hasMore: boolean; isLoading: boolean; threshold?: number; enabled?: boolean; } export function useInfiniteScroll({ onLoadMore, hasMore, isLoading, threshold = 200, enabled = true, }: UseInfini...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/auth/useSignUp.ts
apps/web/src/hooks/auth/useSignUp.ts
import { useState, useCallback } from "react"; import { useRouter } from "next/navigation"; import { signUp, signIn } from "@opencut/auth/client"; export function useSignUp() { const router = useRouter(); const [name, setName] = useState(""); const [email, setEmail] = useState(""); const [password, setPassword...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/hooks/auth/useLogin.ts
apps/web/src/hooks/auth/useLogin.ts
import { useCallback, useState } from "react"; import { useRouter } from "next/navigation"; import { signIn } from "@opencut/auth/client"; export function useLogin() { const router = useRouter(); const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [error, setError] = use...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/keyboard-shortcuts-help.tsx
apps/web/src/components/keyboard-shortcuts-help.tsx
"use client"; import { Keyboard } from "lucide-react"; import { useEffect, useState } from "react"; import { toast } from "sonner"; import { type KeyboardShortcut, useKeyboardShortcutsHelp, } from "@/hooks/use-keyboard-shortcuts-help"; import { useKeybindingsStore } from "@/stores/keybindings-store"; import { Butt...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/language-select.tsx
apps/web/src/components/language-select.tsx
import { useState, useRef, useEffect } from "react"; import { ChevronDown, Globe } from "lucide-react"; import { cn } from "@/lib/utils"; import { motion } from "framer-motion"; import ReactCountryFlag from "react-country-flag"; export interface Language { code: string; name: string; flag?: string; } interface ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/header-base.tsx
apps/web/src/components/header-base.tsx
"use client"; import { cn } from "@/lib/utils"; import { ReactNode } from "react"; interface HeaderBaseProps { leftContent?: ReactNode; centerContent?: ReactNode; rightContent?: ReactNode; className?: string; children?: ReactNode; } export function HeaderBase({ leftContent, centerContent, rightConten...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/footer.tsx
apps/web/src/components/footer.tsx
"use client"; import { motion } from "motion/react"; import Link from "next/link"; import { RiDiscordFill, RiTwitterXLine } from "react-icons/ri"; import { FaGithub } from "react-icons/fa6"; import Image from "next/image"; export function Footer() { return ( <motion.footer className="bg-background border-...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/delete-project-dialog.tsx
apps/web/src/components/delete-project-dialog.tsx
import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { cn } from "@/lib/utils"; export function DeleteProjectDialog({ isOpen, onOpenChange, onConfirm, projectName, }: { ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/rename-project-dialog.tsx
apps/web/src/components/rename-project-dialog.tsx
import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { useState } from "react"; export function RenameProjectDialog({ isOpen, on...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/icons.tsx
apps/web/src/components/icons.tsx
export function GoogleIcon({ className }: { className?: string }) { return ( <svg className={className} viewBox="0 0 24 24"> <path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" /> <path ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/storage-provider.tsx
apps/web/src/components/storage-provider.tsx
"use client"; import { createContext, useContext, useEffect, useState } from "react"; import { useProjectStore } from "@/stores/project-store"; import { useMediaStore } from "@/stores/media-store"; import { storageService } from "@/lib/storage/storage-service"; import { toast } from "sonner"; interface StorageContext...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/header.tsx
apps/web/src/components/header.tsx
"use client"; import Link from "next/link"; import { Button } from "./ui/button"; import { ArrowRight } from "lucide-react"; import { HeaderBase } from "./header-base"; import Image from "next/image"; import { ThemeToggle } from "./theme-toggle"; export function Header() { const leftContent = ( <Link href="/" c...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/theme-toggle.tsx
apps/web/src/components/theme-toggle.tsx
"use client"; import { Button } from "./ui/button"; import { Sun, Moon } from "lucide-react"; import { useTheme } from "next-themes"; interface ThemeToggleProps { className?: string; } export function ThemeToggle({ className }: ThemeToggleProps) { const { theme, setTheme } = useTheme(); return ( <Button ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/landing/handlebars.tsx
apps/web/src/components/landing/handlebars.tsx
"use client"; import { motion, useMotionTemplate, useMotionValue, useMotionValueEvent, useTransform, } from "motion/react"; import { type PropsWithChildren, useEffect, useRef, useState } from "react"; type HandlebarsProps = PropsWithChildren; export function Handlebars({ children }: HandlebarsProps) { co...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/landing/hero.tsx
apps/web/src/components/landing/hero.tsx
"use client"; import { motion } from "motion/react"; import { Button } from "../ui/button"; import { SponsorButton } from "../ui/sponsor-button"; import { VercelIcon } from "../icons"; import { ArrowRight } from "lucide-react"; import Image from "next/image"; import { Handlebars } from "./handlebars"; import Link fro...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/editor-header.tsx
apps/web/src/components/editor/editor-header.tsx
"use client"; import { Button } from "../ui/button"; import { ChevronDown, ArrowLeft, SquarePen, Trash } from "lucide-react"; import { HeaderBase } from "../header-base"; import { useProjectStore } from "@/stores/project-store"; import { KeyboardShortcutsHelp } from "../keyboard-shortcuts-help"; import { useState } fr...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/onboarding.tsx
apps/web/src/components/editor/onboarding.tsx
"use client"; import { Dialog, DialogContent, DialogTitle } from "../ui/dialog"; import { Button } from "../ui/button"; import { ArrowRightIcon } from "lucide-react"; import { useState, useEffect } from "react"; import ReactMarkdown from "react-markdown"; export function Onboarding() { const [step, setStep] = useSt...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/panel-preset-selector.tsx
apps/web/src/components/editor/panel-preset-selector.tsx
"use client"; import { Button } from "../ui/button"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "../ui/dropdown-menu"; import { ChevronDown, RotateCcw, LayoutPanelTop } from "lucide-react"; import { usePanelStore, type PanelPreset } from "...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/layout-guide-overlay.tsx
apps/web/src/components/editor/layout-guide-overlay.tsx
"use client"; import { useEditorStore } from "@/stores/editor-store"; import Image from "next/image"; function TikTokGuide() { return ( <div className="absolute inset-0 pointer-events-none"> <Image src="/platform-guides/tiktok-blueprint.png" alt="TikTok layout guide" className="abs...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/snap-indicator.tsx
apps/web/src/components/editor/snap-indicator.tsx
"use client"; import { SnapPoint } from "@/hooks/use-timeline-snapping"; import { TIMELINE_CONSTANTS } from "@/constants/timeline-constants"; import type { TimelineTrack } from "@/types/timeline"; import { useState, useEffect } from "react"; interface SnapIndicatorProps { snapPoint: SnapPoint | null; zoomLevel: n...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/audio-waveform.tsx
apps/web/src/components/editor/audio-waveform.tsx
import React, { useEffect, useRef, useState } from "react"; import WaveSurfer from "wavesurfer.js"; interface AudioWaveformProps { audioUrl: string; height?: number; className?: string; } const AudioWaveform: React.FC<AudioWaveformProps> = ({ audioUrl, height = 32, className = "", }) => { const waveform...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/speed-control.tsx
apps/web/src/components/editor/speed-control.tsx
import { Slider } from "../ui/slider"; import { Label } from "../ui/label"; import { Button } from "../ui/button"; import { usePlaybackStore } from "@/stores/playback-store"; const SPEED_PRESETS = [ { label: "0.5x", value: 0.5 }, { label: "1x", value: 1.0 }, { label: "1.5x", value: 1.5 }, { label: "2x", value:...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/scenes-view.tsx
apps/web/src/components/editor/scenes-view.tsx
"use client"; import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; import { Button } from "@/components/ui/button"; import { useSceneStore } from "@/stores/scene-store"; import { Check, ListCheck, Trash2 } from "lucide-react"; import { cn } ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/panel-base-view.tsx
apps/web/src/components/editor/panel-base-view.tsx
import { ScrollArea } from "@/components/ui/scroll-area"; import { Separator } from "@/components/ui/separator"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { cn } from "@/lib/utils"; interface PanelBaseViewProps { children?: React.ReactNode; defaultTab?: string; value...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/selection-box.tsx
apps/web/src/components/editor/selection-box.tsx
"use client"; import { useEffect, useRef } from "react"; interface SelectionBoxProps { startPos: { x: number; y: number } | null; currentPos: { x: number; y: number } | null; containerRef: React.RefObject<HTMLElement>; isActive: boolean; } export function SelectionBox({ startPos, currentPos, containerR...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/export-button.tsx
apps/web/src/components/editor/export-button.tsx
"use client"; import { useState } from "react"; import { TransitionUpIcon } from "../icons"; import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover"; import { Button } from "../ui/button"; import { Label } from "../ui/label"; import { RadioGroup, RadioGroupItem } from "../ui/radio-group"; import { Prog...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/preview-panel.tsx
apps/web/src/components/editor/preview-panel.tsx
"use client"; import { useTimelineStore } from "@/stores/timeline-store"; import { TimelineElement, TimelineTrack } from "@/types/timeline"; import { useMediaStore } from "@/stores/media-store"; import { MediaFile } from "@/types/media"; import { usePlaybackStore } from "@/stores/playback-store"; import { useEditorSto...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
true
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/properties-panel/audio-properties.tsx
apps/web/src/components/editor/properties-panel/audio-properties.tsx
import { MediaElement } from "@/types/timeline"; export function AudioProperties({ element }: { element: MediaElement }) { return <div className="space-y-4 p-5">Audio properties</div>; }
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/properties-panel/text-properties.tsx
apps/web/src/components/editor/properties-panel/text-properties.tsx
import { Textarea } from "@/components/ui/textarea"; import { FontPicker } from "@/components/ui/font-picker"; import { FontFamily } from "@/constants/font-constants"; import { TextElement } from "@/types/timeline"; import { useTimelineStore } from "@/stores/timeline-store"; import { Slider } from "@/components/ui/slid...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/properties-panel/index.tsx
apps/web/src/components/editor/properties-panel/index.tsx
"use client"; import { useMediaStore } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { ScrollArea } from "../../ui/scroll-area"; import { AudioProperties } from "./audio-properties"; import { MediaProperties } from "./media-properties"; import { TextProperties } from "...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/properties-panel/media-properties.tsx
apps/web/src/components/editor/properties-panel/media-properties.tsx
import { MediaElement } from "@/types/timeline"; export function MediaProperties({ element }: { element: MediaElement }) { return <div className="space-y-4 p-5">Media properties</div>; }
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/properties-panel/property-item.tsx
apps/web/src/components/editor/properties-panel/property-item.tsx
import { cn } from "@/lib/utils"; import { ChevronDown } from "lucide-react"; import { useState } from "react"; interface PropertyItemProps { direction?: "row" | "column"; children: React.ReactNode; className?: string; } export function PropertyItem({ direction = "row", children, className, }: PropertyIte...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/index.tsx
apps/web/src/components/editor/media-panel/index.tsx
"use client"; import { TabBar } from "./tabbar"; import { MediaView } from "./views/media"; import { useMediaPanelStore, Tab } from "./store"; import { TextView } from "./views/text"; import { SoundsView } from "./views/sounds"; import { StickersView } from "./views/stickers"; import { Separator } from "@/components/u...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/store.ts
apps/web/src/components/editor/media-panel/store.ts
import { CaptionsIcon, ArrowLeftRightIcon, SparklesIcon, StickerIcon, MusicIcon, VideoIcon, BlendIcon, SlidersHorizontalIcon, LucideIcon, TypeIcon, SettingsIcon, } from "lucide-react"; import { create } from "zustand"; export type Tab = | "media" | "sounds" | "text" | "stickers" | "effe...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/tabbar.tsx
apps/web/src/components/editor/media-panel/tabbar.tsx
"use client"; import { cn } from "@/lib/utils"; import { Tab, tabs, useMediaPanelStore } from "./store"; import { Tooltip, TooltipContent, TooltipTrigger, } from "@/components/ui/tooltip"; import { useEffect, useRef, useState } from "react"; export function TabBar() { const { activeTab, setActiveTab } = useMe...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/drag-overlay.tsx
apps/web/src/components/editor/media-panel/drag-overlay.tsx
import { Upload, Plus, Image } from "lucide-react"; import { Button } from "@/components/ui/button"; interface MediaDragOverlayProps { isVisible: boolean; isProcessing?: boolean; progress?: number; onClick?: () => void; isEmptyState?: boolean; } export function MediaDragOverlay({ isVisible, isProcessing...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/media.tsx
apps/web/src/components/editor/media-panel/views/media.tsx
"use client"; import { useDragDrop } from "@/hooks/use-drag-drop"; import { processMediaFiles } from "@/lib/media-processing"; import { useMediaStore } from "@/stores/media-store"; import { MediaFile } from "@/types/media"; import { ArrowDown01, CloudUpload, Grid2X2, Image, List, Loader2, Music, Video,...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/text.tsx
apps/web/src/components/editor/media-panel/views/text.tsx
import { DraggableMediaItem } from "@/components/ui/draggable-item"; import { PanelBaseView as BaseView } from "@/components/editor/panel-base-view"; import { useTimelineStore } from "@/stores/timeline-store"; import { DEFAULT_TEXT_ELEMENT } from "@/constants/text-constants"; export function TextView() { return ( ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/sounds.tsx
apps/web/src/components/editor/media-panel/views/sounds.tsx
"use client"; import { Input } from "@/components/ui/input"; import { useState, useMemo, useEffect } from "react"; import { Separator } from "@/components/ui/separator"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/stickers.tsx
apps/web/src/components/editor/media-panel/views/stickers.tsx
"use client"; import { useEffect, useState, useMemo } from "react"; import { useStickersStore } from "@/stores/stickers-store"; import { useMediaStore } from "@/stores/media-store"; import { useProjectStore } from "@/stores/project-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { usePlaybac...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/captions.tsx
apps/web/src/components/editor/media-panel/views/captions.tsx
import { Button } from "@/components/ui/button"; import { PropertyGroup } from "../../properties-panel/property-item"; import { PanelBaseView as BaseView } from "@/components/editor/panel-base-view"; import { Language, LanguageSelect } from "@/components/language-select"; import { useState, useRef, useEffect } from "re...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/media-panel/views/settings.tsx
apps/web/src/components/editor/media-panel/views/settings.tsx
"use client"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; import { PanelBaseView as BaseView } from "@/components/editor/panel-base-view"; import { PropertyItem, PropertyItemLabel, PropertyItemValue, PropertyGroup, } from "../../properties-...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/timeline/timeline-marker.tsx
apps/web/src/components/editor/timeline/timeline-marker.tsx
"use client"; import { cn } from "@/lib/utils"; import { TIMELINE_CONSTANTS } from "@/constants/timeline-constants"; interface TimelineMarkerProps { time: number; zoomLevel: number; interval: number; isMainMarker: boolean; } export function TimelineMarker({ time, zoomLevel, interval, isMainMarker, }:...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/timeline/timeline-track.tsx
apps/web/src/components/editor/timeline/timeline-track.tsx
"use client"; import { useRef, useState, useEffect } from "react"; import { useTimelineStore } from "@/stores/timeline-store"; import { useMediaStore } from "@/stores/media-store"; import { toast } from "sonner"; import { processMediaFiles } from "@/lib/media-processing"; import { TimelineElement } from "./timeline-el...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
true
OpenCut-app/OpenCut
https://github.com/OpenCut-app/OpenCut/blob/0173db99448d1c4c6415dcf15272e17551b48b04/apps/web/src/components/editor/timeline/timeline-element.tsx
apps/web/src/components/editor/timeline/timeline-element.tsx
"use client"; import { Scissors, Trash2, Copy, Search, RefreshCw, EyeOff, Eye, Volume2, VolumeX, } from "lucide-react"; import { useMediaStore } from "@/stores/media-store"; import { useTimelineStore } from "@/stores/timeline-store"; import { usePlaybackStore } from "@/stores/playback-store"; import ...
typescript
MIT
0173db99448d1c4c6415dcf15272e17551b48b04
2026-01-04T15:42:54.730143Z
false