sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
f44c52b9c120a5716ba5a41c0c40db85783f3ef135b1bc1c42fa090a163b449b
TypeScript
3,452
108
import type { SceneSource } from "../../../ir"; /** Stable, recording-independent identity for one visualization source. */ export type SemanticSourceKey = string; const MAX_SOURCE_PART_LENGTH = 512; export const MAX_SEMANTIC_SOURCE_KEY_LENGTH = 1_100; /** * Builds a collision-safe source identity. JSON tuple encod...
eb22bddde367ebd1a326dd18d1ed7c3d6de7e77af7e345ecd95441e9a980d93d
TypeScript
3,454
137
import { Control, ImaVidState } from "../../state"; import { BaseElement, Events } from "../base"; import { lookerPlaybackRate } from "../video.module.css"; import { lookerClickable } from "../common/controls.module.css"; import { playbackRate } from "../../icons"; import { IMAVID_PLAYBACK_RATE_LOCAL_STORAGE_KEY } from...
5100b375d726a17d94246a895b6f8b9a5f0c2158c9560a6bf41592f438674772
TypeScript
3,457
121
import { useEffect, useRef } from "react"; import { useRecoilState } from "recoil"; import type { BufferGeometry } from "three"; import { Points, Vector3 } from "three"; import { useFo3dContext } from "../fo3d/context"; import { currentHoveredPointAtom } from "../state"; import type { HoverMetadata } from "../types"; i...
c13ed14bb5840aff1481d606d3afeb84dfd0107ffc7185d370f1adc5c23ed005
TypeScript
3,459
99
/** * Custom-schema visibility moves: the modal footer's "Move N to * hidden/active fields" over the checkbox selection. Kept out of * `hooks.ts` on purpose — that module is imported everywhere, and this * one needs the schema-doc layer (`useSchemaDocs`), which reads * manager atoms that unrelated test mocks of `....
b7c2e0be3c539353728d09038bdf794928f48d5191af65dd91e1c90012b84e4a
TypeScript
3,469
132
import type * as fos from "@fiftyone/looker/src/state"; import type { ModalSample } from "@fiftyone/state"; import { LABEL_LIST, type LabelData, type Schema, getCls, } from "@fiftyone/utilities"; const RENDERABLE = ["Detection", "Polyline"]; const RENDERABLE_LIST = ["Detections", "Polylines"]; /** * The pers...
b91a991b0c540938f10ba9390d3bad0b03e32649106526f21ba8fd299c5d226d
TypeScript
3,475
117
/** * Copyright 2017-2026, Voxel51, Inc. */ import type { AnnotationEngine } from "@fiftyone/annotation"; import type { useLighter } from "@fiftyone/lighter"; import type { AnnotationLabel, AnnotationLabelData } from "@fiftyone/state"; import { getDefaultStore } from "jotai"; import { useCallback, useRef } from "rea...
7c68b657bd4314364c39a45093bc3f145daac3635a008960a9945519a4cdc968
TypeScript
3,479
115
import type { ByteClient } from "../../query/bytes/index"; import type { McapResourceClient } from "./contracts/index"; import { createInlineMcapResourceClient } from "./resource-client/inline-client"; import { createWorkerMcapResourceClient } from "./worker-host/index"; /** * Options for constructing an MCAP resourc...
eaf0c2181e3da60db6405ec1676b2b734f0f55fb21280199e453ddefc3ed9dfa
TypeScript
3,479
138
/** * The looker package (@fiftyone/looker) defines the Control/ControlMap shape and * we want to preserve that shape in Lighter so we can use it to define shortcuts. * * This file helps us map internal actions to Controls so * we can use them to document shortcuts. */ import { json, readActions, resetZoom...
d54bef4f500399ea66494a203c7691002930dfb46b01a85e27c90ec22efac1d4
TypeScript
3,480
91
/** An interval this module can place; only the span matters. */ export interface PackableInterval { readonly start: number; readonly end: number; } /** * Level of an interval that did not fit: every level was already busy where it * starts. It is not drawn. */ export const UNPLACED = -1; export interface Pack...
99476120bb6cdc734bfbbc5d4e9c2dd289e12a74af51cc9771beb5cd402cd9dd
TypeScript
3,486
136
import { describe, expect, it } from "vitest"; import type { SceneEntityVisualization, SceneUpdateVisualization, } from "../../../../ir/index"; import { VISUALIZATION_KIND } from "../../../../visualization/index"; import { sceneUpdateSnapshotAt } from "./scene-update-state"; describe("sceneUpdateSnapshotAt", () =...
bb2578a92c98786f0c1ab1602ddf4eb15ba067fe590a5c71e248a9578c1cd11a
TypeScript
3,500
96
import type { useGridSelection } from "@fiftyone/state/src/selection"; import { useCallback, useEffect, useRef } from "react"; import type { Records } from "./useRecords"; import { PAGE_SIZE } from "./constants"; /** * Picks a tile into the active section, or with Shift the inclusive range * from the last pick. */ ...
05f7e8a115f4fee52f182ee8ca6377bb297fd467e35491c8145ce06dfcdfde47
TypeScript
3,512
135
/** * Shared engine test fixtures: a minimal label schema and store/engine * factories. Test-only — not exported from the engine barrel. */ import type { Field, LabelData, Schema } from "@fiftyone/utilities"; import { Sample } from "@fiftyone/utilities"; import { AnnotationEngine } from "../core/engine"; import ty...
f25082d22a5afa90745e6b17ae7e0e7d75b9ccca1735451a5e480cf4e9eee9fe
TypeScript
3,514
106
import { describe, expect, test, vi } from "vitest"; import { EventDispatcher } from "./dispatcher"; import { forwardingLegacyDomEvent, isLegacyDomMirror } from "./legacyDomEvents"; const bus = new EventDispatcher<Record<string, unknown>>(); /** The DOM events `type` on `target` receives while `run` runs */ const hea...
a5deadbb84e6342f2dbd2385237183cf7540dcc3b2551d9461f95c469e08ddea
TypeScript
3,520
122
import { describe, expect, it } from "vitest"; import type { FoScene, FoSceneNode } from "./render-types"; import { getVisibilityMapFromFo3dParsed } from "./utils"; const node = ( name: string, visible: boolean, children: FoSceneNode[] = [], ): FoSceneNode => ({ name, visible, children, }) as FoS...
a22c0681170cdcddff18ebfd15615fb4fe762087f7c1a008b58b4c34073aa346
TypeScript
3,528
155
/** * Copyright 2017-2025, Voxel51, Inc. */ import { describe, it, expect, beforeEach, vi } from "vitest"; import { CommandRegistry } from "./CommandRegistry"; import { ActionManager } from "../actions"; describe("CommandRegistry", () => { let registry: CommandRegistry; const cmdOne = "fo.test.command"; const...
9a5159df3a1eaf4af165da11bcd9f39919f1e7e97335c9a0356a5df65b585628
TypeScript
3,530
122
import { describe, expect, it } from "vitest"; import type { PointCloudVisualization } from "../../../../ir"; import { pointCloudNativeIntegerScalarEncoding } from "../../../../runtime/point-cloud-channel-encoding"; import { VISUALIZATION_KIND } from "../../../../visualization"; import { hoveredPointForFrame } from "....
bbc25dc401ea91292bf5a24b0f80c85404add5929cb6a73075bfd4a5d8774b75
TypeScript
3,530
121
import { describe, expect, test, vi } from "vitest"; import { LocalEventTarget } from "./local-target"; describe("LocalEventTarget", () => { test("a listener receives the type and detail, synchronously", () => { const target = new LocalEventTarget(); const listener = vi.fn(); target.addEventListener("sel...
8ecc082142c6de2be3e5e4f5b64366652bb6f016a07bf7d62c381848d30007ca
TypeScript
3,536
131
import type { StyleSpecification } from "maplibre-gl"; import { describe, expect, it } from "vitest"; import { initialMapBasemapStatus, mapBasemapSourceIds, mapBasemapStatusText, mergeMapOverlaysIntoStyle, shouldShowMapStaticPreview, } from "./basemap"; import { MAP_BASE_LAYER } from "./rendering/types"; con...
29b8d2f11244af7016f85af6b5d25c76d0881d2d09a36f7a8a5ebd758e8ad872
TypeScript
3,537
122
import { renderHook } from "@testing-library/react"; import type { CameraControls } from "@react-three/drei"; import type { RefObject } from "react"; import type { PerspectiveCamera } from "three"; import { Vector3 } from "three"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { getEve...
67f1dc8ba7e8eb92ea97e364b69d796ad707cb4cc56a35efe1472d4fe0a11300
TypeScript
3,545
110
import { beforeEach, describe, expect, it, Mock, vi } from "vitest"; import { enqueueFetch } from "./pooled-fetch"; const MAX_CONCURRENT_REQUESTS = 100; // helper function to create a deferred promise function createDeferredPromise<T>() { let resolve: (value: T | PromiseLike<T>) => void; let reject: (reason?: any...
107e635dddb07c0c3811cb958c93ac267d4b04028401f6b2592b728cb14710fc
TypeScript
3,553
113
import { describe, expect, it } from "vitest"; import { aggregateAlignedNumericSeries } from "./numeric-series-buckets"; describe("aggregateAlignedNumericSeries", () => { it("preserves spikes and source gaps", () => { const result = aggregateAlignedNumericSeries( Float64Array.from({ length: 20 }, (_, index...
8708c33b3ef342f5fe7d043333c81ab4df5ed69a2073d82469b0415fb3c89ca4
TypeScript
3,554
102
import { describe, expect, it } from "vitest"; import { createTimelineIndex } from "./timeline-index"; describe("timeline index", () => { it("represents the default 30 Hz tick grid without materializing it", () => { const timeline = createTimelineIndex({ endNs: 100_000_000n, startNs: 0n }); expect(timeline....
c7026e99e2a60278edac78c1f092d37b78e8b0fff0ffd713d79f5fc2f45bda9b
TypeScript
3,554
118
import { getEventBus } from "./dispatch"; import { EventHandler } from "./types"; export type DemoEventGroup = { "demo:eventA": { id: string; name: string; }; "demo:eventB": { value: number; }; "demo:eventC": { foo: string[]; }; // Event with no payload "demo:eventD": undefined; }; /**...
565d90b21e7c23d1e26632e833404c640d09b463b119dfbbc37c8d4e2f9f7233
TypeScript
3,557
112
/** * Copyright 2017-2026, Voxel51, Inc. */ /** * The hit-testing half of label visibility, driven through the real event * wiring — same reason and same shape as `readOnly.test.ts` beside this file: * `Scene2D.shouldShowOverlay` stops PAINTING a filtered-out label, but * painting and hit-testing are separate sy...
1f4f8ae961344f71d19f8c06f1fa9f71b6348029518936e6d99752486fc55ede
TypeScript
3,572
110
/** * The looker-3d retained-mode surface bridge. The 3D annotation WORKING STORE * is this surface's "scene" (cf. Scene2D for Lighter): the engine read-half * loop mounts/updates/unmounts working-store entries, and finalize gestures * commit them back through the SurfaceController. * * The store is injected ({@l...
aa132ecb4b9c3cc4eab1141afff2de3aee5920d6ffe195c90cfe509eed10cb2a
TypeScript
3,590
96
import { atom, useAtomValue, useSetAtom } from "jotai"; import { useEffect, useMemo } from "react"; import type { Looker3dHandle, SurfaceController, Working3dLabel, } from "../engine"; /** * The looker-3d {@link SurfaceController}, registered by the app layer's * annotation bridge (`useLooker3dAnnotationBridge...
7f3ca37dc38a61cebcb741a816b84b20c995b302f730f6622e0becf1f0915ecb
TypeScript
3,597
106
import { useAnnotationEngine, useLighterEngineBridge, } from "@fiftyone/annotation"; import { useCurrentDatasetId, useGetKeypointSkeleton, useIsImageDynamicGroupVideo, useIsVideo, useModalSample, } from "@fiftyone/state"; import { getSampleSrc } from "@fiftyone/state/src/recoil/utils"; import { getNormali...
eb2a9cf3ca4fc26fd558616ed8cf7f5cc5c1c157eebc536e0086b0109da3212c
TypeScript
3,602
106
import * as THREE from "three"; import { describe, expect, it } from "vitest"; import type { CuboidCreationState } from "../types"; import type { AnnotationPlaneState } from "./types"; import { getCuboidCreationPreview } from "./cuboid-creation-preview"; // The box's forward axis (local +X) in world space. const forwa...
05e1ef23f911bc635ec887c19a782c29f27349e1ab23eed3e0e73277eb372728
TypeScript
3,603
127
import { describe, expect, it } from "vitest"; import { selectScene3dSnapshot, type HeldScene3dSnapshot, } from "./scene-3d-scene-snapshot"; const EMPTY = "empty"; const READY = "ready"; const KEY = "source:streams:frame"; const GRACE_MS = 2_000; describe("selectScene3dSnapshot", () => { it("commits a ready sce...
353a8c7d9187389728678a4c79d6413623956e17bba797233799cae367c200c3
TypeScript
3,605
120
import { useEffect, useMemo } from "react"; import * as THREE from "three"; const NUM_STOPS_FOR_PREDEFINED_NAME = 128; import { ColorscaleInput } from "@fiftyone/looker/src/state"; import colormap from "colormap"; import { DEFAULT_PCD_SHADING_GRADIENTS_RED_TO_BLUE } from "../../../constants"; // this is a map for co...
08703272e69a18823e7050119e5a29ffd2a088ea81842e51b8d15dd2f9beaaaa
TypeScript
3,615
129
import { createAbortError, throwIfAborted } from "../../utils/cancellation"; import { safeNumber } from "./bigint-utils"; import type { ByteClient, ByteRangeReadRequest, ByteSourceDescriptor, } from "./types"; const FILE_BYTE_READ_ABORT_MESSAGE = "File byte-range read aborted"; /** * Creates a byte client that...
f3fd8ec9c83964af91e789d13d62b80fb1a437972deec68396d8abc1a5e76538
TypeScript
3,615
118
import { afterEach, describe, expect, it, vi } from "vitest"; import { getEpisodePlayhead, publishEpisodePlayhead, releaseEpisodePlayhead, resetEpisodePlayheadsForTests, subscribeEpisodePlayhead, } from "./episode-playhead-registry"; afterEach(() => resetEpisodePlayheadsForTests()); describe("episode playhe...
2ca94067e357b898d9e2ae5c65af63a002119d2477244c81fea9f8ebb6dae5a2
TypeScript
3,617
123
/** * Copyright 2017-2026, Voxel51, Inc. */ import { CommandDispatcher } from "./dispatch/dispatcher"; import { getCommandBus } from "./dispatch/registry"; import { Command } from "./types"; /** * Example command: Persist data with a label */ export class PersistCommand extends Command<{ success: boolean }> { c...
c850c18c9834dfe9af624e4b9f31f7cb44832cb5a35f06ea96ef42a1d797542b
TypeScript
3,641
133
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useCallback, useMemo } from "react"; import { atom, useAtom } from "jotai"; export const DEFAULT_TOOL_SIZE = 16; export const MIN_TOOL_SIZE = 1; export const MAX_TOOL_SIZE = 32; export const MIN_CURSOR_SIZE = 1; export const MAX_CURSOR_SIZE = 100; export const S...
a38cba91bef8fa7984995fdfddc6a948c378331b3faac5f6ca6fb61b258f771f
TypeScript
3,644
114
import { EventDispatcher, isE2E, tapAllEvents } from "../dispatch/dispatcher"; import { EventGroup } from "../types"; declare global { interface Window { /** * E2E affordance: lets Playwright arm on any event-bus event by name, and * lets plugins, which bundle their own copy of this package, send on th...
7169edd0c10aec11f136cc5a90901b63287caa8a652ecec784eb2bb31c1475cb
TypeScript
3,650
134
import { VISUALIZATION_KIND } from "../../../../visualization/index"; import type { SceneEntityVisualization, SceneUpdateVisualization, } from "../../../../ir/index"; export interface SceneUpdateDelta { readonly timeNs: bigint; readonly update: SceneUpdateVisualization; } interface SceneEntityRecord { reado...
4c04a30a045e01ed5394b8cf58814577559459a46ba60bbd818b920a1841efe8
TypeScript
3,652
91
import { useModalSample } from "@fiftyone/state"; import { Sample } from "@fiftyone/utilities"; import { atom, useAtomValue, useStore } from "jotai"; import { atomFamily } from "jotai/utils"; import { useCallback, useSyncExternalStore } from "react"; /** * Shared {@link Sample} instances, one per modal sample id. * ...
78627b3d608e74820a00e2da348a886db9014337408fad12b7d3ef3e481fd3b2
TypeScript
3,652
115
import { cleanup, renderHook } from "@testing-library/react"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { SelectionMember } from "@fiftyone/state/src/selection/types"; import { useSavedVideoSegments } from "./useSavedVideoSegments"; const scope = vi.hoisted(() => ({ active...
4acf2949076464c168e21ad5f8cef4b9b465946c7d8afbf2c6ce519027405f0f
TypeScript
3,660
108
import { describe, expect, it } from "vitest"; import { DTYPE_F32, HEADER_BYTES, MAGIC, idAt, parseHeader } from "./protocol"; const makeColumn = ( dtype: number, width: number, n: number, payload: Uint8Array, flags = 0, ): ArrayBuffer => { const buffer = new ArrayBuffer(HEADER_BYTES + payload.byteLength);...
7ce6cda14f9679bcc8e7fd1b8a50f25fb28cd710af1a61e2b06f4834db3c1a2c
TypeScript
3,661
117
import type { DecodeContext, PointCloudChannelProjectionRequest, } from "../../../../decoders/index"; import type { DecodedOutput, PointCloudRenderChannelPayload, } from "../../../../ir/index"; import { bytesField, integerField, stringField } from "./common"; import { decodeCloudiniPointCloud } from "./cloudini...
f5079af632823b1633ffa276d53faf9f637563ab60aa66c0f7be6a4e883e598c
TypeScript
3,663
103
// @vitest-environment jsdom import { beforeEach, describe, expect, it, vi } from "vitest"; import { readRunSettings, writeRunSettings } from "./runSettings"; const KEY = "fiftyone.embeddings-v2.runSettings.v1"; /** A localStorage that fails every write, as a private window or a full quota * does. Settings are a con...
f1b5b6d4586e360f511676074b97b67479c17695e79b5067840edae5e6e4ed89
TypeScript
3,668
109
/** * Copyright 2017-2026, Voxel51, Inc. */ import { FetchFunctionConfig, FetchFunctionResult, getFetchFunctionExtended, } from "@fiftyone/utilities"; export type GetFramesRequest = { /** Sample id for the parent video document. */ sampleId: string; /** Current dataset name. */ dataset: string; /** ...
310cad99a301635ce5320983632afc08a75a445e68e78b3fd35be4ae70f5a1f5
TypeScript
3,671
168
import { describe, expect, it } from "vitest"; import { buildPolylinePixelData } from "./geometry"; import type { Native2dPolyline } from "./types"; const W = 200; const H = 100; const polyline = ( points: [number, number][][], overrides: Partial<Native2dPolyline> = {}, ): Native2dPolyline => ({ _id: "poly-1", ...
a5cd46d9fb9f5ac1468f78602ca5cc10bceb7427eb6027a2a6b1c4899275f5f0
TypeScript
3,672
148
import { DYNAMIC_EMBEDDED_DOCUMENT_FIELD, Schema, getCls, getFieldInfo, } from "@fiftyone/utilities"; import { MIN_PIXELS } from "./constants"; import { POINTS_FROM_FO } from "./overlays"; import { Overlay } from "./overlays/base"; import { BoundingBox, Coordinates, Dimensions, FrameState, ImageState,...
8004fa68f5fcb295daee6011055f7d06d555d3452efd98860cba4cd52e828a2c
TypeScript
3,673
111
import { CommandContextManager, DelegatingUndoable, KnownContexts, } from "@fiftyone/commands"; import { selectionDomainDataset, selectionMemberKey, useActiveSelectionBucket, useRestoreSelection, useSelectionBucketCaptures, useSelectionBuckets, type SelectionBoundary, type SelectionTraySnapshot, }...
66783536d410f4ba4297d59a2b867f75372a705372ae565ba7729edca692fa5d
TypeScript
3,691
134
import type { DecodeContext } from "../../../../decoders/index"; import type { DecodedAttributeValue, DecodedOutput, PoseVisualization, } from "../../../../ir/index"; import { VISUALIZATION_KIND } from "../../../../ir/index"; import { decodeQuaternion, decodeVector3, type ProtobufVector3, } from "../foxglov...
ac430aaf7a638b1772a7eb038f8999b41e16088eceab62deb5c41d0c0c601023
TypeScript
3,694
144
import * as fos from "@fiftyone/state"; import { getFetchFunction } from "@fiftyone/utilities"; import { useEffect, useMemo, useState } from "react"; import { resolveDirectPcdWorldAlignment, WORLD_FRAME, type DirectPcdWorldTransforms, } from "../fo3d/direct-pcd-world-alignment"; import type { GroupStaticTransform...
3fce4b44211cd6fecb071d195815a3285e00a6df47669af812c8f2e3b330d578
TypeScript
3,698
135
/** * Copyright 2017-2026, Voxel51, Inc. */ import { SELECTION_TEXT } from "../../constants"; import type { BaseState, Control } from "../../state"; import { ControlEventKeyType } from "../../state"; import type { Events } from "../base"; import { BaseElement } from "../base"; import { looker, lookerError, lookerHi...
554604a3af32c4072c6aca9dcc05c90554f60a480af4ab0cf43e1ec9a002a300
TypeScript
3,701
65
export { default as Accordion } from "./Accordion"; export { default as AlertView } from "./AlertView"; export { default as ArrowNavView } from "./ArrowNavView"; export { default as AutocompleteView } from "./AutocompleteView"; export { default as Button } from "./Button"; export { default as ButtonView } from "./Butto...
cb6477fda3a012953736c4ea97604264f9492fde84fc7fbc2089d5b468621e54
TypeScript
3,702
131
import { getColoringKey } from "@fiftyone/core/src/components/Grid/useUpdates"; import { syncAndGetNewLabels } from "@fiftyone/core/src/components/Sidebar/syncAndGetNewLabels"; import { gridActivePathsLUT, modalActivePathsLUT, } from "@fiftyone/core/src/components/Sidebar/useDetectNewActiveLabelFields"; import { Im...
344c6a7cc68da0b0a25e9636dea04a446cfe8dcd194c77674e4180db09015acf
TypeScript
3,707
123
import { describe, expect, it } from "vitest"; import { decimateMinMax } from "../../../adapters/mcap/resource-client/numeric-series-decimate"; import { joinNumericSeries } from "./numeric-series-join"; describe("joinNumericSeries", () => { it("returns empty vectors for no series", () => { const joined = joinNum...
ac2cce8342d701a571effbe9fa9d497967546f68a0776db44282d0affd0e0ee2
TypeScript
3,707
115
import { IDBFactory } from "fake-indexeddb"; import { describe, expect, it, vi } from "vitest"; import { SOURCE_FACTS_SCHEMA_VERSION, type StoredSourceFactsV1, } from "./source-facts"; import { requestResult, transactionDone } from "./persistence/indexeddb"; import { createIndexedDbSourceFactsPersistence, selec...
d61d1a95bc2f7507e29ff06abf9a8c8fa14471b0d0be7b8f63b5f296cf81de42
TypeScript
3,709
127
import type { ReconciledDetection3D, ReconciledPolyline3D } from "../types"; /** * * Alias for label ID */ export type LabelId = string; // ============================================================================= // WORKING STORE TYPES // =======================================================================...
2aaab287a5272a70162709b25b019d91fe1fcbe877daf1d7c1d0de77996fdc18
TypeScript
3,715
127
import { resourceHintsForArrayBufferViews, type DecodeContext, type Decoder, } from "../../../../decoders/index"; import type { DecodedAttributeValue, DecodedOutput, } from "../../../../ir/index"; import { VISUALIZATION_KIND } from "../../../../ir/index"; import { rosDecodersForPayloads } from "../ros/factory...
186930f356846053238645f9f2c2a41dae66fef462a4b48de5839130aeb84973
TypeScript
3,721
107
interface OrderedExtension { readonly id: string; readonly order: number; } interface ExtensionRegistryState<Extension extends OrderedExtension> { readonly extensions: Map<string, Extension>; listeners?: Set<() => void>; snapshot: readonly Extension[]; } /** Shared global lifecycle for product extension reg...
fe1457d90321a5ad014ca650d36fc3009bb8468bca3e66233709c102fea68506
TypeScript
3,725
104
import { afterEach, describe, expect, it, vi } from "vitest"; import { annexBDecoderCodecString, isVideoCodecFamilySupported, isVideoCodecSupported, resetVideoCodecSupport, videoCodecFamily, warmVideoCodecSupport, type VideoCodecSupportEnvironment, } from "./video-codec-support"; afterEach(() => { res...
574d4878db9424540c0226272f5ff79e210d9ed533ad93307d552d88cf698bad
TypeScript
3,726
112
/** * Copyright 2017-2026, Voxel51, Inc. */ import { CommandContextManager } from "@fiftyone/commands"; import { afterEach, describe, expect, it, vi } from "vitest"; import { CoordinateSystem2D } from "../core/CoordinateSystem2D"; // Through the package entry: importing KeypointOverlay's module first trips a // pre-...
8cb9c766388f7f4a6f5caf6a6854dd0c88b21ddf4fc4c5fc5d9ee27e6527843e
TypeScript
3,728
129
import { defaultDecoderRegistry } from "../decoders"; import { createAdaptiveByteCacheBlockSize, createCacheApiByteRangeCache, createCachedByteClient, createDefaultByteClient, createMemoryByteRangeCache, createZonedRemoteBlockSize, DEFAULT_BYTE_CACHE_SIZE_BYTES, defaultByteFillLockManager, } from "./byt...
b53c7916ca042e611dc55ca102e27ce738a7fd9f5cc2c0e31fd43a7deac56d16
TypeScript
3,738
128
import type { PayloadDescriptor } from "../../../../ir/index"; export * from "./protobuf/payloads"; function foxgloveCdrPayloads(schema: string): readonly PayloadDescriptor[] { return [ { encoding: "cdr", schema: `foxglove_msgs/msg/${schema}`, schemaEncoding: "ros2msg", }, { enco...
fdfb11108d4d6f3f4dd120f60c01bdebd3fb6aa87aad2c7f58ce9f66cb27ce8e
TypeScript
3,744
130
/** * Copyright 2017-2026, Voxel51, Inc. */ import { SELECTION_TEXT } from "../../constants"; import { getThumbnailSelectionModifiers } from "../../selection"; import { BaseState } from "../../state"; import { BaseElement, Events } from "../base"; import { lookerThumbnailSelector, showSelector } from "./thumbnail.m...
000a2d59a72102cc49e25208e92fec2fd603629f00b42ee78a903f052920b41a
TypeScript
3,756
130
import { describe, expect, it } from "vitest"; import { decodeRosCameraInfoRecord } from "./camera-info"; const ZERO_K = Array(9).fill(0); const ZERO_P = Array(12).fill(0); const USABLE_K = [100, 0, 50, 0, 100, 40, 0, 0, 1]; const USABLE_P = [100, 0, 50, 0, 0, 100, 40, 0, 0, 0, 1, 0]; describe("ROS CameraInfo classif...
076e03a0bbcc58980eeb6ab7bd6e231dd1d19cee887fb1ea45a1036b7c7d15d7
TypeScript
3,756
128
import { describe, expect, it, vi } from "vitest"; import { createPlotPublicationStore, type PlotPublicationFrameScheduler, } from "./plot-publication-store"; describe("plot publication store", () => { it("publishes a changed key without notifying other keys", () => { const frames = createFrameScheduler(); ...
cf3cb6bc4ff854fe70bc2ca027e2fda57c98c92c99434ab6fb533ae24e63f94c
TypeScript
3,756
118
import type { Decoder } from "../../../../decoders/index"; import type { DecodedAttributeValue, PoseVisualization, } from "../../../../ir/index"; import { VISUALIZATION_KIND } from "../../../../ir/index"; import { errorMessage } from "../../../../utils/errors"; // Context-only timing helper; nothing protobuf-specif...
d53a758e1032d899075205c80d9acbb79405e76ee210294a12ea2d33581b00f6
TypeScript
3,756
105
import { useEffect, useMemo, useState } from "react"; import { fetchMasks, type Masks } from "./protocol"; /** * The run's view/filter masks, shaped for the renderer: view stages * and sidebar filters both scope the plot, so their masks combine into * one `visibleMask` that hides non-members. `localMask` is a mask ...
b9cb74ee3b18b91d1c441d40c1e505ac72e6d8b7eb9b74973591513791b88685
TypeScript
3,768
124
import { DETECTION, DETECTIONS, POLYLINE, POLYLINES, } from "@fiftyone/utilities"; import type { Native2dLabel } from "./types"; /** * Extracts an ObjectId string from a serialized value. The REST group endpoint * serializes nested ids as extended JSON (`{ $oid: "..." }`) while top-level * ids are normalize...
91f34228ce321441c90716d4d9bc6dd4fb9c641883c01bf84ebe18f4aa555edc
TypeScript
3,771
136
/** * Copyright 2017-2026, Voxel51, Inc. */ import { describe, expect, it, vi } from "vitest"; import type { DetectionOverlay } from "../overlay/DetectionOverlay"; import type { MaskSnapshot } from "../overlay/MaskCanvas"; import type { Rect } from "../types"; import { PaintStrokeCommand } from "./PaintStrokeCommand...
089b1d44d1a899f2acf41193c2ed9a2e11083e059ee58d3bfbd8a8ba3b88de54
TypeScript
3,777
123
import { VISUALIZATION_KIND, type ImageVisualization } from "../../../../ir"; import type { CameraFrustumPanelLayer } from "../../../../visualization/scene-3d/types"; import { describe, expect, it, vi } from "vitest"; import { buildScene3dFrustumLayer } from "./use-scene-3d-frustum-layers"; describe("buildScene3dFrus...
6d226626e3cf7d7a7175f1a3418fc727748a2771220054fbc5f12f1726885742
TypeScript
3,790
108
/** * Copyright 2017-2026, Voxel51, Inc. */ import { setView, subscribe, type setViewMutation } from "@fiftyone/relay"; import { type State, view as currentView, datasetName, resetExtendedSelectionTransaction, resetFiltersTransaction, stateSubscription, viewStateForm_INTERNAL, } from "@fiftyone/state";...
9ff7a59656366ec3a3ec54399e884beed794098c173e7a40c42350d5964dac8c
TypeScript
3,791
151
import { AnalyticsBrowser } from "@segment/analytics-next"; export type AnalyticsInfo = { writeKey: string; userId: string; userGroup: string; doNotTrack?: boolean; debug: boolean; disableUrlTracking?: boolean; redact?: string[]; version?: string; }; export type AnalyticsConfig = { debounceInterval:...
c6024cf48646cdb38f94e95e5961eb1c703805b46464bb761839c2071da5101e
TypeScript
3,797
127
import * as fos from "@fiftyone/state"; import { useMemo } from "react"; import { useRecoilValue } from "recoil"; import { isBooleanField, isInKeypointsField } from "../state"; export type OptionKey = | "filter" | "negativeFilter" | "match" | "negativeMatch" | "visible" | "notVisible"; export type Option ...
0decd57b060570359cb366750af8d1f787803b02458971d5e24b87395b0e5b7b
TypeScript
3,798
145
/** * Canonical Foxglove protobuf payload descriptors supported by the MCAP decoder. */ import type { PayloadDescriptor } from "../../../../../ir/index"; /** * Payload identity for foxglove.CompressedImage messages. */ export const FOXGLOVE_COMPRESSED_IMAGE_PAYLOAD: PayloadDescriptor = { encoding: "protobuf", ...
ee299c3715cb3f50317745aee9043888c6022ca67efc45787a8117cb8bec5113
TypeScript
3,805
124
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useAtomValue } from "jotai"; import { useCallback, useEffect, useRef } from "react"; import type { TransformOptions } from "../commands/TransformOverlayCommand"; import type { RenderCallback } from "../core/Scene2D"; import { lighterSceneAtom, overlayFactory } fro...
e17646197b7a4fa386405e48e2e4eac75f5c5ec7a3639ca21c4c8bf9a23bec3c
TypeScript
3,816
125
import * as fos from "@fiftyone/state"; import { useCallback, useEffect, useMemo } from "react"; import { Vector3 } from "three"; import { resolveUpVector } from "../fo3d/camera-init"; import type { FoScene } from "../fo3d/render-types"; import { getUpVectorFromAxis } from "../fo3d/utils"; import type { Looker3dSetting...
758ef0d425f0a4b0b1ec81602195900e433127491079b6ff3f80736d9f071fb6
TypeScript
3,819
124
/** * Aligns independently-timed numeric series onto one shared x vector * for uPlot's `AlignedData`. Each input keeps its own timestamps * (fields can be missing per message and decimation diverges per * field); the join merges all timestamps and leaves alignment-only * positions undefined. NaN values (gap marker...
f09261a3012c57203407277f9665f6aac90717891ab82ab3f0b1a3804de19a43
TypeScript
3,823
126
import { beforeEach, describe, expect, it, vi } from "vitest"; import { VISUALIZATION_KIND } from "../../../../ir/index"; import type { EncodedAudioVisualization } from "../../../../ir/index"; import { foxgloveCompressedAudioCdrDecoders, foxgloveCompressedAudioDecoder, } from "./compressed-audio"; import { decodeP...
9f6def4002a6658c0f0362c18c586892479c079208d711cff14239876ccaa4c7
TypeScript
3,842
117
import { act, renderHook } from "@testing-library/react"; import { Vector3 } from "three"; import { beforeEach, describe, expect, it, vi } from "vitest"; import type { FoScene } from "../fo3d/render-types"; import { useFo3dUpVector } from "./use-fo3d-up-vector"; const storageState = vi.hoisted(() => ({ localUpVector...
b737e2a87db2ff0547349a9a6029405cc725c96879948594ecd29edeed300ca9
TypeScript
3,843
132
import { act, renderHook } from "@testing-library/react"; import { beforeEach, describe, expect, it, vi } from "vitest"; import type { Fo3dSplatSettings } from "../fo3d/splat/settings"; import { useSplatAppearanceControls } from "./use-splat-appearance-controls"; const controls = vi.hoisted(() => ({ schema: null as ...
75f0292381e1b5340196594645dc8627c508a1c60fc0b6b45c972047a1b930fa
TypeScript
3,850
118
import { describe, expect, it } from "vitest"; import { VISUALIZATION_KIND } from "../../../ir/index"; import { rosNavSatFixDecoders, rosOccupancyGridDecoders } from "./ros/index"; import { ROS1_NAV_SAT_FIX_SCHEMA, ROS1_OCCUPANCY_GRID_SCHEMA, decoderForSchemaEncoding, poseRecord, ros1Header, ros1Message, ...
2906bb791f2ef940e3c7f94ba51cef5dc9a5dda4ca8085dda37ce134f6ab9dd9
TypeScript
3,851
112
import { compareFrameIds } from "./frame-transform-graph"; import type { TransformTopologyAnalysis, TransformTopologyEdge, } from "./transform-topology"; interface TransformTopologyLayoutNode { readonly frameId: string; readonly height: number; readonly width: number; readonly x: number; readonly y: numb...
3ba4f7cf7d9ebab2ee1fdb820264a7d1c5a13ce51a74ae1ed4d3e7bac5e82d1c
TypeScript
3,852
120
import { atom, useAtom } from "jotai"; import { atomWithStorage } from "jotai/utils"; import { AgentDescriptor } from "../registry"; import { useAgentRegistry } from "./useAgentRegistry"; import { useCallback, useEffect, useMemo, useState } from "react"; import { InferenceResultProxy } from "../types"; /** * State an...
07d726b8c02cbf0ee3439e647872e608423720556dda8643cfe74b7f04ce1cb3
TypeScript
3,854
128
/** * Copyright 2017-2026, Voxel51, Inc. */ import { describe, expect, it, vi } from "vitest"; import { MergeDetectionsCommand } from "./MergeDetectionsCommand"; import type { DetectionOverlay } from "../overlay/DetectionOverlay"; import type { MaskSnapshot, PaintStrokeData } from "../overlay/MaskCanvas"; import typ...
c9435fdbf6cef478aa6607923f7e7ed96b3cbd6ca9a5b6c88c368b66bac2cb91
TypeScript
3,858
137
import type { Decoder } from "../../../../decoders/index"; import { foxgloveCameraCalibrationCdrDecoders, foxgloveCameraCalibrationDecoder, } from "./camera-calibration"; import { foxgloveCompressedImageCdrDecoders, foxgloveCompressedImageDecoder, } from "./compressed-image"; import { foxgloveCompressedAudioC...
56e7dd9dc2f99e2ceb8636032fb34b430b43ea1e5d4389d1e7837d9ceef6829e
TypeScript
3,869
123
import type { McapIndexedMessageTime } from "../reader/index"; /** * One memoized predecessor resolution for a topic. */ export interface McapPredecessorMemoEntry { /** * Newest indexed entries at or before `predecessorTimeNs`. Empty means * the topic has no message at or before that time. */ readonly e...
72a14986acc80b1be5e017ee3c5efde1c080f0a5ff981f8be29eda9e04b1f871
TypeScript
3,886
120
/** * Copyright 2017-2026, Voxel51, Inc. */ /** * @vitest-environment jsdom */ import { renderHook } from "@testing-library/react"; import { describe, it, expect } from "vitest"; import { useDependencyHash } from "./useDependencyHash"; describe("useDependencyHash", () => { describe("no dependencies", () => { ...
eddc25179687b8726dd29a5aaa84740a29629c436d8b88cec7346e8adbac83ee
TypeScript
3,886
118
/** * Copyright 2017-2026, Voxel51, Inc. */ import { useLookerOptions } from "@fiftyone/state"; import { useAtomValue, useSetAtom } from "jotai"; import { useEffect, useRef } from "react"; import { PixiRenderer2D, Scene2D, globalPixiResourceLoader, lighterInitErrorAtom, lighterSceneAtom, useLighterEventB...
228be610b77ea18fa42e528f1c470703d0a23b78e54efe47c54b0f9ab5299f77
TypeScript
3,892
123
import { describe, expect, it, vi } from "vitest"; import { createCache } from "./cache"; class Looker extends EventTarget { destroy = () => undefined; size = 1; getSizeBytesEstimate = () => this.size; loaded: boolean; } describe("useLookerCache", () => { it("keeps a ten-thousand-item scroll sweep within th...
abc5e67a88fb605ee5e07296583954a90f3e1be4a6286761f14197c4278a6401
TypeScript
3,896
116
import { getProtobufMessageType } from "../message-decoders/foxglove/protobuf/index"; import { asRecord } from "../message-decoders/foxglove/protobuf/records"; import { decodeJsonRecord } from "../message-decoders/json/decode"; import { isRosMessageEncoding, rosRecordDecoderForChannel, } from "../message-decoders/r...
b68a9f3f2e75bb222ecb259f60998c018e389e2bc6dc4b15c1fa83f36101f7dc
TypeScript
3,897
136
import type { DecodeContext } from "../../../../decoders/index"; import type { DecodedAttributeValue, DecodedOutput, GridVisualization, } from "../../../../ir/index"; import { resourceHintsForArrayBufferViews } from "../../../../decoders/index"; import { VISUALIZATION_KIND } from "../../../../ir/index"; import { ...
49da98a1dc9dd6cfe55099d63985072ced8125785f785661feec1bf337cf3845
TypeScript
3,900
120
/** * Copyright 2017-2026, Voxel51, Inc. */ import { describe, expect, it, vi } from "vitest"; // ── Mocks ──────────────────────────────────────────────────────────────────── // // Provide a real `DetectionOverlay` class so `instanceof DetectionOverlay` // inside the SUT matches instances we construct in the test....
853ba8a2f8b2aa849be29f79c65dcc31eaec305fa3f901950eb61e92fb4ba417
TypeScript
3,911
112
import * as THREE from "three"; import type { CuboidCreationState } from "../types"; import type { AnnotationPlaneState, CuboidTransformData } from "./types"; const MIN_DIMENSION = 0.1; const DEFAULT_HEIGHT = 1; const MIN_PERPENDICULAR_LENGTH = 0.001; const computeYawQuaternion = ( directionVector: THREE.Vector3, ...
bb734717c19eaa894a507008313534ce29b93d77b2c34ba7c9bd5b35e417ef08
TypeScript
3,912
156
/** * CSS3 extended color keyword → hex lookup, so a per-value override like * "red" resolves instead of silently falling back to the pool color. * Self-contained (not imported from the legacy @fiftyone/embeddings * package, which this panel replaces) — values copied from its Color.tsx. */ export const CSS_COLOR_N...
c96822fab195f257fa07db6c8d620086be0ec9876c421e3776ef086b77a27091
TypeScript
3,912
113
import { useCallback, useMemo, useSyncExternalStore } from "react"; import type { TimeWindow } from "../../ir"; import { getEpisodePlayhead, getEpisodeTimeRange, requestEpisodeSeek, subscribeEpisodePlayhead, subscribeEpisodeTimeRange, } from "../../runtime"; /** * The episode's time axis, once the active fo...
ca87d02d3592545ed6d1465e21096426f28bf6ea59dd57e43433d3a434214a0b
TypeScript
3,912
134
/** * Copyright 2017-2026, Voxel51, Inc. * * Shared fixtures for the persist-ordering tests: a minimal engine whose * pending deltas behave like the real one's (persisted entries reconcile * away, a rolled-back entry restores), and server sample bodies at known * versions. */ import type { JSONDeltas } from "@f...
34f754f7e5a898886ee38c5201bdedab7925bcb7bb1f9ea434046cc050d7ac14
TypeScript
3,914
115
import { describe, expect, it } from "vitest"; import { EPISODE_PREVIEW_MAX_FPS, EpisodePreviewPlaybackScheduler, episodePreviewPlaybackDelayMs, } from "./episode-preview"; const DROID_FRAME_INTERVAL_NS = 70_990_566n; const DROID_LAST_FRAME_NS = 7_525_000_000n; describe("EpisodePreviewPlaybackScheduler", () =>...
81ee983c525d3aa5adcb9a949087a7966e17ae1b209bc98a908ab50ecc2693b6
TypeScript
3,914
119
import { atom, useAtomValue, useSetAtom } from "jotai"; import { useCallback, useEffect } from "react"; import type { LabelRef } from "../engine"; /** * Status code when attempting to initialize annotation schema. */ export enum InitializationStatus { InsufficientPermissions, ServerError, Success, } /** * Re...
d59bbeff2b0b926fc13a87a7e79c231431e4b22cd561616d3b5083941506f18b
TypeScript
3,925
142
import type { InterpolatedLocation, LocationBounds, } from "../tracks/location-track"; import { mapPlaybackCameraTarget, type MapCameraTarget, } from "../viewport/camera"; import { writeMapViewport } from "../viewport/cache"; import { noteMapFollowCommand } from "./performance"; import type { CometTrail, MapLoc...
510d475054a9d1b1d891297c86236fc1ca70805b21daf8ed58bde7f2eb99d2b2
TypeScript
3,931
149
import type { Bounds, EmbeddingPoint } from "./types"; /** * Columnar copy of the data: typed arrays upload straight to the GPU and * scan fast for hit-testing. Built once per setData. */ export interface Columns extends Bounds { n: number; xs: Float32Array; ys: Float32Array; /** All zeros when the input ca...
d562af65c01e8b2aeafc2723ed66f39c8f4e415c2df3056e17fb229b07a487ee
TypeScript
3,941
145
/** * The annotation engine (spec: ANNOTATION_ENGINE_INTERFACE.md). Public * surface: the engine facade + the two integration shapes — retained-mode * (SurfaceBridge + adapters via useSurfaceBridge) and declarative (selector * hooks + SurfaceActions). Atoms stay module-private throughout. */ // identity export ty...
40a6e72aed136c386655c4644f233c66d80e1a4f7eb05f2a0c1515cefdffbd2b
TypeScript
3,966
132
import { useTileId } from "@fiftyone/tiling"; import { atom, useAtomValue, useStore } from "jotai"; import { useCallback, useMemo } from "react"; import { PLOT_SERIES_PALETTE } from "../../../visualization/plot/series-palette"; /** * One series shown by a plot tile: a stream's numeric field, drawn in a * fixed color...
019f08b6c62eeae2da7a9469ffa3a3d603a215588c17a9cbb149d037ccb0f68f
TypeScript
3,968
139
import { AnnotationEngine, SampleLabelStore } from "@fiftyone/annotation"; import { CommandContext, DelegatingUndoable } from "@fiftyone/commands"; import type { Schema } from "@fiftyone/utilities"; import { Sample } from "@fiftyone/utilities"; import { describe, expect, it } from "vitest"; import { bindEngineCommits,...