@ai-ecoverse/slicc-spectrum 1.46.0 → 1.47.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 +3 -3
- package/dist/slicc-dummy.js +133 -2
- package/dist/slicc-dummy.js.map +2 -2
- package/dist/slicc-ui.js +388 -174
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/base.d.ts +1 -0
- package/dist/types/app/network.d.ts +14 -1
- package/dist/types/dummy/index.d.ts +3 -2
- package/dist/types/dummy/network.d.ts +13 -2
- package/dist/types/dummy.d.ts +1 -1
- package/dist/types/model/types.d.ts +33 -0
- package/package.json +3 -3
package/dist/types/app/base.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class ModelElement extends LitElement {
|
|
|
12
12
|
constructor();
|
|
13
13
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
14
14
|
protected focusOn(...selectors: string[]): void;
|
|
15
|
+
protected focusWith(options: FocusOptions, ...selectors: string[]): void;
|
|
15
16
|
connectedCallback(): void;
|
|
16
17
|
disconnectedCallback(): void;
|
|
17
18
|
protected willUpdate(changed: PropertyValues): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
|
+
import '@adobe/spectrum-wc/components/badge/swc-badge.js';
|
|
2
3
|
import '@adobe/spectrum-wc/components/button/swc-button.js';
|
|
3
4
|
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
4
5
|
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
@@ -7,8 +8,9 @@ import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-error.js';
|
|
|
7
8
|
import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-online.js';
|
|
8
9
|
import '@adobe/spectrum-wc-icons/swc-icon-cloud-state-slow-connection.js';
|
|
9
10
|
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
11
|
+
import '@adobe/spectrum-wc-icons/swc-icon-info-circle.js';
|
|
10
12
|
import { type TemplateResult } from 'lit';
|
|
11
|
-
import type { BrowserAutomation, NetworkRoute, NetworkStatus, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
|
|
13
|
+
import type { BrowserAutomation, LinkedDevice, LinkState, NetworkExit, NetworkLinks, NetworkRoute, NetworkStatus, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
|
|
12
14
|
import { ModelElement } from './base.js';
|
|
13
15
|
export { command } from './reach.js';
|
|
14
16
|
export declare const networkHealth: Record<NetworkStatus['health'], readonly ['positive' | 'notice' | 'negative', string]>;
|
|
@@ -17,6 +19,13 @@ export declare function automationOf(browser: BrowserAutomation): keyof typeof a
|
|
|
17
19
|
export declare const tailnetStates: Record<TailnetState, readonly ['neutral' | 'info' | 'positive' | 'notice' | 'negative', string]>;
|
|
18
20
|
export declare function tailnetAddress(addresses: readonly string[]): string | undefined;
|
|
19
21
|
export declare function exitNodeValue(tailnet: TailnetStatus): string;
|
|
22
|
+
export declare const linkStates: Record<LinkState, readonly ['info' | 'positive' | 'notice', string]>;
|
|
23
|
+
export type LinksSummary = 'permission' | 'none' | 'reconnecting' | 'connecting' | 'linked';
|
|
24
|
+
export declare function linksSummary(links: NetworkLinks): LinksSummary;
|
|
25
|
+
export declare function linksLight(links: NetworkLinks): readonly ['neutral' | 'info' | 'positive' | 'notice', string];
|
|
26
|
+
export declare function exitValue(exit: NetworkExit | undefined): string;
|
|
27
|
+
export declare function parseExit(value: string): NetworkExit;
|
|
28
|
+
export declare function unlinkBody(device: LinkedDevice, isExit: boolean): string;
|
|
20
29
|
export declare const wholeWeb: ReadonlySet<NetworkRoute | null>;
|
|
21
30
|
export declare function routeLine(status: NetworkStatus): string;
|
|
22
31
|
export declare function networkLabel(status: NetworkStatus): string;
|
|
@@ -50,6 +59,9 @@ export declare class SliccNetwork extends ModelElement {
|
|
|
50
59
|
tailnetCopied: {
|
|
51
60
|
state: boolean;
|
|
52
61
|
};
|
|
62
|
+
linksError: {
|
|
63
|
+
state: boolean;
|
|
64
|
+
};
|
|
53
65
|
};
|
|
54
66
|
checking: boolean;
|
|
55
67
|
copied: boolean;
|
|
@@ -58,6 +70,7 @@ export declare class SliccNetwork extends ModelElement {
|
|
|
58
70
|
busy: string;
|
|
59
71
|
tailnetError: string;
|
|
60
72
|
tailnetCopied: string;
|
|
73
|
+
linksError: string;
|
|
61
74
|
constructor();
|
|
62
75
|
static styles: import("lit").CSSResult[];
|
|
63
76
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
@@ -2,7 +2,7 @@ import type { SliccModel } from '../model/types.js';
|
|
|
2
2
|
import { type BrowserScenario, DummyBrowser } from './browser.js';
|
|
3
3
|
import { type ChangesScenario } from './changes.js';
|
|
4
4
|
import { type MountScenario } from './files.js';
|
|
5
|
-
import { DummyNetwork, type NetworkScenario, type TailnetScenario } from './network.js';
|
|
5
|
+
import { DummyNetwork, type LinksScenario, type NetworkScenario, type TailnetScenario } from './network.js';
|
|
6
6
|
import { DummyNotices, type NoticeScenario } from './notices.js';
|
|
7
7
|
import { DummyTabs, type TabsScenario } from './tabs.js';
|
|
8
8
|
import { DummyUpdates, type PackageConfirm, type PackageScenario, type UpdateScenario } from './updates.js';
|
|
@@ -15,6 +15,7 @@ export interface DummyOptions {
|
|
|
15
15
|
mounts?: MountScenario | 'off';
|
|
16
16
|
network?: NetworkScenario | 'off';
|
|
17
17
|
tailnet?: TailnetScenario;
|
|
18
|
+
links?: LinksScenario;
|
|
18
19
|
changes?: ChangesScenario;
|
|
19
20
|
notices?: NoticeScenario | 'off';
|
|
20
21
|
tabs?: TabsScenario | 'off';
|
|
@@ -27,4 +28,4 @@ export interface DummyModel extends SliccModel {
|
|
|
27
28
|
notices?: DummyNotices;
|
|
28
29
|
tabs?: DummyTabs;
|
|
29
30
|
}
|
|
30
|
-
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, changes, notices, tabs, browser: scenario, }?: DummyOptions): DummyModel;
|
|
31
|
+
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, links, changes, notices, tabs, browser: scenario, }?: DummyOptions): DummyModel;
|
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
|
|
2
|
+
import type { NetworkExit, NetworkLinks, NetworkPort, NetworkStatus, TailnetStatus } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
4
|
export type NetworkScenario = 'ok' | 'limited' | 'failing';
|
|
5
5
|
export type TailnetScenario = 'off' | 'needs-login' | 'running' | 'failed';
|
|
6
|
+
export type LinksScenario = 'none' | 'preparing' | 'linked' | 'reconnecting' | 'exit' | 'prompt' | 'denied';
|
|
6
7
|
export declare function networkFixtures(scenario: NetworkScenario, now?: number): NetworkStatus;
|
|
7
8
|
export declare function tailnetFixtures(scenario: TailnetScenario): TailnetStatus;
|
|
9
|
+
export declare function joinUrl(rotation?: number): string;
|
|
10
|
+
export declare function linksFixtures(scenario: LinksScenario, rotation?: number): {
|
|
11
|
+
links: NetworkLinks;
|
|
12
|
+
exit: NetworkExit;
|
|
13
|
+
};
|
|
8
14
|
export declare class DummyNetwork extends Emitter<{
|
|
9
15
|
network: NetworkStatus;
|
|
10
16
|
}> implements NetworkPort {
|
|
11
17
|
#private;
|
|
12
18
|
scenario: NetworkScenario;
|
|
13
|
-
|
|
19
|
+
setExit?: (exit: NetworkExit) => Promise<void>;
|
|
20
|
+
unlink?: (id: string) => Promise<void>;
|
|
21
|
+
rotateJoinUrl?: () => Promise<void>;
|
|
22
|
+
retryLinks?: () => Promise<void>;
|
|
23
|
+
constructor(scenario: NetworkScenario, clock: Clock, tailnet?: TailnetScenario, links?: LinksScenario);
|
|
24
|
+
setLinks(scenario: LinksScenario): void;
|
|
14
25
|
status(): NetworkStatus;
|
|
15
26
|
setScenario(scenario: NetworkScenario): void;
|
|
16
27
|
check(): Promise<void>;
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { DummyMount, MountScenario } from './dummy/files.js';
|
|
|
6
6
|
export type { DummyModel, DummyOptions } from './dummy/index.js';
|
|
7
7
|
export { createDummyModel } from './dummy/index.js';
|
|
8
8
|
export type { NetworkScenario, TailnetScenario } from './dummy/network.js';
|
|
9
|
-
export { DummyNetwork, networkFixtures, tailnetFixtures } from './dummy/network.js';
|
|
9
|
+
export { DummyNetwork, joinUrl, linksFixtures, networkFixtures, tailnetFixtures, } from './dummy/network.js';
|
|
10
10
|
export type { NoticeScenario } from './dummy/notices.js';
|
|
11
11
|
export { DummyNotices, noticeFixtures } from './dummy/notices.js';
|
|
12
12
|
export type { TabsScenario } from './dummy/tabs.js';
|
|
@@ -610,7 +610,36 @@ export interface NetworkStatus {
|
|
|
610
610
|
extensionUrl?: string;
|
|
611
611
|
browser?: BrowserAutomation;
|
|
612
612
|
tailnet?: TailnetStatus;
|
|
613
|
+
links?: NetworkLinks;
|
|
614
|
+
exit?: NetworkExit;
|
|
613
615
|
}
|
|
616
|
+
export type LinkMode = 'local' | 'remote';
|
|
617
|
+
export type LinkOffer = 'net' | 'http' | 'ssh';
|
|
618
|
+
export type LinkState = 'connecting' | 'connected' | 'reconnecting';
|
|
619
|
+
export interface LinkedDevice {
|
|
620
|
+
id: string;
|
|
621
|
+
name: string;
|
|
622
|
+
host: string;
|
|
623
|
+
address: string;
|
|
624
|
+
mode: LinkMode;
|
|
625
|
+
offers: readonly LinkOffer[];
|
|
626
|
+
policy?: string;
|
|
627
|
+
exit: boolean;
|
|
628
|
+
state: LinkState;
|
|
629
|
+
}
|
|
630
|
+
export interface NetworkLinks {
|
|
631
|
+
joinUrl: string | null;
|
|
632
|
+
joinCommand: string | null;
|
|
633
|
+
devices: readonly LinkedDevice[];
|
|
634
|
+
permission?: 'prompt' | 'denied' | null;
|
|
635
|
+
}
|
|
636
|
+
export type NetworkExit = null | {
|
|
637
|
+
kind: 'tailnet';
|
|
638
|
+
node: string | 'auto';
|
|
639
|
+
} | {
|
|
640
|
+
kind: 'link';
|
|
641
|
+
id: string;
|
|
642
|
+
};
|
|
614
643
|
export type TailnetState = 'off' | 'loading' | 'needs-login' | 'starting' | 'running' | 'failed';
|
|
615
644
|
export interface TailnetExitNode {
|
|
616
645
|
id: string;
|
|
@@ -640,6 +669,10 @@ export interface NetworkPort extends Subscribable<{
|
|
|
640
669
|
setExitNode?(id: string | 'auto' | null): Promise<void>;
|
|
641
670
|
submitAuthKey?(key: string): Promise<void>;
|
|
642
671
|
logoutTailnet?(): Promise<void>;
|
|
672
|
+
setExit?(exit: NetworkExit): Promise<void>;
|
|
673
|
+
unlink?(id: string): Promise<void>;
|
|
674
|
+
rotateJoinUrl?(): Promise<void>;
|
|
675
|
+
retryLinks?(): Promise<void>;
|
|
643
676
|
}
|
|
644
677
|
export interface NoticeAction {
|
|
645
678
|
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.47.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",
|
|
@@ -72,9 +72,9 @@
|
|
|
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.
|
|
75
|
+
"@ai-ecoverse/slicc-kernel": "1.42.2",
|
|
76
76
|
"@ai-ecoverse/slicc-shared-web": "1.12.0",
|
|
77
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
77
|
+
"@ai-ecoverse/wasm-bash": "5.3.0-11",
|
|
78
78
|
"@ai-ecoverse/wasm-coreutils": "9.7.0-3",
|
|
79
79
|
"@biomejs/biome": "2.5.15",
|
|
80
80
|
"@fontsource/source-code-pro": "5.3.0",
|