sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
ee30fc47bd55a48036810522d525af358fdd3fdf7ccfe5dc50dda134e210e9d3 | TypeScript | 5,395 | 140 | /**
* The committed-store contract the engine federates; {@link SampleLabelStore}
* and the frame-indexed `FrameStore` implement it. Stores never know about
* each other.
*/
import type { JSONDeltas, LabelData, LabelType } from "@fiftyone/utilities";
/**
* Options threaded from the persist caller down to each st... |
4f9df7acf25dd7173f1d1b8dde4e738509df67b1be5be6ea6656804d103988cf | TypeScript | 5,444 | 182 | import type { Quaternion, Vector3 } from "three";
export interface EpisodeFrameTransformPolicy {
readonly boundaryClampNs: bigint;
}
export type EpisodeFrameTransformResolutionKind =
| "identity"
| "static"
| "exact"
| "interpolated"
| "held"
| "clamped";
/** Why a requested frame transform could not b... |
31efa61f2064ce26dd6a131b427cc291222a76d09b2bb9ef2af3045187d2bbe8 | TypeScript | 5,462 | 165 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
getFieldSchema,
useAnnotationEngine,
useDeleteAnnotation,
} from "@fiftyone/annotation";
import { DetectionOverlay, useLighter } from "@fiftyone/lighter";
import * as fos from "@fiftyone/state";
import { atom, useAtom, useAtomValue } from "jotai";
import { u... |
3c7ddaaabce49937363ee96fdfe6bf494ef702871466715b5a296eb1d18743c7 | TypeScript | 5,469 | 140 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { OverlayFactory } from "./overlay/OverlayFactory";
// Core exports
export { CoordinateSystem2D } from "./core/CoordinateSystem2D";
export { Scene2D } from "./core/Scene2D";
export type { Scene2DConfig } from "./core/SceneConfig";
// Renderer exports
export { Mock... |
967b2434021686dbc23f043ce7dd7cc2c2be8658263e7f3812a8762d996c930e | TypeScript | 5,475 | 178 | import { isPlayPendingAtom } from "@fiftyone/playback/runtime";
import { getStreamValue, setIsBuffering } from "@fiftyone/playback/runtime";
import type { PlaybackStore } from "@fiftyone/playback/runtime";
import { createStore } from "jotai";
import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } ... |
c41ae268a2b2b808611846d8571cdee2435a53089648b4f5baa1f7cf40b1bed2 | TypeScript | 5,488 | 168 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
/**
* @vitest-environment jsdom
*/
import { renderHook, act } from "@testing-library/react";
import { describe, it, expect } from "vitest";
import { useLoadTrigger, type LoaderState } from "./useLoadTrigger";
describe("useLoadTrigger", () => {
describe("first load beh... |
65eb1a592dfe5ed3cc51a97253f80b8bdb2b290a84d7693efb7b4d581088bee0 | TypeScript | 5,493 | 181 | import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { createDebouncedNavigator } from "./debouncedNavigator";
describe("createDebouncedNavigator", () => {
let navigateFn: ReturnType<typeof vi.fn>;
let onNavigationStart: ReturnType<typeof vi.fn>;
let isNavigationIllegalWhen: ReturnTyp... |
90b081c0192a8e5916c90f7777a6b0831c219dd32ba835d7e0e1560d24f10e96 | TypeScript | 5,518 | 215 | import * as THREE from "three";
export const CUBOID_RESIZE_FACES = [
"+x",
"-x",
"+y",
"-y",
"+z",
"-z",
] as const;
export type CuboidResizeFace = (typeof CUBOID_RESIZE_FACES)[number];
export const MIN_CUBOID_FACE_RESIZE_DIMENSION = 1e-6;
const FACE_TO_AXIS: Record<
CuboidResizeFace,
{ axis: 0 | 1 ... |
a4c3e59e1ac40e3f16e4193fcf5db85aec8933263049c85f512112620a6fe9f4 | TypeScript | 5,518 | 171 | import type { ImageTextureMesh } from "../../../../visualization/media-2d/Base2dScene";
import type { ImagePixelTransform } from "../../../../visualization/media-2d/image-pixel-transform";
import {
projectCameraPoint,
unprojectCameraPixel,
type CameraModel,
type PinholeCameraModel,
} from "./camera-model";
con... |
3d84faccd1555798af0972eb0c9f15b07c94fd7ffc0b34f135520b5bfe2e6aa8 | TypeScript | 5,522 | 205 | import type { DecodeContext } from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
RgbaColor,
SceneArrowPrimitive,
SceneLinePrimitive,
ScenePoint3d,
ScenePose3d,
} from "../../../../ir/index";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import {
decodePos... |
e9f9c6497dbb516917091047b57b93ebb8c3fb39587aab638fbbb4501cb8bd02 | TypeScript | 5,525 | 150 | // @vitest-environment jsdom
import { renderHook, waitFor } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { fetchMasks, type Masks } from "./protocol";
import { useMasks } from "./useMasks";
vi.mock("./protocol", () => ({ fetchMasks: vi.fn() }));
const masks = (partial: Part... |
424dede65c8f2284b03f95daec16cd26b3fc297edb23b93b927864644f91c7fc | TypeScript | 5,528 | 189 | import { afterEach, describe, expect, it, vi, type Mock } from "vitest";
import { MCAP_PLAYBACK_WORKER_PRIORITY } from "./playback-worker-types";
import type { McapGridPreviewResult } from "../resource-client/grid-preview";
import type { McapGridPreviewWorkerRequest } from "./grid-preview-worker-types";
type WorkerCli... |
a68c4b62c980622a3f3b51f890462381066963d8ff5c0440075a7745618fa9c0 | TypeScript | 5,548 | 142 | import type { SelectionScope } from "@fiftyone/state/src/selection/client";
import type {
SelectionUnit,
ViewConversion,
} from "@fiftyone/state/src/selection/model";
import type {
EpisodeSelection,
SelectionBoundary,
SelectionCounts,
SelectionMember,
} from "@fiftyone/state/src/selection/types";
import typ... |
8eeb914bbcdbca59ea923499b4b82110f4ecbae93698868db252b1ada6715cff | TypeScript | 5,552 | 185 | const DEFAULT_MAX_UPDATES_PER_SECOND = 30;
/** Timing primitives used by the map playback controller. */
export interface MapPlaybackScheduler {
cancelAnimationFrame(frame: number): void;
clearTimeout(timer: ReturnType<typeof setTimeout>): void;
now(): number;
requestAnimationFrame(callback: (now: number) => v... |
3cef0fc95467f9412bb5e75d8443cb20de25c40930ea2b25f930ebc8e56543e8 | TypeScript | 5,561 | 197 | import {
type Schema,
type Stage,
sizeBytesEstimate,
} from "@fiftyone/utilities";
import { LRUCache } from "lru-cache";
import { v4 as uuid } from "uuid";
import type { Coloring, CustomizeColor } from "..";
import {
CHUNK_SIZE,
MAX_FRAME_STREAM_SIZE,
MAX_FRAME_STREAM_SIZE_BYTES,
} from "../constants";
impo... |
b8c8fc84e165c618af4b2eccb1741a9e439ab35487701178911feccf175d396c | TypeScript | 5,576 | 167 | import type { NumericStreamFields } from "../../../ir";
import { numericSeriesKey } from "../../../runtime";
import {
createSeriesLabelTable,
remapSeriesLabelCodes,
type SeriesLabelTable,
} from "../../../utils/numeric-series-labels";
import { nsDeltaToSeconds } from "../../../utils/nanoseconds";
/** Held-state ... |
6dc5fd6ac351d43975c59505678b644d0cf98575b9692fa91806a674e78b13a8 | TypeScript | 5,582 | 171 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../ir/index";
import {
foxgloveCompressedVideoCdrDecoders,
foxgloveCompressedVideoDecoder,
} from "./foxglove/index";
import {
COMPRESSED_VIDEO_SCHEMA_DATA,
H264_KEYFRAME_BYTES,
ROS2_COMPRESSED_VIDEO_SCHEMA,
ROS2_IDL_CO... |
6a5eabe74c11507282691669c73bdf8637a2955846dcb65d1142545104d1347a | TypeScript | 5,598 | 166 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../ir/index";
import {
foxgloveCompressedImageCdrDecoders,
foxgloveCompressedImageDecoder,
} from "./foxglove/index";
import { COMPRESSED_IMAGE_FIXTURE } from "./foxglove.test-fixtures";
import {
ROS2_COMPRESSED_IMAGE_SCHEMA,... |
d03fb6a4be5addc598d85e9f533ee9a303cd30fb43445057503b4b2399ea2b68 | TypeScript | 5,605 | 191 | import { describe, expect, it, vi } from "vitest";
import { VideoLooker } from "../lookers/video";
import { VideoElement } from "./video";
const idleState = (frameNumber: number) =>
({
options: { loop: false, volume: 0, playbackRate: 1 },
config: { frameRate: 10, thumbnail: true },
frameNumber,
seeki... |
106065a9fa0acd299487112371eb72f6048a6b7cea5adff95c096d7bfabdc6d0 | TypeScript | 5,606 | 166 | import { renderHook } from "@testing-library/react";
import * as THREE from "three";
import { describe, expect, it, vi } from "vitest";
import { useDisplayCuboidTransform } from "./useDisplayCuboidTransform";
const { useTransientCuboidMock, useTransformModeMock } = vi.hoisted(() => ({
useTransientCuboidMock: vi.fn()... |
761ca45a4c3334f57719381f6ad9d398e66bf2d086221cd28efb8e36348cfcce | TypeScript | 5,614 | 189 | import {
SCENE_SOURCE_METADATA,
SCENE_SOURCE_TYPE,
type SceneSource,
type SceneSourceType,
} from "../../../ir/index";
import {
PlaybackSyncMode,
type StreamInventory,
} from "../../../schemas/v1/index";
import {
chooseCalibrationStream,
streamPrefix,
} from "../../../stream-selection/index";
import {
... |
48d754b6fff3bfc16cb21ddd9478435a4dc3f772735afd5c8be3a6ddd2908396 | TypeScript | 5,637 | 200 | import type { AnnotationLabel } from "@fiftyone/state";
import {
CLASSIFICATION,
CLASSIFICATIONS,
DETECTION,
DETECTIONS,
KEYPOINT,
KEYPOINTS,
POLYLINE,
POLYLINES,
} from "@fiftyone/utilities";
import { atom } from "jotai";
import { atomFamily } from "jotai/utils";
import {
fieldType,
isFieldReadOnly... |
09d52c0cce0498b73fad915757837cc12ac128d8fc09dd9a149fd3d41c0c0008 | TypeScript | 5,648 | 193 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import { decodeProtobufMessage } from "./protobuf/index";
import { foxgloveSceneUpdateDecoder } from "./scene-update";
vi.mock("./protobuf/index", () => ({
decodeProtobufMessage: vi.fn(),
}));
... |
34dd777282acbfc4a1eb97ad8d59823588150a84b4d742187063dd6fe31d1749 | TypeScript | 5,658 | 175 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { describe, expect, test } from "vitest";
import { deserialize } from "@fiftyone/looker/src/numpy";
import { encodeMaskData } from "./maskEncoding";
/**
* Real mask from an existing FiftyOne detection (base64-encoded,
* zlib-compressed numpy uint8 array).
*/
con... |
9600ae64dca0431b3b73deea821f2a8f38c82b86146ac96604b8d2e68c22437c | TypeScript | 5,660 | 173 | import type {
CameraCalibrationVisualization,
DecodedDiagnostic,
} from "../../../../ir";
import type { StreamPlaybackFrame } from "../../playback/use-stream-values";
import type { UnresolvedPoseUsage } from "../../status/health";
export type CameraCalibrationStatus = "available" | "loading" | "unavailable";
expo... |
b5e0909201992ab90f4cff7c391e933b2246867161bcd9261ca14e5056563753 | TypeScript | 5,693 | 138 | // ---------------------------------------------------------------------------
// The consumer half of the streaming audio path: an `AudioWorkletProcessor`
// that pulls interleaved PCM out of the shared ring and writes it to the
// output bus.
//
// This runs on the audio render thread under a hard real-time deadline ... |
d077b544894772d54b3f6465c033f747549a73ef3cb61ec5e830735adf716666 | TypeScript | 5,712 | 183 | import { resolveOperatorURI } from "@fiftyone/operators/src/operators";
import * as fos from "@fiftyone/state";
import { getEventSource } from "@fiftyone/utilities/src/fetch";
import { EventSourceMessage } from "@microsoft/fetch-event-source";
import { useCallback, useEffect, useRef, useState } from "react";
import { u... |
eb65b72a376d26e89d1642d5aa031f25406532f015ac5379708db3c88bffc2c6 | TypeScript | 5,734 | 249 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
get32BitColor,
getColor,
getRGBA,
getRGBAColor,
sizeBytesEstimate,
} from "@fiftyone/utilities";
import { ARRAY_TYPES, TypedArray } from "../numpy";
import { BaseState, Coordinates } from "../state";
import { isFloatArray } from "../util";
import { clampe... |
a2bb9d9fcac2eca5ca380adac6fdc4ee0677448de7d2e93363c813f370c820d7 | TypeScript | 5,738 | 199 | import { useLoader } from "@react-three/fiber";
import { useEffect, useRef, useState } from "react";
import { useFo3dContext } from "../fo3d/context";
function ensureArray(value) {
if (Array.isArray(value)) {
return value;
} else {
return [value];
}
}
type CredentialAwareLoader = {
manager?: unknown;
... |
991538fc475a431417ea0783a74d528d256e31bfb8f1f2e6e915fe429c0403a9 | TypeScript | 5,743 | 183 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
SegmentationTool,
SegmentationToolMode,
SegmentationToolShape,
type SegmentationToolState,
} from "@fiftyone/core/src/components/Modal/Sidebar/Annotate/Edit/useSegmentationMode";
import { describe, expect, it } from "vitest";
import { buildBrushCursor } fr... |
2707c90b4a4a6867d439fb0da0c7b2e7a4b11bed33edcbb18d1fd5b072c25dc7 | TypeScript | 5,762 | 169 | import { describe, expect, it } from "vitest";
import { legendLabels, onLabels, soloLabel, toggleLabel } from "./legendFilter";
const LABELS = ["cat", "dog", "bird"];
describe("onLabels", () => {
it("treats no filter as every class on", () => {
expect(onLabels(null, LABELS)).toEqual(new Set(LABELS));
expect... |
41fda46d48610e1675c90a4164b8a7ae9931b8daf340d37c0de0cfc2b3de3686 | TypeScript | 5,790 | 203 | import { afterEach, describe, expect, it, vi } from "vitest";
import type {
McapGridPreviewWorkerRequest,
McapGridPreviewWorkerResponse,
McapGridPreviewWorkerRpcRequest,
} from "../worker/grid-preview-worker-types";
import {
getMcapGridPreviewPool,
resetMcapGridPreviewPoolForTests,
} from "./grid-preview-pool... |
18bdad0775c0f52d1b05bd05017dfc051489223dec2ec0151f335b8291d4969f | TypeScript | 5,795 | 199 | import { describe, expect, it, vi } from "vitest";
import { createUndoNavigator, makeEngine, ref } from "../testing/fixtures";
import { encodeEntityId } from "../identity/entityId";
import { GEOMETRY_SIGNAL, type GeometrySignal } from "./geometry";
const DATASET = "dataset-1";
const cuboidSample = {
ground_truth: ... |
709d231367dbe117182b51f3b8281a78ad93f8fd2027c20c77c35c50b5e161c7 | TypeScript | 5,808 | 171 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { describe, expect, it } from "vitest";
import { CoordinateSystem2D } from "../core/CoordinateSystem2D";
import { MockRenderer2D } from "../renderer/MockRenderer2D";
import type { Point } from "../types";
import { NO_BOUNDS } from "./DetectionOverlay";
import { Mask... |
13f065e99a0cd56ee6cf88eb4721a9cd31c016e998514021a949485237609249 | TypeScript | 5,820 | 196 | import { it, describe, vi, beforeEach, expect, afterEach } from "vitest";
import { CommandContext } from "./CommandContext";
import { DelegatingUndoable, Undoable } from "../actions";
describe("CommandContext", () => {
let context: CommandContext;
let testExec: () => Promise<void>;
let testUndo: () => Promise<vo... |
ce8c614fbe7c23034e2ff8cec0675c42f068948b4f540076d8e360945edd80d2 | TypeScript | 5,823 | 239 | import { SxProps } from "@mui/material";
import { SchemaViewType, ViewPropsType } from "./types";
const CSS_UNIT_PATTERN =
/(\d+)(cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)$/;
export function parseSize(
value: number | string,
max?: number,
defaultUnit?: string,
) {
const valueIsNumber = typeof value... |
6085a3ccf8e9eafa56adfab078e94eefcf9e02403859afb883b793d501a92144 | TypeScript | 5,834 | 239 | import {
BufferGeometry,
Float32BufferAttribute,
Uint16BufferAttribute,
} from "three";
import { describe, expect, it } from "vitest";
import {
extractPlyHeaderText,
inferPlyHeaderIsGaussianSplat,
readPlyHeaderText,
} from "./ply-splat-detection";
import { inferPlyIsPointCloud } from "./Ply";
const buildGe... |
c901c4d4f6ae0cfd056609b5fb3449dfe69989e0605529d7a0393d7965dde1e0 | TypeScript | 5,852 | 170 | import * as fos from "@fiftyone/state";
import {
GroupVisibilityConfigSnapshot,
ModalMode,
useModalMode,
} from "@fiftyone/state";
import { useCallback, useEffect, useRef } from "react";
import {
useRecoilCallback,
useRecoilState,
useRecoilValue,
useSetRecoilState,
} from "recoil";
import { useApplyAnnota... |
03a1bf25dbc5cb93a42abdcbf9c44d0ebd9977198490c71552c4f1ba243dccd5 | TypeScript | 5,857 | 189 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../ir/index";
import { rosCompressedImageDecoders } from "./ros/index";
import {
H264_KEYFRAME_BYTES,
ROS2_COMPRESSED_IMAGE_SCHEMA,
ROS2_IDL_COMPRESSED_IMAGE_SCHEMA,
TEXT_ENCODER,
decoderForSchemaEncoding,
ros2IdlMessag... |
a676d2e7203d4c29b18150cb81bf9eee214b1a344cb9581fe8938402e8df1ffe | TypeScript | 5,860 | 218 | import { describe, expect, it } from "vitest";
import type { EpisodeLogConsoleRow } from "../../../visualization/logs/log-console-rows";
import {
coveredLogReadRange,
logWindowForCenter,
mergeBoundedLogRows,
mergeSelectedBoundedLogRows,
mergeLogReadRanges,
missingLogReadRanges,
orderedUniqueLogRows,
pru... |
661049396f5ef650bc5a82ad8acba4a061225469e6dccc4982a532a895890c67 | TypeScript | 5,871 | 191 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../../ir";
import type { DecodeClient } from "../../../../query/decoding";
import { createDefaultMcapReader } from "../../reader";
import { ByteClientReadable } from "../../reader/byte-readable";
import { resolveMcapTimelineStrateg... |
7661beb1c06a46067057c5f9d44b78ba8094dd6e33645563e3e36835adc30797 | TypeScript | 5,876 | 179 | /**
* Copyright 2017-2026, Voxel51, Inc.
*
* Copied verbatim from @voxel51/voodo `src/util/useDraggable.ts`, which
* the library uses for Toolbar but does not (yet) export from its root.
* Delete this copy and import from the package once VOODO exports it.
*/
import React, { useCallback, useEffect, useRef, useSt... |
ab4c11cebf7a57a1e39e40919a1b797ba524bc1b993b14274850623debba750e | TypeScript | 5,879 | 203 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { CommandContextManager } from "@fiftyone/commands";
import type { EventDispatcher } from "@fiftyone/events";
import { AddKeypointPointCommand } from "../commands/AddKeypointPointCommand";
import { RemoveKeypointPointCommand } from "../commands/RemoveKeypointPointCo... |
2da7b7f1762a1fcc8db1dcb7b5a0618e6d0dde7ed57d6db5883dcaacc0e2a74f | TypeScript | 5,881 | 185 | import * as fos from "@fiftyone/state";
import { useCallback, useEffect, useRef } from "react";
import { useRecoilValue, useSetRecoilState } from "recoil";
import { MOUSE } from "three";
import type { Fo3dCameraControls } from "../fo3d/camera-controls";
import {
isFo3dPointCropModifierPressedAtom,
isCreatingCuboidP... |
7868c590eb36abe72f84e43aa20a0a014f1c9ed75753267396b813a24984ab0b | TypeScript | 5,893 | 175 | import { useMemo, useRef } from "react";
import {
atom,
useAtomValue,
useSetAtom,
useStore,
type PrimitiveAtom,
} from "jotai";
/**
* Cross-pane hover echo for the episode modal: whatever the pointer is
* dwelling on in one tile highlights everywhere else it appears — a
* cloud point hovered in the 3D sce... |
821e02b1e08ea35044ced492c6fad82bf4b78482f29d4cbded7b41adbda1b9f1 | TypeScript | 5,921 | 230 | /**
* Copyright 2017-2025, Voxel51, Inc.
*/
const CTRL = "ctrl";
const ALT = "alt";
const META = "meta";
const SHIFT = "shift";
/**
* Distills a key sequence in to a match structure
* suitable for matching to KeyboardEvents
*/
export class KeySequence {
public isCtrl = false;
public isMeta = false;
public ... |
1c5401fc081bbf90c3b5e1fe025fe80506437ce87d934a15ea51c81adfdc2110 | TypeScript | 5,942 | 200 | /**
* The shared write-half: ref-addressed `SurfaceActions` used
* directly by declarative surfaces, and the bridge `SurfaceController` that
* extends it with handle-bound conveniences (`commit`/`create`/`selectHandle`/
* `hoverHandle`). Label mutations are transactional; interaction writes are
* NOT transactions ... |
0378c6e8250045c52ed11de5b0267cff459194c8bf89ee3d78cc0758ffd4098a | TypeScript | 5,960 | 177 | /**
* Copyright 2017-2026, Voxel51, Inc.
*
* Pure rules for the Saved queries menu. A saved query is a saved view under
* its product name: the same dataset record, slug rules and stage payload.
*/
import { toSlug } from "@fiftyone/utilities";
/**
* A saved view record, as the saved views fragment reads it. The... |
787122995912f3ef50f6bf224278a67679021f594d10afb2034f240674e49304 | TypeScript | 5,981 | 187 | /**
* Unit tests for `useSchemaManagerUrl`.
*
* Exercises both directions of the URL ⇄ atom sync against the shared
* `useUrlSearchSubscription` primitive and a mocked `useSchemaManagerModal`.
*/
import { act, renderHook } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } f... |
ff5053cd017c342ea473c6171fe9f1970cdd741135dafd3812787ea845518f1e | TypeScript | 5,989 | 209 | import { beforeAll, describe, expect, it, vi } from "vitest";
import { COLOR_BY, getColor } from "@fiftyone/utilities";
import type { Coloring, CustomizeColor, LabelTagColor } from "../state";
import type { RegularLabel } from "./base";
import {
getLabelAttributesText,
getLabelColor,
getPointColorByValue,
shou... |
b41c8146ba2b9d033275ccab1b13777ff46147ebbe070422211dadb1ab01a94f | TypeScript | 6,009 | 197 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type {
AnnotationAgent,
AnnotationAgentLifecycle,
AnnotationAgentLifecycleListener,
AnnotationAgentLifecycleStatus,
InferenceResult,
ModelMetadata,
PropagatedKeypoint,
PropagationContext,
PropagationInferenceResult,
} from "./types";
import { Agent... |
9c7fbe5782b9b4bfb4ed17c3f1770fd6429ff21d11cff9aa8b7d0ec2f1472f4a | TypeScript | 6,019 | 179 | import type { LabelRef } from "@fiftyone/annotation";
import type { LabelData, LabelType } from "@fiftyone/utilities";
import { isEqual } from "lodash";
/**
* A track is one identity across many frames. Geometry varies frame to frame,
* but classification-level fields (label, index, custom attributes) describe
* th... |
512b2f9f244a9e3c10cb2d2ffcde395f972e5a79ea0bdeb4a1294827ba765e62 | TypeScript | 6,067 | 216 | import { ModalMode, useModalMode } from "@fiftyone/state";
import { useMemo } from "react";
import { selector, useRecoilValue } from "recoil";
import { isDetection, isPolyline } from "../../types";
import type { ReconciledDetection3D, ReconciledPolyline3D } from "../types";
import { transientAtom } from "./transient";
... |
9ba626381b9250d34050ba3a3a3806f2d840769a27bf0bfc99fa7d3f610e6780 | TypeScript | 6,090 | 237 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
/**
* @vitest-environment jsdom
*/
import { renderHook, act } from "@testing-library/react";
import { describe, it, expect, vi, beforeEach } from "vitest";
import { useExecuteLoader } from "./useExecuteLoader";
vi.mock("@fiftyone/operators", () => ({
executeOperator: ... |
8d63df718e770c588f9f539a1ae6eab00366d6657409cfae743eabe76307b7ae | TypeScript | 6,092 | 194 | import { useCallback } from "react";
import type { LabelType } from "./Edit/useAnnotationContext";
import {
CLASSIFICATION,
DETECTION,
KEYPOINT,
POLYLINE,
TEMPORAL_DETECTION,
} from "@fiftyone/utilities";
import {
DetectionOverlayOptions,
DetectionOverlay,
ClassificationOptions,
ClassificationOverlay,... |
e4ac9da91abb358499035c7daf7776ceee7f9d52ea5d59f191fb85cb39916918 | TypeScript | 6,103 | 191 | // ---------------------------------------------------------------------------
// WebCodecs decode for `foxglove.CompressedAudio` chunks.
//
// Turns encoded Opus chunks into the SAME interleaved
// `Float32Array` shape the RawAudio path produces, so everything downstream
// — peak pyramid, AudioBuffer, GainNode playba... |
ee53c104d634818fb78a82f792709ef366b6391615fc93f55ddcf61f34b8a9a7 | TypeScript | 6,136 | 191 | import * as fos from "@fiftyone/state";
import { useMemo } from "react";
import { useRecoilValue } from "recoil";
import { PANEL_ID_MAIN } from "../constants";
import { useFo3dContext } from "../fo3d/context";
import { load3dOverlays } from "../labels/loader";
import {
annotationPlaneAtom,
cuboidCreationStateAtom,
... |
1989b0fecc1c0fc946b2443351ab34ba9de02818ddf37789a69fef800a8d25c3 | TypeScript | 6,155 | 209 | import type { McapTypes } from "@mcap/core";
import { compareBigInt } from "../../../ir";
import { chunkMessageIndexRange } from "./chunk-index-ranges";
import { channelIdsForTopics } from "./message-index";
import type {
McapPrefetchByteRange,
McapPrefetchChunkDataRequest,
McapPrefetchWindowRequest,
} from "./pr... |
1b60727b8f2a6e2ae7f4d5abdafd2f07a3062f46cfd887bed161a13db1c09acd | TypeScript | 6,170 | 203 | import type { RJSFSchema } from "@rjsf/utils";
import type { SchemaType } from "@fiftyone/core/src/plugins/SchemaIO/utils/types";
import { addWarning, type TranslationContext } from "./utils";
import { SmartFormInputs } from "../../types";
/**
* Translates SchemaIO type to JSON Schema
*
* Note: Uses `any` for schem... |
838fcdfe944ab660715f085e842116a905fe8dc9d4a1b61abd81382e58861de7 | TypeScript | 6,171 | 193 | import { describe, expect, it } from "vitest";
import { extractNative2dLabels } from "./parse";
import type { Native2dDetection, Native2dPolyline } from "./types";
const detections = (items: Record<string, unknown>[]) => ({
_cls: "Detections",
detections: items,
});
const polylines = (items: Record<string, unknow... |
2a96244a9e266498c26d9333f30a0c0be546acb1c29523b5fe7d4b806e63e24e | TypeScript | 6,173 | 220 | import { describe, expect, it } from "vitest";
import { decodeImageRgba } from "./image-encodings";
const HOST_IS_LITTLE_ENDIAN =
new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
describe("native depth image decoding", () => {
it("views aligned packed same-endian 16UC1 without an RGBA allocation", () => {
... |
48ecc610f178cdb05378935d17f227e2375518f8384e7f02a488d90bc8f1b3ae | TypeScript | 6,174 | 215 | import { describe, expect, it } from "vitest";
import { PlaybackSyncMode } from "../../../schemas/v1/index";
import {
createWindowBounds,
createCandidateSelector,
isUnboundedLatestPolicy,
selectSynchronizedWindow,
} from "./policy";
import {
MCAP_ACTIVE_TIMELINE,
type McapDecodedMessage,
type McapStreamSy... |
badd4239a28a26a1ec210c6b0df894f06e51cf0ab3c2e984c2ec80de069f5dee | TypeScript | 6,186 | 162 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { act, renderHook } from "@testing-library/react";
import { afterEach, describe, expect, it } from "vitest";
// Real jotai — the hook is a thin atom wrapper. The atoms are module-private
// and persist across renders, so we reset to defaults in afterEach.
import {
... |
697744e6eb41f1d86739f6316bd7825ebe0dd5b2001227f0a05a1ffe12fef1f6 | TypeScript | 6,190 | 251 | import { LRUCache } from "lru-cache";
import type {
FrameLooker,
ImaVidLooker,
ImageLooker,
VideoLooker,
} from "./lookers";
type CacheCallback = (key: string) => void;
export interface CacheOptions {
maxHiddenItems: number;
maxHiddenItemsSizeBytes: number;
onDispose?: CacheCallback;
onSet?: CacheCall... |
a461729337b6c4897aa33b2a7d8d5827e213c5ba8b8f26c9974ef4c7f527b015 | TypeScript | 6,201 | 193 | import { EpisodeCadenceTracker } from "../../../runtime/temporal-policy";
import type { EpisodeDiagnosticState } from "../../../visualization/logs/diagnostic-console-state";
import type { EpisodeLogConsoleRow } from "../../../visualization/logs/log-console-rows";
export interface DiagnosticProjectionRequest {
/** Ch... |
0349211982c215e09d45a51566fe34d12a25c88c2f2ba93394ee5f29fa67ac3a | TypeScript | 6,233 | 199 | // @vitest-environment jsdom
import { act, renderHook, waitFor } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { fetchIds, idAt, type IdColumn } from "./protocol";
import { usePatchSampleIndex } from "./usePatchSampleIndex";
vi.mock("@fiftyone/utilities", () => ({... |
bc09d7457c5f541ac3de4d96b4fe948ce9d004ac56761c0db86894aebecc13be | TypeScript | 6,271 | 219 | import { renderHook } from "@testing-library/react";
import type { RefObject } from "react";
import type { Box3, PerspectiveCamera } from "three";
import { Box3 as ThreeBox3, Vector3 } from "three";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { SET_EGO_VIEW_EVENT, SET_TOP_VIEW_EVENT... |
984fb87b54716ec8bbcdf6a8d3956a1e636e2b59c0648324f6fe95cce4c6b36e | TypeScript | 6,280 | 223 | import { McapWriter, type McapTypes } from "@mcap/core";
import { Root } from "protobufjs";
import descriptor from "protobufjs/ext/descriptor";
export interface TransformTopologyFixture {
readonly frameUseTopics: readonly string[];
readonly readable: McapTypes.IReadable;
readonly sizeBytes: string;
}
/** Small ... |
e5a14bf609681cbb1fdaac97674ea597e824e21c1a664d34acf9788b84083b66 | TypeScript | 6,295 | 209 | import {
getGridPosterCache,
recordGridPosterDiagnostic,
shouldReplaceGridPoster,
type GridPosterCacheEntry,
type GridPosterCacheKey,
} from "./grid-poster-cache";
import { getGridPosterPersistence } from "./grid-poster-persistence";
const WEBP_MIME_TYPE = "image/webp";
const PNG_MIME_TYPE = "image/png";
con... |
e8189f4c352a8b224fee80f20a2777961e1182a97c8b71785fc304c54c6ce452 | TypeScript | 6,330 | 158 | import * as THREE from "three";
import type { CuboidResizeFace } from "../../annotation/cuboid-face-resize";
// The shaft and arrowhead built below always run along local +x — this names
// that assumption for consumers that need to anchor UI (ghost previews,
// default editor selection) to "the face the heading arrow... |
61559f6faae396a8b179d744381de25364deac8b8258de74aa52fce2038369ee | TypeScript | 6,335 | 210 | /**
* Decode-path tests for the fetch functions: buffer layouts, header
* flags, and dtype discrimination, against canned binary responses.
*/
import { beforeEach, describe, expect, it, vi } from "vitest";
const fetchMock = vi.fn();
vi.mock("@fiftyone/utilities", () => ({
getFetchFunction: () => fetchMock,
}));
... |
c4d4393a10d9db72d89a15edd6b15aa0459507583a555cea83597481e9c61e76 | TypeScript | 6,342 | 187 | // @vitest-environment jsdom
import {
afterEach,
beforeEach,
describe,
expect,
it,
type Mock,
vi,
} from "vitest";
import { HOVER_INTERVAL_MS } from "../constants";
import type { HoverHit } from "../types";
import { HoverPicker } from "./HoverPicker";
const fire = (
target: HTMLElement,
type: string,... |
58150222c0aded7c79271812aedd6e825701a6d1fc6f50875c0c6374c2a7d6ba | TypeScript | 6,343 | 260 | import { subscribe } from "@fiftyone/relay";
import * as fos from "@fiftyone/state";
import { DefaultValue, atom, atomFamily, selector } from "recoil";
import { MANAGING_GRID_MEMORY } from "../../utils/links";
/**
* Convert a [0, 10] zoom setting to [-15, -1]
*
* @param {number} defaultRange [0, 10] range
* @retur... |
ae07057e8061f1ee88cf5f527f9d31d5fce270d67c02e5097e2ff2227b23e537 | TypeScript | 6,406 | 222 | import { getEventBus } from "@fiftyone/events";
import { Coloring, ImaVidLooker, VideoLooker } from "@fiftyone/looker";
import { Colorscale } from "@fiftyone/looker/src/state";
import { RENDER_STATUS_PENDING } from "@fiftyone/looker/src/worker/shared";
import type Spotlight from "@fiftyone/spotlight";
import type { ID ... |
5d141e2900852a031912a01395fe2bc668c9a93145acb5f0676386615e2ca561 | TypeScript | 6,414 | 169 | import type { EpisodeSelection } from "@fiftyone/state/src/selection";
import { cleanup, renderHook } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import useGridSelectionClick from "./useGridSelectionClick";
import BoundedMap from "./BoundedMap";
afterEach(cleanup);
fun... |
ee4357e34ec1129b2a257704633f0a0e07977d7d093a5a0ac1ffc36a75928163 | TypeScript | 6,422 | 211 | import { type DecodeContext, type Decoder } from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
ImageAnnotationCircle,
ImageAnnotationPoints,
ImageAnnotationPointsKind,
ImageAnnotationText,
ImageAnnotationsVisualization,
RgbaColor,
} from "../../../../ir/index";
import... |
76c42563845974f6a0f4f1dbcdfb29926f74424556b9fbbcde339a94b1a160db | TypeScript | 6,424 | 219 | import { describe, expect, it } from "vitest";
import type { LocationTrackState } from "../tracks/location-track";
import {
invalidatePlaybackStyleState,
mapPlaybackFrameAt,
prunePlaybackPaintState,
withLiveMapMarkers,
} from "./playback-paint";
import { createIndexedMapTrack } from "./route-layers";
describe... |
a0e706ec52e1a33fb7761429beef9a2d59b11f9807447b83bc84ddfd7f427bbb | TypeScript | 6,450 | 194 | import {
getFieldSchema,
useActiveAnnotationSampleId,
useAnnotationEngine,
useDeleteAnnotation,
useDeleteTrack,
} from "@fiftyone/annotation";
import { useLighter } from "@fiftyone/lighter";
import { isDetection3dOverlay, isPolyline3dOverlay } from "@fiftyone/looker-3d";
import * as fos from "@fiftyone/state"... |
296bc4c9b561806560cef68cc1ea69af1c0300188886be3cc5f05821cec1bdc8 | TypeScript | 6,456 | 208 | import { byteSourceAccessKey } from "../../../query/bytes";
import { fnv1aString } from "../../../utils/fnv1a";
import { McapGridPreviewTransport } from "../worker/grid-preview-transport";
import type {
McapGridPreviewRequestPayload,
McapGridPreviewResult,
McapGridPreviewWorkerRequest,
McapGridPreviewWorkerResp... |
7a106418c6ff1eddc879b9e295c8e9b135627262d72f2ab15ffdc48f43a50f7d | TypeScript | 6,458 | 203 | // ---------------------------------------------------------------------------
// Producer loop: keeps the ring fed from windowed reads.
//
// Container-neutral by construction — it drives an injected
// `AudioWindowReader`, so the MCAP paging lives in the view layer and a
// .wav fetch or a test double works here unch... |
04e07a44616485bac622e892c6e59107753a5fdd8f3a792a85a854cda5ac0f7f | TypeScript | 6,465 | 191 | import { AgentTaskType, PointDescriptor, ROI, Vec2 } from "../types";
import { atom, useAtom, useAtomValue } from "jotai";
import { useCallback, useMemo } from "react";
import { useActiveTask } from "./useActiveTask";
/** Read-only snapshot of annotation tool state. */
export type ToolsContext = {
/** The active tas... |
594314ef4e4d903fe3a5418b41bd77c74e3fd4f732f91cfc5d6b2bb9f14def67 | TypeScript | 6,471 | 234 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type { Point } from "../types";
/**
* Calculates the Euclidean distance between two points.
*/
export function distance(
x1: number,
y1: number,
x2: number,
y2: number,
): number {
return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
/**
... |
55d51b4f0496adbac58d75f23e3c0b6ed6c122b6e6b5b36b0ff24d5dcf4feb39 | TypeScript | 6,478 | 211 | import { describe, expect, it } from "vitest";
import {
chooseAnnotationStream,
chooseCalibrationStream,
filterDefaultStreamEquivalents,
findBestMatchingAnnotationStreams,
orderDefaultStreamEquivalents,
streamPrefix,
} from "./";
describe("chooseCalibrationStream", () => {
it("prefers the exact camera_in... |
95be2ec25efc30cc1a0bd2b3a6f134eed9a9161299bd786a61baee3f53f8a6ab | TypeScript | 6,484 | 283 | import type { ModalSample } from "@fiftyone/state";
import { Box3, Vector3 } from "three";
import { describe, expect, it } from "vitest";
import type { RenderModel } from "../annotation/store";
import {
createLabelBoundingBox,
getSelectedLabelsBoundingBox,
resolveAnnotationLabelBoundingBox,
type SelectedLabelLi... |
af5600356f4cd791d94a722ba1cea64e7142648a1d75e6aaf4e6df03184b9485 | TypeScript | 6,485 | 221 | /**
* The composite {@link LabelStore} for a video sample: one store the engine
* federates, routing by path ownership across two backings —
*
* - a frame-indexed {@link FrameStore} for the per-frame list fields
* (`frames.detections`, …), addressed by `(path, instanceId, frame)`;
* - the sample-level {@link Sa... |
1ad3a4f5337495b661c0028eae63e744eb18b4221d3ca359d6ac024cf9a13df9 | TypeScript | 6,490 | 181 | import * as THREE from "three";
import type { CuboidTransformData } from "./types";
/**
* A point cloud sampled from the live scene: a flat [x, y, z, x, y, z, ...]
* position buffer plus the world matrix that places those local positions in
* world space.
*/
export interface ScenePointCloud {
positions: ArrayLik... |
18c0237613ef9e9f33b3d4f175795ee15cd37356a74dbbbf729dcee409fa3892 | TypeScript | 6,529 | 190 | import { lerpRotation } from "@fiftyone/utilities";
import type { SyntheticBox, SyntheticKeyframe } from "@fiftyone/utilities";
import type {
AnnotationAgent,
AnnotationAgentLifecycle,
AnnotationAgentLifecycleListener,
AnnotationAgentLifecycleStatus,
InferenceResult,
ModelMetadata,
PropagatedDetection,
... |
320ecd9d4eae579d79c8f82d181dc2a1b2ce1655f0790ac7d8c26f90fc3e600b | TypeScript | 6,548 | 228 | import { describe, expect, it } from "vitest";
import type { SavedSubset } from "@fiftyone/state/src/selection";
import {
capturedFromLabel,
episodeTitle,
formatBound,
formatRanges,
groupDescriptor,
listRanges,
rangeDomain,
scopePhrase,
selectionPills,
streamsLabel,
type SegmentMember,
} from "./f... |
21e1e0f5c9f75210beef4fe9014ff62aaf1e55b7b8143af54037493ef247caef | TypeScript | 6,565 | 215 | /**
* Regression (2026-09-23): a label's field move recorded two undo steps — the
* command-stack undoable Field.tsx returns, plus the engine unit its
* transaction committed — and every undo of the undoable recorded a fresh
* engine unit. Undo ping-ponged between the fields (pose → face → pose took
* six undos, a... |
a4eaad884667e8578de9a04ddab6aac38ec1a39baf6fa8b3d49cdc285e4dd412 | TypeScript | 6,571 | 248 | import { describe, expect, it, vi } from "vitest";
import { MCAP_PLAYBACK_WORKER_PRIORITY } from "./playback-worker-types";
import { McapPlaybackWorkerScheduler } from "./playback-worker-scheduler";
describe("MCAP playback worker scheduler", () => {
it("orders paused inspection behind playback and ahead of idle work... |
e2272f7785dcf4b6df25e8ecc13492d812231de53bf7924593b628b087d9d123 | TypeScript | 6,580 | 226 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { registerNonfiniteFields } from "@fiftyone/utilities";
import { describe, expect, it } from "vitest";
import {
patchPathFieldContext,
toExtendedJson,
transformSampleData,
} from "./transformer";
describe("transformSampleData", () => {
it("unwraps a $binary... |
ecf095475a7d5cbac034047a1ec3661a61095b8e24feb9424815618ade325222 | TypeScript | 6,581 | 257 | import { Euler, Matrix4, Quaternion, Vector3 } from "three";
import { staticTransformToMatrix4 } from "../../frustum/builders";
import type { CameraIntrinsics, FrustumData } from "../../frustum/types";
import { getCuboidForwardFaceBasePoint } from "../../utils";
import type { CuboidTransformData, PolylineTransformData ... |
76da6cc4d8029ef33662ac60e96ca1c8a27c4bd3c9d6130a42fc90212e721458 | TypeScript | 6,583 | 218 | import { VISUALIZATION_KIND } from "../../../ir";
import { describe, expect, it } from "vitest";
import {
classifyImageDimensions,
resolveCameraModel,
} from "../spatial/camera-geometry/camera-model";
import {
describeCalibrationSelection,
describeGeometryControl,
getCalibrationAdaptationStatus,
getImageVi... |
9cac99b4cc34775b443842df37507494daf93b7ee90ed9b05e1b2fbefb2fc256 | TypeScript | 6,590 | 220 | import { describe, expect, it } from "vitest";
import type {
EpisodeTransformTopologyEdgeObservation,
EpisodeTransformTopologyFrameUse,
} from "../ir";
import { analyzeTransformTopology } from "./transform-topology";
import { layoutTransformTopology } from "./transform-topology-layout";
const observation = (
par... |
cc2751b83d590f438f74a47f5cb760a1d1ada74b103d1dc5b5c36bbc9f9d610b | TypeScript | 6,598 | 193 | // All GLSL lives here — the shaders ARE the renderer; the host library
// is a commodity. This file is the swap point for visual experiments.
import { BASE_ALPHA, DIM_ALPHA, DIM_DESATURATION, DIM_TINT } from "./constants";
// One vertex shader for every camera adapter: projectionMatrix ·
// modelViewMatrix covers any... |
12766e46cb0d0a13da0b6ec764d3cef2f2d652e24ba0369cb7b11bbf5ab6f8aa | TypeScript | 6,606 | 193 | // @vitest-environment jsdom
import { act, renderHook } from "@testing-library/react";
import { atom, getDefaultStore } from "jotai";
import { beforeEach, describe, expect, it, vi } from "vitest";
// vi.mock factories run before imports, so shared mutable state lives in
// vi.hoisted() — also pre-import.
const refs = ... |
1c2d0171d773d046f7266a0bacd5b24b4bf483450bc692d055473ced4abddd5b | TypeScript | 6,607 | 241 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { MARGIN } from "./constants";
import { ItemData, OnItemResize, Render, RowData, Section } from "./state";
import styles from "./styles.module.css";
export default class SectionElement implements Section {
private attached: boolean = false;
private top: number... |
d6c19e479a4e953dd3ff67d0055ebca0aa76675b188df3d61bb55b4ff566568d | TypeScript | 6,612 | 195 | import { describe, expect, it } from "vitest";
import {
buildPointCloudRenderPayload,
MAX_POINT_CLOUD_RENDER_POINTS,
} from "./point-cloud-render-payload";
import { POINT_CLOUD_RGB_ENCODING } from "./point-cloud-channel-encoding";
describe("point-cloud render payload construction", () => {
it("aligns determinis... |
81ea498cd1965bb19189ea59e660718cfe242c59cb82b1fc1fa4a95db7d0a445 | TypeScript | 6,617 | 217 | /**
* State management for SchemaManager
*
* All atoms and atom families for the SchemaManager component are consolidated here.
*/
import { atom } from "jotai";
import { atomFamily } from "jotai/utils";
import {
fieldAttributeCount,
fieldType,
inactiveLabelSchemas,
isFieldReadOnly,
labelSchemaData,
} fro... |
d5c65d53e0d7191ff7511b5b6844e914e2e409fb248509a5404c204d261a1e29 | TypeScript | 6,618 | 250 | import * as THREE from "three";
import { FO_USER_DATA } from "../constants";
import type { PointCloudCrop } from "./point-cloud-crop";
import { isPointInsidePointCloudCrop } from "./point-cloud-crop";
export const POINT_PICK_RADIUS_PX = 4;
/**
* Objects to exclude from raycasting (helpers, gizmos, UI elements, etc.)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.