@breinzhang/mivark 0.1.5 → 0.1.7
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/README.md +29 -13
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -26,17 +26,32 @@
|
|
|
26
26
|
- Markdown opens in **Reader**. Switch to **Rich (WYSIWYG)**, **Source**, or **Split** to edit the same document.
|
|
27
27
|
- Built-in **round-trip fidelity guard**: when a document contains syntax that rich editing cannot safely preserve, the round-trip guard blocks rich editing so your original bytes are preserved.
|
|
28
28
|
- Supports GitHub Flavored Markdown (GFM), Mermaid diagrams, and slash commands.
|
|
29
|
+
- In Rich, Source, or Split, use **Insert relative image** to copy a selected image up to 50 MiB into the saved Markdown file’s `assets/` folder. The editor adds a relative reference and gives duplicate filenames a suffix. Undo removes the link and leaves the copy available. Keep Markdown and `assets/` together when moving them.
|
|
30
|
+
- Use **Markdown Outline** in the toolbar to jump to headings in Reader, Source, or both panes of Split. Relative links such as `./guide.md#setup` can open another Markdown file at a heading. Paged previews above 5 MiB have no outline.
|
|
31
|
+
- Use **Print / Export PDF** in the Markdown toolbar to preview the current text, including unsaved edits. The print icon in the lower right opens the system print dialog. On macOS, **Save as PDF** opens a save dialog using the selected print settings. Local images use the same folder access rules as Reader. Print is unavailable in the paged preview for files above 5 MiB.
|
|
29
32
|
- Switch themes live in Settings. Choose Mivark Light or Dark, one of the four Catppuccin variants, Solarized Light, Nord, or Dracula.
|
|
30
|
-
- **
|
|
33
|
+
- **Manual saving is the default.** In Settings, you can enable delayed auto-save for named, editable Markdown and JSON files without a disk conflict. Writes check the disk version and replace files atomically.
|
|
34
|
+
- **Save As** creates a file without replacing an existing name. To replace a destination, confirm its current version. If that version changes, Mivark asks again. Close any other tab in the same window that has the destination open before saving to it.
|
|
35
|
+
- Replacement checks the destination again just before the atomic rename. An independent process can still write between the check and rename.
|
|
36
|
+
- Clean tabs reload automatically after **external changes**. Markdown and JSON tabs keep unsaved edits and undo history while you review the versions. The two panes scroll together and highlight differences. **Use Unsaved Content** saves over the reviewed disk version if it is still current. **Use External Changes** reloads the disk version. After a normal window close, Hot Exit reopens unsaved tabs and checks their disk versions.
|
|
37
|
+
- File watches follow open tabs across renames and Save As. Open tabs share their parent directory watches across windows. The last tab using a directory releases its watch.
|
|
31
38
|
- **JSON Editor**
|
|
32
39
|
- JSON opens in **Raw** with syntax highlighting, find, and replace. Switch to **Form** to edit field names, types, and values inline or add and remove fields and array items. In **Raw**, **Restore Formatting** recovers the original layout after formatting.
|
|
40
|
+
- Choose **New JSON** from the File menu, start page, or a folder’s context menu in the explorer.
|
|
41
|
+
- For JSON up to 8 MiB, **Raw** marks the first syntax error and **Form** can jump to the same location in **Raw**. You can still edit and explicitly save incomplete JSON.
|
|
33
42
|
- Form mode parses up to 8 MiB in a Web Worker and pages large branches. Files larger than 32 MiB open in a paged preview.
|
|
34
43
|
- **Image Viewer**
|
|
35
44
|
- View **PNG, JPEG, WebP, GIF, BMP, and SVG** files with zoom and fit-to-window controls.
|
|
36
45
|
- **PDF Viewer (Read-Only)**
|
|
37
46
|
- Read local PDFs up to 128 MiB with continuous scrolling, outline or thumbnail navigation, and zoom.
|
|
47
|
+
- Use the toolbar or **⌘/Ctrl+F** to find embedded text across pages. The outline or thumbnails follow the selected match. Select text on a page and use **⌘/Ctrl+C** to copy it. Image-only scans require a text layer from an OCR tool for these features.
|
|
38
48
|
- **Desktop Workflow**
|
|
49
|
+
- Choose Simplified Chinese, English, or Japanese under **Settings → Language**. Your choice is saved and applied across open windows.
|
|
50
|
+
- Press **⌘/Ctrl+P** to find a file by name or relative path in the current project. Use the arrow keys and Enter to open it. With no project open, the same shortcut searches open tabs and recent files. Esc closes the panel. Project scanning skips dotfiles and symbolic links and indicates when its limits are reached.
|
|
39
51
|
- Multi-tab workspace, folder explorer, and **Projects** on the start page for frequently used folders. The app bundles Geist and Geist Mono for offline use.
|
|
52
|
+
- Expanded folders reload when you return to the Mivark window. If the selected item disappears, the tree selects its nearest visible parent and keeps open documents in their tabs. Unreadable folders show an error with **Retry**.
|
|
53
|
+
- Drop files and folders together, or pass several paths to the CLI. Mivark handles folder choices first, then opens the files in input order in the receiving window. Choosing a new window opens the folder there. Cancelling a folder or encountering an invalid item lets the rest of the batch continue.
|
|
54
|
+
- **Hot Exit** preserves unsaved Markdown and JSON tabs when you close a window normally or quit. The tabs reopen with their unsaved edits the next time the app opens. The source files keep their saved contents.
|
|
40
55
|
|
|
41
56
|
## Security & Privacy
|
|
42
57
|
|
|
@@ -127,31 +142,32 @@ cargo test --manifest-path src-tauri/Cargo.toml
|
|
|
127
142
|
|
|
128
143
|
### Web End-to-End Tests (Playwright)
|
|
129
144
|
|
|
130
|
-
|
|
145
|
+
In a fresh checkout, use Node 22 to install dependencies, generate fixtures, and run the Chromium regression suite.
|
|
131
146
|
|
|
132
147
|
```sh
|
|
148
|
+
npm ci
|
|
133
149
|
npm run fixtures:generate
|
|
134
150
|
npx playwright install chromium
|
|
135
151
|
npm run test:e2e:web
|
|
136
152
|
```
|
|
137
153
|
|
|
154
|
+
CI runs Chromium on macOS and Windows. The macOS job also runs the focused WebKit suite for the editor, theme, file tree, document workflows, and PDF.
|
|
155
|
+
|
|
156
|
+
```sh
|
|
157
|
+
npx playwright install webkit
|
|
158
|
+
npm run test:e2e:webkit
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Each invocation writes to its own directory under `artifacts/playwright/`. Open the HTML report with `npx playwright show-report artifacts/playwright/<run>/html` to find failed tests, traces, screenshots, and probe attachments. `results.json` includes the project, OS, and Node version. Download the matching `web-e2e-*` artifact to inspect a CI run. Set `MIVARK_CPU_PROFILE=1` to include a CPU profile in the Chromium large-Markdown test.
|
|
162
|
+
|
|
163
|
+
Run the development-shell benchmark with `npm run test:e2e:benchmark` or manually dispatch **Web Benchmark** in GitHub Actions. The benchmark attaches JSON and Markdown measurements to its own report and runs separately from the functional checks.
|
|
164
|
+
|
|
138
165
|
## Tech Stack
|
|
139
166
|
|
|
140
167
|
- **Desktop Shell & Backend**: [Tauri 2](https://v2.tauri.app/) (Rust)
|
|
141
168
|
- **Frontend**: React 19, TypeScript, Vite, Zustand
|
|
142
169
|
- **Editors & Viewers**: Milkdown Crepe (WYSIWYG), CodeMirror 6 (Source & JSON Raw), `react-markdown` + `remark-gfm` (Reader), Mermaid, `@tanstack/react-virtual` (JSON & PDF), DOMPurify
|
|
143
170
|
|
|
144
|
-
## Release Automation
|
|
145
|
-
|
|
146
|
-
When automated publishing is enabled on `main`, pushing a version-bump commit triggers [.github/workflows/release.yml](https://github.com/breinzhang/mivark/blob/main/.github/workflows/release.yml) to build macOS Apple Silicon, macOS Intel, and Windows x64 from the same commit and distribute them to GitHub Releases, npm, and Homebrew Tap.
|
|
147
|
-
|
|
148
|
-
- Sync versions across npm, Cargo, and Tauri configs with:
|
|
149
|
-
```sh
|
|
150
|
-
npm run release:version -- X.Y.Z
|
|
151
|
-
```
|
|
152
|
-
- Maintainers can run the **Release** workflow manually via `workflow_dispatch` with `publish` unchecked to test cross-platform builds and download the `distribution` artifact without publishing.
|
|
153
|
-
- Apple Developer ID signing/notarization and Windows Authenticode signing are both optional: leave their secrets unset for ad-hoc / unsigned builds, or configure them to enable signed releases.
|
|
154
|
-
|
|
155
171
|
## Contributing
|
|
156
172
|
|
|
157
173
|
Issues and Pull Requests are welcome! When reporting a bug, please include:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breinzhang/mivark",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Mivark desktop launcher — starts the precompiled Mivark.app / Mivark.exe",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mivark": "bin/mivark.mjs"
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"node": ">=20"
|
|
11
11
|
},
|
|
12
12
|
"optionalDependencies": {
|
|
13
|
-
"@breinzhang/mivark-darwin-arm64": "0.1.
|
|
14
|
-
"@breinzhang/mivark-darwin-x64": "0.1.
|
|
15
|
-
"@breinzhang/mivark-win32-x64": "0.1.
|
|
13
|
+
"@breinzhang/mivark-darwin-arm64": "0.1.7",
|
|
14
|
+
"@breinzhang/mivark-darwin-x64": "0.1.7",
|
|
15
|
+
"@breinzhang/mivark-win32-x64": "0.1.7"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"bin/",
|