jssm 5.126.0 → 5.127.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/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.126.0 at 5/20/2026, 4:06:10 PM
21
+ * Generated for version 5.127.0 at 5/21/2026, 9:08:16 AM
22
22
 
23
23
  -->
24
- # jssm 5.126.0
24
+ # jssm 5.127.0
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/) ·
@@ -281,7 +281,7 @@ That decision shows up everywhere downstream:
281
281
  or run `npm run benny` against your own machine.
282
282
 
283
283
  - **More thoroughly tested than any other JavaScript state-machine
284
- library.** 6,111 tests at 100.0% line coverage
284
+ library.** 6,123 tests at 100.0% line coverage
285
285
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
286
286
  fuzz testing via `fast-check`, with parser test data across ten natural
287
287
  languages and Emoji.
@@ -414,11 +414,11 @@ If your contribution is missing here, please open an issue.
414
414
 
415
415
  <br/>
416
416
 
417
- ***6,111 tests***, run 56,898 times.
417
+ ***6,123 tests***, run 56,910 times.
418
418
 
419
- - 5,598 specs with 100.0% coverage
420
- - 513 fuzz tests with 4.5% coverage
421
- - 4,355 TypeScript lines - 1.4 tests per line, 13.1 generated tests per line
419
+ - 5,610 specs with 100.0% coverage
420
+ - 513 fuzz tests with 4.4% coverage
421
+ - 4,366 TypeScript lines - 1.4 tests per line, 13.0 generated tests per line
422
422
 
