@ai-ecoverse/slicc-spectrum 1.45.0 → 1.46.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 +3 -2
- package/dist/slicc-dummy.js +35 -1
- package/dist/slicc-dummy.js.map +4 -4
- package/dist/slicc-ui.js +109 -11
- package/dist/slicc-ui.js.map +4 -4
- package/dist/types/app/base.d.ts +1 -0
- package/dist/types/app/tabs.d.ts +17 -0
- package/dist/types/dummy/index.d.ts +4 -1
- package/dist/types/dummy/tabs.d.ts +15 -0
- package/dist/types/dummy.d.ts +2 -0
- package/dist/types/model/types.d.ts +14 -0
- package/package.json +4 -4
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TabSkew, TabsState } from '../model/types.js';
|
|
2
|
+
export interface TabsLight {
|
|
3
|
+
variant: 'neutral' | 'info' | 'notice';
|
|
4
|
+
text: string;
|
|
5
|
+
tooltip: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TabsBanner {
|
|
8
|
+
kind: 'skew' | 'stalled';
|
|
9
|
+
skew: TabSkew | null;
|
|
10
|
+
text: string;
|
|
11
|
+
reload: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const following = "SLICC runs in another tab. This tab shows it and sends your actions there.";
|
|
14
|
+
export declare const connecting = "Connecting to the tab running SLICC\u2026";
|
|
15
|
+
export declare const alone = "SLICC is open in another tab.";
|
|
16
|
+
export declare function tabsBanner(state: TabsState | undefined): TabsBanner | null;
|
|
17
|
+
export declare function tabsLight(state: TabsState | undefined): TabsLight | null;
|
|
@@ -4,6 +4,7 @@ import { type ChangesScenario } from './changes.js';
|
|
|
4
4
|
import { type MountScenario } from './files.js';
|
|
5
5
|
import { DummyNetwork, type NetworkScenario, type TailnetScenario } from './network.js';
|
|
6
6
|
import { DummyNotices, type NoticeScenario } from './notices.js';
|
|
7
|
+
import { DummyTabs, type TabsScenario } from './tabs.js';
|
|
7
8
|
import { DummyUpdates, type PackageConfirm, type PackageScenario, type UpdateScenario } from './updates.js';
|
|
8
9
|
export interface DummyOptions {
|
|
9
10
|
delay?: number;
|
|
@@ -16,6 +17,7 @@ export interface DummyOptions {
|
|
|
16
17
|
tailnet?: TailnetScenario;
|
|
17
18
|
changes?: ChangesScenario;
|
|
18
19
|
notices?: NoticeScenario | 'off';
|
|
20
|
+
tabs?: TabsScenario | 'off';
|
|
19
21
|
browser?: BrowserScenario;
|
|
20
22
|
}
|
|
21
23
|
export interface DummyModel extends SliccModel {
|
|
@@ -23,5 +25,6 @@ export interface DummyModel extends SliccModel {
|
|
|
23
25
|
updates: DummyUpdates;
|
|
24
26
|
network?: DummyNetwork;
|
|
25
27
|
notices?: DummyNotices;
|
|
28
|
+
tabs?: DummyTabs;
|
|
26
29
|
}
|
|
27
|
-
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, changes, notices, browser: scenario, }?: DummyOptions): DummyModel;
|
|
30
|
+
export declare function createDummyModel({ delay, storage, updates, packages, confirm, mounts, network, tailnet, changes, notices, tabs, browser: scenario, }?: DummyOptions): DummyModel;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Emitter } from '../model/emitter.js';
|
|
2
|
+
import type { TabsPort, TabsState } from '../model/types.js';
|
|
3
|
+
import type { Clock } from './clock.js';
|
|
4
|
+
export type TabsScenario = 'owner' | 'follower' | 'connecting' | 'stalled' | 'newer' | 'older' | 'alone';
|
|
5
|
+
export declare function tabsFixtures(scenario: TabsScenario): TabsState;
|
|
6
|
+
export declare class DummyTabs extends Emitter<{
|
|
7
|
+
tabs: TabsState;
|
|
8
|
+
}> implements TabsPort {
|
|
9
|
+
#private;
|
|
10
|
+
reloads: number;
|
|
11
|
+
constructor(scenario: TabsScenario, time: Clock);
|
|
12
|
+
state(): TabsState;
|
|
13
|
+
setScenario(scenario: TabsScenario): void;
|
|
14
|
+
reload(): void;
|
|
15
|
+
}
|
package/dist/types/dummy.d.ts
CHANGED
|
@@ -9,5 +9,7 @@ export type { NetworkScenario, TailnetScenario } from './dummy/network.js';
|
|
|
9
9
|
export { DummyNetwork, 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
|
+
export type { TabsScenario } from './dummy/tabs.js';
|
|
13
|
+
export { DummyTabs, tabsFixtures } from './dummy/tabs.js';
|
|
12
14
|
export type { DummyUpdatesOptions, PackageConfirm, PackageScenario, UpdateScenario, } from './dummy/updates.js';
|
|
13
15
|
export { DummyUpdates, packageFixtures, updateFixtures } from './dummy/updates.js';
|
|
@@ -659,6 +659,19 @@ export interface NoticesPort extends Subscribable<{
|
|
|
659
659
|
act(id: string, action: string): Promise<void>;
|
|
660
660
|
dismiss(id: string): void;
|
|
661
661
|
}
|
|
662
|
+
export type TabRole = 'owner' | 'follower' | 'connecting' | 'alone';
|
|
663
|
+
export type TabSkew = 'newer' | 'older';
|
|
664
|
+
export interface TabsState {
|
|
665
|
+
role: TabRole;
|
|
666
|
+
stalled: boolean;
|
|
667
|
+
skew: TabSkew | null;
|
|
668
|
+
}
|
|
669
|
+
export interface TabsPort extends Subscribable<{
|
|
670
|
+
tabs: TabsState;
|
|
671
|
+
}> {
|
|
672
|
+
state(): TabsState;
|
|
673
|
+
reload(): void;
|
|
674
|
+
}
|
|
662
675
|
export interface SliccModel {
|
|
663
676
|
agent: AgentPort;
|
|
664
677
|
files: FilePort;
|
|
@@ -673,4 +686,5 @@ export interface SliccModel {
|
|
|
673
686
|
network?: NetworkPort;
|
|
674
687
|
changes?: ChangesPort;
|
|
675
688
|
notices?: NoticesPort;
|
|
689
|
+
tabs?: TabsPort;
|
|
676
690
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-spectrum",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.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,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.
|
|
76
|
-
"@ai-ecoverse/slicc-shared-web": "1.
|
|
77
|
-
"@ai-ecoverse/wasm-bash": "5.3.0-
|
|
75
|
+
"@ai-ecoverse/slicc-kernel": "1.42.1",
|
|
76
|
+
"@ai-ecoverse/slicc-shared-web": "1.12.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",
|