sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
fa00e843752b6a3e88997695c6b496ca880871ca4a4d5387c794fc38092493cd | TypeScript | 4,629 | 148 | import { getSampleSrc } from "@fiftyone/state/src/recoil/utils";
import { DETECTION, DETECTIONS } from "@fiftyone/utilities";
import { Coloring, CustomizeColor } from "..";
import { OverlayMask } from "../numpy";
import { Colorscale } from "../state";
import { decodeMaskOnDisk } from "./mask-decoder";
import { enqueueF... |
65dc14686356a249592ee5b7949200cd0026b8f4dece2e4f0e558c402c4078bc | TypeScript | 4,630 | 133 | import { describe, expect, it, vi } from "vitest";
import type { McapResourceClient } from "../contracts";
import {
MCAP_PLAYBACK_WORKER_PRIORITY,
type McapPlaybackWorkerRpcRequest,
} from "./playback-worker-types";
import {
mcapPlaybackWorkerOperation,
runMcapPlaybackWorkerStreamRequest,
runMcapPlaybackWorke... |
2d5f7e47914c76ab6b18792c3d401d600039e7ccc98d64b2f1206394bf7efdad | TypeScript | 4,633 | 223 | import styled from "styled-components";
import DeleteIcon from "@mui/icons-material/Delete";
export const ModalWrapper = styled.div`
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1000; // do not set more than 1300 (operator panel)
align-items: center;
display: flex;
justify-co... |
df2b2b0fb11d0ab84f17b597ea61bb1736ec75dcf171380ff3a2824919481186 | TypeScript | 4,641 | 154 | import { beforeEach, describe, expect, it, vi } from "vitest";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import { foxgloveCameraCalibrationDecoder } from "./camera-calibration";
import { decodeProtobufMessage } from "./protobuf/index";
vi.mock("./protobuf/index", () => ({
decodeProtobufMessage: vi.... |
03b792ab92b67853457a24ee439e61fb8fb833decfd8ddcd27e6d492445b008c | TypeScript | 4,643 | 153 | import { beforeEach, describe, expect, it, vi } from "vitest";
import {
getSampleVersionToken,
recordSampleVersionToken,
} from "./getSampleVersionToken";
import type { Sample } from "@fiftyone/looker";
vi.mock("@fiftyone/core/src/client/util", () => ({
parseTimestamp: vi.fn(),
}));
import { parseTimestamp } fr... |
f5ab44e7075a2858e69e9059c05b5964616c8bfa804424b21f922f13d3e8b541 | TypeScript | 4,665 | 167 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { useRegisterCommandHandler } from "@fiftyone/command-bus";
import { getEventBus } from "@fiftyone/events";
import * as fos from "@fiftyone/state";
import { useCallback } from "react";
import { useRecoilCallback } from "recoil";
import {
CollapseFieldInGridCommand... |
c8b911eeac20e713b6a24bca3fa35dc8a7e8e5960ceb14ce394158fd0a0448ad | TypeScript | 4,676 | 160 | import { describe, expect, it } from "vitest";
import { DiagnosticStateProjector } from "./diagnostic-state-projector";
import {
diagnosticConsoleIdentity,
type EpisodeLogConsoleRow,
} from "../../../visualization/logs/log-console-rows";
describe("DiagnosticStateProjector", () => {
it("holds a predecessor state ... |
9b739c91da331bb28e013a555ea48da2c7917521214e0bdf3e9e0b6eded60c16 | TypeScript | 4,687 | 107 | import type React from "react";
import type { IntervalTileContext } from "../host/tile-context";
export type { IntervalTileContext };
/**
* One interval an episode-interval source contributes for a single sample.
*
* This is the entire vocabulary the shared layer has for "something that held
* over a span of an e... |
0fef17d4985ab8f5aed0780ab7fd7921aefd05d7942be35ce495b5eeb6d108ae | TypeScript | 4,690 | 143 | import { afterEach, describe, expect, it, vi } from "vitest";
import type { AdapterDescriptor } from "../ports";
import {
findFormatAdapterDescriptor,
getFormatAdapterDescriptors,
loadFormatAdapter,
registerFormatAdapter,
resetFormatAdapterRegistryForTests,
} from "./adapter-registry";
afterEach(resetFormatA... |
26a6f339d30d346a57af7f3d20e1007103bb19d00f9efb4c28178418f65381f0 | TypeScript | 4,692 | 159 | import { describe, expect, it } from "vitest";
import {
capturesAnything,
capturesMoreThanStages,
describeDefinition,
editedInfo,
hasEdits,
leastUsedColor,
matchesSearch,
nameProblem,
type DefinitionParts,
type SavedQuery,
} from "./model";
const query = (overrides: Partial<SavedQuery> = {}): Saved... |
c532c0e9d0cdd5ccb39ddf94a22ba9ad19555de9c74ec73a69fb12e96379d635 | TypeScript | 4,703 | 143 | import { describe, expect, it, vi } from "vitest";
import { VideoSeekAdmissionScheduler } from "./admission-scheduler";
import { VideoIntentCancelledError, VideoSchedulerClosedError } from "./types";
describe("VideoSeekAdmissionScheduler", () => {
it.each([0, -1, 1.5, Number.NaN])(
"rejects invalid historical c... |
f1fad5583193810d0b05933eacdec92aa265ef5f53dc9c025cc1482923b7f996 | TypeScript | 4,704 | 140 | import type { Track } from "@fiftyone/playback";
import clsx from "clsx";
import { useCallback, useMemo, useState } from "react";
import type { TimelineSection, TimelineTrackDecorator } from "./types";
import styles from "./sections.module.css";
const SECTION_HEADER_ID_PREFIX = "timeline-section::";
const SECTION_HEAD... |
dc29a41d409657b13820355c5cfcaf80e37b669791b73d99da1e024bf2326f46 | TypeScript | 4,705 | 155 | /**
* Backward compatibility for plugins: the App used to send these events as
* DOM CustomEvents, and now sends them on the event bus. Each bus event below
* is also dispatched as its old DOM event, with the same name, target and
* `detail` as before, so a plugin listening for it keeps working.
*
* The list is c... |
ecbb74f00f7e6debf00ff95bb7086208d96c3f0dd8ed5ad9e779196453e58b7e | TypeScript | 4,717 | 209 | import type { PayloadDescriptor } from "../../../../ir/index";
function rosPayloads(
ros1Schema: string,
ros2Schema: string,
): readonly PayloadDescriptor[] {
return [
{
encoding: "ros1",
schema: ros1Schema,
schemaEncoding: "ros1msg",
},
{
encoding: "cdr",
schema: ros2Sc... |
25b64e3c556bdc66d7549ab0f92ec8648c29da3d2d67f7bcafc970b827597099 | TypeScript | 4,736 | 152 | import * as fos from "@fiftyone/state";
import { isMatchingAtom, stringExcludeAtom } from "@fiftyone/state";
import { getFetchFunction, isObjectIdString } from "@fiftyone/utilities";
import { atomFamily, selectorFamily } from "recoil";
import { labelTagsCount } from "../../Sidebar/Entries/EntryCounts";
import { nullSor... |
09a4af4cd689a78b7f24f689ff46fb39bf539304a04038ea788625a383ae9d85 | TypeScript | 4,739 | 206 | import type { KeypointSkeleton } from "@fiftyone/looker/src/state";
import * as fos from "@fiftyone/state";
import { getSkeleton } from "@fiftyone/state";
import type { Field } from "@fiftyone/utilities";
import {
DETECTION,
DETECTIONS,
KEYPOINTS,
LABELS,
LABELS_PATH,
LIST_FIELD,
STRING_FIELD,
VALID_KEY... |
01023eab5bd2c564cf22bcc29829cf13f1e67761578cfd71471676300b97bb60 | TypeScript | 4,744 | 145 | import type { McapTypes } from "@mcap/core";
import { describe, expect, it, vi } from "vitest";
import {
createMcapDecompressedChunkCache,
serializeMcapDecompressedChunkKey,
type McapDecompressedChunkKey,
} from "./decompressed-chunk-cache";
import { mcapDecompressedChunkKeyForIndex } from "./chunk-records";
con... |
452d8d7be65967215a71dfadfed0fd0148d9d8635a50d1c8c8a109eb894bcc15 | TypeScript | 4,751 | 171 | import type { MapViewport } from "./cache";
import type { LocationBounds } from "../tracks/location-track";
import { normalizeLongitudeIntervalEast, unwrapLongitude } from "../wgs84";
const TILE_SIZE = 512;
const MAX_MERCATOR_LATITUDE = 85.051129;
const VIEWPORT_EXPANSION = 0.5;
type Rect = {
readonly bottom: numbe... |
99d57779c44af3470530b1355348354bc9c6cf11c870d5916546aff208949f27 | TypeScript | 4,752 | 162 | import {
resourceHintsForArrayBufferViews,
type Decoder,
} from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
EncodedVideoVisualization,
} from "../../../../ir/index";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import { bytesField, recordField, rosTimestampN... |
c3968061cf2e5217172f1fad86f0d0f18cb5e6316746f184141c41ef5b31032a | TypeScript | 4,754 | 146 | import {
drawRippleRings,
type KeypointEffect,
KeypointOverlay,
} from "@fiftyone/lighter";
import { useCallback, useEffect, useRef } from "react";
const RIPPLE_EFFECT_ID = "keypoint-ripple";
type OverlayRippleState = {
overlay: KeypointOverlay;
startTime: number;
// pointId -> performance.now() expiry. N... |
cd2a9c04cfc42d73513787241858d9a6dd5dbeb72892d273cd53249f835534fa | TypeScript | 4,769 | 182 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type { ColorSchemeInput } from "@fiftyone/relay";
import { subscribeBefore } from "@fiftyone/relay";
import type { SpaceNodeJSON } from "@fiftyone/spaces";
import type {
LabelSelectionStyle,
SelectionStyle,
SelectionType,
Session,
State,
} from "@fiftyone/... |
138e63b1ce7199f1acdd94e4bd65494f469624c5b5668ae1a11a0ad30ee17fc3 | TypeScript | 4,779 | 133 | import { useEffect, useRef, useState } from "react";
import {
fetchGeometry,
fetchIds,
fetchRunInfo,
idAt,
type IdColumn,
} from "./protocol";
import type { GeometryLoader } from "./extensions";
import type { EmbeddingPoint } from "./renderer";
/** Wire-order slice size for progressive loading */
export cons... |
6622da578b7df1e3302295036f6b5868cfc4b345447673f27f07b872a1326d94 | TypeScript | 4,782 | 145 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { KeypointOverlay } from "../overlay/KeypointOverlay";
import type { InteractionHandler, OverlayEvent } from "./InteractionManager";
const GUIDED_KEYPOINT_HANDLER_ID = "guided-keypoint-handler";
/**
* Callbacks that connect the handler to the guided-placement sta... |
36dacb16bfd87b9a4c434823e70ff883e8b354b4cb8afe2db5af781ae423dd3c | TypeScript | 4,789 | 166 | /** Defers one publication batch and returns a way to cancel that batch. */
export type PlotPublicationFrameScheduler = (publish: () => void) => () => void;
/** Source-bound writer that becomes inert when cancelled or superseded. */
export interface PlotPublicationSourceEpoch<Key, Value> {
cancel(): void;
delete(k... |
71d2b407cb19d0c192a286e4bda26f98f0b591f61d457ef8eb9bd39576e5cdec | TypeScript | 4,789 | 113 | /**
* The retained-mode integration contract: a surface ships a
* kind-agnostic {@link SurfaceBridge} plus a {@link LabelKindAdapter} per
* label kind it renders; the engine derives the whole read-half.
* Declarative (React) surfaces use selector hooks instead — no bridge.
*/
import type { LabelData, LabelType } ... |
b2be575bd4606af5caefd7e1d2280a441ce60b06a7b5e37db20ab4f0f697f7ec | TypeScript | 4,799 | 151 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../ir/index";
import {
rosOdometryDecoders,
rosPathDecoders,
rosPoseArrayDecoders,
rosPoseStampedDecoders,
} from "./ros/index";
import {
ROS2_ODOMETRY_SCHEMA,
ROS2_PATH_SCHEMA,
ROS2_POSE_ARRAY_SCHEMA,
ROS2_POSE_STA... |
604414a90f3178c21c5967a233fc241404674468d9adcc9b89492e7369149074 | TypeScript | 4,805 | 157 | import { useCallback, useSyncExternalStore } from "react";
import type { DecodedFrame } from "../../../ir";
import type { EpisodeStreamCache, TimelineIndex } from "../../../runtime";
import type { DataStream } from "./data-stream-context";
// Duration budget for locating the next distinct cached message. Deriving the... |
d827f8425893820d0ca9f0b0ac2d9dbc99dcfbdf2e921bf7156f416797205805 | TypeScript | 4,808 | 163 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { act, renderHook } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
const FALLBACK_TIMEOUT_PERIOD_MS = 30_000;
const hoisted = vi.hoisted(() => {
// A stand-in for `@fiftyone/state`'s useRetryController. T... |
b52932ee9de6eb1816794cfedc914a98301daec2939c14020cb0711c0ec5d641 | TypeScript | 4,814 | 155 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type { LoadOptions, ResourceLoader } from "./ResourceLoader";
/**
* Mock implementation of ResourceLoader for lightweight testing and development.
* This mock provides no-op implementations of all resource loading methods,
* making it suitable for creating light... |
fbdc1fdf83059abedbb1b22ac00ee3c94afdfe32273473bdd84e1987f675bf3a | TypeScript | 4,860 | 153 | import { vi, describe, it, expect, beforeEach } from "vitest";
import { renderHook, act } from "@testing-library/react";
// mocked whole (no importOriginal): the real module's graph crosses the
// core/looker-3d boundary, which a partial mock would drag in
vi.mock("../state", () => ({
useRegisteredAnnotationContextM... |
606b72895999b457fb353a53772086ad987a480d8adf5d3918a81c6e51121ff1 | TypeScript | 4,864 | 199 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { Selectable } from "../selection/Selectable";
import { BaseOverlay } from "./BaseOverlay";
import type { Renderer2D } from "../renderer/Renderer2D";
import type { Point, RawLookerLabel, RenderMeta } from "../types";
import {
LABEL_ARCHETYPE_PRIORITY,
TAB_DASH... |
56671732cb9a5eef81443e6c2687435a95d344fe58ab22b524b6a63f0a0fee34 | TypeScript | 4,870 | 147 | import {
getBufferingDetail,
getBufferingStreams,
getIsBuffering,
setIsBuffering,
type PlaybackStore,
} from "@fiftyone/playback";
import { createStore } from "jotai";
import { describe, expect, it, vi } from "vitest";
import type { DecodedFrame } from "../../../ir";
import { createTimelineIndex, EpisodeStre... |
c6eb3ef81c2af64cccc37f81a9b81bb9d0ad4d8f070e3a3b0d23869a0a68d398 | TypeScript | 4,871 | 170 | export enum PointLabel {
NEGATIVE = 0,
POSITIVE = 1,
}
/** Coordinates: [0,1] normalized. */
export interface PromptPoint {
x: number;
y: number;
label: PointLabel;
}
export interface InferenceRequest {
imageUrl: string;
points: PromptPoint[];
}
/**
* Inference from an already-decoded `ImageBitmap` (e... |
be30cef6ce62dbac83278bc5b3eb4ba518fe041e6b370722c353966f4106edab | TypeScript | 4,879 | 188 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
/**
* Color parsing and conversion utilities for PixiJS rendering.
*/
/**
* Parses a CSS color string into 8-bit RGBA components.
*
* Convenience wrapper around {@link parseColorWithAlpha} that unpacks the
* packed hex color into separate `r`/`g`/`b` bytes and conve... |
e640f159ea1b3e13260d2322f488af03ccc8a137c03d73504ce69bad173297f4 | TypeScript | 4,894 | 155 | import { DetectionAnnotationLabel } from "@fiftyone/state";
import {
AgentTaskType,
AnnotationAgent,
AnnotationContext,
InferenceCapability,
InferenceResult,
InferenceResultProxy,
ROI,
} from "../types";
import { useCallback, useEffect, useMemo } from "react";
import { useAnnotationContext } from "@fiftyo... |
90de86b8e14fb4b2c7f27476821d96fd10065df9767f2f41e0869b0c35f4149d | TypeScript | 4,910 | 166 | import { describe, expect, it } from "vitest";
import {
MalformedEntityIdError,
decodeEntityId,
encodeEntityId,
} from "./entityId";
import {
addressIdOf,
indexFromAddressId,
refKey,
refsEqual,
toLabelRef,
} from "./ref";
import type { LabelRef } from "./ref";
const ref = (overrides: Partial<LabelRef>... |
a27316c9a02bc704618531740800738762d568d57cd65633ec3a620d96f354d1 | TypeScript | 4,912 | 151 | import type { SelectionRequest } from "@fiftyone/state/src/selection";
import { useCallback, useEffect, useRef } from "react";
import { highlightRevealedTile } from "./gridTileRegistry";
/** Reveals a sample, returning false only when it is outside the results. */
export type LocateInGrid = (
sampleId: string,
sig... |
ea45849f7837b6670de0a3465977f5e40cf8fdfe650aea536c4a990d2987a273 | TypeScript | 4,929 | 155 | const NANOSECONDS_PER_MILLISECOND = 1_000_000n;
const NANOSECONDS_PER_SECOND = 1_000_000_000n;
/** Number of recent positive message intervals used to estimate cadence. */
const MAX_CADENCE_INTERVALS = 32;
/** Avoid adapting a policy from only one or two intervals. */
const MIN_CADENCE_INTERVALS = 3;
/** Transform in... |
e25aa65ff90fa08707850b0b2ebbbe46acd75cd3efc715112130e1f0bcf53dd6 | TypeScript | 4,930 | 157 | import { renderHook } from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { ByteSourceDescriptor } from "../../../ir";
import {
peekSourceBootstrap,
publishSourceBootstrap,
resetSourceBootstrapCacheForTests,
} from "../../../runtime/source-bootstrap... |
9900a5ba9b83dbb615c2b0b1466efeee14efeb4d583fba98d98106fb44d2ae5b | TypeScript | 4,933 | 163 | /** Maximum representatives retained by one aligned numeric-series bucket. */
export const ALIGNED_NUMERIC_BUCKET_MAX_POINTS = 6;
/** Numeric samples reduced onto an absolute-time bucket grid. */
export interface AggregatedNumericSeries {
/** Exact absolute bucket identity for each retained representative. */
read... |
a3f5972b024eab47dfa219ee8b7c1823b2dffaf6330ebb71e529d9e2508088e4 | TypeScript | 4,933 | 198 | import { describe, expect, it } from "vitest";
import { mapViewportIsNearEvidence } from "./proximity";
const SAN_FRANCISCO_VIEWPORT = {
latitude: 37.7749,
longitude: -122.4194,
zoom: 15,
};
describe("mapViewportIsNearEvidence", () => {
it("accepts a marker inside the expanded viewport", () => {
expect(
... |
9db07503e491bd76d7aec9d36a08e565c6fadb6bdcddbde98e3dc29fec0f98fd | TypeScript | 4,939 | 199 | import { describe, expect, it } from "vitest";
import { transferablesForMcapResult } from "./playback-worker-transfer";
import type {
McapDecodedMessage,
McapSynchronizedMessageWindow,
McapTimelineRange,
} from "../contracts/index";
describe("MCAP playback worker transfer collection", () => {
it("collects enco... |
1158eef8b165d4243449cfee96861c3457a8ce5df83deca8ce5acacc6abc3040 | TypeScript | 4,940 | 140 | import type { TimeWindow } from "../ir";
import { nsDeltaToSeconds } from "../utils/nanoseconds";
const NANOSECONDS_PER_SECOND = 1_000_000_000n;
const NANOSECONDS_PER_SECOND_NUMBER = 1_000_000_000;
/** Default presentation sampling cadence for continuous episode timelines. */
export const DEFAULT_TIMELINE_TICK_RATE_HZ... |
b8ec2c6a89bac568ee500276cf85546c7c3327a896ece53bab5e136c546f9bc7 | TypeScript | 4,941 | 158 | import { Euler, Quaternion, Vector3 } from "three";
import type { CuboidTransformData } from "../annotation/types";
import type {
GroupStaticTransformResponse,
StaticTransform,
} from "../frustum/types";
/** The fixed display target for grouped direct PCD alignment. */
export const WORLD_FRAME = "world";
/** Stat... |
7a8595ce28446204907a11882401049e2a41f7cf4800cea56cafbbb861b7230c | TypeScript | 4,989 | 184 | import * as fos from "@fiftyone/state";
import { getFetchFunction, toSnakeCase } from "@fiftyone/utilities";
import { selectorFamily } from "recoil";
/**
* Returns true if filters should be omitted from tag parameters
*
* @param modal is modal context
* @param selectedSamples selected samples set
*/
export const ... |
91b3ea9108a44cd3919b4eee6a389bbfd320a5bd65d3324319a15f481d51fe40 | TypeScript | 5,012 | 161 | import { Euler, Quaternion, Vector3 } from "three";
import { describe, expect, it } from "vitest";
import type { GroupStaticTransformResponse } from "../frustum/types";
import {
resolveDirectPcdWorldAlignment,
transformCuboidToNativeFrame,
transformCuboidToWorldFrame,
} from "./direct-pcd-world-alignment";
descr... |
0673d90a3bee7b10e5d975cfdbfa6f788c2a11ff7d247aad0e92d21eb0ac2638 | TypeScript | 5,029 | 162 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { renderHook } from "@testing-library/react";
import { atom, getDefaultStore } from "jotai";
import { beforeEach, describe, expect, it, vi } from "vitest";
const mockHandleOverlayClick = vi.fn();
const mockClearMergeTarget = vi.fn();
const mockGetOverlay = vi.fn();... |
83f750824257e3962f3f03abf137a483ed8a14643b5a6a674a9660e91f9ddbad | TypeScript | 5,032 | 140 | import type { DecoderRegistry } from "../../../../decoders";
import type { McapIndexedReaderLike } from "../../reader";
import type { McapTimelineStrategy } from "../timeline";
import type {
McapPointCloudChannelResult,
McapReadPointCloudChannelRequest,
} from "../../contracts";
import { throwIfAborted } from "../.... |
16f01210c1e4baa5e4a28767d8776d9a9eb527b0d855f2e7c9b669f13db09e56 | TypeScript | 5,039 | 141 | import { useEffect, useRef, useState } from "react";
import type { ColorColumnSource } from "./extensions";
import {
fetchColor,
fetchColorByChoices,
type ColorMeta,
type ColorResponse,
type ColorValues,
type VisualizationRun,
} from "./protocol";
/**
* Color-by support: the run-dependent field choices, t... |
c3701c6cc27289ceb0ce4470949beadf7156920e0e6ffc2133415d7e6e6564e4 | TypeScript | 5,041 | 186 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { EventDispatcher } from "@fiftyone/events";
/**
* Event name when a label is hovered.
*/
export const FO_LABEL_HOVERED_EVENT = "fo:labelHovered";
/**
* Event name when a label is unhovered.
*/
export const FO_LABEL_UNHOVERED_EVENT = "fo:labelUnhovered";
/**
... |
a408d02aec6315b251b23930dcba0250ff27468ac70595b251a4e2b4529445a4 | TypeScript | 5,043 | 168 | import type { ModalSample } from "@fiftyone/state";
import { describe, expect, it } from "vitest";
import { buildSyntheticSceneForDirect3dSamples } from "./synthetic-scene";
const buildModalSample = (
filepath: string,
mediaFieldPath = filepath,
): ModalSample => {
return {
sample: {
_id: filepath,
... |
885f82c4bcf1e3590483656602a0683ac5c2ef4e6c61800b09cc0aab0b586b9e | TypeScript | 5,051 | 161 | /**
* Ledger of committed transaction inverses, captured per touched ref. Value-based
* (not transient restores) so an undo survives persistence — applying an entry is
* an ordinary transaction writing the before-values.
*
* The ledger records and coalesces entries; it does NOT navigate. Undo/redo
* ordering live... |
588060dd2c75ef788c87a022d5dca2eea16d54955432f03eedc555a8d8c179d5 | TypeScript | 5,064 | 159 | import {
ModalSample,
datasetId,
getSampleSrc as resolveUrl,
} from "@fiftyone/state";
import { getFetchFunction } from "@fiftyone/utilities";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useRecoilValue } from "recoil";
import { extractNative2dLabels } from "./native2d/parse";
impor... |
8cf020fd82cdb78ec7f5c6229d994417bbbe482e7086a9a8dad14a767e6d9fa8 | TypeScript | 5,074 | 164 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type {
AnnotationAgent,
AnnotationAgentLifecycle,
AnnotationAgentLifecycleListener,
AnnotationAgentLifecycleStatus,
InferenceResult,
ModelMetadata,
PropagatedPolyline,
PropagationContext,
PropagationInferenceResult,
} from "./types";
import { Agent... |
ae884a7034963a5da159a69ffb2508a8ca434c49212121a8252d9fd3637c9af6 | TypeScript | 5,092 | 166 | /**
* Copyright 2017-2026, Voxel51, Inc.
*
* Encodes a mask canvas into the base64-encoded, zlib-compressed numpy format
* that FiftyOne stores in the database.
*
* Pipeline: canvas → uint8 mask → numpy .npy → zlib deflate → base64
*/
/**
* Encodes a mask editing canvas into a base64 string matching FiftyOne's... |
eb90fe0207047b05fbb25c26516b2180e28c2b6cbe5242917d8f62899ff98530 | TypeScript | 5,101 | 166 | import { describe, expect, it } from "vitest";
import { VISUALIZATION_KIND } from "../../../../visualization/index";
import {
decimateTrajectory,
defaultTrajectoryFrame,
locationHudLine,
poseMarkerSceneUpdate,
speedHudLine,
trajectorySceneUpdate,
type PoseTrajectoryPoint,
} from "./pose-trajectory";
func... |
82b938ca61cde84a43d86a4908cac1dc6dfa8f62e84d75f5a853cd4c026d1eb9 | TypeScript | 5,105 | 175 | import type { DecodedSourceTimestamps } from "./frames";
import type { StreamId } from "./manifest";
/** Budgets bounding one cloneable raw-record tree. */
export interface RawRecordPruneBudgets {
readonly maxArrayLength?: number;
readonly maxDepth?: number;
readonly maxStringLength?: number;
readonly maxTotal... |
78e8705d98e700526126f0481b3c7092a132275254b8bf14740a55bed42292a0 | TypeScript | 5,117 | 159 | import { useCallback, useEffect, useRef } from "react";
import { Vector3 } from "three";
import type { PointCloudCameraPose } from "../../../../visualization/scene-3d/index";
import type { CameraPoseChangeSource } from "./use-scene-3d-camera-tracking";
import { resolveCameraTargetPose } from "./use-scene-3d-camera-trac... |
fe50a9d787ce72ccb01d1faab820bb7b5e7a8e7166012adddeabc041d0f9a800 | TypeScript | 5,120 | 169 | import { describe, expect, it } from "vitest";
import type { AttributeConfig } from "../SchemaManager/utils";
import {
buildPointAttributeList,
CONFIDENCE_FALLBACK_SPEC,
getKeypointPointKeys,
getPointAttributeSpecs,
toPointAttributeValue,
} from "./keypointPointAttributes";
const attr = (overrides: Partial<A... |
16d2afbbfa9581bbaa5b7fce6fc2a3f7c727cf1146e464f5684f0df64c7fc0fc | TypeScript | 5,127 | 196 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { BaseState, ImaVidState, VideoState } from "../../state";
import { BaseElement, Events } from "../base";
import { lookerOptionsInput, lookerOptionsPanel } from "./options.module.css";
import { makeCheckboxRow } from "./util";
export class OptionsPanelElement<
S... |
59f68cee56e9707587b7d075dcfd8004756a589b21746942302f45f1af99d2fa | TypeScript | 5,135 | 162 | import { describe, expect, it } from "vitest";
import {
docFieldTier,
isProtectedPath,
PROTECTED_PATHS,
withoutFieldTier,
withAttributeTier,
withFieldTier,
type SchemaDoc,
} from "./useSchemaDocs";
const doc = (overrides: Partial<SchemaDoc> = {}): SchemaDoc => ({
id: "d1",
name: "lens",
label_schem... |
d93d3f0ea99832b185881c2d7aab280696c8f4fbd54c8c238f6a4f52a2c49ea3 | TypeScript | 5,137 | 174 | import { Quaternion, Vector3 } from "three";
import { describe, expect, it } from "vitest";
import {
captureScene3dCameraCompositions,
resolveScene3dCameraComposition,
type Scene3dBoundsNormalizedCameraComposition,
type Scene3dTargetRelativeCameraComposition,
} from "./scene-3d-camera-composition";
describe("e... |
3aefc5621c656859aa1f27928095c6bc4530f11d45311780daf24ea42bd07482 | TypeScript | 5,138 | 160 | /**
* Keypoint per-point attributes: schema attributes declared with
* `scope: "point"` are stored as lists parallel to `points` and edited
* node-by-node in the KeypointDetails inspector, never as label-level values.
*/
import type { AttributeConfig } from "../SchemaManager/utils";
export type PointAttributeType... |
4d2369c97c0be2f6d1845e6c87e4048062ef270878f1dfd8477f79fe8cf6baa4 | TypeScript | 5,143 | 190 | import { monotonicNowMs } from "../../../utils/monotonic-time";
import type { McapPlaybackWorkerPriority } from "./playback-worker-types";
/**
* Scheduled unit of MCAP worker work with priority and source affinity.
*/
export type McapPlaybackWorkerJob = {
readonly id: number;
readonly operation?: string;
reado... |
4fd1c9b5efe2ac13deb0437b9d26e0d6758a2f9df96216280711dc8e77dd7e94 | TypeScript | 5,143 | 181 | import * as fos from "@fiftyone/state";
import { modalBridge, useSaveModalViewport } from "@fiftyone/state";
import React, {
useEffect,
useLayoutEffect,
useRef,
useState,
type RefObject,
} from "react";
import { useErrorHandler } from "react-error-boundary";
import { useRecoilValue, useSetRecoilState } from "... |
fa89b39747505cb53441d2708c2eee648ed1868bc1d05860ee9dedfd79e34d1c | TypeScript | 5,145 | 165 | import {
resourceHintsForArrayBufferViews,
type Decoder,
} from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
} from "../../../../ir/index";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import {
pcmBytesPerSample,
pcmFormatFromString,
pcmFormatLabel,
sam... |
b68fd980aba6b254c5ed54d41ead709f797531879c3a27b5fbddf68a8fbc5b24 | TypeScript | 5,147 | 157 | import type { SampleRendererLoadingProps } from "@fiftyone/plugins";
import { collectTileIds } from "@fiftyone/tiling";
import { useCallback, useMemo, useSyncExternalStore } from "react";
import type { MosaicNode } from "react-mosaic-component";
import type { ByteSourceReadProfile, SceneSource } from "../../../ir";
imp... |
fa98b42be86b54fb4abde427703f05fe97dbc2653b9a99a23776b5f9b345914f | TypeScript | 5,164 | 146 | // Fixed input resolution for the SAM2 encoder (model constraint).
export const SAM2_INPUT_SIZE = 1024;
// Fixed output mask resolution from the SAM2 decoder (model constraint).
export const SAM2_OUTPUT_SIZE = 256;
// Geometric metadata from preprocessing (shared by encoder, decoder, and cache).
// SAM2's reference p... |
e2d10ac4e1c2234f1f2ab95bdb8d45097c8709b807c999a7580b0ff86ae07bb9 | TypeScript | 5,170 | 232 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { BaseLabel } from "@fiftyone/looker/src/overlays/base";
/**
* 2D rectangle with position and size.
*/
export interface Rect {
x: number;
y: number;
width: number;
height: number;
}
/**
* 2D point coordinates.
*/
export interface Point {
x: number;
... |
b8f52a7e5c3d0975fea4938c0b02182fddc2f10a9f21a2d1395a087f5eb8707d | TypeScript | 5,175 | 182 | import { setFetchFunction } from "@fiftyone/utilities/src/fetch";
import { LRUCache } from "lru-cache";
import { throwIfAborted } from "../../../utils/cancellation";
import { errorMessage } from "../../../utils/errors";
import {
decodeGridPreview,
type McapGridPreviewEntry,
} from "../resource-client/grid-preview";... |
b653c5ec82120eac4f37025645728a420fd0808fbaf8767c4536cf55b78ad28e | TypeScript | 5,183 | 156 | import { describe, expect, it } from "vitest";
import type { SyntheticBox } from "@fiftyone/utilities";
import { PropagationBrowserAgent } from "./PropagationBrowserAgent";
import {
AgentTaskType,
type PropagationContext,
type SyncInferenceResult,
type PropagationInferenceResult,
} from "./types";
function ke... |
ddabfffee847eb156769163211a05c31f1fc8abf3ccfbb2c29c74dea6ba8e9c4 | TypeScript | 5,184 | 169 | const DB_NAME = "fiftyone-models";
const STORE_NAME = "weights";
const RETRY_BACKOFF_MS = 1000;
const FETCH_TIMEOUT_MS = 60_000;
export const MAX_RETRIES = 3;
/** Open (or create) the IndexedDB database for model weight caching. */
function openDB(): Promise<IDBDatabase> {
return new Promise((resolve, reject) => {
... |
e99b311eb4748e994367adf3c385fc7d2789939c0a8e7b6b6ea5474399647fe0 | TypeScript | 5,196 | 170 | import { describe, expect, it } from "vitest";
import {
isCameraCalibrationStream,
isCompressedImageStream,
isGridStream,
isImageAnnotationsStream,
isImageStream,
isLocationFixStream,
isLogStream,
isPointCloudStream,
isPoseStream,
isSceneUpdateStream,
streamTopics,
} from "../resource-client/strea... |
6b54b23d5628330a315aab12c0f2433cd2db9f1ffd7f3ed456d73dc1d447749a | TypeScript | 5,206 | 167 | import {
getFetchParameters,
mergeHeaders,
} from "@fiftyone/utilities/src/fetch";
import { createMultimodalQueryClient } from "../../../query";
import type { ByteFillSlotClass, ByteReadDebugLog } from "../../../query/bytes";
import type { DecodedOutputCache } from "../../../query/decoding";
import {
createDecode... |
174314a7b760541310d3054cd8bf150f76b131baab684c16348ae0656a19edd9 | TypeScript | 5,210 | 210 | import {
resourceHintsForArrayBufferViews,
type DecodeContext,
} from "../../../../decoders/index";
import type {
DecodedAttributeValue,
DecodedOutput,
EncodedVideoVisualization,
} from "../../../../ir/index";
import { VISUALIZATION_KIND } from "../../../../ir/index";
import {
bytesField,
rosHeader,
ros... |
6d69959d0420cfd92fe042a88863ca92ae54e406eb8733e632c90128ee94ef22 | TypeScript | 5,220 | 203 | /**
* JSON payload descriptors supported by the MCAP decoder. JSON schema
* names are exporter-chosen and unnamespaced, so decoders registered for
* these triples must validate payload shape rather than trust the name.
*/
import type { PayloadDescriptor } from "../../../../ir/index";
/**
* Payload identity for JS... |
c2b9949cd126acdaa2944f9168a6e06cd4379cf196c09dba6a0e050a60e9fcd5 | TypeScript | 5,235 | 176 | import { describe, expect, it } from "vitest";
import { vi } from "vitest";
import {
BYTE_SOURCE_READ_PROFILE,
createCachedByteClient,
createMemoryByteRangeCache,
type ByteRangeCache,
type ByteSourceDescriptor,
} from "./index";
import { createDefaultByteClient } from "./default-byte-client";
import { createL... |
81757f1235d1f7a96df840e4ed1ce939c31702f96249b3388002550a2a0904e9 | TypeScript | 5,244 | 195 | import { act, renderHook } from "@testing-library/react";
import { LoadingManager } from "three";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { LoadingStatus } from "../types";
import { useTrackStatus } from "./use-track-status";
const mockAtoms = vi.hoisted(() => ({
fo3dAssetsParseStatusTh... |
3dcbf5cb72491d4920c9bdc0d24fb232e73f225bbe5f2cad45819a26888e7552 | TypeScript | 5,259 | 136 | import { describe, expect, it } from "vitest";
import {
buildChannelPeakPyramids,
buildPeakPyramid,
chooseLod,
synthesizePeaks,
} from "./peak-pyramid";
describe("buildPeakPyramid", () => {
it("summarizes samples into min/max buckets at the finest level", () => {
const samples = new Float32Array([0, 1, -... |
0a785b42029c9dff9632664f34be2ca96ee05eb82b42bca5c8493357b0dea891 | TypeScript | 5,261 | 170 | import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
import type {
CameraFrustumPanelLayer,
GridPanelLayer,
PointCloudPanelLayer,
SceneAnnotationPanelLayer,
} from "../../../../visualization/scene-3d/types";
import type { HealthNotice } from "../../status/health";
import type { Scene3... |
394ba8d0e929f9396b58275fc086b2ea7f83f5b9523619b164d8b90635cc4ace | TypeScript | 5,276 | 156 | import { describe, expect, it, vi } from "vitest";
import type { EncodedH264VideoVisualization } from "../ir";
import { VISUALIZATION_KIND } from "../ir";
import { EncodedAccessUnitCache, VideoGopIndex } from "./gop-index";
import type { H264AccessUnit } from "./types";
describe("VideoGopIndex", () => {
it("recompu... |
534385a95234d7e0ce434530bfd458b366c04971404d42db20db13ccc50e8e2c | TypeScript | 5,277 | 157 | import {
useAnnotationEngine,
useAnnotationEventBus,
useInteraction,
} from "@fiftyone/annotation";
import { current } from "@fiftyone/core/src/components/Modal/Sidebar/Annotate/Edit/useAnnotationContext/selectors";
import { labelSchemaData } from "@fiftyone/core/src/components/Modal/Sidebar/Annotate/state";
impo... |
6116999adfd413245c281b4ab1761ce700af52fa924c6fd963baf48148f5d9e4 | TypeScript | 5,290 | 224 | import { GAUSSIAN_SPLAT_EXTENSIONS } from "@fiftyone/utilities";
import type { Quaternion, Vector3 } from "three";
import type { FiftyoneSceneRawJson } from "../utils";
import { DEFAULT_SPLAT_OPACITY, DEFAULT_SPLAT_TINT } from "./splat/settings";
export const Fo3dSupportedExtensions = [
".pcd",
".ply",
".stl",
... |
0cf1342f76aa8b447be25773db53ef6e187308ce293f41249207cf2e661e137f | TypeScript | 5,291 | 202 | /**
* @generated SignedSource<<76d626fb464595acdec289cd2d1d12b4>>
* @lightSyntaxTransform
* @nogrep
*/
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
import { ConcreteRequest, Query } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type DatasetsPaginationQuery$variables = {
... |
af837ceb56317dbf8ebf71bb19fe7d92d3b137f3fb69d541378c3d3915807651 | TypeScript | 5,292 | 184 | import { LRUCache } from "lru-cache";
import type { DecodedOutput } from "../ir";
/**
* Options for bounded in-memory caches.
*/
export interface MemoryCacheOptions {
readonly maxSizeBytes: number;
}
const ESTIMATED_BOOLEAN_FIELD_SIZE_BYTES = 1;
const ESTIMATED_NUMBER_FIELD_SIZE_BYTES = 8;
const ESTIMATED_UNKNOWN... |
05b2732c4d8fd95664a8a11e6650eb2ce2bdbfd2f6fee308251091e7f6ba75a7 | TypeScript | 5,294 | 177 | import { describe, it, vi, beforeEach, expect } from "vitest";
import { ActionManager } from "./ActionManager";
import { DelegatingUndoable } from "./Undoable";
describe("ActionManager", () => {
let manager: ActionManager;
let execFn: () => void;
let undoFn: () => void;
let action: DelegatingUndoable;
before... |
69b672a39d76a0a17bb4d96e40b7976dece91ab68a7e18abd1280663338364e4 | TypeScript | 5,295 | 191 | import type { Method } from "@fiftyone/state";
import * as fos from "@fiftyone/state";
import { selectedLabels } from "@fiftyone/state";
import type { Snapshot } from "recoil";
import { selectorFamily, useRecoilValueLoadable } from "recoil";
export type QueryIds = {
queryIds: string[] | string | undefined;
negativ... |
b65cb638617a2491f8c59c9b0d315c6e107c4bdd5defa7d7055f0a273a3627d7 | TypeScript | 5,298 | 169 | import {
useCallback,
useEffect,
useMemo,
useRef,
useSyncExternalStore,
} from "react";
import type { EpisodeSession, SourceReadBudgetAccount } from "../../../ports";
import {
getProgressiveHistoryJob,
progressiveHistoryConfigIdentity,
type ProgressiveHistoryJobConfig,
type ProgressiveHistorySnapshot... |
cfc07558701002b102d2bfeb504f87014586b0a70685bea967b15dc818edb88b | TypeScript | 5,303 | 177 | import type { McapTypes } from "@mcap/core";
import { compareBigInt } from "../../../ir";
import { throwIfAborted } from "../../../utils/cancellation";
import {
channelIdsForTopics,
compareIndexedMessageTimes,
readChunkIndexedMessageTimes,
} from "./message-index";
import type {
McapIndexedMessageTime,
McapIn... |
c1ba7c8dae4cf5a1464e6bfe9d77c7737b7ad19b9d3c1baa2e9a92db305e2032 | TypeScript | 5,304 | 159 | import { describe, expect, it } from "vitest";
import {
computeTargetIndex,
nextHoleBelow,
resolveTargetIndex,
skipTarget,
} from "./useKeypointMode";
import { skeletonNodeCount } from "./useAnnotationContext/createNew";
const overlayWith = (points: [number, number][]) => ({
getRelativePoints: () => points,
... |
bef81a1913d4647bc425fdcb0eba7067cba98aa6e63c34a432bfb0fff59c0a18 | TypeScript | 5,311 | 150 | import { open, stat } from "node:fs/promises";
import { basename } from "node:path";
import { describe, expect, it } from "vitest";
import type {
EpisodeTransformTopologyEdgeObservation,
EpisodeTransformTopologyFrameUse,
} from "../../ir";
import type {
ByteResources,
EpisodeSource,
ReadContinuation,
} from "... |
73017f11a383bf87180107e5d11e65cd377da8798418b262a20412be222e4d23 | TypeScript | 5,313 | 219 | import type { DecodeContext, Decoder } from "../../decoders";
import type { DecodedOutput, PayloadDescriptor } from "../../ir";
import type { ByteSourceDescriptor } from "../bytes";
/**
* Record identity used to cache decoded payload output.
*/
export interface DecodeCacheDescriptor {
/**
* Optional discriminat... |
bfb7a91aebf4977b009678cf5fc51c4b3529a9893e6ed1dca47c24e5e3206549 | TypeScript | 5,313 | 178 | import { useTrackEvent } from "@fiftyone/analytics";
import type { SampleRendererSampleLike } from "@fiftyone/plugins";
import {
createSampleRendererRenderContext,
getComponent,
getMatchingSampleRenderer,
getSampleRendererComponent,
hasSampleRendererSource,
PluginComponentType,
useActivePlugins,
} from "@... |
9fc836d4811b574084f08ce91dd2b40578ac4c1f84a6081dd2e294ca37010321 | TypeScript | 5,331 | 133 | import { useMemo } from "react";
import * as THREE from "three";
import { getCuboidResizeQuaternion } from "../../annotation/cuboid-face-resize";
import { useTransientCuboid } from "../../annotation/store";
import type { LabelId } from "../../annotation/store/types";
import { useTransformMode } from "../../state";
exp... |
2f1d3918a18d7453ece357446d730e778532d7e6a37914749506932b6febc20f | TypeScript | 5,346 | 167 | import type { ThumbnailSelectionDetail } from "@fiftyone/looker/src/selection";
import type { Sample } from "@fiftyone/state";
import { selectedSampleObjects, selectedSamples } from "@fiftyone/state";
import type { SelectionType } from "@fiftyone/state";
import { useGridSelection } from "@fiftyone/state/src/selection";... |
4251e247081c8ad5fed2c3dd818b21acab344b38db141fa43cff9de3b0bd5d9e | TypeScript | 5,353 | 168 | import * as THREE from "three";
import { Matrix4, Shape, ShapeGeometry, Vector3 } from "three";
/**
* POLYGON FILLING UTILITIES
*
* The polyline filling algorithm reconstructs closed loops from unordered line
* segments and creates filled polygon meshes positioned in 3D space.
*
* Key Algorithm Steps:
* 1. Reco... |
816d34ff66a19aa15151fa396387386b7c072d29540344556bfbbab8ef86e449 | TypeScript | 5,367 | 153 | import { LASSO_COLOR, LASSO_MIN_EXTENT_PX } from "../constants";
import type { Polygon } from "../types";
/**
* Whether a finished gesture enclosed enough area to be a lasso. Three points
* is as few as can bound anything, but at the 3px move threshold that is ~6px
* of travel — inside the jitter of an ordinary cli... |
f7df2a795bd1b2c14c9441a26f88c86ddb55d4008fa70ae05c14770e089559c1 | TypeScript | 5,386 | 164 | import type { ReadWorkBudget, ReadWorkUsage } from "../../../ports";
/** Adapter-private physical-unit limits layered under the neutral byte budget. */
export interface SourceReadBudgetPhysicalLimits {
readonly maxPhysicalUnits: number;
}
/** Remaining cumulative work, including an adapter-private physical unit. */... |
c112dce536a22cca77f1ada26be023578f4c36b4358421f84d492f78e2a5d157 | TypeScript | 5,393 | 143 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import {
useActiveAnnotationSampleId,
useAnnotationEngine,
useAnnotationEventBus,
usePersistAnnotationDeltas,
type LabelRef,
} from "@fiftyone/annotation";
import { AnnotationLabel } from "@fiftyone/state";
import { useCallback } from "react";
/**
* Optional ge... |
7268fd7afaf59dca4ff96d4743f378bb9f9217edf9e3ff9d9f7efacd9168af29 | TypeScript | 5,394 | 193 | import { describe, expect, it } from "vitest";
import {
CUSTOM_TRANSFORM_BUNDLE_MESSAGE,
CUSTOM_TRANSFORM_BUNDLE_SCHEMA_DATA,
FRAME_TRANSFORM_MESSAGE,
FRAME_TRANSFORM_SCHEMA_DATA,
createChannel,
createMessage,
createReader,
createSchema,
createStatistics,
} from "../inline-client.test-fixtures";
impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.