dsh-mermaid-plus 0.1.2 → 0.1.3

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 (2) hide show
  1. package/client.js +13 -11
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -1,6 +1,17 @@
1
1
  window.__ModuleLoader__.load({
2
2
  id: 'dsh-mermaid-plus',
3
3
  factory(require) {
4
+ /** Package name; also the boot-graph entry id and the source of every runtime name. */
5
+ const PKG = 'dsh-mermaid-plus';
6
+ /**
7
+ * Host route serving the vendored runtime, derived from the package name so two
8
+ * diagram plugins can be installed side by side. The Host half derives the same
9
+ * value from its own manifest; the two formulas must stay identical.
10
+ */
11
+ const RUNTIME_PATH = `/x-${PKG.replace(/^@/, '').replace(/[^a-z0-9]+/gi, '-').toLowerCase()}`;
12
+ /** Bundled Mermaid release; part of the URL so a page reload refetches a new build. */
13
+ const RUNTIME_VERSION = '11.17.0';
14
+
4
15
  /** Report one browser-half event to the Host's sink; a failure here is never fatal. */
5
16
  function report(event, detail) {
6
17
  try {
@@ -8,7 +19,8 @@ window.__ModuleLoader__.load({
8
19
  method: 'POST',
9
20
  headers: { 'content-type': 'application/json' },
10
21
  body: JSON.stringify({ event, detail, href: String(window.location.href), at: Date.now() }),
11
- keepalive: true,
22
+ // No `keepalive`: on the desktop app's custom scheme the browser
23
+ // drops keepalive requests, and this report is best-effort anyway.
12
24
  }).catch(() => undefined);
13
25
  } catch {
14
26
  /* the report is best effort only */
@@ -27,16 +39,6 @@ window.__ModuleLoader__.load({
27
39
  const h = React.createElement;
28
40
 
29
41
  //#region configuration
30
- /** Package name; also the boot-graph entry id and the source of every runtime name. */
31
- const PKG = 'dsh-mermaid-plus';
32
- /**
33
- * Host route serving the vendored runtime, derived from the package name so two
34
- * diagram plugins can be installed side by side. The Host half derives the same
35
- * value from its own manifest; the two formulas must stay identical.
36
- */
37
- const RUNTIME_PATH = `/x-${PKG.replace(/^@/, '').replace(/[^a-z0-9]+/gi, '-').toLowerCase()}`;
38
- /** Bundled Mermaid release; part of the URL so a page reload refetches a new build. */
39
- const RUNTIME_VERSION = '11.17.0';
40
42
  /**
41
43
  * Preference key for the render mode. Namespaced by package name so a second
42
44
  * diagram plugin cannot read or overwrite this one's choice.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mermaid-plus",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Mermaid diagrams for DeepSeek Harness: on-demand rendering, theme-aware, with a fullscreen zoom viewer.",
5
5
  "license": "MIT",
6
6
  "author": "pidongqianqian",