mdv-live 0.4.1 → 0.4.3

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 CHANGED
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.3] - 2026-02-15
9
+
10
+ ### Fixed
11
+
12
+ - macOS app: Japanese filenames garbled when opening via Finder double-click
13
+ - `osascript open location` corrupted UTF-8 characters in URL
14
+ - Now URL-encodes filename with `python3 urllib.parse.quote()` and uses `open` command
15
+
8
16
  ## [0.3.3] - 2026-01-31
9
17
 
10
18
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdv-live",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "Markdown Viewer - File tree + Live preview + Marp support + Hot reload",
5
5
  "main": "src/server.js",
6
6
  "bin": {
@@ -65,6 +65,9 @@ FILE_PATH="$1"
65
65
  FILE_NAME=$(basename "$FILE_PATH")
66
66
  LOG="/tmp/mdv-$$.log"
67
67
 
68
+ # URL-encode the filename (handles Japanese characters)
69
+ ENCODED_NAME=$(python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.argv[1]))" "$FILE_NAME")
70
+
68
71
  echo "Starting MDV..."
69
72
  # Start MDV
70
73
  MDV_PATH_HERE --no-browser "$FILE_PATH" > "$LOG" 2>&1 &
@@ -76,8 +79,7 @@ for i in {1..25}; do
76
79
  if [ -n "$PORT" ]; then
77
80
  echo "Found port: $PORT"
78
81
  echo "Opening browser..."
79
- # Use osascript to open URL (works better from AppleScript context)
80
- osascript -e "open location \"http://localhost:$PORT?path=$FILE_NAME\""
82
+ open "http://localhost:$PORT?path=$ENCODED_NAME"
81
83
  echo "Done"
82
84
  exit 0
83
85
  fi
@@ -85,7 +87,7 @@ done
85
87
 
86
88
  echo "Timeout - using fallback"
87
89
  # Fallback
88
- osascript -e "open location \"http://localhost:8642?path=$FILE_NAME\""
90
+ open "http://localhost:8642?path=$ENCODED_NAME"
89
91
  LAUNCHSCRIPT
90
92
 
91
93
  # Replace placeholder with actual path
package/src/static/app.js CHANGED
@@ -204,6 +204,7 @@
204
204
  const ThemeManager = {
205
205
  set(theme) {
206
206
  state.theme = theme;
207
+ document.documentElement.dataset.theme = theme;
207
208
  document.body.dataset.theme = theme;
208
209
  localStorage.setItem(STORAGE_KEYS.THEME, theme);
209
210