423
423
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
424
424
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
package/dist/cdn/viz.js CHANGED
@@ -453,11 +453,11 @@ function peg$parse(input, options) {
453
453
  return { config_kind: "action", config_items: action_items || [] };
454
454
  }, peg$c1359 = function (key, value) { return { key, value }; }, peg$c1360 = peg$otherExpectation("graph default edge color"), peg$c1361 = function (value) { return { key: 'graph_default_edge_color', value }; }, peg$c1362 = "transition", peg$c1363 = peg$literalExpectation("transition", false), peg$c1364 = function (transition_items) {
455
455
  return { config_kind: "transition", config_items: transition_items || [] };
456
- }, peg$c1365 = "graph_layout", peg$c1366 = peg$literalExpectation("graph_layout", false), peg$c1367 = function (value) { return { key: "graph_layout", value: value }; }, peg$c1368 = "start_states", peg$c1369 = peg$literalExpectation("start_states", false), peg$c1370 = function (value) { return { key: "start_states", value: value }; }, peg$c1371 = "end_states", peg$c1372 = peg$literalExpectation("end_states", false), peg$c1373 = function (value) { return { key: "end_states", value: value }; }, peg$c1374 = "graph_bg_color", peg$c1375 = peg$literalExpectation("graph_bg_color", false), peg$c1376 = function (value) { return { key: "graph_bg_color", value: value }; }, peg$c1377 = "allows_override", peg$c1378 = peg$literalExpectation("allows_override", false), peg$c1379 = function (value) { return { key: "allows_override", value: value }; }, peg$c1380 = function () { return true; }, peg$c1381 = function () { return false; }, peg$c1382 = peg$otherExpectation("configuration"), peg$c1383 = "MIT", peg$c1384 = peg$literalExpectation("MIT", false), peg$c1385 = "BSD 2-clause", peg$c1386 = peg$literalExpectation("BSD 2-clause", false), peg$c1387 = "BSD 3-clause", peg$c1388 = peg$literalExpectation("BSD 3-clause", false), peg$c1389 = "Apache 2.0", peg$c1390 = peg$literalExpectation("Apache 2.0", false), peg$c1391 = "Mozilla 2.0", peg$c1392 = peg$literalExpectation("Mozilla 2.0", false), peg$c1393 = "Public domain", peg$c1394 = peg$literalExpectation("Public domain", false), peg$c1395 = "GPL v2", peg$c1396 = peg$literalExpectation("GPL v2", false), peg$c1397 = "GPL v3", peg$c1398 = peg$literalExpectation("GPL v3", false), peg$c1399 = "LGPL v2.1", peg$c1400 = peg$literalExpectation("LGPL v2.1", false), peg$c1401 = "LGPL v3.0", peg$c1402 = peg$literalExpectation("LGPL v3.0", false), peg$c1403 = "Unknown", peg$c1404 = peg$literalExpectation("Unknown", false), peg$c1405 = peg$otherExpectation("direction"), peg$c1406 = "up", peg$c1407 = peg$literalExpectation("up", false), peg$c1408 = "right", peg$c1409 = peg$literalExpectation("right", false), peg$c1410 = "down", peg$c1411 = peg$literalExpectation("down", false), peg$c1412 = "left", peg$c1413 = peg$literalExpectation("left", false), peg$c1414 = peg$otherExpectation("hook definition (open/closed)"), peg$c1415 = "open", peg$c1416 = peg$literalExpectation("open", false), peg$c1417 = "closed", peg$c1418 = peg$literalExpectation("closed", false), peg$c1419 = "machine_author", peg$c1420 = peg$literalExpectation("machine_author", false), peg$c1421 = function (value) { return { key: "machine_author", value }; }, peg$c1422 = "machine_contributor", peg$c1423 = peg$literalExpectation("machine_contributor", false), peg$c1424 = function (value) { return { key: "machine_contributor", value }; }, peg$c1425 = "machine_comment", peg$c1426 = peg$literalExpectation("machine_comment", false), peg$c1427 = function (value) { return { key: "machine_comment", value }; }, peg$c1428 = "machine_definition", peg$c1429 = peg$literalExpectation("machine_definition", false), peg$c1430 = function (value) { return { key: "machine_definition", value }; }, peg$c1431 = "machine_name", peg$c1432 = peg$literalExpectation("machine_name", false), peg$c1433 = function (value) { return { key: "machine_name", value }; }, peg$c1434 = "machine_reference", peg$c1435 = peg$literalExpectation("machine_reference", false), peg$c1436 = function (value) { return { key: "machine_reference", value }; }, peg$c1437 = "machine_version", peg$c1438 = peg$literalExpectation("machine_version", false), peg$c1439 = function (value) { return { key: "machine_version", value }; }, peg$c1440 = "machine_license", peg$c1441 = peg$literalExpectation("machine_license", false), peg$c1442 = function (value) { return { key: "machine_license", value }; }, peg$c1443 = "machine_language", peg$c1444 = peg$literalExpectation("machine_language", false), peg$c1445 = function (value) { return { key: "machine_language", value }; }, peg$c1446 = "fsl_version", peg$c1447 = peg$literalExpectation("fsl_version", false), peg$c1448 = function (value) { return { key: "fsl_version", value }; }, peg$c1449 = "theme", peg$c1450 = peg$literalExpectation("theme", false), peg$c1451 = function (value) { return { key: "theme", value }; }, peg$c1452 = "flow", peg$c1453 = peg$literalExpectation("flow", false), peg$c1454 = function (value) { return { key: "flow", value }; }, peg$c1455 = "hooks", peg$c1456 = peg$literalExpectation("hooks", false), peg$c1457 = function (value) { return { key: "hook_definition", value }; }, peg$c1458 = "dot_preamble", peg$c1459 = peg$literalExpectation("dot_preamble", false), peg$c1460 = function (value) { return { key: "dot_preamble", value }; }, peg$c1461 = peg$otherExpectation("machine attribute"), peg$c1462 = "label", peg$c1463 = peg$literalExpectation("label", false), peg$c1464 = function (value) { return { key: 'state-label', value }; }, peg$c1465 = "color", peg$c1466 = peg$literalExpectation("color", false), peg$c1467 = function (value) { return { key: 'color', value }; }, peg$c1468 = peg$otherExpectation("text color"), peg$c1469 = "text-color", peg$c1470 = peg$literalExpectation("text-color", false), peg$c1471 = function (value) { return { key: 'text-color', value }; }, peg$c1472 = peg$otherExpectation("background color"), peg$c1473 = "background-color", peg$c1474 = peg$literalExpectation("background-color", false), peg$c1475 = function (value) { return { key: 'background-color', value }; }, peg$c1476 = peg$otherExpectation("border color"), peg$c1477 = "border-color", peg$c1478 = peg$literalExpectation("border-color", false), peg$c1479 = function (value) { return { key: 'border-color', value }; }, peg$c1480 = peg$otherExpectation("shape"), peg$c1481 = "shape", peg$c1482 = peg$literalExpectation("shape", false), peg$c1483 = function (value) { return { key: 'shape', value }; }, peg$c1484 = peg$otherExpectation("corners"), peg$c1485 = "corners", peg$c1486 = peg$literalExpectation("corners", false), peg$c1487 = function (value) { return { key: 'corners', value }; }, peg$c1488 = peg$otherExpectation("linestyle"), peg$c1489 = function (value) { return { key: 'line-style', value }; }, peg$c1490 = "linestyle", peg$c1491 = peg$literalExpectation("linestyle", false), peg$c1492 = peg$otherExpectation("image"), peg$c1493 = "image", peg$c1494 = peg$literalExpectation("image", false), peg$c1495 = function (value) { return { key: 'image', value }; }, peg$c1496 = peg$otherExpectation("state property"), peg$c1497 = "property", peg$c1498 = peg$literalExpectation("property", false), peg$c1499 = function (name, value) {
456
+ }, peg$c1365 = "graph_layout", peg$c1366 = peg$literalExpectation("graph_layout", false), peg$c1367 = function (value) { return { key: "graph_layout", value: value }; }, peg$c1368 = "start_states", peg$c1369 = peg$literalExpectation("start_states", false), peg$c1370 = function (value) { return { key: "start_states", value: value }; }, peg$c1371 = "end_states", peg$c1372 = peg$literalExpectation("end_states", false), peg$c1373 = function (value) { return { key: "end_states", value: value }; }, peg$c1374 = "graph_bg_color", peg$c1375 = peg$literalExpectation("graph_bg_color", false), peg$c1376 = function (value) { return { key: "graph_bg_color", value: value }; }, peg$c1377 = "allows_override", peg$c1378 = peg$literalExpectation("allows_override", false), peg$c1379 = function (value) { return { key: "allows_override", value: value }; }, peg$c1380 = function () { return true; }, peg$c1381 = function () { return false; }, peg$c1382 = peg$otherExpectation("configuration"), peg$c1383 = "MIT", peg$c1384 = peg$literalExpectation("MIT", false), peg$c1385 = "BSD 2-clause", peg$c1386 = peg$literalExpectation("BSD 2-clause", false), peg$c1387 = "BSD 3-clause", peg$c1388 = peg$literalExpectation("BSD 3-clause", false), peg$c1389 = "Apache 2.0", peg$c1390 = peg$literalExpectation("Apache 2.0", false), peg$c1391 = "Mozilla 2.0", peg$c1392 = peg$literalExpectation("Mozilla 2.0", false), peg$c1393 = "Public domain", peg$c1394 = peg$literalExpectation("Public domain", false), peg$c1395 = "GPL v2", peg$c1396 = peg$literalExpectation("GPL v2", false), peg$c1397 = "GPL v3", peg$c1398 = peg$literalExpectation("GPL v3", false), peg$c1399 = "LGPL v2.1", peg$c1400 = peg$literalExpectation("LGPL v2.1", false), peg$c1401 = "LGPL v3.0", peg$c1402 = peg$literalExpectation("LGPL v3.0", false), peg$c1403 = "Unknown", peg$c1404 = peg$literalExpectation("Unknown", false), peg$c1405 = peg$otherExpectation("direction"), peg$c1406 = "up", peg$c1407 = peg$literalExpectation("up", false), peg$c1408 = "right", peg$c1409 = peg$literalExpectation("right", false), peg$c1410 = "down", peg$c1411 = peg$literalExpectation("down", false), peg$c1412 = "left", peg$c1413 = peg$literalExpectation("left", false), peg$c1414 = peg$otherExpectation("hook definition (open/closed)"), peg$c1415 = "open", peg$c1416 = peg$literalExpectation("open", false), peg$c1417 = "closed", peg$c1418 = peg$literalExpectation("closed", false), peg$c1419 = "machine_author", peg$c1420 = peg$literalExpectation("machine_author", false), peg$c1421 = function (value) { return { key: "machine_author", value }; }, peg$c1422 = "machine_contributor", peg$c1423 = peg$literalExpectation("machine_contributor", false), peg$c1424 = function (value) { return { key: "machine_contributor", value }; }, peg$c1425 = "machine_comment", peg$c1426 = peg$literalExpectation("machine_comment", false), peg$c1427 = function (value) { return { key: "machine_comment", value }; }, peg$c1428 = "machine_definition", peg$c1429 = peg$literalExpectation("machine_definition", false), peg$c1430 = function (value) { return { key: "machine_definition", value }; }, peg$c1431 = "machine_name", peg$c1432 = peg$literalExpectation("machine_name", false), peg$c1433 = function (value) { return { key: "machine_name", value }; }, peg$c1434 = "machine_reference", peg$c1435 = peg$literalExpectation("machine_reference", false), peg$c1436 = function (value) { return { key: "machine_reference", value }; }, peg$c1437 = "machine_version", peg$c1438 = peg$literalExpectation("machine_version", false), peg$c1439 = function (value) { return { key: "machine_version", value }; }, peg$c1440 = "machine_license", peg$c1441 = peg$literalExpectation("machine_license", false), peg$c1442 = function (value) { return { key: "machine_license", value }; }, peg$c1443 = "machine_language", peg$c1444 = peg$literalExpectation("machine_language", false), peg$c1445 = function (value) { return { key: "machine_language", value }; }, peg$c1446 = "fsl_version", peg$c1447 = peg$literalExpectation("fsl_version", false), peg$c1448 = function (value) { return { key: "fsl_version", value }; }, peg$c1449 = "theme", peg$c1450 = peg$literalExpectation("theme", false), peg$c1451 = function (value) { return { key: "theme", value }; }, peg$c1452 = "flow", peg$c1453 = peg$literalExpectation("flow", false), peg$c1454 = function (value) { return { key: "flow", value }; }, peg$c1455 = "hooks", peg$c1456 = peg$literalExpectation("hooks", false), peg$c1457 = function (value) { return { key: "hook_definition", value }; }, peg$c1458 = "dot_preamble", peg$c1459 = peg$literalExpectation("dot_preamble", false), peg$c1460 = function (value) { return { key: "dot_preamble", value }; }, peg$c1461 = peg$otherExpectation("machine attribute"), peg$c1462 = "label", peg$c1463 = peg$literalExpectation("label", false), peg$c1464 = function (value) { return { key: 'state-label', value }; }, peg$c1465 = "color", peg$c1466 = peg$literalExpectation("color", false), peg$c1467 = function (value) { return { key: 'color', value }; }, peg$c1468 = peg$otherExpectation("text color"), peg$c1469 = "text-color", peg$c1470 = peg$literalExpectation("text-color", false), peg$c1471 = function (value) { return { key: 'text-color', value }; }, peg$c1472 = peg$otherExpectation("background color"), peg$c1473 = "background-color", peg$c1474 = peg$literalExpectation("background-color", false), peg$c1475 = function (value) { return { key: 'background-color', value }; }, peg$c1476 = peg$otherExpectation("border color"), peg$c1477 = "border-color", peg$c1478 = peg$literalExpectation("border-color", false), peg$c1479 = function (value) { return { key: 'border-color', value }; }, peg$c1480 = peg$otherExpectation("shape"), peg$c1481 = "shape", peg$c1482 = peg$literalExpectation("shape", false), peg$c1483 = function (value) { return { key: 'shape', value }; }, peg$c1484 = peg$otherExpectation("corners"), peg$c1485 = "corners", peg$c1486 = peg$literalExpectation("corners", false), peg$c1487 = function (value) { return { key: 'corners', value }; }, peg$c1488 = peg$otherExpectation("linestyle"), peg$c1489 = function (value) { return { key: 'line-style', value }; }, peg$c1490 = "linestyle", peg$c1491 = peg$literalExpectation("linestyle", false), peg$c1492 = peg$otherExpectation("image"), peg$c1493 = "image", peg$c1494 = peg$literalExpectation("image", false), peg$c1495 = function (value) { return { key: 'image', value }; }, peg$c1496 = peg$otherExpectation("url"), peg$c1497 = "url", peg$c1498 = peg$literalExpectation("url", false), peg$c1499 = function (value) { return { key: 'url', value }; }, peg$c1500 = peg$otherExpectation("state property"), peg$c1501 = "property", peg$c1502 = peg$literalExpectation("property", false), peg$c1503 = function (name, value) {
457
457
  return { key: 'state_property', name, value };
458
- }, peg$c1500 = "required", peg$c1501 = peg$literalExpectation("required", false), peg$c1502 = function (name, value) {
458
+ }, peg$c1504 = "required", peg$c1505 = peg$literalExpectation("required", false), peg$c1506 = function (name, value) {
459
459
  return { key: 'state_property', name, value, required: true };
460
- }, peg$c1503 = function (name, value) { return { key: 'state_declaration', name, value }; }, peg$c1504 = "&", peg$c1505 = peg$literalExpectation("&", false), peg$c1506 = function (name, value) { return { key: 'named_list', name, value }; }, peg$c1507 = function (name, default_value) { return { key: 'property_definition', name, default_value, required: true }; }, peg$c1508 = function (name) { return { key: 'property_definition', name, required: true }; }, peg$c1509 = function (name, default_value) { return { key: 'property_definition', name, default_value }; }, peg$c1510 = function (name) { return { key: 'property_definition', name }; }, peg$c1511 = "arrange", peg$c1512 = peg$literalExpectation("arrange", false), peg$c1513 = function (value) { return { key: 'arrange_declaration', value }; }, peg$c1514 = "arrange-start", peg$c1515 = peg$literalExpectation("arrange-start", false), peg$c1516 = function (value) { return { key: 'arrange_start_declaration', value }; }, peg$c1517 = "arrange-end", peg$c1518 = peg$literalExpectation("arrange-end", false), peg$c1519 = function (value) { return { key: 'arrange_end_declaration', value }; }, peg$c1520 = peg$otherExpectation("arrange declaration"), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
460
+ }, peg$c1507 = function (name, value) { return { key: 'state_declaration', name, value }; }, peg$c1508 = "&", peg$c1509 = peg$literalExpectation("&", false), peg$c1510 = function (name, value) { return { key: 'named_list', name, value }; }, peg$c1511 = function (name, default_value) { return { key: 'property_definition', name, default_value, required: true }; }, peg$c1512 = function (name) { return { key: 'property_definition', name, required: true }; }, peg$c1513 = function (name, default_value) { return { key: 'property_definition', name, default_value }; }, peg$c1514 = function (name) { return { key: 'property_definition', name }; }, peg$c1515 = "arrange", peg$c1516 = peg$literalExpectation("arrange", false), peg$c1517 = function (value) { return { key: 'arrange_declaration', value }; }, peg$c1518 = "arrange-start", peg$c1519 = peg$literalExpectation("arrange-start", false), peg$c1520 = function (value) { return { key: 'arrange_start_declaration', value }; }, peg$c1521 = "arrange-end", peg$c1522 = peg$literalExpectation("arrange-end", false), peg$c1523 = function (value) { return { key: 'arrange_end_declaration', value }; }, peg$c1524 = peg$otherExpectation("arrange declaration"), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result;
461
461
  if ("startRule" in options) {
462
462
  if (!(options.startRule in peg$startRuleFunctions)) {
463
463
  throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
@@ -17941,6 +17941,127 @@ function peg$parse(input, options) {
17941
17941
  }
17942
17942
  return s0;
17943
17943
  }
17944
+ function peg$parseSdStateUrl() {
17945
+ var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
17946
+ peg$silentFails++;
17947
+ s0 = peg$currPos;
17948
+ s1 = peg$parseWS();
17949
+ if (s1 === peg$FAILED) {
17950
+ s1 = null;
17951
+ }
17952
+ if (s1 !== peg$FAILED) {
17953
+ if (input.substr(peg$currPos, 3) === peg$c1497) {
17954
+ s2 = peg$c1497;
17955
+ peg$currPos += 3;
17956
+ }
17957
+ else {
17958
+ s2 = peg$FAILED;
17959
+ if (peg$silentFails === 0) {
17960
+ peg$fail(peg$c1498);
17961
+ }
17962
+ }
17963
+ if (s2 !== peg$FAILED) {
17964
+ s3 = peg$parseWS();
17965
+ if (s3 === peg$FAILED) {
17966
+ s3 = null;
17967
+ }
17968
+ if (s3 !== peg$FAILED) {
17969
+ if (input.charCodeAt(peg$currPos) === 58) {
17970
+ s4 = peg$c1206;
17971
+ peg$currPos++;
17972
+ }
17973
+ else {
17974
+ s4 = peg$FAILED;
17975
+ if (peg$silentFails === 0) {
17976
+ peg$fail(peg$c1207);
17977
+ }
17978
+ }
17979
+ if (s4 !== peg$FAILED) {
17980
+ s5 = peg$parseWS();
17981
+ if (s5 === peg$FAILED) {
17982
+ s5 = null;
17983
+ }
17984
+ if (s5 !== peg$FAILED) {
17985
+ s6 = peg$parseString();
17986
+ if (s6 !== peg$FAILED) {
17987
+ s7 = peg$parseWS();
17988
+ if (s7 === peg$FAILED) {
17989
+ s7 = null;
17990
+ }
17991
+ if (s7 !== peg$FAILED) {
17992
+ if (input.charCodeAt(peg$currPos) === 59) {
17993
+ s8 = peg$c1208;
17994
+ peg$currPos++;
17995
+ }
17996
+ else {
17997
+ s8 = peg$FAILED;
17998
+ if (peg$silentFails === 0) {
17999
+ peg$fail(peg$c1209);
18000
+ }
18001
+ }
18002
+ if (s8 !== peg$FAILED) {
18003
+ s9 = peg$parseWS();
18004
+ if (s9 === peg$FAILED) {
18005
+ s9 = null;
18006
+ }
18007
+ if (s9 !== peg$FAILED) {
18008
+ peg$savedPos = s0;
18009
+ s1 = peg$c1499(s6);
18010
+ s0 = s1;
18011
+ }
18012
+ else {
18013
+ peg$currPos = s0;
18014
+ s0 = peg$FAILED;
18015
+ }
18016
+ }
18017
+ else {
18018
+ peg$currPos = s0;
18019
+ s0 = peg$FAILED;
18020
+ }
18021
+ }
18022
+ else {
18023
+ peg$currPos = s0;
18024
+ s0 = peg$FAILED;
18025
+ }
18026
+ }
18027
+ else {
18028
+ peg$currPos = s0;
18029
+ s0 = peg$FAILED;
18030
+ }
18031
+ }
18032
+ else {
18033
+ peg$currPos = s0;
18034
+ s0 = peg$FAILED;
18035
+ }
18036
+ }
18037
+ else {
18038
+ peg$currPos = s0;
18039
+ s0 = peg$FAILED;
18040
+ }
18041
+ }
18042
+ else {
18043
+ peg$currPos = s0;
18044
+ s0 = peg$FAILED;
18045
+ }
18046
+ }
18047
+ else {
18048
+ peg$currPos = s0;
18049
+ s0 = peg$FAILED;
18050
+ }
18051
+ }
18052
+ else {
18053
+ peg$currPos = s0;
18054
+ s0 = peg$FAILED;
18055
+ }
18056
+ peg$silentFails--;
18057
+ if (s0 === peg$FAILED) {
18058
+ s1 = peg$FAILED;
18059
+ if (peg$silentFails === 0) {
18060
+ peg$fail(peg$c1496);
18061
+ }
18062
+ }
18063
+ return s0;
18064
+ }
17944
18065
  function peg$parseSdStateProperty() {
17945
18066
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
17946
18067
  peg$silentFails++;
@@ -17950,14 +18071,14 @@ function peg$parse(input, options) {
17950
18071
  s1 = null;
17951
18072
  }
17952
18073
  if (s1 !== peg$FAILED) {
17953
- if (input.substr(peg$currPos, 8) === peg$c1497) {
17954
- s2 = peg$c1497;
18074
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
18075
+ s2 = peg$c1501;
17955
18076
  peg$currPos += 8;
17956
18077
  }
17957
18078
  else {
17958
18079
  s2 = peg$FAILED;
17959
18080
  if (peg$silentFails === 0) {
17960
- peg$fail(peg$c1498);
18081
+ peg$fail(peg$c1502);
17961
18082
  }
17962
18083
  }
17963
18084
  if (s2 !== peg$FAILED) {
@@ -18010,7 +18131,7 @@ function peg$parse(input, options) {
18010
18131
  }
18011
18132
  if (s11 !== peg$FAILED) {
18012
18133
  peg$savedPos = s0;
18013
- s1 = peg$c1499(s6, s8);
18134
+ s1 = peg$c1503(s6, s8);
18014
18135
  s0 = s1;
18015
18136
  }
18016
18137
  else {
@@ -18074,14 +18195,14 @@ function peg$parse(input, options) {
18074
18195
  s1 = null;
18075
18196
  }
18076
18197
  if (s1 !== peg$FAILED) {
18077
- if (input.substr(peg$currPos, 8) === peg$c1497) {
18078
- s2 = peg$c1497;
18198
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
18199
+ s2 = peg$c1501;
18079
18200
  peg$currPos += 8;
18080
18201
  }
18081
18202
  else {
18082
18203
  s2 = peg$FAILED;
18083
18204
  if (peg$silentFails === 0) {
18084
- peg$fail(peg$c1498);
18205
+ peg$fail(peg$c1502);
18085
18206
  }
18086
18207
  }
18087
18208
  if (s2 !== peg$FAILED) {
@@ -18114,14 +18235,14 @@ function peg$parse(input, options) {
18114
18235
  if (s8 !== peg$FAILED) {
18115
18236
  s9 = peg$parseWS();
18116
18237
  if (s9 !== peg$FAILED) {
18117
- if (input.substr(peg$currPos, 8) === peg$c1500) {
18118
- s10 = peg$c1500;
18238
+ if (input.substr(peg$currPos, 8) === peg$c1504) {
18239
+ s10 = peg$c1504;
18119
18240
  peg$currPos += 8;
18120
18241
  }
18121
18242
  else {
18122
18243
  s10 = peg$FAILED;
18123
18244
  if (peg$silentFails === 0) {
18124
- peg$fail(peg$c1501);
18245
+ peg$fail(peg$c1505);
18125
18246
  }
18126
18247
  }
18127
18248
  if (s10 !== peg$FAILED) {
@@ -18147,7 +18268,7 @@ function peg$parse(input, options) {
18147
18268
  }
18148
18269
  if (s13 !== peg$FAILED) {
18149
18270
  peg$savedPos = s0;
18150
- s1 = peg$c1502(s6, s8);
18271
+ s1 = peg$c1506(s6, s8);
18151
18272
  s0 = s1;
18152
18273
  }
18153
18274
  else {
@@ -18219,7 +18340,7 @@ function peg$parse(input, options) {
18219
18340
  if (s0 === peg$FAILED) {
18220
18341
  s1 = peg$FAILED;
18221
18342
  if (peg$silentFails === 0) {
18222
- peg$fail(peg$c1496);
18343
+ peg$fail(peg$c1500);
18223
18344
  }
18224
18345
  }
18225
18346
  return s0;
@@ -18244,7 +18365,10 @@ function peg$parse(input, options) {
18244
18365
  if (s0 === peg$FAILED) {
18245
18366
  s0 = peg$parseSdStateImage();
18246
18367
  if (s0 === peg$FAILED) {
18247
- s0 = peg$parseSdStateProperty();
18368
+ s0 = peg$parseSdStateUrl();
18369
+ if (s0 === peg$FAILED) {
18370
+ s0 = peg$parseSdStateProperty();
18371
+ }
18248
18372
  }
18249
18373
  }
18250
18374
  }
@@ -18396,7 +18520,7 @@ function peg$parse(input, options) {
18396
18520
  }
18397
18521
  if (s11 !== peg$FAILED) {
18398
18522
  peg$savedPos = s0;
18399
- s1 = peg$c1503(s4, s8);
18523
+ s1 = peg$c1507(s4, s8);
18400
18524
  s0 = s1;
18401
18525
  }
18402
18526
  else {
@@ -18464,13 +18588,13 @@ function peg$parse(input, options) {
18464
18588
  }
18465
18589
  if (s1 !== peg$FAILED) {
18466
18590
  if (input.charCodeAt(peg$currPos) === 38) {
18467
- s2 = peg$c1504;
18591
+ s2 = peg$c1508;
18468
18592
  peg$currPos++;
18469
18593
  }
18470
18594
  else {
18471
18595
  s2 = peg$FAILED;
18472
18596
  if (peg$silentFails === 0) {
18473
- peg$fail(peg$c1505);
18597
+ peg$fail(peg$c1509);
18474
18598
  }
18475
18599
  }
18476
18600
  if (s2 !== peg$FAILED) {
@@ -18526,7 +18650,7 @@ function peg$parse(input, options) {
18526
18650
  }
18527
18651
  if (s11 !== peg$FAILED) {
18528
18652
  peg$savedPos = s0;
18529
- s1 = peg$c1506(s4, s8);
18653
+ s1 = peg$c1510(s4, s8);
18530
18654
  s0 = s1;
18531
18655
  }
18532
18656
  else {
@@ -18593,14 +18717,14 @@ function peg$parse(input, options) {
18593
18717
  s1 = null;
18594
18718
  }
18595
18719
  if (s1 !== peg$FAILED) {
18596
- if (input.substr(peg$currPos, 8) === peg$c1497) {
18597
- s2 = peg$c1497;
18720
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
18721
+ s2 = peg$c1501;
18598
18722
  peg$currPos += 8;
18599
18723
  }
18600
18724
  else {
18601
18725
  s2 = peg$FAILED;
18602
18726
  if (peg$silentFails === 0) {
18603
- peg$fail(peg$c1498);
18727
+ peg$fail(peg$c1502);
18604
18728
  }
18605
18729
  }
18606
18730
  if (s2 !== peg$FAILED) {
@@ -18627,14 +18751,14 @@ function peg$parse(input, options) {
18627
18751
  if (s8 !== peg$FAILED) {
18628
18752
  s9 = peg$parseWS();
18629
18753
  if (s9 !== peg$FAILED) {
18630
- if (input.substr(peg$currPos, 8) === peg$c1500) {
18631
- s10 = peg$c1500;
18754
+ if (input.substr(peg$currPos, 8) === peg$c1504) {
18755
+ s10 = peg$c1504;
18632
18756
  peg$currPos += 8;
18633
18757
  }
18634
18758
  else {
18635
18759
  s10 = peg$FAILED;
18636
18760
  if (peg$silentFails === 0) {
18637
- peg$fail(peg$c1501);
18761
+ peg$fail(peg$c1505);
18638
18762
  }
18639
18763
  }
18640
18764
  if (s10 !== peg$FAILED) {
@@ -18660,7 +18784,7 @@ function peg$parse(input, options) {
18660
18784
  }
18661
18785
  if (s13 !== peg$FAILED) {
18662
18786
  peg$savedPos = s0;
18663
- s1 = peg$c1507(s4, s8);
18787
+ s1 = peg$c1511(s4, s8);
18664
18788
  s0 = s1;
18665
18789
  }
18666
18790
  else {
@@ -18734,14 +18858,14 @@ function peg$parse(input, options) {
18734
18858
  s1 = null;
18735
18859
  }
18736
18860
  if (s1 !== peg$FAILED) {
18737
- if (input.substr(peg$currPos, 8) === peg$c1497) {
18738
- s2 = peg$c1497;
18861
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
18862
+ s2 = peg$c1501;
18739
18863
  peg$currPos += 8;
18740
18864
  }
18741
18865
  else {
18742
18866
  s2 = peg$FAILED;
18743
18867
  if (peg$silentFails === 0) {
18744
- peg$fail(peg$c1498);
18868
+ peg$fail(peg$c1502);
18745
18869
  }
18746
18870
  }
18747
18871
  if (s2 !== peg$FAILED) {
@@ -18751,14 +18875,14 @@ function peg$parse(input, options) {
18751
18875
  if (s4 !== peg$FAILED) {
18752
18876
  s5 = peg$parseWS();
18753
18877
  if (s5 !== peg$FAILED) {
18754
- if (input.substr(peg$currPos, 8) === peg$c1500) {
18755
- s6 = peg$c1500;
18878
+ if (input.substr(peg$currPos, 8) === peg$c1504) {
18879
+ s6 = peg$c1504;
18756
18880
  peg$currPos += 8;
18757
18881
  }
18758
18882
  else {
18759
18883
  s6 = peg$FAILED;
18760
18884
  if (peg$silentFails === 0) {
18761
- peg$fail(peg$c1501);
18885
+ peg$fail(peg$c1505);
18762
18886
  }
18763
18887
  }
18764
18888
  if (s6 !== peg$FAILED) {
@@ -18784,7 +18908,7 @@ function peg$parse(input, options) {
18784
18908
  }
18785
18909
  if (s9 !== peg$FAILED) {
18786
18910
  peg$savedPos = s0;
18787
- s1 = peg$c1508(s4);
18911
+ s1 = peg$c1512(s4);
18788
18912
  s0 = s1;
18789
18913
  }
18790
18914
  else {
@@ -18838,14 +18962,14 @@ function peg$parse(input, options) {
18838
18962
  s1 = null;
18839
18963
  }
18840
18964
  if (s1 !== peg$FAILED) {
18841
- if (input.substr(peg$currPos, 8) === peg$c1497) {
18842
- s2 = peg$c1497;
18965
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
18966
+ s2 = peg$c1501;
18843
18967
  peg$currPos += 8;
18844
18968
  }
18845
18969
  else {
18846
18970
  s2 = peg$FAILED;
18847
18971
  if (peg$silentFails === 0) {
18848
- peg$fail(peg$c1498);
18972
+ peg$fail(peg$c1502);
18849
18973
  }
18850
18974
  }
18851
18975
  if (s2 !== peg$FAILED) {
@@ -18892,7 +19016,7 @@ function peg$parse(input, options) {
18892
19016
  }
18893
19017
  if (s11 !== peg$FAILED) {
18894
19018
  peg$savedPos = s0;
18895
- s1 = peg$c1509(s4, s8);
19019
+ s1 = peg$c1513(s4, s8);
18896
19020
  s0 = s1;
18897
19021
  }
18898
19022
  else {
@@ -18956,14 +19080,14 @@ function peg$parse(input, options) {
18956
19080
  s1 = null;
18957
19081
  }
18958
19082
  if (s1 !== peg$FAILED) {
18959
- if (input.substr(peg$currPos, 8) === peg$c1497) {
18960
- s2 = peg$c1497;
19083
+ if (input.substr(peg$currPos, 8) === peg$c1501) {
19084
+ s2 = peg$c1501;
18961
19085
  peg$currPos += 8;
18962
19086
  }
18963
19087
  else {
18964
19088
  s2 = peg$FAILED;
18965
19089
  if (peg$silentFails === 0) {
18966
- peg$fail(peg$c1498);
19090
+ peg$fail(peg$c1502);
18967
19091
  }
18968
19092
  }
18969
19093
  if (s2 !== peg$FAILED) {
@@ -18993,7 +19117,7 @@ function peg$parse(input, options) {
18993
19117
  }
18994
19118
  if (s7 !== peg$FAILED) {
18995
19119
  peg$savedPos = s0;
18996
- s1 = peg$c1510(s4);
19120
+ s1 = peg$c1514(s4);
18997
19121
  s0 = s1;
18998
19122
  }
18999
19123
  else {
@@ -19038,14 +19162,14 @@ function peg$parse(input, options) {
19038
19162
  function peg$parseRegularArrangeDeclaration() {
19039
19163
  var s0, s1, s2, s3, s4, s5, s6;
19040
19164
  s0 = peg$currPos;
19041
- if (input.substr(peg$currPos, 7) === peg$c1511) {
19042
- s1 = peg$c1511;
19165
+ if (input.substr(peg$currPos, 7) === peg$c1515) {
19166
+ s1 = peg$c1515;
19043
19167
  peg$currPos += 7;
19044
19168
  }
19045
19169
  else {
19046
19170
  s1 = peg$FAILED;
19047
19171
  if (peg$silentFails === 0) {
19048
- peg$fail(peg$c1512);
19172
+ peg$fail(peg$c1516);
19049
19173
  }
19050
19174
  }
19051
19175
  if (s1 !== peg$FAILED) {
@@ -19078,7 +19202,7 @@ function peg$parse(input, options) {
19078
19202
  }
19079
19203
  if (s6 !== peg$FAILED) {
19080
19204
  peg$savedPos = s0;
19081
- s1 = peg$c1513(s3);
19205
+ s1 = peg$c1517(s3);
19082
19206
  s0 = s1;
19083
19207
  }
19084
19208
  else {
@@ -19115,14 +19239,14 @@ function peg$parse(input, options) {
19115
19239
  function peg$parseArrangeStartDeclaration() {
19116
19240
  var s0, s1, s2, s3, s4, s5, s6;
19117
19241
  s0 = peg$currPos;
19118
- if (input.substr(peg$currPos, 13) === peg$c1514) {
19119
- s1 = peg$c1514;
19242
+ if (input.substr(peg$currPos, 13) === peg$c1518) {
19243
+ s1 = peg$c1518;
19120
19244
  peg$currPos += 13;
19121
19245
  }
19122
19246
  else {
19123
19247
  s1 = peg$FAILED;
19124
19248
  if (peg$silentFails === 0) {
19125
- peg$fail(peg$c1515);
19249
+ peg$fail(peg$c1519);
19126
19250
  }
19127
19251
  }
19128
19252
  if (s1 !== peg$FAILED) {
@@ -19155,7 +19279,7 @@ function peg$parse(input, options) {
19155
19279
  }
19156
19280
  if (s6 !== peg$FAILED) {
19157
19281
  peg$savedPos = s0;
19158
- s1 = peg$c1516(s3);
19282
+ s1 = peg$c1520(s3);
19159
19283
  s0 = s1;
19160
19284
  }
19161
19285
  else {
@@ -19192,14 +19316,14 @@ function peg$parse(input, options) {
19192
19316
  function peg$parseArrangeEndDeclaration() {
19193
19317
  var s0, s1, s2, s3, s4, s5, s6;
19194
19318
  s0 = peg$currPos;
19195
- if (input.substr(peg$currPos, 11) === peg$c1517) {
19196
- s1 = peg$c1517;
19319
+ if (input.substr(peg$currPos, 11) === peg$c1521) {
19320
+ s1 = peg$c1521;
19197
19321
  peg$currPos += 11;
19198
19322
  }
19199
19323
  else {
19200
19324
  s1 = peg$FAILED;
19201
19325
  if (peg$silentFails === 0) {
19202
- peg$fail(peg$c1518);
19326
+ peg$fail(peg$c1522);
19203
19327
  }
19204
19328
  }
19205
19329
  if (s1 !== peg$FAILED) {
@@ -19232,7 +19356,7 @@ function peg$parse(input, options) {
19232
19356
  }
19233
19357
  if (s6 !== peg$FAILED) {
19234
19358
  peg$savedPos = s0;
19235
- s1 = peg$c1519(s3);
19359
+ s1 = peg$c1523(s3);
19236
19360
  s0 = s1;
19237
19361
  }
19238
19362
  else {
@@ -19279,7 +19403,7 @@ function peg$parse(input, options) {
19279
19403
  peg$silentFails--;
19280
19404
  if (s0 === peg$FAILED) {
19281
19405
  if (peg$silentFails === 0) {
19282
- peg$fail(peg$c1520);
19406
+ peg$fail(peg$c1524);
19283
19407
  }
19284
19408
  }
19285
19409
  return s0;
@@ -21263,7 +21387,7 @@ var constants = /*#__PURE__*/Object.freeze({
21263
21387
  * Useful for runtime diagnostics and for embedding in serialized machine
21264
21388
  * snapshots so that deserializers can detect version-skew.
21265
21389
  */
21266
- const version = "5.126.0";
21390
+ const version = "5.127.0";
21267
21391
 
21268
21392
  // whargarbl lots of these return arrays could/should be sets
21269
21393
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
@@ -21306,6 +21430,9 @@ function transfer_state_properties(state_decl) {
21306
21430
  case 'image':
21307
21431
  state_decl.image = d.value;
21308
21432
  break;
21433
+ case 'url':
21434
+ state_decl.url = d.value;
21435
+ break;
21309
21436
  case 'state_property':
21310
21437
  state_decl.property = { name: d.name, value: d.value };
21311
21438
  break;
@@ -21412,6 +21539,12 @@ function state_style_condense(jssk, machine) {
21412
21539
  }
21413
21540
  state_style.borderColor = key.value;
21414
21541
  break;
21542
+ case 'url':
21543
+ if (state_style.url !== undefined) {
21544
+ throw new JssmError(machine, `cannot redefine 'url' in state_style_condense, already defined`);
21545
+ }
21546
+ state_style.url = key.value;
21547
+ break;
21415
21548
  default:
21416
21549
  // TODO do that <never> trick to assert this list is complete
21417
21550
  throw new JssmError(machine, `unknown state style key in condense: ${key.key}`);
@@ -24027,6 +24160,7 @@ class Machine {
24027
24160
  individual_style.corners = decl === null || decl === void 0 ? void 0 : decl.corners;
24028
24161
  individual_style.shape = decl === null || decl === void 0 ? void 0 : decl.shape;
24029
24162
  individual_style.image = decl === null || decl === void 0 ? void 0 : decl.image;
24163
+ individual_style.url = decl === null || decl === void 0 ? void 0 : decl.url;
24030
24164
  layers.push(individual_style);
24031
24165
  return layers.reduce((acc, cur) => {
24032
24166
  const composite_state = acc;
@@ -24830,9 +24964,15 @@ function default_fillcolor_for(kind) {
24830
24964
  /**
24831
24965
  * Render the node-feature list for one machine, one node per state.
24832
24966
  * All style reads route through {@link jssm.Machine.style_for} so that
24833
- * theme-supplied values (corners, lineStyle, image, shape, colours) are
24834
- * honoured uniformly. A single `style_for` call per state — downstream
24835
- * helpers operate on the cached result rather than re-querying.
24967
+ * theme-supplied values (corners, lineStyle, image, shape, colours, url)
24968
+ * are honoured uniformly. A single `style_for` call per state —
24969
+ * downstream helpers operate on the cached result rather than
24970
+ * re-querying.
24971
+ *
24972
+ * When a state declares a `url`, that value is emitted as Graphviz'
24973
+ * uppercase `URL=` node attribute, which becomes an `xlink:href` on the
24974
+ * rendered SVG node — providing click-through navigation from state
24975
+ * shapes in diagrams. See FSL issue StoneCypher/fsl#420.
24836
24976
  *
24837
24977
  * When `hide_state_labels` is true, the `label=` attribute is omitted from
24838
24978
  * every state's node line; Graphviz then renders the node box without any
@@ -24854,6 +24994,7 @@ function states_to_nodes_string(u_jssm, l_states, state_index, state_kinds, hide
24854
24994
  ['style', compose_style_string(style)],
24855
24995
  ['fontcolor', style.textColor || ''],
24856
24996
  ['image', style.image || ''],
24997
+ ['URL', style.url || ''],
24857
24998
  ['fillcolor', fillcolor]
24858
24999
  ]
24859
25000
  .filter(r => r[1])