@rtemis/draw 0.0.0-stage → 0.1.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/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,51 @@
1
- # Temporary Holding Version
1
+ # @rtemis/draw
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
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
+ `a3SurfaceHints(document, config, appearance)` returns the height that keeps the layout's row spacing, the plot body height, and the glyph sizes, for a renderer that sizes its surface before drawing.
34
+
35
+ ## In rtemis.draw
36
+
37
+ 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. The `rtemis-draw` widget declares it as a dependency and builds the option of a `BuildRequest` with it; `save_drawing()` builds the same request in Node.js. From the repository root:
38
+
39
+ ```sh
40
+ just ts-test # type check, Biome, Vitest
41
+ just ts-bundle # build, then copy the bundle into the R package
42
+ just ts-bundle-check # fail when the R package's copy differs from a fresh build
43
+ ```
44
+
45
+ ## Tests
46
+
47
+ `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.
48
+
49
+ ## License
50
+
51
+ [BSD 3-Clause](LICENSE.txt)
@@ -0,0 +1,97 @@
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#config-contract).
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/notes#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
+ /** The sizes a renderer needs to fit an A3 option to its surface. */
77
+ export interface A3SurfaceHints {
78
+ /** Chart height in pixels that keeps the row spacing of the layout. */
79
+ readonly height: number;
80
+ /** Height in pixels of the plot body, from the first row to the last. */
81
+ readonly bodyHeight: number;
82
+ /** Residue marker size in pixels. */
83
+ readonly markerSize: number;
84
+ /** Residue label font size in pixels. */
85
+ readonly fontSize: number;
86
+ /** Gap between residues. */
87
+ readonly residueSpacing: number;
88
+ /** Gap in pixels between the plot and the legend rail. */
89
+ readonly legendGap: number;
90
+ }
91
+ /**
92
+ * The height and glyph sizes of an A3 diagram, for a renderer that sizes its
93
+ * surface before drawing (rtemislive's chart container, rtemis.draw's widget
94
+ * and SVG export).
95
+ */
96
+ export declare function a3SurfaceHints(document: A3Data, config?: A3ChartConfig, appearance?: A3Appearance): A3SurfaceHints;
97
+ //# 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;AAIzC,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,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,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E,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,CAGjB;AAED,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4BAA4B;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,aAAkB,EAC1B,UAAU,GAAE,YAAiB,GAC5B,cAAc,CAYhB"}
@@ -0,0 +1,116 @@
1
+ import { createA3EChartsOption } from "./echarts.js";
2
+ import { createA3LayoutModel, resolveA3VisualizationHeight } from "./layout.js";
3
+ import { DARK_A3_VISUALIZATION_THEME } from "./palette.js";
4
+ /** Every member of {@link A3ChartConfig}, checked against `chart/a3/v1`. */
5
+ export const A3_CHART_CONFIG_MEMBERS = Object.freeze([
6
+ "type",
7
+ "n_per_row",
8
+ "position_every",
9
+ "ptm_placement",
10
+ "zoom",
11
+ "residue_spacing",
12
+ "marker_size",
13
+ "font_size",
14
+ "line_width",
15
+ "show_markers",
16
+ "show_labels",
17
+ "annotation_gap",
18
+ "position_label_gap",
19
+ "region_opacity",
20
+ "residue_fill",
21
+ "residue_stroke",
22
+ "label_color",
23
+ "pos_label_color",
24
+ "variant_color",
25
+ "disease_variant_color",
26
+ "title",
27
+ ]);
28
+ const _everyMember = true;
29
+ void _everyMember;
30
+ /**
31
+ * Build the ECharts option of an A3 diagram from an A3 document and its
32
+ * `chart/a3/v1` config.
33
+ */
34
+ export function buildA3Option(document, config = {}, appearance = {}) {
35
+ const option = createA3EChartsOption(document, visualizationOptions(config, appearance));
36
+ return config.zoom === false ? option : Object.freeze({ ...option, dataZoom: A3_ZOOM });
37
+ }
38
+ /**
39
+ * The height and glyph sizes of an A3 diagram, for a renderer that sizes its
40
+ * surface before drawing (rtemislive's chart container, rtemis.draw's widget
41
+ * and SVG export).
42
+ */
43
+ export function a3SurfaceHints(document, config = {}, appearance = {}) {
44
+ const options = visualizationOptions(config, appearance);
45
+ const model = createA3LayoutModel(document, options);
46
+ const markerSize = options.markerSize ?? 28;
47
+ return Object.freeze({
48
+ height: resolveA3VisualizationHeight(document, options),
49
+ bodyHeight: markerSize * (2 * (model.bounds.maxY - model.bounds.minY) + 1),
50
+ markerSize,
51
+ fontSize: options.fontSize ?? 18,
52
+ residueSpacing: options.residueSpacing ?? 0.3,
53
+ legendGap: options.legendGap ?? 90,
54
+ });
55
+ }
56
+ function visualizationOptions(config, appearance) {
57
+ const dark = appearance.dark ?? false;
58
+ const base = dark ? DARK_A3_VISUALIZATION_THEME : {};
59
+ const theme = {
60
+ ...base,
61
+ ...(appearance.fontFamily
62
+ ? {
63
+ annotationFontFamily: appearance.fontFamily,
64
+ legendFontFamily: appearance.fontFamily,
65
+ }
66
+ : {}),
67
+ ...colorOverride("residueStrokeColor", config.residue_stroke),
68
+ ...colorOverride("labelColor", config.label_color),
69
+ ...colorOverride("positionLabelColor", config.pos_label_color),
70
+ ...colorOverride("variantColor", config.variant_color),
71
+ ...colorOverride("diseaseVariantColor", config.disease_variant_color),
72
+ };
73
+ return {
74
+ nPerRow: config.n_per_row ?? 21,
75
+ residueSpacing: config.residue_spacing ?? 0.3,
76
+ showMarkers: config.show_markers ?? true,
77
+ showLabels: config.show_labels ?? true,
78
+ positionEvery: config.position_every === undefined ? 10 : config.position_every,
79
+ markerSize: config.marker_size ?? 28,
80
+ fontSize: config.font_size ?? 18,
81
+ lineWidth: config.line_width ?? 2,
82
+ annotationGap: config.annotation_gap ?? 16,
83
+ positionLabelGap: config.position_label_gap ?? 16,
84
+ markerColor: config.residue_fill ?? (dark ? "#181818" : "#efefef"),
85
+ regionOpacity: config.region_opacity ?? 0.3,
86
+ ptmPlacement: config.ptm_placement ?? "radial",
87
+ legendGap: appearance.legendGap ?? 90,
88
+ enableAnimation: appearance.animation ?? true,
89
+ theme,
90
+ ...(config.title ? { title: config.title } : {}),
91
+ ...(appearance.titleTop === undefined ? {} : { titleTop: appearance.titleTop }),
92
+ };
93
+ }
94
+ // Shift+wheel zooms the sequence axis and drag pans it, so the plain wheel
95
+ // scrolls the host page (spec: draw/zoom-controls#design).
96
+ const A3_ZOOM = Object.freeze([
97
+ {
98
+ type: "inside",
99
+ xAxisIndex: 0,
100
+ zoomOnMouseWheel: "shift",
101
+ moveOnMouseMove: true,
102
+ moveOnMouseWheel: true,
103
+ preventDefaultMouseMove: false,
104
+ },
105
+ {
106
+ type: "inside",
107
+ yAxisIndex: 0,
108
+ zoomOnMouseWheel: false,
109
+ moveOnMouseWheel: false,
110
+ moveOnMouseMove: false,
111
+ },
112
+ ]);
113
+ function colorOverride(key, value) {
114
+ return value ? { [key]: value } : {};
115
+ }
116
+ //# 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,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AA0D3D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,u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AK;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"}