🎥 Make videos programmatically with React
new convert.remotion.dev
Jonny Burgerd2113866732e
diff --git a/packages/convert/app/components/ContainerOverview.tsx b/packages/convert/app/components/ContainerOverview.tsxindex 7856e9909c..cb0726662c 100644--- a/packages/convert/app/components/ContainerOverview.tsx+++ b/packages/convert/app/components/ContainerOverview.tsx@@ -37,7 +37,9 @@ export const ContainerOverview: React.FC<{<Table><TableBody><TableRow>- <TableCell colSpan={3}>Size</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Size+ </TableCell><TableCell className="text-right">{size === null ? (<Skeleton className="h-3 w-[100px] inline-block" />@@ -47,7 +49,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Container</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Container+ </TableCell><TableCell className="text-right">{container ? (<>{String(container)}</>@@ -57,7 +61,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Duration</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Duration+ </TableCell><TableCell className="text-right">{durationInSeconds === null ? (<Skeleton className="h-3 w-[100px] inline-block" />@@ -67,7 +73,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Dimensions</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Dimensions+ </TableCell><TableCell className="text-right">{dimensions === null ? (<Skeleton className="h-3 w-[100px] inline-block" />@@ -79,7 +87,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Frame Rate</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Frame Rate+ </TableCell><TableCell className="text-right">{fps === undefined ? (<Skeleton className="h-3 w-[100px] inline-block" />@@ -91,7 +101,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Video Codec</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Video Codec+ </TableCell><TableCell className="text-right">{videoCodec === null ? (<Skeleton className="h-3 w-[100px] inline-block" />@@ -101,7 +113,9 @@ export const ContainerOverview: React.FC<{</TableCell></TableRow><TableRow>- <TableCell colSpan={3}>Audio Codec</TableCell>+ <TableCell className="font-brand" colSpan={3}>+ Audio Codec+ </TableCell><TableCell className="text-right">{audioCodec === null ? (<Skeleton className="h-3 w-[100px] inline-block" />diff --git a/packages/convert/app/components/DropFileBox.tsx b/packages/convert/app/components/DropFileBox.tsxnew file mode 100644index 0000000000..426762337f--- /dev/null+++ b/packages/convert/app/components/DropFileBox.tsx@@ -0,0 +1,6 @@+import React from 'react';+import {Card} from './ui/card';++export const DropFileBox: React.FC = () => {+ return <Card className="w-[400px] h-[300px]">hi</Card>;+};diff --git a/packages/convert/app/components/FileAvailable.tsx b/packages/convert/app/components/FileAvailable.tsxnew file mode 100644index 0000000000..10dfe4ad6a--- /dev/null+++ b/packages/convert/app/components/FileAvailable.tsx@@ -0,0 +1,30 @@+import React, {useCallback, useState} from 'react';+import ConvertUI from './ConvertUi';+import {Probe} from './Probe';++export const FileAvailable: React.FC<{+ src: string;+ setSrc: React.Dispatch<React.SetStateAction<string | null>>;+}> = ({src, setSrc}) => {+ const [probeDetails, setProbeDetails] = useState(false);++ const clear = useCallback(() => {+ setSrc(null);+ }, []);++ return (+ <>+ <div>+ <a onClick={clear}>Choose another file</a>+ <div className="gap-16 flex flex-row items-center justify-center">+ <Probe+ src={src}+ probeDetails={probeDetails}+ setProbeDetails={setProbeDetails}+ />+ {probeDetails ? null : <ConvertUI src={src} />}+ </div>+ </div>+ </>+ );+};diff --git a/packages/convert/app/components/PickFile.tsx b/packages/convert/app/components/PickFile.tsxnew file mode 100644index 0000000000..20de624bdd--- /dev/null+++ b/packages/convert/app/components/PickFile.tsx@@ -0,0 +1,23 @@+import React, {useCallback} from 'react';+import {DropFileBox} from './DropFileBox';++export const PickFile: React.FC<{+ setSrc: (str: string) => void;+}> = ({setSrc}) => {+ const onSampleFile = useCallback(() => {+ setSrc(+ 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',+ );+ }, []);++ return (+ <div className="text-center items-center justify-center flex flex-col">+ <h1 className="text-center text-4xl font-brand font-bold">+ Fast video conversion in the browser+ </h1>+ <div className="h-12"></div>+ <DropFileBox />+ or <a onClick={onSampleFile}>Select a sample file</a>+ </div>+ );+};diff --git a/packages/convert/app/components/Probe.tsx b/packages/convert/app/components/Probe.tsxindex e0274a38da..8560c79867 100644--- a/packages/convert/app/components/Probe.tsx+++ b/packages/convert/app/components/Probe.tsx@@ -16,7 +16,6 @@ import {VideoTrackOverview} from './VideoTrackOverview';import {Button} from './ui/button';import {Card,- CardContent,CardDescription,CardFooter,CardHeader,@@ -236,7 +235,7 @@ export const Probe: React.FC<{}><VideoThumbnail thumbnail={thumbnail} />- <CardHeader>+ <CardHeader className="border-b-2 border-black"><CardTitle title={name ?? undefined}>{name ? name : <Skeleton className="h-5 w-[220px] inline-block" />}</CardTitle>@@ -255,24 +254,22 @@ export const Probe: React.FC<{/></div>) : null}- <ScrollArea className="flex-1">- <CardContent className="flex flex-1 flex-col">- {selectedTrack === null ? (- <ContainerOverview- container={container ?? null}- dimensions={dimensions ?? null}- videoCodec={videoCodec ?? null}- size={size ?? null}- durationInSeconds={durationInSeconds}- audioCodec={audioCodec ?? null}- fps={fps}- />- ) : selectedTrack.type === 'video' ? (- <VideoTrackOverview track={selectedTrack} />- ) : selectedTrack.type === 'audio' ? (- <AudioTrackOverview track={selectedTrack} />- ) : null}- </CardContent>+ <ScrollArea className="flex-1 h-[300px]">+ {selectedTrack === null ? (+ <ContainerOverview+ container={container ?? null}+ dimensions={dimensions ?? null}+ videoCodec={videoCodec ?? null}+ size={size ?? null}+ durationInSeconds={durationInSeconds}+ audioCodec={audioCodec ?? null}+ fps={fps}+ />+ ) : selectedTrack.type === 'video' ? (+ <VideoTrackOverview track={selectedTrack} />+ ) : selectedTrack.type === 'audio' ? (+ <AudioTrackOverview track={selectedTrack} />+ ) : null}</ScrollArea><Separator orientation="horizontal" /><CardFooter className="flex flex-row items-center justify-center pb-3 pt-3">diff --git a/packages/convert/app/components/SourceLabel.tsx b/packages/convert/app/components/SourceLabel.tsxindex 8e3d5ca359..c5323e970b 100644--- a/packages/convert/app/components/SourceLabel.tsx+++ b/packages/convert/app/components/SourceLabel.tsx@@ -20,7 +20,7 @@ export const SourceLabel: React.FC<{href={src}title={src}target="_blank"- className="font-semibold hover:underline"+ className="font-semibold hover:underline font-brand">{origin}</a>diff --git a/packages/convert/app/components/VideoThumbnail.tsx b/packages/convert/app/components/VideoThumbnail.tsxindex cf9b053087..5c41e6918f 100644--- a/packages/convert/app/components/VideoThumbnail.tsx+++ b/packages/convert/app/components/VideoThumbnail.tsx@@ -37,6 +37,7 @@ export const VideoThumbnail: React.FC<{width: THUMBNAIL_WIDTH,aspectRatio: '16 / 9',}}+ className="border-b-2 border-black"/>);};diff --git a/packages/convert/app/components/ui/card.tsx b/packages/convert/app/components/ui/card.tsxindex 3f29afb427..2d713539cc 100644--- a/packages/convert/app/components/ui/card.tsx+++ b/packages/convert/app/components/ui/card.tsx@@ -9,7 +9,7 @@ const Card = React.forwardRef<<divref={ref}className={cn(- 'rounded-lg border bg-card text-card-foreground shadow-sm',+ 'rounded-lg border-2 border-black bg-card text-card-foreground border-b-4',className,)}{...props}@@ -23,7 +23,7 @@ const CardHeader = React.forwardRef<>(({className, ...props}, ref) => (<divref={ref}- className={cn('flex flex-col space-y-1.5 p-6', className)}+ className={cn('flex flex-col space-y-1.5 p-4', className)}{...props}/>));@@ -36,7 +36,7 @@ const CardTitle = React.forwardRef<<h3ref={ref}className={cn(- 'text-2xl font-semibold tracking-tight text-ellipsis overflow-x-hidden',+ 'text-2xl font-semibold tracking-tight text-ellipsis font-brand overflow-x-hidden',className,)}{...props}diff --git a/packages/convert/app/components/ui/select.tsx b/packages/convert/app/components/ui/select.tsxindex f69b6737f2..87a68cce43 100644--- a/packages/convert/app/components/ui/select.tsx+++ b/packages/convert/app/components/ui/select.tsx@@ -1,158 +1,158 @@-import * as React from "react"-import * as SelectPrimitive from "@radix-ui/react-select"-import { Check, ChevronDown, ChevronUp } from "lucide-react"+import * as SelectPrimitive from '@radix-ui/react-select';+import {Check, ChevronDown, ChevronUp} from 'lucide-react';+import * as React from 'react';-import { cn } from "~/lib/utils"+import {cn} from '~/lib/utils';-const Select = SelectPrimitive.Root+const Select = SelectPrimitive.Root;-const SelectGroup = SelectPrimitive.Group+const SelectGroup = SelectPrimitive.Group;-const SelectValue = SelectPrimitive.Value+const SelectValue = SelectPrimitive.Value;const SelectTrigger = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.Trigger>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>->(({ className, children, ...props }, ref) => (- <SelectPrimitive.Trigger- ref={ref}- className={cn(- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",- className- )}- {...props}- >- {children}- <SelectPrimitive.Icon asChild>- <ChevronDown className="h-4 w-4 opacity-50" />- </SelectPrimitive.Icon>- </SelectPrimitive.Trigger>-))-SelectTrigger.displayName = SelectPrimitive.Trigger.displayName+ React.ElementRef<typeof SelectPrimitive.Trigger>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>+>(({className, children, ...props}, ref) => (+ <SelectPrimitive.Trigger+ ref={ref}+ className={cn(+ 'flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-background px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',+ className,+ )}+ {...props}+ >+ {children}+ <SelectPrimitive.Icon asChild>+ <ChevronDown className="h-4 w-4 opacity-50" />+ </SelectPrimitive.Icon>+ </SelectPrimitive.Trigger>+));+SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;const SelectScrollUpButton = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>->(({ className, ...props }, ref) => (- <SelectPrimitive.ScrollUpButton- ref={ref}- className={cn(- "flex cursor-default items-center justify-center py-1",- className- )}- {...props}- >- <ChevronUp className="h-4 w-4" />- </SelectPrimitive.ScrollUpButton>-))-SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>+>(({className, ...props}, ref) => (+ <SelectPrimitive.ScrollUpButton+ ref={ref}+ className={cn(+ 'flex cursor-default items-center justify-center py-1',+ className,+ )}+ {...props}+ >+ <ChevronUp className="h-4 w-4" />+ </SelectPrimitive.ScrollUpButton>+));+SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;const SelectScrollDownButton = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>->(({ className, ...props }, ref) => (- <SelectPrimitive.ScrollDownButton- ref={ref}- className={cn(- "flex cursor-default items-center justify-center py-1",- className- )}- {...props}- >- <ChevronDown className="h-4 w-4" />- </SelectPrimitive.ScrollDownButton>-))+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>+>(({className, ...props}, ref) => (+ <SelectPrimitive.ScrollDownButton+ ref={ref}+ className={cn(+ 'flex cursor-default items-center justify-center py-1',+ className,+ )}+ {...props}+ >+ <ChevronDown className="h-4 w-4" />+ </SelectPrimitive.ScrollDownButton>+));SelectScrollDownButton.displayName =- SelectPrimitive.ScrollDownButton.displayName+ SelectPrimitive.ScrollDownButton.displayName;const SelectContent = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.Content>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>->(({ className, children, position = "popper", ...props }, ref) => (- <SelectPrimitive.Portal>- <SelectPrimitive.Content- ref={ref}- className={cn(- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",- position === "popper" &&- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",- className- )}- position={position}- {...props}- >- <SelectScrollUpButton />- <SelectPrimitive.Viewport- className={cn(- "p-1",- position === "popper" &&- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"- )}- >- {children}- </SelectPrimitive.Viewport>- <SelectScrollDownButton />- </SelectPrimitive.Content>- </SelectPrimitive.Portal>-))-SelectContent.displayName = SelectPrimitive.Content.displayName+ React.ElementRef<typeof SelectPrimitive.Content>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>+>(({className, children, position = 'popper', ...props}, ref) => (+ <SelectPrimitive.Portal>+ <SelectPrimitive.Content+ ref={ref}+ className={cn(+ ' border-2 border-black relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md font-brand bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',+ position === 'popper' &&+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',+ className,+ )}+ position={position}+ {...props}+ >+ <SelectScrollUpButton />+ <SelectPrimitive.Viewport+ className={cn(+ 'p-1',+ position === 'popper' &&+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',+ )}+ >+ {children}+ </SelectPrimitive.Viewport>+ <SelectScrollDownButton />+ </SelectPrimitive.Content>+ </SelectPrimitive.Portal>+));+SelectContent.displayName = SelectPrimitive.Content.displayName;const SelectLabel = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.Label>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>->(({ className, ...props }, ref) => (- <SelectPrimitive.Label- ref={ref}- className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}- {...props}- />-))-SelectLabel.displayName = SelectPrimitive.Label.displayName+ React.ElementRef<typeof SelectPrimitive.Label>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>+>(({className, ...props}, ref) => (+ <SelectPrimitive.Label+ ref={ref}+ className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}+ {...props}+ />+));+SelectLabel.displayName = SelectPrimitive.Label.displayName;const SelectItem = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.Item>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>->(({ className, children, ...props }, ref) => (- <SelectPrimitive.Item- ref={ref}- className={cn(- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",- className- )}- {...props}- >- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">- <SelectPrimitive.ItemIndicator>- <Check className="h-4 w-4" />- </SelectPrimitive.ItemIndicator>- </span>+ React.ElementRef<typeof SelectPrimitive.Item>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>+>(({className, children, ...props}, ref) => (+ <SelectPrimitive.Item+ ref={ref}+ className={cn(+ 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',+ className,+ )}+ {...props}+ >+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">+ <SelectPrimitive.ItemIndicator>+ <Check className="h-4 w-4" />+ </SelectPrimitive.ItemIndicator>+ </span>- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>- </SelectPrimitive.Item>-))-SelectItem.displayName = SelectPrimitive.Item.displayName+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>+ </SelectPrimitive.Item>+));+SelectItem.displayName = SelectPrimitive.Item.displayName;const SelectSeparator = React.forwardRef<- React.ElementRef<typeof SelectPrimitive.Separator>,- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>->(({ className, ...props }, ref) => (- <SelectPrimitive.Separator- ref={ref}- className={cn("-mx-1 my-1 h-px bg-muted", className)}- {...props}- />-))-SelectSeparator.displayName = SelectPrimitive.Separator.displayName+ React.ElementRef<typeof SelectPrimitive.Separator>,+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>+>(({className, ...props}, ref) => (+ <SelectPrimitive.Separator+ ref={ref}+ className={cn('-mx-1 my-1 h-px bg-muted', className)}+ {...props}+ />+));+SelectSeparator.displayName = SelectPrimitive.Separator.displayName;export {- Select,- SelectGroup,- SelectValue,- SelectTrigger,- SelectContent,- SelectLabel,- SelectItem,- SelectSeparator,- SelectScrollUpButton,- SelectScrollDownButton,-}+ Select,+ SelectContent,+ SelectGroup,+ SelectItem,+ SelectLabel,+ SelectScrollDownButton,+ SelectScrollUpButton,+ SelectSeparator,+ SelectTrigger,+ SelectValue,+};diff --git a/packages/convert/app/components/ui/separator.tsx b/packages/convert/app/components/ui/separator.tsxindex 464677ff8c..c8fa64ff18 100644--- a/packages/convert/app/components/ui/separator.tsx+++ b/packages/convert/app/components/ui/separator.tsx@@ -1,29 +1,29 @@-import * as React from "react"-import * as SeparatorPrimitive from "@radix-ui/react-separator"+import * as SeparatorPrimitive from '@radix-ui/react-separator';+import * as React from 'react';-import { cn } from "~/lib/utils"+import {cn} from '~/lib/utils';const Separator = React.forwardRef<- React.ElementRef<typeof SeparatorPrimitive.Root>,- React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>+ React.ElementRef<typeof SeparatorPrimitive.Root>,+ React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>>(- (- { className, orientation = "horizontal", decorative = true, ...props },- ref- ) => (- <SeparatorPrimitive.Root- ref={ref}- decorative={decorative}- orientation={orientation}- className={cn(- "shrink-0 bg-border",- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",- className- )}- {...props}- />- )-)-Separator.displayName = SeparatorPrimitive.Root.displayName+ (+ {className, orientation = 'horizontal', decorative = true, ...props},+ ref,+ ) => (+ <SeparatorPrimitive.Root+ ref={ref}+ decorative={decorative}+ orientation={orientation}+ className={cn(+ 'shrink-0 bg-black ',+ orientation === 'horizontal' ? 'h-[2px] w-full' : 'h-full w-[2px]',+ className,+ )}+ {...props}+ />+ ),+);+Separator.displayName = SeparatorPrimitive.Root.displayName;-export { Separator }+export {Separator};diff --git a/packages/convert/app/components/ui/table.tsx b/packages/convert/app/components/ui/table.tsxindex b3b371107a..0c7cb0b5b7 100644--- a/packages/convert/app/components/ui/table.tsx+++ b/packages/convert/app/components/ui/table.tsx@@ -1,117 +1,117 @@-import * as React from "react"+import * as React from 'react';-import { cn } from "~/lib/utils"+import {cn} from '~/lib/utils';const Table = React.forwardRef<- HTMLTableElement,- React.HTMLAttributes<HTMLTableElement>->(({ className, ...props }, ref) => (- <div className="relative w-full overflow-auto">- <table- ref={ref}- className={cn("w-full caption-bottom text-sm", className)}- {...props}- />- </div>-))-Table.displayName = "Table"+ HTMLTableElement,+ React.HTMLAttributes<HTMLTableElement>+>(({className, ...props}, ref) => (+ <div className="relative w-full overflow-auto">+ <table+ ref={ref}+ className={cn('w-full caption-bottom text-sm', className)}+ {...props}+ />+ </div>+));+Table.displayName = 'Table';const TableHeader = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />-))-TableHeader.displayName = "TableHeader"+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({className, ...props}, ref) => (+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />+));+TableHeader.displayName = 'TableHeader';const TableBody = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <tbody- ref={ref}- className={cn("[&_tr:last-child]:border-0", className)}- {...props}- />-))-TableBody.displayName = "TableBody"+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({className, ...props}, ref) => (+ <tbody+ ref={ref}+ className={cn('[&_tr:last-child]:border-0', className)}+ {...props}+ />+));+TableBody.displayName = 'TableBody';const TableFooter = React.forwardRef<- HTMLTableSectionElement,- React.HTMLAttributes<HTMLTableSectionElement>->(({ className, ...props }, ref) => (- <tfoot- ref={ref}- className={cn(- "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",- className- )}- {...props}- />-))-TableFooter.displayName = "TableFooter"+ HTMLTableSectionElement,+ React.HTMLAttributes<HTMLTableSectionElement>+>(({className, ...props}, ref) => (+ <tfoot+ ref={ref}+ className={cn(+ 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',+ className,+ )}+ {...props}+ />+));+TableFooter.displayName = 'TableFooter';const TableRow = React.forwardRef<- HTMLTableRowElement,- React.HTMLAttributes<HTMLTableRowElement>->(({ className, ...props }, ref) => (- <tr- ref={ref}- className={cn(- "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",- className- )}- {...props}- />-))-TableRow.displayName = "TableRow"+ HTMLTableRowElement,+ React.HTMLAttributes<HTMLTableRowElement>+>(({className, ...props}, ref) => (+ <tr+ ref={ref}+ className={cn(+ 'border-b-2 border-black transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',+ className,+ )}+ {...props}+ />+));+TableRow.displayName = 'TableRow';const TableHead = React.forwardRef<- HTMLTableCellElement,- React.ThHTMLAttributes<HTMLTableCellElement>->(({ className, ...props }, ref) => (- <th- ref={ref}- className={cn(- "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",- className- )}- {...props}- />-))-TableHead.displayName = "TableHead"+ HTMLTableCellElement,+ React.ThHTMLAttributes<HTMLTableCellElement>+>(({className, ...props}, ref) => (+ <th+ ref={ref}+ className={cn(+ 'h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0',+ className,+ )}+ {...props}+ />+));+TableHead.displayName = 'TableHead';const TableCell = React.forwardRef<- HTMLTableCellElement,- React.TdHTMLAttributes<HTMLTableCellElement>->(({ className, ...props }, ref) => (- <td- ref={ref}- className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}- {...props}- />-))-TableCell.displayName = "TableCell"+ HTMLTableCellElement,+ React.TdHTMLAttributes<HTMLTableCellElement>+>(({className, ...props}, ref) => (+ <td+ ref={ref}+ className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}+ {...props}+ />+));+TableCell.displayName = 'TableCell';const TableCaption = React.forwardRef<- HTMLTableCaptionElement,- React.HTMLAttributes<HTMLTableCaptionElement>->(({ className, ...props }, ref) => (- <caption- ref={ref}- className={cn("mt-4 text-sm text-muted-foreground", className)}- {...props}- />-))-TableCaption.displayName = "TableCaption"+ HTMLTableCaptionElement,+ React.HTMLAttributes<HTMLTableCaptionElement>+>(({className, ...props}, ref) => (+ <caption+ ref={ref}+ className={cn('mt-4 text-sm text-muted-foreground', className)}+ {...props}+ />+));+TableCaption.displayName = 'TableCaption';export {- Table,- TableHeader,- TableBody,- TableFooter,- TableHead,- TableRow,- TableCell,- TableCaption,-}+ Table,+ TableBody,+ TableCaption,+ TableCell,+ TableFooter,+ TableHead,+ TableHeader,+ TableRow,+};diff --git a/packages/convert/app/routes/_index.tsx b/packages/convert/app/routes/_index.tsxindex ee6b034c15..9811b7d1c2 100644--- a/packages/convert/app/routes/_index.tsx+++ b/packages/convert/app/routes/_index.tsx@@ -1,7 +1,7 @@import type {MetaFunction} from '@remix-run/node';import {useState} from 'react';-import ConvertUI from '~/components/ConvertUi';-import {Probe} from '~/components/Probe';+import {FileAvailable} from '~/components/FileAvailable';+import {PickFile} from '~/components/PickFile';export const meta: MetaFunction = () => {return [@@ -10,20 +10,16 @@ export const meta: MetaFunction = () => {];};-const src =- 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4';-const Index = () => {- const [probeDetails, setProbeDetails] = useState(false);+ const [src, setSrc] = useState<string | null>(null);return (- <div className="font-sans p-4 flex justify-center items-center h-screen bg-slate-50 gap-16">- <Probe- src={src}- probeDetails={probeDetails}- setProbeDetails={setProbeDetails}- />- {probeDetails ? null : <ConvertUI src={src} />}+ <div className="font-sans p-4 flex justify-center items-center h-screen bg-slate-50 ">+ {src ? (+ <FileAvailable src={src} setSrc={setSrc} />+ ) : (+ <PickFile setSrc={setSrc} />+ )}</div>);};diff --git a/packages/convert/app/tailwind.css b/packages/convert/app/tailwind.cssindex 4937c0424c..dc9eb3002e 100644--- a/packages/convert/app/tailwind.css+++ b/packages/convert/app/tailwind.css@@ -1,66 +1,88 @@@tailwind base;@tailwind components;@tailwind utilities;+@layer base {- :root {- --background: 0 0% 100%;- --foreground: 222.2 84% 4.9%;- --card: 0 0% 100%;- --card-foreground: 222.2 84% 4.9%;- --popover: 0 0% 100%;- --popover-foreground: 222.2 84% 4.9%;- --primary: 222.2 47.4% 11.2%;- --primary-foreground: 210 40% 98%;- --secondary: 210 40% 96.1%;- --secondary-foreground: 222.2 47.4% 11.2%;- --muted: 210 40% 96.1%;- --muted-foreground: 215.4 16.3% 46.9%;- --accent: 210 40% 96.1%;- --accent-foreground: 222.2 47.4% 11.2%;- --destructive: 0 84.2% 60.2%;- --destructive-foreground: 210 40% 98%;- --border: 214.3 31.8% 91.4%;- --input: 214.3 31.8% 91.4%;- --ring: 222.2 84% 4.9%;- --chart-1: 12 76% 61%;- --chart-2: 173 58% 39%;- --chart-3: 197 37% 24%;- --chart-4: 43 74% 66%;- --chart-5: 27 87% 67%;- --radius: 0.5rem- }- .dark {- --background: 222.2 84% 4.9%;- --foreground: 210 40% 98%;- --card: 222.2 84% 4.9%;- --card-foreground: 210 40% 98%;- --popover: 222.2 84% 4.9%;- --popover-foreground: 210 40% 98%;- --primary: 210 40% 98%;- --primary-foreground: 222.2 47.4% 11.2%;- --secondary: 217.2 32.6% 17.5%;- --secondary-foreground: 210 40% 98%;- --muted: 217.2 32.6% 17.5%;- --muted-foreground: 215 20.2% 65.1%;- --accent: 217.2 32.6% 17.5%;- --accent-foreground: 210 40% 98%;- --destructive: 0 62.8% 30.6%;- --destructive-foreground: 210 40% 98%;- --border: 217.2 32.6% 17.5%;- --input: 217.2 32.6% 17.5%;- --ring: 212.7 26.8% 83.9%;- --chart-1: 220 70% 50%;- --chart-2: 160 60% 45%;- --chart-3: 30 80% 55%;- --chart-4: 280 65% 60%;- --chart-5: 340 75% 55%- }+ @font-face {+ font-family: 'GTPlanar';+ src: url('/gt-planar-bold.woff2') format('woff2');+ font-weight: 700;+ font-style: normal;+ font-feature-settings: 'ss03' on;+ }+ @font-face {+ font-family: 'GTPlanar';+ src: url('/gt-planar-medium.woff2') format('woff2');+ font-weight: 500;+ font-style: normal;+ font-feature-settings: 'ss03' on;+ }+ @font-face {+ font-family: 'GTPlanar';+ src: url('/gt-planar-regular.woff2') format('woff2');+ font-weight: 400;+ font-style: normal;+ font-feature-settings: 'ss03' on;+ }+ :root {+ --background: 0 0% 100%;+ --foreground: 222.2 84% 4.9%;+ --card: 0 0% 100%;+ --card-foreground: 222.2 84% 4.9%;+ --popover: 0 0% 100%;+ --popover-foreground: 222.2 84% 4.9%;+ --primary: 222.2 47.4% 11.2%;+ --primary-foreground: 210 40% 98%;+ --secondary: 210 40% 96.1%;+ --secondary-foreground: 222.2 47.4% 11.2%;+ --muted: 210 40% 96.1%;+ --muted-foreground: 215.4 16.3% 46.9%;+ --accent: 210 40% 96.1%;+ --accent-foreground: 222.2 47.4% 11.2%;+ --destructive: 0 84.2% 60.2%;+ --destructive-foreground: 210 40% 98%;+ --border: 214.3 31.8% 91.4%;+ --input: 214.3 31.8% 91.4%;+ --ring: 222.2 84% 4.9%;+ --chart-1: 12 76% 61%;+ --chart-2: 173 58% 39%;+ --chart-3: 197 37% 24%;+ --chart-4: 43 74% 66%;+ --chart-5: 27 87% 67%;+ --radius: 0.5rem;+ }+ .dark {+ --background: 222.2 84% 4.9%;+ --foreground: 210 40% 98%;+ --card: 222.2 84% 4.9%;+ --card-foreground: 210 40% 98%;+ --popover: 222.2 84% 4.9%;+ --popover-foreground: 210 40% 98%;+ --primary: 210 40% 98%;+ --primary-foreground: 222.2 47.4% 11.2%;+ --secondary: 217.2 32.6% 17.5%;+ --secondary-foreground: 210 40% 98%;+ --muted: 217.2 32.6% 17.5%;+ --muted-foreground: 215 20.2% 65.1%;+ --accent: 217.2 32.6% 17.5%;+ --accent-foreground: 210 40% 98%;+ --destructive: 0 62.8% 30.6%;+ --destructive-foreground: 210 40% 98%;+ --border: 217.2 32.6% 17.5%;+ --input: 217.2 32.6% 17.5%;+ --ring: 212.7 26.8% 83.9%;+ --chart-1: 220 70% 50%;+ --chart-2: 160 60% 45%;+ --chart-3: 30 80% 55%;+ --chart-4: 280 65% 60%;+ --chart-5: 340 75% 55%;+ }}@layer base {- * {- @apply border-border;- }- body {- @apply bg-background text-foreground;- }+ * {+ @apply border-border;+ }+ body {+ @apply bg-background text-foreground;+ }}diff --git a/packages/convert/public/gt-planar-bold.woff2 b/packages/convert/public/gt-planar-bold.woff2new file mode 100644index 0000000000..a6688fcfb8Binary files /dev/null and b/packages/convert/public/gt-planar-bold.woff2 differdiff --git a/packages/convert/public/gt-planar-medium.woff2 b/packages/convert/public/gt-planar-medium.woff2new file mode 100644index 0000000000..10e1e5a042Binary files /dev/null and b/packages/convert/public/gt-planar-medium.woff2 differdiff --git a/packages/convert/public/gt-planar-regular.woff2 b/packages/convert/public/gt-planar-regular.woff2new file mode 100644index 0000000000..29ad899a66Binary files /dev/null and b/packages/convert/public/gt-planar-regular.woff2 differdiff --git a/packages/convert/tailwind.config.ts b/packages/convert/tailwind.config.tsindex cd58796294..40c0a90f5e 100644--- a/packages/convert/tailwind.config.ts+++ b/packages/convert/tailwind.config.ts@@ -1,58 +1,61 @@-import type { Config } from "tailwindcss";+import type {Config} from 'tailwindcss';export default {- darkMode: ["class"],- content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"],- theme: {- extend: {- borderRadius: {- lg: 'var(--radius)',- md: 'calc(var(--radius) - 2px)',- sm: 'calc(var(--radius) - 4px)'- },- colors: {- background: 'hsl(var(--background))',- foreground: 'hsl(var(--foreground))',- card: {- DEFAULT: 'hsl(var(--card))',- foreground: 'hsl(var(--card-foreground))'- },- popover: {- DEFAULT: 'hsl(var(--popover))',- foreground: 'hsl(var(--popover-foreground))'- },- primary: {- DEFAULT: 'hsl(var(--primary))',- foreground: 'hsl(var(--primary-foreground))'- },- secondary: {- DEFAULT: 'hsl(var(--secondary))',- foreground: 'hsl(var(--secondary-foreground))'- },- muted: {- DEFAULT: 'hsl(var(--muted))',- foreground: 'hsl(var(--muted-foreground))'- },- accent: {- DEFAULT: 'hsl(var(--accent))',- foreground: 'hsl(var(--accent-foreground))'- },- destructive: {- DEFAULT: 'hsl(var(--destructive))',- foreground: 'hsl(var(--destructive-foreground))'- },- border: 'hsl(var(--border))',- input: 'hsl(var(--input))',- ring: 'hsl(var(--ring))',- chart: {- '1': 'hsl(var(--chart-1))',- '2': 'hsl(var(--chart-2))',- '3': 'hsl(var(--chart-3))',- '4': 'hsl(var(--chart-4))',- '5': 'hsl(var(--chart-5))'- }- }- }- },- plugins: [require("tailwindcss-animate")],+ darkMode: ['class'],+ content: ['./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}'],+ theme: {+ fontFamily: {+ brand: ['GTPlanar'],+ },+ extend: {+ borderRadius: {+ lg: 'var(--radius)',+ md: 'calc(var(--radius) - 2px)',+ sm: 'calc(var(--radius) - 4px)',+ },+ colors: {+ background: 'hsl(var(--background))',+ foreground: 'hsl(var(--foreground))',+ card: {+ DEFAULT: 'hsl(var(--card))',+ foreground: 'hsl(var(--card-foreground))',+ },+ popover: {+ DEFAULT: 'hsl(var(--popover))',+ foreground: 'hsl(var(--popover-foreground))',+ },+ primary: {+ DEFAULT: 'hsl(var(--primary))',+ foreground: 'hsl(var(--primary-foreground))',+ },+ secondary: {+ DEFAULT: 'hsl(var(--secondary))',+ foreground: 'hsl(var(--secondary-foreground))',+ },+ muted: {+ DEFAULT: 'hsl(var(--muted))',+ foreground: 'hsl(var(--muted-foreground))',+ },+ accent: {+ DEFAULT: 'hsl(var(--accent))',+ foreground: 'hsl(var(--accent-foreground))',+ },+ destructive: {+ DEFAULT: 'hsl(var(--destructive))',+ foreground: 'hsl(var(--destructive-foreground))',+ },+ border: 'hsl(var(--border))',+ input: 'hsl(var(--input))',+ ring: 'hsl(var(--ring))',+ chart: {+ '1': 'hsl(var(--chart-1))',+ '2': 'hsl(var(--chart-2))',+ '3': 'hsl(var(--chart-3))',+ '4': 'hsl(var(--chart-4))',+ '5': 'hsl(var(--chart-5))',+ },+ },+ },+ },+ plugins: [require('tailwindcss-animate')],} satisfies Config;