@lapis-notes/graph 0.1.3 → 0.1.5
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/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/graph-plugin.d.ts +3 -1
- package/dist/graph-plugin.js +35 -12
- package/manifest.json +5 -3
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Graph changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#54](https://github.com/lapismd/lapis-plugins/pull/54) [`91d0014`](https://github.com/lapismd/lapis-plugins/commit/91d001499930e7c4ea2c9ea622e3f5ed2d956ab3) Thanks [@lapismd-dependency-bot](https://github.com/apps/lapismd-dependency-bot)! - Refresh first-party Lapis dependencies to the published versions recorded in this pull request.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`91d0014`](https://github.com/lapismd/lapis-plugins/commit/91d001499930e7c4ea2c9ea622e3f5ed2d956ab3)]:
|
|
10
|
+
- @lapis-notes/markdown@0.2.2
|
|
11
|
+
|
|
12
|
+
## 0.1.4
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#28](https://github.com/lapismd/lapis-plugins/pull/28) [`d27467e`](https://github.com/lapismd/lapis-plugins/commit/d27467ee80c273011b7eb6ae792fa8e0330a11c1) Thanks [@stevejuma](https://github.com/stevejuma)! - Align shared presentation dependencies with the Design Core 0.6 public boundary used by current Notes hosts.
|
|
17
|
+
|
|
18
|
+
- [#28](https://github.com/lapismd/lapis-plugins/pull/28) [`f4b9136`](https://github.com/lapismd/lapis-plugins/commit/f4b9136e4f47965700e06f52f82e8e2bc884eb11) Thanks [@stevejuma](https://github.com/stevejuma)! - Accept Design Core 0.5.1 alongside the existing 0.4 release line so current local
|
|
19
|
+
Desktop builds can use one compatible framework graph.
|
|
20
|
+
|
|
21
|
+
- [#28](https://github.com/lapismd/lapis-plugins/pull/28) [`56b5d6c`](https://github.com/lapismd/lapis-plugins/commit/56b5d6c1a016ef9bca43703b5fecf57f8234d1af) Thanks [@stevejuma](https://github.com/stevejuma)! - Consume published Design Core 0.4.0 with prepared browser CSS and bundled font assets through normal npm ranges.
|
|
22
|
+
|
|
23
|
+
Restore Bases picker input/list accessibility relationships and name property actions.
|
|
24
|
+
|
|
25
|
+
- [#28](https://github.com/lapismd/lapis-plugins/pull/28) [`c9febb1`](https://github.com/lapismd/lapis-plugins/commit/c9febb1c8b431db30ecdcf7507cfff8f727bc4ed) Thanks [@stevejuma](https://github.com/stevejuma)! - Consume the published Notes next packages, Mira 0.1.2, and Design Core 0.7.0 through the existing semver floors. Markdown dependents accept ^0.2.0. History keeps its public repository entrypoints, and Bases keeps the file-icon contract on API 0.2.0.
|
|
26
|
+
|
|
27
|
+
- [#28](https://github.com/lapismd/lapis-plugins/pull/28) [`fbdd341`](https://github.com/lapismd/lapis-plugins/commit/fbdd341e6df180ff4ef39b6c5091ed3e77802a3b) Thanks [@stevejuma](https://github.com/stevejuma)! - Admit debounced settings before native close and refresh open Graph views after explicit disk recovery.
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`d27467e`](https://github.com/lapismd/lapis-plugins/commit/d27467ee80c273011b7eb6ae792fa8e0330a11c1), [`f4b9136`](https://github.com/lapismd/lapis-plugins/commit/f4b9136e4f47965700e06f52f82e8e2bc884eb11), [`ae5b5d9`](https://github.com/lapismd/lapis-plugins/commit/ae5b5d9bf7d8f84296280581a8f95fd198265e62), [`ae5b5d9`](https://github.com/lapismd/lapis-plugins/commit/ae5b5d9bf7d8f84296280581a8f95fd198265e62), [`ae5b5d9`](https://github.com/lapismd/lapis-plugins/commit/ae5b5d9bf7d8f84296280581a8f95fd198265e62), [`56b5d6c`](https://github.com/lapismd/lapis-plugins/commit/56b5d6c1a016ef9bca43703b5fecf57f8234d1af)]:
|
|
30
|
+
- @lapis-notes/markdown@0.2.0
|
|
31
|
+
|
|
3
32
|
## 0.1.3
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Register the exported plugin class in the application's `PluginProfile`. Import
|
|
|
13
13
|
registration so the host owns its lifecycle.
|
|
14
14
|
|
|
15
15
|
The runtime plugin ID is `lapis-graph`. A matching signed
|
|
16
|
-
`lapis-graph-0.1.
|
|
16
|
+
`lapis-graph-0.1.5.lapis-plugin` archive is attached to the
|
|
17
17
|
package-scoped GitHub release for manual or registry installation.
|
|
18
18
|
|
|
19
19
|
See the [repository README](https://github.com/lapismd/lapis-plugins#readme) for
|
package/dist/graph-plugin.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ export declare class GraphPlugin extends Plugin {
|
|
|
13
13
|
private readonly graphCoordinator;
|
|
14
14
|
private settings;
|
|
15
15
|
private settingsSaveTimer;
|
|
16
|
-
private
|
|
16
|
+
private releaseSettingsSave;
|
|
17
|
+
private settingsSaveTask;
|
|
17
18
|
private graphProblems;
|
|
18
19
|
private readonly pathQueryCache;
|
|
19
20
|
constructor(app: App, manifest?: PluginManifest);
|
|
@@ -21,6 +22,7 @@ export declare class GraphPlugin extends Plugin {
|
|
|
21
22
|
onunload(): Promise<void>;
|
|
22
23
|
getSettings(): GraphSettings;
|
|
23
24
|
updateSettings(nextSettings: GraphSettings): Promise<void>;
|
|
25
|
+
private applySettings;
|
|
24
26
|
subscribeToGlobalGraph(listener: (state: GraphCoordinatorState) => void): () => void;
|
|
25
27
|
refreshGlobalGraph(force?: boolean): Promise<void>;
|
|
26
28
|
reportGraphBuildFailure(scope: GraphProblemScope, path: string | null, error: unknown): void;
|
package/dist/graph-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin, } from "@lapis-notes/api";
|
|
1
|
+
import { Plugin, Notice, } from "@lapis-notes/api";
|
|
2
2
|
import { DEFAULT_GRAPH_SETTINGS, loadPersistedGraphSettings, mergeGraphSettings, serializeGraphSettings, } from "./graph-settings";
|
|
3
3
|
import { GraphDataCoordinator, } from "./graph-data-coordinator";
|
|
4
4
|
import { filterGraphBySettings } from "./graph-data";
|
|
@@ -11,7 +11,8 @@ export class GraphPlugin extends Plugin {
|
|
|
11
11
|
graphCoordinator;
|
|
12
12
|
settings = mergeGraphSettings(DEFAULT_GRAPH_SETTINGS);
|
|
13
13
|
settingsSaveTimer = null;
|
|
14
|
-
|
|
14
|
+
releaseSettingsSave = null;
|
|
15
|
+
settingsSaveTask = null;
|
|
15
16
|
graphProblems = null;
|
|
16
17
|
pathQueryCache = new Map();
|
|
17
18
|
constructor(app, manifest = manifestSpec) {
|
|
@@ -20,6 +21,12 @@ export class GraphPlugin extends Plugin {
|
|
|
20
21
|
}
|
|
21
22
|
async onload() {
|
|
22
23
|
await this.initializeSettings();
|
|
24
|
+
this.registerEvent(this.app.configuration.on("plugin-data-updated", (event) => {
|
|
25
|
+
if (event.pluginId !== this.manifest.id ||
|
|
26
|
+
event.origin === "plugin-save")
|
|
27
|
+
return;
|
|
28
|
+
this.applySettings(loadPersistedGraphSettings(event.value).settings);
|
|
29
|
+
}));
|
|
23
30
|
this.graphProblems = createGraphProblemReporter(this);
|
|
24
31
|
this.register(this.graphCoordinator.subscribe((state) => {
|
|
25
32
|
if (state.status === "error") {
|
|
@@ -77,21 +84,23 @@ export class GraphPlugin extends Plugin {
|
|
|
77
84
|
if (this.settingsSaveTimer)
|
|
78
85
|
clearTimeout(this.settingsSaveTimer);
|
|
79
86
|
this.settingsSaveTimer = null;
|
|
80
|
-
|
|
81
|
-
this.
|
|
82
|
-
|
|
83
|
-
await this.saveData(pending);
|
|
87
|
+
this.releaseSettingsSave?.(true);
|
|
88
|
+
this.releaseSettingsSave = null;
|
|
89
|
+
await this.settingsSaveTask;
|
|
84
90
|
}
|
|
85
91
|
getSettings() {
|
|
86
92
|
return mergeGraphSettings(this.settings);
|
|
87
93
|
}
|
|
88
94
|
async updateSettings(nextSettings) {
|
|
95
|
+
this.applySettings(nextSettings);
|
|
96
|
+
this.scheduleSettingsSave(this.getSettings());
|
|
97
|
+
}
|
|
98
|
+
applySettings(nextSettings) {
|
|
89
99
|
this.settings = mergeGraphSettings(nextSettings);
|
|
90
100
|
const snapshot = this.getSettings();
|
|
91
101
|
this.views.forEach((view) => {
|
|
92
102
|
view.applyGraphSettings(snapshot);
|
|
93
103
|
});
|
|
94
|
-
this.scheduleSettingsSave(snapshot);
|
|
95
104
|
}
|
|
96
105
|
subscribeToGlobalGraph(listener) {
|
|
97
106
|
return this.graphCoordinator.subscribe(listener);
|
|
@@ -127,15 +136,29 @@ export class GraphPlugin extends Plugin {
|
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
scheduleSettingsSave(settings) {
|
|
130
|
-
this.pendingSettingsSave = serializeGraphSettings(settings);
|
|
131
139
|
if (this.settingsSaveTimer)
|
|
132
140
|
clearTimeout(this.settingsSaveTimer);
|
|
141
|
+
this.releaseSettingsSave?.(false);
|
|
142
|
+
const snapshot = serializeGraphSettings(settings);
|
|
143
|
+
let release;
|
|
144
|
+
const ready = new Promise((resolve) => {
|
|
145
|
+
release = resolve;
|
|
146
|
+
});
|
|
147
|
+
this.releaseSettingsSave = release;
|
|
148
|
+
const persist = async () => {
|
|
149
|
+
if (await ready)
|
|
150
|
+
await this.saveData(snapshot);
|
|
151
|
+
};
|
|
152
|
+
this.settingsSaveTask = this.app.vault.supportsConditionalTextWrites
|
|
153
|
+
? this.app.fileEditingSessions.track(persist)
|
|
154
|
+
: persist();
|
|
155
|
+
void this.settingsSaveTask.catch((error) => {
|
|
156
|
+
new Notice(`Graph settings could not be saved: ${error instanceof Error ? error.message : String(error)}`, undefined, this.app);
|
|
157
|
+
});
|
|
133
158
|
this.settingsSaveTimer = setTimeout(() => {
|
|
134
159
|
this.settingsSaveTimer = null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (pending)
|
|
138
|
-
void this.saveData(pending);
|
|
160
|
+
this.releaseSettingsSave = null;
|
|
161
|
+
release(true);
|
|
139
162
|
}, 180);
|
|
140
163
|
}
|
|
141
164
|
matchSearchPaths(query) {
|
package/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "lapis-graph",
|
|
3
3
|
"name": "Graph",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"minAppVersion": "0.1.0",
|
|
6
6
|
"description": "Global and local graph views powered by indexed metadata",
|
|
7
7
|
"author": "Lapis Notes",
|
|
8
8
|
"authorUrl": "https://app.lapis.md",
|
|
9
|
-
"authorAvatarUrl": "https://
|
|
9
|
+
"authorAvatarUrl": "https://gravatar.com/avatar/f7226d5f9cf07af2a6a60d3ab11413abb9d2e2eb60f2d5cce17356845a166155?size=256&d=initials",
|
|
10
10
|
"isDesktopOnly": false,
|
|
11
11
|
"lapis": {
|
|
12
12
|
"manifestVersion": 1,
|
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
"sharedDependencies": [
|
|
22
22
|
"@lapis-notes/api",
|
|
23
23
|
"@lapis-notes/api/telemetry",
|
|
24
|
-
"@lapis-notes/
|
|
24
|
+
"@lapis-notes/api/editor/core",
|
|
25
|
+
"@lapis-notes/api/editor/language-service",
|
|
25
26
|
"@codemirror/autocomplete",
|
|
26
27
|
"@codemirror/commands",
|
|
27
28
|
"@codemirror/language",
|
|
28
29
|
"@codemirror/lint",
|
|
30
|
+
"@codemirror/search",
|
|
29
31
|
"@codemirror/state",
|
|
30
32
|
"@codemirror/view",
|
|
31
33
|
"@lezer/common",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lapis-notes/graph",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Lapis Notes global and local graph plugin",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"./registry.json": "./registry.json"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lapismd/design-core": "^0.
|
|
45
|
+
"@lapismd/design-core": "^0.10.1",
|
|
46
46
|
"@lucide/svelte": "^0.523.0",
|
|
47
47
|
"d3-force": "^3.0.0"
|
|
48
48
|
},
|
|
@@ -51,17 +51,18 @@
|
|
|
51
51
|
"@codemirror/commands": "^6.8.1",
|
|
52
52
|
"@codemirror/language": "^6.11.3",
|
|
53
53
|
"@codemirror/lint": "^6.8.5",
|
|
54
|
+
"@codemirror/search": "^6.5.11",
|
|
54
55
|
"@codemirror/state": "^6.6.0",
|
|
55
56
|
"@codemirror/view": "^6.42.1",
|
|
56
|
-
"@lapis-notes/api": "^0.
|
|
57
|
-
"@lapis-notes/markdown": "^0.
|
|
57
|
+
"@lapis-notes/api": "^0.2.0",
|
|
58
|
+
"@lapis-notes/markdown": "^0.2.2",
|
|
58
59
|
"@lezer/common": "^1.5.2",
|
|
59
60
|
"@lezer/highlight": "^1.2.3",
|
|
60
61
|
"@lezer/lr": "^1.4.2",
|
|
61
62
|
"svelte": "^5.0.0"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@lapis-notes/markdown": "^0.
|
|
65
|
+
"@lapis-notes/markdown": "^0.2.2",
|
|
65
66
|
"@sveltejs/package": "^2.5.0",
|
|
66
67
|
"@sveltejs/vite-plugin-svelte": "^5.1.1",
|
|
67
68
|
"@tsconfig/svelte": "^5.0.5",
|
|
@@ -70,8 +71,8 @@
|
|
|
70
71
|
"svelte": "^5.38.2",
|
|
71
72
|
"svelte-check": "^4.3.1",
|
|
72
73
|
"typescript": "~5.8.3",
|
|
73
|
-
"vite": "^6.4.
|
|
74
|
-
"vitest": "^4.1.
|
|
74
|
+
"vite": "^6.4.4",
|
|
75
|
+
"vitest": "^4.1.12"
|
|
75
76
|
},
|
|
76
77
|
"repository": {
|
|
77
78
|
"type": "git",
|