sh3-core 0.15.4 → 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} +11 -11
- package/dist/{shellRuntime.svelte.js → sh3Runtime.svelte.js} +10 -10
- package/dist/{shellRuntime.svelte.test.js → sh3Runtime.svelte.test.js} +10 -10
- 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
- /package/dist/{shellRuntime.svelte.test.d.ts → sh3Runtime.svelte.test.d.ts} +0 -0
package/dist/BrandSlot.svelte
CHANGED
|
@@ -90,30 +90,30 @@
|
|
|
90
90
|
}
|
|
91
91
|
.sh3-brand {
|
|
92
92
|
font-weight: 600;
|
|
93
|
-
color: var(--
|
|
93
|
+
color: var(--sh3-accent);
|
|
94
94
|
letter-spacing: 0.5px;
|
|
95
95
|
}
|
|
96
96
|
.sh3-brand-app {
|
|
97
|
-
color: var(--
|
|
97
|
+
color: var(--sh3-fg);
|
|
98
98
|
}
|
|
99
99
|
.sh3-brand-project {
|
|
100
|
-
color: var(--
|
|
100
|
+
color: var(--sh3-fg);
|
|
101
101
|
}
|
|
102
102
|
.sh3-brand-sep {
|
|
103
|
-
color: var(--
|
|
103
|
+
color: var(--sh3-fg-muted);
|
|
104
104
|
margin: 0 4px;
|
|
105
105
|
}
|
|
106
106
|
.sh3-brand-crumb {
|
|
107
107
|
background: transparent;
|
|
108
108
|
border: 0;
|
|
109
|
-
color: var(--
|
|
109
|
+
color: var(--sh3-fg);
|
|
110
110
|
font: inherit;
|
|
111
111
|
cursor: pointer;
|
|
112
112
|
padding: 2px 6px;
|
|
113
|
-
border-radius: var(--
|
|
113
|
+
border-radius: var(--sh3-radius-sm, 3px);
|
|
114
114
|
}
|
|
115
115
|
.sh3-brand-crumb:hover {
|
|
116
|
-
background: var(--
|
|
116
|
+
background: var(--sh3-bg-elevated);
|
|
117
117
|
}
|
|
118
118
|
.sh3-brand-clickable {
|
|
119
119
|
background: transparent;
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
font: inherit;
|
|
122
122
|
cursor: pointer;
|
|
123
123
|
padding: 2px 6px;
|
|
124
|
-
border-radius: var(--
|
|
124
|
+
border-radius: var(--sh3-radius-sm, 3px);
|
|
125
125
|
}
|
|
126
126
|
.sh3-brand-clickable:hover {
|
|
127
|
-
background: var(--
|
|
127
|
+
background: var(--sh3-bg-elevated);
|
|
128
128
|
}
|
|
129
129
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
/*
|
|
3
|
-
* <
|
|
3
|
+
* <Sh3> — top-level chrome component.
|
|
4
4
|
*
|
|
5
5
|
* Owns the tab bar, status bar, docked content area (layer 0), and the
|
|
6
6
|
* six overlay roots (layers 1-6). This is a stub implementation for
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
];
|
|
52
52
|
|
|
53
53
|
// Populated by bind:this during render; registered with the overlay
|
|
54
|
-
// module via $effect after mount so layer managers (
|
|
55
|
-
//
|
|
54
|
+
// module via $effect after mount so layer managers (sh3.modal,
|
|
55
|
+
// sh3.popup, sh3.toast) can find their target DOM roots.
|
|
56
56
|
const overlayRoots: Partial<Record<OverlayLayer, HTMLDivElement>> = $state({});
|
|
57
57
|
|
|
58
58
|
$effect(() => {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
// Open the server-sent events stream for key revocations.
|
|
87
87
|
// Forwards server-side revocations to the local revocation bus so that
|
|
88
88
|
// onKeyRevoked fires on the owning shard even when the user revokes from
|
|
89
|
-
// the Keys & Peers
|
|
89
|
+
// the Keys & Peers sh3 view (not via the shard's own ctx.keys.revoke).
|
|
90
90
|
//
|
|
91
91
|
// Gated on isAuthenticated() because /api/keys/events requires a tenant
|
|
92
92
|
// (via tenantRequired middleware) — opening it as a guest produces a 401
|
|
@@ -99,33 +99,33 @@
|
|
|
99
99
|
});
|
|
100
100
|
</script>
|
|
101
101
|
|
|
102
|
-
<div class="
|
|
103
|
-
<header class="
|
|
102
|
+
<div class="sh3">
|
|
103
|
+
<header class="sh3-tabbar" data-sh3-region="tabbar">
|
|
104
104
|
<button
|
|
105
105
|
type="button"
|
|
106
|
-
class="
|
|
106
|
+
class="sh3-tabbar-home-button"
|
|
107
107
|
onclick={() => returnToHome()}
|
|
108
108
|
disabled={onHome}
|
|
109
109
|
title="Home"
|
|
110
110
|
>
|
|
111
|
-
<svg class="
|
|
111
|
+
<svg class="sh3-tabbar-home-icon" aria-hidden="true">
|
|
112
112
|
<use href="{iconsUrl}#house" />
|
|
113
113
|
</svg>
|
|
114
114
|
</button>
|
|
115
115
|
<BrandSlot />
|
|
116
116
|
<MenuBar />
|
|
117
117
|
{#if authenticated && user}
|
|
118
|
-
<div class="
|
|
119
|
-
<span class="
|
|
120
|
-
<span class="
|
|
118
|
+
<div class="sh3-tabbar-user">
|
|
119
|
+
<span class="sh3-tabbar-user-name">{user.displayName}</span>
|
|
120
|
+
<span class="sh3-tabbar-tag">{elevated ? 'admin' : 'user'}</span>
|
|
121
121
|
{#if !isLocalOwner()}
|
|
122
122
|
<button
|
|
123
123
|
type="button"
|
|
124
|
-
class="
|
|
124
|
+
class="sh3-tabbar-signout"
|
|
125
125
|
onclick={() => logout()}
|
|
126
126
|
title="Sign out"
|
|
127
127
|
>
|
|
128
|
-
<svg class="
|
|
128
|
+
<svg class="sh3-tabbar-signout-icon" aria-hidden="true">
|
|
129
129
|
<use href="{iconsUrl}#log-out" />
|
|
130
130
|
</svg>
|
|
131
131
|
</button>
|
|
@@ -136,26 +136,26 @@
|
|
|
136
136
|
|
|
137
137
|
<GuestBanner />
|
|
138
138
|
|
|
139
|
-
<main class="
|
|
139
|
+
<main class="sh3-content" data-sh3-region="content" data-sh3-layer="0">
|
|
140
140
|
<LayoutRenderer />
|
|
141
141
|
</main>
|
|
142
142
|
|
|
143
|
-
<footer class="
|
|
144
|
-
<!-- alpha tag moved to
|
|
143
|
+
<footer class="sh3-statusbar" data-sh3-region="statusbar">
|
|
144
|
+
<!-- alpha tag moved to Sh3Home title row -->
|
|
145
145
|
</footer>
|
|
146
146
|
|
|
147
147
|
<!--
|
|
148
|
-
Overlay roots. Each is absolutely positioned over the entire
|
|
148
|
+
Overlay roots. Each is absolutely positioned over the entire sh3 with
|
|
149
149
|
pointer-events: none by default; layer managers enable pointer events on
|
|
150
150
|
the specific surfaces they portal in.
|
|
151
151
|
-->
|
|
152
|
-
<div class="
|
|
152
|
+
<div class="sh3-overlays" aria-hidden="true">
|
|
153
153
|
{#each overlayLayers as { layer, name } (layer)}
|
|
154
154
|
<div
|
|
155
|
-
class="
|
|
156
|
-
data-
|
|
157
|
-
data-
|
|
158
|
-
style="z-index: var(--
|
|
155
|
+
class="sh3-overlay-root"
|
|
156
|
+
data-sh3-overlay={name}
|
|
157
|
+
data-sh3-layer={layer}
|
|
158
|
+
style="z-index: var(--sh3-z-layer-{layer});"
|
|
159
159
|
bind:this={overlayRoots[name]}
|
|
160
160
|
>
|
|
161
161
|
{#if name === 'floating'}
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
</div>
|
|
169
169
|
|
|
170
170
|
<!--
|
|
171
|
-
|
|
171
|
+
Sh3-owned consent dialog for ctx.keys.mint().
|
|
172
172
|
Mounted unconditionally so the listener is always registered; it renders
|
|
173
173
|
nothing until a shard calls ctx.keys.mint().
|
|
174
174
|
z-index 9999 (inline in the component) keeps it above all overlay layers.
|
|
@@ -177,58 +177,58 @@
|
|
|
177
177
|
</div>
|
|
178
178
|
|
|
179
179
|
<style>
|
|
180
|
-
.
|
|
180
|
+
.sh3 {
|
|
181
181
|
display: grid;
|
|
182
|
-
grid-template-rows: var(--
|
|
182
|
+
grid-template-rows: var(--sh3-tabbar-height) auto 1fr var(--sh3-statusbar-height);
|
|
183
183
|
height: 100%;
|
|
184
184
|
width: 100%;
|
|
185
185
|
position: relative;
|
|
186
|
-
background: var(--
|
|
187
|
-
color: var(--
|
|
186
|
+
background: var(--sh3-grad-bg, var(--sh3-bg));
|
|
187
|
+
color: var(--sh3-fg);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
.
|
|
190
|
+
.sh3-tabbar {
|
|
191
191
|
display: grid;
|
|
192
192
|
grid-template-columns: auto auto 1fr auto;
|
|
193
193
|
align-items: center;
|
|
194
|
-
gap: var(--
|
|
195
|
-
padding: 0 var(--
|
|
196
|
-
background: var(--
|
|
197
|
-
border-bottom: 1px solid var(--
|
|
194
|
+
gap: var(--sh3-pad-md);
|
|
195
|
+
padding: 0 var(--sh3-pad-md);
|
|
196
|
+
background: var(--sh3-grad-bg-elevated, var(--sh3-bg-elevated));
|
|
197
|
+
border-bottom: 1px solid var(--sh3-border);
|
|
198
198
|
user-select: none;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
.
|
|
201
|
+
.sh3-content {
|
|
202
202
|
position: relative;
|
|
203
203
|
overflow: hidden;
|
|
204
|
-
background: var(--
|
|
204
|
+
background: var(--sh3-grad-bg, var(--sh3-bg));
|
|
205
205
|
min-width: 0;
|
|
206
206
|
min-height: 0;
|
|
207
207
|
}
|
|
208
|
-
.
|
|
208
|
+
.sh3-statusbar {
|
|
209
209
|
display: flex;
|
|
210
210
|
align-items: center;
|
|
211
211
|
justify-content: space-between;
|
|
212
|
-
padding: 0 var(--
|
|
213
|
-
background: var(--
|
|
214
|
-
border-top: 1px solid var(--
|
|
215
|
-
color: var(--
|
|
212
|
+
padding: 0 var(--sh3-pad-md);
|
|
213
|
+
background: var(--sh3-grad-bg-sunken, var(--sh3-bg-sunken));
|
|
214
|
+
border-top: 1px solid var(--sh3-border);
|
|
215
|
+
color: var(--sh3-fg-muted);
|
|
216
216
|
font-size: 11px;
|
|
217
217
|
user-select: none;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.
|
|
220
|
+
.sh3-overlays {
|
|
221
221
|
position: absolute;
|
|
222
222
|
inset: 0;
|
|
223
223
|
pointer-events: none;
|
|
224
224
|
}
|
|
225
|
-
.
|
|
225
|
+
.sh3-overlay-root {
|
|
226
226
|
position: absolute;
|
|
227
227
|
inset: 0;
|
|
228
228
|
pointer-events: none;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.
|
|
231
|
+
.sh3-tabbar-home-button {
|
|
232
232
|
display: flex;
|
|
233
233
|
align-items: center;
|
|
234
234
|
justify-content: center;
|
|
@@ -236,43 +236,43 @@
|
|
|
236
236
|
height: 24px;
|
|
237
237
|
padding: 0;
|
|
238
238
|
background: transparent;
|
|
239
|
-
color: var(--
|
|
240
|
-
border: 1px solid var(--
|
|
239
|
+
color: var(--sh3-fg-muted);
|
|
240
|
+
border: 1px solid var(--sh3-border);
|
|
241
241
|
}
|
|
242
|
-
.
|
|
243
|
-
color: var(--
|
|
244
|
-
border-color: var(--
|
|
242
|
+
.sh3-tabbar-home-button:hover:not(:disabled) {
|
|
243
|
+
color: var(--sh3-fg);
|
|
244
|
+
border-color: var(--sh3-fg-muted);
|
|
245
245
|
}
|
|
246
|
-
.
|
|
247
|
-
color: var(--
|
|
248
|
-
border-color: var(--
|
|
246
|
+
.sh3-tabbar-home-button:disabled {
|
|
247
|
+
color: var(--sh3-fg-subtle);
|
|
248
|
+
border-color: var(--sh3-border);
|
|
249
249
|
cursor: default;
|
|
250
250
|
}
|
|
251
|
-
.
|
|
251
|
+
.sh3-tabbar-home-icon {
|
|
252
252
|
width: 14px;
|
|
253
253
|
height: 14px;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.
|
|
256
|
+
.sh3-tabbar-user {
|
|
257
257
|
display: flex;
|
|
258
258
|
align-items: center;
|
|
259
259
|
gap: 6px;
|
|
260
260
|
}
|
|
261
|
-
.
|
|
261
|
+
.sh3-tabbar-user-name {
|
|
262
262
|
font-size: 12px;
|
|
263
|
-
color: var(--
|
|
263
|
+
color: var(--sh3-fg-subtle);
|
|
264
264
|
}
|
|
265
|
-
.
|
|
265
|
+
.sh3-tabbar-tag {
|
|
266
266
|
font-size: 9px;
|
|
267
267
|
font-weight: 700;
|
|
268
268
|
text-transform: uppercase;
|
|
269
269
|
letter-spacing: 0.08em;
|
|
270
|
-
color: var(--
|
|
271
|
-
background: var(--
|
|
270
|
+
color: var(--sh3-fg-on-accent);
|
|
271
|
+
background: var(--sh3-accent);
|
|
272
272
|
padding: 1px 6px;
|
|
273
|
-
border-radius: var(--
|
|
273
|
+
border-radius: var(--sh3-radius-md);
|
|
274
274
|
}
|
|
275
|
-
.
|
|
275
|
+
.sh3-tabbar-signout {
|
|
276
276
|
display: flex;
|
|
277
277
|
align-items: center;
|
|
278
278
|
justify-content: center;
|
|
@@ -280,14 +280,14 @@
|
|
|
280
280
|
height: 24px;
|
|
281
281
|
padding: 0;
|
|
282
282
|
background: transparent;
|
|
283
|
-
color: var(--
|
|
284
|
-
border: 1px solid var(--
|
|
283
|
+
color: var(--sh3-fg-muted);
|
|
284
|
+
border: 1px solid var(--sh3-border);
|
|
285
285
|
}
|
|
286
|
-
.
|
|
287
|
-
color: var(--
|
|
288
|
-
border-color: var(--
|
|
286
|
+
.sh3-tabbar-signout:hover {
|
|
287
|
+
color: var(--sh3-fg);
|
|
288
|
+
border-color: var(--sh3-fg-muted);
|
|
289
289
|
}
|
|
290
|
-
.
|
|
290
|
+
.sh3-tabbar-signout-icon {
|
|
291
291
|
width: 14px;
|
|
292
292
|
height: 14px;
|
|
293
293
|
}
|
package/dist/__test__/render.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { render } from '@testing-library/svelte';
|
|
3
3
|
export function renderWithShell(ComponentToRender, props = {}) {
|
|
4
4
|
const host = document.createElement('div');
|
|
5
|
-
host.classList.add('sh3-
|
|
5
|
+
host.classList.add('sh3-sh3-host');
|
|
6
6
|
host.style.position = 'relative';
|
|
7
7
|
host.style.width = '1024px';
|
|
8
8
|
host.style.height = '768px';
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
<style>
|
|
113
113
|
.sh3-context-menu {
|
|
114
114
|
min-width: 220px;
|
|
115
|
-
background: var(--
|
|
116
|
-
color: var(--
|
|
115
|
+
background: var(--sh3-bg-elevated, #222);
|
|
116
|
+
color: var(--sh3-fg, #eee);
|
|
117
117
|
border-radius: 4px;
|
|
118
118
|
padding: 4px 0;
|
|
119
119
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
cursor: default;
|
|
133
133
|
font: inherit;
|
|
134
134
|
}
|
|
135
|
-
.sh3-ctx-active { background: var(--
|
|
135
|
+
.sh3-ctx-active { background: var(--sh3-accent, #6ea8fe); color: var(--sh3-fg,#e4e6eb); }
|
|
136
136
|
.sh3-ctx-disabled { opacity: 0.45; }
|
|
137
137
|
.sh3-ctx-disabled.sh3-ctx-active { background: transparent; }
|
|
138
138
|
.sh3-ctx-check { display: inline-block; width: 12px; text-align: center; opacity: 0.85; }
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
</div>
|
|
58
58
|
|
|
59
59
|
<style>
|
|
60
|
-
.sh3-palette { min-width: 480px; max-width: 640px; background: var(--
|
|
60
|
+
.sh3-palette { min-width: 480px; max-width: 640px; background: var(--sh3-bg-elevated, #22232a); color: var(--sh3-fg, #e4e6eb); border-radius: var(--sh3-radius-md, 6px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
|
|
61
61
|
.sh3-palette-input { width: 100%; padding: 10px; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); color: inherit; font: inherit; outline: none; }
|
|
62
62
|
.sh3-palette-list { max-height: 320px; overflow-y: auto; padding: 4px 0; }
|
|
63
63
|
.sh3-palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px 12px; background: none; border: 0; color: inherit; text-align: left; font: inherit; cursor: default; }
|
|
64
|
-
.sh3-palette-active { background: var(--
|
|
64
|
+
.sh3-palette-active { background: var(--sh3-accent, #4a5); border-radius: 0; color: #fff; }
|
|
65
65
|
.sh3-palette-label { flex: 1; }
|
|
66
66
|
.sh3-palette-badge { opacity: .5; font-size: .85em; }
|
|
67
67
|
.sh3-palette-shortcut { opacity: .6; font-size: .9em; }
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<!--
|
|
41
41
|
Always render the wrapper so it reliably occupies its 1fr grid cell
|
|
42
|
-
in the
|
|
42
|
+
in the sh3 tabbar (and pushes user chrome to the rightmost column).
|
|
43
43
|
Empty when no app is active or no container has visible items.
|
|
44
44
|
-->
|
|
45
45
|
<div class="sh3-menubar" role="menubar">
|
|
@@ -49,7 +49,7 @@ describe('MenuBar', () => {
|
|
|
49
49
|
it('renders an empty menubar when no app is active', async () => {
|
|
50
50
|
cmp = mount(MenuBar, { target: host, props: {} });
|
|
51
51
|
await tick();
|
|
52
|
-
// The wrapper always renders (it occupies a grid cell in the
|
|
52
|
+
// The wrapper always renders (it occupies a grid cell in the sh3
|
|
53
53
|
// tabbar so user chrome stays anchored right). When no app is active
|
|
54
54
|
// it's just empty.
|
|
55
55
|
const bar = host.querySelector('.sh3-menubar');
|
|
@@ -133,16 +133,16 @@
|
|
|
133
133
|
display: inline-flex;
|
|
134
134
|
align-items: center;
|
|
135
135
|
gap: 6px;
|
|
136
|
-
padding: 0 var(--
|
|
136
|
+
padding: 0 var(--sh3-pad-md);
|
|
137
137
|
height: 100%;
|
|
138
138
|
background: transparent;
|
|
139
|
-
color: var(--
|
|
139
|
+
color: var(--sh3-fg);
|
|
140
140
|
border: 0;
|
|
141
141
|
font: inherit;
|
|
142
142
|
cursor: default;
|
|
143
143
|
}
|
|
144
144
|
.sh3-menubar-button:hover {
|
|
145
|
-
background: var(--
|
|
145
|
+
background: var(--sh3-bg-elevated);
|
|
146
146
|
}
|
|
147
147
|
.sh3-menubar-icon {
|
|
148
148
|
width: 14px;
|
|
@@ -81,7 +81,7 @@ function isTextInput(target) {
|
|
|
81
81
|
* to the global dispatcher. Plain typing (letters, Shift+letters, Tab,
|
|
82
82
|
* Escape, Enter, etc.) still goes to the input. Marked via
|
|
83
83
|
* `data-sh3-passthrough-modifiers` on the input or any ancestor; used by
|
|
84
|
-
* command-style inputs (e.g. the
|
|
84
|
+
* command-style inputs (e.g. the sh3 terminal) so the user can hit
|
|
85
85
|
* Ctrl+K mid-line and still get the palette.
|
|
86
86
|
*/
|
|
87
87
|
function isModifierPassthroughTarget(target) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* with an `active` flag indicating whether dispatching it right now would
|
|
6
6
|
* actually run. `listActiveFromEntries` is a filter on top of it: the active
|
|
7
7
|
* subset, in tier-innermost-first order, structurally compatible with the
|
|
8
|
-
* `ActiveActionDescriptor[]` shape consumed by `
|
|
8
|
+
* `ActiveActionDescriptor[]` shape consumed by `sh3.actions.listActive()`.
|
|
9
9
|
*/
|
|
10
10
|
import { TIER_ORDER, } from './dispatcher.svelte';
|
|
11
11
|
import { effectiveShortcutWithSource } from './bindings';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Document-level listener wiring for actions. Single keydown and single
|
|
3
|
-
* contextmenu listener, attached at
|
|
4
|
-
*
|
|
3
|
+
* contextmenu listener, attached at sh3 boot (Task 18) and removed on
|
|
4
|
+
* sh3 teardown.
|
|
5
5
|
*/
|
|
6
6
|
import { mount } from 'svelte';
|
|
7
7
|
import { listActions } from './registry';
|
|
@@ -17,7 +17,7 @@ import CommandPalette from './CommandPalette.svelte';
|
|
|
17
17
|
import { buildPaletteCandidates } from './paletteModel';
|
|
18
18
|
import { parseScopeString } from './scope-helpers';
|
|
19
19
|
import { isScopeActive } from './dispatcher.svelte';
|
|
20
|
-
import {
|
|
20
|
+
import { sh3 } from '../sh3Runtime.svelte';
|
|
21
21
|
let attached = false;
|
|
22
22
|
function viewIdOfEl(el) {
|
|
23
23
|
var _a;
|
|
@@ -192,7 +192,7 @@ function onContextMenu(ev) {
|
|
|
192
192
|
if (model.tiers.length === 0)
|
|
193
193
|
return;
|
|
194
194
|
ev.preventDefault();
|
|
195
|
-
const handle =
|
|
195
|
+
const handle = sh3.popup.show(ContextMenu, { anchor: { x: ev.clientX, y: ev.clientY } }, {
|
|
196
196
|
model,
|
|
197
197
|
onInvoke: (id) => {
|
|
198
198
|
var _a, _b;
|
|
@@ -264,7 +264,7 @@ export function openContextMenu(opts) {
|
|
|
264
264
|
const model = buildContextMenuModel(entries, state, anchor);
|
|
265
265
|
if (model.tiers.length === 0)
|
|
266
266
|
return;
|
|
267
|
-
const handle =
|
|
267
|
+
const handle = sh3.popup.show(ContextMenu, { anchor: { x: opts.x, y: opts.y } }, {
|
|
268
268
|
model,
|
|
269
269
|
onInvoke: (id) => {
|
|
270
270
|
var _a, _b;
|
|
@@ -310,7 +310,7 @@ export function openPalette(opts) {
|
|
|
310
310
|
const previousFocus = typeof document !== 'undefined' && document.activeElement instanceof HTMLElement
|
|
311
311
|
? document.activeElement
|
|
312
312
|
: null;
|
|
313
|
-
const handle =
|
|
313
|
+
const handle = sh3.modal.open(CommandPalette, {
|
|
314
314
|
candidates,
|
|
315
315
|
recency,
|
|
316
316
|
prefill: (_a = opts === null || opts === void 0 ? void 0 : opts.prefill) !== null && _a !== void 0 ? _a : '',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Selection, SelectionApi } from './types';
|
|
2
2
|
export declare function getSelection(): Selection | null;
|
|
3
3
|
export declare function makeSelectionApi(shardId: string): SelectionApi;
|
|
4
|
-
/** Called by the
|
|
4
|
+
/** Called by the sh3 on shard deactivate and app switch. */
|
|
5
5
|
export declare function clearSelectionForShard(shardId: string): void;
|
|
6
|
-
/** Called by the
|
|
6
|
+
/** Called by the sh3 on app switch (unconditional). */
|
|
7
7
|
export declare function clearSelectionUnconditional(): void;
|
|
8
8
|
export declare function __resetSelectionForTest(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
2
|
+
* Sh3-level single-selection state. One selection at a time, reactive.
|
|
3
3
|
* Shards obtain a per-shard SelectionApi via makeSelectionApi(shardId)
|
|
4
|
-
* that stamps ownerShardId on set and checks owner on clear.
|
|
4
|
+
* that stamps ownerShardId on set and checks owner on clear. Sh3-level
|
|
5
5
|
* clearSelectionForShard is used when a shard deactivates or an app
|
|
6
6
|
* switches — it only clears if the owner matches, so two-shard
|
|
7
7
|
* interleavings don't accidentally wipe each other.
|
|
@@ -29,13 +29,13 @@ export function makeSelectionApi(shardId) {
|
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
/** Called by the
|
|
32
|
+
/** Called by the sh3 on shard deactivate and app switch. */
|
|
33
33
|
export function clearSelectionForShard(shardId) {
|
|
34
34
|
if (current && current.ownerShardId === shardId) {
|
|
35
35
|
current = null;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
/** Called by the
|
|
38
|
+
/** Called by the sh3 on app switch (unconditional). */
|
|
39
39
|
export function clearSelectionUnconditional() {
|
|
40
40
|
current = null;
|
|
41
41
|
}
|
|
@@ -29,7 +29,7 @@ describe('selection', () => {
|
|
|
29
29
|
expect(warn).toHaveBeenCalled();
|
|
30
30
|
warn.mockRestore();
|
|
31
31
|
});
|
|
32
|
-
it('
|
|
32
|
+
it('sh3-level clearSelectionForShard always works', () => {
|
|
33
33
|
const api = makeSelectionApi('shard.a');
|
|
34
34
|
api.set({ type: 'orb', ref: 42 });
|
|
35
35
|
clearSelectionForShard('shard.a');
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import { sh3 } from '../sh3Runtime.svelte';
|
|
3
3
|
import { __setBindingsZone } from './bindings-store';
|
|
4
4
|
import { __resetDispatcherStateForTest, setActiveApp } from './state.svelte';
|
|
5
5
|
import { registerAction, __resetActionsRegistryForTest } from './registry';
|
|
6
|
-
describe('
|
|
6
|
+
describe('sh3.actions facade', () => {
|
|
7
7
|
beforeEach(() => {
|
|
8
8
|
__setBindingsZone({ bindings: {} });
|
|
9
9
|
__resetDispatcherStateForTest();
|
|
10
10
|
setActiveApp('app.a', new Set(['shard.x']));
|
|
11
11
|
});
|
|
12
12
|
it('rebind persists and updates live state', async () => {
|
|
13
|
-
await
|
|
14
|
-
const now = await
|
|
13
|
+
await sh3.actions.rebind('app.a', 'shard.x.save', 'Ctrl+Alt+S');
|
|
14
|
+
const now = await sh3.actions.bindingsFor('app.a');
|
|
15
15
|
expect(now['shard.x.save']).toBe('Ctrl+Alt+S');
|
|
16
16
|
});
|
|
17
17
|
it('resetBinding removes the override', async () => {
|
|
18
|
-
await
|
|
19
|
-
await
|
|
20
|
-
const now = await
|
|
18
|
+
await sh3.actions.rebind('app.a', 'shard.x.save', 'Ctrl+Alt+S');
|
|
19
|
+
await sh3.actions.resetBinding('app.a', 'shard.x.save');
|
|
20
|
+
const now = await sh3.actions.bindingsFor('app.a');
|
|
21
21
|
expect(now['shard.x.save']).toBeUndefined();
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
|
-
describe('
|
|
24
|
+
describe('sh3.actions.listActive', () => {
|
|
25
25
|
beforeEach(() => {
|
|
26
26
|
__resetActionsRegistryForTest();
|
|
27
27
|
__resetDispatcherStateForTest();
|
|
@@ -31,7 +31,7 @@ describe('shell.actions.listActive', () => {
|
|
|
31
31
|
id: 'home.hello', label: 'Hello', scope: 'home',
|
|
32
32
|
defaultShortcut: 'Mod+H', run: () => { },
|
|
33
33
|
}, 'shard.test');
|
|
34
|
-
const snap =
|
|
34
|
+
const snap = sh3.actions.listActive();
|
|
35
35
|
expect(snap.map((d) => d.id)).toContain('home.hello');
|
|
36
36
|
dispose();
|
|
37
37
|
});
|
|
@@ -39,27 +39,27 @@ describe('shell.actions.listActive', () => {
|
|
|
39
39
|
registerAction({
|
|
40
40
|
id: 'home.a', label: 'A', scope: 'home', run: () => { },
|
|
41
41
|
}, 'shard.test');
|
|
42
|
-
const a =
|
|
43
|
-
const b =
|
|
42
|
+
const a = sh3.actions.listActive();
|
|
43
|
+
const b = sh3.actions.listActive();
|
|
44
44
|
expect(a).not.toBe(b);
|
|
45
45
|
expect(a.map((d) => d.id)).toEqual(b.map((d) => d.id));
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
-
describe('
|
|
48
|
+
describe('sh3.actions.onActiveChange', () => {
|
|
49
49
|
beforeEach(() => {
|
|
50
50
|
__resetActionsRegistryForTest();
|
|
51
51
|
__resetDispatcherStateForTest();
|
|
52
52
|
});
|
|
53
53
|
it('fires on dispatcher state change', () => {
|
|
54
54
|
let n = 0;
|
|
55
|
-
const off =
|
|
55
|
+
const off = sh3.actions.onActiveChange(() => { n++; });
|
|
56
56
|
setActiveApp('a', new Set());
|
|
57
57
|
expect(n).toBe(1);
|
|
58
58
|
off();
|
|
59
59
|
});
|
|
60
60
|
it('fires when an action is registered or unregistered', () => {
|
|
61
61
|
let n = 0;
|
|
62
|
-
const off =
|
|
62
|
+
const off = sh3.actions.onActiveChange(() => { n++; });
|
|
63
63
|
const dispose = registerAction({
|
|
64
64
|
id: 't', label: 'T', scope: 'home', run: () => { },
|
|
65
65
|
}, 'shard.test');
|
|
@@ -2,12 +2,12 @@ import type { DispatcherState } from './dispatcher.svelte';
|
|
|
2
2
|
/**
|
|
3
3
|
* Subscribe to any change that could affect the set of currently-active
|
|
4
4
|
* actions or their resolved shortcuts (app/view/focus/selection/bindings
|
|
5
|
-
* transitions). Call sites outside this module (e.g., the
|
|
5
|
+
* transitions). Call sites outside this module (e.g., the sh3
|
|
6
6
|
* assembling registry-change notifications) dispatch via
|
|
7
7
|
* {@link __notifyActiveChange}.
|
|
8
8
|
*/
|
|
9
9
|
export declare function onActiveChange(cb: () => void): () => void;
|
|
10
|
-
/** Internal — fired by the
|
|
10
|
+
/** Internal — fired by the sh3 runtime when the action registry mutates. */
|
|
11
11
|
export declare function __notifyActiveChange(): void;
|
|
12
12
|
/** Test-only alias for the internal notifier. */
|
|
13
13
|
export declare const __notifyActiveChangeForTest: typeof __notifyActiveChange;
|
|
@@ -18,7 +18,7 @@ export declare function setMountedViewIds(ids: Set<string>): void;
|
|
|
18
18
|
* One-shot snapshot: walk the active layout tree and update
|
|
19
19
|
* `mountedViewIds` to match. Non-reactive — call from an `$effect` that
|
|
20
20
|
* reads `layoutStore.tree` to keep the set in sync as the tree mutates.
|
|
21
|
-
*
|
|
21
|
+
* Sh3.svelte owns that effect during boot.
|
|
22
22
|
*/
|
|
23
23
|
export declare function syncMountedViewIdsFromLayout(): void;
|
|
24
24
|
export declare function setFocusedViewId(id: string | null): void;
|