@bytechain.cn/colamd 2.7.8-rc.2 → 2.7.9

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.
Files changed (82) hide show
  1. package/dist/main/chunks/docx-export.js +21 -12
  2. package/dist/renderer/assets/{2DXBBFLN-BQWZeEOZ.js → 2DXBBFLN-BZbS7Pd1.js} +4 -4
  3. package/dist/renderer/assets/{46IJ22JX-CR0BA3Ks.js → 46IJ22JX-CNFviTsR.js} +5 -5
  4. package/dist/renderer/assets/{4TTDE5I4-BdBL5ywh.js → 4TTDE5I4-C7pizLRz.js} +3 -3
  5. package/dist/renderer/assets/{4UF3HTLV-BYMrPeBv.js → 4UF3HTLV-Bgp6lNzK.js} +4 -4
  6. package/dist/renderer/assets/{AAXQQPKT-CTS7qJK7.js → AAXQQPKT-DiRTivQz.js} +8 -8
  7. package/dist/renderer/assets/{AKE5O7KZ-pEeLbu6F.js → AKE5O7KZ-DB0fY69K.js} +5 -5
  8. package/dist/renderer/assets/{BNMLP6AG-CbkwmI8G.js → BNMLP6AG-B895CsjY.js} +7 -7
  9. package/dist/renderer/assets/{DR6PKOQU-C6Iahoa3.js → DR6PKOQU-CrswvvVG.js} +3 -3
  10. package/dist/renderer/assets/{E4RJ7UJB-D58gl0M0.js → E4RJ7UJB-Dgy0Anf4.js} +6 -6
  11. package/dist/renderer/assets/{ELSXBIJH-DpS4enQ6.js → ELSXBIJH-Bg-hsqjD.js} +1 -1
  12. package/dist/renderer/assets/{ERTIBQVS-DD8jjKTj.js → ERTIBQVS-BNxjgPXX.js} +4 -4
  13. package/dist/renderer/assets/{F653G4FO-DoDhFXEy.js → F653G4FO-Dt3YtuWS.js} +8 -8
  14. package/dist/renderer/assets/{FKCDD66M-B0wYO26L.js → FKCDD66M-CenzCJNz.js} +1 -1
  15. package/dist/renderer/assets/{FP7KDXVC-B0LUknwq.js → FP7KDXVC-BmH1Qg4f.js} +6 -6
  16. package/dist/renderer/assets/{FT5I3RHX-GdBjTcHf.js → FT5I3RHX-Dd_6diyz.js} +7 -7
  17. package/dist/renderer/assets/{GY35JXOZ-Dg2P-i-d.js → GY35JXOZ-Cz54qXE9.js} +4 -4
  18. package/dist/renderer/assets/{H5EEJPP2-C3d8qkta.js → H5EEJPP2-FerEQPg3.js} +9 -9
  19. package/dist/renderer/assets/{HWDLEDTA-Rm5NjB2N.js → HWDLEDTA-dKG_tB6l.js} +1 -1
  20. package/dist/renderer/assets/{JZWSX6AR-qgXs8q-t.js → JZWSX6AR-DGqy6mhj.js} +2 -2
  21. package/dist/renderer/assets/{KQOEJWJY-mqwm7WG0.js → KQOEJWJY-RpP1RapT.js} +1 -1
  22. package/dist/renderer/assets/{KS3BB3KE-ufj8X6Wa.js → KS3BB3KE-ChYPdbg1.js} +5 -5
  23. package/dist/renderer/assets/{KXJRRZHI-C7vOZ5ie.js → KXJRRZHI-DSLhPV79.js} +3 -3
  24. package/dist/renderer/assets/{MFVI5XKI-DQ5z-nMh.js → MFVI5XKI-C1-R608I.js} +1 -1
  25. package/dist/renderer/assets/{MWY2J62P-DUIamY6F.js → MWY2J62P-CYEJcQI7.js} +5 -5
  26. package/dist/renderer/assets/{MXGNCBL2-DqeFe7Wj.js → MXGNCBL2-DEhdb9Po.js} +5 -5
  27. package/dist/renderer/assets/{N6DAJLIZ-CvgcQPUI.js → N6DAJLIZ-Jz5IcMsB.js} +2 -2
  28. package/dist/renderer/assets/{NU5M23IW-DpTeCZq5.js → NU5M23IW-C8k8MpXh.js} +5 -5
  29. package/dist/renderer/assets/{NV4XNBIS-wuvA_U-J.js → NV4XNBIS-BCaP1w8q.js} +7 -7
  30. package/dist/renderer/assets/{OGLU4SIR-CJL7p3WR.js → OGLU4SIR-OGqdd7qE.js} +5 -5
  31. package/dist/renderer/assets/{OUNS5N76-CQVdszCS.js → OUNS5N76-p6wVW2dP.js} +6 -6
  32. package/dist/renderer/assets/{PU4ISKXV-Bcshpks1.js → PU4ISKXV-D-ZMREMw.js} +5 -5
  33. package/dist/renderer/assets/{PUZGS23X-B8gmR_q3.js → PUZGS23X-DsbrgiWg.js} +1 -1
  34. package/dist/renderer/assets/{Q3IYVLG5-B-qlhAM-.js → Q3IYVLG5-BpItOJB9.js} +5 -5
  35. package/dist/renderer/assets/{QYHQDLKZ-EFOsxom5.js → QYHQDLKZ-Dm9JiJIz.js} +9 -9
  36. package/dist/renderer/assets/{RZSVICHU-B4a4ijU5.js → RZSVICHU-Chf4nk49.js} +1 -1
  37. package/dist/renderer/assets/{UEXXS2NB-BYEZA17b.js → UEXXS2NB-Bm2T4HQE.js} +1 -1
  38. package/dist/renderer/assets/{UHTQJXKL-Dr2lF0X7.js → UHTQJXKL-Y4ThTfXK.js} +5 -5
  39. package/dist/renderer/assets/{URA2L2QI-CpWV8ZqC.js → URA2L2QI-DkaJzKIj.js} +1 -1
  40. package/dist/renderer/assets/{UXCHDUKG-BhvBbCG9.js → UXCHDUKG-D6Ae72SJ.js} +5 -5
  41. package/dist/renderer/assets/{VKNV3BUX-BYO3cWfq.js → VKNV3BUX-CQYQjCVp.js} +6 -6
  42. package/dist/renderer/assets/{VMV7XPHP-Cv3j51G-.js → VMV7XPHP-CKz3lx9e.js} +1 -1
  43. package/dist/renderer/assets/{WEVWDWVA-Bk5T2zs5.js → WEVWDWVA-DXDXU985.js} +1 -1
  44. package/dist/renderer/assets/{XRRJ35LF-BmKX-UhN.js → XRRJ35LF-C66qdAcN.js} +4 -4
  45. package/dist/renderer/assets/{YFKBLVVN-BsN6JCME.js → YFKBLVVN-B1JutB4t.js} +4 -4
  46. package/dist/renderer/assets/{YHRE5QGZ-BfqB5qTM.js → YHRE5QGZ-BoAzNT7K.js} +7 -7
  47. package/dist/renderer/assets/{ZF3OVT4B-71e7gqxT.js → ZF3OVT4B-tBhjRApP.js} +3 -3
  48. package/dist/renderer/assets/{index-KXmfqOLZ.js → index-6XszqTLE.js} +1 -1
  49. package/dist/renderer/assets/{index-iM3KwPgz.js → index-8VmLWls0.js} +1 -1
  50. package/dist/renderer/assets/{index-BZI3MrwX.js → index-BHNBF13i.js} +1 -1
  51. package/dist/renderer/assets/{index-bx07CRyn.css → index-BSrZe3ki.css} +54 -17
  52. package/dist/renderer/assets/{index-BfRf6YNA.js → index-Bcx2JMPS.js} +261 -67
  53. package/dist/renderer/assets/{index-CMEBb_j9.js → index-Bk6TVqB_.js} +1 -1
  54. package/dist/renderer/assets/{index-C-S_Yg_y.js → index-Bz1F6_A_.js} +1 -1
  55. package/dist/renderer/assets/{index-FbcCt5ge.js → index-C1fw6u5V.js} +1 -1
  56. package/dist/renderer/assets/{index-DNjOyVpF.js → index-CAuNb95h.js} +1 -1
  57. package/dist/renderer/assets/{index-S_JLIQUn.js → index-CQ2EdLQr.js} +1 -1
  58. package/dist/renderer/assets/{index-BkXNa75_.js → index-CZRO_PAZ.js} +1 -1
  59. package/dist/renderer/assets/{index-DrX0ymyh.js → index-Coye68JD.js} +1 -1
  60. package/dist/renderer/assets/{index-eE3MJT-Z.js → index-CxqBaXly.js} +1 -1
  61. package/dist/renderer/assets/{index-CeRIIlMp.js → index-DROMWNcj.js} +1 -1
  62. package/dist/renderer/assets/{index-Cz6s0BAO.js → index-DUg0by2F.js} +1 -1
  63. package/dist/renderer/assets/{index-CcV4JcXV.js → index-Dg6oPZ5w.js} +3 -3
  64. package/dist/renderer/assets/{index-7XM2a0Z_.js → index-Dl8YooLt.js} +3 -3
  65. package/dist/renderer/assets/{index-DwT_NY9Q.js → index-Dqlv2y9T.js} +1 -1
  66. package/dist/renderer/assets/{index-2bn6g3NY.js → index-HSHw3F3k.js} +1 -1
  67. package/dist/renderer/assets/{index-DXBizOwH.js → index-KKUqPjEB.js} +1 -1
  68. package/dist/renderer/assets/{index-fPGCpVWp.js → index-UzBrnlvb.js} +1 -1
  69. package/dist/renderer/assets/{index-D3xwJ3eb.js → index-eBhE19Gh.js} +1 -1
  70. package/dist/renderer/assets/{index-VDcE-MZS.js → index-k6oLH39v.js} +3 -3
  71. package/dist/renderer/assets/{lazy-SjZiJQmj.js → lazy-DVRRTm-q.js} +3 -3
  72. package/dist/renderer/assets/{web-BSnrlb26.js → web-CAJ9chii.js} +1 -1
  73. package/dist/renderer/assets/{web-raTBZuvw.js → web-Ct-G5Yg8.js} +2 -2
  74. package/dist/renderer/assets/{web-GpaN5nX1.js → web-Y168OUbw.js} +1 -1
  75. package/dist/renderer/index.html +2 -2
  76. package/package.json +1 -1
  77. package/scripts/theme-verify-core.mjs +345 -345
  78. package/scripts/verify-themes-cli.mjs +95 -95
  79. package/themes/contract.json +128 -127
  80. package/themes/elegant.css +0 -1
  81. package/themes/sepia.css +0 -1
  82. package/themes/template.css +1 -1
