sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
d0e806ee600559593a8e3e3b3b60fc06f71c70f71c38563ad0cf1de9fac5aec1 | TypeScript | 134 | 2 | /** Maximum Gaussian radius, in standard deviations, rendered by Spark. */
export const SPARK_MAX_STANDARD_DEVIATIONS = Math.sqrt(8);
|
f61037cd527013b41c8b7e8b080f3571c074b7cfc644ad9224b5ec04e1ee4010 | TypeScript | 137 | 4 | import * as aggregations from "./aggregations";
import useAggregation from "./useAggregation";
export { aggregations, useAggregation };
|
5c8a2ee13ce9304f576e6a101b3c733f587b0dc15a0aa48f574e859adcd75972 | TypeScript | 138 | 4 | export * from "./components";
export * from "./glsl";
export { default as useGradientMap } from "./gradientMap";
export * from "./types";
|
766331b56a234c31fcae8e368c4e1ff0196c5616b888a84c3912841c210c9bad | TypeScript | 141 | 8 | import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
environment: "jsdom",
globals: true,
},
});
|
dee0deacee34cd87c7064e33a55d86bc2a0667fd59d980b31ec0b8b79e11b25d | TypeScript | 142 | 4 | export * from "./getSampleVersionToken";
export * from "./labelPersistence";
export * from "./labels";
export * from "./sampleVersionTokens";
|
8ddd3b1dbe052267db3772f04e65b061eaf37acf43787f90d2384142f68bc89d | TypeScript | 143 | 5 | export {
registerSidebarTrayExtension,
useSidebarTrayExtensions,
} from "./registry";
export type { SidebarTrayExtension } from "./types";
|
8c6f0ddd74af73365279c2a47f1d97dbb60a3d0cd80035cd75d223d5a21a9cba | TypeScript | 149 | 4 | export const DEFAULT_WRITE_KEYS = {
dev: "MrAGfUuvQq2FOJIgAgbwgjMQgRNgruRa", // oss-dev
prod: "SjCRPH72QTHlVhFZIT5067V9rhuq80Dl", // oss-prod
};
|
9c4ae0205e1cf2bb5d5ff8a71ad22a38fb00bd6e0aae7b0731fe88ac10f89ac6 | TypeScript | 154 | 9 | /// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_API?: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
|
8ccb482bb243cf759d61ce7d75841564cf3c605f374ea7eb6c76f2a5ffb45469 | TypeScript | 155 | 3 | export { default } from "./Loading";
export { default as LoadingDots } from "./LoadingDots";
export { default as LoadingSpinner } from "./LoadingSpinner";
|
10f63e7ca422eeeeab6b0079d2ed3d3481fa4d7628c0a6be0d5eb669ef405017 | TypeScript | 157 | 6 | export {
getMcapCloudSourceResolver,
hasMcapCloudSourceResolver,
registerMcapCloudSourceResolver,
type McapCloudSourceResolver,
} from "./registry";
|
335e6ee16bf9a001d1881cba7bf7436b8ed401e3781267baa33fd356e4b08989 | TypeScript | 157 | 2 | /** Provenance of the current automatic or explicit reference-frame choice. */
export type ReferenceSelectionSource = "auto-local" | "auto-stable" | "user";
|
8916c4afc1622e81aac5a775a3ebd680e8732ae7611c09a5528f00972193d60b | TypeScript | 159 | 7 | import { createContext } from "react";
export const SchemaIOContext = createContext<SchemaIOContextType>({});
type SchemaIOContextType = {
id?: string;
};
|
cc257da526b56a0d485a910d8061c45106edd061475f58af0b7ac088fb8bd811 | TypeScript | 170 | 8 | import type { BooleanButtonInput } from "./types";
export const normalize = ({ ...settings }: BooleanButtonInput) => {
return {
value: null,
settings,
};
};
|
a24d7d7872120c47be91eaadd4727e355e99172ab8cd2b373e8dc15e0233d665 | TypeScript | 171 | 9 | export type PLOT_CONFIG_TYPE = {
sortBy?: string;
limit?: number;
log?: boolean;
};
export type PLOT_CONFIG_DIALOG_TYPE = PLOT_CONFIG_TYPE & {
open?: boolean;
};
|
48cffadc3f9457b62c089eb622b68871271828129b540015e4a8e6dc0754d6ab | TypeScript | 172 | 6 | const BYTES_PER_MEGABYTE = 1024 * 1024;
/**
* Default in-memory decoded output cache budget.
*/
export const DEFAULT_DECODED_CACHE_SIZE_BYTES = 64 * BYTES_PER_MEGABYTE;
|
6937060ecb52cb8ba10dcb9228009a4b13cabfec59e230c7d264565ba64626ad | TypeScript | 173 | 7 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { PixiResourceLoader } from "./PixiResourceLoader";
export const globalPixiResourceLoader = new PixiResourceLoader();
|
d4a791c3356c5b325d3b7aad2fad5366f759fb6bebb07e3806630d61bf23a4a4 | TypeScript | 174 | 5 | import type { AdaptiveMenuItemComponentPropsType } from "@fiftyone/components";
export type ActionProps = {
adaptiveMenuItemProps?: AdaptiveMenuItemComponentPropsType;
};
|
bfbde54a3480e999987a590c9ed8a48bd5551dd77df3474caf27cfac0898aae2 | TypeScript | 178 | 3 | export { ActionToolbar } from "./ActionToolbar";
export type { ActionToolbarProps } from "./ActionToolbar";
export type { ToolbarActionItem, ToolbarActionGroup } from "./types";
|
601ca797cdf56fc040624747ab5a3f35fd47f4c8c573fea46cae2df526dd9fea | TypeScript | 179 | 4 | import { useEventBus } from "@fiftyone/events";
import { AnnotationEventGroup } from "../events";
export const useAnnotationEventBus = () => useEventBus<AnnotationEventGroup>();
|
492b36244b449e983f209c4d76f32e630911d46fa753c4e2673a6bdcd21589ad | TypeScript | 181 | 9 | import { defineConfig } from "vitest/config";
import relay from "vite-plugin-relay";
export default defineConfig({
plugins: [relay],
test: {
environment: "jsdom",
},
});
|
5f8bfc91f9a30bb458fbb8d4c245fc502fdcb137fe32bc869f5c12ecdc6b819b | TypeScript | 183 | 8 | import { Buffer } from "buffer";
// Make Buffer available in worker, too
const globals = globalThis as typeof globalThis & {
Buffer?: typeof Buffer;
};
globals.Buffer ??= Buffer;
|
abf46374fff331a15b4885377b8ab494f00d4823691aa8a3d2e407c8dfab30cb | TypeScript | 183 | 7 | import { atom } from "recoil";
import type { AnalyticsInfo } from "./usingAnalytics";
export const analyticsInfo = atom<AnalyticsInfo>({
key: "analyticsInfo",
default: null,
});
|
d592c839764fe0aa1ddba96b2906114cb6a819804aee5569edcdd704419d614b | TypeScript | 184 | 7 | export * from "./abstract";
export * from "./frame";
export * from "./image";
export * from "./imavid";
export * from "./metadata";
export * from "./three-d";
export * from "./video";
|
ef715254c71d711c4443b9e338122633b0e50db04b6d0e1094a3d6dec97901cb | TypeScript | 190 | 11 | import { Primitive } from "@fiftyone/utilities";
/**
* Operation type.
*/
export type OpType = "mutate" | "delete" | "add";
export type Mutation = {
data: Primitive;
op?: OpType;
};
|
0504a23e6b0a1cf106a3334dd543de70a1b4b25cee2b64168aa297be875a7465 | TypeScript | 191 | 7 | import { CommandDescriptor } from "./useCommand";
export type CommandHookReturn = {
callback: () => void | Promise<void | boolean>;
descriptor: CommandDescriptor;
enabled: boolean;
};
|
02455e43f7e0180d4d85c293aef4d0ed9ebdecc4c660508bd25fe216d209a9ef | TypeScript | 192 | 4 | /** Current monotonic timestamp in milliseconds, falling back to wall time when needed. */
export function monotonicNowMs(): number {
return globalThis.performance?.now?.() ?? Date.now();
}
|
a19fd4c656876df945e63220850a6d4e5774772950d1a5032f05ae5c64f84df5 | TypeScript | 198 | 6 | export * from "./hooks";
export * from "./AgentSelect";
export * from "./OperatorAnnotationAgent";
export * from "./SAM2BrowserAnnotationAgent";
export * from "./registry";
export * from "./types";
|
b87becc6faf4b2acc84f3e7a5172a324cadc8020129c85b3d0c06f0feee01fe4 | TypeScript | 199 | 5 | import { createUseEventHandler } from "@fiftyone/events";
import { AnnotationEventGroup } from "../events";
export const useAnnotationEventHandler =
createUseEventHandler<AnnotationEventGroup>();
|
550e86043235bf7f2782a9b30e74e40c0dc21742b3a72713c70daf5aa6c318ae | TypeScript | 200 | 4 | import { createContext } from "react";
/** Hosts can hide the tray's default assistant promotion while their placement loads. */
export const SelectionAssistantFallbackContext = createContext(true);
|
e0d149971130da47c47009a0fa37705794206110d5b644a01b3be26f163535d2 | TypeScript | 202 | 8 | import { useRaycastResult as useRaycastResultState } from "../state";
/**
* Hook to access the current raycast result.
*/
export const useRaycastResult = () => {
return useRaycastResultState();
};
|
7afa14e20d375529843c0416ef1557e0c747f9140e45b9c3117c50c81c514a60 | TypeScript | 203 | 4 | export {
booleanNoSpaceToggleProps as settingsBooleanNoSpaceToggleProps,
preventBooleanSpaceToggle as preventSettingsBooleanSpaceToggle,
} from "../../../../visualization/panel-ui/boolean-keyboard";
|
9ededcf6077ad2f1d13c02ea6f5ee9b5e01bbad4f0637be427fe17cf8c61ec86 | TypeScript | 204 | 5 | import { useEventBus } from "@fiftyone/events";
import { LighterEventGroup } from "../events";
export const useLighterEventBus = (eventChannel: string) =>
useEventBus<LighterEventGroup>(eventChannel);
|
5f6298267cde46aed8d21f28e99b0b452cff78f0fd3b81b7ccac540739982334 | TypeScript | 205 | 4 | /** Sent as a fetched range of frames lands in the store of controller `id` */
export const IMAVID_FETCHED_EVENT = "imavid:fetched";
export type ImaVidEvents = { [IMAVID_FETCHED_EVENT]: { id: string } };
|
b702665c2c7c034a1df7333feb1e12d0d7b7946b8cf5ee89e5f96f1bbdef1be7 | TypeScript | 212 | 13 | import { UserConfig } from "vite";
export default <UserConfig>{
esbuild: true,
build: {
lib: {
entry: "src/index.ts",
formats: ["es"],
},
target: "es2015",
minify: false,
},
};
|
304991b30a7c325b1e636654a5d99f8fc710a7b271b02a58e7e709db6137645a | TypeScript | 215 | 7 | import { canManageSchema } from "@fiftyone/state";
import { useRecoilValue } from "recoil";
export default function useCanManageSchema() {
const { enabled } = useRecoilValue(canManageSchema);
return enabled;
}
|
a594df8bd056abaa65f68e281b69d02e184bb3cd46568213598ff3fa6e93e830 | TypeScript | 216 | 10 | import useLookerCache from "./useLookerCache";
const CACHE = () =>
useLookerCache({
reset: "",
maxHiddenItems: 0,
maxHiddenItemsSizeBytes: 0,
});
export type LookerCache = ReturnType<typeof CACHE>;
|
d6b33b1046600ff6b5863f2ddfc366fe3293aca32f0b5d400f57e5fe405acb75 | TypeScript | 217 | 8 | import { createPlugin } from "leva/plugin";
import { BooleanButton } from "./BooleanButton";
import * as props from "./plugin";
export const booleanButton = createPlugin({
component: BooleanButton,
...props,
});
|
f901f6a1c87858dc154d33467e0201f2073b0d6942ebb27b07b7a69cee5477cd | TypeScript | 220 | 4 | /** Dataset-owned sidebar persistence and mounted-scope boundary. */
export * from "../settings/semantic-source";
export * from "../settings/sidebar-preferences";
export * from "../settings/sidebar-preferences-context";
|
685fbcadb1343a4f748f0762c6f841895bb3d5b1f1facf4c18b9d48ec9843a2d | TypeScript | 222 | 7 | export { AnnotationToolbar } from "./AnnotationToolbar";
export type {
ToolbarActionItem,
ToolbarActionGroup,
AnnotationToolbarProps,
} from "../types";
export { useAnnotationActions } from "./useAnnotationActions";
|
bc5d95e2f3af2c21169fb1b5fe3b9a81daa8ae95a994e85bc013f4b0d303fa32 | TypeScript | 223 | 10 | export {
registerEpisodeHeaderAction,
useEpisodeHeaderActions,
} from "./registry";
export type {
EpisodeHeaderAction,
EpisodeHeaderActionContext,
EpisodeHeaderActionId,
EpisodeLayoutControls,
} from "./types";
|
8f760b776ed9c5cdf344c920f9ef1b53b0f06551502a39614f459acd1dc1f602 | TypeScript | 225 | 13 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type { RegisteredSetter } from "./registerSetter";
const onRefresh: RegisteredSetter =
({ router }) =>
() => {
router.load(true);
};
export default onRefresh;
|
f26b8232306ffc16fd7b41870f0023b48bff247d0a88ae277060dc95429a7696 | TypeScript | 230 | 6 | export * from "./CuboidOrientationMarkers";
export * from "./hooks";
export * from "./shouldSuppressHoverOnPointer";
export * from "./TransformControls";
export * from "./useDisplayCuboidTransform";
export * from "./useDragGate";
|
a032018ab6af58f6c8b90b1ac66472be26db68d5e7b0d0080b33668c2c5e8f0a | TypeScript | 234 | 15 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
export default {
app_ids: {
prod: "G-NT3FLN0QHF",
dev: "G-7TMZEFFWB7",
},
dimensions: {
dev: "dimension1",
version: "dimension2",
context: "dimension3",
},
};
|
69e9f6527930a57dbea1b53bcea2ae451750c6a57dfcb8847dbc25e35f74c79a | TypeScript | 241 | 8 | import { ViewPropsType } from "./types";
export default function autoFocus({ autoFocused }: ViewPropsType) {
if (!autoFocused) return;
const autoFocus = autoFocused.current === false;
autoFocused.current = true;
return autoFocus;
}
|
fba1b5b9cc2267b456434a3f2020702d92581aab93a74590402274b305791b43 | TypeScript | 243 | 11 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import type { RegisteredWriter } from "./registerWriter";
const onSetModalFilters: RegisteredWriter<"modalFilters"> = () => () => {
// TODO: OSS is a noop
};
export default onSetModalFilters;
|
5224c6d0ff2c537a55d2670503ff07ccd0af4367c002d4b27972671d46a85349 | TypeScript | 245 | 4 | /** Format-neutral data-plane facade for extension implementations. */
export * from "../../runtime";
export type { DecodedFrame, NsRange, TimeWindow } from "../../ir";
export type { EpisodeSession, FrameBatch, ReadRequest } from "../../ports";
|
23683c4ce215c55ab3d8fe0e7a14314c6a6dd93fe68a529c995f42b88bd0ae98 | TypeScript | 257 | 8 | export {
SceneInventoryProvider,
useOptionalSceneInventory,
useOptionalSceneSourcesByType,
useSceneInventory,
useSceneSourcesByType,
} from "./scene-inventory-context";
export type { SceneInventoryProviderProps } from "./scene-inventory-context";
|
c22998eaaedb130cb5f8273adecfb814d307eace4467d7a3d3cdca7ab0580a9c | TypeScript | 271 | 10 | export type {
AnnotationContext,
AnnotationContextSelected,
AnnotationFields,
CreateOptions,
LabelSchema,
LabelType,
} from "./types";
export { useAnnotationContext } from "./useAnnotationContext";
export { useAnnotationFields } from "./useAnnotationFields";
|
ded4a2ff520f4b6846e5b5e90a50d9b3b7f51881d12b038ab6c11c0eab1df4dc | TypeScript | 271 | 5 | import { createUseEventHandler } from "@fiftyone/events";
import type { Looker3dEvents } from "../constants";
/** Handles one of the 3D viewer's bus events while the component is mounted */
export const useLooker3dEventHandler = createUseEventHandler<Looker3dEvents>();
|
81d63714021fa0e2fc3a0d3974d126dcc99b39b1cb3af60d99d1c276fa73646c | TypeScript | 275 | 14 | export type FileObjectType = {
absolute_path: string;
date_modified?: string;
name?: string;
size?: number;
type?: "file" | "directory";
exists?: boolean;
parent_path?: string;
};
export type FileSystemObjectType = {
name: string;
default_path: string;
};
|
d4d0382e1a64694effcede86094236891a395dc5e2d160b0d627a70c341cdf2d | TypeScript | 275 | 12 | import { getRandomColorFromPool } from "../utils";
export const defaultMaskTargetsColors = (colorPool: readonly string[]) => {
return [
{
defaultMaskTargetsColors: {
intTarget: 1,
color: getRandomColorFromPool(colorPool),
},
},
];
};
|
bc807caf94331c349be18fe92a9f3507db6d4206bf42de2de6d945b881b21fc5 | TypeScript | 285 | 7 | export const CLASS_PERFORMANCE_SORT_OPTIONS = [
{ value: "default", label: "Default" },
{ value: "az", label: "Alphabetical (A-Z)" },
{ value: "za", label: "Alphabetical (Z-A)" },
{ value: "best", label: "Best performing" },
{ value: "worst", label: "Worst performing" },
];
|
8654ab775e9ef7e047a534bbdb4c7b694bebf93b276efd3358a688dacf9a3b7b | TypeScript | 291 | 7 | /**
* Maximum retained samples emitted for one gap-preserving M4 bucket.
*
* Producers and consumers share this bound so requested point budgets remain
* hard limits even when a bucket must preserve endpoints, extrema, and gaps.
*/
export const NUMERIC_SERIES_MAX_BUCKET_SURVIVORS = 5;
|
06c466dc4cfeebe0b94eba5c0a533a0800f6fe069c6e8dc76c43e52421ca7ab0 | TypeScript | 292 | 19 | export {
ClassificationIcon,
Close,
Copy,
DetectionIcon,
EraserIcon,
HelpIcon,
IconButton,
InfoIcon,
JSONIcon,
KeyboardArrowDown,
KeyboardArrowUp,
LookerArrowLeftIcon,
LookerArrowRightIcon,
RedoIcon,
SegmentationIcon,
SelectIcon,
UndoIcon,
} from "./Icons";
|
5d9df35818573a4e0ef9e2f0936050d6430afa491b2bcc1c965ebf67ff78c435 | TypeScript | 295 | 9 | export * from "./useUndoRedo";
export * from "./useUndoHistory";
export * from "./useCreateCommand";
export * from "./useCommandContext";
export * from "./useKeyBinding";
export * from "./useKeyBindings";
export * from "./useCommand";
export * from "./usePushUndoable";
export * from "./types";
|
87760af2b7c6622690eb18e375859ff18f8d486b22cdb939674546e3b649da45 | TypeScript | 295 | 10 | import { useRecoilState } from "recoil";
import { analyticsInfo } from "./state";
import type { AnalyticsInfo } from "./usingAnalytics";
export default function useAnalyticsInfo(): [
AnalyticsInfo,
(info: AnalyticsInfo) => void,
] {
return useRecoilState<AnalyticsInfo>(analyticsInfo);
}
|
1a30e44a0b912617a6a08a5153cd09b3406f81ec2b90e80d638b5181b1c3c9d9 | TypeScript | 305 | 4 | export { E2E_EVENT_PREFIX, EventDispatcher, tapAllEvents } from "./dispatcher";
export { forwardingLegacyDomEvent, isLegacyDomMirror } from "./legacyDomEvents";
export { LocalEventTarget, type LocalEvent } from "./local-target";
export { DEFAULT_CHANNEL_ID, getEventBus, clearChannel } from "./registry";
|
84482027eb9946ad730722f8374f6ce55d61622480ddabb315d782f5624648e8 | TypeScript | 308 | 6 | export { DEFAULT_WRITE_KEYS } from "./keys";
export { analyticsInfo } from "./state";
export { default as useAnalyticsInfo } from "./useAnalyticsInfo";
export { default as useTrackEvent } from "./useTrackEvent";
export * from "./usingAnalytics";
export { default as usingAnalytics } from "./usingAnalytics";
|
03912334578259e9079aceaddcdc52e8b3c3f4fa79a91b41a45026296db2243d | TypeScript | 309 | 18 | import { UserConfig } from "vite";
export default <UserConfig>{
esbuild: true,
build: {
lib: {
entry: "src/index.ts",
formats: ["es"],
},
target: "es2015",
minify: false,
},
resolve: {
alias: {
"@fiftyone/looker": "@fiftyone/looker/src/index.ts",
},
},
};
|
8de1b18f07e128083e5e07ce7737289af71655ddd9cb332d35e9abdc6c6a0e50 | TypeScript | 311 | 9 | import type { TimeWindow } from "../../../ir";
import type { EpisodeSession } from "../../../ports";
/** Resolves the active session's exact format-neutral timeline range. */
export function useTimeRange(
session: EpisodeSession | null,
): TimeWindow | null {
return session?.manifest.timeRange ?? null;
}
|
6718647120651a4475b50315f941a3f6ddd3562dc525b984e795d2f0b8ca98e6 | TypeScript | 313 | 8 | export * from "./deltaSupplier";
export * from "./persistQueue";
export * from "./saveStatus";
export * from "./useAnnotationDeltaSupplier";
export * from "./useAutoSave";
export * from "./usePersistAnnotationDeltas";
export * from "./usePersistenceEventHandler";
export * from "./usePersistenceRetryController";
|
7b51a755828828763fae95294c8c0d6ea02f605cf43c22ec64e010079cb72ad1 | TypeScript | 313 | 9 | import { Lookers } from "@fiftyone/state";
import React, { createContext } from "react";
interface ModalContextT {
activeLookerRef: React.MutableRefObject<Lookers | undefined>;
setActiveLookerRef: (looker: Lookers) => void;
}
export const modalContext = createContext<ModalContextT | undefined>(undefined);
|
7fc16e4f8c074652fb2f063f96ee7dbdcf217cb703f77fe1f9871588481da075 | TypeScript | 317 | 11 | export * from "./components";
import scrollableStyles from "./scrollable.module.css";
export const scrollable = scrollableStyles.scrollable;
export const scrollableSm = scrollableStyles.scrollableSm;
import jsonIcon from "./icons/json.svg";
import helpIcon from "./icons/help.svg";
export { jsonIcon, helpIcon };
|
ca15508b0ecffa824b7b8c90db57f89d523eb2ced6174d3539141b03c605bdda | TypeScript | 319 | 7 | import { defineStateActionCapabilityContractTests } from "../../testing/state-action-contract";
import { createFixtureStateActionProvider } from "./fixture-state-action";
defineStateActionCapabilityContractTests({
createSession: async (scenario) => createFixtureStateActionProvider(scenario),
name: "fixture",
});
|
0f0e59d6278a33216a066827c7f53f272ab7876a06854971862af7ef410f692a | TypeScript | 321 | 10 | import type { PaginateSamplesNode } from "@fiftyone/relay";
import { ImaVidFrameSamples } from "./ima-vid-frame-samples";
export type SampleId = string;
export type SampleResponse = PaginateSamplesNode;
export type PartitionId = string;
export type ImaVidStore = {
[partitionSampleId: string]: ImaVidFrameSamples;
};... |
5ab9866d15c61afe00c3e52af447affe16a213b43fcc2619994311c94385ccb2 | TypeScript | 322 | 14 | /**
* Parses decimal byte-size strings that may represent uint64-sized values.
*/
export function parseByteSize(value: string | null | undefined) {
if (value === undefined || value === null || !/^\d+$/.test(value)) {
return undefined;
}
try {
return BigInt(value);
} catch {
return undefined;
}
... |
7e7a14863bc3bb6f19333e7befaa457602add58a36644609f4888d9995ee76c9 | TypeScript | 324 | 11 | export * from "./registry";
export * from "./resource-hints";
export * from "./types";
import { DecoderRegistry } from "./registry";
/**
* Default runtime decoder registry for source-agnostic query clients.
* Format adapters register their own built-ins.
*/
export const defaultDecoderRegistry = new DecoderRegistry... |
b879a2d0689741c9d60de2bc61046c6e5d0fa81e6b9ee23d5eb0de630e346513 | TypeScript | 327 | 15 | import { getFetchFunction } from "@fiftyone/utilities";
/**
* Response type for ListFeatures API.
*/
export type ListFeaturesResponse = {
features: string[];
};
/**
* List enabled features.
*/
export const listEnabledFeatures = (): Promise<ListFeaturesResponse> => {
return getFetchFunction()("GET", "/features... |
b977c1febfeccbd967c8a4e3df9e47ed5fa8c9e7e70b8653f2568beead39de45 | TypeScript | 329 | 10 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
export { useLighter } from "./useLighter";
export * from "./useLighterEventBus";
export * from "./useLighterEventHandler";
export { useLighterSetupWithPixi } from "./useLighterSetup";
export type { LighterOptions } from "./useLighterSetup";
export * from "./useViewportInit... |
db6d9c2ea0ab45bba2ac0f9c408ca24adbc9e8fc7361ed9d41d7380a7d8fca9e | TypeScript | 329 | 9 | import { getEventBus } from "@fiftyone/events";
/** e2e specs wait on the modal looker a sample change or media switch attaches */
type ModalLookerE2EEvents = {
"e2e:modal:looker-attached": undefined;
};
export const dispatchLookerAttached = () =>
getEventBus<ModalLookerE2EEvents>().dispatch("e2e:modal:looker-att... |
a06f7d0aa003d67dd9a62c81e99a5d4dc0dac5b03107a412be3de9d6f071aa60 | TypeScript | 335 | 14 | /// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_AUTH0_AUDIENCE: string;
readonly VITE_AUTH0_CLIENT_ID: string;
readonly VITE_AUTH0_DOMAIN: string;
readonly VITE_AUTH0_;
readonly VITE_API?: string;
readonly VITE_HAS_UPDATES: boolean;
}
interface ImportMeta {
readonly env: Im... |
79ab00350cb3627ea311683169aef147aef1f21d773c96d819f71a08c5221e57 | TypeScript | 341 | 18 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { useContext } from "react";
import { RouterContext } from "./RouterContext";
const useRouterContext = () => {
const context = useContext(RouterContext);
if (!context) {
throw new Error("RouterContext is undefined");
}
return context;
};
export defau... |
4bc8a5496240feef4229634443baf86b28e0d578b87d3ed853c86c58b62c557d | TypeScript | 344 | 9 | export * from "./modalStatusBar";
export * from "./useAnnotationContextManager";
export * from "./useEngine";
export * from "./useGroupAnnotationSample";
export * from "./useLabelPreview";
export * from "./useLooker3dSurfaceController";
export * from "./useSample";
export * from "./useSync3dModalSample";
export * from ... |
65327a23e51edb5265d584cf0a4b6c2fe7f3b9bd733fd8051b9b02aa45ad6fe5 | TypeScript | 344 | 10 | import { describe, expect, it } from "vitest";
import { nsDeltaToSeconds } from "./nanoseconds";
describe("nanosecond helpers", () => {
it("converts positive and negative deltas precisely", () => {
expect(nsDeltaToSeconds(86_400_500_000_001n)).toBe(86_400.500000001);
expect(nsDeltaToSeconds(-1_500_000_000n)... |
e35bb26fdfed5f5446fc6dd991b2fed3108ae0c7db98406e0848e5fb2ba7c611 | TypeScript | 345 | 16 | /**
* Read-only hook for frustum state.
*/
import { useRecoilValue } from "recoil";
import { frustumsVisibleAtom } from "../../state";
/**
* Read-only hook for frustum state.
* @returns Object with frustum state values
*/
export function useFrustums() {
const isVisible = useRecoilValue(frustumsVisibleAtom);
... |
37b518bdef05b3f8914918ede5300f5915d66aaf1a25a8dba1f1d07a73bcc68e | TypeScript | 346 | 15 | import type * as THREE from "three";
export type Looker3dSettings = {
useLegacyCoordinates: boolean;
defaultUp: THREE.Vector3Tuple;
defaultCameraPosition: THREE.Vector3;
pointCloud?: {
minZ?: number;
};
};
export const defaultPluginSettings: Partial<Looker3dSettings> = {
useLegacyCoordinates: false,
... |
2ad42cfedb5e9ea4430e790f35c7b94500d6200e58d84ca86370be250d295f15 | TypeScript | 349 | 8 | import type { SavedSubset } from "@fiftyone/state/src/selection";
import { createContext, type ComponentType, type ReactNode } from "react";
/** Optional non-interactive host details around the active subset label. */
export const SubsetDetailsContext = createContext<ComponentType<{
subset: SavedSubset;
children: ... |
b182e3a653a801f3fdfb4a81f424364c5a500edac1b975437941ff852f9e6a7b | TypeScript | 352 | 12 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { atom, useAtom } from "jotai";
// whether the group annotation slice has been resolved and
// applied so as to avoid a flash of the 2D annotation tools
const groupAnnotationSliceReadyAtom = atom(false);
export const useGroupAnnotationSliceReady = () =>
useAtom(... |
6a89bda1862c9bdf63c585975118ea6d71cf4f1918da222cc033d82f05a8b8a5 | TypeScript | 355 | 7 | /**
* Shared load-state union used by React hooks throughout the multimodal
* package. Each hook re-exports a domain-specific alias (e.g.
* `FrameTransformsStatus`, `TemporalTagsStatus`) so consumers keep stable,
* readable names while the underlying definition stays in one place.
*/
export type LoadStatus = "idle... |
07b414d79f118ae7c3af2aee7b6f16cdef5f1bacce631c62b4636a3670c91ab9 | TypeScript | 356 | 14 | import { useCallback } from "react";
import { useAnnotationEventBus } from "@fiftyone/annotation";
/**
* Hook which provides a callback to trigger a save event.
*/
export default function useSave() {
const eventBus = useAnnotationEventBus();
return useCallback(() => {
eventBus.dispatch("annotation:persiste... |
5efc9aa5b8521dc9584f04ddb09b0bcfa6260dee0658126ab4d578641c2abec8 | TypeScript | 365 | 12 | import { describe, expect, it } from "vitest";
import { shortcutToHelpItems } from "./utils";
describe("shortcut processing test", () => {
it("parses unique shortcuts", () => {
const results = shortcutToHelpItems({
one: { shortcut: "test" },
two: { shortcut: "test" },
});
expect(results).toSt... |
6258b8a3b440f3db23fccedb11a62227508a386b407b9507fd4fd7dbf344ba81 | TypeScript | 366 | 12 | import { Vector3 } from "three";
import type { Scene3dUpAxis } from "../../spatial/view-preferences";
const SCENE_UP_VECTORS: Record<Scene3dUpAxis, Vector3> = {
x: new Vector3(1, 0, 0),
y: new Vector3(0, 1, 0),
z: new Vector3(0, 0, 1),
};
export function sceneUpVector(sceneUpAxis: Scene3dUpAxis): Vector3 {
re... |
c3c51d41a6bb3b41b417a08c93d69b158391f4f0f0fbdfc9d74402a45d7e1266 | TypeScript | 367 | 14 | import * as fos from "@fiftyone/state";
import { useCallback } from "react";
/**
* Hook that provides a function to focus the requested annotation slice.
*/
export function useApplyAnnotationSliceVisibility() {
const actions = fos.useRenderConfig3dActions();
return useCallback(
(sliceName: string) => action... |
c316daebdeed1c8fd8d30ca3a972a5baff09d45c7a2d567efd228a27ab675fa1 | TypeScript | 373 | 15 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
/**
* Point containment levels for overlays. Lives in its own leaf module so
* `BaseOverlay` can value-import it without re-entering the Scene2D ↔
* BaseOverlay cycle that would otherwise leave subclasses extending
* `undefined` at module-init time.
*/
export enum CON... |
4baa8b5670cb1d588aca369ff1d0014081cca37104e9e5c41253972cc484f4af | TypeScript | 375 | 13 | /** Insertion-ordered storage for recently fetched navigation data. */
export default class BoundedMap<K, V> extends Map<K, V> {
constructor(readonly limit: number) {
super();
}
override set(key: K, value: V): this {
this.delete(key);
super.set(key, value);
while (this.size > this.limit) this.del... |
34b27c3eceea6da32c1470b0836f874cd717bc3ba38d4bd5dd08dcb2391e5ce7 | TypeScript | 380 | 12 | import { getEventBus } from "@fiftyone/events";
import { useEffect } from "react";
/** e2e specs wait on the modal mounting; the app renderer signals closing */
type ModalLifecycleE2EEvents = {
"e2e:modal:opened": undefined;
};
export const useModalLifecycleSignal = () =>
useEffect(() => {
getEventBus<ModalLi... |
1e86a4d910296d820d0d1c177f9b8e3e42324876b51e4fe4a66258c2036ebde8 | TypeScript | 383 | 12 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
export { COMMON_SHORTCUTS, VIDEO_SHORTCUTS } from "./actions";
export { CanvasElement } from "./canvas";
export * from "./controls";
export { ErrorElement } from "./error";
export { LookerElement } from "./looker";
export * from "./options";
export { TagsElement } from "./... |
29e863172771bdc0f88f082c078b45d19aa90ed5a99ecd4f15e8fb1d8b849e17 | TypeScript | 383 | 20 | import { defineConfig } from "vite";
export default defineConfig({
build: {
lib: {
entry: "src/index.ts",
name: "FiftyOneCommands",
fileName: (format) => `index.${format}.js`,
formats: ["es", "umd"],
},
rollupOptions: {
external: ["react"],
output: {
globals: {... |
6777647df1402c69ece2208cb4f582ecffd2b6361549474eef25f636089e7b11 | TypeScript | 385 | 15 | import type { ReadWorkUsage } from "./session";
/** Creates a fresh zero-valued read-work usage record. */
export function emptyReadWorkUsage(): ReadWorkUsage {
return {
chunksOpened: 0,
decompressedBytes: 0,
decompressionCacheHits: 0,
elapsedMs: 0,
logicalSourceBytes: 0,
logicalUncompressedB... |
0d4af9e50d6bda0eae303045622e0fc512661ce22c75a04bc567cc5493697c65 | TypeScript | 386 | 10 | const NANOSECONDS_PER_SECOND = 1_000_000_000n;
const NANOSECONDS_PER_SECOND_NUMBER = 1_000_000_000;
/** Converts a nanosecond delta to seconds, subject to floating-point rounding. */
export function nsDeltaToSeconds(deltaNs: bigint): number {
return (
Number(deltaNs / NANOSECONDS_PER_SECOND) +
Number(deltaNs... |
67bf81a94794acd3ad246b45347047e752ab5e8c1d27383d6bccfd645c924355 | TypeScript | 390 | 11 | /** Stable collision-free preference identity within one dataset/media field. */
export function cameraScopeKey(
datasetOrSourceId: string | undefined,
mediaField: string | undefined,
): string | null {
const scope = datasetOrSourceId?.trim();
if (!scope) return null;
const field = mediaField?.trim();
retu... |
0964995b67f89820edcf8fdef3f0ca39f5232a2e468b89aeec3092d6cb820fb5 | TypeScript | 392 | 15 | export interface TwoClickState<Point> {
readonly a: Point;
readonly b: Point | null;
}
/** Advances an anchor/finish/reset two-click interaction. */
export function nextTwoClickState<Point>(
current: TwoClickState<Point> | null,
pick: Point,
): TwoClickState<Point> {
if (!current || current.b !== null) {
... |
89100657de768d3511948a90c36d7e5c445829853a95aa9c85fdb70492df7190 | TypeScript | 401 | 9 | export const DEFAULT_PLAYBACK_RATE = 1.5;
export const BUFFERING_PAUSE_TIMEOUT = 250;
export const BUFFERS_REFRESH_TIMEOUT_YIELD = 500;
// todo: cache by bytes and not by number of samples
export const MAX_FRAME_SAMPLES_CACHE_SIZE = 500;
export const LOOK_AHEAD_MULTIPLIER = 4;
export const ANIMATION_CANCELED_ID = -1;
... |
deb43c71f95d9ff0d322e9abab8f43c34a0e5c312be471ae7188573912d12590 | TypeScript | 404 | 17 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
import { atom } from "jotai";
import { Scene2D } from "./core/Scene2D";
/**
* Atom to store the current lighter scene instance
*/
export const lighterSceneAtom = atom<Scene2D | null>(null);
/**
* Atom to store a Pixi/WebGL initialization error message, if any.
* Null... |
8e380c9c84d0bdf19672695408ef5b42ecbf2083bba39736a329b6cc5b72de16 | TypeScript | 406 | 10 | /** Public format-adapter contracts. */
export * from "./adapter";
/** Public episode-session cancellation contract. */
export * from "./errors";
/** Shared numeric-series producer/consumer contract. */
export * from "./numeric-series";
/** Public episode-session data-plane contracts. */
export * from "./session";
/** ... |
07f6c96d17eabafc93ba56afb3bf7dca9887ce7ae7ff5f0aaf84ddb42c70a7bd | TypeScript | 408 | 12 | import type { BaseState } from "../../state";
import { TagsElement } from "../common";
/**
* Metadata thumbnails can appear in modal carousels. Restrict tag bubbles
* to non-modal thumbnails so the behavior stays grid-only.
*/
export class MetadataGridTagsElement extends TagsElement<BaseState> {
isShown({ thumbna... |
3cb4099b44980a1f659bac8db343735bd8c7a4967347763b92f840c428ab649d | TypeScript | 421 | 8 | // Duplicated from @fiftyone/similarity-search to avoid
// a cross-package dependency (core does not depend on similarity-search)
export const SEARCH_OPERATOR_URI = "@voxel51/panels/similarity_search";
export const PANEL_NAME = "similarity_search_panel";
// Query type values (mirrors QueryType enum in similarity-searc... |
5b416dacee4b51457369c0c9d1151f1d3b51a1107f31f6dfa3892fd2e9fa6477 | TypeScript | 423 | 14 | import { type PathFilterSelector, pathFilter } from "@fiftyone/state";
import { useRef } from "react";
import { useRecoilValueLoadable } from "recoil";
export const usePathFilter = (): PathFilterSelector => {
const fn = useRef<PathFilterSelector>(() => true);
const loaded = useRecoilValueLoadable(pathFilter(true))... |
c2509dc4024c606b125ebce200d86918ebd238f8145e8d790962b8b01185c286 | TypeScript | 426 | 12 | /**
* Copyright 2017-2026, Voxel51, Inc.
*/
export { useDependencyHash } from "./useDependencyHash";
export type { DependencyHash } from "./useDependencyHash";
export { useLoadTrigger } from "./useLoadTrigger";
export type { LoaderState, UseLoadTriggerResult } from "./useLoadTrigger";
export { useExecuteLoader } f... |
67dcb651b60948cd624aaa96564372cf66d6464d377077526a111b5b6ccfdc08 | TypeScript | 427 | 19 | import { useMemo } from "react";
import BoundedMap from "./BoundedMap";
export type Records = Map<string, number> & { readonly revision?: number };
class NavigationRecords extends BoundedMap<string, number> {
revision = 0;
override clear() {
super.clear();
this.revision++;
}
}
export default (clear: st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.