@wireweave/core 2.4.0 → 2.5.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/dist/index.cjs CHANGED
@@ -593,30 +593,32 @@ function peg$parse(input, options) {
593
593
  const peg$c49 = "tabs";
594
594
  const peg$c50 = "tab";
595
595
  const peg$c51 = "breadcrumb";
596
- const peg$c52 = "=";
597
- const peg$c53 = "//";
598
- const peg$c54 = "/*";
599
- const peg$c55 = '"';
600
- const peg$c56 = "'";
601
- const peg$c57 = "\\";
602
- const peg$c58 = "n";
603
- const peg$c59 = "r";
604
- const peg$c60 = "t";
605
- const peg$c61 = "-";
606
- const peg$c62 = ".";
607
- const peg$c63 = "px";
608
- const peg$c64 = "%";
609
- const peg$c65 = "em";
610
- const peg$c66 = "rem";
611
- const peg$c67 = "vh";
612
- const peg$c68 = "vw";
613
- const peg$c69 = "true";
614
- const peg$c70 = "false";
615
- const peg$c71 = "\n";
616
- const peg$c72 = "*/";
617
- const peg$r0 = /^[=[{}]/;
618
- const peg$r1 = /^[a-zA-Z0-9_\-]/;
619
- const peg$r2 = /^[0-9]/;
596
+ const peg$c52 = "marker";
597
+ const peg$c53 = "annotations";
598
+ const peg$c54 = "=";
599
+ const peg$c55 = "//";
600
+ const peg$c56 = "/*";
601
+ const peg$c57 = '"';
602
+ const peg$c58 = "'";
603
+ const peg$c59 = "\\";
604
+ const peg$c60 = "n";
605
+ const peg$c61 = "r";
606
+ const peg$c62 = "t";
607
+ const peg$c63 = "-";
608
+ const peg$c64 = ".";
609
+ const peg$c65 = "px";
610
+ const peg$c66 = "%";
611
+ const peg$c67 = "em";
612
+ const peg$c68 = "rem";
613
+ const peg$c69 = "vh";
614
+ const peg$c70 = "vw";
615
+ const peg$c71 = "true";
616
+ const peg$c72 = "false";
617
+ const peg$c73 = "\n";
618
+ const peg$c74 = "*/";
619
+ const peg$r0 = /^[0-9]/;
620
+ const peg$r1 = /^[=[{}]/;
621
+ const peg$r2 = /^[a-zA-Z0-9_\-]/;
620
622
  const peg$r3 = /^[a-zA-Z_]/;
621
623
  const peg$r4 = /^[ \t\n\r]/;
622
624
  const peg$r5 = /^[^\n]/;
@@ -672,40 +674,43 @@ function peg$parse(input, options) {
672
674
  const peg$e49 = peg$literalExpectation("tabs", false);
673
675
  const peg$e50 = peg$literalExpectation("tab", false);
674
676
  const peg$e51 = peg$literalExpectation("breadcrumb", false);
675
- const peg$e52 = peg$literalExpectation("=", false);
676
- const peg$e53 = peg$classExpectation(["=", "[", "{", "}"], false, false, false);
677
- const peg$e54 = peg$literalExpectation("//", false);
678
- const peg$e55 = peg$literalExpectation("/*", false);
679
- const peg$e56 = peg$anyExpectation();
680
- const peg$e57 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
681
- const peg$e58 = peg$otherExpectation("string");
682
- const peg$e59 = peg$literalExpectation('"', false);
683
- const peg$e60 = peg$literalExpectation("'", false);
684
- const peg$e61 = peg$literalExpectation("\\", false);
685
- const peg$e62 = peg$literalExpectation("n", false);
686
- const peg$e63 = peg$literalExpectation("r", false);
687
- const peg$e64 = peg$literalExpectation("t", false);
688
- const peg$e65 = peg$otherExpectation("number");
689
- const peg$e66 = peg$literalExpectation("-", false);
690
- const peg$e67 = peg$classExpectation([["0", "9"]], false, false, false);
691
- const peg$e68 = peg$literalExpectation(".", false);
692
- const peg$e69 = peg$otherExpectation("value with unit");
693
- const peg$e70 = peg$literalExpectation("px", false);
694
- const peg$e71 = peg$literalExpectation("%", false);
695
- const peg$e72 = peg$literalExpectation("em", false);
696
- const peg$e73 = peg$literalExpectation("rem", false);
697
- const peg$e74 = peg$literalExpectation("vh", false);
698
- const peg$e75 = peg$literalExpectation("vw", false);
699
- const peg$e76 = peg$otherExpectation("boolean");
700
- const peg$e77 = peg$literalExpectation("true", false);
701
- const peg$e78 = peg$literalExpectation("false", false);
702
- const peg$e79 = peg$otherExpectation("identifier");
703
- const peg$e80 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
704
- const peg$e81 = peg$classExpectation([" ", " ", "\n", "\r"], false, false, false);
705
- const peg$e82 = peg$otherExpectation("comment");
706
- const peg$e83 = peg$classExpectation(["\n"], true, false, false);
707
- const peg$e84 = peg$literalExpectation("\n", false);
708
- const peg$e85 = peg$literalExpectation("*/", false);
677
+ const peg$e52 = peg$literalExpectation("marker", false);
678
+ const peg$e53 = peg$literalExpectation("annotations", false);
679
+ const peg$e54 = peg$otherExpectation("integer");
680
+ const peg$e55 = peg$classExpectation([["0", "9"]], false, false, false);
681
+ const peg$e56 = peg$literalExpectation("=", false);
682
+ const peg$e57 = peg$classExpectation(["=", "[", "{", "}"], false, false, false);
683
+ const peg$e58 = peg$literalExpectation("//", false);
684
+ const peg$e59 = peg$literalExpectation("/*", false);
685
+ const peg$e60 = peg$anyExpectation();
686
+ const peg$e61 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "-"], false, false, false);
687
+ const peg$e62 = peg$otherExpectation("string");
688
+ const peg$e63 = peg$literalExpectation('"', false);
689
+ const peg$e64 = peg$literalExpectation("'", false);
690
+ const peg$e65 = peg$literalExpectation("\\", false);
691
+ const peg$e66 = peg$literalExpectation("n", false);
692
+ const peg$e67 = peg$literalExpectation("r", false);
693
+ const peg$e68 = peg$literalExpectation("t", false);
694
+ const peg$e69 = peg$otherExpectation("number");
695
+ const peg$e70 = peg$literalExpectation("-", false);
696
+ const peg$e71 = peg$literalExpectation(".", false);
697
+ const peg$e72 = peg$otherExpectation("value with unit");
698
+ const peg$e73 = peg$literalExpectation("px", false);
699
+ const peg$e74 = peg$literalExpectation("%", false);
700
+ const peg$e75 = peg$literalExpectation("em", false);
701
+ const peg$e76 = peg$literalExpectation("rem", false);
702
+ const peg$e77 = peg$literalExpectation("vh", false);
703
+ const peg$e78 = peg$literalExpectation("vw", false);
704
+ const peg$e79 = peg$otherExpectation("boolean");
705
+ const peg$e80 = peg$literalExpectation("true", false);
706
+ const peg$e81 = peg$literalExpectation("false", false);
707
+ const peg$e82 = peg$otherExpectation("identifier");
708
+ const peg$e83 = peg$classExpectation([["a", "z"], ["A", "Z"], "_"], false, false, false);
709
+ const peg$e84 = peg$classExpectation([" ", " ", "\n", "\r"], false, false, false);
710
+ const peg$e85 = peg$otherExpectation("comment");
711
+ const peg$e86 = peg$classExpectation(["\n"], true, false, false);
712
+ const peg$e87 = peg$literalExpectation("\n", false);
713
+ const peg$e88 = peg$literalExpectation("*/", false);
709
714
  function peg$f0(children) {
710
715
  return createNode("Document", { children: children.filter((c) => c !== null) });
711
716
  }
@@ -1103,78 +1108,115 @@ function peg$parse(input, options) {
1103
1108
  ...attrsToObject(attrs)
1104
1109
  });
1105
1110
  }
