jssm 5.150.1 → 5.151.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 CHANGED
@@ -18,10 +18,10 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
18
18
 
19
19
 
20
20
 
21
- * Generated for version 5.150.1 at 6/28/2026, 10:20:13 AM
21
+ * Generated for version 5.151.1 at 6/28/2026, 1:33:22 PM
22
22
 
23
23
  -->
24
- # jssm 5.150.1
24
+ # jssm 5.151.1
25
25
 
26
26
  [**Try the live editor**](https://stonecypher.github.io/jssm-viz-demo/graph_explorer.html) ·
27
27
  [Documentation](https://stonecypher.github.io/jssm/docs/) ·
@@ -312,7 +312,7 @@ That decision shows up everywhere downstream:
312
312
  or run `npm run benny` against your own machine.
313
313
 
314
314
  - **More thoroughly tested than any other JavaScript state-machine
315
- library.** 7,720 tests at 100.0% line coverage
315
+ library.** 7,737 tests at 100.0% line coverage
316
316
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
317
317
  fuzz testing via `fast-check`, with parser test data across ten natural
318
318
  languages and Emoji.
@@ -445,11 +445,11 @@ If your contribution is missing here, please open an issue.
445
445
 
446
446
  <br/>
447
447
 
448
- ***7,720 tests***, run 82,366 times.
448
+ ***7,737 tests***, run 82,383 times.
449
449
 
450
- - 6,966 specs with 100.0% coverage
451
- - 754 fuzz tests with 57.0% coverage
452
- - 9,100 TypeScript lines - 0.8 tests per line, 9.1 generated tests per line
450
+ - 6,983 specs with 100.0% coverage
451
+ - 754 fuzz tests with 56.0% coverage
452
+ - 9,228 TypeScript lines - 0.8 tests per line, 8.9 generated tests per line
453
453
 
454
454
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
455
455
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
@@ -434,6 +434,54 @@
434
434
  ],
435
435
  "description": "Parse a fenced-code info string like `fsl {teaches: x, run: true}`."
436
436
  },
437
+ {
438
+ "kind": "variable",
439
+ "name": "FSL_KEYWORDS",
440
+ "default": "new Set([ 'state', 'start_state', 'end_state', 'active_state', 'terminal_state', 'hooked_state', 'transition', 'graph', 'on', 'enter', 'exit', 'do', 'arrange', 'arrange-start', 'arrange-end', 'machine_name', 'machine_author', 'machine_license', 'machine_version', 'machine_comment', 'fsl_version', 'flow', 'graph_layout', 'allow_islands', 'allows_override', 'required', 'true', 'false', 'null', 'undefined', ])",
441
+ "description": "Structural / attribute keywords highlighted in fsl code fences."
442
+ },
443
+ {
444
+ "kind": "variable",
445
+ "name": "FSL_COLOR_KEYS",
446
+ "default": "new Set([ 'color', 'text-color', 'background-color', 'border-color', 'edge-color', ])",
447
+ "description": "Attribute keys whose value is a color, mirroring the editor's `COLOR_KEYS`\n(language_service). The value token following one of these (plus its `:`) is\ntagged `color` and rendered with a swatch, matching the editor overlay."
448
+ },
449
+ {
450
+ "kind": "function",
451
+ "name": "tokenizeFsl",
452
+ "return": {
453
+ "type": {
454
+ "text": "FslToken[]"
455
+ }
456
+ },
457
+ "parameters": [
458
+ {
459
+ "name": "src",
460
+ "type": {
461
+ "text": "string"
462
+ }
463
+ }
464
+ ],
465
+ "description": "Tokenize FSL source into `{cls, text}` runs for syntax highlighting. A pure,\nregex-driven scanner — never parses, so it cannot throw on malformed input.\n`cls` is null for uncategorized text (punctuation, identifiers, whitespace).\n\nBeyond the lexical classes it tracks one bit of structural context: an\nidentifier immediately before a `:` is retro-tagged `key` (an attribute key,\nunless it is already a `keyword`), and the value token after a color key's\ncolon — or any hex literal — is tagged `color`. The context never spans a\n`;`, so a value can't leak past its statement."
466
+ },
467
+ {
468
+ "kind": "function",
469
+ "name": "highlightFsl",
470
+ "return": {
471
+ "type": {
472
+ "text": "string"
473
+ }
474
+ },
475
+ "parameters": [
476
+ {
477
+ "name": "src",
478
+ "type": {
479
+ "text": "string"
480
+ }
481
+ }
482
+ ],
483
+ "description": "Highlight FSL source to an HTML string of `<span class=\"fsl-tok-…\">` runs.\nA `color` token is preceded by an inline `<span class=\"fsl-swatch\">` whose\nbackground is the literal color text (a CSS-valid named color or hex), giving\nthe docs the same swatch the editor overlay shows. Color text is a hex or\nidentifier run, so it is a safe `background:` value."
484
+ },
437
485
  {
438
486
  "kind": "function",
439
487
  "name": "renderMarkdown",
@@ -462,6 +510,38 @@
462
510
  "module": "src/ts/wc/fsl_docs_markdown.ts"
463
511
  }
464
512
  },
