mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
refactor: establish workspaces and extract db and dtos packages
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { AncestorFolder } from '@/dtos/asset'
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AttachmentInfo, CommentInfo } from '@/dtos/asset'
|
||||
import type { UserInfo } from '@/dtos/team'
|
||||
import type { AttachmentInfo, CommentInfo } from '@shumai/dtos'
|
||||
import type { UserInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { CommentInfo, PostAttachmentRequest, PostAttachmentResponse } from '@/dtos/asset'
|
||||
import type { BotInfo } from '@/dtos/project'
|
||||
import type { UserInfo } from '@/dtos/team'
|
||||
import type { CommentInfo, PostAttachmentRequest, PostAttachmentResponse } from '@shumai/dtos'
|
||||
import type { BotInfo } from '@shumai/dtos'
|
||||
import type { UserInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useAnnotationStore } from '@/ui/stores/annotation-store'
|
||||
import type { Annotation } from '@/ui/types'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { FieldInfo as FieldInfo } from '@/dtos/metadata'
|
||||
import type { FieldInfo as FieldInfo } from '@shumai/dtos'
|
||||
import React from 'react'
|
||||
import DateField from './fields/date-field'
|
||||
import LongTextField from './fields/long-text-field'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FieldType, type FieldInfo, type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import { FieldType, type FieldInfo, type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useFieldStore } from '@/ui/stores/fields'
|
||||
import { DragDropProvider, KeyboardSensor, PointerSensor, type DragEndEvent } from '@dnd-kit/react'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
|
||||
export type FieldConfig = MetadataFieldInfo['config']
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SelectOption } from '@/dtos/metadata'
|
||||
import type { SelectOption } from '@shumai/dtos'
|
||||
import { ChevronDown, X } from 'lucide-react'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import type { FieldProps } from './field-types'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Check } from 'lucide-react'
|
||||
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react'
|
||||
import type { FieldProps } from './field-types'
|
||||
import type { SelectOption } from '@/dtos/metadata'
|
||||
import type { SelectOption } from '@shumai/dtos'
|
||||
|
||||
const SelectMultiField: React.FC<FieldProps<string[]>> = ({
|
||||
value = [],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import React from 'react'
|
||||
|
||||
interface FieldProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { ShareLinkInfo } from '@/dtos/share'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import {
|
||||
ContextMenuContent,
|
||||
ContextMenuItem,
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { CollectionInfo } from '@/dtos/collection'
|
||||
import type { SearchCondition, SearchSort } from '@/dtos/search'
|
||||
import type { ShareLinkInfo } from '@/dtos/share'
|
||||
import type { CreateUploadTaskRequest } from '@/dtos/upload'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { CollectionInfo } from '@shumai/dtos'
|
||||
import type { SearchCondition, SearchSort } from '@shumai/dtos'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import type { CreateUploadTaskRequest } from '@shumai/dtos'
|
||||
import { formatSize } from '@/ui/lib/format'
|
||||
import { useFieldStore } from '@/ui/stores/fields'
|
||||
import { useUploadStore } from '@/ui/stores/upload'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo, FieldValueInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo, FieldValueInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
@@ -23,7 +23,7 @@ import { Checkbox } from '@/ui/components/ui/checkbox'
|
||||
import { EditableText } from '@/ui/components/ui/editable-text'
|
||||
import { Skeleton } from '@/ui/components/ui/skeleton'
|
||||
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
|
||||
interface FileCardProps {
|
||||
teamId?: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo, FieldValueInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo, FieldValueInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Badge } from '@/ui/components/ui/badge'
|
||||
import { Checkbox } from '@/ui/components/ui/checkbox'
|
||||
import { EditableText } from '@/ui/components/ui/editable-text'
|
||||
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
|
||||
interface FileListItemProps {
|
||||
teamId?: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo, ChildPreview } from '@/dtos/asset'
|
||||
import type { AssetInfo, ChildPreview } from '@shumai/dtos'
|
||||
import { Checkbox } from '@/ui/components/ui/checkbox'
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { SearchSort } from '@/dtos/search'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { SearchSort } from '@shumai/dtos'
|
||||
import { useDroppable } from '@dnd-kit/react'
|
||||
import { ChevronDown, ChevronRight } from 'lucide-react'
|
||||
import React from 'react'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client'
|
||||
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { FieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchSort } from '@/dtos/search'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { FieldInfo } from '@shumai/dtos'
|
||||
import type { SearchSort } from '@shumai/dtos'
|
||||
import { useDroppable } from '@dnd-kit/react'
|
||||
import { flexRender, getCoreRowModel, useReactTable, type ColumnDef } from '@tanstack/react-table'
|
||||
import { ChevronDown, ChevronRight } from 'lucide-react'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { CollectionInfo } from '@/dtos/collection'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchCondition, SearchSort } from '@/dtos/search'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import type { CollectionInfo } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { SearchCondition, SearchSort } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useMutation, useQuery } from '@tanstack/react-query'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import { useState } from 'react'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { AssetInfo, AssetInfoPaginatedList } from '@/dtos/asset'
|
||||
import type { CollectionInfo } from '@/dtos/collection'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchCondition, SearchSort } from '@/dtos/search'
|
||||
import type { AssetInfo, AssetInfoPaginatedList } from '@shumai/dtos'
|
||||
import type { CollectionInfo } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { SearchCondition, SearchSort } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { InferRequestType, InferResponseType } from 'hono/client'
|
||||
|
||||
@@ -2,7 +2,7 @@ import { client } from '@/ui/api/client'
|
||||
import { useInfiniteQuery } from '@tanstack/react-query'
|
||||
import { Loader2, PanelLeftClose } from 'lucide-react'
|
||||
import type { FC } from 'react'
|
||||
import type { AssetInfoPaginatedList } from '@/dtos/asset'
|
||||
import type { AssetInfoPaginatedList } from '@shumai/dtos'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { useInView } from 'react-intersection-observer'
|
||||
import { SidebarFileCard } from './sidebar-file-card'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { AssetInfo, AttachmentInfo, CommentInfo, FieldValueInfo } from '@/dtos/asset'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { UserInfo } from '@/dtos/team'
|
||||
import type { AssetInfo, AttachmentInfo, CommentInfo, FieldValueInfo } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { UserInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/ui/components/ui/tabs'
|
||||
import { useFieldStore } from '@/ui/stores/fields'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import { useScreenSize } from '@/ui/hooks/useScreenSize'
|
||||
import { getBestTranscode } from '@/ui/lib/media'
|
||||
import { Minus, Plus, Copy, Download, Check } from 'lucide-react'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfoPaginatedList, AssetInfo } from '@/dtos/asset'
|
||||
import type { AssetInfoPaginatedList, AssetInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
@@ -22,8 +22,8 @@ import { useInView } from 'react-intersection-observer'
|
||||
import { useDraggable, useDroppable } from '@dnd-kit/react'
|
||||
import type { DragState } from './dnd-types'
|
||||
import { toast } from 'sonner'
|
||||
import type { ShareLinkInfo } from '@/dtos/share'
|
||||
import type { CollectionInfo } from '@/dtos/collection'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import type { CollectionInfo } from '@shumai/dtos'
|
||||
|
||||
interface FolderTreeProps {
|
||||
teamId: string
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
type FieldInfo,
|
||||
FieldType,
|
||||
type SelectOption,
|
||||
} from '@/dtos/metadata'
|
||||
} from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { InferRequestType, InferResponseType } from 'hono/client'
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { FolderTree } from './folder-tree'
|
||||
import { AssetInfo } from '@/dtos/asset'
|
||||
import { ProjectInfo } from '@/dtos/project'
|
||||
import { AssetInfo } from '@shumai/dtos'
|
||||
import { ProjectInfo } from '@shumai/dtos'
|
||||
import { ScrollArea } from './ui/scroll-area'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { NotificationInfo } from '@/dtos/notification'
|
||||
import type { NotificationInfo } from '@shumai/dtos'
|
||||
import { formatTimeAgo } from '@/ui/lib/time'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CheckCheckIcon, Loader2 } from 'lucide-react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { useInView } from 'react-intersection-observer'
|
||||
import type { InferResponseType } from 'hono/client'
|
||||
import type { GetMeResponse } from '@/dtos/team'
|
||||
import type { GetMeResponse } from '@shumai/dtos'
|
||||
|
||||
export const NotificationList = () => {
|
||||
const { teamId } = useTeamContextStore()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ProjectInfo } from '@/dtos/project'
|
||||
import type { ProjectInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import {
|
||||
|
||||
@@ -12,8 +12,8 @@ import { Card, CardContent, CardHeader, CardTitle } from './ui/card'
|
||||
import { Input } from './ui/input'
|
||||
import { Button } from './ui/button'
|
||||
import { Lock, AlertCircle, Loader2 } from 'lucide-react'
|
||||
import type { AncestorFolder, AssetInfoPaginatedList, AssetInfo, CommentInfo } from '@/dtos/asset'
|
||||
import { FieldInfo } from '@/dtos/metadata'
|
||||
import type { AncestorFolder, AssetInfoPaginatedList, AssetInfo, CommentInfo } from '@shumai/dtos'
|
||||
import { FieldInfo } from '@shumai/dtos'
|
||||
import { FileViewer } from './file-viewer'
|
||||
import type Player from 'video.js/dist/types/player'
|
||||
import type { Annotation } from '@/ui/types'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { SearchCondition, SearchConditionOperator } from '@/dtos/search'
|
||||
import { type FieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchCondition, SearchConditionOperator } from '@shumai/dtos'
|
||||
import { type FieldInfo } from '@shumai/dtos'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
import { DebouncedInput } from '@/ui/components/ui/debounced-input'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { type AssetInfo } from '@/dtos/asset'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchCondition } from '@/dtos/search'
|
||||
import { type AssetInfo } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { SearchCondition } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/ui/components/ui/dialog'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import type { SearchSort } from '@/dtos/search'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import type { SearchSort } from '@shumai/dtos'
|
||||
import { ArrowDownUp } from 'lucide-react'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/ui/components/ui/popover'
|
||||
|
||||
@@ -24,7 +24,7 @@ import { useForm, useStore } from '@tanstack/react-form'
|
||||
import { Loader2, Puzzle } from 'lucide-react'
|
||||
import { useEffect, useMemo } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { AgentInfo, AgentType } from '@/dtos/agent'
|
||||
import { AgentInfo, AgentType } from '@shumai/dtos'
|
||||
import { Textarea } from '@/ui/components/ui/textarea'
|
||||
import { ScrollArea } from '@/ui/components/ui/scroll-area'
|
||||
import { z } from 'zod'
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
} from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { AgentInfo, AgentType } from '@/dtos/agent'
|
||||
import { AgentInfo, AgentType } from '@shumai/dtos'
|
||||
import { AgentFormDialog } from './AgentFormDialog'
|
||||
import {
|
||||
DropdownMenu,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Bell,
|
||||
} from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import type { NotificationSettings as Settings } from '@/dtos/notification'
|
||||
import type { NotificationSettings as Settings } from '@shumai/dtos'
|
||||
|
||||
export function NotificationSettings({ teamId }: { teamId: string }) {
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
@@ -56,7 +56,7 @@ import {
|
||||
import { useState, useMemo, useEffect } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
import { InferResponseType } from 'hono/client'
|
||||
import { providerConfigSchema, providerModelSchema } from '@/dtos/provider'
|
||||
import { providerConfigSchema, providerModelSchema } from '@shumai/dtos'
|
||||
import { z } from 'zod'
|
||||
|
||||
const providerFormSchemaBase = z.object({
|
||||
|
||||
@@ -31,7 +31,7 @@ import {
|
||||
AlertDialogHeader,
|
||||
AlertDialogTitle,
|
||||
} from '@/ui/components/ui/alert-dialog'
|
||||
import { SkillInfo } from '@/dtos/skill'
|
||||
import { SkillInfo } from '@shumai/dtos'
|
||||
|
||||
const Github = (props: React.SVGProps<SVGSVGElement>) => (
|
||||
<svg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AiProviderSettings } from '@/dtos/ai'
|
||||
import type { AiProviderSettings } from '@shumai/dtos'
|
||||
|
||||
export const AiProvider = {
|
||||
GEMINI: 'google',
|
||||
@@ -31,7 +31,7 @@ export const ThinkingLevel = {
|
||||
} as const
|
||||
export type ThinkingLevel = (typeof ThinkingLevel)[keyof typeof ThinkingLevel]
|
||||
|
||||
import type { AgentInfo } from '@/dtos/agent'
|
||||
import type { AgentInfo } from '@shumai/dtos'
|
||||
|
||||
export type ProviderSettings = AiProviderSettings
|
||||
export type Agent = AgentInfo
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AncestorFolder, AssetInfo, AssetInfoPaginatedList } from '@/dtos/asset'
|
||||
import type { AncestorFolder, AssetInfo, AssetInfoPaginatedList } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { useMutation, useInfiniteQuery, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { useEffect, useState, useMemo } from 'react'
|
||||
@@ -13,7 +13,7 @@ import { SnapToPointer } from './dnd-modifiers'
|
||||
import { useUiStore } from '@/ui/stores/ui'
|
||||
import { useUserMetadataStore } from '@/ui/stores/user-metadata'
|
||||
import { useTopNavStore } from '@/ui/stores/top-nav'
|
||||
import type { ShareLinkInfo } from '@/dtos/share'
|
||||
import type { ShareLinkInfo } from '@shumai/dtos'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
type ShareManagerProps = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ShareLinkInfo, UpdateShareLinkRequest } from '@/dtos/share'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@/dtos/metadata'
|
||||
import { ShareLinkInfo, UpdateShareLinkRequest } from '@shumai/dtos'
|
||||
import { type FieldInfo as MetadataFieldInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Button } from '@/ui/components/ui/button'
|
||||
import { Input } from '@/ui/components/ui/input'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import { Link } from '@tanstack/react-router'
|
||||
import React from 'react'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { TaskInfo } from '@/dtos/upload'
|
||||
import type { TaskInfo } from '@shumai/dtos'
|
||||
import { useTeamId } from '@/ui/hooks/use-team-id'
|
||||
import { useInfiniteQuery } from '@tanstack/react-query'
|
||||
import { Loader2, CheckCircle2, Clock, UploadCloud } from 'lucide-react'
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { InferRequestType, InferResponseType } from 'hono/client'
|
||||
import type { AssetInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo } from '@shumai/dtos'
|
||||
import { useMutation, useQueryClient } from '@tanstack/react-query'
|
||||
import { useState } from 'react'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MediaMetadata } from '@/dtos/asset'
|
||||
import type { MediaMetadata } from '@shumai/dtos'
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
||||
|
||||
const formatTime = (seconds: number): string => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AssetInfo, VideoTranscode } from '@/dtos/asset'
|
||||
import type { AssetInfo, VideoTranscode } from '@shumai/dtos'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
import {
|
||||
Download,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ImageTranscode, VideoTranscode } from '@/dtos/asset'
|
||||
import type { ImageTranscode, VideoTranscode } from '@shumai/dtos'
|
||||
|
||||
type Transcode = ImageTranscode | VideoTranscode
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { type Annotation } from '@/ui/types'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { InferRequestType, InferResponseType } from 'hono/client'
|
||||
|
||||
import type { AssetInfo, CommentInfo } from '@/dtos/asset'
|
||||
import type { AssetInfo, CommentInfo } from '@shumai/dtos'
|
||||
import { keepPreviousData, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { createFileRoute, useNavigate } from '@tanstack/react-router'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ProjectInfo } from '@/dtos/project'
|
||||
import type { ProjectInfo } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { MembersDialog } from '@/ui/components/members-dialog'
|
||||
import { ProjectDialog } from '@/ui/components/project-dialog'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { VideoTranscodeStrategy } from '@/dtos/team'
|
||||
import { VideoTranscodeStrategy } from '@shumai/dtos'
|
||||
import { client } from '@/ui/api/client'
|
||||
import { AgentsSettings } from '@/ui/components/settings/AgentsSettings'
|
||||
import { ProvidersSettings } from '@/ui/components/settings/ProvidersSettings'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { FieldInfo as FieldInfo } from '@/dtos/metadata'
|
||||
import type { FieldInfo as FieldInfo } from '@shumai/dtos'
|
||||
import { create } from 'zustand'
|
||||
|
||||
interface FieldState {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { create } from 'zustand'
|
||||
import { devtools } from 'zustand/middleware'
|
||||
import { immer } from 'zustand/middleware/immer'
|
||||
import { client } from '@/ui/api/client'
|
||||
import type { UserInfo } from '@/dtos/team'
|
||||
import type { UserInfo } from '@shumai/dtos'
|
||||
|
||||
interface MemberState {
|
||||
members: UserInfo[]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { create } from 'zustand'
|
||||
import type { AncestorFolder } from '@/dtos/asset'
|
||||
import type { AncestorFolder } from '@shumai/dtos'
|
||||
|
||||
export interface TopNavProjectState {
|
||||
teamId: string
|
||||
|
||||
Reference in New Issue
Block a user