crossnote 0.9.30 → 0.9.32
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/out/cjs/index.cjs +256 -240
- package/out/dependencies/README.md +12 -1
- package/out/dependencies/mermaid/mermaid.min.js +840 -609
- package/out/esm/index.mjs +275 -259
- package/out/styles/markdown-it-callout.css +1 -1
- package/out/styles/preview.css +1 -1
- package/out/styles/style-template.css +1 -1
- package/out/types/src/markdown-engine/index.d.ts +4 -0
- package/out/types/src/notebook/index.d.ts +1 -0
- package/out/types/src/notebook/types.d.ts +3 -0
- package/out/types/src/renderers/d2.d.ts +1 -1
- package/out/types/src/webview/containers/preview.d.ts +2 -1
- package/out/types/src/webview/lib/i18n.d.ts +3 -0
- package/out/types/test/block-id.test.d.ts +1 -0
- package/out/types/test/browser/mermaid-beta.spec.d.ts +1 -0
- package/out/types/test/browser/server.d.ts +1 -0
- package/out/types/test/browser-server-guard.test.d.ts +1 -0
- package/out/types/test/callout.test.d.ts +1 -0
- package/out/types/test/d2-fenced.test.d.ts +1 -0
- package/out/types/test/d2.test.d.ts +1 -0
- package/out/types/test/export-color-scheme.test.d.ts +1 -0
- package/out/types/test/file-url-encoding.test.d.ts +1 -0
- package/out/types/test/head-html-sanitize.test.d.ts +1 -0
- package/out/types/test/i18n.test.d.ts +1 -0
- package/out/types/test/math-blockquote.test.d.ts +1 -0
- package/out/types/test/mermaid-bundle.test.d.ts +1 -0
- package/out/types/test/preview-scripts-gate.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/out/webview/backlinks.css +1 -1
- package/out/webview/backlinks.js +7 -7
- package/out/webview/graph-view.css +1 -1
- package/out/webview/graph-view.js +4 -4
- package/out/webview/preview.css +1 -1
- package/out/webview/preview.js +232 -231
- package/package.json +7 -7
|
@@ -7,7 +7,7 @@ I managed some of the libraries by myself instead of through npm to reduce the o
|
|
|
7
7
|
"font-awesome": "6.4.2", // Download from here: https://fontawesome.com/download
|
|
8
8
|
// Fontawesome cheatsheet is available here: https://kapeli.com/cheat_sheets/Font_Awesome.docset/Contents/Resources/Documents/index
|
|
9
9
|
"katex": "v0.16.47", // Only keep the css and fonts files.
|
|
10
|
-
"mermaid": "11.
|
|
10
|
+
"mermaid": "11.17.2", // see "Updating the vendored mermaid bundle" below
|
|
11
11
|
// https://www.jsdelivr.com/package/npm/mermaid
|
|
12
12
|
"reveal": "4.6.0",
|
|
13
13
|
|
|
@@ -27,3 +27,14 @@ _Attention_: Need to remove `font: inherit;` from `reveal.css`. Otherwise, `KaTe
|
|
|
27
27
|
_Attention_: Don't forget to modify the `dependentLibraryMaterials` variable in `markdown-engine.ts`
|
|
28
28
|
|
|
29
29
|
_Attention_: NOTE: We have to disable the `_self = window` line in `prism.js` to make it work with VSCode web extension.
|
|
30
|
+
|
|
31
|
+
## Updating the vendored mermaid bundle
|
|
32
|
+
|
|
33
|
+
`dependencies/mermaid/mermaid.min.js` is mermaid's **official dist build** downloaded from jsDelivr (e.g. <https://cdn.jsdelivr.net/npm/mermaid@11.17.2/dist/mermaid.min.js>). Do **not** re-bundle mermaid locally with esbuild — the committed file must be byte-identical to the CDN file so the `__esbuild_esm_mermaid_nm` IIFE wrapper and the trailing `globalThis["mermaid"] = ...` assignment match what mermaid ships.
|
|
34
|
+
|
|
35
|
+
To update mermaid:
|
|
36
|
+
|
|
37
|
+
1. `pnpm add mermaid@<new-version>` — updates `package.json` + `pnpm-lock.yaml`.
|
|
38
|
+
2. `node scripts/update-mermaid-bundle.mjs` — downloads the matching official dist bundle from jsDelivr into `dependencies/mermaid/mermaid.min.js` (uses the version installed in `node_modules`; an explicit version can be passed as an argument). Equivalent to manually downloading `https://cdn.jsdelivr.net/npm/mermaid@<version>/dist/mermaid.min.js` and copying it to `dependencies/mermaid/mermaid.min.js`.
|
|
39
|
+
3. Update the mermaid version in the CDN fallback script URL in `src/markdown-engine/index.ts` (`mermaid@<version>/dist/mermaid.min.js`).
|
|
40
|
+
4. Update the version list above and add a `CHANGELOG.md` entry.
|