crossnote 0.9.36 → 0.9.37
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 +19 -14
- package/out/cjs/index.cjs +286 -271
- package/out/cli/index.cjs +265 -131
- package/out/esm/index.mjs +237 -222
- package/out/server-app/server-app.css +1 -1
- package/out/server-app/server-app.js +6 -6
- package/out/types/src/markdown-engine/index.d.ts +2 -1
- package/out/types/src/notebook/types.d.ts +1 -0
- package/out/types/src/serve/preview-host-shim.d.ts +1 -0
- package/out/types/src/server-app/components/FilePicker.d.ts +3 -1
- package/out/types/src/server-app/components/LayoutView.d.ts +1 -0
- package/out/types/src/server-app/components/PreviewFrame.d.ts +2 -1
- package/out/types/src/server-app/lib/api.d.ts +27 -10
- package/out/types/src/server-app/lib/wiki.d.ts +10 -0
- package/out/types/src/utility.d.ts +1 -1
- package/out/types/src/webview/containers/preview.d.ts +1 -0
- package/out/types/src/webview/lib/utility.d.ts +4 -0
- package/out/types/src/wiki/index.d.ts +13 -1
- package/out/types/test/nul-character.test.d.ts +1 -0
- package/out/types/test/server-app/wiki.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/out/webview/backlinks.css +1 -1
- package/out/webview/backlinks.js +4 -4
- package/out/webview/graph-view.css +1 -1
- package/out/webview/graph-view.js +6 -6
- package/out/webview/preview.css +1 -1
- package/out/webview/preview.js +190 -190
- package/package.json +1 -1
- package/out/types/src/wiki-app/wiki-app.d.ts +0 -17
- package/out/wiki-app/wiki-app.css +0 -1
- package/out/wiki-app/wiki-app.js +0 -18
package/README.md
CHANGED
|
@@ -148,9 +148,11 @@ same-origin script against the app.
|
|
|
148
148
|
## CLI: `crossnote build-wiki`
|
|
149
149
|
|
|
150
150
|
`crossnote build-wiki` packs the directories' markdown notes into a single
|
|
151
|
-
standalone HTML file — a read-only snapshot of the serve experience, like a
|
|
152
|
-
TiddlyWiki:
|
|
153
|
-
|
|
151
|
+
standalone HTML file — a read-only snapshot of the `serve` experience, like a
|
|
152
|
+
TiddlyWiki: the file embeds the serve app itself (titlebar, tabs, split panes,
|
|
153
|
+
`Ctrl/Cmd+P` fuzzy file picker, zen mode) with every note pre-rendered as a
|
|
154
|
+
regular preview page, so it looks and behaves exactly like `crossnote serve`
|
|
155
|
+
with the writable parts removed.
|
|
154
156
|
|
|
155
157
|
```sh
|
|
156
158
|
$ npx crossnote build-wiki [directory...] # default output ./index.html
|
|
@@ -158,21 +160,24 @@ $ crossnote build-wiki ~/notes -o ~/public/wiki.html
|
|
|
158
160
|
$ crossnote build-wiki docs wiki --vscode # reuse VS Code settings, too
|
|
159
161
|
```
|
|
160
162
|
|
|
161
|
-
- Every note is
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
- Every note is the exact preview page the serve server renders, shown in a
|
|
164
|
+
sandboxed (`allow-scripts`) iframe: diagrams, math, the sidebar TOC and
|
|
165
|
+
zoom all work. Shared assets (the webview bundle, mermaid, themes, …) are
|
|
166
|
+
stored once and inlined when a note is opened; local images travel as data
|
|
167
|
+
URIs so the file works offline (except CDN-hosted math assets, which need
|
|
168
|
+
the reader to be online).
|
|
169
|
+
- The wiki is read-only by construction — nothing in the file can write
|
|
170
|
+
anywhere. Editing UI, code-chunk run buttons and task-list checkboxes are
|
|
171
|
+
hidden or inert, note-to-note links resolve inside the file, external
|
|
172
|
+
links open new tabs, and links to notes that are not part of the wiki
|
|
173
|
+
explain so instead of navigating away.
|
|
169
174
|
- Config resolution is the same as `serve`
|
|
170
175
|
(`defaults ← VS Code settings with --vscode ← global crossnote config ←
|
|
171
176
|
<directory>/.crossnote`), per directory.
|
|
172
177
|
- The preview context menu (in `serve` and in the VS Code extension) has an
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
**Export ▸ Wiki** item that builds the same file: the server writes it
|
|
179
|
+
next to the notes as `crossnote-wiki.html` (never overwriting a previous
|
|
180
|
+
export); the extension asks where to save it.
|
|
176
181
|
|
|
177
182
|
The file is a full snapshot — for very large note collections (thousands of
|
|
178
183
|
notes with big images) it can get large; the build reports its size and any
|