sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
2c2235193950490d859d33437b9fedfcf20ff2cfcf0a275b5b38b742f9831748
TypeScript
1,527
48
import * as path from "node:path"; import react from "@vitejs/plugin-react"; import { defineConfig } from "vite"; import { viteExternalsPlugin } from "vite-plugin-externals"; // Vitest sets VITEST; the externals plugin must not apply under test. It // rewrites react / react-dom / recoil / @fiftyone/state to `window.*`...
9e229f116325cf45e058537d0b04bbbb64a28093e34006de2fca8ff8e32a2ffc
TypeScript
1,527
62
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { setSampleMutation } from "@fiftyone/relay"; import type { RegisteredWriter } from "./registerWriter"; import { setSample } from "@fiftyone/relay"; import { env } from "@fiftyone/utilities"; import { commitMutation } from "relay-runtime"; export const handle...
4165085e23c977f5799df973dc56e5b40d13473935d364d31fb819a2f18b9e53
TypeScript
1,529
56
import { getFetchFunction } from "@fiftyone/utilities"; import { useEffect, useState } from "react"; export const ONTOLOGY_TYPE = { ontology: "annotation_ontology", taxonomy: "taxonomy", } as const; export type OntologyType = (typeof ONTOLOGY_TYPE)[keyof typeof ONTOLOGY_TYPE]; export interface OntologySummary { ...
518266cee4a1e862444a2a5ca802321d48be51ab378bd2144a34691e3e198f30
TypeScript
1,532
56
import type { DecodeContext, Decoder } from "../../../../decoders/index"; import type { DecodedOutput, PayloadDescriptor } from "../../../../ir/index"; import { errorMessage } from "../../../../utils/errors"; import { timingFromContext } from "../foxglove/protobuf/timing"; import { decodeJsonRecord } from "./decode"; ...
9fc146ec557f4b114268f71bd36c86e8c918e28d4a7369eb793c5e0d4a1eee73
TypeScript
1,533
45
import { useThree } from "@react-three/fiber"; import { useCallback } from "react"; import type * as THREE from "three"; import type { ScenePointCloud } from "../annotation/fit-cuboid-to-points"; /** * Returns a getter that snapshots the point clouds currently mounted in the R3F * scene graph — their position buffer...
75b11bbb3bef96d96a2aa8ca8a85ab5a8af05214992d26acb59c456dd202af69
TypeScript
1,535
52
import { beforeEach, describe, expect, it } from "vitest"; import { mapPerformanceStats, noteMapFollowCommand, noteMapPlaybackPaint, noteMapReactCommit, noteMapSourceUpdate, resetMapPerformanceStatsForTests, } from "./performance"; describe("mcap map performance stats", () => { beforeEach(() => resetMapP...
322d459707c6bafcd68d75152acd7372e4f0b728787d192511fe219b5b918e70
TypeScript
1,537
42
/** * Copyright 2017-2026, Voxel51, Inc. */ /** * instanceId -> label resolution for `CuboidInstances`' batched `InstancedMesh`. * `instanceId` is r3f's raycast result index into whatever array backed the * mesh at hit-test time; `undefined` means "no instance under the pointer". */ export function resolveLabelB...
70fd8a228a9091a856f0245e612f0a5446ae813ce06c2bb3b1bcc52d1c2da120
TypeScript
1,539
50
import { PolylineOverlay, UNDEFINED_LIGHTER_SCENE_ID, useLighter, useLighterEventHandler, } from "@fiftyone/lighter"; import { useCallback } from "react"; import { useAnnotationContext } from "./useAnnotationContext"; import { POLYLINE } from "@fiftyone/utilities"; /** * Registers event handlers to ensure pol...
2547925269f9e4a57a6571301954d504f0eaed7ab8167da9ac038db3b685f6c3
TypeScript
1,544
55
import { atom, useAtomValue, useSetAtom } from "jotai"; import { FeatureCache } from "../utils"; import { useEffect } from "react"; import { listEnabledFeatures } from "../client"; /** * Cache mapping feature flags to their status. */ const featureCacheAtom = atom<FeatureCache>(new FeatureCache()); const isInitializ...
0b2fa25f1caec1ebb14711882743436450fbbc88f01b77564225572b4bec6c5e
TypeScript
1,545
51
import { atom, selector, snapshot_UNSTABLE } from "recoil"; import { describe, expect, it, vi } from "vitest"; const mocks = vi.hoisted(() => ({ currentSampleId: undefined as unknown })); vi.mock("@fiftyone/state", () => mocks); vi.mock("./labelResolution", () => ({ clearLastCreatedLabels: vi.fn() })); const pending...
5d0a5e2311709051628554005cdcebf160c4ec895a171e84f23514a78a364a57
TypeScript
1,545
74
/** * @generated SignedSource<<814914ffd53575969ca480cdc6f3d1f0>> * @lightSyntaxTransform * @nogrep */ /* tslint:disable */ /* eslint-disable */ // @ts-nocheck import { Fragment, ReaderFragment } from 'relay-runtime'; import { FragmentRefs } from "relay-runtime"; export type Analytics$data = { readonly context:...
143e24d3c2c55ae47633ce60a7504dd653287885ec31c520422488e7095d6e8e
TypeScript
1,547
42
import { afterEach, describe, expect, it, vi } from "vitest"; import { getEpisodeTileExtension } from "../extensions/tiles/registry"; import { getFormatAdapterDescriptors, resetFormatAdapterRegistryForTests, } from "../runtime/adapter-registry"; vi.mock("@fiftyone/plugins", () => ({ PluginComponentType: { Panel:...
69a63ffb751a1b0ce046de176f1113d5ae7a96a8089c32605256453f9c16df6e
TypeScript
1,547
42
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { AnnotationLabel, AnnotationLabelData } from "@fiftyone/state"; import { LabelType as EngineLabelType } from "@fiftyone/utilities"; import type { LabelType } from "./Edit/useAnnotationContext"; /** Engine label type to the singular sidebar row type it renders...
3b41040dd22162587cf3f579ad53fbb73e13c989502e47df8a5f7e4a3bed0471
TypeScript
1,548
34
/** * Copyright 2017-2026, Voxel51, Inc. */ import registerEvent from "./registerEvent"; import useAppCountUpdate from "./useAppCountUpdate"; import useDeactivateNotebookCell from "./useDeactivateNotebookCell"; import useRefresh from "./useRefresh"; import useSelectLabels from "./useSelectLabels"; import useSetSelec...
5f1fcf7b1d2a1dffc32df918e59c1089bd11a8b42e2744bd047e9ef462197ea7
TypeScript
1,548
55
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { Undoable } from "@fiftyone/commands"; import type { PolylineOverlay } from "../overlay/PolylineOverlay"; /** * Undoable command for adding a single point to a PolylineOverlay. * * When `createsNewSegment` is `true`, redo splices a new segment slot at * `...
746fcdd3aba6bceeaf20661ac66c9681f9012b91c5852f3c5665942fe35ca930
TypeScript
1,556
54
import { describe, expect, it, vi } from "vitest"; import { createScene3dCameraRigStore, type Scene3dCameraRigProps, } from "./Scene3dCameraRig"; const PROPS: Scene3dCameraRigProps = { adoptAnchor: null, cameraEpoch: "source-a", mode: "free", onCommit: vi.fn(), onGestureStart: vi.fn(), onPoseSample: vi...
ad1e2eb2e25e33a7bb62988b8e50f0a598fcd5689390f1f267bbf71fb45d956d
TypeScript
1,559
49
import { useSyncExternalStore } from "react"; import { createExtensionRegistry } from "../host/registry"; import type { EpisodeIntervalSource } from "./types"; const REGISTRY_KEY = Symbol.for( "@fiftyone/multimodal:episode-interval-source-registry", ); const registry = createExtensionRegistry<EpisodeIntervalSource>(...
c6c71168b98871763c4c3337447d18796910b80fb2fc8ff579b86a045049709c
TypeScript
1,560
63
/** * Copyright 2017-2026, Voxel51, Inc. */ import { describe, expect, it, vi } from "vitest"; import { CONTAINS } from "./base"; import KeypointOverlay, { getKeypointPoints } from "./keypoint"; const state = { canvasBBox: [0, 0, 100, 100], config: { thumbnail: false }, dimensions: [100, 100], options: { ...
714cd53a31c08df5a8cccc2fe1f7f8fddf5a133ebe4c59b23c0bed2db0bf47f2
TypeScript
1,561
75
import { describe, expect, it } from "vitest"; import { Coloring, Colorscale } from "../state"; import * as painter from "./painter"; describe("filter resolves correctly", () => { let coloring: Coloring; let colorscale: Colorscale; const factory = painter.PainterFactory(() => "#ffffff"); it("skips undefined d...
4736bf2fcef97ab2092f56715f3f6c394b5b72ef2be6984035eb3ab3dd970d96
TypeScript
1,564
50
import type { PointCloudRenderChannelPayload } from "../../../ir"; /** Maximum number of point-cloud channel reads retained per cache. */ export const POINT_CLOUD_CHANNEL_CACHE_LIMIT = 64; /** Builds the shared identity for one projected point-cloud channel. */ export function pointCloudChannelKey( sourceKey: strin...
93b23cdebb804d367d18a7d85527a4621ebb544ac9f71c7dacd31d5c226994f0
TypeScript
1,564
49
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useRef, useCallback } from "react"; import type { DependencyHash } from "./useDependencyHash"; export type LoaderState = "idle" | "loading" | "loaded" | "errored"; export interface UseLoadTriggerResult { /** Whether the loader should execute now */ shouldLoa...
24aadf7df55834fcc580b51d749b7ee6988b055a5c6afa33cda3876793761ebd
TypeScript
1,575
58
const DEFAULT_MAX_RETRIES = 10; const DEFAULT_BASE_DELAY = 200; // list of HTTP status codes that are client errors (4xx) and should not be retried const NON_RETRYABLE_STATUS_CODES = [400, 401, 403, 404, 405, 422]; export interface RetryOptions { retries: number; delay: number; } class NonRetryableError extends Er...
5a418dec31396f59635456c57713a3560e3407111691a71563a5d6e3c936a42c
TypeScript
1,575
48
import { getEventBus } from "@fiftyone/events"; import { useEffect } from "react"; import type { GridEvents } from "./useEvents"; export default (id: string, setResizing: (value: boolean) => void) => { useEffect(() => { let width: number | undefined; let timeout: ReturnType<typeof setTimeout> | undefined; ...
42e862c47908c53d7c6b02780767840b169587b0818b783a5a6897b731603833
TypeScript
1,577
45
import { describe, expect, it } from "vitest"; import type { VideoState } from "../state"; import { createLoadingIndicator } from "./common/loading"; import { lookerLoadingShown } from "./common/looker.module.css"; import { LoadingElement } from "./video"; const loadingElement = () => { const element = Object.create...
fee164ad33ad35d6818f5eb714b4408e4b247de9f782971862e1cebb4aef7917
TypeScript
1,579
50
import { isEpisodeReadCancelledError, type ReadWorkUsage, } from "../../../ports"; import { throwIfAborted } from "../../../utils/cancellation"; import { yieldToTask } from "../../../utils/task-yield"; import { isMcapBoundedReadCancelledError, McapBoundedReadCancelledError, } from "./bounded-read-cancellation";...
ff3b8d8e2649b6ec2a9163ebc8217d4db83ee6e90452302c1b170a9d73da62dc
TypeScript
1,579
47
import { afterEach, expect, it, vi } from "vitest"; import { loadFormatAdapter, registerFormatAdapter, resetFormatAdapterRegistryForTests, } from "../../../runtime/adapter-registry"; import { scheduleEpisodeModalPreload } from "./modal-loader"; vi.mock("./ModalRenderer", () => ({ ModalRenderer: () => null })); ...
dca5a196aa3bf4dee3cc6fd83cd1428ee3cf470cfa94cd5a7f6e286222af0fff
TypeScript
1,581
63
import { STRING_FIELD } from "@fiftyone/utilities"; import { describe, expect, it } from "vitest"; import { getMetadataElements } from "./index"; import { MetadataGridTagsElement } from "./metadata"; const makeConfig = (thumbnail: boolean) => ({ dataset: "test-dataset", fieldSchema: { filepath: { dbField...
428932e728412ff026f8ecf21faac42777a0ed39fdf23d0b347313e310fb8c69
TypeScript
1,588
60
import { getEventBus } from "@fiftyone/events"; import { useCallback } from "react"; import type { PerspectiveCamera } from "three"; import { setCameraControlsLookAt, type Fo3dCameraControls, } from "../fo3d/camera-controls"; import { CAMERA_LOOK_AT_SETTLED_EVENT, type Looker3dEvents, } from "../constants"; imp...
a366bc0a9cce4064618dff8076e294317a604b4ae98d454a7fcbcc8e9da5fa0c
TypeScript
1,593
66
// ============================================================================= // Architecture: // // BASELINE (modalSample) → WORKING (local edits) → TRANSIENT (drag previews) // | // PERSISTENCE // // - Baseline: Use modalSample.sample directly // - W...
2a6796f74d480c72dadbc3714b940180cf29c475fbbfce365be3a71909987cdf
TypeScript
1,594
46
import { useTileId } from "@fiftyone/tiling"; import { atom, useAtom, type SetStateAction } from "jotai"; import { useCallback } from "react"; /** Opaque extension settings indexed by their host-assigned tile id. */ export type EpisodeTileExtensionSettingsByTile = Readonly< Record<string, unknown> >; /** Host-owned...
07d74752422676381b0aefeb33d9720550e26740a0a772f1fa94afd7a4607340
TypeScript
1,597
68
import * as fos from "@fiftyone/state"; import { genSort } from "../../utils/generic"; const NONSTRING_VALUES: any[] = [false, true, null]; const STRING_VALUES = ["False", "True", "None"]; export const CHECKBOX_LIMIT = 20; export const getValueString = (value): [string, boolean] => { if (NONSTRING_VALUES.includes(v...
8bc5eaae91238b0f8075f40d7905215e80036f5f902ea0dcb0dfd84cd45a4122
TypeScript
1,601
50
import { view } from "@fiftyone/state"; import { useRecoilState } from "recoil"; import { CONFUSION_MATRIX_SORT_OPTIONS, DEFAULT_BAR_CONFIG, } from "../../constants"; import { CLASS_PERFORMANCE_SORT_OPTIONS } from "./constants"; export function useActiveFilter(evaluation, compareEvaluation) { const evalKey = eva...
c8cfa927150a7d9533b745ec9b194c24e55fdea72158fad66e74a55dd2c10338
TypeScript
1,601
48
import { describe, expect, it } from "vitest"; import { FramePlacementScopeRegistry, normalizePlacementScope, normalizedPlacementScopes, } from "./frame-placement-scopes"; describe("frame placement scopes", () => { it("normalizes frame ids and removes the target from the source set", () => { expect( ...
7a6ad5708daf77d96827ab40c9bebbd328ffd14737a992f318dca5c850460136
TypeScript
1,611
48
/** Standard identity assigned to caller-requested cancellation errors. */ export const ABORT_ERROR_NAME = "AbortError"; /** Default message for cancellation without more useful operation context. */ export const DEFAULT_ABORT_ERROR_MESSAGE = "The operation was aborted"; /** Creates a fresh, worker-safe cancellation ...
8e4b6c4d501a9ed71b76da38031c32bdd832f2bd70ca2c26170dd1d5ce5d8e0f
TypeScript
1,613
45
import { useEffect } from "react"; import { useEngineSelector } from "../engine"; import { useAnnotationEngine, useClearEntranceLabel, useEntranceLabel, } from "../state"; /** * Hook which registers event handlers related to renderer events. * * This should be called once in the composition root. */ export c...
4f169de7192b5c38ce9ac826bc3cc69675d7c2e6a79263436ed1439ff92adc56
TypeScript
1,619
47
/** * A type representing a group of events, where each key is an event type name * and each value is the payload type for that event. If the payload is `undefined` or `null`, * the event is considered to have no payload. * * @example * ```typescript * type DomainEventGroup = { * "domainFoo:login": { id: stri...
8a502143de39b221f8a4bf02bc1e33e2ea83ac31614bbd4768324f4fa74cde24
TypeScript
1,619
53
import { useRecoilValue } from "recoil"; import { fo3dLoadingStatusThisSample } from "../state"; import { LoadingStatus } from "../types"; /** * Custom hook to easily access and work with three.js loading status */ export const useLoadingStatus = () => { const loadingStatus = useRecoilValue(fo3dLoadingStatusThisSa...
6a66fe211eb92bc6c063c0283699f0260d801dfca6e76d9514716a6dc99b6b5f
TypeScript
1,620
62
import type { DecodeContext, Decoder, PointCloudChannelProjectionRequest, } from "../../../../decoders/index"; import type { DecodedOutput, PayloadDescriptor, PointCloudRenderChannelPayload, } from "../../../../ir/index"; import { decodeRosMessage } from "./common"; type RosMapper = ( record: Record<stri...
ca52e84e62cf451f45c163e1baa3a67750df7b0bf502fbbac488a61373da02cd
TypeScript
1,620
47
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { Renderer2D } from "../renderer/Renderer2D"; import type { ResourceLoader } from "../resource/ResourceLoader"; /** * Options for scene behavior and overlay management. */ export interface SceneOptions { /** Array of field paths that determine overlay visi...
0b26e4a5dba78cae8677eae89ec36a69a310aa9349b3e838177aacc77e025c1e
TypeScript
1,624
73
import type { RJSFSchema, UiSchema } from "@rjsf/utils"; import type { SchemaType } from "@fiftyone/core/src/plugins/SchemaIO/utils/types"; export interface TranslationResult { schema: RJSFSchema; uiSchema: UiSchema; warnings: string[]; formData?: unknown; } export interface TranslationOptions { strictMode?...
6a610bbf63bf79df2bf93513570c935275082256d54a5f697038a02a5bc8fb4e
TypeScript
1,627
60
import type { LocationBounds } from "../tracks/location-track"; const PLAYBACK_BOUNDS_PADDING = 80; const ROUTE_BOUNDS_PADDING = 42; /** Street-level zoom used when framing a single current location. */ export const MAP_MARKER_ZOOM = 16; /** Camera destination for either a route extent or a current-location marker. ...
5588e89f2c2131c635afda0174fe522cdc8ea06839576fb5cf3d709993cba448
TypeScript
1,632
57
import type { DecodedAttributeValue } from "../../../ir/index"; import type { DecodedLogRow, LogDetail } from "../../../ir/index"; export { LOG_ATTRIBUTE_ROWS, LOG_LEVEL, type DecodedLogRow, type LogDetail, type LogLevel, } from "../../../ir/index"; export function logRowsAttribute( rows: readonly Decoded...
dba928126a6518bf65ad43cdd7a369cc20b20bc9efda28b99f69519449e4ebcb
TypeScript
1,633
57
import { useRef } from "react"; import type { Group } from "three"; import type { FoScene } from "../fo3d/render-types"; import { useFo3dBounds } from "./use-bounds"; type UseFo3dSceneBoundsArgs = { assetsGroupRef: React.RefObject<Group>; foScene: FoScene | null; isParsingFo3d: boolean; rootAssetCount: number;...
e45ab7fa7f4c816ca1dab66603d5d68b56890954778e65de10a9027592b17800
TypeScript
1,640
56
import { describe, expect, it } from "vitest"; import type { ResolvedLocationTrackPosition } from "./location-track"; import { mapRouteProgressFilters } from "./route-progress"; function resolved( overrides: Partial<ResolvedLocationTrackPosition>, ): ResolvedLocationTrackPosition { return { boundarySegmentInde...
2b53528130e91bab36751c685df62874c09616d1f057df4d3faab8094bd473f8
TypeScript
1,641
53
import { LocalEventTarget } from "@fiftyone/events"; import { describe, expect, it, vi } from "vitest"; import { VideoLooker } from "./video"; const looker = () => { const eventTarget = new LocalEventTarget(); return { eventTarget, updater: vi.fn() }; }; describe("looker error events", () => { it("puts an error...
50203d1b5d330d46810f6893b39e78a6813214bf0fd4420165644fdd575c5a52
TypeScript
1,642
52
import { describe, expect, it, vi } from "vitest"; import type { TestSelectorFamily } from "../../../../../../__mocks__/recoil"; import { setMockAtoms } from "../../../../../../__mocks__/recoil"; import * as entryCounts from "./EntryCounts"; vi.mock("recoil"); vi.mock("recoil-relay"); const MOCK_NO_RESULT = { count: ...
6a174e11f5f5f3a6cdaf640afcfcb52499a3288e47765b932060e7fd6c7e60c9
TypeScript
1,642
40
import { atom, type PrimitiveAtom, useAtomValue, useSetAtom } from "jotai"; import { useEffect } from "react"; import type { MediaBitmap } from "../types"; /** Resolves the active surface's currently-displayed media as a decoded bitmap. */ export type SegmentBitmapResolver = () => Promise<MediaBitmap | null>; // Modu...
d534a03f4b469a376e9ac279611a22a07b9d22d7613e0fcf22a01192622355d2
TypeScript
1,643
58
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { Undoable } from "@fiftyone/commands"; import type { KeypointOverlay } from "../overlay/KeypointOverlay"; /** * Undoable command for removing a single point from a KeypointOverlay. * * Constructor captures the point's relative position and variant so undo ...
69c772966606f4afae5c8db96c96951578fe4241f4de57797fec8752b2c226b4
TypeScript
1,645
43
import { describe, expect, it } from "vitest"; import { diagnosticMessage, errorMessage, toError } from "./errors"; describe("source-neutral error helpers", () => { it("preserves Error messages and applies fallbacks to unknown values", () => { expect(errorMessage(new Error("Invalid MCAP footer"))).toBe( "...
b56c1624801956679a7f73e23060f10db8fa480ec6d9d19a06cfae92299b676c
TypeScript
1,658
58
/** * Copyright 2017-2026, Voxel51, Inc. */ import { getTime, type VideoLooker } from "@fiftyone/looker"; import { usePlayback } from "@fiftyone/playback"; import { useCallback, useEffect, useRef } from "react"; /** * Keeps the timeline's playhead on the looker's frame while paused, and * returns the seek the tim...
231b15b06223c561608e1186c6ce891e9db4b6f2a9a8b14f95e9860f036560d2
TypeScript
1,662
41
import { describe, expect, it } from "vitest"; import { BYTE_SOURCE_READ_PROFILE } from "../../../ir"; import { defaultTimelineSamplingRateHz, normalizeTimelineSamplingRateHz, TIMELINE_SAMPLING_PRESETS, timelineSamplingPresetForRate, sanitizeTimelineSamplingRateHz, } from "./timeline-sampling"; describe("ti...
0db0dd1c2bfac42790701ccb65f114227352ce8dcf6e67bd9d9fb5def2f67d79
TypeScript
1,669
59
import { describe, expect, it, vi } from "vitest"; import { TEMPORAL_DETECTION, TEMPORAL_DETECTIONS } from "@fiftyone/utilities"; import { filterTemporalLabel, TemporalDetectionOverlay, } from "./classifications"; const LABEL_BASE = { id: "", label: "", tags: [], }; describe("classification and temporal de...
3609455488e0e11a95e609216524f878cc6a26ffdfb476ceded0c47d82f74b47
TypeScript
1,669
55
import type { Scene2D } from "@fiftyone/lighter"; import { useEffect } from "react"; import type { AnnotationEngine } from "../../core/engine"; import { decodeEntityId } from "../../identity/entityId"; import { LABEL_PATCH_SIGNAL, type LabelPatchSignal, } from "../../signals/labelPatch"; /** * Mirror live label-...
546127756b7a1df68a1be97f7ec55a006795de842717fe8a8464900252797436
TypeScript
1,671
47
const FNV1A_OFFSET_BASIS = 0x811c9dc5; const FNV1A_PRIME = 0x01000193; /** Returns the eight-digit FNV-1a hash of a byte sequence. */ export function fnv1aBytesHex(data: Uint8Array): string { let hash = FNV1A_OFFSET_BASIS; for (const byte of data) { hash ^= byte; hash = Math.imul(hash, FNV1A_PRIME); } ...
5909dcfa06baf7e60abeae96a4728e3a5d3af764609449c59008fbd1dcc351ac
TypeScript
1,676
62
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { OverlayConstructor } from "../overlay/OverlayFactory"; import { OverlayFactory } from "../overlay/OverlayFactory"; /** * Registry for plugins that extend overlay functionality. * * NOTE: THIS IS CURRENTLY UNUSED - this needs to be hooked with fiftyone plu...
b3c7556105d05179c2256ff3b58b6216c94cab2fbc2425644e7a231592be6c9d
TypeScript
1,678
68
import { ImaVidState } from "../../state"; import { BaseElement, Events } from "../base"; import { lookerThumb, lookerThumbSeeking } from "../video.module.css"; // controls element: not shown in grid (thumbnail = off) export class SeekBarThumbElement extends BaseElement< ImaVidState, HTMLDivElement > { private ...
5d4d4baa5311cb4903cf2212a81cf324dc2a8c1f07d883974fb4c43868f279ca
TypeScript
1,680
66
/** * Public decoder registry and decoder authoring contracts. */ export { DecoderRegistry, defaultDecoderRegistry, payloadDescriptorKey, resourceHintsForArrayBufferViews, } from "./decoders"; export type { DecodeContext, Decoder } from "./decoders"; export type { DecodedAttributeValue, DecodedOutput, D...
9249d0affd69b2f70727f493827ac78e4efc59c130bc15c197ab4553021b372b
TypeScript
1,683
61
import { describe, expect, it } from "vitest"; import { deferred, flush } from "./persistTestHarness"; import { enqueuePersist } from "./persistQueue"; describe("enqueuePersist", () => { it("starts a persist only after the previous one for the engine settled", async () => { const engine = {}; const first = d...
e8cc1c35ce46e25e30033d0626263691e2b727cc90636fa9fc2232f75632b77c
TypeScript
1,683
57
import { useBrowserStorage } from "@fiftyone/state"; import { useCallback, useMemo, type SetStateAction } from "react"; import { DEFAULT_SELECTED_CUBOID_CROP_MARGIN } from "../constants"; import type { Fo3dPointCloudSettings } from "../fo3d/context"; const DEFAULT_POINT_CLOUD_SETTINGS: Fo3dPointCloudSettings = { ena...
9c2f02df52973410b89699cda00a7c4e08b342ab29bdd57df1c79a79a54d8d01
TypeScript
1,687
64
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useCallback } from "react"; import { executeOperator } from "@fiftyone/operators"; export type LoaderValue = { state: "idle" | "loading" | "loaded" | "errored"; data?: unknown; error?: string; }; export interface UseExecuteLoaderOptions { /** The operato...
4634c6c5d57b125f1bd79b048e53b6300b27f08c8d3970f2d328013c64555d86
TypeScript
1,689
65
import { atom, useAtom } from "jotai"; import { useEffect, useMemo } from "react"; import { AgentTaskType, AnnotationAgent, InferenceCapability, InferenceResultProxy, } from "../types"; const capabilitiesAtom = atom<InferenceCapability[]>([]); const isResolvedAtom = atom<boolean>(false); /** * The inference ...
3a75e0532462a26dd5b892cf2759cd283beabdb65447e39604920220a9f953ae
TypeScript
1,693
57
import type { PolylineProjectionData, ProjectedCorner, ProjectedEdge, } from "../projection/types"; import type { Native2dPolyline } from "./types"; export interface Native2dPolylinePixelData extends PolylineProjectionData { /** Per-segment pixel points, so a `filled` polyline can be drawn as polygons. */ se...
515489493155c39e3c219d89ffa746491ee37016abecbf9b512bd2ca7f4931a2
TypeScript
1,695
65
import type { McapGridPreviewDecodeRequest, McapGridPreviewResult, } from "../resource-client/grid-preview"; import type { McapPlaybackWorkerFetchParameters } from "./playback-worker-types"; import type { McapPlaybackWorkerPriority } from "./playback-worker-types"; /** * Payload for one high-level MCAP grid previ...
9789a3db408bcf2262e0a6b0974ed57f153fdc96014eb6fc22ff0966ca495c58
TypeScript
1,696
56
// Deep imports on purpose: the playback package root barrel pulls view // components whose relay fragments cannot evaluate under vitest. import { usePlaybackStore } from "@fiftyone/playback/runtime"; import { getIsBuffering, getIsPlayPending } from "@fiftyone/playback/runtime"; import type { PlaybackStore } from "@fif...
d9fa8ef41447567fb01053b84d48e778b10b89d78f9a43005ec4fbcc047a6762
TypeScript
1,697
49
import { parsePCDData } from "./parse-pcd-data"; self.onmessage = async (event) => { try { const { data, littleEndian } = event.data; const result = parsePCDData(data, littleEndian); const buffers = []; const transferables = []; const bufferDestructurables = []; /** * note: we need to ...
4acc9e52a863139cc47f128152d69d3ff0fa5c8588da2a435a0a96a0e5d460fb
TypeScript
1,703
45
/** * The generalized cross-surface LABEL-PATCH signal: a render-only preview of a * label edit, carrying the SAME `Partial<LabelData>` shape that * `engine.updateLabel` commits. Any surface publishes the fields it is * previewing mid-edit (a slider, a text input, a gesture); observers merge * `{ ...committed, ......
57d5e01702297498c28c47b3db35621b6ad6e8cd980f2cad44883baf31f92907
TypeScript
1,704
51
import { describe, expect, it } from "vitest"; import { gridFilterPath } from "./filterPath"; describe("gridFilterPath", () => { it("drops the list segment for patch paths in a patches view", () => { // Filters written under the root path are silently dropped by the // server in a patches view (FOEPD-4404) —...
1095b8030c98c962e8fcbef6875e55f79f4e66f7c2e93f147c7b5f4a541ecbcb
TypeScript
1,706
59
import { describe, expect, it } from "vitest"; import { formatMapMeasurementDistance, mapMeasurementDistance, nextMapMeasurementState, } from "./measurement"; import { haversineDistanceMeters } from "./wgs84"; describe("mcap map measurement", () => { it("advances a two-click measurement and restarts after comp...
003d4ba5af3cd011929d37118ee67baf0300b0acb7bd0ba50519d7ebe34d6c41
TypeScript
1,709
45
import { describe, expect, it } from "vitest"; import { SelectionLayers } from "./selectionLayers"; describe("SelectionLayers", () => { // The reported bug, end to end: lasso 5 points, check a grid sample, // uncheck it — the lasso's emphasis must come back, not vanish it("restores the lasso when the host select...
a3c2e53fee4ce1de3c825536d5f7936202bb2f136839f2564032483753519907
TypeScript
1,709
71
/** * Public byte-cache constants and source profile values. */ export * from "./constants"; /** * Public byte query client factories. */ export { createAdaptiveByteCacheBlockSize } from "./adaptive-block-size"; export { createCachedByteClient, defaultByteCacheBlockSizeBytes, planByteCacheFillRequest, } from...
aef2fc73ceecc497942378ebde3db86c478d530abba161272feb8254d2c840a2
TypeScript
1,712
41
import { createStore } from "jotai"; import { describe, expect, it } from "vitest"; import { activeLabelSchemas, activePathsOrder, labelSchemasData, schemaDatasetName, } from "./state"; describe("dataset-scoped schema atoms", () => { it("values belong to the dataset they were written under", () => { cons...
befc7fad6f572572d59d98b6fe13549d008a463779c53641ca4981e043c7ae0d
TypeScript
1,718
47
import { afterEach, describe, expect, it, vi } from "vitest"; import { highlightRevealedTile, registerTile, setTileHighlight, unregisterTile, } from "./gridTileRegistry"; function tile() { const root = document.createElement("div"); const overlayEl = document.createElement("div"); root.append(overlayEl);...
7c23f4f0c2a80aa826c351c1476de2d688adca772dee927bcf9d704423850bf2
TypeScript
1,722
56
import { describe, expect, it } from "vitest"; import { frameTransformIndexedRangeEndCovering, isFrameTransformRangeIndexed, isFrameTransformTimeIndexed, mergeFrameTransformTimeRanges, } from "./frame-transform-ranges"; describe("mergeFrameTransformTimeRanges", () => { it("sorts and merges overlapping, touch...
59f2d39ac6beceb755f205798b6fee478675b9ff8a148df9f3cdf039eeeb4534
TypeScript
1,729
38
/** * Interaction policy for the Lighter surface: the contract a surface uses to * veto select/deselect gestures before they route into the engine, plus the * aggregation that composes several independent vetoes into one. * * The engine bridge consults a single {@link LighterInteractionPolicy}; the * surface buil...
ddbbdd5aa0aab586a88094f443f1cad677825acbc8de95513e0c0de0f9a0468b
TypeScript
1,730
52
import type { EpisodeTileExtension, EpisodeTileExtensionId } from "./types"; import { createExtensionRegistry } from "../host/registry"; const REGISTRY_KEY = Symbol.for( "@fiftyone/multimodal:episode-tile-extension-registry", ); const registry = createExtensionRegistry<EpisodeTileExtension>( REGISTRY_KEY, "episo...
88a17191cbae1dad0ffc83305a71e850e83bc355054a79098e9819ff79665df4
TypeScript
1,733
51
/** * Copyright 2017-2026, Voxel51, Inc. */ import { modalBridge, useModalLookerOptions } from "@fiftyone/state"; import type { ModalViewportState } from "@fiftyone/state"; import { useLayoutEffect, useState } from "react"; import { useInitializeViewport } from "./useInitializeViewport"; import { useCanonicalMediaBou...
82c9b3bcf83977215d33131f8d15df924e6e9b4ae314d8292c4fd43afbfa4128
TypeScript
1,738
46
import { describe, expect, it } from "vitest"; import { createZonedRemoteBlockSize } from "./remote-block-zones"; import { BYTE_SOURCE_READ_PROFILE } from "./constants"; import type { ByteRangeReadRequest } from "./types"; const MB = 1024 * 1024; function request(offset: bigint, sizeBytes?: string): ByteRangeReadRequ...
f4f87100070ce0c571d387d7edf82fa257e6f188fde234d587610d80160aef10
TypeScript
1,741
63
import type { SchemaType } from "@fiftyone/core/src/plugins/SchemaIO/utils/types"; import type { FormProps } from "@rjsf/core"; import type { RJSFSchema, UiSchema } from "@rjsf/utils"; export enum SmartFormInputs { String = "string", Number = "number", Integer = "integer", Boolean = "boolean", Null = "null",...
5b9aef3bb515697bf173c2876a8c827f1fbfa927ce37f14dc15d14309eb5f78a
TypeScript
1,747
59
import type { ReadWorkUsage } from "../../../ports"; import { emptyReadWorkUsage } from "../../../ports/read-work-usage"; /** Best-effort work known to have completed before a bounded read stopped. */ export interface McapBoundedReadCancellation { readonly usage: ReadWorkUsage; } /** * Internal cancellation carryi...
c91120fc43693d3984684db773c035c2c48a45fd2515721b5f25fe15abbdd369
TypeScript
1,752
56
import { DetectionLabel } from "@fiftyone/looker"; import { DETECTION } from "@fiftyone/utilities"; import { Euler, Quaternion } from "three"; export interface Coordinates3d { position: { x?: number; y?: number; z?: number }; dimensions: { lx?: number; ly?: number; lz?: number }; rotation: { rx?: number; ry?: nu...
96f9991f36ccfb52aa5c592fec35b560f7160a89d99ffaca46c46f36af919280
TypeScript
1,753
64
export type SupportBound = "start" | "stop"; export interface Span { start?: number; stop?: number; } /** * Validates a TemporalDetection's `[start, stop]` frame support the way the * SDK's `FrameSupportField` does: whole frame numbers with `1 <= start <= stop`. * With a known `frameCount`, the span also may n...
3e71be5fa1e0866c0345dc123242ac86fb74d6a45b4e4c1010722f45e0a834da
TypeScript
1,754
55
/** * Entries for the Annotate tab's "UNSCANNED FIELDS" group: the * dataset's label and primitive fields that are not yet set up for * annotation (explore-only). Managers get a one-click scan on each row * (see `UnscannedFieldEntry`); everyone else sees no group — the * affordance is the group's whole point. Syst...
3aa9634ce9e088c11e1f8e529887d4e26a45bbb01beb3ee05d78b3d16be8cb8d
TypeScript
1,759
58
import { useMemo } from "react"; import { Box3, Vector3 } from "three"; import type { RenderModel } from "../annotation/store/types"; import type { ReconciledDetection3D, ReconciledPolyline3D, } from "../annotation/types"; function computeBoundsForDetection(detection: ReconciledDetection3D): Box3 { const [cx, cy...
2b49c7cc9da5884b97aecb445a530bfcbd942d78850ab267e9dce02a7d00f7ed
TypeScript
1,764
60
/** * Copyright 2017-2026, Voxel51, Inc. */ import { CommandDispatcher } from "./dispatcher"; export const DEFAULT_CHANNEL_ID = "default"; /** * Static registry of command dispatchers by channel ID. */ const dispatcherRegistry = new Map<string, CommandDispatcher>(); /** * Gets or creates a command dispatcher f...
421568b74de3b663fb402361cc28d86a076b64a9377aaa0a3dbd78a78111a215
TypeScript
1,764
67
import { describe, expect, it } from "vitest"; import { DEFAULT_SPLAT_SETTINGS, getSplatLodScale, getSplatSortRadial, normalizeSplatSettings, } from "./settings"; describe("normalizeSplatSettings", () => { it("uses performance-first defaults for missing data", () => { expect(DEFAULT_SPLAT_SETTINGS).toEqu...
7e32883265ddccf68b49a801b0be58cc5dabd9511c181e331ed99a7dd89b7c12
TypeScript
1,767
55
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { Undoable } from "@fiftyone/commands"; import type { DetectionOverlay } from "../overlay/DetectionOverlay"; import type { PaintStrokeData } from "../overlay/MaskCanvas"; export interface MergeDetectionsCommandDeps { /** Persists deletion of the source label...
6a23c958e8801ea531c9a47f927f14f4463c847349bd2e481a9f8145cb7d3362
TypeScript
1,769
62
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useSessionSetter, useSetModalState } from "@fiftyone/state"; import { useCallback } from "react"; import type { EventHandlerHook } from "./registerEvent"; export const handleGroupId = (search: URLSearchParams, groupId: string) => { search.delete("id"); search...
62ce97fc3910b1173b426d9f57d90363325c1392c992fc387362a02bbb890b8b
TypeScript
1,770
56
import { describe, expect, it } from "vitest"; import { getGradientFromSchemeName } from "./gradientMap"; describe("getGradientFromSchemeName", () => { it("should generate correct number of stops for viridis", () => { const stops = 10; const gradient = getGradientFromSchemeName("viridis", stops); expect...
0bd50382752092ba8c38fac7e111952b445802e695c842eda87fa730b3edd0a9
TypeScript
1,771
66
import { FO_LABEL_HOVERED_EVENT, FO_LABEL_UNHOVERED_EVENT, LabelHoveredEvent, selectiveRenderingEventBus, } from "@fiftyone/looker"; import { jotaiStore, removeAllHoveredInstances, updateHoveredInstances, } from "@fiftyone/state/src/jotai"; import { useEffect, useState } from "react"; import { OverlayLabe...
d5093dd7931468b73cc10b54ecc5f9e0fbf900a5759de16dfc3635c631e98c40
TypeScript
1,774
67
import { describe, expect, it } from "vitest"; import { createTaskQueue } from "./taskQueue"; function deferred<T>() { let resolve!: (value: T) => void; let reject!: (reason: unknown) => void; const promise = new Promise<T>((res, rej) => { resolve = res; reject = rej; }); return { promise, resolve, r...
b46fc2e6242e7fb8cbbb9b396af362d9a896cfd6adef22358634bcf64f732f91
TypeScript
1,778
50
/** * The plot's bottom-left counter. * * A selection is the thing the user just did, so while one exists the counter * leads with it. The run's size stays alongside as context — a selection means * little without knowing what it was drawn from — but it is never the only * number on show, which read as "nothing w...
c62ef1f8685bfcef06705fdbb53163f6b9309caf7cc596a93fcf6f9ef1da95c5
TypeScript
1,780
69
import type { SidebarEntry } from "@fiftyone/state"; import { useEventHandler } from "@fiftyone/state"; import type { MutableRefObject } from "react"; import { useCallback } from "react"; import type { InteractiveItems } from "./types"; import type useGetNewOrder from "./useGetNewOrder"; import type { Direction } from ...
defbe4f832cbcdd86f7b65f0fc971ab4107fcf72b55a8dc241d24073b78ea67c
TypeScript
1,780
69
import { parseTimestamp } from "@fiftyone/core/src/client/util"; import type { Sample } from "@fiftyone/looker"; /** * Freshest server-confirmed `last_modified_at` per sample id. The modal sample * only catches up after a refetch, so a write inside that window would * otherwise carry a stale token. */ const confir...
efbb6ebc4a331580f02ed109e33f6752f8d937acb09d1fd287dd7165a18d8d9b
TypeScript
1,784
64
/** * Copyright 2017-2026, Voxel51, Inc. */ import { describe, expect, it } from "vitest"; import { hasApplicableAnnotationSlice } from "./useGroupAnnotationModeController"; import type { AnnotationSliceInfo } from "./useGroupAnnotationSlices"; const slice = (over: Partial<AnnotationSliceInfo>): AnnotationSliceInfo...
e5a6f4d47209b299f5b5c52f211c05bb9188df070ffcdc07430ddbf1e141b162
TypeScript
1,791
46
/** * Copyright 2017-2026, Voxel51, Inc. * * Named for the built-ins rather than the hook: `fiftyone-teams` carries its * own `useAgentRegistry.test.ts` (covering `register`), which OSS does not * have, and two unrelated files at one path are an add/add conflict on every * enterprise sync. * * The registry's bu...
bf0a3334473427dfd172c8ab4d89cecdc383fd6ab2c974f63592119757ff4476
TypeScript
1,798
65
import { describe, expect, it, vi } from "vitest"; import { createFollowCameraState, playbackCameraTarget, updateFollowCamera, } from "./follow-camera"; describe("map follow camera", () => { it("keeps seam-crossing comet bounds in one continuous world copy", () => { expect( playbackCameraTarget( ...
e79e216e29b3f61d90844c3c9a0fd57d15d75a3875b95d823c72d6a63f48b53f
TypeScript
1,819
52
interface CameraAssociationSetting { readonly calibrationStream: string | null; } /** * Applies explicit per-image calibration overrides to inventory-owned camera * associations for 3D frustum textures. */ export function resolveFrustumImageStreams({ cameraStreams, inventoryImageStreams, settingsByImageStre...
67d5fad76aaf2f72a5dc9be12960b354887008472e986ab485b9f3120a139f56
TypeScript
1,823
64
import { beforeEach, describe, expect, it, vi } from "vitest"; import type { BaseState, Sample } from "../../state"; import { computeTagData } from "./computeTagData"; import { TagsElement } from "./tags"; vi.mock("./computeTagData", () => ({ computeTagData: vi.fn(() => []), })); const makeState = ( options: Part...
d4b0f48dae3ecf55a77269517304dca221ecb11fe66f2a42b40cf311383cd1c6
TypeScript
1,833
54
import type { StreamId } from "./manifest"; /** * One scalar leaf addressable by a plot or inspector. A "string" value type * plots as discrete states; every other type plots as a numeric line. */ export interface NumericFieldDescriptor { readonly path: string; readonly valueType: string; } /** Why a stream ca...
98c6a7ca06f8894554f861010c18608fbcf02e2a172679f6821e7eaea375bdbe
TypeScript
1,834
60
import * as fos from "@fiftyone/state"; import { isInMultiPanelViewAtom } from "@fiftyone/state"; import { useEffect, useMemo } from "react"; import { useRecoilValue, useSetRecoilState } from "recoil"; import { annotationPlaneAtom } from "../state"; import { RenderPath } from "../types"; interface UseFo3dPanelRoutingA...