jssm 5.162.7 → 5.162.8
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/README.md +7 -7
- package/custom-elements.json +47 -47
- package/dist/cdn/instance.js +5 -3
- package/dist/cdn/viz.js +1 -1
- package/dist/cli/fsl-export-system-prompt.cjs +27 -24
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/cli/lib.cjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/cm6/fsl_language.js +10 -14
- package/dist/deno/README.md +7 -7
- package/dist/deno/fence.d.ts +0 -1
- package/dist/deno/fsl_fence_highlight.d.ts +0 -4
- package/dist/deno/fsl_fence_render.d.ts +0 -8
- package/dist/deno/fsl_gif.d.ts +0 -8
- package/dist/deno/fsl_markdown_fence.d.ts +0 -5
- package/dist/deno/fsl_svg_patch.d.ts +0 -6
- package/dist/deno/fsl_walk.d.ts +0 -2
- package/dist/deno/jssm.d.ts +214 -503
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_compiler.d.ts +1 -1
- package/dist/deno/jssm_constants.d.ts +0 -3
- package/dist/deno/jssm_intern.d.ts +0 -15
- package/dist/deno/jssm_theme.d.ts +2 -2
- package/dist/deno/jssm_types.d.ts +13 -34
- package/dist/deno/jssm_util.d.ts +20 -6
- package/dist/deno/jssm_viz.d.ts +5 -51
- package/dist/es6/cm6/fsl_language.d.ts +0 -2
- package/dist/fence/fence.js +1651 -1833
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/dist/wc/docs.define.js +0 -5
- package/dist/wc/docs.js +79 -43
- package/dist/wc/editor.define.js +0 -5
- package/dist/wc/editor.js +1 -7
- package/dist/wc/instance.define.js +0 -6
- package/dist/wc/instance.js +93 -115
- package/dist/wc/viz.define.js +0 -6
- package/dist/wc/viz.js +22 -36
- package/dist/wc/widgets.define.js +0 -5
- package/dist/wc/widgets.js +117 -95
- package/jssm.cli.d.cts +0 -8
- package/jssm.cli.d.ts +0 -8
- package/jssm.es5.d.cts +449 -808
- package/jssm.es6.d.ts +449 -808
- package/jssm.fence.d.ts +213 -508
- package/jssm_viz.es5.d.cts +216 -529
- package/jssm_viz.es6.d.ts +216 -529
- package/package.json +16 -10
package/dist/deno/jssm_viz.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as jssm from './jssm.js';
|
|
2
|
-
import { version, build_time } from './version.js';
|
|
3
2
|
import type { JssmGroupMemberRef, JssmTransitionConfig, JssmGraphConfig } from './jssm_types.js';
|
|
4
3
|
/**
|
|
5
4
|
* How {@link machine_to_dot} renders FSL state groups (`&group : [ … ];`).
|
|
@@ -31,11 +30,9 @@ type RenderGroups = 'cluster' | 'chips' | 'off';
|
|
|
31
30
|
* configure({ DOMParser: new JSDOM().window.DOMParser });
|
|
32
31
|
* const el = await fsl_to_svg_element('a -> b;');
|
|
33
32
|
* ```
|
|
34
|
-
*
|
|
35
33
|
* @param opts Configuration overrides.
|
|
36
34
|
* @param opts.DOMParser Constructor compatible with the WHATWG `DOMParser`
|
|
37
35
|
* interface. Used as a fallback when `globalThis.DOMParser` is undefined.
|
|
38
|
-
*
|
|
39
36
|
* @throws {JssmError} if `DOMParser` is provided and is not a constructor.
|
|
40
37
|
*/
|
|
41
38
|
declare function configure(opts: {
|
|
@@ -44,7 +41,6 @@ declare function configure(opts: {
|
|
|
44
41
|
/**
|
|
45
42
|
* Look up a color from the default viz palette by key, returning empty
|
|
46
43
|
* string if the key is unknown (so it disappears in feature concatenation).
|
|
47
|
-
*
|
|
48
44
|
* @internal
|
|
49
45
|
*/
|
|
50
46
|
declare function vc(col: string): string;
|
|
@@ -58,10 +54,8 @@ declare function vc(col: string): string;
|
|
|
58
54
|
* doublequote('a"b'); // 'a\\"b'
|
|
59
55
|
* doublequote('safe'); // 'safe'
|
|
60
56
|
* ```
|
|
61
|
-
*
|
|
62
57
|
* @param txt Any string that will be placed inside `"…"` in a DOT attribute.
|
|
63
58
|
* @returns The string with every `"` replaced by `\"`.
|
|
64
|
-
*
|
|
65
59
|
* @internal
|
|
66
60
|
*/
|
|
67
61
|
declare function doublequote(txt: string): string;
|
|
@@ -76,10 +70,8 @@ declare function doublequote(txt: string): string;
|
|
|
76
70
|
* undoublequote('a\\"b'); // 'a"b'
|
|
77
71
|
* undoublequote('safe'); // 'safe'
|
|
78
72
|
* ```
|
|
79
|
-
*
|
|
80
73
|
* @param txt A DOT-escaped attribute string (as produced by `doublequote`).
|
|
81
74
|
* @returns The string with every `\"` collapsed back to `"`.
|
|
82
|
-
*
|
|
83
75
|
* @internal
|
|
84
76
|
*/
|
|
85
77
|
declare function undoublequote(txt: string): string;
|
|
@@ -102,11 +94,9 @@ declare function undoublequote(txt: string): string;
|
|
|
102
94
|
* slug_for('!!!'); // ''
|
|
103
95
|
* slug_for(' Foo Bar '); // 'foo-bar'
|
|
104
96
|
* ```
|
|
105
|
-
*
|
|
106
97
|
* @param state The state name to slugify.
|
|
107
98
|
* @returns The lowercase hyphen-separated slug, or empty string if none of
|
|
108
99
|
* the characters were retainable.
|
|
109
|
-
*
|
|
110
100
|
* @internal
|
|
111
101
|
*/
|
|
112
102
|
declare function slug_for(state: string): string;
|
|
@@ -135,10 +125,8 @@ declare function slug_for(state: string): string;
|
|
|
135
125
|
* slug_states(['!!!', '???']);
|
|
136
126
|
* // Map { '!!!' => 'node-1', '???' => 'node-2' }
|
|
137
127
|
* ```
|
|
138
|
-
*
|
|
139
128
|
* @param states States in declaration order.
|
|
140
129
|
* @returns A `Map` from each state name to its unique slug.
|
|
141
|
-
*
|
|
142
130
|
* @internal
|
|
143
131
|
*/
|
|
144
132
|
declare function slug_states(states: string[]): Map<string, string>;
|
|
@@ -159,7 +147,6 @@ declare function slug_states(states: string[]): Map<string, string>;
|
|
|
159
147
|
* node_of('Red Light', new Map([['Red Light', 'red-light']]));
|
|
160
148
|
* // '"red-light"'
|
|
161
149
|
* ```
|
|
162
|
-
*
|
|
163
150
|
* @internal
|
|
164
151
|
*/
|
|
165
152
|
declare function node_of(state: string, state_index: string[] | Map<string, number> | Map<string, string>): string;
|
|
@@ -169,13 +156,11 @@ declare function node_of(state: string, state_index: string[] | Map<string, numb
|
|
|
169
156
|
* a 9-character `#`-prefixed string.
|
|
170
157
|
*
|
|
171
158
|
* Graphviz dot does not support alpha; this is a lossy projection.
|
|
172
|
-
*
|
|
173
159
|
* @internal
|
|
174
160
|
*/
|
|
175
161
|
declare function color8to6(color8: string): string;
|
|
176
162
|
/**
|
|
177
163
|
* Variant of {@link color8to6} that passes `undefined` through.
|
|
178
|
-
*
|
|
179
164
|
* @internal
|
|
180
165
|
*/
|
|
181
166
|
declare function u_color8to6(color8?: string): string | undefined;
|
|
@@ -184,7 +169,6 @@ declare function u_color8to6(color8?: string): string | undefined;
|
|
|
184
169
|
* so theme-supplied shapes are honoured along with per-state declarations.
|
|
185
170
|
* Returns `undefined` if neither a theme nor a state declaration supplies a
|
|
186
171
|
* shape.
|
|
187
|
-
*
|
|
188
172
|
* @internal
|
|
189
173
|
*/
|
|
190
174
|
declare function shape_for_state<T>(u_jssm: jssm.Machine<T>, state: string): string | undefined;
|
|
@@ -193,7 +177,6 @@ declare function shape_for_state<T>(u_jssm: jssm.Machine<T>, state: string): str
|
|
|
193
177
|
* so theme-supplied images are honoured along with per-state declarations.
|
|
194
178
|
* Returns `undefined` if neither a theme nor a state declaration supplies an
|
|
195
179
|
* image.
|
|
196
|
-
*
|
|
197
180
|
* @internal
|
|
198
181
|
*/
|
|
199
182
|
declare function image_for_state<T>(u_jssm: jssm.Machine<T>, state: string): string | undefined;
|
|
@@ -202,13 +185,12 @@ declare function image_for_state<T>(u_jssm: jssm.Machine<T>, state: string): str
|
|
|
202
185
|
* style via {@link jssm.Machine.style_for}, then delegating to
|
|
203
186
|
* {@link compose_style_string}. Theme-supplied `corners` and `lineStyle`
|
|
204
187
|
* are honoured along with per-state declarations.
|
|
205
|
-
*
|
|
206
188
|
* @internal
|
|
207
189
|
*/
|
|
208
190
|
declare function style_for_state<T>(u_jssm: jssm.Machine<T>, state: string): string;
|
|
209
191
|
/**
|
|
210
192
|
* Map a single `transition: {}` config item (`{ key, value }`) to a Graphviz
|
|
211
|
-
*
|
|
193
|
+
* edge*-scope attribute `name="value"` pair, or `undefined` when the key has
|
|
212
194
|
* no edge-meaningful projection. Mirrors the per-node mapping in
|
|
213
195
|
* {@link state_node_line}, but targets the attribute names Graphviz uses on
|
|
214
196
|
* edges:
|
|
@@ -221,7 +203,6 @@ declare function style_for_state<T>(u_jssm: jssm.Machine<T>, state: string): str
|
|
|
221
203
|
* Node-only keys (`background-color`, `shape`, `corners`, `image`, `url`,
|
|
222
204
|
* `state-label`, `border-color`) have no edge meaning and yield `undefined`,
|
|
223
205
|
* so they are dropped from the `edge [ … ]` default statement.
|
|
224
|
-
*
|
|
225
206
|
* @internal
|
|
226
207
|
*/
|
|
227
208
|
declare function edge_attr_for(key: string, value: string): string | undefined;
|
|
@@ -238,13 +219,12 @@ declare function edge_attr_for(key: string, value: string): string | undefined;
|
|
|
238
219
|
* edge_defaults_body([{ key: 'color', value: '#0000ffff' }]);
|
|
239
220
|
* // 'color="#0000ffff"'
|
|
240
221
|
* ```
|
|
241
|
-
*
|
|
242
222
|
* @internal
|
|
243
223
|
*/
|
|
244
224
|
declare function edge_defaults_body(config: JssmTransitionConfig | undefined): string;
|
|
245
225
|
/**
|
|
246
226
|
* Map a single `graph: {}` config item (`{ key, value }`) to a Graphviz
|
|
247
|
-
*
|
|
227
|
+
* graph*-scope attribute `name="value"` pair, or `undefined` when the key is
|
|
248
228
|
* either not graph-meaningful or already handled by another machine path
|
|
249
229
|
* (`graph_layout` → SVG engine, `flow` → `rankdir`, `theme` → style cascade,
|
|
250
230
|
* `dot_preamble` → preamble). `background-color` is handled separately — it
|
|
@@ -253,7 +233,6 @@ declare function edge_defaults_body(config: JssmTransitionConfig | undefined): s
|
|
|
253
233
|
*
|
|
254
234
|
* - `color` → graph `color` (cluster/graph border).
|
|
255
235
|
* - `text-color` → graph `fontcolor`.
|
|
256
|
-
*
|
|
257
236
|
* @internal
|
|
258
237
|
*/
|
|
259
238
|
declare function graph_attr_for(key: string, value: string): string | undefined;
|
|
@@ -268,7 +247,6 @@ declare function graph_attr_for(key: string, value: string): string | undefined;
|
|
|
268
247
|
* This is the single reconciliation point for the graph background: the value
|
|
269
248
|
* it returns flows into {@link dot_template}'s one `bgcolor="…"` slot, so the
|
|
270
249
|
* `graph: {}` value wins over the legacy alias and is never emitted twice.
|
|
271
|
-
*
|
|
272
250
|
* @internal
|
|
273
251
|
*/
|
|
274
252
|
declare function graph_bg_color_from_config(config: JssmGraphConfig | undefined, fallback: string): string;
|
|
@@ -278,7 +256,6 @@ declare function graph_bg_color_from_config(config: JssmGraphConfig | undefined,
|
|
|
278
256
|
* one Graphviz graph attribute statement per key (e.g. `color="…";`). Returns
|
|
279
257
|
* the empty string when nothing applies, so machines without graph-scope color
|
|
280
258
|
* attributes are byte-identical to before.
|
|
281
|
-
*
|
|
282
259
|
* @internal
|
|
283
260
|
*/
|
|
284
261
|
declare function graph_attrs_body(config: JssmGraphConfig | undefined): string;
|
|
@@ -301,7 +278,6 @@ declare function graph_attrs_body(config: JssmGraphConfig | undefined): string;
|
|
|
301
278
|
* or only terminal — a long-standing bug. The fix is to check the two
|
|
302
279
|
* underlying predicates directly so the three named buckets reflect
|
|
303
280
|
* three meaningfully distinct conditions.
|
|
304
|
-
*
|
|
305
281
|
* @internal
|
|
306
282
|
*/
|
|
307
283
|
type StateKind = 'final' | 'complete' | 'terminal' | 'base';
|
|
@@ -320,12 +296,10 @@ type StateKind = 'final' | 'complete' | 'terminal' | 'base';
|
|
|
320
296
|
* cluster_id_for('Active Players', 0); // 'cluster_active_players_0'
|
|
321
297
|
* cluster_id_for('!!!', 3); // 'cluster_g3'
|
|
322
298
|
* ```
|
|
323
|
-
*
|
|
324
299
|
* @param group The FSL group name.
|
|
325
300
|
* @param index The group's stable declaration-order index (0-based); included
|
|
326
301
|
* in the emitted id to prevent slug collisions.
|
|
327
302
|
* @returns A valid Graphviz subgraph identifier starting with `cluster_`.
|
|
328
|
-
*
|
|
329
303
|
* @internal
|
|
330
304
|
*/
|
|
331
305
|
declare function cluster_id_for(group: string, index: number): string;
|
|
@@ -340,7 +314,6 @@ declare function cluster_id_for(group: string, index: number): string;
|
|
|
340
314
|
* label_with_chips('Foo', []); // 'Foo'
|
|
341
315
|
* label_with_chips('Foo', ['a', 'b']); // 'Foo [a] [b]'
|
|
342
316
|
* ```
|
|
343
|
-
*
|
|
344
317
|
* @internal
|
|
345
318
|
*/
|
|
346
319
|
declare function label_with_chips(label: string, chips: string[]): string;
|
|
@@ -357,7 +330,6 @@ declare function label_with_chips(label: string, chips: string[]): string;
|
|
|
357
330
|
* // for `&inner:[a]; &outer:[&inner b];`
|
|
358
331
|
* // group_parent_map(reg, ['inner','outer']) === Map { 'inner' => 'outer' }
|
|
359
332
|
* ```
|
|
360
|
-
*
|
|
361
333
|
* @internal
|
|
362
334
|
*/
|
|
363
335
|
declare function group_parent_map(registry: Map<string, JssmGroupMemberRef[]>, order: string[]): Map<string, string>;
|
|
@@ -366,7 +338,6 @@ declare function group_parent_map(registry: Map<string, JssmGroupMemberRef[]>, o
|
|
|
366
338
|
* ancestor set *including the group itself*. Used both to nest clusters and
|
|
367
339
|
* to decide which of a state's memberships its primary cluster already
|
|
368
340
|
* represents (so the rest become chips).
|
|
369
|
-
*
|
|
370
341
|
* @internal
|
|
371
342
|
*/
|
|
372
343
|
declare function group_ancestry(group: string, parents: Map<string, string>): Set<string>;
|
|
@@ -376,7 +347,6 @@ declare function group_ancestry(group: string, parents: Map<string, string>): Se
|
|
|
376
347
|
* declaration order — the same precedence the config cascade uses, so a
|
|
377
348
|
* state's cluster placement agrees with the group whose style won. Returns
|
|
378
349
|
* `undefined` for a state in no group.
|
|
379
|
-
*
|
|
380
350
|
* @internal
|
|
381
351
|
*/
|
|
382
352
|
declare function primary_group_for<T>(u_jssm: jssm.Machine<T>, state: string, order: string[]): string | undefined;
|
|
@@ -386,11 +356,9 @@ declare function primary_group_for<T>(u_jssm: jssm.Machine<T>, state: string, or
|
|
|
386
356
|
* ungrouped state) plus the *chip* groups — memberships the primary cluster's
|
|
387
357
|
* ancestry does not already represent, i.e. genuine overlap that nesting
|
|
388
358
|
* cannot show.
|
|
389
|
-
*
|
|
390
359
|
* @returns `{ placement, chips }` where `placement` maps state → primary
|
|
391
360
|
* group, and `chips` maps state → the overflow group names (declaration
|
|
392
361
|
* order).
|
|
393
|
-
*
|
|
394
362
|
* @internal
|
|
395
363
|
*/
|
|
396
364
|
declare function plan_cluster_groups<T>(u_jssm: jssm.Machine<T>, l_states: string[], order: string[], parents: Map<string, string>): {
|
|
@@ -413,10 +381,8 @@ declare function plan_cluster_groups<T>(u_jssm: jssm.Machine<T>, l_states: strin
|
|
|
413
381
|
* // for `&inner:[a]; &outer:[&inner b]; a -> b;` the result contains
|
|
414
382
|
* // subgraph cluster_outer { label="outer"; … subgraph cluster_inner { … } }
|
|
415
383
|
* ```
|
|
416
|
-
*
|
|
417
384
|
* @returns `{ clusters, ungrouped_nodes }` — the cluster DOT block and the
|
|
418
385
|
* node statements for states in no group.
|
|
419
|
-
*
|
|
420
386
|
* @internal
|
|
421
387
|
*/
|
|
422
388
|
declare function groups_to_subgraph_string<T>(u_jssm: jssm.Machine<T>, l_states: string[], state_index: Map<string, string>, state_kinds: Map<string, StateKind>, hide_state_labels: boolean): {
|
|
@@ -433,7 +399,6 @@ declare function groups_to_subgraph_string<T>(u_jssm: jssm.Machine<T>, l_states:
|
|
|
433
399
|
* // for `&inner:[a]; &outer:[&inner b]; a -> b;`
|
|
434
400
|
* // chips_for_all_groups(m, ['a','b']) === Map { 'a' => ['inner','outer'], 'b' => ['outer'] }
|
|
435
401
|
* ```
|
|
436
|
-
*
|
|
437
402
|
* @internal
|
|
438
403
|
*/
|
|
439
404
|
declare function chips_for_all_groups<T>(u_jssm: jssm.Machine<T>, l_states: string[]): Map<string, string[]>;
|
|
@@ -473,7 +438,6 @@ type VizRenderOpts = {
|
|
|
473
438
|
*
|
|
474
439
|
* A machine that declares no groups produces the same flat node list in every
|
|
475
440
|
* mode, so `'cluster'`/`'chips'` are no-ops there.
|
|
476
|
-
*
|
|
477
441
|
* @internal
|
|
478
442
|
*/
|
|
479
443
|
declare function node_block_for<T>(u_jssm: jssm.Machine<T>, l_states: string[], state_index: Map<string, string>, state_kinds: Map<string, StateKind>, hide_labels: boolean, mode: RenderGroups): string;
|
|
@@ -484,7 +448,6 @@ declare function node_block_for<T>(u_jssm: jssm.Machine<T>, l_states: string[],
|
|
|
484
448
|
* {@link plan_cluster_groups} (with identical inputs) for `'cluster'` — so a
|
|
485
449
|
* reconstructed label can never disagree with the one graphviz was handed.
|
|
486
450
|
* `'off'`, and any machine that declares no groups, yields an empty map.
|
|
487
|
-
*
|
|
488
451
|
* @internal
|
|
489
452
|
*/
|
|
490
453
|
declare function chips_for_render_mode<T>(u_jssm: jssm.Machine<T>, l_states: string[], mode: RenderGroups): Map<string, string[]>;
|
|
@@ -503,7 +466,6 @@ declare function chips_for_render_mode<T>(u_jssm: jssm.Machine<T>, l_states: str
|
|
|
503
466
|
* alike. It is built by running the node builder's own
|
|
504
467
|
* `label_with_chips(doublequote(display_text), chips)` and inverting the one
|
|
505
468
|
* escaping step, so it follows any change to the label format for free.
|
|
506
|
-
*
|
|
507
469
|
* @param u_jssm The machine being rendered.
|
|
508
470
|
* @param opts Render flags; only `render_groups` affects the label text
|
|
509
471
|
* (default `'cluster'`, matching `fsl_to_svg_string`).
|
|
@@ -517,7 +479,6 @@ declare function chips_for_render_mode<T>(u_jssm: jssm.Machine<T>, l_states: str
|
|
|
517
479
|
* state_svg_label_texts(sm`&g1 : [a b]; &g2 : [a]; a -> b;`).get('a'); // 'a [g1]'
|
|
518
480
|
* state_svg_label_texts(sm`a -> b;`).get('a'); // 'a'
|
|
519
481
|
* ```
|
|
520
|
-
*
|
|
521
482
|
* @see extract_state_fills
|
|
522
483
|
*/
|
|
523
484
|
declare function state_svg_label_texts<T>(u_jssm: jssm.Machine<T>, opts?: VizRenderOpts): Map<string, string>;
|
|
@@ -549,7 +510,6 @@ declare function state_svg_label_texts<T>(u_jssm: jssm.Machine<T>, opts?: VizRen
|
|
|
549
510
|
* // or as label chips, with no cluster boxes
|
|
550
511
|
* const chipped = machine_to_dot(sm`&g : [a b]; a -> b;`, { render_groups: 'chips' });
|
|
551
512
|
* ```
|
|
552
|
-
*
|
|
553
513
|
* @param u_jssm The machine to render.
|
|
554
514
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
555
515
|
* @returns A complete graphviz dot source string.
|
|
@@ -568,7 +528,6 @@ declare function machine_to_dot<T>(u_jssm: jssm.Machine<T>, opts?: VizRenderOpts
|
|
|
568
528
|
* const dot_with_footer = fsl_to_dot('a -> b;', { footer: 'label="caption";' });
|
|
569
529
|
* // 'digraph G { ... label="caption"; }'
|
|
570
530
|
* ```
|
|
571
|
-
*
|
|
572
531
|
* @param fsl The FSL source.
|
|
573
532
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
574
533
|
* @returns A complete graphviz dot source string.
|
|
@@ -583,7 +542,6 @@ declare function fsl_to_dot(fsl: string, opts?: VizRenderOpts): string;
|
|
|
583
542
|
* const svg = await dot_to_svg('digraph G { a -> b }');
|
|
584
543
|
* const svg_neato = await dot_to_svg('digraph G { a -> b }', { engine: 'neato' });
|
|
585
544
|
* ```
|
|
586
|
-
*
|
|
587
545
|
* @param dot Graphviz dot source.
|
|
588
546
|
* @param options Optional renderer overrides.
|
|
589
547
|
* @param options.engine Graphviz layout engine to use (e.g. `'dot'`,
|
|
@@ -601,7 +559,6 @@ declare function dot_to_svg(dot: string, options?: {
|
|
|
601
559
|
* const svg = await fsl_to_svg_string('a -> b;');
|
|
602
560
|
* const svg_neato = await fsl_to_svg_string('a -> b;', { engine: 'neato' });
|
|
603
561
|
* ```
|
|
604
|
-
*
|
|
605
562
|
* @param fsl The FSL source.
|
|
606
563
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
607
564
|
* @returns A promise resolving to an SVG XML string.
|
|
@@ -609,7 +566,6 @@ declare function dot_to_svg(dot: string, options?: {
|
|
|
609
566
|
declare function fsl_to_svg_string(fsl: string, opts?: VizRenderOpts): Promise<string>;
|
|
610
567
|
/**
|
|
611
568
|
* Render a {@link jssm.Machine} to SVG.
|
|
612
|
-
*
|
|
613
569
|
* @param u_jssm The machine to render.
|
|
614
570
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
615
571
|
* @returns A promise resolving to an SVG XML string.
|
|
@@ -617,7 +573,6 @@ declare function fsl_to_svg_string(fsl: string, opts?: VizRenderOpts): Promise<s
|
|
|
617
573
|
declare function machine_to_svg_string<T>(u_jssm: jssm.Machine<T>, opts?: VizRenderOpts): Promise<string>;
|
|
618
574
|
/**
|
|
619
575
|
* Render an FSL string directly to a parsed `SVGSVGElement`.
|
|
620
|
-
*
|
|
621
576
|
* @param fsl The FSL source.
|
|
622
577
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
623
578
|
* @returns A promise resolving to a parsed `SVGSVGElement`.
|
|
@@ -626,7 +581,6 @@ declare function machine_to_svg_string<T>(u_jssm: jssm.Machine<T>, opts?: VizRen
|
|
|
626
581
|
declare function fsl_to_svg_element(fsl: string, opts?: VizRenderOpts): Promise<SVGSVGElement>;
|
|
627
582
|
/**
|
|
628
583
|
* Render a {@link jssm.Machine} to a parsed `SVGSVGElement`.
|
|
629
|
-
*
|
|
630
584
|
* @param u_jssm The machine to render.
|
|
631
585
|
* @param opts Optional render flags. See {@link VizRenderOpts}.
|
|
632
586
|
* @returns A promise resolving to a parsed `SVGSVGElement`.
|
|
@@ -636,13 +590,12 @@ declare function machine_to_svg_element<T>(u_jssm: jssm.Machine<T>, opts?: VizRe
|
|
|
636
590
|
/**
|
|
637
591
|
* Compatibility wrapper for {@link machine_to_dot}, retained from
|
|
638
592
|
* jssm-viz. Will be removed in the next major.
|
|
639
|
-
*
|
|
640
593
|
* @deprecated Use {@link machine_to_dot} instead.
|
|
641
594
|
*/
|
|
642
595
|
declare function dot<T>(machine: jssm.Machine<T>): string;
|
|
643
|
-
export { configure, dot, dot_to_svg, fsl_to_dot, fsl_to_svg_string, fsl_to_svg_element, machine_to_dot, machine_to_svg_string, machine_to_svg_element, state_svg_label_texts,
|
|
596
|
+
export { configure, dot, dot_to_svg, fsl_to_dot, fsl_to_svg_string, fsl_to_svg_element, machine_to_dot, machine_to_svg_string, machine_to_svg_element, state_svg_label_texts, };
|
|
644
597
|
export type { VizRenderOpts, RenderGroups };
|
|
645
|
-
/** @internal
|
|
598
|
+
/** @internal */
|
|
646
599
|
export declare const _test: {
|
|
647
600
|
doublequote: typeof doublequote;
|
|
648
601
|
color8to6: typeof color8to6;
|
|
@@ -671,3 +624,4 @@ export declare const _test: {
|
|
|
671
624
|
graph_attrs_body: typeof graph_attrs_body;
|
|
672
625
|
graph_bg_color_from_config: typeof graph_bg_color_from_config;
|
|
673
626
|
};
|
|
627
|
+
export { version, build_time } from './version.js';
|
|
@@ -68,9 +68,7 @@ export declare const fslLanguage: StreamLanguage<FslStreamState>;
|
|
|
68
68
|
export declare const fslHighlightStyle: HighlightStyle;
|
|
69
69
|
/**
|
|
70
70
|
* CodeMirror 6 `LanguageSupport` for FSL. Drop into an editor's `extensions`.
|
|
71
|
-
*
|
|
72
71
|
* @returns A `LanguageSupport` extension for FSL highlighting.
|
|
73
|
-
*
|
|
74
72
|
* @example
|
|
75
73
|
* import { EditorView, basicSetup } from 'codemirror';
|
|
76
74
|
* import { fsl } from 'jssm/cm6';
|