sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
acd957e43d09e3b8c992c8dae5a3a3d6d9df9c26af669688077d3f63bc3e9b35
TypeScript
387
14
import { InjectionToken } from "@angular/core" interface IScrnShot{ x: number y: number width: number height: number } /** * if param is not provided, screenshot entire screen */ export type TypeHandleScrnShotPromise = (param?: IScrnShot) => Promise<{ revoke: () => void, url: string }> export const HANDLE_S...
7fdc2e01c167b99f968e62105972ec8beaf29b5f77006f00eab45e93a2ce4c0b
TypeScript
389
20
import Streamer from './streamer' /** * Provides a streamer interface for a string. * Used in unit tests */ class StringStreamer extends Streamer { get type () { return 'string' } get __srcName () { return 'str' } // _chunk (start, end) { // return this.data.substr(start, end) // } _read() { r...
d239be4220cced0156d0c262e0bab9ae8722b6b41ca645247338e99b795ac5df
TypeScript
389
12
/** * Mock rehype-raw for tests. * * rehype-raw is an ESM-only package used by react-markdown to parse raw HTML in markdown. * Since we mock react-markdown in tests, we also need to mock this plugin to prevent * parsing errors. * * This mock provides a no-op plugin that satisfies the import without any functiona...
fd73a5fad613f0b3f30581533401dbeecaf68490aa90dc2214f5ef7746a94696
TypeScript
389
18
import { Directive } from "@angular/core"; import { Observable } from "rxjs"; import { IUser, AuthService } from './auth.service' @Directive({ selector: '[iav-auth-auth-state]', exportAs: 'iavAuthAuthState' }) export class AuthStateDdirective{ public user$: Observable<IUser> constructor( private authServ...
65c7b2f1958a1d1921d3ebac65d1f0982f30927fcd35c52f131e6b5d770b069b
TypeScript
390
15
import { ChangeDetectionStrategy, Component, Input } from "@angular/core"; @Component({ selector: 'iav-layout-fourcorners', templateUrl: './fourCorners.template.html', styleUrls: [ './fourCorners.style.css' ], changeDetection: ChangeDetectionStrategy.OnPush }) export class FourCornersCmp{ @Input('iav-...
943dc103ff4173f15ac7fae7ab7c4187b91ca6ec887789378b312dc5da954b0e
TypeScript
394
12
import { addons, types } from "storybook/manager-api"; import { ADDON_ID, TOOL_ID } from "./constants"; import { ThemeTool } from "./theme-toggle"; addons.register(ADDON_ID, () => { addons.add(TOOL_ID, { type: types.TOOL, title: "Toggle Theme", match: ({ tabId, viewMode }: any) => !tabId && (viewMode ===...
ca44b2c6118505e6f57c72f94b652793c717b20f4efd432b5bf57c3df45fd834
TypeScript
398
8
export { VectorShape } from "./VectorShape"; export { GhostLine } from "./GhostLine"; export { VectorPoints } from "./VectorPoints"; export { ProxyNodes } from "./ProxyNodes"; export { VectorTransformer } from "./VectorTransformer"; export { ControlPoints } from "./ControlPoints"; export { GhostPoint, type GhostPointRe...
1469c592561511cb1170599f29cf4eb56de10a8b10f5048c42b6b4fd93bc71dc
TypeScript
399
14
/** * @file Entitytype Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by entity type */ declare class EntitytypeColormaker extends Colormaker { atomColor(a: AtomProxy): 8374655 | 16...
966da72cfda5fc14c39b1d77904992fc163365a1e261fe0014a4c1cee52ccf13
TypeScript
399
16
/** * @file Contact Store * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Store, { StoreField } from './store'; /** * Bond store */ export default class ContactStore extends Store { index1: Uint32Array; index2: Uint32Array; type: Uint8Array; get _defaultFields(): StoreF...
cd5361dee4cb18247975d41eb0263906c04c808694615aded67ed38aba1e9a2d
TypeScript
402
9
const STORAGE_URI_REGEX = /(["'])((s3|gs|azure-spi|azure-blob|dbx):\/\/[^"']+)\1/g; /** Replace cloud storage URIs with presigned resolve proxy URLs. */ export function presignUrls(text: string, taskId: number): string { if (!taskId) return text; return text.replace(STORAGE_URI_REGEX, (_match, quote, url) => { ...
054cd7870194592c390d228e6971d2dc2df55995aa774bc105d9ede8a1f4b668
TypeScript
404
14
export const Modals = { get warning() { return cy.get(".ant-modal.ant-modal-confirm-warning"); }, hasWarning(text) { this.warning.should("be.visible"); this.warning.contains("Warning").should("be.visible"); this.warning.contains(text).should("be.visible"); this.warning.contains("OK").should("b...
85be55e8b911637e49252f84cbb7e3ca200d9ff5cd61034cbcb5ba99839d0c1a
TypeScript
404
20
import { atlasAppearance } from "src/state" export interface IAuxMesh { ['@id']: string name: string displayName?: string ngId: string labelIndicies: number[] rgb: [number, number, number] visible: boolean } export interface INehubaFeature { layers: atlasAppearance.const.NgLayerCustomLayer[] panelM...
f05a2d99d59603883a3003ea1ae28133d7443369f0f44f5da1c8abb151a2b589
TypeScript
405
16
import { InjectionToken } from "@angular/core" const PLUGIN_SRC_KEY = "x-plugin-portal-src" export function setPluginSrc(src: string, record: Record<string, unknown> = {}){ return { ...record, [PLUGIN_SRC_KEY]: src } } export function getPluginSrc(record: Record<string, string> = {}){ return record[PLU...
77794d4ce9c1b850fab5788830bf8b8744012a99a03a6dad4b7d4c5e3fa1d8dd
TypeScript
406
22
/** * @file Model Store * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Store, { StoreField } from './store' /** * Model store */ export default class ModelStore extends Store { chainOffset: Uint32Array chainCount: Uint32Array get _defaultFields () { return [ [ 'chainO...
2d1856a8d8aaccada04987675097fe5acb715e31450f9915001e7287cbea0ce8
TypeScript
408
15
import { CURRENT_FLAGS } from "../../feature-flags"; import "@heartex/ls-test/cypress/support/e2e"; before(() => { cy.window().then((win) => { Object.assign(win, { APP_SETTINGS: { ...(win.APP_SETTINGS ?? {}), feature_flags: CURRENT_FLAGS, }, }); cy.log("Default Feature Flags s...
4e22abbdd4b84ebf2736e347ac6899ceedd5b360165aacb894dd64d79d9370c6
TypeScript
408
13
import { ChangeDetectionStrategy, Component } from "@angular/core" import { PureATPSelectorDirective } from "../pureATP.directive" @Component({ selector: 'sxplr-pure-atp-selector', templateUrl: `./pureATPSelector.template.html`, styleUrls: [ `./pureATPSelector.style.scss` ], changeDetection: ChangeDetect...
c57495e98b4d8c0d0c9f59ea7041e358d5bb610f6771b053ba689b01ba4f7259
TypeScript
408
13
import { Pipe, PipeTransform } from "@angular/core"; import { IAnnotationGeometry } from "./tools/type"; @Pipe({ name: 'annotationVisiblePipe', pure: true }) export class AnnotationVisiblePipe implements PipeTransform{ public transform(hiddenAnns: IAnnotationGeometry[]|null, thisAnn: IAnnotationGeometry): boole...
976f4fc3f7b281e46b3596310e983237e8f60019688e338a2899f19b115617c8
TypeScript
409
11
import {History} from 'history'; export function useQueryParams(history: History, set: (p: URLSearchParams) => void): () => void { return () => { // make sure we return the clean-up func to prevent memory leak warnings return history.listen(newLocation => { const newQueryParams = new UR...
29a4adb89a60c14cc472d982590e6973b627a637d4b946d20c4034446b266406
TypeScript
410
21
/** * @file Contour Buffer * @author Fred ludlow <fred.ludlow@gmail.com> * @private */ import '../shader/Line.vert' import '../shader/Line.frag' import Buffer from './buffer' /** * Contour buffer. A buffer that draws lines (instead of triangle meshes). */ class ContourBuffer extends Buffer { isLine = true ...
3271094db9647b73e2bf54f754b752502ba0c07803d52a0473800fd65c5c12c2
TypeScript
410
10
declare let SYSTEM_INFO: {version: string}; declare module 'swagger-ui-react/swagger-ui.css'; // TODO: remove this once we've updated to TS v5.1+ (c.f. https://github.com/microsoft/TypeScript/issues/49231#issuecomment-1137251612) declare namespace Intl { type Key = 'calendar' | 'collation' | 'currency' | 'numberi...
94c0feb5aa2e493b2c12f3774e78015a90806241577802a4fd55920199babc34
TypeScript
410
13
/** * @file Trajectory Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Parser, { ParserParameters } from './parser'; import Streamer from '../streamer/streamer'; declare class TrajectoryParser extends Parser { constructor(streamer: Streamer, params?: Partial<ParserParameters>)...
69d63a8e04a9e5154414fd49838db96eb1ad6b8eeb021311069c436903492ad6
TypeScript
412
14
/** * @file Text Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Parser, { ParserParameters } from './parser'; import Streamer from '../streamer/streamer'; declare class TextParser extends Parser { constructor(streamer: Streamer, params?: Partial<ParserParameters>); get ty...
16e397d898a816af337275d7a0124741ed6b1fc3976ce23af9a40b6ac27f634a
TypeScript
414
18
/** * @file Parse Xml * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ export declare type XMLNodeAttributes = { [k: string]: any; }; export interface XMLNode { name?: string; content?: string; attributes: XMLNodeAttributes; children?: XMLNode[]; } export declare function par...
5edd2a1410ea13424f95de797816496243a6cc1c4c5dc83c77e5c8d5902be563
TypeScript
414
19
/** * @file Script Loader * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Loader from './loader'; import Script from '../script'; /** * Script loader class * @extends Loader */ declare class ScriptLoader extends Loader { /** * Load script * @return {Promise} resolves to ...
7b5e1c7e90f218437e068abcbe0a500a94e1a293408b655458e02443a2a95df3
TypeScript
414
11
export * from './events'; export * from './info'; export * from './labels'; export * from './workflows'; export * from './workflow-templates'; export * from './cron-workflows'; export * from './cluster-workflow-templates'; export * from './submit-opts'; export type {EventSource} from './event-source'; export type {Sens...
0782a2776d5744947177adf57df45aa267d7124b9c3c66cdb7b1118f99dde852
TypeScript
415
13
import {uiUrl} from './base'; export const getCookie = (name: string) => ( decodeURIComponent(document.cookie) .split(';') .map(x => x.trim()) .find(x => x.startsWith(name + '=')) || '' ).replace(/^.*="?(.*?)"?$/, '$1'); export function setCookie(name: string, value...
dc288fc2742f2f4568561fbe89d96ce710e213001811dafa99865bda0563c6a9
TypeScript
415
15
/** * @file Element Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker, { ColormakerParameters } from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by element */ declare class ElementColormaker extends Colormaker { constructor(params: C...
e316eef3bf57b2dfa7bebd9fdf8905863cd446e6b3f3eefa37fca302aecbafba
TypeScript
417
17
/** * @file Contour Buffer * @author Fred ludlow <fred.ludlow@gmail.com> * @private */ import '../shader/Line.vert'; import '../shader/Line.frag'; import Buffer from './buffer'; /** * Contour buffer. A buffer that draws lines (instead of triangle meshes). */ declare class ContourBuffer extends Buffer { isLine...
5a7c74b5fd110a548aea143c8ceaa153e13cd8a0320f29a21a1a5074114c049e
TypeScript
418
19
export { processTranscript } from './tracing.js'; export { isTracingEnabled, ensureInitialized, getEffectiveTracingConfig, resolveSettingsPath, } from './config.js'; export { createTracedQuery } from './tracedClaudeAgent.js'; export type { TranscriptEntry, MessageContent, ContentBlock, TextBlock, Tool...
65b1044ec1aa95ba610e2382996d5a88cc96f36213f145c4c11c1fc9b2034eb5
TypeScript
418
20
import { useEffect, useRef } from "react"; /** * Protects async tasks from causing memory leaks in other effects/callbacks. * Wrap any set states within a component with * * if (mounted.current) { ... } */ export const useMounted = () => { const mounted = useRef(true); useEffect(() => { mounted.current...
ed97b31aed20266edba729989e5ddf797eea149938c2e996080a812ad81dfd95
TypeScript
418
11
declare module "shallow-equal" { type primitives = string | number | boolean | bigint | undefined | symbol | null; export function shallowEqualArrays(arr1: primitives[], arr2: primitives[]); interface primitiveObject { [key: string]: primitives; } export function shallowEqualObjects(obj1: primitiveObject...
7d0ae134289b1395eda4e4d630089598cef2e612f4526859cdce392957185366
TypeScript
421
14
/** * @file Surface Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Parser, { ParserParameters } from './parser'; import Streamer from '../streamer/streamer'; declare class SurfaceParser extends Parser { constructor(streamer: Streamer, params?: Partial<ParserParameters>); ...
00b6e620427b8b110fa01e0df085e0a6caa2a3cae9ecfb88cf32aae0663479fa
TypeScript
423
18
import { NgModule } from "@angular/core"; import { StateAggregator } from "./stateAggregator.directive"; // TODO // perhaps this should be called StateUtilModule? // or alternatively, slowly move all state related components to this module? // urlutil should also be at least in this module folder @NgModule({ declar...
032300b105407cdb3ff109aa82340fa343a6f476883bc3c49e8c0eb8a3c1772a
TypeScript
423
18
import { Directive, HostListener } from "@angular/core"; import { MatBottomSheet } from 'src/sharedModules/angularMaterial.exports' import { ShareSheetComponent } from "./shareSheet/shareSheet.component" @Directive({ selector: `[sxplr-share-view]` }) export class ShareDirective{ constructor(private btmSht: MatBo...
496f96eda9a40c23b5200692959f4f6cb0f54be4c2781bdfd9edb88edbb61748
TypeScript
426
16
/** * @file Collection * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Component from './component'; import Element from './element'; declare class Collection<T extends (Component | Element)> { readonly list: T[]; constructor(list?: T[]); _remove(elm: T): void; get first(...
09a0931cb4bbb5b1cd6b44dc07a7ca48067e3c951667470bb30df255ec30f03a
TypeScript
429
14
/** * @file Moleculetype Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by molecule type */ declare class MoleculetypeColormaker extends Colormaker { atomColor(a: AtomProxy): 837465...
beb2c2e451ec355e65a5c3f636e43b84fb8d6afbaa3f306c7edc12e97631cbd0
TypeScript
429
19
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { AtlasDownloadDirective } from './atlas-download.directive'; import { AngularMaterialModule } from 'src/sharedModules'; @NgModule({ declarations: [ AtlasDownloadDirective ], imports: [ CommonModule, Ang...
73d5e9f1927c514881865c449ad4ed1459cf0c55c45f76c6fd2a29a893a1fb6b
TypeScript
433
17
/** * @file Dx Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import { Matrix4 } from 'three'; import VolumeParser from './volume-parser'; declare class DxParser extends VolumeParser { get type(): string; _parse(): void; parseHeaderLines(headerLines: string[]): { dat...
4b06f373f73dc56606aa51e58f11cca55ad86ea197e5bd1ece2b96dc963fef51
TypeScript
434
24
import { createReducer, on } from "@ngrx/store"; import * as actions from "./actions" export type Store = { selectedSurfaceVariant: string } export const defaultStore: Store = { selectedSurfaceVariant: null } export const reducer = createReducer( defaultStore, on( actions.selectSurfaceVariant, (stat...
71b9f7244801074120d359e4e0d8d3c2eb6aca769f8facc89e3cc7bc2b079ae1
TypeScript
434
14
export const magicWandConfig = ` <View> <Labels name="labels" toName="image"> <Label hotkey="1" value="Cloud" background="#1b32de" /> <Label hotkey="2" value="Shadow" background="#1EAE3B" /> </Labels> <MagicWand name="magicwand" toName="image" /> <Image name="image" value="$image" zoomControl="true" zoo...
a5e30d886c343ea2212c2710b40886e9c6da15c4964f346921c92e1fc03bbd20
TypeScript
436
10
import { FF_SELF_SERVE, isActive } from "./feature-flags"; /** * More human-readable way to detect if we are on Starter Cloud plan. * The main distinction between Starter Cloud and SaaS + OnPrem is this flag in billing settings: * isEnterprise === false * Formerly known as isSelfServe * @returns {boolean} */ exp...
801550f030436c6b706ad3e6829ec6908ab569b6992dcf446822679f91a2fe79
TypeScript
437
17
/** * @file Adjacency List * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ export interface Edges { nodeArray1: ArrayLike<number>; nodeArray2: ArrayLike<number>; edgeCount: number; nodeCount: number; } export interface AdjacencyList { countArray: Uint8Array; offsetArray:...
bfdf74bd28d42ed5e1f0d4d4c6e00a4d333f796ca45f59bba0134671cef3f5f5
TypeScript
437
15
import { ComponentFactoryResolver, Directive, ViewContainerRef } from "@angular/core"; import { LeapSignal } from "./leapSignal/leapSignal.component"; @Directive({ selector: '[leap-control-view-ref]' }) export class LeapControlViewRef { constructor( private vcr: ViewContainerRef, private cfr: ComponentFact...
e7a8a8caa46a4d17f43c6829f32f2e6058b6d0465f51dc82d04d867a087b6665
TypeScript
439
8
export { default as Counter } from "./Counter/Counter"; export { default as Input } from "./Input/Input"; export { default as Label } from "./Label/Label"; export { default as MultiSelect } from "./MultiSelect/MultiSelect"; export { default as Select } from "./Select/Select"; export { default as TextArea } from "./Text...
13a3f7f21bf5d80f10c4dfd1f4b95da2bc6fecd30fc1eb9d271b33d1a6a886ef
TypeScript
443
22
import { Component, Inject, Optional } from "@angular/core"; import { Observable } from "rxjs"; import { TOS_OBS_INJECTION_TOKEN } from ".."; @Component({ selector: 'kgtos-component', templateUrl: './kgtos.template.html', styleUrls: [ './kgtos.style.css', ], }) export class KGToS { public kgTos$: Obser...
480f3f400ae65088fbf5df7dc5a6b9d58e864d3b90a30916fa34a3e563ce17c0
TypeScript
447
17
import * as kubernetes from 'argo-ui/src/models/kubernetes'; import {WorkflowTemplateSpec} from './workflow-templates'; export interface ClusterWorkflowTemplate { apiVersion?: string; kind?: string; metadata: kubernetes.ObjectMeta; spec: WorkflowTemplateSpec; } export interface ClusterWorkflowTemplat...
f1a9bc7977d1bbe9456ec5cb50ec97aec8272691148190d2beaabb065eb18b52
TypeScript
447
15
/** * @file Netcdf Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Parser, { ParserParameters } from './parser'; import Streamer from '../streamer/streamer'; declare class NetcdfParser extends Parser { constructor(streamer: Streamer, params?: Partial<ParserParameters>); ge...
67396a0804bdd0650cac01cd435805d4a0ef68e6dae2be4dec5226a741a4365b
TypeScript
448
14
/** * @file Validation Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import XmlParser, { XmlParserParameters } from './xml-parser'; import Streamer from '../streamer/streamer'; declare class ValidationParser extends XmlParser { constructor(streamer: Streamer, params?: Partial<XmlPa...
897e4f5065f9e2a0f2f5020174e33b0f69ec09baebe21952838d7e62d5f389d8
TypeScript
448
19
export interface SubmitOpts { entryPoint?: string; parameters?: string[]; labels?: string; // Artifacts to override for the workflow // Format: name=s3://bucket/key or name=gcs://bucket/key artifacts?: string[]; } export interface ResubmitOpts { parameters?: string[]; memoized?: boolean...
8591a79431c184978ed3a589ab7d061b4c6952075e8be777defc2396cbe824f6
TypeScript
450
15
/** * @file Msgpack Parser * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Parser, { ParserParameters } from './parser'; import Streamer from '../streamer/streamer'; declare class MsgpackParser extends Parser { constructor(streamer: Streamer, params?: Partial<ParserParameters>); ...
da44a071c5fe36ca7b222cad91a7122b3de68c1a4ad4d68a01d6106fa8948f6b
TypeScript
451
17
export { DateRangePicker } from "./date-range-picker"; export { DateRangePickerTrigger } from "./date-range-picker-trigger"; export type { DateOrDateTimeRange, DateOrDateTimeByNumbers, DateTimeRange, DateByNumbers, DateTimeByNumbers, Selected, Side, Field, Meridian, FormDateValues, FormDateTimeVal...
e6f3d97ee5509af5f18a14d5764cd085c46b78f45cd606e55e469f0bb11ce695
TypeScript
453
15
/** * Shared column header labels used in both the ChartTable UI * and CSV export functions. Define labels here to keep them * consistent across table display and downloads. */ export const COLUMN_LABELS = { date: 'Date', modelBuilds: 'Asset builds', modelReused: 'Reused assets', runDuration: 'Run duration'...
17b9c12926a6a81e2f6a439c4ba1921b8a0a15e2c8b1f666fa39b3a9b0442782
TypeScript
455
20
import { Directive, HostListener } from "@angular/core"; import { TViewerEvtCtxData } from "src/viewerModule/viewer.interface"; import { ContextMenuService } from "./service"; @Directive({ selector: '[ctx-menu-dismiss]' }) export class DismissCtxMenuDirective{ @HostListener('click') onClickListener() { this...
df6d7026bf2f3121e5b3fb000659a9626d32ca953fefc92525b5fb49e87838c5
TypeScript
456
18
/** * @file Atom Map * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import AtomType from './atom-type'; import Structure from '../structure/structure'; declare class AtomMap { readonly structure: Structure; dict: { [k: string]: number; }; list: AtomType[]; construct...
4fbbbc965b0b81f4ed5d264bb55dc3fe2be60aae7b1ff7adbcd33efa5dc1224a
TypeScript
459
21
import { Directive, HostListener, Input } from "@angular/core"; import { ModularUserAnnotationToolService } from "../tools/service"; @Directive({ selector: '[annotation-switch]' }) export class AnnotationSwitch { @Input('annotation-switch-mode') mode: 'toggle' | 'off' | 'on' = 'on' constructor( private s...
9dad6233f7cebd6353a52659b560ee59750f82442af45cb4a486083239abf940
TypeScript
460
22
class TableHelper { private get _baseRootSelector() { return ".ant-table-wrapper"; } private _rootSelector: string; constructor(rootSelector) { this._rootSelector = rootSelector.replace(/^&/, this._baseRootSelector); } get root() { return cy.get(this._rootSelector); } } const Table = new T...
3a312297ecc30298df9e6eebd0e8a50989380a231071e839277a4485f448cc3c
TypeScript
467
22
class RankerHelper { private get _baseRootSelector() { return ".htx-ranker-column"; } private _rootSelector: string; constructor(rootSelector) { this._rootSelector = rootSelector.replace(/^&/, this._baseRootSelector); } get root() { return cy.get(this._rootSelector); } } const Ranker = new...
246420b8d3b731af53f83958502f16b47bea213af12ef3716c61c0635d5d0817
TypeScript
471
20
import { Directive, HostListener, HostBinding } from "@angular/core"; import { FabSpeedDialService } from "./fabSpeedDial.service"; @Directive({ selector: '[iav-fab-speed-dial-trigger]', exportAs: 'iavFabSpeedDialTrigger' }) export class FabSpeedDialTrigger{ constructor(private fabService: FabSpeedDialService ...
5a74d69cbfb4098cca5cf8bbf0582179863101953c35455eb22a66907113b460
TypeScript
471
17
/** * @file Worker Pool * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Worker from './worker'; declare class WorkerPool { maxCount: number; pool: Worker[]; count: number; name: string; constructor(name: string, maxCount?: number); post(aMessage?: any, transferLis...
ac10a05003f84f0f6122d1e925bead0577aa7b2cf3ff12959db33506102c825c
TypeScript
471
22
import { CommonModule } from "@angular/common"; import { NgModule } from "@angular/core"; import { SingleFileOutput } from "./downloadSingleFile.directive"; import { ZipFilesOutput } from "./zipFilesOutput.directive"; @NgModule({ imports: [ CommonModule, ], declarations: [ ZipFilesOutput, SingleFileO...
de974e36a6dca17692d1621d31f4f79870ef223ca003a8540f936a2a0d01574f
TypeScript
473
15
import { Pipe, PipeTransform } from "@angular/core"; const defaultCompareFn = <T>(item: T, comparator: T): boolean => item === comparator @Pipe({ name: 'includes', }) export class IncludesPipe<T> implements PipeTransform { public transform(array: T[], item: T, compareFn: (a: T, b:T) => boolean = defaultCompareFn...
781a743bfe0e19bca04a5b2e3bdcb3a778eb466212e2e897434ea61d0a470f59
TypeScript
477
22
import { NgModule } from "@angular/core"; import { AddUnitAndJoin } from "./addUnitAndJoin.pipe"; import { EqualityPipe } from "./equality.pipe"; import { NumbersPipe } from "./numbers.pipe"; import { ParseDoiPipe } from "./parseDoi.pipe"; @NgModule({ declarations: [ EqualityPipe, ParseDoiPipe, NumbersPi...
98c80d7cbee99e18b3db860b9ef4284df48de74f649a4ecbe2f9af8297482cc9
TypeScript
477
16
/** * @file Occupancy Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker, { ColormakerParameters, ColormakerScale } from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by occupancy */ declare class OccupancyColormaker extends Colormaker { ...
7d31ee81db640ef48cb00b6cabb2f49233acf9b7320da0236366a6d449bbd288
TypeScript
480
21
import { createAction, props } from "@ngrx/store" import { nameSpace } from "./const" import { UnionAnnotation } from "./store" export const clearAllAnnotations = createAction( `${nameSpace} clearAllAnnotations` ) export const rmAnnotations = createAction( `${nameSpace} rmAnnotations`, props<{ annotations: ...
bde721e28c49c693bb97c7026daeb85f62dcbf5d83fa82fc30e06a61de605b85
TypeScript
480
13
import { FF_ECHO_466_TAXONOMY_ANTD_REMOVAL, FF_FIT_ANNOTATIONS_VERTICAL_LAYOUT, } from "@humansignal/core/lib/utils/feature-flags"; import * as FLAGS from "../../src/utils/feature-flags"; export const CURRENT_FLAGS = { [FF_ECHO_466_TAXONOMY_ANTD_REMOVAL]: true, [FF_FIT_ANNOTATIONS_VERTICAL_LAYOUT]: true, [FL...
d2eef0a2cf37548f56d05bc1d39601833082dcb7de4fda77557895e3993d4464
TypeScript
480
16
// Import modules import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { /* This component has no functionality and just serves as an outer-layer to contain and display all ot...
38ac1a41157e45e256b8e164f54cfdd8f26fd08e16feb3d33309c9a869b6e760
TypeScript
481
17
import { CURRENT_FLAGS } from "../feature-flags"; import "@humansignal/frontend-test/cypress/support/e2e"; beforeEach(() => { cy.on("window:before:load", (win) => { console.log("Setting feature flags", CURRENT_FLAGS); Object.assign(win, { DISABLE_DEFAULT_LSF_INIT: true, __LSF_INTEGRATION_TEST__: ...
1add786f9aa606aef70663d6a16b49e863849090611d0f52c8387dcbd698b215
TypeScript
482
15
import { type Dispatch, type SetStateAction, useEffect, useMemo, useState } from "react"; export const useValueTracker = <T>(value: T, defaultValue?: T): [T, Dispatch<SetStateAction<T>>] => { const initialValue = useMemo(() => { return (value ?? defaultValue ?? "") as T; }, [value, defaultValue]); const [fi...
6fbada85cf6263bf4157c8992ccc9e5d5654eedcefabf913fe83d58a566c1f42
TypeScript
483
15
import { Component, Input } from "@angular/core"; import { SapiViewsCoreRegionRegionBase } from "../region.base.directive"; @Component({ selector: 'sxplr-sapiviews-core-region-region-list-item', templateUrl: './region.listItem.template.html', styleUrls: [ `./region.listItem.style.css` ] }) export class Sa...
093abbadc497bb7d9127e47e560d8ea5fadb72ac9d68527d87ea933508de4deb
TypeScript
484
25
export const dataSimple = { text: "This text exists for testing purposes", }; export const configSimple = `<View> <Labels name="lbl" toName="text"> <Label value="Word1" /> <Label value="Word2" /> </Labels> <Text name="text" value="$text" inline="true"/> </View>`; export const resultSimple = { id: "r...
811f4283725d23b06007760e3b469f1b79d1f95503c7955d6bb24942c814a6c3
TypeScript
485
15
/** * Utility functions for preview components */ /** * Count the number of XML tags in a config string. * Uses a simple regex to count opening tags (excluding self-closing markers). */ export function countConfigTags(config: string): number { if (!config) return 0; // Match opening tags like <View, <Labels, ...
2fa8132af769cf80c7fc1cc66fe7769411dd2e0ad6586a4c38025fd2744aefb0
TypeScript
486
11
import Structure from './structure'; import SpatialHash from '../geometry/spatial-hash'; import { ValenceModel } from '../chemistry/valence-model'; export interface Data { structure: Structure; '@spatialLookup': SpatialHash | undefined; '@valenceModel': ValenceModel | undefined; } export declare function cr...
392a4ee7e99f78e35f27f9960a46da1b14a96ec4007d4e2e269af0b5952efea2
TypeScript
489
23
export type InfoModalVariant = "error" | "warning" | "success" | "info"; export interface InfoModalPayload { variant: InfoModalVariant; content: string; title: string; } type Apply = (value: InfoModalPayload | null) => void; let apply: Apply | null = null; export function registerInfoModalDispatch(setter: App...
fb78459ab47302d416655892437a2886b0bd0e1666baa4b109afe3dcac6b609d
TypeScript
489
17
import { useCallback, useState } from "react"; import { copyText, isDefined } from "../utils/helpers"; export const useCopyText = ({ defaultText = "", timeout = 1200 }) => { const [copied, setCopied] = useState(false); const copyTextCallback = useCallback( (text?) => { setCopied(true); copyText(is...
24fd1939ef56099abeff08279b2fef631fafe283287fa56b77df8c15e3a04b14
TypeScript
490
25
type Ref<T> = React.RefObject<T> | React.MutableRefObject<T> | React.ForwardedRef<T>; export function unwrapRef<T>(ref: Ref<T>): T | null { if (!ref) return null; if ("current" in ref) { return ref.current; } return null; } export function setRef<T>(ref: React.ForwardedRef<T> | React.MutableRefObject<T>...
58c47492d9930e62389276a59eaf9170bdfbde67b9eab6eccd3488ea689ee6cb
TypeScript
491
16
/** * @file Modelindex Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker, { StuctureColormakerParams, ColormakerScale } from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by model index */ declare class ModelindexColormaker extends Colorma...
1ef6f60f9c5573e2933c67806f92ad82533506bc523e394ede34f3e25de0dbc6
TypeScript
492
24
import { createAction, props } from "@ngrx/store"; import { MainState, nameSpace } from "./const" export const generalActionError = createAction( `${nameSpace} generalActionError`, props<{ message: string }>() ) export const generalApplyState = createAction( `${nameSpace} generalApplyState`, props<{ ...
903ca623accb20775009a35cbd1287da35a9fbbee1890dbd6d048d1ce357f74a
TypeScript
493
16
export function postProcessSidebar(items) { // Remove items with customProps.hide set to true return items.filter((item) => item.customProps?.hide !== true); } export function apiReferencePrefix(): string { let prefix = process.env.API_REFERENCE_PREFIX || 'https://mlflow.org/docs/latest/'; if (!prefix.startsWi...
fb9784f9278b31522843fc42030a9b6c428bd1fa9ce95d11275bf7a00d2ca0c4
TypeScript
493
19
import { arrayEqual } from "./array" const defaultCmFn = <T>(o: T, n: T) => o === n export function jsonEqual<T>(compareFn: (o1: T, o2: T) => boolean = defaultCmFn) { return function(obj1: Record<string, T>, obj2: Record<string, T>){ /** * first check if keys equal */ if (!arrayEqual()(Object.k...
9c7bb1aafb17b2a0ea88da5188fc4cef6539a6bfced1569b184b6fb8a8fcfbaa
TypeScript
495
23
import { NgModule } from "@angular/core"; import { ComponentsModule } from "src/components"; import { AngularMaterialModule } from "src/sharedModules"; import { MessagingService } from "./service"; @NgModule({ imports: [ AngularMaterialModule, ComponentsModule, ], providers: [ MessagingService, ]...
998cbb0aa8f70cd3d27f7ee8094d9a773e6b4405da45fb4a68a1996e4432d59a
TypeScript
496
16
/** * @file Entityindex Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker, { StuctureColormakerParams, ColormakerScale } from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; /** * Color by entity index */ declare class EntityindexColormaker extends Colo...
0396802bd66c69bee47b8ee27a7e1c3ffd7374174367bbe89d2f8b5d1fc7d961
TypeScript
498
12
/** * UI visibility flags. Hardcoded today; the natural next step is to derive * each one from a wire-format capability or a build-time env var. * * - `hasAnalysis` — analyses are surfaced in the Asset list, File tree, and * Filter pane. Off because analyses have no list projection of their own; * they liv...
24baf47056e177f1d82aeaeafcb3cf7a1048ffcc2093ee4897f6962e5d09565f
TypeScript
498
18
import { useEffect, useMemo, useState } from "react"; export const useValueTracker = <T = any>( value?: T | undefined, defaultValue?: T | undefined, ): [T | string, (value: T) => void] => { const initialValue = useMemo(() => { return value ?? defaultValue ?? ""; }, [value, defaultValue]); const [finalVa...
7df81a9d9e3708277feebef66b8590a04093e857534e66e033f8a1d0c00ea983
TypeScript
499
20
/** * @file Component Collection * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Component from './component' import Collection from './collection' class ComponentCollection extends Collection<Component> { addRepresentation (name: string, params: any) { return this.forEach((comp) ...
1e3fe4f57582aff9dbb27b3e3760cc27515f32d2c951bc561dc845a837395c76
TypeScript
501
15
import { KeyValue } from "@angular/common" import { Pipe, PipeTransform } from "@angular/core" import { PathReturn } from "src/atlasComponents/sapi/typeV3" export type DS = KeyValue<string, PathReturn<"/feature/_types">["items"]> @Pipe({ name: 'filterCategory', pure: true }) export class FilterCategoriesPipe impl...
358f5814072c12252f1b5f972a9e465037cfd1360005ed131efa5f58faf849f0
TypeScript
501
18
import Streamer from './streamer' export default class BinaryStreamer extends Streamer { _read () { if (this.src instanceof ArrayBuffer) this.src = new Uint8Array(this.src) else if (this.src instanceof Buffer && this.src.buffer) this.src = new Uint8Array(this.src.buffer, 0, this.src.length) ...
5c03085917ce108104d754dbf660a3001861fb79ef6e8ddcb289a9a81fabdd86
TypeScript
502
12
/** A single facet option: the value plus its asset count (null when the * backend doesn't compute one). */ export interface FacetValue { value: string; count: number | null; } /** Facet options keyed by the {@link AssetFilter} field they drive (e.g. * `'owners'`, `'packages'`, `'results'`, `'testTypes'`, `'mo...
8b83d7fdc6798cdf36b36f7035816a07e52ea06b729bc9030795344415651b34
TypeScript
503
21
export default function debounce<T extends (...args: any[]) => any>(fn: T, debounceMs: number) { let timer: number | null = null; const cancel = () => { if (timer !== null) { clearTimeout(timer); timer = null; } }; const debouncedFn = (...args: Parameters<T>) =>...
08e42ba2cca89e0377ab98bb5d90d78aabdd3f8fb1646ed7cb3ac62fdd428afe
TypeScript
506
25
export interface SparkleAreaOptions { areaShape: "circle" | "rect"; areaWidth?: number; areaHeight?: number; areaRadius?: number; cutoutShape: "circle" | "rect"; cutoutWidth?: number; cutoutHeight?: number; cutoutRadius?: number; center: { x: number; y: number }; } export interface Sparkle { id: st...
87e9a168c317aece6454d651d9ad5a7e2fe4a3daabbe086b9f9ccbcae11bca5d
TypeScript
506
21
import { useEffect, useState } from "react"; export const useMedia = (query: string) => { const [match, setMatch] = useState(window.matchMedia(query)); useEffect(() => { const handleWindowResize = () => { setMatch(window.matchMedia(query)); }; window.addEventListener("resize", handleWindowResiz...
48a477db4774ced96a4610446e56ef880fbb0b62f997e71f6626ede1aefba1c6
TypeScript
507
10
import {layoutGraphFast} from './fast-layout'; import {layoutGraphPretty} from './pretty-layout'; import {Graph, Node} from './types'; export function layout(graph: Graph, nodeSize: number, horizontal: boolean, hidden: (id: Node) => boolean, fast: boolean) { // TODO - we should not re-layout the graph if options h...
655314a3595e58145e2637cee4ba93b4b09f24f8314534c5ba53435e489bd7a3
TypeScript
508
23
import { useEffect, useState } from "react"; export const useWindowSize = () => { const [windowSize, setWindowSize] = useState({ width: window.innerWidth, height: window.innerWidth, }); useEffect(() => { const onResize = () => { setWindowSize({ width: window.innerWidth, height:...
6d1ab0402036c4f38e32849a9a943ed0528e9ff8140b88d2565f8104089da864
TypeScript
508
20
import type { ResourceTypeExplorer } from '../../lib/resourceType'; export const capitalizedResourceNames: Record<ResourceTypeExplorer, string> = { analysis: 'Analysis', column: 'Column', exposure: 'Exposure', function: 'Function', group: 'Group', macro: 'Macro', metric: 'Metric', model: 'Model', pro...
093e2d9b98b38884ff7b05cebfff87e3c10ff38926511c02194ef28f94bdb471
TypeScript
509
21
import { CommonModule } from "@angular/common"; import { NgModule } from "@angular/core"; import { DragDropFileDirective } from "src/dragDropFile"; import { AngularMaterialModule } from "src/sharedModules"; import { FreeModeUIComponent } from "./freemode-ui/freemode-ui.component"; @NgModule({ imports: [ CommonMo...
8c120a1070c37977ca71f5335ef5edb4573307102f8e4af08bc3aaee588a829f
TypeScript
509
22
export const keymap = { "dm.focus-previous": { title: "Focus previous task", shortcut: "shift+up", }, "dm.focus-next": { title: "Focus previous task", shortcut: "shift+down", }, "dm.close-labeling": { title: "Focus previous task", shortcut: "shift+left", }, "dm.open-labeling": { ...
8c48b89ffd9a7a562fe2eab40db8404e04a640e3c319db33fe5cb58c962b1d1d
TypeScript
510
16
export type Capabilities = { hasColumnLineage: boolean; hasQueryHistory: boolean; hasCostInsights: boolean; hasPerformance: boolean; hasRecommendations: boolean; hasHealthSignals: boolean; hasAutoExposures: boolean; hasMultiProject: boolean; hasMesh: boolean; hasRunResults: boolean; hasCatalogStat...
67547c7326a12a51868474e749899682a7e27519c2516366811eb23069615653
TypeScript
513
24
export { processNotify } from './tracing.js'; export { ensureInitialized } from './config.js'; export { readTranscript, parseTimestampToNs, extractTextFromContent, findLastUserPrompt, getLastTurnRecords, getTokenUsage, getModel, getSessionId, buildToolResultMap, findTranscriptForThread, } from './tr...
314a2b1d037a45dc2adf7c8ca2081ce2ca406a04c1d9c0b78467f1bdfc34f44f
TypeScript
514
16
// Get the feature flags from the root feature_flags.json file import rawFeatureFlags from "../../../../../label_studio/feature_flags.json"; // Embed the feature flags in the playground app const embedFeatureFlags = () => { // @ts-ignore window.FEATURE_FLAGS = window.FEATURE_FLAGS ?? {}; const featureFlags = JSO...
06dfca2ca3769432edbd9fea022fcf25a9ae7303e81da024520242bc412cbdfe
TypeScript
516
17
/** * @file Sstruc Colormaker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ import Colormaker, { StuctureColormakerParams } from './colormaker'; import AtomProxy from '../proxy/atom-proxy'; import ResidueProxy from '../proxy/residue-proxy'; /** * Color by secondary structure */ declare clas...
b0c02ebf04fd0145508ec0e77aaf4a5dd226d422addcb56c1ae9f90cda6c2909
TypeScript
516
21
/** * @file Worker * @author Alexander Rose <alexander.rose@weirdbyte.de> * @private */ export default class _Worker { pending: number; postCount: number; onmessageDict: { [k: number]: Function | undefined; }; onerrorDict: { [k: number]: Function | undefined; }; name: str...