@bytechain.cn/colamd 1.5.1 → 1.5.2
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/CHANGELOG.md +35 -0
- package/README.md +105 -38
- package/README_CN.md +121 -46
- package/dist/lib/colamd-renderer.js +193804 -0
- package/dist/lib/colamd-renderer.js.map +1 -0
- package/dist/lib/colamd.css +1810 -0
- package/dist/lib/editor/editor.d.ts +27 -0
- package/dist/lib/editor/html-view.d.ts +2 -0
- package/dist/lib/editor/lib.d.ts +49 -0
- package/dist/lib/editor/plugins/index.d.ts +56 -0
- package/dist/lib/editor/plugins/lib-entry.d.ts +10 -0
- package/dist/lib/editor/plugins/math-plugin.d.ts +9 -0
- package/dist/lib/editor/plugins/mermaid-plugin.d.ts +19 -0
- package/dist/lib/editor/plugins/themes/theme-manager.d.ts +30 -0
- package/dist/main/index.js +93 -32
- package/dist/preload/index.js +2 -1
- package/dist/renderer/assets/{arc-_lugyDzx.js → arc-CpIo2PoE.js} +1 -1
- package/dist/renderer/assets/{architectureDiagram-3BPJPVTR-DDfP-F9D.js → architectureDiagram-3BPJPVTR-T-4Cq0Bz.js} +2 -2
- package/dist/renderer/assets/{blockDiagram-GPEHLZMM-DOETUKma.js → blockDiagram-GPEHLZMM-C-SuR6eu.js} +4 -4
- package/dist/renderer/assets/{c4Diagram-AAUBKEIU-kAmLfVtk.js → c4Diagram-AAUBKEIU-PJp81cGm.js} +2 -2
- package/dist/renderer/assets/{channel-CD4vJFwr.js → channel-CtIHaaRI.js} +1 -1
- package/dist/renderer/assets/{chunk-2J33WTMH-DkVrgw4l.js → chunk-2J33WTMH-BrchfQL6.js} +1 -1
- package/dist/renderer/assets/{chunk-4BX2VUAB-JTZ-VKNX.js → chunk-4BX2VUAB-BCc3Ev_H.js} +1 -1
- package/dist/renderer/assets/{chunk-55IACEB6-Di_O5box.js → chunk-55IACEB6-B2M27HQo.js} +1 -1
- package/dist/renderer/assets/{chunk-727SXJPM-BgKvwR8w.js → chunk-727SXJPM-DXDHGECs.js} +5 -5
- package/dist/renderer/assets/{chunk-AQP2D5EJ-DonSXCCQ.js → chunk-AQP2D5EJ-BNb1lOQY.js} +3 -3
- package/dist/renderer/assets/{chunk-FMBD7UC4-CsV8Lmy6.js → chunk-FMBD7UC4-CzgfEH2z.js} +1 -1
- package/dist/renderer/assets/{chunk-ND2GUHAM-C_-_dlq7.js → chunk-ND2GUHAM-BUFT_yOe.js} +1 -1
- package/dist/renderer/assets/{chunk-QZHKN3VN-aCmcDsfu.js → chunk-QZHKN3VN-C-zV7oBi.js} +1 -1
- package/dist/renderer/assets/{classDiagram-v2-Q7XG4LA2-nuHQLjzM.js → classDiagram-4FO5ZUOK-CAyhGSvf.js} +6 -6
- package/dist/renderer/assets/{classDiagram-4FO5ZUOK-nuHQLjzM.js → classDiagram-v2-Q7XG4LA2-CAyhGSvf.js} +6 -6
- package/dist/renderer/assets/{cose-bilkent-S5V4N54A-Di1_SXt9.js → cose-bilkent-S5V4N54A-ldu81kCk.js} +1 -1
- package/dist/renderer/assets/{dagre-BM42HDAG-CqOUIYsL.js → dagre-BM42HDAG-NJgy8CTw.js} +3 -3
- package/dist/renderer/assets/{diagram-2AECGRRQ-F-fP19TC.js → diagram-2AECGRRQ-CuIcMpOn.js} +2 -2
- package/dist/renderer/assets/{diagram-5GNKFQAL-BD5XZc8G.js → diagram-5GNKFQAL-BJwFCroB.js} +3 -3
- package/dist/renderer/assets/{diagram-KO2AKTUF-Qa3ZxA67.js → diagram-KO2AKTUF-C7NgQ8ju.js} +2 -2
- package/dist/renderer/assets/{diagram-LMA3HP47-DqDnw2RA.js → diagram-LMA3HP47-B71v6MOq.js} +2 -2
- package/dist/renderer/assets/{diagram-OG6HWLK6-BH4Elzby.js → diagram-OG6HWLK6-D2ZxkrSe.js} +3 -3
- package/dist/renderer/assets/{erDiagram-TEJ5UH35-CaKZCewa.js → erDiagram-TEJ5UH35-4ToW0p3h.js} +4 -4
- package/dist/renderer/assets/{flowDiagram-I6XJVG4X-C8znUgyL.js → flowDiagram-I6XJVG4X-DBkZLqwn.js} +6 -6
- package/dist/renderer/assets/{ganttDiagram-6RSMTGT7-DnRvbMnU.js → ganttDiagram-6RSMTGT7-G3xD2VXj.js} +2 -2
- package/dist/renderer/assets/{gitGraphDiagram-PVQCEYII-CZuRZzk4.js → gitGraphDiagram-PVQCEYII-BcTNiFfg.js} +3 -3
- package/dist/renderer/assets/{graph-CYiEKt0j.js → graph--Vhl4p4D.js} +1 -1
- package/dist/renderer/assets/{index-BX6JHKv6.js → index-C63bU7CF.js} +400 -54
- package/dist/renderer/assets/{index-CcwAgVRi.css → index-D8nA981z.css} +12 -0
- package/dist/renderer/assets/{infoDiagram-5YYISTIA-BlBUdqMb.js → infoDiagram-5YYISTIA-DjKa7Yv-.js} +1 -1
- package/dist/renderer/assets/{ishikawaDiagram-YF4QCWOH-TeVytCrP.js → ishikawaDiagram-YF4QCWOH-xIWzW1pL.js} +1 -1
- package/dist/renderer/assets/{journeyDiagram-JHISSGLW-BLZa3jnX.js → journeyDiagram-JHISSGLW-DxMBkVOF.js} +4 -4
- package/dist/renderer/assets/{kanban-definition-UN3LZRKU-foVxWrJn.js → kanban-definition-UN3LZRKU-DqJeL6E1.js} +2 -2
- package/dist/renderer/assets/{layout-DOAlFUVb.js → layout-B3giiMoK.js} +2 -2
- package/dist/renderer/assets/{linear-BMBn6kVq.js → linear-Cqh3vVIf.js} +1 -1
- package/dist/renderer/assets/{mindmap-definition-RKZ34NQL-5pGeNCcp.js → mindmap-definition-RKZ34NQL-DUay02ma.js} +3 -3
- package/dist/renderer/assets/{pieDiagram-4H26LBE5-N9aAUxfr.js → pieDiagram-4H26LBE5-CVcfLtky.js} +3 -3
- package/dist/renderer/assets/{quadrantDiagram-W4KKPZXB-BPxbtjga.js → quadrantDiagram-W4KKPZXB-wDHffPOs.js} +2 -2
- package/dist/renderer/assets/{requirementDiagram-4Y6WPE33-CK1LrJyG.js → requirementDiagram-4Y6WPE33-C4pgGDGv.js} +3 -3
- package/dist/renderer/assets/{sankeyDiagram-5OEKKPKP-BNj7Sqii.js → sankeyDiagram-5OEKKPKP-Jsf0rRMo.js} +1 -1
- package/dist/renderer/assets/{sequenceDiagram-3UESZ5HK-B-r7lNhI.js → sequenceDiagram-3UESZ5HK-e6QS7gt8.js} +3 -3
- package/dist/renderer/assets/{stateDiagram-AJRCARHV-wrWE0MRa.js → stateDiagram-AJRCARHV-DgYKZzDq.js} +6 -6
- package/dist/renderer/assets/{stateDiagram-v2-BHNVJYJU-CE-Lqo2d.js → stateDiagram-v2-BHNVJYJU-CUdmd_50.js} +4 -4
- package/dist/renderer/assets/{timeline-definition-PNZ67QCA-BkeMGH4J.js → timeline-definition-PNZ67QCA-S12e1Mp_.js} +2 -2
- package/dist/renderer/assets/{vennDiagram-CIIHVFJN-BTxVzto3.js → vennDiagram-CIIHVFJN-CNDBG6A2.js} +1 -1
- package/dist/renderer/assets/{wardleyDiagram-YWT4CUSO-D2r5dVGW.js → wardleyDiagram-YWT4CUSO-CLlGQcof.js} +2 -2
- package/dist/renderer/assets/{xychartDiagram-2RQKCTM6-BHQdINVc.js → xychartDiagram-2RQKCTM6-CUtsHUQd.js} +2 -2
- package/dist/renderer/index.html +6 -2
- package/package.json +25 -1
- package/.github/workflows/release.yml +0 -66
- package/.trae/specs/optimize-theme-loading/checklist.md +0 -20
- package/.trae/specs/optimize-theme-loading/spec.md +0 -103
- package/.trae/specs/optimize-theme-loading/tasks.md +0 -40
- package/CLAUDE.md +0 -143
- package/android/app/build/.npmkeep +0 -0
- package/android/app/build.gradle +0 -76
- package/android/app/capacitor.build.gradle +0 -24
- package/android/app/proguard-rules.pro +0 -21
- package/android/app/release.keystore +0 -0
- package/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java +0 -26
- package/android/app/src/main/AndroidManifest.xml +0 -64
- package/android/app/src/main/java/cn/bytechain/colamd/MainActivity.java +0 -180
- package/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -170
- 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 +0 -34
- package/android/app/src/main/res/layout/activity_main.xml +0 -12
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- 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 +0 -4
- package/android/app/src/main/res/values/strings.xml +0 -7
- package/android/app/src/main/res/values/styles.xml +0 -22
- package/android/app/src/main/res/xml/file_paths.xml +0 -5
- package/android/app/src/main/res/xml/network_security_config.xml +0 -8
- package/android/app/src/test/java/com/getcapacitor/myapp/ExampleUnitTest.java +0 -18
- package/android/build.gradle +0 -29
- package/android/capacitor.settings.gradle +0 -21
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradle.properties +0 -22
- package/android/gradlew +0 -248
- package/android/gradlew.bat +0 -92
- package/android/settings.gradle +0 -5
- package/android/variables.gradle +0 -16
- package/capacitor.config.js +0 -29
- package/capacitor.config.ts +0 -30
- package/demo.md +0 -193
- package/docs/RELEASE_NOTES_v1.5.1.md +0 -382
- package/docs/academic-demo.md +0 -567
- package/docs/agent-diff-view.md +0 -48
- package/docs/demo.html +0 -748
- package/docs/demo.md +0 -546
- package/docs/demo.pdf +0 -0
- package/docs/theme-paradigm.md +0 -797
- package/electron-builder.yml +0 -64
- package/electron.vite.config.js +0 -31
- package/electron.vite.config.ts +0 -30
- package/ios/App/App/AppDelegate.swift +0 -49
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
- package/ios/App/App/Assets.xcassets/Contents.json +0 -6
- package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
- 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 +0 -32
- package/ios/App/App/Base.lproj/Main.storyboard +0 -19
- package/ios/App/App/Info.plist +0 -49
- package/ios/App/App.xcodeproj/project.pbxproj +0 -408
- package/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/App/Podfile +0 -28
- package/resources/entitlements.mac.plist +0 -12
- package/resources/icon.icns +0 -0
- package/resources/icon.png +0 -0
- package/resources/icon.svg +0 -23
- package/resources/templates/slides/icon.png +0 -0
- package/resources/templates/slides/slides-template.md +0 -74
- package/resources/templates/slides/template-forest-ink.html +0 -540
- package/resources/templates/slides/template.html +0 -535
- package/scripts/afterPack.js +0 -13
- package/scripts/generate-icons.js +0 -102
- package/src/main/index.ts +0 -919
- package/src/preload/index.d.ts +0 -51
- package/src/preload/index.js +0 -70
- package/src/preload/index.ts +0 -110
- package/src/renderer/capacitor-api.ts +0 -713
- package/src/renderer/editor/editor.ts +0 -287
- package/src/renderer/editor/html-view.ts +0 -15
- package/src/renderer/editor/plugins/index.ts +0 -86
- package/src/renderer/editor/plugins/math-plugin.ts +0 -305
- package/src/renderer/editor/plugins/mermaid-plugin-custom.css +0 -46
- package/src/renderer/editor/plugins/mermaid-plugin-dark.css +0 -428
- package/src/renderer/editor/plugins/mermaid-plugin-elegant.css +0 -443
- package/src/renderer/editor/plugins/mermaid-plugin-newsprint.css +0 -208
- package/src/renderer/editor/plugins/mermaid-plugin.css +0 -111
- package/src/renderer/editor/plugins/mermaid-plugin.ts +0 -680
- package/src/renderer/editor/plugins/themes/base/dark.css +0 -23
- package/src/renderer/editor/plugins/themes/base/elegant.css +0 -32
- package/src/renderer/editor/plugins/themes/base/light.css +0 -20
- package/src/renderer/editor/plugins/themes/base/newsprint.css +0 -27
- package/src/renderer/editor/plugins/themes/base.css +0 -509
- package/src/renderer/editor/plugins/themes/components/mermaid/academic.css +0 -43
- package/src/renderer/editor/plugins/themes/components/mermaid/dark.css +0 -20
- package/src/renderer/editor/plugins/themes/components/mermaid/elegant.css +0 -24
- package/src/renderer/editor/plugins/themes/components/mermaid/light.css +0 -21
- package/src/renderer/editor/plugins/themes/components/mermaid/newsprint.css +0 -26
- package/src/renderer/editor/plugins/themes/components/mermaid/variables.css +0 -592
- package/src/renderer/editor/plugins/themes/foundation.css +0 -143
- package/src/renderer/editor/plugins/themes/theme-manager.ts +0 -133
- package/src/renderer/env.d.ts +0 -10
- package/src/renderer/index.html +0 -76
- package/src/renderer/main.ts +0 -775
- package/src/renderer/mobile.css +0 -428
- package/tsconfig.json +0 -14
- package/tsconfig.main.json +0 -12
- package/tsconfig.main.tsbuildinfo +0 -1
- package/tsconfig.preload.json +0 -12
- package/tsconfig.preload.tsbuildinfo +0 -1
- package/tsconfig.renderer.json +0 -13
- package/tsconfig.renderer.tsbuildinfo +0 -1
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -110,6 +110,18 @@
|
|
|
110
110
|
font-size: 0.875em;
|
|
111
111
|
white-space: pre-wrap;
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
.mermaid-error-source {
|
|
115
|
+
background: var(--code-block-bg, #f6f8fa);
|
|
116
|
+
color: var(--code-block-text, var(--text-color, #24292f));
|
|
117
|
+
padding: 16px;
|
|
118
|
+
border-radius: 6px;
|
|
119
|
+
overflow-x: auto;
|
|
120
|
+
margin: 1em 0;
|
|
121
|
+
font-size: 0.875em;
|
|
122
|
+
line-height: 1.6;
|
|
123
|
+
border-left: 3px solid var(--border-color, #d0d7de);
|
|
124
|
+
}
|
|
113
125
|
body.theme-dark .mermaid-preview svg text {
|
|
114
126
|
fill: #e6edf3;
|
|
115
127
|
}
|
package/dist/renderer/assets/{infoDiagram-5YYISTIA-BlBUdqMb.js → infoDiagram-5YYISTIA-DjKa7Yv-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __name, l as log, I as selectSvgElement, e as configureSvgSize } from "./index-
|
|
1
|
+
import { _ as __name, l as log, I as selectSvgElement, e as configureSvgSize } from "./index-C63bU7CF.js";
|
|
2
2
|
import { p as parse } from "./wardley-L42UT6IY-b-_GPpqL.js";
|
|
3
3
|
import "./preload-helper-tXtZnHb0.js";
|
|
4
4
|
var parser = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __name, c as getConfig2, N as parseFontSize, I as selectSvgElement, al as at, z as clear, k as common_default, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, g as getAccDescription, s as setAccDescription, q as getDiagramTitle, e as configureSvgSize } from "./index-
|
|
1
|
+
import { _ as __name, c as getConfig2, N as parseFontSize, I as selectSvgElement, al as at, z as clear, k as common_default, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, g as getAccDescription, s as setAccDescription, q as getDiagramTitle, e as configureSvgSize } from "./index-C63bU7CF.js";
|
|
2
2
|
import "./preload-helper-tXtZnHb0.js";
|
|
3
3
|
var parser = (function() {
|
|
4
4
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as getIconStyles } from "./chunk-FMBD7UC4-
|
|
2
|
-
import { a as drawBackgroundRect, g as getNoteRect, h as drawText, d as drawRect } from "./chunk-ND2GUHAM-
|
|
3
|
-
import { g as getAccDescription, s as setAccDescription, a as getAccTitle, b as setAccTitle, q as getDiagramTitle, p as setDiagramTitle, _ as __name, c as getConfig2, d as select, e as configureSvgSize, z as clear } from "./index-
|
|
4
|
-
import { d as d3arc } from "./arc-
|
|
1
|
+
import { g as getIconStyles } from "./chunk-FMBD7UC4-CzgfEH2z.js";
|
|
2
|
+
import { a as drawBackgroundRect, g as getNoteRect, h as drawText, d as drawRect } from "./chunk-ND2GUHAM-BUFT_yOe.js";
|
|
3
|
+
import { g as getAccDescription, s as setAccDescription, a as getAccTitle, b as setAccTitle, q as getDiagramTitle, p as setDiagramTitle, _ as __name, c as getConfig2, d as select, e as configureSvgSize, z as clear } from "./index-C63bU7CF.js";
|
|
4
|
+
import { d as d3arc } from "./arc-CpIo2PoE.js";
|
|
5
5
|
import "./preload-helper-tXtZnHb0.js";
|
|
6
6
|
var parser = (function() {
|
|
7
7
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as __name, l as log, c as getConfig2, I as selectSvgElement, af as insertCluster, ag as insertNode, ah as positionNode, Y as setupGraphViewbox, G as defaultConfig_default, i as sanitizeText, t as load, J as JSON_SCHEMA, V as isDark, W as lighten, X as darken } from "./index-
|
|
2
|
-
import { g as getIconStyles } from "./chunk-FMBD7UC4-
|
|
1
|
+
import { _ as __name, l as log, c as getConfig2, I as selectSvgElement, af as insertCluster, ag as insertNode, ah as positionNode, Y as setupGraphViewbox, G as defaultConfig_default, i as sanitizeText, t as load, J as JSON_SCHEMA, V as isDark, W as lighten, X as darken } from "./index-C63bU7CF.js";
|
|
2
|
+
import { g as getIconStyles } from "./chunk-FMBD7UC4-CzgfEH2z.js";
|
|
3
3
|
import "./preload-helper-tXtZnHb0.js";
|
|
4
4
|
var parser = (function() {
|
|
5
5
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as defineProperty, e as eq, a as isArrayLike, b as isIndex, c as baseRest, f as isPrototype, g as arrayLikeKeys, h as baseFlatten, s as setToString, o as overRest, j as overArg, k as keys, l as getSymbols, m as stubArray, n as arrayPush, p as baseGetAllKeys, U as Uint8Array, q as getTag, r as baseUnary, t as nodeUtil, u as isBuffer, S as Stack, v as arrayEach, w as isArray, x as getAllKeys, y as isTypedArray, z as isArrayLikeObject, A as isArguments, B as isFunction, C as baseFor, D as baseIteratee, E as baseFindIndex, F as baseEach, H as arrayMap, I as castFunction, J as baseForOwn, K as hasPath, L as identity, M as castPath, N as toKey, O as baseGet, P as hasIn, Q as toString, G as Graph, R as forEach, T as constant, i as isUndefined, V as filter, W as values, X as reduce } from "./graph
|
|
2
|
-
import { bn as toNumber, bo as isObject, bp as isObjectLike, bq as baseGetTag, br as root, bs as Symbol$1, bt as isSymbol } from "./index-
|
|
1
|
+
import { d as defineProperty, e as eq, a as isArrayLike, b as isIndex, c as baseRest, f as isPrototype, g as arrayLikeKeys, h as baseFlatten, s as setToString, o as overRest, j as overArg, k as keys, l as getSymbols, m as stubArray, n as arrayPush, p as baseGetAllKeys, U as Uint8Array, q as getTag, r as baseUnary, t as nodeUtil, u as isBuffer, S as Stack, v as arrayEach, w as isArray, x as getAllKeys, y as isTypedArray, z as isArrayLikeObject, A as isArguments, B as isFunction, C as baseFor, D as baseIteratee, E as baseFindIndex, F as baseEach, H as arrayMap, I as castFunction, J as baseForOwn, K as hasPath, L as identity, M as castPath, N as toKey, O as baseGet, P as hasIn, Q as toString, G as Graph, R as forEach, T as constant, i as isUndefined, V as filter, W as values, X as reduce } from "./graph--Vhl4p4D.js";
|
|
2
|
+
import { bn as toNumber, bo as isObject, bp as isObjectLike, bq as baseGetTag, br as root, bs as Symbol$1, bt as isSymbol } from "./index-C63bU7CF.js";
|
|
3
3
|
var INFINITY = 1 / 0, MAX_INTEGER = 17976931348623157e292;
|
|
4
4
|
function toFinite(value) {
|
|
5
5
|
if (!value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b8 as constant, b9 as interpolateNumber, ba as color, bb as interpolateRgb, bc as interpolateString } from "./index-
|
|
1
|
+
import { b8 as constant, b9 as interpolateNumber, ba as color, bb as interpolateRgb, bc as interpolateString } from "./index-C63bU7CF.js";
|
|
2
2
|
import { i as initRange } from "./init-ZxktEp_H.js";
|
|
3
3
|
import { e as exponent, f as formatSpecifier, a as formatPrefix, b as format } from "./defaultLocale-B2RvLBDe.js";
|
|
4
4
|
function ascending(a, b) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getDiagramElement } from "./chunk-55IACEB6-
|
|
2
|
-
import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-
|
|
3
|
-
import { _ as __name, l as log, o as getRegisteredLayoutAlgorithm, r as render, D as getConfig, G as defaultConfig_default, c as getConfig2, i as sanitizeText, b3 as getUserDefinedConfig, V as isDark, W as lighten, X as darken } from "./index-
|
|
1
|
+
import { g as getDiagramElement } from "./chunk-55IACEB6-B2M27HQo.js";
|
|
2
|
+
import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-BrchfQL6.js";
|
|
3
|
+
import { _ as __name, l as log, o as getRegisteredLayoutAlgorithm, r as render, D as getConfig, G as defaultConfig_default, c as getConfig2, i as sanitizeText, b3 as getUserDefinedConfig, V as isDark, W as lighten, X as darken } from "./index-C63bU7CF.js";
|
|
4
4
|
import "./preload-helper-tXtZnHb0.js";
|
|
5
5
|
const byteToHex = [];
|
|
6
6
|
for (let i = 0; i < 256; ++i) {
|
package/dist/renderer/assets/{pieDiagram-4H26LBE5-N9aAUxfr.js → pieDiagram-4H26LBE5-CVcfLtky.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ab as constant, a3 as tau, b2 as array, g as getAccDescription, s as setAccDescription, a as getAccTitle, b as setAccTitle, q as getDiagramTitle, p as setDiagramTitle, _ as __name, l as log, c as getConfig2$1, F as cleanAndMerge, I as selectSvgElement, N as parseFontSize, e as configureSvgSize, z as clear, G as defaultConfig_default } from "./index-
|
|
2
|
-
import { p as populateCommonDb } from "./chunk-4BX2VUAB-
|
|
1
|
+
import { ab as constant, a3 as tau, b2 as array, g as getAccDescription, s as setAccDescription, a as getAccTitle, b as setAccTitle, q as getDiagramTitle, p as setDiagramTitle, _ as __name, l as log, c as getConfig2$1, F as cleanAndMerge, I as selectSvgElement, N as parseFontSize, e as configureSvgSize, z as clear, G as defaultConfig_default } from "./index-C63bU7CF.js";
|
|
2
|
+
import { p as populateCommonDb } from "./chunk-4BX2VUAB-BCc3Ev_H.js";
|
|
3
3
|
import { p as parse } from "./wardley-L42UT6IY-b-_GPpqL.js";
|
|
4
|
-
import { d as d3arc } from "./arc-
|
|
4
|
+
import { d as d3arc } from "./arc-CpIo2PoE.js";
|
|
5
5
|
import { o as ordinal } from "./ordinal-DSZU4PqD.js";
|
|
6
6
|
import "./preload-helper-tXtZnHb0.js";
|
|
7
7
|
import "./init-ZxktEp_H.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, c as getConfig2, l as log, d as select, e as configureSvgSize, z as clear, G as defaultConfig_default, i as sanitizeText, K as getThemeVariables3 } from "./index-
|
|
2
|
-
import { l as linear } from "./linear-
|
|
1
|
+
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, c as getConfig2, l as log, d as select, e as configureSvgSize, z as clear, G as defaultConfig_default, i as sanitizeText, K as getThemeVariables3 } from "./index-C63bU7CF.js";
|
|
2
|
+
import { l as linear } from "./linear-Cqh3vVIf.js";
|
|
3
3
|
import "./preload-helper-tXtZnHb0.js";
|
|
4
4
|
import "./init-ZxktEp_H.js";
|
|
5
5
|
import "./defaultLocale-B2RvLBDe.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as getDiagramElement } from "./chunk-55IACEB6-
|
|
2
|
-
import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-
|
|
3
|
-
import { _ as __name, D as getConfig, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, p as setDiagramTitle, q as getDiagramTitle, c as getConfig2, l as log, z as clear, C as __export, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default } from "./index-
|
|
1
|
+
import { g as getDiagramElement } from "./chunk-55IACEB6-B2M27HQo.js";
|
|
2
|
+
import { s as setupViewPortForSVG } from "./chunk-2J33WTMH-BrchfQL6.js";
|
|
3
|
+
import { _ as __name, D as getConfig, b as setAccTitle, a as getAccTitle, s as setAccDescription, g as getAccDescription, p as setDiagramTitle, q as getDiagramTitle, c as getConfig2, l as log, z as clear, C as __export, o as getRegisteredLayoutAlgorithm, r as render, u as utils_default } from "./index-C63bU7CF.js";
|
|
4
4
|
import "./preload-helper-tXtZnHb0.js";
|
|
5
5
|
var parser = (function() {
|
|
6
6
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as setDiagramTitle, q as getDiagramTitle, s as setAccDescription, g as getAccDescription, b as setAccTitle, a as getAccTitle, _ as __name, c as getConfig2, A as defaultConfig2, d as select, Y as setupGraphViewbox, z as clear, k as common_default } from "./index-
|
|
1
|
+
import { p as setDiagramTitle, q as getDiagramTitle, s as setAccDescription, g as getAccDescription, b as setAccTitle, a as getAccTitle, _ as __name, c as getConfig2, A as defaultConfig2, d as select, Y as setupGraphViewbox, z as clear, k as common_default } from "./index-C63bU7CF.js";
|
|
2
2
|
import { o as ordinal } from "./ordinal-DSZU4PqD.js";
|
|
3
3
|
import "./preload-helper-tXtZnHb0.js";
|
|
4
4
|
import "./init-ZxktEp_H.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as __name, n as setConfig2, c as getConfig2, d as select, l as log, j as distExports, e as configureSvgSize, f as assignWithDepth_default, k as common_default, b as setAccTitle, s as setAccDescription, p as setDiagramTitle, a as getAccTitle, g as getAccDescription, q as getDiagramTitle, t as load, J as JSON_SCHEMA, z as clear, i as sanitizeText, u as utils_default, L as hasKatex, M as calculateMathMLDimensions, N as parseFontSize, Z as ZERO_WIDTH_SPACE, D as getConfig, O as getUrl, P as renderKatexSanitized } from "./index-
|
|
2
|
-
import { a as drawBackgroundRect, b as getTextObj, g as getNoteRect, d as drawRect, e as drawEmbeddedImage, f as drawImage } from "./chunk-ND2GUHAM-
|
|
3
|
-
import { I as ImperativeState } from "./chunk-QZHKN3VN-
|
|
1
|
+
import { _ as __name, n as setConfig2, c as getConfig2, d as select, l as log, j as distExports, e as configureSvgSize, f as assignWithDepth_default, k as common_default, b as setAccTitle, s as setAccDescription, p as setDiagramTitle, a as getAccTitle, g as getAccDescription, q as getDiagramTitle, t as load, J as JSON_SCHEMA, z as clear, i as sanitizeText, u as utils_default, L as hasKatex, M as calculateMathMLDimensions, N as parseFontSize, Z as ZERO_WIDTH_SPACE, D as getConfig, O as getUrl, P as renderKatexSanitized } from "./index-C63bU7CF.js";
|
|
2
|
+
import { a as drawBackgroundRect, b as getTextObj, g as getNoteRect, d as drawRect, e as drawEmbeddedImage, f as drawImage } from "./chunk-ND2GUHAM-BUFT_yOe.js";
|
|
3
|
+
import { I as ImperativeState } from "./chunk-QZHKN3VN-C-zV7oBi.js";
|
|
4
4
|
import "./preload-helper-tXtZnHb0.js";
|
|
5
5
|
var parser = (function() {
|
|
6
6
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
package/dist/renderer/assets/{stateDiagram-AJRCARHV-wrWE0MRa.js → stateDiagram-AJRCARHV-DgYKZzDq.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as styles_default, a as stateDiagram_default, S as StateDB } from "./chunk-AQP2D5EJ-
|
|
2
|
-
import { _ as __name, c as getConfig2, d as select, l as log, e as configureSvgSize, k as common_default, R as line, S as curveBasis, O as getUrl, u as utils_default } from "./index-
|
|
3
|
-
import { G as Graph } from "./graph
|
|
4
|
-
import { l as layout } from "./layout-
|
|
5
|
-
import "./chunk-55IACEB6-
|
|
6
|
-
import "./chunk-2J33WTMH-
|
|
1
|
+
import { s as styles_default, a as stateDiagram_default, S as StateDB } from "./chunk-AQP2D5EJ-BNb1lOQY.js";
|
|
2
|
+
import { _ as __name, c as getConfig2, d as select, l as log, e as configureSvgSize, k as common_default, R as line, S as curveBasis, O as getUrl, u as utils_default } from "./index-C63bU7CF.js";
|
|
3
|
+
import { G as Graph } from "./graph--Vhl4p4D.js";
|
|
4
|
+
import { l as layout } from "./layout-B3giiMoK.js";
|
|
5
|
+
import "./chunk-55IACEB6-B2M27HQo.js";
|
|
6
|
+
import "./chunk-2J33WTMH-BrchfQL6.js";
|
|
7
7
|
import "./preload-helper-tXtZnHb0.js";
|
|
8
8
|
var drawStartState = /* @__PURE__ */ __name((g) => g.append("circle").attr("class", "start-state").attr("r", getConfig2().state.sizeUnit).attr("cx", getConfig2().state.padding + getConfig2().state.sizeUnit).attr("cy", getConfig2().state.padding + getConfig2().state.sizeUnit), "drawStartState");
|
|
9
9
|
var drawDivider = /* @__PURE__ */ __name((g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig2().state.textHeight).attr("class", "divider").attr("x2", getConfig2().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as styles_default, b as stateRenderer_v3_unified_default, a as stateDiagram_default, S as StateDB } from "./chunk-AQP2D5EJ-
|
|
2
|
-
import { _ as __name } from "./index-
|
|
3
|
-
import "./chunk-55IACEB6-
|
|
4
|
-
import "./chunk-2J33WTMH-
|
|
1
|
+
import { s as styles_default, b as stateRenderer_v3_unified_default, a as stateDiagram_default, S as StateDB } from "./chunk-AQP2D5EJ-BNb1lOQY.js";
|
|
2
|
+
import { _ as __name } from "./index-C63bU7CF.js";
|
|
3
|
+
import "./chunk-55IACEB6-B2M27HQo.js";
|
|
4
|
+
import "./chunk-2J33WTMH-BrchfQL6.js";
|
|
5
5
|
import "./preload-helper-tXtZnHb0.js";
|
|
6
6
|
var diagram = {
|
|
7
7
|
parser: stateDiagram_default,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as __name, D as getConfig, V as isDark, W as lighten, X as darken, c as getConfig2, l as log, I as selectSvgElement, N as parseFontSize, Y as setupGraphViewbox, d as select, C as __export, $ as commonDb_exports, z as clear } from "./index-
|
|
2
|
-
import { d as d3arc } from "./arc-
|
|
1
|
+
import { _ as __name, D as getConfig, V as isDark, W as lighten, X as darken, c as getConfig2, l as log, I as selectSvgElement, N as parseFontSize, Y as setupGraphViewbox, d as select, C as __export, $ as commonDb_exports, z as clear } from "./index-C63bU7CF.js";
|
|
2
|
+
import { d as d3arc } from "./arc-CpIo2PoE.js";
|
|
3
3
|
import "./preload-helper-tXtZnHb0.js";
|
|
4
4
|
var parser = (function() {
|
|
5
5
|
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
package/dist/renderer/assets/{vennDiagram-CIIHVFJN-BTxVzto3.js → vennDiagram-CIIHVFJN-CNDBG6A2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aU as adjustChannel, s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, D as getConfig, I as selectSvgElement, d as select, al as at, V as isDark, W as lighten, X as darken, e as configureSvgSize, z as clear, F as cleanAndMerge, G as defaultConfig_default } from "./index-
|
|
1
|
+
import { aU as adjustChannel, s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, D as getConfig, I as selectSvgElement, d as select, al as at, V as isDark, W as lighten, X as darken, e as configureSvgSize, z as clear, F as cleanAndMerge, G as defaultConfig_default } from "./index-C63bU7CF.js";
|
|
2
2
|
import "./preload-helper-tXtZnHb0.js";
|
|
3
3
|
const transparentize = (color, amount) => {
|
|
4
4
|
return adjustChannel(color, "a", -amount);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, K as getThemeVariables3, D as getConfig, F as cleanAndMerge, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, c as getConfig2 } from "./index-
|
|
2
|
-
import { p as populateCommonDb } from "./chunk-4BX2VUAB-
|
|
1
|
+
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, K as getThemeVariables3, D as getConfig, F as cleanAndMerge, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, c as getConfig2 } from "./index-C63bU7CF.js";
|
|
2
|
+
import { p as populateCommonDb } from "./chunk-4BX2VUAB-BCc3Ev_H.js";
|
|
3
3
|
import { p as parse } from "./wardley-L42UT6IY-b-_GPpqL.js";
|
|
4
4
|
import "./preload-helper-tXtZnHb0.js";
|
|
5
5
|
var toPercent = /* @__PURE__ */ __name((value, context) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, D as getConfig, i as sanitizeText, F as cleanAndMerge, G as defaultConfig_default, K as getThemeVariables3, am as computeDimensionOfText, R as line } from "./index-
|
|
1
|
+
import { s as setAccDescription, g as getAccDescription, q as getDiagramTitle, p as setDiagramTitle, a as getAccTitle, b as setAccTitle, _ as __name, l as log, I as selectSvgElement, e as configureSvgSize, z as clear, D as getConfig, i as sanitizeText, F as cleanAndMerge, G as defaultConfig_default, K as getThemeVariables3, am as computeDimensionOfText, R as line } from "./index-C63bU7CF.js";
|
|
2
2
|
import { i as initRange } from "./init-ZxktEp_H.js";
|
|
3
3
|
import { o as ordinal } from "./ordinal-DSZU4PqD.js";
|
|
4
|
-
import { l as linear } from "./linear-
|
|
4
|
+
import { l as linear } from "./linear-Cqh3vVIf.js";
|
|
5
5
|
import "./preload-helper-tXtZnHb0.js";
|
|
6
6
|
import "./defaultLocale-B2RvLBDe.js";
|
|
7
7
|
function range(start, stop, step) {
|
package/dist/renderer/index.html
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
<style>
|
|
9
9
|
#menu-btn, #mobile-menu { display: none; }
|
|
10
10
|
</style>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-C63bU7CF.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-tXtZnHb0.js">
|
|
13
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
13
|
+
<link rel="stylesheet" crossorigin href="./assets/index-D8nA981z.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="titlebar">
|
|
@@ -69,6 +69,10 @@
|
|
|
69
69
|
<button class="menu-item" data-action="about">About ColaMD</button>
|
|
70
70
|
<button class="menu-item" data-action="exit">Exit</button>
|
|
71
71
|
</div>
|
|
72
|
+
<div class="menu-section">
|
|
73
|
+
<div class="menu-section-title">Language</div>
|
|
74
|
+
<div id="menu-language-list"></div>
|
|
75
|
+
</div>
|
|
72
76
|
</div>
|
|
73
77
|
</div>
|
|
74
78
|
</nav>
|
package/package.json
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytechain.cn/colamd",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "The Agent Native Markdown Editor — Extended with Math & Mermaid Plugin System",
|
|
5
5
|
"main": "dist/main/index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./renderer": {
|
|
8
|
+
"import": "./dist/lib/colamd-renderer.js",
|
|
9
|
+
"types": "./dist/lib/colamd-renderer.d.ts"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"typesVersions": {
|
|
13
|
+
"*": {
|
|
14
|
+
"renderer": ["dist/lib/colamd-renderer.d.ts"]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
6
17
|
"author": {
|
|
7
18
|
"name": "byteuser1977",
|
|
8
19
|
"email": "byteuser@qq.com"
|
|
9
20
|
},
|
|
10
21
|
"license": "MIT",
|
|
22
|
+
"files": [
|
|
23
|
+
"dist/",
|
|
24
|
+
"themes/",
|
|
25
|
+
"README.md",
|
|
26
|
+
"README_CN.md",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"CHANGELOG.md"
|
|
29
|
+
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"registry": "https://registry.npmjs.org/"
|
|
33
|
+
},
|
|
11
34
|
"homepage": "https://github.com/byteuser1977/ColaMD-extend",
|
|
12
35
|
"repository": {
|
|
13
36
|
"type": "git",
|
|
14
37
|
"url": "https://github.com/byteuser1977/ColaMD-extend.git"
|
|
15
38
|
},
|
|
16
39
|
"scripts": {
|
|
40
|
+
"build:lib": "vite build --config vite.config.lib.ts && tsc --project tsconfig.lib.json --emitDeclarationOnly",
|
|
17
41
|
"dev": "electron-vite dev",
|
|
18
42
|
"build": "electron-vite build",
|
|
19
43
|
"preview": "electron-vite preview",
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- 'v*'
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
strategy:
|
|
12
|
-
fail-fast: false
|
|
13
|
-
matrix:
|
|
14
|
-
include:
|
|
15
|
-
- os: macos-latest
|
|
16
|
-
platform: mac
|
|
17
|
-
- os: windows-latest
|
|
18
|
-
platform: win
|
|
19
|
-
- os: ubuntu-latest
|
|
20
|
-
platform: linux
|
|
21
|
-
|
|
22
|
-
runs-on: ${{ matrix.os }}
|
|
23
|
-
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
|
|
27
|
-
- uses: actions/setup-node@v4
|
|
28
|
-
with:
|
|
29
|
-
node-version: 20
|
|
30
|
-
|
|
31
|
-
- run: npm install
|
|
32
|
-
|
|
33
|
-
- run: npm run build
|
|
34
|
-
|
|
35
|
-
- name: Build distributables
|
|
36
|
-
run: npx electron-builder --${{ matrix.platform }} --publish never
|
|
37
|
-
|
|
38
|
-
- uses: actions/upload-artifact@v4
|
|
39
|
-
with:
|
|
40
|
-
name: dist-${{ matrix.platform }}
|
|
41
|
-
path: |
|
|
42
|
-
release/*.dmg
|
|
43
|
-
release/*.zip
|
|
44
|
-
release/*.exe
|
|
45
|
-
release/*.AppImage
|
|
46
|
-
release/*.deb
|
|
47
|
-
release/*.yml
|
|
48
|
-
if-no-files-found: ignore
|
|
49
|
-
|
|
50
|
-
release:
|
|
51
|
-
needs: build
|
|
52
|
-
runs-on: ubuntu-latest
|
|
53
|
-
permissions:
|
|
54
|
-
contents: write
|
|
55
|
-
|
|
56
|
-
steps:
|
|
57
|
-
- uses: actions/download-artifact@v4
|
|
58
|
-
with:
|
|
59
|
-
path: artifacts
|
|
60
|
-
merge-multiple: true
|
|
61
|
-
|
|
62
|
-
- name: Create GitHub Release
|
|
63
|
-
uses: softprops/action-gh-release@v2
|
|
64
|
-
with:
|
|
65
|
-
files: artifacts/*
|
|
66
|
-
generate_release_notes: true
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Checklist
|
|
2
|
-
|
|
3
|
-
- [x] themes 目录已从 `src/renderer/themes/` 迁移到 `src/renderer/editor/plugins/themes/`
|
|
4
|
-
- [x] main.ts 中 `./themes/theme-manager` import 路径已更新为 `./editor/plugins/themes/theme-manager`
|
|
5
|
-
- [x] main.ts 中 `./themes/base.css` import 路径已更新为 `./editor/plugins/themes/base.css`
|
|
6
|
-
- [x] `parseTemplateDirective()` 可正确解析 `/* @template: light */` 注释
|
|
7
|
-
- [x] `setCachedCustomTheme()` 在导入自定义主题时正确缓存 CSS 内容和模版引用
|
|
8
|
-
- [x] `customThemeCache` 维护已导入的自定义主题数据
|
|
9
|
-
- [x] `applyTheme('custom:name')` 从缓存恢复 CSS 并正确应用(含模版变量层叠)
|
|
10
|
-
- [x] 自定义 → 预制 → 自定义 切换后样式完全恢复,无残留污染
|
|
11
|
-
- [x] 应用重启后通过 `setCachedCustomTheme` + `applyTheme` 恢复已保存的自定义主题
|
|
12
|
-
- [x] mermaid-plugin-custom.css 已移除与 variables.css 重复的基础选择器(从432行精简至46行)
|
|
13
|
-
- [x] mermaid-plugin-custom.css 变量命名与 `--mermaid-node-stroke` 等 foundation.css 体系对齐
|
|
14
|
-
- [x] mermaid-plugin.ts 中 `getCustomMermaidThemeVariables()` 变量名对齐(8处)
|
|
15
|
-
- [x] mermaid-plugin.ts 中 `getCustomMermaidC4Config()` 变量名对齐(20处)
|
|
16
|
-
- [x] mermaid-plugin.ts 中 custom 的 dark mode 从 `--mermaid-dark-mode` CSS 变量读取
|
|
17
|
-
- [x] 导入引用模版的自定义主题,模版 class 与 theme-custom class 同时生效
|
|
18
|
-
- [x] 导入不引用模版的自定义主题,行为与当前一致(向后兼容)
|
|
19
|
-
- [x] 所有内建主题无需修改,功能不变
|
|
20
|
-
- [x] TypeScript 编译无本次修改引入的新错误
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# 优化外部主题载入设定 Spec
|
|
2
|
-
|
|
3
|
-
## Why
|
|
4
|
-
当前外部导入主题存在两个问题:
|
|
5
|
-
1. **复杂度高**:用户需要编写完整的 CSS 文件(包含大量选择器和变量定义),没有模版继承机制
|
|
6
|
-
2. **Bug**:自定义主题 → 预制主题 → 自定义主题 的切换过程中,自定义 CSS 样式丢失,导致预制主题的样式残留污染
|
|
7
|
-
|
|
8
|
-
项目已有完整的 CSS 变量抽象体系(`themes/foundation.css` + `themes/base/*.css` + `themes/components/mermaid/*.css`),外部主题应能通过引用基础模版 + 少量变量覆写的方式完成定义,大幅降低配置代码量。
|
|
9
|
-
|
|
10
|
-
## What Changes
|
|
11
|
-
- 将 `src/renderer/themes/` 目录迁移到 `src/renderer/editor/plugins/themes/` 下
|
|
12
|
-
- `theme-manager.ts`:新增模版引用机制,支持解析 `/* @template: light */` 指令;新增自定义 CSS 持久化缓存,修复切回自定义主题时样式丢失的 Bug
|
|
13
|
-
- `mermaid-plugin-custom.css`:精简优化,利用 CSS 变量体系减少冗余选择器
|
|
14
|
-
- `mermaid-plugin.ts`:优化 custom 主题路径的变量读取逻辑,适配模版引用机制
|
|
15
|
-
- `main.ts`:更新 import 路径;修复 `applyThemeChange` 不传 customCSS 的 Bug
|
|
16
|
-
|
|
17
|
-
## Impact
|
|
18
|
-
- Affected specs: 主题系统
|
|
19
|
-
- Affected code:
|
|
20
|
-
- `src/renderer/themes/` → `src/renderer/editor/plugins/themes/` (目录迁移)
|
|
21
|
-
- `src/renderer/themes/theme-manager.ts` → 新增模版引用 + CSS 缓存
|
|
22
|
-
- `src/renderer/editor/plugins/mermaid-plugin-custom.css` (精简)
|
|
23
|
-
- `src/renderer/editor/plugins/mermaid-plugin.ts` (优化 custom 主题路径)
|
|
24
|
-
- `src/renderer/main.ts` (import 路径 + Bug 修复)
|
|
25
|
-
|
|
26
|
-
## ADDED Requirements
|
|
27
|
-
|
|
28
|
-
### Requirement: 外部主题模版引用机制
|
|
29
|
-
The system SHALL 支持外部导入的 CSS 文件通过 `/* @template: <name> */` 注释声明所引用的基础模版。
|
|
30
|
-
对于没有标注引用的以 light 模版作为引入基础。
|
|
31
|
-
|
|
32
|
-
支持的模版名称:`light`、`dark`、`elegant`、`newsprint`。
|
|
33
|
-
|
|
34
|
-
当外部主题声明了模版引用,系统应先加载模版的 CSS 变量(来自 `themes/base/<name>.css` 和 `themes/components/mermaid/<name>.css`),再将导入的 CSS 作为覆写层叠加。导入的 CSS 只需定义与模版有差异的变量。
|
|
35
|
-
|
|
36
|
-
对现有已经定义的复杂定义的主题模版要做到向下兼容。
|
|
37
|
-
|
|
38
|
-
#### Scenario: 引用 light 模版
|
|
39
|
-
- **WHEN** 用户导入以下 CSS:
|
|
40
|
-
```css
|
|
41
|
-
/* @template: light */
|
|
42
|
-
:root {
|
|
43
|
-
--color-link: #ff6600;
|
|
44
|
-
--color-accent: #ff6600;
|
|
45
|
-
--mermaid-node-stroke: #ff6600;
|
|
46
|
-
--mermaid-highlight: #ff6600;
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
- **THEN** 系统先加载 `themes/base/light.css` 的变量,再叠加以上覆写
|
|
50
|
-
- **THEN** 主样式使用 light 模版的字体/颜色/间距,仅链接色和强调色被覆写
|
|
51
|
-
- **THEN** Mermaid 图表使用 light 模版的 mermaid 变量作为基础,节点边框色被覆写为 `#ff6600`
|
|
52
|
-
|
|
53
|
-
#### Scenario: 不声明模版引用
|
|
54
|
-
- **WHEN** 用户导入的 CSS 不包含 `/* @template: */` 注释
|
|
55
|
-
- **THEN** 行为与当前一致:仅注入自定义 CSS,其他变量使用 `:root` / `foundation.css` 默认值
|
|
56
|
-
|
|
57
|
-
### Requirement: 自定义主题 CSS 持久化缓存
|
|
58
|
-
The system SHALL 在 `theme-manager.ts` 中缓存最后导入的自定义 CSS 内容和模版引用信息,确保任何时候切换回自定义主题都能正确恢复样式。
|
|
59
|
-
|
|
60
|
-
#### Scenario: 自定义 → 预制 → 自定义 切换
|
|
61
|
-
- **WHEN** 用户先导入自定义主题,再切换到 dark 主题,再切换回自定义主题
|
|
62
|
-
- **THEN** 自定义主题的 CSS 样式完全恢复,不残留 dark 主题的样式
|
|
63
|
-
- **THEN** Mermaid 图表以自定义主题配色正确渲染
|
|
64
|
-
|
|
65
|
-
#### Scenario: 应用重启后恢复
|
|
66
|
-
- **WHEN** 应用重启后加载保存的自定义主题(localStorage 中存有 `custom:<name>`)
|
|
67
|
-
- **THEN** 系统通过 API 重新加载该主题的 CSS 文件并恢复样式
|
|
68
|
-
- **THEN** 模版引用信息随主题一起持久化恢复
|
|
69
|
-
|
|
70
|
-
### Requirement: themes 目录迁移到 editor/plugins 下
|
|
71
|
-
The system SHALL 将 `src/renderer/themes/` 目录整体迁移到 `src/renderer/editor/plugins/themes/`,所有相关 import 路径同步更新。
|
|
72
|
-
|
|
73
|
-
#### Scenario: main.ts 引用路径
|
|
74
|
-
- **WHEN** main.ts 导入 theme-manager 和 base.css
|
|
75
|
-
- **THEN** import 路径从 `./themes/theme-manager` 更新为 `./editor/plugins/themes/theme-manager`
|
|
76
|
-
- **THEN** CSS import 路径从 `./themes/base.css` 更新为 `./editor/plugins/themes/base.css`
|
|
77
|
-
|
|
78
|
-
## MODIFIED Requirements
|
|
79
|
-
|
|
80
|
-
### Requirement: mermaid-plugin-custom.css 精简
|
|
81
|
-
**Before**: 包含大量与 `themes/components/mermaid/variables.css` 功能重叠的选择器(节点样式、连线样式、标签样式等),使用旧的变量命名(`--mermaid-node-border` 而非 `--mermaid-node-stroke`)。
|
|
82
|
-
**After**:
|
|
83
|
-
- 移除与 `variables.css` 重复的通用选择器(节点/连线/标签/聚类等基础样式)
|
|
84
|
-
- 仅保留 `custom` 主题特有的差异化样式(如 `person-man` 强制白色文字、`foreignObject` span 颜色等)
|
|
85
|
-
- 变量命名与 `foundation.css` 中的 `--mermaid-*` 体系对齐
|
|
86
|
-
|
|
87
|
-
### Requirement: mermaid-plugin.ts custom 主题变量读取优化
|
|
88
|
-
**Before**: `getCustomMermaidThemeVariables()` 和 `getCustomMermaidC4Config()` 使用旧的变量命名(`--mermaid-node-border`、`--mermaid-line-color` 等),fallback 链混乱。
|
|
89
|
-
**After**:
|
|
90
|
-
- 变量名与 `foundation.css` 的 `--mermaid-*` 命名体系对齐
|
|
91
|
-
- fallback 逻辑清晰,优先读 `--mermaid-*` 专用变量,fallback 到通用 CSS 变量
|
|
92
|
-
- `getMermaidTheme()` 中 custom 主题的 dark mode 判断从 `--mermaid-dark-mode` CSS 变量读取
|
|
93
|
-
|
|
94
|
-
### Requirement: theme-manager.ts applyTheme 函数
|
|
95
|
-
**Before**: `applyTheme(name, customCSS?)` 仅注入传入的 `customCSS`,不维护缓存;切回自定义主题时无 CSS 可注入。
|
|
96
|
-
**After**:
|
|
97
|
-
- 内部缓存自定义 CSS 内容和模版引用
|
|
98
|
-
- `applyTheme` 在检测到 `custom:` 前缀时自动应用缓存(含模版变量层叠)
|
|
99
|
-
- 导出 `setCachedCustomTheme(name, css)` 供外部在导入时调用
|
|
100
|
-
- 导出 `getCachedCustomTheme(name)` 支持查询已缓存的主题
|
|
101
|
-
|
|
102
|
-
## REMOVED Requirements
|
|
103
|
-
无。所有现有功能保持不变,仅做增强和修复。
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Tasks
|
|
2
|
-
|
|
3
|
-
- [x] Task 1: 迁移 themes 目录到 editor/plugins 下
|
|
4
|
-
- [x] 将 `src/renderer/themes/` 完整移动到 `src/renderer/editor/plugins/themes/`
|
|
5
|
-
- [x] 更新 `src/renderer/main.ts` 中的 import 路径:`./themes/theme-manager` → `./editor/plugins/themes/theme-manager`
|
|
6
|
-
- [x] 更新 `src/renderer/main.ts` 中的 CSS import:`./themes/base.css` → `./editor/plugins/themes/base.css`
|
|
7
|
-
|
|
8
|
-
- [x] Task 2: 重构 theme-manager.ts — 模版引用 + CSS 缓存 + Bug 修复
|
|
9
|
-
- [x] 新增 `parseTemplateDirective(css: string): string | null` 函数,解析 `/* @template: <name> */`
|
|
10
|
-
- [x] 新增自定义 CSS 缓存(`customThemeCache: Map<string, { css: string; template: string | null }>`)
|
|
11
|
-
- [x] 导出 `setCachedCustomTheme(name, css)` 用于导入时缓存
|
|
12
|
-
- [x] 导出 `getCachedCustomTheme(name)` 用于查询已缓存的主题
|
|
13
|
-
- [x] 修改 `applyTheme(name, customCSS?)`:当 `name` 以 `custom:` 开头时从缓存恢复 CSS,并根据模版引用叠加模版 class
|
|
14
|
-
|
|
15
|
-
- [x] Task 3: 优化 mermaid-plugin-custom.css — 精简与 variables.css 去重
|
|
16
|
-
- [x] 移除与 `themes/components/mermaid/variables.css` 重复的基础选择器(节点/连线/标签/聚类等)
|
|
17
|
-
- [x] 保留 custom 主题特有的差异化样式(person-man 强制白色、文字偏移等)
|
|
18
|
-
- [x] 文件从 432 行精简至 46 行
|
|
19
|
-
|
|
20
|
-
- [x] Task 4: 优化 mermaid-plugin.ts — custom 主题变量读取对齐
|
|
21
|
-
- [x] 更新 `getCustomMermaidThemeVariables()` 中的变量名(8处对齐)
|
|
22
|
-
- [x] 更新 `getCustomMermaidC4Config()` 中的变量名(20处对齐)
|
|
23
|
-
- [x] `getMermaidTheme()` 中 custom 的 dark mode 判断已从 `--mermaid-dark-mode` CSS 变量读取(无需修改,已正确实现)
|
|
24
|
-
|
|
25
|
-
- [x] Task 5: 更新 main.ts — import 路径 + 调用来适配新 API
|
|
26
|
-
- [x] 导入 `setCachedCustomTheme` 函数
|
|
27
|
-
- [x] 修改 `onMenuImportTheme` 回调:先 `setCachedCustomTheme` 再 `applyTheme`
|
|
28
|
-
- [x] 修改移动端菜单 `import-theme` 回调,同上
|
|
29
|
-
- [x] 修改应用重启恢复逻辑:先 `setCachedCustomTheme` 再 `applyTheme`
|
|
30
|
-
|
|
31
|
-
- [x] Task 6: 验证
|
|
32
|
-
- [x] TypeScript renderer 编译无本次修改引入的新错误
|
|
33
|
-
- [x] 14 项 checklist 全部通过
|
|
34
|
-
|
|
35
|
-
# Task Dependencies
|
|
36
|
-
- Task 2 依赖 Task 1(迁移后路径才正确)
|
|
37
|
-
- Task 3 依赖 Task 1(CSS 文件引用 themes 目录)
|
|
38
|
-
- Task 4 可与 Task 3 并行
|
|
39
|
-
- Task 5 依赖 Task 1 和 Task 2
|
|
40
|
-
- Task 6 依赖 Task 1-5 全部完成
|