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
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/api/mutations/task.ts
apps/frontend/src/api/mutations/task.ts
import { useMutation } from '@tanstack/react-query'; import { addCollaborator, batchAddCollaborators, batchRemoveCollaborators, createTaskWithBasicConfig, removeCollaborator, updateTaskConfig, } from '@/api/services/task'; import type { UpdateCommand } from '../types'; export function useAddTaskMutation(...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/api/mutations/attachment.ts
apps/frontend/src/api/mutations/attachment.ts
import { useMutation } from '@tanstack/react-query'; import { uploadFile } from '@/api/services/task'; export function useUploadFileMutation() { return useMutation({ mutationFn: uploadFile, }); }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/api/queries/task.ts
apps/frontend/src/api/queries/task.ts
import { useQuery } from '@tanstack/react-query'; import { getTaskCollaborators } from '../services/task'; import { taskKey } from '../queryKeyFactories'; export function useCollaborators(taskId: number, enabled: boolean) { return useQuery({ queryKey: taskKey.collaborators(), queryFn: () => getTaskCollabora...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/api/queries/user.ts
apps/frontend/src/api/queries/user.ts
import { useQuery } from '@tanstack/react-query'; import { userKey } from '../queryKeyFactories/user'; import { getUsers } from '../services/user'; import type { GetUsersApiV1UsersGetParams } from '../types'; export function useUsers(params: GetUsersApiV1UsersGetParams) { return useQuery({ queryKey: userKey.lis...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/types/toolConfig.ts
apps/frontend/src/types/toolConfig.ts
import type { Attribute } from '@labelu/interface'; export interface ToolsConfigState { tools: any[]; tagList: any[]; attributes: Attribute[]; textConfig: any; commonAttributeConfigurable: boolean; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/types/index.ts
apps/frontend/src/types/index.ts
export interface Locales<T = any> { /** Chinese */ zh_CN: T; /** English */ en_US: T; } export type Language = keyof Locales; export interface PageData<T> { page: number; size: number; total: number; data: T[]; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/layouts/BlockContainer/index.tsx
apps/frontend/src/layouts/BlockContainer/index.tsx
import styled from 'styled-components'; const StyledContainer = styled.div` padding: 0 1.5rem; `; export default function BlockContainer({ children, className, style, }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) { return ( <StyledContainer style={style} className={cla...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/layouts/MainLayoutWithNavigation/index.tsx
apps/frontend/src/layouts/MainLayoutWithNavigation/index.tsx
import { useEffect } from 'react'; import { Outlet, useNavigate, useSearchParams } from 'react-router-dom'; import styled from 'styled-components'; import { FlexLayout } from '@labelu/components-react'; import Navigate from '@/components/Navigate'; const LayoutWrapper = styled(FlexLayout)` min-height: 100vh; `; co...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/config/index.ts
apps/frontend/src/config/index.ts
type Config = Record<string, string>; type GetConfig = () => Config; const getConfig: GetConfig = () => { const conf: Record<string, string> = {}; if (process.env.NODE_ENV === 'development') { conf.host = 'ws://localhost:18080'; conf.pluginHost = 'http://localhost:8080'; } else { conf.host = 'ws://1...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/classes/WebsocketClient.ts
apps/frontend/src/classes/WebsocketClient.ts
export interface WebSocketClientOptions { reconnectInterval: number; maxReconnectAttempts: number; } export default class WebSocketClient { public url: string; public options: WebSocketClientOptions; public reconnectAttempts: number; public handlers: Map<string, ((data?: any) => void)[]> = new Map(); pub...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/classes/ColorPalette.ts
apps/frontend/src/classes/ColorPalette.ts
const defaultColors = [ '#fc5b50', '#50AAF2', '#FFB300', '#3BC141', '#FC7A42', '#506AFF', '#D55EEA', '#F974A4', '#DE8B3E', '#FF5C97', '#FFCC4A', '#F1F462', '#8D64FF', '#ABFF7E', '#52CEDD', '#5AB4DB', '#99D5F0', '#958FEC', '#AD6DDB', '#B77259', ]; /** * 标注框的颜色色板 * 一个Sample中的标注框...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/loaders/sample.loader.ts
apps/frontend/src/loaders/sample.loader.ts
import type { LoaderFunctionArgs } from 'react-router'; import queryClient from '@/api/queryClient'; import { sampleKey } from '@/api/queryKeyFactories'; import { getSample } from '@/api/services/samples'; import { preAnnotationKey } from '@/api/queryKeyFactories/preAnnotation'; import { getPreAnnotations } from '@/ap...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/loaders/register.loader.ts
apps/frontend/src/loaders/register.loader.ts
import { redirect } from 'react-router'; import { goRegister } from '@/utils/sso'; import * as storage from '@/utils/storage'; export async function registerLoader() { if (storage.get('token')) { return redirect('/tasks'); } if (window.IS_ONLINE) { goRegister(); return Promise.resolve(); } re...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/loaders/task.loader.ts
apps/frontend/src/loaders/task.loader.ts
import type { LoaderFunctionArgs } from 'react-router'; import { sampleKey, taskKey } from '@/api/queryKeyFactories'; import { getTaskList, getTask } from '@/api/services/task'; import queryClient from '@/api/queryClient'; import { getSamples } from '@/api/services/samples'; import type { ListByApiV1TasksTaskIdSamples...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/loaders/root.loader.ts
apps/frontend/src/loaders/root.loader.ts
import type { LoaderFunctionArgs } from 'react-router'; import { redirect } from 'react-router'; import * as storage from '@/utils/storage'; import { getUserInfo, ssoLogin } from '@/api/services/user'; export async function rootLoader({ request }: LoaderFunctionArgs) { if (window.IS_ONLINE) { const url = new UR...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/loaders/login.loader.ts
apps/frontend/src/loaders/login.loader.ts
import { goLogin } from '@/utils/sso'; export async function loginLoader() { if (window.IS_ONLINE) { goLogin(); return Promise.resolve(); } return null; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/constants/upload.ts
apps/frontend/src/constants/upload.ts
export enum UploadStatus { UPLOADING = 'UPLOADING', WAITING = 'WAITING', SUCCESS = 'SUCCESS', FAIL = 'FAIL', }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/constants/mediaType.ts
apps/frontend/src/constants/mediaType.ts
import { i18n } from '@labelu/i18n'; import { MediaType } from '@/api/types'; export const MediaTypeText = { [MediaType.IMAGE]: i18n.t('image'), [MediaType.VIDEO]: i18n.t('video'), [MediaType.AUDIO]: i18n.t('audio'), }; export const FileExtensionText = { [MediaType.IMAGE]: 'jpg、jpeg、png、bmp、gif', [MediaTyp...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/constants/toolName.ts
apps/frontend/src/constants/toolName.ts
import { i18n } from '@labelu/i18n'; import { EAudioToolName, EGlobalToolName, EVideoToolName, ImageToolName } from '@/enums'; export const TOOL_NAME: Record<string, string> = { [ImageToolName.Rect]: i18n.t('rect'), [EGlobalToolName.Tag]: i18n.t('tag'), [EGlobalToolName.Text]: i18n.t('textDescription'), [Imag...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/frontend/src/enums/index.ts
apps/frontend/src/enums/index.ts
export enum ImageToolName { /** 拉框工具 */ Rect = 'rectTool', /** 标点工具 */ Point = 'pointTool', Polygon = 'polygonTool', /** 线条 */ Line = 'lineTool', /** 立体框 */ Cuboid = 'cuboidTool', /** 关联关系 */ Relation = 'relationTool', } export enum EVideoToolName { /** 视频截取工具 */ VideoSegmentTool = 'videoSegm...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/vite.config.ts
apps/website/vite.config.ts
import { resolve } from 'path'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import svgr from 'vite-plugin-svgr'; import { ViteEjsPlugin } from 'vite-plugin-ejs'; import tsMonoAlias from 'vite-plugin-ts-mono-alias'; import { visualizer } from 'rollup-plugin-visualizer'; // https://vi...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/mock/index.ts
apps/website/mock/index.ts
import type { MockMethod } from 'vite-plugin-mock'; export default [ { url: '/api/v1/auth/me', method: 'post', timeout: 100, response: () => { return { id: '1', name: 'lisi', }; }, }, ] as MockMethod[];
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/App.tsx
apps/website/src/App.tsx
import { App as AntApp, ConfigProvider } from 'antd'; import enUS from 'antd/es/locale/en_US'; import zhCN from 'antd/es/locale/zh_CN'; import { I18nProvider, useTranslation } from '@labelu/i18n'; import { useMemo } from 'react'; import RouterContainer from '@/components/RouterContainer'; import StaticAnt from '@/comp...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/index.tsx
apps/website/src/index.tsx
import ReactDOM from 'react-dom/client'; import App from './App'; import './styles/index.css'; import 'antd/dist/reset.css'; ReactDOM.createRoot(document.getElementById('root')!).render(<App />);
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/routes.tsx
apps/website/src/routes.tsx
import loadable from '@loadable/component'; import Spin from 'antd/es/spin'; import AudioPage from './pages/audio'; import ImagePage from './pages/image'; import VideoPage from './pages/video'; import CheckChildRoute from './wrappers/CheckChildRoute'; const moduleSpin = { fallback: <Spin className="w-full mt-[30vh]...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/vite-env.d.ts
apps/website/src/vite-env.d.ts
/// <reference types="vite/client" /> /// <reference types="vite-plugin-svgr/client" />
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/index.tsx
apps/website/src/constant/index.tsx
import { i18n } from '@labelu/i18n'; import { ReactComponent as VideoIcon } from '@/assets/video.svg'; import { ReactComponent as AudioIcon } from '@/assets/audio.svg'; import { ReactComponent as ImageIcon } from '@/assets/image.svg'; export const MENU = [ { name: i18n.t('image'), path: '/image', icon: ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/point.template.tsx
apps/website/src/constant/templates/point.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'pointTool', }, { key: 'config', field: 'config', type: 'group', children:...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/line.template.tsx
apps/website/src/constant/templates/line.template.tsx
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons'; import type { RuleRender } from 'antd/es/form'; import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; import FancyInput from '@/components/FancyInput'; export default [ { field: 'tool...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/polygon.template.tsx
apps/website/src/constant/templates/polygon.template.tsx
import { ArrowDownOutlined, ArrowUpOutlined } from '@ant-design/icons'; import type { RuleRender } from 'antd/es/form'; import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; import FancyInput from '@/components/FancyInput'; export default [ { field: 'tool...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/videoFrame.template.tsx
apps/website/src/constant/templates/videoFrame.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'videoFrameTool', }, { key: 'config', field: 'config', type: 'group', chil...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/audioSegment.template.tsx
apps/website/src/constant/templates/audioSegment.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'audioSegmentTool', }, { key: 'config', field: 'config', type: 'group', ch...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/cuboid.template.tsx
apps/website/src/constant/templates/cuboid.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'cuboidTool', }, { key: 'config', field: 'config', type: 'group', children...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/text.template.tsx
apps/website/src/constant/templates/text.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'textTool', }, { key: 'config', field: 'config', type: 'group', children: ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/audioFrame.template.tsx
apps/website/src/constant/templates/audioFrame.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'audioFrameTool', }, { key: 'config', field: 'config', type: 'group', chil...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/rect.template.tsx
apps/website/src/constant/templates/rect.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'rectTool', }, { key: 'config', field: 'config', type: 'group', children: ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/tag.template.tsx
apps/website/src/constant/templates/tag.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'tagTool', }, { key: 'config', field: 'config', type: 'group', children: [...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/constant/templates/videoSegment.template.tsx
apps/website/src/constant/templates/videoSegment.template.tsx
import { i18n } from '@labelu/i18n'; import type { FancyItemIdentifier } from '@/components/FancyInput/types'; export default [ { field: 'tool', key: 'tool', type: 'string', hidden: true, initialValue: 'videoSegmentTool', }, { key: 'config', field: 'config', type: 'group', ch...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/pages/home.tsx
apps/website/src/pages/home.tsx
import { useEffect } from 'react'; import { Outlet, useNavigate } from 'react-router-dom'; export default function Home() { const navigate = useNavigate(); useEffect(() => { navigate('/image', { replace: true, }); }, [navigate]); return <Outlet />; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/pages/image/index.tsx
apps/website/src/pages/image/index.tsx
import { CodeOutlined, SettingOutlined } from '@ant-design/icons'; import type { AnnotatorRef } from '@labelu/image-annotator-react'; import { Annotator as ImageAnnotator } from '@labelu/image-annotator-react'; import type { Annotator, ToolName } from '@labelu/image'; import { TOOL_NAMES } from '@labelu/image'; import ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/pages/audio/index.tsx
apps/website/src/pages/audio/index.tsx
import { Annotator } from '@labelu/audio-annotator-react'; import type { AudioAndVideoAnnotatorRef } from '@labelu/audio-annotator-react'; import CodeMirror from '@uiw/react-codemirror'; import { json } from '@codemirror/lang-json'; import type { TabsProps } from 'antd'; import { Button, Drawer, Form, Modal, Tabs } fro...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/pages/video/index.tsx
apps/website/src/pages/video/index.tsx
import { Annotator } from '@labelu/video-annotator-react'; import type { VideoAnnotationType } from '@labelu/video-react'; import type { AudioAndVideoAnnotatorRef } from '@labelu/audio-annotator-react'; import CodeMirror from '@uiw/react-codemirror'; import { json } from '@codemirror/lang-json'; import type { TabsProps...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/StaticAnt.tsx
apps/website/src/components/StaticAnt.tsx
import { App } from 'antd'; import type { MessageInstance } from 'antd/es/message/interface'; import type { ModalStaticFunctions } from 'antd/es/modal/confirm'; import type { NotificationInstance } from 'antd/es/notification/interface'; let message: MessageInstance; let notification: NotificationInstance; let modal: O...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/RouterContainer.tsx
apps/website/src/components/RouterContainer.tsx
/** * 此组件可用于react-router>=6.4.0的特性,比如loader等Data API * 见:https://reactrouter.com/en/main/routers/picking-a-router */ import Spin from 'antd/es/spin'; import React, { useMemo } from 'react'; import _ from 'lodash'; import DocumentTitle from 'react-document-title'; import type { RouteObject } from 'react-router-dom'; ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/ColorPalette.ts
apps/website/src/components/ColorPalette.ts
const defaultColors = [ '#fc5b50', '#50AAF2', '#FFB300', '#3BC141', '#FC7A42', '#506AFF', '#D55EEA', '#F974A4', '#DE8B3E', '#FF5C97', '#FFCC4A', '#F1F462', '#8D64FF', '#ABFF7E', '#52CEDD', '#5AB4DB', '#99D5F0', '#958FEC', '#AD6DDB', '#B77259', ]; /** * 标注框的颜色色板 * 一个Sample中的标注框...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/LangSwitcher/index.tsx
apps/website/src/components/LangSwitcher/index.tsx
import { Button, Dropdown } from 'antd'; import { useTranslation } from '@labelu/i18n'; import { useMemo } from 'react'; import Icon from '@ant-design/icons'; import { ReactComponent as I18nSvg } from '@/assets/i18n.svg'; const langOptions = [ { key: 'zh-CN', label: '简体中文', value: 'zh-CN', }, { ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyForm/index.tsx
apps/website/src/components/FancyForm/index.tsx
import type { FormItemProps } from 'antd'; import { Form } from 'antd'; import type { NamePath } from 'antd/es/form/interface'; import React from 'react'; import styled, { css } from 'styled-components'; import FancyInput from '../FancyInput'; import type { FancyItemIdentifier } from '../FancyInput/types'; export int...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/CustomFancy/utils.ts
apps/website/src/components/CustomFancy/utils.ts
import type { FormInstance } from 'antd'; import type { NamePath } from 'antd/es/form/interface'; import { map, omit } from 'lodash/fp'; import { v4 as uuid4 } from 'uuid'; export function wrapWithId(item: any) { return { ...item, id: item.id || uuid4(), }; } export const listOmitWithId = map(omit(['id'])...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/CustomFancy/CategoryAttribute.fancy/index.tsx
apps/website/src/components/CustomFancy/CategoryAttribute.fancy/index.tsx
import type { AffixProps, ButtonProps } from 'antd'; import { Affix, Select, InputNumber, Button, Form, Input, Tag, Tooltip, Tree } from 'antd'; import type { NamePath } from 'antd/es/form/interface'; import type { DataNode, TreeProps } from 'antd/es/tree'; import { filter, isEqual, map, omit, set, size, update } from ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/CustomFancy/CategoryAttribute.fancy/TagSwitcher/index.tsx
apps/website/src/components/CustomFancy/CategoryAttribute.fancy/TagSwitcher/index.tsx
import { SwapOutlined } from '@ant-design/icons'; import { Tag } from 'antd'; import { useCallback, useState } from 'react'; import styled from 'styled-components'; export interface TagSwitcherProps { value?: boolean; disabled?: boolean; onChange: (value: boolean) => void; titleMapping?: Record<string, string>...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/CustomFancy/ListAttribute.fancy/index.tsx
apps/website/src/components/CustomFancy/ListAttribute.fancy/index.tsx
import { CloseCircleFilled, PlusOutlined } from '@ant-design/icons'; import { Button, Form, Input, Tooltip, Badge } from 'antd'; import { set, isEqual, size } from 'lodash/fp'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; import type { NamePath } fro...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/CustomFancy/ListAttribute.fancy/AttributeConfiguration.tsx
apps/website/src/components/CustomFancy/ListAttribute.fancy/AttributeConfiguration.tsx
import type { DrawerProps } from 'antd'; import { Form, Button, Drawer } from 'antd'; import { compose, get, isEqual, size } from 'lodash/fp'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; import Icon, { ExclamationCircleFilled } from '@ant-design/ico...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/ErrorBoundary/index.tsx
apps/website/src/components/ErrorBoundary/index.tsx
import Result from 'antd/es/result'; import type { ErrorInfo } from 'react'; import React from 'react'; class ErrorBoundary extends React.Component<{ children?: React.ReactNode }, { hasError: boolean; errorInfo: string }> { state = { hasError: false, errorInfo: '' }; static getDerivedStateFromError(error: Error) ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/IconFont/index.tsx
apps/website/src/components/IconFont/index.tsx
import { createFromIconfontCN } from '@ant-design/icons'; const IconFont = createFromIconfontCN({ scriptUrl: `//at.alicdn.com/t/c/font_3732290_wpzsez2dh2q.js`, }); export default IconFont;
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/Boolean.fancy.tsx
apps/website/src/components/FancyInput/Boolean.fancy.tsx
import type { SwitchProps } from 'antd'; import { Switch } from 'antd'; export interface FancyBooleanProps extends SwitchProps { value: boolean; antProps: SwitchProps; } export function FancyBoolean({ antProps, value, ...rest }: FancyBooleanProps) { return <Switch {...antProps} checked={value} {...rest} />; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/Number.fancy.tsx
apps/website/src/components/FancyInput/Number.fancy.tsx
import type { InputNumberProps } from 'antd'; import { InputNumber } from 'antd'; export interface FancyNumberProps { antProps: InputNumberProps; } export function FancyNumber({ antProps, ...props }: FancyNumberProps) { return <InputNumber {...antProps} {...props} />; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/Enum.fancy.tsx
apps/website/src/components/FancyInput/Enum.fancy.tsx
import type { SelectProps } from 'antd'; import { Select } from 'antd'; export interface FancyEnumProps { antProps: SelectProps; } export function FancyEnum({ antProps, ...props }: FancyEnumProps) { return <Select {...antProps} {...props} />; }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/index.tsx
apps/website/src/components/FancyInput/index.tsx
import { inputs, add, remove } from './fancyInput'; import type { FancyInputProps } from './types'; export default function FancyInput({ type, ...props }: FancyInputProps) { const Input = inputs[type]; if (!Input) { console.warn(`FancyInput: ${type} is not supported`); return <>Not supported yet</>; } ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/String.fancy.tsx
apps/website/src/components/FancyInput/String.fancy.tsx
import type { InputProps } from 'antd'; import { Input } from 'antd'; import type { TextAreaProps } from 'antd/es/input'; export interface FancyStringProps extends InputProps { alias?: 'input' | 'textarea'; antProps: InputProps | TextAreaProps; } export function FancyString({ alias = 'input', antProps }: FancyStr...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/fancyInput.ts
apps/website/src/components/FancyInput/fancyInput.ts
import { FancyBoolean } from './Boolean.fancy'; import { FancyEnum } from './Enum.fancy'; import { FancyString } from './String.fancy'; import { FancyNumber } from './Number.fancy'; export const inputs: Record<string, React.FC<any>> = { enum: FancyEnum, string: FancyString, number: FancyNumber, boolean: FancyB...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/components/FancyInput/types.ts
apps/website/src/components/FancyInput/types.ts
import type { FormInstance, FormItemProps, Rule } from 'antd/es/form'; import type { NamePath } from 'antd/es/form/interface'; export interface FancyItemIdentifier { /** form field type */ type: string; /** form field name */ field: string; /** uniq key */ key: string; label: string; initialValue: any;...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/layouts/Main.tsx
apps/website/src/layouts/Main.tsx
import { Link, useLocation } from 'react-router-dom'; import clsx from 'clsx'; import { ExportOutlined } from '@ant-design/icons'; import { i18n } from '@labelu/i18n'; import { ReactComponent as Logo } from '@/assets/logo.svg'; import LanguageSwitcher from '@/components/LangSwitcher'; import { MENU } from '@/constant'...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/apps/website/src/wrappers/CheckChildRoute.tsx
apps/website/src/wrappers/CheckChildRoute.tsx
import { useOutlet } from 'react-router-dom'; import type { PropsWithChildren } from 'react'; import React from 'react'; import Main from '@/layouts/Main'; const CheckChildRoute: React.FC<PropsWithChildren<any>> = ({ children }) => { const outlet = useOutlet(); // 如果有子路由,不渲染当前组件 if (outlet) { return <Main>...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/vite.config.ts
packages/audio-annotator-react/vite.config.ts
import { resolve } from 'path'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; import svgr from 'vite-plugin-svgr'; import type { PluginOption } from 'vite'; import { defineConfig } from 'vite'; import tsconfigPaths from 'vite-tsconfig-paths'; // https://vitejs.dev/config/ export default defineConfi...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/MediaAnnotatorWrapper.tsx
packages/audio-annotator-react/src/MediaAnnotatorWrapper.tsx
import styled from 'styled-components'; import type { AudioAnnotatorProps } from '@labelu/audio-react'; import { useHotkeys } from 'react-hotkeys-hook'; import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; import type { TagAnnotationEntity, TextAnnotationEntity...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/Annotator.tsx
packages/audio-annotator-react/src/Annotator.tsx
import AudioAnnotator from '@labelu/audio-react'; import { forwardRef } from 'react'; import type { AnnotatorProps, AudioAndVideoAnnotatorRef } from './MediaAnnotatorWrapper'; import { MediaAnnotatorWrapper } from './MediaAnnotatorWrapper'; function ForwardAnnotator({ samples, ...props }: AnnotatorProps, ref: React.R...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/vite-env.d.ts
packages/audio-annotator-react/src/vite-env.d.ts
/// <reference types="vite/client" /> /// <reference types="vite-plugin-svgr/client" />
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/index.ts
packages/audio-annotator-react/src/index.ts
export * from './Annotator'; export * from './AttributePanel'; export * from './LabelSection'; export * from './Toolbar'; export * from './context'; export * from './MediaAnnotatorWrapper';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/LabelSection/index.tsx
packages/audio-annotator-react/src/LabelSection/index.tsx
import React, { createRef, useCallback, useLayoutEffect, useRef, useState } from 'react'; import styled from 'styled-components'; import type { DraggableModalRef, ValidationContextType } from '@labelu/components-react'; import { DraggableModel, AttributeForm, EllipsisText, FlexLayout, Kbd, getOS } from '@labelu/compone...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/Toolbar/index.tsx
packages/audio-annotator-react/src/Toolbar/index.tsx
import { Toolbar, Tooltip, Kbd, HotkeyPanel } from '@labelu/components-react'; import { useHotkeys } from 'react-hotkeys-hook'; import type { VideoAnnotationType } from '@labelu/interface'; import styled from 'styled-components'; import { useTranslation } from '@labelu/i18n'; import { ReactComponent as SegmentIcon } f...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/Toolbar/hotkeys.const.tsx
packages/audio-annotator-react/src/Toolbar/hotkeys.const.tsx
import { Kbd, getOS } from '@labelu/components-react'; import { i18n } from '@labelu/i18n'; import { ReactComponent as MouseRightClick } from './mouse-right.svg'; const os = getOS(); export default [ { label: i18n.t('general'), key: 'common', hotkeys: [ { name: i18n.t('save'), cont...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/AttributePanel/AsideAttributeItem.tsx
packages/audio-annotator-react/src/AttributePanel/AsideAttributeItem.tsx
import styled, { css } from 'styled-components'; import type { PropsWithChildren } from 'react'; import { useCallback, useMemo } from 'react'; import { EllipsisText, secondsToMinute } from '@labelu/components-react'; import type { MediaAnnotationInUI, MediaAnnotationWithTextAndTag } from '@labelu/interface'; import { ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/AttributePanel/index.tsx
packages/audio-annotator-react/src/AttributePanel/index.tsx
import { useEffect, useMemo, useState } from 'react'; import styled, { css } from 'styled-components'; import { AttributeTree, CollapseWrapper, AttributeTreeWrapper, EllipsisText, uid, FlexLayout, Tooltip, } from '@labelu/components-react'; import type { EnumerableAttribute, GlobalAnnotationType, Me...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/context/sample.context.ts
packages/audio-annotator-react/src/context/sample.context.ts
import type { Attribute, EnumerableAttribute, TextAttribute } from '@labelu/interface'; import { createContext, useContext } from 'react'; import type { AnnotationsWithGlobal } from './annotation.context'; export interface MediaAnnotatorConfig { // 标签分类 tag?: EnumerableAttribute[]; // 文本描述 text?: TextAttribut...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/context/tool.context.ts
packages/audio-annotator-react/src/context/tool.context.ts
import type { EditType } from '@labelu/components-react'; import type { EnumerableAttribute, TextAttribute, ILabel, MediaAnnotationType } from '@labelu/interface'; import { createContext, useContext } from 'react'; import type { MediaAnnotatorConfig } from './sample.context'; export interface GlobalToolConfig { tag...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/context/index.ts
packages/audio-annotator-react/src/context/index.ts
export * from './annotation.context'; export * from './history.context'; export * from './tool.context'; export * from './sample.context';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/context/history.context.ts
packages/audio-annotator-react/src/context/history.context.ts
import { createContext, useContext } from 'react'; import type { AnnotationsWithGlobal } from './annotation.context'; export interface HistoryContextType { redo: () => void; undo: () => void; pastRef: React.RefObject<AnnotationsWithGlobal[]>; futureRef: React.RefObject<AnnotationsWithGlobal[]>; } export cons...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/context/annotation.context.ts
packages/audio-annotator-react/src/context/annotation.context.ts
import type { TextAnnotationEntity, TagAnnotationEntity, TextAnnotationType, TagAnnotationType, MediaAnnotationInUI, MediaAnnotationType, MediaAnnotationData, MediaAnnotationWithTextAndTag, } from '@labelu/interface'; import { createContext, useContext } from 'react'; export type GlobalAnnotation = Tex...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/audio-annotator-react/src/Sidebar/index.tsx
packages/audio-annotator-react/src/Sidebar/index.tsx
import { useCallback, useState } from 'react'; import styled, { css } from 'styled-components'; import { AudioCard } from '@labelu/components-react'; import { ReactComponent as ExpandIcon } from '@/assets/icons/arrow.svg'; import { useSample } from '@/context/sample.context'; const Cards = styled.div` display: flex...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/vite.config.ts
packages/image/vite.config.ts
import { resolve } from 'path'; import peerDepsExternal from 'rollup-plugin-peer-deps-external'; import type { PluginOption } from 'vite'; import { defineConfig } from 'vite'; import tsconfigPaths from 'vite-tsconfig-paths'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [peerDepsExternal() as...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/interface.ts
packages/image/src/interface.ts
import type { CuboidData, LineData, LineGroup, PointData, PointGroup, PolygonData, PolygonGroup, RectData, RectGroup, RelationData, } from './annotations'; import type { ClosedSpline, Line, Point, Polygon, Rect, Spline } from './shapes'; import type { CuboidTool, CuboidToolOptions, LineTool, ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/index.ts
packages/image/src/index.ts
export * from './constant'; export * from './interface'; export * from './Annotator'; export { Cursor } from './shapes/CrossCursor.shape';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/AnnotatorBase.ts
packages/image/src/AnnotatorBase.ts
import { Renderer } from './core/Renderer'; import { CuboidTool, PointTool, RectTool } from './tools'; import { LineTool } from './tools/Line.tool'; import type { ImageOption } from './core/BackgroundRenderer'; import { BackgroundRenderer } from './core/BackgroundRenderer'; import type { Axis } from './core/Axis'; impo...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/Annotator.ts
packages/image/src/Annotator.ts
import Color from 'color'; import type { AnnotationData, ToolName } from './interface'; import { EInternalEvent } from './enums'; import { axis } from './singletons/axis'; import { eventEmitter, rbush } from './singletons'; import { Annotation, AnnotationMapping } from './annotations'; import type { Cursor } from './s...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Line.draft.ts
packages/image/src/drafts/Line.draft.ts
import cloneDeep from 'lodash.clonedeep'; import uid from '@/utils/uid'; import type { LineStyle } from '../shapes/Line.shape'; import { Line } from '../shapes/Line.shape'; import { AnnotationLine, type LineData } from '../annotations'; import type { PointStyle } from '../shapes'; import { Rect } from '../shapes'; im...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Point.draft.ts
packages/image/src/drafts/Point.draft.ts
import type { AnnotationParams, PointData } from '../annotations'; import { Annotation, AnnotationPoint } from '../annotations'; import type { AxisPoint, PointStyle } from '../shapes'; import { Point } from '../shapes'; import { Draft } from './Draft'; import type { PointToolOptions } from '../tools'; import { eventEmi...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Relation.draft.ts
packages/image/src/drafts/Relation.draft.ts
import cloneDeep from 'lodash.clonedeep'; import uid from '@/utils/uid'; import { VALID_RELATION_TOOLS } from '@/constant'; import type { LineStyle } from '../shapes/Line.shape'; import { Line } from '../shapes/Line.shape'; import { AnnotationRelation, type RelationData } from '../annotations'; import type { PointSty...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Polygon.draft.ts
packages/image/src/drafts/Polygon.draft.ts
import cloneDeep from 'lodash.clonedeep'; import Color from 'color'; import uid from '@/utils/uid'; import type { LineStyle } from '../shapes/Line.shape'; import { Line } from '../shapes/Line.shape'; import { AnnotationPolygon, type PolygonData } from '../annotations'; import type { Group, PointStyle, PolygonStyle } ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Spline.draft.ts
packages/image/src/drafts/Spline.draft.ts
import cloneDeep from 'lodash.clonedeep'; import type { AllShape } from '@/shapes/types'; import type { LineStyle } from '../shapes/Line.shape'; import { AnnotationLine, type LineData } from '../annotations'; import { Spline } from '../shapes'; import type { AnnotationParams } from '../annotations/Annotation'; import...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/SlopeEdge.ts
packages/image/src/drafts/SlopeEdge.ts
import cloneDeep from 'lodash.clonedeep'; import uid from '@/utils/uid'; import { EInternalEvent } from '../enums'; import type { AxisPoint, Point } from '../shapes'; import { Line } from '../shapes'; import { Group } from '../shapes/Group'; import { ControllerPoint } from './ControllerPoint'; import { axis, monitor ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/ControllerPoint.ts
packages/image/src/drafts/ControllerPoint.ts
import cloneDeep from 'lodash.clonedeep'; import { cursorManager } from '@/singletons/cursorManager'; import type { CursorType } from '@/core/CursorManager'; import { axis, eventEmitter } from '../singletons'; import { EInternalEvent } from '../enums'; import type { AxisPoint, PointParams } from '../shapes'; import {...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Draft.ts
packages/image/src/drafts/Draft.ts
import EventEmitter from 'eventemitter3'; import Color from 'color'; import { cursorManager } from '@/singletons/cursorManager'; import type { RectToolOptions } from '@/tools/Rect.tool'; import type { LineToolOptions } from '@/tools/Line.tool'; import type { CuboidToolOptions } from '@/tools/Cuboid.tool'; import type ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/ClosedSpline.draft.ts
packages/image/src/drafts/ClosedSpline.draft.ts
import cloneDeep from 'lodash.clonedeep'; import Color from 'color'; import type { AllShape } from '@/shapes/types'; import type { LineStyle } from '../shapes/Line.shape'; import type { PolygonData } from '../annotations'; import { AnnotationLine, AnnotationPolygon } from '../annotations'; import type { PolygonStyle,...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/ControllerEdge.ts
packages/image/src/drafts/ControllerEdge.ts
import cloneDeep from 'lodash.clonedeep'; import { cursorManager } from '@/singletons/cursorManager'; import type { CursorType } from '@/core/CursorManager'; import { eventEmitter } from '../singletons'; import { EInternalEvent } from '../enums'; import type { AxisPoint, LineParams } from '../shapes'; import { Line }...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/index.ts
packages/image/src/drafts/index.ts
export * from './Point.draft'; export * from './Line.draft'; export * from './Rect.draft'; export * from './Cuboid.draft'; export * from './Polygon.draft'; export * from './Spline.draft'; export * from './ClosedSpline.draft';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Rect.draft.ts
packages/image/src/drafts/Rect.draft.ts
import cloneDeep from 'lodash.clonedeep'; import type { BBox } from 'rbush'; import Color from 'color'; import uid from '@/utils/uid'; import { EInternalEvent } from '@/enums'; import { Rect, type RectStyle } from '../shapes/Rect.shape'; import { AnnotationRect, type RectData } from '../annotations'; import type { Ax...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Cuboid.draft/domString.ts
packages/image/src/drafts/Cuboid.draft/domString.ts
export default ` <div id="labelu_cuboid_switch"> <style> #labelu_cuboid_switch { font-size: 14px; width: 28px; border-radius: 2px; background-color: #FFFFFF; padding: 8px 0; box-shadow: rgba(0, 0, 0, 0.17) 0px 1px 2px 0px; border: 1px solid rgb(229, 229, 229); } #labelu_cuboid_more_icon { padding: 8px ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/drafts/Cuboid.draft/index.ts
packages/image/src/drafts/Cuboid.draft/index.ts
import cloneDeep from 'lodash.clonedeep'; import Color from 'color'; import uid from '@/utils/uid'; import { AnnotationCuboid, type CuboidData, type CuboidVertex } from '../../annotations'; import type { AxisPoint, LineCoordinate, PointStyle, PolygonStyle } from '../../shapes'; import { Line, Polygon } from '../../sh...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
true
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/constant/index.ts
packages/image/src/constant/index.ts
export const TOOL_NAMES = ['point', 'line', 'rect', 'polygon', 'cuboid', 'relation'] as const; export const DEFAULT_LABEL_TEXT = 'noneLabel'; export const DEFAULT_LABEL_VALUE = 'noneAttribute'; export const DEFAULT_LABEL_COLOR = '#999'; export const DEFAULT_BACKGROUND_COLOR = '#F0F0F0'; export const VALID_RELATION...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/image/src/tools/Rect.tool.ts
packages/image/src/tools/Rect.tool.ts
import cloneDeep from 'lodash.clonedeep'; import uid from '@/utils/uid'; import type { BasicToolParams } from './Tool'; import { Tool } from './Tool'; import type { RectData } from '../annotations'; import { AnnotationRect } from '../annotations'; import type { AxisPoint, RectStyle } from '../shapes'; import { Rect }...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false