jssm 5.157.18 → 5.158.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/README.md +28 -7
- package/dist/cdn/instance.js +1 -1
- package/dist/cdn/viz.js +1 -1
- package/dist/cli/fsl-export-system-prompt.cjs +1 -1
- 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/deno/README.md +28 -7
- package/dist/deno/fence.d.ts +18 -0
- package/dist/deno/fsl_fence_highlight.d.ts +53 -0
- package/dist/deno/fsl_fence_render.d.ts +87 -0
- package/dist/deno/fsl_gif.d.ts +77 -0
- package/dist/deno/fsl_svg_patch.d.ts +28 -0
- package/dist/deno/fsl_walk.d.ts +21 -0
- package/dist/deno/jssm.js +1 -1
- package/dist/fence/fence.js +49665 -0
- 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/editor.js +5 -1
- package/jssm.cli.d.cts +15 -6
- package/jssm.cli.d.ts +15 -6
- package/jssm.fence.d.ts +4084 -0
- package/package.json +9 -1
package/dist/wc/editor.js
CHANGED
|
@@ -59,7 +59,11 @@ function buildFslDecorations(text) {
|
|
|
59
59
|
.sort((a, b) => a.from - b.from)
|
|
60
60
|
.map(s => Decoration.mark({
|
|
61
61
|
class: `fsl-${s.kind}`,
|
|
62
|
-
|
|
62
|
+
// chip styling is color-span-specific: a color span's value is a CSS
|
|
63
|
+
// color for the --fsl-chip swatch. State spans also carry a value (the
|
|
64
|
+
// AST-resolved state name) but a name is not a paint — gating on kind,
|
|
65
|
+
// not value presence, keeps chips off state/enum marks.
|
|
66
|
+
attributes: s.kind === 'color' ? { title: s.value, style: `--fsl-chip:${s.value}` } : {},
|
|
63
67
|
}).range(s.from, s.to));
|
|
64
68
|
return Decoration.set(decos, true);
|
|
65
69
|
}
|
package/jssm.cli.d.cts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Render targets supported in v1. Future targets (mermaid, plantuml, scxml,
|
|
3
3
|
* ascii, fsl) will be added in v0.2+.
|
|
4
4
|
*/
|
|
5
|
-
declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html';
|
|
5
|
+
declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html' | 'gif';
|
|
6
6
|
/**
|
|
7
7
|
* Options accepted by `render()` and `renderSet()`.
|
|
8
8
|
*
|
|
@@ -10,6 +10,9 @@ declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html';
|
|
|
10
10
|
* exclusive: `width`/`height` fit to an exact pixel extent, `scale` is a
|
|
11
11
|
* zoom percentage (100 = 3x the SVG's natural size). They are silently
|
|
12
12
|
* ignored for text targets (svg/dot/html).
|
|
13
|
+
*
|
|
14
|
+
* `delay` and `maxFrames` apply only to the `gif` target and are silently
|
|
15
|
+
* ignored otherwise.
|
|
13
16
|
*/
|
|
14
17
|
interface RenderOptions {
|
|
15
18
|
target: RenderTarget;
|
|
@@ -17,6 +20,10 @@ interface RenderOptions {
|
|
|
17
20
|
height?: number;
|
|
18
21
|
scale?: number;
|
|
19
22
|
quality?: number;
|
|
23
|
+
/** Per-frame delay in centiseconds (gif only; default 70). */
|
|
24
|
+
delay?: number;
|
|
25
|
+
/** Walk-length ceiling on the animated gif's frame count (gif only; default 64). */
|
|
26
|
+
maxFrames?: number;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* A text-shaped render result (svg / dot / html).
|
|
@@ -27,10 +34,10 @@ interface TextResult {
|
|
|
27
34
|
content: string;
|
|
28
35
|
}
|
|
29
36
|
/**
|
|
30
|
-
* A raster-shaped render result (png / jpeg).
|
|
37
|
+
* A raster-shaped render result (png / jpeg / gif).
|
|
31
38
|
*/
|
|
32
39
|
interface RasterResult {
|
|
33
|
-
target: Extract<RenderTarget, 'png' | 'jpeg'>;
|
|
40
|
+
target: Extract<RenderTarget, 'png' | 'jpeg' | 'gif'>;
|
|
34
41
|
kind: 'raster';
|
|
35
42
|
buffer: Uint8Array;
|
|
36
43
|
}
|
|
@@ -60,15 +67,17 @@ declare class RasterizationUnsupportedError extends RenderError {
|
|
|
60
67
|
* Render a single FSL source string to the requested output format.
|
|
61
68
|
*
|
|
62
69
|
* Returns a discriminated union: `kind: 'text'` for SVG / DOT / HTML, and
|
|
63
|
-
* `kind: 'raster'` for PNG / JPEG. Use `kind` to narrow before
|
|
64
|
-
* `content` or `buffer`.
|
|
70
|
+
* `kind: 'raster'` for PNG / JPEG / GIF. Use `kind` to narrow before
|
|
71
|
+
* accessing `content` or `buffer`.
|
|
65
72
|
*
|
|
66
73
|
* @param fsl - FSL source text
|
|
67
|
-
* @param opts.target - Output format ('svg' | 'dot' | 'png' | 'jpeg' | 'html')
|
|
74
|
+
* @param opts.target - Output format ('svg' | 'dot' | 'png' | 'jpeg' | 'html' | 'gif')
|
|
68
75
|
* @param opts.width - Fit raster output to this pixel width (raster only)
|
|
69
76
|
* @param opts.height - Fit raster output to this pixel height (raster only)
|
|
70
77
|
* @param opts.scale - Raster zoom percentage; 100 = 3x natural size (raster only)
|
|
71
78
|
* @param opts.quality - JPEG quality 1-100 (silently ignored for non-jpeg)
|
|
79
|
+
* @param opts.delay - Per-frame delay in centiseconds (gif only; silently ignored otherwise)
|
|
80
|
+
* @param opts.maxFrames - Walk-length ceiling on the gif's frame count (gif only; silently ignored otherwise)
|
|
72
81
|
* @returns RenderResult, discriminated by `kind`
|
|
73
82
|
* @throws RenderError on parse, render, or target-dispatch failures
|
|
74
83
|
* @throws RasterizationUnsupportedError on raster targets where no backend exists
|
package/jssm.cli.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Render targets supported in v1. Future targets (mermaid, plantuml, scxml,
|
|
3
3
|
* ascii, fsl) will be added in v0.2+.
|
|
4
4
|
*/
|
|
5
|
-
declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html';
|
|
5
|
+
declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html' | 'gif';
|
|
6
6
|
/**
|
|
7
7
|
* Options accepted by `render()` and `renderSet()`.
|
|
8
8
|
*
|
|
@@ -10,6 +10,9 @@ declare type RenderTarget = 'svg' | 'dot' | 'png' | 'jpeg' | 'html';
|
|
|
10
10
|
* exclusive: `width`/`height` fit to an exact pixel extent, `scale` is a
|
|
11
11
|
* zoom percentage (100 = 3x the SVG's natural size). They are silently
|
|
12
12
|
* ignored for text targets (svg/dot/html).
|
|
13
|
+
*
|
|
14
|
+
* `delay` and `maxFrames` apply only to the `gif` target and are silently
|
|
15
|
+
* ignored otherwise.
|
|
13
16
|
*/
|
|
14
17
|
interface RenderOptions {
|
|
15
18
|
target: RenderTarget;
|
|
@@ -17,6 +20,10 @@ interface RenderOptions {
|
|
|
17
20
|
height?: number;
|
|
18
21
|
scale?: number;
|
|
19
22
|
quality?: number;
|
|
23
|
+
/** Per-frame delay in centiseconds (gif only; default 70). */
|
|
24
|
+
delay?: number;
|
|
25
|
+
/** Walk-length ceiling on the animated gif's frame count (gif only; default 64). */
|
|
26
|
+
maxFrames?: number;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* A text-shaped render result (svg / dot / html).
|
|
@@ -27,10 +34,10 @@ interface TextResult {
|
|
|
27
34
|
content: string;
|
|
28
35
|
}
|
|
29
36
|
/**
|
|
30
|
-
* A raster-shaped render result (png / jpeg).
|
|
37
|
+
* A raster-shaped render result (png / jpeg / gif).
|
|
31
38
|
*/
|
|
32
39
|
interface RasterResult {
|
|
33
|
-
target: Extract<RenderTarget, 'png' | 'jpeg'>;
|
|
40
|
+
target: Extract<RenderTarget, 'png' | 'jpeg' | 'gif'>;
|
|
34
41
|
kind: 'raster';
|
|
35
42
|
buffer: Uint8Array;
|
|
36
43
|
}
|
|
@@ -60,15 +67,17 @@ declare class RasterizationUnsupportedError extends RenderError {
|
|
|
60
67
|
* Render a single FSL source string to the requested output format.
|
|
61
68
|
*
|
|
62
69
|
* Returns a discriminated union: `kind: 'text'` for SVG / DOT / HTML, and
|
|
63
|
-
* `kind: 'raster'` for PNG / JPEG. Use `kind` to narrow before
|
|
64
|
-
* `content` or `buffer`.
|
|
70
|
+
* `kind: 'raster'` for PNG / JPEG / GIF. Use `kind` to narrow before
|
|
71
|
+
* accessing `content` or `buffer`.
|
|
65
72
|
*
|
|
66
73
|
* @param fsl - FSL source text
|
|
67
|
-
* @param opts.target - Output format ('svg' | 'dot' | 'png' | 'jpeg' | 'html')
|
|
74
|
+
* @param opts.target - Output format ('svg' | 'dot' | 'png' | 'jpeg' | 'html' | 'gif')
|
|
68
75
|
* @param opts.width - Fit raster output to this pixel width (raster only)
|
|
69
76
|
* @param opts.height - Fit raster output to this pixel height (raster only)
|
|
70
77
|
* @param opts.scale - Raster zoom percentage; 100 = 3x natural size (raster only)
|
|
71
78
|
* @param opts.quality - JPEG quality 1-100 (silently ignored for non-jpeg)
|
|
79
|
+
* @param opts.delay - Per-frame delay in centiseconds (gif only; silently ignored otherwise)
|
|
80
|
+
* @param opts.maxFrames - Walk-length ceiling on the gif's frame count (gif only; silently ignored otherwise)
|
|
72
81
|
* @returns RenderResult, discriminated by `kind`
|
|
73
82
|
* @throws RenderError on parse, render, or target-dispatch failures
|
|
74
83
|
* @throws RasterizationUnsupportedError on raster targets where no backend exists
|