jssm 5.158.2 → 5.159.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.
@@ -359,10 +359,20 @@ function peg$parse(input, options) {
359
359
  node.loc = location();
360
360
  }
361
361
  return node;
362
- }, peg$c1235 = "milliseconds", peg$c1236 = peg$literalExpectation("milliseconds", false), peg$c1237 = function () { return 1; }, peg$c1238 = "millisecond", peg$c1239 = peg$literalExpectation("millisecond", false), peg$c1240 = "msecs", peg$c1241 = peg$literalExpectation("msecs", false), peg$c1242 = "msec", peg$c1243 = peg$literalExpectation("msec", false), peg$c1244 = "ms", peg$c1245 = peg$literalExpectation("ms", false), peg$c1246 = "seconds", peg$c1247 = peg$literalExpectation("seconds", false), peg$c1248 = function () { return 1000; }, peg$c1249 = "second", peg$c1250 = peg$literalExpectation("second", false), peg$c1251 = "secs", peg$c1252 = peg$literalExpectation("secs", false), peg$c1253 = "sec", peg$c1254 = peg$literalExpectation("sec", false), peg$c1255 = "s", peg$c1256 = peg$literalExpectation("s", false), peg$c1257 = "minutes", peg$c1258 = peg$literalExpectation("minutes", false), peg$c1259 = function () { return 1000 * 60; }, peg$c1260 = "minute", peg$c1261 = peg$literalExpectation("minute", false), peg$c1262 = "mins", peg$c1263 = peg$literalExpectation("mins", false), peg$c1264 = "min", peg$c1265 = peg$literalExpectation("min", false), peg$c1266 = "m", peg$c1267 = peg$literalExpectation("m", false), peg$c1268 = "hours", peg$c1269 = peg$literalExpectation("hours", false), peg$c1270 = function () { return 1000 * 60 * 60; }, peg$c1271 = "hour", peg$c1272 = peg$literalExpectation("hour", false), peg$c1273 = "hrs", peg$c1274 = peg$literalExpectation("hrs", false), peg$c1275 = "hr", peg$c1276 = peg$literalExpectation("hr", false), peg$c1277 = "h", peg$c1278 = peg$literalExpectation("h", false), peg$c1279 = "days", peg$c1280 = peg$literalExpectation("days", false), peg$c1281 = function () { return 1000 * 60 * 60 * 24; }, peg$c1282 = "day", peg$c1283 = peg$literalExpectation("day", false), peg$c1284 = "d", peg$c1285 = peg$literalExpectation("d", false), peg$c1286 = "weeks", peg$c1287 = peg$literalExpectation("weeks", false), peg$c1288 = function () { return 1000 * 60 * 60 * 24 * 7; }, peg$c1289 = "week", peg$c1290 = peg$literalExpectation("week", false), peg$c1291 = "wks", peg$c1292 = peg$literalExpectation("wks", false), peg$c1293 = "wk", peg$c1294 = peg$literalExpectation("wk", false), peg$c1295 = "w", peg$c1296 = peg$literalExpectation("w", false), peg$c1297 = "after", peg$c1298 = peg$literalExpectation("after", false), peg$c1299 = function (value, timescale) { return value * (timescale || 1000); }, peg$c1300 = function (names) { return names.map(i => i[0]); }, peg$c1301 = peg$otherExpectation("group reference"), peg$c1302 = "&", peg$c1303 = peg$literalExpectation("&", false), peg$c1304 = function (name) { return { key: 'group_ref', name }; }, peg$c1305 = "...", peg$c1306 = peg$literalExpectation("...", false), peg$c1307 = function (name) { return { kind: 'group', name, mode: 'spread' }; }, peg$c1308 = function (name) { return { kind: 'group', name, mode: 'nest' }; }, peg$c1309 = function (name) { return { kind: 'state', name }; }, peg$c1310 = function (members) {
362
+ }, peg$c1235 = "milliseconds", peg$c1236 = peg$literalExpectation("milliseconds", false), peg$c1237 = function () { return 1; }, peg$c1238 = "millisecond", peg$c1239 = peg$literalExpectation("millisecond", false), peg$c1240 = "msecs", peg$c1241 = peg$literalExpectation("msecs", false), peg$c1242 = "msec", peg$c1243 = peg$literalExpectation("msec", false), peg$c1244 = "ms", peg$c1245 = peg$literalExpectation("ms", false), peg$c1246 = "seconds", peg$c1247 = peg$literalExpectation("seconds", false), peg$c1248 = function () { return 1000; }, peg$c1249 = "second", peg$c1250 = peg$literalExpectation("second", false), peg$c1251 = "secs", peg$c1252 = peg$literalExpectation("secs", false), peg$c1253 = "sec", peg$c1254 = peg$literalExpectation("sec", false), peg$c1255 = "s", peg$c1256 = peg$literalExpectation("s", false), peg$c1257 = "minutes", peg$c1258 = peg$literalExpectation("minutes", false), peg$c1259 = function () { return 1000 * 60; }, peg$c1260 = "minute", peg$c1261 = peg$literalExpectation("minute", false), peg$c1262 = "mins", peg$c1263 = peg$literalExpectation("mins", false), peg$c1264 = "min", peg$c1265 = peg$literalExpectation("min", false), peg$c1266 = "m", peg$c1267 = peg$literalExpectation("m", false), peg$c1268 = "hours", peg$c1269 = peg$literalExpectation("hours", false), peg$c1270 = function () { return 1000 * 60 * 60; }, peg$c1271 = "hour", peg$c1272 = peg$literalExpectation("hour", false), peg$c1273 = "hrs", peg$c1274 = peg$literalExpectation("hrs", false), peg$c1275 = "hr", peg$c1276 = peg$literalExpectation("hr", false), peg$c1277 = "h", peg$c1278 = peg$literalExpectation("h", false), peg$c1279 = "days", peg$c1280 = peg$literalExpectation("days", false), peg$c1281 = function () { return 1000 * 60 * 60 * 24; }, peg$c1282 = "day", peg$c1283 = peg$literalExpectation("day", false), peg$c1284 = "d", peg$c1285 = peg$literalExpectation("d", false), peg$c1286 = "weeks", peg$c1287 = peg$literalExpectation("weeks", false), peg$c1288 = function () { return 1000 * 60 * 60 * 24 * 7; }, peg$c1289 = "week", peg$c1290 = peg$literalExpectation("week", false), peg$c1291 = "wks", peg$c1292 = peg$literalExpectation("wks", false), peg$c1293 = "wk", peg$c1294 = peg$literalExpectation("wk", false), peg$c1295 = "w", peg$c1296 = peg$literalExpectation("w", false), peg$c1297 = "after", peg$c1298 = peg$literalExpectation("after", false), peg$c1299 = function (value, timescale) { return value * (timescale || 1000); }, peg$c1300 = function (names) { return names.map(i => i[0]); }, peg$c1301 = peg$otherExpectation("group reference"), peg$c1302 = "&", peg$c1303 = peg$literalExpectation("&", false), peg$c1304 = function (name) { return { key: 'group_ref', name }; }, peg$c1305 = "...", peg$c1306 = peg$literalExpectation("...", false), peg$c1307 = function (name) { const m = { kind: 'group', name, mode: 'spread' }; if (options.locations) {
363
+ m.__loc = location();
364
+ } return m; }, peg$c1308 = function (name) { const m = { kind: 'group', name, mode: 'nest' }; if (options.locations) {
365
+ m.__loc = location();
366
+ } return m; }, peg$c1309 = function (name) { const m = { kind: 'state', name }; if (options.locations) {
367
+ m.__loc = location();
368
+ } return m; }, peg$c1310 = function (members) {
363
369
  const items = members.map(m => m[0]);
364
370
  const has_group = items.some(m => m.kind === 'group');
365
- return has_group ? items : items.map(m => m.name);
371
+ const collapsed = has_group ? items : items.map(m => m.name);
372
+ if (options.locations) {
373
+ collapsed.__member_locs = items.map((m) => m.__loc);
374
+ }
375
+ return collapsed;
366
376
  }, peg$c1311 = "+|", peg$c1312 = peg$literalExpectation("+|", false), peg$c1313 = function (n) {
367
377
  const node = { key: 'stripe', value: parseInt(n, 10) };
368
378
  if (options.locations) {
@@ -812,69 +822,96 @@ function peg$parse(input, options) {
812
822
  const node = { key: 'named_list', name, value };
813
823
  if (options.locations) {
814
824
  node.loc = location();
825
+ node.value_locs = value.__member_locs;
826
+ delete value.__member_locs;
827
+ }
828
+ return node;
829
+ }, peg$c1549 = function (name, value) {
830
+ const node = { key: 'named_list', name, value: value.name };
831
+ if (options.locations) {
832
+ node.loc = location();
833
+ node.value_locs = [value.__loc];
815
834
  }
816
835
  return node;
817
- }, peg$c1549 = peg$otherExpectation("hook event (enter/exit)"), peg$c1550 = "enter", peg$c1551 = peg$literalExpectation("enter", false), peg$c1552 = "exit", peg$c1553 = peg$literalExpectation("exit", false), peg$c1554 = peg$otherExpectation("hook declaration"), peg$c1555 = "on", peg$c1556 = peg$literalExpectation("on", false), peg$c1557 = "do", peg$c1558 = peg$literalExpectation("do", false), peg$c1559 = function (event, subject, action) {
836
+ }, peg$c1550 = function (name) {
837
+ const m = { name };
838
+ if (options.locations) {
839
+ m.__loc = location();
840
+ }
841
+ return m;
842
+ }, peg$c1551 = peg$otherExpectation("hook event (enter/exit)"), peg$c1552 = "enter", peg$c1553 = peg$literalExpectation("enter", false), peg$c1554 = "exit", peg$c1555 = peg$literalExpectation("exit", false), peg$c1556 = peg$otherExpectation("hook declaration"), peg$c1557 = "on", peg$c1558 = peg$literalExpectation("on", false), peg$c1559 = "do", peg$c1560 = peg$literalExpectation("do", false), peg$c1561 = function (event, subject, action) {
818
843
  const node = { key: 'hook_decl', event, subject, action };
844
+ if (subject.key === 'hook_state_subject') {
845
+ node.subject = subject.name;
846
+ if (options.locations) {
847
+ node.subject_loc = subject.__loc;
848
+ }
849
+ }
819
850
  if (options.locations) {
820
851
  node.loc = location();
821
852
  }
822
853
  return node;
823
- }, peg$c1560 = function (name, default_value) {
854
+ }, peg$c1562 = function (name) {
855
+ const m = { key: 'hook_state_subject', name };
856
+ if (options.locations) {
857
+ m.__loc = location();
858
+ }
859
+ return m;
860
+ }, peg$c1563 = function (name, default_value) {
824
861
  const node = { key: 'property_definition', name, default_value, required: true };
825
862
  if (options.locations) {
826
863
  node.loc = location();
827
864
  }
828
865
  return node;
829
- }, peg$c1561 = function (name) {
866
+ }, peg$c1564 = function (name) {
830
867
  const node = { key: 'property_definition', name, required: true };
831
868
  if (options.locations) {
832
869
  node.loc = location();
833
870
  }
834
871
  return node;
835
- }, peg$c1562 = function (name, default_value) {
872
+ }, peg$c1565 = function (name, default_value) {
836
873
  const node = { key: 'property_definition', name, default_value };
837
874
  if (options.locations) {
838
875
  node.loc = location();
839
876
  }
840
877
  return node;
841
- }, peg$c1563 = function (name) {
878
+ }, peg$c1566 = function (name) {
842
879
  const node = { key: 'property_definition', name };
843
880
  if (options.locations) {
844
881
  node.loc = location();
845
882
  }
846
883
  return node;
847
- }, peg$c1564 = "arrange", peg$c1565 = peg$literalExpectation("arrange", false), peg$c1566 = function (value) {
884
+ }, peg$c1567 = "arrange", peg$c1568 = peg$literalExpectation("arrange", false), peg$c1569 = function (value) {
848
885
  const node = { key: 'arrange_declaration', value };
849
886
  if (options.locations) {
850
887
  node.loc = location();
851
888
  }
852
889
  return node;
853
- }, peg$c1567 = "arrange-start", peg$c1568 = peg$literalExpectation("arrange-start", false), peg$c1569 = function (value) {
890
+ }, peg$c1570 = "arrange-start", peg$c1571 = peg$literalExpectation("arrange-start", false), peg$c1572 = function (value) {
854
891
  const node = { key: 'arrange_start_declaration', value };
855
892
  if (options.locations) {
856
893
  node.loc = location();
857
894
  }
858
895
  return node;
859
- }, peg$c1570 = "arrange-end", peg$c1571 = peg$literalExpectation("arrange-end", false), peg$c1572 = function (value) {
896
+ }, peg$c1573 = "arrange-end", peg$c1574 = peg$literalExpectation("arrange-end", false), peg$c1575 = function (value) {
860
897
  const node = { key: 'arrange_end_declaration', value };
861
898
  if (options.locations) {
862
899
  node.loc = location();
863
900
  }
864
901
  return node;
865
- }, peg$c1573 = peg$otherExpectation("oarrange declaration"), peg$c1574 = "oarrange", peg$c1575 = peg$literalExpectation("oarrange", false), peg$c1576 = function (value) {
902
+ }, peg$c1576 = peg$otherExpectation("oarrange declaration"), peg$c1577 = "oarrange", peg$c1578 = peg$literalExpectation("oarrange", false), peg$c1579 = function (value) {
866
903
  const node = { key: 'oarrange_declaration', value };
867
904
  if (options.locations) {
868
905
  node.loc = location();
869
906
  }
870
907
  return node;
871
- }, peg$c1577 = peg$otherExpectation("farrange declaration"), peg$c1578 = "farrange", peg$c1579 = peg$literalExpectation("farrange", false), peg$c1580 = function (value) {
908
+ }, peg$c1580 = peg$otherExpectation("farrange declaration"), peg$c1581 = "farrange", peg$c1582 = peg$literalExpectation("farrange", false), peg$c1583 = function (value) {
872
909
  const node = { key: 'farrange_declaration', value };
873
910
  if (options.locations) {
874
911
  node.loc = location();
875
912
  }
876
913
  return node;
877
- }, peg$c1581 = 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;
914
+ }, peg$c1584 = 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;
878
915
  if ("startRule" in options) {
879
916
  if (!(options.startRule in peg$startRuleFunctions)) {
880
917
  throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
@@ -19498,7 +19535,7 @@ function peg$parse(input, options) {
19498
19535
  s7 = null;
19499
19536
  }
19500
19537
  if (s7 !== peg$FAILED) {
19501
- s8 = peg$parseLabel();
19538
+ s8 = peg$parseGroupAliasMember();
19502
19539
  if (s8 !== peg$FAILED) {
19503
19540
  s9 = peg$parseWS();
19504
19541
  if (s9 === peg$FAILED) {
@@ -19522,7 +19559,7 @@ function peg$parse(input, options) {
19522
19559
  }
19523
19560
  if (s11 !== peg$FAILED) {
19524
19561
  peg$savedPos = s0;
19525
- s1 = peg$c1548(s4, s8);
19562
+ s1 = peg$c1549(s4, s8);
19526
19563
  s0 = s1;
19527
19564
  }
19528
19565
  else {
@@ -19582,35 +19619,46 @@ function peg$parse(input, options) {
19582
19619
  }
19583
19620
  return s0;
19584
19621
  }
19622
+ function peg$parseGroupAliasMember() {
19623
+ var s0, s1;
19624
+ s0 = peg$currPos;
19625
+ s1 = peg$parseLabel();
19626
+ if (s1 !== peg$FAILED) {
19627
+ peg$savedPos = s0;
19628
+ s1 = peg$c1550(s1);
19629
+ }
19630
+ s0 = s1;
19631
+ return s0;
19632
+ }
19585
19633
  function peg$parseHookEvent() {
19586
19634
  var s0;
19587
19635
  peg$silentFails++;
19588
- if (input.substr(peg$currPos, 5) === peg$c1550) {
19589
- s0 = peg$c1550;
19636
+ if (input.substr(peg$currPos, 5) === peg$c1552) {
19637
+ s0 = peg$c1552;
19590
19638
  peg$currPos += 5;
19591
19639
  }
19592
19640
  else {
19593
19641
  s0 = peg$FAILED;
19594
19642
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19595
- peg$fail(peg$c1551);
19643
+ peg$fail(peg$c1553);
19596
19644
  }
19597
19645
  }
19598
19646
  if (s0 === peg$FAILED) {
19599
- if (input.substr(peg$currPos, 4) === peg$c1552) {
19600
- s0 = peg$c1552;
19647
+ if (input.substr(peg$currPos, 4) === peg$c1554) {
19648
+ s0 = peg$c1554;
19601
19649
  peg$currPos += 4;
19602
19650
  }
19603
19651
  else {
19604
19652
  s0 = peg$FAILED;
19605
19653
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19606
- peg$fail(peg$c1553);
19654
+ peg$fail(peg$c1555);
19607
19655
  }
19608
19656
  }
19609
19657
  }
19610
19658
  peg$silentFails--;
19611
19659
  if (s0 === peg$FAILED) {
19612
19660
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19613
- peg$fail(peg$c1549);
19661
+ peg$fail(peg$c1551);
19614
19662
  }
19615
19663
  }
19616
19664
  return s0;
@@ -19624,14 +19672,14 @@ function peg$parse(input, options) {
19624
19672
  s1 = null;
19625
19673
  }
19626
19674
  if (s1 !== peg$FAILED) {
19627
- if (input.substr(peg$currPos, 2) === peg$c1555) {
19628
- s2 = peg$c1555;
19675
+ if (input.substr(peg$currPos, 2) === peg$c1557) {
19676
+ s2 = peg$c1557;
19629
19677
  peg$currPos += 2;
19630
19678
  }
19631
19679
  else {
19632
19680
  s2 = peg$FAILED;
19633
19681
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19634
- peg$fail(peg$c1556);
19682
+ peg$fail(peg$c1558);
19635
19683
  }
19636
19684
  }
19637
19685
  if (s2 !== peg$FAILED) {
@@ -19643,19 +19691,19 @@ function peg$parse(input, options) {
19643
19691
  if (s5 !== peg$FAILED) {
19644
19692
  s6 = peg$parseGroupRef();
19645
19693
  if (s6 === peg$FAILED) {
19646
- s6 = peg$parseLabel();
19694
+ s6 = peg$parseHookStateSubject();
19647
19695
  }
19648
19696
  if (s6 !== peg$FAILED) {
19649
19697
  s7 = peg$parseWS();
19650
19698
  if (s7 !== peg$FAILED) {
19651
- if (input.substr(peg$currPos, 2) === peg$c1557) {
19652
- s8 = peg$c1557;
19699
+ if (input.substr(peg$currPos, 2) === peg$c1559) {
19700
+ s8 = peg$c1559;
19653
19701
  peg$currPos += 2;
19654
19702
  }
19655
19703
  else {
19656
19704
  s8 = peg$FAILED;
19657
19705
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19658
- peg$fail(peg$c1558);
19706
+ peg$fail(peg$c1560);
19659
19707
  }
19660
19708
  }
19661
19709
  if (s8 !== peg$FAILED) {
@@ -19685,7 +19733,7 @@ function peg$parse(input, options) {
19685
19733
  }
19686
19734
  if (s13 !== peg$FAILED) {
19687
19735
  peg$savedPos = s0;
19688
- s1 = peg$c1559(s4, s6, s10);
19736
+ s1 = peg$c1561(s4, s6, s10);
19689
19737
  s0 = s1;
19690
19738
  }
19691
19739
  else {
@@ -19756,11 +19804,22 @@ function peg$parse(input, options) {
19756
19804
  if (s0 === peg$FAILED) {
19757
19805
  s1 = peg$FAILED;
19758
19806
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
19759
- peg$fail(peg$c1554);
19807
+ peg$fail(peg$c1556);
19760
19808
  }
19761
19809
  }
19762
19810
  return s0;
19763
19811
  }
19812
+ function peg$parseHookStateSubject() {
19813
+ var s0, s1;
19814
+ s0 = peg$currPos;
19815
+ s1 = peg$parseLabel();
19816
+ if (s1 !== peg$FAILED) {
19817
+ peg$savedPos = s0;
19818
+ s1 = peg$c1562(s1);
19819
+ }
19820
+ s0 = s1;
19821
+ return s0;
19822
+ }
19764
19823
  function peg$parseMachineProperty() {
19765
19824
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
19766
19825
  s0 = peg$currPos;
@@ -19836,7 +19895,7 @@ function peg$parse(input, options) {
19836
19895
  }
19837
19896
  if (s13 !== peg$FAILED) {
19838
19897
  peg$savedPos = s0;
19839
- s1 = peg$c1560(s4, s8);
19898
+ s1 = peg$c1563(s4, s8);
19840
19899
  s0 = s1;
19841
19900
  }
19842
19901
  else {
@@ -19960,7 +20019,7 @@ function peg$parse(input, options) {
19960
20019
  }
19961
20020
  if (s9 !== peg$FAILED) {
19962
20021
  peg$savedPos = s0;
19963
- s1 = peg$c1561(s4);
20022
+ s1 = peg$c1564(s4);
19964
20023
  s0 = s1;
19965
20024
  }
19966
20025
  else {
@@ -20068,7 +20127,7 @@ function peg$parse(input, options) {
20068
20127
  }
20069
20128
  if (s11 !== peg$FAILED) {
20070
20129
  peg$savedPos = s0;
20071
- s1 = peg$c1562(s4, s8);
20130
+ s1 = peg$c1565(s4, s8);
20072
20131
  s0 = s1;
20073
20132
  }
20074
20133
  else {
@@ -20169,7 +20228,7 @@ function peg$parse(input, options) {
20169
20228
  }
20170
20229
  if (s7 !== peg$FAILED) {
20171
20230
  peg$savedPos = s0;
20172
- s1 = peg$c1563(s4);
20231
+ s1 = peg$c1566(s4);
20173
20232
  s0 = s1;
20174
20233
  }
20175
20234
  else {
@@ -20214,14 +20273,14 @@ function peg$parse(input, options) {
20214
20273
  function peg$parseRegularArrangeDeclaration() {
20215
20274
  var s0, s1, s2, s3, s4, s5, s6;
20216
20275
  s0 = peg$currPos;
20217
- if (input.substr(peg$currPos, 7) === peg$c1564) {
20218
- s1 = peg$c1564;
20276
+ if (input.substr(peg$currPos, 7) === peg$c1567) {
20277
+ s1 = peg$c1567;
20219
20278
  peg$currPos += 7;
20220
20279
  }
20221
20280
  else {
20222
20281
  s1 = peg$FAILED;
20223
20282
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20224
- peg$fail(peg$c1565);
20283
+ peg$fail(peg$c1568);
20225
20284
  }
20226
20285
  }
20227
20286
  if (s1 !== peg$FAILED) {
@@ -20254,7 +20313,7 @@ function peg$parse(input, options) {
20254
20313
  }
20255
20314
  if (s6 !== peg$FAILED) {
20256
20315
  peg$savedPos = s0;
20257
- s1 = peg$c1566(s3);
20316
+ s1 = peg$c1569(s3);
20258
20317
  s0 = s1;
20259
20318
  }
20260
20319
  else {
@@ -20291,14 +20350,14 @@ function peg$parse(input, options) {
20291
20350
  function peg$parseArrangeStartDeclaration() {
20292
20351
  var s0, s1, s2, s3, s4, s5, s6;
20293
20352
  s0 = peg$currPos;
20294
- if (input.substr(peg$currPos, 13) === peg$c1567) {
20295
- s1 = peg$c1567;
20353
+ if (input.substr(peg$currPos, 13) === peg$c1570) {
20354
+ s1 = peg$c1570;
20296
20355
  peg$currPos += 13;
20297
20356
  }
20298
20357
  else {
20299
20358
  s1 = peg$FAILED;
20300
20359
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20301
- peg$fail(peg$c1568);
20360
+ peg$fail(peg$c1571);
20302
20361
  }
20303
20362
  }
20304
20363
  if (s1 !== peg$FAILED) {
@@ -20331,7 +20390,7 @@ function peg$parse(input, options) {
20331
20390
  }
20332
20391
  if (s6 !== peg$FAILED) {
20333
20392
  peg$savedPos = s0;
20334
- s1 = peg$c1569(s3);
20393
+ s1 = peg$c1572(s3);
20335
20394
  s0 = s1;
20336
20395
  }
20337
20396
  else {
@@ -20368,14 +20427,14 @@ function peg$parse(input, options) {
20368
20427
  function peg$parseArrangeEndDeclaration() {
20369
20428
  var s0, s1, s2, s3, s4, s5, s6;
20370
20429
  s0 = peg$currPos;
20371
- if (input.substr(peg$currPos, 11) === peg$c1570) {
20372
- s1 = peg$c1570;
20430
+ if (input.substr(peg$currPos, 11) === peg$c1573) {
20431
+ s1 = peg$c1573;
20373
20432
  peg$currPos += 11;
20374
20433
  }
20375
20434
  else {
20376
20435
  s1 = peg$FAILED;
20377
20436
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20378
- peg$fail(peg$c1571);
20437
+ peg$fail(peg$c1574);
20379
20438
  }
20380
20439
  }
20381
20440
  if (s1 !== peg$FAILED) {
@@ -20408,7 +20467,7 @@ function peg$parse(input, options) {
20408
20467
  }
20409
20468
  if (s6 !== peg$FAILED) {
20410
20469
  peg$savedPos = s0;
20411
- s1 = peg$c1572(s3);
20470
+ s1 = peg$c1575(s3);
20412
20471
  s0 = s1;
20413
20472
  }
20414
20473
  else {
@@ -20446,14 +20505,14 @@ function peg$parse(input, options) {
20446
20505
  var s0, s1, s2, s3, s4, s5, s6;
20447
20506
  peg$silentFails++;
20448
20507
  s0 = peg$currPos;
20449
- if (input.substr(peg$currPos, 8) === peg$c1574) {
20450
- s1 = peg$c1574;
20508
+ if (input.substr(peg$currPos, 8) === peg$c1577) {
20509
+ s1 = peg$c1577;
20451
20510
  peg$currPos += 8;
20452
20511
  }
20453
20512
  else {
20454
20513
  s1 = peg$FAILED;
20455
20514
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20456
- peg$fail(peg$c1575);
20515
+ peg$fail(peg$c1578);
20457
20516
  }
20458
20517
  }
20459
20518
  if (s1 !== peg$FAILED) {
@@ -20486,7 +20545,7 @@ function peg$parse(input, options) {
20486
20545
  }
20487
20546
  if (s6 !== peg$FAILED) {
20488
20547
  peg$savedPos = s0;
20489
- s1 = peg$c1576(s3);
20548
+ s1 = peg$c1579(s3);
20490
20549
  s0 = s1;
20491
20550
  }
20492
20551
  else {
@@ -20522,7 +20581,7 @@ function peg$parse(input, options) {
20522
20581
  if (s0 === peg$FAILED) {
20523
20582
  s1 = peg$FAILED;
20524
20583
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20525
- peg$fail(peg$c1573);
20584
+ peg$fail(peg$c1576);
20526
20585
  }
20527
20586
  }
20528
20587
  return s0;
@@ -20531,14 +20590,14 @@ function peg$parse(input, options) {
20531
20590
  var s0, s1, s2, s3, s4, s5, s6;
20532
20591
  peg$silentFails++;
20533
20592
  s0 = peg$currPos;
20534
- if (input.substr(peg$currPos, 8) === peg$c1578) {
20535
- s1 = peg$c1578;
20593
+ if (input.substr(peg$currPos, 8) === peg$c1581) {
20594
+ s1 = peg$c1581;
20536
20595
  peg$currPos += 8;
20537
20596
  }
20538
20597
  else {
20539
20598
  s1 = peg$FAILED;
20540
20599
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20541
- peg$fail(peg$c1579);
20600
+ peg$fail(peg$c1582);
20542
20601
  }
20543
20602
  }
20544
20603
  if (s1 !== peg$FAILED) {
@@ -20571,7 +20630,7 @@ function peg$parse(input, options) {
20571
20630
  }
20572
20631
  if (s6 !== peg$FAILED) {
20573
20632
  peg$savedPos = s0;
20574
- s1 = peg$c1580(s3);
20633
+ s1 = peg$c1583(s3);
20575
20634
  s0 = s1;
20576
20635
  }
20577
20636
  else {
@@ -20607,7 +20666,7 @@ function peg$parse(input, options) {
20607
20666
  if (s0 === peg$FAILED) {
20608
20667
  s1 = peg$FAILED;
20609
20668
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20610
- peg$fail(peg$c1577);
20669
+ peg$fail(peg$c1580);
20611
20670
  }
20612
20671
  }
20613
20672
  return s0;
@@ -20631,7 +20690,7 @@ function peg$parse(input, options) {
20631
20690
  peg$silentFails--;
20632
20691
  if (s0 === peg$FAILED) {
20633
20692
  if (peg$silentFails === 0 && peg$currPos >= peg$maxFailPos) {
20634
- peg$fail(peg$c1581);
20693
+ peg$fail(peg$c1584);
20635
20694
  }
20636
20695
  }
20637
20696
  return s0;
@@ -23625,7 +23684,8 @@ var constants = /*#__PURE__*/Object.freeze({
23625
23684
  const HEX8 = /^#[0-9a-f]{8}$/i;
23626
23685
  /** AST keys that hold source locations, not child nodes to recurse into. */
23627
23686
  const LOC_KEYS = new Set(['loc', 'value_loc', 'name_loc', 'from_loc', 'to_loc',
23628
- 'r_action_loc', 'l_action_loc']);
23687
+ 'r_action_loc', 'l_action_loc', 'value_locs',
23688
+ 'subject_loc', '__loc']);
23629
23689
  /** State-declaration item keys whose value is an enum lacking a value-precise loc. */
23630
23690
  const ENUM_VALUE_KEYS = new Set(['shape']);
23631
23691
  /** Locate a value substring inside a node's full-statement `loc` span. The
@@ -23662,6 +23722,31 @@ function collect(node, text, out) {
23662
23722
  if (ENUM_VALUE_KEYS.has(n.key) && typeof n.value === 'string' && n.loc && !n.value_loc) {
23663
23723
  out.push(Object.assign(Object.assign({}, valueSpanWithin(text, n.loc, n.value)), { kind: 'enum' }));
23664
23724
  }
23725
+ // group declarations (`&G : [a b c];` / `&G : a;`): every plain member is a
23726
+ // state reference. The grammar supplies value_locs parallel to value, so
23727
+ // positions come from the parser, never from text search. Nest/spread
23728
+ // entries (`&child` / `...&child`) are group references, not states, and
23729
+ // the group's own NAME is deliberately not a state span either.
23730
+ if (n.key === 'named_list') {
23731
+ const members = Array.isArray(n.value) ? n.value : [n.value];
23732
+ members.forEach((member, i) => {
23733
+ const m = member;
23734
+ const name = typeof m === 'string' ? m
23735
+ : m.kind === 'state' ? m.name
23736
+ : null;
23737
+ if (name !== null) {
23738
+ const at = n.value_locs[i];
23739
+ out.push({ from: at.start.offset, to: at.end.offset, kind: 'state', value: name });
23740
+ }
23741
+ });
23742
+ }
23743
+ // hook declarations (`on enter x do 'act';`): a plain-label subject is a
23744
+ // state reference and carries a grammar-supplied subject_loc. Group-ref
23745
+ // subjects (`on exit &G …`) are group references, not states — no
23746
+ // subject_loc, no span.
23747
+ if (n.key === 'hook_decl' && n.subject_loc) {
23748
+ out.push({ from: n.subject_loc.start.offset, to: n.subject_loc.end.offset, kind: 'state', value: n.subject });
23749
+ }
23665
23750
  for (const key of Object.keys(n)) {
23666
23751
  if (!LOC_KEYS.has(key)) {
23667
23752
  collect(n[key], text, out);
@@ -23669,11 +23754,21 @@ function collect(node, text, out) {
23669
23754
  }
23670
23755
  }
23671
23756
  /**
23672
- * Collect color / state / shape-enum semantic spans from `text`.
23757
+ * Collect color / state / shape-enum semantic spans from `text`. State spans
23758
+ * cover transition endpoints, state-declaration subjects, group-list members
23759
+ * (`&G : [a b c];` — but not the group's own name, nor `&`/`...&` nested
23760
+ * group references), and plain-label hook subjects (`on enter x do 'act';` —
23761
+ * but not `&group` subjects). Every state span's `value` is the parser's
23762
+ * resolved name (unquoted, unescaped), while `from`/`to` cover the source
23763
+ * spelling including any quotes.
23673
23764
  *
23674
23765
  * @example
23675
23766
  * fslSemanticSpans('state s : { color: crimson; };')
23676
23767
  * .find(s => s.kind === 'color')?.value; // => '#dc143cff'
23768
+ *
23769
+ * @example
23770
+ * fslSemanticSpans('&G : [a b];\na -> b;')
23771
+ * .filter(s => s.kind === 'state').length; // => 4 (two members + two endpoints)
23677
23772
  */
23678
23773
  function fslSemanticSpans(text) {
23679
23774
  let tree;
@@ -23694,7 +23789,7 @@ function fslSemanticSpans(text) {
23694
23789
  * Useful for runtime diagnostics and for embedding in serialized machine
23695
23790
  * snapshots so that deserializers can detect version-skew.
23696
23791
  */
23697
- const version = "5.158.2";
23792
+ const version = "5.159.0";
23698
23793
 
23699
23794
  /**
23700
23795
  * The FSL Markdown fence convention parser — pure, host-agnostic logic that