@keroway/tdsl-wasm 1.28.0 → 2.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/package.json +1 -1
- package/tdsl_wasm.d.ts +18 -6
- package/tdsl_wasm.js +40 -6
- package/tdsl_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/tdsl_wasm.d.ts
CHANGED
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
* | `show_legend` | `true`, `false` | `false` |
|
|
19
19
|
* | `show_event_labels` | `true`, `false` | `false` |
|
|
20
20
|
* | `lane_height` | px per lane; `0` = renderer default (60) | `0` |
|
|
21
|
+
* | `locale` | `"en"`, `"ja"` | `"en"` |
|
|
22
|
+
*
|
|
23
|
+
* `locale` only affects structural ARIA label text (`Event:` / `Span:` /
|
|
24
|
+
* `Event range:` / `Lane:` prefixes in SVG `<g aria-label="…">`
|
|
25
|
+
* attributes). Source-derived text (titles, lane labels, years, ids) is
|
|
26
|
+
* emitted verbatim regardless of locale. Unknown values fall back to
|
|
27
|
+
* `"en"`, matching the other string fields' fallback behavior.
|
|
21
28
|
*
|
|
22
29
|
* `lane_height` controls vertical density: the SVG height, each lane band, the
|
|
23
30
|
* bar thickness and intra-lane padding all follow it. Leave it at `0` (the
|
|
@@ -48,14 +55,17 @@ export class JsRenderOptions {
|
|
|
48
55
|
/**
|
|
49
56
|
* High-level visual layout style (#543/#564/#565): `"timeline"` (default),
|
|
50
57
|
* `"group-bands"`, `"gantt"`, or `"zigzag"`. Orthogonal to `orientation`.
|
|
51
|
-
* `"zigzag"`
|
|
52
|
-
* `ZIGZAG_MAX_LANES` lanes; beyond that
|
|
53
|
-
*
|
|
54
|
-
* user-facing warning (mirroring the CLI's `--layout-style zigzag`
|
|
55
|
-
* notice) should check the timeline's lane count themselves before
|
|
56
|
-
* rendering.
|
|
58
|
+
* `"zigzag"` is supported only when the timeline has at most
|
|
59
|
+
* `ZIGZAG_MAX_LANES` lanes; beyond that `tdsl-render` returns an explicit
|
|
60
|
+
* error instead of falling back to `"timeline"` positioning.
|
|
57
61
|
*/
|
|
58
62
|
layout_style: string;
|
|
63
|
+
/**
|
|
64
|
+
* Locale for structural ARIA label text (#815): `"en"` (default) or
|
|
65
|
+
* `"ja"`. Only affects the `Event:` / `Span:` / `Event range:` /
|
|
66
|
+
* `Lane:` prefixes; source-derived text is unaffected.
|
|
67
|
+
*/
|
|
68
|
+
locale: string;
|
|
59
69
|
orientation: string;
|
|
60
70
|
theme: string;
|
|
61
71
|
}
|
|
@@ -174,10 +184,12 @@ export interface InitOutput {
|
|
|
174
184
|
readonly format_source: (a: number, b: number, c: number) => void;
|
|
175
185
|
readonly jsrenderoptions_grid: (a: number, b: number) => void;
|
|
176
186
|
readonly jsrenderoptions_layout_style: (a: number, b: number) => void;
|
|
187
|
+
readonly jsrenderoptions_locale: (a: number, b: number) => void;
|
|
177
188
|
readonly jsrenderoptions_new: () => number;
|
|
178
189
|
readonly jsrenderoptions_orientation: (a: number, b: number) => void;
|
|
179
190
|
readonly jsrenderoptions_set_grid: (a: number, b: number, c: number) => void;
|
|
180
191
|
readonly jsrenderoptions_set_layout_style: (a: number, b: number, c: number) => void;
|
|
192
|
+
readonly jsrenderoptions_set_locale: (a: number, b: number, c: number) => void;
|
|
181
193
|
readonly jsrenderoptions_set_orientation: (a: number, b: number, c: number) => void;
|
|
182
194
|
readonly jsrenderoptions_set_theme: (a: number, b: number, c: number) => void;
|
|
183
195
|
readonly jsrenderoptions_theme: (a: number, b: number) => void;
|
package/tdsl_wasm.js
CHANGED
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
* | `show_legend` | `true`, `false` | `false` |
|
|
18
18
|
* | `show_event_labels` | `true`, `false` | `false` |
|
|
19
19
|
* | `lane_height` | px per lane; `0` = renderer default (60) | `0` |
|
|
20
|
+
* | `locale` | `"en"`, `"ja"` | `"en"` |
|
|
21
|
+
*
|
|
22
|
+
* `locale` only affects structural ARIA label text (`Event:` / `Span:` /
|
|
23
|
+
* `Event range:` / `Lane:` prefixes in SVG `<g aria-label="…">`
|
|
24
|
+
* attributes). Source-derived text (titles, lane labels, years, ids) is
|
|
25
|
+
* emitted verbatim regardless of locale. Unknown values fall back to
|
|
26
|
+
* `"en"`, matching the other string fields' fallback behavior.
|
|
20
27
|
*
|
|
21
28
|
* `lane_height` controls vertical density: the SVG height, each lane band, the
|
|
22
29
|
* bar thickness and intra-lane padding all follow it. Leave it at `0` (the
|
|
@@ -88,12 +95,9 @@ export class JsRenderOptions {
|
|
|
88
95
|
/**
|
|
89
96
|
* High-level visual layout style (#543/#564/#565): `"timeline"` (default),
|
|
90
97
|
* `"group-bands"`, `"gantt"`, or `"zigzag"`. Orthogonal to `orientation`.
|
|
91
|
-
* `"zigzag"`
|
|
92
|
-
* `ZIGZAG_MAX_LANES` lanes; beyond that
|
|
93
|
-
*
|
|
94
|
-
* user-facing warning (mirroring the CLI's `--layout-style zigzag`
|
|
95
|
-
* notice) should check the timeline's lane count themselves before
|
|
96
|
-
* rendering.
|
|
98
|
+
* `"zigzag"` is supported only when the timeline has at most
|
|
99
|
+
* `ZIGZAG_MAX_LANES` lanes; beyond that `tdsl-render` returns an explicit
|
|
100
|
+
* error instead of falling back to `"timeline"` positioning.
|
|
97
101
|
* @returns {string}
|
|
98
102
|
*/
|
|
99
103
|
get layout_style() {
|
|
@@ -112,6 +116,28 @@ export class JsRenderOptions {
|
|
|
112
116
|
wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
|
|
113
117
|
}
|
|
114
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Locale for structural ARIA label text (#815): `"en"` (default) or
|
|
121
|
+
* `"ja"`. Only affects the `Event:` / `Span:` / `Event range:` /
|
|
122
|
+
* `Lane:` prefixes; source-derived text is unaffected.
|
|
123
|
+
* @returns {string}
|
|
124
|
+
*/
|
|
125
|
+
get locale() {
|
|
126
|
+
let deferred1_0;
|
|
127
|
+
let deferred1_1;
|
|
128
|
+
try {
|
|
129
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
130
|
+
wasm.jsrenderoptions_locale(retptr, this.__wbg_ptr);
|
|
131
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
132
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
133
|
+
deferred1_0 = r0;
|
|
134
|
+
deferred1_1 = r1;
|
|
135
|
+
return getStringFromWasm0(r0, r1);
|
|
136
|
+
} finally {
|
|
137
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
138
|
+
wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
115
141
|
constructor() {
|
|
116
142
|
const ret = wasm.jsrenderoptions_new();
|
|
117
143
|
this.__wbg_ptr = ret;
|
|
@@ -153,6 +179,14 @@ export class JsRenderOptions {
|
|
|
153
179
|
const len0 = WASM_VECTOR_LEN;
|
|
154
180
|
wasm.jsrenderoptions_set_layout_style(this.__wbg_ptr, ptr0, len0);
|
|
155
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* @param {string} val
|
|
184
|
+
*/
|
|
185
|
+
set locale(val) {
|
|
186
|
+
const ptr0 = passStringToWasm0(val, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
|
|
187
|
+
const len0 = WASM_VECTOR_LEN;
|
|
188
|
+
wasm.jsrenderoptions_set_locale(this.__wbg_ptr, ptr0, len0);
|
|
189
|
+
}
|
|
156
190
|
/**
|
|
157
191
|
* @param {string} val
|
|
158
192
|
*/
|
package/tdsl_wasm_bg.wasm
CHANGED
|
Binary file
|