@rtemis/draw 0.0.0-stage → 0.1.0
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/LICENSE.txt +30 -0
- package/README.md +48 -2
- package/dist/charts/a3/config.d.ts +76 -0
- package/dist/charts/a3/config.d.ts.map +1 -0
- package/dist/charts/a3/config.js +95 -0
- package/dist/charts/a3/config.js.map +1 -0
- package/dist/charts/a3/echarts.d.ts +6 -0
- package/dist/charts/a3/echarts.d.ts.map +1 -0
- package/dist/charts/a3/echarts.js +556 -0
- package/dist/charts/a3/echarts.js.map +1 -0
- package/dist/charts/a3/index.d.ts +4 -0
- package/dist/charts/a3/index.d.ts.map +1 -0
- package/dist/charts/a3/index.js +2 -0
- package/dist/charts/a3/index.js.map +1 -0
- package/dist/charts/a3/layout.d.ts +33 -0
- package/dist/charts/a3/layout.d.ts.map +1 -0
- package/dist/charts/a3/layout.js +192 -0
- package/dist/charts/a3/layout.js.map +1 -0
- package/dist/charts/a3/palette.d.ts +24 -0
- package/dist/charts/a3/palette.d.ts.map +1 -0
- package/dist/charts/a3/palette.js +129 -0
- package/dist/charts/a3/palette.js.map +1 -0
- package/dist/charts/a3/types.d.ts +164 -0
- package/dist/charts/a3/types.d.ts.map +1 -0
- package/dist/charts/a3/types.js +2 -0
- package/dist/charts/a3/types.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/rtemis-draw-builders.cjs +905 -0
- package/package.json +45 -4
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, E.D. Gennatas
|
|
4
|
+
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
|
8
|
+
modification, are permitted provided that the following conditions are met:
|
|
9
|
+
|
|
10
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
11
|
+
list of conditions and the following disclaimer.
|
|
12
|
+
|
|
13
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
14
|
+
this list of conditions and the following disclaimer in the documentation
|
|
15
|
+
and/or other materials provided with the distribution.
|
|
16
|
+
|
|
17
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
18
|
+
contributors may be used to endorse or promote products derived from
|
|
19
|
+
this software without specific prior written permission.
|
|
20
|
+
|
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
22
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
23
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
24
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
25
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
26
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
27
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
28
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
29
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rtemis/draw
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
ECharts option builders shared by [rtemis.draw](../r) and rtemislive. Each builder takes a chart's data and its config, an instance of the published `chart/<type>/v1` schema, and returns the ECharts option. rtemis.draw's widgets and rtemislive call the same builder, so a chart has one definition in R and in the browser.
|
|
4
|
+
|
|
5
|
+
The package has no runtime dependencies and runs in browsers and in Node.js.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { buildA3Option } from "@rtemis/draw"
|
|
11
|
+
import * as echarts from "echarts"
|
|
12
|
+
|
|
13
|
+
const option = buildA3Option(a3Document, { n_per_row: 30, ptm_placement: "outerRadial" }, { dark: true })
|
|
14
|
+
echarts.init(element).setOption(option)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`builders` maps each chart type to its builder:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { builders } from "@rtemis/draw"
|
|
21
|
+
|
|
22
|
+
const option = builders.a3(a3Document, config)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Charts
|
|
26
|
+
|
|
27
|
+
| Type | Builder | Data | Config schema |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| `a3` | `buildA3Option(document, config, appearance)` | an A3 document (`@rtemis/a3` `A3Data`) | `https://schema.rtemis.org/chart/a3/v1/schema.json` |
|
|
30
|
+
|
|
31
|
+
`appearance` holds what every chart type shares and the config does not: the light or dark theme, the font family, the title inset, the legend gap, and animation. Every member of `config` and `appearance` is optional.
|
|
32
|
+
|
|
33
|
+
## In rtemis.draw
|
|
34
|
+
|
|
35
|
+
rtemis.draw ships the builders as one script, `r/inst/htmlwidgets/lib/draw/rtemis-draw-builders.js`, which defines the global `RtemisDraw` in a browser and is a CommonJS module in Node.js. From the repository root:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
just ts-test # type check, Biome, Vitest
|
|
39
|
+
just ts-bundle # build, then copy the bundle into the R package
|
|
40
|
+
just ts-bundle-check # fail when the R package's copy differs from a fresh build
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Tests
|
|
44
|
+
|
|
45
|
+
`tests/corpus/` holds cases of (type, data, config, appearance) and the option each produces, serialized as JSON. `RTEMIS_DRAW_CORPUS_WRITE=1 pnpm vitest run` rewrites the expected options after an intended change.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
[BSD 3-Clause](LICENSE.txt)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { A3Data } from "@rtemis/a3";
|
|
2
|
+
import type { A3EChartsOption, A3PtmPlacement } from "./types.ts";
|
|
3
|
+
/**
|
|
4
|
+
* An instance of the `chart/a3/v1` schema, written by rtemis.draw's `A3Config`
|
|
5
|
+
* class. Every member is optional; an absent member takes the default below.
|
|
6
|
+
* `annotation_gap` and `position_label_gap` are members the R class gains
|
|
7
|
+
* with this package (spec: draw/shared-builders#a3-option-inventory).
|
|
8
|
+
*/
|
|
9
|
+
export interface A3ChartConfig {
|
|
10
|
+
readonly type?: "a3";
|
|
11
|
+
/** Residues per row. Default 21. */
|
|
12
|
+
readonly n_per_row?: number;
|
|
13
|
+
/** Label every nth position; `null` draws no position labels. Default 10. */
|
|
14
|
+
readonly position_every?: number | null;
|
|
15
|
+
/** How modifications are placed relative to the backbone. Default `"radial"`. */
|
|
16
|
+
readonly ptm_placement?: A3PtmPlacement;
|
|
17
|
+
/** Shift+wheel zoom and drag panning along the sequence. Default `true`. */
|
|
18
|
+
readonly zoom?: boolean;
|
|
19
|
+
/** Gap between residues. Default 0.3. */
|
|
20
|
+
readonly residue_spacing?: number;
|
|
21
|
+
/** Residue marker size in pixels. Default 28. */
|
|
22
|
+
readonly marker_size?: number;
|
|
23
|
+
/** Residue label font size in pixels. Default 18. */
|
|
24
|
+
readonly font_size?: number;
|
|
25
|
+
/** Backbone line width in pixels. Default 2. */
|
|
26
|
+
readonly line_width?: number;
|
|
27
|
+
/** Draw residue markers. Default `true`. */
|
|
28
|
+
readonly show_markers?: boolean;
|
|
29
|
+
/** Draw residue labels. Default `true`. */
|
|
30
|
+
readonly show_labels?: boolean;
|
|
31
|
+
/** Gap in pixels between residue anchors and processing overlays. Default 16. */
|
|
32
|
+
readonly annotation_gap?: number;
|
|
33
|
+
/** Gap in pixels between residue anchors and position labels. Default 16. */
|
|
34
|
+
readonly position_label_gap?: number;
|
|
35
|
+
/** Region band opacity in [0, 1]. Default 0.3. */
|
|
36
|
+
readonly region_opacity?: number;
|
|
37
|
+
/** Residue marker fill; `null` selects the theme color. */
|
|
38
|
+
readonly residue_fill?: string | null;
|
|
39
|
+
/** Residue marker outline; `null` selects the theme color. */
|
|
40
|
+
readonly residue_stroke?: string | null;
|
|
41
|
+
/** Residue label color; `null` selects the theme color. */
|
|
42
|
+
readonly label_color?: string | null;
|
|
43
|
+
/** Position label color; `null` selects the theme color. */
|
|
44
|
+
readonly pos_label_color?: string | null;
|
|
45
|
+
/** Variant label color; `null` selects the theme color. */
|
|
46
|
+
readonly variant_color?: string | null;
|
|
47
|
+
/** Disease-associated variant label color; `null` selects the theme color. */
|
|
48
|
+
readonly disease_variant_color?: string | null;
|
|
49
|
+
/** Chart title. */
|
|
50
|
+
readonly title?: string | null;
|
|
51
|
+
}
|
|
52
|
+
/** Every member of {@link A3ChartConfig}, checked against `chart/a3/v1`. */
|
|
53
|
+
export declare const A3_CHART_CONFIG_MEMBERS: readonly ["type", "n_per_row", "position_every", "ptm_placement", "zoom", "residue_spacing", "marker_size", "font_size", "line_width", "show_markers", "show_labels", "annotation_gap", "position_label_gap", "region_opacity", "residue_fill", "residue_stroke", "label_color", "pos_label_color", "variant_color", "disease_variant_color", "title"];
|
|
54
|
+
/**
|
|
55
|
+
* Appearance shared by every chart type, and the light or dark theme. The
|
|
56
|
+
* defaults equal rtemislive's A3 defaults until the appearance contract is
|
|
57
|
+
* reconciled across chart types (spec: draw/shared-builders#inputs-that-are-not-the-chart-config).
|
|
58
|
+
*/
|
|
59
|
+
export interface A3Appearance {
|
|
60
|
+
/** Select the dark theme. Default `false`. */
|
|
61
|
+
readonly dark?: boolean;
|
|
62
|
+
/** Font family for residue labels, titles, and the legend. */
|
|
63
|
+
readonly fontFamily?: string;
|
|
64
|
+
/** Vertical inset of the title in pixels. */
|
|
65
|
+
readonly titleTop?: number;
|
|
66
|
+
/** Gap in pixels between the plot and the legend rail. Default 90. */
|
|
67
|
+
readonly legendGap?: number;
|
|
68
|
+
/** Animate the first render and updates. Default `true`. */
|
|
69
|
+
readonly animation?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build the ECharts option of an A3 diagram from an A3 document and its
|
|
73
|
+
* `chart/a3/v1` config.
|
|
74
|
+
*/
|
|
75
|
+
export declare function buildA3Option(document: A3Data, config?: A3ChartConfig, appearance?: A3Appearance): A3EChartsOption;
|
|
76
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAGf,MAAM,YAAY,CAAC;AAEpB;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC;IACrB,oCAAoC;IACpC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,iFAAiF;IACjF,QAAQ,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC;IACxC,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACxB,yCAAyC;IACzC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,iDAAiD;IACjD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC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AC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,aAAkB,EAC1B,UAAU,GAAE,YAAiB,GAC5B,eAAe,CAuCjB"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { createA3EChartsOption } from "./echarts.js";
|
|
2
|
+
import { DARK_A3_VISUALIZATION_THEME } from "./palette.js";
|
|
3
|
+
/** Every member of {@link A3ChartConfig}, checked against `chart/a3/v1`. */
|
|
4
|
+
export const A3_CHART_CONFIG_MEMBERS = Object.freeze([
|
|
5
|
+
"type",
|
|
6
|
+
"n_per_row",
|
|
7
|
+
"position_every",
|
|
8
|
+
"ptm_placement",
|
|
9
|
+
"zoom",
|
|
10
|
+
"residue_spacing",
|
|
11
|
+
"marker_size",
|
|
12
|
+
"font_size",
|
|
13
|
+
"line_width",
|
|
14
|
+
"show_markers",
|
|
15
|
+
"show_labels",
|
|
16
|
+
"annotation_gap",
|
|
17
|
+
"position_label_gap",
|
|
18
|
+
"region_opacity",
|
|
19
|
+
"residue_fill",
|
|
20
|
+
"residue_stroke",
|
|
21
|
+
"label_color",
|
|
22
|
+
"pos_label_color",
|
|
23
|
+
"variant_color",
|
|
24
|
+
"disease_variant_color",
|
|
25
|
+
"title",
|
|
26
|
+
]);
|
|
27
|
+
const _everyMember = true;
|
|
28
|
+
void _everyMember;
|
|
29
|
+
/**
|
|
30
|
+
* Build the ECharts option of an A3 diagram from an A3 document and its
|
|
31
|
+
* `chart/a3/v1` config.
|
|
32
|
+
*/
|
|
33
|
+
export function buildA3Option(document, config = {}, appearance = {}) {
|
|
34
|
+
const dark = appearance.dark ?? false;
|
|
35
|
+
const base = dark ? DARK_A3_VISUALIZATION_THEME : {};
|
|
36
|
+
const theme = {
|
|
37
|
+
...base,
|
|
38
|
+
...(appearance.fontFamily
|
|
39
|
+
? {
|
|
40
|
+
annotationFontFamily: appearance.fontFamily,
|
|
41
|
+
legendFontFamily: appearance.fontFamily,
|
|
42
|
+
}
|
|
43
|
+
: {}),
|
|
44
|
+
...colorOverride("residueStrokeColor", config.residue_stroke),
|
|
45
|
+
...colorOverride("labelColor", config.label_color),
|
|
46
|
+
...colorOverride("positionLabelColor", config.pos_label_color),
|
|
47
|
+
...colorOverride("variantColor", config.variant_color),
|
|
48
|
+
...colorOverride("diseaseVariantColor", config.disease_variant_color),
|
|
49
|
+
};
|
|
50
|
+
const options = {
|
|
51
|
+
nPerRow: config.n_per_row ?? 21,
|
|
52
|
+
residueSpacing: config.residue_spacing ?? 0.3,
|
|
53
|
+
showMarkers: config.show_markers ?? true,
|
|
54
|
+
showLabels: config.show_labels ?? true,
|
|
55
|
+
positionEvery: config.position_every === undefined ? 10 : config.position_every,
|
|
56
|
+
markerSize: config.marker_size ?? 28,
|
|
57
|
+
fontSize: config.font_size ?? 18,
|
|
58
|
+
lineWidth: config.line_width ?? 2,
|
|
59
|
+
annotationGap: config.annotation_gap ?? 16,
|
|
60
|
+
positionLabelGap: config.position_label_gap ?? 16,
|
|
61
|
+
markerColor: config.residue_fill ?? (dark ? "#181818" : "#efefef"),
|
|
62
|
+
regionOpacity: config.region_opacity ?? 0.3,
|
|
63
|
+
ptmPlacement: config.ptm_placement ?? "radial",
|
|
64
|
+
legendGap: appearance.legendGap ?? 90,
|
|
65
|
+
enableAnimation: appearance.animation ?? true,
|
|
66
|
+
theme,
|
|
67
|
+
...(config.title ? { title: config.title } : {}),
|
|
68
|
+
...(appearance.titleTop === undefined ? {} : { titleTop: appearance.titleTop }),
|
|
69
|
+
};
|
|
70
|
+
const option = createA3EChartsOption(document, options);
|
|
71
|
+
return config.zoom === false ? option : Object.freeze({ ...option, dataZoom: A3_ZOOM });
|
|
72
|
+
}
|
|
73
|
+
// Shift+wheel zooms the sequence axis and drag pans it, so the plain wheel
|
|
74
|
+
// scrolls the host page (spec: draw/zoom-controls#design).
|
|
75
|
+
const A3_ZOOM = Object.freeze([
|
|
76
|
+
{
|
|
77
|
+
type: "inside",
|
|
78
|
+
xAxisIndex: 0,
|
|
79
|
+
zoomOnMouseWheel: "shift",
|
|
80
|
+
moveOnMouseMove: true,
|
|
81
|
+
moveOnMouseWheel: true,
|
|
82
|
+
preventDefaultMouseMove: false,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "inside",
|
|
86
|
+
yAxisIndex: 0,
|
|
87
|
+
zoomOnMouseWheel: false,
|
|
88
|
+
moveOnMouseWheel: false,
|
|
89
|
+
moveOnMouseMove: false,
|
|
90
|
+
},
|
|
91
|
+
]);
|
|
92
|
+
function colorOverride(key, value) {
|
|
93
|
+
return value ? { [key]: value } : {};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/charts/a3/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AA0D3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,MAAM;IACN,WAAW;IACX,gBAAgB;IAChB,eAAe;IACf,MAAM;IACN,iBAAiB;IACjB,aAAa;IACb,WAAW;IACX,YAAY;IACZ,cAAc;IACd,aAAa;IACb,gBAAgB;IAChB,oBAAoB;IACpB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,OAAO;CAC4C,CAAC,CAAC;AAIvD,MAAM,YAAY,GAA+C,IAAI,CAAC;AACtE,KAAK,YAAY,CAAC;AAoBlB;;;GAGG;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AU,EAAE,CAAC;QACb,gBAAgB,EAAE,KAAK;QACvB,gBAAgB,EAAE,KAAK;QACvB,eAAe,EAAE,KAAK;KACvB;CACF,CAAC,CAAC;AAEH,SAAS,aAAa,CACpB,GAA+B,EAC/B,KAAgC;IAEhC,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { A3EChartsOption, A3VisualizationInput, A3VisualizationOptions } from "./types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Builds an Apache ECharts option object using the shared A3 layout geometry.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createA3EChartsOption(input: A3VisualizationInput, options?: A3VisualizationOptions): A3EChartsOption;
|
|
6
|
+
//# sourceMappingURL=echarts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"echarts.d.ts","sourceRoot":"","sources":["../../../src/charts/a3/echarts.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAGf,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AA6CpB;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,oBAAoB,EAC3B,OAAO,GAAE,sBAA2B,GACnC,eAAe,CA6ZjB"}
|