vde-open 0.1.7 → 0.1.8
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 +8 -7
- package/dist/cli.js +1 -1
- package/dist/daemon.js +1 -1
- package/dist/{rendering-rules-DiE2jI7I.js → html-static-BDV6MgA7.js} +6115 -11
- package/dist/{main-keob540p.js → main-001DhaNk.js} +58 -19
- package/dist/{print-CR5-GDjQ.js → print-Cfa1Ytrj.js} +46 -2
- package/dist/render-BX3arVZj.js +181 -0
- package/dist/web/assets/{index-D_AZ0n--.js → index-BKrIIMW1.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/workers/parse-worker.js +6 -5
- package/package.json +1 -1
- package/dist/render-BJnuEfHt.js +0 -6235
- package/dist/rolldown-runtime-DC62tzP2.js +0 -33
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ To install from a clone of this repository (Node.js 24.21.0 is pinned in `mise.t
|
|
|
28
28
|
pnpm install --frozen-lockfile
|
|
29
29
|
pnpm build
|
|
30
30
|
pnpm test:pack # builds artifacts/vde-open-<version>.tgz and verifies an install in a separate directory
|
|
31
|
-
bun add -g "$PWD/artifacts/vde-open-0.1.
|
|
31
|
+
bun add -g "$PWD/artifacts/vde-open-0.1.8.tgz" # bun add -g needs an absolute path
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## `vde-open` and `vo`
|
|
@@ -89,16 +89,17 @@ Markdown is rendered with TanStack Markdown 1.0.0. It is not fully compatible wi
|
|
|
89
89
|
- Code is highlighted only for JS, JSX, TS, TSX, JSON, YAML, HTML, CSS, Bash, and Markdown. Code larger than 256 KiB and other languages are not highlighted.
|
|
90
90
|
- Documents that cannot be parsed within 2 seconds, or that have more than 100,000 elements or more than 64 levels of nesting, are shown as source.
|
|
91
91
|
|
|
92
|
-
## Exporting
|
|
92
|
+
## Exporting to PDF
|
|
93
93
|
|
|
94
|
-
"Export PDF" in the header of a
|
|
94
|
+
"Export PDF" in the header of a document saves the shown revision as a PDF, without a print dialog.
|
|
95
95
|
|
|
96
|
-
-
|
|
96
|
+
- Markdown PDFs are A4 on a white background. Every page has the document title in the header and the page number ("3 / 12") in the footer, and the headings become PDF bookmarks.
|
|
97
97
|
- The daemon prints it with the Google Chrome or Microsoft Edge (131 or later) installed on the machine; nothing is downloaded. To use another Chromium-based browser or another location, set `VDE_OPEN_BROWSER` for the daemon to the absolute path of the executable, then run `vo daemon restart`.
|
|
98
|
-
-
|
|
98
|
+
- For Markdown, the rules of the view apply: raw HTML is shown as text, only images registered for the document are included (others show their alternative text), and links to other local documents become plain text.
|
|
99
99
|
- The file name is the document's file name with `.pdf` (`README.md` → `README.pdf`); a document read from stdin uses its title.
|
|
100
|
-
-
|
|
101
|
-
- HTML
|
|
100
|
+
- Markdown and any HTML text without a registered font use the fonts installed on the machine, so they look slightly different on each OS.
|
|
101
|
+
- HTML is exported using the static view rules, its own CSS (including `@media print` and `@page`), and registered CSS, images, and fonts. Without a page rule, it uses A4 with 20 mm margins. Markdown typography, headers, and footers are not added. Even an interactive document is exported from the saved HTML without running scripts; changes made by interacting with it are not included.
|
|
102
|
+
- Printing must finish within 60 seconds.
|
|
102
103
|
|
|
103
104
|
## Where the state is stored, and stopping
|
|
104
105
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as decodeStateFile, D as daemonEntryPath, E as resolveStateRoot, O as referencedBlobs, S as renameWithRetry, T as resolveRuntimeLocation, a as DAEMON_LOCK_NAME, b as proofMatches, c as readIpcKey, d as inspectOwner, f as readCurrentLock, g as encodeFrame, h as FrameDecoder, i as requirePrivateDirectoryIfExists, k as version, l as readPointer, m as systemProcessProbe, n as ensurePrivateDirectory, o as POINTER_FILE, p as releaseLock, r as inspectPrivateDirectory, s as START_LOCK_NAME, t as startDaemon, u as acquireLock, v as computeProof, w as currentPathEnvironment, x as removeWithRetry, y as createNonce } from "./main-
|
|
2
|
+
import { C as decodeStateFile, D as daemonEntryPath, E as resolveStateRoot, O as referencedBlobs, S as renameWithRetry, T as resolveRuntimeLocation, a as DAEMON_LOCK_NAME, b as proofMatches, c as readIpcKey, d as inspectOwner, f as readCurrentLock, g as encodeFrame, h as FrameDecoder, i as requirePrivateDirectoryIfExists, k as version, l as readPointer, m as systemProcessProbe, n as ensurePrivateDirectory, o as POINTER_FILE, p as releaseLock, r as inspectPrivateDirectory, s as START_LOCK_NAME, t as startDaemon, u as acquireLock, v as computeProof, w as currentPathEnvironment, x as removeWithRetry, y as createNonce } from "./main-001DhaNk.js";
|
|
3
3
|
import { A as successEnvelope, C as VdeError, D as ExitCode, E as isVdeError, O as envelopeSchema, T as isErrorCode, Y as LIMITS, k as errorEnvelope, w as exitCodeForError } from "./search-index-B7DqaWh6.js";
|
|
4
4
|
import fs, { fstatSync } from "node:fs";
|
|
5
5
|
import { lstat, readFile, readdir, stat as stat$1, writeFile } from "node:fs/promises";
|
package/dist/daemon.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as version, t as startDaemon, w as currentPathEnvironment } from "./main-
|
|
1
|
+
import { k as version, t as startDaemon, w as currentPathEnvironment } from "./main-001DhaNk.js";
|
|
2
2
|
import { E as isVdeError } from "./search-index-B7DqaWh6.js";
|
|
3
3
|
//#region src/daemon.ts
|
|
4
4
|
function notifyParent(message) {
|