@genome-spy/core 0.30.0 → 0.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +16379 -0
- package/dist/index.js +43 -43
- package/package.json +10 -7
- package/src/data/collector.js +0 -183
- package/src/data/collector.test.js +0 -84
- package/src/data/dataFlow.js +0 -148
- package/src/data/dataFlow.test.js +0 -5
- package/src/data/facetNode.js +0 -17
- package/src/data/flow.test.js +0 -72
- package/src/data/flowBatch.d.ts +0 -40
- package/src/data/flowNode.js +0 -283
- package/src/data/flowNode.test.js +0 -50
- package/src/data/flowOptimizer.js +0 -123
- package/src/data/flowOptimizer.test.js +0 -193
- package/src/data/flowTestUtils.js +0 -63
- package/src/data/formats/fasta.js +0 -32
- package/src/data/formats/fasta.test.js +0 -27
- package/src/data/sources/dataSource.js +0 -22
- package/src/data/sources/dataSourceFactory.js +0 -24
- package/src/data/sources/dataUtils.js +0 -78
- package/src/data/sources/dynamicCallbackSource.js +0 -57
- package/src/data/sources/dynamicSource.js +0 -37
- package/src/data/sources/inlineSource.js +0 -67
- package/src/data/sources/inlineSource.test.js +0 -56
- package/src/data/sources/namedSource.js +0 -79
- package/src/data/sources/sequenceSource.js +0 -46
- package/src/data/sources/sequenceSource.test.js +0 -46
- package/src/data/sources/urlSource.js +0 -74
- package/src/data/transforms/aggregate.js +0 -70
- package/src/data/transforms/clone.js +0 -40
- package/src/data/transforms/clone.test.js +0 -11
- package/src/data/transforms/coverage.js +0 -187
- package/src/data/transforms/coverage.test.js +0 -123
- package/src/data/transforms/filter.js +0 -37
- package/src/data/transforms/filter.test.js +0 -18
- package/src/data/transforms/filterScoredLabels.js +0 -134
- package/src/data/transforms/flattenCompressedExons.js +0 -57
- package/src/data/transforms/flattenDelimited.js +0 -74
- package/src/data/transforms/flattenDelimited.test.js +0 -87
- package/src/data/transforms/flattenSequence.js +0 -39
- package/src/data/transforms/flattenSequence.test.js +0 -34
- package/src/data/transforms/formula.js +0 -39
- package/src/data/transforms/formula.test.js +0 -19
- package/src/data/transforms/identifier.js +0 -108
- package/src/data/transforms/identifier.test.js +0 -83
- package/src/data/transforms/linearizeGenomicCoordinate.js +0 -101
- package/src/data/transforms/measureText.js +0 -44
- package/src/data/transforms/pileup.js +0 -128
- package/src/data/transforms/pileup.test.js +0 -70
- package/src/data/transforms/project.js +0 -41
- package/src/data/transforms/project.test.js +0 -32
- package/src/data/transforms/regexExtract.js +0 -61
- package/src/data/transforms/regexExtract.test.js +0 -67
- package/src/data/transforms/regexFold.js +0 -141
- package/src/data/transforms/regexFold.test.js +0 -160
- package/src/data/transforms/sample.js +0 -101
- package/src/data/transforms/sample.test.js +0 -38
- package/src/data/transforms/stack.js +0 -137
- package/src/data/transforms/stack.test.js +0 -91
- package/src/data/transforms/transformFactory.js +0 -60
- package/src/embedApi.d.ts +0 -67
- package/src/encoder/accessor.js +0 -82
- package/src/encoder/accessor.test.js +0 -47
- package/src/encoder/encoder.js +0 -394
- package/src/encoder/encoder.test.js +0 -98
- package/src/fonts/Lato-Regular.json +0 -1267
- package/src/fonts/Lato-Regular.png +0 -0
- package/src/fonts/OFL.txt +0 -93
- package/src/fonts/README.md +0 -3
- package/src/fonts/bmFont.d.ts +0 -58
- package/src/fonts/bmFontManager.js +0 -357
- package/src/fonts/bmFontMetrics.js +0 -108
- package/src/genome/genome.js +0 -317
- package/src/genome/genome.test.js +0 -188
- package/src/genome/genomeStore.js +0 -54
- package/src/genome/locusFormat.js +0 -31
- package/src/genome/scaleIndex.d.ts +0 -38
- package/src/genome/scaleIndex.js +0 -166
- package/src/genome/scaleIndex.test.js +0 -78
- package/src/genome/scaleLocus.d.ts +0 -11
- package/src/genome/scaleLocus.js +0 -108
- package/src/genome/scaleLocus.test.js +0 -4
- package/src/genomeSpy.js +0 -785
- package/src/gl/arrayBuilder.js +0 -199
- package/src/gl/dataToVertices.js +0 -636
- package/src/gl/includes/common.glsl +0 -63
- package/src/gl/includes/picking.fragment.glsl +0 -1
- package/src/gl/includes/picking.vertex.glsl +0 -27
- package/src/gl/includes/sampleFacet.glsl +0 -107
- package/src/gl/includes/scales.glsl +0 -112
- package/src/gl/link.fragment.glsl +0 -18
- package/src/gl/link.vertex.glsl +0 -111
- package/src/gl/point.fragment.glsl +0 -123
- package/src/gl/point.vertex.glsl +0 -129
- package/src/gl/rect.fragment.glsl +0 -51
- package/src/gl/rect.vertex.glsl +0 -114
- package/src/gl/rule.fragment.glsl +0 -52
- package/src/gl/rule.vertex.glsl +0 -89
- package/src/gl/text.fragment.glsl +0 -31
- package/src/gl/text.vertex.glsl +0 -246
- package/src/gl/webGLHelper.js +0 -504
- package/src/img/bowtie.svg +0 -1
- package/src/img/genomespy-favicon.svg +0 -34
- package/src/index.html +0 -11
- package/src/index.js +0 -128
- package/src/marks/link.js +0 -175
- package/src/marks/mark.js +0 -975
- package/src/marks/markUtils.js +0 -125
- package/src/marks/pointMark.js +0 -251
- package/src/marks/rectMark.js +0 -241
- package/src/marks/rule.js +0 -250
- package/src/marks/text.js +0 -278
- package/src/node_modules/.vitest/results.json +0 -1
- package/src/scale/colorUtils.js +0 -184
- package/src/scale/glslScaleGenerator.js +0 -502
- package/src/scale/scale.js +0 -451
- package/src/scale/scale.test.js +0 -324
- package/src/scale/ticks.js +0 -203
- package/src/scale/ticks.test.js +0 -40
- package/src/singlePageApp.js +0 -13
- package/src/spec/axis.d.ts +0 -296
- package/src/spec/channel.d.ts +0 -430
- package/src/spec/data.d.ts +0 -196
- package/src/spec/font.d.ts +0 -15
- package/src/spec/genome.d.ts +0 -35
- package/src/spec/mark.d.ts +0 -429
- package/src/spec/root.d.ts +0 -17
- package/src/spec/sampleView.d.ts +0 -180
- package/src/spec/scale.d.ts +0 -273
- package/src/spec/title.d.ts +0 -102
- package/src/spec/tooltip.d.ts +0 -9
- package/src/spec/transform.d.ts +0 -479
- package/src/spec/view.d.ts +0 -201
- package/src/styles/genome-spy.scss +0 -153
- package/src/tooltip/dataTooltipHandler.js +0 -64
- package/src/tooltip/refseqGeneTooltipHandler.js +0 -78
- package/src/tooltip/tooltipHandler.ts +0 -12
- package/src/types/filetypes.d.ts +0 -14
- package/src/types/flatqueue.d.ts +0 -53
- package/src/types/glsl.d.ts +0 -4
- package/src/types/internmap.d.ts +0 -22
- package/src/types/object.d.ts +0 -21
- package/src/types/vega-loader.d.ts +0 -1
- package/src/types/vega-scale.d.ts +0 -60
- package/src/utils/addBaseUrl.js +0 -19
- package/src/utils/addBaseUrl.test.js +0 -22
- package/src/utils/animator.js +0 -83
- package/src/utils/arrayUtils.js +0 -61
- package/src/utils/binnedIndex.js +0 -167
- package/src/utils/binnedIndex.test.js +0 -155
- package/src/utils/clamp.js +0 -8
- package/src/utils/cloner.js +0 -34
- package/src/utils/cloner.test.js +0 -24
- package/src/utils/coalesce.js +0 -11
- package/src/utils/coalesce.test.js +0 -16
- package/src/utils/concatIterables.js +0 -26
- package/src/utils/concatIterables.test.js +0 -8
- package/src/utils/debounce.js +0 -37
- package/src/utils/domainArray.js +0 -216
- package/src/utils/domainArray.test.js +0 -130
- package/src/utils/eerp.js +0 -13
- package/src/utils/expression.js +0 -32
- package/src/utils/field.js +0 -28
- package/src/utils/formatObject.js +0 -31
- package/src/utils/indexer.js +0 -43
- package/src/utils/indexer.test.js +0 -47
- package/src/utils/inertia.js +0 -124
- package/src/utils/interactionEvent.js +0 -33
- package/src/utils/iterateNestedMaps.js +0 -21
- package/src/utils/iterateNestedMaps.test.js +0 -33
- package/src/utils/kWayMerge.js +0 -42
- package/src/utils/kWayMerge.test.js +0 -26
- package/src/utils/layout/flexLayout.js +0 -368
- package/src/utils/layout/flexLayout.test.js +0 -311
- package/src/utils/layout/grid.js +0 -95
- package/src/utils/layout/grid.test.js +0 -71
- package/src/utils/layout/padding.js +0 -120
- package/src/utils/layout/point.js +0 -23
- package/src/utils/layout/rectangle.js +0 -288
- package/src/utils/layout/rectangle.test.js +0 -172
- package/src/utils/mergeObjects.js +0 -99
- package/src/utils/mergeObjects.test.js +0 -42
- package/src/utils/numberExtractor.js +0 -24
- package/src/utils/numberExtractor.test.js +0 -6
- package/src/utils/point.js +0 -14
- package/src/utils/propertyCacher.js +0 -70
- package/src/utils/propertyCacher.test.js +0 -85
- package/src/utils/propertyCoalescer.js +0 -42
- package/src/utils/propertyCoalescer.test.js +0 -22
- package/src/utils/reservationMap.js +0 -103
- package/src/utils/reservationMap.test.js +0 -20
- package/src/utils/scaleNull.js +0 -19
- package/src/utils/setOperations.js +0 -75
- package/src/utils/smoothstep.js +0 -10
- package/src/utils/throttle.js +0 -34
- package/src/utils/topK.js +0 -76
- package/src/utils/topK.test.js +0 -64
- package/src/utils/transition.js +0 -74
- package/src/utils/ui/tooltip.js +0 -189
- package/src/utils/url.js +0 -22
- package/src/utils/variableTools.js +0 -24
- package/src/utils/variableTools.test.js +0 -13
- package/src/view/axisResolution.js +0 -140
- package/src/view/axisResolution.test.js +0 -201
- package/src/view/axisView.js +0 -747
- package/src/view/concatView.js +0 -45
- package/src/view/containerView.js +0 -159
- package/src/view/facetView.js +0 -491
- package/src/view/flowBuilder.js +0 -367
- package/src/view/flowBuilder.test.js +0 -125
- package/src/view/gridView.js +0 -786
- package/src/view/implicitRootView.js +0 -14
- package/src/view/importView.js +0 -19
- package/src/view/layerView.js +0 -74
- package/src/view/rendering.d.ts +0 -44
- package/src/view/renderingContext/compositeViewRenderingContext.js +0 -51
- package/src/view/renderingContext/deferredViewRenderingContext.js +0 -176
- package/src/view/renderingContext/layoutRecorderViewRenderingContext.js +0 -128
- package/src/view/renderingContext/simpleViewRenderingContext.js +0 -64
- package/src/view/renderingContext/svgViewRenderingContext.js +0 -125
- package/src/view/renderingContext/viewRenderingContext.js +0 -41
- package/src/view/scaleResolution.js +0 -797
- package/src/view/scaleResolution.test.js +0 -572
- package/src/view/scaleResolutionApi.d.ts +0 -40
- package/src/view/testUtils.js +0 -51
- package/src/view/title.js +0 -165
- package/src/view/unitView.js +0 -382
- package/src/view/view.js +0 -612
- package/src/view/view.test.js +0 -214
- package/src/view/viewContext.d.ts +0 -62
- package/src/view/viewFactory.js +0 -181
- package/src/view/viewFactory.test.js +0 -17
- package/src/view/viewUtils.js +0 -327
- package/src/view/zoom.js +0 -89
package/src/spec/mark.d.ts
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import { Scalar } from "./channel";
|
|
2
|
-
import { Align, Baseline, FontStyle, FontWeight } from "./font";
|
|
3
|
-
import { Tooltip } from "./tooltip";
|
|
4
|
-
|
|
5
|
-
export type MarkType = "rect" | "point" | "rule" | "text" | "link";
|
|
6
|
-
|
|
7
|
-
export interface FillAndStrokeProps {
|
|
8
|
-
fill?: string;
|
|
9
|
-
fillOpacity?: number;
|
|
10
|
-
|
|
11
|
-
stroke?: string;
|
|
12
|
-
strokeOpacity?: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface SecondaryPositionProps {
|
|
16
|
-
x2?: number;
|
|
17
|
-
y2?: number;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface AngleProps {
|
|
21
|
-
/**
|
|
22
|
-
* The rotation angle in degrees.
|
|
23
|
-
*
|
|
24
|
-
* **Default value:** `0`
|
|
25
|
-
*/
|
|
26
|
-
angle?: number;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Specifies how mark should be faded at the viewport edges.
|
|
31
|
-
* This is mainly used to make axis labels pretty.
|
|
32
|
-
*/
|
|
33
|
-
export interface ViewportEdgeFadeProps {
|
|
34
|
-
viewportEdgeFadeWidthTop?: number;
|
|
35
|
-
viewportEdgeFadeWidthRight?: number;
|
|
36
|
-
viewportEdgeFadeWidthBottom?: number;
|
|
37
|
-
viewportEdgeFadeWidthLeft?: number;
|
|
38
|
-
|
|
39
|
-
viewportEdgeFadeDistanceTop?: number;
|
|
40
|
-
viewportEdgeFadeDistanceRight?: number;
|
|
41
|
-
viewportEdgeFadeDistanceBottom?: number;
|
|
42
|
-
viewportEdgeFadeDistanceLeft?: number;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface RectProps extends SecondaryPositionProps {
|
|
46
|
-
/**
|
|
47
|
-
* Clamps the minimum size-dependent opacity. The property does not affect the
|
|
48
|
-
* `opacity` channel. Valid values are between `0` and `1`.
|
|
49
|
-
*
|
|
50
|
-
* When a rectangle would be smaller than what is specified in `minHeight` and
|
|
51
|
-
* `minWidth`, it is faded out proportionally. Example: a rectangle would be
|
|
52
|
-
* rendered as one pixel wide, but `minWidth` clamps it to five pixels. The
|
|
53
|
-
* rectangle is actually rendered as five pixels wide, but its opacity is
|
|
54
|
-
* multiplied by 0.2. With this setting, you can limit the factor to, for
|
|
55
|
-
* example, 0.5 to keep the rectangles more clearly visible.
|
|
56
|
-
*
|
|
57
|
-
* **Default value:** `0`
|
|
58
|
-
*/
|
|
59
|
-
// TODO: Rename to minCompensatedOpacity or something like that
|
|
60
|
-
minOpacity?: number;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The minimum width of a rectangle in pixels. The property clamps rectangles'
|
|
64
|
-
* widths when the viewport is zoomed out.
|
|
65
|
-
*
|
|
66
|
-
* This property also reduces flickering of very narrow rectangles when zooming.
|
|
67
|
-
* The value should generally be at least one.
|
|
68
|
-
*
|
|
69
|
-
* **Default value:** `1`
|
|
70
|
-
*/
|
|
71
|
-
minWidth?: number;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The minimum height of a rectangle in pixels. The property clamps rectangles' heights.
|
|
75
|
-
*
|
|
76
|
-
* **Default value:** `0`
|
|
77
|
-
*/
|
|
78
|
-
minHeight?: number;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Radius of the rounded corners.
|
|
82
|
-
*
|
|
83
|
-
* **Default value:** `0`
|
|
84
|
-
*/
|
|
85
|
-
cornerRadius?: number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Radius of the top left rounded corner. Has higher precedence than `cornerRadius`.
|
|
89
|
-
*
|
|
90
|
-
* **Default value:** (None)
|
|
91
|
-
*/
|
|
92
|
-
cornerRadiusTopLeft?: number;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Radius of the top right rounded corner. Has higher precedence than `cornerRadius`.
|
|
96
|
-
*
|
|
97
|
-
* **Default value:** (None)
|
|
98
|
-
*/
|
|
99
|
-
cornerRadiusTopRight?: number;
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Radius of the bottom left rounded corner. Has higher precedence than `cornerRadius`.
|
|
103
|
-
*
|
|
104
|
-
* **Default value:** (None)
|
|
105
|
-
*/
|
|
106
|
-
cornerRadiusBottomLeft?: number;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Radius of the bottom right rounded corner. Has higher precedence than `cornerRadius`.
|
|
110
|
-
*
|
|
111
|
-
* **Default value:** (None)
|
|
112
|
-
*/
|
|
113
|
-
cornerRadiusBottomRight?: number;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export interface RuleProps extends SecondaryPositionProps {
|
|
117
|
-
/**
|
|
118
|
-
* The minimum length of the rule in pixels. Use this property to ensure that
|
|
119
|
-
* very short ranged rules remain visible even when the user zooms out.
|
|
120
|
-
*
|
|
121
|
-
* **Default value:** `0`
|
|
122
|
-
*/
|
|
123
|
-
minLength?: number;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* An array of of alternating stroke and gap lengths or `null` for solid strokes.
|
|
127
|
-
*
|
|
128
|
-
* **Default value:** `null`
|
|
129
|
-
*/
|
|
130
|
-
strokeDash?: number[];
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* An offset for the stroke dash pattern.
|
|
134
|
-
*
|
|
135
|
-
* **Default value:** `0`
|
|
136
|
-
*/
|
|
137
|
-
strokeDashOffset?: number;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The style of stroke ends. Available choices: `"butt"`, `"round`", and `"square"`.
|
|
141
|
-
*
|
|
142
|
-
* **Default value:** `"butt"`
|
|
143
|
-
*/
|
|
144
|
-
strokeCap?: "butt" | "square" | "round";
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface TextProps
|
|
148
|
-
extends SecondaryPositionProps,
|
|
149
|
-
AngleProps,
|
|
150
|
-
ViewportEdgeFadeProps {
|
|
151
|
-
/**
|
|
152
|
-
* The text to display. The format of numeric data can be customized by
|
|
153
|
-
* setting a [format specifier](https://github.com/d3/d3-format#locale_format)
|
|
154
|
-
* to channel definition's `format` property.
|
|
155
|
-
*
|
|
156
|
-
* **Default value:** `""`
|
|
157
|
-
*/
|
|
158
|
-
text?: Scalar;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The font size in pixels.
|
|
162
|
-
*
|
|
163
|
-
* **Default value:** `11`
|
|
164
|
-
*/
|
|
165
|
-
size?: number;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The font typeface. GenomeSpy uses [SDF](https://github.com/Chlumsky/msdfgen)
|
|
169
|
-
* versions of [Google Fonts](https://fonts.google.com/). Check their
|
|
170
|
-
* availability at the [A-Frame
|
|
171
|
-
* Fonts](https://github.com/etiennepinchon/aframe-fonts/tree/master/fonts)
|
|
172
|
-
* repository. System fonts are **not** supported.
|
|
173
|
-
*
|
|
174
|
-
* **Default value:** `"Lato"`
|
|
175
|
-
*/
|
|
176
|
-
font?: string;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* The font style. Valid values: `"normal"` and `"italic"`.
|
|
180
|
-
*
|
|
181
|
-
* **Default value:** `"normal"`
|
|
182
|
-
*/
|
|
183
|
-
fontStyle?: FontStyle;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* The font weight. The following strings and numbers are valid values:
|
|
187
|
-
* `"thin"` (`100`), `"light"` (`300`), `"regular"` (`400`),
|
|
188
|
-
* `"normal"` (`400`), `"medium"` (`500`), `"bold"` (`700`),
|
|
189
|
-
* `"black"` (`900`)
|
|
190
|
-
*
|
|
191
|
-
* **Default value:** `"regular"`
|
|
192
|
-
*/
|
|
193
|
-
fontWeight?: FontWeight;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* The horizontal alignment of the text. One of `"left"`, `"center"`, or `"right"`.
|
|
197
|
-
*
|
|
198
|
-
* **Default value:** `"left"`
|
|
199
|
-
*/
|
|
200
|
-
align?: Align;
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* The vertical alignment of the text. One of `"top"`, `"middle"`, `"bottom"`.
|
|
204
|
-
*
|
|
205
|
-
* **Default value:** `"bottom"`
|
|
206
|
-
*/
|
|
207
|
-
baseline?: Baseline;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The horizontal offset between the text and its anchor point, in pixels.
|
|
211
|
-
* Applied after the rotation by `angle`.
|
|
212
|
-
*/
|
|
213
|
-
dx?: number;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* The vertical offset between the text and its anchor point, in pixels.
|
|
217
|
-
* Applied after the rotation by `angle`.
|
|
218
|
-
*/
|
|
219
|
-
dy?: number;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* If true, sets the secondary positional channel that allows the text to be squeezed
|
|
223
|
-
* (see the `squeeze` property).
|
|
224
|
-
* Can be used when:
|
|
225
|
-
* 1) `"band"`, `"index"`, or `"locus"` scale is being used and
|
|
226
|
-
* 2) only the primary positional channel is specified.
|
|
227
|
-
*
|
|
228
|
-
* **Default value:** `false`
|
|
229
|
-
*/
|
|
230
|
-
fitToBand?: boolean;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* The horizontal padding, in pixels, when the `x2` channel is used for ranged text.
|
|
234
|
-
*
|
|
235
|
-
* **Default value:** `0`
|
|
236
|
-
*/
|
|
237
|
-
paddingX?: number;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* The vertical padding, in pixels, when the `y2` channel is used for ranged text.
|
|
241
|
-
*
|
|
242
|
-
* **Default value:** `0`
|
|
243
|
-
*/
|
|
244
|
-
paddingY?: number;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* If true, the text is kept inside the viewport when the range of `x` and `x2`
|
|
248
|
-
* intersect the viewport.
|
|
249
|
-
*/
|
|
250
|
-
flushX?: boolean;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* If true, the text is kept inside the viewport when the range of `y` and `y2`
|
|
254
|
-
* intersect the viewport.
|
|
255
|
-
*/
|
|
256
|
-
flushY?: boolean;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* If the `squeeze` property is true and secondary positional channels (`x2` and/or `y2`)
|
|
260
|
-
* are used, the text is scaled to fit mark's width and/or height.
|
|
261
|
-
*
|
|
262
|
-
* **Default value:** `true`
|
|
263
|
-
*/
|
|
264
|
-
squeeze?: boolean;
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Stretch letters so that they can be used with [sequence logos](https://en.wikipedia.org/wiki/Sequence_logo), etc...
|
|
268
|
-
*/
|
|
269
|
-
logoLetters?: boolean;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export interface PointProps extends AngleProps {
|
|
273
|
-
/**
|
|
274
|
-
* One of `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
|
|
275
|
-
* `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`.
|
|
276
|
-
*
|
|
277
|
-
* **Default value:** `"circle"`
|
|
278
|
-
*/
|
|
279
|
-
shape?: string;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Should the stroke only grow inwards, e.g, the diameter/outline is not affected by the stroke width.
|
|
283
|
-
* Thus, a point that has a zero size has no visible stroke. This allows strokes to be used with
|
|
284
|
-
* geometric zoom, etc.
|
|
285
|
-
*
|
|
286
|
-
* **Default value:** `false`
|
|
287
|
-
*/
|
|
288
|
-
inwardStroke?: boolean;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Gradient strength controls the amount of the gradient eye-candy effect in the fill color.
|
|
292
|
-
* Valid values are between 0 and 1.
|
|
293
|
-
*
|
|
294
|
-
* **Default value:** `0`
|
|
295
|
-
*/
|
|
296
|
-
fillGradientStrength?: number;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Padding between sample facet's upper/lower edge and the maximum point size. This property
|
|
300
|
-
* controls how tightly points are squeezed when facet's height is smaller than the maximum
|
|
301
|
-
* point size. The unit is a proportion of facet's height. The value must be between `0`
|
|
302
|
-
* and `0.5`. This property has no effect when sample faceting is not used.
|
|
303
|
-
*
|
|
304
|
-
* **Default value:** `0.1`
|
|
305
|
-
*/
|
|
306
|
-
sampleFacetPadding?: number;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* TODO
|
|
310
|
-
*
|
|
311
|
-
* **Default value:** `0.02`
|
|
312
|
-
*/
|
|
313
|
-
semanticZoomFraction?: number;
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Enables geometric zooming. The value is the base two logarithmic zoom level where the maximum
|
|
317
|
-
* point size is reached.
|
|
318
|
-
*
|
|
319
|
-
* **Default value:** `0`
|
|
320
|
-
*/
|
|
321
|
-
geometricZoomBound?: number;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export interface LinkProps extends SecondaryPositionProps {
|
|
325
|
-
/**
|
|
326
|
-
* The number of segments in the bézier curve. Affects the rendering quality and performance.
|
|
327
|
-
* Use a higher value for a smoother curve.
|
|
328
|
-
*
|
|
329
|
-
* **Default value:* `101`
|
|
330
|
-
*/
|
|
331
|
-
segments?: number;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Scaling factor of the arc's sagitta. The default value `1.0` produces roughly circular arcs.
|
|
335
|
-
*
|
|
336
|
-
* **Default value:** `1.0`
|
|
337
|
-
*/
|
|
338
|
-
sagittaScaleFactor?: number;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Minimum length of the arc's sagitta. Makes very short links more clearly visible.
|
|
342
|
-
*
|
|
343
|
-
* **Default value:** `1.5`
|
|
344
|
-
*/
|
|
345
|
-
minSagittaLength?: number;
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* TODO
|
|
349
|
-
*/
|
|
350
|
-
color2?: string;
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* TODO
|
|
354
|
-
*/
|
|
355
|
-
size2?: number;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// TODO: Mark-specific configs
|
|
359
|
-
export interface MarkConfig
|
|
360
|
-
extends PointProps,
|
|
361
|
-
RectProps,
|
|
362
|
-
TextProps,
|
|
363
|
-
RuleProps,
|
|
364
|
-
LinkProps,
|
|
365
|
-
FillAndStrokeProps {
|
|
366
|
-
// Channels.
|
|
367
|
-
x?: number;
|
|
368
|
-
y?: number;
|
|
369
|
-
color?: string;
|
|
370
|
-
opacity?: number;
|
|
371
|
-
size?: number;
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Whether the `color` represents the `fill` color (`true`) or the `stroke` color (`false`).
|
|
375
|
-
*/
|
|
376
|
-
filled?: boolean;
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* If true, the mark is clipped to the UnitView's rectangle. By default, clipping
|
|
380
|
-
* is enabled for marks that have zoomable positional scales.
|
|
381
|
-
*/
|
|
382
|
-
clip?: boolean;
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Offsets of the `x` and `x2` coordinates in pixels. The offset is applied
|
|
386
|
-
* after the viewport scaling and translation.
|
|
387
|
-
*
|
|
388
|
-
* **Default value:** `0`
|
|
389
|
-
*/
|
|
390
|
-
xOffset?: number;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Offsets of the `y` and `y2` coordinates in pixels. The offset is applied
|
|
394
|
-
* after the viewport scaling and translation.
|
|
395
|
-
*
|
|
396
|
-
* **Default value:** `0`
|
|
397
|
-
*/
|
|
398
|
-
yOffset?: number;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* TODO
|
|
402
|
-
*/
|
|
403
|
-
tooltip?: Tooltip;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* The stroke width in pixels.
|
|
407
|
-
*/
|
|
408
|
-
strokeWidth?: number;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Minimum size for WebGL buffers (number of data items).
|
|
412
|
-
* Allows for using `bufferSubData()` to update graphics.
|
|
413
|
-
*
|
|
414
|
-
* This property is intended for internal use.
|
|
415
|
-
*/
|
|
416
|
-
minBufferSize?: number;
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Builds and index for efficient rendering of subsets of the data.
|
|
420
|
-
* The data must be sorted by the x coordinate.
|
|
421
|
-
*
|
|
422
|
-
* TODO: This should be enabled automatically if the data are sorted.
|
|
423
|
-
*/
|
|
424
|
-
buildIndex?: boolean;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
export interface MarkConfigAndType extends MarkConfig {
|
|
428
|
-
type: MarkType;
|
|
429
|
-
}
|
package/src/spec/root.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { GenomeConfig } from "./genome";
|
|
2
|
-
import { ViewSpec } from "./view";
|
|
3
|
-
|
|
4
|
-
interface RootConfig {
|
|
5
|
-
$schema?: string;
|
|
6
|
-
|
|
7
|
-
genome?: GenomeConfig;
|
|
8
|
-
|
|
9
|
-
baseUrl?: string;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* https://vega.github.io/vega-lite/docs/data.html#datasets
|
|
13
|
-
*/
|
|
14
|
-
datasets?: Record<string, any[]>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type RootSpec = ViewSpec & RootConfig;
|
package/src/spec/sampleView.d.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { Type } from "./channel";
|
|
2
|
-
import { Data } from "./data";
|
|
3
|
-
import { Align, FontStyle, FontWeight } from "./font";
|
|
4
|
-
import { Scale } from "./scale";
|
|
5
|
-
import { LayerSpec, UnitSpec, ViewSpecBase } from "./view";
|
|
6
|
-
|
|
7
|
-
// TODO: Figure out how this could be moved to the app package and excluded
|
|
8
|
-
// from the core package.
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A view specification for a SampleView.
|
|
12
|
-
* This is only functional in the GenomeSpy app.
|
|
13
|
-
*/
|
|
14
|
-
export interface SampleSpec extends ViewSpecBase {
|
|
15
|
-
/**
|
|
16
|
-
* Sample metadata definition.
|
|
17
|
-
* If the object is empty, the sample identifiers will be inferred from the data.
|
|
18
|
-
*/
|
|
19
|
-
samples: SampleDef;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The view specification to be repeated for each sample.
|
|
23
|
-
*/
|
|
24
|
-
spec: LayerSpec | UnitSpec;
|
|
25
|
-
|
|
26
|
-
stickySummaries?: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface SampleAttributeDef {
|
|
30
|
-
/**
|
|
31
|
-
* The attribute type. One of `"nominal"`, `"ordinal"`, or `"quantitative"`.
|
|
32
|
-
*/
|
|
33
|
-
type: Type; // TODO: Omit index/locus from available types
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Scale definition for the (default) color channel
|
|
37
|
-
*/
|
|
38
|
-
scale?: Scale;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* An optional scale definition for mapping the attribute to
|
|
42
|
-
* the width of a metadata rectangle.
|
|
43
|
-
*/
|
|
44
|
-
barScale?: Scale;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Width of the column in pixels.
|
|
48
|
-
*/
|
|
49
|
-
width?: number;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Whether the attribute is visible by default.
|
|
53
|
-
*/
|
|
54
|
-
visible?: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface SampleDef {
|
|
58
|
-
/**
|
|
59
|
-
* Optional metadata about the samples.
|
|
60
|
-
*/
|
|
61
|
-
data?: Data;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Explicitly specify the sample attributes.
|
|
65
|
-
*/
|
|
66
|
-
attributes?: Record<string, SampleAttributeDef>;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Text in the label title
|
|
70
|
-
*
|
|
71
|
-
* **Default:** `"Sample name"`
|
|
72
|
-
*/
|
|
73
|
-
labelTitleText?: string;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* How much space in pixels to reserve for the labels.
|
|
77
|
-
*
|
|
78
|
-
* **Default:** `140`
|
|
79
|
-
*/
|
|
80
|
-
labelLength?: number;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The font typeface. GenomeSpy uses [SDF](https://github.com/Chlumsky/msdfgen)
|
|
84
|
-
* versions of [Google Fonts](https://fonts.google.com/). Check their
|
|
85
|
-
* availability at the [A-Frame
|
|
86
|
-
* Fonts](https://github.com/etiennepinchon/aframe-fonts/tree/master/fonts)
|
|
87
|
-
* repository. System fonts are **not** supported.
|
|
88
|
-
*
|
|
89
|
-
* **Default value:** `"Lato"`
|
|
90
|
-
*/
|
|
91
|
-
labelFont?: string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The font style. Valid values: `"normal"` and `"italic"`.
|
|
95
|
-
*
|
|
96
|
-
* **Default value:** `"normal"`
|
|
97
|
-
*/
|
|
98
|
-
labelFontStyle?: FontStyle;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The font weight. The following strings and numbers are valid values:
|
|
102
|
-
* `"thin"` (`100`), `"light"` (`300`), `"regular"` (`400`),
|
|
103
|
-
* `"normal"` (`400`), `"medium"` (`500`), `"bold"` (`700`),
|
|
104
|
-
* `"black"` (`900`)
|
|
105
|
-
*
|
|
106
|
-
* **Default value:** `"regular"`
|
|
107
|
-
*/
|
|
108
|
-
labelFontWeight?: FontWeight;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* The font size in pixels.
|
|
112
|
-
*
|
|
113
|
-
* **Default value:** `11`
|
|
114
|
-
*/
|
|
115
|
-
labelFontSize?: number;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* The horizontal alignment of the text. One of `"left"`, `"center"`, or `"right"`.
|
|
119
|
-
*
|
|
120
|
-
* **Default value:** `"left"`
|
|
121
|
-
*/
|
|
122
|
-
labelAlign?: Align;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Default size (width) of the metadata attribute columns.
|
|
126
|
-
* Can be configured per attribute using the `attributes` property.
|
|
127
|
-
*
|
|
128
|
-
* **Default value:** `10`
|
|
129
|
-
*/
|
|
130
|
-
attributeSize?: number;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The font typeface. GenomeSpy uses [SDF](https://github.com/Chlumsky/msdfgen)
|
|
134
|
-
* versions of [Google Fonts](https://fonts.google.com/). Check their
|
|
135
|
-
* availability at the [A-Frame
|
|
136
|
-
* Fonts](https://github.com/etiennepinchon/aframe-fonts/tree/master/fonts)
|
|
137
|
-
* repository. System fonts are **not** supported.
|
|
138
|
-
*
|
|
139
|
-
* **Default value:** `"Lato"`
|
|
140
|
-
*/
|
|
141
|
-
attributeLabelFont?: string;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* The font style. Valid values: `"normal"` and `"italic"`.
|
|
145
|
-
*
|
|
146
|
-
* **Default value:** `"normal"`
|
|
147
|
-
*/
|
|
148
|
-
attributeLabelFontStyle?: FontStyle;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The font weight. The following strings and numbers are valid values:
|
|
152
|
-
* `"thin"` (`100`), `"light"` (`300`), `"regular"` (`400`),
|
|
153
|
-
* `"normal"` (`400`), `"medium"` (`500`), `"bold"` (`700`),
|
|
154
|
-
* `"black"` (`900`)
|
|
155
|
-
*
|
|
156
|
-
* **Default value:** `"regular"`
|
|
157
|
-
*/
|
|
158
|
-
attributeLabelFontWeight?: FontWeight;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* The font size in pixels.
|
|
162
|
-
*
|
|
163
|
-
* **Default value:** `11`
|
|
164
|
-
*/
|
|
165
|
-
attributeLabelFontSize?: number;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Angle to be added to the default label angle (-90).
|
|
169
|
-
*
|
|
170
|
-
* **Default value:** `0`
|
|
171
|
-
*/
|
|
172
|
-
attributeLabelAngle?: number;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Spacing between attribute columns in pixels.
|
|
176
|
-
*
|
|
177
|
-
* **Default value:** `1`
|
|
178
|
-
*/
|
|
179
|
-
attributeSpacing?: number;
|
|
180
|
-
}
|