@bytechain.cn/colamd 1.5.1-beta.2 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +159 -162
  2. package/README.md +79 -3
  3. package/README_CN.md +78 -3
  4. package/dist/main/index.js +14 -5
  5. package/dist/preload/index.js +1 -1
  6. package/dist/renderer/assets/{arc-CPdeInCG.js → arc-_lugyDzx.js} +1 -1
  7. package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-BAbnaR9G.js → architectureDiagram-3BPJPVTR-DDfP-F9D.js} +2 -2
  8. package/dist/renderer/assets/{blockDiagram-GPEHLZMM-CYSWjnJg.js → blockDiagram-GPEHLZMM-DOETUKma.js} +4 -4
  9. package/dist/renderer/assets/{c4Diagram-AAUBKEIU-Rb1tstnr.js → c4Diagram-AAUBKEIU-kAmLfVtk.js} +2 -2
  10. package/dist/renderer/assets/{channel-DpG2A6fE.js → channel-CD4vJFwr.js} +1 -1
  11. package/dist/renderer/assets/{chunk-2J33WTMH-DFc0Jxy_.js → chunk-2J33WTMH-DkVrgw4l.js} +1 -1
  12. package/dist/renderer/assets/{chunk-4BX2VUAB-BhRxDTNn.js → chunk-4BX2VUAB-JTZ-VKNX.js} +1 -1
  13. package/dist/renderer/assets/{chunk-55IACEB6-DEgMVBk8.js → chunk-55IACEB6-Di_O5box.js} +1 -1
  14. package/dist/renderer/assets/{chunk-727SXJPM-bjBIfiz8.js → chunk-727SXJPM-BgKvwR8w.js} +5 -5
  15. package/dist/renderer/assets/{chunk-AQP2D5EJ-DwQMzTzD.js → chunk-AQP2D5EJ-DonSXCCQ.js} +3 -3
  16. package/dist/renderer/assets/{chunk-FMBD7UC4-CkphwJzs.js → chunk-FMBD7UC4-CsV8Lmy6.js} +1 -1
  17. package/dist/renderer/assets/{chunk-ND2GUHAM-oU09z4y4.js → chunk-ND2GUHAM-C_-_dlq7.js} +1 -1
  18. package/dist/renderer/assets/{chunk-QZHKN3VN-rCbVuPBn.js → chunk-QZHKN3VN-aCmcDsfu.js} +1 -1
  19. package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-DGS2faoM.js → classDiagram-4FO5ZUOK-nuHQLjzM.js} +6 -6
  20. package/dist/renderer/assets/{classDiagram-4FO5ZUOK-DGS2faoM.js → classDiagram-v2-Q7XG4LA2-nuHQLjzM.js} +6 -6
  21. package/dist/renderer/assets/{cose-bilkent-S5V4N54A-iqY6-EwA.js → cose-bilkent-S5V4N54A-Di1_SXt9.js} +1 -1
  22. package/dist/renderer/assets/{dagre-BM42HDAG-5t3X5sDa.js → dagre-BM42HDAG-CqOUIYsL.js} +3 -3
  23. package/dist/renderer/assets/{diagram-2AECGRRQ-DzHiYDPh.js → diagram-2AECGRRQ-F-fP19TC.js} +2 -2
  24. package/dist/renderer/assets/{diagram-5GNKFQAL-BiNv6Keq.js → diagram-5GNKFQAL-BD5XZc8G.js} +3 -3
  25. package/dist/renderer/assets/{diagram-KO2AKTUF-ClzeDG6f.js → diagram-KO2AKTUF-Qa3ZxA67.js} +2 -2
  26. package/dist/renderer/assets/{diagram-LMA3HP47-CGkw7wII.js → diagram-LMA3HP47-DqDnw2RA.js} +2 -2
  27. package/dist/renderer/assets/{diagram-OG6HWLK6-Dl-Hyk1_.js → diagram-OG6HWLK6-BH4Elzby.js} +3 -3
  28. package/dist/renderer/assets/{erDiagram-TEJ5UH35-BxUN79Qb.js → erDiagram-TEJ5UH35-CaKZCewa.js} +4 -4
  29. package/dist/renderer/assets/{flowDiagram-I6XJVG4X-CzFk-KNI.js → flowDiagram-I6XJVG4X-C8znUgyL.js} +6 -6
  30. package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-C2xl6Igx.js → ganttDiagram-6RSMTGT7-DnRvbMnU.js} +2 -2
  31. package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-_fn7XCa7.js → gitGraphDiagram-PVQCEYII-CZuRZzk4.js} +3 -3
  32. package/dist/renderer/assets/{graph-CDoHYrHm.js → graph-CYiEKt0j.js} +1 -1
  33. package/dist/renderer/assets/{index-DAlXyxzt.js → index-BX6JHKv6.js} +328 -143
  34. package/dist/renderer/assets/{index-CeFpoCKV.css → index-CcwAgVRi.css} +5 -6
  35. package/dist/renderer/assets/{infoDiagram-5YYISTIA-DL6XIxLz.js → infoDiagram-5YYISTIA-BlBUdqMb.js} +1 -1
  36. package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-BUZLjRo-.js → ishikawaDiagram-YF4QCWOH-TeVytCrP.js} +1 -1
  37. package/dist/renderer/assets/{journeyDiagram-JHISSGLW-C4rH_mQM.js → journeyDiagram-JHISSGLW-BLZa3jnX.js} +4 -4
  38. package/dist/renderer/assets/{kanban-definition-UN3LZRKU-DRbrBcWV.js → kanban-definition-UN3LZRKU-foVxWrJn.js} +2 -2
  39. package/dist/renderer/assets/{layout-DZl4n4qu.js → layout-DOAlFUVb.js} +2 -2
  40. package/dist/renderer/assets/{linear-B0Krxg21.js → linear-BMBn6kVq.js} +1 -1
  41. package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-DdmPsWrn.js → mindmap-definition-RKZ34NQL-5pGeNCcp.js} +3 -3
  42. package/dist/renderer/assets/{pieDiagram-4H26LBE5-BPZLqwG0.js → pieDiagram-4H26LBE5-N9aAUxfr.js} +3 -3
  43. package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-Dr-oWRk9.js → quadrantDiagram-W4KKPZXB-BPxbtjga.js} +2 -2
  44. package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-B6QZd0lo.js → requirementDiagram-4Y6WPE33-CK1LrJyG.js} +3 -3
  45. package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-Cyl9ojEt.js → sankeyDiagram-5OEKKPKP-BNj7Sqii.js} +1 -1
  46. package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-D48Yr9T6.js → sequenceDiagram-3UESZ5HK-B-r7lNhI.js} +3 -3
  47. package/dist/renderer/assets/{stateDiagram-AJRCARHV-qyb8ETsa.js → stateDiagram-AJRCARHV-wrWE0MRa.js} +6 -6
  48. package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js → stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js} +4 -4
  49. package/dist/renderer/assets/{timeline-definition-PNZ67QCA-C-KQxTi1.js → timeline-definition-PNZ67QCA-BkeMGH4J.js} +2 -2
  50. package/dist/renderer/assets/{vennDiagram-CIIHVFJN-BdaZlnH-.js → vennDiagram-CIIHVFJN-BTxVzto3.js} +1 -1
  51. package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-B2hBE-EE.js → wardleyDiagram-YWT4CUSO-D2r5dVGW.js} +2 -2
  52. package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-CSvswDTY.js → xychartDiagram-2RQKCTM6-BHQdINVc.js} +2 -2
  53. package/dist/renderer/index.html +2 -2
  54. package/docs/RELEASE_NOTES_v1.5.1.md +382 -0
  55. package/docs/academic-demo.md +2 -1
  56. package/docs/theme-paradigm.md +141 -2
  57. package/package.json +1 -1
  58. package/src/main/index.ts +19 -5
  59. package/src/preload/index.ts +2 -2
  60. package/src/renderer/editor/editor.ts +40 -40
  61. package/src/renderer/editor/plugins/index.ts +18 -0
  62. package/src/renderer/editor/plugins/math-plugin.ts +8 -0
  63. package/src/renderer/editor/plugins/mermaid-plugin.ts +10 -0
  64. package/src/renderer/editor/plugins/themes/theme-manager.ts +41 -0
  65. package/src/renderer/main.ts +180 -83
  66. package/src/renderer/mobile.css +5 -6
  67. package/themes/README.md +18 -1
  68. package/themes/academic-paper-pt.css +1321 -0
  69. package/themes/academic-paper.css +192 -97
  70. package/tsconfig.renderer.tsbuildinfo +1 -1
  71. package/bytechain.cn-colamd-1.5.1-beta.2.tgz +0 -0
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-BM42HDAG-5t3X5sDa.js","./graph-CDoHYrHm.js","./layout-DZl4n4qu.js","./preload-helper-tXtZnHb0.js","./cose-bilkent-S5V4N54A-iqY6-EwA.js","./cytoscape.esm-CpHeHM5e.js","./c4Diagram-AAUBKEIU-Rb1tstnr.js","./chunk-ND2GUHAM-oU09z4y4.js","./flowDiagram-I6XJVG4X-CzFk-KNI.js","./chunk-FMBD7UC4-CkphwJzs.js","./chunk-55IACEB6-DEgMVBk8.js","./chunk-2J33WTMH-DFc0Jxy_.js","./channel-DpG2A6fE.js","./erDiagram-TEJ5UH35-BxUN79Qb.js","./gitGraphDiagram-PVQCEYII-_fn7XCa7.js","./chunk-4BX2VUAB-BhRxDTNn.js","./chunk-QZHKN3VN-rCbVuPBn.js","./wardley-L42UT6IY-b-_GPpqL.js","./ganttDiagram-6RSMTGT7-C2xl6Igx.js","./linear-B0Krxg21.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-5YYISTIA-DL6XIxLz.js","./pieDiagram-4H26LBE5-BPZLqwG0.js","./arc-CPdeInCG.js","./ordinal-DSZU4PqD.js","./quadrantDiagram-W4KKPZXB-Dr-oWRk9.js","./xychartDiagram-2RQKCTM6-CSvswDTY.js","./requirementDiagram-4Y6WPE33-B6QZd0lo.js","./sequenceDiagram-3UESZ5HK-D48Yr9T6.js","./classDiagram-4FO5ZUOK-DGS2faoM.js","./chunk-727SXJPM-bjBIfiz8.js","./classDiagram-v2-Q7XG4LA2-DGS2faoM.js","./stateDiagram-AJRCARHV-qyb8ETsa.js","./chunk-AQP2D5EJ-DwQMzTzD.js","./stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js","./journeyDiagram-JHISSGLW-C4rH_mQM.js","./timeline-definition-PNZ67QCA-C-KQxTi1.js","./mindmap-definition-RKZ34NQL-DdmPsWrn.js","./kanban-definition-UN3LZRKU-DRbrBcWV.js","./sankeyDiagram-5OEKKPKP-Cyl9ojEt.js","./diagram-LMA3HP47-CGkw7wII.js","./diagram-2AECGRRQ-DzHiYDPh.js","./blockDiagram-GPEHLZMM-CYSWjnJg.js","./diagram-5GNKFQAL-BiNv6Keq.js","./architectureDiagram-3BPJPVTR-BAbnaR9G.js","./diagram-KO2AKTUF-ClzeDG6f.js","./ishikawaDiagram-YF4QCWOH-BUZLjRo-.js","./vennDiagram-CIIHVFJN-BdaZlnH-.js","./diagram-OG6HWLK6-Dl-Hyk1_.js","./wardleyDiagram-YWT4CUSO-B2hBE-EE.js","./index-CBcVpA3d.js","./index-B4uDgADr.js","./index-Y89U1ptl.js","./index-D4CPFkph.js","./index-DxOzbfR-.js","./index-CGj1spkU.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-BM42HDAG-CqOUIYsL.js","./graph-CYiEKt0j.js","./layout-DOAlFUVb.js","./preload-helper-tXtZnHb0.js","./cose-bilkent-S5V4N54A-Di1_SXt9.js","./cytoscape.esm-CpHeHM5e.js","./c4Diagram-AAUBKEIU-kAmLfVtk.js","./chunk-ND2GUHAM-C_-_dlq7.js","./flowDiagram-I6XJVG4X-C8znUgyL.js","./chunk-FMBD7UC4-CsV8Lmy6.js","./chunk-55IACEB6-Di_O5box.js","./chunk-2J33WTMH-DkVrgw4l.js","./channel-CD4vJFwr.js","./erDiagram-TEJ5UH35-CaKZCewa.js","./gitGraphDiagram-PVQCEYII-CZuRZzk4.js","./chunk-4BX2VUAB-JTZ-VKNX.js","./chunk-QZHKN3VN-aCmcDsfu.js","./wardley-L42UT6IY-b-_GPpqL.js","./ganttDiagram-6RSMTGT7-DnRvbMnU.js","./linear-BMBn6kVq.js","./init-ZxktEp_H.js","./defaultLocale-B2RvLBDe.js","./infoDiagram-5YYISTIA-BlBUdqMb.js","./pieDiagram-4H26LBE5-N9aAUxfr.js","./arc-_lugyDzx.js","./ordinal-DSZU4PqD.js","./quadrantDiagram-W4KKPZXB-BPxbtjga.js","./xychartDiagram-2RQKCTM6-BHQdINVc.js","./requirementDiagram-4Y6WPE33-CK1LrJyG.js","./sequenceDiagram-3UESZ5HK-B-r7lNhI.js","./classDiagram-4FO5ZUOK-nuHQLjzM.js","./chunk-727SXJPM-BgKvwR8w.js","./classDiagram-v2-Q7XG4LA2-nuHQLjzM.js","./stateDiagram-AJRCARHV-wrWE0MRa.js","./chunk-AQP2D5EJ-DonSXCCQ.js","./stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js","./journeyDiagram-JHISSGLW-BLZa3jnX.js","./timeline-definition-PNZ67QCA-BkeMGH4J.js","./mindmap-definition-RKZ34NQL-5pGeNCcp.js","./kanban-definition-UN3LZRKU-foVxWrJn.js","./sankeyDiagram-5OEKKPKP-BNj7Sqii.js","./diagram-LMA3HP47-DqDnw2RA.js","./diagram-2AECGRRQ-F-fP19TC.js","./blockDiagram-GPEHLZMM-DOETUKma.js","./diagram-5GNKFQAL-BD5XZc8G.js","./architectureDiagram-3BPJPVTR-DDfP-F9D.js","./diagram-KO2AKTUF-Qa3ZxA67.js","./ishikawaDiagram-YF4QCWOH-TeVytCrP.js","./vennDiagram-CIIHVFJN-BTxVzto3.js","./diagram-OG6HWLK6-BH4Elzby.js","./wardleyDiagram-YWT4CUSO-D2r5dVGW.js","./index-CBcVpA3d.js","./index-B4uDgADr.js","./index-Y89U1ptl.js","./index-D4CPFkph.js","./index-DxOzbfR-.js","./index-CGj1spkU.js"])))=>i.map(i=>d[i]);
2
2
  import { _ as __vitePreload } from "./preload-helper-tXtZnHb0.js";
