@hyperbook/markdown 0.23.0 → 0.23.1

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.
@@ -59,6 +59,10 @@ hyperbook.python = (function () {
59
59
  interruptBuffer[0] = 2;
60
60
  }
61
61
 
62
+ function reload() {
63
+ window.location.reload();
64
+ }
65
+
62
66
  const updateRunning = (id, type) => {
63
67
  const elems = document.getElementsByClassName("directive-pyide");
64
68
  for (let elem of elems) {
@@ -72,7 +76,7 @@ hyperbook.python = (function () {
72
76
  } else {
73
77
  run.textContent = i18n.get("pyide-running-refresh-to-stop");
74
78
 
75
- run.addEventListener("click", () => window.location.reload());
79
+ run.addEventListener("click", reload);
76
80
  }
77
81
  } else if (test && elem.id === id && type === "test") {
78
82
  if (window.crossOriginIsolated) {
@@ -80,7 +84,7 @@ hyperbook.python = (function () {
80
84
  test.addEventListener("click", interruptExecution);
81
85
  } else {
82
86
  test.textContent = i18n.get("pyide-testing-refresh-to-stop");
83
- test.addEventListener("click", () => window.location.reload());
87
+ test.addEventListener("click", reload);
84
88
  }
85
89
  } else {
86
90
  run.classList.add("running");
@@ -95,11 +99,13 @@ hyperbook.python = (function () {
95
99
  run.textContent = i18n.get("pyide-run");
96
100
  run.disabled = false;
97
101
  run.removeEventListener("click", interruptExecution);
102
+ run.removeEventListener("click", reload);
98
103
  if (test) {
99
104
  test.classList.remove("running");
100
105
  test.textContent = i18n.get("pyide-test");
101
106
  test.disabled = false;
102
107
  test.removeEventListener("click", interruptExecution);
108
+ test.removeEventListener("click", reload);
103
109
  }
104
110
  }
105
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbook/markdown",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "author": "Mike Barkmin",
5
5
  "homepage": "https://github.com/openpatch/hyperbook#readme",
6
6
  "license": "MIT",
@@ -83,8 +83,8 @@
83
83
  "vfile": "^6.0.3",
84
84
  "vitest": "^1.6.0",
85
85
  "wavesurfer.js": "^7.8.8",
86
- "@hyperbook/types": "0.14.0",
87
- "@hyperbook/web-component-excalidraw": "0.3.0"
86
+ "@hyperbook/web-component-excalidraw": "0.3.0",
87
+ "@hyperbook/types": "0.14.0"
88
88
  },
89
89
  "scripts": {
90
90
  "version": "pnpm build",