1106
- function peg$f71(attrs) {
1111
+ function peg$f71(num, attrs) {
1112
+ return createNode("Marker", {
1113
+ number: num,
1114
+ ...attrsToObject(attrs)
1115
+ });
1116
+ }
1117
+ function peg$f72(attrs, items) {
1118
+ return createNode("Annotations", {
1119
+ ...attrsToObject(attrs),
1120
+ children: items
1121
+ });
1122
+ }
1123
+ function peg$f73(items) {
1124
+ return items.map((i) => i[0]).filter((i) => i !== null);
1125
+ }
1126
+ function peg$f74(num, title, attrs, children) {
1127
+ return createNode("AnnotationItem", {
1128
+ number: num,
1129
+ title,
1130
+ ...attrsToObject(attrs),
1131
+ children
1132
+ });
1133
+ }
1134
+ function peg$f75(num, title, attrs) {
1135
+ return createNode("AnnotationItem", {
1136
+ number: num,
1137
+ title,
1138
+ ...attrsToObject(attrs),
1139
+ children: []
1140
+ });
1141
+ }
1142
+ function peg$f76() {
1143
+ return null;
1144
+ }
1145
+ function peg$f77(digits) {
1146
+ return parseInt(digits.join(""), 10);
1147
+ }
1148
+ function peg$f78(attrs) {
1107
1149
  return attrs;
1108
1150
  }
1109
- function peg$f72(name, value) {
1151
+ function peg$f79(name, value) {
1110
1152
  return { name, value };
1111
1153
  }
1112
- function peg$f73(flag) {
1154
+ function peg$f80(flag) {
1113
1155
  return { name: flag, value: true };
1114
1156
  }
1115
- function peg$f74(name) {
1157
+ function peg$f81(name) {
1116
1158
  return name;
1117
1159
  }
1118
- function peg$f75(chars) {
1160
+ function peg$f82(chars) {
1119
1161
  return chars.join("");
1120
1162
  }
1121
- function peg$f76(chars) {
1163
+ function peg$f83(chars) {
1122
1164
  return chars.join("");
1123
1165
  }
1124
- function peg$f77(char) {
1166
+ function peg$f84(char) {
1125
1167
  return char;
1126
1168
  }
1127
- function peg$f78(seq) {
1169
+ function peg$f85(seq) {
1128
1170
  return seq;
1129
1171
  }
1130
- function peg$f79(char) {
1172
+ function peg$f86(char) {
1131
1173
  return char;
1132
1174
  }
1133
- function peg$f80(seq) {
1175
+ function peg$f87(seq) {
1134
1176
  return seq;
1135
1177
  }
1136
- function peg$f81() {
1178
+ function peg$f88() {
1137
1179
  return "\n";
1138
1180
  }
1139
- function peg$f82() {
1181
+ function peg$f89() {
1140
1182
  return "\r";
1141
1183
  }
1142
- function peg$f83() {
1184
+ function peg$f90() {
1143
1185
  return " ";
1144
1186
  }
1145
- function peg$f84() {
1187
+ function peg$f91() {
1146
1188
  return "\\";
1147
1189
  }
1148
- function peg$f85() {
1190
+ function peg$f92() {
1149
1191
  return '"';
1150
1192
  }
1151
- function peg$f86() {
1193
+ function peg$f93() {
1152
1194
  return "'";
1153
1195
  }
1154
- function peg$f87(sign, digits, decimal) {
1196
+ function peg$f94(sign, digits, decimal) {
1155
1197
  const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
1156
1198
  return parseFloat(num);
1157
1199
  }
1158
- function peg$f88(sign, digits, decimal, unit) {
1200
+ function peg$f95(sign, digits, decimal, unit) {
1159
1201
  const num = (sign || "") + digits.join("") + (decimal ? "." + decimal[1].join("") : "");
1160
1202
  return { value: parseFloat(num), unit };
1161
1203
  }
1162
- function peg$f89() {
1204
+ function peg$f96() {
1163
1205
  return true;
1164
1206
  }
1165
- function peg$f90() {
1207
+ function peg$f97() {
1166
1208
  return false;
1167
1209
  }
1168
- function peg$f91(head, tail) {
1210
+ function peg$f98(head, tail) {
1169
1211
  return head + tail.join("");
1170
1212
  }
1171
- function peg$f92(items) {
1213
+ function peg$f99(items) {
1172
1214
  return items || [];
1173
1215
  }
1174
- function peg$f93(head, tail) {
1216
+ function peg$f100(head, tail) {
1175
1217
  return [head, ...tail.map((t) => t[3])];
1176
1218
  }
1177
- function peg$f94(props) {
1219
+ function peg$f101(props) {
1178
1220
  const result = {};
1179
1221
  if (props) {
1180
1222
  for (const p of props) {
@@ -1183,13 +1225,13 @@ function peg$parse(input, options) {
1183
1225
  }
1184
1226
  return result;
1185
1227
  }
1186
- function peg$f95(head, tail) {
1228
+ function peg$f102(head, tail) {
1187
1229
  return [head, ...tail.map((t) => t[3])];
1188
1230
  }
1189
- function peg$f96(name, value) {
1231
+ function peg$f103(name, value) {
1190
1232
  return { name, value };
1191
1233
  }
1192
- function peg$f97(name) {
1234
+ function peg$f104(name) {
1193
1235
  return { name, value: true };
1194
1236
  }
1195
1237
  let peg$currPos = options.peg$currPos | 0;
@@ -2419,6 +2461,12 @@ function peg$parse(input, options) {
2419
2461
  s0 = peg$parseBreadcrumb();
2420
2462
  if (s0 === peg$FAILED) {
2421
2463
  s0 = peg$parseDivider();
2464
+ if (s0 === peg$FAILED) {
2465
+ s0 = peg$parseMarker();
2466
+ if (s0 === peg$FAILED) {
2467
+ s0 = peg$parseAnnotations();
2468
+ }
2469
+ }
2422
2470
  }
2423
2471
  }
2424
2472
  }
@@ -4367,6 +4415,297 @@ function peg$parse(input, options) {
4367
4415
  }
4368
4416
  return s0;
4369
4417
  }
4418
+ function peg$parseMarker() {
4419
+ let s0, s1, s2, s3, s4, s5;
4420
+ s0 = peg$currPos;
4421
+ if (input.substr(peg$currPos, 6) === peg$c52) {
4422
+ s1 = peg$c52;
4423
+ peg$currPos += 6;
4424
+ } else {
4425
+ s1 = peg$FAILED;
4426
+ if (peg$silentFails === 0) {
4427
+ peg$fail(peg$e52);
4428
+ }
4429
+ }
4430
+ if (s1 !== peg$FAILED) {
4431
+ s2 = peg$parse_();
4432
+ s3 = peg$parseInteger();
4433
+ if (s3 !== peg$FAILED) {
4434
+ s4 = peg$parse_();
4435
+ s5 = peg$parseAttributes();
4436
+ if (s5 === peg$FAILED) {
4437
+ s5 = null;
4438
+ }
4439
+ peg$savedPos = s0;
4440
+ s0 = peg$f71(s3, s5);
4441
+ } else {
4442
+ peg$currPos = s0;
4443
+ s0 = peg$FAILED;
4444
+ }
4445
+ } else {
4446
+ peg$currPos = s0;
4447
+ s0 = peg$FAILED;
4448
+ }
4449
+ return s0;
4450
+ }
4451
+ function peg$parseAnnotations() {
4452
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
4453
+ s0 = peg$currPos;
4454
+ if (input.substr(peg$currPos, 11) === peg$c53) {
4455
+ s1 = peg$c53;
4456
+ peg$currPos += 11;
4457
+ } else {
4458
+ s1 = peg$FAILED;
4459
+ if (peg$silentFails === 0) {
4460
+ peg$fail(peg$e53);
4461
+ }
4462
+ }
4463
+ if (s1 !== peg$FAILED) {
4464
+ s2 = peg$parse_();
4465
+ s3 = peg$parseAttributes();
4466
+ if (s3 === peg$FAILED) {
4467
+ s3 = null;
4468
+ }
4469
+ s4 = peg$parse_();
4470
+ if (input.charCodeAt(peg$currPos) === 123) {
4471
+ s5 = peg$c1;
4472
+ peg$currPos++;
4473
+ } else {
4474
+ s5 = peg$FAILED;
4475
+ if (peg$silentFails === 0) {
4476
+ peg$fail(peg$e1);
4477
+ }
4478
+ }
4479
+ if (s5 !== peg$FAILED) {
4480
+ s6 = peg$parse_();
4481
+ s7 = peg$parseAnnotationContent();
4482
+ s8 = peg$parse_();
4483
+ if (input.charCodeAt(peg$currPos) === 125) {
4484
+ s9 = peg$c2;
4485
+ peg$currPos++;
4486
+ } else {
4487
+ s9 = peg$FAILED;
4488
+ if (peg$silentFails === 0) {
4489
+ peg$fail(peg$e2);
4490
+ }
4491
+ }
4492
+ if (s9 !== peg$FAILED) {
4493
+ peg$savedPos = s0;
4494
+ s0 = peg$f72(s3, s7);
4495
+ } else {
4496
+ peg$currPos = s0;
4497
+ s0 = peg$FAILED;
4498
+ }
4499
+ } else {
4500
+ peg$currPos = s0;
4501
+ s0 = peg$FAILED;
4502
+ }
4503
+ } else {
4504
+ peg$currPos = s0;
4505
+ s0 = peg$FAILED;
4506
+ }
4507
+ return s0;
4508
+ }
4509
+ function peg$parseAnnotationContent() {
4510
+ let s0, s1, s2, s3, s4;
4511
+ s0 = peg$currPos;
4512
+ s1 = [];
4513
+ s2 = peg$currPos;
4514
+ s3 = peg$parseAnnotationItem();
4515
+ if (s3 !== peg$FAILED) {
4516
+ s4 = peg$parse_();
4517
+ s3 = [s3, s4];
4518
+ s2 = s3;
4519
+ } else {
4520
+ peg$currPos = s2;
4521
+ s2 = peg$FAILED;
4522
+ }
4523
+ while (s2 !== peg$FAILED) {
4524
+ s1.push(s2);
4525
+ s2 = peg$currPos;
4526
+ s3 = peg$parseAnnotationItem();
4527
+ if (s3 !== peg$FAILED) {
4528
+ s4 = peg$parse_();
4529
+ s3 = [s3, s4];
4530
+ s2 = s3;
4531
+ } else {
4532
+ peg$currPos = s2;
4533
+ s2 = peg$FAILED;
4534
+ }
4535
+ }
4536
+ peg$savedPos = s0;
4537
+ s1 = peg$f73(s1);
4538
+ s0 = s1;
4539
+ return s0;
4540
+ }
4541
+ function peg$parseAnnotationItem() {
4542
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
4543
+ s0 = peg$currPos;
4544
+ if (input.substr(peg$currPos, 4) === peg$c38) {
4545
+ s1 = peg$c38;
4546
+ peg$currPos += 4;
4547
+ } else {
4548
+ s1 = peg$FAILED;
4549
+ if (peg$silentFails === 0) {
4550
+ peg$fail(peg$e38);
4551
+ }
4552
+ }
4553
+ if (s1 !== peg$FAILED) {
4554
+ s2 = peg$parse_();
4555
+ s3 = peg$parseInteger();
4556
+ if (s3 !== peg$FAILED) {
4557
+ s4 = peg$parse_();
4558
+ s5 = peg$parseStringLiteral();
4559
+ if (s5 !== peg$FAILED) {
4560
+ s6 = peg$parse_();
4561
+ s7 = peg$parseAttributes();
4562
+ if (s7 === peg$FAILED) {
4563
+ s7 = null;
4564
+ }
4565
+ s8 = peg$parse_();
4566
+ if (input.charCodeAt(peg$currPos) === 123) {
4567
+ s9 = peg$c1;
4568
+ peg$currPos++;
4569
+ } else {
4570
+ s9 = peg$FAILED;
4571
+ if (peg$silentFails === 0) {
4572
+ peg$fail(peg$e1);
4573
+ }
4574
+ }
4575
+ if (s9 !== peg$FAILED) {
4576
+ s10 = peg$parse_();
4577
+ s11 = peg$parseChildren();
4578
+ if (s11 !== peg$FAILED) {
4579
+ s12 = peg$parse_();
4580
+ if (input.charCodeAt(peg$currPos) === 125) {
4581
+ s13 = peg$c2;
4582
+ peg$currPos++;
4583
+ } else {
4584
+ s13 = peg$FAILED;
4585
+ if (peg$silentFails === 0) {
4586
+ peg$fail(peg$e2);
4587
+ }
4588
+ }
4589
+ if (s13 !== peg$FAILED) {
4590
+ peg$savedPos = s0;
4591
+ s0 = peg$f74(s3, s5, s7, s11);
4592
+ } else {
4593
+ peg$currPos = s0;
4594
+ s0 = peg$FAILED;
4595
+ }
4596
+ } else {
4597
+ peg$currPos = s0;
4598
+ s0 = peg$FAILED;
4599
+ }
4600
+ } else {
4601
+ peg$currPos = s0;
4602
+ s0 = peg$FAILED;
4603
+ }
4604
+ } else {
4605
+ peg$currPos = s0;
4606
+ s0 = peg$FAILED;
4607
+ }
4608
+ } else {
4609
+ peg$currPos = s0;
4610
+ s0 = peg$FAILED;
4611
+ }
4612
+ } else {
4613
+ peg$currPos = s0;
4614
+ s0 = peg$FAILED;
4615
+ }
4616
+ if (s0 === peg$FAILED) {
4617
+ s0 = peg$currPos;
4618
+ if (input.substr(peg$currPos, 4) === peg$c38) {
4619
+ s1 = peg$c38;
4620
+ peg$currPos += 4;
4621
+ } else {
4622
+ s1 = peg$FAILED;
4623
+ if (peg$silentFails === 0) {
4624
+ peg$fail(peg$e38);
4625
+ }
4626
+ }
4627
+ if (s1 !== peg$FAILED) {
4628
+ s2 = peg$parse_();
4629
+ s3 = peg$parseInteger();
4630
+ if (s3 !== peg$FAILED) {
4631
+ s4 = peg$parse_();
4632
+ s5 = peg$parseStringLiteral();
4633
+ if (s5 !== peg$FAILED) {
4634
+ s6 = peg$parse_();
4635
+ s7 = peg$parseAttributes();
4636
+ if (s7 === peg$FAILED) {
4637
+ s7 = null;
4638
+ }
4639
+ peg$savedPos = s0;
4640
+ s0 = peg$f75(s3, s5, s7);
4641
+ } else {
4642
+ peg$currPos = s0;
4643
+ s0 = peg$FAILED;
4644
+ }
4645
+ } else {
4646
+ peg$currPos = s0;
4647
+ s0 = peg$FAILED;
4648
+ }
4649
+ } else {
4650
+ peg$currPos = s0;
4651
+ s0 = peg$FAILED;
4652
+ }
4653
+ if (s0 === peg$FAILED) {
4654
+ s0 = peg$currPos;
4655
+ s1 = peg$parseComment();
4656
+ if (s1 !== peg$FAILED) {
4657
+ peg$savedPos = s0;
4658
+ s1 = peg$f76();
4659
+ }
4660
+ s0 = s1;
4661
+ }
4662
+ }
4663
+ return s0;
4664
+ }
4665
+ function peg$parseInteger() {
4666
+ let s0, s1, s2;
4667
+ peg$silentFails++;
4668
+ s0 = peg$currPos;
4669
+ s1 = [];
4670
+ s2 = input.charAt(peg$currPos);
4671
+ if (peg$r0.test(s2)) {
4672
+ peg$currPos++;
4673
+ } else {
4674
+ s2 = peg$FAILED;
4675
+ if (peg$silentFails === 0) {
4676
+ peg$fail(peg$e55);
4677
+ }
4678
+ }
4679
+ if (s2 !== peg$FAILED) {
4680
+ while (s2 !== peg$FAILED) {
4681
+ s1.push(s2);
4682
+ s2 = input.charAt(peg$currPos);
4683
+ if (peg$r0.test(s2)) {
4684
+ peg$currPos++;
4685
+ } else {
4686
+ s2 = peg$FAILED;
4687
+ if (peg$silentFails === 0) {
4688
+ peg$fail(peg$e55);
4689
+ }
4690
+ }
4691
+ }
4692
+ } else {
4693
+ s1 = peg$FAILED;
4694
+ }
4695
+ if (s1 !== peg$FAILED) {
4696
+ peg$savedPos = s0;
4697
+ s1 = peg$f77(s1);
4698
+ }
4699
+ s0 = s1;
4700
+ peg$silentFails--;
4701
+ if (s0 === peg$FAILED) {
4702
+ s1 = peg$FAILED;
4703
+ if (peg$silentFails === 0) {
4704
+ peg$fail(peg$e54);
4705
+ }
4706
+ }
4707
+ return s0;
4708
+ }
4370
4709
  function peg$parseAttributes() {
4371
4710
  let s0, s1, s2;
4372
4711
  s0 = peg$currPos;
@@ -4382,7 +4721,7 @@ function peg$parse(input, options) {
4382
4721
  }
4383
4722
  if (s1 !== peg$FAILED) {
4384
4723
  peg$savedPos = s0;
4385
- s1 = peg$f71(s1);
4724
+ s1 = peg$f78(s1);
4386
4725
  }
4387
4726
  s0 = s1;
4388
4727
  return s0;
@@ -4395,12 +4734,12 @@ function peg$parse(input, options) {
4395
4734
  if (s2 !== peg$FAILED) {
4396
4735
  s3 = peg$parse_();
4397
4736
  if (input.charCodeAt(peg$currPos) === 61) {
4398
- s4 = peg$c52;
4737
+ s4 = peg$c54;
4399
4738
  peg$currPos++;
4400
4739
  } else {
4401
4740
  s4 = peg$FAILED;
4402
4741
  if (peg$silentFails === 0) {
4403
- peg$fail(peg$e52);
4742
+ peg$fail(peg$e56);
4404
4743
  }
4405
4744
  }
4406
4745
  if (s4 !== peg$FAILED) {
@@ -4408,7 +4747,7 @@ function peg$parse(input, options) {
4408
4747
  s6 = peg$parseAttributeValue();
4409
4748
  if (s6 !== peg$FAILED) {
4410
4749
  peg$savedPos = s0;
4411
- s0 = peg$f72(s2, s6);
4750
+ s0 = peg$f79(s2, s6);
4412
4751
  } else {
4413
4752
  peg$currPos = s0;
4414
4753
  s0 = peg$FAILED;
@@ -4435,32 +4774,32 @@ function peg$parse(input, options) {
4435
4774
  s6 = peg$parseAttributeName();
4436
4775
  if (s6 === peg$FAILED) {
4437
4776
  s6 = input.charAt(peg$currPos);
4438
- if (peg$r0.test(s6)) {
4777
+ if (peg$r1.test(s6)) {
4439
4778
  peg$currPos++;
4440
4779
  } else {
4441
4780
  s6 = peg$FAILED;
4442
4781
  if (peg$silentFails === 0) {
4443
- peg$fail(peg$e53);
4782
+ peg$fail(peg$e57);
4444
4783
  }
4445
4784
  }
4446
4785
  if (s6 === peg$FAILED) {
4447
- if (input.substr(peg$currPos, 2) === peg$c53) {
4448
- s6 = peg$c53;
4786
+ if (input.substr(peg$currPos, 2) === peg$c55) {
4787
+ s6 = peg$c55;
4449
4788
  peg$currPos += 2;
4450
4789
  } else {
4451
4790
  s6 = peg$FAILED;
4452
4791
  if (peg$silentFails === 0) {
4453
- peg$fail(peg$e54);
4792
+ peg$fail(peg$e58);
4454
4793
  }
4455
4794
  }
4456
4795
  if (s6 === peg$FAILED) {
4457
- if (input.substr(peg$currPos, 2) === peg$c54) {
4458
- s6 = peg$c54;
4796
+ if (input.substr(peg$currPos, 2) === peg$c56) {
4797
+ s6 = peg$c56;
4459
4798
  peg$currPos += 2;
4460
4799
  } else {
4461
4800
  s6 = peg$FAILED;
4462
4801
  if (peg$silentFails === 0) {
4463
- peg$fail(peg$e55);
4802
+ peg$fail(peg$e59);
4464
4803
  }
4465
4804
  }
4466
4805
  if (s6 === peg$FAILED) {
@@ -4472,7 +4811,7 @@ function peg$parse(input, options) {
4472
4811
  } else {
4473
4812
  s7 = peg$FAILED;
4474
4813
  if (peg$silentFails === 0) {
4475
- peg$fail(peg$e56);
4814
+ peg$fail(peg$e60);
4476
4815
  }
4477
4816
  }
4478
4817
  peg$silentFails--;
@@ -4503,7 +4842,7 @@ function peg$parse(input, options) {
4503
4842
  }
4504
4843
  if (s3 !== peg$FAILED) {
4505
4844
  peg$savedPos = s0;
4506
- s0 = peg$f73(s2);
4845
+ s0 = peg$f80(s2);
4507
4846
  } else {
4508
4847
  peg$currPos = s0;
4509
4848
  s0 = peg$FAILED;
@@ -4532,7 +4871,7 @@ function peg$parse(input, options) {
4532
4871
  s2 = peg$parseIdentifier();
4533
4872
  if (s2 !== peg$FAILED) {
4534
4873
  peg$savedPos = s0;
4535
- s0 = peg$f74(s2);
4874
+ s0 = peg$f81(s2);
4536
4875
  } else {
4537
4876
  peg$currPos = s0;
4538
4877
  s0 = peg$FAILED;
@@ -4985,6 +5324,28 @@ function peg$parse(input, options) {
4985
5324
  peg$fail(peg$e48);
4986
5325
  }
4987
5326
  }
5327
+ if (s1 === peg$FAILED) {
5328
+ if (input.substr(peg$currPos, 6) === peg$c52) {
5329
+ s1 = peg$c52;
5330
+ peg$currPos += 6;
5331
+ } else {
5332
+ s1 = peg$FAILED;
5333
+ if (peg$silentFails === 0) {
5334
+ peg$fail(peg$e52);
5335
+ }
5336
+ }
5337
+ if (s1 === peg$FAILED) {
5338
+ if (input.substr(peg$currPos, 11) === peg$c53) {
5339
+ s1 = peg$c53;
5340
+ peg$currPos += 11;
5341
+ } else {
5342
+ s1 = peg$FAILED;
5343
+ if (peg$silentFails === 0) {
5344
+ peg$fail(peg$e53);
5345
+ }
5346
+ }
5347
+ }
5348
+ }
4988
5349
  }
4989
5350
  }
4990
5351
  }
@@ -5055,12 +5416,12 @@ function peg$parse(input, options) {
5055
5416
  function peg$parseIdentifierChar() {
5056
5417
  let s0;
5057
5418
  s0 = input.charAt(peg$currPos);
5058
- if (peg$r1.test(s0)) {
5419
+ if (peg$r2.test(s0)) {
5059
5420
  peg$currPos++;
5060
5421
  } else {
5061
5422
  s0 = peg$FAILED;
5062
5423
  if (peg$silentFails === 0) {
5063
- peg$fail(peg$e57);
5424
+ peg$fail(peg$e61);
5064
5425
  }
5065
5426
  }
5066
5427
  return s0;
@@ -5093,12 +5454,12 @@ function peg$parse(input, options) {
5093
5454
  peg$silentFails++;
5094
5455
  s0 = peg$currPos;
5095
5456
  if (input.charCodeAt(peg$currPos) === 34) {
5096
- s1 = peg$c55;
5457
+ s1 = peg$c57;
5097
5458
  peg$currPos++;
5098
5459
  } else {
5099
5460
  s1 = peg$FAILED;
5100
5461
  if (peg$silentFails === 0) {
5101
- peg$fail(peg$e59);
5462
+ peg$fail(peg$e63);
5102
5463
  }
5103
5464
  }
5104
5465
  if (s1 !== peg$FAILED) {
@@ -5109,17 +5470,17 @@ function peg$parse(input, options) {
5109
5470
  s3 = peg$parseDoubleStringChar();
5110
5471
  }
5111
5472
  if (input.charCodeAt(peg$currPos) === 34) {
5112
- s3 = peg$c55;
5473
+ s3 = peg$c57;
5113
5474
  peg$currPos++;
5114
5475
  } else {
5115
5476
  s3 = peg$FAILED;
5116
5477
  if (peg$silentFails === 0) {
5117
- peg$fail(peg$e59);
5478
+ peg$fail(peg$e63);
5118
5479
  }
5119
5480
  }
5120
5481
  if (s3 !== peg$FAILED) {
5121
5482
  peg$savedPos = s0;
5122
- s0 = peg$f75(s2);
5483
+ s0 = peg$f82(s2);
5123
5484
  } else {
5124
5485
  peg$currPos = s0;
5125
5486
  s0 = peg$FAILED;
@@ -5131,12 +5492,12 @@ function peg$parse(input, options) {
5131
5492
  if (s0 === peg$FAILED) {
5132
5493
  s0 = peg$currPos;
5133
5494
  if (input.charCodeAt(peg$currPos) === 39) {
5134
- s1 = peg$c56;
5495
+ s1 = peg$c58;
5135
5496
  peg$currPos++;
5136
5497
  } else {
5137
5498
  s1 = peg$FAILED;
5138
5499
  if (peg$silentFails === 0) {
5139
- peg$fail(peg$e60);
5500
+ peg$fail(peg$e64);
5140
5501
  }
5141
5502
  }
5142
5503
  if (s1 !== peg$FAILED) {
@@ -5147,17 +5508,17 @@ function peg$parse(input, options) {
5147
5508
  s3 = peg$parseSingleStringChar();
5148
5509
  }
5149
5510
  if (input.charCodeAt(peg$currPos) === 39) {
5150
- s3 = peg$c56;
5511
+ s3 = peg$c58;
5151
5512
  peg$currPos++;
5152
5513
  } else {
5153
5514
  s3 = peg$FAILED;
5154
5515
  if (peg$silentFails === 0) {
5155
- peg$fail(peg$e60);
5516
+ peg$fail(peg$e64);
5156
5517
  }
5157
5518
  }
5158
5519
  if (s3 !== peg$FAILED) {
5159
5520
  peg$savedPos = s0;
5160
- s0 = peg$f76(s2);
5521
+ s0 = peg$f83(s2);
5161
5522
  } else {
5162
5523
  peg$currPos = s0;
5163
5524
  s0 = peg$FAILED;
@@ -5171,7 +5532,7 @@ function peg$parse(input, options) {
5171
5532
  if (s0 === peg$FAILED) {
5172
5533
  s1 = peg$FAILED;
5173
5534
  if (peg$silentFails === 0) {
5174
- peg$fail(peg$e58);
5535
+ peg$fail(peg$e62);
5175
5536
  }
5176
5537
  }
5177
5538
  return s0;
@@ -5182,12 +5543,12 @@ function peg$parse(input, options) {
5182
5543
  s1 = peg$currPos;
5183
5544
  peg$silentFails++;
5184
5545
  if (input.charCodeAt(peg$currPos) === 34) {
5185
- s2 = peg$c55;
5546
+ s2 = peg$c57;
5186
5547
  peg$currPos++;
5187
5548
  } else {
5188
5549
  s2 = peg$FAILED;
5189
5550
  if (peg$silentFails === 0) {
5190
- peg$fail(peg$e59);
5551
+ peg$fail(peg$e63);
5191
5552
  }
5192
5553
  }
5193
5554
  peg$silentFails--;
@@ -5201,12 +5562,12 @@ function peg$parse(input, options) {
5201
5562
  s2 = peg$currPos;
5202
5563
  peg$silentFails++;
5203
5564
  if (input.charCodeAt(peg$currPos) === 92) {
5204
- s3 = peg$c57;
5565
+ s3 = peg$c59;
5205
5566
  peg$currPos++;
5206
5567
  } else {
5207
5568
  s3 = peg$FAILED;
5208
5569
  if (peg$silentFails === 0) {
5209
- peg$fail(peg$e61);
5570
+ peg$fail(peg$e65);
5210
5571
  }
5211
5572
  }
5212
5573
  peg$silentFails--;
@@ -5223,12 +5584,12 @@ function peg$parse(input, options) {
5223
5584
  } else {
5224
5585
  s3 = peg$FAILED;
5225
5586
  if (peg$silentFails === 0) {
5226
- peg$fail(peg$e56);
5587
+ peg$fail(peg$e60);
5227
5588
  }
5228
5589
  }
5229
5590
  if (s3 !== peg$FAILED) {
5230
5591
  peg$savedPos = s0;
5231
- s0 = peg$f77(s3);
5592
+ s0 = peg$f84(s3);
5232
5593
  } else {
5233
5594
  peg$currPos = s0;
5234
5595
  s0 = peg$FAILED;
@@ -5244,19 +5605,19 @@ function peg$parse(input, options) {
5244
5605
  if (s0 === peg$FAILED) {
5245
5606
  s0 = peg$currPos;
5246
5607
  if (input.charCodeAt(peg$currPos) === 92) {
5247
- s1 = peg$c57;
5608
+ s1 = peg$c59;
5248
5609
  peg$currPos++;
5249
5610
  } else {
5250
5611
  s1 = peg$FAILED;
5251
5612
  if (peg$silentFails === 0) {
5252
- peg$fail(peg$e61);
5613
+ peg$fail(peg$e65);
5253
5614
  }
5254
5615
  }
5255
5616
  if (s1 !== peg$FAILED) {
5256
5617
  s2 = peg$parseEscapeSequence();
5257
5618
  if (s2 !== peg$FAILED) {
5258
5619
  peg$savedPos = s0;
5259
- s0 = peg$f78(s2);
5620
+ s0 = peg$f85(s2);
5260
5621
  } else {
5261
5622
  peg$currPos = s0;
5262
5623
  s0 = peg$FAILED;
@@ -5274,12 +5635,12 @@ function peg$parse(input, options) {
5274
5635
  s1 = peg$currPos;
5275
5636
  peg$silentFails++;
5276
5637
  if (input.charCodeAt(peg$currPos) === 39) {
5277
- s2 = peg$c56;
5638
+ s2 = peg$c58;
5278
5639
  peg$currPos++;
5279
5640
  } else {
5280
5641
  s2 = peg$FAILED;
5281
5642
  if (peg$silentFails === 0) {
5282
- peg$fail(peg$e60);
5643
+ peg$fail(peg$e64);
5283
5644
  }
5284
5645
  }
5285
5646
  peg$silentFails--;
@@ -5293,12 +5654,12 @@ function peg$parse(input, options) {
5293
5654
  s2 = peg$currPos;
5294
5655
  peg$silentFails++;
5295
5656
  if (input.charCodeAt(peg$currPos) === 92) {
5296
- s3 = peg$c57;
5657
+ s3 = peg$c59;
5297
5658
  peg$currPos++;
5298
5659
  } else {
5299
5660
  s3 = peg$FAILED;
5300
5661
  if (peg$silentFails === 0) {
5301
- peg$fail(peg$e61);
5662
+ peg$fail(peg$e65);
5302
5663
  }
5303
5664
  }
5304
5665
  peg$silentFails--;
@@ -5315,12 +5676,12 @@ function peg$parse(input, options) {
5315
5676
  } else {
5316
5677
  s3 = peg$FAILED;
5317
5678
  if (peg$silentFails === 0) {
5318
- peg$fail(peg$e56);
5679
+ peg$fail(peg$e60);
5319
5680
  }
5320
5681
  }
5321
5682
  if (s3 !== peg$FAILED) {
5322
5683
  peg$savedPos = s0;
5323
- s0 = peg$f79(s3);
5684
+ s0 = peg$f86(s3);
5324
5685
  } else {
5325
5686
  peg$currPos = s0;
5326
5687
  s0 = peg$FAILED;
@@ -5336,19 +5697,19 @@ function peg$parse(input, options) {
5336
5697
  if (s0 === peg$FAILED) {
5337
5698
  s0 = peg$currPos;
5338
5699
  if (input.charCodeAt(peg$currPos) === 92) {
5339
- s1 = peg$c57;
5700
+ s1 = peg$c59;
5340
5701
  peg$currPos++;
5341
5702
  } else {
5342
5703
  s1 = peg$FAILED;
5343
5704
  if (peg$silentFails === 0) {
5344
- peg$fail(peg$e61);
5705
+ peg$fail(peg$e65);
5345
5706
  }
5346
5707
  }
5347
5708
  if (s1 !== peg$FAILED) {
5348
5709
  s2 = peg$parseEscapeSequence();
5349
5710
  if (s2 !== peg$FAILED) {
5350
5711
  peg$savedPos = s0;
5351
- s0 = peg$f80(s2);
5712
+ s0 = peg$f87(s2);
5352
5713
  } else {
5353
5714
  peg$currPos = s0;
5354
5715
  s0 = peg$FAILED;
@@ -5364,97 +5725,97 @@ function peg$parse(input, options) {
5364
5725
  let s0, s1;
5365
5726
  s0 = peg$currPos;
5366
5727
  if (input.charCodeAt(peg$currPos) === 110) {
5367
- s1 = peg$c58;
5728
+ s1 = peg$c60;
5368
5729
  peg$currPos++;
5369
5730
  } else {
5370
5731
  s1 = peg$FAILED;
5371
5732
  if (peg$silentFails === 0) {
5372
- peg$fail(peg$e62);
5733
+ peg$fail(peg$e66);
5373
5734
  }
5374
5735
  }
5375
5736
  if (s1 !== peg$FAILED) {
5376
5737
  peg$savedPos = s0;
5377
- s1 = peg$f81();
5738
+ s1 = peg$f88();
5378
5739
  }
5379
5740
  s0 = s1;
5380
5741
  if (s0 === peg$FAILED) {
5381
5742
  s0 = peg$currPos;
5382
5743
  if (input.charCodeAt(peg$currPos) === 114) {
5383
- s1 = peg$c59;
5744
+ s1 = peg$c61;
5384
5745
  peg$currPos++;
5385
5746
  } else {
5386
5747
  s1 = peg$FAILED;
5387
5748
  if (peg$silentFails === 0) {
5388
- peg$fail(peg$e63);
5749
+ peg$fail(peg$e67);
5389
5750
  }
5390
5751
  }
5391
5752
  if (s1 !== peg$FAILED) {
5392
5753
  peg$savedPos = s0;
5393
- s1 = peg$f82();
5754
+ s1 = peg$f89();
5394
5755
  }
5395
5756
  s0 = s1;
5396
5757
  if (s0 === peg$FAILED) {
5397
5758
  s0 = peg$currPos;
5398
5759
  if (input.charCodeAt(peg$currPos) === 116) {
5399
- s1 = peg$c60;
5760
+ s1 = peg$c62;
5400
5761
  peg$currPos++;
5401
5762
  } else {
5402
5763
  s1 = peg$FAILED;
5403
5764
  if (peg$silentFails === 0) {
5404
- peg$fail(peg$e64);
5765
+ peg$fail(peg$e68);
5405
5766
  }
5406
5767
  }
5407
5768
  if (s1 !== peg$FAILED) {
5408
5769
  peg$savedPos = s0;
5409
- s1 = peg$f83();
5770
+ s1 = peg$f90();
5410
5771
  }
5411
5772
  s0 = s1;
5412
5773
  if (s0 === peg$FAILED) {
5413
5774
  s0 = peg$currPos;
5414
5775
  if (input.charCodeAt(peg$currPos) === 92) {
5415
- s1 = peg$c57;
5776
+ s1 = peg$c59;
5416
5777
  peg$currPos++;
5417
5778
  } else {
5418
5779
  s1 = peg$FAILED;
5419
5780
  if (peg$silentFails === 0) {
5420
- peg$fail(peg$e61);
5781
+ peg$fail(peg$e65);
5421
5782
  }
5422
5783
  }
5423
5784
  if (s1 !== peg$FAILED) {
5424
5785
  peg$savedPos = s0;
5425
- s1 = peg$f84();
5786
+ s1 = peg$f91();
5426
5787
  }
5427
5788
  s0 = s1;
5428
5789
  if (s0 === peg$FAILED) {
5429
5790
  s0 = peg$currPos;
5430
5791
  if (input.charCodeAt(peg$currPos) === 34) {
5431
- s1 = peg$c55;
5792
+ s1 = peg$c57;
5432
5793
  peg$currPos++;
5433
5794
  } else {
5434
5795
  s1 = peg$FAILED;
5435
5796
  if (peg$silentFails === 0) {
5436
- peg$fail(peg$e59);
5797
+ peg$fail(peg$e63);
5437
5798
  }
5438
5799
  }
5439
5800
  if (s1 !== peg$FAILED) {
5440
5801
  peg$savedPos = s0;
5441
- s1 = peg$f85();
5802
+ s1 = peg$f92();
5442
5803
  }
5443
5804
  s0 = s1;
5444
5805
  if (s0 === peg$FAILED) {
5445
5806
  s0 = peg$currPos;
5446
5807
  if (input.charCodeAt(peg$currPos) === 39) {
5447
- s1 = peg$c56;
5808
+ s1 = peg$c58;
5448
5809
  peg$currPos++;
5449
5810
  } else {
5450
5811
  s1 = peg$FAILED;
5451
5812
  if (peg$silentFails === 0) {
5452
- peg$fail(peg$e60);
5813
+ peg$fail(peg$e64);
5453
5814
  }
5454
5815
  }
5455
5816
  if (s1 !== peg$FAILED) {
5456
5817
  peg$savedPos = s0;
5457
- s1 = peg$f86();
5818
+ s1 = peg$f93();
5458
5819
  }
5459
5820
  s0 = s1;
5460
5821
  }
@@ -5469,12 +5830,12 @@ function peg$parse(input, options) {
5469
5830
  peg$silentFails++;
5470
5831
  s0 = peg$currPos;
5471
5832
  if (input.charCodeAt(peg$currPos) === 45) {
5472
- s1 = peg$c61;
5833
+ s1 = peg$c63;
5473
5834
  peg$currPos++;
5474
5835
  } else {
5475
5836
  s1 = peg$FAILED;
5476
5837
  if (peg$silentFails === 0) {
5477
- peg$fail(peg$e66);
5838
+ peg$fail(peg$e70);
5478
5839
  }
5479
5840
  }
5480
5841
  if (s1 === peg$FAILED) {
@@ -5482,24 +5843,24 @@ function peg$parse(input, options) {
5482
5843
  }
5483
5844
  s2 = [];
5484
5845
  s3 = input.charAt(peg$currPos);
5485
- if (peg$r2.test(s3)) {
5846
+ if (peg$r0.test(s3)) {
5486
5847
  peg$currPos++;
5487
5848
  } else {
5488
5849
  s3 = peg$FAILED;
5489
5850
  if (peg$silentFails === 0) {
5490
- peg$fail(peg$e67);
5851
+ peg$fail(peg$e55);
5491
5852
  }
5492
5853
  }
5493
5854
  if (s3 !== peg$FAILED) {
5494
5855
  while (s3 !== peg$FAILED) {
5495
5856
  s2.push(s3);
5496
5857
  s3 = input.charAt(peg$currPos);
5497
- if (peg$r2.test(s3)) {
5858
+ if (peg$r0.test(s3)) {
5498
5859
  peg$currPos++;
5499
5860
  } else {
5500
5861
  s3 = peg$FAILED;
5501
5862
  if (peg$silentFails === 0) {
5502
- peg$fail(peg$e67);
5863
+ peg$fail(peg$e55);
5503
5864
  }
5504
5865
  }
5505
5866
  }
@@ -5509,35 +5870,35 @@ function peg$parse(input, options) {
5509
5870
  if (s2 !== peg$FAILED) {
5510
5871
  s3 = peg$currPos;
5511
5872
  if (input.charCodeAt(peg$currPos) === 46) {
5512
- s4 = peg$c62;
5873
+ s4 = peg$c64;
5513
5874
  peg$currPos++;
5514
5875
  } else {
5515
5876
  s4 = peg$FAILED;
5516
5877
  if (peg$silentFails === 0) {
5517
- peg$fail(peg$e68);
5878
+ peg$fail(peg$e71);
5518
5879
  }
5519
5880
  }
5520
5881
  if (s4 !== peg$FAILED) {
5521
5882
  s5 = [];
5522
5883
  s6 = input.charAt(peg$currPos);
5523
- if (peg$r2.test(s6)) {
5884
+ if (peg$r0.test(s6)) {
5524
5885
  peg$currPos++;
5525
5886
  } else {
5526
5887
  s6 = peg$FAILED;
5527
5888
  if (peg$silentFails === 0) {
5528
- peg$fail(peg$e67);
5889
+ peg$fail(peg$e55);
5529
5890
  }
5530
5891
  }
5531
5892
  if (s6 !== peg$FAILED) {
5532
5893
  while (s6 !== peg$FAILED) {
5533
5894
  s5.push(s6);
5534
5895
  s6 = input.charAt(peg$currPos);
5535
- if (peg$r2.test(s6)) {
5896
+ if (peg$r0.test(s6)) {
5536
5897
  peg$currPos++;
5537
5898
  } else {
5538
5899
  s6 = peg$FAILED;
5539
5900
  if (peg$silentFails === 0) {
5540
- peg$fail(peg$e67);
5901
+ peg$fail(peg$e55);
5541
5902
  }
5542
5903
  }
5543
5904
  }
@@ -5559,7 +5920,7 @@ function peg$parse(input, options) {
5559
5920
  s3 = null;
5560
5921
  }
5561
5922
  peg$savedPos = s0;
5562
- s0 = peg$f87(s1, s2, s3);
5923
+ s0 = peg$f94(s1, s2, s3);
5563
5924
  } else {
5564
5925
  peg$currPos = s0;
5565
5926
  s0 = peg$FAILED;
@@ -5568,7 +5929,7 @@ function peg$parse(input, options) {
5568
5929
  if (s0 === peg$FAILED) {
5569
5930
  s1 = peg$FAILED;
5570
5931
  if (peg$silentFails === 0) {
5571
- peg$fail(peg$e65);
5932
+ peg$fail(peg$e69);
5572
5933
  }
5573
5934
  }
5574
5935
  return s0;
@@ -5578,12 +5939,12 @@ function peg$parse(input, options) {
5578
5939
  peg$silentFails++;
5579
5940
  s0 = peg$currPos;
5580
5941
  if (input.charCodeAt(peg$currPos) === 45) {
5581
- s1 = peg$c61;
5942
+ s1 = peg$c63;
5582
5943
  peg$currPos++;
5583
5944
  } else {
5584
5945
  s1 = peg$FAILED;
5585
5946
  if (peg$silentFails === 0) {
5586
- peg$fail(peg$e66);
5947
+ peg$fail(peg$e70);
5587
5948
  }
5588
5949
  }
5589
5950
  if (s1 === peg$FAILED) {
@@ -5591,24 +5952,24 @@ function peg$parse(input, options) {
5591
5952
  }
5592
5953
  s2 = [];
5593
5954
  s3 = input.charAt(peg$currPos);
5594
- if (peg$r2.test(s3)) {
5955
+ if (peg$r0.test(s3)) {
5595
5956
  peg$currPos++;
5596
5957
  } else {
5597
5958
  s3 = peg$FAILED;
5598
5959
  if (peg$silentFails === 0) {
5599
- peg$fail(peg$e67);
5960
+ peg$fail(peg$e55);
5600
5961
  }
5601
5962
  }
5602
5963
  if (s3 !== peg$FAILED) {
5603
5964
  while (s3 !== peg$FAILED) {
5604
5965
  s2.push(s3);
5605
5966
  s3 = input.charAt(peg$currPos);
5606
- if (peg$r2.test(s3)) {
5967
+ if (peg$r0.test(s3)) {
5607
5968
  peg$currPos++;
5608
5969
  } else {
5609
5970
  s3 = peg$FAILED;
5610
5971
  if (peg$silentFails === 0) {
5611
- peg$fail(peg$e67);
5972
+ peg$fail(peg$e55);
5612
5973
  }
5613
5974
  }
5614
5975
  }
@@ -5618,35 +5979,35 @@ function peg$parse(input, options) {
5618
5979
  if (s2 !== peg$FAILED) {
5619
5980
  s3 = peg$currPos;
5620
5981
  if (input.charCodeAt(peg$currPos) === 46) {
5621
- s4 = peg$c62;
5982
+ s4 = peg$c64;
5622
5983
  peg$currPos++;
5623
5984
  } else {
5624
5985
  s4 = peg$FAILED;
5625
5986
  if (peg$silentFails === 0) {
5626
- peg$fail(peg$e68);
5987
+ peg$fail(peg$e71);
5627
5988
  }
5628
5989
  }
5629
5990
  if (s4 !== peg$FAILED) {
5630
5991
  s5 = [];
5631
5992
  s6 = input.charAt(peg$currPos);
5632
- if (peg$r2.test(s6)) {
5993
+ if (peg$r0.test(s6)) {
5633
5994
  peg$currPos++;
5634
5995
  } else {
5635
5996
  s6 = peg$FAILED;
5636
5997
  if (peg$silentFails === 0) {
5637
- peg$fail(peg$e67);
5998
+ peg$fail(peg$e55);
5638
5999
  }
5639
6000
  }
5640
6001
  if (s6 !== peg$FAILED) {
5641
6002
  while (s6 !== peg$FAILED) {
5642
6003
  s5.push(s6);
5643
6004
  s6 = input.charAt(peg$currPos);
5644
- if (peg$r2.test(s6)) {
6005
+ if (peg$r0.test(s6)) {
5645
6006
  peg$currPos++;
5646
6007
  } else {
5647
6008
  s6 = peg$FAILED;
5648
6009
  if (peg$silentFails === 0) {
5649
- peg$fail(peg$e67);
6010
+ peg$fail(peg$e55);
5650
6011
  }
5651
6012
  }
5652
6013
  }
@@ -5667,63 +6028,63 @@ function peg$parse(input, options) {
5667
6028
  if (s3 === peg$FAILED) {
5668
6029
  s3 = null;
5669
6030
  }
5670
- if (input.substr(peg$currPos, 2) === peg$c63) {
5671
- s4 = peg$c63;
6031
+ if (input.substr(peg$currPos, 2) === peg$c65) {
6032
+ s4 = peg$c65;
5672
6033
  peg$currPos += 2;
5673
6034
  } else {
5674
6035
  s4 = peg$FAILED;
5675
6036
  if (peg$silentFails === 0) {
5676
- peg$fail(peg$e70);
6037
+ peg$fail(peg$e73);
5677
6038
  }
5678
6039
  }
5679
6040
  if (s4 === peg$FAILED) {
5680
6041
  if (input.charCodeAt(peg$currPos) === 37) {
5681
- s4 = peg$c64;
6042
+ s4 = peg$c66;
5682
6043
  peg$currPos++;
5683
6044
  } else {
5684
6045
  s4 = peg$FAILED;
5685
6046
  if (peg$silentFails === 0) {
5686
- peg$fail(peg$e71);
6047
+ peg$fail(peg$e74);
5687
6048
  }
5688
6049
  }
5689
6050
  if (s4 === peg$FAILED) {
5690
- if (input.substr(peg$currPos, 2) === peg$c65) {
5691
- s4 = peg$c65;
6051
+ if (input.substr(peg$currPos, 2) === peg$c67) {
6052
+ s4 = peg$c67;
5692
6053
  peg$currPos += 2;
5693
6054
  } else {
5694
6055
  s4 = peg$FAILED;
5695
6056
  if (peg$silentFails === 0) {
5696
- peg$fail(peg$e72);
6057
+ peg$fail(peg$e75);
5697
6058
  }
5698
6059
  }
5699
6060
  if (s4 === peg$FAILED) {
5700
- if (input.substr(peg$currPos, 3) === peg$c66) {
5701
- s4 = peg$c66;
6061
+ if (input.substr(peg$currPos, 3) === peg$c68) {
6062
+ s4 = peg$c68;
5702
6063
  peg$currPos += 3;
5703
6064
  } else {
5704
6065
  s4 = peg$FAILED;
5705
6066
  if (peg$silentFails === 0) {
5706
- peg$fail(peg$e73);
6067
+ peg$fail(peg$e76);
5707
6068
  }
5708
6069
  }
5709
6070
  if (s4 === peg$FAILED) {
5710
- if (input.substr(peg$currPos, 2) === peg$c67) {
5711
- s4 = peg$c67;
6071
+ if (input.substr(peg$currPos, 2) === peg$c69) {
6072
+ s4 = peg$c69;
5712
6073
  peg$currPos += 2;
5713
6074
  } else {
5714
6075
  s4 = peg$FAILED;
5715
6076
  if (peg$silentFails === 0) {
5716
- peg$fail(peg$e74);
6077
+ peg$fail(peg$e77);
5717
6078
  }
5718
6079
  }
5719
6080
  if (s4 === peg$FAILED) {
5720
- if (input.substr(peg$currPos, 2) === peg$c68) {
5721
- s4 = peg$c68;
6081
+ if (input.substr(peg$currPos, 2) === peg$c70) {
6082
+ s4 = peg$c70;
5722
6083
  peg$currPos += 2;
5723
6084
  } else {
5724
6085
  s4 = peg$FAILED;
5725
6086
  if (peg$silentFails === 0) {
5726
- peg$fail(peg$e75);
6087
+ peg$fail(peg$e78);
5727
6088
  }
5728
6089
  }
5729
6090
  }
@@ -5733,7 +6094,7 @@ function peg$parse(input, options) {
5733
6094
  }
5734
6095
  if (s4 !== peg$FAILED) {
5735
6096
  peg$savedPos = s0;
5736
- s0 = peg$f88(s1, s2, s3, s4);
6097
+ s0 = peg$f95(s1, s2, s3, s4);
5737
6098
  } else {
5738
6099
  peg$currPos = s0;
5739
6100
  s0 = peg$FAILED;
@@ -5746,7 +6107,7 @@ function peg$parse(input, options) {
5746
6107
  if (s0 === peg$FAILED) {
5747
6108
  s1 = peg$FAILED;
5748
6109
  if (peg$silentFails === 0) {
5749
- peg$fail(peg$e69);
6110
+ peg$fail(peg$e72);
5750
6111
  }
5751
6112
  }
5752
6113
  return s0;
@@ -5755,34 +6116,34 @@ function peg$parse(input, options) {
5755
6116
  let s0, s1;
5756
6117
  peg$silentFails++;
5757
6118
  s0 = peg$currPos;
5758
- if (input.substr(peg$currPos, 4) === peg$c69) {
5759
- s1 = peg$c69;
6119
+ if (input.substr(peg$currPos, 4) === peg$c71) {
6120
+ s1 = peg$c71;
5760
6121
  peg$currPos += 4;
5761
6122
  } else {
5762
6123
  s1 = peg$FAILED;
5763
6124
  if (peg$silentFails === 0) {
5764
- peg$fail(peg$e77);
6125
+ peg$fail(peg$e80);
5765
6126
  }
5766
6127
  }
5767
6128
  if (s1 !== peg$FAILED) {
5768
6129
  peg$savedPos = s0;
5769
- s1 = peg$f89();
6130
+ s1 = peg$f96();
5770
6131
  }
5771
6132
  s0 = s1;
5772
6133
  if (s0 === peg$FAILED) {
5773
6134
  s0 = peg$currPos;
5774
- if (input.substr(peg$currPos, 5) === peg$c70) {
5775
- s1 = peg$c70;
6135
+ if (input.substr(peg$currPos, 5) === peg$c72) {
6136
+ s1 = peg$c72;
5776
6137
  peg$currPos += 5;
5777
6138
  } else {
5778
6139
  s1 = peg$FAILED;
5779
6140
  if (peg$silentFails === 0) {
5780
- peg$fail(peg$e78);
6141
+ peg$fail(peg$e81);
5781
6142
  }
5782
6143
  }
5783
6144
  if (s1 !== peg$FAILED) {
5784
6145
  peg$savedPos = s0;
5785
- s1 = peg$f90();
6146
+ s1 = peg$f97();
5786
6147
  }
5787
6148
  s0 = s1;
5788
6149
  }
@@ -5790,7 +6151,7 @@ function peg$parse(input, options) {
5790
6151
  if (s0 === peg$FAILED) {
5791
6152
  s1 = peg$FAILED;
5792
6153
  if (peg$silentFails === 0) {
5793
- peg$fail(peg$e76);
6154
+ peg$fail(peg$e79);
5794
6155
  }
5795
6156
  }
5796
6157
  return s0;
@@ -5805,34 +6166,34 @@ function peg$parse(input, options) {
5805
6166
  } else {
5806
6167
  s1 = peg$FAILED;
5807
6168
  if (peg$silentFails === 0) {
5808
- peg$fail(peg$e80);
6169
+ peg$fail(peg$e83);
5809
6170
  }
5810
6171
  }
5811
6172
  if (s1 !== peg$FAILED) {
5812
6173
  s2 = [];
5813
6174
  s3 = input.charAt(peg$currPos);
5814
- if (peg$r1.test(s3)) {
6175
+ if (peg$r2.test(s3)) {
5815
6176
  peg$currPos++;
5816
6177
  } else {
5817
6178
  s3 = peg$FAILED;
5818
6179
  if (peg$silentFails === 0) {
5819
- peg$fail(peg$e57);
6180
+ peg$fail(peg$e61);
5820
6181
  }
5821
6182
  }
5822
6183
  while (s3 !== peg$FAILED) {
5823
6184
  s2.push(s3);
5824
6185
  s3 = input.charAt(peg$currPos);
5825
- if (peg$r1.test(s3)) {
6186
+ if (peg$r2.test(s3)) {
5826
6187
  peg$currPos++;
5827
6188
  } else {
5828
6189
  s3 = peg$FAILED;
5829
6190
  if (peg$silentFails === 0) {
5830
- peg$fail(peg$e57);
6191
+ peg$fail(peg$e61);
5831
6192
  }
5832
6193
  }
5833
6194
  }
5834
6195
  peg$savedPos = s0;
5835
- s0 = peg$f91(s1, s2);
6196
+ s0 = peg$f98(s1, s2);
5836
6197
  } else {
5837
6198
  peg$currPos = s0;
5838
6199
  s0 = peg$FAILED;
@@ -5841,7 +6202,7 @@ function peg$parse(input, options) {
5841
6202
  if (s0 === peg$FAILED) {
5842
6203
  s1 = peg$FAILED;
5843
6204
  if (peg$silentFails === 0) {
5844
- peg$fail(peg$e79);
6205
+ peg$fail(peg$e82);
5845
6206
  }
5846
6207
  }
5847
6208
  return s0;
@@ -5876,7 +6237,7 @@ function peg$parse(input, options) {
5876
6237
  }
5877
6238
  if (s5 !== peg$FAILED) {
5878
6239
  peg$savedPos = s0;
5879
- s0 = peg$f92(s3);
6240
+ s0 = peg$f99(s3);
5880
6241
  } else {
5881
6242
  peg$currPos = s0;
5882
6243
  s0 = peg$FAILED;
@@ -5964,7 +6325,7 @@ function peg$parse(input, options) {
5964
6325
  s3 = null;
5965
6326
  }
5966
6327
  peg$savedPos = s0;
5967
- s0 = peg$f93(s1, s2);
6328
+ s0 = peg$f100(s1, s2);
5968
6329
  } else {
5969
6330
  peg$currPos = s0;
5970
6331
  s0 = peg$FAILED;
@@ -6018,7 +6379,7 @@ function peg$parse(input, options) {
6018
6379
  }
6019
6380
  if (s5 !== peg$FAILED) {
6020
6381
  peg$savedPos = s0;
6021
- s0 = peg$f94(s3);
6382
+ s0 = peg$f101(s3);
6022
6383
  } else {
6023
6384
  peg$currPos = s0;
6024
6385
  s0 = peg$FAILED;
@@ -6085,7 +6446,7 @@ function peg$parse(input, options) {
6085
6446
  }
6086
6447
  }
6087
6448
  peg$savedPos = s0;
6088
- s0 = peg$f95(s1, s2);
6449
+ s0 = peg$f102(s1, s2);
6089
6450
  } else {
6090
6451
  peg$currPos = s0;
6091
6452
  s0 = peg$FAILED;
@@ -6099,12 +6460,12 @@ function peg$parse(input, options) {
6099
6460
  if (s1 !== peg$FAILED) {
6100
6461
  s2 = peg$parse_();
6101
6462
  if (input.charCodeAt(peg$currPos) === 61) {
6102
- s3 = peg$c52;
6463
+ s3 = peg$c54;
6103
6464
  peg$currPos++;
6104
6465
  } else {
6105
6466
  s3 = peg$FAILED;
6106
6467
  if (peg$silentFails === 0) {
6107
- peg$fail(peg$e52);
6468
+ peg$fail(peg$e56);
6108
6469
  }
6109
6470
  }
6110
6471
  if (s3 !== peg$FAILED) {
@@ -6112,7 +6473,7 @@ function peg$parse(input, options) {
6112
6473
  s5 = peg$parseAttributeValue();
6113
6474
  if (s5 !== peg$FAILED) {
6114
6475
  peg$savedPos = s0;
6115
- s0 = peg$f96(s1, s5);
6476
+ s0 = peg$f103(s1, s5);
6116
6477
  } else {
6117
6478
  peg$currPos = s0;
6118
6479
  s0 = peg$FAILED;
@@ -6130,7 +6491,7 @@ function peg$parse(input, options) {
6130
6491
  s1 = peg$parseIdentifier();
6131
6492
  if (s1 !== peg$FAILED) {
6132
6493
  peg$savedPos = s0;
6133
- s1 = peg$f97(s1);
6494
+ s1 = peg$f104(s1);
6134
6495
  }
6135
6496
  s0 = s1;
6136
6497
  }
@@ -6163,7 +6524,7 @@ function peg$parse(input, options) {
6163
6524
  } else {
6164
6525
  s1 = peg$FAILED;
6165
6526
  if (peg$silentFails === 0) {
6166
- peg$fail(peg$e81);
6527
+ peg$fail(peg$e84);
6167
6528
  }
6168
6529
  }
6169
6530
  if (s1 !== peg$FAILED) {
@@ -6175,7 +6536,7 @@ function peg$parse(input, options) {
6175
6536
  } else {
6176
6537
  s1 = peg$FAILED;
6177
6538
  if (peg$silentFails === 0) {
6178
- peg$fail(peg$e81);
6539
+ peg$fail(peg$e84);
6179
6540
  }
6180
6541
  }
6181
6542
  }
@@ -6195,7 +6556,7 @@ function peg$parse(input, options) {
6195
6556
  if (s0 === peg$FAILED) {
6196
6557
  s1 = peg$FAILED;
6197
6558
  if (peg$silentFails === 0) {
6198
- peg$fail(peg$e82);
6559
+ peg$fail(peg$e85);
6199
6560
  }
6200
6561
  }
6201
6562
  return s0;
@@ -6203,13 +6564,13 @@ function peg$parse(input, options) {
6203
6564
  function peg$parseLineComment() {
6204
6565
  let s0, s1, s2, s3, s4;
6205
6566
  s0 = peg$currPos;
6206
- if (input.substr(peg$currPos, 2) === peg$c53) {
6207
- s1 = peg$c53;
6567
+ if (input.substr(peg$currPos, 2) === peg$c55) {
6568
+ s1 = peg$c55;
6208
6569
  peg$currPos += 2;
6209
6570
  } else {
6210
6571
  s1 = peg$FAILED;
6211
6572
  if (peg$silentFails === 0) {
6212
- peg$fail(peg$e54);
6573
+ peg$fail(peg$e58);
6213
6574
  }
6214
6575
  }
6215
6576
  if (s1 !== peg$FAILED) {
@@ -6220,7 +6581,7 @@ function peg$parse(input, options) {
6220
6581
  } else {
6221
6582
  s3 = peg$FAILED;
6222
6583
  if (peg$silentFails === 0) {
6223
- peg$fail(peg$e83);
6584
+ peg$fail(peg$e86);
6224
6585
  }
6225
6586
  }
6226
6587
  while (s3 !== peg$FAILED) {
@@ -6231,17 +6592,17 @@ function peg$parse(input, options) {
6231
6592
  } else {
6232
6593
  s3 = peg$FAILED;
6233
6594
  if (peg$silentFails === 0) {
6234
- peg$fail(peg$e83);
6595
+ peg$fail(peg$e86);
6235
6596
  }
6236
6597
  }
6237
6598
  }
6238
6599
  if (input.charCodeAt(peg$currPos) === 10) {
6239
- s3 = peg$c71;
6600
+ s3 = peg$c73;
6240
6601
  peg$currPos++;
6241
6602
  } else {
6242
6603
  s3 = peg$FAILED;
6243
6604
  if (peg$silentFails === 0) {
6244
- peg$fail(peg$e84);
6605
+ peg$fail(peg$e87);
6245
6606
  }
6246
6607
  }
6247
6608
  if (s3 === peg$FAILED) {
@@ -6253,7 +6614,7 @@ function peg$parse(input, options) {
6253
6614
  } else {
6254
6615
  s4 = peg$FAILED;
6255
6616
  if (peg$silentFails === 0) {
6256
- peg$fail(peg$e56);
6617
+ peg$fail(peg$e60);
6257
6618
  }
6258
6619
  }
6259
6620
  peg$silentFails--;
@@ -6280,13 +6641,13 @@ function peg$parse(input, options) {
6280
6641
  function peg$parseBlockComment() {
6281
6642
  let s0, s1, s2, s3, s4, s5;
6282
6643
  s0 = peg$currPos;
6283
- if (input.substr(peg$currPos, 2) === peg$c54) {
6284
- s1 = peg$c54;
6644
+ if (input.substr(peg$currPos, 2) === peg$c56) {
6645
+ s1 = peg$c56;
6285
6646
  peg$currPos += 2;
6286
6647
  } else {
6287
6648
  s1 = peg$FAILED;
6288
6649
  if (peg$silentFails === 0) {
6289
- peg$fail(peg$e55);
6650
+ peg$fail(peg$e59);
6290
6651
  }
6291
6652
  }
6292
6653
  if (s1 !== peg$FAILED) {
@@ -6294,13 +6655,13 @@ function peg$parse(input, options) {
6294
6655
  s3 = peg$currPos;
6295
6656
  s4 = peg$currPos;
6296
6657
  peg$silentFails++;
6297
- if (input.substr(peg$currPos, 2) === peg$c72) {
6298
- s5 = peg$c72;
6658
+ if (input.substr(peg$currPos, 2) === peg$c74) {
6659
+ s5 = peg$c74;
6299
6660
  peg$currPos += 2;
6300
6661
  } else {
6301
6662
  s5 = peg$FAILED;
6302
6663
  if (peg$silentFails === 0) {
6303
- peg$fail(peg$e85);
6664
+ peg$fail(peg$e88);
6304
6665
  }
6305
6666
  }
6306
6667
  peg$silentFails--;
@@ -6317,7 +6678,7 @@ function peg$parse(input, options) {
6317
6678
  } else {
6318
6679
  s5 = peg$FAILED;
6319
6680
  if (peg$silentFails === 0) {
6320
- peg$fail(peg$e56);
6681
+ peg$fail(peg$e60);
6321
6682
  }
6322
6683
  }
6323
6684
  if (s5 !== peg$FAILED) {
@@ -6336,13 +6697,13 @@ function peg$parse(input, options) {
6336
6697
  s3 = peg$currPos;
6337
6698
  s4 = peg$currPos;
6338
6699
  peg$silentFails++;
6339
- if (input.substr(peg$currPos, 2) === peg$c72) {
6340
- s5 = peg$c72;
6700
+ if (input.substr(peg$currPos, 2) === peg$c74) {
6701
+ s5 = peg$c74;
6341
6702
  peg$currPos += 2;
6342
6703
  } else {
6343
6704
  s5 = peg$FAILED;
6344
6705
  if (peg$silentFails === 0) {
6345
- peg$fail(peg$e85);
6706
+ peg$fail(peg$e88);
6346
6707
  }
6347
6708
  }
6348
6709
  peg$silentFails--;
@@ -6359,7 +6720,7 @@ function peg$parse(input, options) {
6359
6720
  } else {
6360
6721
  s5 = peg$FAILED;
6361
6722
  if (peg$silentFails === 0) {
6362
- peg$fail(peg$e56);
6723
+ peg$fail(peg$e60);
6363
6724
  }
6364
6725
  }
6365
6726
  if (s5 !== peg$FAILED) {
@@ -6374,13 +6735,13 @@ function peg$parse(input, options) {
6374
6735
  s3 = peg$FAILED;
6375
6736
  }
6376
6737
  }
6377
- if (input.substr(peg$currPos, 2) === peg$c72) {
6378
- s3 = peg$c72;
6738
+ if (input.substr(peg$currPos, 2) === peg$c74) {
6739
+ s3 = peg$c74;
6379
6740
  peg$currPos += 2;
6380
6741
  } else {
6381
6742
  s3 = peg$FAILED;
6382
6743
  if (peg$silentFails === 0) {
6383
- peg$fail(peg$e85);
6744
+ peg$fail(peg$e88);
6384
6745
  }
6385
6746
  }
6386
6747
  if (s3 !== peg$FAILED) {
@@ -7812,6 +8173,106 @@ function generateAccessibilityStyles(prefix) {
7812
8173
  }`;
7813
8174
  }
7814
8175
 
8176
+ // src/renderer/styles/annotation.ts
8177
+ function generateAnnotationStyles(_theme, prefix) {
8178
+ return `/* Annotation Components */
8179
+
8180
+ /* Marker - Number marker for referencing */
8181
+ .${prefix}-marker {
8182
+ display: inline-flex;
8183
+ align-items: center;
8184
+ justify-content: center;
8185
+ width: 20px;
8186
+ height: 20px;
8187
+ border-radius: 50%;
8188
+ background: #3b82f6;
8189
+ border: 2px solid #2563eb;
8190
+ color: white;
8191
+ font-size: 11px;
8192
+ font-weight: 600;
8193
+ line-height: 1;
8194
+ z-index: 10;
8195
+ }
8196
+
8197
+ /* Annotations Panel - Documentation container */
8198
+ .${prefix}-annotations {
8199
+ background: #fafafa;
8200
+ border: 2px dashed #d1d5db;
8201
+ border-radius: 8px;
8202
+ padding: 16px;
8203
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
8204
+ }
8205
+
8206
+ .${prefix}-annotations-header {
8207
+ display: flex;
8208
+ align-items: center;
8209
+ gap: 8px;
8210
+ font-weight: 600;
8211
+ font-size: 14px;
8212
+ color: #6b7280;
8213
+ margin-bottom: 16px;
8214
+ padding-bottom: 8px;
8215
+ border-bottom: 1px solid #e5e7eb;
8216
+ }
8217
+
8218
+ .${prefix}-annotations-icon {
8219
+ font-size: 16px;
8220
+ }
8221
+
8222
+ .${prefix}-annotations-content {
8223
+ display: flex;
8224
+ flex-direction: column;
8225
+ gap: 12px;
8226
+ }
8227
+
8228
+ /* Annotation Item - Individual entry */
8229
+ .${prefix}-annotation-item {
8230
+ display: flex;
8231
+ flex-direction: column;
8232
+ gap: 4px;
8233
+ }
8234
+
8235
+ .${prefix}-annotation-item-header {
8236
+ display: flex;
8237
+ align-items: center;
8238
+ gap: 8px;
8239
+ }
8240
+
8241
+ .${prefix}-annotation-marker {
8242
+ display: inline-flex;
8243
+ align-items: center;
8244
+ justify-content: center;
8245
+ width: 18px;
8246
+ height: 18px;
8247
+ border-radius: 50%;
8248
+ background: #3b82f6;
8249
+ color: white;
8250
+ font-size: 10px;
8251
+ font-weight: 600;
8252
+ flex-shrink: 0;
8253
+ }
8254
+
8255
+ .${prefix}-annotation-item-title {
8256
+ font-weight: 500;
8257
+ font-size: 13px;
8258
+ color: #374151;
8259
+ }
8260
+
8261
+ .${prefix}-annotation-item-content {
8262
+ padding-left: 26px;
8263
+ font-size: 12px;
8264
+ color: #6b7280;
8265
+ line-height: 1.5;
8266
+ }
8267
+
8268
+ .${prefix}-annotation-item-content p,
8269
+ .${prefix}-annotation-item-content .${prefix}-text {
8270
+ margin: 0;
8271
+ font-size: 12px;
8272
+ color: #6b7280;
8273
+ }`;
8274
+ }
8275
+
7815
8276
  // src/renderer/styles-components.ts
7816
8277
  function generateComponentStyles(_theme, prefix = "wf") {
7817
8278
  const parts = [
@@ -7825,7 +8286,8 @@ function generateComponentStyles(_theme, prefix = "wf") {
7825
8286
  generateOverlayStyles(_theme, prefix),
7826
8287
  generateNavigationStyles(_theme, prefix),
7827
8288
  generateSemanticMarkerStyles(_theme, prefix),
7828
- generateAccessibilityStyles(prefix)
8289
+ generateAccessibilityStyles(prefix),
8290
+ generateAnnotationStyles(_theme, prefix)
7829
8291
  ];
7830
8292
  return parts.join("\n\n");
7831
8293
  }
@@ -55911,6 +56373,117 @@ function renderDivider(node, ctx) {
55911
56373
  return `<hr class="${ctx.prefix}-divider"${styleAttr} />`;
55912
56374
  }
55913
56375
 
56376
+ // src/renderer/html/renderers/annotation.ts
56377
+ var MARKER_COLORS = {
56378
+ blue: { bg: "#3b82f6", border: "#2563eb" },
56379
+ red: { bg: "#ef4444", border: "#dc2626" },
56380
+ green: { bg: "#22c55e", border: "#16a34a" },
56381
+ yellow: { bg: "#eab308", border: "#ca8a04" },
56382
+ purple: { bg: "#a855f7", border: "#9333ea" },
56383
+ orange: { bg: "#f97316", border: "#ea580c" }
56384
+ };
56385
+ function getAnchorStyles(anchor) {
56386
+ if (!anchor) return "";
56387
+ const styles = ["position: absolute"];
56388
+ switch (anchor) {
56389
+ case "top-left":
56390
+ styles.push("top: -8px", "left: -8px");
56391
+ break;
56392
+ case "top-center":
56393
+ styles.push("top: -8px", "left: 50%", "transform: translateX(-50%)");
56394
+ break;
56395
+ case "top-right":
56396
+ styles.push("top: -8px", "right: -8px");
56397
+ break;
56398
+ case "center-left":
56399
+ styles.push("top: 50%", "left: -8px", "transform: translateY(-50%)");
56400
+ break;
56401
+ case "center":
56402
+ styles.push("top: 50%", "left: 50%", "transform: translate(-50%, -50%)");
56403
+ break;
56404
+ case "center-right":
56405
+ styles.push("top: 50%", "right: -8px", "transform: translateY(-50%)");
56406
+ break;
56407
+ case "bottom-left":
56408
+ styles.push("bottom: -8px", "left: -8px");
56409
+ break;
56410
+ case "bottom-center":
56411
+ styles.push("bottom: -8px", "left: 50%", "transform: translateX(-50%)");
56412
+ break;
56413
+ case "bottom-right":
56414
+ styles.push("bottom: -8px", "right: -8px");
56415
+ break;
56416
+ }
56417
+ return styles.join("; ");
56418
+ }
56419
+ function renderMarker(node, ctx) {
56420
+ const color = node.color || "blue";
56421
+ const colorConfig = MARKER_COLORS[color] || MARKER_COLORS.blue;
56422
+ const baseStyles = [
56423
+ "display: inline-flex",
56424
+ "align-items: center",
56425
+ "justify-content: center",
56426
+ "width: 20px",
56427
+ "height: 20px",
56428
+ "border-radius: 50%",
56429
+ `background: ${colorConfig.bg}`,
56430
+ `border: 2px solid ${colorConfig.border}`,
56431
+ "color: white",
56432
+ "font-size: 11px",
56433
+ "font-weight: 600",
56434
+ "line-height: 1",
56435
+ "z-index: 10"
56436
+ ];
56437
+ const anchorStyles = getAnchorStyles(node.anchor);
56438
+ const commonStyles = ctx.buildCommonStyles(node);
56439
+ const allStyles = [
56440
+ ...baseStyles,
56441
+ ...anchorStyles ? [anchorStyles] : [],
56442
+ ...commonStyles ? [commonStyles] : []
56443
+ ].join("; ");
56444
+ return `<span class="${ctx.prefix}-marker" style="${allStyles}" aria-label="Marker ${node.number}">${node.number}</span>`;
56445
+ }
56446
+ function renderAnnotations(node, ctx) {
56447
+ const title = node.title || "\uD654\uBA74 \uC124\uBA85";
56448
+ const commonStyles = ctx.buildCommonStyles(node);
56449
+ const styleAttr = commonStyles ? ` style="${commonStyles}"` : "";
56450
+ const items = (node.children || []).map((child) => renderAnnotationItem(child, ctx)).join("\n");
56451
+ return `<aside class="${ctx.prefix}-annotations" data-role="documentation" aria-label="${ctx.escapeHtml(title)}"${styleAttr}>
56452
+ <header class="${ctx.prefix}-annotations-header">
56453
+ <span class="${ctx.prefix}-annotations-icon" aria-hidden="true">&#128203;</span>
56454
+ <span>${ctx.escapeHtml(title)}</span>
56455
+ </header>
56456
+ <div class="${ctx.prefix}-annotations-content">
56457
+ ${items}
56458
+ </div>
56459
+ </aside>`;
56460
+ }
56461
+ function renderAnnotationItem(node, ctx) {
56462
+ const color = MARKER_COLORS.blue;
56463
+ const markerStyle = [
56464
+ "display: inline-flex",
56465
+ "align-items: center",
56466
+ "justify-content: center",
56467
+ "width: 18px",
56468
+ "height: 18px",
56469
+ "border-radius: 50%",
56470
+ `background: ${color.bg}`,
56471
+ "color: white",
56472
+ "font-size: 10px",
56473
+ "font-weight: 600",
56474
+ "flex-shrink: 0"
56475
+ ].join("; ");
56476
+ const children = node.children || [];
56477
+ const content = children.length > 0 ? ctx.renderChildren(children) : "";
56478
+ return `<div class="${ctx.prefix}-annotation-item">
56479
+ <div class="${ctx.prefix}-annotation-item-header">
56480
+ <span class="${ctx.prefix}-annotation-marker" style="${markerStyle}">${node.number}</span>
56481
+ <span class="${ctx.prefix}-annotation-item-title">${ctx.escapeHtml(node.title)}</span>
56482
+ </div>
56483
+ ${content ? `<div class="${ctx.prefix}-annotation-item-content">${content}</div>` : ""}
56484
+ </div>`;
56485
+ }
56486
+
55914
56487
  // src/renderer/html/index.ts
55915
56488
  var SPACING_TOKENS = {
55916
56489
  0: "0px",
@@ -56041,7 +56614,11 @@ var HtmlRenderer = class extends BaseRenderer {
56041
56614
  Tabs: (node) => this.renderTabs(node),
56042
56615
  Breadcrumb: (node) => this.renderBreadcrumb(node),
56043
56616
  // Other
56044
- Divider: (node) => this.renderDivider(node)
56617
+ Divider: (node) => this.renderDivider(node),
56618
+ // Annotation nodes
56619
+ Marker: (node) => this.renderMarker(node),
56620
+ Annotations: (node) => this.renderAnnotations(node),
56621
+ AnnotationItem: (node) => this.renderAnnotationItem(node)
56045
56622
  };
56046
56623
  }
56047
56624
  /**
@@ -56463,6 +57040,18 @@ ${title}${children}
56463
57040
  renderDivider(node) {
56464
57041
  return renderDivider(node, this.getRenderContext());
56465
57042
  }
57043
+ // ===========================================
57044
+ // Annotation Renderers
57045
+ // ===========================================
57046
+ renderMarker(node) {
57047
+ return renderMarker(node, this.getRenderContext());
57048
+ }
57049
+ renderAnnotations(node) {
57050
+ return renderAnnotations(node, this.getRenderContext());
57051
+ }
57052
+ renderAnnotationItem(node) {
57053
+ return renderAnnotationItem(node, this.getRenderContext());
57054
+ }
56466
57055
  };
56467
57056
  function createHtmlRenderer(options) {
56468
57057
  return new HtmlRenderer(options);
@@ -57100,6 +57689,33 @@ var COMPONENT_SPECS = [
57100
57689
  attributes: [...COMMON_ATTRIBUTES, "vertical"],
57101
57690
  hasChildren: false,
57102
57691
  description: "Horizontal separator"
57692
+ },
57693
+ // ============================================
57694
+ // Annotation Components
57695
+ // ============================================
57696
+ {
57697
+ name: "marker",
57698
+ nodeType: "Marker",
57699
+ category: "annotation",
57700
+ attributes: [...COMMON_ATTRIBUTES, "color", "anchor"],
57701
+ hasChildren: false,
57702
+ description: "Number marker for referencing in annotations"
57703
+ },
57704
+ {
57705
+ name: "annotations",
57706
+ nodeType: "Annotations",
57707
+ category: "annotation",
57708
+ attributes: [...COMMON_ATTRIBUTES, "title"],
57709
+ hasChildren: true,
57710
+ description: "Documentation panel for screen specifications"
57711
+ },
57712
+ {
57713
+ name: "item",
57714
+ nodeType: "AnnotationItem",
57715
+ category: "annotation",
57716
+ attributes: [],
57717
+ hasChildren: true,
57718
+ description: "Individual annotation entry with marker number and title"
57103
57719
  }
57104
57720
  ];
57105
57721
  var VALID_COMPONENT_NAMES = new Set(