@ai-ecoverse/slicc-spectrum 1.57.0 → 1.58.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.
- package/README.md +4 -4
- package/dist/slicc-dummy.js +91 -8
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +107 -3
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/files.d.ts +4 -0
- package/dist/types/dummy/files.d.ts +3 -1
- package/dist/types/dummy/network.d.ts +6 -2
- package/dist/types/model/types.d.ts +15 -0
- package/package.json +3 -3
|
@@ -41,6 +41,9 @@ export declare class SliccFiles extends ModelElement {
|
|
|
41
41
|
mounted: {
|
|
42
42
|
state: boolean;
|
|
43
43
|
};
|
|
44
|
+
sources: {
|
|
45
|
+
state: boolean;
|
|
46
|
+
};
|
|
44
47
|
mounting: {
|
|
45
48
|
state: boolean;
|
|
46
49
|
};
|
|
@@ -59,6 +62,7 @@ export declare class SliccFiles extends ModelElement {
|
|
|
59
62
|
};
|
|
60
63
|
count: number;
|
|
61
64
|
mounted: readonly string[];
|
|
65
|
+
sources: ReadonlyMap<string, string>;
|
|
62
66
|
mounting: boolean;
|
|
63
67
|
ejecting: ReadonlySet<string>;
|
|
64
68
|
waiting: readonly string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { Change, FileEntry, FileEvents, FilePort } from '../model/types.js';
|
|
2
|
+
import type { Change, FileEntry, FileEvents, FilePort, MountInfo } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
4
|
export type MountScenario = 'mount' | 'cancel' | 'fail' | 'needs';
|
|
5
5
|
export interface DummyMount {
|
|
@@ -12,6 +12,7 @@ export declare class DummyFiles extends Emitter<FileEvents> implements FilePort
|
|
|
12
12
|
mount: DummyMount | null;
|
|
13
13
|
mountFolder?: (path?: string) => Promise<string | null>;
|
|
14
14
|
mounts?: () => readonly string[];
|
|
15
|
+
mountInfo?: () => readonly MountInfo[];
|
|
15
16
|
eject?: (path: string) => Promise<void>;
|
|
16
17
|
needsFolder?: () => readonly string[];
|
|
17
18
|
constructor(contents: Record<string, string>, directories: readonly string[], changes: readonly Change[], clock: Clock, mount?: DummyMount | null);
|
|
@@ -22,4 +23,5 @@ export declare class DummyFiles extends Emitter<FileEvents> implements FilePort
|
|
|
22
23
|
changes(): readonly Change[];
|
|
23
24
|
accept(path: string): void;
|
|
24
25
|
revert(path: string): Promise<void>;
|
|
26
|
+
attach(target: string, source: string, contents: Record<string, string>): Promise<string>;
|
|
25
27
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { AccessKey, LinkedDevice, NetworkExit, NetworkLinks, NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
|
|
2
|
+
import type { AccessKey, LinkedDevice, LinkedFolder, NetworkExit, NetworkLinks, NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
|
+
import type { DummyFiles } from './files.js';
|
|
4
5
|
export type NetworkScenario = 'ok' | 'limited' | 'failing';
|
|
5
6
|
export type TailnetScenario = 'off' | 'needs-login' | 'running' | 'failed';
|
|
6
7
|
export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied' | 'remote' | 'followers';
|
|
7
8
|
export declare function networkFixtures(scenario: NetworkScenario, now?: number): NetworkStatus;
|
|
8
9
|
export declare function tailnetFixtures(scenario: TailnetScenario): TailnetStatus;
|
|
10
|
+
export declare function folderFiles(folder: LinkedFolder): Record<string, string>;
|
|
9
11
|
export declare function joinUrl(rotation?: number): string;
|
|
10
12
|
export declare function followUrl(rotation?: number): string;
|
|
11
13
|
export declare function grant(device: LinkedDevice, key: AccessKey, allowed: boolean): LinkedDevice;
|
|
@@ -24,7 +26,9 @@ export declare class DummyNetwork extends Emitter<{
|
|
|
24
26
|
setAccess?: (id: string, key: AccessKey, allowed: boolean) => Promise<void>;
|
|
25
27
|
rotateJoinUrl?: () => Promise<void>;
|
|
26
28
|
retryLinks?: () => Promise<void>;
|
|
27
|
-
|
|
29
|
+
mountFolder?: (source: string) => Promise<string>;
|
|
30
|
+
ejectFolder?: (source: string) => Promise<void>;
|
|
31
|
+
constructor(scenario: NetworkScenario, clock: Clock, tailnet?: TailnetScenario, links?: LinksScenario, files?: DummyFiles);
|
|
28
32
|
setLinks(scenario: LinksScenario): void;
|
|
29
33
|
status(): NetworkStatus;
|
|
30
34
|
setScenario(scenario: NetworkScenario): void;
|
|
@@ -299,6 +299,11 @@ export interface FileEvents {
|
|
|
299
299
|
changes: readonly Change[];
|
|
300
300
|
mounts: readonly string[];
|
|
301
301
|
}
|
|
302
|
+
export interface MountInfo {
|
|
303
|
+
target: string;
|
|
304
|
+
source?: string;
|
|
305
|
+
type: string;
|
|
306
|
+
}
|
|
302
307
|
export interface FilePort extends Subscribable<FileEvents> {
|
|
303
308
|
list(): Promise<readonly FileEntry[]>;
|
|
304
309
|
read(path: string): Promise<string>;
|
|
@@ -309,6 +314,7 @@ export interface FilePort extends Subscribable<FileEvents> {
|
|
|
309
314
|
revert(path: string): Promise<void>;
|
|
310
315
|
mountFolder?(path?: string): Promise<string | null>;
|
|
311
316
|
mounts?(): readonly string[];
|
|
317
|
+
mountInfo?(): readonly MountInfo[];
|
|
312
318
|
eject?(path: string): Promise<void>;
|
|
313
319
|
needsFolder?(): readonly string[];
|
|
314
320
|
}
|
|
@@ -663,6 +669,13 @@ export interface LinkedDevice {
|
|
|
663
669
|
access?: DeviceAccess;
|
|
664
670
|
asking?: boolean;
|
|
665
671
|
terminals?: number;
|
|
672
|
+
folders?: readonly LinkedFolder[];
|
|
673
|
+
}
|
|
674
|
+
export interface LinkedFolder {
|
|
675
|
+
name: string;
|
|
676
|
+
source: string;
|
|
677
|
+
readonly: boolean;
|
|
678
|
+
mounted?: string;
|
|
666
679
|
}
|
|
667
680
|
export interface NetworkLinks {
|
|
668
681
|
joinUrl: string | null;
|
|
@@ -713,6 +726,8 @@ export interface NetworkPort extends Subscribable<{
|
|
|
713
726
|
setAccess?(id: string, key: AccessKey, allowed: boolean): Promise<void>;
|
|
714
727
|
rotateJoinUrl?(): Promise<void>;
|
|
715
728
|
retryLinks?(): Promise<void>;
|
|
729
|
+
mountFolder?(source: string): Promise<string>;
|
|
730
|
+
ejectFolder?(source: string): Promise<void>;
|
|
716
731
|
}
|
|
717
732
|
export interface NoticeAction {
|
|
718
733
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-spectrum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.58.1",
|
|
4
4
|
"description": "Web components for SLICC on Spectrum Web Components: the terminal, the app shell and its surfaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@adobe/spectrum-wc": "2.0.0-beta.4",
|
|
74
74
|
"@adobe/spectrum-wc-icons": "2.0.0-beta.4",
|
|
75
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
76
|
-
"@ai-ecoverse/slicc-shared-web": "1.12.
|
|
75
|
+
"@ai-ecoverse/slicc-kernel": "1.61.0",
|
|
76
|
+
"@ai-ecoverse/slicc-shared-web": "1.12.3",
|
|
77
77
|
"@ai-ecoverse/wasm-bash": "5.3.0-17",
|
|
78
78
|
"@ai-ecoverse/wasm-coreutils": "9.7.0-3",
|
|
79
79
|
"@biomejs/biome": "2.5.15",
|