@keroway/tdsl-wasm 1.23.0 → 1.24.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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keroway/tdsl-wasm",
3
3
  "type": "module",
4
4
  "description": "WebAssembly bindings for the Timeline DSL compiler (static compile + SVG/HTML render)",
5
- "version": "1.23.0",
5
+ "version": "1.24.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
package/tdsl_wasm.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  * |-------|----------------|---------|
13
13
  * | `orientation` | `"horizontal"`, `"vertical"` | `"horizontal"` |
14
14
  * | `grid` | `"none"`, `"decade"`, `"year"`, `"month"` | `"none"` |
15
+ * | `layout_style` | `"timeline"`, `"group-bands"`, `"gantt"`, `"zigzag"` | `"timeline"` |
15
16
  * | `theme` | `"default"`, `"dark"`, `"print"`, `"pastel"` | `"default"` |
16
17
  * | `show_table` | `true`, `false` | `false` |
17
18
  * | `show_legend` | `true`, `false` | `false` |
@@ -44,6 +45,17 @@ export class JsRenderOptions {
44
45
  */
45
46
  show_table: boolean;
46
47
  grid: string;
48
+ /**
49
+ * High-level visual layout style (#543/#564/#565): `"timeline"` (default),
50
+ * `"group-bands"`, `"gantt"`, or `"zigzag"`. Orthogonal to `orientation`.
51
+ * `"zigzag"` only takes effect when the timeline has at most
52
+ * `ZIGZAG_MAX_LANES` lanes; beyond that it falls back to `"timeline"`
53
+ * positioning at the `tdsl-render` layer — callers that need a
54
+ * user-facing warning (mirroring the CLI's `--layout-style zigzag`
55
+ * notice) should check the timeline's lane count themselves before
56
+ * rendering.
57
+ */
58
+ layout_style: string;
47
59
  orientation: string;
48
60
  theme: string;
49
61
  }
@@ -161,9 +173,11 @@ export interface InitOutput {
161
173
  readonly compile_to_ir: (a: number, b: number, c: number) => void;
162
174
  readonly format_source: (a: number, b: number, c: number) => void;
163
175
  readonly jsrenderoptions_grid: (a: number, b: number) => void;
176
+ readonly jsrenderoptions_layout_style: (a: number, b: number) => void;
164
177
  readonly jsrenderoptions_new: () => number;
165
178
  readonly jsrenderoptions_orientation: (a: number, b: number) => void;
166
179
  readonly jsrenderoptions_set_grid: (a: number, b: number, c: number) => void;
180
+ readonly jsrenderoptions_set_layout_style: (a: number, b: number, c: number) => void;
167
181
  readonly jsrenderoptions_set_orientation: (a: number, b: number, c: number) => void;
168
182
  readonly jsrenderoptions_set_theme: (a: number, b: number, c: number) => void;
169
183
  readonly jsrenderoptions_theme: (a: number, b: number) => void;
package/tdsl_wasm.js CHANGED
@@ -11,6 +11,7 @@
11
11
  * |-------|----------------|---------|
12
12
  * | `orientation` | `"horizontal"`, `"vertical"` | `"horizontal"` |
13
13
  * | `grid` | `"none"`, `"decade"`, `"year"`, `"month"` | `"none"` |
14
+ * | `layout_style` | `"timeline"`, `"group-bands"`, `"gantt"`, `"zigzag"` | `"timeline"` |
14
15
  * | `theme` | `"default"`, `"dark"`, `"print"`, `"pastel"` | `"default"` |
15
16
  * | `show_table` | `true`, `false` | `false` |
16
17
  * | `show_legend` | `true`, `false` | `false` |
@@ -84,6 +85,33 @@ export class JsRenderOptions {
84
85
  wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
85
86
  }
86
87
  }
88
+ /**
89
+ * High-level visual layout style (#543/#564/#565): `"timeline"` (default),
90
+ * `"group-bands"`, `"gantt"`, or `"zigzag"`. Orthogonal to `orientation`.
91
+ * `"zigzag"` only takes effect when the timeline has at most
92
+ * `ZIGZAG_MAX_LANES` lanes; beyond that it falls back to `"timeline"`
93
+ * positioning at the `tdsl-render` layer — callers that need a
94
+ * user-facing warning (mirroring the CLI's `--layout-style zigzag`
95
+ * notice) should check the timeline's lane count themselves before
96
+ * rendering.
97
+ * @returns {string}
98
+ */
99
+ get layout_style() {
100
+ let deferred1_0;
101
+ let deferred1_1;
102
+ try {
103
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
104
+ wasm.jsrenderoptions_layout_style(retptr, this.__wbg_ptr);
105
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
106
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
107
+ deferred1_0 = r0;
108
+ deferred1_1 = r1;
109
+ return getStringFromWasm0(r0, r1);
110
+ } finally {
111
+ wasm.__wbindgen_add_to_stack_pointer(16);
112
+ wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
113
+ }
114
+ }
87
115
  constructor() {
88
116
  const ret = wasm.jsrenderoptions_new();
89
117
  this.__wbg_ptr = ret;
@@ -117,6 +145,14 @@ export class JsRenderOptions {
117
145
  const len0 = WASM_VECTOR_LEN;
118
146
  wasm.jsrenderoptions_set_grid(this.__wbg_ptr, ptr0, len0);
119
147
  }
148
+ /**
149
+ * @param {string} val
150
+ */
151
+ set layout_style(val) {
152
+ const ptr0 = passStringToWasm0(val, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
153
+ const len0 = WASM_VECTOR_LEN;
154
+ wasm.jsrenderoptions_set_layout_style(this.__wbg_ptr, ptr0, len0);
155
+ }
120
156
  /**
121
157
  * @param {string} val
122
158
  */
@@ -537,6 +573,10 @@ function __wbg_get_imports() {
537
573
  const ret = new Error();
538
574
  return addHeapObject(ret);
539
575
  },
576
+ __wbg_now_d2e0afbad4edbe82: function() {
577
+ const ret = Date.now();
578
+ return ret;
579
+ },
540
580
  __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
541
581
  const ret = getObject(arg1).stack;
542
582
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
package/tdsl_wasm_bg.wasm CHANGED
Binary file