jssm 5.162.24 → 5.162.26
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 +6 -6
- 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 +6 -6
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_viz.d.ts +12 -6
- package/dist/fence/fence.js +27 -9
- 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/jssm_viz.es5.d.cts +12 -6
- package/jssm_viz.es6.d.ts +12 -6
- package/package.json +1 -1
package/dist/deno/jssm_viz.d.ts
CHANGED
|
@@ -97,16 +97,22 @@ declare function configure(opts: {
|
|
|
97
97
|
declare function vc(col: string): string;
|
|
98
98
|
/**
|
|
99
99
|
* Escape a string for safe interpolation inside a DOT double-quoted
|
|
100
|
-
* attribute value.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
100
|
+
* attribute value. Escapes every `\` and `"` so that group names, state
|
|
101
|
+
* labels, and chip labels containing either character produce valid,
|
|
102
|
+
* parseable DOT source.
|
|
103
|
+
*
|
|
104
|
+
* Backslash is escaped *first*: a label ending in `\` would otherwise emit
|
|
105
|
+
* `label="a\"`, whose `\"` escapes the closing quote and corrupts the DOT so
|
|
106
|
+
* the whole render throws. Escaping `\`→`\\` before `"`→`\"` avoids
|
|
107
|
+
* double-escaping the backslashes the quote step introduces. StoneCypher/fsl#1951
|
|
103
108
|
*
|
|
104
109
|
* ```typescript
|
|
105
|
-
* doublequote('a"b');
|
|
106
|
-
* doublequote('
|
|
110
|
+
* doublequote('a"b'); // 'a\\"b'
|
|
111
|
+
* doublequote('a\\'); // 'a\\\\'
|
|
112
|
+
* doublequote('safe'); // 'safe'
|
|
107
113
|
* ```
|
|
108
114
|
* @param txt Any string that will be placed inside `"…"` in a DOT attribute.
|
|
109
|
-
* @returns The string with every `"`
|
|
115
|
+
* @returns The string with every `\` and `"` backslash-escaped.
|
|
110
116
|
* @internal
|
|
111
117
|
*/
|
|
112
118
|
declare function doublequote(txt: string): string;
|
package/dist/fence/fence.js
CHANGED
|
@@ -23227,7 +23227,19 @@ function compile_rule_transition_step(acc, from, to, this_se, next_se) {
|
|
|
23227
23227
|
acc.push(right);
|
|
23228
23228
|
}
|
|
23229
23229
|
const left = makeTransition(this_se, t, f, false);
|
|
23230
|
-
if (left.kind
|
|
23230
|
+
if (left.kind === 'none') {
|
|
23231
|
+
// A one-way arrow has no reverse edge, so a probability/action/after
|
|
23232
|
+
// written AFTER the arrow ("a -> 40% b") lands in the reverse-edge slots
|
|
23233
|
+
// and used to be silently dropped. Reject it loudly; the decoration
|
|
23234
|
+
// belongs before the arrow ("a 40% -> b"). The parser omits these
|
|
23235
|
+
// fields when absent (despite the non-optional type), so a loose view
|
|
23236
|
+
// lets `!= null` mean "was decorated". StoneCypher/fsl#1950
|
|
23237
|
+
const rev = this_se;
|
|
23238
|
+
if (rev.l_probability != null || rev.l_action != null || rev.l_after != null) {
|
|
23239
|
+
throw new JssmError(undefined, `A one-way arrow has no reverse edge, so a decoration written after it ("${String(from)} ${this_se.kind} 40% ${String(to)}") is discarded; write it before the arrow instead ("${String(from)} 40% ${this_se.kind} ${String(to)}").`);
|
|
23240
|
+
}
|
|
23241
|
+
}
|
|
23242
|
+
else {
|
|
23231
23243
|
acc.push(left);
|
|
23232
23244
|
}
|
|
23233
23245
|
}
|
|
@@ -24442,7 +24454,7 @@ function fslSemanticSpans(text) {
|
|
|
24442
24454
|
* Useful for runtime diagnostics and for embedding in serialized machine
|
|
24443
24455
|
* snapshots so that deserializers can detect version-skew.
|
|
24444
24456
|
*/
|
|
24445
|
-
const version = "5.162.
|
|
24457
|
+
const version = "5.162.26";
|
|
24446
24458
|
|
|
24447
24459
|
/**
|
|
24448
24460
|
* The FSL Markdown fence convention parser — pure, host-agnostic logic that
|
|
@@ -30210,20 +30222,26 @@ function vc(col) {
|
|
|
30210
30222
|
}
|
|
30211
30223
|
/**
|
|
30212
30224
|
* Escape a string for safe interpolation inside a DOT double-quoted
|
|
30213
|
-
* attribute value.
|
|
30214
|
-
*
|
|
30215
|
-
*
|
|
30225
|
+
* attribute value. Escapes every `\` and `"` so that group names, state
|
|
30226
|
+
* labels, and chip labels containing either character produce valid,
|
|
30227
|
+
* parseable DOT source.
|
|
30228
|
+
*
|
|
30229
|
+
* Backslash is escaped *first*: a label ending in `\` would otherwise emit
|
|
30230
|
+
* `label="a\"`, whose `\"` escapes the closing quote and corrupts the DOT so
|
|
30231
|
+
* the whole render throws. Escaping `\`→`\\` before `"`→`\"` avoids
|
|
30232
|
+
* double-escaping the backslashes the quote step introduces. StoneCypher/fsl#1951
|
|
30216
30233
|
*
|
|
30217
30234
|
* ```typescript
|
|
30218
|
-
* doublequote('a"b');
|
|
30219
|
-
* doublequote('
|
|
30235
|
+
* doublequote('a"b'); // 'a\\"b'
|
|
30236
|
+
* doublequote('a\\'); // 'a\\\\'
|
|
30237
|
+
* doublequote('safe'); // 'safe'
|
|
30220
30238
|
* ```
|
|
30221
30239
|
* @param txt Any string that will be placed inside `"…"` in a DOT attribute.
|
|
30222
|
-
* @returns The string with every `"`
|
|
30240
|
+
* @returns The string with every `\` and `"` backslash-escaped.
|
|
30223
30241
|
* @internal
|
|
30224
30242
|
*/
|
|
30225
30243
|
function doublequote(txt) {
|
|
30226
|
-
return txt.replace(/"/g, String.raw `\"`);
|
|
30244
|
+
return txt.replace(/\\/g, String.raw `\\`).replace(/"/g, String.raw `\"`);
|
|
30227
30245
|
}
|
|
30228
30246
|
/**
|
|
30229
30247
|
* URL schemes that are safe to emit into a rendered diagram's `<a xlink:href>`.
|