sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
fe66ecc611f7afe14f6f272377f6f13e1e79396ac09807f88e02e5f03901e604 | TypeScript | 1,925 | 60 | import type { DecodedPreviewFrame, PreviewWorkerCommand, PreviewWorkerEvent } from './protocol';
type FrameHandler = (frame: DecodedPreviewFrame) => void;
/** Browser-side lifecycle for the dedicated preview socket and decoder worker. */
export class PreviewStream {
readonly #worker: Worker;
readonly #frameHandle... |
505c14d36e9b2642dda18f97a5d53e576870a9f6172314e280aa752795d9301f | TypeScript | 1,972 | 69 | import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { applicationsApi, type BackendApplication } from '@/api/applications.api'
import type { Application } from '@/types/application.types'
function toApplication(backend: BackendApplication): Application {
return {
name: backend.name,
... |
530896d0db0cfb414721f2cbcf88c89550118021e92a18aeae07dc7a2329e40a | TypeScript | 2,029 | 71 | import type Konva from 'konva';
import { getContext, setContext, type Snippet } from 'svelte';
import type { Bounds, Orientation, Point, ViewTransform } from './geometry';
export interface MenuSelection {
point: Point;
hits: Konva.Shape[];
region: Bounds | null;
}
export interface NavigationTarget {
id: stri... |
f1b658a6f3186077be562e3647a49f3ba1cc3c3b42cbc2db89324ff86765e783 | TypeScript | 2,037 | 64 | export const DASHBOARD_WINDOW_NAME = 'voxel-dashboard';
export interface StationWindowRequest {
type: 'select-instrument';
requestId: string;
stationId: string;
instrumentId: string;
open: boolean;
}
export function stationWindowName(stationId: string): string {
return `voxel-station-${stationId}`;
}
exp... |
7513b9f64d6a63b759db6e6f2d28c4fa69e73572feecd9f6ed679567b9d8c5ed | TypeScript | 2,088 | 74 | import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useNotificationsStore } from './notifications.store'
describe('useNotificationsStore', () => {
beforeEach(() => {
setActivePinia(createPinia())
vi.useFakeTimers()
vi.setSy... |
060d641b6434f992ee84f95673d139473c798729dc4e5dfc702fc31dfc24946e | TypeScript | 2,116 | 81 | import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { publicationsApi } from '@/api/publications.api'
import type { Publication, PublicationInput } from '@/types/publication.types'
export const usePublicationsStore = defineStore('publications', () => {
const publications = ref<Publication[... |
fdc303d0e781483df42c2510d9b5802345812226aee5de5268dd6fb78e645997 | TypeScript | 2,184 | 82 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount, flushPromises } from '@vue/test-utils'
import DashboardView from './DashboardView.vue'
const mocked = vi.hoisted(() => ({
authStore: {
user: { email: 'user@example.com' } as { email: string } | null,
},
getRecentApplications: vi.fn... |
28e12a3f26a70b96d43aaeea6ba89b1c7e5e05ee58b820237e7ed661c33cce2c | TypeScript | 2,216 | 75 | import { useSidebar } from './context.svelte';
import Root from './sidebar.svelte';
import Content from './sidebar-content.svelte';
import Footer from './sidebar-footer.svelte';
import Group from './sidebar-group.svelte';
import GroupAction from './sidebar-group-action.svelte';
import GroupContent from './sidebar-group... |
b1a2d3509f5308f351f7fb95bf3c1e498da47a9333868bab3621fa2c4e25f3b0 | TypeScript | 2,241 | 79 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import LoginView from './LoginView.vue'
const mocked = vi.hoisted(() => ({
push: vi.fn(),
login: vi.fn(),
notifySuccess: vi.fn(),
notifyError: vi.fn(),
isAxiosError: vi.fn((value: unknown) => Boolean((value ... |
efa54ee59046f568d69096297ef31275fbbdb76f7fa1c9a27eb68e0955db48df | TypeScript | 2,293 | 93 | import { describe, expect, it, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import { createPinia, setActivePinia } from 'pinia'
import { nextTick } from 'vue'
import AppToast from './AppToast.vue'
import { useNotificationsStore } from '@/stores/notifications.store'
describe('AppToast', () => {
function... |
66b60571beb16d2304354c4fb998b36963b617aa2626d9ade5064bec1157fc9e | TypeScript | 2,366 | 82 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount } from '@vue/test-utils'
import RegisterView from './RegisterView.vue'
const mocked = vi.hoisted(() => ({
push: vi.fn(),
register: vi.fn(),
authStore: {
isLoading: false,
register: vi.fn(),
},
}))
vi.mock('vue-router', () => ... |
e2f9f94532638fef046d10544f3a25019a167470aa446e95154858bef01efe64 | TypeScript | 2,403 | 81 | import { getContext, setContext } from 'svelte';
import { IsMobile } from '$lib/hooks/is-mobile.svelte';
import { SIDEBAR_KEYBOARD_SHORTCUT } from './constants';
type Getter<T> = () => T;
export type SidebarStateProps = {
/**
* A getter function that returns the current open state of the sidebar.
* We use a... |
339544a1736c58f5fa314272f0f0c3e395bb3017b499ef8d3dbdb68b48aebed0 | TypeScript | 2,440 | 78 | /**
* Lightweight typed key-value wrapper around IndexedDB.
*
* Each instance manages a single object store within a named database.
* Values can be any structured-cloneable type (objects, Blobs, ArrayBuffers, etc.).
*/
export class IDBKeyVal<T> {
readonly #dbName: string;
readonly #storeName: string;
#db: I... |
cab5e4a7047e265c3c4aca32d21ec1bf6554c98cc439073cc95c87f11d7babee | TypeScript | 2,488 | 104 | import { SvelteSet } from 'svelte/reactivity';
export interface MultiSelect<K> {
/** The set of selected keys. */
readonly selection: SvelteSet<K>;
/** The last-clicked key (drives detail/preview views). */
readonly focused: K | null;
/** Number of selected items. */
readonly size: number;
/** Plain clic... |
f15542560f6a78595433321274072dccea53b270543d6a63dc64ae5fe3687a72 | TypeScript | 2,507 | 64 | import type { HALConfig, ImagingProtocol } from './types';
/** Canonical sort order for device roles in visualizations and listings. */
export const ROLE_ORDER = {
camera: 0,
laser: 1,
filter: 2,
aux: 3,
stage: 4,
routing: 5,
waveform: 6,
other: 7
} as const;
/** A device's configured purpose in an in... |
0cf539fe47b39f5437ff04f78f8e1d6b5e83b7663893e6f1f901227471da2fcb | TypeScript | 2,512 | 81 | import assert from 'node:assert/strict';
import { test } from 'node:test';
import { AutoScroll, edgeSpeed } from './auto-scroll.ts';
test('edge zones accelerate toward either edge and allow bounded overshoot', () => {
assert.equal(edgeSpeed(200, 100, 300), 0);
assert.ok(edgeSpeed(120, 100, 300) < edgeSpeed(140, 1... |
21b5cc61a9963679cb040b424320738a0077fe7beb9b17a552cabd69afa461d7 | TypeScript | 2,526 | 92 | import { backendClient } from './client'
interface BackendUser {
id?: string
email?: string
firstName?: string
lastName?: string
}
export interface BackendMessage {
id: number
sender?: BackendUser | null
receivers?: BackendUser[]
title?: string
message?: string
posted?: string
postedDate?: strin... |
def7484d89a40dd1e94360bbf1edf63fa032bac0fab5cdacf9daf1d8206167a9 | TypeScript | 2,529 | 90 | import { ref } from 'vue'
import { defineStore } from 'pinia'
import { workflowsApi } from '@/api/workflows.api'
import { useNotificationsStore } from '@/stores/notifications.store'
import type { Workflow, WorkflowLaunchPayload, WorkflowListParams } from '@/types/workflow.types'
export const useWorkflowsStore = define... |
5662215cf735f4cad39fa22108d9bda914b5f32e65f5c8e7f4fe4b698bcd8dd0 | TypeScript | 2,569 | 83 | import {
type InstrumentConfig,
type InstrumentDefaults,
type InstrumentInspection,
isLoaded,
type StationDiscovery,
type Violation
} from '$lib/model';
export type InstrumentKind = 'instrument' | 'template';
export type InstrumentSelection = { kind: InstrumentKind; name: string };
/** Normalized discove... |
fac9f5c0286cd258286e5c8edfbf1908d70f2a2395b8b719102e22f9565a6d19 | TypeScript | 2,576 | 86 | export interface Point {
x: number;
y: number;
}
/** Physical coordinates in micrometers. */
export interface Bounds {
minX: number;
minY: number;
maxX: number;
maxY: number;
}
export interface Orientation {
x: 1 | -1;
y: 1 | -1;
}
export interface Viewport {
cx: number;
cy: number;
scale: numb... |
99bdefcdaeb66716b9d820b95b0fdae608a17c81c622b4b6459c874d3987269e | TypeScript | 2,580 | 73 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { getRecentApplications, rememberRecentApplication } from './recentApplications'
describe('recentApplications utils', () => {
beforeEach(() => {
window.localStorage.clear()
vi.useFakeTimers()
vi.setSystemTime(new Date('2026-03-24T10:30:... |
63b38342d3b84f2e908fabd4a25f41df3d199c2f8dc84db7700bb1635508a044 | TypeScript | 2,599 | 72 | import type { Point } from './placement';
const EDGE = 48;
const MAX_SPEED = 600; // Pixels per second.
/** A bounded zone outside the viewport lets the pointer overshoot an edge. */
export function edgeSpeed(position: number, start: number, end: number): number {
if (end <= start || position < start - EDGE || posi... |
3b21c1c89122fac8137f12e29f4205e59b9e5bf88eafcf508f9b15ba8a3d2f7d | TypeScript | 2,630 | 86 | import { backendClient } from './client'
import type { RegisterPayload } from '@/types/auth.types'
import type { Group } from '@/types/group.types'
import type { ProfileUpdatePayload, ProfileUser } from '@/types/profile.types'
import type { UserSuggestion } from '@/types/user.types'
interface SignUpUserPayload {
id:... |
325041173db301137d72cfa9cd506332822f600e3fc6eeaa9c0575a2f997fe74 | TypeScript | 2,657 | 110 | import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { sessionApi } from '@/api/session.api'
import { usersApi } from '@/api/users.api'
import type { VipSession, LoginCredentials, RegisterPayload } from '@/types/auth.types'
import type { ProfileUser } from '@/types/profile.types'
export con... |
84f958e06771e6ddfcec666b3c13e931d69fa8187580c0f13b078374efeaa264 | TypeScript | 2,657 | 80 | export type SortableLayout = 'vertical' | 'horizontal' | 'flow';
export interface Point {
x: number;
y: number;
}
export interface Candidate<T> {
item: T;
rect: DOMRect;
}
export interface PlacementInput<T> {
pointer: Point;
centerOffset: Point;
candidates: Candidate<T>[];
}
function vertical<T>({ poi... |
07a504c50544b449b64652ea239089a79d363dd198cd7d7b0672512155cf67a6 | TypeScript | 2,708 | 103 | /**
* A coalescing undo/redo stack for UI operations.
*
* Supports tagged coalescing — rapid sequential edits with the same tag
* (e.g., dragging a slider) collapse into a single undo entry.
* A timestamp threshold (default 2s) determines when a new entry starts.
*/
interface UndoEntry {
label: string;
undo:... |
9ae621cff8082b0ebeec763283328bd81f2130b41ed8f4b037ad15785da79737 | TypeScript | 2,717 | 127 | export type WorkflowStatus =
| 'Running'
| 'Completed'
| 'Failed'
| 'Killed'
| 'Cleaned'
| 'Queued'
| 'Unknown'
export interface Workflow {
id: string
applicationName: string
applicationVersion: string
workflowName: string
status: WorkflowStatus
inputs: Record<string, {
values?: string[]
... |
1470256780e27364403b9e9da7ca797c3030bcbf05ad4bd73295f29d79247fd7 | TypeScript | 2,939 | 66 | /** Format a property value for display, respecting step precision. */
export function formatPropValue(value: unknown, step?: number | null): string {
if (value === undefined || value === null) return '—';
if (typeof value === 'boolean') return value ? 'true' : 'false';
if (typeof value === 'number') {
if (st... |
8a9d4235dd80c8f193a6b4c1ca5803247adfd7716b5f4d1a678bab24c145d513 | TypeScript | 2,977 | 110 | import process from 'node:process'
import { defineConfig, devices } from '@playwright/test'
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './e... |
446067dffdcf384beb2a0a547c6706955ec9f948dafcb7cf7fefe127871a8f87 | TypeScript | 3,114 | 74 | import { ElementSize } from 'runed';
let rootPx = $state(16);
if (typeof document !== 'undefined') {
const read = () => {
rootPx = parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
};
read();
new MutationObserver(read).observe(document.documentElement, { attributeFilter: ['style'] });... |
6c0043579a23963a421be3b524b14386891b9acd64a34e42d7896e5d10433acd | TypeScript | 3,370 | 128 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useAppVersionsStore } from './appversions.stores'
const mocked = vi.hoisted(() => ({
getAll: vi.fn(),
getAllForApplication: vi.fn(),
getByVersion: vi.fn(),
}))
vi.mock('@/api/appVersions.ap... |
1d96a87cdbed5371b04ee5b30df6994acc11ee5dfbd5cfcfe956d8e926817c90 | TypeScript | 3,436 | 108 | import axios from 'axios'
import { getBackendBase, getFrontendBase } from '@/utils/path'
const BASE_URL = import.meta.env.PROD ? getBackendBase() : ''
function readCookie(name: string): string | null {
const match = document.cookie.match(new RegExp(`(?:^|;\\s*)${name}=([^;]*)`))
return match?.[1] ? decodeURICompo... |
1fd9783ef65d733f4e69e6959950710dff96ed14abff564df55e221c7e37e5e3 | TypeScript | 3,449 | 117 | import { describe, expectTypeOf, it } from 'vitest'
import type { Application, ApplicationImportPayload, PrecisePage, VipGroup } from '@/types/application.types'
import type { AppVersion, BoutiquesDescriptor } from '@/types/appversion.types'
import type { LoginCredentials, VipSession, VipUserLevel } from '@/types/auth.... |
955c1424bcff91ea5e21405df2ec0abcde1974036c1e85a8726d73c040507639 | TypeScript | 3,564 | 125 | import { createRouter, createWebHistory } from 'vue-router'
import { getFrontendBase } from '@/utils/path'
import { useAuthStore } from '@/stores/auth.store'
const routerBase = import.meta.env.PROD ? (getFrontendBase() || import.meta.env.BASE_URL || '/') : import.meta.env.BASE_URL
const router = createRouter({
hist... |
e296760bab1e373e1e654505e28a71e11a413c83dbbdfc2e224afaa8f1a65857 | TypeScript | 3,624 | 133 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount, flushPromises } from '@vue/test-utils'
import ApplicationDetailView from './ApplicationDetailView.vue'
const mocked = vi.hoisted(() => ({
route: {
params: {
name: 'freesurfer',
},
},
getApplication: vi.fn(),
fetchAppVer... |
50743594a325ab0616c25cc2954dee3feaead57e8599e56dac89cd1fabb57e1a | TypeScript | 3,715 | 111 | import { getContext, setContext } from 'svelte';
import { SvelteMap } from 'svelte/reactivity';
import { stationWindowName } from '$lib/app-windows';
import { Client, errorMessage, type StationDiscovery, type StationFeedView, type StationInfo } from '$lib/model';
export interface AcquiredStationWindow {
ref: Window... |
3ad1b175bd6bfb597b8e867f902af3fd4ccb48ead1fd034e026fe8d1ef656b3f | TypeScript | 3,919 | 143 | import { beforeEach, describe, expect, it, vi } from 'vitest'
const mocked = vi.hoisted(() => {
return {
guard: null as null | ((to: any) => Promise<unknown> | unknown),
createWebHistory: vi.fn(() => ({ type: 'history' })),
createRouter: vi.fn((config: any) => {
return {
options: config,
... |
a55c87b2689a8e61ba7061f3e8e5a67db590a637b1c279a7b9fc1aa8f803ceca | TypeScript | 4,222 | 129 | import { backendClient } from './client'
import type { AppVersion } from '@/types/appversion.types'
import type { BoutiquesDescriptor } from '@/types/appversion.types'
import type { PrecisePage } from '@/types/application.types'
import type { Tag } from '@/types/tag.types'
export interface BackendAppVersion {
applic... |
bcbec623485d2b610512d5cf58854d203b2c46005af5c3b0c3668840d93e33c3 | TypeScript | 4,386 | 150 | import { ref, type Ref } from 'vue'
import type { ParsedInput, ParsedInputType } from '@/utils/boutiquesDescriptor'
import type { FormValue } from '@/composables/useBoutiquesLaunchForm'
type SubmissionInputValue = {
instanceId: string
value: unknown
}
export function useDuplicatedLaunchInputs(
inputParams: Ref<... |
4564cd5cd8c028044dfc2f9c10124fcef09ca7f729d9de81f5ebba629f21b01e | TypeScript | 4,434 | 142 | import { ref } from 'vue'
import { defineStore } from 'pinia'
import { messagesApi, type BackendMessage } from '@/api/messages.api'
import { workflowsApi } from '@/api/workflows.api'
import type { Notification, DashboardNotification } from '@/types/notification.types'
import type { Workflow, WorkflowStatus } from '@/ty... |
e9b5976f1658727e825ffa685ff618067ea738606784879f8b88d27cd322ad1d | TypeScript | 4,467 | 160 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useAuthStore } from './auth.store'
const mocked = vi.hoisted(() => ({
getSession: vi.fn(),
login: vi.fn(),
logout: vi.fn(),
register: vi.fn(),
me: vi.fn(),
}))
vi.mock('@/api/session.ap... |
08578c4d601fae9219d95b1c7a4f841b12ac2d025f2d426344ee5ce11277d610 | TypeScript | 4,476 | 120 | import type { AcquisitionTask, Bounds, Point2D, XYDefinition } from './types';
export interface RegionBounds {
minX: number;
minY: number;
maxX: number;
maxY: number;
}
/** Return the conservative FOV used to space positions for the selected profiles. */
export function planningFov(
profileFovs: Readonly<Re... |
d79238a97a61896448b27896613d87c7c767295e1f12c344ec57107c9eaf729d | TypeScript | 4,480 | 163 | import { tick } from 'svelte';
import { pref } from '$lib/utils';
// ── Registry ─────────────────────────────────────────────────────────
const registry = [
{
id: 'base',
name: 'Default',
swatches: {
light: ['#e5e3de', '#efede8', '#3183d8', '#22c55e'],
dark: ['#191919', '#262626', '#3183d8... |
69de1f5a443ed850f86342b94d76a3133b05a1eab1bc78972730b0c25576c8f2 | TypeScript | 4,647 | 155 | /**
* Lightweight keyboard shortcut utilities.
* API mirrors @tanstack/svelte-hotkeys for future drop-in replacement.
*
* - `createHotkey(keys, callback)` — global shortcut (window-level)
* - `createHotkeyAttachment(keys, callback)` — element-scoped (Svelte 5 attachment)
*
* Key format: "Mod+Z", "Mod+Shift+Z", "... |
8359861bfba2bffe788ffe88421930b86076c756085c8bd324236d6ea971349b | TypeScript | 4,815 | 185 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { createPinia, setActivePinia } from 'pinia'
import { useApplicationsStore } from './applications.store'
const mocked = vi.hoisted(() => ({
getAll: vi.fn(),
getById: vi.fn(),
}))
vi.mock('@/api/applications.api', () => ({
applicationsApi: {
... |
6a24f11ca6e4d11c763c46041d7cef65df96ccf5ef30271e1b41d7a4a72b5842 | TypeScript | 4,819 | 176 | import { describe, expect, it } from 'vitest'
import { parseDescriptorForm, parseDescriptorInputs } from './boutiquesDescriptor'
describe('boutiquesDescriptor utils', () => {
it('returns empty form for null or invalid json descriptor', () => {
expect(parseDescriptorForm(null)).toEqual({ inputs: [], groups: [] })... |
9c5fdf8ac1c66e9c02d6460c64c18a9b3f5d41bfd75a7d0f3e2f07ab827ebea8 | TypeScript | 4,867 | 169 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount, flushPromises } from '@vue/test-utils'
import ApplicationsView from './ApplicationsView.vue'
const mocked = vi.hoisted(() => ({
applicationsStore: {
filteredApplications: [] as Array<{
name: string
fullName: string | null
... |
6f68834182c132782b5ec5f479901b23569f0f5ebbd513d09dd6c88b7a4e10e6 | TypeScript | 4,931 | 179 | import type { Group } from '@/types/group.types'
import type { Resource } from '@/types/resource.types'
import type { Tag } from '@/types/tag.types'
export type ParsedDescriptorIdentity = {
name: string
version: string
}
export type ResourceInput = {
name: string
configuration: string
status: boolean
}
exp... |
ef3e3d47ad3c3e94e8d18d9cdf9a52e60bf92a62fd49e6ec969a48d0fa0264d0 | TypeScript | 4,970 | 130 | export type Axis3 = 'x' | 'y' | 'z';
const AXES3: Axis3[] = ['x', 'y', 'z'];
interface AxisPose {
screen: { x: number; y: number }; // +axis direction on screen (magnitude = relative length; canvas y is down)
face: { perp: Axis3; at: 0 | 1 }; // the box face a thumb rides on: ⟂ `perp` at `at`, spanning the third a... |
39f99cee6c0920822d80a13300f16ab57d35d0fb0c070991e9bdeb1bdc81e348 | TypeScript | 5,004 | 179 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount, flushPromises } from '@vue/test-utils'
import type { AppVersion } from '@/types/appversion.types'
import type { Application } from '@/types/application.types'
import ApplicationLaunchView from './ApplicationLaunchView.vue'
const mocked = vi.... |
bcfedf2cc33fa1a88ea0ad25a5a94bfb8adf38d808b2eeaf931e85b085b5d398 | TypeScript | 5,764 | 176 | export type ParsedInputType = 'File' | 'String' | 'Number' | 'Boolean'
export type ParsedInput = {
id: string
name: string
type: ParsedInputType
description: string
required: boolean
defaultValue?: string
possibleValues?: string[]
integer: boolean
minimum?: number
maximum?: number
exclusiveMinimu... |
90790206d4d1b7ce491b74e02f0dfe1e671ee832de6b6ba75ed10bf03ffb55c3 | TypeScript | 5,775 | 185 | import { describe, expect, it } from 'vitest'
import {
addCustomTag,
buildGroupSelectionItems,
buildResourceSelectionItems,
filterSelectableGroupNames,
normalizeResources,
parseBoutiquesIdentity,
toAppVersionTagsPayload,
toAppVersionResourcesPayload,
toApplicationGroupsPayload,
toggleItemSelection,
... |
646050a74807c19d2c79adde8b543f8c188cffa9f6da96c62c9773de4e337437 | TypeScript | 5,910 | 208 | import { backendClient } from './client'
export interface BackendData {
name: string;
type: string;
length: number;
modificationDate: string;
replicas: string[];
permissions: string;
}
interface RawBackendData {
name?: unknown
type?: unknown
length?: unknown
modificationDate?: unknown
replicas?:... |
666b7a4c93d0757b3bd73374be2dd2b9cfe18016609f78ed43af28085669f208 | TypeScript | 6,017 | 104 | // Lucide Icons
export { default as BoxSelect } from '~icons/lucide/box-select';
export { default as ChevronsUpDown } from '~icons/lucide/chevrons-up-down';
export { default as CircleDashed } from '~icons/lucide/circle-dashed';
export { default as Crosshair } from '~icons/lucide/crosshair';
export { default as Ellipsis... |
b070bd8306a01db2bc782f7e562759f309410111946a34a300901b960be2f6e6 | TypeScript | 6,361 | 183 | import {
assignDeviceRoles,
type DeviceConfig,
type DeviceRole,
type HALConfig,
type ImagingProtocol
} from '$lib/model';
interface DeviceReference {
deviceId: string;
path: string;
}
export interface DeviceTopologyEntry {
role: DeviceRole;
roleIndex: number;
nodeId: string | null;
dependencies:... |
ab4d99ef5901dc5c7949379abf64f5b1cb024d22f17f36e040260ee37498b2dc | TypeScript | 7,213 | 227 | /// <reference lib="webworker" />
import {
type DecodedPreviewFrame,
type ParsedPreviewPacket,
parsePreviewPacket,
PREVIEW_PROTOCOL_VERSION,
type PreviewWorkerCommand,
type PreviewWorkerEvent
} from './protocol';
const scope = self as DedicatedWorkerGlobalScope;
const HISTOGRAM_BINS = 1024;
const MAX_HIST... |
07a85968786da4e06e2ddfbea697c2906bf0afb14da4501814385095d4c03622 | TypeScript | 7,487 | 209 | import { getContext, setContext } from 'svelte';
import { SvelteMap } from 'svelte/reactivity';
import { AutoScroll } from './auto-scroll';
import { insertionIndex, type Point, type SortableLayout } from './placement';
const CTX = Symbol('sortable2');
export class SortableState<T> {
items = $state<T[]>([]);
key:... |
da706a926314754ce662a52df270592702a32cbb69111d9bdd323287f22294f9 | TypeScript | 7,801 | 196 | import { decodeMsgpack } from '$lib/utils/msgpack';
const PREFIX_BYTES = 9;
const MAX_HEADER_BYTES = 64 * 1024;
export const PREVIEW_PROTOCOL_VERSION = 1;
const SOURCE_PROTOCOL_VERSION = 1;
export const PREVIEW_ENCODING = 'u16-zstd-byte-shuffle-v1' as const;
export type PreviewLayer = 'overview' | 'viewport';
export... |
8ea0bfa354f6b3ab8e3da897ab7f4128559ffc4e658369736ded751d4c756c15 | TypeScript | 7,914 | 213 | import { describe, expect, it, vi } from 'vitest'
import { ref } from 'vue'
import { useDuplicatedLaunchInputs } from './useDuplicatedLaunchInputs'
import type { ParsedInput } from '@/utils/boutiquesDescriptor'
import type { FormValue } from '@/composables/useBoutiquesLaunchForm'
function makeInput(overrides: Partial<... |
54e39458f10f5dbf66f9f8f9eb57778019dcbc130966f5a2f1a626859209cb89 | TypeScript | 8,485 | 291 | import { beforeEach, describe, expect, it, vi } from 'vitest'
import { mount, flushPromises } from '@vue/test-utils'
import { createPinia } from 'pinia'
import CreateApplicationView from './CreateApplicationView.vue'
const mocked = vi.hoisted(() => ({
push: vi.fn(),
notifySuccess: vi.fn(),
tagsGetAll: vi.fn(),
... |
e493565acf75fbf71726e2e5c41dc2a19de338d47c737e262f21563517981171 | TypeScript | 8,555 | 283 | import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { messagesApi, type BackendGroupMessage, type BackendMessage } from '@/api/messages.api'
import { groupsApi } from '@/api/groups.api'
import { useAuthStore } from '@/stores/auth.store'
import { useNotificationsStore } from '@/stores/notifica... |
adc57b2cefcb585fba11a9ff00020d501cdbd0f7f979f2846bf61b981093fa6f | TypeScript | 8,590 | 256 | /** Station-scoped REST plus the reliable, complete-view Station WebSocket. */
import { SvelteSet, SvelteURL } from 'svelte/reactivity';
import { decodeMsgpack, encodeMsgpack } from '$lib/utils/msgpack';
import type { PreviewViewportUpdate, StationFeedView } from './types';
export type ConnectionState = 'idle' | 'co... |
5c48ee8610becdaf4926c31e1ac6eb05d8c153546fc59a8ad3aba095be1d94bc | TypeScript | 8,878 | 293 | import { computed, ref, type Ref } from 'vue'
import type { AppVersion } from '@/types/appversion.types'
import { parseDescriptorForm, type ParsedGroup, type ParsedInput } from '@/utils/boutiquesDescriptor'
export type FormValue = string | number | boolean | File | null
export function useBoutiquesLaunchForm(selected... |
378a7319be0f2925a654d2f56c19f566dcd2f264194e3ba468593e4a3119b6b6 | TypeScript | 9,310 | 287 | import { describe, expect, it } from 'vitest'
import { ref } from 'vue'
import type { AppVersion } from '@/types/appversion.types'
import { useBoutiquesLaunchForm } from './useBoutiquesLaunchForm'
import type { ParsedInput } from '@/utils/boutiquesDescriptor'
function createVersionFromDescriptor(descriptorObject: unkn... |
6eb1af41d503b2ded5a4a0e49bc332bcd380e726121a620ef8a4ed370dbcea86 | TypeScript | 10,211 | 256 | import type { DeviceRole } from '$lib/model/device-role';
import { themes } from '$lib/themes/manager.svelte';
/**
* Validates if a string is a valid hex color code.
*
* @example
* isValidHex("#ff00ff") // true
* isValidHex("#f0f") // true
* isValidHex("ff00ff") // false (missing #)
*/
export function isValidHe... |
f3f415d51df080575c1ab3cdf1c543c94b0a3c8a7936dc9a627eb541e7b942e4 | TypeScript | 11,526 | 289 | import { SvelteMap, SvelteSet } from 'svelte/reactivity';
import { IDBKeyVal } from '$lib/utils/idb';
import { InpaintRaster, type PatchDraw, type StageRect } from './inpaint-raster';
const TARGET_PX_PER_FOV = 2048 * 2; // mosaic cap resolution: µm/px = fovWidth / this
/** A live-painted per-channel MIP map in stag... |
a7fc18db9cf7468ba66e3a066324ba925462f2ae99acf3a62629d3f3828a0f60 | TypeScript | 12,113 | 353 | import { SvelteMap, SvelteSet } from 'svelte/reactivity';
import { IDBKeyVal } from '$lib/utils/idb';
export interface SnapshotChannel {
label: string;
colormap: string | null;
levelsMin: number;
levelsMax: number;
detection?: {
deviceId: string;
exposureTime?: number;
resolution?: { x: number; ... |
79a024ac61f54d013bd483f5bd7629a666a831ac0e782895b5a62fb6945551d7 | TypeScript | 13,212 | 347 | import { IDBKeyVal } from '$lib/utils/idb';
/** A rectangle in absolute stage micrometers (min-corner + size). */
export interface StageRect {
x: number;
y: number;
w: number;
h: number;
}
/** A mosaic's fixed geometry: cap-level resolution + the stage extent the overview spans. */
export interface RasterGeom... |
ca99c52c219a12b9f501a46c6b7985d99596bb7eac8c3efc0f45ffd88ee62ec2 | TypeScript | 13,286 | 398 | import type { DerivedWaveform, DeviceRole, Waveform } from '$lib/model';
export type GroupMode = 'related' | 'device-type' | 'channel';
export interface WaveformGroup {
id: string;
label: string;
waveformIds: string[];
}
export interface ChannelGroup {
id: string;
label: string;
deviceIds: string[];
}
i... |
77ec2298b11db1f5fd0145ce9c0ff2bf1e13dcb7a3060ff55255b53a1fe3477f | TypeScript | 17,829 | 482 | /** App-level store (`VoxelApp`) + the active-instrument store (`Instrument`) and its device handles. */
import { SvelteMap } from 'svelte/reactivity';
import { wavelengthToColor } from '$lib/colors.svelte';
import { toastError } from '$lib/utils';
import { parseVec2D, type Vec2D } from '$lib/utils/vec';
import { Cli... |
c658294d138b018b84cf765fbb5bd0c64df7e06e73e6525419a2ce774f812884 | TypeScript | 18,902 | 533 | import type { ColormapCatalog, PreviewViewport } from '$lib/model/types';
import { getWebGPUDevice } from '$lib/utils/wgpu';
import PREVIEW_SHADER from './preview.wgsl?raw';
import type { DecodedPreviewFrame, PreviewSourceHeader } from './protocol';
const PREVIEW_UNIFORM_FLOATS = 36;
const PREVIEW_UNIFORM_BYTES = PRE... |
9faf1784378a50ed4d7174e35b303440ba40ddac22bc60b64de8ced055cda1a6 | TypeScript | 20,198 | 730 | /** TypeScript models mirroring the Voxel API wire types. */
import type { PropertyInfo, PropSnapshot } from './prop.svelte';
/** A device's construction recipe: target class + init kwargs. */
export interface DeviceConfig {
target: string;
init?: Record<string, unknown>;
defaults?: Record<string, unknown> | nul... |
438e7d702ac6fd748370ac489f0e67e20d9c0791a0b583e8f145cf34cc52ed65 | TypeScript | 21,204 | 605 | import type { Attachment } from 'svelte/attachments';
import { SvelteSet } from 'svelte/reactivity';
/**
* Shared coordinator for N models linked together. Each member holds a back-reference via
* its own `group` field; mutation goes exclusively through this class so the back-references
* stay in sync. When linked,... |
897da54db2ca82b96560e0be25b15b0ab32a48f5cb17168160869eec00b4c04a | TypeScript | 25,428 | 657 | import { getContext, setContext } from 'svelte';
import { SvelteMap } from 'svelte/reactivity';
import { emissionToPreviewColor, isValidHex } from '$lib/colors.svelte';
import {
AUTO_COLORMAP,
type ChannelConfig,
type ColormapCatalog,
type DetectionAssemblyConfig,
type InstrumentStatus,
type PreviewViewpor... |
027f20b9df083bdc34cabdb063b8cb32164dcc150342052c8ff4faf5512aad31 | TypeScript | 41,643 | 1,079 | /** App-level store (`VoxelApp`) + the active-instrument store (`Instrument`) and its device handles. */
import { getContext, setContext } from 'svelte';
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
import { browser } from '$app/environment';
import { assignDeviceRoles, type DeviceRoleAssignment } from '$... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.