sh3-core 0.15.3 → 0.16.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/dist/BrandSlot.svelte +9 -9
- package/dist/{Shell.svelte → Sh3.svelte} +65 -65
- package/dist/Sh3.svelte.d.ts +5 -0
- package/dist/__test__/render.js +1 -1
- package/dist/actions/ActionPanel.svelte +3 -3
- package/dist/actions/CommandPalette.svelte +2 -2
- package/dist/actions/MenuBar.svelte +1 -1
- package/dist/actions/MenuBar.test.js +1 -1
- package/dist/actions/MenuButton.svelte +3 -3
- package/dist/actions/dispatcher.svelte.js +1 -1
- package/dist/actions/listActive.js +1 -1
- package/dist/actions/listeners.js +6 -6
- package/dist/actions/selection.svelte.d.ts +2 -2
- package/dist/actions/selection.svelte.js +4 -4
- package/dist/actions/selection.test.js +1 -1
- package/dist/actions/{shellActions.test.js → sh3Actions.test.js} +14 -14
- package/dist/actions/state.svelte.d.ts +3 -3
- package/dist/actions/state.svelte.js +3 -3
- package/dist/actions/syncMountedViewIds.test.js +1 -1
- package/dist/actions/types.d.ts +1 -1
- package/dist/api.d.ts +5 -5
- package/dist/api.js +7 -7
- package/dist/app/admin/ApiKeysView.svelte +9 -9
- package/dist/app/admin/AuthSettingsView.svelte +6 -6
- package/dist/app/admin/SystemView.svelte +12 -12
- package/dist/app/admin/UsersView.svelte +8 -8
- package/dist/app/store/AppUpdateAvailableModal.svelte +14 -14
- package/dist/app/store/PermissionConfirmModal.svelte +20 -20
- package/dist/app/store/StoreView.svelte +51 -51
- package/dist/app/store/UninstallAppDialog.svelte +14 -14
- package/dist/app/store/storeShard.svelte.js +1 -1
- package/dist/app/store/verbs.js +1 -1
- package/dist/apps/lifecycle.d.ts +1 -1
- package/dist/apps/lifecycle.js +4 -4
- package/dist/apps/lifecycle.test.js +5 -5
- package/dist/apps/registry.svelte.d.ts +2 -2
- package/dist/apps/registry.svelte.js +3 -3
- package/dist/apps/types.d.ts +1 -1
- package/dist/auth/GuestBanner.svelte +19 -19
- package/dist/auth/SignInWall.svelte +17 -17
- package/dist/auth/auth.svelte.d.ts +1 -1
- package/dist/auth/auth.svelte.js +1 -1
- package/dist/boot/satellitePayload.js +1 -1
- package/dist/color/api.d.ts +1 -1
- package/dist/color/api.js +1 -1
- package/dist/color/{shell-api.js → sh3-api.js} +3 -3
- package/dist/conflicts/ConflictModal.svelte +1 -1
- package/dist/conflicts/ConflictModal.svelte.d.ts +1 -1
- package/dist/conflicts/DetailView.svelte +19 -19
- package/dist/conflicts/PromptView.svelte +9 -9
- package/dist/conflicts/adapter-documents.js +1 -1
- package/dist/conflicts/api.d.ts +1 -1
- package/dist/conflicts/api.js +2 -2
- package/dist/conflicts/renderer-registry.js +1 -1
- package/dist/conflicts/renderers/MetaOnlyRenderer.svelte +8 -8
- package/dist/conflicts/renderers/TextDiffRenderer.svelte +15 -15
- package/dist/conflicts/renderers/index.js +1 -1
- package/dist/conflicts/resolve-primitive.js +1 -1
- package/dist/conflicts/{shell-api.js → sh3-api.js} +2 -2
- package/dist/contributions/registry.js +1 -1
- package/dist/createShell.d.ts +2 -2
- package/dist/createShell.js +6 -6
- package/dist/host-entry.d.ts +1 -1
- package/dist/host-entry.js +2 -2
- package/dist/host.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/keys/ConsentDialog.svelte +15 -15
- package/dist/keys/consent.svelte.d.ts +2 -2
- package/dist/keys/consent.svelte.js +3 -3
- package/dist/keys/revocation-bus.svelte.d.ts +3 -3
- package/dist/keys/revocation-bus.svelte.js +3 -3
- package/dist/layout/DragPreview.svelte +9 -9
- package/dist/layout/LayoutRenderer.browser.test.js +2 -2
- package/dist/layout/LayoutRenderer.svelte +4 -4
- package/dist/layout/SlotContainer.svelte +12 -12
- package/dist/layout/SlotDropZone.svelte +2 -2
- package/dist/layout/inspection.d.ts +1 -1
- package/dist/layout/inspection.js +1 -1
- package/dist/layout/store.svelte.js +3 -3
- package/dist/layout/types.d.ts +1 -1
- package/dist/layouts-shard/LayoutSaveModal.svelte +20 -20
- package/dist/layouts-shard/LayoutsSection.svelte +11 -11
- package/dist/layouts-shard/filter.test.js +3 -3
- package/dist/layouts-shard/layoutsApi.test.js +3 -3
- package/dist/layouts-shard/layoutsShard.svelte.test.js +7 -7
- package/dist/migrations/mode-id-rename.js +2 -2
- package/dist/overlays/ConfirmDialog.svelte +8 -8
- package/dist/overlays/EntityAppearanceModal.svelte +19 -19
- package/dist/overlays/FloatFrame.svelte +20 -20
- package/dist/overlays/FloatLayer.svelte +1 -1
- package/dist/overlays/ModalFrame.svelte +5 -5
- package/dist/overlays/PopupFrame.svelte +4 -4
- package/dist/overlays/ToastItem.svelte +12 -12
- package/dist/overlays/float.d.ts +2 -2
- package/dist/overlays/float.js +3 -3
- package/dist/overlays/float.test.js +6 -6
- package/dist/overlays/modal.js +1 -1
- package/dist/overlays/modal.test.js +2 -2
- package/dist/overlays/parentHost.js +2 -2
- package/dist/overlays/parentHost.test.js +5 -5
- package/dist/overlays/popup.js +2 -2
- package/dist/overlays/popup.test.js +2 -2
- package/dist/overlays/roots.js +4 -4
- package/dist/overlays/toast.js +1 -1
- package/dist/overlays/types.js +3 -3
- package/dist/primitives/Button.svelte +16 -16
- package/dist/primitives/Collapsible.svelte +11 -11
- package/dist/primitives/ResizableSplitter.svelte +10 -10
- package/dist/primitives/TabbedPanel.svelte +19 -19
- package/dist/primitives/base.css +57 -57
- package/dist/primitives/widgets/ColorSwatch.svelte +15 -15
- package/dist/primitives/widgets/ColorSwatch.svelte.test.js +4 -4
- package/dist/primitives/widgets/Field.svelte +20 -20
- package/dist/primitives/widgets/FilePicker.svelte +13 -13
- package/dist/primitives/widgets/IconPicker.svelte +14 -14
- package/dist/primitives/widgets/IconToggleGroup.svelte +14 -14
- package/dist/primitives/widgets/NumberInput.svelte +17 -17
- package/dist/primitives/widgets/PickerList.svelte +17 -17
- package/dist/primitives/widgets/RangeSlider.svelte +16 -16
- package/dist/primitives/widgets/Segmented.svelte +16 -16
- package/dist/primitives/widgets/Select.svelte +14 -14
- package/dist/primitives/widgets/Select.svelte.test.js +2 -2
- package/dist/primitives/widgets/Slider.svelte +20 -20
- package/dist/primitives/widgets/SliderGroup.svelte +2 -2
- package/dist/primitives/widgets/Textarea.svelte +13 -13
- package/dist/primitives/widgets/_select-listbox.svelte +15 -15
- package/dist/projects/session-state.svelte.js +1 -1
- package/dist/projects-shard/DeleteProjectDialog.svelte +12 -12
- package/dist/projects-shard/ProjectManage.svelte +25 -25
- package/dist/projects-shard/ProjectsSection.svelte +12 -12
- package/dist/registry/installer.d.ts +2 -2
- package/dist/registry/installer.js +2 -2
- package/dist/registry/loader.js +1 -1
- package/dist/registry/permission-descriptions.js +2 -2
- package/dist/registry/permission-descriptions.test.js +1 -1
- package/dist/runtime/runVerb-shell.test.js +2 -2
- package/dist/runtime/runVerb.js +4 -4
- package/dist/runtime/runVerb.test.js +4 -4
- package/dist/satellite/SatelliteShell.svelte +2 -2
- package/dist/{shell → sh3}/views/KeysAndPeers.svelte +7 -7
- package/dist/sh3Api/headless.d.ts +4 -0
- package/dist/{shell-shard/shellApi.js → sh3Api/headless.js} +5 -5
- package/dist/{shell-shard/shellApi.svelte.test.js → sh3Api/headless.svelte.test.js} +11 -11
- package/dist/{shellApi → sh3Api}/window.js +2 -2
- package/dist/{shellApi → sh3Api}/window.test.js +1 -1
- package/dist/{shellRuntime.svelte.d.ts → sh3Runtime.svelte.d.ts} +22 -10
- package/dist/{shellRuntime.svelte.js → sh3Runtime.svelte.js} +12 -10
- package/dist/sh3Runtime.svelte.test.d.ts +1 -0
- package/dist/sh3Runtime.svelte.test.js +46 -0
- package/dist/sh3core-shard/AppInfoView.svelte +19 -19
- package/dist/sh3core-shard/{ShellHome.svelte → Sh3Home.svelte} +82 -82
- package/dist/sh3core-shard/Sh3Home.svelte.d.ts +3 -0
- package/dist/sh3core-shard/{ShellTitle.svelte → Sh3Title.svelte} +11 -11
- package/dist/sh3core-shard/Sh3Title.svelte.d.ts +3 -0
- package/dist/sh3core-shard/appActions.js +3 -3
- package/dist/sh3core-shard/sh3coreShard.svelte.js +7 -7
- package/dist/shards/activate.svelte.d.ts +1 -1
- package/dist/shards/activate.svelte.js +6 -6
- package/dist/shards/types.d.ts +5 -5
- package/dist/shards/types.js +2 -2
- package/dist/shell-shard/CommandLine.svelte +7 -7
- package/dist/shell-shard/InputLine.svelte +3 -3
- package/dist/shell-shard/ScrollbackView.svelte +2 -2
- package/dist/shell-shard/Terminal.svelte +5 -5
- package/dist/shell-shard/Terminal.svelte.d.ts +2 -2
- package/dist/shell-shard/dispatch-custom.test.js +2 -2
- package/dist/shell-shard/dispatch-gating.test.js +2 -2
- package/dist/shell-shard/dispatch-invoke.test.js +2 -2
- package/dist/shell-shard/dispatch-to-terminal.js +1 -1
- package/dist/shell-shard/dispatch.d.ts +2 -2
- package/dist/shell-shard/dispatch.js +2 -2
- package/dist/shell-shard/entries/PromptEntry.svelte +4 -4
- package/dist/shell-shard/entries/StatusEntry.svelte +4 -4
- package/dist/shell-shard/entries/TextEntry.svelte +3 -3
- package/dist/shell-shard/locateSlot.test.js +9 -9
- package/dist/shell-shard/manifest.js +2 -2
- package/dist/shell-shard/registry.d.ts +2 -2
- package/dist/shell-shard/rich/AppCard.svelte +1 -1
- package/dist/shell-shard/rich/AppsTable.svelte +1 -1
- package/dist/shell-shard/rich/HelpTable.svelte +1 -1
- package/dist/shell-shard/rich/HistoryList.svelte +1 -1
- package/dist/shell-shard/rich/ViewsTable.svelte +1 -1
- package/dist/shell-shard/rich/ZoneTree.svelte +2 -2
- package/dist/shell-shard/shellShard.svelte.d.ts +1 -1
- package/dist/shell-shard/shellShard.svelte.js +8 -8
- package/dist/shell-shard/terminal-dispatch.test.js +2 -2
- package/dist/shell-shard/toolbar/Toolbar.svelte +4 -4
- package/dist/shell-shard/toolbar/Toolbar.svelte.d.ts +2 -2
- package/dist/shell-shard/toolbar/slots/BusySlot.svelte +2 -2
- package/dist/shell-shard/toolbar/slots/FocusLockSlot.svelte +2 -2
- package/dist/shell-shard/toolbar/slots/ModeSlot.svelte +1 -1
- package/dist/shell-shard/toolbar/slots/TargetShardSlot.svelte +1 -1
- package/dist/shell-shard/toolbar/slots.d.ts +3 -3
- package/dist/shell-shard/verbs/apps.js +3 -3
- package/dist/shell-shard/verbs/help.js +1 -1
- package/dist/shell-shard/verbs/help.svelte.test.js +1 -1
- package/dist/shell-shard/verbs/history.js +1 -1
- package/dist/shell-shard/verbs/mode.js +2 -2
- package/dist/shell-shard/verbs/mode.test.js +2 -2
- package/dist/shell-shard/verbs/shards.js +1 -1
- package/dist/shell-shard/verbs/views.js +8 -8
- package/dist/shell-shard/verbs/zones.js +2 -2
- package/dist/state/zones.svelte.d.ts +2 -2
- package/dist/state/zones.svelte.js +4 -4
- package/dist/theme.d.ts +3 -3
- package/dist/theme.js +5 -5
- package/dist/tokens.css +68 -68
- package/dist/verbs/types.d.ts +5 -5
- package/dist/verbs/types.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Shell.svelte.d.ts +0 -5
- package/dist/sh3core-shard/ShellHome.svelte.d.ts +0 -3
- package/dist/sh3core-shard/ShellTitle.svelte.d.ts +0 -3
- package/dist/shell-shard/shellApi.d.ts +0 -4
- /package/dist/actions/{shellActions.test.d.ts → sh3Actions.test.d.ts} +0 -0
- /package/dist/color/{shell-api.d.ts → sh3-api.d.ts} +0 -0
- /package/dist/conflicts/{shell-api.d.ts → sh3-api.d.ts} +0 -0
- /package/dist/{shell → sh3}/views/KeysAndPeers.svelte.d.ts +0 -0
- /package/dist/{shell-shard/shellApi.svelte.test.d.ts → sh3Api/headless.svelte.test.d.ts} +0 -0
- /package/dist/{shellApi → sh3Api}/window.d.ts +0 -0
- /package/dist/{shellApi → sh3Api}/window.test.d.ts +0 -0
|
@@ -8,7 +8,7 @@ export const viewsVerb = {
|
|
|
8
8
|
programmatic: true,
|
|
9
9
|
async run(ctx, args) {
|
|
10
10
|
if (args.includes('--standalone')) {
|
|
11
|
-
const standalones = ctx.
|
|
11
|
+
const standalones = ctx.sh3.listStandaloneViews();
|
|
12
12
|
if (standalones.length === 0) {
|
|
13
13
|
ctx.scrollback.push({
|
|
14
14
|
kind: 'status',
|
|
@@ -28,7 +28,7 @@ export const viewsVerb = {
|
|
|
28
28
|
});
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
const views = ctx.
|
|
31
|
+
const views = ctx.sh3.listViewsInCurrentLayout();
|
|
32
32
|
ctx.scrollback.push({
|
|
33
33
|
kind: 'rich',
|
|
34
34
|
componentKey: VIEWS_TABLE_KEY,
|
|
@@ -38,7 +38,7 @@ export const viewsVerb = {
|
|
|
38
38
|
views,
|
|
39
39
|
onClose: (slotId) => {
|
|
40
40
|
var _a;
|
|
41
|
-
const result = ctx.
|
|
41
|
+
const result = ctx.sh3.closeSlot(slotId);
|
|
42
42
|
if (!result.ok) {
|
|
43
43
|
ctx.scrollback.push({
|
|
44
44
|
kind: 'status',
|
|
@@ -70,7 +70,7 @@ export const openVerb = {
|
|
|
70
70
|
});
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
const result = ctx.
|
|
73
|
+
const result = ctx.sh3.openViewInCurrentLayout(viewId);
|
|
74
74
|
if (!result.ok) {
|
|
75
75
|
ctx.scrollback.push({
|
|
76
76
|
kind: 'status',
|
|
@@ -105,7 +105,7 @@ export const popoutVerb = {
|
|
|
105
105
|
});
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
const result = ctx.
|
|
108
|
+
const result = ctx.sh3.popoutSlot(slotId);
|
|
109
109
|
if (!result.ok) {
|
|
110
110
|
ctx.scrollback.push({
|
|
111
111
|
kind: 'status',
|
|
@@ -132,7 +132,7 @@ export const dockVerb = {
|
|
|
132
132
|
var _a;
|
|
133
133
|
const floatId = args[0];
|
|
134
134
|
if (!floatId) {
|
|
135
|
-
const floats = ctx.
|
|
135
|
+
const floats = ctx.sh3.listFloats();
|
|
136
136
|
if (floats.length === 0) {
|
|
137
137
|
ctx.scrollback.push({
|
|
138
138
|
kind: 'status',
|
|
@@ -152,7 +152,7 @@ export const dockVerb = {
|
|
|
152
152
|
});
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
|
-
const result = ctx.
|
|
155
|
+
const result = ctx.sh3.dockFloat(floatId);
|
|
156
156
|
if (!result.ok) {
|
|
157
157
|
ctx.scrollback.push({
|
|
158
158
|
kind: 'status',
|
|
@@ -187,7 +187,7 @@ export const closeVerb = {
|
|
|
187
187
|
});
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
const result = ctx.
|
|
190
|
+
const result = ctx.sh3.closeSlot(slotId);
|
|
191
191
|
if (!result.ok) {
|
|
192
192
|
ctx.scrollback.push({
|
|
193
193
|
kind: 'status',
|
|
@@ -10,7 +10,7 @@ export const zonesVerb = {
|
|
|
10
10
|
summary: 'List zones for the current user (optionally scoped to a shard).',
|
|
11
11
|
programmatic: true,
|
|
12
12
|
async run(ctx, args) {
|
|
13
|
-
const rows = ctx.
|
|
13
|
+
const rows = ctx.sh3.listZones(args[0]);
|
|
14
14
|
ctx.scrollback.push({
|
|
15
15
|
kind: 'rich',
|
|
16
16
|
componentKey: ZONES_TABLE_KEY,
|
|
@@ -35,7 +35,7 @@ export const zoneVerb = {
|
|
|
35
35
|
});
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
const value = ctx.
|
|
38
|
+
const value = ctx.sh3.readZone(shardId, zoneName);
|
|
39
39
|
ctx.scrollback.push({
|
|
40
40
|
kind: 'rich',
|
|
41
41
|
componentKey: ZONE_TREE_KEY,
|
|
@@ -11,7 +11,7 @@ export type StateZones<T extends ZoneSchema> = {
|
|
|
11
11
|
[K in keyof T]: T[K];
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Create live reactive state zones for a shard (or the
|
|
14
|
+
* Create live reactive state zones for a shard (or the sh3 itself).
|
|
15
15
|
*
|
|
16
16
|
* Each zone declared in `schema` is backed by the appropriate store:
|
|
17
17
|
* `ephemeral` and `session` are in-memory; `workspace` and `user` are
|
|
@@ -35,7 +35,7 @@ export declare function __setBackend(zone: ZoneName, backend: Backend): void;
|
|
|
35
35
|
/**
|
|
36
36
|
* Read a raw persisted zone entry without creating a reactive proxy.
|
|
37
37
|
*
|
|
38
|
-
* Intended for framework-internal consumers (e.g. the
|
|
38
|
+
* Intended for framework-internal consumers (e.g. the sh3's layout
|
|
39
39
|
* persistence) that need to inspect a stored value before deciding
|
|
40
40
|
* whether to pass it to `createStateZones`. Not part of the shard-facing
|
|
41
41
|
* API — shards always go through `createStateZones` so hydration is
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* createStateZones — turns a declarative zone schema into live reactive
|
|
3
3
|
* per-zone objects backed by the right store for each zone.
|
|
4
4
|
*
|
|
5
|
-
* Usage (from a shard, or the
|
|
5
|
+
* Usage (from a shard, or the sh3 itself):
|
|
6
6
|
*
|
|
7
7
|
* const state = createStateZones('graphlive', {
|
|
8
8
|
* ephemeral: { hoveredId: null as string | null },
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*
|
|
26
26
|
* Lifetime management (tracking teardown on shard deactivation) arrives in
|
|
27
27
|
* phase 4 when the shard contract exists. For phase 3, roots live until the
|
|
28
|
-
* page unloads, which is fine for a single-session
|
|
28
|
+
* page unloads, which is fine for a single-session sh3.
|
|
29
29
|
*
|
|
30
30
|
* This file must be `.svelte.ts` so it can use the Svelte 5 runes
|
|
31
31
|
* `$state`, `$effect.root`, `$effect`, and `$state.snapshot` at module level.
|
|
@@ -54,7 +54,7 @@ function scheduleFlush(zone, shardId, value) {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* Create live reactive state zones for a shard (or the
|
|
57
|
+
* Create live reactive state zones for a shard (or the sh3 itself).
|
|
58
58
|
*
|
|
59
59
|
* Each zone declared in `schema` is backed by the appropriate store:
|
|
60
60
|
* `ephemeral` and `session` are in-memory; `workspace` and `user` are
|
|
@@ -119,7 +119,7 @@ export function __setBackend(zone, backend) {
|
|
|
119
119
|
/**
|
|
120
120
|
* Read a raw persisted zone entry without creating a reactive proxy.
|
|
121
121
|
*
|
|
122
|
-
* Intended for framework-internal consumers (e.g. the
|
|
122
|
+
* Intended for framework-internal consumers (e.g. the sh3's layout
|
|
123
123
|
* persistence) that need to inspect a stored value before deciding
|
|
124
124
|
* whether to pass it to `createStateZones`. Not part of the shard-facing
|
|
125
125
|
* API — shards always go through `createStateZones` so hydration is
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Apply CSS token overrides to :root and persist to User zone.
|
|
3
3
|
*
|
|
4
|
-
* Keys are token names without the `--` prefix (e.g. `'
|
|
4
|
+
* Keys are token names without the `--` prefix (e.g. `'sh3-accent'`).
|
|
5
5
|
* Values are any valid CSS value string.
|
|
6
6
|
*
|
|
7
7
|
* Calling this replaces ALL previous overrides — tokens not present in
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
export declare function setTokenOverrides(overrides: Record<string, string>): void;
|
|
11
11
|
/**
|
|
12
12
|
* Remove all token overrides from :root and clear persisted state.
|
|
13
|
-
* The
|
|
13
|
+
* The sh3 reverts to the default tokens defined in tokens.css.
|
|
14
14
|
*/
|
|
15
15
|
export declare function clearTokenOverrides(): void;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export declare function clearTokenOverrides(): void;
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function getTokenOverrides(): Record<string, string>;
|
|
21
21
|
/**
|
|
22
|
-
* Apply persisted token overrides to :root. Called once during
|
|
22
|
+
* Apply persisted token overrides to :root. Called once during sh3 boot
|
|
23
23
|
* before any component mounts, so the themed colors are visible from the
|
|
24
24
|
* first frame.
|
|
25
25
|
*
|
package/dist/theme.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Token override API — allows external packages (like sh3-style) to
|
|
3
|
-
* dynamically change
|
|
3
|
+
* dynamically change sh3 CSS tokens and persist the selection to
|
|
4
4
|
* the User zone.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The sh3 reads persisted overrides at boot (see createShell.ts) so
|
|
7
7
|
* themes survive page reloads. This module provides the write path.
|
|
8
8
|
*/
|
|
9
9
|
const STORAGE_KEY = 'sh3:user:__sh3core__:theme';
|
|
@@ -12,7 +12,7 @@ let appliedKeys = [];
|
|
|
12
12
|
/**
|
|
13
13
|
* Apply CSS token overrides to :root and persist to User zone.
|
|
14
14
|
*
|
|
15
|
-
* Keys are token names without the `--` prefix (e.g. `'
|
|
15
|
+
* Keys are token names without the `--` prefix (e.g. `'sh3-accent'`).
|
|
16
16
|
* Values are any valid CSS value string.
|
|
17
17
|
*
|
|
18
18
|
* Calling this replaces ALL previous overrides — tokens not present in
|
|
@@ -41,7 +41,7 @@ export function setTokenOverrides(overrides) {
|
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Remove all token overrides from :root and clear persisted state.
|
|
44
|
-
* The
|
|
44
|
+
* The sh3 reverts to the default tokens defined in tokens.css.
|
|
45
45
|
*/
|
|
46
46
|
export function clearTokenOverrides() {
|
|
47
47
|
for (const key of appliedKeys) {
|
|
@@ -75,7 +75,7 @@ export function getTokenOverrides() {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Apply persisted token overrides to :root. Called once during
|
|
78
|
+
* Apply persisted token overrides to :root. Called once during sh3 boot
|
|
79
79
|
* before any component mounts, so the themed colors are visible from the
|
|
80
80
|
* first frame.
|
|
81
81
|
*
|
package/dist/tokens.css
CHANGED
|
@@ -1,125 +1,125 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* SH3 design tokens and base reset.
|
|
3
3
|
*
|
|
4
|
-
* All
|
|
4
|
+
* All sh3-level CSS variables live here. Shards may read --sh3-* tokens
|
|
5
5
|
* but must not override them. Z-indices for the overlay layer stack are the
|
|
6
6
|
* ONLY place z-index is written in the codebase (per docs/design/layout.md).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
:root {
|
|
10
10
|
/* Surfaces */
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
11
|
+
--sh3-bg: #1a1b1e;
|
|
12
|
+
--sh3-bg-elevated: #22232a;
|
|
13
|
+
--sh3-bg-sunken: #141518;
|
|
14
14
|
|
|
15
15
|
/*
|
|
16
16
|
* Gradient layer — undefined by default. When set (e.g. by sh3-style),
|
|
17
17
|
* surfaces use the gradient instead of the flat color via the fallback
|
|
18
|
-
* pattern: background: var(--
|
|
18
|
+
* pattern: background: var(--sh3-grad-bg, var(--sh3-bg)).
|
|
19
19
|
* Do NOT declare these here — they must remain undefined for the
|
|
20
20
|
* CSS fallback to work.
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
--
|
|
24
|
-
--
|
|
23
|
+
--sh3-border: #2e3038;
|
|
24
|
+
--sh3-border-strong: #3c3f4a;
|
|
25
25
|
|
|
26
26
|
/* Text */
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
--
|
|
27
|
+
--sh3-fg: #e4e6eb;
|
|
28
|
+
--sh3-fg-muted: #9aa0aa;
|
|
29
|
+
--sh3-fg-subtle: #6b7280;
|
|
30
30
|
|
|
31
31
|
/* Accent */
|
|
32
|
-
--
|
|
33
|
-
--
|
|
32
|
+
--sh3-accent: #6ea8fe;
|
|
33
|
+
--sh3-accent-muted: #3a5580;
|
|
34
34
|
|
|
35
35
|
/* Inputs */
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--
|
|
36
|
+
--sh3-input-bg: var(--sh3-bg-sunken);
|
|
37
|
+
--sh3-input-border-focus: var(--sh3-accent);
|
|
38
|
+
--sh3-focus-ring: 0 0 0 2px color-mix(in srgb, var(--sh3-accent) 40%, transparent);
|
|
39
39
|
|
|
40
40
|
/* Semantic */
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
41
|
+
--sh3-error: #f87171;
|
|
42
|
+
--sh3-warning: #fbbf24;
|
|
43
|
+
--sh3-success: #34d399;
|
|
44
44
|
|
|
45
45
|
/* Foreground pairings — the contrasting text/icon color for each
|
|
46
|
-
semantic surface. Used instead of --
|
|
47
|
-
is a saturated semantic color rather than --
|
|
46
|
+
semantic surface. Used instead of --sh3-fg when the background
|
|
47
|
+
is a saturated semantic color rather than --sh3-bg. Theme
|
|
48
48
|
overrides that change the surface hue should also update its
|
|
49
49
|
paired foreground. */
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
50
|
+
--sh3-fg-on-accent: #ffffff;
|
|
51
|
+
--sh3-fg-on-error: #1a1b1e;
|
|
52
|
+
--sh3-fg-on-warning: #1a1b1e;
|
|
53
|
+
--sh3-fg-on-success: #1a1b1e;
|
|
54
54
|
|
|
55
55
|
/* Typography */
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
56
|
+
--sh3-font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
57
|
+
--sh3-font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
|
|
58
|
+
--sh3-font-size: 13px;
|
|
59
|
+
--sh3-line: 1.45;
|
|
60
60
|
|
|
61
61
|
/* Radius */
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
62
|
+
--sh3-radius-sm: 3px;
|
|
63
|
+
--sh3-radius: 4px;
|
|
64
|
+
--sh3-radius-md: 6px;
|
|
65
|
+
--sh3-radius-lg: 8px;
|
|
66
66
|
|
|
67
67
|
/* Spacing */
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
--
|
|
68
|
+
--sh3-pad-xs: 2px;
|
|
69
|
+
--sh3-pad-sm: 4px;
|
|
70
|
+
--sh3-pad-md: 8px;
|
|
71
|
+
--sh3-pad-lg: 12px;
|
|
72
72
|
|
|
73
73
|
/* Chrome metrics */
|
|
74
|
-
--
|
|
75
|
-
--
|
|
74
|
+
--sh3-tabbar-height: 32px;
|
|
75
|
+
--sh3-statusbar-height: 22px;
|
|
76
76
|
|
|
77
77
|
/*
|
|
78
78
|
* Overlay layer z-indices. See docs/design/layout.md — this is the single
|
|
79
79
|
* source of truth for the layer stack. No component outside the overlay
|
|
80
80
|
* layer managers is permitted to write a z-index.
|
|
81
81
|
*/
|
|
82
|
-
--
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
--
|
|
86
|
-
--
|
|
87
|
-
--
|
|
88
|
-
--
|
|
82
|
+
--sh3-z-layer-0: 0; /* docked layout (content area) */
|
|
83
|
+
--sh3-z-layer-1: 100; /* floating panels (deferred) */
|
|
84
|
+
--sh3-z-layer-2: 200; /* drag preview */
|
|
85
|
+
--sh3-z-layer-3: 300; /* popups, context menus */
|
|
86
|
+
--sh3-z-layer-4: 400; /* modals */
|
|
87
|
+
--sh3-z-layer-5: 500; /* toasts */
|
|
88
|
+
--sh3-z-layer-6: 600; /* command palette / AI input */
|
|
89
89
|
|
|
90
90
|
/* ── Widget tokens (ADR-022) ─────────────────────────────────────── */
|
|
91
91
|
|
|
92
92
|
/* Field metrics — fields, selects, number inputs share these */
|
|
93
|
-
--
|
|
94
|
-
--
|
|
95
|
-
--
|
|
93
|
+
--sh3-field-height-sm: 24px;
|
|
94
|
+
--sh3-field-height-md: 28px;
|
|
95
|
+
--sh3-field-pad-x: 10px;
|
|
96
96
|
|
|
97
97
|
/* Slider tracks */
|
|
98
|
-
--
|
|
99
|
-
--
|
|
100
|
-
--
|
|
98
|
+
--sh3-track-bg: var(--sh3-bg-sunken);
|
|
99
|
+
--sh3-track-border: var(--sh3-border);
|
|
100
|
+
--sh3-track-fill: var(--sh3-accent);
|
|
101
101
|
|
|
102
|
-
/* Slider thumbs — pinned to a fixed near-white instead of var(--
|
|
102
|
+
/* Slider thumbs — pinned to a fixed near-white instead of var(--sh3-fg)
|
|
103
103
|
so light themes don't render a dark thumb. Themes that want a different
|
|
104
|
-
thumb override --
|
|
105
|
-
--
|
|
106
|
-
--
|
|
107
|
-
--
|
|
104
|
+
thumb override --sh3-thumb-bg directly. */
|
|
105
|
+
--sh3-thumb-bg: #e4e6eb;
|
|
106
|
+
--sh3-thumb-border: var(--sh3-accent);
|
|
107
|
+
--sh3-thumb-shadow: var(--sh3-shadow-sm);
|
|
108
108
|
|
|
109
109
|
/* Slider ticks */
|
|
110
|
-
--
|
|
111
|
-
--
|
|
110
|
+
--sh3-tick-bg: var(--sh3-fg-subtle);
|
|
111
|
+
--sh3-tick-strong-bg: var(--sh3-border-strong);
|
|
112
112
|
|
|
113
113
|
/* Widget radii */
|
|
114
|
-
--
|
|
115
|
-
--
|
|
114
|
+
--sh3-widget-radius: var(--sh3-radius);
|
|
115
|
+
--sh3-widget-radius-pill: 999px;
|
|
116
116
|
|
|
117
117
|
/* Minimal shadow scale (1 token, just what thumbs need) */
|
|
118
|
-
--
|
|
118
|
+
--sh3-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
|
|
119
119
|
|
|
120
120
|
/* Minimal motion scale */
|
|
121
|
-
--
|
|
122
|
-
--
|
|
121
|
+
--sh3-motion-fast: 120ms;
|
|
122
|
+
--sh3-ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/* Base reset — intentionally minimal */
|
|
@@ -135,11 +135,11 @@ body {
|
|
|
135
135
|
padding: 0;
|
|
136
136
|
height: 100%;
|
|
137
137
|
overflow: hidden;
|
|
138
|
-
background: var(--
|
|
139
|
-
color: var(--
|
|
140
|
-
font-family: var(--
|
|
141
|
-
font-size: var(--
|
|
142
|
-
line-height: var(--
|
|
138
|
+
background: var(--sh3-grad-bg, var(--sh3-bg));
|
|
139
|
+
color: var(--sh3-fg);
|
|
140
|
+
font-family: var(--sh3-font-ui);
|
|
141
|
+
font-size: var(--sh3-font-size);
|
|
142
|
+
line-height: var(--sh3-line);
|
|
143
143
|
-webkit-font-smoothing: antialiased;
|
|
144
144
|
}
|
|
145
145
|
|
package/dist/verbs/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { SessionClient } from '../shell-shard/session-client.svelte';
|
|
|
3
3
|
import type { TenantFsClient } from '../shell-shard/tenant-fs-client';
|
|
4
4
|
import type { TreeRootRef } from '../layout/types';
|
|
5
5
|
import type { DispatchToTerminalResult } from '../shell-shard/dispatch-to-terminal';
|
|
6
|
-
export interface
|
|
6
|
+
export interface Sh3Api {
|
|
7
7
|
listApps(): Array<{
|
|
8
8
|
id: string;
|
|
9
9
|
label: string;
|
|
@@ -68,7 +68,7 @@ export interface ShellApi {
|
|
|
68
68
|
admin: boolean;
|
|
69
69
|
};
|
|
70
70
|
/**
|
|
71
|
-
* Switch the active
|
|
71
|
+
* Switch the active sh3 mode. The mode must be registered and visible
|
|
72
72
|
* to the current role. Returns true on success, false on unknown or
|
|
73
73
|
* role-restricted id (so verbs can surface a status).
|
|
74
74
|
*/
|
|
@@ -79,7 +79,7 @@ export interface ShellApi {
|
|
|
79
79
|
label: string;
|
|
80
80
|
}[];
|
|
81
81
|
/**
|
|
82
|
-
* Active
|
|
82
|
+
* Active sh3 mode. Returns `{ id: 'sh3', label: 'sh3' }` from headless
|
|
83
83
|
* contexts (no terminal view mounted) so callers can rely on a stable
|
|
84
84
|
* shape — Terminal.svelte overrides this with the live mode.
|
|
85
85
|
*/
|
|
@@ -103,7 +103,7 @@ export interface ShellApi {
|
|
|
103
103
|
}
|
|
104
104
|
export type { DispatchToTerminalResult } from '../shell-shard/dispatch-to-terminal';
|
|
105
105
|
export interface VerbContext {
|
|
106
|
-
|
|
106
|
+
sh3: Sh3Api;
|
|
107
107
|
scrollback: Scrollback;
|
|
108
108
|
session: SessionClient;
|
|
109
109
|
cwd: string;
|
|
@@ -158,7 +158,7 @@ export interface Verb {
|
|
|
158
158
|
name: string;
|
|
159
159
|
summary: string;
|
|
160
160
|
/**
|
|
161
|
-
* When true, this verb resolves in every
|
|
161
|
+
* When true, this verb resolves in every sh3 mode — including bash and
|
|
162
162
|
* external shards' custom modes. Defaults to false: sh3-domain verbs only
|
|
163
163
|
* resolve when `mode.id === 'sh3'`. Reserve this flag for verbs whose
|
|
164
164
|
* action is mode-agnostic (e.g. `clear` clears the local scrollback,
|
package/dist/verbs/types.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Verb types — framework-level contribution kind.
|
|
3
3
|
*
|
|
4
4
|
* Shared between the framework verb registry (shards/registry.ts) and
|
|
5
|
-
* shell-shard's resolution logic (shell-shard/registry.ts).
|
|
5
|
+
* shell-shard's resolution logic (shell-shard/registry.ts). Sh3Api
|
|
6
6
|
* stays in shell-shard — it's the Terminal's bridge to host actions.
|
|
7
7
|
*/
|
|
8
8
|
export {};
|
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.16.0";
|
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.16.0';
|
package/package.json
CHANGED
package/dist/Shell.svelte.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|