Skip to content

Commit cfcd5da

Browse files
committed
update learningmap
1 parent 3b097a2 commit cfcd5da

File tree

5 files changed

+54
-28
lines changed

5 files changed

+54
-28
lines changed

.changeset/blue-papayas-collect.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@hyperbook/markdown": patch
3+
"hyperbook-studio": patch
4+
"hyperbook": patch
5+
---
6+
7+
Update learningmap

packages/markdown/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"@excalidraw/excalidraw": "0.18.0",
7676
"@hyperbook/types": "workspace:*",
7777
"@hyperbook/web-component-excalidraw": "workspace:*",
78-
"@learningmap/web-component": "^0.3.1",
78+
"@learningmap/web-component": "^0.3.3",
7979
"@shikijs/types": "^3.6.0",
8080
"@types/hast": "3.0.4",
8181
"@types/js-yaml": "^4.0.9",

platforms/vscode/src/Preview.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default class Preview {
4444
this.context = context;
4545

4646
vscode.workspace.onDidChangeTextDocument(async (e) => {
47+
// Only refresh when hyperbook config files change
4748
if (
4849
e.document.fileName.endsWith("hyperbook.json") ||
4950
e.document.fileName.endsWith("hyperlibrary.json")
@@ -351,8 +352,11 @@ export default class Preview {
351352
const fileWatcher = vscode.workspace.createFileSystemWatcher("**/*");
352353
fileWatcher.onDidChange(
353354
async (uri) => {
354-
if (this._resource && this.panel) {
355-
const hyperbookRoot = await hyperbook.findRoot(this._resource.fsPath).catch(() => "");
355+
if (this.panel) {
356+
// If the changed file is within the current hyperbook root, refresh preview
357+
const hyperbookRoot = this._resource
358+
? await hyperbook.findRoot(this._resource.fsPath).catch(() => "")
359+
: "";
356360
if (hyperbookRoot && uri.fsPath.startsWith(hyperbookRoot)) {
357361
await this.handleTextDocumentChange();
358362
}

pnpm-lock.yaml

Lines changed: 27 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/en/book/changelog.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@ If you need a new feature, open an [issue](https://github.com/openpatch/hyperboo
3838
::::
3939
-->
4040

41+
## v0.71.3
42+
43+
::::tabs
44+
45+
:::tab{title="Improved :+1:" id="improved"}
46+
47+
- Update learningmap
48+
49+
:::
50+
51+
52+
::::
53+
4154
## v0.71.0
4255

4356
::::tabs

0 commit comments

Comments
 (0)