Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
26
1.14k
sliced_code
stringlengths
14
19.8M
type
stringlengths
1
1.35M
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smoothstep.ts#smooth#var#2
const smooth: <mask> = k * k * (3.0 - 2.0 * k) return a + (b - a) * smooth;
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/add.ts#context#arg#8
import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { return context.value + context.params.value; } context.value + context.params.value return context.value + context.params.value; context.params.value
FxContext
0b5vr_automaton/packages/automaton-fxs-v2compat/src/cds.ts#context#arg#10
import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { const dt = context.deltaTime; const v = context.value; const k = context.params.factor; if (context.init) { context.state.pos = context.value; if (context.params.preserve) { ...
FxContext
0b5vr_automaton/packages/automaton-with-gui/src/utils/lofi.ts#d#arg#1
export function lofi(t, d: <mask>) { return Math.floor(t / d) * d; } return Math.floor(t / d) * d;
number
0b5vr_automaton/packages/automaton-with-gui/src/utils/lofi.ts#t#arg#1
export function lofi(t: <mask>, d) { return Math.floor(t / d) * d; } return Math.floor(t / d) * d;
number
0b5vr_automaton/packages/automaton-with-gui/src/utils/genID.ts#ret#var#2
let ret: <mask> = '' ret += Math.floor(16.0 * Math.random()).toString(16); return ret;
string
0b5vr_automaton/packages/automaton-fxs-v2compat/src/clamp.ts#context#arg#12
import { clamp as rawClamp } from './utils/clamp'; import { smin } from './utils/smin'; import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { if (context.params.smooth === 0.0) { return rawClamp(context.value, context.params.min, context.params.max); } const v...
FxContext
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ModeSelector.tsx#Button#var#7
import { Colors } from '../constants/Colors'; import { Icons } from '../icons/Icons'; import { Metrics } from '../constants/Metrics'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback } from 'react'; import styled from 'styled-components'; active ? Colors.accent : Colors.fore Color...
StyledComponent<"img", any, { active?: boolean | undefined; }, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/StatusIcon.tsx#StatusIcon#var#11
import { Icons } from '../icons/Icons'; import { Status, StatusLevel } from '../../types/Status'; import React from 'react'; import styled from 'styled-components'; status == null status.level === StatusLevel.ERROR return (<Icon as={status.level === StatusLevel.ERROR ? Icons.Error : status.level === StatusL...
({ className, status }: { className?: string | undefined; status: Status<any> | null; }) => JSX.Element | null
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#p#var#24
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; context const p: <mask> = context.progress index = (p * context.params.freq * context.params.reso * Math.pow(2.0, i)) % context.params.reso
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smoothstep.ts#a#arg#1
export function smoothstep(a: <mask>, b, k) { const smooth = k * k * (3.0 - 2.0 * k); return a + (b - a) * smooth; } return a + (b - a) * smooth; indexf = index - indexi smoothstep(context.state.table[indexi], context.state.table[indexi + 1], indexf)
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#context#arg#15
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { if (context.init) { xorshift.gen(context.params.seed); context.state.table = new Float32Array(Math.floor(context.params....
FxContext
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smoothstep.ts#k#arg#1
export function smoothstep(a, b, k: <mask>) { const smooth = k * k * (3.0 - 2.0 * k); return a + (b - a) * smooth; } smooth = k * k * (3.0 - 2.0 * k) indexf = index - indexi smoothstep(context.state.table[indexi], context.state.table[indexi + 1], indexf)
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorLabel.tsx#InspectorLabel#var#10
import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { NumberParam } from './NumberParam'; import { useDispatch, useSelector } from '../states/store'; import React from 'react'; interface Props { name: string; } dis...
({ name }: Props) => JSX.Element | null
0b5vr_automaton/packages/automaton-fxs-v2compat/src/cds.ts#k#var#13
import type { FxDefinition } from '@0b5vr/automaton'; context const k: <mask> = context.params.factor Math.sqrt(k)
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ModeSelector.tsx#dispatch#var#31
import { Colors } from '../constants/Colors'; import { Icons } from '../icons/Icons'; import { Metrics } from '../constants/Metrics'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback } from 'react'; import styled from 'styled-components'; function export function useDispatch() { ...
Dispatch<Action>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smin.ts#h#var#2
const h: <mask> = Math.max(k - Math.abs(a - b), 0.0) return Math.min(a, b) - h * h * h / (6.0 * k * k); Math.max(k - Math.abs(a - b), 0.0) Math.abs(a - b) Math.min(a, b)
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorStats.tsx#minimizeOptions#var#52
import { Colors } from '../constants/Colors'; import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { minimizeData } from '../../minimizeData'; import { useSelector } from '../states/store'; import React, { useCallback, ...
{ precisionTime: any; precisionValue: any; }
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorHeader.tsx#Root#var#4
import { Colors } from '../constants/Colors'; import React from 'react'; import styled from 'styled-components'; export interface InspectorHeaderProps { className?: string; text: string; } const Root: <mask> = styled.div` overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: ${Colors.ac...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/cds.ts#dv#var#17
import type { FxDefinition } from '@0b5vr/automaton'; const dv: <mask> = v - context.getValue(context.time - dt) v = context.value Channel.getValue(time:any): number ChannelItem.getValue(time:any): number Curve.getValue(time:any): number ChannelItemWithGUI.public getValue(time, isFromGUI?) { const value = super...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/pow.ts#context#arg#10
import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { const v = context.value - context.params.bias; const sign = context.params.positive ? 1.0 : Math.sign(v); return Math.pow(Math.abs(v), context.params.pow) * sign + context.params.bias; } context.value - context.par...
FxContext
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorSnapping.tsx#InspectorSnapping#var#8
import { BoolParam } from './BoolParam'; import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { NumberParam } from './NumberParam'; import { useSelector } from '../states/store'; import React from 'react'; function expo...
() => JSX.Element | null
0b5vr_automaton/packages/automaton-fxs/src/repeat.ts#context#arg#8
import type { FxDefinition } from '@0b5vr/automaton'; func(context: <mask>) { if (context.index === context.i1) { context.setShouldNotInterpolate(true); } if ((context.elapsed + context.deltaTime) % context.params.interval < context.deltaTime) { context.setShouldNotInterp...
FxContext
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#v#var#23
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; context let v: <mask> = context.value v += context.params.amp * factor * smoothstep(context.state.table[indexi], context.state.table[indexi + 1], indexf); return v;
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorItem.tsx#Label#var#3
import React, { ReactNode } from 'react'; import styled from 'styled-components'; const Label: <mask> = styled.div` margin: 0.15rem; font-size: 0.7rem; line-height: 1em; overflow: hidden; width: calc( 100% - 4.3rem ); text-overflow: ellipsis; white-space: nowrap; `
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/utils/genID.ts#genID#ret#1
ret = '' export function genID(): <mask> { let ret = ''; for (let i = 0; i < 16; i++) { ret += Math.floor(16.0 * Math.random()).toString(16); } return ret; }
string
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#indexf#var#28
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; index = (p * context.params.freq * context.params.reso * Math.pow(2.0, i)) % context.params.reso indexi = Math.floor(index) const indexf: <mask> = index - indexi v += context.p...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#index#var#26
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; const index: <mask> = (p * context.params.freq * context.params.reso * Math.pow(2.0, i)) % context.params.reso p = context.progress context.params.freq context.params.reso cont...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ModeSelector.tsx#Root#var#21
import { Colors } from '../constants/Colors'; import { Icons } from '../icons/Icons'; import { Metrics } from '../constants/Metrics'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback } from 'react'; import styled from 'styled-components'; const Root: <mask> = styled.div` display...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/utils/tests/reorderArray.test.ts#reorder#var#18
import { reorderArray } from '../reorderArray'; function reorderArray(array:any, index:any, length:number, hook:any): (newIndex: number) => T const reorder: <mask> = reorderArray(array, 1, 3) array = [1, 2, 3, 4, 5] expect(array)
(index: number) => number[]
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorStats.tsx#InspectorStats#var#35
import { Colors } from '../constants/Colors'; import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { minimizeData } from '../../minimizeData'; import { useSelector } from '../states/store'; import React, { useCallback, ...
() => JSX.Element | null
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorStats.tsx#Value#var#9
import { Colors } from '../constants/Colors'; import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { minimizeData } from '../../minimizeData'; import { useSelector } from '../states/store'; import React, { useCallback, ...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/xorshift.ts#set#ret#15
public set(seed = 1): <mask> { this.__seed = seed; } seed?: number this.set(seed)
void
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/xorshift.ts#seed#arg#6
public gen(seed?: <mask>) { if (seed) { gen.set(seed); } gen.__seed = gen.__seed ^ (gen.__seed << 13); gen.__seed = gen.__seed ^ (gen.__seed >>> 17); gen.__seed = gen.__seed ^ (gen.__seed << 5); return gen.__seed / Math.pow(2, 32) + 0.5; } ThrottledJSONSto...
number | undefined
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorStats.tsx#handleCalculateFilesize#var#46
import { Colors } from '../constants/Colors'; import { InspectorHeader } from './InspectorHeader'; import { InspectorHr } from './InspectorHr'; import { InspectorItem } from './InspectorItem'; import { minimizeData } from '../../minimizeData'; import { useSelector } from '../states/store'; import React, { useCallback, ...
() => void
0b5vr_automaton/packages/automaton-fxs-v2compat/src/clamp.ts#clamp#var#4
import { clamp as rawClamp } from './utils/clamp'; import { smin } from './utils/smin'; import type { FxDefinition } from '@0b5vr/automaton'; context.params.smooth context.params rawClamp(context.value, context.params.min, context.params.max) return rawClamp(context.value, context.params.min, context.params.max); conte...
FxDefinition
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#factor#var#29
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; const factor: <mask> = Math.pow(0.5, i + 1.0) v += context.params.amp * factor * smoothstep(context.state.table[indexi], context.state.table[indexi + 1], indexf); Math.pow(2.0,...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/xorshift.ts#gen#ret#6
ThrottledJSONStorage.set(key:any, value:any): void Xorshift.set(seed:number): void BiMap.set(key:any, value:any): this private __seed: number = 1; public gen(seed?): <mask> { if (seed) { this.set(seed); } this.__seed = this.__seed ^ (this.__seed << 13); this.__seed = this.__s...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#indexi#var#27
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; const indexi: <mask> = Math.floor(index) indexf = index - indexi v += context.params.amp * factor * smoothstep(context.state.table[indexi], context.state.table[indexi + 1], ind...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#noise#var#5
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; context Xorshift.gen(seed:any): number xorshift.gen(context.params.seed) xorshift.gen(context.params.seed); xorshift.gen() xorshift = new Xorshift() context.state.table = new F...
FxDefinition
0b5vr_automaton/packages/automaton-with-gui/src/view/components/InspectorItem.tsx#Root#var#12
import React, { ReactNode } from 'react'; import styled from 'styled-components'; const Root: <mask> = styled.div` display: flex; justify-content: space-between; margin: 0.125rem 0; `
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/pow.ts#sign#var#12
import type { FxDefinition } from '@0b5vr/automaton'; context.value - context.params.bias v = context.value - context.params.bias context.params.bias context.params.positive const sign: <mask> = context.params.positive ? 1.0 : Math.sign(v) context.params.pow return Math.pow(Math.abs(v), context.params.pow) * sign + con...
number
0b5vr_automaton/packages/automaton-fxs/src/repeat.ts#func#ret#8
import type { FxDefinition } from '@0b5vr/automaton'; Channel.getValue(time:any): number ChannelItem.getValue(time:any): number Curve.getValue(time:any): number ChannelItemWithGUI.public getValue(time, isFromGUI?) { const value = super.getValue(time); if (this.curve && !isFromGUI) { this.cur...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/noise.ts#func#ret#15
import { smoothstep } from './utils/smoothstep'; import Xorshift from './utils/xorshift'; import type { FxDefinition } from '@0b5vr/automaton'; Xorshift.gen(seed:any): number function export function smoothstep(a, b, k) { const smooth = k * k * (3.0 - 2.0 * k); return a + (b - a) * smooth; } xorshift = new Xors...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/pow.ts#pow#var#2
import type { FxDefinition } from '@0b5vr/automaton'; context.value - context.params.bias v = context.value - context.params.bias context.params.bias context.params.positive sign = context.params.positive ? 1.0 : Math.sign(v) context.params.pow return Math.pow(Math.abs(v), context.params.pow) * sign + context.params.bi...
FxDefinition
0b5vr_automaton/packages/automaton-fxs-v2compat/src/pow.ts#func#ret#10
import type { FxDefinition } from '@0b5vr/automaton'; pow = { name: 'Power', description: 'You got boost power!', params: { pow: { name: 'Power', type: 'float', default: 2.0 }, bias: { name: 'Bias', type: 'float', default: 0.0 }, positive: { name: 'Force Positive', type: 'boolean', d...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/pow.ts#v#var#11
import type { FxDefinition } from '@0b5vr/automaton'; context.value - context.params.bias const v: <mask> = context.value - context.params.bias context.params.bias context.params.positive sign = context.params.positive ? 1.0 : Math.sign(v) context.params.pow return Math.pow(Math.abs(v), context.params.pow) * sign + con...
number
0b5vr_automaton/packages/automaton-fxs/src/repeat.ts#repeat#var#2
import type { FxDefinition } from '@0b5vr/automaton'; context.index === context.i1 context.index context.i1 context.setShouldNotInterpolate(true) context.setShouldNotInterpolate(true); context.elapsed + context.deltaTime context.elapsed context.deltaTime context.params.interval context.params (context.elapsed + context...
FxDefinition
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smin.ts#b#arg#1
export function smin(a, b: <mask>, k) { const h = Math.max(k - Math.abs(a - b), 0.0); return Math.min(a, b) - h * h * h / (6.0 * k * k); } h = Math.max(k - Math.abs(a - b), 0.0) Math.min(a, b) function smin(a:any, b:any, k:any): number v = -smin(-context.params.min, -context.value, context.params.smooth) smin(c...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TimeValueGrid.tsx#vlines#var#53
import { Colors } from '../constants/Colors'; import { Resolution } from '../utils/Resolution'; import { TimeValueRange, t2x, v2y } from '../utils/TimeValueRange'; import { clamp } from '../../utils/clamp'; import { genGrid } from '../utils/genGrid'; import { useSelector } from '../states/store'; import { useTimeUnit }...
GridLineEntry[]
0b5vr_automaton/packages/automaton-with-gui/src/view/constants/Colors.ts#Colors#var#1
const Colors: <mask> = { black: '#000000', white: '#ffffff', back1: '#191a1f', back2: '#24272d', back3: '#30343b', back4: '#3b4249', back5: '#474f57', fore: '#d0edff', foresub: '#b9d3e3', foredark: '#97abb9', gray: '#697681', accentbright: '#53c5ff', accent: '#00aaff'...
{ black: string; white: string; back1: string; back2: string; back3: string; back4: string; back5: string; fore: string; foresub: string; foredark: string; gray: string; accentbright: string; accent: string; accentdark: string; fx: string; errorDark: strin...
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#ret#var#55
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const ret: <mask> = {} ret.left = position.x (position....
React.CSSProperties
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TimeValueGrid.tsx#beatlines#var#61
import { Colors } from '../constants/Colors'; import { Resolution } from '../utils/Resolution'; import { TimeValueRange, t2x, v2y } from '../utils/TimeValueRange'; import { clamp } from '../../utils/clamp'; import { genGrid } from '../utils/genGrid'; import { useSelector } from '../states/store'; import { useTimeUnit }...
GridLineEntry[]
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smoothstep.ts#smoothstep#ret#1
smooth = k * k * (3.0 - 2.0 * k) export function smoothstep(a, b, k): <mask> { const smooth = k * k * (3.0 - 2.0 * k); return a + (b - a) * smooth; } indexf = index - indexi smoothstep(context.state.table[indexi], context.state.table[indexi + 1], indexf)
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#OverlayBG#var#23
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const OverlayBG: <mask> = styled.div` position: absol...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/xorshift.ts#seed#arg#15
public set(seed: <mask> = 1) { set.__seed = seed; } seed?: number set.set(seed)
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#TextPrompt#var#39
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; dispatch = useDispatch() function export function useDi...
({ className }: { className?: string | undefined; }) => JSX.Element
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TimeValueGrid.tsx#hlines#var#45
import { Colors } from '../constants/Colors'; import { Resolution } from '../utils/Resolution'; import { TimeValueRange, t2x, v2y } from '../utils/TimeValueRange'; import { clamp } from '../../utils/clamp'; import { genGrid } from '../utils/genGrid'; import { useSelector } from '../states/store'; import { useTimeUnit }...
GridLineEntry[]
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/smin.ts#smin#ret#1
h = Math.max(k - Math.abs(a - b), 0.0) export function smin(a, b, k): <mask> { const h = Math.max(k - Math.abs(a - b), 0.0); return Math.min(a, b) - h * h * h / (6.0 * k * k); } function smin(a:any, b:any, k:any): number v = -smin(-context.params.min, -context.value, context.params.smooth) smin(context.params.m...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/constants/Metrics.ts#Metrics#var#1
const Metrics: <mask> = { rootFontSize: 16, headerHeight: 32, channelListWidth: 160, channelListEntyHeight: 20, inspectorWidth: 192, curveListWidth: 160, modeSelectorWidth: 36, curveListEntryHeight: 36, toastyWidth: 320 }
{ rootFontSize: number; headerHeight: number; channelListWidth: number; channelListEntyHeight: number; inspectorWidth: number; curveListWidth: number; modeSelectorWidth: number; curveListEntryHeight: number; toastyWidth: number; }
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#Input#var#6
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; isValid ? Colors.foresub : Colors.errorBright Colors.fo...
StyledComponent<"input", any, { isValid: boolean; }, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/NumberParam.tsx#type#arg#36
import { Colors } from '../constants/Colors'; import { MouseComboBit, mouseCombo } from '../utils/mouseCombo'; import { registerMouseEvent } from '../utils/registerMouseEvent'; import { useDoubleClick } from '../utils/useDoubleClick'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import style...
ValueType
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#width#var#53
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; document.documentElement.clientWidth const width: <mask...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#height#var#54
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; document.documentElement.clientWidth width = document.d...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#refInput#var#51
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const refInput: <mask> = useRef<HTMLInputElement>(null)...
React.RefObject<HTMLInputElement>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#dispatch#var#42
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; function export function useDispatch() { return use...
Dispatch<Action>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#Root#var#31
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const Root: <mask> = styled.div` position: fixed; l...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#scrollMax#var#69
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; contentHeight = refContainer.current?.clientHeight || 1.0 const scrollMax: <mask> = co...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ContextMenu.tsx#ret#var#44
import { Colors } from '../constants/Colors'; import { ContextMenuEntry } from './ContextMenuEntry'; import { ContextMenuHr } from './ContextMenuHr'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; export interface ...
React.CSSProperties
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TimeValueGrid.tsx#b#arg#10
import { Colors } from '../constants/Colors'; import { Resolution } from '../utils/Resolution'; import { TimeValueRange, t2x, v2y } from '../utils/TimeValueRange'; import { clamp } from '../../utils/clamp'; import { genGrid } from '../utils/genGrid'; import { useSelector } from '../states/store'; import { useTimeUnit }...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#style#var#52
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const style: <mask> = useMemo(() => { const...
React.CSSProperties
0b5vr_automaton/packages/automaton-with-gui/src/view/components/NumberParam.tsx#valueToInput#ret#36
import { Colors } from '../constants/Colors'; import { MouseComboBit, mouseCombo } from '../utils/mouseCombo'; import { registerMouseEvent } from '../utils/registerMouseEvent'; import { useDoubleClick } from '../utils/useDoubleClick'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import style...
string
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#Bar#var#5
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; export interface ScrollableProps { className?: string; children?: ReactNode; ...
({ className, style, top }: { className?: string | undefined; style?: any; top: number; }) => JSX.Element
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#handleChange#var#65
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const handleChange: <mask> = useCallback((event: React....
(event: React.ChangeEvent<HTMLInputElement>) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#Container#var#40
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const Container: <mask> = styled.div` position: absolute; width: 100%; `
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#handleKeyDown#var#71
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const handleKeyDown: <mask> = useCallback((event: React...
(event: React.KeyboardEvent<HTMLInputElement>) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TextPrompt.tsx#isInputValid#var#64
import { Colors } from '../constants/Colors'; import { showToasty } from '../states/Toasty'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useEffect, useMemo, useRef } from 'react'; import styled from 'styled-components'; const isInputValid: <mask> = useMemo(() => !checkValid ...
boolean
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#barHeight#var#61
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; visibleHeight = refRoot.current?.clientHeight || 0.0 contentHeight = refContainer.curr...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#Root#var#44
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const Root: <mask> = styled.div` position: relative; overflow: hidden; `
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#barTop#var#62
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; contentHeight = refContainer.current?.clientHeight || 1.0 const barTop: <mask> = top /...
number
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/clamp.ts#x#arg#1
export function clamp(x: <mask>, a, b) { return Math.min(Math.max(x, a), b); } Math.max(x, a) time left = prev ? (prev.time + prev.length) : 0.0 clamp(time, left, right - item.length) this.__emit('changeLength', { length: this.length }); length clamp(length, 0.0, right - item.time) time left = prev ? (prev.time +...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#StyledBar#var#34
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; export interface ScrollableProps { className?: string; children?: ReactNode; ...
StyledComponent<({ className, style, top }: { className?: string | undefined; style?: any; top: number; }) => JSX.Element, any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/TimeValueGrid.tsx#a#arg#10
import { Colors } from '../constants/Colors'; import { Resolution } from '../utils/Resolution'; import { TimeValueRange, t2x, v2y } from '../utils/TimeValueRange'; import { clamp } from '../../utils/clamp'; import { genGrid } from '../utils/genGrid'; import { useSelector } from '../states/store'; import { useTimeUnit }...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#delta#var#14
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const delta: <mask> = Math.abs(top - lastTop) setAccumMovement(accumMovement + delta);...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/NumberParam.tsx#fine#arg#7
import { Colors } from '../constants/Colors'; import { MouseComboBit, mouseCombo } from '../utils/mouseCombo'; import { registerMouseEvent } from '../utils/registerMouseEvent'; import { useDoubleClick } from '../utils/useDoubleClick'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import style...
boolean
0b5vr_automaton/packages/automaton-with-gui/src/view/gui-operation-hooks/useSelectAllItemsInChannel.ts#items#var#12
import { useCallback } from 'react'; import { useDispatch, useStore } from '../states/store'; const items: <mask> = Object.keys(stateChannel.items).map((id) => ({ id, channel: channelName, })) Object.keys(stateChannel.items) stateChannel = state.automaton.channels[channelName] stateChann...
{ id: string; channel: string; }[]
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#refContainer#var#57
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const refContainer: <mask> = useRef<HTMLDivElement>(null) refContainer.current?.client...
React.RefObject<HTMLDivElement>
0b5vr_automaton/packages/automaton-with-gui/src/view/gui-operation-hooks/useSelectAllItemsInChannel.ts#selectAllItemsInChannel#var#6
import { useCallback } from 'react'; import { useDispatch, useStore } from '../states/store'; const selectAllItemsInChannel: <mask> = useCallback((channelName: string): void => { const state = store.getState(); const stateChannel = state.automaton.channels[channelName]; if (stateChannel == null)...
(channelName: string) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/gui-operation-hooks/useSelectAllItemsInChannel.ts#useSelectAllItemsInChannel#ret#3
import { useCallback } from 'react'; import { useDispatch, useStore } from '../states/store'; function export function useDispatch() { return useReduxDispatch<Dispatch<Action>>(); } function export function useStore() { return useReduxStore(); } store = useStore() selectAllItemsInChannel = useCallback((channelN...
(channelName: string) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/components/NumberParam.tsx#dy#arg#7
import { Colors } from '../constants/Colors'; import { MouseComboBit, mouseCombo } from '../utils/mouseCombo'; import { registerMouseEvent } from '../utils/registerMouseEvent'; import { useDoubleClick } from '../utils/useDoubleClick'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import style...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ToastyEntry.tsx#Icon#var#10
import { Colors } from '../constants/Colors'; import { Icons } from '../icons/Icons'; import { closeToasty } from '../states/Toasty'; import { useDispatch } from '../states/store'; import React, { useCallback } from 'react'; import styled, { css, keyframes } from 'styled-components'; const Icon: <mask> = styled.img` ...
StyledComponent<"img", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ContextMenu.tsx#style#var#41
import { Colors } from '../constants/Colors'; import { ContextMenuEntry } from './ContextMenuEntry'; import { ContextMenuHr } from './ContextMenuHr'; import { useDispatch, useSelector } from '../states/store'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; export interface ...
React.CSSProperties
0b5vr_automaton/packages/automaton-with-gui/src/view/gui-operation-hooks/useSelectAll.ts#useSelectAllEntities#ret#7
import { useCallback } from 'react'; import { useDispatch, useStore } from '../states/store'; function export function useDispatch() { return useReduxDispatch<Dispatch<Action>>(); } function export function useStore() { return useReduxStore(); } store = useStore() selectAllEntities = useCallback((options: Optio...
(options: Options) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#newTop#var#70
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const newTop: <mask> = Math.min(Math.max(top - event.deltaY, -scrollMax), 0.0) setTop(...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/gui-operation-hooks/useSelectAllItemsInChannel.ts#dispatch#var#4
import { useCallback } from 'react'; import { useDispatch, useStore } from '../states/store'; function export function useDispatch() { return useReduxDispatch<Dispatch<Action>>(); } const dispatch: <mask> = useDispatch()
Dispatch<Action>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#handleWheel#var#63
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; export interface ScrollableProps { className?: string; children?: ReactNode; ...
(event: WheelEvent) => void
0b5vr_automaton/packages/automaton-with-gui/src/view/components/ToastyEntry.tsx#Content#var#7
import { Colors } from '../constants/Colors'; import { Icons } from '../icons/Icons'; import { closeToasty } from '../states/Toasty'; import { useDispatch } from '../states/store'; import React, { useCallback } from 'react'; import styled, { css, keyframes } from 'styled-components'; const Content: <mask> = styled.div`...
StyledComponent<"div", any, {}, never>
0b5vr_automaton/packages/automaton-with-gui/src/view/components/Scrollable.tsx#refRoot#var#56
import { Colors } from '../constants/Colors'; import { useAnimationFrame } from '../utils/useAnimationFrame'; import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'; import styled from 'styled-components'; const refRoot: <mask> = useRef<HTMLDivElement>(null) refRoot.current?.clientHeight vis...
React.RefObject<HTMLDivElement>
0b5vr_automaton/packages/automaton-fxs-v2compat/src/utils/clamp.ts#b#arg#1
export function clamp(x, a, b: <mask>) { return Math.min(Math.max(x, a), b); } Math.min(Math.max(x, a), b) time left = prev ? (prev.time + prev.length) : 0.0 clamp(time, left, right - item.length) this.__emit('changeLength', { length: this.length }); length clamp(length, 0.0, right - item.time) time left = prev ?...
number
0b5vr_automaton/packages/automaton-with-gui/src/view/components/NumberParam.tsx#minDiff#arg#7
import { Colors } from '../constants/Colors'; import { MouseComboBit, mouseCombo } from '../utils/mouseCombo'; import { registerMouseEvent } from '../utils/registerMouseEvent'; import { useDoubleClick } from '../utils/useDoubleClick'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import style...
number
End of preview. Expand in Data Studio

TypeGround: A Compiler-Grounded Benchmark for TypeScript Type Inference

TypeGround is a compiler-grounded benchmark for TypeScript type inference. Every stage — annotation, context construction, and quality control — is validated by the TypeScript Compiler (TSC). It extracts variable declarations, function parameters, and return types from compilable TypeScript projects, combining developer annotations, TSC inference, LLM candidate generation, and TSC backfill checking to produce type labels.

Covers 2,735 projects, 99,209 source files, and 1,428,997 type annotations.

Benchmark Format

Each sample targets a single type position and includes:

  • Metadata (name, type, loc_cat, type_cat, line, file)
  • Snippet code: ±25 lines around the target, preserving local lexical and syntactic context.
  • Slice code: type-dependency-based statements collected across function boundaries (imports, definitions, call sites, use sites).

The target type is replaced by <mask>; the model predicts the masked type expression.

Location Categories

Value Meaning
var Variable declaration
arg Function parameter
ret Function return

Type Categories

The type_cat field stores granular TSC type classifications (e.g., NumberKeyword, FunctionType, UnionType, userDefined). type_cat.py maps them into three analysis categories:

Category Coverage
BuiltIn TS keywords (*Keyword), built-in objects (Date, Error, …), arrays/buffers, DOM (HTML*, SVG*, …), events (*Event), Canvas/WebGL, browser/Web APIs
Constructed Function/constructor types, composite types (ArrayType, UnionType, IntersectionType, …), utility types (Partial, Pick, Omit, …), type operators (MappedType, ConditionalType, …)
UserDefined userDefined — project-declared interfaces, type aliases, classes, enums

Data Files

File Records Size Description
types.json.gz ~11.4M 21 MB Train metadata
types_testdata.json.gz ~694K 1.3 MB Test metadata
snippet_data_50.jsonl.gz ~802K 203 MB Train snippets
snippet_data_testdata_50.jsonl.gz ~41K 11 MB Test snippets
slice_data.jsonl.gz ~1.2M 307 MB Train slices
slice_data_testdata.jsonl.gz ~58K 15 MB Test slices

Format

Metadata (types.json.gz):

{"name":"smooth","type":"number","loc_cat":"ret","type_cat":"NumberKeyword","line":1,"file":"repo/path/to/file.ts"}

Snippet / Slice (snippet_data_50.jsonl.gz / slice_data.jsonl.gz, one JSON object per line):

{"id":"repo/path/to/file.ts#func#var#2","maskedText":"... <mask> ...","type":"number"}
{"id":"repo/path/to/file.ts#func#var#2","sliced_code":"... <mask> ...","type":"number"}

Configs

Config Train file Test file Columns
snippet snippet_data_50.jsonl.gz snippet_data_testdata_50.jsonl.gz id, maskedText, type
slice slice_data.jsonl.gz slice_data_testdata.jsonl.gz id, sliced_code, type

Usage

from datasets import load_dataset

# Snippet context
snippet = load_dataset("fumx66/TypeGround", "snippet")
print(snippet["train"][0]["maskedText"])

# Slice context
slice_ds = load_dataset("fumx66/TypeGround", "slice")
print(slice_ds["train"][0]["sliced_code"])

# Metadata
import gzip, json
with gzip.open("data/types.json.gz", "rt") as f:
    types = json.load(f)

Citation

@dataset{typeground,
  title={TypeGround: A Compiler-Grounded Benchmark for TypeScript Type Inference},
  year={2026},
  url={https://huggingface.co/datasets/fumx66/TypeGround}
}

License

MIT License

Downloads last month
9