sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
bdb8a8fd0eafd85286439e1de81cd8e148085d9ef1fc8338ad7bd67760420266 | TypeScript | 7,917 | 227 | import { useSetTileSelection } from "@fiftyone/tiling";
import { useSetAtom } from "jotai";
import type { MutableRefObject } from "react";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import type { GpuImageAnnotationPickerHandle } from "../../../visualization/media-2d/GpuImageAnnotationPi... |
6b2a2a2074a65068158adccfb867824ca6c214ccb631a01536e136610b136303 | TypeScript | 7,963 | 240 | import type { Hide, ID, Show } from "@fiftyone/spotlight";
import * as fos from "@fiftyone/state";
import { useGridSelection } from "@fiftyone/state/src/selection";
import { useCallback, useMemo, useRef } from "react";
import { GridCustomRendererItem } from "./GridCustomRendererItem";
import { registerTile, unregisterT... |
9baaee66dc9b531957fb66c0f8050d14f47f3989790a83e9e98acb5e3748adc4 | TypeScript | 7,967 | 276 | import { describe, expect, it } from "vitest";
import {
pickProjectedPoint,
projectPointCloudToImage,
} from "./image-projection";
const IDENTITY_ROTATION = { w: 1, x: 0, y: 0, z: 0 };
const ZERO_TRANSLATION = { x: 0, y: 0, z: 0 };
// fx = fy = 100, cx = cy = 50 over a 100x100 image.
const PINHOLE_K = {
K: [10... |
6d242c781834dcf6057c725c57e28a6cece7a82a1b1c9ce2691616bc328fdb13 | TypeScript | 7,974 | 294 | import type { DecodeContext } from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
} from "../../../../ir/index";
import {
LOG_ATTRIBUTE_ROWS,
LOG_LEVEL,
type DecodedLogRow,
logRowsAttribute,
} from "../../normalization/log-records";
import { optionalString } from "../foxgl... |
e2d91a2c7e719d6f1d4533ad6b08092ddeb0e569d60cfc594d74fc7b878d24c3 | TypeScript | 7,990 | 295 | import { Quaternion, Vector3 } from "three";
import {
BoxGeometryAsset,
CylinderGeometryAsset,
FbxAsset,
GaussianSplatAsset,
type FoMeshMaterial,
type FoPointcloudMaterialProps,
type FoScene,
type FoSceneNode,
GltfAsset,
type MeshAsset,
MirisStreamAsset,
ObjAsset,
PcdAsset,
PlaneGeometryAsse... |
322f65ab17579086ff2f501336172cdb8f92eb5ecd8f4ce1cc4f5c2b5723e464 | TypeScript | 8,006 | 265 | import { useMemo } from "react";
import { Quaternion, Vector3 } from "three";
import { buildPointCloudRenderPayload } from "../../../runtime/point-cloud-render-payload";
import type {
PointCloudRenderPayload,
PointCloudVisualization,
} from "../../../ir";
import { useSceneSourcesByType } from "../../../scene-inven... |
cc4e2121aecc3cf1694f88b80b6b48941a6efefff87e9866aea986a888e18851 | TypeScript | 8,029 | 255 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { beforeEach, describe, expect, test, vi } from "vitest";
import { MaskBitmapCache } from "./maskBitmapCache";
import { decodeMask } from "./maskDecoding";
vi.mock("./maskDecoding", () => ({ decodeMask: vi.fn() }));
const mockedDecodeMask = vi.mocked(decodeMask);... |
3628aeb002452708673611e5d2b7996691485a23ff1990b56d4a577fd58fcdb5 | TypeScript | 8,039 | 257 | /**
* Copyright 2017-2026, Voxel51, Inc.
*
* Domain hooks for Saved queries. Every read and write goes through the
* saved view records, fragment and mutations, so the SDK, links, and older
* clients see the same objects.
*/
import { useTrackEvent } from "@fiftyone/analytics";
import * as fos from "@fiftyone/sta... |
66a0cc98da6007f55cb0a8bea96d9f1793bc62d45b497ed89d5a39f37eac46fe | TypeScript | 8,040 | 237 | import {
type JSONDeltas,
patchSample,
transformSampleData,
VersionMismatchError,
} from "@fiftyone/core/src/client";
import type { Sample } from "@fiftyone/looker";
import { NotFoundError } from "@fiftyone/utilities";
import { isSampleIsh } from "@fiftyone/looker/src/util";
import type { OpType } from "../type... |
7d00e407c2edf4ca7e26799a0ca6c327807cdbcbb49ec970d19d35ac8d2b04ee | TypeScript | 8,044 | 252 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import type { RawAudioVisualization } from "../../../../ir/index";
import { decodeRosMessage } from "../ros/common";
import { decodeProtobufMessage } from "./protobuf/index";
import {
foxgloveRaw... |
92b94eeb02646bbbb9053fb08119328f713aac4f8481089186c3b3b978f285f7 | TypeScript | 8,061 | 296 | import { formatValueAsNumber } from "@fiftyone/utilities";
import { capitalize } from "lodash";
import { atom } from "recoil";
import { NONE_CLASS } from "./constants";
export function getNumericDifference(
value,
compareValue,
percentage = false,
fractionDigits?: number,
) {
if (typeof value === "number" &&... |
859e0b394bd90d4b5b9a41e2cfe176787ee87827a0c443522af169ee45aa0572 | TypeScript | 8,075 | 246 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { renderHook } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
// ── Mocks ────────────────────────────────────────────────────────────────────
//
// The SUT is a registration hook: it calls `useLighterEventHandler(chan... |
1c00652f6ec677ceb9b930410611267689493495ab792f1e0a9d1dd7183da8d3 | TypeScript | 8,078 | 286 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { describe, expect, it } from "vitest";
import { KEYPOINT_SELECTED_RADIUS } from "../constants";
import { CoordinateSystem2D } from "../core/CoordinateSystem2D";
import { MockRenderer2D } from "../renderer/MockRenderer2D";
import type { Point } from "../types";
impo... |
1aede076d324cb1ed77f29f82456f74330a302ddf17c24a03a1b8f45198b3b94 | TypeScript | 8,085 | 301 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { getColor } from "@fiftyone/utilities";
import { INFO_COLOR, TOLERANCE } from "../constants";
import {
BaseState,
Coordinates,
KeypointSkeleton,
NONFINITE,
Point,
} from "../state";
import { distance, distanceFromLineSegment, multiply } from "../util";
im... |
737d865a84c43d61cb2bf82414e1730e08aa505814b9c58310b0bd72121ac3d8 | TypeScript | 8,091 | 240 | import { describe, expect, it, vi } from "vitest";
import { InteractionState } from "./interactionState";
import type { LabelRef } from "../identity/ref";
import { makeDet, makeEngine, ref } from "../testing/fixtures";
describe("InteractionState active/anchor", () => {
it("setActive replaces the set and anchors the... |
085fa03dae01c812daf62772d3f47c3f44684a5e790c1fe2b572f994130d603c | TypeScript | 8,106 | 219 | // @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
// @generated from file inventory.proto (package fiftyone.multimodal.schemas.v1, syntax proto3)
/* eslint-disable */
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codeg... |
790799d5885cd312c9aa1ef7fc9e0a139a20a42a967469e1e4457f6e1b200e3f | TypeScript | 8,131 | 263 | import { decompressLZF } from "./decompress-lzf";
import { parseHeader } from "./parse-header";
import { PCDAttributes, PCDFileFormat, PCDHeader } from "./types";
const sanitizeNaNToZero = (v: number): number => {
return isNaN(v) ? 0 : v;
};
// helper to read raw values from DataView
const getRawValue = (
dv: Dat... |
fe21253d52284fe29993d8ddbb8a7be9b1377911c3505fdf550dc4979f1e50cb | TypeScript | 8,139 | 316 | import { type Box3, Vector3, type Vector3Tuple } from "three";
import { DEFAULT_CAMERA_POSITION } from "../constants";
import type { Looker3dSettings } from "../settings";
import type { SavedCameraState } from "../types";
import { calculateCameraPositionForUpVector, isFiniteVector3 } from "../utils";
import { getOrthon... |
4e114f6a22b27dab823719a316cbcc8c13ceb2d1653cacb6941453456731668a | TypeScript | 8,140 | 260 | import { Vector3 } from "three";
import type {
PointCloudCameraPose,
PointCloudSceneBoundsSummary,
} from "../../../../visualization/scene-3d/index";
import {
cameraPoseFromTrackingAnchor,
cameraTrackingAnchorFromPose,
isFollowTrackingMode,
trackingAnchorMatches,
type CameraTargetResolution,
type Scene3... |
d9dcdb02e35e26ecc046c45e21b1370ca2d18d7d4d136021ef9c31f32ff1d78a | TypeScript | 8,160 | 267 | import {
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
type MutableRefObject,
} from "react";
import {
startBulkStreamLifecycle,
type BulkStreamControl,
} from "./bulk-stream-lifecycle";
/** Completed histories remain warm briefly without surviving a source swap. */
export const FULL_HISTORY_... |
64403103d98fb9aaedd8b953e2f6b7cb468e4bef086ca5092f8c972f7c681230 | TypeScript | 8,165 | 274 | import { useAnnotationEngine } from "@fiftyone/annotation";
import {
FO_LABEL_HOVERED_EVENT,
FO_LABEL_UNHOVERED_EVENT,
selectiveRenderingEventBus,
} from "@fiftyone/looker";
import * as fos from "@fiftyone/state";
import { useCursor } from "@react-three/drei";
import type { ThreeEvent } from "@react-three/fiber";... |
fc80923c933fd6a2b0901ea11ac44063f5273817724ecb049fec16fa7051879c | TypeScript | 8,186 | 276 | import {
useRecoilState,
useRecoilValue,
useResetRecoilState,
useSetRecoilState,
} from "recoil";
import {
activeCursorPanelAtom,
cuboidLabelLineWidthAtom,
current3dAnnotationModeAtom,
currentArchetypeSelectedForTransformAtom,
fo3dPerformanceStatsAtom,
headingUpEditorHoverAtom,
headingUpPreviewAto... |
62fcf50b91caef3939ae61539a0341572b2b937e7aa474af773e0dc69deeec4a | TypeScript | 8,206 | 272 | /**
* Label-schema document shapes and the pure helpers that derive and
* edit a doc's visibility. No hooks, no I/O: `useSchemaDocs` layers the
* operator calls and the manager's doc-mode state on top of these.
*/
/**
* Required/default sample+frame fields the server cannot serialize
* without — mirrored from `f... |
7fef9a0f9d161142baf851f6f93bdc1ea8d913c122049d55d1359da19c80a4e6 | TypeScript | 8,250 | 217 | import type {
PointCloudCameraPose,
PointCloudCameraProjection,
} from "../../../../visualization/scene-3d/index";
import type { Scene3dTrackingMode } from "./scene-3d-camera";
import type { Scene3dCameraComposition } from "./scene-3d-camera-composition";
/** Camera coordinate policy used when navigating between r... |
ff508e5ecf3186c93f0a378268021be61b7ed5b22fc286dfc871933a79269ffa | TypeScript | 8,255 | 365 | import { West as BackIcon, Close as CloseIcon } from "@mui/icons-material";
import { Box, Typography } from "@mui/material";
import styled from "styled-components";
// ============================================
// Shared Layout Components
// ============================================
export const Section = styled... |
d808d57d8bb795c3c5a00435b51e5b3f390a8099dc318c6880cf8f039c142e04 | TypeScript | 8,259 | 272 | import type { McapTypes } from "@mcap/core";
import { describe, expect, it, vi } from "vitest";
import {
DecoderRegistry,
type DecodeContext,
type PointCloudChannelProjectionRequest,
} from "../../../../decoders";
import type { PointCloudRenderChannelPayload } from "../../../../ir";
import { POINT_CLOUD_FLOAT32_... |
94f1de0786e12ccbd62b56d7d3097c93762c0f4aca6aec304a4540a2b78e88fe | TypeScript | 8,280 | 275 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
getLabelColor,
getPointColorByValue,
pointColorByValueApplies,
} from "@fiftyone/looker/src/overlays/util";
import type { ColorSchemeInput } from "@fiftyone/relay";
import { COLOR_BY, getColor } from "@fiftyone/utilities";
import { SELECTED_DASH_LENGTH } fro... |
4d7355591f3cd88ed2891c6a67c501e654c2b891bc24c800f0896d37964b8012 | TypeScript | 8,286 | 234 | import { describe, expect, it } from "vitest";
import {
isCameraCalibrationStream,
isCompressedImageStream,
isGridStream,
isImageAnnotationsStream,
isImageStream,
isLocationFixStream,
isLogStream,
isPointCloudStream,
isPoseStream,
isSceneUpdateStream,
streamTopics,
} from "../resource-client/strea... |
c0e54d7ca4155203a03ecca7ac4f9f232a2f80fd4b0f7e6143ef438fc627d8e4 | TypeScript | 8,293 | 214 | import { ColorscaleInput } from "@fiftyone/looker/src/state";
import { Box3, Vector3 } from "three";
import type { ShadeBy } from "./types";
export const ACTION_GRID = "grid";
export const ACTION_SHADE_BY = "shadeBy";
export const ACTION_SET_POINT_SIZE = "setPointSize";
export const ACTION_SET_PCDS = "setPcds";
export... |
2571e54d6115a1e36292315ef4975c3ed50c8259812f7ada5b0af8d926c80145 | TypeScript | 8,296 | 387 | import type {
NumberSchemaType,
SchemaType,
} from "@fiftyone/core/src/plugins/SchemaIO/utils/types";
import { BOOLEAN_FIELD, STRING_FIELD } from "@fiftyone/utilities";
import { ComponentType, FieldType } from "../useSchemaManager";
export interface PrimitiveSchema {
type: FieldType;
component?: ComponentType;... |
fe6b2d885dcd0a2cb695f122b23f065f3ff6de1ba39c43289239a2d4bf702000 | TypeScript | 8,303 | 249 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
/**
* The render loop's phase contract.
*
* Pixi's `TickerPlugin` puts its own `render` on the ticker at
* `UPDATE_PRIORITY.LOW`, behind the scene's handler at the default `NORMAL`,
* so a ticker pass is meant to run "mutate the scene graph, then present it".
* An `a... |
ff2b50aacec56611f75b34e4023459400a3f5e52352760a4d7e383a12886eb1e | TypeScript | 8,303 | 294 | /**
* The composite video store: path-ownership routing (frame paths → FrameStore,
* everything else → the sample store), unioned enumerate/persist/dirty, the
* `/frames`-prefixed reconcile partition, bundled snapshot/restore, and the
* sample-only `setData` seam.
*/
import type {
JSONDeltas,
LabelData,
Tra... |
524ac64f039d0d6163132efee40c32eddb761befdfd00df008d4a8a13444e9e6 | TypeScript | 8,318 | 229 | import type { SampleRendererProps } from "@fiftyone/plugins";
import type { TemporalTagCreatePayload } from "@fiftyone/playback";
import { act, renderHook } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import type { TemporalTag, UseSampleTemporalTagsResult } from "@fiftyo... |
91205d32cd6ed1efc0c0124f9846b0f6be7cf045778839bd50758c58376d61ba | TypeScript | 8,331 | 246 | import { renderHook } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
vi.mock("@fiftyone/annotation", () => ({
useActiveAnnotationSampleId: vi.fn(),
useAnnotationEngine: vi.fn(),
useAnnotationEventBus: vi.fn(),
usePersistAnnotationDeltas: vi.fn(),
}));
import {
... |
70a8a9088d911e77878be77e1d13376e7c2ee79fc605bbffaae87b3a80290923 | TypeScript | 8,352 | 290 | /**
* Pure geometry engine for interpolating decoded 3D scene entities between two
* cached SceneUpdate messages at a sub-message playhead position. Intentionally
* free of React, cache, and timeline concerns so it can be unit-tested in
* isolation; the React/cache wiring lives in `use-interpolated-scene-updates`.
... |
c6f68a320846719b21770a7a37763b24ee2f7c335df9fae5e58ddda39e247556 | TypeScript | 8,438 | 284 | import type { EpisodeLogConsoleRow } from "../../../visualization/logs/log-console-rows";
import { compareBigInt, type LogLevel } from "../../../ir";
/** Inclusive timeline range represented by a log read or cache window. */
export interface LogReadRange {
readonly endTimeNs: bigint;
readonly startTimeNs: bigint;
... |
9b45807269bc1a0b8dbc543fb2157c37321df1a58b60874263c451f8241776da | TypeScript | 8,462 | 283 | import {
McapIndexedReader,
McapWriter,
type IWritable,
type McapTypes,
} from "@mcap/core";
import { describe, expect, it, vi } from "vitest";
import type { ByteClient } from "../../../query/bytes";
import { ByteClientReadable } from "./byte-readable";
import { createCachedMcapDecompressHandlers } from "./deco... |
f7a1dc89b3440fc22c4bdb0d4c50ffa7c1926e35310e640452a9ec4003a98242 | TypeScript | 8,474 | 230 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import * as THREE from "three";
import type { LineSegmentsGeometry } from "three/examples/jsm/lines/LineSegmentsGeometry";
import type { ReconciledDetection3D } from "../annotation/types";
import {
ORIENTATION_MARKER_HEAD_SEGMENTS,
getCuboidOrientationMarkerGeometry,
} ... |
9225e4f53dc7d1638e00eefc944583ccf0fe4ca30a4e6ad9162dde20f886303e | TypeScript | 8,480 | 225 | /**
* Maps v2 color columns to the renderer's flat rgb triplets. Both the
* categorical palette and the continuous colorscale come from the App's
* color scheme, so neither can drift from the grid.
*/
import { getRGB, type RGB } from "@fiftyone/utilities";
import { CSS_COLOR_NAMES } from "./cssColorNames";
import t... |
058c63cce7a031bbd095105191a0c6f0108e7785989c3d9731e2b2509f769859 | TypeScript | 8,534 | 260 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { renderHook } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { AgentTaskType } from "../types";
// ── Mocks ────────────────────────────────────────────────────────────────────
const hoisted = vi.ho... |
49750bcce019d3f97232ad67ccb01e0c03aef23d1d506f4a95d77a5f51e1cce8 | TypeScript | 8,570 | 302 | import { getEventBus } from "@fiftyone/events";
import * as foq from "@fiftyone/relay";
import { BufferManager } from "@fiftyone/utilities";
import { Environment, Subscription, fetchQuery } from "relay-runtime";
import { BufferRange, ImaVidState, StateUpdate } from "../../state";
import { BUFFERS_REFRESH_TIMEOUT_YIELD ... |
7fe0fcfcbe5e66158d8d4e6a351925e0c53723efeea58d2c1bc1debea198aca3 | TypeScript | 8,590 | 286 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../ir/index";
import { rosCameraInfoDecoders, rosImageDecoders } from "./ros/index";
import {
ROS1_IMAGE_SCHEMA,
ROS2_CAMERA_INFO_SCHEMA,
ROS2_IDL_IMAGE_SCHEMA,
ROS2_IMAGE_SCHEMA,
decoderForSchemaEncoding,
float32Bytes,... |
f3e55025679cdf03cb2c14a4bc801985a14310a941f0fe5817b83ae3e3dfd306 | TypeScript | 8,591 | 267 | import { byteSourceCacheKey } from "./cache";
import type { ByteRangeCache, ByteRangeReadResult } from "./types";
/**
* Persistent shared byte-range cache backed by the browser Cache API.
*
* The in-memory byte cache is per execution context: every worker lane pays
* its own network fetches and its budget churns u... |
80303e1ba54526faeb1b5ce91a72ed37ddd5abe53e34c8b646b1db9c5c66df29 | TypeScript | 8,595 | 306 | import { describe, it, expect } from "vitest";
import { translateToJSONSchema, addChoicesToSchema } from "./schema";
import type { TranslationContext } from "./utils";
describe("translateToJSONSchema", () => {
const baseContext: TranslationContext = {
warnings: [],
path: [],
strictMode: false,
};
de... |
5030f33b1409433aa03516a467bead0373caddb985c08234ca4ab578f1fc4c56 | TypeScript | 8,604 | 270 | // End-to-end through the real pieces: the pump produces, the ring carries,
// the worklet processor consumes. Only the window reader and the render
// thread's clock are faked — everything between them is production code.
//
// The unit tests cover each half against a stub of the other, which cannot
// catch a disagre... |
d19342761160b9bb86c1b54f7eff00fb2d087858b54243a5cb6426f9ce7206c2 | TypeScript | 8,655 | 308 | import { afterEach, describe, expect, it, vi } from "vitest";
import type { EncodedH264VideoVisualization } from "../ir";
import { VISUALIZATION_KIND } from "../ir";
import { PushVideoAccessUnitReader } from "./push-reader";
import type { H264AccessUnit } from "./types";
import { VideoIntentCancelledError } from "./ty... |
44261b65878cb9e25a9c7e42d1e5721f02002880795b5903cc5af255b29affc2 | TypeScript | 8,667 | 277 | import type { McapTypes } from "@mcap/core";
import { compareBigInt } from "../../../../ir";
import { EpisodeReadUnsupportedError } from "../../../../ports";
import { throwIfAborted } from "../../../../utils/cancellation";
import type {
McapMessageIndexWindowResult,
McapReadMessageIndexWindowRequest,
} from "../../... |
2965fa92258511b810773d2e63d3739447cfbaa1e57cf433560ac795f0c3b561 | TypeScript | 8,681 | 278 | import type {
EncodedAv1VideoVisualization,
EncodedH264VideoVisualization,
EncodedHevcVideoVisualization,
EncodedVideoCodec,
EncodedVideoVisualization,
} from "../ir";
/** One timestamped encoded-video access unit owned by the video engine. */
export interface EncodedVideoAccessUnit {
readonly frame: Encod... |
22e7667a005db632d47c59d5b9e051e0c3cf4bc32b2f1593f327a2b10a937116 | TypeScript | 8,705 | 316 | import { act, renderHook } from "@testing-library/react";
import { createElement, type ReactNode } from "react";
import { createStore, Provider } from "jotai";
import { afterEach, describe, expect, it, vi } from "vitest";
import { VISUALIZATION_KIND } from "../../../../visualization";
import type {
PointCloudPanelLa... |
5cb8f050592d2559b264f75bd97b788e966f0765aed820b5f15ce6763df932f7 | TypeScript | 8,721 | 259 | import "../compatibility/browser-node-globals";
import {
McapIndexedReader,
McapStreamReader,
type McapTypes,
} from "@mcap/core";
import {
byteSourceAccessKey,
type ByteSourceDescriptor,
} from "../../../query/bytes";
import { loadDecompressHandlers } from "../compatibility/mcap-support";
import { createMcap... |
5f763cf49362c8dfca69e843962df9cfa44c3ae025f5d557f80140a041f16c8e | TypeScript | 8,727 | 265 | import type {
CameraCalibrationVisualization,
PayloadDescriptor,
} from "./frames";
import type { ByteSourceReadProfile } from "./bytes";
import type { TimeDomain, TimeWindow } from "./time";
/** Stable identity of a stream within an episode. */
export type StreamId = string;
/** Renderer-level family exposed by ... |
614d73b4874e24599a3a41d9452b1c04c4e299babb85e686f0e65e5834e9d11d | TypeScript | 8,729 | 263 | import { BufferGeometry, Float32BufferAttribute } from "three";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { createBufferGeometry } from "./create-buffer-geometry";
import { PCDHeader } from "./types";
describe("createBufferGeometry", () => {
let mockHeader: PCDHeader;
beforeEach(() => ... |
b16f2df2fb0ce63fa0a80cdc89f3f134a49f9d3ee28bdc9ca78df131ee183317 | TypeScript | 8,749 | 341 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
crop,
help as helpIcon,
json as jsonIcon,
minus,
options,
overlaysHidden,
overlaysVisible,
plus,
} from "../../icons";
import { BaseState } from "../../state";
import { json } from "../../shared/actions";
import { BaseElement, Events } from "../bas... |
05cc4c958daf0782cc15720d03508db076ca3b86dc708a64632e28a4717a026f | TypeScript | 8,756 | 286 | import type {
PointCloudBounds,
PointCloudNumericRange,
PointCloudRenderPayload,
PointCloudRenderScalarField,
PointCloudScalarField,
} from "../ir/frames";
import {
POINT_CLOUD_FLOAT32_SCALAR_ENCODING,
POINT_CLOUD_RGB_ENCODING,
} from "./point-cloud-channel-encoding";
/** Maximum number of finite points ... |
06b1fa1747c4013444c6034ab750b7d4d158c70c31e494d24124c9ad80c4b06a | TypeScript | 8,780 | 324 | import * as THREE from "three";
import { describe, expect, it, vi } from "vitest";
import {
createFilledPolygonMesh,
createFilledPolygonMeshes,
newellNormal,
} from "./polygon-fill-utils";
describe("polygon-fill-utils", () => {
describe("newellNormal", () => {
it("should compute normal for a simple square ... |
13f0b42c2b4cf56fdad24dca0f97b5e922bfa88ea8c8b8e7677fdd1d9593d128 | TypeScript | 8,781 | 301 | import type { DecodeContext } from "../../../../decoders/index";
import type {
CameraCalibrationVisualization,
DecodedAttributeValue,
DecodedDiagnostic,
DecodedOutput,
} from "../../../../ir/index";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import {
finiteNumberArrayField,
numberArrayField,... |
c4e1dc8b4d1cc4e86561935c6c868867ad6e2f4c2a2328e87e7924b3337d9c1b | TypeScript | 8,841 | 298 | import { vi, describe, it, expect, beforeEach } from "vitest";
vi.mock("@fiftyone/utilities", () => ({
getFetchFunction: vi.fn(),
getEventSource: vi.fn(),
}));
import { getFetchFunction, getEventSource } from "@fiftyone/utilities";
import { OperatorAnnotationAgent } from "./OperatorAnnotationAgent";
import {
Ag... |
48ce24ca45328161c764299d0f8865b37319d7c2f740e8bc8b1cbc0ede872ee9 | TypeScript | 8,857 | 260 | import type { PlaybackStore } from "@fiftyone/playback";
import { createStore } from "jotai";
import { describe, expect, it } from "vitest";
import { BYTE_SOURCE_READ_PROFILE, type ByteTimelinePoint } from "../../../ir";
import { createTimelineIndex, EpisodeStreamCache } from "../../../runtime";
import { setNetworkHeal... |
534b4a319f9777b2c9886e20b8cc66bb970ee459c7eb256c4b2f0956b7b540af | TypeScript | 8,898 | 294 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import type { PointCloudVisualization } from "../../../../ir/index";
import { foxgloveLaserScanDecoder } from "./laser-scan";
import { decodeProtobufMessage } from "./protobuf/index";
vi.mock("./p... |
5d5addb0a4d42a28e4750bea520263c02d37efea86ab6dc51e43dfd249cd2352 | TypeScript | 8,969 | 303 | import type { McapIndexedReader, McapTypes } from "@mcap/core";
import type { TimeWindow } from "../../../ir";
import type {
BudgetedReadStopReason,
ReadWorkBudget,
ReadWorkUsage,
} from "../../../ports";
import type { ByteSourceDescriptor } from "../../../query/bytes";
import type {
McapPrefetchChunkDataReques... |
6fe042d77bc9aeb723a243eb560b4a95f6893d07947ffca2a192183a37e2f240 | TypeScript | 8,975 | 337 | import { DETECTION, POLYLINE } from "@fiftyone/utilities";
import type { TransformControlsProps } from "@react-three/drei";
import type { ThreeEvent } from "@react-three/fiber";
import type { RefObject } from "react";
import type * as THREE from "three";
import type {
ReconciledDetection3D,
ReconciledPolyline3D,
} ... |
1da236c6b984da4ecf8631ce21f20f1e59ba9df07c3e854a6661ce0769da69de | TypeScript | 8,987 | 300 | import type { EventGroup, EventHandler } from "../types";
/** Whether the App is driven by browser automation (e2e), not a real user */
export const isE2E = (): boolean =>
typeof navigator !== "undefined" && navigator.webdriver === true;
/**
* An `e2e:` event's payload may be passed as a function, which the bus ca... |
1b58efe2a497fc47dcfbdca472006874a88a3324a7847c1f0526b649f527c161 | TypeScript | 8,997 | 287 | import { getFetchFunction } from "@fiftyone/utilities";
import type {
AgentTaskType,
AnnotationAgent,
AnnotationAgentLifecycle,
AnnotationAgentLifecycleListener,
AnnotationAgentLifecycleStatus,
AnnotationContext,
InferenceCapability,
InferenceResult,
InferenceResultProxy,
ModelMetadata,
SyncInfere... |
bd958f36cda16765f095427ee1b3d64edf2d41e2f4bb3e7ee8c083cd8be50b6a | TypeScript | 8,999 | 290 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { makeEngine, ref } from "../../testing/fixtures";
import {
detection3dAdapter,
looker3dAdapters,
polyline3dAdapter,
type Looker3dHandle,
type Working3dLabel,
} from "./adapters";
import { createLooker3dBridge, type WorkingStore3d } from "... |
0a2dd023e57fc7996d0659b722fd7146c7fe84f21ff0d55501e15fc0b6579e6a | TypeScript | 9,004 | 304 | import type { McapTypes } from "@mcap/core";
import { describe, expect, it, vi } from "vitest";
import {
collectChunkDataPrefetchRanges,
collectWindowPrefetchRanges,
prefetchMcapByteRanges,
} from "./chunk-prefetch";
import type { McapPrefetchByteRange } from "./prefetch-types";
describe("collectWindowPrefetchRa... |
b86dc0f0ce07c73c5e5be655cad64664f5d396c8653d5cca58af09ec49d2760e | TypeScript | 9,005 | 385 | import type * as fos from "@fiftyone/state";
import { get } from "lodash";
import {
Box3,
Euler,
Quaternion,
Vector3,
type Vector3Tuple,
type Vector4Tuple,
} from "three";
import type { RenderModel } from "../annotation/store";
import { isFiniteVector3 } from "../utils";
type SampleMap = Record<string, fos... |
6f9c348885ad9849455f004c6a9d1d35e3148ff6fe072a33cce45327ac8b5210 | TypeScript | 9,027 | 289 | import { useMemo } from "react";
import type { SceneUpdateVisualization } from "../../../../ir/index";
import type { DecodedFrame } from "../../../../ir/index";
import {
interpolationFraction,
nextDistinctCachedMessage,
useStreamCacheSnapshot,
} from "../../playback/cache-sampling";
import {
hasInterpolatableS... |
0b97bea16e2d0af15febca0f81e82dbca6b14b2a8698dc82f85e0283b3b9362d | TypeScript | 9,047 | 318 | import {
decimateLocationTrackSegments,
IncrementalLocationSegmentBuilder,
isValidLocationPoint,
unwrapLocationTrackPoint,
type DecimatedLocationTrack,
type LocationTrackPoint,
} from "./location-track";
import { wrapLongitude } from "../wgs84";
interface StoredLocationPoint {
readonly claims: Set<symbol... |
12bcb3df74e2d93ca870b9aae0df841c95534fde639c1e0cf75a785ce693dcb2 | TypeScript | 9,058 | 354 | /**
* The sample-level {@link LabelStore}: an identity-addressed adapter over the
* `Sample` model (`Sample` is one store implementation, not the center).
*
* Responsibilities beyond delegation:
* - ref addressing: `(path, instanceId)` ops onto `Sample`'s `(path, id?)`
* API, stamping `_id = ref.instanceId` on ... |
9485faba39ee4685d8e1ab7fe850a347bfd36b905ff23d0983d0a3ecb044ff14 | TypeScript | 9,090 | 272 | import * as fos from "@fiftyone/state";
import {
getSubset,
getSubsetCounts,
listSubsets,
selectionDomainId,
useGridSelectionBoundary,
useGridSelectionDataset,
useInvalidateSelectionScope,
useOpenSelectionBoundary,
useResetSelectionBoundaries,
useSelectionScopeRevision,
viewConversion,
type Save... |
d078ecbc68a93a72827f12fc411a46903fd067681b2dfbb56940c9ea8cbbeee2 | TypeScript | 9,092 | 329 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { act, renderHook } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { getCommandBus } from "../dispatch";
import { Command, CommandCtor } from "../types";
import { useRegisterCommandHandler } from "./us... |
32f1f4994a627cd91df8cd9e52c7a3ede677647774e4f6cedbc6d66e5a12e28f | TypeScript | 9,095 | 301 | import { beforeEach, describe, expect, it, vi } from "vitest";
import {
getEmbedding,
putEmbedding,
_resetMemoryCache,
MAX_CACHE_ENTRIES,
type CachedEmbedding,
} from "./embeddingCache";
function createMockIDB(options?: { failOn?: "get" | "put" }) {
const { failOn } = options ?? {};
const store = new Map... |
329a6b58696a963ea0c1dd67f8b54c63ab87b26a5b26a276051e82ad36dab164 | TypeScript | 9,103 | 355 | import { getNormalizedUrls } from "@fiftyone/state";
import {
BufferManager,
DETECTION,
DETECTIONS,
HEATMAP,
SEGMENTATION,
} from "@fiftyone/utilities";
import { getImaVidElements } from "../../elements";
import { IMAVID_SHORTCUTS } from "../../elements/common/actions";
import { ImaVidElement } from "../../el... |
c7f17bf963f5344ef3289163204485bd2e4cc899ee6532a01ad4cf8a08dae7de | TypeScript | 9,121 | 291 | /**
* Min-max bucket decimation for numeric time series. Unlike uniform
* stride (see `decimateTrajectory`), keeping each bucket's minimum and
* maximum preserves spikes — the whole point of plotting telemetry.
*/
import { NUMERIC_SERIES_MAX_BUCKET_SURVIVORS } from "../../../ports/numeric-series";
/** Gap positio... |
a9b4d8750ee909b5485dbcb634737ad5e8336d57faf766e714892234de0057b4 | TypeScript | 9,140 | 295 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
import { deserialize } from "@fiftyone/looker/src/numpy";
import { decodeMask } from "./maskDecoding";
import type { MaskDecodeRequest, MaskDecodeResponse } from "./maskDecodeWorker";
/**
* Real ... |
01bbf6e40f9f216a90d02673958911fea3ee4c833266f2008842aa8ca361254d | TypeScript | 9,144 | 256 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
// @vitest-environment jsdom
import { renderHook } from "@testing-library/react";
import { atom, getDefaultStore } from "jotai";
import { beforeEach, describe, expect, it, vi } from "vitest";
// Mutable backing state for the schema mocks — refs.* updated per-test.
const r... |
5135fe3a5cefeaa702739ec8ead619c1e990c60f933612fb54df8a9c9419fb29 | TypeScript | 9,149 | 319 | import type {
AnnotationAgent,
AnnotationAgentLifecycle,
AnnotationAgentLifecycleListener,
AnnotationAgentLifecycleStatus,
AnnotationContext,
InferenceResult,
ModelMetadata,
SegmentationInferenceResult,
SyncInferenceResult,
Vec2,
} from "./types";
import { AgentTaskType, InferenceCapability } from "... |
a70d9f1ca47ddee7e9bbf3723c9e998a601358639c96d084a9c1afe8944f1f75 | TypeScript | 9,190 | 260 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
// @vitest-environment jsdom
import { act, renderHook } from "@testing-library/react";
import { atom, getDefaultStore } from "jotai";
import { beforeEach, describe, expect, it, vi } from "vitest";
// ── Mocks ───────────────────────────────────────────────────────────────... |
21365ae03e0db6b6bc703f4c6c33b36528437ce2eb78f747f49de87f133afa8f | TypeScript | 9,194 | 302 | import { afterEach, describe, expect, it, vi } from "vitest";
import type { ByteSourceDescriptor } from "../../../ir";
import {
createGridPosterCache,
defaultGridPosterCacheBudgetBytes,
gridPosterCacheKey,
gridPosterFreshness,
gridPreviewStateKey,
pointCloudPoseKey,
shouldReplaceGridPoster,
type GridPo... |
7073226291700ac715499c13123a628eab6a53a77d21b5a838a63b147ae218b6 | TypeScript | 9,217 | 267 | import type {
EpisodeTransformTopologyEdgeObservation,
EpisodeTransformTopologyFrameUse,
DecodedOutput,
} from "../../../../ir";
import type { ReadWorkUsage } from "../../../../ports";
import type { DecodeClient } from "../../../../query/decoding";
import type { McapIndexedReaderLike, McapReadContinuation } from ... |
9300d1e317acf4f33b054afd9f10b946682c68fc0e2d9378a32b5f4b406ce856 | TypeScript | 9,218 | 284 | import { objectId, type SyntheticBox } from "@fiftyone/utilities";
import {
BrowserAnnotationProvider,
type BrowserAnnotationProviderOptions,
propagate,
pointsFromBox,
type PropagationStrategy,
type ProviderError,
type ProviderStatus,
} from "../providers";
import type {
AnnotationAgent,
AnnotationAge... |
586c41e07d0d02e0e9342d622d311e7921893da8633b02a5d671c4e05a1f8f8b | TypeScript | 9,260 | 264 | import { OrthographicCamera } from "three";
import { DEFAULT_ZOOM, MARGIN, MAX_ZOOM, MIN_ZOOM } from "../constants";
import {
clampToHome,
fitRect,
panRect,
pxToData,
worldRect,
zoomOf,
zoomRect,
type Rect,
} from "../math";
import type { Bounds, CameraAdapter, InteractionMode, Polygon } from "../types"... |
5d93beb32cfd606ae52580be412ff6a5246c1d4da8b60da27e054e474c45284f | TypeScript | 9,266 | 360 | import * as THREE from "three";
import type { RenderModel } from "../annotation/store";
import type {
CuboidTransformData,
ReconciledDetection3D,
} from "../annotation/types";
import {
DEFAULT_SELECTED_CUBOID_CROP_MARGIN,
POINT_CLOUD_CROP_BOUNDS_EPSILON,
} from "../constants";
import {
transformCuboidToWorldF... |
7eba4588d4d423cdcd530728b0ea60568ed15875546668441f990eebb5cd5e3a | TypeScript | 9,272 | 308 | /**
* Video label propagation (browser, WASM SAM2).
*
* Walks the frames between two keyframes and, for each, runs SAM2 against
* the decoded frame bitmap to localise the tracked object. The next frame's
* prompt is derived from the previous frame's mask (centroid sampling), so
* the track re-localises every fram... |
d127ca679a956cbc5d4f8993ceb1cd88b8fe9b1748258594bc16082ebafa14dd | TypeScript | 9,282 | 297 | /**
* Copyright 2017-2025, Voxel51, Inc.
*/
import { Command } from "../types";
import { CommandContext } from "./CommandContext";
/**
* Known contexts. Add to these if you need
* to share a context between components.
*/
export enum KnownContexts {
Default = "fo.default",
Modal = "fo.modal",
ModalAnnotat... |
4bb4df1ee1c761162176ddf641c6529e349a0bcb884f7b79b8e20ed4f252286d | TypeScript | 9,320 | 335 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { viewsAreEqual } from "@fiftyone/state";
import { NotFoundError, Resource, isNotebook } from "@fiftyone/utilities";
import type { Action, Location } from "history";
import { createBrowserHistory, createMemoryHistory } from "history";
import React from "react";
impo... |
1cd4f396ebd5d23cafdd3b2037995edf5615d494f9825494321ef72877b9f109 | TypeScript | 9,321 | 310 | const TOKEN_SPLIT_PATTERN = /[^a-z0-9]+/;
const PREFERENCE_MARKER_SCORES = new Map<string, number>([
["downsample", 2],
["downsampled", 2],
["downsamp", 2],
["lowres", 2],
["reduced", 2],
["resized", 2],
["compress", 1],
["compressed", 1],
["compressedimage", 1],
]);
const PREFERENCE_MARKER_TOKENS =... |
82e78971a32999f9baec596a2e0b2cb009932bd97271271292c081a923c543f8 | TypeScript | 9,329 | 270 | /**
* Lighter label-kind adapters: per-kind translation between
* committed labels and Lighter overlays. `buildHandle` is pure (descriptor
* only); `updateHandle` applies silently (`applyLabel`); `toLabel`
* extracts the persistable partial WITHOUT `_id` (the ref owns identity).
*
* Handles are typed as `BaseOver... |
1e212eeb3c83bc9243348e6c6626992e9d591ba840532133b08d2ae274e05a57 | TypeScript | 9,334 | 281 | /** Deterministic topology and reachability derived from observed transforms. */
export interface EpisodeFrameGraphSummary {
/** Bidirectional transform components, normalized and sorted by stable id. */
readonly components: readonly (readonly string[])[];
readonly dataBearingReachableCountsByFrameId: ReadonlyMap... |
9be10a57fd7cf8f3a5c2b03c5f7f595eeb293a7e2434620b257819a25b7559b0 | TypeScript | 9,339 | 331 | import { describe, it, expect } from "vitest";
import { translateSchema, isSchemaIOSchema, isJSONSchema } from "./index";
import type { SchemaType } from "@fiftyone/core/src/plugins/SchemaIO/utils/types";
describe("translateSchema", () => {
it("should translate a simple SchemaIO schema", () => {
const schemaIO: ... |
2c9a9be702bcafc3c96cc64bed44b560b68c7788998e3fb69bf6c191203f979e | TypeScript | 9,373 | 315 | import { getSampleSrc } from "@fiftyone/state/src/recoil/utils";
import { DETECTIONS, HEATMAP, SEGMENTATION } from "@fiftyone/utilities";
import { beforeEach, describe, expect, it, vi } from "vitest";
import type { Coloring, CustomizeColor } from "..";
import { LabelMask } from "../overlays/base";
import type { Colorsc... |
7d7f5b83d93ca63c3987cdc8bf080f975482445cb08594e73d925bc11560620c | TypeScript | 9,373 | 335 | import { describe, expect, it, vi } from "vitest";
import {
createAudioStreamPump,
type AudioWindowReader,
} from "./audio-stream-pump";
import type { PcmAudioData } from "./types";
const SAMPLE_RATE = 100; // small, so window math is readable
const CHANNELS = 1;
/**
* Records what the pump pushes. `capacity` is... |
ec0ecaf970b7f30f14d7ac2693ca70efc8ee8355a407eb8d19b1696068466efe | TypeScript | 9,377 | 274 | /** A scoped value paired with the timestamp used for LRU eviction. */
export interface TimestampedScopedValue<Value> {
readonly updatedAtMs: number;
readonly value: Value;
}
/** Sanitized view of one versioned scoped persistence payload. */
export interface ScopedStoreSnapshot<ScopeValue, FallbackValue> {
reado... |
8ad35ee38fb0ea18f9b2f9c551d5cbfd0dd245671454100d5087a1f28db20c84 | TypeScript | 9,397 | 253 | import type {
AttributeCondition,
AttributeConditionLeaf,
AttributeConfig,
} from "../SchemaManager/utils";
/**
* Handler signature for a single leaf operator.
*
* @param fieldValue - The current value of the referenced field.
* @param condValue - The value (or array of values) declared in the condition.
*... |
8d932be35d9e3ed36d0503ebda2fb488f99be989b0682edc29e27b6771e23657 | TypeScript | 9,504 | 369 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
COLOR_BY,
getColor,
prettify as pretty,
useExternalLink,
} from "@fiftyone/utilities";
import { Overlay, RegularLabel } from "../../overlays/base";
import { Classification, Regression } from "../../overlays/classifications";
import {
BaseState,
Colori... |
e7bf55b810555878775caa674fa1f6cb783866875dd8ab740b5cf8c01943b277 | TypeScript | 9,511 | 307 | import { VIDEO_ENCODED_ACCESS_UNIT_BYTE_CAP } from "./gop-index";
import type {
EncodedVideoAccessUnit,
VideoAccessUnitReader,
VideoAccessUnitReadResult,
} from "./types";
import { VideoIntentCancelledError } from "./types";
const PUSH_VIDEO_ACCESS_UNIT_CAP = 4_096;
// Push-only sources have no EOF marker. One v... |
1145ae3abfa38b53dea8de9ad5710d458c92a5c14744adb0ae09c1773a1f270c | TypeScript | 9,544 | 290 | /**
* Stage schema policy gating in the Annotate sidebar state
* (`taskSchemaPolicy` → `visibleLabelSchemas` / `effectiveLabelSchemasData`).
*/
import { createStore } from "jotai";
import { describe, expect, it } from "vitest";
import {
activeLabelSchemas,
managerSchemaDoc,
taskLabelSchemaDoc,
effectiveLabe... |
47d7cefcfafddc25c4e97fa2b1426fe45e71d26c5c7c6ec7e61fa56f14cdfac0 | TypeScript | 9,557 | 293 | import { describe, expect, it } from "vitest";
import {
buildColors,
categoryCss,
MISSING_CATEGORY,
rampCss,
resolveColorscale,
resolvePalette,
type Colorscale,
} from "./colors";
const rgbAt = (colors: Float32Array, i: number) => [
colors[i * 3],
colors[i * 3 + 1],
colors[i * 3 + 2],
];
const hex... |
85ab216acc9ed62348d592648b2c025d7124c26a16c15aec04b220b2076a9b3c | TypeScript | 9,557 | 318 | import { afterEach, describe, expect, it, vi } from "vitest";
import {
MapPlaybackController,
type MapPlaybackScheduler,
} from "./playback-controller";
class ManualScheduler implements MapPlaybackScheduler {
private frameId = 0;
private readonly frames = new Map<number, (now: number) => void>();
private tim... |
a60da85d7582ed5b912d0503566b63824cd087d88dcd5eda6ccb7f485c21caad | TypeScript | 9,584 | 283 | import { useCallback, useEffect, useRef } from "react";
import {
DrawStyle,
InteractiveKeypointHandler,
KeypointOptions,
KeypointOverlay,
KeypointPointHitAction,
Point,
UNDEFINED_LIGHTER_SCENE_ID,
useLighter,
useLighterEventBus,
} from "@fiftyone/lighter";
import { atom, getDefaultStore, useAtom } fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.