@septkit/shell-lib 0.0.44 → 0.0.46
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/dist/index.d.ts +1 -1
- package/dist/index.js +27 -1
- package/dist/shell-context.d.ts +3 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/clipboard.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type * from './types';
|
|
2
2
|
export { SHELL_DB_PREFIX, LIBRARY_DB_PREFIX, TEMP_DOCUMENT_PREFIX, TEMP_PROJECT_PREFIX, RESERVED_DB_PREFIXES, isReservedDatabaseName, } from './constants';
|
|
3
|
-
export { setShellContext, clearShellContext, getProject, getActiveDocumentId, getCommands, getStorageSources, getPwa, getProjectStorage, getTasks, } from './shell-context';
|
|
3
|
+
export { setShellContext, clearShellContext, getProject, getActiveDocumentId, getCommands, getStorageSources, getPwa, getProjectStorage, getTasks, getClipboard, } from './shell-context';
|
package/dist/index.js
CHANGED
|
@@ -1358,5 +1358,31 @@ var te = { begin: function() {
|
|
|
1358
1358
|
fail: function() {}
|
|
1359
1359
|
};
|
|
1360
1360
|
} };
|
|
1361
|
+
function ne() {
|
|
1362
|
+
return G?.clipboard ?? re;
|
|
1363
|
+
}
|
|
1364
|
+
var re = ie();
|
|
1365
|
+
function ie() {
|
|
1366
|
+
let e, t = [];
|
|
1367
|
+
function n(n) {
|
|
1368
|
+
let r = e;
|
|
1369
|
+
e = n;
|
|
1370
|
+
for (let n of t) n(e, r);
|
|
1371
|
+
}
|
|
1372
|
+
return {
|
|
1373
|
+
entry: {
|
|
1374
|
+
get value() {
|
|
1375
|
+
return e;
|
|
1376
|
+
},
|
|
1377
|
+
subscribe(e) {
|
|
1378
|
+
return t.push(e), () => {
|
|
1379
|
+
t = t.filter((t) => t !== e);
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
set: (e) => n(e),
|
|
1384
|
+
clear: () => n(void 0)
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1361
1387
|
//#endregion
|
|
1362
|
-
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX, q as clearShellContext, Y as getActiveDocumentId, X as getCommands, J as getProject, $ as getProjectStorage, Q as getPwa, Z as getStorageSources, ee as getTasks, a as isReservedDatabaseName, K as setShellContext };
|
|
1388
|
+
export { t as LIBRARY_DB_PREFIX, i as RESERVED_DB_PREFIXES, e as SHELL_DB_PREFIX, n as TEMP_DOCUMENT_PREFIX, r as TEMP_PROJECT_PREFIX, q as clearShellContext, Y as getActiveDocumentId, ne as getClipboard, X as getCommands, J as getProject, $ as getProjectStorage, Q as getPwa, Z as getStorageSources, ee as getTasks, a as isReservedDatabaseName, K as setShellContext };
|
package/dist/shell-context.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Scl } from '@dialecte/scl/v2019C1';
|
|
2
2
|
import { Observable, ShellCommands } from './types/api';
|
|
3
3
|
import { BackgroundTasks } from './types/background-tasks';
|
|
4
|
+
import { ShellClipboard } from './types/clipboard';
|
|
4
5
|
import { ProjectStorage } from './types/project-storage';
|
|
5
6
|
import { PwaInstall } from './types/pwa-install';
|
|
6
7
|
import { StorageSources } from './types/storage-source';
|
|
@@ -12,6 +13,7 @@ interface ShellContext {
|
|
|
12
13
|
pwa?: PwaInstall;
|
|
13
14
|
projectStorage?: ProjectStorage;
|
|
14
15
|
tasks?: BackgroundTasks;
|
|
16
|
+
clipboard?: ShellClipboard;
|
|
15
17
|
}
|
|
16
18
|
export declare function setShellContext(ctx: ShellContext): void;
|
|
17
19
|
export declare function clearShellContext(): void;
|
|
@@ -22,4 +24,5 @@ export declare function getStorageSources(): StorageSources;
|
|
|
22
24
|
export declare function getPwa(): PwaInstall;
|
|
23
25
|
export declare function getProjectStorage(): ProjectStorage;
|
|
24
26
|
export declare function getTasks(): BackgroundTasks;
|
|
27
|
+
export declare function getClipboard(): ShellClipboard;
|
|
25
28
|
export {};
|
package/dist/types/api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Scl } from '@dialecte/scl/v2019C1';
|
|
2
2
|
import { BackgroundTasks } from './background-tasks';
|
|
3
|
+
import { ShellClipboard } from './clipboard';
|
|
3
4
|
import { ProjectStorage } from './project-storage';
|
|
4
5
|
import { PwaInstall } from './pwa-install';
|
|
5
6
|
import { StorageSources } from './storage-source';
|
|
@@ -21,4 +22,5 @@ export interface ExtensionAPI {
|
|
|
21
22
|
pwa?: PwaInstall;
|
|
22
23
|
projectStorage?: ProjectStorage;
|
|
23
24
|
tasks?: BackgroundTasks;
|
|
25
|
+
clipboard?: ShellClipboard;
|
|
24
26
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from './api';
|
|
2
|
+
export type ClipboardEntry = {
|
|
3
|
+
documentId: string;
|
|
4
|
+
ref: {
|
|
5
|
+
tagName: string;
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
verb: 'copy' | 'cut';
|
|
9
|
+
};
|
|
10
|
+
export interface ShellClipboard {
|
|
11
|
+
entry: Observable<ClipboardEntry>;
|
|
12
|
+
set(entry: ClipboardEntry): void;
|
|
13
|
+
clear(): void;
|
|
14
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@septkit/shell-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@dialecte/core": "0.17.1",
|
|
17
|
-
"@dialecte/scl": "0.
|
|
17
|
+
"@dialecte/scl": "0.32.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"oxlint": "~1.6.0",
|