flekschas's picture
Initial release
f3042bd verified
|
Raw History Blame Contribute Delete
31.4 kB
# Gosling 1.0.7 submission contract
Build one complete Gosling 1.0.7 specification for the task by composing constructors. The host renders it in a fixed 900 × 620 CSS-pixel viewport with hg38 assembly metadata supplied by the host.
Submit a complete JavaScript program with the `code` tool. Constructors are functions in scope; each validates its own input and returns a fragment. Every constructor is async: always await it. Build bottom-up: create leaf objects such as channels, data, and styles first, then compose them into larger objects such as tracks, and finish with the root constructor. The program returns the root object a constructor produced. The TypeScript signatures are reference only: write plain JavaScript, with no type annotations. Imports, files, and network access are disabled.
A root object that no constructor produced is refused. Fragments are not validated as complete specifications; the root is validated when it is submitted.
Bind the task rows by name with `data: { type: "json", name: "table", chromosomeField: "<field>", genomicFields: ["<field>", ...] }`, naming the rows' chromosome and genomic position fields, passed to the constructor that takes data. The host replaces each such reference with exactly the rows shown in the task before validation. Do not copy the rows into the specification: inline data is rejected. Tracks may filter or reuse the same rows.
The program may also read the same rows, for example to compute domains:
```typescript
declare function getData(): Promise<Array<Record<string, unknown>>>;
```
The host accepts a submission only after JSON-Schema validation, native compilation, and a render without console, page, or network errors all succeed. A rejected constructor call or submission returns its error. Repair it by submitting another complete program.
Each attempt is retained for evaluation. The latest submission, not the last accepted one, controls the final outcome: a later invalid submission makes the final outcome invalid even when an earlier accepted chart is retained for audit. Stop after acceptance.
---
Constructor appendix:
TypeScript signatures of the constructors in scope, generated from the
Gosling 1.0.7 schema. They are reference only.
```typescript
declare function create_aggregate(input: { value: "max" | "min" | "mean" | "bin" | "count" }): Promise<unknown>;
declare function create_assembly(input: { value: string | unknown[][] }): Promise<unknown>;
declare function create_axis_position(input: { value: "none" | "top" | "bottom" | "left" | "right" }): Promise<unknown>;
declare function create_bin_aggregate(input: { value: "mean" | "sum" }): Promise<unknown>;
interface X {
aggregate?: string;
axis?: string;
domain?: Record<string, unknown>;
field?: string;
grid?: boolean;
legend?: boolean;
linkingId?: string;
range?: unknown[];
type?: string;
}
declare function create_x(input: X): Promise<X>;
declare function create_genomic_domain(input: { value: Record<string, unknown> }): Promise<unknown>;
interface DomainInterval {
interval: unknown[];
}
declare function create_domain_interval(input: DomainInterval): Promise<DomainInterval>;
interface DomainChrInterval {
chromosome: string;
interval: unknown[];
}
declare function create_domain_chr_interval(input: DomainChrInterval): Promise<DomainChrInterval>;
interface DomainChr {
chromosome: string;
}
declare function create_domain_chr(input: DomainChr): Promise<DomainChr>;
declare function create_value_extent(input: { value: string[] | number[] }): Promise<unknown>;
interface Y {
aggregate?: string;
axis?: string;
baseline?: string | number;
domain?: ValueExtent | GenomicDomain;
field?: string;
flip?: boolean;
grid?: boolean;
legend?: boolean;
linkingId?: string;
range?: unknown[];
type?: "quantitative" | "nominal" | "genomic";
zeroBaseline?: boolean;
}
declare function create_y(input: Y): Promise<Y>;
interface Row {
clip?: boolean;
domain?: unknown[];
field?: string;
grid?: boolean;
legend?: boolean;
padding?: number;
range?: unknown[];
type?: string;
}
declare function create_row(input: Row): Promise<Row>;
interface Color {
domain?: unknown[];
field?: string;
legend?: boolean;
range?: Range;
scale?: "linear" | "log";
scaleOffset?: unknown[];
title?: string;
type?: "quantitative" | "nominal";
}
declare function create_color(input: Color): Promise<Color>;
declare function create_range(input: { value: unknown[] | "viridis" | "grey" | "spectral" | "warm" | "cividis" | "bupu" | "rdbu" | "hot" | "pink" }): Promise<unknown>;
interface Size {
domain?: unknown[];
field?: string;
legend?: boolean;
range?: unknown[];
type?: "quantitative" | "nominal";
}
declare function create_size(input: Size): Promise<Size>;
interface Stroke {
domain?: unknown[];
field?: string;
legend?: boolean;
range?: Range;
scaleOffset?: unknown[];
title?: string;
type?: "quantitative" | "nominal";
}
declare function create_stroke(input: Stroke): Promise<Stroke>;
interface StrokeWidth {
domain?: unknown[];
field?: string;
range?: unknown[];
type?: "quantitative" | "nominal";
}
declare function create_stroke_width(input: StrokeWidth): Promise<StrokeWidth>;
interface Opacity {
domain?: unknown[];
field?: string;
range?: unknown[];
type?: "quantitative" | "nominal";
}
declare function create_opacity(input: Opacity): Promise<Opacity>;
interface Text {
domain?: unknown[];
field?: string;
range?: unknown[];
type?: "quantitative" | "nominal";
}
declare function create_text(input: Text): Promise<Text>;
declare function create_channel_value(input: { value: number | string }): Promise<unknown>;
declare function create_data_deep(input: { value: { chromosomeField?: string; genomicFields?: unknown[]; genomicFieldsToConvert?: Record<string, unknown>[]; sampleLength?: number; type: string; values: Record<string, unknown>[] } | { chromosomeField?: string; chromosomePrefix?: string; genomicFields?: unknown[]; genomicFieldsToConvert?: Record<string, unknown>[]; headerNames?: unknown[]; longToWideId?: string; sampleLength?: number; separator?: string; type: string; url: string } | { customFields?: unknown[]; indexUrl: string; sampleLength?: number; type: string; url: string } | { aggregation?: string; binSize?: number; column?: string; end?: string; start?: string; type: string; url: string; value?: string } | { aggregation?: string; binSize?: number; categories?: unknown[]; column?: string; end?: string; row?: string; start?: string; type: string; url: string; value?: string } | { exonIntervalFields?: unknown[]; genomicFields: Record<string, unknown>[]; type: string; url: string; valueFields?: Record<string, unknown>[] } | { binSize?: number; column?: string; row?: string; type: string; url: string; value?: string } | { extractJunction?: boolean; indexUrl: string; junctionMinCoverage?: number; loadMates?: boolean; maxInsertSize?: number; type: string; url: string } | { indexUrl: string; sampleLength?: number; type: string; url: string } | { attributesToFields?: Record<string, unknown>[]; indexUrl: string; sampleLength?: number; type: string; url: string } | { type: string; name: string; chromosomeField: string; genomicFields: unknown[]; genomicFieldsToConvert?: Record<string, unknown>[]; sampleLength?: number } }): Promise<unknown>;
declare function create_data_transform(input: { value: { field: string; not?: boolean; oneOf: unknown[]; type: string } | { field: string; inRange: unknown[]; not?: boolean; type: string } | { field: string; include: string; not?: boolean; type: string } | { fields: unknown[]; newField: string; separator: string; type: string } | { field: string; newField: string; replace: Record<string, unknown>[]; type: string } | { base?: number | string; field: string; newField?: string; type: string } | { boundingBox: { endField: string; groupField?: string; isPaddingBP?: boolean; padding?: number; startField: string }; maxRows?: number; method: string; newField: string; type: string } | { fields: Record<string, unknown>[]; flag: { field: string; value: number | string }; separator: string; type: string } | { endField: string; newField: string; startField: string; type: string } | { firstBp: { chrField: string; posField: string; strandField: string }; newField: string; secondBp: { chrField: string; posField: string; strandField: string }; type: string } | { endField: string; groupField?: string; newField?: string; startField: string; type: string } | { baseGenomicField: string; field: string; genomicField: string; genomicLengthField: string; type: string } }): Promise<unknown>;
declare function create_displacement_type(input: { value: "pile" | "spread" }): Promise<unknown>;
declare function create_field_type(input: { value: "genomic" | "nominal" | "quantitative" }): Promise<unknown>;
interface Displacement {
padding?: number;
type: string;
}
declare function create_displacement(input: Displacement): Promise<Displacement>;
declare function create_orientation(input: { value: "horizontal" | "vertical" }): Promise<unknown>;
interface DummyTrackStyle {
background?: string;
outline?: string;
textFontSize?: number;
textFontWeight?: "bold" | "normal";
textStroke?: string;
textStrokeWidth?: number;
}
declare function create_dummy_track_style(input: DummyTrackStyle): Promise<DummyTrackStyle>;
interface EventStyle {
arrange?: "behind" | "front";
color?: string;
opacity?: number;
stroke?: string;
strokeOpacity?: number;
strokeWidth?: number;
}
declare function create_event_style(input: EventStyle): Promise<EventStyle>;
declare function create_layout(input: { value: "linear" | "circular" }): Promise<unknown>;
declare function create_logical_operation(input: { value: "less-than" | "lt" | "LT" | "greater-than" | "gt" | "GT" | "less-than-or-equal-to" | "ltet" | "LTET" | "greater-than-or-equal-to" | "gtet" | "GTET" }): Promise<unknown>;
declare function create_mark(input: { value: "point" | "line" | "area" | "bar" | "rect" | "text" | "withinLink" | "betweenLink" | "rule" | "triangleLeft" | "triangleRight" | "triangleBottom" | ... }): Promise<unknown>;
interface MouseEventsDeep {
click?: boolean;
enableMouseOverOnMultipleMarks?: boolean;
groupMarksByField?: string;
mouseOver?: boolean;
rangeSelect?: boolean;
}
declare function create_mouse_events_deep(input: MouseEventsDeep): Promise<MouseEventsDeep>;
interface Style {
align?: "left" | "right";
background?: string;
backgroundOpacity?: number;
brush?: { color?: string; opacity?: number; stroke?: string; strokeOpacity?: number; strokeWidth?: number };
curve?: "top" | "bottom" | "left" | "right";
dashed?: unknown[];
linePattern?: { size: number; type: "triangleLeft" | "triangleRight" };
}
declare function create_style(input: Style): Promise<Style>;
interface StylePart2 {
dx?: number;
dy?: number;
enableSmoothPath?: boolean;
inlineLegend?: boolean;
legendTitle?: string;
linkConnectionType?: "straight" | "curve" | "corner";
linkMinHeight?: number;
linkStyle?: "elliptical" | "circular" | "straight";
matrixExtent?: "full" | "upper-right" | "lower-left";
mouseOver?: Record<string, unknown>;
}
declare function create_style_part2(input: StylePart2): Promise<StylePart2>;
interface StylePart3 {
outline?: string;
outlineWidth?: number;
select?: Record<string, unknown>;
textAnchor?: "start" | "middle" | "end";
textFontSize?: number;
textFontWeight?: "bold" | "normal";
textStroke?: string;
textStrokeWidth?: number;
withinLinkVerticalLines?: boolean;
}
declare function create_style_part3(input: StylePart3): Promise<StylePart3>;
interface ZoomLimits {
items: unknown[];
}
declare function create_zoom_limits(input: ZoomLimits): Promise<ZoomLimits>;
interface OverlaidTrack {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_overlay: OverlaidTrackOverlayItem[];
_renderingId?: string;
assembly?: Assembly;
baselineY?: number;
centerRadius?: number;
experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
}
declare function create_overlaid_track(input: OverlaidTrack): Promise<OverlaidTrack>;
interface OverlaidTrackPart2 {
color?: Color | ChannelValue;
data?: Record<string, unknown>;
dataTransform?: DataTransform[];
displacement?: Record<string, unknown>;
endAngle?: number;
flipY?: boolean;
height?: number;
id?: string;
innerRadius?: number;
layout?: string;
}
declare function create_overlaid_track_part2(input: OverlaidTrackPart2): Promise<OverlaidTrackPart2>;
interface OverlaidTrackPart3 {
linkingId?: string;
mark?: string;
mouseEvents?: boolean | MouseEventsDeep;
opacity?: Opacity | ChannelValue;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
row?: Row | ChannelValue;
size?: Size | ChannelValue;
}
declare function create_overlaid_track_part3(input: OverlaidTrackPart3): Promise<OverlaidTrackPart3>;
interface OverlaidTrackPart4 {
spacing?: number;
startAngle?: number;
static?: boolean;
stretch?: boolean;
stroke?: Stroke | ChannelValue;
strokeWidth?: StrokeWidth | ChannelValue;
style?: Record<string, unknown>;
subtitle?: string;
text?: Text | ChannelValue;
title?: string;
}
declare function create_overlaid_track_part4(input: OverlaidTrackPart4): Promise<OverlaidTrackPart4>;
interface OverlaidTrackPart5 {
tooltip?: Tooltip[];
visibility?: VisibilityCondition[];
width?: number;
x?: X | ChannelValue;
x1?: X | ChannelValue;
x1e?: X | ChannelValue;
xAxis?: string;
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
xe?: X | ChannelValue;
}
declare function create_overlaid_track_part5(input: OverlaidTrackPart5): Promise<OverlaidTrackPart5>;
interface OverlaidTrackPart6 {
y?: Y | ChannelValue;
y1?: Y | ChannelValue;
y1e?: Y | ChannelValue;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
yOffset?: number;
ye?: Y | ChannelValue;
zoomLimits?: unknown[];
}
declare function create_overlaid_track_part6(input: OverlaidTrackPart6): Promise<OverlaidTrackPart6>;
interface OverlaidTrackOverlayItem {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_renderingId?: string;
assembly?: Assembly;
baselineY?: number;
centerRadius?: number;
color?: Color | ChannelValue;
experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
}
declare function create_overlaid_track_overlay_item(input: OverlaidTrackOverlayItem): Promise<OverlaidTrackOverlayItem>;
interface OverlaidTrackOverlayItemPart2 {
data?: Record<string, unknown>;
dataTransform?: DataTransform[];
displacement?: Record<string, unknown>;
endAngle?: number;
flipY?: boolean;
id?: string;
innerRadius?: number;
linkingId?: string;
mark?: string;
mouseEvents?: boolean | MouseEventsDeep;
}
declare function create_overlaid_track_overlay_item_part2(input: OverlaidTrackOverlayItemPart2): Promise<OverlaidTrackOverlayItemPart2>;
interface OverlaidTrackOverlayItemPart3 {
opacity?: Opacity | ChannelValue;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
row?: Row | ChannelValue;
size?: Size | ChannelValue;
spacing?: number;
startAngle?: number;
static?: boolean;
}
declare function create_overlaid_track_overlay_item_part3(input: OverlaidTrackOverlayItemPart3): Promise<OverlaidTrackOverlayItemPart3>;
interface OverlaidTrackOverlayItemPart4 {
stretch?: boolean;
stroke?: Stroke | ChannelValue;
strokeWidth?: StrokeWidth | ChannelValue;
style?: Record<string, unknown>;
text?: Text | ChannelValue;
tooltip?: Tooltip[];
visibility?: VisibilityCondition[];
x?: X | ChannelValue;
x1?: X | ChannelValue;
x1e?: X | ChannelValue;
}
declare function create_overlaid_track_overlay_item_part4(input: OverlaidTrackOverlayItemPart4): Promise<OverlaidTrackOverlayItemPart4>;
interface OverlaidTrackOverlayItemPart5 {
xAxis?: string;
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
xe?: X | ChannelValue;
y?: Y | ChannelValue;
y1?: Y | ChannelValue;
y1e?: Y | ChannelValue;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
yOffset?: number;
ye?: Y | ChannelValue;
}
declare function create_overlaid_track_overlay_item_part5(input: OverlaidTrackOverlayItemPart5): Promise<OverlaidTrackOverlayItemPart5>;
interface OverlaidTrackOverlayItemPart6 {
zoomLimits?: unknown[];
}
declare function create_overlaid_track_overlay_item_part6(input: OverlaidTrackOverlayItemPart6): Promise<OverlaidTrackOverlayItemPart6>;
interface Tooltip {
alt?: string;
field: string;
format?: string;
type: string;
}
declare function create_tooltip(input: Tooltip): Promise<Tooltip>;
declare function create_visibility_condition(input: { value: { conditionPadding?: number; measure: "width" | "height"; operation: string; target: "track" | "mark"; threshold: number | string; transitionPadding?: number } | { conditionPadding?: number; measure: string; operation: string; target: "track" | "mark"; threshold: number; transitionPadding?: number } }): Promise<unknown>;
interface PartialTrack {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_overlay?: PartialTrackOverlayItem[];
_renderingId?: string;
assembly?: Assembly | string;
baselineY?: number;
centerRadius?: number;
experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
}
declare function create_partial_track(input: PartialTrack): Promise<PartialTrack>;
interface PartialTrackPart2 {
color?: Color | ChannelValue;
data?: Record<string, unknown>;
dataTransform?: DataTransform[];
displacement?: Record<string, unknown>;
encoding?: Record<string, X | Y | Row | Color | Size | Stroke | StrokeWidth | Opacity | Text | ChannelValue>;
endAngle?: number;
flipY?: boolean;
height?: number;
id?: string;
innerRadius?: number;
}
declare function create_partial_track_part2(input: PartialTrackPart2): Promise<PartialTrackPart2>;
interface PartialTrackPart3 {
layout?: Layout | string;
linkingId?: string;
mark?: string;
mouseEvents?: boolean | MouseEventsDeep;
opacity?: Opacity | ChannelValue;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
row?: Row | ChannelValue;
}
declare function create_partial_track_part3(input: PartialTrackPart3): Promise<PartialTrackPart3>;
interface PartialTrackPart4 {
size?: Size | ChannelValue;
spacing?: number;
startAngle?: number;
static?: boolean;
stretch?: boolean;
stroke?: Stroke | ChannelValue;
strokeWidth?: StrokeWidth | ChannelValue;
style?: Style | DummyTrackStyle;
subtitle?: string;
template?: string;
}
declare function create_partial_track_part4(input: PartialTrackPart4): Promise<PartialTrackPart4>;
interface PartialTrackPart5 {
text?: Text | ChannelValue;
title?: string;
tooltip?: Tooltip[];
type?: string;
visibility?: VisibilityCondition[];
width?: number;
x?: X | ChannelValue;
x1?: X | ChannelValue;
x1e?: X | ChannelValue;
xAxis?: string;
}
declare function create_partial_track_part5(input: PartialTrackPart5): Promise<PartialTrackPart5>;
interface PartialTrackPart6 {
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
xe?: X | ChannelValue;
y?: Y | ChannelValue;
y1?: Y | ChannelValue;
y1e?: Y | ChannelValue;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
yOffset?: number;
ye?: Y | ChannelValue;
zoomLimits?: ZoomLimits | null[];
}
declare function create_partial_track_part6(input: PartialTrackPart6): Promise<PartialTrackPart6>;
interface PartialTrackOverlayItem {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_renderingId?: string;
assembly?: Assembly;
baselineY?: number;
centerRadius?: number;
color?: Color | ChannelValue;
experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
}
declare function create_partial_track_overlay_item(input: PartialTrackOverlayItem): Promise<PartialTrackOverlayItem>;
interface PartialTrackOverlayItemPart2 {
data?: Record<string, unknown>;
dataTransform?: DataTransform[];
displacement?: Record<string, unknown>;
endAngle?: number;
flipY?: boolean;
id?: string;
innerRadius?: number;
linkingId?: string;
mark?: string;
mouseEvents?: boolean | MouseEventsDeep;
}
declare function create_partial_track_overlay_item_part2(input: PartialTrackOverlayItemPart2): Promise<PartialTrackOverlayItemPart2>;
interface PartialTrackOverlayItemPart3 {
opacity?: Opacity | ChannelValue;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
row?: Row | ChannelValue;
size?: Size | ChannelValue;
spacing?: number;
startAngle?: number;
static?: boolean;
}
declare function create_partial_track_overlay_item_part3(input: PartialTrackOverlayItemPart3): Promise<PartialTrackOverlayItemPart3>;
interface PartialTrackOverlayItemPart4 {
stretch?: boolean;
stroke?: Stroke | ChannelValue;
strokeWidth?: StrokeWidth | ChannelValue;
style?: Record<string, unknown>;
text?: Text | ChannelValue;
tooltip?: Tooltip[];
visibility?: VisibilityCondition[];
x?: X | ChannelValue;
x1?: X | ChannelValue;
x1e?: X | ChannelValue;
}
declare function create_partial_track_overlay_item_part4(input: PartialTrackOverlayItemPart4): Promise<PartialTrackOverlayItemPart4>;
interface PartialTrackOverlayItemPart5 {
xAxis?: string;
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
xe?: X | ChannelValue;
y?: Y | ChannelValue;
y1?: Y | ChannelValue;
y1e?: Y | ChannelValue;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
yOffset?: number;
ye?: Y | ChannelValue;
}
declare function create_partial_track_overlay_item_part5(input: PartialTrackOverlayItemPart5): Promise<PartialTrackOverlayItemPart5>;
interface PartialTrackOverlayItemPart6 {
zoomLimits?: unknown[];
}
declare function create_partial_track_overlay_item_part6(input: PartialTrackOverlayItemPart6): Promise<PartialTrackOverlayItemPart6>;
interface SingleTrack {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_renderingId?: string;
assembly?: Assembly;
baselineY?: number;
data: Record<string, unknown>;
experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number };
mark: string;
}
declare function create_single_track(input: SingleTrack): Promise<SingleTrack>;
interface SingleTrackPart2 {
centerRadius?: number;
color?: Color | ChannelValue;
dataTransform?: DataTransform[];
displacement?: Record<string, unknown>;
endAngle?: number;
flipY?: boolean;
height?: number;
id?: string;
innerRadius?: number;
layout?: string;
}
declare function create_single_track_part2(input: SingleTrackPart2): Promise<SingleTrackPart2>;
interface SingleTrackPart3 {
linkingId?: string;
mouseEvents?: boolean | MouseEventsDeep;
opacity?: Opacity | ChannelValue;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
row?: Row | ChannelValue;
size?: Size | ChannelValue;
spacing?: number;
}
declare function create_single_track_part3(input: SingleTrackPart3): Promise<SingleTrackPart3>;
interface SingleTrackPart4 {
startAngle?: number;
static?: boolean;
stretch?: boolean;
stroke?: Stroke | ChannelValue;
strokeWidth?: StrokeWidth | ChannelValue;
style?: Record<string, unknown>;
subtitle?: string;
text?: Text | ChannelValue;
title?: string;
tooltip?: Tooltip[];
}
declare function create_single_track_part4(input: SingleTrackPart4): Promise<SingleTrackPart4>;
interface SingleTrackPart5 {
visibility?: VisibilityCondition[];
width?: number;
x?: X | ChannelValue;
x1?: X | ChannelValue;
x1e?: X | ChannelValue;
xAxis?: string;
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
xe?: X | ChannelValue;
y?: Y | ChannelValue;
}
declare function create_single_track_part5(input: SingleTrackPart5): Promise<SingleTrackPart5>;
interface SingleTrackPart6 {
y1?: Y | ChannelValue;
y1e?: Y | ChannelValue;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
yOffset?: number;
ye?: Y | ChannelValue;
zoomLimits?: unknown[];
}
declare function create_single_track_part6(input: SingleTrackPart6): Promise<SingleTrackPart6>;
interface TemplateTrack {
_assignedHeight?: number;
_assignedWidth?: number;
_invalidTrack?: boolean;
_renderingId?: string;
assembly?: Assembly;
centerRadius?: number;
data: Record<string, unknown>;
encoding?: Record<string, X | Y | Row | Color | Size | Stroke | StrokeWidth | Opacity | Text | ChannelValue>;
endAngle?: number;
template: string;
}
declare function create_template_track(input: TemplateTrack): Promise<TemplateTrack>;
interface TemplateTrackPart2 {
height?: number;
id?: string;
innerRadius?: number;
layout?: string;
linkingId?: string;
orientation?: string;
outerRadius?: number;
overlayOnPreviousTrack?: boolean;
prerelease?: { };
spacing?: number;
}
declare function create_template_track_part2(input: TemplateTrackPart2): Promise<TemplateTrackPart2>;
interface TemplateTrackPart3 {
startAngle?: number;
static?: boolean;
style?: Record<string, unknown>;
subtitle?: string;
title?: string;
width?: number;
xAxis?: string;
xDomain?: DomainInterval | DomainChrInterval | DomainChr;
xOffset?: number;
yDomain?: DomainInterval | DomainChrInterval | DomainChr;
}
declare function create_template_track_part3(input: TemplateTrackPart3): Promise<TemplateTrackPart3>;
interface TemplateTrackPart4 {
yOffset?: number;
zoomLimits?: unknown[];
}
declare function create_template_track_part4(input: TemplateTrackPart4): Promise<TemplateTrackPart4>;
declare function create_spec(input: { value: { _assignedHeight?: number; _assignedWidth?: number; _invalidTrack?: boolean; _renderingId?: string; alignment: string; assembly?: Assembly; baselineY?: number; centerRadius?: number; color?: Color | ChannelValue; data?: DataDeep; dataTransform?: DataTransform[]; description?: string; displacement?: Displacement; endAngle?: number; experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number }; flipY?: boolean; height?: number; id?: string; innerRadius?: number; layout?: Layout; linkingId?: string; mark?: Mark; mouseEvents?: boolean | MouseEventsDeep; opacity?: Opacity | ChannelValue; orientation?: Orientation; outerRadius?: number; overlayOnPreviousTrack?: boolean; prerelease?: Record<string, unknown>; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; row?: Row | ChannelValue; size?: Size | ChannelValue; spacing?: number; startAngle?: number; static?: boolean; stretch?: boolean; stroke?: Stroke | ChannelValue; strokeWidth?: StrokeWidth | ChannelValue; style?: Style; subtitle?: string; text?: Text | ChannelValue; title?: string; tooltip?: Tooltip[]; tracks: PartialTrack[]; visibility?: VisibilityCondition[]; width?: number; x?: X | ChannelValue; x1?: X | ChannelValue; x1e?: X | ChannelValue; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; xe?: X | ChannelValue; y?: Y | ChannelValue; y1?: Y | ChannelValue; y1e?: Y | ChannelValue; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; ye?: Y | ChannelValue; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; _invalidTrack?: boolean; _renderingId?: string; alignment?: string; assembly?: Assembly; baselineY?: number; centerRadius?: number; color?: Color | ChannelValue; data?: DataDeep; dataTransform?: DataTransform[]; description?: string; displacement?: Displacement; endAngle?: number; experimental?: { performanceMode?: boolean; stretchGraphics?: boolean; stretchGraphicsThreshold?: number }; flipY?: boolean; height?: number; id?: string; innerRadius?: number; layout?: Layout; linkingId?: string; mark?: Mark; mouseEvents?: boolean | MouseEventsDeep; opacity?: Opacity | ChannelValue; orientation?: Orientation; outerRadius?: number; overlayOnPreviousTrack?: boolean; prerelease?: Record<string, unknown>; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; row?: Row | ChannelValue; size?: Size | ChannelValue; spacing?: number; startAngle?: number; static?: boolean; stretch?: boolean; stroke?: Stroke | ChannelValue; strokeWidth?: StrokeWidth | ChannelValue; style?: Style; subtitle?: string; text?: Text | ChannelValue; title?: string; tooltip?: Tooltip[]; tracks: unknown[]; visibility?: VisibilityCondition[]; width?: number; x?: X | ChannelValue; x1?: X | ChannelValue; x1e?: X | ChannelValue; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; xe?: X | ChannelValue; y?: Y | ChannelValue; y1?: Y | ChannelValue; y1e?: Y | ChannelValue; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; ye?: Y | ChannelValue; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; assembly?: Assembly; centerRadius?: number; description?: string; id?: string; layout?: Layout; linkingId?: string; orientation?: Orientation; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; spacing?: number; static?: boolean; style?: Style; subtitle?: string; title?: string; tracks: unknown[]; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; zoomLimits?: ZoomLimits } | { _assignedHeight?: number; _assignedWidth?: number; arrangement?: "parallel" | "serial" | "horizontal" | "vertical"; assembly?: Assembly; centerRadius?: number; description?: string; id?: string; layout?: Layout; linkingId?: string; orientation?: Orientation; responsiveSize?: boolean | Record<string, unknown>; responsiveSpec?: Record<string, unknown>[]; spacing?: number; static?: boolean; style?: Style; subtitle?: string; title?: string; views: unknown[]; xAxis?: AxisPosition; xDomain?: DomainInterval | DomainChrInterval | DomainChr; xOffset?: number; yDomain?: DomainInterval | DomainChrInterval | DomainChr; yOffset?: number; zoomLimits?: ZoomLimits } }): Promise<unknown>;
// Composition example — every constructor returns a Promise, so await it:
const x = await create_x({ field: "position", type: "genomic", axis: "bottom" });
const y = await create_y({ field: "score", type: "quantitative" });
const data = await create_data_deep({ value: { type: "json", name: "table", chromosomeField: "chromosome", genomicFields: ["position"] } });
const track = await create_single_track({ data, mark: "point" });
const size = await create_single_track_part2({ height: 120 });
const channels = await create_single_track_part5({ x, y, width: 400 });
return await create_spec({ value: { tracks: [{ ...track, ...size, ...channels }] } });
```