@genome-spy/core 0.49.0 → 0.50.1
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/bundle/index.es.js +2861 -2829
- package/dist/bundle/index.js +90 -89
- package/dist/schema.json +2175 -1430
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +12 -8
- package/dist/src/gl/includes/common.glsl.js +1 -1
- package/dist/src/marks/link.d.ts +8 -1
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.fragment.glsl.js +1 -1
- package/dist/src/marks/link.js +38 -32
- package/dist/src/marks/link.vertex.glsl.js +1 -1
- package/dist/src/marks/mark.d.ts +19 -16
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +41 -27
- package/dist/src/marks/markUtils.d.ts +25 -0
- package/dist/src/marks/markUtils.d.ts.map +1 -1
- package/dist/src/marks/markUtils.js +41 -1
- package/dist/src/marks/point.common.glsl.js +1 -1
- package/dist/src/marks/point.d.ts +8 -1
- package/dist/src/marks/point.d.ts.map +1 -1
- package/dist/src/marks/point.js +29 -24
- package/dist/src/marks/point.vertex.glsl.js +1 -1
- package/dist/src/marks/rect.d.ts +8 -1
- package/dist/src/marks/rect.d.ts.map +1 -1
- package/dist/src/marks/rect.js +19 -19
- package/dist/src/marks/rule.d.ts +8 -1
- package/dist/src/marks/rule.d.ts.map +1 -1
- package/dist/src/marks/rule.js +19 -16
- package/dist/src/marks/text.d.ts +10 -1
- package/dist/src/marks/text.d.ts.map +1 -1
- package/dist/src/marks/text.fragment.glsl.js +1 -1
- package/dist/src/marks/text.js +48 -46
- package/dist/src/marks/text.vertex.glsl.js +1 -1
- package/dist/src/spec/channel.d.ts +14 -1
- package/dist/src/spec/mark.d.ts +167 -87
- package/dist/src/spec/view.d.ts +115 -39
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +1 -0
- package/dist/src/styles/genome-spy.scss +1 -0
- package/dist/src/tooltip/dataTooltipHandler.d.ts +1 -1
- package/dist/src/tooltip/dataTooltipHandler.d.ts.map +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.d.ts +1 -1
- package/dist/src/tooltip/refseqGeneTooltipHandler.d.ts.map +1 -1
- package/dist/src/view/axisResolution.d.ts +1 -1
- package/dist/src/view/axisResolution.d.ts.map +1 -1
- package/dist/src/view/axisResolution.js +1 -1
- package/dist/src/view/axisView.js +2 -2
- package/dist/src/view/flowBuilder.test.js +1 -1
- package/dist/src/view/gridView.js +1 -1
- package/dist/src/view/layout/flexLayout.d.ts +6 -0
- package/dist/src/view/layout/flexLayout.d.ts.map +1 -1
- package/dist/src/view/layout/flexLayout.js +9 -0
- package/dist/src/view/paramMediator.d.ts +7 -0
- package/dist/src/view/paramMediator.d.ts.map +1 -1
- package/dist/src/view/paramMediator.js +23 -0
- package/dist/src/view/paramMediator.test.js +20 -0
- package/dist/src/view/scaleResolution.d.ts +1 -7
- package/dist/src/view/scaleResolution.d.ts.map +1 -1
- package/dist/src/view/scaleResolution.js +24 -39
- package/dist/src/view/unitView.d.ts +3 -5
- package/dist/src/view/unitView.d.ts.map +1 -1
- package/dist/src/view/unitView.js +22 -4
- package/dist/src/view/view.js +1 -1
- package/dist/src/view/viewUtils.d.ts +1 -5
- package/dist/src/view/viewUtils.d.ts.map +1 -1
- package/dist/src/view/viewUtils.js +0 -7
- package/package.json +2 -2
package/dist/src/spec/mark.d.ts
CHANGED
|
@@ -5,22 +5,120 @@ import { Tooltip } from "./tooltip.js";
|
|
|
5
5
|
|
|
6
6
|
export type MarkType = "rect" | "point" | "rule" | "text" | "link";
|
|
7
7
|
|
|
8
|
+
export interface MarkPropsBase {
|
|
9
|
+
type: MarkType;
|
|
10
|
+
|
|
11
|
+
// Channels.
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Position on the x axis.
|
|
15
|
+
*/
|
|
16
|
+
x?: number | ExprRef;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Position on the y axis.
|
|
20
|
+
*/
|
|
21
|
+
y?: number | ExprRef;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Color of the mark. Affects either `fill` or `stroke`, depending on the `filled` property.
|
|
25
|
+
*/
|
|
26
|
+
color?: string | ExprRef;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Opacity of the mark. Affects `fillOpacity` or `strokeOpacity`, depending on the `filled` property.
|
|
30
|
+
*/
|
|
31
|
+
opacity?: number | ExprRef;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* If true, the mark is clipped to the UnitView's rectangle. By default, clipping
|
|
35
|
+
* is enabled for marks that have zoomable positional scales.
|
|
36
|
+
*/
|
|
37
|
+
clip?: boolean | "never";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Offsets of the `x` and `x2` coordinates in pixels. The offset is applied
|
|
41
|
+
* after the viewport scaling and translation.
|
|
42
|
+
*
|
|
43
|
+
* **Default value:** `0`
|
|
44
|
+
*/
|
|
45
|
+
xOffset?: number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Offsets of the `y` and `y2` coordinates in pixels. The offset is applied
|
|
49
|
+
* after the viewport scaling and translation.
|
|
50
|
+
*
|
|
51
|
+
* **Default value:** `0`
|
|
52
|
+
*/
|
|
53
|
+
yOffset?: number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Minimum size for WebGL buffers (number of data items).
|
|
57
|
+
* Allows for using `bufferSubData()` to update graphics.
|
|
58
|
+
*
|
|
59
|
+
* This property is intended for internal use.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
minBufferSize?: number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Tooltip handler. If `null`, no tooltip is shown. If string, specifies
|
|
67
|
+
* the [tooltip handler](https://genomespy.app/docs/api/#custom-tooltip-handlers)
|
|
68
|
+
* to use.
|
|
69
|
+
*/
|
|
70
|
+
tooltip?: Tooltip;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface SizeProps {
|
|
74
|
+
/**
|
|
75
|
+
* Stroke width of `"link"` and `"rule"` marks in pixels, the area of the
|
|
76
|
+
* bounding square of `"point"` mark, or the font size of `"text"` mark.
|
|
77
|
+
*/
|
|
78
|
+
size?: number | ExprRef;
|
|
79
|
+
}
|
|
80
|
+
|
|
8
81
|
export interface FillAndStrokeProps {
|
|
9
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* The stroke width in pixels.
|
|
84
|
+
*/
|
|
85
|
+
strokeWidth?: number | ExprRef;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Whether the `color` represents the `fill` color (`true`) or the `stroke` color (`false`).
|
|
89
|
+
*/
|
|
90
|
+
filled?: boolean;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The fill color.
|
|
94
|
+
*/
|
|
10
95
|
fill?: string | ExprRef;
|
|
11
96
|
|
|
12
|
-
/**
|
|
97
|
+
/**
|
|
98
|
+
* The fill opacity. Value between `0` and `1`.
|
|
99
|
+
*/
|
|
13
100
|
fillOpacity?: number | ExprRef;
|
|
14
101
|
|
|
15
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* The stroke color
|
|
104
|
+
*/
|
|
16
105
|
stroke?: string | ExprRef;
|
|
17
106
|
|
|
18
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* The stroke opacity. Value between `0` and `1`.
|
|
109
|
+
*/
|
|
19
110
|
strokeOpacity?: number | ExprRef;
|
|
20
111
|
}
|
|
21
112
|
|
|
22
113
|
export interface SecondaryPositionProps {
|
|
114
|
+
/**
|
|
115
|
+
* The secondary position on the x axis.
|
|
116
|
+
*/
|
|
23
117
|
x2?: number | ExprRef;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* The secondary position on the y axis.
|
|
121
|
+
*/
|
|
24
122
|
y2?: number | ExprRef;
|
|
25
123
|
}
|
|
26
124
|
|
|
@@ -33,6 +131,17 @@ export interface AngleProps {
|
|
|
33
131
|
angle?: number | ExprRef;
|
|
34
132
|
}
|
|
35
133
|
|
|
134
|
+
export interface MinPickingSizeProps {
|
|
135
|
+
/**
|
|
136
|
+
* The minimum picking size invisibly increases the stroke width or point diameter
|
|
137
|
+
* of marks when pointing them with the mouse cursor, making it easier to select them.
|
|
138
|
+
* The valus is the minimum size in pixels.
|
|
139
|
+
*
|
|
140
|
+
* **Default value:** `3.0` for `"link"` and `2.0` for `"point"`
|
|
141
|
+
*/
|
|
142
|
+
minPickingSize?: number | ExprRef;
|
|
143
|
+
}
|
|
144
|
+
|
|
36
145
|
/**
|
|
37
146
|
* Specifies how mark should be faded at the viewport edges.
|
|
38
147
|
* This is mainly used to make axis labels pretty.
|
|
@@ -49,7 +158,12 @@ export interface ViewportEdgeFadeProps {
|
|
|
49
158
|
viewportEdgeFadeDistanceLeft?: number;
|
|
50
159
|
}
|
|
51
160
|
|
|
52
|
-
export interface RectProps
|
|
161
|
+
export interface RectProps
|
|
162
|
+
extends MarkPropsBase,
|
|
163
|
+
SecondaryPositionProps,
|
|
164
|
+
FillAndStrokeProps {
|
|
165
|
+
type: "rect";
|
|
166
|
+
|
|
53
167
|
/**
|
|
54
168
|
* Clamps the minimum size-dependent opacity. The property does not affect the
|
|
55
169
|
* `opacity` channel. Valid values are between `0` and `1`.
|
|
@@ -120,7 +234,12 @@ export interface RectProps extends SecondaryPositionProps {
|
|
|
120
234
|
cornerRadiusBottomRight?: number | ExprRef;
|
|
121
235
|
}
|
|
122
236
|
|
|
123
|
-
export interface RuleProps
|
|
237
|
+
export interface RuleProps
|
|
238
|
+
extends MarkPropsBase,
|
|
239
|
+
SecondaryPositionProps,
|
|
240
|
+
SizeProps {
|
|
241
|
+
type: "rule";
|
|
242
|
+
|
|
124
243
|
/**
|
|
125
244
|
* The minimum length of the rule in pixels. Use this property to ensure that
|
|
126
245
|
* very short ranged rules remain visible even when the user zooms out.
|
|
@@ -152,9 +271,13 @@ export interface RuleProps extends SecondaryPositionProps {
|
|
|
152
271
|
}
|
|
153
272
|
|
|
154
273
|
export interface TextProps
|
|
155
|
-
extends
|
|
274
|
+
extends MarkPropsBase,
|
|
275
|
+
SecondaryPositionProps,
|
|
156
276
|
AngleProps,
|
|
157
|
-
ViewportEdgeFadeProps
|
|
277
|
+
ViewportEdgeFadeProps,
|
|
278
|
+
SizeProps {
|
|
279
|
+
type: "text";
|
|
280
|
+
|
|
158
281
|
/**
|
|
159
282
|
* The text to display. The format of numeric data can be customized by
|
|
160
283
|
* setting a [format specifier](https://github.com/d3/d3-format#locale_format)
|
|
@@ -276,14 +399,22 @@ export interface TextProps
|
|
|
276
399
|
logoLetters?: boolean | ExprRef;
|
|
277
400
|
}
|
|
278
401
|
|
|
279
|
-
export interface PointProps
|
|
402
|
+
export interface PointProps
|
|
403
|
+
extends MarkPropsBase,
|
|
404
|
+
FillAndStrokeProps,
|
|
405
|
+
AngleProps,
|
|
406
|
+
SizeProps,
|
|
407
|
+
MinPickingSizeProps {
|
|
408
|
+
type: "point";
|
|
409
|
+
|
|
280
410
|
/**
|
|
281
411
|
* One of `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`,
|
|
282
|
-
* `"triangle-down"`, `"triangle-right"`,
|
|
412
|
+
* `"triangle-down"`, `"triangle-right"`, `"triangle-left"`, `"tick-up"`,
|
|
413
|
+
* `"tick-down"`, `"tick-right"`, or `"tick-left"`
|
|
283
414
|
*
|
|
284
415
|
* **Default value:** `"circle"`
|
|
285
416
|
*/
|
|
286
|
-
shape?: string;
|
|
417
|
+
shape?: string | ExprRef;
|
|
287
418
|
|
|
288
419
|
/**
|
|
289
420
|
* Should the stroke only grow inwards, e.g, the diameter/outline is not affected by the stroke width.
|
|
@@ -296,7 +427,7 @@ export interface PointProps extends AngleProps {
|
|
|
296
427
|
|
|
297
428
|
/**
|
|
298
429
|
* Gradient strength controls the amount of the gradient eye-candy effect in the fill color.
|
|
299
|
-
* Valid values are between 0 and 1
|
|
430
|
+
* Valid values are between `0` and `1`.
|
|
300
431
|
*
|
|
301
432
|
* **Default value:** `0`
|
|
302
433
|
*/
|
|
@@ -318,9 +449,24 @@ export interface PointProps extends AngleProps {
|
|
|
318
449
|
geometricZoomBound?: number;
|
|
319
450
|
}
|
|
320
451
|
|
|
321
|
-
export interface LinkProps
|
|
452
|
+
export interface LinkProps
|
|
453
|
+
extends MarkPropsBase,
|
|
454
|
+
SecondaryPositionProps,
|
|
455
|
+
SizeProps,
|
|
456
|
+
MinPickingSizeProps {
|
|
457
|
+
type: "link";
|
|
458
|
+
|
|
322
459
|
/**
|
|
323
|
-
* The shape of the link path.
|
|
460
|
+
* The shape of the link path.
|
|
461
|
+
*
|
|
462
|
+
* The `"arc"` shape draws a circular arc between the two points. The apex of the
|
|
463
|
+
* arc resides on the left side of the line that connects the two points.
|
|
464
|
+
* The `"dome"` shape draws a vertical or horizontal arc with a specific height.
|
|
465
|
+
* The primary positional channel determines the apex of the arc and the secondary
|
|
466
|
+
* determines the endpoint placement.
|
|
467
|
+
* The `"diagonal"` shape draws an "S"-shaped curve between the two points.
|
|
468
|
+
* The `"line"` shape draws a straight line between the two points. See an
|
|
469
|
+
* [example](#different-link-shapes-and-orientations) of the different shapes below.
|
|
324
470
|
*
|
|
325
471
|
* **Default value:** `"arc"`
|
|
326
472
|
*/
|
|
@@ -347,7 +493,7 @@ export interface LinkProps extends SecondaryPositionProps {
|
|
|
347
493
|
* The number of segments in the bézier curve. Affects the rendering quality and performance.
|
|
348
494
|
* Use a higher value for a smoother curve.
|
|
349
495
|
*
|
|
350
|
-
* **Default value
|
|
496
|
+
* **Default value:** `101`
|
|
351
497
|
*/
|
|
352
498
|
segments?: number | ExprRef;
|
|
353
499
|
|
|
@@ -394,77 +540,11 @@ export interface LinkProps extends SecondaryPositionProps {
|
|
|
394
540
|
* **Default value:** `true`
|
|
395
541
|
*/
|
|
396
542
|
noFadingOnPointSelection?: boolean | ExprRef;
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* The minimum stroke width of the links when pointing with the mouse cursor.
|
|
400
|
-
* Allows making very thin links easier to point at.
|
|
401
|
-
*
|
|
402
|
-
* **Default value:** `3.0`
|
|
403
|
-
*/
|
|
404
|
-
minPickingSize?: number | ExprRef;
|
|
405
543
|
}
|
|
406
544
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
LinkProps,
|
|
414
|
-
FillAndStrokeProps {
|
|
415
|
-
// Channels.
|
|
416
|
-
x?: number | ExprRef;
|
|
417
|
-
y?: number | ExprRef;
|
|
418
|
-
color?: string | ExprRef;
|
|
419
|
-
opacity?: number | ExprRef;
|
|
420
|
-
size?: number | ExprRef;
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Whether the `color` represents the `fill` color (`true`) or the `stroke` color (`false`).
|
|
424
|
-
*/
|
|
425
|
-
filled?: boolean;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* If true, the mark is clipped to the UnitView's rectangle. By default, clipping
|
|
429
|
-
* is enabled for marks that have zoomable positional scales.
|
|
430
|
-
*/
|
|
431
|
-
clip?: boolean | "never";
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* Offsets of the `x` and `x2` coordinates in pixels. The offset is applied
|
|
435
|
-
* after the viewport scaling and translation.
|
|
436
|
-
*
|
|
437
|
-
* **Default value:** `0`
|
|
438
|
-
*/
|
|
439
|
-
xOffset?: number;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Offsets of the `y` and `y2` coordinates in pixels. The offset is applied
|
|
443
|
-
* after the viewport scaling and translation.
|
|
444
|
-
*
|
|
445
|
-
* **Default value:** `0`
|
|
446
|
-
*/
|
|
447
|
-
yOffset?: number;
|
|
448
|
-
|
|
449
|
-
/**
|
|
450
|
-
* TODO
|
|
451
|
-
*/
|
|
452
|
-
tooltip?: Tooltip;
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* The stroke width in pixels.
|
|
456
|
-
*/
|
|
457
|
-
strokeWidth?: number | ExprRef;
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Minimum size for WebGL buffers (number of data items).
|
|
461
|
-
* Allows for using `bufferSubData()` to update graphics.
|
|
462
|
-
*
|
|
463
|
-
* This property is intended for internal use.
|
|
464
|
-
*/
|
|
465
|
-
minBufferSize?: number;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
export interface MarkConfigAndType extends MarkProps {
|
|
469
|
-
type: MarkType;
|
|
470
|
-
}
|
|
545
|
+
export type MarkProps =
|
|
546
|
+
| RectProps
|
|
547
|
+
| TextProps
|
|
548
|
+
| RuleProps
|
|
549
|
+
| LinkProps
|
|
550
|
+
| PointProps;
|
package/dist/src/spec/view.d.ts
CHANGED
|
@@ -6,22 +6,23 @@ import {
|
|
|
6
6
|
FacetFieldDef,
|
|
7
7
|
PrimaryPositionalChannel,
|
|
8
8
|
} from "./channel.js";
|
|
9
|
-
import {
|
|
10
|
-
FillAndStrokeProps,
|
|
11
|
-
MarkConfigAndType,
|
|
12
|
-
MarkType,
|
|
13
|
-
RectProps,
|
|
14
|
-
} from "./mark.js";
|
|
9
|
+
import { FillAndStrokeProps, MarkProps, MarkType, RectProps } from "./mark.js";
|
|
15
10
|
import { ExprRef } from "./parameter.js";
|
|
16
11
|
import { Title } from "./title.js";
|
|
17
12
|
import { SampleSpec } from "./sampleView.js";
|
|
18
13
|
import { Parameter } from "./parameter.js";
|
|
19
14
|
|
|
20
15
|
export interface SizeDef {
|
|
21
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Size in pixels
|
|
18
|
+
*/
|
|
22
19
|
px?: number;
|
|
23
20
|
|
|
24
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Share of the remaining space. See [child
|
|
23
|
+
* sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
24
|
+
* for details.
|
|
25
|
+
*/
|
|
25
26
|
grow?: number;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -39,9 +40,15 @@ export interface FacetMapping {
|
|
|
39
40
|
*/
|
|
40
41
|
export interface DynamicOpacity {
|
|
41
42
|
channel?: PrimaryPositionalChannel;
|
|
42
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Stops expressed as units (base pairs, for example) per pixel.
|
|
46
|
+
*/
|
|
43
47
|
unitsPerPixel: number[];
|
|
44
|
-
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Opacity values that match the given stops.
|
|
51
|
+
*/
|
|
45
52
|
values: number[];
|
|
46
53
|
}
|
|
47
54
|
|
|
@@ -70,17 +77,25 @@ export type ViewBackground = Pick<
|
|
|
70
77
|
>;
|
|
71
78
|
|
|
72
79
|
export interface ViewSpecBase extends ResolveSpec {
|
|
80
|
+
/**
|
|
81
|
+
* An internal name that can be used for referring the view. For referencing
|
|
82
|
+
* purposes, the name should be unique within the view hierarchy.
|
|
83
|
+
*/
|
|
73
84
|
name?: string;
|
|
74
85
|
|
|
75
86
|
/**
|
|
76
87
|
* Height of the view. If a number, it is interpreted as pixels.
|
|
88
|
+
* Check [child sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
89
|
+
* for details.
|
|
77
90
|
*
|
|
78
|
-
* **Default:** `"container"`
|
|
91
|
+
* **Default value:** `"container"`
|
|
79
92
|
*/
|
|
80
93
|
height?: SizeDef | number | Step | "container";
|
|
81
94
|
|
|
82
95
|
/**
|
|
83
96
|
* Width of the view. If a number, it is interpreted as pixels.
|
|
97
|
+
* Check [child sizing](https://genomespy.app/docs/grammar/composition/concat/#child-sizing)
|
|
98
|
+
* for details.
|
|
84
99
|
*
|
|
85
100
|
* **Default:** `"container"`
|
|
86
101
|
*/
|
|
@@ -88,7 +103,8 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
88
103
|
|
|
89
104
|
/**
|
|
90
105
|
* Optional viewport height of the view. If the view size exceeds the viewport height,
|
|
91
|
-
* it will be shown with scrollbars.
|
|
106
|
+
* it will be shown with [scrollbars](https://genomespy.app/docs/grammar/composition/concat/#scrollable-viewports).
|
|
107
|
+
* This property implicitly enables clipping.
|
|
92
108
|
*
|
|
93
109
|
* **Default:** `null` (same as `height`)
|
|
94
110
|
*/
|
|
@@ -96,85 +112,140 @@ export interface ViewSpecBase extends ResolveSpec {
|
|
|
96
112
|
|
|
97
113
|
/**
|
|
98
114
|
* Optional viewport width of the view. If the view size exceeds the viewport width,
|
|
99
|
-
* it will be shown with scrollbars.
|
|
115
|
+
* it will be shown with [scrollbars](https://genomespy.app/docs/grammar/composition/concat/#scrollable-viewports).
|
|
116
|
+
* This property implicitly enables clipping.
|
|
100
117
|
*
|
|
101
118
|
* **Default:** `null` (same as `width`)
|
|
102
119
|
*/
|
|
103
120
|
viewportWidth?: SizeDef | number | "container";
|
|
104
121
|
|
|
105
122
|
/**
|
|
106
|
-
* Padding
|
|
123
|
+
* Padding applied to the view. Accepts either a number representing pixels or an
|
|
124
|
+
* object specifying separate paddings for each edge.
|
|
125
|
+
*
|
|
126
|
+
* Examples:
|
|
127
|
+
* - `padding: 10`
|
|
128
|
+
* - `padding: { top: 10, right: 20, bottom: 10, left: 20 }`
|
|
107
129
|
*
|
|
108
|
-
* **Default
|
|
130
|
+
* **Default value:** `0`
|
|
109
131
|
*/
|
|
110
132
|
padding?: PaddingConfig;
|
|
111
133
|
|
|
112
134
|
/**
|
|
113
|
-
* Dynamic variables that parameterize
|
|
135
|
+
* Dynamic variables that [parameterize](https://genomespy.app/docs/grammar/parameters/)
|
|
136
|
+
* a visualization.
|
|
114
137
|
*/
|
|
115
138
|
params?: Parameter[];
|
|
116
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Specifies a [data source](https://genomespy.app/docs/grammar/data/).
|
|
142
|
+
* If omitted, the data source is inherited from the parent view.
|
|
143
|
+
*/
|
|
117
144
|
data?: Data;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* An array of [transformations](https://genomespy.app/docs/grammar/transform/)
|
|
148
|
+
* applied to the data before visual encoding.
|
|
149
|
+
*/
|
|
118
150
|
transform?: TransformParams[];
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding)
|
|
154
|
+
* using the visual channels.
|
|
155
|
+
*/
|
|
119
156
|
encoding?: Encoding;
|
|
120
|
-
title?: string | Title;
|
|
121
157
|
|
|
122
158
|
/**
|
|
123
|
-
*
|
|
159
|
+
* View title.
|
|
160
|
+
* N.B.: Currently, GenomeSpy doesn't do bound calculation, and you need to
|
|
161
|
+
* manually specify proper padding for the view to ensure that the title is
|
|
162
|
+
* visible.
|
|
124
163
|
*/
|
|
125
|
-
|
|
164
|
+
title?: string | Title;
|
|
126
165
|
|
|
127
166
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
167
|
+
* A description of the view. Can be used for documentation. The description
|
|
168
|
+
* of the top-level view is shown in the toolbar of the [GenomeSpy
|
|
169
|
+
* App](https://genomespy.app/docs/sample-collections/).
|
|
131
170
|
*/
|
|
132
|
-
|
|
171
|
+
description?: string | string[];
|
|
133
172
|
|
|
134
173
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
174
|
+
* The base URL for relative URL data sources and URL
|
|
175
|
+
* [imports](https://genomespy.app/docs/grammar/import/#importing-from-a-url).
|
|
176
|
+
* The base URLs are inherited in the view hierarchy unless overridden with
|
|
177
|
+
* this property. By default, the top-level view's base URL equals to the
|
|
178
|
+
* visualization specification's base URL.
|
|
138
179
|
*/
|
|
139
|
-
|
|
140
|
-
opacity?: ViewOpacityDef;
|
|
180
|
+
baseUrl?: string;
|
|
141
181
|
|
|
142
182
|
/**
|
|
143
|
-
*
|
|
144
|
-
* and not rendered.
|
|
183
|
+
* The default visibility of the view. An invisible view is removed from the
|
|
184
|
+
* layout and not rendered. For context, see [toggleable view
|
|
185
|
+
* visibility](https://genomespy.app/docs/sample-collections/visualizing/#toggleable-view-visibility).
|
|
145
186
|
*
|
|
146
187
|
* **Default:** `true`
|
|
147
188
|
*/
|
|
148
|
-
// TODO: Detach invisible views from the data flow.
|
|
149
189
|
visible?: boolean;
|
|
150
190
|
|
|
151
191
|
/**
|
|
152
|
-
* Is the visibility configurable interactively from the
|
|
192
|
+
* Is the visibility configurable interactively from the [GenomeSpy
|
|
193
|
+
* App](https://genomespy.app/docs/sample-collections/).
|
|
153
194
|
* Configurability requires that the view has an explicitly specified name
|
|
154
|
-
* that is *unique* in within the view
|
|
195
|
+
* that is *unique* in within the view hierarchy.
|
|
155
196
|
*
|
|
156
197
|
* **Default:** `false` for children of `layer`, `true` for others.
|
|
157
198
|
*/
|
|
158
199
|
configurableVisibility?: boolean;
|
|
159
200
|
|
|
160
201
|
/**
|
|
161
|
-
* Templates
|
|
162
|
-
* them with the template key.
|
|
202
|
+
* [Templates](https://genomespy.app/docs/grammar/import/#repeating-with-named-templates)
|
|
203
|
+
* that can be reused within the view specification by importing them with the template key.
|
|
163
204
|
*/
|
|
164
205
|
templates?: Record<string, ViewSpec>;
|
|
165
206
|
}
|
|
166
207
|
|
|
167
|
-
export interface
|
|
208
|
+
export interface DynamicOpacitySpec {
|
|
209
|
+
/**
|
|
210
|
+
* Opacity of the view and all its children. Allows implementing semantic
|
|
211
|
+
* zooming where the layers are faded in and out as the user zooms in and out.
|
|
212
|
+
*
|
|
213
|
+
* TODO: Write proper documentation with examples.
|
|
214
|
+
*
|
|
215
|
+
* **Default:** `1.0`
|
|
216
|
+
*/
|
|
217
|
+
opacity?: ViewOpacityDef;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface UnitSpec
|
|
221
|
+
extends ViewSpecBase,
|
|
222
|
+
DynamicOpacitySpec,
|
|
223
|
+
AggregateSamplesSpec {
|
|
224
|
+
/**
|
|
225
|
+
* The background of the view, including fill, stroke, and stroke width.
|
|
226
|
+
*/
|
|
168
227
|
view?: ViewBackground;
|
|
169
|
-
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The graphical mark presenting the data objects.
|
|
231
|
+
*/
|
|
232
|
+
mark: MarkType | MarkProps;
|
|
170
233
|
}
|
|
171
234
|
|
|
235
|
+
// TODO: Some fancy generic typing that would make Aggregating available only
|
|
236
|
+
// inside SampleSpec.
|
|
172
237
|
export interface AggregateSamplesSpec {
|
|
173
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Specifies views that [aggregate](https://genomespy.app/docs/sample-collections/visualizing/#aggregation)
|
|
240
|
+
* multiple samples within the GenomeSpy App.
|
|
241
|
+
*/
|
|
174
242
|
aggregateSamples?: (UnitSpec | LayerSpec)[];
|
|
175
243
|
}
|
|
176
244
|
|
|
177
|
-
export interface LayerSpec
|
|
245
|
+
export interface LayerSpec
|
|
246
|
+
extends ViewSpecBase,
|
|
247
|
+
DynamicOpacitySpec,
|
|
248
|
+
AggregateSamplesSpec {
|
|
178
249
|
view?: ViewBackground;
|
|
179
250
|
layer: (LayerSpec | UnitSpec | ImportSpec)[];
|
|
180
251
|
}
|
|
@@ -201,6 +272,11 @@ export type ResolutionBehavior =
|
|
|
201
272
|
| "forced";
|
|
202
273
|
|
|
203
274
|
export interface ResolveSpec {
|
|
275
|
+
/**
|
|
276
|
+
* Specifies how scales and axes are
|
|
277
|
+
* [resolved](https://genomespy.app/docs/grammar/composition/#scale-and-axis-resolution)
|
|
278
|
+
* in the view hierarchy.
|
|
279
|
+
*/
|
|
204
280
|
resolve?: Partial<
|
|
205
281
|
Record<
|
|
206
282
|
ResolutionTarget,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export default css;
|
|
2
|
-
declare const css: "\n.genome-spy {\n font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n position: relative;\n display: flex;\n flex-direction: column;\n}\n.genome-spy .canvas-wrapper {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n}\n.genome-spy canvas {\n transform: scale(1, 1);\n opacity: 1;\n transition: transform 0.6s, opacity 0.6s;\n}\n.genome-spy .loading-message {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-message .message {\n color: #666;\n opacity: 0;\n transition: opacity 0.7s;\n}\n.genome-spy .loading > canvas {\n transform: scale(0.95, 0.95);\n opacity: 0;\n}\n.genome-spy .loading > .loading-message .message {\n opacity: 1;\n}\n.genome-spy .loading > .loading-message .message .ellipsis {\n animation: blinker 1s linear infinite;\n}\n@keyframes blinker {\n 50% {\n opacity: 0;\n }\n}\n.genome-spy .loading-indicators {\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n}\n.genome-spy .loading-indicators div {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-indicators div > div {\n font-size: 11px;\n transition: opacity 0.2s;\n background: white;\n padding: 2px 5px;\n display: flex;\n border-radius: 3px;\n gap: 0.5em;\n opacity: 0;\n}\n.genome-spy .loading-indicators div > div.loading {\n opacity: 0.5;\n}\n.genome-spy .loading-indicators div > div.error {\n opacity: 0.8;\n color: firebrick;\n}\n.genome-spy .loading-indicators div > div > * {\n display: block;\n}\n.genome-spy .loading-indicators div > div img {\n width: 1.5em;\n height: 1.5em;\n}\n.genome-spy .tooltip {\n position: absolute;\n max-width: 450px;\n overflow: hidden;\n background: #f6f6f6;\n padding: 10px;\n font-size: 13px;\n box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n pointer-events: none;\n z-index: 100;\n}\n.genome-spy .tooltip > :last-child {\n margin-bottom: 0;\n}\n.genome-spy .tooltip > .title {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px dashed #b6b6b6;\n}\n.genome-spy .tooltip .summary {\n font-size: 12px;\n}\n.genome-spy .tooltip table {\n border-collapse: collapse;\n}\n.genome-spy .tooltip table:first-child {\n margin-top: 0;\n}\n.genome-spy .tooltip table th,\n.genome-spy .tooltip table td {\n padding: 2px 0.4em;\n vertical-align: top;\n}\n.genome-spy .tooltip table th:first-child,\n.genome-spy .tooltip table td:first-child {\n padding-left: 0;\n}\n.genome-spy .tooltip table th {\n text-align: left;\n font-weight: bold;\n}\n.genome-spy .tooltip .color-legend {\n display: inline-block;\n width: 0.8em;\n height: 0.8em;\n margin-left: 0.4em;\n box-shadow: 0px 0px 3px 1px white;\n}\n.genome-spy .tooltip .attributes .hovered {\n background-color: #e0e0e0;\n}\n.genome-spy .tooltip .na {\n color: #aaa;\n font-style: italic;\n font-size: 80%;\n}\n.genome-spy .gene-track-tooltip .summary {\n font-size: 90%;\n}\n.genome-spy .message-box {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n}\n.genome-spy .message-box > div {\n border: 1px solid red;\n padding: 10px;\n background: #fff0f0;\n}\n\n.gs-input-binding {\n display: grid;\n grid-template-columns: max-content max-content;\n column-gap: 1em;\n row-gap: 0.3em;\n justify-items: start;\n}\n.gs-input-binding > select,\n.gs-input-binding > input:not([type=checkbox]) {\n width: 100%;\n}\n.gs-input-binding input[type=range] + span {\n display: inline-block;\n margin-left: 0.3em;\n min-width: 2.2em;\n font-variant-numeric: tabular-nums;\n}\n.gs-input-binding input[type=range],\n.gs-input-binding input[type=radio] {\n vertical-align: text-bottom;\n}\n.gs-input-binding .radio-group {\n display: flex;\n align-items: center;\n}\n.gs-input-binding .description {\n max-width: 26em;\n grid-column: 1/-1;\n color: #777;\n font-size: 90%;\n margin-top: -0.5em;\n}\n\n.gs-input-bindings {\n flex-basis: content;\n font-size: 14px;\n padding: 10px;\n}\n";
|
|
2
|
+
declare const css: "\n.genome-spy {\n font-family: system-ui, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n position: relative;\n display: flex;\n flex-direction: column;\n}\n.genome-spy .canvas-wrapper {\n position: relative;\n flex-grow: 1;\n overflow: hidden;\n}\n.genome-spy canvas {\n display: block;\n transform: scale(1, 1);\n opacity: 1;\n transition: transform 0.6s, opacity 0.6s;\n}\n.genome-spy .loading-message {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-message .message {\n color: #666;\n opacity: 0;\n transition: opacity 0.7s;\n}\n.genome-spy .loading > canvas {\n transform: scale(0.95, 0.95);\n opacity: 0;\n}\n.genome-spy .loading > .loading-message .message {\n opacity: 1;\n}\n.genome-spy .loading > .loading-message .message .ellipsis {\n animation: blinker 1s linear infinite;\n}\n@keyframes blinker {\n 50% {\n opacity: 0;\n }\n}\n.genome-spy .loading-indicators {\n position: absolute;\n inset: 0;\n user-select: none;\n pointer-events: none;\n}\n.genome-spy .loading-indicators div {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.genome-spy .loading-indicators div > div {\n font-size: 11px;\n transition: opacity 0.2s;\n background: white;\n padding: 2px 5px;\n display: flex;\n border-radius: 3px;\n gap: 0.5em;\n opacity: 0;\n}\n.genome-spy .loading-indicators div > div.loading {\n opacity: 0.5;\n}\n.genome-spy .loading-indicators div > div.error {\n opacity: 0.8;\n color: firebrick;\n}\n.genome-spy .loading-indicators div > div > * {\n display: block;\n}\n.genome-spy .loading-indicators div > div img {\n width: 1.5em;\n height: 1.5em;\n}\n.genome-spy .tooltip {\n position: absolute;\n max-width: 450px;\n overflow: hidden;\n background: #f6f6f6;\n padding: 10px;\n font-size: 13px;\n box-shadow: 0px 3px 15px 0px rgba(0, 0, 0, 0.21);\n pointer-events: none;\n z-index: 100;\n}\n.genome-spy .tooltip > :last-child {\n margin-bottom: 0;\n}\n.genome-spy .tooltip > .title {\n padding-bottom: 5px;\n margin-bottom: 5px;\n border-bottom: 1px dashed #b6b6b6;\n}\n.genome-spy .tooltip .summary {\n font-size: 12px;\n}\n.genome-spy .tooltip table {\n border-collapse: collapse;\n}\n.genome-spy .tooltip table:first-child {\n margin-top: 0;\n}\n.genome-spy .tooltip table th,\n.genome-spy .tooltip table td {\n padding: 2px 0.4em;\n vertical-align: top;\n}\n.genome-spy .tooltip table th:first-child,\n.genome-spy .tooltip table td:first-child {\n padding-left: 0;\n}\n.genome-spy .tooltip table th {\n text-align: left;\n font-weight: bold;\n}\n.genome-spy .tooltip .color-legend {\n display: inline-block;\n width: 0.8em;\n height: 0.8em;\n margin-left: 0.4em;\n box-shadow: 0px 0px 3px 1px white;\n}\n.genome-spy .tooltip .attributes .hovered {\n background-color: #e0e0e0;\n}\n.genome-spy .tooltip .na {\n color: #aaa;\n font-style: italic;\n font-size: 80%;\n}\n.genome-spy .gene-track-tooltip .summary {\n font-size: 90%;\n}\n.genome-spy .message-box {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n}\n.genome-spy .message-box > div {\n border: 1px solid red;\n padding: 10px;\n background: #fff0f0;\n}\n\n.gs-input-binding {\n display: grid;\n grid-template-columns: max-content max-content;\n column-gap: 1em;\n row-gap: 0.3em;\n justify-items: start;\n}\n.gs-input-binding > select,\n.gs-input-binding > input:not([type=checkbox]) {\n width: 100%;\n}\n.gs-input-binding input[type=range] + span {\n display: inline-block;\n margin-left: 0.3em;\n min-width: 2.2em;\n font-variant-numeric: tabular-nums;\n}\n.gs-input-binding input[type=range],\n.gs-input-binding input[type=radio] {\n vertical-align: text-bottom;\n}\n.gs-input-binding .radio-group {\n display: flex;\n align-items: center;\n}\n.gs-input-binding .description {\n max-width: 26em;\n grid-column: 1/-1;\n color: #777;\n font-size: 90%;\n margin-top: -0.5em;\n}\n\n.gs-input-bindings {\n flex-basis: content;\n font-size: 14px;\n padding: 10px;\n}\n";
|
|
3
3
|
//# sourceMappingURL=genome-spy.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"genome-spy.css.d.ts","sourceRoot":"","sources":["../../../src/styles/genome-spy.css.js"],"names":[],"mappings":";AAAA,4pIAiME"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function dataTooltipHandler(datum: Record<string, any>, mark: import("../marks/mark.js").default
|
|
1
|
+
export default function dataTooltipHandler(datum: Record<string, any>, mark: import("../marks/mark.js").default<import("../spec/mark.js").MarkProps>, params?: Record<string, any>): Promise<string | HTMLElement | import("lit-html").TemplateResult>;
|
|
2
2
|
//# sourceMappingURL=dataTooltipHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataTooltipHandler.d.ts","sourceRoot":"","sources":["../../../src/tooltip/dataTooltipHandler.js"],"names":[],"mappings":"AAMoC,
|
|
1
|
+
{"version":3,"file":"dataTooltipHandler.d.ts","sourceRoot":"","sources":["../../../src/tooltip/dataTooltipHandler.js"],"names":[],"mappings":"AAMoC,uPAMa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function refseqGeneTooltipHandler(datum: Record<string, any>, mark: import("../marks/mark.js").default
|
|
1
|
+
export default function refseqGeneTooltipHandler(datum: Record<string, any>, mark: import("../marks/mark.js").default<import("../spec/mark.js").MarkProps>, params?: Record<string, any>): Promise<string | HTMLElement | import("lit-html").TemplateResult>;
|
|
2
2
|
//# sourceMappingURL=refseqGeneTooltipHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refseqGeneTooltipHandler.d.ts","sourceRoot":"","sources":["../../../src/tooltip/refseqGeneTooltipHandler.js"],"names":[],"mappings":"AAOC,
|
|
1
|
+
{"version":3,"file":"refseqGeneTooltipHandler.d.ts","sourceRoot":"","sources":["../../../src/tooltip/refseqGeneTooltipHandler.js"],"names":[],"mappings":"AAOC,6PAQW"}
|
|
@@ -25,7 +25,7 @@ export default class AxisResolution {
|
|
|
25
25
|
*
|
|
26
26
|
* @param {AxisResolutionMember} newMember
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
addMember(newMember: AxisResolutionMember): void;
|
|
29
29
|
getAxisProps(): import("../spec/axis.js").GenomeAxis;
|
|
30
30
|
getTitle(): string;
|
|
31
31
|
}
|