sh3-core 0.10.5 → 0.11.2
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/dist/Shell.svelte +12 -31
- package/dist/__test__/reset.js +6 -0
- package/dist/actions/CommandPalette.svelte +68 -0
- package/dist/actions/CommandPalette.svelte.d.ts +11 -0
- package/dist/actions/ContextMenu.svelte +97 -0
- package/dist/actions/ContextMenu.svelte.d.ts +9 -0
- package/dist/actions/bindings-store.d.ts +8 -0
- package/dist/actions/bindings-store.js +27 -0
- package/dist/actions/bindings-store.test.d.ts +1 -0
- package/dist/actions/bindings-store.test.js +25 -0
- package/dist/actions/bindings.d.ts +4 -0
- package/dist/actions/bindings.js +17 -0
- package/dist/actions/bindings.test.d.ts +1 -0
- package/dist/actions/bindings.test.js +30 -0
- package/dist/actions/contextMenuModel.d.ts +16 -0
- package/dist/actions/contextMenuModel.js +71 -0
- package/dist/actions/contextMenuModel.test.d.ts +1 -0
- package/dist/actions/contextMenuModel.test.js +44 -0
- package/dist/actions/dispatcher.svelte.d.ts +34 -0
- package/dist/actions/dispatcher.svelte.js +117 -0
- package/dist/actions/dispatcher.test.d.ts +1 -0
- package/dist/actions/dispatcher.test.js +155 -0
- package/dist/actions/listeners.d.ts +11 -0
- package/dist/actions/listeners.js +180 -0
- package/dist/actions/listeners.test.d.ts +1 -0
- package/dist/actions/listeners.test.js +149 -0
- package/dist/actions/palette-scorer.d.ts +11 -0
- package/dist/actions/palette-scorer.js +49 -0
- package/dist/actions/palette-scorer.test.d.ts +1 -0
- package/dist/actions/palette-scorer.test.js +40 -0
- package/dist/actions/paletteModel.d.ts +4 -0
- package/dist/actions/paletteModel.js +40 -0
- package/dist/actions/paletteModel.test.d.ts +1 -0
- package/dist/actions/paletteModel.test.js +33 -0
- package/dist/actions/registry.d.ts +10 -0
- package/dist/actions/registry.js +36 -0
- package/dist/actions/registry.test.d.ts +1 -0
- package/dist/actions/registry.test.js +49 -0
- package/dist/actions/selection.svelte.d.ts +8 -0
- package/dist/actions/selection.svelte.js +44 -0
- package/dist/actions/selection.test.d.ts +1 -0
- package/dist/actions/selection.test.js +51 -0
- package/dist/actions/shardContext.test.d.ts +1 -0
- package/dist/actions/shardContext.test.js +41 -0
- package/dist/actions/shellActions.test.d.ts +1 -0
- package/dist/actions/shellActions.test.js +22 -0
- package/dist/actions/shortcuts.d.ts +5 -0
- package/dist/actions/shortcuts.js +87 -0
- package/dist/actions/shortcuts.test.d.ts +1 -0
- package/dist/actions/shortcuts.test.js +49 -0
- package/dist/actions/state.svelte.d.ts +16 -0
- package/dist/actions/state.svelte.js +76 -0
- package/dist/actions/state.test.d.ts +1 -0
- package/dist/actions/state.test.js +40 -0
- package/dist/actions/syncMountedViewIds.test.d.ts +1 -0
- package/dist/actions/syncMountedViewIds.test.js +97 -0
- package/dist/actions/types.d.ts +56 -0
- package/dist/actions/types.js +7 -0
- package/dist/api.d.ts +2 -2
- package/dist/api.js +1 -1
- package/dist/apps/lifecycle.js +13 -3
- package/dist/createShell.js +4 -1
- package/dist/host.js +6 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/layout/inspection.d.ts +11 -1
- package/dist/layout/inspection.js +13 -1
- package/dist/layout/ops-locate.test.d.ts +1 -0
- package/dist/layout/ops-locate.test.js +103 -0
- package/dist/layout/ops.d.ts +8 -0
- package/dist/layout/ops.js +27 -0
- package/dist/layout/slotHostPool.svelte.js +24 -0
- package/dist/layout/slotHostPool.test.js +14 -0
- package/dist/layout/types.d.ts +7 -0
- package/dist/overlays/FloatFrame.svelte +23 -11
- package/dist/overlays/ModalFrame.svelte +9 -1
- package/dist/overlays/ModalFrame.svelte.d.ts +1 -0
- package/dist/overlays/__test__/DummyFrame.svelte +6 -0
- package/dist/overlays/__test__/DummyFrame.svelte.d.ts +6 -0
- package/dist/overlays/float.d.ts +6 -0
- package/dist/overlays/float.js +24 -9
- package/dist/overlays/float.test.js +175 -0
- package/dist/overlays/floatDismiss.d.ts +8 -0
- package/dist/overlays/floatDismiss.js +68 -0
- package/dist/overlays/modal.js +5 -1
- package/dist/overlays/modal.test.d.ts +1 -0
- package/dist/overlays/modal.test.js +55 -0
- package/dist/overlays/popup.d.ts +2 -0
- package/dist/overlays/popup.js +24 -4
- package/dist/overlays/popup.test.d.ts +1 -0
- package/dist/overlays/popup.test.js +95 -0
- package/dist/overlays/types.d.ts +17 -1
- package/dist/primitives/Button.svelte +144 -0
- package/dist/primitives/Button.svelte.d.ts +18 -0
- package/dist/primitives/icon-context.d.ts +15 -0
- package/dist/primitives/icon-context.js +29 -0
- package/dist/sh3core-shard/sh3coreShard.svelte.js +50 -0
- package/dist/shards/activate.svelte.js +14 -0
- package/dist/shards/types.d.ts +19 -0
- package/dist/shards/types.js +5 -4
- package/dist/shell-shard/locateSlot.test.d.ts +1 -0
- package/dist/shell-shard/locateSlot.test.js +101 -0
- package/dist/shell-shard/shellShard.svelte.d.ts +7 -0
- package/dist/shell-shard/shellShard.svelte.js +34 -1
- package/dist/shellRuntime.svelte.d.ts +19 -0
- package/dist/shellRuntime.svelte.js +30 -0
- package/dist/tokens.css +11 -1
- package/dist/verbs/types.d.ts +9 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/apps/terminal/manifest.d.ts +0 -8
- package/dist/apps/terminal/manifest.js +0 -14
- package/dist/apps/terminal/terminal-app.d.ts +0 -7
- package/dist/apps/terminal/terminal-app.js +0 -14
|
@@ -6,6 +6,7 @@ import { type ToastManager } from './overlays/toast';
|
|
|
6
6
|
import { type FloatManager } from './overlays/float';
|
|
7
7
|
import { type PresetManager } from './overlays/presets';
|
|
8
8
|
import type { ConflictsApi } from './conflicts/api';
|
|
9
|
+
import { type OpenContextMenuOpts, type OpenPaletteOpts } from './actions/listeners';
|
|
9
10
|
/**
|
|
10
11
|
* The process-wide shell singleton exposed to shards and the shell's own
|
|
11
12
|
* internal code. Provides state zone creation and overlay managers.
|
|
@@ -31,6 +32,24 @@ export interface Shell {
|
|
|
31
32
|
presets: PresetManager;
|
|
32
33
|
/** Conflict manager view. Shell-owned modal for conflict arbitration. */
|
|
33
34
|
conflicts: ConflictsApi;
|
|
35
|
+
/** Actions facade — rebind keys, query bindings, open menus/palette. */
|
|
36
|
+
actions: ShellActionsApi;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* API for managing action bindings and triggering menus/palette
|
|
40
|
+
* programmatically (e.g. from a future settings UI shard).
|
|
41
|
+
*/
|
|
42
|
+
export interface ShellActionsApi {
|
|
43
|
+
/** Persist a custom shortcut for an action and refresh live state if the app is active. */
|
|
44
|
+
rebind(appId: string, actionId: string, shortcut: string | null): Promise<void>;
|
|
45
|
+
/** Remove a custom shortcut override and refresh live state if the app is active. */
|
|
46
|
+
resetBinding(appId: string, actionId: string): Promise<void>;
|
|
47
|
+
/** Return all non-null user bindings for an app as a plain string map. */
|
|
48
|
+
bindingsFor(appId: string): Promise<Record<string, string>>;
|
|
49
|
+
/** Open the context menu at the given screen coordinates. */
|
|
50
|
+
openContextMenu(opts: OpenContextMenuOpts): void;
|
|
51
|
+
/** Open the command palette, optionally pre-filled. */
|
|
52
|
+
openPalette(opts?: OpenPaletteOpts): void;
|
|
34
53
|
}
|
|
35
54
|
/** The process-wide shell instance. Framework-internal code uses this directly; shards receive a scoped view via `ShardContext`. */
|
|
36
55
|
export declare const shell: Shell;
|
|
@@ -21,6 +21,35 @@ import { toastManager } from './overlays/toast';
|
|
|
21
21
|
import { floatManager } from './overlays/float';
|
|
22
22
|
import { presetManager } from './overlays/presets';
|
|
23
23
|
import { conflictsApi } from './conflicts/shell-api';
|
|
24
|
+
import { loadUserBindings, saveUserBinding } from './actions/bindings-store';
|
|
25
|
+
import { openContextMenu as listenersOpenContextMenu, openPalette as listenersOpenPalette, } from './actions/listeners';
|
|
26
|
+
import { setUserBindings, getLiveDispatcherState } from './actions/state.svelte';
|
|
27
|
+
const shellActions = {
|
|
28
|
+
async rebind(appId, actionId, shortcut) {
|
|
29
|
+
await saveUserBinding(appId, actionId, shortcut);
|
|
30
|
+
const current = getLiveDispatcherState();
|
|
31
|
+
if (current.activeAppId === appId) {
|
|
32
|
+
setUserBindings(await loadUserBindings(appId));
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async resetBinding(appId, actionId) {
|
|
36
|
+
await saveUserBinding(appId, actionId, undefined);
|
|
37
|
+
const current = getLiveDispatcherState();
|
|
38
|
+
if (current.activeAppId === appId) {
|
|
39
|
+
setUserBindings(await loadUserBindings(appId));
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
async bindingsFor(appId) {
|
|
43
|
+
const raw = await loadUserBindings(appId);
|
|
44
|
+
const out = {};
|
|
45
|
+
for (const [id, v] of Object.entries(raw))
|
|
46
|
+
if (v !== null)
|
|
47
|
+
out[id] = v;
|
|
48
|
+
return out;
|
|
49
|
+
},
|
|
50
|
+
openContextMenu: listenersOpenContextMenu,
|
|
51
|
+
openPalette: listenersOpenPalette,
|
|
52
|
+
};
|
|
24
53
|
/** The process-wide shell instance. Framework-internal code uses this directly; shards receive a scoped view via `ShardContext`. */
|
|
25
54
|
export const shell = {
|
|
26
55
|
state: createStateZones,
|
|
@@ -30,4 +59,5 @@ export const shell = {
|
|
|
30
59
|
float: floatManager,
|
|
31
60
|
presets: presetManager,
|
|
32
61
|
conflicts: conflictsApi,
|
|
62
|
+
actions: shellActions,
|
|
33
63
|
};
|
package/dist/tokens.css
CHANGED
|
@@ -42,6 +42,16 @@
|
|
|
42
42
|
--shell-warning: #fbbf24;
|
|
43
43
|
--shell-success: #34d399;
|
|
44
44
|
|
|
45
|
+
/* Foreground pairings — the contrasting text/icon color for each
|
|
46
|
+
semantic surface. Used instead of --shell-fg when the background
|
|
47
|
+
is a saturated semantic color rather than --shell-bg. Theme
|
|
48
|
+
overrides that change the surface hue should also update its
|
|
49
|
+
paired foreground. */
|
|
50
|
+
--shell-fg-on-accent: #ffffff;
|
|
51
|
+
--shell-fg-on-error: #1a1b1e;
|
|
52
|
+
--shell-fg-on-warning: #1a1b1e;
|
|
53
|
+
--shell-fg-on-success: #1a1b1e;
|
|
54
|
+
|
|
45
55
|
/* Typography */
|
|
46
56
|
--shell-font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
47
57
|
--shell-font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
|
|
@@ -90,7 +100,7 @@ body {
|
|
|
90
100
|
margin: 0;
|
|
91
101
|
padding: 0;
|
|
92
102
|
height: 100%;
|
|
93
|
-
overflow: hidden;
|
|
103
|
+
overflow: hidden;
|
|
94
104
|
background: var(--shell-grad-bg, var(--shell-bg));
|
|
95
105
|
color: var(--shell-fg);
|
|
96
106
|
font-family: var(--shell-font-ui);
|
package/dist/verbs/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Scrollback } from '../shell-shard/scrollback.svelte';
|
|
2
2
|
import type { SessionClient } from '../shell-shard/session-client.svelte';
|
|
3
3
|
import type { TenantFsClient } from '../shell-shard/tenant-fs-client';
|
|
4
|
+
import type { TreeRootRef } from '../layout/types';
|
|
4
5
|
export interface ShellApi {
|
|
5
6
|
listApps(): Array<{
|
|
6
7
|
id: string;
|
|
@@ -48,6 +49,14 @@ export interface ShellApi {
|
|
|
48
49
|
viewId: string | null;
|
|
49
50
|
label: string;
|
|
50
51
|
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Where is this slot currently mounted? Returns `{ kind: 'docked' }`
|
|
54
|
+
* when the slot is anywhere in the active docked tree, or
|
|
55
|
+
* `{ kind: 'float', floatId }` when it lives inside a float's subtree.
|
|
56
|
+
* Returns `null` when the slot is not present in the active layout
|
|
57
|
+
* (stale id, post-unmount, or held-but-not-active app tree).
|
|
58
|
+
*/
|
|
59
|
+
locateSlot(slotId: string): TreeRootRef | null;
|
|
51
60
|
listZones(shardId?: string): Array<{
|
|
52
61
|
shardId: string;
|
|
53
62
|
zones: string[];
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated from package.json — do not edit manually. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.2";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Auto-generated from package.json — do not edit manually. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.2';
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal app manifest.
|
|
3
|
-
*
|
|
4
|
-
* Framework-shipped: registered in host.ts during bootstrap.
|
|
5
|
-
* Requires the `shell` shard which provides the `shell:terminal` view.
|
|
6
|
-
*/
|
|
7
|
-
import type { AppManifest } from '../../apps/types';
|
|
8
|
-
export declare const manifest: AppManifest;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terminal app manifest.
|
|
3
|
-
*
|
|
4
|
-
* Framework-shipped: registered in host.ts during bootstrap.
|
|
5
|
-
* Requires the `shell` shard which provides the `shell:terminal` view.
|
|
6
|
-
*/
|
|
7
|
-
import { VERSION } from '../../version';
|
|
8
|
-
export const manifest = {
|
|
9
|
-
id: 'terminal',
|
|
10
|
-
label: 'Terminal',
|
|
11
|
-
version: VERSION,
|
|
12
|
-
requiredShards: ['shell'],
|
|
13
|
-
layoutVersion: 1,
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Built-in Terminal app — mounts the `shell:terminal` view in a single slot.
|
|
3
|
-
*
|
|
4
|
-
* Framework-shipped: registered in host.ts during bootstrap.
|
|
5
|
-
*/
|
|
6
|
-
import { manifest } from './manifest';
|
|
7
|
-
export const terminalApp = {
|
|
8
|
-
manifest,
|
|
9
|
-
initialLayout: {
|
|
10
|
-
type: 'slot',
|
|
11
|
-
slotId: 'terminal.main',
|
|
12
|
-
viewId: 'shell:terminal',
|
|
13
|
-
},
|
|
14
|
-
};
|