md-lv 1.0.0 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-lv",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Serve Markdown files as HTML with live features - syntax highlighting, Mermaid diagrams, and MathJax formulas",
5
5
  "type": "module",
6
6
  "engines": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "main": "src/index.js",
10
10
  "bin": {
11
- "mdv": "bin/mdv.js"
11
+ "mdlv": "bin/mdlv.js"
12
12
  },
13
13
  "files": [
14
14
  "bin/",
@@ -20,7 +20,7 @@
20
20
  "CHANGELOG.md"
21
21
  ],
22
22
  "scripts": {
23
- "start": "node bin/mdv.js",
23
+ "start": "node bin/mdlv.js",
24
24
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
25
25
  "test:unit": "node --experimental-vm-modules node_modules/jest/bin/jest.js tests/unit",
26
26
  "test:integration": "node --experimental-vm-modules node_modules/jest/bin/jest.js tests/integration",
package/public/js/app.js CHANGED
@@ -82,10 +82,14 @@ async function renderMermaid() {
82
82
  }
83
83
 
84
84
  try {
85
+ // ダークモードを検出してテーマを決定
86
+ const isDarkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
87
+ const mermaidTheme = isDarkMode ? 'dark' : 'default';
88
+
85
89
  // Mermaid を初期化(まだ初期化されていない場合)
86
90
  window.mermaid.initialize({
87
91
  startOnLoad: false,
88
- theme: 'default',
92
+ theme: mermaidTheme,
89
93
  securityLevel: 'loose',
90
94
  flowchart: {
91
95
  useMaxWidth: true,
@@ -194,16 +194,24 @@ table {
194
194
  overflow: hidden;
195
195
  }
196
196
 
197
+ table th,
198
+ table td {
199
+ border-color: var(--color-border);
200
+ }
201
+
197
202
  table th {
198
203
  background-color: var(--color-bg-secondary);
204
+ color: var(--color-text);
199
205
  }
200
206
 
201
207
  table tr {
208
+ background-color: var(--color-bg);
202
209
  border-top: 1px solid var(--color-border);
203
210
  }
204
211
 
205
212
  table tr:nth-child(2n) {
206
213
  background-color: var(--color-bg-secondary);
214
+ color: var(--color-text);
207
215
  }
208
216
 
209
217
  /* ============================================
package/src/cli.js CHANGED
@@ -32,7 +32,7 @@ export function parseCLI(argv) {
32
32
  if (isReadmeCommand) {
33
33
  // Parse readme subcommand with its options
34
34
  program
35
- .name('mdv readme')
35
+ .name('mdlv readme')
36
36
  .description('Find and display the nearest README.md')
37
37
  .option('-p, --port <number>', 'Server port', validatePort, 3000);
38
38
 
@@ -75,7 +75,7 @@ export function parseCLI(argv) {
75
75
 
76
76
  // Default: parse as regular server options
77
77
  program
78
- .name('mdv')
78
+ .name('mdlv')
79
79
  .description('Serve Markdown files as HTML')
80
80
  .version('2.0.0')
81
81
  .option('-p, --port <number>', 'Server port', validatePort, 3000)
@@ -15,7 +15,7 @@ const LOG_LEVELS = {
15
15
  class Logger {
16
16
  constructor(level = 'INFO') {
17
17
  this.level = LOG_LEVELS[level.toUpperCase()] ?? LOG_LEVELS.INFO;
18
- this.prefix = '[mdv]';
18
+ this.prefix = '[mdlv]';
19
19
  }
20
20
 
21
21
  /**
File without changes