@ai-ecoverse/slicc-spectrum 1.43.1 → 1.45.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 +4 -4
- package/dist/slicc-dummy.js +238 -99
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-ui.js +4955 -4086
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/browser.d.ts +26 -2
- package/dist/types/app/network.d.ts +1 -1
- package/dist/types/app/reach.d.ts +15 -0
- package/dist/types/dummy/browser.d.ts +16 -3
- package/dist/types/dummy/index.d.ts +4 -1
- package/dist/types/dummy.d.ts +2 -0
- package/dist/types/model/types.d.ts +28 -0
- package/package.json +3 -3
|
@@ -1,14 +1,37 @@
|
|
|
1
|
+
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
1
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/close-button/swc-close-button.js';
|
|
5
|
+
import '@adobe/spectrum-wc/components/illustrated-message/swc-illustrated-message.js';
|
|
4
6
|
import '@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js';
|
|
5
7
|
import '@adobe/spectrum-wc/components/status-light/swc-status-light.js';
|
|
8
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
9
|
+
import '@adobe/spectrum-wc-icons/swc-icon-camera.js';
|
|
10
|
+
import '@adobe/spectrum-wc-icons/swc-icon-chevron-down.js';
|
|
11
|
+
import '@adobe/spectrum-wc-icons/swc-icon-chevron-left.js';
|
|
12
|
+
import '@adobe/spectrum-wc-icons/swc-icon-close.js';
|
|
13
|
+
import '@adobe/spectrum-wc-icons/swc-icon-code.js';
|
|
14
|
+
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
15
|
+
import '@adobe/spectrum-wc-icons/swc-icon-cursor-click.js';
|
|
16
|
+
import '@adobe/spectrum-wc-icons/swc-icon-globe-grid.js';
|
|
17
|
+
import '@adobe/spectrum-wc-icons/swc-icon-keyboard.js';
|
|
18
|
+
import '@adobe/spectrum-wc-icons/swc-icon-link.js';
|
|
19
|
+
import '@adobe/spectrum-wc-icons/swc-icon-open-in.js';
|
|
20
|
+
import '@adobe/spectrum-wc-icons/swc-icon-refresh.js';
|
|
21
|
+
import '@adobe/spectrum-wc-icons/swc-icon-text.js';
|
|
22
|
+
import '@adobe/spectrum-wc-icons/swc-icon-undo.js';
|
|
23
|
+
import '@adobe/spectrum-wc-icons/swc-icon-visibility.js';
|
|
24
|
+
import '@adobe/spectrum-wc-icons/swc-icon-web-page.js';
|
|
6
25
|
import { type TemplateResult } from 'lit';
|
|
7
|
-
import type { SliccModel } from '../model/types.js';
|
|
26
|
+
import type { BrowserAction, SliccModel } from '../model/types.js';
|
|
8
27
|
import { ModelElement } from './base.js';
|
|
9
28
|
export declare function normalize(input: string): string;
|
|
10
29
|
export declare function host(url: string): string;
|
|
30
|
+
export declare function place(url: string): string;
|
|
31
|
+
export declare function since(at: number, now?: number): string;
|
|
32
|
+
export declare function describe(action: BrowserAction): string;
|
|
11
33
|
export declare const refresh = 10000;
|
|
34
|
+
export declare const fresh = 3000;
|
|
12
35
|
export declare class SliccBrowser extends ModelElement {
|
|
13
36
|
#private;
|
|
14
37
|
static properties: {
|
|
@@ -21,8 +44,9 @@ export declare class SliccBrowser extends ModelElement {
|
|
|
21
44
|
};
|
|
22
45
|
address: string;
|
|
23
46
|
constructor();
|
|
24
|
-
static styles: import("lit").CSSResult;
|
|
47
|
+
static styles: import("lit").CSSResult[];
|
|
25
48
|
protected subscribe(model: SliccModel): Array<() => void>;
|
|
26
49
|
focus(): void;
|
|
50
|
+
protected updated(): void;
|
|
27
51
|
render(): TemplateResult;
|
|
28
52
|
}
|
|
@@ -10,7 +10,7 @@ import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
|
10
10
|
import { type TemplateResult } from 'lit';
|
|
11
11
|
import type { BrowserAutomation, NetworkRoute, NetworkStatus, SliccModel, TailnetState, TailnetStatus } from '../model/types.js';
|
|
12
12
|
import { ModelElement } from './base.js';
|
|
13
|
-
export
|
|
13
|
+
export { command } from './reach.js';
|
|
14
14
|
export declare const networkHealth: Record<NetworkStatus['health'], readonly ['positive' | 'notice' | 'negative', string]>;
|
|
15
15
|
export declare const automation: Record<NonNullable<BrowserAutomation['via']> | 'none', string>;
|
|
16
16
|
export declare function automationOf(browser: BrowserAutomation): keyof typeof automation;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@adobe/spectrum-wc/components/action-button/swc-action-button.js';
|
|
2
|
+
import '@adobe/spectrum-wc-icons/swc-icon-alert-triangle.js';
|
|
3
|
+
import '@adobe/spectrum-wc-icons/swc-icon-copy.js';
|
|
4
|
+
import { type TemplateResult } from 'lit';
|
|
5
|
+
export declare const command = "npx @ai-ecoverse/slicc-node";
|
|
6
|
+
export declare const reachStyles: import("lit").CSSResult;
|
|
7
|
+
export interface Reach {
|
|
8
|
+
intro: string;
|
|
9
|
+
extensionUrl?: string;
|
|
10
|
+
copied: boolean;
|
|
11
|
+
uncopied: boolean;
|
|
12
|
+
copy: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function reach({ intro, extensionUrl, copied, uncopied, copy }: Reach): TemplateResult;
|
|
15
|
+
export declare function copyText(text: string): Promise<boolean>;
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { Emitter } from '../model/emitter.js';
|
|
2
|
-
import type { BrowserEvents, BrowserPort, BrowserTab } from '../model/types.js';
|
|
2
|
+
import type { BrowserAction, BrowserEvents, BrowserPort, BrowserTab } from '../model/types.js';
|
|
3
3
|
import type { Clock } from './clock.js';
|
|
4
|
-
export
|
|
4
|
+
export type BrowserScenario = 'idle' | 'driving' | 'off';
|
|
5
|
+
export type ActionDraft = Omit<BrowserAction, 'id' | 'at' | 'status'> & Partial<Pick<BrowserAction, 'status' | 'at'>>;
|
|
6
|
+
export declare function page(tab: BrowserTab, mark?: number): string;
|
|
7
|
+
export declare function browserHistory(scenario: BrowserScenario, now?: number): ActionDraft[];
|
|
8
|
+
export declare const drive: readonly ActionDraft[];
|
|
5
9
|
export declare class DummyBrowser extends Emitter<BrowserEvents> implements BrowserPort {
|
|
6
10
|
#private;
|
|
7
|
-
constructor(tabs: readonly BrowserTab[], clock: Clock
|
|
11
|
+
constructor(tabs: readonly BrowserTab[], clock: Clock, { history, controlled, }?: {
|
|
12
|
+
history?: readonly ActionDraft[];
|
|
13
|
+
controlled?: readonly string[];
|
|
14
|
+
});
|
|
8
15
|
list(): readonly BrowserTab[];
|
|
9
16
|
active(): string | null;
|
|
17
|
+
actions(tabId?: string): readonly BrowserAction[];
|
|
18
|
+
record(draft: ActionDraft): string;
|
|
19
|
+
finish(id: string, error?: string): void;
|
|
20
|
+
run(script: readonly ActionDraft[]): Promise<void>;
|
|
21
|
+
release(agentId: string): void;
|
|
22
|
+
watch(tabId: string): () => void;
|
|
10
23
|
activate(id: string): void;
|
|
11
24
|
open(url: string, agentId?: string | null): BrowserTab;
|
|
12
25
|
navigate(id: string, url: string): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SliccModel } from '../model/types.js';
|
|
2
|
+
import { type BrowserScenario, DummyBrowser } from './browser.js';
|
|
2
3
|
import { type ChangesScenario } from './changes.js';
|
|
3
4
|
import { type MountScenario } from './files.js';
|
|
4
5
|
import { DummyNetwork, type NetworkScenario, type TailnetScenario } from './network.js';
|
|
@@ -15,10 +16,12 @@ export interface DummyOptions {
|
|
|
15
16
|
tailnet?: TailnetScenario;
|
|
16
17
|
changes?: ChangesScenario;
|
|
17
18
|
notices?: NoticeScenario | 'off';
|
|
19
|
+
browser?: BrowserScenario;
|
|
18
20
|
}
|
|
19
21
|
export interface DummyModel extends SliccModel {
|
|
22
|
+
browser: DummyBrowser;
|
|
20
23
|
updates: DummyUpdates;
|
|
21
24
|
network?: DummyNetwork;
|
|
22
25
|
notices?: DummyNotices;
|
|
23
26
|
}
|
|
24
|
-
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, changes, notices, }?: DummyOptions): DummyModel;
|
|
27
|
+
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, changes, notices, browser: scenario, }?: DummyOptions): DummyModel;
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { ActionDraft, BrowserScenario } from './dummy/browser.js';
|
|
2
|
+
export { browserHistory, DummyBrowser, page } from './dummy/browser.js';
|
|
1
3
|
export type { ChangesScenario } from './dummy/changes.js';
|
|
2
4
|
export { DummyChanges } from './dummy/changes.js';
|
|
3
5
|
export type { DummyMount, MountScenario } from './dummy/files.js';
|
|
@@ -337,10 +337,32 @@ export interface BrowserTab {
|
|
|
337
337
|
url: string;
|
|
338
338
|
status: TabStatus;
|
|
339
339
|
agentId: string | null;
|
|
340
|
+
controlled?: boolean;
|
|
341
|
+
favicon?: string;
|
|
342
|
+
}
|
|
343
|
+
export type BrowserActionKind = 'open' | 'goto' | 'back' | 'reload' | 'close' | 'select' | 'snapshot' | 'screenshot' | 'eval' | 'click' | 'fill' | 'type' | 'press' | 'scroll' | 'request';
|
|
344
|
+
export interface BrowserAction {
|
|
345
|
+
id: string;
|
|
346
|
+
tabId: string | null;
|
|
347
|
+
agentId: string | null;
|
|
348
|
+
kind: BrowserActionKind;
|
|
349
|
+
target?: string;
|
|
350
|
+
value?: string;
|
|
351
|
+
length?: number;
|
|
352
|
+
status: 'running' | 'done' | 'failed';
|
|
353
|
+
error?: string;
|
|
354
|
+
at: number;
|
|
355
|
+
}
|
|
356
|
+
export interface BrowserFrame {
|
|
357
|
+
tabId: string;
|
|
358
|
+
src: string;
|
|
359
|
+
at: number;
|
|
340
360
|
}
|
|
341
361
|
export interface BrowserEvents {
|
|
342
362
|
tabs: readonly BrowserTab[];
|
|
343
363
|
active: string | null;
|
|
364
|
+
action?: BrowserAction;
|
|
365
|
+
frame?: BrowserFrame;
|
|
344
366
|
}
|
|
345
367
|
export interface BrowserPort extends Subscribable<BrowserEvents> {
|
|
346
368
|
list(): readonly BrowserTab[];
|
|
@@ -350,6 +372,11 @@ export interface BrowserPort extends Subscribable<BrowserEvents> {
|
|
|
350
372
|
navigate(id: string, url: string): void;
|
|
351
373
|
close(id: string): void;
|
|
352
374
|
screenshot(id: string): Promise<string>;
|
|
375
|
+
actions?(tabId?: string): readonly BrowserAction[];
|
|
376
|
+
watch?(tabId: string, size?: {
|
|
377
|
+
width: number;
|
|
378
|
+
height: number;
|
|
379
|
+
}): () => void;
|
|
353
380
|
}
|
|
354
381
|
export type ColorScheme = 'light' | 'dark' | 'system';
|
|
355
382
|
export type Thinking = 'off' | 'low' | 'medium' | 'high';
|
|
@@ -539,6 +566,7 @@ export interface PackageItem {
|
|
|
539
566
|
description: string;
|
|
540
567
|
commands: readonly string[];
|
|
541
568
|
requires?: readonly string[];
|
|
569
|
+
notes?: readonly string[];
|
|
542
570
|
state: PackageState;
|
|
543
571
|
version: string | null;
|
|
544
572
|
offered: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-spectrum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.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.41.0",
|
|
76
76
|
"@ai-ecoverse/slicc-shared-web": "1.11.0",
|
|
77
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
77
|
+
"@ai-ecoverse/wasm-bash": "5.3.0-10",
|
|
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",
|