@@ -33237,7 +33237,7 @@ const PRINT_PALETTE = {
33237
33237
  };
33238
33238
  let pele = null;
33239
33239
  function loadPele() {
33240
- pele ??= __vitePreload(() => import("./lazy-SjZiJQmj.js").then((n) => n.l), true ? [] : void 0, import.meta.url);
33240
+ pele ??= __vitePreload(() => import("./lazy-DVRRTm-q.js").then((n) => n.l), true ? [] : void 0, import.meta.url);
33241
33241
  return pele;
33242
33242
  }
33243
33243
  function withPrintPalette(svg) {
@@ -33409,6 +33409,18 @@ function pushBlockLines(state, from, to, className, ranges) {
33409
33409
  function pushListItemLines(state, node, ranges) {
33410
33410
  const className = `cm-md-li cm-md-li-${Math.min(listDepth$1(node), 6)}`;
33411
33411
  const tree = syntaxTree(state);
33412
+ const path2 = [];
33413
+ let quoted = false;
33414
+ for (let ancestor = node; ancestor; ancestor = ancestor.parent) {
33415
+ if (ancestor.name === "Blockquote") quoted = true;
33416
+ if (ancestor.name !== "ListItem") continue;
33417
+ const list = ancestor.parent;
33418
+ const mark = ancestor.getChild("ListMark");
33419
+ const start = list.name === "OrderedList" && mark ? Number.parseInt(state.sliceDoc(mark.from, mark.to), 10) : void 0;
33420
+ path2.unshift({ list: list.from, item: ancestor.from, ...start === void 0 ? {} : { start } });
33421
+ }
33422
+ const attributes = { "data-list-path": JSON.stringify(path2), "data-list-quoted": String(quoted) };
33423
+ const paragraphs = node.getChildren("Paragraph");
33412
33424
  let ownEnd = node.to;
33413
33425
  for (let child = node.firstChild; child; child = child.nextSibling) {
33414
33426
  if (child.name === "BulletList" || child.name === "OrderedList") {
@@ -33417,17 +33429,22 @@ function pushListItemLines(state, node, ranges) {
33417
33429
  }
33418
33430
  }
33419
33431
  const first = state.doc.lineAt(node.from).number;
33420
- const last2 = state.doc.lineAt(node.to).number;
33432
+ const ownLast = state.doc.lineAt(node.to).number;
33433
+ const last2 = node.nextSibling?.name === "ListItem" ? state.doc.lineAt(node.nextSibling.from).number - 1 : ownLast;
33421
33434
  for (let n = first; n <= last2; n++) {
33422
33435
  const line = state.doc.line(n);
33423
- if (line.to > ownEnd) {
33436
+ if (n <= ownLast && line.to > ownEnd) {
33424
33437
  const indent = /^[ \t]*/.exec(line.text)?.[0].length ?? 0;
33425
33438
  const at = Math.min(line.from + indent, line.to);
33426
33439
  let owner = tree.resolveInner(at, 1);
33427
33440
  while (owner && owner.name !== "ListItem") owner = owner.parent;
33428
33441
  if (!owner || owner.from !== node.from) continue;
33429
33442
  }
33430
- ranges.push({ from: line.from, to: line.from, deco: BLOCK(className) });
33443
+ const paragraph = paragraphs.find((block) => block.from <= line.to && block.to > line.from);
33444
+ ranges.push({ from: line.from, to: line.from, deco: Decoration.line({ class: className, attributes: {
33445
+ ...attributes,
33446
+ ...paragraph ? { "data-list-paragraph": String(paragraph.from) } : {}
33447
+ } }) });
33431
33448
  }
33432
33449
  }
33433
33450
  const hide = (from, to) => Decoration.replace({});
@@ -33808,38 +33825,39 @@ function alignOf(delimiter) {
33808
33825
  if (right) return "right";
33809
33826
  return "left";
33810
33827
  }
33811
- const INLINE_RE = /(\*\*|__)(.+?)\1|(\*|_)(.+?)\3|`([^`]+)`|~~(.+?)~~|!\[([^\]]*)\]\(\s*(<[^>]*>|[^)\s]+)[^)]*\)|\[([^\]]*)\]\(([^)]*)\)|<br\s*\/?>/gi;
33828
+ const INLINE_RE = /\*\*(?<strong>.+?)\*\*|(?<![\p{L}\p{N}_])__(?<strongU>(?=\S).+?(?<=\S))__(?![\p{L}\p{N}_])|\*(?<em>.+?)\*|(?<![\p{L}\p{N}_])_(?<emU>(?=\S).+?(?<=\S))_(?![\p{L}\p{N}_])|`(?<code>[^`]+)`|~~(?<strike>.+?)~~|!\[(?<alt>[^\]]*)\]\(\s*(?<src><[^>]*>|[^)\s]+)[^)]*\)|\[(?<linkText>[^\]]*)\]\((?<href>[^)]*)\)|<br\s*\/?>/giu;
33812
33829
  function appendInline(parent, text2, base2) {
33813
33830
  INLINE_RE.lastIndex = 0;
33814
33831
  let last2 = 0;
33815
33832
  let match;
33816
33833
  while ((match = INLINE_RE.exec(text2)) !== null) {
33817
33834
  if (match.index > last2) parent.appendChild(document.createTextNode(text2.slice(last2, match.index)));
33818
- if (match[2] !== void 0) {
33835
+ const g = match.groups ?? {};
33836
+ if (g.strong !== void 0 || g.strongU !== void 0) {
33819
33837
  const el = document.createElement("strong");
33820
- el.textContent = match[2];
33838
+ el.textContent = g.strong ?? g.strongU ?? "";
33821
33839
  parent.appendChild(el);
33822
- } else if (match[4] !== void 0) {
33840
+ } else if (g.em !== void 0 || g.emU !== void 0) {
33823
33841
  const el = document.createElement("em");
33824
- el.textContent = match[4];
33842
+ el.textContent = g.em ?? g.emU ?? "";
33825
33843
  parent.appendChild(el);
33826
- } else if (match[5] !== void 0) {
33844
+ } else if (g.code !== void 0) {
33827
33845
  const el = document.createElement("code");
33828
- el.textContent = match[5];
33846
+ el.textContent = g.code;
33829
33847
  parent.appendChild(el);
33830
- } else if (match[6] !== void 0) {
33848
+ } else if (g.strike !== void 0) {
33831
33849
  const el = document.createElement("s");
33832
- el.textContent = match[6];
33850
+ el.textContent = g.strike;
33833
33851
  parent.appendChild(el);
33834
- } else if (match[7] !== void 0) {
33852
+ } else if (g.alt !== void 0) {
33835
33853
  const img = document.createElement("img");
33836
- img.src = resolveImageSrc(match[8] ?? "", base2);
33837
- img.alt = match[7];
33854
+ img.src = resolveImageSrc(g.src ?? "", base2);
33855
+ img.alt = g.alt;
33838
33856
  parent.appendChild(img);
33839
- } else if (match[9] !== void 0) {
33857
+ } else if (g.linkText !== void 0) {
33840
33858
  const el = document.createElement("a");
33841
- el.textContent = match[9] || match[10] || "";
33842
- const href = (match[10] ?? "").trim();
33859
+ el.textContent = g.linkText || g.href || "";
33860
+ const href = (g.href ?? "").trim();
33843
33861
  if (/^https?:\/\//i.test(href)) el.setAttribute("href", href);
33844
33862
  parent.appendChild(el);
33845
33863
  } else if (/^<br/i.test(match[0])) {
@@ -34127,6 +34145,8 @@ function collectInline(state, ranges, front) {
34127
34145
  case "EmphasisMark":
34128
34146
  case "StrikethroughMark":
34129
34147
  case "CodeMark": {
34148
+ const fence = node.node.parent;
34149
+ if (node.name === "CodeMark" && fence?.name === "FencedCode" && !isBlockActive(state, fence.from, fence.to) && /^(`{3,}|~{3,})\s*mermaid\s*$/.test(state.doc.sliceString(fence.from, state.doc.lineAt(fence.from).to).trim()) && codeInsideFence(state, fence).trim()) break;
34130
34150
  ranges.push({ from, to, deco: hide() });
34131
34151
  break;
34132
34152
  }
@@ -34308,27 +34328,68 @@ function indentListItem(view, direction) {
34308
34328
  const range = state.selection.main;
34309
34329
  if (!range.empty) return false;
34310
34330
  const line = state.doc.lineAt(range.head);
34311
- if (!LIST_RE.test(line.text)) return false;
34331
+ const self2 = listLine(line.text);
34332
+ if (!self2) return false;
34312
34333
  if (direction === 1) {
34334
+ const parent2 = parentItem(state, line, self2.lead);
34335
+ const target = parent2 ? parent2.lead + parent2.width : self2.lead + self2.width;
34336
+ const lead2 = Math.max(target, self2.lead + INDENT.length);
34337
+ const change = freshSublist(state, line, lead2) ? { from: line.from, to: line.from + self2.lead + self2.digits.length, insert: `${" ".repeat(lead2)}1` } : { from: line.from, insert: " ".repeat(lead2 - self2.lead) };
34313
34338
  view.dispatch({
34314
- changes: { from: line.from, insert: INDENT },
34315
- selection: { anchor: range.head + INDENT.length },
34339
+ changes: change,
34340
+ selection: { anchor: range.head + (lead2 - self2.lead) },
34316
34341
  scrollIntoView: true,
34317
34342
  userEvent: "input"
34318
34343
  });
34319
34344
  return true;
34320
34345
  }
34321
- const leading = /^[ \t]+/.exec(line.text);
34322
- if (!leading) return false;
34323
- const width = Math.min(leading[0].length, INDENT.length);
34346
+ const parent = parentItem(state, line, self2.lead - 1);
34347
+ const lead = parent ? parent.lead : 0;
34348
+ if (lead >= self2.lead) return false;
34324
34349
  view.dispatch({
34325
- changes: { from: line.from, to: line.from + width, insert: "" },
34326
- selection: { anchor: Math.max(line.from, range.head - width) },
34350
+ changes: { from: line.from, to: line.from + self2.lead, insert: " ".repeat(lead) },
34351
+ selection: { anchor: Math.max(line.from + lead, range.head - (self2.lead - lead)) },
34327
34352
  scrollIntoView: true,
34328
34353
  userEvent: "input"
34329
34354
  });
34330
34355
  return true;
34331
34356
  }
34357
+ function freshSublist(state, line, depth) {
34358
+ const self2 = listLine(line.text);
34359
+ if (!self2 || !self2.digits) return false;
34360
+ for (let number2 = line.number - 1; number2 >= 1; number2--) {
34361
+ const prev = state.doc.line(number2);
34362
+ if (prev.text.trim() === "") break;
34363
+ const prevLine = listLine(prev.text);
34364
+ if (!prevLine) {
34365
+ if (/^[ \t]*/.exec(prev.text)[0].length > depth) continue;
34366
+ break;
34367
+ }
34368
+ if (prevLine.lead === depth) return false;
34369
+ if (prevLine.lead < depth) break;
34370
+ }
34371
+ return true;
34372
+ }
34373
+ function listLine(text2) {
34374
+ const match = LIST_RE.exec(text2);
34375
+ if (!match) return null;
34376
+ const lead = match[1].length;
34377
+ const width = match[0].length - lead - (match[6]?.length ?? 0);
34378
+ return { lead, width, digits: match[3] ?? "" };
34379
+ }
34380
+ function parentItem(state, line, lead) {
34381
+ for (let number2 = line.number - 1; number2 >= 1; number2--) {
34382
+ const prev = state.doc.line(number2);
34383
+ if (prev.text.trim() === "") return null;
34384
+ const prevLine = listLine(prev.text);
34385
+ if (prevLine) {
34386
+ if (prevLine.lead <= lead) return prevLine;
34387
+ continue;
34388
+ }
34389
+ if (/^[ \t]*/.exec(prev.text)[0].length <= lead) return null;
34390
+ }
34391
+ return null;
34392
+ }
34332
34393
  const listInput = Prec.high(keymap.of([
34333
34394
  { key: "Enter", run: continueList },
34334
34395
  { key: "Tab", run: (view) => indentListItem(view, 1) },
@@ -41770,7 +41831,7 @@ function legacy(parser2) {
41770
41831
  return new LanguageSupport(StreamLanguage.define(parser2));
41771
41832
  }
41772
41833
  function sql(dialectName) {
41773
- return __vitePreload(() => import("./index-iM3KwPgz.js"), true ? [] : void 0, import.meta.url).then((m) => m.sql({ dialect: m[dialectName] }));
41834
+ return __vitePreload(() => import("./index-8VmLWls0.js"), true ? [] : void 0, import.meta.url).then((m) => m.sql({ dialect: m[dialectName] }));
41774
41835
  }
41775
41836
  const languages = [
41776
41837
  // New-style language modes
@@ -41778,7 +41839,7 @@ const languages = [
41778
41839
  name: "C",
41779
41840
  extensions: ["c", "h", "ino"],
41780
41841
  load() {
41781
- return __vitePreload(() => import("./index-CeRIIlMp.js"), true ? [] : void 0, import.meta.url).then((m) => m.cpp());
41842
+ return __vitePreload(() => import("./index-DROMWNcj.js"), true ? [] : void 0, import.meta.url).then((m) => m.cpp());
41782
41843
  }
41783
41844
  }),
41784
41845
  /* @__PURE__ */ LanguageDescription.of({
@@ -41786,7 +41847,7 @@ const languages = [
41786
41847
  alias: ["cpp"],
41787
41848
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
41788
41849
  load() {
41789
- return __vitePreload(() => import("./index-CeRIIlMp.js"), true ? [] : void 0, import.meta.url).then((m) => m.cpp());
41850
+ return __vitePreload(() => import("./index-DROMWNcj.js"), true ? [] : void 0, import.meta.url).then((m) => m.cpp());
41790
41851
  }
41791
41852
  }),
41792
41853
  /* @__PURE__ */ LanguageDescription.of({
@@ -41808,7 +41869,7 @@ const languages = [
41808
41869
  name: "Go",
41809
41870
  extensions: ["go"],
41810
41871
  load() {
41811
- return __vitePreload(() => import("./index-DNjOyVpF.js"), true ? [] : void 0, import.meta.url).then((m) => m.go());
41872
+ return __vitePreload(() => import("./index-CAuNb95h.js"), true ? [] : void 0, import.meta.url).then((m) => m.go());
41812
41873
  }
41813
41874
  }),
41814
41875
  /* @__PURE__ */ LanguageDescription.of({
@@ -41823,7 +41884,7 @@ const languages = [
41823
41884
  name: "Java",
41824
41885
  extensions: ["java"],
41825
41886
  load() {
41826
- return __vitePreload(() => import("./index-2bn6g3NY.js"), true ? [] : void 0, import.meta.url).then((m) => m.java());
41887
+ return __vitePreload(() => import("./index-HSHw3F3k.js"), true ? [] : void 0, import.meta.url).then((m) => m.java());
41827
41888
  }
41828
41889
  }),
41829
41890
  /* @__PURE__ */ LanguageDescription.of({
@@ -41838,7 +41899,7 @@ const languages = [
41838
41899
  name: "Jinja",
41839
41900
  extensions: ["j2", "jinja", "jinja2"],
41840
41901
  load() {
41841
- return __vitePreload(() => import("./index-DrX0ymyh.js"), true ? [] : void 0, import.meta.url).then((m) => m.jinja());
41902
+ return __vitePreload(() => import("./index-Coye68JD.js"), true ? [] : void 0, import.meta.url).then((m) => m.jinja());
41842
41903
  }
41843
41904
  }),
41844
41905
  /* @__PURE__ */ LanguageDescription.of({
@@ -41846,7 +41907,7 @@ const languages = [
41846
41907
  alias: ["json5"],
41847
41908
  extensions: ["json", "map"],
41848
41909
  load() {
41849
- return __vitePreload(() => import("./index-BkXNa75_.js"), true ? [] : void 0, import.meta.url).then((m) => m.json());
41910
+ return __vitePreload(() => import("./index-CZRO_PAZ.js"), true ? [] : void 0, import.meta.url).then((m) => m.json());
41850
41911
  }
41851
41912
  }),
41852
41913
  /* @__PURE__ */ LanguageDescription.of({
@@ -41860,14 +41921,14 @@ const languages = [
41860
41921
  name: "LESS",
41861
41922
  extensions: ["less"],
41862
41923
  load() {
41863
- return __vitePreload(() => import("./index-DwT_NY9Q.js"), true ? [] : void 0, import.meta.url).then((m) => m.less());
41924
+ return __vitePreload(() => import("./index-Dqlv2y9T.js"), true ? [] : void 0, import.meta.url).then((m) => m.less());
41864
41925
  }
41865
41926
  }),
41866
41927
  /* @__PURE__ */ LanguageDescription.of({
41867
41928
  name: "Liquid",
41868
41929
  extensions: ["liquid"],
41869
41930
  load() {
41870
- return __vitePreload(() => import("./index-C-S_Yg_y.js"), true ? [] : void 0, import.meta.url).then((m) => m.liquid());
41931
+ return __vitePreload(() => import("./index-Bz1F6_A_.js"), true ? [] : void 0, import.meta.url).then((m) => m.liquid());
41871
41932
  }
41872
41933
  }),
41873
41934
  /* @__PURE__ */ LanguageDescription.of({
@@ -41899,7 +41960,7 @@ const languages = [
41899
41960
  name: "PHP",
41900
41961
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
41901
41962
  load() {
41902
- return __vitePreload(() => import("./index-BZI3MrwX.js"), true ? [] : void 0, import.meta.url).then((m) => m.php());
41963
+ return __vitePreload(() => import("./index-BHNBF13i.js"), true ? [] : void 0, import.meta.url).then((m) => m.php());
41903
41964
  }
41904
41965
  }),
41905
41966
  /* @__PURE__ */ LanguageDescription.of({
@@ -41920,28 +41981,28 @@ const languages = [
41920
41981
  extensions: ["BUILD", "bzl", "py", "pyw"],
41921
41982
  filename: /^(BUCK|BUILD)$/,
41922
41983
  load() {
41923
- return __vitePreload(() => import("./index-DXBizOwH.js"), true ? [] : void 0, import.meta.url).then((m) => m.python());
41984
+ return __vitePreload(() => import("./index-KKUqPjEB.js"), true ? [] : void 0, import.meta.url).then((m) => m.python());
41924
41985
  }
41925
41986
  }),
41926
41987
  /* @__PURE__ */ LanguageDescription.of({
41927
41988
  name: "Rust",
41928
41989
  extensions: ["rs"],
41929
41990
  load() {
41930
- return __vitePreload(() => import("./index-CMEBb_j9.js"), true ? [] : void 0, import.meta.url).then((m) => m.rust());
41991
+ return __vitePreload(() => import("./index-Bk6TVqB_.js"), true ? [] : void 0, import.meta.url).then((m) => m.rust());
41931
41992
  }
41932
41993
  }),
41933
41994
  /* @__PURE__ */ LanguageDescription.of({
41934
41995
  name: "Sass",
41935
41996
  extensions: ["sass"],
41936
41997
  load() {
41937
- return __vitePreload(() => import("./index-S_JLIQUn.js"), true ? [] : void 0, import.meta.url).then((m) => m.sass({ indented: true }));
41998
+ return __vitePreload(() => import("./index-CQ2EdLQr.js"), true ? [] : void 0, import.meta.url).then((m) => m.sass({ indented: true }));
41938
41999
  }
41939
42000
  }),
41940
42001
  /* @__PURE__ */ LanguageDescription.of({
41941
42002
  name: "SCSS",
41942
42003
  extensions: ["scss"],
41943
42004
  load() {
41944
- return __vitePreload(() => import("./index-S_JLIQUn.js"), true ? [] : void 0, import.meta.url).then((m) => m.sass());
42005
+ return __vitePreload(() => import("./index-CQ2EdLQr.js"), true ? [] : void 0, import.meta.url).then((m) => m.sass());
41945
42006
  }
41946
42007
  }),
41947
42008
  /* @__PURE__ */ LanguageDescription.of({
@@ -41976,7 +42037,7 @@ const languages = [
41976
42037
  name: "WebAssembly",
41977
42038
  extensions: ["wat", "wast"],
41978
42039
  load() {
41979
- return __vitePreload(() => import("./index-eE3MJT-Z.js"), true ? [] : void 0, import.meta.url).then((m) => m.wast());
42040
+ return __vitePreload(() => import("./index-CxqBaXly.js"), true ? [] : void 0, import.meta.url).then((m) => m.wast());
41980
42041
  }
41981
42042
  }),
41982
42043
  /* @__PURE__ */ LanguageDescription.of({
@@ -41984,7 +42045,7 @@ const languages = [
41984
42045
  alias: ["rss", "wsdl", "xsd"],
41985
42046
  extensions: ["xml", "xsl", "xsd", "svg"],
41986
42047
  load() {
41987
- return __vitePreload(() => import("./index-KXmfqOLZ.js"), true ? [] : void 0, import.meta.url).then((m) => m.xml());
42048
+ return __vitePreload(() => import("./index-6XszqTLE.js"), true ? [] : void 0, import.meta.url).then((m) => m.xml());
41988
42049
  }
41989
42050
  }),
41990
42051
  /* @__PURE__ */ LanguageDescription.of({
@@ -41992,7 +42053,7 @@ const languages = [
41992
42053
  alias: ["yml"],
41993
42054
  extensions: ["yaml", "yml"],
41994
42055
  load() {
41995
- return __vitePreload(() => import("./index-fPGCpVWp.js"), true ? [] : void 0, import.meta.url).then((m) => m.yaml());
42056
+ return __vitePreload(() => import("./index-UzBrnlvb.js"), true ? [] : void 0, import.meta.url).then((m) => m.yaml());
41996
42057
  }
41997
42058
  }),
41998
42059
  // Legacy modes ported from CodeMirror 5
@@ -42781,13 +42842,13 @@ const languages = [
42781
42842
  name: "Vue",
42782
42843
  extensions: ["vue"],
42783
42844
  load() {
42784
- return __vitePreload(() => import("./index-FbcCt5ge.js"), true ? [] : void 0, import.meta.url).then((m) => m.vue());
42845
+ return __vitePreload(() => import("./index-C1fw6u5V.js"), true ? [] : void 0, import.meta.url).then((m) => m.vue());
42785
42846
  }
42786
42847
  }),
42787
42848
  /* @__PURE__ */ LanguageDescription.of({
42788
42849
  name: "Angular Template",
42789
42850
  load() {
42790
- return __vitePreload(() => import("./index-Cz6s0BAO.js"), true ? [] : void 0, import.meta.url).then((m) => m.angular());
42851
+ return __vitePreload(() => import("./index-DUg0by2F.js"), true ? [] : void 0, import.meta.url).then((m) => m.angular());
42791
42852
  }
42792
42853
  })
42793
42854
  ];
@@ -42800,7 +42861,10 @@ const markdownHighlightStyle = HighlightStyle.define([
42800
42861
  { tag: tags$1.emphasis, fontStyle: "italic" },
42801
42862
  { tag: tags$1.strikethrough, textDecoration: "line-through" },
42802
42863
  { tag: tags$1.link, color: "var(--link-color)" },
42803
- { tag: [tags$1.processingInstruction, tags$1.contentSeparator, tags$1.list], color: "var(--text-muted)" },
42864
+ // 标记字符(`#`、`>`、`***`、围栏)压淡;**正文不许跟着淡**。
42865
+ // `t.list` 曾经也在这条里,它盖住的是列表项里的文字,不只是 `-`、`1.` 那两个字符:
42866
+ // 整个列表都发灰(2026-10-25 报的)。列表的圆点与序号由 editor-preview.css 单独管。
42867
+ { tag: [tags$1.processingInstruction, tags$1.contentSeparator], color: "var(--text-muted)" },
42804
42868
  /* 代码块里的语法着色。解析器在 state.ts 里通过 `codeLanguages` 接进来(装了哪些
42805
42869
  语言就认哪些),这里只决定怎么画。
42806
42870
  颜色是变量,不是字面值:--code-* 由主题按代码块底色的明暗给两套(见 base.css),
@@ -42832,6 +42896,8 @@ const editorTheme = EditorView.theme({
42832
42896
  一旦在这里写 padding,引用块、列表、代码块的内边距会被整片吃掉(实测全为 0px)。
42833
42897
  归零与块级内边距都写在 editor-preview.css 里,用同样两个类的选择器,靠文件顺序决胜。 */
42834
42898
  ".cm-cursor, .cm-dropCursor": { borderLeftColor: "var(--text-color)" },
42899
+ /* 代码块可能是深底(雅致、熊红),光标在里面要跟代码文字同色才看得见。类由 cursor-colors 挂。 */
42900
+ "&.cm-cursor-in-code .cm-cursor-primary, &.cm-drop-in-code .cm-dropCursor": { borderLeftColor: "var(--code-block-text, var(--text-color))" },
42835
42901
  /* 选中色只在这里管原生选区。真正画出来的那条色带(.cm-selectionBackground)写在
42836
42902
  themes/editor-preview.css:baseTheme 给它的选择器有四个类,这里写不进去;
42837
42903
  同优先级时 baseTheme 总在后面。 */
@@ -43011,7 +43077,7 @@ function stateExtensions() {
43011
43077
  // 一起。查找是应用级功能,入口在菜单的「查找」上(Cmd+F 由菜单的快捷键发
43012
43078
  // `editor:search`),面板在 editor/search-panel.ts。
43013
43079
  keymap.of([
43014
- ...defaultKeymap,
43080
+ ...defaultKeymap.filter((binding) => binding.key !== "Mod-/"),
43015
43081
  ...historyKeymap,
43016
43082
  indentWithTab
43017
43083
  ])
@@ -43023,11 +43089,65 @@ function bodyStart(doc2) {
43023
43089
  const lineBreak = doc2.indexOf("\n", front.to);
43024
43090
  return lineBreak === -1 ? doc2.length : lineBreak + 1;
43025
43091
  }
43092
+ function inCodeBlock(state, pos) {
43093
+ const line = state.doc.lineAt(pos);
43094
+ let code = false;
43095
+ state.field(livePreviewField).between(line.from, line.from, (_from, _to, decoration) => {
43096
+ if (decoration.spec.class?.split(" ").includes("cm-md-codeblock")) code = true;
43097
+ });
43098
+ return code;
43099
+ }
43100
+ const setDropInCode = StateEffect.define();
43101
+ const dropInCode = StateField.define({
43102
+ create: () => false,
43103
+ update: (value, tr) => tr.effects.reduce((next, effect) => effect.is(setDropInCode) ? effect.value : next, value)
43104
+ });
43105
+ function setDrop(view, code) {
43106
+ if (view.state.field(dropInCode) !== code) view.dispatch({ effects: setDropInCode.of(code) });
43107
+ }
43108
+ const cursorColors = [
43109
+ dropInCode,
43110
+ EditorView.domEventObservers({
43111
+ dragover(event, view) {
43112
+ const pos = view.posAtCoords({ x: event.clientX, y: event.clientY });
43113
+ setDrop(view, pos !== null && inCodeBlock(view.state, pos));
43114
+ },
43115
+ // 判据与 CodeMirror 的 dropCursor 一致:真的离开了编辑区才算
43116
+ dragleave(event, view) {
43117
+ if (event.target === view.contentDOM || !view.contentDOM.contains(event.relatedTarget)) setDrop(view, false);
43118
+ },
43119
+ dragend: (_event, view) => setDrop(view, false),
43120
+ drop: (_event, view) => setDrop(view, false)
43121
+ }),
43122
+ EditorView.editorAttributes.compute(["selection", livePreviewField, dropInCode], (state) => {
43123
+ const classes = [
43124
+ inCodeBlock(state, state.selection.main.head) ? "cm-cursor-in-code" : "",
43125
+ state.field(dropInCode) ? "cm-drop-in-code" : ""
43126
+ ].filter(Boolean);
43127
+ return classes.length ? { class: classes.join(" ") } : {};
43128
+ })
43129
+ ];
43026
43130
  let handle$1 = null;
43027
43131
  function getEditorHandle() {
43028
43132
  return handle$1;
43029
43133
  }
43030
43134
  const livePreviewCompartment = new Compartment();
43135
+ const taskMarkerAtomicRanges = EditorView.atomicRanges.of((view) => {
43136
+ const doc2 = view.state.doc;
43137
+ const ranges = [];
43138
+ syntaxTree(view.state).iterate({
43139
+ enter: (node) => {
43140
+ if (node.name !== "TaskMarker") return;
43141
+ const line = doc2.lineAt(node.from);
43142
+ const prefix = doc2.sliceString(line.from, node.from);
43143
+ const from = /^[ \t]*(?:[-*+]|\d+[.)])[ \t]+$/.test(prefix) ? line.from : node.from;
43144
+ const trailing = doc2.sliceString(node.to, Math.min(node.to + 1, line.to)) === " " ? node.to + 1 : node.to;
43145
+ ranges.push({ from, to: trailing });
43146
+ }
43147
+ });
43148
+ return RangeSet.of(ranges.map((r) => ATOMIC_MARK.range(r.from, r.to)), true);
43149
+ });
43150
+ const ATOMIC_MARK = Decoration.replace({});
43031
43151
  function isSourceMode(state) {
43032
43152
  return state.field(livePreviewField, false) === void 0;
43033
43153
  }
@@ -43037,6 +43157,7 @@ function editorExtensions(sourceMode, editable2, onChange) {
43037
43157
  stateExtensions(),
43038
43158
  // 以下是 view 层:选区绘制、拖放光标、特殊字符、主题
43039
43159
  drawSelection(),
43160
+ cursorColors,
43040
43161
  // 自动换行。CodeMirror 默认**不换行**,长行会横向滚动;markdown 正文必须换行。
43041
43162
  EditorView.lineWrapping,
43042
43163
  dropCursor(),
@@ -43066,6 +43187,10 @@ function editorExtensions(sourceMode, editable2, onChange) {
43066
43187
  // 检索高亮。面板靠 effect 改它,而 effect 得有 StateField 接住;
43067
43188
  // 不装这一条,检索面板会以为高亮画上了,实际什么也没发生。
43068
43189
  searchHighlightField,
43190
+ // 任务项的复选框是一个 replace widget,但没声明成原子区间时,光标能停在
43191
+ // `[ ]` 两个方框之间那一格里:左右键要一格一格挪过去,停在里面打字又把
43192
+ // `- [ ]` 敲成 `- [x]` 之类的残骸(#164)。声明成原子区间后,光标一次跨过它。
43193
+ taskMarkerAtomicRanges,
43069
43194
  editableCompartment.of(EditorView.editable.of(editable2)),
43070
43195
  // 文档变化的唯一出口:把新文本交给外壳
43071
43196
  EditorView.updateListener.of((update) => {
@@ -43149,7 +43274,7 @@ function escapeText(value) {
43149
43274
  function escapeAttribute(value) {
43150
43275
  return escapeText(value).replace(/"/g, "&quot;");
43151
43276
  }
43152
- function lineKind(line) {
43277
+ function lineKind(line, includeList = true) {
43153
43278
  const classes = line.classList;
43154
43279
  for (let level = 1; level <= 6; level++) {
43155
43280
  if (classes.contains(`cm-md-atxheading${level}`)) return `h${level}`;
@@ -43161,7 +43286,7 @@ function lineKind(line) {
43161
43286
  if (classes.contains("cm-md-hr")) return "hr";
43162
43287
  if (line.querySelector(".cm-md-table-widget")) return "table";
43163
43288
  if (classes.contains("cm-md-frontmatter")) return "empty";
43164
- for (let depth = 0; depth <= 6; depth++) {
43289
+ if (includeList) for (let depth = 0; depth <= 6; depth++) {
43165
43290
  if (classes.contains(`cm-md-li-${depth}`)) return "li";
43166
43291
  }
43167
43292
  if ((line.textContent ?? "").trim() === "" && line.querySelector("img") === null) return "empty";
@@ -43243,6 +43368,34 @@ function renderList(lines) {
43243
43368
  while (open2.length > 0) html2 += `</li></${tagOf(open2.pop().ordered)}>`;
43244
43369
  return html2;
43245
43370
  }
43371
+ function listContext(node) {
43372
+ if (!(node instanceof HTMLElement)) return null;
43373
+ const line = node.classList.contains("cm-line") ? node : node.querySelector(".cm-line");
43374
+ if (!line?.classList.contains("cm-md-li") || !line.dataset.listPath) return null;
43375
+ return { path: JSON.parse(line.dataset.listPath), quoted: line.dataset.listQuoted === "true" };
43376
+ }
43377
+ function renderOwnedList(nodes, depth) {
43378
+ let html2 = "", index2 = 0;
43379
+ while (index2 < nodes.length) {
43380
+ const first = listContext(nodes[index2]).path[depth];
43381
+ const tag = first.start === void 0 ? "ul" : "ol";
43382
+ html2 += first.start !== void 0 && first.start !== 1 ? `<ol start="${first.start}">` : `<${tag}>`;
43383
+ while (index2 < nodes.length && listContext(nodes[index2]).path[depth].list === first.list) {
43384
+ const item = listContext(nodes[index2]).path[depth].item;
43385
+ const group = [];
43386
+ while (index2 < nodes.length) {
43387
+ const path2 = listContext(nodes[index2]).path[depth];
43388
+ if (path2.list !== first.list || path2.item !== item) break;
43389
+ group.push(nodes[index2++]);
43390
+ }
43391
+ const body = blocksHTML(group, depth);
43392
+ const singleParagraph = body.startsWith("<p>") && body.indexOf("</p>") === body.length - 4;
43393
+ html2 += `<li>${singleParagraph ? body.slice(3, -4).trimStart() : body}</li>`;
43394
+ }
43395
+ html2 += `</${tag}>`;
43396
+ }
43397
+ return html2;
43398
+ }
43246
43399
  function isCodeFenceStart(line) {
43247
43400
  return line.classList.contains("cm-md-codeblock-first") || /^(`{3,}|~{3,})/.test((line.textContent ?? "").trimStart());
43248
43401
  }
@@ -43260,7 +43413,7 @@ function renderCode(lines) {
43260
43413
  const code = body.map((line) => line.textContent ?? "").join("\n");
43261
43414
  return `<pre><code>${escapeText(code)}</code></pre>`;
43262
43415
  }
43263
- function renderGroup(kind, lines) {
43416
+ function renderGroup(kind, lines, ownerDepth = -1) {
43264
43417
  if (kind === "code") return renderCode(lines);
43265
43418
  if (kind === "mermaid") {
43266
43419
  const widget = lines[0].querySelector(".cm-md-mermaid");
@@ -43287,16 +43440,53 @@ function renderGroup(kind, lines) {
43287
43440
  const level = kind.slice(1);
43288
43441
  return `<h${level}>${lineHTML(lines[0])}</h${level}>`;
43289
43442
  }
43290
- return `<p>${lineHTML(lines[0])}</p>`;
43443
+ const separator = ownerDepth >= 0 && lines.length > 1 ? "<br>" : "\n";
43444
+ return `<p>${lines.map((line) => {
43445
+ const content2 = lineHTML(line);
43446
+ return line.dataset.listPath ? content2.replace(/^[ \t]+/, "") : content2;
43447
+ }).join(separator)}</p>`;
43291
43448
  }
43292
43449
  function mergeable(kind) {
43293
43450
  return kind === "code" || kind === "li" || kind === "quote";
43294
43451
  }
43295
- function blocksHTML(nodes) {
43452
+ function blocksHTML(nodes, ownerDepth = -1) {
43296
43453
  let html2 = "";
43297
43454
  let index2 = 0;
43455
+ let quoteEnd = 0;
43298
43456
  while (index2 < nodes.length) {
43299
43457
  const node = nodes[index2];
43458
+ const context = listContext(node);
43459
+ if (index2 >= quoteEnd && node instanceof HTMLElement && node.classList.contains("cm-md-blockquote") && (!context || context.quoted || context.path.length <= ownerDepth + 1)) {
43460
+ const group2 = [node];
43461
+ let next = index2 + 1;
43462
+ while (next < nodes.length) {
43463
+ const candidate = nodes[next];
43464
+ if (!(candidate instanceof HTMLElement) || !candidate.classList.contains("cm-md-blockquote")) break;
43465
+ group2.push(candidate);
43466
+ next += 1;
43467
+ }
43468
+ quoteEnd = next;
43469
+ if (group2.some((line) => listContext(line))) {
43470
+ const inner2 = group2.map((line) => {
43471
+ const clone = line.cloneNode(true);
43472
+ clone.classList.remove("cm-md-blockquote");
43473
+ return clone;
43474
+ });
43475
+ html2 += `<blockquote>${blocksHTML(inner2, ownerDepth)}</blockquote>`;
43476
+ index2 = next;
43477
+ continue;
43478
+ }
43479
+ }
43480
+ if (context && context.path.length > ownerDepth + 1) {
43481
+ const group2 = [node];
43482
+ while (++index2 < nodes.length) {
43483
+ if ((listContext(nodes[index2])?.path.length ?? 0) <= ownerDepth + 1) break;
43484
+ group2.push(nodes[index2]);
43485
+ }
43486
+ const depth = ownerDepth < 0 ? group2.reduce((min, part) => Math.min(min, listContext(part).path.length - 1), context.path.length - 1) : ownerDepth + 1;
43487
+ html2 += renderOwnedList(group2, depth);
43488
+ continue;
43489
+ }
43300
43490
  if (!isLineElement(node)) {
43301
43491
  const inline = [];
43302
43492
  while (index2 < nodes.length && !isLineElement(nodes[index2])) {
@@ -43307,13 +43497,14 @@ function blocksHTML(nodes) {
43307
43497
  if (merged.trim() !== "") html2 += `<p>${merged}</p>`;
43308
43498
  continue;
43309
43499
  }
43310
- const kind = lineKind(node);
43500
+ const kind = lineKind(node, !context);
43311
43501
  const group = [node];
43312
- if (mergeable(kind)) {
43502
+ const paragraph = node.dataset.listParagraph;
43503
+ if (mergeable(kind) || kind === "p" && paragraph) {
43313
43504
  let next = index2 + 1;
43314
43505
  while (next < nodes.length) {
43315
43506
  const candidate = nodes[next];
43316
- if (!(candidate instanceof HTMLElement) || lineKind(candidate) !== kind) break;
43507
+ if (!(candidate instanceof HTMLElement) || lineKind(candidate, !listContext(candidate)) !== kind || kind === "p" && candidate.dataset.listParagraph !== paragraph) break;
43317
43508
  group.push(candidate);
43318
43509
  next += 1;
43319
43510
  }
@@ -43321,7 +43512,7 @@ function blocksHTML(nodes) {
43321
43512
  } else {
43322
43513
  index2 += 1;
43323
43514
  }
43324
- html2 += renderGroup(kind, group);
43515
+ html2 += renderGroup(kind, group, ownerDepth);
43325
43516
  }
43326
43517
  return html2;
43327
43518
  }
@@ -43873,12 +44064,12 @@ function setupFootnotePreview(root) {
43873
44064
  }
43874
44065
  const TASK_RE = /^([ \t]*(?:[-*+]|\d+[.)])[ \t]+\[)([ xX])(\])/;
43875
44066
  function sourceFromTaskClick(view, e) {
44067
+ if (!(e.target instanceof HTMLElement)) return null;
44068
+ if (!e.target.closest(".cm-md-task")) return null;
43876
44069
  const pos = view.posAtCoords({ x: e.clientX, y: e.clientY });
43877
44070
  if (pos === null) return null;
43878
44071
  const line = view.state.doc.lineAt(pos);
43879
44072
  if (!TASK_RE.test(line.text)) return null;
43880
- const rect = e.target.getBoundingClientRect();
43881
- if (e.clientX - rect.left > 24) return null;
43882
44073
  return line.from;
43883
44074
  }
43884
44075
  function toggleTaskAt(view, pos) {
@@ -45639,13 +45830,13 @@ async function capModule(name2) {
45639
45830
  try {
45640
45831
  switch (name2) {
45641
45832
  case "@capacitor/filesystem":
45642
- return await __vitePreload(() => import("./index-VDcE-MZS.js"), true ? [] : void 0, import.meta.url);
45833
+ return await __vitePreload(() => import("./index-k6oLH39v.js"), true ? [] : void 0, import.meta.url);
45643
45834
  case "@capacitor/share":
45644
- return await __vitePreload(() => import("./index-7XM2a0Z_.js"), true ? [] : void 0, import.meta.url);
45835
+ return await __vitePreload(() => import("./index-Dl8YooLt.js"), true ? [] : void 0, import.meta.url);
45645
45836
  case "@capacitor/app":
45646
- return await __vitePreload(() => import("./index-CcV4JcXV.js"), true ? [] : void 0, import.meta.url);
45837
+ return await __vitePreload(() => import("./index-Dg6oPZ5w.js"), true ? [] : void 0, import.meta.url);
45647
45838
  case "@capawesome/capacitor-file-picker":
45648
- return await __vitePreload(() => import("./index-D3xwJ3eb.js"), true ? [] : void 0, import.meta.url);
45839
+ return await __vitePreload(() => import("./index-eBhE19Gh.js"), true ? [] : void 0, import.meta.url);
45649
45840
  default:
45650
45841
  return null;
45651
45842
  }
@@ -46812,10 +47003,8 @@ function scrollRatio(el) {
46812
47003
  return range > 0 ? el.scrollTop / range : 0;
46813
47004
  }
46814
47005
  function restoreScrollRatio(el, ratio) {
46815
- requestAnimationFrame(() => {
46816
- const range = el.scrollHeight - el.clientHeight;
46817
- el.scrollTop = Math.max(0, Math.min(range, range * ratio));
46818
- });
47006
+ const range = el.scrollHeight - el.clientHeight;
47007
+ el.scrollTop = Math.max(0, Math.min(range, range * ratio));
46819
47008
  }
46820
47009
  function toggleSourceMode() {
46821
47010
  const ratio = scrollRatio(editorScroller());
@@ -47347,6 +47536,11 @@ async function init() {
47347
47536
  api.onSearch(() => searchPanel.show());
47348
47537
  document.addEventListener("keydown", (event) => {
47349
47538
  if (!(event.metaKey || event.ctrlKey) || event.shiftKey || event.altKey) return;
47539
+ if (event.key === "/") {
47540
+ event.preventDefault();
47541
+ toggleSourceMode();
47542
+ return;
47543
+ }
47350
47544
  if (event.key.toLowerCase() !== "f") return;
47351
47545
  event.preventDefault();
47352
47546
  searchPanel.show();