@ai-ecoverse/slicc-spectrum 1.56.2 → 1.58.0
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 +9 -7
- package/dist/slicc-dummy.js +203 -23
- package/dist/slicc-dummy.js.map +3 -3
- package/dist/slicc-ui.js +237 -20
- package/dist/slicc-ui.js.map +3 -3
- package/dist/types/app/files.d.ts +4 -0
- package/dist/types/app/monitor.d.ts +14 -0
- package/dist/types/app/tray.d.ts +4 -2
- package/dist/types/dummy/files.d.ts +3 -1
- package/dist/types/dummy/index.d.ts +2 -1
- package/dist/types/dummy/monitor.d.ts +3 -2
- package/dist/types/dummy/network.d.ts +6 -2
- package/dist/types/model/types.d.ts +25 -7
- package/package.json +2 -2
|
@@ -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,8 +1,10 @@
|
|
|
1
1
|
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
2
|
import '@adobe/spectrum-wc/components/badge/swc-badge.js';
|
|
3
3
|
import '@adobe/spectrum-wc/components/meter/swc-meter.js';
|
|
4
|
+
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
4
5
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
5
6
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-diamond.js';
|
|
7
|
+
import '@adobe/spectrum-wc-icons/swc-icon-chevron-right.js';
|
|
6
8
|
import { type TemplateResult } from 'lit';
|
|
7
9
|
import type { MonitorSection, MonitorStatus, SliccModel } from '../model/types.js';
|
|
8
10
|
import { ModelElement } from './base.js';
|
|
@@ -10,12 +12,24 @@ export declare function sparkline(points: readonly number[], width?: number, hei
|
|
|
10
12
|
export declare function health(section: MonitorSection): MonitorStatus;
|
|
11
13
|
export declare function meterVariant(ratio: number): 'informative' | 'notice' | 'negative';
|
|
12
14
|
export declare const surfaces: Record<string, string>;
|
|
15
|
+
export declare const rowLights: Record<MonitorStatus, 'info' | 'neutral' | 'notice' | 'negative'>;
|
|
16
|
+
export declare function indent(depth: number | undefined): number;
|
|
13
17
|
export declare function attention(section: MonitorSection): {
|
|
14
18
|
variant: 'negative' | 'notice';
|
|
15
19
|
text: string;
|
|
16
20
|
} | null;
|
|
17
21
|
export declare class SliccMonitor extends ModelElement {
|
|
18
22
|
#private;
|
|
23
|
+
static properties: {
|
|
24
|
+
model: {
|
|
25
|
+
attribute: boolean;
|
|
26
|
+
};
|
|
27
|
+
expanded: {
|
|
28
|
+
state: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
expanded: Record<string, boolean>;
|
|
32
|
+
constructor();
|
|
19
33
|
static styles: import("lit").CSSResult[];
|
|
20
34
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
21
35
|
focus(): void;
|
package/dist/types/app/tray.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type TemplateResult } from 'lit';
|
|
2
|
-
import type { SliccModel, TrayConnection, TrayStatus } from '../model/types.js';
|
|
2
|
+
import type { SliccModel, TrayBudget, TrayConnection, TrayStatus } from '../model/types.js';
|
|
3
3
|
import { ModelElement } from './base.js';
|
|
4
4
|
export declare const connectionVariant: Record<TrayConnection, string>;
|
|
5
5
|
export declare const connectionLabel: Record<TrayConnection, string>;
|
|
6
6
|
export declare function budgetVariant(percent: number): string;
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function spendLine(status: TrayStatus): string;
|
|
8
|
+
export declare function budgetLine(status: TrayStatus, budget: TrayBudget): string;
|
|
9
|
+
export declare function shownBudget(status: TrayStatus): TrayBudget | null;
|
|
8
10
|
export declare class SliccTray extends ModelElement {
|
|
9
11
|
#private;
|
|
10
12
|
static properties: {
|
|
@@ -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
|
}
|
|
@@ -25,6 +25,7 @@ export interface DummyOptions {
|
|
|
25
25
|
follow?: FollowScenario | 'off';
|
|
26
26
|
browser?: BrowserScenario;
|
|
27
27
|
sprinkles?: 'builtin' | 'cones';
|
|
28
|
+
monitor?: 'dummy' | 'agent';
|
|
28
29
|
}
|
|
29
30
|
export interface DummyModel extends SliccModel {
|
|
30
31
|
browser: DummyBrowser;
|
|
@@ -35,4 +36,4 @@ export interface DummyModel extends SliccModel {
|
|
|
35
36
|
approvals?: DummyApprovals;
|
|
36
37
|
follow?: DummyFollow;
|
|
37
38
|
}
|
|
38
|
-
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, follow, browser: scenario, sprinkles, }?: DummyOptions): DummyModel;
|
|
39
|
+
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, approvals, follow, browser: scenario, sprinkles, monitor, }?: DummyOptions): DummyModel;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { MonitorEvents, MonitorPort, MonitorSnapshot, SliccModel } from '../model/types.js';
|
|
2
|
+
import type { MonitorEvents, MonitorPort, MonitorSection, MonitorSnapshot, SliccModel } from '../model/types.js';
|
|
3
3
|
export declare function wave(seed: number, length?: number): number[];
|
|
4
|
+
export declare const agentSections: MonitorSection[];
|
|
4
5
|
export declare class DummyMonitor extends Emitter<MonitorEvents> implements MonitorPort {
|
|
5
6
|
#private;
|
|
6
|
-
constructor(model: Omit<SliccModel, 'monitor'
|
|
7
|
+
constructor(model: Omit<SliccModel, 'monitor'>, extra?: MonitorSection[]);
|
|
7
8
|
snapshot(): MonitorSnapshot;
|
|
8
9
|
resync(): void;
|
|
9
10
|
}
|
|
@@ -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
|
}
|
|
@@ -460,10 +466,12 @@ export interface MonitorVital {
|
|
|
460
466
|
ratio?: number;
|
|
461
467
|
}
|
|
462
468
|
export interface MonitorRow {
|
|
469
|
+
id?: string;
|
|
463
470
|
name: string;
|
|
464
471
|
meta: string;
|
|
465
472
|
status: MonitorStatus;
|
|
466
473
|
badges?: string[];
|
|
474
|
+
depth?: number;
|
|
467
475
|
}
|
|
468
476
|
export interface MonitorSection {
|
|
469
477
|
id: string;
|
|
@@ -516,19 +524,20 @@ export interface Follower {
|
|
|
516
524
|
device: 'browser' | 'phone' | 'extension';
|
|
517
525
|
since: number;
|
|
518
526
|
}
|
|
527
|
+
export interface TrayBudget {
|
|
528
|
+
percent: number;
|
|
529
|
+
window: 'daily' | 'weekly' | 'monthly';
|
|
530
|
+
resets: string;
|
|
531
|
+
}
|
|
519
532
|
export interface TrayStatus {
|
|
520
533
|
name: string;
|
|
521
534
|
kind: FloatKind;
|
|
522
535
|
connection: TrayConnection;
|
|
523
536
|
role: TrayRole;
|
|
524
537
|
followers: Follower[];
|
|
525
|
-
spent
|
|
526
|
-
rate
|
|
527
|
-
budget
|
|
528
|
-
percent: number;
|
|
529
|
-
window: 'daily' | 'weekly' | 'monthly';
|
|
530
|
-
resets: string;
|
|
531
|
-
};
|
|
538
|
+
spent?: number;
|
|
539
|
+
rate?: number;
|
|
540
|
+
budget?: TrayBudget;
|
|
532
541
|
joinUrl: string;
|
|
533
542
|
}
|
|
534
543
|
export interface TrayEvents {
|
|
@@ -660,6 +669,13 @@ export interface LinkedDevice {
|
|
|
660
669
|
access?: DeviceAccess;
|
|
661
670
|
asking?: boolean;
|
|
662
671
|
terminals?: number;
|
|
672
|
+
folders?: readonly LinkedFolder[];
|
|
673
|
+
}
|
|
674
|
+
export interface LinkedFolder {
|
|
675
|
+
name: string;
|
|
676
|
+
source: string;
|
|
677
|
+
readonly: boolean;
|
|
678
|
+
mounted?: string;
|
|
663
679
|
}
|
|
664
680
|
export interface NetworkLinks {
|
|
665
681
|
joinUrl: string | null;
|
|
@@ -710,6 +726,8 @@ export interface NetworkPort extends Subscribable<{
|
|
|
710
726
|
setAccess?(id: string, key: AccessKey, allowed: boolean): Promise<void>;
|
|
711
727
|
rotateJoinUrl?(): Promise<void>;
|
|
712
728
|
retryLinks?(): Promise<void>;
|
|
729
|
+
mountFolder?(source: string): Promise<string>;
|
|
730
|
+
ejectFolder?(source: string): Promise<void>;
|
|
713
731
|
}
|
|
714
732
|
export interface NoticeAction {
|
|
715
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.0",
|
|
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",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@adobe/spectrum-wc": "2.0.0-beta.4",
|
|
74
74
|
"@adobe/spectrum-wc-icons": "2.0.0-beta.4",
|
|
75
75
|
"@ai-ecoverse/slicc-kernel": "1.60.1",
|
|
76
|
-
"@ai-ecoverse/slicc-shared-web": "1.12.
|
|
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",
|