513
+ {
514
+ "kind": "js",
515
+ "name": "FSL_KEYWORDS",
516
+ "declaration": {
517
+ "name": "FSL_KEYWORDS",
518
+ "module": "src/ts/wc/fsl_docs_markdown.ts"
519
+ }
520
+ },
521
+ {
522
+ "kind": "js",
523
+ "name": "FSL_COLOR_KEYS",
524
+ "declaration": {
525
+ "name": "FSL_COLOR_KEYS",
526
+ "module": "src/ts/wc/fsl_docs_markdown.ts"
527
+ }
528
+ },
529
+ {
530
+ "kind": "js",
531
+ "name": "tokenizeFsl",
532
+ "declaration": {
533
+ "name": "tokenizeFsl",
534
+ "module": "src/ts/wc/fsl_docs_markdown.ts"
535
+ }
536
+ },
537
+ {
538
+ "kind": "js",
539
+ "name": "highlightFsl",
540
+ "declaration": {
541
+ "name": "highlightFsl",
542
+ "module": "src/ts/wc/fsl_docs_markdown.ts"
543
+ }
544
+ },
465
545
  {
466
546
  "kind": "js",
467
547
  "name": "renderMarkdown",
@@ -478,7 +558,7 @@
478
558
  "declarations": [
479
559
  {
480
560
  "kind": "class",
481
- "description": "`<fsl-docs>` — the language-docs content engine: drill-in nav over the bundled\r\ncurriculum (Getting Started / About State Machines / Tutorials / Example\r\nMachines / Index / Search), a markdown page renderer, and \"load into editor\"\r\nfor tagged FSL examples. Content-only; slot it into `<fsl-help>`.",
561
+ "description": "`<fsl-docs>` — the language-docs content engine: drill-in nav over the bundled\ncurriculum (Getting Started / About State Machines / Tutorials / Example\nMachines / Index / Search), a markdown page renderer, and \"load into editor\"\nfor tagged FSL examples. Content-only; slot it into `<fsl-help>`.",
482
562
  "name": "FslDocs",
483
563
  "members": [
484
564
  {
@@ -3245,7 +3325,7 @@
3245
3325
  "name": "permalink_for",
3246
3326
  "return": {
3247
3327
  "type": {
3248
- "text": "string"
3328
+ "text": ""
3249
3329
  }
3250
3330
  },
3251
3331
  "parameters": [
@@ -3256,7 +3336,25 @@
3256
3336
  }
3257
3337
  }
3258
3338
  ],
3259
- "description": "A shareable URL for the given FSL: the current page URL with the source\r\nencoded in the hash (`#fsl=...`). A page that reads the hash on load can\r\nrestore the machine. Browser-only (uses `location`), like the rest of the\r\ntoolbar."
3339
+ "description": "A shareable URL for the given FSL: the current page URL with the source\r\ncompressed into the hash as `#m=<scheme><payload>`. The payload is URL-safe\r\nbase64, so no characters need percent-escaping; `<scheme>` is a single digit\r\n— `1` when DEFLATE made the source smaller, `0` for the raw bytes when it did\r\nnot — so a short machine's link is never longer than its uncompressed form.\r\nDecode with fsl_from_permalink. Browser-only (uses `location` and the\r\nplatform compression streams), like the rest of the toolbar."
3340
+ },
3341
+ {
3342
+ "kind": "function",
3343
+ "name": "fsl_from_permalink",
3344
+ "return": {
3345
+ "type": {
3346
+ "text": ""
3347
+ }
3348
+ },
3349
+ "parameters": [
3350
+ {
3351
+ "name": "url",
3352
+ "type": {
3353
+ "text": "string"
3354
+ }
3355
+ }
3356
+ ],
3357
+ "description": "Recover the FSL source from a permalink produced by permalink_for:\r\nread the `#m=<scheme><payload>` fragment, decode the URL-safe base64, and\r\ninflate when `<scheme>` is `1`. Accepts a full URL or a bare fragment, with\r\nor without the leading `#`."
3260
3358
  },
3261
3359
  {
3262
3360
  "kind": "function",
@@ -3543,6 +3641,14 @@
3543
3641
  "module": "src/ts/wc/fsl_toolbar_wc.ts"
3544
3642
  }
3545
3643
  },
3644
+ {
3645
+ "kind": "js",
3646
+ "name": "fsl_from_permalink",
3647
+ "declaration": {
3648
+ "name": "fsl_from_permalink",
3649
+ "module": "src/ts/wc/fsl_toolbar_wc.ts"
3650
+ }
3651
+ },
3546
3652
  {
3547
3653
  "kind": "js",
3548
3654
  "name": "embed_snippet_for",
@@ -23371,7 +23371,7 @@ var constants = /*#__PURE__*/Object.freeze({
23371
23371
  * Useful for runtime diagnostics and for embedding in serialized machine
23372
23372
  * snapshots so that deserializers can detect version-skew.
23373
23373
  */
23374
- const version = "5.150.1";
23374
+ const version = "5.151.1";
23375
23375
 
23376
23376
  // whargarbl lots of these return arrays could/should be sets
23377
23377
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
package/dist/cdn/viz.js CHANGED
@@ -23396,7 +23396,7 @@ var constants = /*#__PURE__*/Object.freeze({
23396
23396
  * Useful for runtime diagnostics and for embedding in serialized machine
23397
23397
  * snapshots so that deserializers can detect version-skew.
23398
23398
  */
23399
- const version = "5.150.1";
23399
+ const version = "5.151.1";
23400
23400
 
23401
23401
  // whargarbl lots of these return arrays could/should be sets
23402
23402
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
@@ -108,7 +108,7 @@ function parseFslArgs(argv, spec) {
108
108
  return { positional, flags, helpText };
109
109
  }
110
110
 
111
- const getVersion = () => "5.150.1";
111
+ const getVersion = () => "5.151.1";
112
112
  const SPEC = {
113
113
  flags: {
114
114
  help: { short: "h", boolean: true },