@bytechain.cn/colamd 1.5.0 → 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.
- package/.trae/specs/optimize-theme-loading/checklist.md +20 -0
- package/.trae/specs/optimize-theme-loading/spec.md +103 -0
- package/.trae/specs/optimize-theme-loading/tasks.md +40 -0
- package/CHANGELOG.md +320 -0
- package/CLAUDE.md +56 -0
- package/README.md +498 -26
- package/README_CN.md +554 -27
- package/android/app/build/.npmkeep +0 -0
- package/android/app/build.gradle +76 -0
- package/android/app/capacitor.build.gradle +24 -0
- package/android/app/proguard-rules.pro +21 -0
- package/android/app/release.keystore +0 -0
- package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +26 -0
- package/android/app/src/main/AndroidManifest.xml +64 -0
- package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +180 -0
- package/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/android/app/src/main/res/drawable/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-land-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-hdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-mdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-port-xxxhdpi/splash.png +0 -0
- package/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +34 -0
- package/android/app/src/main/res/layout/activity_main.xml +12 -0
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/values/ic_launcher_background.xml +4 -0
- package/android/app/src/main/res/values/strings.xml +7 -0
- package/android/app/src/main/res/values/styles.xml +22 -0
- package/android/app/src/main/res/xml/file_paths.xml +5 -0
- package/android/app/src/main/res/xml/network_security_config.xml +8 -0
- package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +18 -0
- package/android/build.gradle +29 -0
- package/android/capacitor.settings.gradle +21 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +22 -0
- package/android/gradlew +248 -0
- package/android/gradlew.bat +92 -0
- package/android/settings.gradle +5 -0
- package/android/variables.gradle +16 -0
- package/capacitor.config.js +29 -0
- package/capacitor.config.ts +30 -0
- package/demo.md +191 -484
- package/dist/main/index.js +91 -51
- package/dist/preload/index.js +1 -1
- package/dist/renderer/assets/{arc-tTbbM8LO.js → arc-_lugyDzx.js} +1 -1
- package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-CEgYow6c.js → architectureDiagram-3BPJPVTR-DDfP-F9D.js} +4 -3
- package/dist/renderer/assets/{blockDiagram-GPEHLZMM-LHyVtPwW.js → blockDiagram-GPEHLZMM-DOETUKma.js} +5 -4
- package/dist/renderer/assets/{c4Diagram-AAUBKEIU-C1P1eJrf.js → c4Diagram-AAUBKEIU-kAmLfVtk.js} +3 -2
- package/dist/renderer/assets/{channel-upve91Tq.js → channel-CD4vJFwr.js} +1 -1
- package/dist/renderer/assets/{chunk-2J33WTMH-lag2vhq9.js → chunk-2J33WTMH-DkVrgw4l.js} +1 -1
- package/dist/renderer/assets/{chunk-4BX2VUAB-BXJ8Ggh-.js → chunk-4BX2VUAB-JTZ-VKNX.js} +1 -1
- package/dist/renderer/assets/{chunk-55IACEB6-CiBpxRa1.js → chunk-55IACEB6-Di_O5box.js} +1 -1
- package/dist/renderer/assets/{chunk-727SXJPM-ODeKQFXC.js → chunk-727SXJPM-BgKvwR8w.js} +5 -5
- package/dist/renderer/assets/{chunk-AQP2D5EJ-BK7xJolB.js → chunk-AQP2D5EJ-DonSXCCQ.js} +3 -3
- package/dist/renderer/assets/{chunk-FMBD7UC4-BxpCZPtz.js → chunk-FMBD7UC4-CsV8Lmy6.js} +1 -1
- package/dist/renderer/assets/{chunk-ND2GUHAM-CqqaU9Ue.js → chunk-ND2GUHAM-C_-_dlq7.js} +1 -1
- package/dist/renderer/assets/{chunk-QZHKN3VN-Biq_K124.js → chunk-QZHKN3VN-aCmcDsfu.js} +1 -1
- package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-Cq95X99o.js → classDiagram-4FO5ZUOK-nuHQLjzM.js} +7 -6
- package/dist/renderer/assets/{classDiagram-4FO5ZUOK-Cq95X99o.js → classDiagram-v2-Q7XG4LA2-nuHQLjzM.js} +7 -6
- package/dist/renderer/assets/{cose-bilkent-S5V4N54A-XasiD0bu.js → cose-bilkent-S5V4N54A-Di1_SXt9.js} +2 -1
- package/dist/renderer/assets/{dagre-BM42HDAG-Nq84Gfx4.js → dagre-BM42HDAG-CqOUIYsL.js} +4 -3
- package/dist/renderer/assets/{diagram-2AECGRRQ-DwuB1GWt.js → diagram-2AECGRRQ-F-fP19TC.js} +4 -3
- package/dist/renderer/assets/{diagram-5GNKFQAL-C2tgeI1h.js → diagram-5GNKFQAL-BD5XZc8G.js} +5 -4
- package/dist/renderer/assets/{diagram-KO2AKTUF-D5KzjNBc.js → diagram-KO2AKTUF-Qa3ZxA67.js} +4 -3
- package/dist/renderer/assets/{diagram-LMA3HP47-C12xHS1c.js → diagram-LMA3HP47-DqDnw2RA.js} +4 -3
- package/dist/renderer/assets/{diagram-OG6HWLK6-CnxI9oEa.js → diagram-OG6HWLK6-BH4Elzby.js} +5 -4
- package/dist/renderer/assets/{erDiagram-TEJ5UH35-D_uPaKwn.js → erDiagram-TEJ5UH35-CaKZCewa.js} +5 -4
- package/dist/renderer/assets/{flowDiagram-I6XJVG4X-B6q_1-tE.js → flowDiagram-I6XJVG4X-C8znUgyL.js} +7 -6
- package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-CFo7ifF9.js → ganttDiagram-6RSMTGT7-DnRvbMnU.js} +3 -2
- package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-WSexHTnq.js → gitGraphDiagram-PVQCEYII-CZuRZzk4.js} +5 -4
- package/dist/renderer/assets/{graph-DyX_9f6d.js → graph-CYiEKt0j.js} +1 -1
- package/dist/renderer/assets/index-B4uDgADr.js +530 -0
- package/dist/renderer/assets/{index-DW7LS8C1.js → index-BX6JHKv6.js} +1430 -408
- package/dist/renderer/assets/index-CBcVpA3d.js +30 -0
- package/dist/renderer/assets/index-CGj1spkU.js +27 -0
- package/dist/renderer/assets/{index-dyHEFYvY.css → index-CcwAgVRi.css} +442 -400
- package/dist/renderer/assets/index-D4CPFkph.js +9 -0
- package/dist/renderer/assets/index-DxOzbfR-.js +110 -0
- package/dist/renderer/assets/index-Y89U1ptl.js +9 -0
- package/dist/renderer/assets/{infoDiagram-5YYISTIA-DaeJdLRq.js → infoDiagram-5YYISTIA-BlBUdqMb.js} +3 -2
- package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-DDCZc35f.js → ishikawaDiagram-YF4QCWOH-TeVytCrP.js} +2 -1
- package/dist/renderer/assets/{journeyDiagram-JHISSGLW-BEdmpAgl.js → journeyDiagram-JHISSGLW-BLZa3jnX.js} +5 -4
- package/dist/renderer/assets/{kanban-definition-UN3LZRKU-BEFtQcFb.js → kanban-definition-UN3LZRKU-foVxWrJn.js} +3 -2
- package/dist/renderer/assets/{layout-CAJgQHdw.js → layout-DOAlFUVb.js} +2 -2
- package/dist/renderer/assets/{linear-B2ggJ8Am.js → linear-BMBn6kVq.js} +1 -1
- package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-DSxVgHB5.js → mindmap-definition-RKZ34NQL-5pGeNCcp.js} +4 -3
- package/dist/renderer/assets/{pieDiagram-4H26LBE5-CwYoJBuL.js → pieDiagram-4H26LBE5-N9aAUxfr.js} +5 -4
- package/dist/renderer/assets/preload-helper-tXtZnHb0.js +88 -0
- package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-CST9Fvg9.js → quadrantDiagram-W4KKPZXB-BPxbtjga.js} +3 -2
- package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-DtrH52jS.js → requirementDiagram-4Y6WPE33-CK1LrJyG.js} +4 -3
- package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-ca1tPzJ_.js → sankeyDiagram-5OEKKPKP-BNj7Sqii.js} +2 -1
- package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-Dfp1EJZ7.js → sequenceDiagram-3UESZ5HK-B-r7lNhI.js} +4 -3
- package/dist/renderer/assets/{stateDiagram-AJRCARHV-Bha2QoNB.js → stateDiagram-AJRCARHV-wrWE0MRa.js} +7 -6
- package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-DWgFUYu1.js → stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js} +5 -4
- package/dist/renderer/assets/{timeline-definition-PNZ67QCA-C3h_-OTj.js → timeline-definition-PNZ67QCA-BkeMGH4J.js} +3 -2
- package/dist/renderer/assets/{vennDiagram-CIIHVFJN-DFzjSrZi.js → vennDiagram-CIIHVFJN-BTxVzto3.js} +2 -1
- package/dist/renderer/assets/{wardley-L42UT6IY-Cx-VbqoS.js → wardley-L42UT6IY-b-_GPpqL.js} +1 -1
- package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-S2D9XqX6.js → wardleyDiagram-YWT4CUSO-D2r5dVGW.js} +4 -3
- package/dist/renderer/assets/web-BKE0SH0E.js +36 -0
- package/dist/renderer/assets/web-CBsFp24u.js +564 -0
- package/dist/renderer/assets/web-Dc8YgoHP.js +24 -0
- package/dist/renderer/assets/web-TfDzToU7.js +58 -0
- package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-Cfxigbts.js → xychartDiagram-2RQKCTM6-BHQdINVc.js} +3 -2
- package/dist/renderer/index.html +62 -3
- package/docs/RELEASE_NOTES_v1.5.1.md +382 -0
- package/docs/academic-demo.md +567 -0
- package/docs/demo.html +748 -0
- package/docs/demo.md +546 -0
- package/docs/demo.pdf +0 -0
- package/docs/theme-paradigm.md +797 -0
- package/electron-builder.yml +7 -0
- package/electron.vite.config.js +31 -0
- package/electron.vite.config.ts +1 -1
- package/ios/App/App/AppDelegate.swift +49 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
- package/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/ios/App/App/Info.plist +49 -0
- package/ios/App/App.xcodeproj/project.pbxproj +408 -0
- package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/App/Podfile +28 -0
- package/package.json +23 -3
- package/resources/templates/slides/template-forest-ink.html +540 -0
- package/scripts/generate-icons.js +102 -0
- package/src/main/index.ts +106 -68
- package/src/preload/index.d.ts +51 -0
- package/src/preload/index.js +70 -0
- package/src/preload/index.ts +2 -2
- package/src/renderer/capacitor-api.ts +713 -0
- package/src/renderer/editor/editor.ts +102 -19
- package/src/renderer/editor/plugins/index.ts +42 -32
- package/src/renderer/editor/plugins/math-plugin.ts +9 -1
- package/src/renderer/editor/plugins/mermaid-plugin-custom.css +13 -398
- package/src/renderer/editor/plugins/mermaid-plugin.ts +72 -71
- package/src/renderer/editor/plugins/themes/base/dark.css +23 -0
- package/src/renderer/editor/plugins/themes/base/elegant.css +32 -0
- package/src/renderer/editor/plugins/themes/base/light.css +20 -0
- package/src/renderer/editor/plugins/themes/base/newsprint.css +27 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +43 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +20 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +24 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/light.css +21 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +26 -0
- package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +592 -0
- package/src/renderer/editor/plugins/themes/foundation.css +143 -0
- package/src/renderer/editor/plugins/themes/theme-manager.ts +133 -0
- package/src/renderer/env.d.ts +4 -1
- package/src/renderer/index.html +59 -1
- package/src/renderer/main.ts +581 -109
- package/src/renderer/mobile.css +428 -0
- package/themes/README.md +20 -0
- package/themes/academic-paper-pt.css +1321 -0
- package/themes/academic-paper.css +1416 -0
- package/themes/elegant.css +14 -7
- package/themes/forest-ink.css +664 -0
- package/themes/pixso-design.css +1261 -0
- package/themes/swiss-design.css +596 -0
- package/themes/template.css +498 -0
- package/tsconfig.main.json +1 -0
- package/tsconfig.main.tsbuildinfo +1 -0
- package/tsconfig.preload.json +1 -0
- package/tsconfig.preload.tsbuildinfo +1 -0
- package/tsconfig.renderer.json +1 -0
- package/tsconfig.renderer.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/.trae/documents/fix-mermaid-colors-and-sankey.md +0 -50
- package/src/renderer/themes/theme-manager.ts +0 -40
- /package/src/renderer/{themes → editor/plugins/themes}/base.css +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dagre-BM42HDAG-
|
|
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
|
+
import { _ as __vitePreload } from "./preload-helper-tXtZnHb0.js";
|
|
2
3
|
var ErrorCode = /* @__PURE__ */ (function(ErrorCode2) {
|
|
3
4
|
ErrorCode2["docTypeError"] = "docTypeError";
|
|
4
5
|
ErrorCode2["contextNotFound"] = "contextNotFound";
|
|
@@ -748,15 +749,15 @@ function initializeDocument(effects) {
|
|
|
748
749
|
}
|
|
749
750
|
const indexBeforeExits = self2.events.length;
|
|
750
751
|
let indexBeforeFlow = indexBeforeExits;
|
|
751
|
-
let
|
|
752
|
+
let seen;
|
|
752
753
|
let point2;
|
|
753
754
|
while (indexBeforeFlow--) {
|
|
754
755
|
if (self2.events[indexBeforeFlow][0] === "exit" && self2.events[indexBeforeFlow][1].type === "chunkFlow") {
|
|
755
|
-
if (
|
|
756
|
+
if (seen) {
|
|
756
757
|
point2 = self2.events[indexBeforeFlow][1].end;
|
|
757
758
|
break;
|
|
758
759
|
}
|
|
759
|
-
|
|
760
|
+
seen = true;
|
|
760
761
|
}
|
|
761
762
|
}
|
|
762
763
|
exitContainers(continued);
|
|
@@ -2053,7 +2054,7 @@ function factoryDestination(effects, ok2, nok, type2, literalType, literalMarker
|
|
|
2053
2054
|
function factoryLabel(effects, ok2, nok, type2, markerType, stringType) {
|
|
2054
2055
|
const self2 = this;
|
|
2055
2056
|
let size = 0;
|
|
2056
|
-
let
|
|
2057
|
+
let seen;
|
|
2057
2058
|
return start2;
|
|
2058
2059
|
function start2(code2) {
|
|
2059
2060
|
effects.enter(type2);
|
|
@@ -2064,7 +2065,7 @@ function factoryLabel(effects, ok2, nok, type2, markerType, stringType) {
|
|
|
2064
2065
|
return atBreak;
|
|
2065
2066
|
}
|
|
2066
2067
|
function atBreak(code2) {
|
|
2067
|
-
if (size > 999 || code2 === null || code2 === 91 || code2 === 93 && !
|
|
2068
|
+
if (size > 999 || code2 === null || code2 === 91 || code2 === 93 && !seen || // To do: remove in the future once we’ve switched from
|
|
2068
2069
|
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
|
|
2069
2070
|
// which doesn’t need this.
|
|
2070
2071
|
// Hidden footnotes hook.
|
|
@@ -2097,7 +2098,7 @@ function factoryLabel(effects, ok2, nok, type2, markerType, stringType) {
|
|
|
2097
2098
|
return atBreak(code2);
|
|
2098
2099
|
}
|
|
2099
2100
|
effects.consume(code2);
|
|
2100
|
-
if (!
|
|
2101
|
+
if (!seen) seen = !markdownSpace(code2);
|
|
2101
2102
|
return code2 === 92 ? labelEscape : labelInside;
|
|
2102
2103
|
}
|
|
2103
2104
|
function labelEscape(code2) {
|
|
@@ -2170,18 +2171,18 @@ function factoryTitle(effects, ok2, nok, type2, markerType, stringType) {
|
|
|
2170
2171
|
}
|
|
2171
2172
|
}
|
|
2172
2173
|
function factoryWhitespace(effects, ok2) {
|
|
2173
|
-
let
|
|
2174
|
+
let seen;
|
|
2174
2175
|
return start2;
|
|
2175
2176
|
function start2(code2) {
|
|
2176
2177
|
if (markdownLineEnding(code2)) {
|
|
2177
2178
|
effects.enter("lineEnding");
|
|
2178
2179
|
effects.consume(code2);
|
|
2179
2180
|
effects.exit("lineEnding");
|
|
2180
|
-
|
|
2181
|
+
seen = true;
|
|
2181
2182
|
return start2;
|
|
2182
2183
|
}
|
|
2183
2184
|
if (markdownSpace(code2)) {
|
|
2184
|
-
return factorySpace(effects, start2,
|
|
2185
|
+
return factorySpace(effects, start2, seen ? "linePrefix" : "lineSuffix")(code2);
|
|
2185
2186
|
}
|
|
2186
2187
|
return ok2(code2);
|
|
2187
2188
|
}
|
|
@@ -10037,15 +10038,15 @@ class ContentMatch {
|
|
|
10037
10038
|
content expression.
|
|
10038
10039
|
*/
|
|
10039
10040
|
fillBefore(after, toEnd = false, startIndex = 0) {
|
|
10040
|
-
let
|
|
10041
|
+
let seen = [this];
|
|
10041
10042
|
function search2(match, types) {
|
|
10042
10043
|
let finished = match.matchFragment(after, startIndex);
|
|
10043
10044
|
if (finished && (!toEnd || finished.validEnd))
|
|
10044
10045
|
return Fragment.from(types.map((tp) => tp.createAndFill()));
|
|
10045
10046
|
for (let i2 = 0; i2 < match.next.length; i2++) {
|
|
10046
10047
|
let { type: type2, next: next2 } = match.next[i2];
|
|
10047
|
-
if (!(type2.isText || type2.hasRequiredAttrs()) &&
|
|
10048
|
-
|
|
10048
|
+
if (!(type2.isText || type2.hasRequiredAttrs()) && seen.indexOf(next2) == -1) {
|
|
10049
|
+
seen.push(next2);
|
|
10049
10050
|
let found2 = search2(next2, types.concat(type2));
|
|
10050
10051
|
if (found2)
|
|
10051
10052
|
return found2;
|
|
@@ -10073,7 +10074,7 @@ class ContentMatch {
|
|
|
10073
10074
|
@internal
|
|
10074
10075
|
*/
|
|
10075
10076
|
computeWrapping(target) {
|
|
10076
|
-
let
|
|
10077
|
+
let seen = /* @__PURE__ */ Object.create(null), active = [{ match: this, type: null, via: null }];
|
|
10077
10078
|
while (active.length) {
|
|
10078
10079
|
let current = active.shift(), match = current.match;
|
|
10079
10080
|
if (match.matchType(target)) {
|
|
@@ -10084,9 +10085,9 @@ class ContentMatch {
|
|
|
10084
10085
|
}
|
|
10085
10086
|
for (let i2 = 0; i2 < match.next.length; i2++) {
|
|
10086
10087
|
let { type: type2, next: next2 } = match.next[i2];
|
|
10087
|
-
if (!type2.isLeaf && !type2.hasRequiredAttrs() && !(type2.name in
|
|
10088
|
+
if (!type2.isLeaf && !type2.hasRequiredAttrs() && !(type2.name in seen) && (!current.type || next2.validEnd)) {
|
|
10088
10089
|
active.push({ match: type2.contentMatch, type: type2, via: current });
|
|
10089
|
-
|
|
10090
|
+
seen[type2.name] = true;
|
|
10090
10091
|
}
|
|
10091
10092
|
}
|
|
10092
10093
|
}
|
|
@@ -10112,18 +10113,18 @@ class ContentMatch {
|
|
|
10112
10113
|
@internal
|
|
10113
10114
|
*/
|
|
10114
10115
|
toString() {
|
|
10115
|
-
let
|
|
10116
|
+
let seen = [];
|
|
10116
10117
|
function scan(m2) {
|
|
10117
|
-
|
|
10118
|
+
seen.push(m2);
|
|
10118
10119
|
for (let i2 = 0; i2 < m2.next.length; i2++)
|
|
10119
|
-
if (
|
|
10120
|
+
if (seen.indexOf(m2.next[i2].next) == -1)
|
|
10120
10121
|
scan(m2.next[i2].next);
|
|
10121
10122
|
}
|
|
10122
10123
|
scan(this);
|
|
10123
|
-
return
|
|
10124
|
+
return seen.map((m2, i2) => {
|
|
10124
10125
|
let out = i2 + (m2.validEnd ? "*" : " ") + " ";
|
|
10125
10126
|
for (let i3 = 0; i3 < m2.next.length; i3++)
|
|
10126
|
-
out += (i3 ? ", " : "") + m2.next[i3].type.name + "->" +
|
|
10127
|
+
out += (i3 ? ", " : "") + m2.next[i3].type.name + "->" + seen.indexOf(m2.next[i3].next);
|
|
10127
10128
|
return out;
|
|
10128
10129
|
}).join("\n");
|
|
10129
10130
|
}
|
|
@@ -11442,13 +11443,13 @@ function markMayApply(markType, nodeType) {
|
|
|
11442
11443
|
let parent = nodes[name];
|
|
11443
11444
|
if (!parent.allowsMarkType(markType))
|
|
11444
11445
|
continue;
|
|
11445
|
-
let
|
|
11446
|
-
|
|
11446
|
+
let seen = [], scan = (match) => {
|
|
11447
|
+
seen.push(match);
|
|
11447
11448
|
for (let i2 = 0; i2 < match.edgeCount; i2++) {
|
|
11448
11449
|
let { type: type2, next: next2 } = match.edge(i2);
|
|
11449
11450
|
if (type2 == nodeType)
|
|
11450
11451
|
return true;
|
|
11451
|
-
if (
|
|
11452
|
+
if (seen.indexOf(next2) < 0 && scan(next2))
|
|
11452
11453
|
return true;
|
|
11453
11454
|
}
|
|
11454
11455
|
};
|
|
@@ -14213,27 +14214,27 @@ class EditorState {
|
|
|
14213
14214
|
applyTransaction(rootTr) {
|
|
14214
14215
|
if (!this.filterTransaction(rootTr))
|
|
14215
14216
|
return { state: this, transactions: [] };
|
|
14216
|
-
let trs = [rootTr], newState = this.applyInner(rootTr),
|
|
14217
|
+
let trs = [rootTr], newState = this.applyInner(rootTr), seen = null;
|
|
14217
14218
|
for (; ; ) {
|
|
14218
14219
|
let haveNew = false;
|
|
14219
14220
|
for (let i2 = 0; i2 < this.config.plugins.length; i2++) {
|
|
14220
14221
|
let plugin26 = this.config.plugins[i2];
|
|
14221
14222
|
if (plugin26.spec.appendTransaction) {
|
|
14222
|
-
let n2 =
|
|
14223
|
+
let n2 = seen ? seen[i2].n : 0, oldState = seen ? seen[i2].state : this;
|
|
14223
14224
|
let tr = n2 < trs.length && plugin26.spec.appendTransaction.call(plugin26, n2 ? trs.slice(n2) : trs, oldState, newState);
|
|
14224
14225
|
if (tr && newState.filterTransaction(tr, i2)) {
|
|
14225
14226
|
tr.setMeta("appendedTransaction", rootTr);
|
|
14226
|
-
if (!
|
|
14227
|
-
|
|
14227
|
+
if (!seen) {
|
|
14228
|
+
seen = [];
|
|
14228
14229
|
for (let j2 = 0; j2 < this.config.plugins.length; j2++)
|
|
14229
|
-
|
|
14230
|
+
seen.push(j2 < i2 ? { state: newState, n: trs.length } : { state: this, n: 0 });
|
|
14230
14231
|
}
|
|
14231
14232
|
trs.push(tr);
|
|
14232
14233
|
newState = newState.applyInner(tr);
|
|
14233
14234
|
haveNew = true;
|
|
14234
14235
|
}
|
|
14235
|
-
if (
|
|
14236
|
-
|
|
14236
|
+
if (seen)
|
|
14237
|
+
seen[i2] = { state: newState, n: trs.length };
|
|
14237
14238
|
}
|
|
14238
14239
|
}
|
|
14239
14240
|
if (!haveNew)
|
|
@@ -21862,21 +21863,21 @@ function getAllPluginModules() {
|
|
|
21862
21863
|
function getAllPlugins() {
|
|
21863
21864
|
return modules.map((m2) => m2.info);
|
|
21864
21865
|
}
|
|
21865
|
-
function
|
|
21866
|
-
const m2 = modules.find((m22) => m22.info.id === id33);
|
|
21867
|
-
if (m2) m2.info.enabled = !m2.info.enabled;
|
|
21868
|
-
}
|
|
21869
|
-
function findExportCapabilities(selector2) {
|
|
21866
|
+
function findExportCapabilities(className) {
|
|
21870
21867
|
for (const m2 of modules) {
|
|
21871
|
-
if (
|
|
21872
|
-
|
|
21873
|
-
if (selector2.includes(nodeType.replace(/_/g, "-"))) {
|
|
21874
|
-
return m2.info.exportCapabilities;
|
|
21875
|
-
}
|
|
21868
|
+
if (m2.info.enabled && m2.info.exportCapabilities && m2.info.nodeTypes?.some((nt2) => className.includes(nt2.replace(/_/g, "-")))) {
|
|
21869
|
+
return m2.info.exportCapabilities;
|
|
21876
21870
|
}
|
|
21877
21871
|
}
|
|
21878
21872
|
return [];
|
|
21879
21873
|
}
|
|
21874
|
+
function togglePlugin(id33, enabled) {
|
|
21875
|
+
const mod = modules.find((m2) => m2.info.id === id33);
|
|
21876
|
+
if (mod) mod.info.enabled = enabled;
|
|
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
|
+
}
|
|
21880
21881
|
class ParseError extends Error {
|
|
21881
21882
|
// The underlying error message without any context added.
|
|
21882
21883
|
constructor(message, token2) {
|
|
@@ -37022,7 +37023,7 @@ const mathBlockView = $view(mathBlockSchema, (_ctx) => {
|
|
|
37022
37023
|
div.addEventListener("focusout", (e2) => {
|
|
37023
37024
|
const target = e2.target;
|
|
37024
37025
|
if (!target.classList.contains("math-block-raw")) return;
|
|
37025
|
-
const rawValue = target.value;
|
|
37026
|
+
const rawValue = e2.target.value;
|
|
37026
37027
|
const newText = rawValue.replace(/^\$\$\s*\n?/, "").replace(/\n?\s*\$\$$/, "").trim();
|
|
37027
37028
|
const pos = getPos();
|
|
37028
37029
|
if (pos != null && node2.attrs.text !== newText) {
|
|
@@ -37053,7 +37054,15 @@ const mathPlugin = {
|
|
|
37053
37054
|
name: "Math Rendering",
|
|
37054
37055
|
enabled: true,
|
|
37055
37056
|
remarkPlugin: { plugin: remarkMath, options: void 0 },
|
|
37056
|
-
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"]
|
|
37057
37066
|
// TODO: KaTeX CSS 在 SVG foreignObject 中丢失,导致导出 PNG 二次内容/空白
|
|
37058
37067
|
// 后续需解决样式注入问题后重新启用
|
|
37059
37068
|
// exportCapabilities: [
|
|
@@ -37074,91 +37083,6 @@ registerPluginModule({
|
|
|
37074
37083
|
info: mathPlugin,
|
|
37075
37084
|
milkdownPlugins: [mathInlineSchema, mathBlockSchema, mathInlineView, mathBlockView]
|
|
37076
37085
|
});
|
|
37077
|
-
const scriptRel = /* @__PURE__ */ (function detectScriptRel() {
|
|
37078
|
-
const relList = typeof document !== "undefined" && document.createElement("link").relList;
|
|
37079
|
-
return relList && relList.supports && relList.supports("modulepreload") ? "modulepreload" : "preload";
|
|
37080
|
-
})();
|
|
37081
|
-
const assetsURL = function(dep, importerUrl) {
|
|
37082
|
-
return new URL(dep, importerUrl).href;
|
|
37083
|
-
};
|
|
37084
|
-
const seen = {};
|
|
37085
|
-
const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
37086
|
-
let promise = Promise.resolve();
|
|
37087
|
-
if (deps && deps.length > 0) {
|
|
37088
|
-
let allSettled2 = function(promises) {
|
|
37089
|
-
return Promise.all(
|
|
37090
|
-
promises.map(
|
|
37091
|
-
(p2) => Promise.resolve(p2).then(
|
|
37092
|
-
(value) => ({ status: "fulfilled", value }),
|
|
37093
|
-
(reason) => ({ status: "rejected", reason })
|
|
37094
|
-
)
|
|
37095
|
-
)
|
|
37096
|
-
);
|
|
37097
|
-
};
|
|
37098
|
-
const links = document.getElementsByTagName("link");
|
|
37099
|
-
const cspNonceMeta = document.querySelector(
|
|
37100
|
-
"meta[property=csp-nonce]"
|
|
37101
|
-
);
|
|
37102
|
-
const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
|
|
37103
|
-
promise = allSettled2(
|
|
37104
|
-
deps.map((dep) => {
|
|
37105
|
-
dep = assetsURL(dep, importerUrl);
|
|
37106
|
-
if (dep in seen) return;
|
|
37107
|
-
seen[dep] = true;
|
|
37108
|
-
const isCss = dep.endsWith(".css");
|
|
37109
|
-
const cssSelector = isCss ? '[rel="stylesheet"]' : "";
|
|
37110
|
-
const isBaseRelative = !!importerUrl;
|
|
37111
|
-
if (isBaseRelative) {
|
|
37112
|
-
for (let i2 = links.length - 1; i2 >= 0; i2--) {
|
|
37113
|
-
const link22 = links[i2];
|
|
37114
|
-
if (link22.href === dep && (!isCss || link22.rel === "stylesheet")) {
|
|
37115
|
-
return;
|
|
37116
|
-
}
|
|
37117
|
-
}
|
|
37118
|
-
} else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
|
|
37119
|
-
return;
|
|
37120
|
-
}
|
|
37121
|
-
const link2 = document.createElement("link");
|
|
37122
|
-
link2.rel = isCss ? "stylesheet" : scriptRel;
|
|
37123
|
-
if (!isCss) {
|
|
37124
|
-
link2.as = "script";
|
|
37125
|
-
}
|
|
37126
|
-
link2.crossOrigin = "";
|
|
37127
|
-
link2.href = dep;
|
|
37128
|
-
if (cspNonce) {
|
|
37129
|
-
link2.setAttribute("nonce", cspNonce);
|
|
37130
|
-
}
|
|
37131
|
-
document.head.appendChild(link2);
|
|
37132
|
-
if (isCss) {
|
|
37133
|
-
return new Promise((res, rej) => {
|
|
37134
|
-
link2.addEventListener("load", res);
|
|
37135
|
-
link2.addEventListener(
|
|
37136
|
-
"error",
|
|
37137
|
-
() => rej(new Error(`Unable to preload CSS for ${dep}`))
|
|
37138
|
-
);
|
|
37139
|
-
});
|
|
37140
|
-
}
|
|
37141
|
-
})
|
|
37142
|
-
);
|
|
37143
|
-
}
|
|
37144
|
-
function handlePreloadError(err) {
|
|
37145
|
-
const e2 = new Event("vite:preloadError", {
|
|
37146
|
-
cancelable: true
|
|
37147
|
-
});
|
|
37148
|
-
e2.payload = err;
|
|
37149
|
-
window.dispatchEvent(e2);
|
|
37150
|
-
if (!e2.defaultPrevented) {
|
|
37151
|
-
throw err;
|
|
37152
|
-
}
|
|
37153
|
-
}
|
|
37154
|
-
return promise.then((res) => {
|
|
37155
|
-
for (const item of res || []) {
|
|
37156
|
-
if (item.status !== "rejected") continue;
|
|
37157
|
-
handlePreloadError(item.reason);
|
|
37158
|
-
}
|
|
37159
|
-
return baseModule().catch(handlePreloadError);
|
|
37160
|
-
});
|
|
37161
|
-
};
|
|
37162
37086
|
var dayjs_min$1 = { exports: {} };
|
|
37163
37087
|
var dayjs_min = dayjs_min$1.exports;
|
|
37164
37088
|
var hasRequiredDayjs_min;
|
|
@@ -61025,12 +60949,12 @@ var registerDefaultLayoutLoaders = /* @__PURE__ */ __name(() => {
|
|
|
61025
60949
|
registerLayoutLoaders([
|
|
61026
60950
|
{
|
|
61027
60951
|
name: "dagre",
|
|
61028
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./dagre-BM42HDAG-
|
|
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")
|
|
61029
60953
|
},
|
|
61030
60954
|
...[
|
|
61031
60955
|
{
|
|
61032
60956
|
name: "cose-bilkent",
|
|
61033
|
-
loader: /* @__PURE__ */ __name(async () => await __vitePreload(() => import("./cose-bilkent-S5V4N54A-
|
|
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")
|
|
61034
60958
|
}
|
|
61035
60959
|
]
|
|
61036
60960
|
]);
|
|
@@ -61440,9 +61364,9 @@ var detector = /* @__PURE__ */ __name((txt) => {
|
|
|
61440
61364
|
}, "detector");
|
|
61441
61365
|
var loader = /* @__PURE__ */ __name(async () => {
|
|
61442
61366
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61443
|
-
const { diagram: diagram22 } = await import("./c4Diagram-AAUBKEIU-
|
|
61367
|
+
const { diagram: diagram22 } = await import("./c4Diagram-AAUBKEIU-kAmLfVtk.js");
|
|
61444
61368
|
return { diagram: diagram22 };
|
|
61445
|
-
}, true ? __vite__mapDeps([
|
|
61369
|
+
}, true ? __vite__mapDeps([6,7,3]) : void 0, import.meta.url);
|
|
61446
61370
|
return { id: id$2, diagram: diagram2 };
|
|
61447
61371
|
}, "loader");
|
|
61448
61372
|
var plugin = {
|
|
@@ -61460,9 +61384,9 @@ var detector2 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61460
61384
|
}, "detector");
|
|
61461
61385
|
var loader2 = /* @__PURE__ */ __name(async () => {
|
|
61462
61386
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61463
|
-
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-
|
|
61387
|
+
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
|
|
61464
61388
|
return { diagram: diagram22 };
|
|
61465
|
-
}, true ? __vite__mapDeps([
|
|
61389
|
+
}, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
|
|
61466
61390
|
return { id: id2, diagram: diagram2 };
|
|
61467
61391
|
}, "loader");
|
|
61468
61392
|
var plugin2 = {
|
|
@@ -61486,9 +61410,9 @@ var detector3 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61486
61410
|
}, "detector");
|
|
61487
61411
|
var loader3 = /* @__PURE__ */ __name(async () => {
|
|
61488
61412
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61489
|
-
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-
|
|
61413
|
+
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
|
|
61490
61414
|
return { diagram: diagram22 };
|
|
61491
|
-
}, true ? __vite__mapDeps([
|
|
61415
|
+
}, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
|
|
61492
61416
|
return { id: id3, diagram: diagram2 };
|
|
61493
61417
|
}, "loader");
|
|
61494
61418
|
var plugin3 = {
|
|
@@ -61503,9 +61427,9 @@ var detector4 = /* @__PURE__ */ __name((txt) => {
|
|
|
61503
61427
|
}, "detector");
|
|
61504
61428
|
var loader4 = /* @__PURE__ */ __name(async () => {
|
|
61505
61429
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61506
|
-
const { diagram: diagram22 } = await import("./erDiagram-TEJ5UH35-
|
|
61430
|
+
const { diagram: diagram22 } = await import("./erDiagram-TEJ5UH35-CaKZCewa.js");
|
|
61507
61431
|
return { diagram: diagram22 };
|
|
61508
|
-
}, true ? __vite__mapDeps([
|
|
61432
|
+
}, true ? __vite__mapDeps([13,10,11,12,3]) : void 0, import.meta.url);
|
|
61509
61433
|
return { id: id4, diagram: diagram2 };
|
|
61510
61434
|
}, "loader");
|
|
61511
61435
|
var plugin4 = {
|
|
@@ -61520,9 +61444,9 @@ var detector5 = /* @__PURE__ */ __name((txt) => {
|
|
|
61520
61444
|
}, "detector");
|
|
61521
61445
|
var loader5 = /* @__PURE__ */ __name(async () => {
|
|
61522
61446
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61523
|
-
const { diagram: diagram22 } = await import("./gitGraphDiagram-PVQCEYII-
|
|
61447
|
+
const { diagram: diagram22 } = await import("./gitGraphDiagram-PVQCEYII-CZuRZzk4.js");
|
|
61524
61448
|
return { diagram: diagram22 };
|
|
61525
|
-
}, true ? __vite__mapDeps([
|
|
61449
|
+
}, true ? __vite__mapDeps([14,15,16,17,3]) : void 0, import.meta.url);
|
|
61526
61450
|
return { id: id5, diagram: diagram2 };
|
|
61527
61451
|
}, "loader");
|
|
61528
61452
|
var plugin5 = {
|
|
@@ -61537,9 +61461,9 @@ var detector6 = /* @__PURE__ */ __name((txt) => {
|
|
|
61537
61461
|
}, "detector");
|
|
61538
61462
|
var loader6 = /* @__PURE__ */ __name(async () => {
|
|
61539
61463
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61540
|
-
const { diagram: diagram22 } = await import("./ganttDiagram-6RSMTGT7-
|
|
61464
|
+
const { diagram: diagram22 } = await import("./ganttDiagram-6RSMTGT7-DnRvbMnU.js");
|
|
61541
61465
|
return { diagram: diagram22 };
|
|
61542
|
-
}, true ? __vite__mapDeps([
|
|
61466
|
+
}, true ? __vite__mapDeps([18,19,20,21,3]) : void 0, import.meta.url);
|
|
61543
61467
|
return { id: id6, diagram: diagram2 };
|
|
61544
61468
|
}, "loader");
|
|
61545
61469
|
var plugin6 = {
|
|
@@ -61554,9 +61478,9 @@ var detector7 = /* @__PURE__ */ __name((txt) => {
|
|
|
61554
61478
|
}, "detector");
|
|
61555
61479
|
var loader7 = /* @__PURE__ */ __name(async () => {
|
|
61556
61480
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61557
|
-
const { diagram: diagram22 } = await import("./infoDiagram-5YYISTIA-
|
|
61481
|
+
const { diagram: diagram22 } = await import("./infoDiagram-5YYISTIA-BlBUdqMb.js");
|
|
61558
61482
|
return { diagram: diagram22 };
|
|
61559
|
-
}, true ? __vite__mapDeps([
|
|
61483
|
+
}, true ? __vite__mapDeps([22,17,3]) : void 0, import.meta.url);
|
|
61560
61484
|
return { id: id7, diagram: diagram2 };
|
|
61561
61485
|
}, "loader");
|
|
61562
61486
|
var info = {
|
|
@@ -61570,9 +61494,9 @@ var detector8 = /* @__PURE__ */ __name((txt) => {
|
|
|
61570
61494
|
}, "detector");
|
|
61571
61495
|
var loader8 = /* @__PURE__ */ __name(async () => {
|
|
61572
61496
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61573
|
-
const { diagram: diagram22 } = await import("./pieDiagram-4H26LBE5-
|
|
61497
|
+
const { diagram: diagram22 } = await import("./pieDiagram-4H26LBE5-N9aAUxfr.js");
|
|
61574
61498
|
return { diagram: diagram22 };
|
|
61575
|
-
}, true ? __vite__mapDeps([
|
|
61499
|
+
}, true ? __vite__mapDeps([23,15,17,3,24,25,20]) : void 0, import.meta.url);
|
|
61576
61500
|
return { id: id8, diagram: diagram2 };
|
|
61577
61501
|
}, "loader");
|
|
61578
61502
|
var pie = {
|
|
@@ -61586,9 +61510,9 @@ var detector9 = /* @__PURE__ */ __name((txt) => {
|
|
|
61586
61510
|
}, "detector");
|
|
61587
61511
|
var loader9 = /* @__PURE__ */ __name(async () => {
|
|
61588
61512
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61589
|
-
const { diagram: diagram22 } = await import("./quadrantDiagram-W4KKPZXB-
|
|
61513
|
+
const { diagram: diagram22 } = await import("./quadrantDiagram-W4KKPZXB-BPxbtjga.js");
|
|
61590
61514
|
return { diagram: diagram22 };
|
|
61591
|
-
}, true ? __vite__mapDeps([
|
|
61515
|
+
}, true ? __vite__mapDeps([26,19,20,21,3]) : void 0, import.meta.url);
|
|
61592
61516
|
return { id: id9, diagram: diagram2 };
|
|
61593
61517
|
}, "loader");
|
|
61594
61518
|
var plugin7 = {
|
|
@@ -61603,9 +61527,9 @@ var detector10 = /* @__PURE__ */ __name((txt) => {
|
|
|
61603
61527
|
}, "detector");
|
|
61604
61528
|
var loader10 = /* @__PURE__ */ __name(async () => {
|
|
61605
61529
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61606
|
-
const { diagram: diagram22 } = await import("./xychartDiagram-2RQKCTM6-
|
|
61530
|
+
const { diagram: diagram22 } = await import("./xychartDiagram-2RQKCTM6-BHQdINVc.js");
|
|
61607
61531
|
return { diagram: diagram22 };
|
|
61608
|
-
}, true ? __vite__mapDeps([
|
|
61532
|
+
}, true ? __vite__mapDeps([27,20,25,19,21,3]) : void 0, import.meta.url);
|
|
61609
61533
|
return { id: id10, diagram: diagram2 };
|
|
61610
61534
|
}, "loader");
|
|
61611
61535
|
var plugin8 = {
|
|
@@ -61620,9 +61544,9 @@ var detector11 = /* @__PURE__ */ __name((txt) => {
|
|
|
61620
61544
|
}, "detector");
|
|
61621
61545
|
var loader11 = /* @__PURE__ */ __name(async () => {
|
|
61622
61546
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61623
|
-
const { diagram: diagram22 } = await import("./requirementDiagram-4Y6WPE33-
|
|
61547
|
+
const { diagram: diagram22 } = await import("./requirementDiagram-4Y6WPE33-CK1LrJyG.js");
|
|
61624
61548
|
return { diagram: diagram22 };
|
|
61625
|
-
}, true ? __vite__mapDeps([
|
|
61549
|
+
}, true ? __vite__mapDeps([28,10,11,3]) : void 0, import.meta.url);
|
|
61626
61550
|
return { id: id11, diagram: diagram2 };
|
|
61627
61551
|
}, "loader");
|
|
61628
61552
|
var plugin9 = {
|
|
@@ -61637,9 +61561,9 @@ var detector12 = /* @__PURE__ */ __name((txt) => {
|
|
|
61637
61561
|
}, "detector");
|
|
61638
61562
|
var loader12 = /* @__PURE__ */ __name(async () => {
|
|
61639
61563
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61640
|
-
const { diagram: diagram22 } = await import("./sequenceDiagram-3UESZ5HK-
|
|
61564
|
+
const { diagram: diagram22 } = await import("./sequenceDiagram-3UESZ5HK-B-r7lNhI.js");
|
|
61641
61565
|
return { diagram: diagram22 };
|
|
61642
|
-
}, true ? __vite__mapDeps([
|
|
61566
|
+
}, true ? __vite__mapDeps([29,7,16,3]) : void 0, import.meta.url);
|
|
61643
61567
|
return { id: id12, diagram: diagram2 };
|
|
61644
61568
|
}, "loader");
|
|
61645
61569
|
var plugin10 = {
|
|
@@ -61657,9 +61581,9 @@ var detector13 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61657
61581
|
}, "detector");
|
|
61658
61582
|
var loader13 = /* @__PURE__ */ __name(async () => {
|
|
61659
61583
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61660
|
-
const { diagram: diagram22 } = await import("./classDiagram-4FO5ZUOK-
|
|
61584
|
+
const { diagram: diagram22 } = await import("./classDiagram-4FO5ZUOK-nuHQLjzM.js");
|
|
61661
61585
|
return { diagram: diagram22 };
|
|
61662
|
-
}, true ? __vite__mapDeps([
|
|
61586
|
+
}, true ? __vite__mapDeps([30,31,9,7,10,11,3]) : void 0, import.meta.url);
|
|
61663
61587
|
return { id: id13, diagram: diagram2 };
|
|
61664
61588
|
}, "loader");
|
|
61665
61589
|
var plugin11 = {
|
|
@@ -61677,9 +61601,9 @@ var detector14 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61677
61601
|
}, "detector");
|
|
61678
61602
|
var loader14 = /* @__PURE__ */ __name(async () => {
|
|
61679
61603
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61680
|
-
const { diagram: diagram22 } = await import("./classDiagram-v2-Q7XG4LA2-
|
|
61604
|
+
const { diagram: diagram22 } = await import("./classDiagram-v2-Q7XG4LA2-nuHQLjzM.js");
|
|
61681
61605
|
return { diagram: diagram22 };
|
|
61682
|
-
}, true ? __vite__mapDeps([31,
|
|
61606
|
+
}, true ? __vite__mapDeps([32,31,9,7,10,11,3]) : void 0, import.meta.url);
|
|
61683
61607
|
return { id: id14, diagram: diagram2 };
|
|
61684
61608
|
}, "loader");
|
|
61685
61609
|
var plugin12 = {
|
|
@@ -61697,9 +61621,9 @@ var detector15 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61697
61621
|
}, "detector");
|
|
61698
61622
|
var loader15 = /* @__PURE__ */ __name(async () => {
|
|
61699
61623
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61700
|
-
const { diagram: diagram22 } = await import("./stateDiagram-AJRCARHV-
|
|
61624
|
+
const { diagram: diagram22 } = await import("./stateDiagram-AJRCARHV-wrWE0MRa.js");
|
|
61701
61625
|
return { diagram: diagram22 };
|
|
61702
|
-
}, true ? __vite__mapDeps([
|
|
61626
|
+
}, true ? __vite__mapDeps([33,34,10,11,1,2,3]) : void 0, import.meta.url);
|
|
61703
61627
|
return { id: id15, diagram: diagram2 };
|
|
61704
61628
|
}, "loader");
|
|
61705
61629
|
var plugin13 = {
|
|
@@ -61720,9 +61644,9 @@ var detector16 = /* @__PURE__ */ __name((txt, config2) => {
|
|
|
61720
61644
|
}, "detector");
|
|
61721
61645
|
var loader16 = /* @__PURE__ */ __name(async () => {
|
|
61722
61646
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61723
|
-
const { diagram: diagram22 } = await import("./stateDiagram-v2-BHNVJYJU-
|
|
61647
|
+
const { diagram: diagram22 } = await import("./stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js");
|
|
61724
61648
|
return { diagram: diagram22 };
|
|
61725
|
-
}, true ? __vite__mapDeps([34,
|
|
61649
|
+
}, true ? __vite__mapDeps([35,34,10,11,3]) : void 0, import.meta.url);
|
|
61726
61650
|
return { id: id16, diagram: diagram2 };
|
|
61727
61651
|
}, "loader");
|
|
61728
61652
|
var plugin14 = {
|
|
@@ -61737,9 +61661,9 @@ var detector17 = /* @__PURE__ */ __name((txt) => {
|
|
|
61737
61661
|
}, "detector");
|
|
61738
61662
|
var loader17 = /* @__PURE__ */ __name(async () => {
|
|
61739
61663
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61740
|
-
const { diagram: diagram22 } = await import("./journeyDiagram-JHISSGLW-
|
|
61664
|
+
const { diagram: diagram22 } = await import("./journeyDiagram-JHISSGLW-BLZa3jnX.js");
|
|
61741
61665
|
return { diagram: diagram22 };
|
|
61742
|
-
}, true ? __vite__mapDeps([
|
|
61666
|
+
}, true ? __vite__mapDeps([36,9,7,24,3]) : void 0, import.meta.url);
|
|
61743
61667
|
return { id: id17, diagram: diagram2 };
|
|
61744
61668
|
}, "loader");
|
|
61745
61669
|
var plugin15 = {
|
|
@@ -61807,9 +61731,9 @@ var detector18 = /* @__PURE__ */ __name((txt, config2 = {}) => {
|
|
|
61807
61731
|
}, "detector");
|
|
61808
61732
|
var loader18 = /* @__PURE__ */ __name(async () => {
|
|
61809
61733
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61810
|
-
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-
|
|
61734
|
+
const { diagram: diagram22 } = await import("./flowDiagram-I6XJVG4X-C8znUgyL.js");
|
|
61811
61735
|
return { diagram: diagram22 };
|
|
61812
|
-
}, true ? __vite__mapDeps([
|
|
61736
|
+
}, true ? __vite__mapDeps([8,9,7,10,11,12,3]) : void 0, import.meta.url);
|
|
61813
61737
|
return { id: id18, diagram: diagram2 };
|
|
61814
61738
|
}, "loader");
|
|
61815
61739
|
var plugin16 = {
|
|
@@ -61824,9 +61748,9 @@ var detector19 = /* @__PURE__ */ __name((txt) => {
|
|
|
61824
61748
|
}, "detector");
|
|
61825
61749
|
var loader19 = /* @__PURE__ */ __name(async () => {
|
|
61826
61750
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61827
|
-
const { diagram: diagram22 } = await import("./timeline-definition-PNZ67QCA-
|
|
61751
|
+
const { diagram: diagram22 } = await import("./timeline-definition-PNZ67QCA-BkeMGH4J.js");
|
|
61828
61752
|
return { diagram: diagram22 };
|
|
61829
|
-
}, true ? __vite__mapDeps([
|
|
61753
|
+
}, true ? __vite__mapDeps([37,24,3]) : void 0, import.meta.url);
|
|
61830
61754
|
return { id: id19, diagram: diagram2 };
|
|
61831
61755
|
}, "loader");
|
|
61832
61756
|
var plugin17 = {
|
|
@@ -61841,9 +61765,9 @@ var detector20 = /* @__PURE__ */ __name((txt) => {
|
|
|
61841
61765
|
}, "detector");
|
|
61842
61766
|
var loader20 = /* @__PURE__ */ __name(async () => {
|
|
61843
61767
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61844
|
-
const { diagram: diagram22 } = await import("./mindmap-definition-RKZ34NQL-
|
|
61768
|
+
const { diagram: diagram22 } = await import("./mindmap-definition-RKZ34NQL-5pGeNCcp.js");
|
|
61845
61769
|
return { diagram: diagram22 };
|
|
61846
|
-
}, true ? __vite__mapDeps([
|
|
61770
|
+
}, true ? __vite__mapDeps([38,10,11,3]) : void 0, import.meta.url);
|
|
61847
61771
|
return { id: id20, diagram: diagram2 };
|
|
61848
61772
|
}, "loader");
|
|
61849
61773
|
var plugin18 = {
|
|
@@ -61858,9 +61782,9 @@ var detector21 = /* @__PURE__ */ __name((txt) => {
|
|
|
61858
61782
|
}, "detector");
|
|
61859
61783
|
var loader21 = /* @__PURE__ */ __name(async () => {
|
|
61860
61784
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61861
|
-
const { diagram: diagram22 } = await import("./kanban-definition-UN3LZRKU-
|
|
61785
|
+
const { diagram: diagram22 } = await import("./kanban-definition-UN3LZRKU-foVxWrJn.js");
|
|
61862
61786
|
return { diagram: diagram22 };
|
|
61863
|
-
}, true ? __vite__mapDeps([
|
|
61787
|
+
}, true ? __vite__mapDeps([39,9,3]) : void 0, import.meta.url);
|
|
61864
61788
|
return { id: id21, diagram: diagram2 };
|
|
61865
61789
|
}, "loader");
|
|
61866
61790
|
var plugin19 = {
|
|
@@ -61875,9 +61799,9 @@ var detector22 = /* @__PURE__ */ __name((txt) => {
|
|
|
61875
61799
|
}, "detector");
|
|
61876
61800
|
var loader22 = /* @__PURE__ */ __name(async () => {
|
|
61877
61801
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61878
|
-
const { diagram: diagram22 } = await import("./sankeyDiagram-5OEKKPKP-
|
|
61802
|
+
const { diagram: diagram22 } = await import("./sankeyDiagram-5OEKKPKP-BNj7Sqii.js");
|
|
61879
61803
|
return { diagram: diagram22 };
|
|
61880
|
-
}, true ? __vite__mapDeps([
|
|
61804
|
+
}, true ? __vite__mapDeps([40,25,20,3]) : void 0, import.meta.url);
|
|
61881
61805
|
return { id: id22, diagram: diagram2 };
|
|
61882
61806
|
}, "loader");
|
|
61883
61807
|
var plugin20 = {
|
|
@@ -61892,9 +61816,9 @@ var detector23 = /* @__PURE__ */ __name((txt) => {
|
|
|
61892
61816
|
}, "detector");
|
|
61893
61817
|
var loader23 = /* @__PURE__ */ __name(async () => {
|
|
61894
61818
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61895
|
-
const { diagram: diagram22 } = await import("./diagram-LMA3HP47-
|
|
61819
|
+
const { diagram: diagram22 } = await import("./diagram-LMA3HP47-DqDnw2RA.js");
|
|
61896
61820
|
return { diagram: diagram22 };
|
|
61897
|
-
}, true ? __vite__mapDeps([
|
|
61821
|
+
}, true ? __vite__mapDeps([41,15,17,3]) : void 0, import.meta.url);
|
|
61898
61822
|
return { id: id23, diagram: diagram2 };
|
|
61899
61823
|
}, "loader");
|
|
61900
61824
|
var packet = {
|
|
@@ -61908,9 +61832,9 @@ var detector24 = /* @__PURE__ */ __name((txt) => {
|
|
|
61908
61832
|
}, "detector");
|
|
61909
61833
|
var loader24 = /* @__PURE__ */ __name(async () => {
|
|
61910
61834
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61911
|
-
const { diagram: diagram22 } = await import("./diagram-2AECGRRQ-
|
|
61835
|
+
const { diagram: diagram22 } = await import("./diagram-2AECGRRQ-F-fP19TC.js");
|
|
61912
61836
|
return { diagram: diagram22 };
|
|
61913
|
-
}, true ? __vite__mapDeps([
|
|
61837
|
+
}, true ? __vite__mapDeps([42,15,17,3]) : void 0, import.meta.url);
|
|
61914
61838
|
return { id: id24, diagram: diagram2 };
|
|
61915
61839
|
}, "loader");
|
|
61916
61840
|
var radar = {
|
|
@@ -61924,9 +61848,9 @@ var detector25 = /* @__PURE__ */ __name((txt) => {
|
|
|
61924
61848
|
}, "detector");
|
|
61925
61849
|
var loader25 = /* @__PURE__ */ __name(async () => {
|
|
61926
61850
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61927
|
-
const { diagram: diagram22 } = await import("./blockDiagram-GPEHLZMM-
|
|
61851
|
+
const { diagram: diagram22 } = await import("./blockDiagram-GPEHLZMM-DOETUKma.js");
|
|
61928
61852
|
return { diagram: diagram22 };
|
|
61929
|
-
}, true ? __vite__mapDeps([
|
|
61853
|
+
}, true ? __vite__mapDeps([43,9,1,12,3]) : void 0, import.meta.url);
|
|
61930
61854
|
return { id: id25, diagram: diagram2 };
|
|
61931
61855
|
}, "loader");
|
|
61932
61856
|
var plugin21 = {
|
|
@@ -61941,9 +61865,9 @@ var detector26 = /* @__PURE__ */ __name((txt) => {
|
|
|
61941
61865
|
}, "detector");
|
|
61942
61866
|
var loader26 = /* @__PURE__ */ __name(async () => {
|
|
61943
61867
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61944
|
-
const { diagram: diagram22 } = await import("./diagram-5GNKFQAL-
|
|
61868
|
+
const { diagram: diagram22 } = await import("./diagram-5GNKFQAL-BD5XZc8G.js");
|
|
61945
61869
|
return { diagram: diagram22 };
|
|
61946
|
-
}, true ? __vite__mapDeps([
|
|
61870
|
+
}, true ? __vite__mapDeps([44,15,16,17,3]) : void 0, import.meta.url);
|
|
61947
61871
|
return { id: id26, diagram: diagram2 };
|
|
61948
61872
|
}, "loader");
|
|
61949
61873
|
var plugin22 = {
|
|
@@ -61958,9 +61882,9 @@ var detector27 = /* @__PURE__ */ __name((txt) => {
|
|
|
61958
61882
|
}, "detector");
|
|
61959
61883
|
var loader27 = /* @__PURE__ */ __name(async () => {
|
|
61960
61884
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61961
|
-
const { diagram: diagram22 } = await import("./architectureDiagram-3BPJPVTR-
|
|
61885
|
+
const { diagram: diagram22 } = await import("./architectureDiagram-3BPJPVTR-DDfP-F9D.js");
|
|
61962
61886
|
return { diagram: diagram22 };
|
|
61963
|
-
}, true ? __vite__mapDeps([
|
|
61887
|
+
}, true ? __vite__mapDeps([45,15,17,3,5]) : void 0, import.meta.url);
|
|
61964
61888
|
return { id: id27, diagram: diagram2 };
|
|
61965
61889
|
}, "loader");
|
|
61966
61890
|
var architecture = {
|
|
@@ -61975,9 +61899,9 @@ var detector28 = /* @__PURE__ */ __name((txt) => {
|
|
|
61975
61899
|
}, "detector");
|
|
61976
61900
|
var loader28 = /* @__PURE__ */ __name(async () => {
|
|
61977
61901
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61978
|
-
const { diagram: diagram22 } = await import("./diagram-KO2AKTUF-
|
|
61902
|
+
const { diagram: diagram22 } = await import("./diagram-KO2AKTUF-Qa3ZxA67.js");
|
|
61979
61903
|
return { diagram: diagram22 };
|
|
61980
|
-
}, true ? __vite__mapDeps([
|
|
61904
|
+
}, true ? __vite__mapDeps([46,15,17,3]) : void 0, import.meta.url);
|
|
61981
61905
|
return { id: id28, diagram: diagram2 };
|
|
61982
61906
|
}, "loader");
|
|
61983
61907
|
var plugin23 = {
|
|
@@ -61992,9 +61916,9 @@ var detector29 = /* @__PURE__ */ __name((txt) => {
|
|
|
61992
61916
|
}, "detector");
|
|
61993
61917
|
var loader29 = /* @__PURE__ */ __name(async () => {
|
|
61994
61918
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
61995
|
-
const { diagram: diagram22 } = await import("./ishikawaDiagram-YF4QCWOH-
|
|
61919
|
+
const { diagram: diagram22 } = await import("./ishikawaDiagram-YF4QCWOH-TeVytCrP.js");
|
|
61996
61920
|
return { diagram: diagram22 };
|
|
61997
|
-
}, true ? [] : void 0, import.meta.url);
|
|
61921
|
+
}, true ? __vite__mapDeps([47,3]) : void 0, import.meta.url);
|
|
61998
61922
|
return { id: id29, diagram: diagram2 };
|
|
61999
61923
|
}, "loader");
|
|
62000
61924
|
var ishikawa = {
|
|
@@ -62008,9 +61932,9 @@ var detector30 = /* @__PURE__ */ __name((txt) => {
|
|
|
62008
61932
|
}, "detector");
|
|
62009
61933
|
var loader30 = /* @__PURE__ */ __name(async () => {
|
|
62010
61934
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
62011
|
-
const { diagram: diagram22 } = await import("./vennDiagram-CIIHVFJN-
|
|
61935
|
+
const { diagram: diagram22 } = await import("./vennDiagram-CIIHVFJN-BTxVzto3.js");
|
|
62012
61936
|
return { diagram: diagram22 };
|
|
62013
|
-
}, true ? [] : void 0, import.meta.url);
|
|
61937
|
+
}, true ? __vite__mapDeps([48,3]) : void 0, import.meta.url);
|
|
62014
61938
|
return { id: id30, diagram: diagram2 };
|
|
62015
61939
|
}, "loader");
|
|
62016
61940
|
var plugin24 = {
|
|
@@ -62025,9 +61949,9 @@ var detector31 = /* @__PURE__ */ __name((txt) => {
|
|
|
62025
61949
|
}, "detector");
|
|
62026
61950
|
var loader31 = /* @__PURE__ */ __name(async () => {
|
|
62027
61951
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
62028
|
-
const { diagram: diagram22 } = await import("./diagram-OG6HWLK6-
|
|
61952
|
+
const { diagram: diagram22 } = await import("./diagram-OG6HWLK6-BH4Elzby.js");
|
|
62029
61953
|
return { diagram: diagram22 };
|
|
62030
|
-
}, true ? __vite__mapDeps([
|
|
61954
|
+
}, true ? __vite__mapDeps([49,11,15,17,3,21,25,20]) : void 0, import.meta.url);
|
|
62031
61955
|
return { id: id31, diagram: diagram2 };
|
|
62032
61956
|
}, "loader");
|
|
62033
61957
|
var treemap = {
|
|
@@ -62041,9 +61965,9 @@ var detector32 = /* @__PURE__ */ __name((text2) => {
|
|
|
62041
61965
|
}, "detector");
|
|
62042
61966
|
var loader32 = /* @__PURE__ */ __name(async () => {
|
|
62043
61967
|
const { diagram: diagram2 } = await __vitePreload(async () => {
|
|
62044
|
-
const { diagram: diagram22 } = await import("./wardleyDiagram-YWT4CUSO-
|
|
61968
|
+
const { diagram: diagram22 } = await import("./wardleyDiagram-YWT4CUSO-D2r5dVGW.js");
|
|
62045
61969
|
return { diagram: diagram22 };
|
|
62046
|
-
}, true ? __vite__mapDeps([
|
|
61970
|
+
}, true ? __vite__mapDeps([50,15,17,3]) : void 0, import.meta.url);
|
|
62047
61971
|
return { id: id32, diagram: diagram2 };
|
|
62048
61972
|
}, "loader");
|
|
62049
61973
|
var plugin25 = {
|
|
@@ -62874,6 +62798,12 @@ var mermaid_default = mermaid;
|
|
|
62874
62798
|
* Wait for document loaded before starting the execution
|
|
62875
62799
|
*/
|
|
62876
62800
|
window.mermaid = mermaid_default;
|
|
62801
|
+
const pendingRenders = /* @__PURE__ */ new Set();
|
|
62802
|
+
function awaitAllMermaidRenders() {
|
|
62803
|
+
const promises = Array.from(pendingRenders);
|
|
62804
|
+
return Promise.allSettled(promises).then(() => {
|
|
62805
|
+
});
|
|
62806
|
+
}
|
|
62877
62807
|
function getMermaidTheme() {
|
|
62878
62808
|
const cls = document.body.className;
|
|
62879
62809
|
if (cls.includes("theme-dark")) return "dark";
|
|
@@ -62885,17 +62815,20 @@ function getMermaidTheme() {
|
|
|
62885
62815
|
}
|
|
62886
62816
|
return "default";
|
|
62887
62817
|
}
|
|
62888
|
-
function
|
|
62889
|
-
|
|
62818
|
+
function getCustomMermaidCSS() {
|
|
62819
|
+
return getComputedStyle(document.body);
|
|
62820
|
+
}
|
|
62821
|
+
function readCustomVar(style, name, fallback) {
|
|
62890
62822
|
return style.getPropertyValue(name).trim() || fallback;
|
|
62891
62823
|
}
|
|
62892
62824
|
function getCustomMermaidFontSize() {
|
|
62893
|
-
const raw =
|
|
62825
|
+
const raw = getCustomMermaidCSS().getPropertyValue("--mermaid-font-size").trim();
|
|
62894
62826
|
const n2 = parseInt(raw, 10);
|
|
62895
62827
|
return Number.isFinite(n2) && n2 > 0 ? n2 : 12;
|
|
62896
62828
|
}
|
|
62897
62829
|
function getCustomMermaidThemeVariables() {
|
|
62898
|
-
const
|
|
62830
|
+
const style = getCustomMermaidCSS();
|
|
62831
|
+
const v2 = (name, fallback) => readCustomVar(style, name, fallback);
|
|
62899
62832
|
const baseFont = '-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif';
|
|
62900
62833
|
const font = v2("--mermaid-font-family", baseFont);
|
|
62901
62834
|
const darkMode = v2("--mermaid-dark-mode", "false");
|
|
@@ -62903,7 +62836,7 @@ function getCustomMermaidThemeVariables() {
|
|
|
62903
62836
|
darkMode,
|
|
62904
62837
|
background: v2("--mermaid-background", v2("--bg-color", "#ffffff")),
|
|
62905
62838
|
primaryColor: v2("--mermaid-primary-color", v2("--code-block-bg", "#f6f8fa")),
|
|
62906
|
-
primaryBorderColor: v2("--mermaid-
|
|
62839
|
+
primaryBorderColor: v2("--mermaid-node-stroke", v2("--border-color", "#d0d7de")),
|
|
62907
62840
|
primaryTextColor: v2("--mermaid-primary-text-color", v2("--text-color", "#24292f")),
|
|
62908
62841
|
secondaryColor: v2("--mermaid-secondary-color", v2("--code-bg", "#f6f8fa")),
|
|
62909
62842
|
secondaryBorderColor: v2("--mermaid-secondary-border-color", v2("--border-color", "#d0d7de")),
|
|
@@ -62911,21 +62844,21 @@ function getCustomMermaidThemeVariables() {
|
|
|
62911
62844
|
tertiaryColor: v2("--mermaid-tertiary-color", v2("--bg-color", "#ffffff")),
|
|
62912
62845
|
tertiaryBorderColor: v2("--mermaid-tertiary-border-color", v2("--border-color", "#d0d7de")),
|
|
62913
62846
|
tertiaryTextColor: v2("--mermaid-tertiary-text-color", v2("--text-color", "#24292f")),
|
|
62914
|
-
lineColor: v2("--mermaid-
|
|
62915
|
-
textColor: v2("--mermaid-text
|
|
62847
|
+
lineColor: v2("--mermaid-edge-stroke", v2("--border-color", "#d0d7de")),
|
|
62848
|
+
textColor: v2("--mermaid-label-text", v2("--text-color", "#24292f")),
|
|
62916
62849
|
mainBkg: v2("--mermaid-main-bkg", v2("--code-block-bg", "#f6f8fa")),
|
|
62917
62850
|
secondBkg: v2("--mermaid-second-bkg", v2("--code-bg", "#f6f8fa")),
|
|
62918
62851
|
mainContrastColor: v2("--mermaid-primary-text-color", v2("--text-color", "#24292f")),
|
|
62919
62852
|
labelBackground: v2("--mermaid-label-background", v2("--code-block-bg", "#f6f8fa")),
|
|
62920
62853
|
labelTextColor: v2("--mermaid-label-text-color", v2("--text-color", "#24292f")),
|
|
62921
|
-
nodeBorder: v2("--mermaid-node-
|
|
62854
|
+
nodeBorder: v2("--mermaid-node-stroke", v2("--border-color", "#d0d7de")),
|
|
62922
62855
|
nodeBkg: v2("--mermaid-node-bkg", v2("--code-block-bg", "#f6f8fa")),
|
|
62923
62856
|
clusterBkg: v2("--mermaid-cluster-bkg", v2("--code-bg", "#f6f8fa")),
|
|
62924
|
-
clusterBorder: v2("--mermaid-cluster-
|
|
62925
|
-
defaultLinkColor: v2("--mermaid-
|
|
62857
|
+
clusterBorder: v2("--mermaid-cluster-stroke", v2("--border-color", "#d0d7de")),
|
|
62858
|
+
defaultLinkColor: v2("--mermaid-edge-stroke", v2("--border-color", "#d0d7de")),
|
|
62926
62859
|
edgeLabelBackground: v2("--mermaid-edge-label-background", v2("--code-block-bg", "#f6f8fa")),
|
|
62927
|
-
arrowheadColor: v2("--mermaid-
|
|
62928
|
-
personBorder: v2("--mermaid-person-
|
|
62860
|
+
arrowheadColor: v2("--mermaid-edge-stroke", v2("--border-color", "#d0d7de")),
|
|
62861
|
+
personBorder: v2("--mermaid-person-stroke", v2("--border-color", "#d0d7de")),
|
|
62929
62862
|
personBkg: v2("--mermaid-person-bkg", v2("--code-block-bg", "#f6f8fa")),
|
|
62930
62863
|
fontFamily: font,
|
|
62931
62864
|
cScale0: v2("--mermaid-cscale0", "#2d5f8a"),
|
|
@@ -62944,7 +62877,8 @@ function getCustomMermaidThemeVariables() {
|
|
|
62944
62877
|
return result;
|
|
62945
62878
|
}
|
|
62946
62879
|
function getCustomMermaidC4Config() {
|
|
62947
|
-
const
|
|
62880
|
+
const style = getCustomMermaidCSS();
|
|
62881
|
+
const v2 = (name, fallback) => readCustomVar(style, name, fallback);
|
|
62948
62882
|
const baseFont = '-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif';
|
|
62949
62883
|
const font = v2("--mermaid-font-family", baseFont);
|
|
62950
62884
|
return {
|
|
@@ -62955,45 +62889,45 @@ function getCustomMermaidC4Config() {
|
|
|
62955
62889
|
boundaryFontFamily: font,
|
|
62956
62890
|
messageFontFamily: font,
|
|
62957
62891
|
person_bg_color: v2("--mermaid-c4-person-bg", "#2d5f8a"),
|
|
62958
|
-
person_border_color: v2("--mermaid-c4-person-
|
|
62892
|
+
person_border_color: v2("--mermaid-c4-person-stroke", "#4a7aaa"),
|
|
62959
62893
|
external_person_bg_color: v2("--mermaid-c4-ext-person-bg", "#4a5568"),
|
|
62960
|
-
external_person_border_color: v2("--mermaid-c4-ext-person-
|
|
62894
|
+
external_person_border_color: v2("--mermaid-c4-ext-person-stroke", "#6b7a8a"),
|
|
62961
62895
|
system_bg_color: v2("--mermaid-c4-system-bg", "#3d7a5a"),
|
|
62962
|
-
system_border_color: v2("--mermaid-c4-system-
|
|
62896
|
+
system_border_color: v2("--mermaid-c4-system-stroke", "#5a9a7a"),
|
|
62963
62897
|
system_db_bg_color: v2("--mermaid-c4-system-bg", "#3d7a5a"),
|
|
62964
|
-
system_db_border_color: v2("--mermaid-c4-system-
|
|
62898
|
+
system_db_border_color: v2("--mermaid-c4-system-stroke", "#5a9a7a"),
|
|
62965
62899
|
system_queue_bg_color: v2("--mermaid-c4-system-bg", "#3d7a5a"),
|
|
62966
|
-
system_queue_border_color: v2("--mermaid-c4-system-
|
|
62900
|
+
system_queue_border_color: v2("--mermaid-c4-system-stroke", "#5a9a7a"),
|
|
62967
62901
|
external_system_bg_color: v2("--mermaid-c4-ext-system-bg", "#6b4a7a"),
|
|
62968
|
-
external_system_border_color: v2("--mermaid-c4-ext-system-
|
|
62902
|
+
external_system_border_color: v2("--mermaid-c4-ext-system-stroke", "#8a6a9a"),
|
|
62969
62903
|
external_system_db_bg_color: v2("--mermaid-c4-ext-system-bg", "#6b4a7a"),
|
|
62970
|
-
external_system_db_border_color: v2("--mermaid-c4-ext-system-
|
|
62904
|
+
external_system_db_border_color: v2("--mermaid-c4-ext-system-stroke", "#8a6a9a"),
|
|
62971
62905
|
external_system_queue_bg_color: v2("--mermaid-c4-ext-system-bg", "#6b4a7a"),
|
|
62972
|
-
external_system_queue_border_color: v2("--mermaid-c4-ext-system-
|
|
62906
|
+
external_system_queue_border_color: v2("--mermaid-c4-ext-system-stroke", "#8a6a9a"),
|
|
62973
62907
|
container_bg_color: v2("--mermaid-c4-container-bg", "#8a6b3c"),
|
|
62974
|
-
container_border_color: v2("--mermaid-c4-container-
|
|
62908
|
+
container_border_color: v2("--mermaid-c4-container-stroke", "#aa8a5c"),
|
|
62975
62909
|
container_db_bg_color: v2("--mermaid-c4-container-bg", "#8a6b3c"),
|
|
62976
|
-
container_db_border_color: v2("--mermaid-c4-container-
|
|
62910
|
+
container_db_border_color: v2("--mermaid-c4-container-stroke", "#aa8a5c"),
|
|
62977
62911
|
container_queue_bg_color: v2("--mermaid-c4-container-bg", "#8a6b3c"),
|
|
62978
|
-
container_queue_border_color: v2("--mermaid-c4-container-
|
|
62912
|
+
container_queue_border_color: v2("--mermaid-c4-container-stroke", "#aa8a5c"),
|
|
62979
62913
|
external_container_bg_color: v2("--mermaid-c4-ext-container-bg", "#5a5a6a"),
|
|
62980
|
-
external_container_border_color: v2("--mermaid-c4-ext-container-
|
|
62914
|
+
external_container_border_color: v2("--mermaid-c4-ext-container-stroke", "#7a7a8a"),
|
|
62981
62915
|
external_container_db_bg_color: v2("--mermaid-c4-ext-container-bg", "#5a5a6a"),
|
|
62982
|
-
external_container_db_border_color: v2("--mermaid-c4-ext-container-
|
|
62916
|
+
external_container_db_border_color: v2("--mermaid-c4-ext-container-stroke", "#7a7a8a"),
|
|
62983
62917
|
external_container_queue_bg_color: v2("--mermaid-c4-ext-container-bg", "#5a5a6a"),
|
|
62984
|
-
external_container_queue_border_color: v2("--mermaid-c4-ext-container-
|
|
62918
|
+
external_container_queue_border_color: v2("--mermaid-c4-ext-container-stroke", "#7a7a8a"),
|
|
62985
62919
|
component_bg_color: v2("--mermaid-c4-component-bg", "#3c7a6b"),
|
|
62986
|
-
component_border_color: v2("--mermaid-c4-component-
|
|
62920
|
+
component_border_color: v2("--mermaid-c4-component-stroke", "#5c9a8b"),
|
|
62987
62921
|
component_db_bg_color: v2("--mermaid-c4-component-bg", "#3c7a6b"),
|
|
62988
|
-
component_db_border_color: v2("--mermaid-c4-component-
|
|
62922
|
+
component_db_border_color: v2("--mermaid-c4-component-stroke", "#5c9a8b"),
|
|
62989
62923
|
component_queue_bg_color: v2("--mermaid-c4-component-bg", "#3c7a6b"),
|
|
62990
|
-
component_queue_border_color: v2("--mermaid-c4-component-
|
|
62924
|
+
component_queue_border_color: v2("--mermaid-c4-component-stroke", "#5c9a8b"),
|
|
62991
62925
|
external_component_bg_color: v2("--mermaid-c4-ext-component-bg", "#6a6a6a"),
|
|
62992
|
-
external_component_border_color: v2("--mermaid-c4-ext-component-
|
|
62926
|
+
external_component_border_color: v2("--mermaid-c4-ext-component-stroke", "#8a8a8a"),
|
|
62993
62927
|
external_component_db_bg_color: v2("--mermaid-c4-ext-component-bg", "#6a6a6a"),
|
|
62994
|
-
external_component_db_border_color: v2("--mermaid-c4-ext-component-
|
|
62928
|
+
external_component_db_border_color: v2("--mermaid-c4-ext-component-stroke", "#8a8a8a"),
|
|
62995
62929
|
external_component_queue_bg_color: v2("--mermaid-c4-ext-component-bg", "#6a6a6a"),
|
|
62996
|
-
external_component_queue_border_color: v2("--mermaid-c4-ext-component-
|
|
62930
|
+
external_component_queue_border_color: v2("--mermaid-c4-ext-component-stroke", "#8a8a8a")
|
|
62997
62931
|
};
|
|
62998
62932
|
}
|
|
62999
62933
|
function getMermaidThemeVariables() {
|
|
@@ -63279,8 +63213,8 @@ const mermaidBlockSchema = $nodeSchema("mermaid_block", () => ({
|
|
|
63279
63213
|
toDOM: (node2) => {
|
|
63280
63214
|
const container = document.createElement("div");
|
|
63281
63215
|
container.className = "mermaid-block";
|
|
63282
|
-
container.dataset.mermaid = node2.attrs.text;
|
|
63283
63216
|
const text2 = (node2.attrs.text || "").trim();
|
|
63217
|
+
container.dataset.mermaid = text2;
|
|
63284
63218
|
if (node2.attrs.mode === "raw") {
|
|
63285
63219
|
const el = document.createElement("pre");
|
|
63286
63220
|
el.className = "mermaid-raw";
|
|
@@ -63288,36 +63222,7 @@ const mermaidBlockSchema = $nodeSchema("mermaid_block", () => ({
|
|
|
63288
63222
|
el.textContent = "```mermaid\n" + text2 + "\n```";
|
|
63289
63223
|
return { dom: el };
|
|
63290
63224
|
}
|
|
63291
|
-
if (!text2) {
|
|
63292
|
-
container.innerHTML = '<div class="mermaid-preview"><div class="mermaid-loading">Empty diagram</div></div>';
|
|
63293
|
-
return { dom: container };
|
|
63294
|
-
}
|
|
63295
|
-
const mermaidLib = window.mermaid;
|
|
63296
|
-
if (!mermaidLib || typeof mermaidLib.render !== "function") {
|
|
63297
|
-
container.innerHTML = '<div class="mermaid-preview"><div class="mermaid-error">Mermaid not loaded</div></div>';
|
|
63298
|
-
return { dom: container };
|
|
63299
|
-
}
|
|
63300
63225
|
container.innerHTML = '<div class="mermaid-preview"><div class="mermaid-loading">Rendering...</div></div>';
|
|
63301
|
-
const id33 = "mermaid-" + ++renderCounter;
|
|
63302
|
-
try {
|
|
63303
|
-
mermaidLib.render(id33, text2).then((result) => {
|
|
63304
|
-
const preview = container.querySelector(".mermaid-preview");
|
|
63305
|
-
if (preview) {
|
|
63306
|
-
preview.innerHTML = result.svg;
|
|
63307
|
-
const svg2 = preview.querySelector("svg");
|
|
63308
|
-
if (svg2) adjustNodeHeights(svg2);
|
|
63309
|
-
if (result.bindFunctions) result.bindFunctions(container);
|
|
63310
|
-
}
|
|
63311
|
-
}).catch((e2) => {
|
|
63312
|
-
const preview = container.querySelector(".mermaid-preview");
|
|
63313
|
-
if (preview) {
|
|
63314
|
-
const msg = e2.message.replace(/&/g, "&").replace(/</g, "<");
|
|
63315
|
-
preview.innerHTML = '<div class="mermaid-error">Error: ' + msg + "</div>";
|
|
63316
|
-
}
|
|
63317
|
-
});
|
|
63318
|
-
} catch (e2) {
|
|
63319
|
-
container.innerHTML = '<div class="mermaid-preview"><div class="mermaid-error">' + String(e2.message || e2) + "</div></div>";
|
|
63320
|
-
}
|
|
63321
63226
|
return { dom: container };
|
|
63322
63227
|
},
|
|
63323
63228
|
parseMarkdown: {
|
|
@@ -63365,7 +63270,7 @@ function renderMermaidBlock(dom, node2, renderIdRef) {
|
|
|
63365
63270
|
}
|
|
63366
63271
|
dom.innerHTML = '<div class="mermaid-preview"><div class="mermaid-loading">Rendering...</div></div>';
|
|
63367
63272
|
const id33 = "mermaid-" + ++renderCounter;
|
|
63368
|
-
mermaidLib.render(id33, text2).then((result) => {
|
|
63273
|
+
const renderPromise = mermaidLib.render(id33, text2).then((result) => {
|
|
63369
63274
|
if (currentRenderId !== renderIdRef.current) return;
|
|
63370
63275
|
const preview = dom.querySelector(".mermaid-preview");
|
|
63371
63276
|
if (preview) {
|
|
@@ -63381,7 +63286,10 @@ function renderMermaidBlock(dom, node2, renderIdRef) {
|
|
|
63381
63286
|
const msg = e2.message.replace(/&/g, "&").replace(/</g, "<");
|
|
63382
63287
|
preview.innerHTML = '<div class="mermaid-error">Error: ' + msg + "</div>";
|
|
63383
63288
|
}
|
|
63289
|
+
}).finally(() => {
|
|
63290
|
+
pendingRenders.delete(renderPromise);
|
|
63384
63291
|
});
|
|
63292
|
+
pendingRenders.add(renderPromise);
|
|
63385
63293
|
}
|
|
63386
63294
|
const mermaidBlockView = $view(mermaidBlockSchema, (_ctx) => {
|
|
63387
63295
|
return (node2, view, getPos) => {
|
|
@@ -63466,6 +63374,16 @@ const mermaidPlugin = {
|
|
|
63466
63374
|
enabled: true,
|
|
63467
63375
|
remarkPlugin: { plugin: remarkMermaid, options: void 0 },
|
|
63468
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"],
|
|
63469
63387
|
exportCapabilities: [
|
|
63470
63388
|
{
|
|
63471
63389
|
label: "Save Diagram as PNG",
|
|
@@ -63488,6 +63406,8 @@ const mermaidPlugin = {
|
|
|
63488
63406
|
themeVariables: getMermaidThemeVariables(),
|
|
63489
63407
|
c4: getMermaidC4Config(),
|
|
63490
63408
|
securityLevel: "loose",
|
|
63409
|
+
logLevel: "error",
|
|
63410
|
+
suppressErrorRendering: true,
|
|
63491
63411
|
fontSize
|
|
63492
63412
|
});
|
|
63493
63413
|
},
|
|
@@ -63501,9 +63421,12 @@ const mermaidPlugin = {
|
|
|
63501
63421
|
themeVariables: getMermaidThemeVariables(),
|
|
63502
63422
|
c4: getMermaidC4Config(),
|
|
63503
63423
|
securityLevel: "loose",
|
|
63424
|
+
logLevel: "error",
|
|
63425
|
+
suppressErrorRendering: true,
|
|
63504
63426
|
fontSize
|
|
63505
63427
|
});
|
|
63506
|
-
}
|
|
63428
|
+
},
|
|
63429
|
+
ensureRendered: awaitAllMermaidRenders
|
|
63507
63430
|
};
|
|
63508
63431
|
registerPluginModule({
|
|
63509
63432
|
info: mermaidPlugin,
|
|
@@ -65879,12 +65802,12 @@ var TableMap = class {
|
|
|
65879
65802
|
}
|
|
65880
65803
|
cellsInRect(rect2) {
|
|
65881
65804
|
const result = [];
|
|
65882
|
-
const
|
|
65805
|
+
const seen = {};
|
|
65883
65806
|
for (let row = rect2.top; row < rect2.bottom; row++) for (let col = rect2.left; col < rect2.right; col++) {
|
|
65884
65807
|
const index2 = row * this.width + col;
|
|
65885
65808
|
const pos = this.map[index2];
|
|
65886
|
-
if (
|
|
65887
|
-
|
|
65809
|
+
if (seen[pos]) continue;
|
|
65810
|
+
seen[pos] = true;
|
|
65888
65811
|
if (col == rect2.left && col && this.map[index2 - 1] == pos || row == rect2.top && row && this.map[index2 - this.width] == pos) continue;
|
|
65889
65812
|
result.push(pos);
|
|
65890
65813
|
}
|
|
@@ -65995,11 +65918,11 @@ function findWidth(table) {
|
|
|
65995
65918
|
}
|
|
65996
65919
|
function findBadColWidths(map3, colWidths, table) {
|
|
65997
65920
|
if (!map3.problems) map3.problems = [];
|
|
65998
|
-
const
|
|
65921
|
+
const seen = {};
|
|
65999
65922
|
for (let i2 = 0; i2 < map3.map.length; i2++) {
|
|
66000
65923
|
const pos = map3.map[i2];
|
|
66001
|
-
if (
|
|
66002
|
-
|
|
65924
|
+
if (seen[pos]) continue;
|
|
65925
|
+
seen[pos] = true;
|
|
66003
65926
|
const node2 = table.nodeAt(pos);
|
|
66004
65927
|
if (!node2) throw new RangeError(`No cell with offset ${pos} found`);
|
|
66005
65928
|
let updated = null;
|
|
@@ -66247,14 +66170,14 @@ var CellSelection = class CellSelection2 extends Selection$2 {
|
|
|
66247
66170
|
const map3 = TableMap.get(table);
|
|
66248
66171
|
const tableStart = this.$anchorCell.start(-1);
|
|
66249
66172
|
const rect2 = map3.rectBetween(this.$anchorCell.pos - tableStart, this.$headCell.pos - tableStart);
|
|
66250
|
-
const
|
|
66173
|
+
const seen = {};
|
|
66251
66174
|
const rows = [];
|
|
66252
66175
|
for (let row = rect2.top; row < rect2.bottom; row++) {
|
|
66253
66176
|
const rowContent = [];
|
|
66254
66177
|
for (let index2 = row * map3.width + rect2.left, col = rect2.left; col < rect2.right; col++, index2++) {
|
|
66255
66178
|
const pos = map3.map[index2];
|
|
66256
|
-
if (
|
|
66257
|
-
|
|
66179
|
+
if (seen[pos]) continue;
|
|
66180
|
+
seen[pos] = true;
|
|
66258
66181
|
const cellRect = map3.findCell(pos);
|
|
66259
66182
|
let cell = table.nodeAt(pos);
|
|
66260
66183
|
if (!cell) throw new RangeError(`No cell with offset ${pos} found`);
|
|
@@ -66888,11 +66811,11 @@ function removeRow(tr, { map: map3, table, tableStart }, row) {
|
|
|
66888
66811
|
const nextRow = rowPos + table.child(row).nodeSize;
|
|
66889
66812
|
const mapFrom = tr.mapping.maps.length;
|
|
66890
66813
|
tr.delete(rowPos + tableStart, nextRow + tableStart);
|
|
66891
|
-
const
|
|
66814
|
+
const seen = /* @__PURE__ */ new Set();
|
|
66892
66815
|
for (let col = 0, index2 = row * map3.width; col < map3.width; col++, index2++) {
|
|
66893
66816
|
const pos = map3.map[index2];
|
|
66894
|
-
if (
|
|
66895
|
-
|
|
66817
|
+
if (seen.has(pos)) continue;
|
|
66818
|
+
seen.add(pos);
|
|
66896
66819
|
if (row > 0 && pos == map3.map[index2 - map3.width]) {
|
|
66897
66820
|
const attrs = table.nodeAt(pos).attrs;
|
|
66898
66821
|
tr.setNodeMarkup(tr.mapping.slice(mapFrom).map(pos + tableStart), null, {
|
|
@@ -68632,7 +68555,7 @@ function tokenizeWwwAutolink(effects, ok2, nok) {
|
|
|
68632
68555
|
function tokenizeProtocolAutolink(effects, ok2, nok) {
|
|
68633
68556
|
const self2 = this;
|
|
68634
68557
|
let buffer = "";
|
|
68635
|
-
let
|
|
68558
|
+
let seen = false;
|
|
68636
68559
|
return protocolStart;
|
|
68637
68560
|
function protocolStart(code2) {
|
|
68638
68561
|
if ((code2 === 72 || code2 === 104) && previousProtocol.call(self2, self2.previous) && !previousUnbalanced(self2.events)) {
|
|
@@ -68662,10 +68585,10 @@ function tokenizeProtocolAutolink(effects, ok2, nok) {
|
|
|
68662
68585
|
function protocolSlashesInside(code2) {
|
|
68663
68586
|
if (code2 === 47) {
|
|
68664
68587
|
effects.consume(code2);
|
|
68665
|
-
if (
|
|
68588
|
+
if (seen) {
|
|
68666
68589
|
return afterProtocol;
|
|
68667
68590
|
}
|
|
68668
|
-
|
|
68591
|
+
seen = true;
|
|
68669
68592
|
return protocolSlashesInside;
|
|
68670
68593
|
}
|
|
68671
68594
|
return nok(code2);
|
|
@@ -68701,7 +68624,7 @@ function tokenizeWwwPrefix(effects, ok2, nok) {
|
|
|
68701
68624
|
function tokenizeDomain(effects, ok2, nok) {
|
|
68702
68625
|
let underscoreInLastSegment;
|
|
68703
68626
|
let underscoreInLastLastSegment;
|
|
68704
|
-
let
|
|
68627
|
+
let seen;
|
|
68705
68628
|
return domainInside;
|
|
68706
68629
|
function domainInside(code2) {
|
|
68707
68630
|
if (code2 === 46 || code2 === 95) {
|
|
@@ -68710,7 +68633,7 @@ function tokenizeDomain(effects, ok2, nok) {
|
|
|
68710
68633
|
if (code2 === null || markdownLineEndingOrSpace(code2) || unicodeWhitespace(code2) || code2 !== 45 && unicodePunctuation(code2)) {
|
|
68711
68634
|
return domainAfter(code2);
|
|
68712
68635
|
}
|
|
68713
|
-
|
|
68636
|
+
seen = true;
|
|
68714
68637
|
effects.consume(code2);
|
|
68715
68638
|
return domainInside;
|
|
68716
68639
|
}
|
|
@@ -68725,7 +68648,7 @@ function tokenizeDomain(effects, ok2, nok) {
|
|
|
68725
68648
|
return domainInside;
|
|
68726
68649
|
}
|
|
68727
68650
|
function domainAfter(code2) {
|
|
68728
|
-
if (underscoreInLastLastSegment || underscoreInLastSegment || !
|
|
68651
|
+
if (underscoreInLastLastSegment || underscoreInLastSegment || !seen) {
|
|
68729
68652
|
return nok(code2);
|
|
68730
68653
|
}
|
|
68731
68654
|
return ok2(code2);
|
|
@@ -69328,7 +69251,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69328
69251
|
const self2 = this;
|
|
69329
69252
|
let size = 0;
|
|
69330
69253
|
let sizeB = 0;
|
|
69331
|
-
let
|
|
69254
|
+
let seen;
|
|
69332
69255
|
return start2;
|
|
69333
69256
|
function start2(code2) {
|
|
69334
69257
|
let index2 = self2.events.length - 1;
|
|
@@ -69354,7 +69277,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69354
69277
|
if (code2 === 124) {
|
|
69355
69278
|
return headRowBreak(code2);
|
|
69356
69279
|
}
|
|
69357
|
-
|
|
69280
|
+
seen = true;
|
|
69358
69281
|
sizeB += 1;
|
|
69359
69282
|
return headRowBreak(code2);
|
|
69360
69283
|
}
|
|
@@ -69378,15 +69301,15 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69378
69301
|
return factorySpace(effects, headRowBreak, "whitespace")(code2);
|
|
69379
69302
|
}
|
|
69380
69303
|
sizeB += 1;
|
|
69381
|
-
if (
|
|
69382
|
-
|
|
69304
|
+
if (seen) {
|
|
69305
|
+
seen = false;
|
|
69383
69306
|
size += 1;
|
|
69384
69307
|
}
|
|
69385
69308
|
if (code2 === 124) {
|
|
69386
69309
|
effects.enter("tableCellDivider");
|
|
69387
69310
|
effects.consume(code2);
|
|
69388
69311
|
effects.exit("tableCellDivider");
|
|
69389
|
-
|
|
69312
|
+
seen = true;
|
|
69390
69313
|
return headRowBreak;
|
|
69391
69314
|
}
|
|
69392
69315
|
effects.enter("data");
|
|
@@ -69413,7 +69336,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69413
69336
|
return nok(code2);
|
|
69414
69337
|
}
|
|
69415
69338
|
effects.enter("tableDelimiterRow");
|
|
69416
|
-
|
|
69339
|
+
seen = false;
|
|
69417
69340
|
if (markdownSpace(code2)) {
|
|
69418
69341
|
return factorySpace(effects, headDelimiterBefore, "linePrefix", self2.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(code2);
|
|
69419
69342
|
}
|
|
@@ -69424,7 +69347,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69424
69347
|
return headDelimiterValueBefore(code2);
|
|
69425
69348
|
}
|
|
69426
69349
|
if (code2 === 124) {
|
|
69427
|
-
|
|
69350
|
+
seen = true;
|
|
69428
69351
|
effects.enter("tableCellDivider");
|
|
69429
69352
|
effects.consume(code2);
|
|
69430
69353
|
effects.exit("tableCellDivider");
|
|
@@ -69441,7 +69364,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69441
69364
|
function headDelimiterValueBefore(code2) {
|
|
69442
69365
|
if (code2 === 58) {
|
|
69443
69366
|
sizeB += 1;
|
|
69444
|
-
|
|
69367
|
+
seen = true;
|
|
69445
69368
|
effects.enter("tableDelimiterMarker");
|
|
69446
69369
|
effects.consume(code2);
|
|
69447
69370
|
effects.exit("tableDelimiterMarker");
|
|
@@ -69469,7 +69392,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69469
69392
|
return headDelimiterFiller;
|
|
69470
69393
|
}
|
|
69471
69394
|
if (code2 === 58) {
|
|
69472
|
-
|
|
69395
|
+
seen = true;
|
|
69473
69396
|
effects.exit("tableDelimiterFiller");
|
|
69474
69397
|
effects.enter("tableDelimiterMarker");
|
|
69475
69398
|
effects.consume(code2);
|
|
@@ -69490,7 +69413,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
69490
69413
|
return headDelimiterBefore(code2);
|
|
69491
69414
|
}
|
|
69492
69415
|
if (code2 === null || markdownLineEnding(code2)) {
|
|
69493
|
-
if (!
|
|
69416
|
+
if (!seen || size !== sizeB) {
|
|
69494
69417
|
return headDelimiterNok(code2);
|
|
69495
69418
|
}
|
|
69496
69419
|
effects.exit("tableDelimiterRow");
|
|
@@ -71737,18 +71660,14 @@ function enhanceClipboard(e2) {
|
|
|
71737
71660
|
doc2.querySelectorAll("pre code").forEach((el) => {
|
|
71738
71661
|
el.setAttribute("style", "background:none;padding:0;font-size:.875em;line-height:1.6;font-family:Menlo,Monaco,monospace;");
|
|
71739
71662
|
});
|
|
71740
|
-
|
|
71741
|
-
|
|
71742
|
-
|
|
71743
|
-
|
|
71744
|
-
|
|
71745
|
-
|
|
71746
|
-
|
|
71747
|
-
|
|
71748
|
-
});
|
|
71749
|
-
doc2.querySelectorAll(".mermaid-preview svg").forEach((el) => {
|
|
71750
|
-
el.setAttribute("style", "max-width:100%;height:auto;");
|
|
71751
|
-
});
|
|
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
|
+
}
|
|
71752
71671
|
e2.clipboardData?.setData("text/html", doc2.body.innerHTML);
|
|
71753
71672
|
}
|
|
71754
71673
|
const defaultContent = `# Welcome to ColaMD
|
|
@@ -71772,14 +71691,40 @@ async function createEditor(rootId, onChange) {
|
|
|
71772
71691
|
builder = builder.use(p2);
|
|
71773
71692
|
}
|
|
71774
71693
|
}
|
|
71775
|
-
|
|
71694
|
+
try {
|
|
71695
|
+
editorInstance = await builder.create();
|
|
71696
|
+
} catch (e2) {
|
|
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);
|
|
71703
|
+
builder = Editor.make().config((ctx) => {
|
|
71704
|
+
ctx.set(rootCtx, root2);
|
|
71705
|
+
ctx.set(defaultValueCtx, defaultContent);
|
|
71706
|
+
ctx.set(remarkPluginsCtx, [
|
|
71707
|
+
...filteredModules.map((m2) => m2.info.remarkPlugin),
|
|
71708
|
+
{ plugin: remarkBreaks, options: void 0 }
|
|
71709
|
+
]);
|
|
71710
|
+
}).use(commonmark).use(gfm).use(history).use(listener).use(clipboard).use(htmlView);
|
|
71711
|
+
for (const mod of filteredModules) {
|
|
71712
|
+
for (const p2 of mod.milkdownPlugins) {
|
|
71713
|
+
builder = builder.use(p2);
|
|
71714
|
+
}
|
|
71715
|
+
}
|
|
71716
|
+
editorInstance = await builder.create();
|
|
71717
|
+
} else {
|
|
71718
|
+
throw e2;
|
|
71719
|
+
}
|
|
71720
|
+
}
|
|
71776
71721
|
editorInstance.action((ctx) => {
|
|
71777
71722
|
const nvs = ctx.get(nodeViewCtx);
|
|
71778
71723
|
const schema2 = ctx.get(schemaCtx);
|
|
71779
71724
|
const fixed = nvs.map((nv, i2) => {
|
|
71780
71725
|
if (nv[0] != null) return nv;
|
|
71781
71726
|
const viewFn = nv[1];
|
|
71782
|
-
const fallbackNames =
|
|
71727
|
+
const fallbackNames = pluginModules.flatMap((m2) => m2.info.nodeTypes || []);
|
|
71783
71728
|
const name = fallbackNames[i2 - 1];
|
|
71784
71729
|
if (name && schema2.nodes[name]) {
|
|
71785
71730
|
return [name, viewFn];
|
|
@@ -71808,7 +71753,8 @@ async function createEditor(rootId, onChange) {
|
|
|
71808
71753
|
const href = link2.getAttribute("href");
|
|
71809
71754
|
if (href) {
|
|
71810
71755
|
e2.preventDefault();
|
|
71811
|
-
window.electronAPI
|
|
71756
|
+
window.electronAPI?.openExternal(href);
|
|
71757
|
+
window.capacitorAPI?.openExternal(href);
|
|
71812
71758
|
}
|
|
71813
71759
|
});
|
|
71814
71760
|
return editorInstance;
|
|
@@ -71823,17 +71769,31 @@ function getMarkdown() {
|
|
|
71823
71769
|
});
|
|
71824
71770
|
return markdown;
|
|
71825
71771
|
}
|
|
71826
|
-
function
|
|
71827
|
-
|
|
71828
|
-
|
|
71829
|
-
|
|
71830
|
-
|
|
71831
|
-
|
|
71832
|
-
|
|
71833
|
-
|
|
71834
|
-
|
|
71835
|
-
|
|
71836
|
-
|
|
71772
|
+
function getLiveHTML() {
|
|
71773
|
+
const editorDom = document.querySelector("#editor .ProseMirror");
|
|
71774
|
+
if (!editorDom) return "";
|
|
71775
|
+
const clone2 = editorDom.cloneNode(true);
|
|
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");
|
|
71795
|
+
}
|
|
71796
|
+
return `<div id="write">${clone2.innerHTML}</div>`;
|
|
71837
71797
|
}
|
|
71838
71798
|
function setMarkdown(content2) {
|
|
71839
71799
|
if (!editorInstance) return;
|
|
@@ -71861,6 +71821,15 @@ const themes = {
|
|
|
71861
71821
|
newsprint: "theme-newsprint"
|
|
71862
71822
|
};
|
|
71863
71823
|
let customStyleEl = null;
|
|
71824
|
+
const customThemeCache = /* @__PURE__ */ new Map();
|
|
71825
|
+
function parseTemplateDirective(css) {
|
|
71826
|
+
const match = css.match(/\/\*\s*@template:\s*(\w+)\s*\*\//);
|
|
71827
|
+
return match && themes[match[1]] ? match[1] : null;
|
|
71828
|
+
}
|
|
71829
|
+
function setCachedCustomTheme(name, css) {
|
|
71830
|
+
const template = parseTemplateDirective(css);
|
|
71831
|
+
customThemeCache.set(name, { css, template });
|
|
71832
|
+
}
|
|
71864
71833
|
function applyTheme(name, customCSS) {
|
|
71865
71834
|
const body = document.body;
|
|
71866
71835
|
Object.values(themes).forEach((cls) => body.classList.remove(cls));
|
|
@@ -71870,10 +71839,18 @@ function applyTheme(name, customCSS) {
|
|
|
71870
71839
|
customStyleEl = null;
|
|
71871
71840
|
}
|
|
71872
71841
|
if (customCSS || name.startsWith("custom:")) {
|
|
71842
|
+
const key2 = name.startsWith("custom:") ? name.slice(7) : name;
|
|
71873
71843
|
if (customCSS) {
|
|
71844
|
+
setCachedCustomTheme(key2, customCSS);
|
|
71845
|
+
}
|
|
71846
|
+
const cached = customThemeCache.get(key2);
|
|
71847
|
+
if (cached) {
|
|
71874
71848
|
customStyleEl = document.createElement("style");
|
|
71875
|
-
customStyleEl.textContent =
|
|
71849
|
+
customStyleEl.textContent = cached.css;
|
|
71876
71850
|
document.head.appendChild(customStyleEl);
|
|
71851
|
+
if (cached.template && themes[cached.template]) {
|
|
71852
|
+
body.classList.add(themes[cached.template]);
|
|
71853
|
+
}
|
|
71877
71854
|
}
|
|
71878
71855
|
body.classList.add("theme-custom");
|
|
71879
71856
|
} else if (themes[name]) {
|
|
@@ -71884,6 +71861,651 @@ function applyTheme(name, customCSS) {
|
|
|
71884
71861
|
function loadSavedTheme() {
|
|
71885
71862
|
return localStorage.getItem("colamd-theme") || "elegant";
|
|
71886
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
|
+
}
|
|
71892
|
+
const { Capacitor } = await __vitePreload(async () => {
|
|
71893
|
+
const { Capacitor: Capacitor2 } = await import("./index-B4uDgADr.js");
|
|
71894
|
+
return { Capacitor: Capacitor2 };
|
|
71895
|
+
}, true ? [] : void 0, import.meta.url).catch(() => ({ Capacitor: { isNativePlatform: () => false } }));
|
|
71896
|
+
const _capModules = {};
|
|
71897
|
+
async function capModule(name) {
|
|
71898
|
+
if (!(name in _capModules)) {
|
|
71899
|
+
try {
|
|
71900
|
+
switch (name) {
|
|
71901
|
+
case "@capacitor/filesystem":
|
|
71902
|
+
_capModules[name] = await __vitePreload(() => import("./index-CBcVpA3d.js"), true ? __vite__mapDeps([51,3,52]) : void 0, import.meta.url);
|
|
71903
|
+
break;
|
|
71904
|
+
case "@capacitor/share":
|
|
71905
|
+
_capModules[name] = await __vitePreload(() => import("./index-Y89U1ptl.js"), true ? __vite__mapDeps([53,3,52]) : void 0, import.meta.url);
|
|
71906
|
+
break;
|
|
71907
|
+
case "@capacitor/app":
|
|
71908
|
+
_capModules[name] = await __vitePreload(() => import("./index-D4CPFkph.js"), true ? __vite__mapDeps([54,3,52]) : void 0, import.meta.url);
|
|
71909
|
+
break;
|
|
71910
|
+
case "@capawesome/capacitor-file-picker":
|
|
71911
|
+
_capModules[name] = await __vitePreload(() => import("./index-DxOzbfR-.js"), true ? __vite__mapDeps([55,52]) : void 0, import.meta.url);
|
|
71912
|
+
break;
|
|
71913
|
+
case "@capacitor/haptics":
|
|
71914
|
+
_capModules[name] = await __vitePreload(() => import("./index-CGj1spkU.js"), true ? __vite__mapDeps([56,3,52]) : void 0, import.meta.url);
|
|
71915
|
+
break;
|
|
71916
|
+
default:
|
|
71917
|
+
_capModules[name] = null;
|
|
71918
|
+
}
|
|
71919
|
+
} catch {
|
|
71920
|
+
_capModules[name] = null;
|
|
71921
|
+
}
|
|
71922
|
+
}
|
|
71923
|
+
return _capModules[name];
|
|
71924
|
+
}
|
|
71925
|
+
async function capFS() {
|
|
71926
|
+
return capModule("@capacitor/filesystem");
|
|
71927
|
+
}
|
|
71928
|
+
async function capShare() {
|
|
71929
|
+
return capModule("@capacitor/share");
|
|
71930
|
+
}
|
|
71931
|
+
async function capPicker() {
|
|
71932
|
+
return capModule("@capawesome/capacitor-file-picker");
|
|
71933
|
+
}
|
|
71934
|
+
let currentFilePath = null;
|
|
71935
|
+
const eventListeners = {};
|
|
71936
|
+
function decodeBase64UTF8(base64) {
|
|
71937
|
+
const binary2 = atob(base64);
|
|
71938
|
+
const bytes = new Uint8Array(binary2.length);
|
|
71939
|
+
for (let i2 = 0; i2 < binary2.length; i2++) {
|
|
71940
|
+
bytes[i2] = binary2.charCodeAt(i2);
|
|
71941
|
+
}
|
|
71942
|
+
return new TextDecoder("utf-8").decode(bytes);
|
|
71943
|
+
}
|
|
71944
|
+
async function writeAndShareFile(fileName, content2) {
|
|
71945
|
+
try {
|
|
71946
|
+
const fs = await capFS();
|
|
71947
|
+
await fs.Filesystem.writeFile({
|
|
71948
|
+
path: fileName,
|
|
71949
|
+
data: content2,
|
|
71950
|
+
directory: fs.Directory.Documents,
|
|
71951
|
+
encoding: fs.Encoding.UTF8,
|
|
71952
|
+
recursive: true
|
|
71953
|
+
});
|
|
71954
|
+
const fileUri = await fs.Filesystem.getUri({
|
|
71955
|
+
path: fileName,
|
|
71956
|
+
directory: fs.Directory.Documents
|
|
71957
|
+
});
|
|
71958
|
+
const sh = await capShare();
|
|
71959
|
+
try {
|
|
71960
|
+
await sh.Share.share({
|
|
71961
|
+
title: fileName,
|
|
71962
|
+
text: "ColaMD Export",
|
|
71963
|
+
files: [fileUri.uri],
|
|
71964
|
+
dialogTitle: "Share Export"
|
|
71965
|
+
});
|
|
71966
|
+
} catch {
|
|
71967
|
+
}
|
|
71968
|
+
return true;
|
|
71969
|
+
} catch (err) {
|
|
71970
|
+
console.error("writeAndShareFile failed:", err);
|
|
71971
|
+
return false;
|
|
71972
|
+
}
|
|
71973
|
+
}
|
|
71974
|
+
function emit(event, ...args) {
|
|
71975
|
+
const listeners = eventListeners[event] || [];
|
|
71976
|
+
listeners.forEach((fn) => fn(...args));
|
|
71977
|
+
}
|
|
71978
|
+
function isNativePlatform() {
|
|
71979
|
+
return Capacitor.isNativePlatform();
|
|
71980
|
+
}
|
|
71981
|
+
function getBaseName(path2) {
|
|
71982
|
+
const parts = path2.split(/[/\\]/);
|
|
71983
|
+
return parts[parts.length - 1] || "Untitled";
|
|
71984
|
+
}
|
|
71985
|
+
function generateFilename(content2, ext) {
|
|
71986
|
+
const match = content2.match(/^#\s+(.+)$/m);
|
|
71987
|
+
if (match) {
|
|
71988
|
+
const title = match[1].replace(/[\\/:*?"<>|]/g, "").trim().slice(0, 50);
|
|
71989
|
+
if (title) return `${title}.${ext}`;
|
|
71990
|
+
}
|
|
71991
|
+
const ts = Date.now();
|
|
71992
|
+
return `untitled_${ts}.${ext}`;
|
|
71993
|
+
}
|
|
71994
|
+
async function readFileContent(filePath) {
|
|
71995
|
+
try {
|
|
71996
|
+
const fs = await capFS();
|
|
71997
|
+
const result = await fs.Filesystem.readFile({
|
|
71998
|
+
path: filePath,
|
|
71999
|
+
directory: fs.Directory.Documents,
|
|
72000
|
+
encoding: fs.Encoding.UTF8
|
|
72001
|
+
});
|
|
72002
|
+
return result.data;
|
|
72003
|
+
} catch {
|
|
72004
|
+
return "";
|
|
72005
|
+
}
|
|
72006
|
+
}
|
|
72007
|
+
async function writeFileContent(filePath, content2) {
|
|
72008
|
+
try {
|
|
72009
|
+
const fs = await capFS();
|
|
72010
|
+
await fs.Filesystem.writeFile({
|
|
72011
|
+
path: filePath,
|
|
72012
|
+
data: content2,
|
|
72013
|
+
directory: fs.Directory.Documents,
|
|
72014
|
+
encoding: fs.Encoding.UTF8,
|
|
72015
|
+
recursive: true
|
|
72016
|
+
});
|
|
72017
|
+
return true;
|
|
72018
|
+
} catch (err) {
|
|
72019
|
+
console.error("writeFileContent failed:", err);
|
|
72020
|
+
return false;
|
|
72021
|
+
}
|
|
72022
|
+
}
|
|
72023
|
+
async function triggerHaptic(style = "light") {
|
|
72024
|
+
if (!isNativePlatform()) return;
|
|
72025
|
+
try {
|
|
72026
|
+
const { Haptics } = await __vitePreload(async () => {
|
|
72027
|
+
const { Haptics: Haptics2 } = await import("./index-CGj1spkU.js");
|
|
72028
|
+
return { Haptics: Haptics2 };
|
|
72029
|
+
}, true ? __vite__mapDeps([56,3,52]) : void 0, import.meta.url);
|
|
72030
|
+
if (style === "heavy") await Haptics.impact({ style: "HEAVY" });
|
|
72031
|
+
else if (style === "medium") await Haptics.impact({ style: "MEDIUM" });
|
|
72032
|
+
else await Haptics.impact({ style: "LIGHT" });
|
|
72033
|
+
} catch {
|
|
72034
|
+
}
|
|
72035
|
+
}
|
|
72036
|
+
async function pickAndReadFile() {
|
|
72037
|
+
try {
|
|
72038
|
+
const picker = await capPicker();
|
|
72039
|
+
const result = await picker.FilePicker.pickFiles({
|
|
72040
|
+
types: [
|
|
72041
|
+
"text/markdown",
|
|
72042
|
+
"text/plain",
|
|
72043
|
+
"application/octet-stream",
|
|
72044
|
+
"text/x-markdown"
|
|
72045
|
+
],
|
|
72046
|
+
multiple: false,
|
|
72047
|
+
readData: true
|
|
72048
|
+
});
|
|
72049
|
+
const file = result.files[0];
|
|
72050
|
+
if (!file) return null;
|
|
72051
|
+
let content2 = "";
|
|
72052
|
+
if (file.data) {
|
|
72053
|
+
content2 = decodeBase64UTF8(file.data);
|
|
72054
|
+
} else if (file.path) {
|
|
72055
|
+
const fs = await capFS();
|
|
72056
|
+
const readResult = await fs.Filesystem.readFile({
|
|
72057
|
+
path: file.path,
|
|
72058
|
+
encoding: fs.Encoding.UTF8
|
|
72059
|
+
});
|
|
72060
|
+
content2 = readResult.data;
|
|
72061
|
+
}
|
|
72062
|
+
const filePath = file.path || file.name;
|
|
72063
|
+
currentFilePath = filePath;
|
|
72064
|
+
return { path: filePath, content: content2 };
|
|
72065
|
+
} catch (error) {
|
|
72066
|
+
console.warn("File picker cancelled or failed:", error);
|
|
72067
|
+
return null;
|
|
72068
|
+
}
|
|
72069
|
+
}
|
|
72070
|
+
async function pickCSSFile() {
|
|
72071
|
+
try {
|
|
72072
|
+
const picker = await capPicker();
|
|
72073
|
+
const result = await picker.FilePicker.pickFiles({
|
|
72074
|
+
types: ["text/css"],
|
|
72075
|
+
multiple: false,
|
|
72076
|
+
readData: true
|
|
72077
|
+
});
|
|
72078
|
+
const file = result.files[0];
|
|
72079
|
+
if (!file) return null;
|
|
72080
|
+
let css = "";
|
|
72081
|
+
if (file.data) {
|
|
72082
|
+
css = decodeBase64UTF8(file.data);
|
|
72083
|
+
} else if (file.path) {
|
|
72084
|
+
const fs = await capFS();
|
|
72085
|
+
const readResult = await fs.Filesystem.readFile({
|
|
72086
|
+
path: file.path,
|
|
72087
|
+
encoding: fs.Encoding.UTF8
|
|
72088
|
+
});
|
|
72089
|
+
css = readResult.data;
|
|
72090
|
+
}
|
|
72091
|
+
return { name: file.name, css };
|
|
72092
|
+
} catch (error) {
|
|
72093
|
+
console.warn("CSS file picker cancelled or failed:", error);
|
|
72094
|
+
return null;
|
|
72095
|
+
}
|
|
72096
|
+
}
|
|
72097
|
+
function createCapacitorAPI() {
|
|
72098
|
+
const api = {
|
|
72099
|
+
async openFile() {
|
|
72100
|
+
if (!isNativePlatform()) {
|
|
72101
|
+
const input = document.createElement("input");
|
|
72102
|
+
input.type = "file";
|
|
72103
|
+
input.accept = ".md,.markdown,.mdown,.mkd,.txt";
|
|
72104
|
+
return new Promise((resolve) => {
|
|
72105
|
+
input.onchange = async () => {
|
|
72106
|
+
const file = input.files?.[0];
|
|
72107
|
+
if (!file) {
|
|
72108
|
+
resolve(null);
|
|
72109
|
+
return;
|
|
72110
|
+
}
|
|
72111
|
+
const content2 = await file.text();
|
|
72112
|
+
currentFilePath = file.name;
|
|
72113
|
+
resolve({ path: file.name, content: content2 });
|
|
72114
|
+
input.remove();
|
|
72115
|
+
};
|
|
72116
|
+
input.click();
|
|
72117
|
+
});
|
|
72118
|
+
}
|
|
72119
|
+
return pickAndReadFile();
|
|
72120
|
+
},
|
|
72121
|
+
async openFilePath(path2) {
|
|
72122
|
+
const content2 = await readFileContent(path2);
|
|
72123
|
+
if (!content2 && content2 !== "") return null;
|
|
72124
|
+
currentFilePath = path2;
|
|
72125
|
+
return { path: path2, content: content2 };
|
|
72126
|
+
},
|
|
72127
|
+
setCurrentFile(path2) {
|
|
72128
|
+
currentFilePath = path2;
|
|
72129
|
+
},
|
|
72130
|
+
async saveFile(content2) {
|
|
72131
|
+
if (!currentFilePath) {
|
|
72132
|
+
const fileName = generateFilename(content2, "md");
|
|
72133
|
+
const ok22 = await writeFileContent(fileName, content2);
|
|
72134
|
+
if (ok22) {
|
|
72135
|
+
currentFilePath = fileName;
|
|
72136
|
+
triggerHaptic("medium");
|
|
72137
|
+
}
|
|
72138
|
+
return ok22;
|
|
72139
|
+
}
|
|
72140
|
+
const ok2 = await writeFileContent(currentFilePath, content2);
|
|
72141
|
+
if (ok2) triggerHaptic("light");
|
|
72142
|
+
return ok2;
|
|
72143
|
+
},
|
|
72144
|
+
async saveFileAs(content2) {
|
|
72145
|
+
const baseName = currentFilePath ? getBaseName(currentFilePath).replace(/\.md$/, "") : "untitled";
|
|
72146
|
+
const fileName = `${baseName}_${Date.now()}.md`;
|
|
72147
|
+
if (!isNativePlatform()) {
|
|
72148
|
+
const blob = new Blob([content2], { type: "text/markdown" });
|
|
72149
|
+
const url = URL.createObjectURL(blob);
|
|
72150
|
+
const a2 = document.createElement("a");
|
|
72151
|
+
a2.href = url;
|
|
72152
|
+
a2.download = fileName;
|
|
72153
|
+
a2.click();
|
|
72154
|
+
URL.revokeObjectURL(url);
|
|
72155
|
+
currentFilePath = fileName;
|
|
72156
|
+
return true;
|
|
72157
|
+
}
|
|
72158
|
+
const ok2 = await writeFileContent(fileName, content2);
|
|
72159
|
+
if (!ok2) {
|
|
72160
|
+
triggerHaptic("heavy");
|
|
72161
|
+
return false;
|
|
72162
|
+
}
|
|
72163
|
+
currentFilePath = fileName;
|
|
72164
|
+
triggerHaptic("medium");
|
|
72165
|
+
try {
|
|
72166
|
+
const fs = await capFS();
|
|
72167
|
+
const fileUri = await fs.Filesystem.getUri({
|
|
72168
|
+
path: fileName,
|
|
72169
|
+
directory: fs.Directory.Documents
|
|
72170
|
+
});
|
|
72171
|
+
const sh = await capShare();
|
|
72172
|
+
await sh.Share.share({
|
|
72173
|
+
title: fileName,
|
|
72174
|
+
text: "ColaMD Document",
|
|
72175
|
+
files: [fileUri.uri],
|
|
72176
|
+
dialogTitle: "Save As"
|
|
72177
|
+
});
|
|
72178
|
+
} catch {
|
|
72179
|
+
}
|
|
72180
|
+
return true;
|
|
72181
|
+
},
|
|
72182
|
+
async exportPDF(htmlContent) {
|
|
72183
|
+
if (!isNativePlatform()) {
|
|
72184
|
+
window.print();
|
|
72185
|
+
return true;
|
|
72186
|
+
}
|
|
72187
|
+
const bridge = window.ColaMDNative;
|
|
72188
|
+
if (bridge && typeof bridge.printDocument === "function") {
|
|
72189
|
+
let saveAndOverride = function(selector2, overrides) {
|
|
72190
|
+
const el = document.querySelector(selector2);
|
|
72191
|
+
if (!el) return;
|
|
72192
|
+
orig.push({ el, cssText: el.style.cssText });
|
|
72193
|
+
for (const [prop, value] of Object.entries(overrides)) {
|
|
72194
|
+
el.style[prop] = value;
|
|
72195
|
+
}
|
|
72196
|
+
};
|
|
72197
|
+
const orig = [];
|
|
72198
|
+
saveAndOverride("#titlebar", { display: "none" });
|
|
72199
|
+
saveAndOverride("#mobile-menu", { display: "none" });
|
|
72200
|
+
saveAndOverride("#menu-btn", { display: "none" });
|
|
72201
|
+
saveAndOverride(".cola-toast", { display: "none" });
|
|
72202
|
+
saveAndOverride("html", { height: "auto", overflow: "visible" });
|
|
72203
|
+
saveAndOverride("body", { height: "auto", overflow: "visible" });
|
|
72204
|
+
saveAndOverride("#editor", {
|
|
72205
|
+
position: "static",
|
|
72206
|
+
height: "auto",
|
|
72207
|
+
overflow: "visible",
|
|
72208
|
+
top: "auto",
|
|
72209
|
+
bottom: "auto"
|
|
72210
|
+
});
|
|
72211
|
+
saveAndOverride("#editor .ProseMirror", { minHeight: "auto" });
|
|
72212
|
+
await new Promise((r2) => requestAnimationFrame(r2));
|
|
72213
|
+
const jobName = currentFilePath ? getBaseName(currentFilePath).replace(/\.(md|markdown)$/, "") : "ColaMD Document";
|
|
72214
|
+
bridge.printDocument(jobName);
|
|
72215
|
+
setTimeout(() => {
|
|
72216
|
+
for (const { el, cssText } of orig) {
|
|
72217
|
+
el.style.cssText = cssText;
|
|
72218
|
+
}
|
|
72219
|
+
}, 3e3);
|
|
72220
|
+
return true;
|
|
72221
|
+
}
|
|
72222
|
+
const content2 = htmlContent || "";
|
|
72223
|
+
if (!content2) return false;
|
|
72224
|
+
const defaultName = currentFilePath ? getBaseName(currentFilePath).replace(/\.(md|markdown)$/, "-print.html") : "colamd-print.html";
|
|
72225
|
+
return writeAndShareFile(defaultName, content2);
|
|
72226
|
+
},
|
|
72227
|
+
async exportHTML(htmlContent) {
|
|
72228
|
+
const defaultName = currentFilePath ? getBaseName(currentFilePath).replace(/\.(md|markdown)$/, ".html") : "colamd-export.html";
|
|
72229
|
+
if (!isNativePlatform()) {
|
|
72230
|
+
const blob = new Blob([htmlContent], { type: "text/html" });
|
|
72231
|
+
const url = URL.createObjectURL(blob);
|
|
72232
|
+
const a2 = document.createElement("a");
|
|
72233
|
+
a2.href = url;
|
|
72234
|
+
a2.download = defaultName;
|
|
72235
|
+
a2.click();
|
|
72236
|
+
URL.revokeObjectURL(url);
|
|
72237
|
+
return true;
|
|
72238
|
+
}
|
|
72239
|
+
return writeAndShareFile(defaultName, htmlContent);
|
|
72240
|
+
},
|
|
72241
|
+
async newSlides() {
|
|
72242
|
+
const template = `---
|
|
72243
|
+
kicker: ColaMD
|
|
72244
|
+
chip: Markdown Editor · 2026
|
|
72245
|
+
page: Your Name
|
|
72246
|
+
---
|
|
72247
|
+
|
|
72248
|
+
<!-- type: cover -->
|
|
72249
|
+
# Welcome to ColaMD
|
|
72250
|
+
Agent Native Markdown Editor
|
|
72251
|
+
|
|
72252
|
+
---
|
|
72253
|
+
|
|
72254
|
+
<!-- type: statement -->
|
|
72255
|
+
## Start Writing
|
|
72256
|
+
Edit this file in ColaMD and see your changes in real time.
|
|
72257
|
+
`;
|
|
72258
|
+
return template;
|
|
72259
|
+
},
|
|
72260
|
+
async openAsSlides(content2) {
|
|
72261
|
+
if (!isNativePlatform()) {
|
|
72262
|
+
const newWindow = window.open("", "_blank");
|
|
72263
|
+
if (newWindow) {
|
|
72264
|
+
newWindow.document.write(`<pre>${content2}</pre>`);
|
|
72265
|
+
}
|
|
72266
|
+
return !!newWindow;
|
|
72267
|
+
}
|
|
72268
|
+
return writeAndShareFile("colamd-slides-preview.html", content2);
|
|
72269
|
+
},
|
|
72270
|
+
async loadCustomTheme() {
|
|
72271
|
+
if (!isNativePlatform()) {
|
|
72272
|
+
const input = document.createElement("input");
|
|
72273
|
+
input.type = "file";
|
|
72274
|
+
input.accept = ".css";
|
|
72275
|
+
return new Promise((resolve) => {
|
|
72276
|
+
input.onchange = async () => {
|
|
72277
|
+
const file = input.files?.[0];
|
|
72278
|
+
if (!file) {
|
|
72279
|
+
resolve(null);
|
|
72280
|
+
return;
|
|
72281
|
+
}
|
|
72282
|
+
const css = await file.text();
|
|
72283
|
+
resolve({ name: file.name, css });
|
|
72284
|
+
input.remove();
|
|
72285
|
+
};
|
|
72286
|
+
input.click();
|
|
72287
|
+
});
|
|
72288
|
+
}
|
|
72289
|
+
return pickCSSFile();
|
|
72290
|
+
},
|
|
72291
|
+
async loadThemeCSS(_fileName) {
|
|
72292
|
+
try {
|
|
72293
|
+
const fs = await capFS();
|
|
72294
|
+
const result = await fs.Filesystem.readFile({
|
|
72295
|
+
path: `.colamd/themes/${_fileName}`,
|
|
72296
|
+
directory: fs.Directory.Documents,
|
|
72297
|
+
encoding: fs.Encoding.UTF8
|
|
72298
|
+
});
|
|
72299
|
+
return result.data;
|
|
72300
|
+
} catch {
|
|
72301
|
+
return null;
|
|
72302
|
+
}
|
|
72303
|
+
},
|
|
72304
|
+
getPathForFile(_file) {
|
|
72305
|
+
return _file.name || "";
|
|
72306
|
+
},
|
|
72307
|
+
openExternal(url) {
|
|
72308
|
+
if (isNativePlatform()) {
|
|
72309
|
+
window.open(url, "_system", "location=yes");
|
|
72310
|
+
} else {
|
|
72311
|
+
window.open(url, "_blank");
|
|
72312
|
+
}
|
|
72313
|
+
},
|
|
72314
|
+
onFileChanged(callback) {
|
|
72315
|
+
eventListeners["file-changed"] = eventListeners["file-changed"] || [];
|
|
72316
|
+
eventListeners["file-changed"].push(callback);
|
|
72317
|
+
if (!isNativePlatform()) return;
|
|
72318
|
+
let lastContent = "";
|
|
72319
|
+
let watcherTimer = null;
|
|
72320
|
+
const pollChanges = async () => {
|
|
72321
|
+
if (!currentFilePath) return;
|
|
72322
|
+
try {
|
|
72323
|
+
const content2 = await readFileContent(currentFilePath);
|
|
72324
|
+
if (content2 !== lastContent && content2) {
|
|
72325
|
+
lastContent = content2;
|
|
72326
|
+
emit("file-changed", content2);
|
|
72327
|
+
}
|
|
72328
|
+
} catch {
|
|
72329
|
+
}
|
|
72330
|
+
};
|
|
72331
|
+
if (!watcherTimer) {
|
|
72332
|
+
watcherTimer = setInterval(pollChanges, 2e3);
|
|
72333
|
+
}
|
|
72334
|
+
},
|
|
72335
|
+
onNewFile(callback) {
|
|
72336
|
+
eventListeners["new-file"] = eventListeners["new-file"] || [];
|
|
72337
|
+
eventListeners["new-file"].push(callback);
|
|
72338
|
+
},
|
|
72339
|
+
onFileOpened(callback) {
|
|
72340
|
+
eventListeners["file-opened"] = eventListeners["file-opened"] || [];
|
|
72341
|
+
eventListeners["file-opened"].push(callback);
|
|
72342
|
+
},
|
|
72343
|
+
onMenuOpen(callback) {
|
|
72344
|
+
eventListeners["menu-open"] = eventListeners["menu-open"] || [];
|
|
72345
|
+
eventListeners["menu-open"].push(callback);
|
|
72346
|
+
},
|
|
72347
|
+
onMenuSave(callback) {
|
|
72348
|
+
eventListeners["menu-save"] = eventListeners["menu-save"] || [];
|
|
72349
|
+
eventListeners["menu-save"].push(callback);
|
|
72350
|
+
},
|
|
72351
|
+
onMenuSaveAs(callback) {
|
|
72352
|
+
eventListeners["menu-save-as"] = eventListeners["menu-save-as"] || [];
|
|
72353
|
+
eventListeners["menu-save-as"].push(callback);
|
|
72354
|
+
},
|
|
72355
|
+
onMenuExportPDF(callback) {
|
|
72356
|
+
eventListeners["menu-export-pdf"] = eventListeners["menu-export-pdf"] || [];
|
|
72357
|
+
eventListeners["menu-export-pdf"].push(callback);
|
|
72358
|
+
},
|
|
72359
|
+
onMenuExportHTML(callback) {
|
|
72360
|
+
eventListeners["menu-export-html"] = eventListeners["menu-export-html"] || [];
|
|
72361
|
+
eventListeners["menu-export-html"].push(callback);
|
|
72362
|
+
},
|
|
72363
|
+
onMenuNewSlides(callback) {
|
|
72364
|
+
eventListeners["menu-new-slides"] = eventListeners["menu-new-slides"] || [];
|
|
72365
|
+
eventListeners["menu-new-slides"].push(callback);
|
|
72366
|
+
},
|
|
72367
|
+
onMenuOpenAsSlides(callback) {
|
|
72368
|
+
eventListeners["menu-open-as-slides"] = eventListeners["menu-open-as-slides"] || [];
|
|
72369
|
+
eventListeners["menu-open-as-slides"].push(callback);
|
|
72370
|
+
},
|
|
72371
|
+
onNewSlidesContent(callback) {
|
|
72372
|
+
eventListeners["new-slides-content"] = eventListeners["new-slides-content"] || [];
|
|
72373
|
+
eventListeners["new-slides-content"].push(callback);
|
|
72374
|
+
},
|
|
72375
|
+
onSetTheme(callback) {
|
|
72376
|
+
eventListeners["set-theme"] = eventListeners["set-theme"] || [];
|
|
72377
|
+
eventListeners["set-theme"].push(callback);
|
|
72378
|
+
},
|
|
72379
|
+
onSetCustomCSS(callback) {
|
|
72380
|
+
eventListeners["set-custom-css"] = eventListeners["set-custom-css"] || [];
|
|
72381
|
+
eventListeners["set-custom-css"].push(callback);
|
|
72382
|
+
},
|
|
72383
|
+
async exportSlides(content2) {
|
|
72384
|
+
const defaultName = "colamd-slides.html";
|
|
72385
|
+
if (!isNativePlatform()) {
|
|
72386
|
+
const blob = new Blob([content2], { type: "text/html" });
|
|
72387
|
+
const url = URL.createObjectURL(blob);
|
|
72388
|
+
const a2 = document.createElement("a");
|
|
72389
|
+
a2.href = url;
|
|
72390
|
+
a2.download = defaultName;
|
|
72391
|
+
a2.click();
|
|
72392
|
+
URL.revokeObjectURL(url);
|
|
72393
|
+
return true;
|
|
72394
|
+
}
|
|
72395
|
+
return writeAndShareFile(defaultName, content2);
|
|
72396
|
+
},
|
|
72397
|
+
onMenuExportSlides(callback) {
|
|
72398
|
+
eventListeners["menu-export-slides"] = eventListeners["menu-export-slides"] || [];
|
|
72399
|
+
eventListeners["menu-export-slides"].push(callback);
|
|
72400
|
+
},
|
|
72401
|
+
onAgentActivity(callback) {
|
|
72402
|
+
eventListeners["agent-activity"] = eventListeners["agent-activity"] || [];
|
|
72403
|
+
eventListeners["agent-activity"].push(callback);
|
|
72404
|
+
},
|
|
72405
|
+
async registerPlugins(_plugins) {
|
|
72406
|
+
localStorage.setItem("colamd-plugins", JSON.stringify(_plugins));
|
|
72407
|
+
return true;
|
|
72408
|
+
},
|
|
72409
|
+
async syncPluginState(_id, _enabled) {
|
|
72410
|
+
const raw = localStorage.getItem("colamd-plugins") || "[]";
|
|
72411
|
+
const plugins2 = JSON.parse(raw);
|
|
72412
|
+
const p2 = plugins2.find((x2) => x2.id === _id);
|
|
72413
|
+
if (p2) p2.enabled = _enabled;
|
|
72414
|
+
localStorage.setItem("colamd-plugins", JSON.stringify(plugins2));
|
|
72415
|
+
},
|
|
72416
|
+
onMenuTogglePlugin(callback) {
|
|
72417
|
+
eventListeners["menu-toggle-plugin"] = eventListeners["menu-toggle-plugin"] || [];
|
|
72418
|
+
eventListeners["menu-toggle-plugin"].push(callback);
|
|
72419
|
+
},
|
|
72420
|
+
onMenuImportTheme(callback) {
|
|
72421
|
+
eventListeners["menu-import-theme"] = eventListeners["menu-import-theme"] || [];
|
|
72422
|
+
eventListeners["menu-import-theme"].push(callback);
|
|
72423
|
+
},
|
|
72424
|
+
async exportFile(dataUrl, defaultName) {
|
|
72425
|
+
if (!isNativePlatform()) {
|
|
72426
|
+
const a2 = document.createElement("a");
|
|
72427
|
+
a2.href = dataUrl;
|
|
72428
|
+
a2.download = defaultName;
|
|
72429
|
+
a2.click();
|
|
72430
|
+
return true;
|
|
72431
|
+
}
|
|
72432
|
+
const base64Data = dataUrl.replace(/^data:[^;]+;base64,/, "");
|
|
72433
|
+
try {
|
|
72434
|
+
const fs = await capFS();
|
|
72435
|
+
await fs.Filesystem.writeFile({
|
|
72436
|
+
path: defaultName,
|
|
72437
|
+
data: base64Data,
|
|
72438
|
+
directory: fs.Directory.Documents,
|
|
72439
|
+
recursive: true
|
|
72440
|
+
});
|
|
72441
|
+
const fileUri = await fs.Filesystem.getUri({
|
|
72442
|
+
path: defaultName,
|
|
72443
|
+
directory: fs.Directory.Documents
|
|
72444
|
+
});
|
|
72445
|
+
const sh = await capShare();
|
|
72446
|
+
try {
|
|
72447
|
+
await sh.Share.share({
|
|
72448
|
+
title: defaultName,
|
|
72449
|
+
files: [fileUri.uri],
|
|
72450
|
+
dialogTitle: "Share Export"
|
|
72451
|
+
});
|
|
72452
|
+
} catch {
|
|
72453
|
+
}
|
|
72454
|
+
return true;
|
|
72455
|
+
} catch {
|
|
72456
|
+
return false;
|
|
72457
|
+
}
|
|
72458
|
+
}
|
|
72459
|
+
};
|
|
72460
|
+
return api;
|
|
72461
|
+
}
|
|
72462
|
+
function showToast(message, duration = 2e3) {
|
|
72463
|
+
const existing = document.querySelector(".cola-toast");
|
|
72464
|
+
if (existing) existing.remove();
|
|
72465
|
+
const toast = document.createElement("div");
|
|
72466
|
+
toast.className = "cola-toast";
|
|
72467
|
+
toast.textContent = message;
|
|
72468
|
+
toast.style.cssText = "position:fixed;top:56px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,0.8);color:#fff;padding:10px 20px;border-radius:8px;font-size:14px;z-index:9999;pointer-events:none;";
|
|
72469
|
+
document.body.appendChild(toast);
|
|
72470
|
+
setTimeout(() => {
|
|
72471
|
+
toast.style.opacity = "0";
|
|
72472
|
+
toast.style.transition = "opacity 0.3s";
|
|
72473
|
+
setTimeout(() => toast.remove(), 300);
|
|
72474
|
+
}, duration);
|
|
72475
|
+
}
|
|
72476
|
+
function checkAndOpenPendingFile(api) {
|
|
72477
|
+
const bridge = window.ColaMDNative;
|
|
72478
|
+
if (!bridge || typeof bridge.checkPendingFile !== "function") return;
|
|
72479
|
+
try {
|
|
72480
|
+
const result = bridge.checkPendingFile();
|
|
72481
|
+
if (result && result !== "null") {
|
|
72482
|
+
const data = JSON.parse(result);
|
|
72483
|
+
if (data && data.content) {
|
|
72484
|
+
setContent(data.content);
|
|
72485
|
+
if (data.name && api?.setCurrentFile) {
|
|
72486
|
+
api.setCurrentFile(data.name);
|
|
72487
|
+
}
|
|
72488
|
+
}
|
|
72489
|
+
}
|
|
72490
|
+
} catch (e2) {
|
|
72491
|
+
}
|
|
72492
|
+
}
|
|
72493
|
+
function processPendingIntentFile(api) {
|
|
72494
|
+
checkAndOpenPendingFile(api);
|
|
72495
|
+
}
|
|
72496
|
+
async function ensureAllPluginsRendered() {
|
|
72497
|
+
for (const p2 of getAllPlugins()) {
|
|
72498
|
+
if (p2.enabled && p2.ensureRendered) await p2.ensureRendered();
|
|
72499
|
+
}
|
|
72500
|
+
}
|
|
72501
|
+
function refreshThemeSensitivePlugins() {
|
|
72502
|
+
for (const p2 of getAllPlugins()) {
|
|
72503
|
+
if (p2.enabled && p2.nodeTypes && p2.onThemeChange) {
|
|
72504
|
+
togglePluginMode(p2.nodeTypes, "raw");
|
|
72505
|
+
requestAnimationFrame(() => togglePluginMode(p2.nodeTypes, "rendered"));
|
|
72506
|
+
}
|
|
72507
|
+
}
|
|
72508
|
+
}
|
|
71887
72509
|
function isSlidesContent(content2) {
|
|
71888
72510
|
return /^---\s*\n[\s\S]*?(kicker|chip):/m.test(content2);
|
|
71889
72511
|
}
|
|
@@ -71917,120 +72539,133 @@ function getContent() {
|
|
|
71917
72539
|
if (sourceModeActive) return sourceEl().value;
|
|
71918
72540
|
return getMarkdown();
|
|
71919
72541
|
}
|
|
72542
|
+
function syncRawEdits() {
|
|
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
|
+
}
|
|
72549
|
+
}
|
|
72550
|
+
function restoreRenderedMode(api) {
|
|
72551
|
+
for (const p2 of getAllPlugins()) {
|
|
72552
|
+
if (!p2.enabled) {
|
|
72553
|
+
p2.enabled = true;
|
|
72554
|
+
togglePluginMode(p2.nodeTypes || [], "rendered");
|
|
72555
|
+
api.syncPluginState(p2.id, true);
|
|
72556
|
+
}
|
|
72557
|
+
}
|
|
72558
|
+
}
|
|
71920
72559
|
async function init() {
|
|
71921
|
-
const api = window.electronAPI;
|
|
71922
|
-
|
|
71923
|
-
|
|
71924
|
-
|
|
71925
|
-
|
|
71926
|
-
|
|
71927
|
-
|
|
71928
|
-
|
|
71929
|
-
|
|
72560
|
+
const api = window.electronAPI || await createCapacitorAPI();
|
|
72561
|
+
let editorReady = false;
|
|
72562
|
+
let pendingFileContent = null;
|
|
72563
|
+
api.onFileOpened((data) => {
|
|
72564
|
+
if (editorReady) {
|
|
72565
|
+
setContent(data.content);
|
|
72566
|
+
} else {
|
|
72567
|
+
pendingFileContent = data.content;
|
|
72568
|
+
}
|
|
72569
|
+
});
|
|
72570
|
+
let savedTheme = loadSavedTheme();
|
|
72571
|
+
try {
|
|
72572
|
+
if (savedTheme.startsWith("custom:")) {
|
|
72573
|
+
const fileName = savedTheme.slice(7);
|
|
72574
|
+
const css = await api.loadThemeCSS(fileName);
|
|
72575
|
+
if (css) {
|
|
72576
|
+
setCachedCustomTheme(fileName, css);
|
|
72577
|
+
applyTheme(savedTheme);
|
|
72578
|
+
} else {
|
|
72579
|
+
applyTheme("elegant");
|
|
72580
|
+
}
|
|
72581
|
+
} else {
|
|
72582
|
+
applyTheme(savedTheme);
|
|
72583
|
+
}
|
|
72584
|
+
} catch (e2) {
|
|
72585
|
+
console.error("Theme initialization failed, falling back to elegant:", e2);
|
|
72586
|
+
applyTheme("elegant");
|
|
72587
|
+
}
|
|
72588
|
+
try {
|
|
72589
|
+
await createEditor("editor");
|
|
72590
|
+
} catch (e2) {
|
|
72591
|
+
console.error("Editor initialization failed:", e2);
|
|
72592
|
+
}
|
|
72593
|
+
editorReady = true;
|
|
72594
|
+
if (pendingFileContent !== null) {
|
|
72595
|
+
setContent(pendingFileContent);
|
|
72596
|
+
pendingFileContent = null;
|
|
72597
|
+
}
|
|
71930
72598
|
for (const p2 of getAllPlugins()) p2.onInit?.();
|
|
72599
|
+
checkAndOpenPendingFile(api);
|
|
71931
72600
|
api.registerPlugins(getAllPlugins().map((p2) => ({ id: p2.id, name: p2.name, enabled: p2.enabled })));
|
|
71932
72601
|
api.onMenuTogglePlugin((id33) => {
|
|
71933
|
-
togglePlugin(id33);
|
|
71934
72602
|
const p2 = getAllPlugins().find((x2) => x2.id === id33);
|
|
71935
72603
|
if (p2) {
|
|
72604
|
+
togglePlugin(id33, !p2.enabled);
|
|
71936
72605
|
const mode = p2.enabled ? "rendered" : "raw";
|
|
71937
|
-
togglePluginMode(p2.nodeTypes, mode);
|
|
72606
|
+
togglePluginMode(p2.nodeTypes || [], mode);
|
|
71938
72607
|
api.syncPluginState(p2.id, p2.enabled);
|
|
71939
72608
|
}
|
|
71940
72609
|
});
|
|
72610
|
+
setupMobileMenu(api, savedTheme);
|
|
72611
|
+
if (!window.electronAPI) {
|
|
72612
|
+
setInterval(() => processPendingIntentFile(api), 3e3);
|
|
72613
|
+
}
|
|
71941
72614
|
slidesBtnEl().addEventListener("click", () => api.openAsSlides(getContent()));
|
|
71942
72615
|
api.onMenuOpen(async () => {
|
|
71943
72616
|
const result = await api.openFile();
|
|
71944
72617
|
if (result) setContent(result.content);
|
|
71945
72618
|
});
|
|
71946
|
-
function syncRawEdits() {
|
|
71947
|
-
document.querySelectorAll(".math-block-raw, .math-inline-raw, .mermaid-source").forEach((el) => {
|
|
71948
|
-
if (el.matches(":focus")) el.blur();
|
|
71949
|
-
});
|
|
71950
|
-
}
|
|
71951
|
-
function restoreRenderedMode() {
|
|
71952
|
-
for (const p2 of getAllPlugins()) {
|
|
71953
|
-
if (!p2.enabled) {
|
|
71954
|
-
p2.enabled = true;
|
|
71955
|
-
togglePluginMode(p2.nodeTypes, "rendered");
|
|
71956
|
-
api.syncPluginState(p2.id, true);
|
|
71957
|
-
}
|
|
71958
|
-
}
|
|
71959
|
-
}
|
|
71960
72619
|
api.onMenuSave(async () => {
|
|
71961
72620
|
syncRawEdits();
|
|
71962
72621
|
const ok2 = await api.saveFile(getContent());
|
|
71963
|
-
if (ok2)
|
|
72622
|
+
if (ok2) {
|
|
72623
|
+
showToast("Saved");
|
|
72624
|
+
restoreRenderedMode(api);
|
|
72625
|
+
} else {
|
|
72626
|
+
showToast("Save failed");
|
|
72627
|
+
}
|
|
71964
72628
|
});
|
|
71965
72629
|
api.onMenuSaveAs(async () => {
|
|
71966
72630
|
syncRawEdits();
|
|
71967
72631
|
const ok2 = await api.saveFileAs(getContent());
|
|
71968
|
-
if (ok2)
|
|
72632
|
+
if (ok2) {
|
|
72633
|
+
showToast("Saved");
|
|
72634
|
+
restoreRenderedMode(api);
|
|
72635
|
+
} else {
|
|
72636
|
+
showToast("Save cancelled or failed");
|
|
72637
|
+
}
|
|
71969
72638
|
});
|
|
71970
72639
|
api.onMenuExportPDF(async () => {
|
|
71971
72640
|
syncRawEdits();
|
|
71972
|
-
restoreRenderedMode();
|
|
71973
|
-
await
|
|
71974
|
-
await
|
|
72641
|
+
restoreRenderedMode(api);
|
|
72642
|
+
await ensureAllPluginsRendered();
|
|
72643
|
+
await new Promise((r2) => setTimeout(r2, 300));
|
|
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();
|
|
72654
|
+
setTimeout(() => {
|
|
72655
|
+
document.querySelectorAll(".mermaid-loading, .mermaid-error").forEach((el) => el.style.display = "none");
|
|
72656
|
+
}, 1e3);
|
|
71975
72657
|
});
|
|
71976
|
-
api.onMenuExportHTML(() => {
|
|
71977
|
-
|
|
71978
|
-
|
|
71979
|
-
|
|
71980
|
-
|
|
71981
|
-
|
|
71982
|
-
const borderColor = v2("--border-color");
|
|
71983
|
-
const linkColor = v2("--link-color");
|
|
71984
|
-
const codeBg = v2("--code-bg");
|
|
71985
|
-
const codeBlockBg = v2("--code-block-bg");
|
|
71986
|
-
const codeBlockText = v2("--code-block-text") || textColor;
|
|
71987
|
-
const blockquoteBorder = v2("--blockquote-border");
|
|
71988
|
-
const blockquoteBg = v2("--blockquote-bg") || "transparent";
|
|
71989
|
-
const tableHeaderBg = v2("--table-header-bg");
|
|
71990
|
-
const selectionBg = v2("--selection-bg");
|
|
71991
|
-
const editor = document.querySelector("#editor .ProseMirror");
|
|
71992
|
-
const fontFamily = editor ? getComputedStyle(editor).fontFamily : "-apple-system,BlinkMacSystemFont,sans-serif";
|
|
71993
|
-
const getElColor = (selector2, fallback) => {
|
|
71994
|
-
const el = document.querySelector(`#editor .ProseMirror ${selector2}`);
|
|
71995
|
-
return el ? getComputedStyle(el).color : fallback;
|
|
71996
|
-
};
|
|
71997
|
-
const strongColor = getElColor("strong", textColor);
|
|
71998
|
-
const codeColor = getElColor("code", textColor);
|
|
71999
|
-
const html2 = `<!DOCTYPE html>
|
|
72000
|
-
<html><head><meta charset="utf-8"><title>ColaMD Export</title>
|
|
72001
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.46/dist/katex.min.css">
|
|
72002
|
-
<style>
|
|
72003
|
-
body{max-width:780px;margin:40px auto;padding:20px;font-family:${fontFamily};line-height:1.75;background:${bgColor};color:${textColor}}
|
|
72004
|
-
h1{font-size:2em;font-weight:700;border-bottom:1px solid ${borderColor};padding-bottom:.3em}
|
|
72005
|
-
h2{font-size:1.5em;font-weight:600;border-bottom:1px solid ${borderColor};padding-bottom:.25em}
|
|
72006
|
-
h3{font-size:1.25em;font-weight:600}
|
|
72007
|
-
strong{color:${strongColor}}
|
|
72008
|
-
a{color:${linkColor};text-decoration:none}
|
|
72009
|
-
code{background:${codeBg};color:${codeColor};padding:2px 6px;border-radius:3px;font-size:.875em;font-family:'SF Mono','Fira Code',Menlo,monospace}
|
|
72010
|
-
pre{background:${codeBlockBg};color:${codeBlockText};padding:16px;border-radius:6px;overflow-x:auto;margin:1em 0}
|
|
72011
|
-
pre code{background:none;padding:0;color:inherit}
|
|
72012
|
-
blockquote{border-left:4px solid ${blockquoteBorder};background:${blockquoteBg};padding-left:16px;margin:1em 0;color:${textMuted}}
|
|
72013
|
-
table{border-collapse:collapse;width:100%;margin:1em 0}
|
|
72014
|
-
th,td{border:1px solid ${borderColor};padding:8px 12px}
|
|
72015
|
-
th{background:${tableHeaderBg};font-weight:600}
|
|
72016
|
-
hr{border:none;border-top:2px solid ${borderColor};margin:2em 0}
|
|
72017
|
-
img{max-width:100%}
|
|
72018
|
-
::selection{background:${selectionBg}}
|
|
72019
|
-
.math-inline{display:inline;padding:2px 4px;border-radius:3px;background:${codeBg}}
|
|
72020
|
-
.math-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${codeBlockBg};text-align:center;overflow-x:auto}
|
|
72021
|
-
.mermaid-block{display:block;padding:16px;margin:1em 0;border-radius:6px;background:${codeBlockBg};border:1px solid ${borderColor}}
|
|
72022
|
-
.mermaid-preview{display:flex;justify-content:center;align-items:center}
|
|
72023
|
-
.mermaid-preview svg{max-width:100%;height:auto}
|
|
72024
|
-
.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}
|
|
72025
|
-
</style>
|
|
72026
|
-
</head><body>${getHTML()}</body></html>`;
|
|
72027
|
-
api.exportHTML(html2);
|
|
72658
|
+
api.onMenuExportHTML(async () => {
|
|
72659
|
+
syncRawEdits();
|
|
72660
|
+
restoreRenderedMode(api);
|
|
72661
|
+
await ensureAllPluginsRendered();
|
|
72662
|
+
await new Promise((r2) => setTimeout(r2, 200));
|
|
72663
|
+
api.exportHTML(buildExportHTML());
|
|
72028
72664
|
});
|
|
72029
72665
|
api.onNewFile(() => {
|
|
72030
72666
|
exitSourceMode();
|
|
72031
72667
|
setMarkdown("");
|
|
72032
72668
|
});
|
|
72033
|
-
api.onFileOpened((data) => setContent(data.content));
|
|
72034
72669
|
api.onFileChanged((content2) => {
|
|
72035
72670
|
if (sourceModeActive) {
|
|
72036
72671
|
sourceEl().value = content2;
|
|
@@ -72038,18 +72673,23 @@ img{max-width:100%}
|
|
|
72038
72673
|
setMarkdown(content2);
|
|
72039
72674
|
}
|
|
72040
72675
|
});
|
|
72041
|
-
|
|
72676
|
+
let pendingThemeChange = null;
|
|
72677
|
+
let themeChangeTimer = null;
|
|
72678
|
+
function applyThemeChange(theme) {
|
|
72679
|
+
pendingThemeChange = null;
|
|
72042
72680
|
applyTheme(theme);
|
|
72043
72681
|
for (const p2 of getAllPlugins()) p2.onThemeChange?.(theme);
|
|
72044
|
-
|
|
72045
|
-
|
|
72046
|
-
|
|
72047
|
-
|
|
72048
|
-
|
|
72049
|
-
|
|
72682
|
+
refreshThemeSensitivePlugins();
|
|
72683
|
+
}
|
|
72684
|
+
api.onSetTheme((theme) => {
|
|
72685
|
+
if (themeChangeTimer) clearTimeout(themeChangeTimer);
|
|
72686
|
+
pendingThemeChange = theme;
|
|
72687
|
+
themeChangeTimer = setTimeout(() => {
|
|
72688
|
+
if (pendingThemeChange) applyThemeChange(pendingThemeChange);
|
|
72689
|
+
}, 50);
|
|
72050
72690
|
});
|
|
72051
72691
|
api.onSetCustomCSS((css) => {
|
|
72052
|
-
const theme = loadSavedTheme();
|
|
72692
|
+
const theme = pendingThemeChange || loadSavedTheme();
|
|
72053
72693
|
applyTheme(theme, css);
|
|
72054
72694
|
});
|
|
72055
72695
|
api.onMenuNewSlides(async () => {
|
|
@@ -72066,7 +72706,10 @@ img{max-width:100%}
|
|
|
72066
72706
|
});
|
|
72067
72707
|
api.onMenuImportTheme(async () => {
|
|
72068
72708
|
const result = await api.loadCustomTheme();
|
|
72069
|
-
if (result)
|
|
72709
|
+
if (result) {
|
|
72710
|
+
setCachedCustomTheme(result.name, result.css);
|
|
72711
|
+
applyTheme(`custom:${result.name}`);
|
|
72712
|
+
}
|
|
72070
72713
|
});
|
|
72071
72714
|
const agentDot = document.getElementById("agent-dot");
|
|
72072
72715
|
api.onAgentActivity((state2) => {
|
|
@@ -72099,7 +72742,7 @@ img{max-width:100%}
|
|
|
72099
72742
|
}
|
|
72100
72743
|
document.addEventListener("contextmenu", (e2) => {
|
|
72101
72744
|
if (e2.target.matches('textarea, input, [contenteditable="true"]')) return;
|
|
72102
|
-
const target = e2.target.closest(
|
|
72745
|
+
const target = e2.target.closest(getContextMenuSelector());
|
|
72103
72746
|
if (!target) return;
|
|
72104
72747
|
const capabilities = findExportCapabilities(target.className);
|
|
72105
72748
|
if (!capabilities.length) return;
|
|
@@ -72137,6 +72780,386 @@ img{max-width:100%}
|
|
|
72137
72780
|
if (result) setContent(result.content);
|
|
72138
72781
|
});
|
|
72139
72782
|
}
|
|
72783
|
+
function setupMobileMenu(api, currentTheme) {
|
|
72784
|
+
const menuEl = document.getElementById("mobile-menu");
|
|
72785
|
+
const menuBtn = document.getElementById("menu-btn");
|
|
72786
|
+
const closeBtn = document.getElementById("menu-close-btn");
|
|
72787
|
+
const overlay = document.getElementById("menu-overlay");
|
|
72788
|
+
if (!menuEl || !menuBtn) return;
|
|
72789
|
+
function openMenu() {
|
|
72790
|
+
menuEl.classList.add("open");
|
|
72791
|
+
}
|
|
72792
|
+
function closeMenu() {
|
|
72793
|
+
menuEl.classList.remove("open");
|
|
72794
|
+
}
|
|
72795
|
+
menuBtn.addEventListener("click", openMenu);
|
|
72796
|
+
closeBtn?.addEventListener("click", closeMenu);
|
|
72797
|
+
overlay?.addEventListener("click", closeMenu);
|
|
72798
|
+
const themes2 = [
|
|
72799
|
+
{ key: "light", label: "Light" },
|
|
72800
|
+
{ key: "dark", label: "Dark" },
|
|
72801
|
+
{ key: "elegant", label: "Elegant" },
|
|
72802
|
+
{ key: "newsprint", label: "Newsprint" }
|
|
72803
|
+
];
|
|
72804
|
+
const themeListEl = document.getElementById("menu-theme-list");
|
|
72805
|
+
if (themeListEl) {
|
|
72806
|
+
themeListEl.innerHTML = themes2.map(
|
|
72807
|
+
(t2) => `<div class="menu-theme-item${t2.key === currentTheme ? " active" : ""}" data-theme="${t2.key}">${t2.label}</div>`
|
|
72808
|
+
).join("");
|
|
72809
|
+
themeListEl.querySelectorAll(".menu-theme-item").forEach((el) => {
|
|
72810
|
+
el.addEventListener("click", () => {
|
|
72811
|
+
const theme = el.dataset.theme;
|
|
72812
|
+
applyTheme(theme);
|
|
72813
|
+
for (const p2 of getAllPlugins()) p2.onThemeChange?.(theme);
|
|
72814
|
+
refreshThemeSensitivePlugins();
|
|
72815
|
+
themeListEl.querySelectorAll(".menu-theme-item").forEach((e2) => e2.classList.remove("active"));
|
|
72816
|
+
el.classList.add("active");
|
|
72817
|
+
closeMenu();
|
|
72818
|
+
});
|
|
72819
|
+
});
|
|
72820
|
+
}
|
|
72821
|
+
const pluginsSection = document.getElementById("menu-plugins-section");
|
|
72822
|
+
const pluginListEl = document.getElementById("menu-plugin-list");
|
|
72823
|
+
const plugins2 = getAllPlugins();
|
|
72824
|
+
if (pluginsSection && pluginListEl && plugins2.length > 0) {
|
|
72825
|
+
pluginsSection.style.display = "";
|
|
72826
|
+
pluginListEl.innerHTML = plugins2.map(
|
|
72827
|
+
(p2) => `<div class="menu-plugin-item" data-plugin-id="${p2.id}"><span>${p2.name}</span><div class="menu-plugin-toggle${p2.enabled ? " on" : ""}"></div></div>`
|
|
72828
|
+
).join("");
|
|
72829
|
+
pluginListEl.querySelectorAll(".menu-plugin-item").forEach((el) => {
|
|
72830
|
+
el.addEventListener("click", () => {
|
|
72831
|
+
const id33 = el.dataset.pluginId;
|
|
72832
|
+
const p2 = getAllPlugins().find((x2) => x2.id === id33);
|
|
72833
|
+
if (p2) {
|
|
72834
|
+
togglePlugin(id33, !p2.enabled);
|
|
72835
|
+
const mode = p2.enabled ? "rendered" : "raw";
|
|
72836
|
+
togglePluginMode(p2.nodeTypes || [], mode);
|
|
72837
|
+
api.syncPluginState(p2.id, p2.enabled);
|
|
72838
|
+
const toggle = el.querySelector(".menu-plugin-toggle");
|
|
72839
|
+
toggle?.classList.toggle("on", p2.enabled);
|
|
72840
|
+
}
|
|
72841
|
+
});
|
|
72842
|
+
});
|
|
72843
|
+
}
|
|
72844
|
+
menuEl.querySelectorAll(".menu-item").forEach((el) => {
|
|
72845
|
+
el.addEventListener("click", async () => {
|
|
72846
|
+
const action = el.dataset.action;
|
|
72847
|
+
if (!action) return;
|
|
72848
|
+
closeMenu();
|
|
72849
|
+
switch (action) {
|
|
72850
|
+
case "new":
|
|
72851
|
+
exitSourceMode();
|
|
72852
|
+
setMarkdown("");
|
|
72853
|
+
break;
|
|
72854
|
+
case "open": {
|
|
72855
|
+
const result = await api.openFile();
|
|
72856
|
+
if (result) setContent(result.content);
|
|
72857
|
+
break;
|
|
72858
|
+
}
|
|
72859
|
+
case "save":
|
|
72860
|
+
syncRawEdits();
|
|
72861
|
+
{
|
|
72862
|
+
const ok2 = await api.saveFile(getContent());
|
|
72863
|
+
if (ok2) {
|
|
72864
|
+
showToast("Saved");
|
|
72865
|
+
restoreRenderedMode(api);
|
|
72866
|
+
} else {
|
|
72867
|
+
showToast("Save failed");
|
|
72868
|
+
}
|
|
72869
|
+
}
|
|
72870
|
+
break;
|
|
72871
|
+
case "save-as":
|
|
72872
|
+
syncRawEdits();
|
|
72873
|
+
{
|
|
72874
|
+
const ok2 = await api.saveFileAs(getContent());
|
|
72875
|
+
if (ok2) {
|
|
72876
|
+
showToast("Saved");
|
|
72877
|
+
restoreRenderedMode(api);
|
|
72878
|
+
} else {
|
|
72879
|
+
showToast("Save cancelled or failed");
|
|
72880
|
+
}
|
|
72881
|
+
}
|
|
72882
|
+
break;
|
|
72883
|
+
case "export-pdf":
|
|
72884
|
+
syncRawEdits();
|
|
72885
|
+
restoreRenderedMode(api);
|
|
72886
|
+
await ensureAllPluginsRendered();
|
|
72887
|
+
await new Promise((r2) => setTimeout(r2, 300));
|
|
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();
|
|
72898
|
+
setTimeout(() => {
|
|
72899
|
+
document.querySelectorAll(".mermaid-loading, .mermaid-error").forEach((el2) => el2.style.display = "none");
|
|
72900
|
+
}, 1e3);
|
|
72901
|
+
break;
|
|
72902
|
+
case "export-html":
|
|
72903
|
+
syncRawEdits();
|
|
72904
|
+
restoreRenderedMode(api);
|
|
72905
|
+
await ensureAllPluginsRendered();
|
|
72906
|
+
await new Promise((r2) => setTimeout(r2, 200));
|
|
72907
|
+
api.exportHTML(buildExportHTML());
|
|
72908
|
+
break;
|
|
72909
|
+
case "export-slides":
|
|
72910
|
+
await api.exportSlides(getContent());
|
|
72911
|
+
break;
|
|
72912
|
+
case "new-slides": {
|
|
72913
|
+
const template = await api.newSlides();
|
|
72914
|
+
if (template) enterSourceMode(template);
|
|
72915
|
+
break;
|
|
72916
|
+
}
|
|
72917
|
+
case "open-as-slides":
|
|
72918
|
+
await api.openAsSlides(getContent());
|
|
72919
|
+
break;
|
|
72920
|
+
case "import-theme": {
|
|
72921
|
+
const result = await api.loadCustomTheme();
|
|
72922
|
+
if (result) {
|
|
72923
|
+
setCachedCustomTheme(result.name, result.css);
|
|
72924
|
+
applyTheme(`custom:${result.name}`);
|
|
72925
|
+
}
|
|
72926
|
+
break;
|
|
72927
|
+
}
|
|
72928
|
+
case "about":
|
|
72929
|
+
api.openExternal("https://github.com/byteuser1977/ColaMD-extend");
|
|
72930
|
+
break;
|
|
72931
|
+
case "exit":
|
|
72932
|
+
try {
|
|
72933
|
+
const { App } = await __vitePreload(async () => {
|
|
72934
|
+
const { App: App2 } = await import("./index-D4CPFkph.js");
|
|
72935
|
+
return { App: App2 };
|
|
72936
|
+
}, true ? __vite__mapDeps([54,3,52]) : void 0, import.meta.url);
|
|
72937
|
+
await App.exitApp();
|
|
72938
|
+
} catch {
|
|
72939
|
+
window.close();
|
|
72940
|
+
}
|
|
72941
|
+
break;
|
|
72942
|
+
}
|
|
72943
|
+
});
|
|
72944
|
+
});
|
|
72945
|
+
}
|
|
72946
|
+
function buildExportHTML() {
|
|
72947
|
+
const bodyStyle = getComputedStyle(document.body);
|
|
72948
|
+
const v2 = (name) => bodyStyle.getPropertyValue(name).trim();
|
|
72949
|
+
const bgColor = v2("--bg-color");
|
|
72950
|
+
const textColor = v2("--text-color");
|
|
72951
|
+
const textMuted = v2("--text-muted");
|
|
72952
|
+
const borderColor = v2("--border-color");
|
|
72953
|
+
const linkColor = v2("--link-color");
|
|
72954
|
+
const codeBg = v2("--code-bg");
|
|
72955
|
+
const codeBlockBg = v2("--code-block-bg");
|
|
72956
|
+
const codeBlockText = v2("--code-block-text") || textColor;
|
|
72957
|
+
const blockquoteBorder = v2("--blockquote-border");
|
|
72958
|
+
const blockquoteBg = v2("--blockquote-bg") || "transparent";
|
|
72959
|
+
const tableHeaderBg = v2("--table-header-bg");
|
|
72960
|
+
const selectionBg = v2("--selection-bg");
|
|
72961
|
+
const editor = document.querySelector("#editor .ProseMirror");
|
|
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
|
+
};
|
|
72974
|
+
const getElColor = (selector2, fallback) => {
|
|
72975
|
+
const el = document.querySelector(`#editor .ProseMirror ${selector2}`);
|
|
72976
|
+
return el ? getComputedStyle(el).color : fallback;
|
|
72977
|
+
};
|
|
72978
|
+
const strongColor = getElColor("strong", textColor);
|
|
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";
|
|
73014
|
+
return `<!DOCTYPE html>
|
|
73015
|
+
<html><head><meta charset="utf-8"><title>ColaMD Export</title>
|
|
73016
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.46/dist/katex.min.css">
|
|
73017
|
+
<style>
|
|
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")}}
|
|
73031
|
+
strong{color:${strongColor}}
|
|
73032
|
+
a{color:${linkColor};text-decoration:none}
|
|
73033
|
+
code{background:${codeBg};color:${codeColor};padding:2px 6px;border-radius:3px;font-size:.875em;font-family:'SF Mono','Fira Code',Menlo,monospace}
|
|
73034
|
+
pre{background:${codeBlockBg};color:${codeBlockText};padding:16px;border-radius:6px;overflow-x:auto;margin:1em 0}
|
|
73035
|
+
pre code{background:none;padding:0;color:inherit}
|
|
73036
|
+
blockquote{border-left:4px solid ${blockquoteBorder};background:${blockquoteBg};padding-left:16px;margin:1em 0;color:${textMuted}}
|
|
73037
|
+
table{border-collapse:collapse;width:100%;margin:1em 0}
|
|
73038
|
+
th,td{border:1px solid ${borderColor};padding:8px 12px}
|
|
73039
|
+
th{background:${tableHeaderBg};font-weight:600}
|
|
73040
|
+
hr{border:none;border-top:2px solid ${borderColor};margin:2em 0}`}
|
|
73041
|
+
img{max-width:100%}
|
|
73042
|
+
::selection{background:${selectionBg}}
|
|
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
|
+
})()}
|
|
73052
|
+
</style>
|
|
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
|
+
`;
|
|
73162
|
+
}
|
|
72140
73163
|
init().catch((e2) => console.error("ColaMD init failed:", e2));
|
|
72141
73164
|
export {
|
|
72142
73165
|
commonDb_exports as $,
|
|
@@ -72264,7 +73287,6 @@ export {
|
|
|
72264
73287
|
Symbol$1 as bs,
|
|
72265
73288
|
isSymbol as bt,
|
|
72266
73289
|
freeGlobal as bu,
|
|
72267
|
-
__vitePreload as bv,
|
|
72268
73290
|
getConfig2 as c,
|
|
72269
73291
|
select as d,
|
|
72270
73292
|
configureSvgSize as e,
|