3
3
  var ErrorCode = /* @__PURE__ */ (function(ErrorCode2) {
4
4
  ErrorCode2["docTypeError"] = "docTypeError";
@@ -21875,6 +21875,9 @@ function togglePlugin(id33, enabled) {
21875
21875
  const mod = modules.find((m2) => m2.info.id === id33);
21876
21876
  if (mod) mod.info.enabled = enabled;
21877
21877
  }
21878
+ function getContextMenuSelector() {
21879
+ return getAllPlugins().filter((p2) => p2.exportCapabilities && p2.exportCapabilities.length > 0).flatMap((p2) => (p2.nodeTypes || []).map((nt2) => "." + nt2.replace(/_/g, "-"))).join(", ");
21880
+ }
21878
21881
  class ParseError extends Error {
21879
21882
  // The underlying error message without any context added.
21880
21883
  constructor(message, token2) {
@@ -37051,7 +37054,15 @@ const mathPlugin = {
37051
37054
  name: "Math Rendering",
37052
37055
  enabled: true,
37053
37056
  remarkPlugin: { plugin: remarkMath, options: void 0 },
37054
- nodeTypes: ["math_inline", "math_block"]
37057
+ nodeTypes: ["math_inline", "math_block"],
37058
+ clipboardStyles: {
37059
+ ".math-inline": "display:inline;padding:2px 4px;border-radius:3px;background:rgba(175,184,193,0.2);",
37060
+ ".math-block": "display:block;padding:16px;margin:1em 0;border-radius:6px;background:#f6f8fa;text-align:center;overflow-x:auto;"
37061
+ },
37062
+ exportStyles: `.math-inline{display:inline;padding:2px 4px;border-radius:3px;background:var(--code-bg)}
37063
+ .math-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:var(--code-block-bg);text-align:center;overflow-x:auto}`,
37064
+ rawSelectors: [".math-inline-raw", ".math-block-raw"],
37065
+ bgCaptureSelectors: [".math-inline", ".math-block"]
37055
37066
  // TODO: KaTeX CSS 在 SVG foreignObject 中丢失,导致导出 PNG 二次内容/空白
37056
37067
  // 后续需解决样式注入问题后重新启用
37057
37068
  // exportCapabilities: [
@@ -60938,12 +60949,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
60938
60949
  registerLayoutLoaders([
60939
60950
  {
60940
60951
  name: "dagre",
60941
- loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-BM42HDAG-5t3X5sDa.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0, import.meta.url), "loader")
60952
+ loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-BM42HDAG-CqOUIYsL.js"), true ? __vite__mapDeps([0,1,2,3]) : void 0, import.meta.url), "loader")
60942
60953
  },
60943
60954
  ...[
60944
60955
  {
60945
60956
  name: "cose-bilkent",
60946
- loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-iqY6-EwA.js"), true ? __vite__mapDeps([4,5,3]) : void 0, import.meta.url), "loader")
60957
+ loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-Di1_SXt9.js"), true ? __vite__mapDeps([4,5,3]) : void 0, import.meta.url), "loader")
60947
60958
  }
60948
60959
  ]
60949
60960
  ]);
@@ -61353,7 +61364,7 @@ var detector = /* @__PURE__ */ __name((txt) => {
61353
61364
  }, "detector");
61354
61365
  var loader = /* @__PURE__ */ __name(async () => {
61355
61366
  const { diagram: diagram2 } = await __vitePreload(async () => {
61356
- const { diagram: diagram22 } = await import("./c4Diagram-AAUBKEIU-Rb1tstnr.js");
61367
+ const { diagram: diagram22 } = await import("./c4Diagram-AAUBKEIU-kAmLfVtk.js");
61357
61368
  return { diagram: diagram22 };
61358
61369
  }, true ? __vite__mapDeps([6,7,3]) : void 0, import.meta.url);
61359
61370
  return { id: id$2, diagram: diagram2 };
@@ -61373,7 +61384,7 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
61373
61384
  }, "detector");
61374
61385
  var loader2 = /* @__PURE__ */ __name(async () => {
61375
61386
  const { diagram: diagram2 } = await __vitePreload(async () => {
61376
- const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-CzFk-KNI.js");
61387
+ const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
61377
61388
  return { diagram: diagram22 };
61378
61389
  }, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
61379
61390
  return { id: id2, diagram: diagram2 };
@@ -61399,7 +61410,7 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
61399
61410
  }, "detector");
61400
61411
  var loader3 = /* @__PURE__ */ __name(async () => {
61401
61412
  const { diagram: diagram2 } = await __vitePreload(async () => {
61402
- const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-CzFk-KNI.js");
61413
+ const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
61403
61414
  return { diagram: diagram22 };
61404
61415
  }, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
61405
61416
  return { id: id3, diagram: diagram2 };
@@ -61416,7 +61427,7 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
61416
61427
  }, "detector");
61417
61428
  var loader4 = /* @__PURE__ */ __name(async () => {
61418
61429
  const { diagram: diagram2 } = await __vitePreload(async () => {
61419
- const { diagram: diagram22 } = await import("./erDiagram-TEJ5UH35-BxUN79Qb.js");
61430
+ const { diagram: diagram22 } = await import("./erDiagram-TEJ5UH35-CaKZCewa.js");
61420
61431
  return { diagram: diagram22 };
61421
61432
  }, true ? __vite__mapDeps([13,10,11,12,3]) : void 0, import.meta.url);
61422
61433
  return { id: id4, diagram: diagram2 };
@@ -61433,7 +61444,7 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
61433
61444
  }, "detector");
61434
61445
  var loader5 = /* @__PURE__ */ __name(async () => {
61435
61446
  const { diagram: diagram2 } = await __vitePreload(async () => {
61436
- const { diagram: diagram22 } = await import("./gitGraphDiagram-PVQCEYII-_fn7XCa7.js");
61447
+ const { diagram: diagram22 } = await import("./gitGraphDiagram-PVQCEYII-CZuRZzk4.js");
61437
61448
  return { diagram: diagram22 };
61438
61449
  }, true ? __vite__mapDeps([14,15,16,17,3]) : void 0, import.meta.url);
61439
61450
  return { id: id5, diagram: diagram2 };
@@ -61450,7 +61461,7 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
61450
61461
  }, "detector");
61451
61462
  var loader6 = /* @__PURE__ */ __name(async () => {
61452
61463
  const { diagram: diagram2 } = await __vitePreload(async () => {
61453
- const { diagram: diagram22 } = await import("./ganttDiagram-6RSMTGT7-C2xl6Igx.js");
61464
+ const { diagram: diagram22 } = await import("./ganttDiagram-6RSMTGT7-DnRvbMnU.js");
61454
61465
  return { diagram: diagram22 };
61455
61466
  }, true ? __vite__mapDeps([18,19,20,21,3]) : void 0, import.meta.url);
61456
61467
  return { id: id6, diagram: diagram2 };
@@ -61467,7 +61478,7 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
61467
61478
  }, "detector");
61468
61479
  var loader7 = /* @__PURE__ */ __name(async () => {
61469
61480
  const { diagram: diagram2 } = await __vitePreload(async () => {
61470
- const { diagram: diagram22 } = await import("./infoDiagram-5YYISTIA-DL6XIxLz.js");
61481
+ const { diagram: diagram22 } = await import("./infoDiagram-5YYISTIA-BlBUdqMb.js");
61471
61482
  return { diagram: diagram22 };
61472
61483
  }, true ? __vite__mapDeps([22,17,3]) : void 0, import.meta.url);
61473
61484
  return { id: id7, diagram: diagram2 };
@@ -61483,7 +61494,7 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
61483
61494
  }, "detector");
61484
61495
  var loader8 = /* @__PURE__ */ __name(async () => {
61485
61496
  const { diagram: diagram2 } = await __vitePreload(async () => {
61486
- const { diagram: diagram22 } = await import("./pieDiagram-4H26LBE5-BPZLqwG0.js");
61497
+ const { diagram: diagram22 } = await import("./pieDiagram-4H26LBE5-N9aAUxfr.js");
61487
61498
  return { diagram: diagram22 };
61488
61499
  }, true ? __vite__mapDeps([23,15,17,3,24,25,20]) : void 0, import.meta.url);
61489
61500
  return { id: id8, diagram: diagram2 };
@@ -61499,7 +61510,7 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
61499
61510
  }, "detector");
61500
61511
  var loader9 = /* @__PURE__ */ __name(async () => {
61501
61512
  const { diagram: diagram2 } = await __vitePreload(async () => {
61502
- const { diagram: diagram22 } = await import("./quadrantDiagram-W4KKPZXB-Dr-oWRk9.js");
61513
+ const { diagram: diagram22 } = await import("./quadrantDiagram-W4KKPZXB-BPxbtjga.js");
61503
61514
  return { diagram: diagram22 };
61504
61515
  }, true ? __vite__mapDeps([26,19,20,21,3]) : void 0, import.meta.url);
61505
61516
  return { id: id9, diagram: diagram2 };
@@ -61516,7 +61527,7 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
61516
61527
  }, "detector");
61517
61528
  var loader10 = /* @__PURE__ */ __name(async () => {
61518
61529
  const { diagram: diagram2 } = await __vitePreload(async () => {
61519
- const { diagram: diagram22 } = await import("./xychartDiagram-2RQKCTM6-CSvswDTY.js");
61530
+ const { diagram: diagram22 } = await import("./xychartDiagram-2RQKCTM6-BHQdINVc.js");
61520
61531
  return { diagram: diagram22 };
61521
61532
  }, true ? __vite__mapDeps([27,20,25,19,21,3]) : void 0, import.meta.url);
61522
61533
  return { id: id10, diagram: diagram2 };
@@ -61533,7 +61544,7 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
61533
61544
  }, "detector");
61534
61545
  var loader11 = /* @__PURE__ */ __name(async () => {
61535
61546
  const { diagram: diagram2 } = await __vitePreload(async () => {
61536
- const { diagram: diagram22 } = await import("./requirementDiagram-4Y6WPE33-B6QZd0lo.js");
61547
+ const { diagram: diagram22 } = await import("./requirementDiagram-4Y6WPE33-CK1LrJyG.js");
61537
61548
  return { diagram: diagram22 };
61538
61549
  }, true ? __vite__mapDeps([28,10,11,3]) : void 0, import.meta.url);
61539
61550
  return { id: id11, diagram: diagram2 };
@@ -61550,7 +61561,7 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
61550
61561
  }, "detector");
61551
61562
  var loader12 = /* @__PURE__ */ __name(async () => {
61552
61563
  const { diagram: diagram2 } = await __vitePreload(async () => {
61553
- const { diagram: diagram22 } = await import("./sequenceDiagram-3UESZ5HK-D48Yr9T6.js");
61564
+ const { diagram: diagram22 } = await import("./sequenceDiagram-3UESZ5HK-B-r7lNhI.js");
61554
61565
  return { diagram: diagram22 };
61555
61566
  }, true ? __vite__mapDeps([29,7,16,3]) : void 0, import.meta.url);
61556
61567
  return { id: id12, diagram: diagram2 };
@@ -61570,7 +61581,7 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
61570
61581
  }, "detector");
61571
61582
  var loader13 = /* @__PURE__ */ __name(async () => {
61572
61583
  const { diagram: diagram2 } = await __vitePreload(async () => {
61573
- const { diagram: diagram22 } = await import("./classDiagram-4FO5ZUOK-DGS2faoM.js");
61584
+ const { diagram: diagram22 } = await import("./classDiagram-4FO5ZUOK-nuHQLjzM.js");
61574
61585
  return { diagram: diagram22 };
61575
61586
  }, true ? __vite__mapDeps([30,31,9,7,10,11,3]) : void 0, import.meta.url);
61576
61587
  return { id: id13, diagram: diagram2 };
@@ -61590,7 +61601,7 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
61590
61601
  }, "detector");
61591
61602
  var loader14 = /* @__PURE__ */ __name(async () => {
61592
61603
  const { diagram: diagram2 } = await __vitePreload(async () => {
61593
- const { diagram: diagram22 } = await import("./classDiagram-v2-Q7XG4LA2-DGS2faoM.js");
61604
+ const { diagram: diagram22 } = await import("./classDiagram-v2-Q7XG4LA2-nuHQLjzM.js");
61594
61605
  return { diagram: diagram22 };
61595
61606
  }, true ? __vite__mapDeps([32,31,9,7,10,11,3]) : void 0, import.meta.url);
61596
61607
  return { id: id14, diagram: diagram2 };
@@ -61610,7 +61621,7 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
61610
61621
  }, "detector");
61611
61622
  var loader15 = /* @__PURE__ */ __name(async () => {
61612
61623
  const { diagram: diagram2 } = await __vitePreload(async () => {
61613
- const { diagram: diagram22 } = await import("./stateDiagram-AJRCARHV-qyb8ETsa.js");
61624
+ const { diagram: diagram22 } = await import("./stateDiagram-AJRCARHV-wrWE0MRa.js");
61614
61625
  return { diagram: diagram22 };
61615
61626
  }, true ? __vite__mapDeps([33,34,10,11,1,2,3]) : void 0, import.meta.url);
61616
61627
  return { id: id15, diagram: diagram2 };
@@ -61633,7 +61644,7 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
61633
61644
  }, "detector");
61634
61645
  var loader16 = /* @__PURE__ */ __name(async () => {
61635
61646
  const { diagram: diagram2 } = await __vitePreload(async () => {
61636
- const { diagram: diagram22 } = await import("./stateDiagram-v2-BHNVJYJU-DmDOyyrJ.js");
61647
+ const { diagram: diagram22 } = await import("./stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js");
61637
61648
  return { diagram: diagram22 };
61638
61649
  }, true ? __vite__mapDeps([35,34,10,11,3]) : void 0, import.meta.url);
61639
61650
  return { id: id16, diagram: diagram2 };
@@ -61650,7 +61661,7 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
61650
61661
  }, "detector");
61651
61662
  var loader17 = /* @__PURE__ */ __name(async () => {
61652
61663
  const { diagram: diagram2 } = await __vitePreload(async () => {
61653
- const { diagram: diagram22 } = await import("./journeyDiagram-JHISSGLW-C4rH_mQM.js");
61664
+ const { diagram: diagram22 } = await import("./journeyDiagram-JHISSGLW-BLZa3jnX.js");
61654
61665
  return { diagram: diagram22 };
61655
61666
  }, true ? __vite__mapDeps([36,9,7,24,3]) : void 0, import.meta.url);
61656
61667
  return { id: id17, diagram: diagram2 };
@@ -61720,7 +61731,7 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
61720
61731
  }, "detector");
61721
61732
  var loader18 = /* @__PURE__ */ __name(async () => {
61722
61733
  const { diagram: diagram2 } = await __vitePreload(async () => {
61723
- const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-CzFk-KNI.js");
61734
+ const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
61724
61735
  return { diagram: diagram22 };
61725
61736
  }, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
61726
61737
  return { id: id18, diagram: diagram2 };
@@ -61737,7 +61748,7 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
61737
61748
  }, "detector");
61738
61749
  var loader19 = /* @__PURE__ */ __name(async () => {
61739
61750
  const { diagram: diagram2 } = await __vitePreload(async () => {
61740
- const { diagram: diagram22 } = await import("./timeline-definition-PNZ67QCA-C-KQxTi1.js");
61751
+ const { diagram: diagram22 } = await import("./timeline-definition-PNZ67QCA-BkeMGH4J.js");
61741
61752
  return { diagram: diagram22 };
61742
61753
  }, true ? __vite__mapDeps([37,24,3]) : void 0, import.meta.url);
61743
61754
  return { id: id19, diagram: diagram2 };
@@ -61754,7 +61765,7 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
61754
61765
  }, "detector");
61755
61766
  var loader20 = /* @__PURE__ */ __name(async () => {
61756
61767
  const { diagram: diagram2 } = await __vitePreload(async () => {
61757
- const { diagram: diagram22 } = await import("./mindmap-definition-RKZ34NQL-DdmPsWrn.js");
61768
+ const { diagram: diagram22 } = await import("./mindmap-definition-RKZ34NQL-5pGeNCcp.js");
61758
61769
  return { diagram: diagram22 };
61759
61770
  }, true ? __vite__mapDeps([38,10,11,3]) : void 0, import.meta.url);
61760
61771
  return { id: id20, diagram: diagram2 };
@@ -61771,7 +61782,7 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
61771
61782
  }, "detector");
61772
61783
  var loader21 = /* @__PURE__ */ __name(async () => {
61773
61784
  const { diagram: diagram2 } = await __vitePreload(async () => {
61774
- const { diagram: diagram22 } = await import("./kanban-definition-UN3LZRKU-DRbrBcWV.js");
61785
+ const { diagram: diagram22 } = await import("./kanban-definition-UN3LZRKU-foVxWrJn.js");
61775
61786
  return { diagram: diagram22 };
61776
61787
  }, true ? __vite__mapDeps([39,9,3]) : void 0, import.meta.url);
61777
61788
  return { id: id21, diagram: diagram2 };
@@ -61788,7 +61799,7 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
61788
61799
  }, "detector");
61789
61800
  var loader22 = /* @__PURE__ */ __name(async () => {
61790
61801
  const { diagram: diagram2 } = await __vitePreload(async () => {
61791
- const { diagram: diagram22 } = await import("./sankeyDiagram-5OEKKPKP-Cyl9ojEt.js");
61802
+ const { diagram: diagram22 } = await import("./sankeyDiagram-5OEKKPKP-BNj7Sqii.js");
61792
61803
  return { diagram: diagram22 };
61793
61804
  }, true ? __vite__mapDeps([40,25,20,3]) : void 0, import.meta.url);
61794
61805
  return { id: id22, diagram: diagram2 };
@@ -61805,7 +61816,7 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
61805
61816
  }, "detector");
61806
61817
  var loader23 = /* @__PURE__ */ __name(async () => {
61807
61818
  const { diagram: diagram2 } = await __vitePreload(async () => {
61808
- const { diagram: diagram22 } = await import("./diagram-LMA3HP47-CGkw7wII.js");
61819
+ const { diagram: diagram22 } = await import("./diagram-LMA3HP47-DqDnw2RA.js");
61809
61820
  return { diagram: diagram22 };
61810
61821
  }, true ? __vite__mapDeps([41,15,17,3]) : void 0, import.meta.url);
61811
61822
  return { id: id23, diagram: diagram2 };
@@ -61821,7 +61832,7 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
61821
61832
  }, "detector");
61822
61833
  var loader24 = /* @__PURE__ */ __name(async () => {
61823
61834
  const { diagram: diagram2 } = await __vitePreload(async () => {
61824
- const { diagram: diagram22 } = await import("./diagram-2AECGRRQ-DzHiYDPh.js");
61835
+ const { diagram: diagram22 } = await import("./diagram-2AECGRRQ-F-fP19TC.js");
61825
61836
  return { diagram: diagram22 };
61826
61837
  }, true ? __vite__mapDeps([42,15,17,3]) : void 0, import.meta.url);
61827
61838
  return { id: id24, diagram: diagram2 };
@@ -61837,7 +61848,7 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
61837
61848
  }, "detector");
61838
61849
  var loader25 = /* @__PURE__ */ __name(async () => {
61839
61850
  const { diagram: diagram2 } = await __vitePreload(async () => {
61840
- const { diagram: diagram22 } = await import("./blockDiagram-GPEHLZMM-CYSWjnJg.js");
61851
+ const { diagram: diagram22 } = await import("./blockDiagram-GPEHLZMM-DOETUKma.js");
61841
61852
  return { diagram: diagram22 };
61842
61853
  }, true ? __vite__mapDeps([43,9,1,12,3]) : void 0, import.meta.url);
61843
61854
  return { id: id25, diagram: diagram2 };
@@ -61854,7 +61865,7 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
61854
61865
  }, "detector");
61855
61866
  var loader26 = /* @__PURE__ */ __name(async () => {
61856
61867
  const { diagram: diagram2 } = await __vitePreload(async () => {
61857
- const { diagram: diagram22 } = await import("./diagram-5GNKFQAL-BiNv6Keq.js");
61868
+ const { diagram: diagram22 } = await import("./diagram-5GNKFQAL-BD5XZc8G.js");
61858
61869
  return { diagram: diagram22 };
61859
61870
  }, true ? __vite__mapDeps([44,15,16,17,3]) : void 0, import.meta.url);
61860
61871
  return { id: id26, diagram: diagram2 };
@@ -61871,7 +61882,7 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
61871
61882
  }, "detector");
61872
61883
  var loader27 = /* @__PURE__ */ __name(async () => {
61873
61884
  const { diagram: diagram2 } = await __vitePreload(async () => {
61874
- const { diagram: diagram22 } = await import("./architectureDiagram-3BPJPVTR-BAbnaR9G.js");
61885
+ const { diagram: diagram22 } = await import("./architectureDiagram-3BPJPVTR-DDfP-F9D.js");
61875
61886
  return { diagram: diagram22 };
61876
61887
  }, true ? __vite__mapDeps([45,15,17,3,5]) : void 0, import.meta.url);
61877
61888
  return { id: id27, diagram: diagram2 };
@@ -61888,7 +61899,7 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
61888
61899
  }, "detector");
61889
61900
  var loader28 = /* @__PURE__ */ __name(async () => {
61890
61901
  const { diagram: diagram2 } = await __vitePreload(async () => {
61891
- const { diagram: diagram22 } = await import("./diagram-KO2AKTUF-ClzeDG6f.js");
61902
+ const { diagram: diagram22 } = await import("./diagram-KO2AKTUF-Qa3ZxA67.js");
61892
61903
  return { diagram: diagram22 };
61893
61904
  }, true ? __vite__mapDeps([46,15,17,3]) : void 0, import.meta.url);
61894
61905
  return { id: id28, diagram: diagram2 };
@@ -61905,7 +61916,7 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
61905
61916
  }, "detector");
61906
61917
  var loader29 = /* @__PURE__ */ __name(async () => {
61907
61918
  const { diagram: diagram2 } = await __vitePreload(async () => {
61908
- const { diagram: diagram22 } = await import("./ishikawaDiagram-YF4QCWOH-BUZLjRo-.js");
61919
+ const { diagram: diagram22 } = await import("./ishikawaDiagram-YF4QCWOH-TeVytCrP.js");
61909
61920
  return { diagram: diagram22 };
61910
61921
  }, true ? __vite__mapDeps([47,3]) : void 0, import.meta.url);
61911
61922
  return { id: id29, diagram: diagram2 };
@@ -61921,7 +61932,7 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
61921
61932
  }, "detector");
61922
61933
  var loader30 = /* @__PURE__ */ __name(async () => {
61923
61934
  const { diagram: diagram2 } = await __vitePreload(async () => {
61924
- const { diagram: diagram22 } = await import("./vennDiagram-CIIHVFJN-BdaZlnH-.js");
61935
+ const { diagram: diagram22 } = await import("./vennDiagram-CIIHVFJN-BTxVzto3.js");
61925
61936
  return { diagram: diagram22 };
61926
61937
  }, true ? __vite__mapDeps([48,3]) : void 0, import.meta.url);
61927
61938
  return { id: id30, diagram: diagram2 };
@@ -61938,7 +61949,7 @@ var detector31 = /* @__PURE__ */ __name((txt) => {
61938
61949
  }, "detector");
61939
61950
  var loader31 = /* @__PURE__ */ __name(async () => {
61940
61951
  const { diagram: diagram2 } = await __vitePreload(async () => {
61941
- const { diagram: diagram22 } = await import("./diagram-OG6HWLK6-Dl-Hyk1_.js");
61952
+ const { diagram: diagram22 } = await import("./diagram-OG6HWLK6-BH4Elzby.js");
61942
61953
  return { diagram: diagram22 };
61943
61954
  }, true ? __vite__mapDeps([49,11,15,17,3,21,25,20]) : void 0, import.meta.url);
61944
61955
  return { id: id31, diagram: diagram2 };
@@ -61954,7 +61965,7 @@ var detector32 = /* @__PURE__ */ __name((text2) => {
61954
61965
  }, "detector");
61955
61966
  var loader32 = /* @__PURE__ */ __name(async () => {
61956
61967
  const { diagram: diagram2 } = await __vitePreload(async () => {
61957
- const { diagram: diagram22 } = await import("./wardleyDiagram-YWT4CUSO-B2hBE-EE.js");
61968
+ const { diagram: diagram22 } = await import("./wardleyDiagram-YWT4CUSO-D2r5dVGW.js");
61958
61969
  return { diagram: diagram22 };
61959
61970
  }, true ? __vite__mapDeps([50,15,17,3]) : void 0, import.meta.url);
61960
61971
  return { id: id32, diagram: diagram2 };
@@ -63363,6 +63374,16 @@ const mermaidPlugin = {
63363
63374
  enabled: true,
63364
63375
  remarkPlugin: { plugin: remarkMermaid, options: void 0 },
63365
63376
  nodeTypes: ["mermaid_block"],
63377
+ clipboardStyles: {
63378
+ ".mermaid-block": "display:block;padding:16px;margin:1em 0;border-radius:6px;background:#f6f8fa;border:1px solid #d0d7de;",
63379
+ ".mermaid-preview svg": "max-width:100%;height:auto;"
63380
+ },
63381
+ exportStyles: `.mermaid-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:var(--mermaid-background,var(--bg-color));border:1px solid var(--border-color)}
63382
+ .mermaid-preview{display:flex;justify-content:center;align-items:center}
63383
+ .mermaid-preview svg{max-width:100%;height:auto}`,
63384
+ rawSelectors: ["textarea.mermaid-source"],
63385
+ hideSelectors: [".mermaid-loading", ".mermaid-error"],
63386
+ bgCaptureSelectors: [".mermaid-block"],
63366
63387
  exportCapabilities: [
63367
63388
  {
63368
63389
  label: "Save Diagram as PNG",
@@ -71639,18 +71660,14 @@ function enhanceClipboard(e2) {
71639
71660
  doc2.querySelectorAll("pre code").forEach((el) => {
71640
71661
  el.setAttribute("style", "background:none;padding:0;font-size:.875em;line-height:1.6;font-family:Menlo,Monaco,monospace;");
71641
71662
  });
71642
- doc2.querySelectorAll(".math-inline").forEach((el) => {
71643
- el.setAttribute("style", "display:inline;padding:2px 4px;border-radius:3px;background:rgba(175,184,193,0.2);");
71644
- });
71645
- doc2.querySelectorAll(".math-block").forEach((el) => {
71646
- el.setAttribute("style", "display:block;padding:16px;margin:1em 0;border-radius:6px;background:#f6f8fa;text-align:center;overflow-x:auto;");
71647
- });
71648
- doc2.querySelectorAll(".mermaid-block").forEach((el) => {
71649
- el.setAttribute("style", "display:block;padding:16px;margin:1em 0;border-radius:6px;background:#f6f8fa;border:1px solid #d0d7de;");
71650
- });
71651
- doc2.querySelectorAll(".mermaid-preview svg").forEach((el) => {
71652
- el.setAttribute("style", "max-width:100%;height:auto;");
71653
- });
71663
+ for (const p2 of getAllPlugins()) {
71664
+ if (!p2.enabled || !p2.clipboardStyles) continue;
71665
+ for (const [selector2, style] of Object.entries(p2.clipboardStyles)) {
71666
+ doc2.querySelectorAll(selector2).forEach((el) => {
71667
+ el.setAttribute("style", style);
71668
+ });
71669
+ }
71670
+ }
71654
71671
  e2.clipboardData?.setData("text/html", doc2.body.innerHTML);
71655
71672
  }
71656
71673
  const defaultContent = `# Welcome to ColaMD
@@ -71677,9 +71694,12 @@ async function createEditor(rootId, onChange) {
71677
71694
  try {
71678
71695
  editorInstance = await builder.create();
71679
71696
  } catch (e2) {
71680
- if (e2?.message?.includes("math_inline") || e2?.message?.includes("math_block")) {
71681
- console.warn("[editor] Milkdown context error, retrying without math plugins:", e2.message);
71682
- const filteredModules = pluginModules.filter((m2) => m2.info.id !== "math");
71697
+ const offendingModule = pluginModules.find(
71698
+ (m2) => m2.info.nodeTypes?.some((nt2) => e2?.message?.includes(nt2))
71699
+ );
71700
+ if (offendingModule) {
71701
+ console.warn("[editor] Milkdown context error, retrying without plugin:", offendingModule.info.id, e2.message);
71702
+ const filteredModules = pluginModules.filter((m2) => m2 !== offendingModule);
71683
71703
  builder = Editor.make().config((ctx) => {
71684
71704
  ctx.set(rootCtx, root2);
71685
71705
  ctx.set(defaultValueCtx, defaultContent);
@@ -71704,7 +71724,7 @@ async function createEditor(rootId, onChange) {
71704
71724
  const fixed = nvs.map((nv, i2) => {
71705
71725
  if (nv[0] != null) return nv;
71706
71726
  const viewFn = nv[1];
71707
- const fallbackNames = ["math_inline", "math_block", "mermaid_block"];
71727
+ const fallbackNames = pluginModules.flatMap((m2) => m2.info.nodeTypes || []);
71708
71728
  const name = fallbackNames[i2 - 1];
71709
71729
  if (name && schema2.nodes[name]) {
71710
71730
  return [name, viewFn];
@@ -71753,23 +71773,27 @@ function getLiveHTML() {
71753
71773
  const editorDom = document.querySelector("#editor .ProseMirror");
71754
71774
  if (!editorDom) return "";
71755
71775
  const clone2 = editorDom.cloneNode(true);
71756
- const styleTargets = [
71757
- { selector: ".math-inline", prop: "backgroundColor" },
71758
- { selector: ".math-block", prop: "backgroundColor" },
71759
- { selector: ".mermaid-block", prop: "backgroundColor" }
71760
- ];
71761
- for (const { selector: selector2, prop } of styleTargets) {
71762
- const originals = editorDom.querySelectorAll(selector2);
71763
- const clones = clone2.querySelectorAll(selector2);
71764
- originals.forEach((orig, i2) => {
71765
- const computed = getComputedStyle(orig);
71766
- const val = computed.getPropertyValue(prop === "backgroundColor" ? "background-color" : prop);
71767
- if (val && clones[i2]) clones[i2].style.setProperty(prop, val);
71768
- });
71776
+ const plugins2 = getAllPlugins().filter((p2) => p2.enabled);
71777
+ for (const p2 of plugins2) {
71778
+ if (!p2.bgCaptureSelectors) continue;
71779
+ for (const selector2 of p2.bgCaptureSelectors) {
71780
+ const originals = editorDom.querySelectorAll(selector2);
71781
+ const clones = clone2.querySelectorAll(selector2);
71782
+ originals.forEach((orig, i2) => {
71783
+ const val = getComputedStyle(orig).backgroundColor;
71784
+ if (val && clones[i2]) clones[i2].style.backgroundColor = val;
71785
+ });
71786
+ }
71787
+ }
71788
+ const rawSelectors = plugins2.flatMap((p2) => p2.rawSelectors || []);
71789
+ if (rawSelectors.length) {
71790
+ clone2.querySelectorAll(rawSelectors.join(",")).forEach((el) => el.remove());
71791
+ }
71792
+ const hideSelectors = plugins2.flatMap((p2) => p2.hideSelectors || []);
71793
+ if (hideSelectors.length) {
71794
+ clone2.querySelectorAll(hideSelectors.join(",")).forEach((el) => el.style.display = "none");
71769
71795
  }
71770
- clone2.querySelectorAll("textarea.mermaid-source, .math-inline-raw, .math-block-raw").forEach((el) => el.remove());
71771
- clone2.querySelectorAll(".mermaid-loading, .mermaid-error").forEach((el) => el.style.display = "none");
71772
- return clone2.innerHTML;
71796
+ return `<div id="write">${clone2.innerHTML}</div>`;
71773
71797
  }
71774
71798
  function setMarkdown(content2) {
71775
71799
  if (!editorInstance) return;
@@ -71837,6 +71861,34 @@ function applyTheme(name, customCSS) {
71837
71861
  function loadSavedTheme() {
71838
71862
  return localStorage.getItem("colamd-theme") || "elegant";
71839
71863
  }
71864
+ function getActiveCustomThemeCSS() {
71865
+ const name = loadSavedTheme();
71866
+ if (name.startsWith("custom:")) {
71867
+ const key2 = name.slice(7);
71868
+ return customThemeCache.get(key2)?.css || null;
71869
+ }
71870
+ return null;
71871
+ }
71872
+ function extractPrintCSSFromSheet() {
71873
+ const name = loadSavedTheme();
71874
+ if (!name.startsWith("custom:")) return null;
71875
+ const key2 = name.slice(7);
71876
+ const cached = customThemeCache.get(key2);
71877
+ if (!cached) return null;
71878
+ const css = cached.css;
71879
+ const startIdx = css.indexOf("@media print");
71880
+ if (startIdx === -1) return null;
71881
+ const openBrace = css.indexOf("{", startIdx);
71882
+ if (openBrace === -1) return null;
71883
+ let depth = 1;
71884
+ let i2 = openBrace + 1;
71885
+ while (i2 < css.length && depth > 0) {
71886
+ if (css[i2] === "{") depth++;
71887
+ else if (css[i2] === "}") depth--;
71888
+ i2++;
71889
+ }
71890
+ return css.substring(startIdx, i2);
71891
+ }
71840
71892
  const { Capacitor } = await __vitePreload(async () => {
71841
71893
  const { Capacitor: Capacitor2 } = await import("./index-B4uDgADr.js");
71842
71894
  return { Capacitor: Capacitor2 };
@@ -72488,9 +72540,12 @@ function getContent() {
72488
72540
  return getMarkdown();
72489
72541
  }
72490
72542
  function syncRawEdits() {
72491
- document.querySelectorAll(".math-block-raw, .math-inline-raw, .mermaid-source").forEach((el) => {
72492
- if (el.matches(":focus")) el.blur();
72493
- });
72543
+ const selectors = getAllPlugins().filter((p2) => p2.enabled).flatMap((p2) => p2.rawSelectors || []).join(",");
72544
+ if (selectors) {
72545
+ document.querySelectorAll(selectors).forEach((el) => {
72546
+ if (el.matches(":focus")) el.blur();
72547
+ });
72548
+ }
72494
72549
  }
72495
72550
  function restoreRenderedMode(api) {
72496
72551
  for (const p2 of getAllPlugins()) {
@@ -72586,7 +72641,16 @@ async function init() {
72586
72641
  restoreRenderedMode(api);
72587
72642
  await ensureAllPluginsRendered();
72588
72643
  await new Promise((r2) => setTimeout(r2, 300));
72589
- await api.exportPDF(buildExportHTML());
72644
+ const printCSS = extractPrintCSSFromSheet();
72645
+ let printStyleEl = null;
72646
+ if (printCSS) {
72647
+ printStyleEl = document.createElement("style");
72648
+ printStyleEl.textContent = printCSS;
72649
+ document.head.appendChild(printStyleEl);
72650
+ await new Promise((r2) => requestAnimationFrame(r2));
72651
+ }
72652
+ await api.exportPDF(printCSS || void 0);
72653
+ if (printStyleEl) printStyleEl.remove();
72590
72654
  setTimeout(() => {
72591
72655
  document.querySelectorAll(".mermaid-loading, .mermaid-error").forEach((el) => el.style.display = "none");
72592
72656
  }, 1e3);
@@ -72596,58 +72660,7 @@ async function init() {
72596
72660
  restoreRenderedMode(api);
72597
72661
  await ensureAllPluginsRendered();
72598
72662
  await new Promise((r2) => setTimeout(r2, 200));
72599
- const s2 = getComputedStyle(document.body);
72600
- const v2 = (name) => s2.getPropertyValue(name).trim();
72601
- const bgColor = v2("--bg-color");
72602
- const textColor = v2("--text-color");
72603
- const textMuted = v2("--text-muted");
72604
- const borderColor = v2("--border-color");
72605
- const linkColor = v2("--link-color");
72606
- const codeBg = v2("--code-bg");
72607
- const codeBlockBg = v2("--code-block-bg");
72608
- const codeBlockText = v2("--code-block-text") || textColor;
72609
- const mermaidBg = v2("--mermaid-background") || bgColor;
72610
- const blockquoteBorder = v2("--blockquote-border");
72611
- const blockquoteBg = v2("--blockquote-bg") || "transparent";
72612
- const tableHeaderBg = v2("--table-header-bg");
72613
- const selectionBg = v2("--selection-bg");
72614
- const editor = document.querySelector("#editor .ProseMirror");
72615
- const fontFamily = editor ? getComputedStyle(editor).fontFamily : "-apple-system,BlinkMacSystemFont,sans-serif";
72616
- const getElColor = (selector2, fallback) => {
72617
- const el = document.querySelector(`#editor .ProseMirror ${selector2}`);
72618
- return el ? getComputedStyle(el).color : fallback;
72619
- };
72620
- const strongColor = getElColor("strong", textColor);
72621
- const codeColor = getElColor("code", textColor);
72622
- const html2 = `<!DOCTYPE html>
72623
- <html><head><meta charset="utf-8"><title>ColaMD Export</title>
72624
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.46/dist/katex.min.css">
72625
- <style>
72626
- body{max-width:780px;margin:40px auto;padding:20px;font-family:${fontFamily};line-height:1.75;background:${bgColor};color:${textColor}}
72627
- h1{font-size:2em;font-weight:700;border-bottom:1px solid ${borderColor};padding-bottom:.3em}
72628
- h2{font-size:1.5em;font-weight:600;border-bottom:1px solid ${borderColor};padding-bottom:.25em}
72629
- h3{font-size:1.25em;font-weight:600}
72630
- strong{color:${strongColor}}
72631
- a{color:${linkColor};text-decoration:none}
72632
- code{background:${codeBg};color:${codeColor};padding:2px 6px;border-radius:3px;font-size:.875em;font-family:'SF Mono','Fira Code',Menlo,monospace}
72633
- pre{background:${codeBlockBg};color:${codeBlockText};padding:16px;border-radius:6px;overflow-x:auto;margin:1em 0}
72634
- pre code{background:none;padding:0;color:inherit}
72635
- blockquote{border-left:4px solid ${blockquoteBorder};background:${blockquoteBg};padding-left:16px;margin:1em 0;color:${textMuted}}
72636
- table{border-collapse:collapse;width:100%;margin:1em 0}
72637
- th,td{border:1px solid ${borderColor};padding:8px 12px}
72638
- th{background:${tableHeaderBg};font-weight:600}
72639
- hr{border:none;border-top:2px solid ${borderColor};margin:2em 0}
72640
- img{max-width:100%}
72641
- ::selection{background:${selectionBg}}
72642
- .math-inline{display:inline;padding:2px 4px;border-radius:3px;background:${mermaidBg}}
72643
- .math-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${mermaidBg};text-align:center;overflow-x:auto}
72644
- .mermaid-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${mermaidBg};border:1px solid ${borderColor}}
72645
- .mermaid-preview{display:flex;justify-content:center;align-items:center}
72646
- .mermaid-preview svg{max-width:100%;height:auto}
72647
- .mermaid-preview svg .label text,.mermaid-preview svg .nodeLabel text,.mermaid-preview svg .state-title,.mermaid-preview svg .state-description,.mermaid-preview svg .pieTitleText,.mermaid-preview svg .titleText{transform:translateY(-2px)}.mermaid-preview svg .nodeLabel,.mermaid-preview svg .edgeLabel{display:inline-block;position:relative;top:-2px}
72648
- </style>
72649
- </head><body>${getLiveHTML()}</body></html>`;
72650
- api.exportHTML(html2);
72663
+ api.exportHTML(buildExportHTML());
72651
72664
  });
72652
72665
  api.onNewFile(() => {
72653
72666
  exitSourceMode();
@@ -72729,7 +72742,7 @@ img{max-width:100%}
72729
72742
  }
72730
72743
  document.addEventListener("contextmenu", (e2) => {
72731
72744
  if (e2.target.matches('textarea, input, [contenteditable="true"]')) return;
72732
- const target = e2.target.closest(".mermaid-block, .math-block");
72745
+ const target = e2.target.closest(getContextMenuSelector());
72733
72746
  if (!target) return;
72734
72747
  const capabilities = findExportCapabilities(target.className);
72735
72748
  if (!capabilities.length) return;
@@ -72872,7 +72885,16 @@ function setupMobileMenu(api, currentTheme) {
72872
72885
  restoreRenderedMode(api);
72873
72886
  await ensureAllPluginsRendered();
72874
72887
  await new Promise((r2) => setTimeout(r2, 300));
72875
- await api.exportPDF(buildExportHTML());
72888
+ const printCSS = extractPrintCSSFromSheet();
72889
+ let printStyleEl = null;
72890
+ if (printCSS) {
72891
+ printStyleEl = document.createElement("style");
72892
+ printStyleEl.textContent = printCSS;
72893
+ document.head.appendChild(printStyleEl);
72894
+ await new Promise((r2) => requestAnimationFrame(r2));
72895
+ }
72896
+ await api.exportPDF(printCSS || void 0);
72897
+ if (printStyleEl) printStyleEl.remove();
72876
72898
  setTimeout(() => {
72877
72899
  document.querySelectorAll(".mermaid-loading, .mermaid-error").forEach((el2) => el2.style.display = "none");
72878
72900
  }, 1e3);
@@ -72922,8 +72944,8 @@ function setupMobileMenu(api, currentTheme) {
72922
72944
  });
72923
72945
  }
72924
72946
  function buildExportHTML() {
72925
- const s2 = getComputedStyle(document.body);
72926
- const v2 = (name) => s2.getPropertyValue(name).trim();
72947
+ const bodyStyle = getComputedStyle(document.body);
72948
+ const v2 = (name) => bodyStyle.getPropertyValue(name).trim();
72927
72949
  const bgColor = v2("--bg-color");
72928
72950
  const textColor = v2("--text-color");
72929
72951
  const textMuted = v2("--text-muted");
@@ -72932,27 +72954,80 @@ function buildExportHTML() {
72932
72954
  const codeBg = v2("--code-bg");
72933
72955
  const codeBlockBg = v2("--code-block-bg");
72934
72956
  const codeBlockText = v2("--code-block-text") || textColor;
72935
- const mermaidBg = v2("--mermaid-background") || bgColor;
72936
72957
  const blockquoteBorder = v2("--blockquote-border");
72937
72958
  const blockquoteBg = v2("--blockquote-bg") || "transparent";
72938
72959
  const tableHeaderBg = v2("--table-header-bg");
72939
72960
  const selectionBg = v2("--selection-bg");
72940
72961
  const editor = document.querySelector("#editor .ProseMirror");
72941
- const fontFamily = editor ? getComputedStyle(editor).fontFamily : "-apple-system,BlinkMacSystemFont,sans-serif";
72962
+ const editorStyle = editor ? getComputedStyle(editor) : bodyStyle;
72963
+ const fontFamily = editorStyle.fontFamily || "-apple-system,BlinkMacSystemFont,sans-serif";
72964
+ const bodyFontSize = editorStyle.fontSize || "16px";
72965
+ const bodyLineHeight = editorStyle.lineHeight || "1.75";
72966
+ const getElFontSize = (tag, fallback) => {
72967
+ const el = document.querySelector(`#editor .ProseMirror ${tag}`);
72968
+ return el ? getComputedStyle(el).fontSize : fallback;
72969
+ };
72970
+ const getElFontWeight = (tag, fallback) => {
72971
+ const el = document.querySelector(`#editor .ProseMirror ${tag}`);
72972
+ return el ? getComputedStyle(el).fontWeight : fallback;
72973
+ };
72942
72974
  const getElColor = (selector2, fallback) => {
72943
72975
  const el = document.querySelector(`#editor .ProseMirror ${selector2}`);
72944
72976
  return el ? getComputedStyle(el).color : fallback;
72945
72977
  };
72946
72978
  const strongColor = getElColor("strong", textColor);
72947
72979
  const codeColor = getElColor("code", textColor);
72980
+ const cssVarLines = collectExportCSSVariables(v2);
72981
+ let pluginCSS = "";
72982
+ for (const p2 of getAllPlugins()) {
72983
+ if (p2.enabled && p2.exportStyles) {
72984
+ pluginCSS += `
72985
+ /* === ${p2.name} === */
72986
+ ${p2.exportStyles}
72987
+ `;
72988
+ }
72989
+ }
72990
+ let themeCSS = "";
72991
+ let bodyClass = "";
72992
+ if (document.body.classList.contains("theme-custom")) {
72993
+ bodyClass = "theme-custom";
72994
+ const customCSS = getActiveCustomThemeCSS();
72995
+ if (customCSS) {
72996
+ themeCSS += `
72997
+ /* === Custom Theme: ${loadSavedTheme()} === */
72998
+ ${customCSS}
72999
+ `;
73000
+ }
73001
+ themeCSS += `
73002
+ /* === Mermaid Custom Text Styles === */
73003
+ ${getMermaidCustomCSS()}
73004
+ `;
73005
+ } else {
73006
+ for (const cls of ["theme-light", "theme-dark", "theme-elegant", "theme-newsprint"]) {
73007
+ if (document.body.classList.contains(cls)) {
73008
+ bodyClass = cls;
73009
+ break;
73010
+ }
73011
+ }
73012
+ }
73013
+ const isCustomTheme = bodyClass === "theme-custom";
72948
73014
  return `<!DOCTYPE html>
72949
73015
  <html><head><meta charset="utf-8"><title>ColaMD Export</title>
72950
73016
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.46/dist/katex.min.css">
72951
73017
  <style>
72952
- body{max-width:780px;margin:40px auto;padding:20px;font-family:${fontFamily};line-height:1.75;background:${bgColor};color:${textColor}}
72953
- h1{font-size:2em;font-weight:700;border-bottom:1px solid ${borderColor};padding-bottom:.3em}
72954
- h2{font-size:1.5em;font-weight:600;border-bottom:1px solid ${borderColor};padding-bottom:.25em}
72955
- h3{font-size:1.25em;font-weight:600}
73018
+ :root {
73019
+ ${cssVarLines}
73020
+ }
73021
+ ${themeCSS}
73022
+ ${pluginCSS}
73023
+ /* === Base Element Styles === */
73024
+ body{max-width:780px;margin:40px auto;padding:20px;font-size:${bodyFontSize};font-family:${fontFamily};line-height:${bodyLineHeight};background:${bgColor};color:${textColor}}
73025
+ ${isCustomTheme ? "" : `h1{font-size:${getElFontSize("h1", "2em")};font-weight:${getElFontWeight("h1", "700")};border-bottom:1px solid ${borderColor};padding-bottom:.3em}
73026
+ h2{font-size:${getElFontSize("h2", "1.5em")};font-weight:${getElFontWeight("h2", "600")};border-bottom:1px solid ${borderColor};padding-bottom:.25em}
73027
+ h3{font-size:${getElFontSize("h3", "1.25em")};font-weight:${getElFontWeight("h3", "600")}}
73028
+ h4{font-size:${getElFontSize("h4", "1.1em")};font-weight:${getElFontWeight("h4", "600")}}
73029
+ h5{font-size:${getElFontSize("h5", "1em")};font-weight:${getElFontWeight("h5", "600")}}
73030
+ h6{font-size:${getElFontSize("h6", "0.9em")};font-weight:${getElFontWeight("h6", "600")}}
72956
73031
  strong{color:${strongColor}}
72957
73032
  a{color:${linkColor};text-decoration:none}
72958
73033
  code{background:${codeBg};color:${codeColor};padding:2px 6px;border-radius:3px;font-size:.875em;font-family:'SF Mono','Fira Code',Menlo,monospace}
@@ -72962,18 +73037,128 @@ blockquote{border-left:4px solid ${blockquoteBorder};background:${blockquoteBg};
72962
73037
  table{border-collapse:collapse;width:100%;margin:1em 0}
72963
73038
  th,td{border:1px solid ${borderColor};padding:8px 12px}
72964
73039
  th{background:${tableHeaderBg};font-weight:600}
72965
- hr{border:none;border-top:2px solid ${borderColor};margin:2em 0}
73040
+ hr{border:none;border-top:2px solid ${borderColor};margin:2em 0}`}
72966
73041
  img{max-width:100%}
72967
73042
  ::selection{background:${selectionBg}}
72968
- .math-inline{display:inline;padding:2px 4px;border-radius:3px;background:${codeBg}}
72969
- .math-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${codeBlockBg};text-align:center;overflow-x:auto}
72970
- .mermaid-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${mermaidBg};border:1px solid ${borderColor}}
72971
- .mermaid-preview{display:flex;justify-content:center;align-items:center}
72972
- .mermaid-preview svg{max-width:100%;height:auto}
72973
- @page{margin:15mm;size:A4}
72974
- @media print{body{max-width:none;margin:0;padding:20px}#editor{position:static!important;overflow:visible!important}}
73043
+ ${(() => {
73044
+ if (isCustomTheme) {
73045
+ console.log("[buildExportHTML] Custom theme — skipping hardcoded @page/@media print, using theme CSS rules");
73046
+ return "";
73047
+ }
73048
+ console.log("[buildExportHTML] Built-in theme — emitting hardcoded @page/@media print fallback");
73049
+ return `@page{margin:15mm;size:A4}
73050
+ @media print{body{max-width:none;margin:0;padding:20px}#editor{position:static!important;overflow:visible!important}}`;
73051
+ })()}
72975
73052
  </style>
72976
- </head><body>${getLiveHTML()}</body></html>`;
73053
+ </head><body class="${bodyClass}">${getLiveHTML()}</body></html>`;
73054
+ }
73055
+ function collectExportCSSVariables(v2) {
73056
+ const varNames = [
73057
+ "--seed-accent",
73058
+ "--seed-accent-light",
73059
+ "--seed-accent-dark",
73060
+ "--seed-surface",
73061
+ "--seed-panel",
73062
+ "--seed-panel-alt",
73063
+ "--seed-ink",
73064
+ "--seed-ink-muted",
73065
+ "--seed-ink-dim",
73066
+ "--seed-border",
73067
+ "--seed-border-strong",
73068
+ "--font-size-root",
73069
+ "--font-scale-h1",
73070
+ "--font-scale-h2",
73071
+ "--font-scale-h3",
73072
+ "--font-scale-h4",
73073
+ "--font-scale-h5",
73074
+ "--font-scale-h6",
73075
+ "--font-size-mermaid",
73076
+ "--line-height-body",
73077
+ "--line-height-heading",
73078
+ "--line-height-code",
73079
+ "--bg-color",
73080
+ "--text-color",
73081
+ "--heading-color",
73082
+ "--text-muted",
73083
+ "--text-dim",
73084
+ "--link-color",
73085
+ "--accent-color",
73086
+ "--accent-dark",
73087
+ "--accent-light",
73088
+ "--selection-bg",
73089
+ "--border-color",
73090
+ "--blockquote-border",
73091
+ "--hr-color",
73092
+ "--code-bg",
73093
+ "--code-color",
73094
+ "--code-block-bg",
73095
+ "--code-block-text",
73096
+ "--blockquote-bg",
73097
+ "--table-header-bg",
73098
+ "--table-header-text",
73099
+ "--table-border",
73100
+ "--scrollbar-thumb",
73101
+ "--scrollbar-thumb-hover",
73102
+ "--surface-color",
73103
+ "--surface-alt",
73104
+ "--mermaid-background",
73105
+ "--mermaid-border-color",
73106
+ "--mermaid-border-radius",
73107
+ "--mermaid-padding",
73108
+ "--mermaid-font-family",
73109
+ "--mermaid-font-size",
73110
+ "--mermaid-node-fill",
73111
+ "--mermaid-node-stroke",
73112
+ "--mermaid-node-stroke-width",
73113
+ "--mermaid-node-text",
73114
+ "--mermaid-edge-stroke",
73115
+ "--mermaid-edge-stroke-width",
73116
+ "--mermaid-cluster-fill",
73117
+ "--mermaid-cluster-stroke",
73118
+ "--mermaid-label-text",
73119
+ "--mermaid-edge-label-text",
73120
+ "--mermaid-edge-label-bg",
73121
+ "--mermaid-title-text",
73122
+ "--mermaid-axis-text",
73123
+ "--mermaid-highlight",
73124
+ "--mermaid-person-stroke",
73125
+ "--mermaid-person-fill",
73126
+ "--mermaid-label-offset-y",
73127
+ "--radius-sm",
73128
+ "--radius-md",
73129
+ "--radius-lg",
73130
+ "--content-width"
73131
+ ];
73132
+ const lines = [];
73133
+ for (const name of varNames) {
73134
+ const val = v2(name);
73135
+ if (val) lines.push(` ${name}: ${val};`);
73136
+ }
73137
+ return lines.join("\n");
73138
+ }
73139
+ function getMermaidCustomCSS() {
73140
+ return `.theme-custom .mermaid-preview svg text {
73141
+ fill: var(--mermaid-text-color, var(--text-color)) !important;
73142
+ font-family: var(--mermaid-font-family, inherit) !important;
73143
+ font-size: var(--mermaid-font-size, 12px) !important;
73144
+ }
73145
+ .theme-custom .mermaid-preview svg foreignObject span {
73146
+ color: var(--mermaid-text-color, var(--text-color)) !important;
73147
+ font-family: var(--mermaid-font-family, inherit) !important;
73148
+ font-size: var(--mermaid-font-size, 14px) !important;
73149
+ }
73150
+ .theme-custom .mermaid-preview svg .person-man text { fill: #ffffff !important; }
73151
+ .theme-custom .mermaid-preview svg .person-man span { color: #ffffff !important; }
73152
+ .theme-custom .mermaid-preview svg .label text,
73153
+ .theme-custom .mermaid-preview svg .nodeLabel text,
73154
+ .theme-custom .mermaid-preview svg .state-title,
73155
+ .theme-custom .mermaid-preview svg .state-description,
73156
+ .theme-custom .mermaid-preview svg .pieTitleText,
73157
+ .theme-custom .mermaid-preview svg .titleText { transform: translateY(-3px) !important; }
73158
+ .theme-custom .mermaid-preview svg .xychart .axis text { transform: translateY(0) !important; }
73159
+ .theme-custom .mermaid-preview svg .nodeLabel,
73160
+ .theme-custom .mermaid-preview svg .edgeLabel { display: inline-block !important; position: relative !important; top: -3px !important; }
73161
+ `;
72977
73162
  }
72978
73163
  init().catch((e2) => console.error("ColaMD init failed:", e2));
72979
73164
  export {