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.
Files changed (35) hide show
  1. package/out/cjs/index.cjs +256 -240
  2. package/out/dependencies/README.md +12 -1
  3. package/out/dependencies/mermaid/mermaid.min.js +840 -609
  4. package/out/esm/index.mjs +275 -259
  5. package/out/styles/markdown-it-callout.css +1 -1
  6. package/out/styles/preview.css +1 -1
  7. package/out/styles/style-template.css +1 -1
  8. package/out/types/src/markdown-engine/index.d.ts +4 -0
  9. package/out/types/src/notebook/index.d.ts +1 -0
  10. package/out/types/src/notebook/types.d.ts +3 -0
  11. package/out/types/src/renderers/d2.d.ts +1 -1
  12. package/out/types/src/webview/containers/preview.d.ts +2 -1
  13. package/out/types/src/webview/lib/i18n.d.ts +3 -0
  14. package/out/types/test/block-id.test.d.ts +1 -0
  15. package/out/types/test/browser/mermaid-beta.spec.d.ts +1 -0
  16. package/out/types/test/browser/server.d.ts +1 -0
  17. package/out/types/test/browser-server-guard.test.d.ts +1 -0
  18. package/out/types/test/callout.test.d.ts +1 -0
  19. package/out/types/test/d2-fenced.test.d.ts +1 -0
  20. package/out/types/test/d2.test.d.ts +1 -0
  21. package/out/types/test/export-color-scheme.test.d.ts +1 -0
  22. package/out/types/test/file-url-encoding.test.d.ts +1 -0
  23. package/out/types/test/head-html-sanitize.test.d.ts +1 -0
  24. package/out/types/test/i18n.test.d.ts +1 -0
  25. package/out/types/test/math-blockquote.test.d.ts +1 -0
  26. package/out/types/test/mermaid-bundle.test.d.ts +1 -0
  27. package/out/types/test/preview-scripts-gate.test.d.ts +1 -0
  28. package/out/types/tsconfig.tsbuildinfo +1 -1
  29. package/out/webview/backlinks.css +1 -1
  30. package/out/webview/backlinks.js +7 -7
  31. package/out/webview/graph-view.css +1 -1
  32. package/out/webview/graph-view.js +4 -4
  33. package/out/webview/preview.css +1 -1
  34. package/out/webview/preview.js +232 -231
  35. 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.15.0", // https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
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.