@lapis-notes/app-profile 0.3.6 → 0.3.7
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 +16 -0
- package/dist/background-jobs.d.ts +4 -0
- package/dist/background-jobs.js +44 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/workspace-session/application.js +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @lapis-notes/app-profile
|
|
2
2
|
|
|
3
|
+
## 0.3.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#234](https://github.com/lapismd/lapis-notes/pull/234)
|
|
8
|
+
[`9e6990c`](https://github.com/lapismd/lapis-notes/commit/9e6990cb0074fac3467eb2d0a035566391f582ce)
|
|
9
|
+
Thanks [@stevejuma](https://github.com/stevejuma)! - Add the Background jobs
|
|
10
|
+
workspace view and register its leaf, ribbon, and command from the shared app
|
|
11
|
+
session.
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`9e6990c`](https://github.com/lapismd/lapis-notes/commit/9e6990cb0074fac3467eb2d0a035566391f582ce),
|
|
14
|
+
[`a2a1ce3`](https://github.com/lapismd/lapis-notes/commit/a2a1ce3b5d7354cb080c2ca72c4a77d6ae9e718a)]:
|
|
15
|
+
- @lapis-notes/workspace@0.4.16
|
|
16
|
+
- @lapis-notes/api@0.9.0
|
|
17
|
+
- @lapis-notes/file-explorer@0.2.11
|
|
18
|
+
|
|
3
19
|
## 0.3.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { App } from "@lapis-notes/api";
|
|
2
|
+
import { type BackgroundJobDestination } from "@lapis-notes/workspace";
|
|
3
|
+
/** Register the background jobs leaf before restoring persisted workspace leaves. */
|
|
4
|
+
export declare function registerNotesBackgroundJobs(app: App, destinations?: BackgroundJobDestination[]): () => void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BACKGROUND_JOBS_ICON, BACKGROUND_JOBS_VIEW_TYPE, BackgroundJobsView, } from "@lapis-notes/workspace";
|
|
2
|
+
/** Register the background jobs leaf before restoring persisted workspace leaves. */
|
|
3
|
+
export function registerNotesBackgroundJobs(app, destinations = []) {
|
|
4
|
+
app.workspace.registerView(BACKGROUND_JOBS_VIEW_TYPE, (leaf) => new BackgroundJobsView(leaf, destinations));
|
|
5
|
+
let disposed = false;
|
|
6
|
+
const open = async () => {
|
|
7
|
+
if (disposed)
|
|
8
|
+
return;
|
|
9
|
+
const leaf = app.workspace.getLeavesOfType(BACKGROUND_JOBS_VIEW_TYPE)[0] ??
|
|
10
|
+
app.workspace.getLeaf(true);
|
|
11
|
+
if (leaf.view.getViewType() !== BACKGROUND_JOBS_VIEW_TYPE)
|
|
12
|
+
await leaf.setViewState({ type: BACKGROUND_JOBS_VIEW_TYPE, state: {} });
|
|
13
|
+
if (disposed)
|
|
14
|
+
return;
|
|
15
|
+
await app.workspace.revealLeaf(leaf);
|
|
16
|
+
if (!disposed)
|
|
17
|
+
app.workspace.activateLeaf(leaf);
|
|
18
|
+
};
|
|
19
|
+
const removeRibbon = app.workspace.leftRibbon.addItem({
|
|
20
|
+
id: "app:background-jobs",
|
|
21
|
+
title: "Background jobs",
|
|
22
|
+
icon: BACKGROUND_JOBS_ICON,
|
|
23
|
+
hidden: false,
|
|
24
|
+
callback: () => void open(),
|
|
25
|
+
});
|
|
26
|
+
app.commands.registerCommand({
|
|
27
|
+
id: "app:open-background-jobs",
|
|
28
|
+
name: "Open Background jobs",
|
|
29
|
+
icon: BACKGROUND_JOBS_ICON,
|
|
30
|
+
callback: () => void open(),
|
|
31
|
+
});
|
|
32
|
+
return () => {
|
|
33
|
+
if (disposed)
|
|
34
|
+
return;
|
|
35
|
+
disposed = true;
|
|
36
|
+
for (const leaf of app.workspace.getLeavesOfType(BACKGROUND_JOBS_VIEW_TYPE)) {
|
|
37
|
+
if (leaf.view instanceof BackgroundJobsView)
|
|
38
|
+
leaf.view.unload();
|
|
39
|
+
}
|
|
40
|
+
removeRibbon();
|
|
41
|
+
app.commands.unregisterCommand("app:open-background-jobs");
|
|
42
|
+
app.workspace.unregisterView(BACKGROUND_JOBS_VIEW_TYPE);
|
|
43
|
+
};
|
|
44
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { SourceEditorPlugin } from "@lapis-notes/source-editor";
|
|
|
4
4
|
import { registerPluginManagementSettings } from "@lapis-notes/workspace";
|
|
5
5
|
export * from "./local-plugin-distribution";
|
|
6
6
|
export { registerNotesPluginBrowser } from "./plugin-browser";
|
|
7
|
+
export { registerNotesBackgroundJobs } from "./background-jobs";
|
|
7
8
|
export declare const registerNotesPluginSettings: typeof registerPluginManagementSettings;
|
|
8
9
|
/**
|
|
9
10
|
* The application-owned default plugin profile shared by every Lapis Notes
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import sourceEditorStyles from "@lapis-notes/source-editor/styles.css?inline";
|
|
|
8
8
|
import { registerPluginManagementSettings } from "@lapis-notes/workspace";
|
|
9
9
|
export * from "./local-plugin-distribution";
|
|
10
10
|
export { registerNotesPluginBrowser } from "./plugin-browser";
|
|
11
|
+
export { registerNotesBackgroundJobs } from "./background-jobs";
|
|
11
12
|
export const registerNotesPluginSettings = registerPluginManagementSettings;
|
|
12
13
|
/**
|
|
13
14
|
* The application-owned default plugin profile shared by every Lapis Notes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { App, installApplicationCompatibility, registerDefaultDailyDocumentProvider, takeHostSyncService, } from "@lapis-notes/api";
|
|
2
2
|
import { appStatePath } from "@lapis-notes/api/path";
|
|
3
|
-
import { registerNotesPluginBrowser, registerNotesPluginSettings, } from "../index";
|
|
3
|
+
import { registerNotesBackgroundJobs, registerNotesPluginBrowser, registerNotesPluginSettings, } from "../index";
|
|
4
4
|
export function createNotesApplication(options) {
|
|
5
5
|
const app = new App({
|
|
6
6
|
version: "2026.6.3",
|
|
@@ -30,6 +30,7 @@ export function createNotesApplication(options) {
|
|
|
30
30
|
const releaseCompatibility = installApplicationCompatibility(app);
|
|
31
31
|
const releaseSettings = registerNotesPluginSettings(app);
|
|
32
32
|
const releaseBrowser = registerNotesPluginBrowser(app);
|
|
33
|
+
const releaseBackgroundJobs = registerNotesBackgroundJobs(app);
|
|
33
34
|
const daily = registerDefaultDailyDocumentProvider(app);
|
|
34
35
|
const releaseHost = options.host?.attach?.(app, syncHost);
|
|
35
36
|
return {
|
|
@@ -42,6 +43,7 @@ export function createNotesApplication(options) {
|
|
|
42
43
|
release() {
|
|
43
44
|
daily.dispose();
|
|
44
45
|
releaseBrowser();
|
|
46
|
+
releaseBackgroundJobs();
|
|
45
47
|
releaseSettings();
|
|
46
48
|
releaseHost?.();
|
|
47
49
|
releaseCompatibility();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lapis-notes/app-profile",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@lapis-notes/api": "^0.
|
|
45
|
-
"@lapis-notes/file-explorer": "^0.2.
|
|
44
|
+
"@lapis-notes/api": "^0.9.0",
|
|
45
|
+
"@lapis-notes/file-explorer": "^0.2.11",
|
|
46
46
|
"@lapis-notes/history": "^0.5.1",
|
|
47
47
|
"@lapis-notes/markdown": "^0.3.3",
|
|
48
48
|
"@lapis-notes/search": "^0.1.13",
|
|
49
49
|
"@lapis-notes/source-editor": "^0.1.12",
|
|
50
|
-
"@lapis-notes/workspace": "^0.4.
|
|
50
|
+
"@lapis-notes/workspace": "^0.4.16",
|
|
51
51
|
"@lapismd/agent-ui": "^0.2.8",
|
|
52
52
|
"@lapismd/design-core": "^0.14.0",
|
|
53
53
|
"@lapismd/jj-history": "^0.1.0"
|