@happyvertical/smrt-svelte 0.55.16 → 0.55.18
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 +5 -3
- package/agents/cookbook-shell.md +7 -1
- package/agents/overview-surfaces.md +5 -0
- package/agents/workspace.md +155 -11
- package/dist/browser-ai/svelte/components/DownloadProgress.svelte +22 -19
- package/dist/browser-ai/svelte/components/ModelStatusControl.svelte +16 -13
- package/dist/browser-ai/svelte/components/STTTest.svelte +41 -38
- package/dist/browser-ai/svelte/components/VoiceInput.svelte +17 -14
- package/dist/components/activity/ActivityList.svelte +1 -1
- package/dist/components/app/AppShell.svelte +279 -14
- package/dist/components/app/AppShell.svelte.d.ts +63 -2
- package/dist/components/app/AppShell.svelte.d.ts.map +1 -1
- package/dist/components/app/DockToggles.svelte +53 -11
- package/dist/components/app/DockToggles.svelte.d.ts.map +1 -1
- package/dist/components/app/OwnerSetupForm.svelte +98 -34
- package/dist/components/app/OwnerSetupForm.svelte.d.ts +4 -0
- package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -1
- package/dist/components/app/PhoneTabBar.svelte +136 -0
- package/dist/components/app/PhoneTabBar.svelte.d.ts +22 -0
- package/dist/components/app/PhoneTabBar.svelte.d.ts.map +1 -0
- package/dist/components/app/ShellSettingsPage.svelte +17 -2
- package/dist/components/app/ShellSettingsPage.svelte.d.ts +11 -16
- package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -1
- package/dist/components/app/dock-toggle.d.ts +3 -2
- package/dist/components/app/dock-toggle.d.ts.map +1 -1
- package/dist/components/app/index.d.ts +2 -1
- package/dist/components/app/index.d.ts.map +1 -1
- package/dist/components/app/index.js +1 -0
- package/dist/components/app/owner-setup-types.d.ts +5 -0
- package/dist/components/app/owner-setup-types.d.ts.map +1 -1
- package/dist/components/app/phone-tabs.d.ts +41 -0
- package/dist/components/app/phone-tabs.d.ts.map +1 -0
- package/dist/components/app/phone-tabs.js +66 -0
- package/dist/components/app/slot-item.d.ts +16 -0
- package/dist/components/app/slot-item.d.ts.map +1 -1
- package/dist/components/app/view-transition.d.ts +43 -0
- package/dist/components/app/view-transition.d.ts.map +1 -0
- package/dist/components/app/view-transition.js +76 -0
- package/dist/components/audit/AuditList.svelte +4 -1
- package/dist/components/audit/RecordHistory.svelte +4 -1
- package/dist/components/board/Board.svelte +4 -1
- package/dist/components/command-palette/CommandPalette.svelte +4 -1
- package/dist/components/command-palette/CommandPalette.svelte.d.ts +2 -0
- package/dist/components/command-palette/CommandPalette.svelte.d.ts.map +1 -1
- package/dist/components/command-palette/CommandPaletteDialog.svelte +3 -0
- package/dist/components/command-palette/CommandPaletteTrigger.svelte +3 -0
- package/dist/components/cookbook/CookbookApp.svelte +2 -1
- package/dist/components/cookbook/CookbookApp.svelte.d.ts.map +1 -1
- package/dist/components/cookbook/CookbookSectionPage.svelte +4 -1
- package/dist/components/cookbook/brand-theme.d.ts.map +1 -1
- package/dist/components/cookbook/brand-theme.js +21 -2
- package/dist/components/cookbook/build.js +1 -1
- package/dist/components/cookbook/theme.d.ts.map +1 -1
- package/dist/components/cookbook/theme.js +9 -5
- package/dist/components/cookbook/types.d.ts +5 -1
- package/dist/components/cookbook/types.d.ts.map +1 -1
- package/dist/components/forms/AddressInput.svelte +25 -22
- package/dist/components/forms/CheckboxInput.svelte +8 -5
- package/dist/components/forms/DateRangeInput.svelte +41 -38
- package/dist/components/forms/DateTimeInput.svelte +29 -26
- package/dist/components/forms/FileUpload.svelte +24 -21
- package/dist/components/forms/Form.svelte +34 -31
- package/dist/components/forms/FormMicButton.svelte +10 -7
- package/dist/components/forms/FormScope.svelte +4 -1
- package/dist/components/forms/MeasurementInput.svelte +26 -23
- package/dist/components/forms/MoneyInput.svelte +18 -15
- package/dist/components/forms/NumberInput.svelte +17 -14
- package/dist/components/forms/PhoneInput.svelte +37 -34
- package/dist/components/forms/SearchInput.svelte +16 -13
- package/dist/components/forms/SelectInput.svelte +17 -14
- package/dist/components/forms/TextInput.svelte +19 -16
- package/dist/components/forms/TextareaInput.svelte +21 -18
- package/dist/components/import-export/ImportExport.svelte +4 -1
- package/dist/components/module/ModulePanel.svelte +14 -11
- package/dist/components/notifications/NotificationBell.svelte +4 -1
- package/dist/components/overview/OverviewAssistantUndo.svelte +4 -1
- package/dist/components/overview/OverviewGrid.svelte +11 -6
- package/dist/components/overview/OverviewGrid.svelte.d.ts.map +1 -1
- package/dist/components/overview/WidgetOptionsForm.svelte +3 -0
- package/dist/components/overview/widgets/ChartWidget.svelte +7 -4
- package/dist/components/overview/widgets/MetricWidget.svelte +5 -2
- package/dist/components/overview/widgets/NoteWidget.svelte +5 -2
- package/dist/components/overview/widgets/RecordListWidget.svelte +6 -3
- package/dist/components/overview/widgets/ShortcutsWidget.svelte +12 -6
- package/dist/components/overview/widgets/ShortcutsWidget.svelte.d.ts.map +1 -1
- package/dist/components/screens/DetailScreen.svelte +6 -3
- package/dist/components/screens/EditForm.svelte +6 -3
- package/dist/components/screens/ListScreen.svelte +4 -1
- package/dist/components/screens/RecipeScreens.svelte +1 -1
- package/dist/components/settings/SettingsCatalog.svelte +4 -1
- package/dist/components/sortable/Sortable.svelte +11 -5
- package/dist/components/sortable/Sortable.svelte.d.ts.map +1 -1
- package/dist/components/workspace/Breadcrumbs.svelte +4 -1
- package/dist/components/workspace/NavTree.svelte +4 -1
- package/dist/components/workspace/RoleShell.svelte +4 -1
- package/dist/components/workspace/WorkspaceShell.svelte +43 -40
- package/dist/components/workspace/admin-shell/ActivityItem.svelte +4 -1
- package/dist/components/workspace/admin-shell/ActivityList.svelte +5 -2
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte +6 -3
- package/dist/components/workspace/admin-shell/ActivityToasts.svelte +9 -4
- package/dist/components/workspace/admin-shell/AdminShell.svelte +642 -126
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +7 -1
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/AppScopePanel.svelte +4 -1
- package/dist/components/workspace/admin-shell/HotkeyInput.svelte +4 -1
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte +58 -14
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts +9 -2
- package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/PhoneTopBar.svelte +15 -6
- package/dist/components/workspace/admin-shell/ShellBrand.svelte +3 -0
- package/dist/components/workspace/admin-shell/ShellCorner.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellIconButton.svelte +11 -7
- package/dist/components/workspace/admin-shell/ShellLayoutEditor.svelte +6 -3
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte +19 -13
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts +1 -1
- package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellNavToggle.svelte +8 -5
- package/dist/components/workspace/admin-shell/ShellSectionIcon.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte +24 -17
- package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +236 -48
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts +11 -1
- package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/ShellTitle.svelte +4 -1
- package/dist/components/workspace/admin-shell/ShortcutsOverlay.svelte +4 -1
- package/dist/components/workspace/admin-shell/SystemScopePanel.svelte +4 -1
- package/dist/components/workspace/admin-shell/SystemStatusChips.svelte +5 -2
- package/dist/components/workspace/admin-shell/TenantNav.svelte +112 -43
- package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts +4 -3
- package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +322 -55
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts +15 -2
- package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/motion.d.ts +19 -0
- package/dist/components/workspace/admin-shell/motion.d.ts.map +1 -0
- package/dist/components/workspace/admin-shell/motion.js +44 -0
- package/dist/components/workspace/admin-shell/settings.d.ts +1 -0
- package/dist/components/workspace/admin-shell/settings.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/settings.js +1 -1
- package/dist/components/workspace/admin-shell/shell-icons.d.ts +8 -0
- package/dist/components/workspace/admin-shell/shell-icons.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/shell-icons.js +8 -0
- package/dist/components/workspace/admin-shell/state.svelte.d.ts +6 -0
- package/dist/components/workspace/admin-shell/state.svelte.d.ts.map +1 -1
- package/dist/components/workspace/admin-shell/state.svelte.js +15 -0
- package/dist/components/workspace/admin-shell/types.d.ts +13 -3
- package/dist/components/workspace/admin-shell/types.d.ts.map +1 -1
- package/dist/components/workspace/tools-dock/ToolsDock.svelte +41 -38
- package/dist/i18n/strings.workspace.d.ts +37 -0
- package/dist/i18n/strings.workspace.d.ts.map +1 -1
- package/dist/i18n/strings.workspace.js +42 -2
- package/dist/mcp-apps/McpAppsBridge.svelte +4 -1
- package/package.json +14 -14
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type { DropdownPlacement
|
|
2
|
+
import type { DropdownPlacement } from '@happyvertical/smrt-ui';
|
|
3
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
|
-
import { Avatar
|
|
4
|
+
import { Avatar } from '@happyvertical/smrt-ui/ui';
|
|
5
|
+
import { tick } from 'svelte';
|
|
5
6
|
import { M } from '../../../i18n/strings.workspace.js';
|
|
6
7
|
import type { WorkspaceAccountTenant } from './types.js';
|
|
7
8
|
|
|
8
9
|
const SIGN_OUT_ID = 'workspace-account:sign-out';
|
|
10
|
+
const SETTINGS_ID = 'workspace-account:settings';
|
|
9
11
|
const TENANT_PREFIX = 'workspace-account:tenant:';
|
|
10
12
|
|
|
11
13
|
export interface Props {
|
|
@@ -17,6 +19,8 @@ export interface Props {
|
|
|
17
19
|
compact?: boolean;
|
|
18
20
|
/** Custom display name for the user, falls back to userName. */
|
|
19
21
|
userLabel?: string;
|
|
22
|
+
/** Email shown under the name at the top of the open menu. */
|
|
23
|
+
email?: string;
|
|
20
24
|
/** URL for the user's avatar image. */
|
|
21
25
|
avatarUrl?: string;
|
|
22
26
|
/** Custom display name for the current tenant. */
|
|
@@ -27,10 +31,21 @@ export interface Props {
|
|
|
27
31
|
tenants?: WorkspaceAccountTenant[];
|
|
28
32
|
/** ID of the currently selected tenant. */
|
|
29
33
|
currentTenantId?: string | null;
|
|
30
|
-
/**
|
|
31
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Where the menu appears relative to the trigger. `inline-end` opens beside
|
|
36
|
+
* the trigger, bottom-aligned (a compact trigger in a narrow rail).
|
|
37
|
+
*/
|
|
38
|
+
placement?: DropdownPlacement | 'inline-end';
|
|
32
39
|
/** Disables the account menu button. */
|
|
33
40
|
disabled?: boolean;
|
|
41
|
+
/** Adds a Settings link to the menu. */
|
|
42
|
+
settingsHref?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Adds a Sign out link (a GET navigation) to the menu. Never point it at a
|
|
45
|
+
* POST-only route such as the runtime's `/sign-out`; use `onSignOut` for
|
|
46
|
+
* those. Use `onSignOut` for a callback.
|
|
47
|
+
*/
|
|
48
|
+
signOutHref?: string;
|
|
34
49
|
/** Called when the user selects a different tenant. */
|
|
35
50
|
onTenantSelect?: (tenantId: string) => void;
|
|
36
51
|
/** Called when the user clicks sign out. */
|
|
@@ -42,6 +57,7 @@ let {
|
|
|
42
57
|
density,
|
|
43
58
|
compact = false,
|
|
44
59
|
userLabel = '',
|
|
60
|
+
email = '',
|
|
45
61
|
avatarUrl,
|
|
46
62
|
tenantLabel = '',
|
|
47
63
|
roleLabel = '',
|
|
@@ -49,11 +65,22 @@ let {
|
|
|
49
65
|
currentTenantId = null,
|
|
50
66
|
placement = 'top-start',
|
|
51
67
|
disabled = false,
|
|
68
|
+
settingsHref,
|
|
69
|
+
signOutHref,
|
|
52
70
|
onTenantSelect,
|
|
53
71
|
onSignOut,
|
|
54
72
|
}: Props = $props();
|
|
55
73
|
|
|
74
|
+
interface Entry {
|
|
75
|
+
id: string;
|
|
76
|
+
label: string;
|
|
77
|
+
disabled?: boolean;
|
|
78
|
+
href?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
56
81
|
const { t } = useI18n();
|
|
82
|
+
const instanceId = $props.id();
|
|
83
|
+
const menuId = `smrt-account-menu-${instanceId}`;
|
|
57
84
|
const identityLabel = $derived(userLabel || userName);
|
|
58
85
|
const activeTenantLabel = $derived(
|
|
59
86
|
tenantLabel ||
|
|
@@ -66,14 +93,15 @@ const accountContext = $derived(
|
|
|
66
93
|
const summaryTitle = $derived(
|
|
67
94
|
[identityLabel, activeTenantLabel, roleLabel].filter(Boolean).join(' · '),
|
|
68
95
|
);
|
|
69
|
-
const
|
|
70
|
-
|
|
96
|
+
const showEmail = $derived(Boolean(email) && email !== identityLabel);
|
|
97
|
+
const entries = $derived.by(() => {
|
|
98
|
+
const out: Entry[] = [];
|
|
71
99
|
|
|
72
100
|
if (tenants.length > 1 && onTenantSelect) {
|
|
73
101
|
for (const tenant of tenants) {
|
|
74
102
|
const isCurrent = tenant.id === currentTenantId;
|
|
75
103
|
const detail = tenant.roleLabel ? ` — ${tenant.roleLabel}` : '';
|
|
76
|
-
|
|
104
|
+
out.push({
|
|
77
105
|
id: `${TENANT_PREFIX}${tenant.id}`,
|
|
78
106
|
label: isCurrent
|
|
79
107
|
? `${t(M['ui.workspace_account_menu.current_tenant'], {
|
|
@@ -85,105 +113,343 @@ const items = $derived.by(() => {
|
|
|
85
113
|
}
|
|
86
114
|
}
|
|
87
115
|
|
|
88
|
-
if (
|
|
89
|
-
|
|
116
|
+
if (settingsHref) {
|
|
117
|
+
out.push({
|
|
118
|
+
id: SETTINGS_ID,
|
|
119
|
+
label: t(M['ui.app_shell.account_settings']),
|
|
120
|
+
href: settingsHref,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (onSignOut || signOutHref) {
|
|
125
|
+
out.push({
|
|
90
126
|
id: SIGN_OUT_ID,
|
|
91
127
|
label: t(M['ui.workspace_account_menu.sign_out']),
|
|
128
|
+
href: onSignOut ? undefined : signOutHref,
|
|
92
129
|
});
|
|
93
130
|
}
|
|
94
131
|
|
|
95
|
-
return
|
|
132
|
+
return out;
|
|
96
133
|
});
|
|
97
134
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
135
|
+
let open = $state(false);
|
|
136
|
+
let wrapEl = $state<HTMLElement | null>(null);
|
|
137
|
+
let triggerEl = $state<HTMLButtonElement | null>(null);
|
|
138
|
+
let itemEls = $state<Array<HTMLElement | null>>([]);
|
|
139
|
+
const enabled = $derived(
|
|
140
|
+
entries.map((entry, i) => (entry.disabled ? -1 : i)).filter((i) => i >= 0),
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
async function openMenu(focusLast = false) {
|
|
144
|
+
open = true;
|
|
145
|
+
await tick();
|
|
146
|
+
const target = focusLast ? enabled[enabled.length - 1] : enabled[0];
|
|
147
|
+
if (target != null) itemEls[target]?.focus();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function closeMenu(refocus = true) {
|
|
151
|
+
open = false;
|
|
152
|
+
if (refocus) triggerEl?.focus();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function select(entry: Entry) {
|
|
156
|
+
if (entry.disabled) return;
|
|
157
|
+
if (entry.id === SIGN_OUT_ID) onSignOut?.();
|
|
158
|
+
else if (entry.id.startsWith(TENANT_PREFIX)) {
|
|
159
|
+
onTenantSelect?.(entry.id.slice(TENANT_PREFIX.length));
|
|
102
160
|
}
|
|
103
|
-
|
|
104
|
-
|
|
161
|
+
// A link navigates on its own: leave focus to the destination.
|
|
162
|
+
closeMenu(!entry.href);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function focusByOffset(offset: number) {
|
|
166
|
+
if (enabled.length === 0) return;
|
|
167
|
+
const current = itemEls.indexOf(document.activeElement as HTMLElement);
|
|
168
|
+
const pos = enabled.indexOf(current);
|
|
169
|
+
itemEls[enabled[(pos + offset + enabled.length) % enabled.length]]?.focus();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function onTriggerKeydown(event: KeyboardEvent) {
|
|
173
|
+
if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
openMenu(event.key === 'ArrowUp');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function onMenuKeydown(event: KeyboardEvent) {
|
|
180
|
+
switch (event.key) {
|
|
181
|
+
case 'ArrowDown':
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
focusByOffset(1);
|
|
184
|
+
break;
|
|
185
|
+
case 'ArrowUp':
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
focusByOffset(-1);
|
|
188
|
+
break;
|
|
189
|
+
case 'Home':
|
|
190
|
+
event.preventDefault();
|
|
191
|
+
itemEls[enabled[0]]?.focus();
|
|
192
|
+
break;
|
|
193
|
+
case 'End':
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
itemEls[enabled[enabled.length - 1]]?.focus();
|
|
196
|
+
break;
|
|
197
|
+
case 'Escape':
|
|
198
|
+
event.preventDefault();
|
|
199
|
+
event.stopPropagation();
|
|
200
|
+
closeMenu();
|
|
201
|
+
break;
|
|
202
|
+
case 'Tab':
|
|
203
|
+
closeMenu(false);
|
|
204
|
+
break;
|
|
105
205
|
}
|
|
106
206
|
}
|
|
207
|
+
|
|
208
|
+
// Dismiss on an outside click while open.
|
|
209
|
+
$effect(() => {
|
|
210
|
+
if (!open) return;
|
|
211
|
+
const onDocPointer = (event: MouseEvent) => {
|
|
212
|
+
if (wrapEl && !wrapEl.contains(event.target as Node)) closeMenu(false);
|
|
213
|
+
};
|
|
214
|
+
document.addEventListener('click', onDocPointer, true);
|
|
215
|
+
return () => document.removeEventListener('click', onDocPointer, true);
|
|
216
|
+
});
|
|
107
217
|
</script>
|
|
108
218
|
|
|
109
|
-
<div
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
219
|
+
<div
|
|
220
|
+
bind:this={wrapEl}
|
|
221
|
+
data-density={density}
|
|
222
|
+
data-compact={compact ? '' : undefined}
|
|
223
|
+
class="smrt-workspace-account-menu"
|
|
224
|
+
title={summaryTitle}
|
|
225
|
+
data-smrt-component="WorkspaceAccountMenu"
|
|
226
|
+
>
|
|
227
|
+
<!-- raw-primitive-allow: menu trigger owns aria-haspopup/aria-expanded/aria-controls and an avatar + identity layout the Button primitive does not model -->
|
|
228
|
+
<button
|
|
229
|
+
bind:this={triggerEl}
|
|
230
|
+
type="button"
|
|
231
|
+
class="smrt-workspace-account-menu__trigger"
|
|
232
|
+
data-smrt-part="trigger"
|
|
233
|
+
aria-label={compact ? `${t(M['ui.workspace_account_menu.open'])} ${summaryTitle}` : undefined}
|
|
234
|
+
aria-haspopup="menu"
|
|
235
|
+
aria-expanded={open}
|
|
236
|
+
aria-controls={open ? menuId : undefined}
|
|
237
|
+
disabled={disabled || entries.length === 0}
|
|
238
|
+
onclick={() => (open ? closeMenu(false) : openMenu())}
|
|
239
|
+
onkeydown={onTriggerKeydown}
|
|
116
240
|
>
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<span class="smrt-workspace-account-
|
|
123
|
-
|
|
124
|
-
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
241
|
+
<span class="smrt-workspace-account-menu__open">
|
|
242
|
+
{t(M['ui.workspace_account_menu.open'])}
|
|
243
|
+
</span>
|
|
244
|
+
<Avatar src={avatarUrl} name={userName} size="sm" aria-hidden="true" />
|
|
245
|
+
<span class="smrt-workspace-account-menu__identity">
|
|
246
|
+
<span class="smrt-workspace-account-menu__summary">{identityLabel}</span>
|
|
247
|
+
{#if accountContext}
|
|
248
|
+
<span class="smrt-workspace-account-menu__context">{accountContext}</span>
|
|
249
|
+
{/if}
|
|
250
|
+
</span>
|
|
251
|
+
<span class="smrt-workspace-account-menu__indicator" aria-hidden="true">•••</span>
|
|
252
|
+
</button>
|
|
253
|
+
|
|
254
|
+
{#if open}
|
|
255
|
+
<div class="smrt-workspace-account-menu__popover smrt-workspace-account-menu__popover--{placement}" data-smrt-part="panel">
|
|
256
|
+
{#if identityLabel || showEmail}
|
|
257
|
+
<div class="smrt-workspace-account-menu__header">
|
|
258
|
+
<span class="smrt-workspace-account-menu__name">{identityLabel}</span>
|
|
259
|
+
{#if showEmail}<span class="smrt-workspace-account-menu__email">{email}</span>{/if}
|
|
260
|
+
</div>
|
|
261
|
+
{/if}
|
|
262
|
+
<!-- svelte-ignore a11y_interactive_supports_focus -->
|
|
263
|
+
<div id={menuId} role="menu" tabindex="-1" class="smrt-workspace-account-menu__menu" aria-label={t(M['ui.app_shell.account_item'])} onkeydown={onMenuKeydown}>
|
|
264
|
+
{#each entries as entry, i (entry.id)}
|
|
265
|
+
{#if entry.href}
|
|
266
|
+
<a
|
|
267
|
+
bind:this={itemEls[i]}
|
|
268
|
+
role="menuitem"
|
|
269
|
+
class="smrt-workspace-account-menu__item"
|
|
270
|
+
href={entry.href}
|
|
271
|
+
tabindex="-1"
|
|
272
|
+
onclick={() => select(entry)}
|
|
273
|
+
>{entry.label}</a>
|
|
274
|
+
{:else}
|
|
275
|
+
<!-- raw-primitive-allow: role="menuitem" with roving tabindex inside a role="menu"; not a content button -->
|
|
276
|
+
<button
|
|
277
|
+
bind:this={itemEls[i]}
|
|
278
|
+
type="button"
|
|
279
|
+
role="menuitem"
|
|
280
|
+
class="smrt-workspace-account-menu__item"
|
|
281
|
+
disabled={entry.disabled}
|
|
282
|
+
tabindex="-1"
|
|
283
|
+
onclick={() => select(entry)}
|
|
284
|
+
>{entry.label}</button>
|
|
285
|
+
{/if}
|
|
286
|
+
{/each}
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
{/if}
|
|
131
290
|
</div>
|
|
132
291
|
|
|
133
292
|
<style>
|
|
293
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
294
|
+
@layer smrt.theme {
|
|
134
295
|
.smrt-workspace-account-menu {
|
|
296
|
+
position: relative;
|
|
297
|
+
display: flex;
|
|
135
298
|
min-width: 0;
|
|
136
299
|
width: 100%;
|
|
137
300
|
}
|
|
138
301
|
|
|
139
302
|
.smrt-workspace-account-menu[data-density='touch'] {
|
|
140
|
-
--smrt-control-target-min: var(--smrt-touch-target-min
|
|
303
|
+
--smrt-control-target-min: var(--smrt-touch-target-min);
|
|
141
304
|
}
|
|
142
305
|
.smrt-workspace-account-menu[data-density='comfortable'] {
|
|
143
306
|
--smrt-control-target-min: 0px;
|
|
144
307
|
}
|
|
145
|
-
.smrt-workspace-account-menu :global(.dropdown__item) {
|
|
146
|
-
min-block-size: var(--smrt-control-target-min, 0px);
|
|
147
|
-
box-sizing: border-box;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.smrt-workspace-account-menu :global(.dropdown) {
|
|
151
|
-
display: flex;
|
|
152
|
-
width: 100%;
|
|
153
|
-
}
|
|
154
308
|
|
|
155
|
-
.smrt-workspace-account-
|
|
309
|
+
.smrt-workspace-account-menu__trigger {
|
|
310
|
+
appearance: none;
|
|
156
311
|
display: grid;
|
|
157
312
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
158
313
|
align-items: center;
|
|
159
314
|
gap: var(--smrt-spacing-2);
|
|
315
|
+
box-sizing: border-box;
|
|
160
316
|
width: 100%;
|
|
161
317
|
min-width: 0;
|
|
162
318
|
min-height: max(2.75rem, var(--smrt-control-target-min, 0px));
|
|
163
319
|
padding: var(--smrt-spacing-2);
|
|
164
|
-
|
|
320
|
+
position: relative;
|
|
321
|
+
border: var(--smrt-hairline);
|
|
322
|
+
border-radius: var(--smrt-control-radius);
|
|
323
|
+
background: var(--smrt-surface-control);
|
|
324
|
+
color: var(--smrt-color-on-surface);
|
|
325
|
+
font: inherit;
|
|
165
326
|
text-align: start;
|
|
327
|
+
cursor: pointer;
|
|
328
|
+
}
|
|
329
|
+
/* State layer: a currentColor veil over the trigger. */
|
|
330
|
+
.smrt-workspace-account-menu__trigger::after {
|
|
331
|
+
content: '';
|
|
332
|
+
position: absolute;
|
|
333
|
+
inset: 0;
|
|
334
|
+
border-radius: inherit;
|
|
335
|
+
background: currentColor;
|
|
336
|
+
opacity: 0;
|
|
337
|
+
pointer-events: none;
|
|
338
|
+
}
|
|
339
|
+
.smrt-workspace-account-menu__trigger:hover:not(:disabled)::after {
|
|
340
|
+
opacity: var(--smrt-state-hover);
|
|
341
|
+
}
|
|
342
|
+
.smrt-workspace-account-menu__trigger[aria-expanded='true']::after {
|
|
343
|
+
opacity: var(--smrt-state-selected);
|
|
344
|
+
}
|
|
345
|
+
.smrt-workspace-account-menu__trigger:active:not(:disabled)::after {
|
|
346
|
+
opacity: var(--smrt-state-pressed);
|
|
347
|
+
}
|
|
348
|
+
.smrt-workspace-account-menu__trigger:focus-visible {
|
|
349
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
350
|
+
outline-offset: var(--smrt-focus-ring-offset);
|
|
351
|
+
}
|
|
352
|
+
.smrt-workspace-account-menu__trigger:disabled {
|
|
353
|
+
opacity: var(--smrt-state-disabled);
|
|
354
|
+
cursor: default;
|
|
166
355
|
}
|
|
167
356
|
|
|
168
|
-
.smrt-workspace-account-menu[data-compact]
|
|
357
|
+
.smrt-workspace-account-menu[data-compact] {
|
|
358
|
+
width: auto;
|
|
359
|
+
}
|
|
360
|
+
.smrt-workspace-account-menu[data-compact] .smrt-workspace-account-menu__trigger {
|
|
169
361
|
display: grid;
|
|
170
362
|
place-items: center;
|
|
171
363
|
grid-template-columns: minmax(0, 1fr);
|
|
364
|
+
min-width: max(2.75rem, var(--smrt-control-target-min, 0px));
|
|
172
365
|
padding: var(--smrt-spacing-1);
|
|
366
|
+
border-color: transparent;
|
|
367
|
+
border-radius: var(--smrt-radius-full);
|
|
368
|
+
background: transparent;
|
|
173
369
|
}
|
|
174
|
-
|
|
175
370
|
.smrt-workspace-account-menu[data-compact] .smrt-workspace-account-menu__identity,
|
|
176
|
-
.smrt-workspace-account-menu[data-compact] .smrt-workspace-account-menu__indicator
|
|
177
|
-
.smrt-workspace-account-menu[data-compact] .smrt-workspace-account-menu__open {
|
|
371
|
+
.smrt-workspace-account-menu[data-compact] .smrt-workspace-account-menu__indicator {
|
|
178
372
|
display: none;
|
|
179
373
|
}
|
|
180
374
|
|
|
181
|
-
.smrt-workspace-account-
|
|
375
|
+
.smrt-workspace-account-menu__popover {
|
|
376
|
+
position: absolute;
|
|
377
|
+
z-index: var(--smrt-z-index-dropdown);
|
|
182
378
|
box-sizing: border-box;
|
|
183
|
-
width: 100%;
|
|
184
379
|
min-width: 12rem;
|
|
185
380
|
max-height: min(24rem, 70vh);
|
|
186
381
|
overflow-y: auto;
|
|
382
|
+
margin: var(--smrt-spacing-1) 0;
|
|
383
|
+
padding: var(--smrt-spacing-1);
|
|
384
|
+
border: var(--smrt-hairline);
|
|
385
|
+
border-radius: var(--smrt-radius-medium);
|
|
386
|
+
background: var(--smrt-surface-raised);
|
|
387
|
+
box-shadow: var(--smrt-elevation-3), var(--smrt-inset-highlight);
|
|
388
|
+
}
|
|
389
|
+
.smrt-workspace-account-menu__popover--bottom-start { inset-block-start: 100%; inset-inline-start: 0; }
|
|
390
|
+
.smrt-workspace-account-menu__popover--bottom-end { inset-block-start: 100%; inset-inline-end: 0; }
|
|
391
|
+
.smrt-workspace-account-menu__popover--top-start { inset-block-end: 100%; inset-inline-start: 0; }
|
|
392
|
+
.smrt-workspace-account-menu__popover--top-end { inset-block-end: 100%; inset-inline-end: 0; }
|
|
393
|
+
.smrt-workspace-account-menu__popover--inline-end {
|
|
394
|
+
inset-block-end: 0;
|
|
395
|
+
inset-inline-start: 100%;
|
|
396
|
+
margin: 0 var(--smrt-spacing-2);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.smrt-workspace-account-menu__header {
|
|
400
|
+
display: grid;
|
|
401
|
+
gap: var(--smrt-spacing-1);
|
|
402
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
403
|
+
border-block-end: var(--smrt-hairline);
|
|
404
|
+
margin-block-end: var(--smrt-spacing-1);
|
|
405
|
+
}
|
|
406
|
+
.smrt-workspace-account-menu__name {
|
|
407
|
+
color: var(--smrt-color-on-surface);
|
|
408
|
+
font-size: var(--smrt-typography-body-small-size);
|
|
409
|
+
font-weight: var(--smrt-typography-weight-medium);
|
|
410
|
+
overflow-wrap: anywhere;
|
|
411
|
+
}
|
|
412
|
+
.smrt-workspace-account-menu__email {
|
|
413
|
+
color: var(--smrt-color-on-surface-variant);
|
|
414
|
+
font-size: var(--smrt-typography-label-small-size);
|
|
415
|
+
overflow-wrap: anywhere;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.smrt-workspace-account-menu__menu {
|
|
419
|
+
display: flex;
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
gap: var(--smrt-spacing-1);
|
|
422
|
+
}
|
|
423
|
+
.smrt-workspace-account-menu__item {
|
|
424
|
+
appearance: none;
|
|
425
|
+
display: flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
box-sizing: border-box;
|
|
428
|
+
min-block-size: max(2.75rem, var(--smrt-control-target-min, 0px));
|
|
429
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
430
|
+
border: none;
|
|
431
|
+
border-radius: var(--smrt-control-radius-small);
|
|
432
|
+
background: none;
|
|
433
|
+
color: var(--smrt-color-on-surface);
|
|
434
|
+
font: inherit;
|
|
435
|
+
text-align: start;
|
|
436
|
+
text-decoration: none;
|
|
437
|
+
white-space: nowrap;
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
}
|
|
440
|
+
.smrt-workspace-account-menu__item:hover:not(:disabled) {
|
|
441
|
+
background: color-mix(in srgb, currentColor calc(var(--smrt-state-hover) * 100%), transparent);
|
|
442
|
+
}
|
|
443
|
+
.smrt-workspace-account-menu__item:active:not(:disabled) {
|
|
444
|
+
background: color-mix(in srgb, currentColor calc(var(--smrt-state-pressed) * 100%), transparent);
|
|
445
|
+
}
|
|
446
|
+
.smrt-workspace-account-menu__item:focus-visible {
|
|
447
|
+
outline: var(--smrt-focus-ring-width) solid var(--smrt-focus-ring-color);
|
|
448
|
+
outline-offset: calc(-1 * var(--smrt-focus-ring-width));
|
|
449
|
+
}
|
|
450
|
+
.smrt-workspace-account-menu__item:disabled {
|
|
451
|
+
opacity: var(--smrt-state-disabled);
|
|
452
|
+
cursor: default;
|
|
187
453
|
}
|
|
188
454
|
|
|
189
455
|
.smrt-workspace-account-menu__identity {
|
|
@@ -227,4 +493,5 @@ function handleSelect(id: string): void {
|
|
|
227
493
|
white-space: nowrap;
|
|
228
494
|
border: 0;
|
|
229
495
|
}
|
|
496
|
+
}
|
|
230
497
|
</style>
|
|
@@ -9,6 +9,8 @@ export interface Props {
|
|
|
9
9
|
compact?: boolean;
|
|
10
10
|
/** Custom display name for the user, falls back to userName. */
|
|
11
11
|
userLabel?: string;
|
|
12
|
+
/** Email shown under the name at the top of the open menu. */
|
|
13
|
+
email?: string;
|
|
12
14
|
/** URL for the user's avatar image. */
|
|
13
15
|
avatarUrl?: string;
|
|
14
16
|
/** Custom display name for the current tenant. */
|
|
@@ -19,10 +21,21 @@ export interface Props {
|
|
|
19
21
|
tenants?: WorkspaceAccountTenant[];
|
|
20
22
|
/** ID of the currently selected tenant. */
|
|
21
23
|
currentTenantId?: string | null;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Where the menu appears relative to the trigger. `inline-end` opens beside
|
|
26
|
+
* the trigger, bottom-aligned (a compact trigger in a narrow rail).
|
|
27
|
+
*/
|
|
28
|
+
placement?: DropdownPlacement | 'inline-end';
|
|
24
29
|
/** Disables the account menu button. */
|
|
25
30
|
disabled?: boolean;
|
|
31
|
+
/** Adds a Settings link to the menu. */
|
|
32
|
+
settingsHref?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Adds a Sign out link (a GET navigation) to the menu. Never point it at a
|
|
35
|
+
* POST-only route such as the runtime's `/sign-out`; use `onSignOut` for
|
|
36
|
+
* those. Use `onSignOut` for a callback.
|
|
37
|
+
*/
|
|
38
|
+
signOutHref?: string;
|
|
26
39
|
/** Called when the user selects a different tenant. */
|
|
27
40
|
onTenantSelect?: (tenantId: string) => void;
|
|
28
41
|
/** Called when the user clicks sign out. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceAccountMenu.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"WorkspaceAccountMenu.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,WAAW,KAAK;IACpB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,OAAO,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACnC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,iBAAiB,GAAG,YAAY,CAAC;IAC7C,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AA8ND,QAAA,MAAM,oBAAoB,2CAAwC,CAAC;AACnE,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACpE,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** True when the user asked for reduced motion (false off the browser). */
|
|
2
|
+
export declare function prefersReducedMotion(): boolean;
|
|
3
|
+
/** Parses a CSS `<time>` (`200ms`, `0.2s`) to milliseconds; 0 when unparsable. */
|
|
4
|
+
export declare function parseCssTime(value: string): number;
|
|
5
|
+
/**
|
|
6
|
+
* Reads a duration token (`--smrt-duration-short4`) off `element` (or the
|
|
7
|
+
* document root) and returns it in milliseconds. Returns 0 under reduced
|
|
8
|
+
* motion, off the browser, or when the token is missing, so callers can pass
|
|
9
|
+
* the result straight to a Svelte `duration` option.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tokenDuration(name: string, element?: Element | null): number;
|
|
12
|
+
/** `animate:` function: FLIP reorder with a token-driven duration. */
|
|
13
|
+
export declare function flipRow(node: Element, rects: {
|
|
14
|
+
from: DOMRect;
|
|
15
|
+
to: DOMRect;
|
|
16
|
+
}, params?: {
|
|
17
|
+
token?: string;
|
|
18
|
+
}): import("svelte/animate").AnimationConfig;
|
|
19
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/motion.ts"],"names":[],"mappings":"AAUA,2EAA2E;AAC3E,wBAAgB,oBAAoB,IAAI,OAAO,CAM9C;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAU5E;AAED,sEAAsE;AACtE,wBAAgB,OAAO,CACrB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,EACrC,MAAM,GAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,4CAKhC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motion helpers shared by the shell lists. Durations come from the
|
|
3
|
+
* `--smrt-duration-*` theme tokens (never literals) so a theme controls the
|
|
4
|
+
* pace, and everything collapses to zero under `prefers-reduced-motion`.
|
|
5
|
+
*/
|
|
6
|
+
import { flip } from 'svelte/animate';
|
|
7
|
+
const REDUCED_MOTION = '(prefers-reduced-motion: reduce)';
|
|
8
|
+
const DEFAULT_TOKEN = '--smrt-duration-short4';
|
|
9
|
+
/** True when the user asked for reduced motion (false off the browser). */
|
|
10
|
+
export function prefersReducedMotion() {
|
|
11
|
+
return (typeof window !== 'undefined' &&
|
|
12
|
+
typeof window.matchMedia === 'function' &&
|
|
13
|
+
window.matchMedia(REDUCED_MOTION).matches);
|
|
14
|
+
}
|
|
15
|
+
/** Parses a CSS `<time>` (`200ms`, `0.2s`) to milliseconds; 0 when unparsable. */
|
|
16
|
+
export function parseCssTime(value) {
|
|
17
|
+
const match = /^(-?\d*\.?\d+)(ms|s)$/.exec(value.trim());
|
|
18
|
+
if (!match)
|
|
19
|
+
return 0;
|
|
20
|
+
const amount = Number(match[1]) * (match[2] === 's' ? 1000 : 1);
|
|
21
|
+
return Number.isFinite(amount) && amount > 0 ? amount : 0;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reads a duration token (`--smrt-duration-short4`) off `element` (or the
|
|
25
|
+
* document root) and returns it in milliseconds. Returns 0 under reduced
|
|
26
|
+
* motion, off the browser, or when the token is missing, so callers can pass
|
|
27
|
+
* the result straight to a Svelte `duration` option.
|
|
28
|
+
*/
|
|
29
|
+
export function tokenDuration(name, element) {
|
|
30
|
+
if (prefersReducedMotion())
|
|
31
|
+
return 0;
|
|
32
|
+
if (typeof document === 'undefined' ||
|
|
33
|
+
typeof getComputedStyle !== 'function') {
|
|
34
|
+
return 0;
|
|
35
|
+
}
|
|
36
|
+
const target = element ?? document.documentElement;
|
|
37
|
+
return parseCssTime(getComputedStyle(target).getPropertyValue(name));
|
|
38
|
+
}
|
|
39
|
+
/** `animate:` function: FLIP reorder with a token-driven duration. */
|
|
40
|
+
export function flipRow(node, rects, params = {}) {
|
|
41
|
+
return flip(node, rects, {
|
|
42
|
+
duration: tokenDuration(params.token ?? DEFAULT_TOKEN, node),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ShellLayoutPanel } from './layout.js';
|
|
2
2
|
import type { PanelEdge, PanelState, ResolvedShellConfig, ShellHotkeyBinding, ShellPanelConfig, ShellPanelDefaults, ShellPanelResize, ShellSettingsAdapter, ShellSettingsDelta, ShellViewport } from './types.js';
|
|
3
3
|
export declare const DEFAULT_SHELL_KEYMAP: Record<PanelEdge, ShellHotkeyBinding>;
|
|
4
|
+
export declare const DEFAULT_PANEL_CONFIG: Record<PanelEdge, ShellPanelConfig>;
|
|
4
5
|
export declare function resolveShellConfig(appDefaults?: ShellPanelDefaults): ResolvedShellConfig;
|
|
5
6
|
/**
|
|
6
7
|
* An edge's state: hidden edges (by the host or the user's layout) stay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAKtE,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAKtE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAyCpE,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,WAAW,GAAE,kBAAuB,GACnC,mBAAmB,CA2BrB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,gBAAgB,EACxB,QAAQ,GAAE,kBAAuB,EACjC,QAAQ,CAAC,EAAE,aAAa,EACxB,WAAW,CAAC,EAAE,gBAAgB,GAC7B,UAAU,CASZ;AAED,yDAAyD;AACzD,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,gBAAgB,CAIjE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,gBAAgB,GACvB,QAAQ,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAUnC;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GACjC,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,OAAO,GAAG,MAAM,GACrB,OAAO,CAKT;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,mBAAmB,GAC1B,kBAAkB,CAqBpB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,gBAAgB,EACxB,QAAQ,GAAE,kBAAuB,GAChC,kBAAkB,GAAG,IAAI,CAM3B;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,kBAAkB,GACvB,kBAAkB,CAiBpB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,kBAAkB,GACxB,kBAAkB,CA2BpB;AAED,qBAAa,gCAAiC,YAAW,oBAAoB;IAC/D,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,MAAM;IAExC,IAAI,IAAI,kBAAkB,GAAG,IAAI;IAWjC,KAAK,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI;CAOvC"}
|
|
@@ -33,11 +33,19 @@ export declare const SHELL_ICON_PATHS: {
|
|
|
33
33
|
readonly repeat: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z";
|
|
34
34
|
readonly tag: "M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z";
|
|
35
35
|
readonly archive: "M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z";
|
|
36
|
+
readonly placeholder: "M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16zm0 3a5 5 0 1 1 0 10 5 5 0 0 1 0-10z";
|
|
36
37
|
readonly chevronRight: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z";
|
|
38
|
+
readonly menu: "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z";
|
|
39
|
+
readonly chat: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z";
|
|
40
|
+
readonly close: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z";
|
|
37
41
|
};
|
|
38
42
|
export type ShellIconName = keyof typeof SHELL_ICON_PATHS;
|
|
43
|
+
/** Icon used for a dock or focus tool that does not bring its own. */
|
|
44
|
+
export declare const SHELL_DEFAULT_TOOL_ICON: ShellIconName;
|
|
39
45
|
/** Section icon used when neither the host nor the user chose one. */
|
|
40
46
|
export declare const SHELL_DEFAULT_SECTION_ICON: ShellIconName;
|
|
47
|
+
/** Rail glyph for an entry that has no icon of its own. */
|
|
48
|
+
export declare const SHELL_PLACEHOLDER_ICON: ShellIconName;
|
|
41
49
|
/** Icons the section icon picker offers (a subset of the shell icon set). */
|
|
42
50
|
export declare const SHELL_SECTION_ICONS: readonly ShellIconName[];
|
|
43
51
|
/** True when `name` is one of the shell's built-in icon names. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shell-icons.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/shell-icons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"shell-icons.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/shell-icons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDnB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE1D,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,EAAE,aAAwB,CAAC;AAE/D,sEAAsE;AACtE,eAAO,MAAM,0BAA0B,EAAE,aAAwB,CAAC;AAElE,2DAA2D;AAC3D,eAAO,MAAM,sBAAsB,EAAE,aAA6B,CAAC;AAEnE,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,EAAE,SAAS,aAAa,EAqBvD,CAAC;AAEF,kEAAkE;AAClE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,aAAa,CAEnE"}
|