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/packages/components-react/src/Kbd/index.tsx
packages/components-react/src/Kbd/index.tsx
import styled, { css } from 'styled-components'; const Wrapper = styled.kbd<{ dark?: boolean }>` ${({ dark }) => css` background-color: ${dark ? '#27272a' : '#fff'}; color: ${dark ? 'rgb(212, 212, 216)' : 'rgb(82, 82, 91)'}; border: 1px solid ${dark ? '#27272a' : '#d9d9d9'}; `} border-radius: 4px; ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/AudioCard/index.tsx
packages/components-react/src/AudioCard/index.tsx
import { useCallback, useRef, useState } from 'react'; import styled, { css } from 'styled-components'; import { StatusCard } from '@/StatusCard'; import { ReactComponent as PlayIcon } from './play.svg'; import { EllipsisText } from '../EllipsisText'; import { secondsToMinute } from '../utils'; const InnerWrapper = ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/PlayerController/PlayerController.tsx
packages/components-react/src/PlayerController/PlayerController.tsx
import styled from 'styled-components'; import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import type { PlayerType } from './SpeedController'; import { SpeedController } from './SpeedController'; import { ReactComponent a...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/PlayerController/index.ts
packages/components-react/src/PlayerController/index.ts
export * from './SpeedController'; export * from './PlayerController';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/PlayerController/SpeedController/index.tsx
packages/components-react/src/PlayerController/SpeedController/index.tsx
import React, { useState, useCallback, useEffect } from 'react'; import styled, { css } from 'styled-components'; import { useHotkeys } from 'react-hotkeys-hook'; import { useTranslation } from '@labelu/i18n'; import { ReactComponent as ArrowUpIcon } from './arrow-up.svg'; import { ReactComponent as ArrowDownIcon } fr...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/MediaAnnotator.tsx
packages/components-react/src/MediaAnnotator/MediaAnnotator.tsx
import type { MediaAnnotationData, MediaAnnotationInUI, MediaAnnotationType, MediaSegment } from '@labelu/interface'; import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react'; import { useHotkeys } from 'react-hotkeys-hook'; import { scheduleAnnotationTrack, throttle, uid } from ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/AnnotationTrack.tsx
packages/components-react/src/MediaAnnotator/AnnotationTrack.tsx
import styled from 'styled-components'; import type { VideoAnnotationData, Attribute, AudioAnnotationData, MediaAnnotationInUI } from '@labelu/interface'; import { useRef } from 'react'; import { useMediaAnnotator } from './context'; import { AnnotationItem } from './AnnotationBar'; const Wrapper = styled.div` posi...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/context.ts
packages/components-react/src/MediaAnnotator/context.ts
import type { Attribute, VideoFrameName, VideoSegmentName, MediaAnnotationInUI, AttributeOption, } from '@labelu/interface'; import { createContext, useContext } from 'react'; export interface MediaAnnotationContextType { selectedAnnotation: MediaAnnotationInUI | undefined; selectAnnotation: (annotation:...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/index.ts
packages/components-react/src/MediaAnnotator/index.ts
export * from './MediaAnnotator'; export * from './AttributeOverlay'; export * from './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/components-react/src/MediaAnnotator/style.ts
packages/components-react/src/MediaAnnotator/style.ts
import styled, { css } from 'styled-components'; import type { MediaAnnotationType } from '@labelu/interface'; import type { SVGProps } from 'react'; import sliceIcon from './cursor-segment.svg'; import frameIcon from './cursor-frame.svg'; import { ReactComponent as ExpandIcon } from './arrow.svg'; export const Track...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/AttributeOverlay.tsx
packages/components-react/src/MediaAnnotator/AttributeOverlay.tsx
import { useMemo } from 'react'; import styled from 'styled-components'; import { useTranslation } from '@labelu/i18n'; import { useMediaAnnotator } from './context'; const Wrapper = styled.div` position: absolute; top: 0; right: 0; z-index: 2; display: flex; flex-direction: column; font-size: 14px; m...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/MediaAnnotator/AnnotationBar/index.tsx
packages/components-react/src/MediaAnnotator/AnnotationBar/index.tsx
import type { Attribute, MediaAnnotationData, MediaFrame, MediaSegment } from '@labelu/interface'; import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; import { useTranslation } from '@labelu/i18n'; import { parseTime, secondsToMinute } from '../../utils'; import { Tooltip } 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/components-react/src/MediaAnnotator/AnnotationBar/style.ts
packages/components-react/src/MediaAnnotator/AnnotationBar/style.ts
import styled, { css } from 'styled-components'; import { darken, rgba } from 'polished'; import type { MediaAnnotationType } from '@labelu/interface'; export const Order = styled.div``; export const AttributeListItem = styled.span``; export const LabelTextWrapper = styled.div` max-width: 20em; max-height: 12em;...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/Modal/index.tsx
packages/components-react/src/Modal/index.tsx
import type { DialogProps } from 'rc-dialog'; import RcDialog from 'rc-dialog'; import 'rc-dialog/assets/index.css'; import styled, { css } from 'styled-components'; import { ReactComponent as CloseIcon } from './close.svg'; export interface ModalProps extends DialogProps { fullscreen?: boolean; } // @ts-ignore co...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/AttributeForm/index.tsx
packages/components-react/src/AttributeForm/index.tsx
import type { Attribute, AttributeOption, InnerAttributeType, StringType } from '@labelu/interface'; import type { Rule, ValidateErrorEntity } from 'rc-field-form/es/interface'; import type { FormProps, FormInstance } from 'rc-field-form'; import { useTranslation } from '@labelu/i18n'; import Form, { useForm, Field } 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/components-react/src/StatusCard/index.tsx
packages/components-react/src/StatusCard/index.tsx
import styled, { css } from 'styled-components'; import { useTranslation } from '@labelu/i18n'; import { ReactComponent as CheckSvgIcon } from './check.svg'; const CheckIconWithBg = styled(CheckSvgIcon)` position: absolute; top: 0.15rem; right: 0.15rem; font-size: 12px; z-index: 3; color: #fff; `; const ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/hooks/useLocalStorage.ts
packages/components-react/src/hooks/useLocalStorage.ts
import { useEffect, useState } from 'react'; export const useLocalStorage = (key: string, value: any) => { const [state, setState] = useState<any>(() => { try { const localStorageValue = localStorage.getItem(key); if (typeof localStorageValue !== 'string') { localStorage.setItem(key, JSON.str...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/hooks/useRedoUndo.ts
packages/components-react/src/hooks/useRedoUndo.ts
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; export interface RedoUndoOptions<T> { maxHistory?: number; onUndo?: (currentValue: T) => void; onRedo?: (currentValue: T) => void; } export interface RedoUndoState<T> { value: T; canUndo: boolean; canRedo: boolean; historyLength:...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/hooks/index.ts
packages/components-react/src/hooks/index.ts
export * from './useRedoUndo';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/HotkeyPanel/index.tsx
packages/components-react/src/HotkeyPanel/index.tsx
import styled, { css } from 'styled-components'; import type { CollapseProps } from 'rc-collapse'; import Collapse from 'rc-collapse'; import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from '@labelu/i18n'; import { ReactComponent as ArrowDown } from './arrow-down.svg'; import { ReactCompo...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/Toolbar/index.tsx
packages/components-react/src/Toolbar/index.tsx
import styled, { css } from 'styled-components'; import { useEffect, useState } from 'react'; import { useTranslation } from '@labelu/i18n'; import { getOS } from '../utils'; import { Divider } from '../Divider'; import { ReactComponent as UndoIcon } from './undo.svg'; import { ReactComponent as RedoIcon } from './red...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/FlexLayout/index.tsx
packages/components-react/src/FlexLayout/index.tsx
import React from 'react'; import styled, { css } from 'styled-components'; export interface BasicFlexBox extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> { flex?: 'column' | 'row' | boolean; full?: boolean; scroll?: boolean; padding?: React.CSSProperties['padding']; item...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/DraggableModal/index.tsx
packages/components-react/src/DraggableModal/index.tsx
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; import type { DraggableData, DraggableEvent } from 'react-draggable'; import Draggable from 'react-draggable'; import { createGlobalStyle } from 'styled-components'; import { Modal } from '../Modal'; con...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/EllipsisText/index.tsx
packages/components-react/src/EllipsisText/index.tsx
import { cloneElement, useLayoutEffect, useRef, useState } from 'react'; import type { TooltipProps } from 'rc-tooltip/lib/Tooltip'; import { Tooltip } from '../Tooltip'; export function EllipsisText({ children, title = '', maxWidth, ...restProps }: { children: React.ReactNode; title: React.ReactNode | ((...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/Tooltip/GlobalStyle.ts
packages/components-react/src/Tooltip/GlobalStyle.ts
import { createGlobalStyle } from 'styled-components'; export const tooltipPrefix = 'video-annotation-tooltip'; const GlobalStyle = createGlobalStyle` // Base class .${tooltipPrefix} { --shadow-width: 6px; --tooltip-opacity: 1; --tooltip-color: #fff; --tooltip-bg: rgba(0, 0, 0, var(--tooltip-opacity)); --to...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/Tooltip/index.tsx
packages/components-react/src/Tooltip/index.tsx
import RcTooltip from 'rc-tooltip'; import type { TooltipProps } from 'rc-tooltip/lib/Tooltip'; import GlobalStyle, { tooltipPrefix } from './GlobalStyle'; export function Tooltip(props: TooltipProps) { return ( <> <GlobalStyle /> <RcTooltip prefixCls={tooltipPrefix} {...props} /> </> ); }
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/VideoCard/index.tsx
packages/components-react/src/VideoCard/index.tsx
import React, { useCallback, useRef, useState } from 'react'; import type { CSSObject } from 'styled-components'; import styled from 'styled-components'; import { secondsToMinute } from '@/utils'; import MediaError from './Error'; import { ReactComponent as PlayIcon } from './play.svg'; import { StatusCard } from '.....
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/VideoCard/Error.tsx
packages/components-react/src/VideoCard/Error.tsx
import React from 'react'; import styled from 'styled-components'; import { ReactComponent as MediaErrorIcon } from './videoError.svg'; const StyledMediaError = styled.div` width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; .media-error-image { height: 50%; } `...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/HotkeyTable/index.tsx
packages/components-react/src/HotkeyTable/index.tsx
import styled from 'styled-components'; export interface TableColumn { title: string; key: string; } export interface HotkeyTableProps { columns: TableColumn[]; // TODO: type data: any[]; } const TableWrapper = styled.table` td { padding-right: 7.5rem; padding-left: 0.75rem; padding-top: 0.5r...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/components-react/src/AttributeTree/index.tsx
packages/components-react/src/AttributeTree/index.tsx
import type { EnumerableAttribute, InnerAttribute, TagAnnotationEntity, TextAnnotationEntity, TextAttribute, } from '@labelu/interface'; import type { CollapseProps } from 'rc-collapse'; import Collapse from 'rc-collapse'; import { useEffect, useMemo } from 'react'; import styled, { css } from 'styled-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/components-react/src/Divider/index.tsx
packages/components-react/src/Divider/index.tsx
import React from 'react'; import styled, { css } from 'styled-components'; const StyledDivider = styled.span<DividerProps>` ${({ direction, thickness = 1, space = 8 }) => direction === 'vertical' && css` display: inline-block; height: 100%; width: ${thickness}px; vertical-align: midd...
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-annotator-react/vite.config.ts
packages/image-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/image-annotator-react/src/ImageAnnotator.tsx
packages/image-annotator-react/src/ImageAnnotator.tsx
import styled from 'styled-components'; import { useHotkeys } from 'react-hotkeys-hook'; import { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'; import type { Attribute, ILabel, TextAnnotationType, TagAnnotationType, TextAttribute, EnumerableAttribute, } 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/image-annotator-react/src/vite-env.d.ts
packages/image-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/image-annotator-react/src/index.ts
packages/image-annotator-react/src/index.ts
export * from './ImageAnnotator'; export * from './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/image-annotator-react/src/Footer/index.tsx
packages/image-annotator-react/src/Footer/index.tsx
import styled from 'styled-components'; import { Tooltip } from '@labelu/components-react'; import { useTranslation } from '@labelu/i18n'; import { useHotkeys } from 'react-hotkeys-hook'; import { useCallback } from 'react'; import { tooltipStyle } from '@/Toolbar'; import Slider from '@/Toolbar/Slider'; import { Prop...
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-annotator-react/src/hooks/useImageAnnotator.ts
packages/image-annotator-react/src/hooks/useImageAnnotator.ts
import type { AnnotatorOptions } from '@labelu/image'; import { Annotator } from '@labelu/image'; import { useEffect, useLayoutEffect, useRef, useState } from 'react'; import ResizeObserver from 'resize-observer-polyfill'; export type ImageAnnotatorOptions = Omit<AnnotatorOptions, 'container'>; export const useImageA...
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-annotator-react/src/LabelSection/index.tsx
packages/image-annotator-react/src/LabelSection/index.tsx
import React, { createRef, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; import type { DraggableModalRef, ValidationContextType } from '@labelu/components-react'; import { Kbd, getOS, DraggableModel, AttributeForm, EllipsisText, FlexLayout } 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/image-annotator-react/src/Toolbar/ToolStyle.tsx
packages/image-annotator-react/src/Toolbar/ToolStyle.tsx
import styled from 'styled-components'; import { useCallback } from 'react'; import { useTranslation } from '@labelu/i18n'; // import { useAnnotator } from '@/context'; import { useTool } from '@/context/tool.context'; import Slider from './Slider'; import { ReactComponent as StrokeWidthIcon } from './assets/stroke-...
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-annotator-react/src/Toolbar/index.tsx
packages/image-annotator-react/src/Toolbar/index.tsx
import { Toolbar, Tooltip, HotkeyPanel } from '@labelu/components-react'; import { useHotkeys } from 'react-hotkeys-hook'; import styled from 'styled-components'; import { useTranslation } from '@labelu/i18n'; import type { ToolName } from '@labelu/image'; import { useCallback, useMemo } from 'react'; import { ReactCo...
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-annotator-react/src/Toolbar/hotkeys.const.tsx
packages/image-annotator-react/src/Toolbar/hotkeys.const.tsx
import { Kbd, getOS } from '@labelu/components-react'; import { i18n } from '@labelu/i18n'; import { ReactComponent as MouseRightClick } from './assets/mouse-right.svg'; import { ReactComponent as MouseLeftClick } from './assets/mouse-left.svg'; const os = getOS(); export default [ { label: i18n.t('general'), ...
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-annotator-react/src/Toolbar/Slider.tsx
packages/image-annotator-react/src/Toolbar/Slider.tsx
import { useRef, useState } from 'react'; import styled from 'styled-components'; const THUMB_WIDTH = 16; const Range = styled.div` position: relative; --range-width: 100%; --range-handle-color: #ffffff; --range-handle-size: ${() => `${THUMB_WIDTH}px`}; --range-track-color: #f7f7f7; --range-track-heigh...
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-annotator-react/src/AttributePanel/AsideAttributeItem.tsx
packages/image-annotator-react/src/AttributePanel/AsideAttributeItem.tsx
import styled, { css } from 'styled-components'; import { useCallback, useMemo } from 'react'; import { EllipsisText } from '@labelu/components-react'; import type { AnnotationData, ToolName } from '@labelu/image'; import { ReactComponent as EditIcon } from '@/assets/icons/edit.svg'; import { ReactComponent as DeleteI...
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-annotator-react/src/AttributePanel/index.tsx
packages/image-annotator-react/src/AttributePanel/index.tsx
import { useCallback, useEffect, useMemo, useState } from 'react'; import styled, { css } from 'styled-components'; import { AttributeTree, CollapseWrapper, AttributeTreeWrapper, EllipsisText, uid, Tooltip, FlexLayout, } from '@labelu/components-react'; import { useTranslation } from '@labelu/i18n'; impor...
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-annotator-react/src/context/sample.context.ts
packages/image-annotator-react/src/context/sample.context.ts
import type { ToolName, AnnotationData } from '@labelu/image'; import { createContext, useContext } from 'react'; import type { GlobalAnnotationPayload } from './annotation.context'; export interface ImageSample { id: string | number; name?: string; url: string; meta?: { width: number; height: number;...
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-annotator-react/src/context/tool.context.ts
packages/image-annotator-react/src/context/tool.context.ts
import type { ToolName, Annotator as ImageAnnotator, EditType } from '@labelu/image'; import type { EnumerableAttribute, TextAttribute, ILabel, Attribute } from '@labelu/interface'; import type { RefObject } from 'react'; import { createContext, useContext } from 'react'; import type { ImageAnnotatorOptions } from '.....
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-annotator-react/src/context/index.ts
packages/image-annotator-react/src/context/index.ts
export * from './annotation.context'; export * from './history.context'; export * from './sample.context'; export * from './tool.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/image-annotator-react/src/context/history.context.ts
packages/image-annotator-react/src/context/history.context.ts
import { createContext, useContext } from 'react'; import type { AllAnnotationMapping } from './annotation.context'; export interface HistoryContextType { redo: () => void; undo: () => void; pastRef: React.RefObject<AllAnnotationMapping[]>; futureRef: React.RefObject<AllAnnotationMapping[]>; } export const H...
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-annotator-react/src/context/annotation.context.ts
packages/image-annotator-react/src/context/annotation.context.ts
import type { AnnotationData, ToolName } from '@labelu/image'; import type { TextAnnotationEntity, TagAnnotationEntity, TextAnnotationType, TagAnnotationType, } from '@labelu/interface'; import { createContext, useContext } from 'react'; export type GlobalAnnotation = TextAnnotationEntity | TagAnnotationEntity...
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-annotator-react/src/Sidebar/index.tsx
packages/image-annotator-react/src/Sidebar/index.tsx
import { useCallback, useMemo, useState } from 'react'; import styled, { css } from 'styled-components'; import { ReactComponent as ExpandIcon } from '@/assets/icons/arrow.svg'; import { useSample } from '@/context/sample.context'; const Cards = styled.div` display: flex; flex-direction: column; padding: 1rem; ...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/video-annotator-react/vite.config.ts
packages/video-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/video-annotator-react/src/Annotator.tsx
packages/video-annotator-react/src/Annotator.tsx
import VideoAnnotator from '@labelu/video-react'; import '@labelu/video-react/dist/style.css'; import { forwardRef } from 'react'; import { MediaAnnotatorWrapper } from '@labelu/audio-annotator-react'; import type { AudioAndVideoAnnotatorRef, AnnotatorProps } from '@labelu/audio-annotator-react'; function ForwardAnnot...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/video-annotator-react/src/vite-env.d.ts
packages/video-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/video-annotator-react/src/index.ts
packages/video-annotator-react/src/index.ts
export * from './Annotator';
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
opendatalab/labelU-Kit
https://github.com/opendatalab/labelU-Kit/blob/6ed8ca2adc09525ba712eb73227f2a4e2cecb81a/packages/video-annotator-react/src/Sidebar/index.tsx
packages/video-annotator-react/src/Sidebar/index.tsx
import { useCallback, useState } from 'react'; import styled, { css } from 'styled-components'; import { useSample } from '@labelu/audio-annotator-react'; import { VideoCard } from '@labelu/components-react'; import { ReactComponent as ExpandIcon } from '@/assets/icons/arrow.svg'; const Cards = styled.div` display:...
typescript
Apache-2.0
6ed8ca2adc09525ba712eb73227f2a4e2cecb81a
2026-01-05T04:58:37.178097Z
false
riyadhalnur/node-base64-image
https://github.com/riyadhalnur/node-base64-image/blob/5af04cfc718ccac6ad07b605d1b52d21e4501c25/src/index.ts
src/index.ts
import axios from 'axios'; import { readFile, writeFile } from 'fs'; import { promisify } from 'util'; const read = promisify(readFile); const write = promisify(writeFile); export interface EncodeOptions { string?: boolean; local?: boolean; timeout?: number; headers?: { [key: string]: string | number; }...
typescript
MIT
5af04cfc718ccac6ad07b605d1b52d21e4501c25
2026-01-05T04:59:34.525061Z
false
riyadhalnur/node-base64-image
https://github.com/riyadhalnur/node-base64-image/blob/5af04cfc718ccac6ad07b605d1b52d21e4501c25/test/base64-image.spec.ts
test/base64-image.spec.ts
import { encode, decode } from '../src/index'; describe('Base64 Image Decode/Encode', () => { describe('Encode', () => { it('should return an error if url is null or undefined', async () => { await expect(encode('', {})).rejects.toThrow('URL is a required parameter'); }); it('should return an erro...
typescript
MIT
5af04cfc718ccac6ad07b605d1b52d21e4501c25
2026-01-05T04:59:34.525061Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/vitest.config.ts
vitest.config.ts
import { defineConfig } from 'vitest/config'; import BrowserCommands from './tests/scripts/compare-command'; const instances = [{ browser: 'webkit' }]; export default defineConfig({ plugins: [BrowserCommands()], publicDir: './tests/stories/public/', test: { include: ['tests/**/*.test.?(m)[jt]s?(x)...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/.storybook/preview.ts
.storybook/preview.ts
import './styles.css'; import { type Preview } from '@storybook/react'; const preview: Preview = { parameters: { layout: 'fullscreen', }, }; export default preview;
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/.storybook/vitest.setup.ts
.storybook/vitest.setup.ts
import { beforeAll } from 'vitest'; import * as previewAnnotations from './preview'; import { setProjectAnnotations } from '@storybook/react'; const annotations = setProjectAnnotations([previewAnnotations]); // Run Storybook's beforeAll hook beforeAll(annotations.beforeAll);
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/.storybook/manager.ts
.storybook/manager.ts
import './manager.css'; import { addons } from '@storybook/manager-api'; import { create } from '@storybook/theming'; addons.setConfig({ theme: create({ base: 'dark', colorPrimary: '#e91e63', colorSecondary: '#e91e63', appBorderRadius: 4, fontCode: 'monospace', // in...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/.storybook/main.ts
.storybook/main.ts
import { type StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { framework: '@storybook/react-vite', // 👈 Add this stories: ['../tests/**/*.@(stories.@(tsx))'], staticDirs: ['../tests/stories/public/'], }; export default config;
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/yoga.ts
src/yoga.ts
import { type Config, type loadYoga } from 'yoga-layout/load'; export type Yoga = Awaited<ReturnType<typeof loadYoga>>; let yoga: Yoga; /** * Get the Yoga instance. * Yoga is a dynamically loaded module, so it is not available until it is loaded. */ export function getYoga(): Yoga { return yoga; } /** * Set...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/index.ts
src/index.ts
import { extensions } from 'pixi.js'; import { LayoutSystem } from './core/LayoutSystem'; import './core/mixins/ContainerMixin'; import './core/mixins/TextMixin'; import './core/mixins/ViewContainerMixin'; // layout export * from './core/debug/DebugRenderer'; export * from './core/Layout'; export * from './core/Layout...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/LayoutContainer.ts
src/components/LayoutContainer.ts
import { Container, type ContainerChild, type ContainerOptions, type DestroyOptions, Graphics, Rectangle, Ticker, } from 'pixi.js'; import { BoxSizing, Edge } from 'yoga-layout/load'; import { type ComputedLayout } from '../core/types'; import { Trackpad, type TrackpadOptions } from './track...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/LayoutView.ts
src/components/LayoutView.ts
import { Container, type ContainerChild, type IRenderLayer } from 'pixi.js'; import { type Layout, type LayoutOptions } from '../core/Layout'; import { LayoutContainer, type LayoutContainerOptions } from './LayoutContainer'; export interface LayoutViewOptions<T extends Container = Container> extends LayoutContainerOpt...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/index.ts
src/components/index.ts
export * from './LayoutContainer'; export * from './LayoutView'; export * from './pixi/gif'; export * from './pixi/graphics'; export * from './pixi/mesh'; export * from './pixi/sprite'; export * from './pixi/text'; export * from './trackpad/ScrollSpring'; export * from './trackpad/SlidingNumber'; export * from './track...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/trackpad/Trackpad.ts
src/components/trackpad/Trackpad.ts
import { Point, Rectangle } from 'pixi.js'; import { type ConstrainEase, SlidingNumber } from './SlidingNumber'; /** * Configuration options for the Trackpad component */ export interface TrackpadOptions { /** Custom easing function for x-axis constraint bouncing */ xEase?: ConstrainEase; /** Custom easi...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/trackpad/Spring.ts
src/components/trackpad/Spring.ts
/** * Configuration options for the Spring physics simulation */ export interface SpringOptions { /** Maximum velocity the spring can move. Default: 160 */ max?: number; /** Damping factor to control oscillation decay. Default: 0.8 */ damp?: number; /** Spring tension/stiffness factor. Default: 0....
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/trackpad/ScrollSpring.ts
src/components/trackpad/ScrollSpring.ts
import { type ConstrainEase } from './SlidingNumber'; import { Spring } from './Spring'; /** * ScrollSpring implements a physics-based spring animation for smooth scrolling transitions. * It handles both momentum-based movement and spring-to-target behavior when reaching constraints. * * Features: * - Smooth spri...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/trackpad/SlidingNumber.ts
src/components/trackpad/SlidingNumber.ts
import { ScrollSpring } from './ScrollSpring'; /** * Options for configuring the SlidingNumber behavior */ export interface SlidingNumberOptions { /** Whether to constrain the value between min and max. Default: true */ constrain?: boolean; /** Percentage of overflow allowed when dragging beyond constrai...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/graphics.ts
src/components/pixi/graphics.ts
import { Graphics as PixiGraphics, GraphicsContext } from 'pixi.js'; import { BaseView, type ViewOptions } from './base'; /** * A specialized wrapper around the PixiJS Graphics class that implements leaf node behavior similar to HTML elements * that supports additional layout properties. * e.g objectFit, objectPosi...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/sprite.ts
src/components/pixi/sprite.ts
import { AnimatedSprite as PixiAnimatedSprite, NineSliceSprite as PixiNineSliceSprite, Sprite as PixiSprite, Texture, TilingSprite as PixiTilingSprite, type TilingSpriteOptions, } from 'pixi.js'; import { BaseView, type ViewOptions } from './base'; /** * A specialized wrapper around the PixiJS...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/base.ts
src/components/pixi/base.ts
import { type Container } from 'pixi.js'; import { LayoutView, type LayoutViewOptions } from '../LayoutView'; export type ViewOptions = Omit<LayoutViewOptions, 'slot'>; type BaseViewOptions = ViewOptions & { ClassType: new (...args: any[]) => Container }; export abstract class BaseView<T extends Container> extends La...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/gif.ts
src/components/pixi/gif.ts
import { GifSource, GifSprite as PixiGifSprite, type GifSpriteOptions } from 'pixi.js/gif'; import { BaseView, type ViewOptions } from './base'; /** * A specialized wrapper around the PixiJS GifSprite class that implements leaf node behavior similar to HTML elements * that supports additional layout properties. * e...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/text.ts
src/components/pixi/text.ts
import { BitmapText as PixiBitmapText, HTMLText as PixiHTMLText, type HTMLTextOptions, Text as PixiText, type TextOptions, } from 'pixi.js'; import { BaseView, type ViewOptions } from './base'; /** * A wrapper around the PixiJS Text class that supports additional layout properties. * e.g backgrou...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/components/pixi/mesh.ts
src/components/pixi/mesh.ts
import { type Geometry, Mesh as PixiMesh, type MeshGeometry, type MeshOptions, MeshPlane as PixiMeshPlane, MeshRope as PixiMeshRope, MeshSimple as PixiMeshSimple, PerspectiveMesh as PixiPerspectiveMesh, type Shader, type TextureShader, } from 'pixi.js'; import { BaseView, type Vi...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/devtool/propertiesPlugin.ts
src/devtool/propertiesPlugin.ts
import { type LayoutStyles } from '../core/style/layoutStyles'; import type { Container } from 'pixi.js'; import type { Properties, PropertiesEntry, PropertiesExtension } from '@pixi/devtools'; function updateNodeFlex(props: Partial<LayoutStyles>, node: Container) { node.layout = props; } function createProperty...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/devtool/overlayPlugin.ts
src/devtool/overlayPlugin.ts
import { Point, Rectangle } from 'pixi.js'; import { calculateRegions, type DebugRegions, DebugRegionType } from '../core/debug/calculateDebugRegions'; import type { OverlayExtension } from '@pixi/devtools'; const regions: DebugRegions = new Map(); const point = new Point(); Object.values(DebugRegionType).forEach((t...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/devtool/treePlugin.ts
src/devtool/treePlugin.ts
import type { Container } from 'pixi.js'; import type { PixiMetadata, TreeExtension } from '@pixi/devtools'; export interface DevtoolFlexContainer extends Container { __devtoolLayoutDefaults?: any; } function flashNode(node: Container) { const originalAlpha = node.alpha; // repeatedly set the alpha to 0.1...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/devtool/index.ts
src/devtool/index.ts
import { overlayPlugin } from './overlayPlugin'; import { propertiesPlugin } from './propertiesPlugin'; import { treePlugin } from './treePlugin'; export * from './overlayPlugin'; export * from './propertiesPlugin'; export * from './treePlugin'; interface Devtools { __PIXI_DEVTOOLS__: { extensions: any[];...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/tailwind/index.ts
src/tailwind/index.ts
export * from './ptw';
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/tailwind/ptw.ts
src/tailwind/ptw.ts
import { type YogaStyles } from '../core/style/yogaStyles'; class TailwindParser { private static readonly BASE_UNIT = 4; private static readonly SPACING_MAP = { p: 'padding', px: ['paddingLeft', 'paddingRight'], py: ['paddingTop', 'paddingBottom'], pt: 'paddingTop', pr...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/Layout.ts
src/core/Layout.ts
import { type Container } from 'pixi.js'; import { type Node } from 'yoga-layout'; import { type OverflowContainer } from '../components/LayoutContainer'; import { getYoga, getYogaConfig } from '../yoga'; import { applyStyle } from './style/applyStyle'; import { formatStyles } from './style/formatStyles'; import { type...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/types.ts
src/core/types.ts
import { type YogaStyles } from './style/yogaStyles'; import type { LayoutStyles } from './style/layoutStyles'; /** * Layout dimension and style properties for elements. * This is calculated using yoga layout engine. */ export interface ComputedLayout { /** The left value of the view */ left: number; /...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/LayoutSystem.ts
src/core/LayoutSystem.ts
import { type Container, ExtensionType, type System } from 'pixi.js'; import { Direction, loadYoga } from 'yoga-layout/load'; import { type OverflowContainer } from '../components/LayoutContainer'; import { getYoga, setYoga, setYogaConfig } from '../yoga'; import { calculatePositionSpecifier } from './mixins/utils/calc...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/style/layoutStyles.ts
src/core/style/layoutStyles.ts
import { type NumberValue, type PositionSpecifier } from '../types'; import { type YogaStyles } from './yogaStyles'; import type { ColorSource } from 'pixi.js'; /** * All styles for layout elements */ export interface LayoutStyles extends Omit<YogaStyles, 'width' | 'height'> { /** * Element width in pixels...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/style/formatStyles.ts
src/core/style/formatStyles.ts
import { ViewContainer } from 'pixi.js'; import { Layout } from '../Layout'; import { getPixiSize } from '../utils/getPixiSize'; import { type LayoutStyles } from './layoutStyles'; import { type YogaStyles } from './yogaStyles'; /** * Formats the layout styles for the layout * @param layout - The layout to format th...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/style/yogaStyles.ts
src/core/style/yogaStyles.ts
import { type NumberValue } from '../types'; /** * Yoga specific styles for layout elements */ export interface YogaStyles { /** * How content is distributed between and around items along cross-axis * @values 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch' */ ...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/style/applyStyle.ts
src/core/style/applyStyle.ts
import { Align, BoxSizing, Direction, Display, Edge, FlexDirection, Gutter, Justify, type Node as YogaNode, Overflow, PositionType, Wrap, } from 'yoga-layout/load'; import { type AlignContent, type AlignItems, type AlignSelf, type JustifyContent, type YogaStyles } from '....
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/utils/throttle.ts
src/core/utils/throttle.ts
interface DebounceSettings { /** Specify invoking on the leading edge of the timeout. */ leading?: boolean | undefined; /** The maximum time func is allowed to be delayed before it's invoked. */ maxWait?: number | undefined; /** Specify invoking on the trailing edge of the timeout. */ trailing?:...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/utils/nearlyEqual.ts
src/core/utils/nearlyEqual.ts
/** * Check if two numbers are nearly equal. * @param a - The first number. * @param b - The second number. * @param EPSILON - The epsilon value. * @returns True if the numbers are nearly equal, false otherwise. */ export function nearlyEqual(a: number, b: number, EPSILON = 0.49) { return Math.abs(a - b) < EP...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/utils/getNumberFromStyle.ts
src/core/utils/getNumberFromStyle.ts
import { type NumberValue, type PositionKeyword } from '../types'; /** * Converts a style value to a number. If the value is a percentage string, * it calculates the number based on the given size. * * @param value - The style value to convert. It can be a number or a percentage string (e.g., '50%'). * @param siz...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/utils/sort-children.ts
src/core/utils/sort-children.ts
import { type Container } from 'pixi.js'; import { type OverflowContainer } from '../../components/LayoutContainer'; import { type Layout } from '../Layout'; /** * Sorts the children of the layout based on their order in the parent container * syncing the Yoga tree with the Pixi display list. */ export function onC...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/utils/getPixiSize.ts
src/core/utils/getPixiSize.ts
import { type Size } from 'pixi.js'; import { type Layout } from '../Layout'; const temp = { width: 0, height: 0 }; /** * Retrieves the absolute size of a PixiJS container * @param layout - The layout to retrieve the size from * @returns The size of the PixiJS container */ export function getPixiSize(layout: Layo...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/mixins/ViewContainerMixin.ts
src/core/mixins/ViewContainerMixin.ts
import { extensions, type ObservablePoint, ViewContainer } from 'pixi.js'; import { type ComputedLayout } from '../types'; import { baseComputeLayoutData } from './utils/baseComputeLayoutData'; const mixin: Partial<ViewContainer> = { /** * Computes the layout data for the container * @param computedLayou...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/mixins/TextMixin.ts
src/core/mixins/TextMixin.ts
import { AbstractText, extensions, Point, type TextString } from 'pixi.js'; import { type ComputedLayout } from '../types'; import { calculateObjectFit } from './utils/calculateObjectFit'; import { calculatePositionSpecifier } from './utils/calculatePositionSpecifier'; const tempScale = new Point(0, 0); const mixin: P...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/mixins/ContainerMixin.ts
src/core/mixins/ContainerMixin.ts
import { Container, extensions } from 'pixi.js'; import { Layout, type LayoutOptions } from '../Layout'; import { type ComputedLayout } from '../types'; import { baseComputeLayoutData } from './utils/baseComputeLayoutData'; /** * Extended interface for Container with private properties needed for layout * Provides t...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/mixins/utils/calculatePositionSpecifier.ts
src/core/mixins/utils/calculatePositionSpecifier.ts
import { type PointData, type Size } from 'pixi.js'; import { type ComputedLayout, type NumberValue, type PositionKeyword, type PositionSpecifier } from '../../types'; import { calculateWithDoubleValue } from './position/calculateWithDoubleValue'; import { calculateWithQuadValue } from './position/calculateWithQuadValu...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false
pixijs/layout
https://github.com/pixijs/layout/blob/f0ced1302fecf1cdfa933864da41428a4c795ab3/src/core/mixins/utils/baseComputeLayoutData.ts
src/core/mixins/utils/baseComputeLayoutData.ts
import { type Container, NineSliceSprite, type ObservablePoint, TilingSprite, type ViewContainer } from 'pixi.js'; import { type LayoutStyles } from '../../style/layoutStyles'; import { type ComputedLayout, type ComputedPixiLayout } from '../../types'; import { calculateObjectFit } from './calculateObjectFit'; import {...
typescript
MIT
f0ced1302fecf1cdfa933864da41428a4c795ab3
2026-01-05T04:59:31.180800Z
false