@happyvertical/smrt-svelte 0.60.18 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/AGENTS.md +6 -0
  2. package/agents/components.md +15 -0
  3. package/agents/connect-ai.md +180 -0
  4. package/agents/cookbook-shell.md +173 -6
  5. package/agents/import-export.md +10 -0
  6. package/agents/screens.md +233 -12
  7. package/agents/settings.md +84 -0
  8. package/agents/testing.md +6 -0
  9. package/agents/workspace.md +64 -1
  10. package/dist/components/app/AppShell.svelte +220 -7
  11. package/dist/components/app/AppShell.svelte.d.ts +49 -3
  12. package/dist/components/app/AppShell.svelte.d.ts.map +1 -1
  13. package/dist/components/app/OwnerSetupForm.svelte +5 -3
  14. package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -1
  15. package/dist/components/app/PhoneTabBar.svelte +28 -1
  16. package/dist/components/app/PhoneTabBar.svelte.d.ts +10 -0
  17. package/dist/components/app/PhoneTabBar.svelte.d.ts.map +1 -1
  18. package/dist/components/app/ShellAccountMenu.svelte +46 -0
  19. package/dist/components/app/ShellAccountMenu.svelte.d.ts +13 -0
  20. package/dist/components/app/ShellAccountMenu.svelte.d.ts.map +1 -0
  21. package/dist/components/app/ShellSettingsPage.svelte +119 -4
  22. package/dist/components/app/ShellSettingsPage.svelte.d.ts +18 -0
  23. package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -1
  24. package/dist/components/app/index.d.ts +3 -2
  25. package/dist/components/app/index.d.ts.map +1 -1
  26. package/dist/components/app/index.js +1 -1
  27. package/dist/components/app/owner-setup-types.d.ts +1 -0
  28. package/dist/components/app/owner-setup-types.d.ts.map +1 -1
  29. package/dist/components/app/settings-menu-item.d.ts +8 -0
  30. package/dist/components/app/settings-menu-item.d.ts.map +1 -0
  31. package/dist/components/app/settings-menu-item.js +1 -0
  32. package/dist/components/app/slot-item.d.ts +53 -0
  33. package/dist/components/app/slot-item.d.ts.map +1 -1
  34. package/dist/components/audit/RecordHistory.svelte +30 -22
  35. package/dist/components/audit/RecordHistory.svelte.d.ts +31 -10
  36. package/dist/components/audit/RecordHistory.svelte.d.ts.map +1 -1
  37. package/dist/components/audit/index.d.ts +1 -1
  38. package/dist/components/audit/index.d.ts.map +1 -1
  39. package/dist/components/audit/types.d.ts +12 -6
  40. package/dist/components/audit/types.d.ts.map +1 -1
  41. package/dist/components/connect-ai/ConnectAi.svelte +584 -0
  42. package/dist/components/connect-ai/ConnectAi.svelte.d.ts +23 -0
  43. package/dist/components/connect-ai/ConnectAi.svelte.d.ts.map +1 -0
  44. package/dist/components/connect-ai/client.d.ts +68 -0
  45. package/dist/components/connect-ai/client.d.ts.map +1 -0
  46. package/dist/components/connect-ai/client.js +121 -0
  47. package/dist/components/connect-ai/index.d.ts +4 -0
  48. package/dist/components/connect-ai/index.d.ts.map +1 -0
  49. package/dist/components/connect-ai/index.js +2 -0
  50. package/dist/components/connect-ai/server.d.ts +33 -0
  51. package/dist/components/connect-ai/server.d.ts.map +1 -0
  52. package/dist/components/connect-ai/server.js +190 -0
  53. package/dist/components/connect-ai/types.d.ts +48 -0
  54. package/dist/components/connect-ai/types.d.ts.map +1 -0
  55. package/dist/components/connect-ai/types.js +1 -0
  56. package/dist/components/cookbook/CookbookApp.svelte +84 -5
  57. package/dist/components/cookbook/CookbookApp.svelte.d.ts +1 -1
  58. package/dist/components/cookbook/CookbookApp.svelte.d.ts.map +1 -1
  59. package/dist/components/cookbook/app-props.d.ts +65 -0
  60. package/dist/components/cookbook/app-props.d.ts.map +1 -0
  61. package/dist/components/cookbook/app-props.js +1 -0
  62. package/dist/components/cookbook/build.d.ts +3 -0
  63. package/dist/components/cookbook/build.d.ts.map +1 -1
  64. package/dist/components/cookbook/build.js +92 -8
  65. package/dist/components/cookbook/catalog.d.ts +2 -1
  66. package/dist/components/cookbook/catalog.d.ts.map +1 -1
  67. package/dist/components/cookbook/catalog.js +5 -2
  68. package/dist/components/cookbook/context.d.ts +6 -0
  69. package/dist/components/cookbook/context.d.ts.map +1 -1
  70. package/dist/components/cookbook/index.d.ts +2 -1
  71. package/dist/components/cookbook/index.d.ts.map +1 -1
  72. package/dist/components/cookbook/index.js +1 -1
  73. package/dist/components/cookbook/registry.d.ts +3 -0
  74. package/dist/components/cookbook/registry.d.ts.map +1 -1
  75. package/dist/components/cookbook/registry.js +5 -0
  76. package/dist/components/cookbook/server.d.ts +1 -0
  77. package/dist/components/cookbook/server.d.ts.map +1 -1
  78. package/dist/components/cookbook/surfaces.d.ts +14 -0
  79. package/dist/components/cookbook/surfaces.d.ts.map +1 -0
  80. package/dist/components/cookbook/surfaces.js +6 -0
  81. package/dist/components/cookbook/types.d.ts +0 -28
  82. package/dist/components/cookbook/types.d.ts.map +1 -1
  83. package/dist/components/import-export/ImportExport.svelte +21 -2
  84. package/dist/components/import-export/ImportExport.svelte.d.ts.map +1 -1
  85. package/dist/components/import-export/fields.d.ts +1 -0
  86. package/dist/components/import-export/fields.d.ts.map +1 -1
  87. package/dist/components/import-export/fields.js +8 -3
  88. package/dist/components/import-export/props.d.ts +5 -1
  89. package/dist/components/import-export/props.d.ts.map +1 -1
  90. package/dist/components/onboarding/FirstRunOnboarding.svelte +249 -0
  91. package/dist/components/onboarding/FirstRunOnboarding.svelte.d.ts +21 -0
  92. package/dist/components/onboarding/FirstRunOnboarding.svelte.d.ts.map +1 -0
  93. package/dist/components/onboarding/OnboardingAssistant.svelte +82 -0
  94. package/dist/components/onboarding/OnboardingAssistant.svelte.d.ts +19 -0
  95. package/dist/components/onboarding/OnboardingAssistant.svelte.d.ts.map +1 -0
  96. package/dist/components/onboarding/client.d.ts +7 -0
  97. package/dist/components/onboarding/client.d.ts.map +1 -0
  98. package/dist/components/onboarding/client.js +26 -0
  99. package/dist/components/onboarding/index.d.ts +5 -0
  100. package/dist/components/onboarding/index.d.ts.map +1 -0
  101. package/dist/components/onboarding/index.js +3 -0
  102. package/dist/components/onboarding/types.d.ts +38 -0
  103. package/dist/components/onboarding/types.d.ts.map +1 -0
  104. package/dist/components/onboarding/types.js +1 -0
  105. package/dist/components/overview/recipe-widgets.d.ts +2 -18
  106. package/dist/components/overview/recipe-widgets.d.ts.map +1 -1
  107. package/dist/components/overview/recipe-widgets.js +14 -14
  108. package/dist/components/screens/DetailScreen.svelte +40 -16
  109. package/dist/components/screens/DetailScreen.svelte.d.ts.map +1 -1
  110. package/dist/components/screens/EditForm.svelte +83 -18
  111. package/dist/components/screens/EditForm.svelte.d.ts.map +1 -1
  112. package/dist/components/screens/ListScreen.svelte +35 -9
  113. package/dist/components/screens/ListScreen.svelte.d.ts.map +1 -1
  114. package/dist/components/screens/RecipeScreens.svelte +78 -6
  115. package/dist/components/screens/RecipeScreens.svelte.d.ts +2 -1
  116. package/dist/components/screens/RecipeScreens.svelte.d.ts.map +1 -1
  117. package/dist/components/screens/RecordHeader.svelte +18 -4
  118. package/dist/components/screens/RecordHeader.svelte.d.ts +2 -1
  119. package/dist/components/screens/RecordHeader.svelte.d.ts.map +1 -1
  120. package/dist/components/screens/RecordScreen.svelte +22 -3
  121. package/dist/components/screens/RecordScreen.svelte.d.ts.map +1 -1
  122. package/dist/components/screens/ReferencePicker.svelte +103 -0
  123. package/dist/components/screens/ReferencePicker.svelte.d.ts +12 -0
  124. package/dist/components/screens/ReferencePicker.svelte.d.ts.map +1 -0
  125. package/dist/components/screens/fields.d.ts +6 -14
  126. package/dist/components/screens/fields.d.ts.map +1 -1
  127. package/dist/components/screens/fields.js +67 -10
  128. package/dist/components/screens/index.d.ts +3 -1
  129. package/dist/components/screens/index.d.ts.map +1 -1
  130. package/dist/components/screens/index.js +2 -0
  131. package/dist/components/screens/reference-labels.svelte.d.ts +11 -0
  132. package/dist/components/screens/reference-labels.svelte.d.ts.map +1 -0
  133. package/dist/components/screens/reference-labels.svelte.js +50 -0
  134. package/dist/components/screens/references.d.ts +6 -0
  135. package/dist/components/screens/references.d.ts.map +1 -0
  136. package/dist/components/screens/references.js +26 -0
  137. package/dist/components/screens/relations.d.ts +3 -1
  138. package/dist/components/screens/relations.d.ts.map +1 -1
  139. package/dist/components/screens/relations.js +4 -3
  140. package/dist/components/screens/roles.d.ts.map +1 -1
  141. package/dist/components/screens/roles.js +3 -2
  142. package/dist/components/screens/source.d.ts +37 -0
  143. package/dist/components/screens/source.d.ts.map +1 -0
  144. package/dist/components/screens/source.js +96 -0
  145. package/dist/components/screens/types.d.ts +63 -2
  146. package/dist/components/screens/types.d.ts.map +1 -1
  147. package/dist/components/screens/values.d.ts.map +1 -1
  148. package/dist/components/screens/values.js +5 -0
  149. package/dist/components/settings/OwnerApprovalsSettings.svelte +169 -0
  150. package/dist/components/settings/OwnerApprovalsSettings.svelte.d.ts +13 -0
  151. package/dist/components/settings/OwnerApprovalsSettings.svelte.d.ts.map +1 -0
  152. package/dist/components/settings/PrebuiltComponentsSettings.svelte +83 -0
  153. package/dist/components/settings/PrebuiltComponentsSettings.svelte.d.ts +14 -0
  154. package/dist/components/settings/PrebuiltComponentsSettings.svelte.d.ts.map +1 -0
  155. package/dist/components/settings/WorkProfileSettings.svelte +250 -0
  156. package/dist/components/settings/WorkProfileSettings.svelte.d.ts +22 -0
  157. package/dist/components/settings/WorkProfileSettings.svelte.d.ts.map +1 -0
  158. package/dist/components/settings/index.d.ts +3 -0
  159. package/dist/components/settings/index.d.ts.map +1 -1
  160. package/dist/components/settings/index.js +3 -0
  161. package/dist/components/workspace/admin-shell/AdminShell.svelte +186 -18
  162. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +26 -1
  163. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
  164. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +18 -3
  165. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts +6 -0
  166. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts.map +1 -1
  167. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +89 -5
  168. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts +7 -1
  169. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts.map +1 -1
  170. package/dist/components/workspace/admin-shell/layout.d.ts +4 -0
  171. package/dist/components/workspace/admin-shell/layout.d.ts.map +1 -1
  172. package/dist/components/workspace/admin-shell/layout.js +17 -4
  173. package/dist/components/workspace/admin-shell/settings-delta.d.ts.map +1 -1
  174. package/dist/components/workspace/admin-shell/settings-delta.js +4 -3
  175. package/dist/components/workspace/admin-shell/settings-sections.d.ts +10 -0
  176. package/dist/components/workspace/admin-shell/settings-sections.d.ts.map +1 -0
  177. package/dist/components/workspace/admin-shell/settings-sections.js +16 -0
  178. package/dist/components/workspace/admin-shell/settings.d.ts +7 -0
  179. package/dist/components/workspace/admin-shell/settings.d.ts.map +1 -1
  180. package/dist/components/workspace/admin-shell/settings.js +26 -0
  181. package/dist/components/workspace/admin-shell/shell-icons.d.ts +4 -0
  182. package/dist/components/workspace/admin-shell/shell-icons.d.ts.map +1 -1
  183. package/dist/components/workspace/admin-shell/shell-icons.js +4 -0
  184. package/dist/components/workspace/admin-shell/state.svelte.d.ts +13 -5
  185. package/dist/components/workspace/admin-shell/state.svelte.d.ts.map +1 -1
  186. package/dist/components/workspace/admin-shell/state.svelte.js +37 -2
  187. package/dist/components/workspace/admin-shell/types.d.ts +32 -1
  188. package/dist/components/workspace/admin-shell/types.d.ts.map +1 -1
  189. package/dist/components/workspace/index.d.ts +3 -2
  190. package/dist/components/workspace/index.d.ts.map +1 -1
  191. package/dist/components/workspace/index.js +2 -1
  192. package/dist/i18n/server.d.ts +2 -0
  193. package/dist/i18n/server.d.ts.map +1 -1
  194. package/dist/i18n/server.js +2 -0
  195. package/dist/i18n/strings.connect-ai.d.ts +57 -0
  196. package/dist/i18n/strings.connect-ai.d.ts.map +1 -0
  197. package/dist/i18n/strings.connect-ai.js +57 -0
  198. package/dist/i18n/strings.onboarding.d.ts +51 -0
  199. package/dist/i18n/strings.onboarding.d.ts.map +1 -0
  200. package/dist/i18n/strings.onboarding.js +51 -0
  201. package/dist/i18n/strings.screens.d.ts +12 -0
  202. package/dist/i18n/strings.screens.d.ts.map +1 -1
  203. package/dist/i18n/strings.screens.js +13 -1
  204. package/dist/i18n/strings.settings.d.ts +2 -0
  205. package/dist/i18n/strings.settings.d.ts.map +1 -1
  206. package/dist/i18n/strings.settings.js +2 -0
  207. package/dist/i18n/strings.workspace.d.ts +14 -0
  208. package/dist/i18n/strings.workspace.d.ts.map +1 -1
  209. package/dist/i18n/strings.workspace.js +15 -1
  210. package/dist/smrt-knowledge.okf.md +21 -10
  211. package/package.json +46 -17
@@ -63,9 +63,10 @@ import {
63
63
  type ShellNavGroup,
64
64
  type ShellNavItem,
65
65
  type ShellPanelDefaults,
66
+ type ShellPanelResize,
66
67
  type ShellSectionActionsContext,
68
+ type ShellViewport,
67
69
  } from '../workspace/admin-shell/types.js';
68
- import WorkspaceAccountMenu from '../workspace/admin-shell/WorkspaceAccountMenu.svelte';
69
70
  import DockSlot from './DockSlot.svelte';
70
71
  import DockToggles from './DockToggles.svelte';
71
72
  import type { DockToggle } from './dock-toggle.js';
@@ -76,11 +77,14 @@ import {
76
77
  resolvePhoneTabBar,
77
78
  } from './phone-tabs.js';
78
79
  import RuntimeDiagnosticsWebMcp from './RuntimeDiagnosticsWebMcp.svelte';
80
+ import ShellAccountMenu from './ShellAccountMenu.svelte';
79
81
  import ShellColorSchemeToggle from './ShellColorSchemeToggle.svelte';
80
82
  import type { ShellUser } from './shell-user.js';
81
83
  import type {
82
84
  AppShellAccountMenu,
83
85
  AppShellCommandPalette,
86
+ AppShellPanelToggle,
87
+ AppShellVoiceToggle,
84
88
  ShellSlotItem,
85
89
  } from './slot-item.js';
86
90
  import { runViewTransition } from './view-transition.js';
@@ -149,6 +153,47 @@ interface Props {
149
153
  * (trigger, dialog and global shortcut). Off unless given.
150
154
  */
151
155
  commandPalette?: AppShellCommandPalette;
156
+ /**
157
+ * A docked panel between the left sidebar and the main area (sidebar, panel,
158
+ * content), e.g. an assistant chat. Off unless given, so existing apps are
159
+ * unchanged. Stays mounted while closed. Off phones it has a draggable,
160
+ * keyboard-operable separator (`panelResize`); on phones it is a full-size
161
+ * view over the content that the phone tab bar's panel tab (see
162
+ * `panelToggle`) switches to.
163
+ */
164
+ panel?: Snippet<[{ viewport: ShellViewport; open: boolean }]>;
165
+ /**
166
+ * Turn the docked panel (and its toggle and phone tab) off without removing
167
+ * the `panel` snippet, e.g. when the app runs as a plugin inside a host app
168
+ * that is the chat. Default true.
169
+ */
170
+ panelEnabled?: boolean;
171
+ /**
172
+ * Whether the docked panel is open on tablet and desktop (bindable; the
173
+ * host persists it). On phones the open state is internal: the panel starts
174
+ * closed and closes when the location changes.
175
+ */
176
+ panelOpen?: boolean;
177
+ /** Accessible name of the docked panel (default "Panel"). */
178
+ panelLabel?: string;
179
+ /** Resizing of the docked panel; see `AdminShell` `panelResize` (default on). */
180
+ panelResize?: boolean | ShellPanelResize;
181
+ /** Width in px until the user resizes the panel (default 400). */
182
+ panelSize?: number;
183
+ /**
184
+ * The built-in item `item:panel-toggle`: an icon button with `aria-pressed`
185
+ * that opens and closes the docked panel. Default slot `leftSidebar.footer`,
186
+ * kept as an icon in the collapsed rail; a tab in the phone tab bar. Needs
187
+ * `panel`. `false` or omitted: no toggle (the host drives `panelOpen`).
188
+ */
189
+ panelToggle?: AppShellPanelToggle | false;
190
+ /**
191
+ * The built-in item `item:voice`: an icon button for a voice mode, default
192
+ * slot `leftSidebar.footer`, above the panel toggle; kept as an icon in the
193
+ * collapsed rail. See `AppShellVoiceToggle` (a toggle, or an honest
194
+ * not-available-yet state). `false` or omitted: none.
195
+ */
196
+ voiceToggle?: AppShellVoiceToggle | false;
152
197
  /** Options for the Provider's WebMCP integration; passed through unchanged. */
153
198
  webmcp?: boolean | WebMcpProviderConfig;
154
199
  /**
@@ -259,6 +304,8 @@ interface Props {
259
304
  * exist. Pass `true` (or a per-edge map) for the previous behaviour.
260
305
  */
261
306
  edgeToggles?: AdminShellProps['edgeToggles'];
307
+ /** Hairline above the sidebar footer (default true); see `AdminShell`. */
308
+ sidebarFooterDivider?: AdminShellProps['sidebarFooterDivider'];
262
309
  /** Keyboard shortcuts; default follows `edgeToggles` (see `AdminShell`). */
263
310
  hotkeys?: boolean;
264
311
  /**
@@ -324,6 +371,14 @@ let {
324
371
  appPanelDocs,
325
372
  dock,
326
373
  dockToggles = [],
374
+ panel: panelSnippet,
375
+ panelEnabled = true,
376
+ panelOpen = $bindable(true),
377
+ panelLabel,
378
+ panelResize,
379
+ panelSize,
380
+ panelToggle = false,
381
+ voiceToggle = false,
327
382
  slots: hostSlots,
328
383
  slotItems = [],
329
384
  layoutEditing = false,
@@ -332,6 +387,7 @@ let {
332
387
  sectionHref,
333
388
  iconComponent,
334
389
  edgeToggles = false,
390
+ sidebarFooterDivider = true,
335
391
  hotkeys,
336
392
  phoneTabBar = false,
337
393
  phoneDock,
@@ -344,6 +400,9 @@ const SHELL_BRAND_ITEM_ID = 'item:brand';
344
400
  const SHELL_ACCOUNT_ITEM_ID = 'item:account';
345
401
  const SHELL_COLOR_SCHEME_ITEM_ID = 'item:color-scheme';
346
402
  const SHELL_COMMAND_PALETTE_ITEM_ID = 'item:command-palette';
403
+ const SHELL_PANEL_TOGGLE_ITEM_ID = 'item:panel-toggle';
404
+ const SHELL_VOICE_ITEM_ID = 'item:voice';
405
+ const panel = $derived(panelEnabled ? panelSnippet : undefined);
347
406
  const target = shellTargetAction(provideShellTargets());
348
407
  /** Stable id of the built-in edit-layout toggle item. */
349
408
  const layoutFloating = $derived(
@@ -357,6 +416,8 @@ const { t } = useI18n();
357
416
  interface PlacedEntry extends ShellPlacementItem {
358
417
  render?: Snippet;
359
418
  toggle?: DockToggle;
419
+ /** Kept in the collapsed left rail (see `ShellSlotItem.rail`). */
420
+ rail?: boolean;
360
421
  /** Stays interactive and is not draggable while the layout is edited. */
361
422
  fixed?: boolean;
362
423
  }
@@ -388,6 +449,24 @@ const entries = $derived.by(() => {
388
449
  }
389
450
  }
390
451
  for (const item of slotItems) add({ ...item });
452
+ if (voiceToggle) {
453
+ add({
454
+ id: SHELL_VOICE_ITEM_ID,
455
+ label: voiceToggle.label,
456
+ slot: voiceToggle.slot ?? 'leftSidebar.footer',
457
+ render: voiceItem,
458
+ rail: true,
459
+ });
460
+ }
461
+ if (panel && panelToggle) {
462
+ add({
463
+ id: SHELL_PANEL_TOGGLE_ITEM_ID,
464
+ label: panelToggle.label,
465
+ slot: panelToggle.slot ?? 'leftSidebar.footer',
466
+ render: panelToggleItem,
467
+ rail: true,
468
+ });
469
+ }
391
470
  for (const toggle of dockToggles) {
392
471
  add({
393
472
  id: shellDockItemId(toggle.tool),
@@ -456,6 +535,7 @@ function withPhoneDock(base: ShellPanelDefaults | undefined) {
456
535
  const shell = untrack(() =>
457
536
  createShellState({
458
537
  config: withPhoneDock(config),
538
+ phoneNavigation: true,
459
539
  storageKey,
460
540
  layoutPanels: normalizeShellLayout(layout).panels,
461
541
  }),
@@ -483,7 +563,10 @@ const tabEntries = $derived(
483
563
  phoneTabNavEntries(applied.nav, applied.groups, navMode, sectionHref),
484
564
  );
485
565
  const tabBarOn = $derived(
486
- tabBarBudget > 0 && (tabEntries.length > 0 || dockToggles.length > 0),
566
+ tabBarBudget > 0 &&
567
+ (tabEntries.length > 0 ||
568
+ dockToggles.length > 0 ||
569
+ Boolean(panel && panelToggle)),
487
570
  );
488
571
  const tabDockToggle = $derived(tabBarOn ? dockToggles[0] : undefined);
489
572
 
@@ -492,7 +575,8 @@ const entriesFor = (name: ShellSlot): PlacedEntry[] => {
492
575
  const byId = new Map(entries.map((entry) => [entry.id, entry]));
493
576
  return slotIds[name].flatMap((id) =>
494
577
  (id === SHELL_ACCOUNT_ITEM_ID && accountInRail) ||
495
- (id === SHELL_COLOR_SCHEME_ITEM_ID && colorSchemeInSidebar)
578
+ (id === SHELL_COLOR_SCHEME_ITEM_ID && colorSchemeInSidebar) ||
579
+ (name === 'leftSidebar.footer' && railFooterActive && byId.get(id)?.rail)
496
580
  ? []
497
581
  : (byId.get(id) ?? []),
498
582
  );
@@ -578,6 +662,39 @@ const accountInRail = $derived(
578
662
  shell.isEdgeShown('left') &&
579
663
  shell.panels.left === 'collapsed',
580
664
  );
665
+ // Footer items flagged `rail` (the panel toggle, a host's voice toggle) stay
666
+ // as icons above the avatar in the collapsed rail.
667
+ const railFooterActive = $derived(
668
+ !editing &&
669
+ shell.viewport !== 'phone' &&
670
+ shell.isEdgeShown('left') &&
671
+ shell.panels.left === 'collapsed',
672
+ );
673
+ const railEntries = $derived(
674
+ railFooterActive
675
+ ? (slotIds['leftSidebar.footer'] ?? []).flatMap((id) => {
676
+ const entry = entries.find((candidate) => candidate.id === id);
677
+ return entry?.rail ? [entry] : [];
678
+ })
679
+ : [],
680
+ );
681
+ // ---- Docked panel -------------------------------------------------------
682
+ // Desktop and tablet use the host's persisted `panelOpen`; a phone has its
683
+ // own view state that starts on the content and returns to it on navigation.
684
+ let phonePanelOpen = $state(false);
685
+ const panelOpenNow = $derived(
686
+ shell.viewport === 'phone' ? phonePanelOpen : panelOpen,
687
+ );
688
+ function togglePanel(): void {
689
+ if (shell.viewport === 'phone') phonePanelOpen = !phonePanelOpen;
690
+ else panelOpen = !panelOpen;
691
+ }
692
+ let lastHref = untrack(() => currentHref);
693
+ $effect(() => {
694
+ if (currentHref === lastHref) return;
695
+ lastHref = currentHref;
696
+ phonePanelOpen = false;
697
+ });
581
698
  // ---- Color scheme ------------------------------------------------------
582
699
  // Placed in the left sidebar footer (the default) on desktop, the toggle
583
700
  // renders in the sidebar's utility row beside the chevron, expanded or as
@@ -611,7 +728,14 @@ function accountPlacement(
611
728
  // edge (start slots and the left sidebar to the start) so it stays inside
612
729
  // the viewport on a phone.
613
730
  const rendered =
614
- resolveSlot(slot, (region) => shell.isRegionVisible(region)) ?? slot;
731
+ resolveSlot(slot, (region) => {
732
+ // Match AdminShell: closed phone drawers still own their slots.
733
+ if (shell.viewport === 'phone' && region === 'leftSidebar')
734
+ return shell.isEdgeShown('left');
735
+ if (shell.viewport === 'phone' && region === 'rightSidebar')
736
+ return shell.isEdgeShown('right');
737
+ return shell.isRegionVisible(region);
738
+ }) ?? slot;
615
739
  const region = slotRegion(rendered);
616
740
  const opensUp = region === 'footer' || rendered.endsWith('.footer');
617
741
  const alignStart = rendered.endsWith('.start') || region === 'leftSidebar';
@@ -830,6 +954,8 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
830
954
  {#if !(tabDockToggle?.tool === entry.toggle.tool && shell.viewport === 'phone')}
831
955
  <DockToggles toggles={[entry.toggle]} />
832
956
  {/if}
957
+ {:else if entry.id === SHELL_PANEL_TOGGLE_ITEM_ID && tabBarOn && shell.viewport === 'phone'}
958
+ <!-- On phones the tab bar carries this toggle. -->
833
959
  {:else if entry.render}
834
960
  {@render entry.render()}
835
961
  {/if}
@@ -924,7 +1050,9 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
924
1050
  {/snippet}
925
1051
 
926
1052
  {#snippet accountMenuBody(compact: boolean, rail: boolean)}
927
- <WorkspaceAccountMenu
1053
+ <ShellAccountMenu
1054
+ hostItems={typeof accountMenu === 'object' ? accountMenu.items : undefined}
1055
+ themeItem={typeof accountMenu === 'object' && accountMenu.theme === true}
928
1056
  userName={accountIdentity.name || accountIdentity.email}
929
1057
  email={accountIdentity.email}
930
1058
  avatarUrl={accountIdentity.avatarUrl}
@@ -942,9 +1070,53 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
942
1070
  {/snippet}
943
1071
 
944
1072
  {#snippet railAccount()}
1073
+ {#each railEntries as entry (entry.id)}
1074
+ {@render entryBody(entry)}
1075
+ {/each}
945
1076
  {#if accountInRail}{@render accountMenuBody(true, true)}{/if}
946
1077
  {/snippet}
947
1078
 
1079
+ {#snippet voiceItem()}
1080
+ {#if voiceToggle}
1081
+ {@const unavailable = voiceToggle.state === 'unavailable'}
1082
+ {@const name = unavailable
1083
+ ? (voiceToggle.unavailableLabel ?? voiceToggle.label)
1084
+ : voiceToggle.label}
1085
+ <span
1086
+ use:target={SHELL_VOICE_ITEM_ID}
1087
+ class="smrt-app-shell-voice"
1088
+ data-state={voiceToggle.state}
1089
+ >
1090
+ <ShellIconButton
1091
+ icon={voiceToggle.state === 'on' ? 'mic' : 'micOff'}
1092
+ pressed={unavailable ? undefined : voiceToggle.state === 'on'}
1093
+ label={name}
1094
+ tooltip={name}
1095
+ aria-disabled={unavailable ? 'true' : undefined}
1096
+ onclick={(event: MouseEvent) => {
1097
+ if (unavailable) event.preventDefault();
1098
+ else voiceToggle.onpress?.();
1099
+ }}
1100
+ />
1101
+ </span>
1102
+ {/if}
1103
+ {/snippet}
1104
+
1105
+ {#snippet panelToggleItem()}
1106
+ {#if panelToggle}
1107
+ <span use:target={SHELL_PANEL_TOGGLE_ITEM_ID} class="smrt-app-shell-panel-toggle">
1108
+ <ShellIconButton
1109
+ icon={panelToggle.icon ?? 'chat'}
1110
+ pressed={panelOpenNow}
1111
+ label={panelToggle.label}
1112
+ tooltip={panelToggle.label}
1113
+ aria-controls="smrt-admin-shell-panel-panel"
1114
+ onclick={togglePanel}
1115
+ />
1116
+ </span>
1117
+ {/if}
1118
+ {/snippet}
1119
+
948
1120
  {#snippet colorSchemeItem()}
949
1121
  <ShellColorSchemeToggle />
950
1122
  {/snippet}
@@ -965,7 +1137,7 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
965
1137
  {/snippet}
966
1138
 
967
1139
  {#snippet brandItem()}
968
- <ShellBrand {title} {subtitle} {logoSrc} {logoAlt} {homeHref} compact={shell.viewport === 'phone'} />
1140
+ <ShellBrand {title} {subtitle} {logoSrc} {logoAlt} {homeHref} />
969
1141
  {/snippet}
970
1142
 
971
1143
  {#snippet editRegionControl(region: ShellRegion)}
@@ -1000,6 +1172,7 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
1000
1172
  {currentHref}
1001
1173
  budget={tabBarBudget}
1002
1174
  dockToggle={tabDockToggle}
1175
+ panelTab={panel && panelToggle ? { label: panelToggle.label, icon: panelToggle.icon ?? 'chat', open: panelOpenNow, toggle: togglePanel } : undefined}
1003
1176
  {iconComponent}
1004
1177
  />
1005
1178
  {/snippet}
@@ -1028,14 +1201,20 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
1028
1201
  slots={shellSlots}
1029
1202
  layoutEdit={editSurface}
1030
1203
  {edgeToggles}
1204
+ {sidebarFooterDivider}
1031
1205
  {hotkeys}
1032
1206
  brandInSlot
1033
1207
  phoneDockOpener={dockToggles.length === 0 && !tabBarOn}
1034
1208
  phoneBottomBar={tabBarOn ? phoneTabs : undefined}
1035
- tenantRailFooter={accountInRail ? railAccount : undefined}
1209
+ tenantRailFooter={accountInRail || railEntries.length > 0 ? railAccount : undefined}
1036
1210
  tenantUtilities={colorSchemeInSidebar ? colorSchemeItem : undefined}
1037
1211
  bind:rootElement={shellRoot}
1038
1212
  {floatingReserve}
1213
+ {panel}
1214
+ panelOpen={panelOpenNow}
1215
+ {panelLabel}
1216
+ {panelResize}
1217
+ {panelSize}
1039
1218
  >
1040
1219
  {#snippet appPanel()}
1041
1220
  <AppScopePanel
@@ -1246,4 +1425,38 @@ const EDGE_OF_REGION: Record<ShellRegion, PanelEdge> = {
1246
1425
  }
1247
1426
  }
1248
1427
  }
1428
+
1429
+ @layer smrt.structure {
1430
+ .smrt-app-shell-panel-toggle, .smrt-app-shell-voice {
1431
+ display: inline-flex;
1432
+ align-items: center;
1433
+ }
1434
+ .smrt-app-shell-voice[data-state='unavailable'] :global(.smrt-shell-icon-button) {
1435
+ cursor: not-allowed;
1436
+ }
1437
+ }
1438
+
1439
+ @layer smrt.theme {
1440
+ .smrt-app-shell-voice[data-state='unavailable'] {
1441
+ opacity: var(--smrt-state-disabled);
1442
+ }
1443
+ .smrt-app-shell-voice :global(.smrt-shell-icon-button[aria-pressed='true']) {
1444
+ background: var(--smrt-color-primary-container);
1445
+ color: var(--smrt-color-on-primary-container);
1446
+ }
1447
+ .smrt-app-shell-panel-toggle :global(.smrt-shell-icon-button[aria-pressed='true']) {
1448
+ background: var(--smrt-color-primary-container);
1449
+ color: var(--smrt-color-on-primary-container);
1450
+ }
1451
+ @media (forced-colors: active) {
1452
+ .smrt-app-shell-panel-toggle :global(.smrt-shell-icon-button[aria-pressed='true']), .smrt-app-shell-voice :global(.smrt-shell-icon-button[aria-pressed='true']) {
1453
+ background: Highlight;
1454
+ color: HighlightText;
1455
+ }
1456
+ .smrt-app-shell-voice[data-state='unavailable'] {
1457
+ opacity: 1;
1458
+ color: GrayText;
1459
+ }
1460
+ }
1461
+ }
1249
1462
  </style>
@@ -7,11 +7,11 @@ import { type Component, type Snippet } from 'svelte';
7
7
  import type { WebMcpProviderConfig } from '../../web/webmcp-provider.js';
8
8
  import { type ShellLayout } from '../workspace/admin-shell/layout.js';
9
9
  import { type ShellSlot } from '../workspace/admin-shell/slots.js';
10
- import { type AdminShellProps, type ShellNavGroup, type ShellNavItem, type ShellPanelDefaults, type ShellSectionActionsContext } from '../workspace/admin-shell/types.js';
10
+ import { type AdminShellProps, type ShellNavGroup, type ShellNavItem, type ShellPanelDefaults, type ShellPanelResize, type ShellSectionActionsContext, type ShellViewport } from '../workspace/admin-shell/types.js';
11
11
  import type { DockToggle } from './dock-toggle.js';
12
12
  import { type PhoneTabBarOptions } from './phone-tabs.js';
13
13
  import type { ShellUser } from './shell-user.js';
14
- import type { AppShellAccountMenu, AppShellCommandPalette, ShellSlotItem } from './slot-item.js';
14
+ import type { AppShellAccountMenu, AppShellCommandPalette, AppShellPanelToggle, AppShellVoiceToggle, ShellSlotItem } from './slot-item.js';
15
15
  interface Props {
16
16
  /** Application name shown in the shell brand and app panel. */
17
17
  title?: string;
@@ -78,6 +78,50 @@ interface Props {
78
78
  * (trigger, dialog and global shortcut). Off unless given.
79
79
  */
80
80
  commandPalette?: AppShellCommandPalette;
81
+ /**
82
+ * A docked panel between the left sidebar and the main area (sidebar, panel,
83
+ * content), e.g. an assistant chat. Off unless given, so existing apps are
84
+ * unchanged. Stays mounted while closed. Off phones it has a draggable,
85
+ * keyboard-operable separator (`panelResize`); on phones it is a full-size
86
+ * view over the content that the phone tab bar's panel tab (see
87
+ * `panelToggle`) switches to.
88
+ */
89
+ panel?: Snippet<[{
90
+ viewport: ShellViewport;
91
+ open: boolean;
92
+ }]>;
93
+ /**
94
+ * Turn the docked panel (and its toggle and phone tab) off without removing
95
+ * the `panel` snippet, e.g. when the app runs as a plugin inside a host app
96
+ * that is the chat. Default true.
97
+ */
98
+ panelEnabled?: boolean;
99
+ /**
100
+ * Whether the docked panel is open on tablet and desktop (bindable; the
101
+ * host persists it). On phones the open state is internal: the panel starts
102
+ * closed and closes when the location changes.
103
+ */
104
+ panelOpen?: boolean;
105
+ /** Accessible name of the docked panel (default "Panel"). */
106
+ panelLabel?: string;
107
+ /** Resizing of the docked panel; see `AdminShell` `panelResize` (default on). */
108
+ panelResize?: boolean | ShellPanelResize;
109
+ /** Width in px until the user resizes the panel (default 400). */
110
+ panelSize?: number;
111
+ /**
112
+ * The built-in item `item:panel-toggle`: an icon button with `aria-pressed`
113
+ * that opens and closes the docked panel. Default slot `leftSidebar.footer`,
114
+ * kept as an icon in the collapsed rail; a tab in the phone tab bar. Needs
115
+ * `panel`. `false` or omitted: no toggle (the host drives `panelOpen`).
116
+ */
117
+ panelToggle?: AppShellPanelToggle | false;
118
+ /**
119
+ * The built-in item `item:voice`: an icon button for a voice mode, default
120
+ * slot `leftSidebar.footer`, above the panel toggle; kept as an icon in the
121
+ * collapsed rail. See `AppShellVoiceToggle` (a toggle, or an honest
122
+ * not-available-yet state). `false` or omitted: none.
123
+ */
124
+ voiceToggle?: AppShellVoiceToggle | false;
81
125
  /** Options for the Provider's WebMCP integration; passed through unchanged. */
82
126
  webmcp?: boolean | WebMcpProviderConfig;
83
127
  /**
@@ -194,6 +238,8 @@ interface Props {
194
238
  * exist. Pass `true` (or a per-edge map) for the previous behaviour.
195
239
  */
196
240
  edgeToggles?: AdminShellProps['edgeToggles'];
241
+ /** Hairline above the sidebar footer (default true); see `AdminShell`. */
242
+ sidebarFooterDivider?: AdminShellProps['sidebarFooterDivider'];
197
243
  /** Keyboard shortcuts; default follows `edgeToggles` (see `AdminShell`). */
198
244
  hotkeys?: boolean;
199
245
  /**
@@ -225,7 +271,7 @@ interface Props {
225
271
  chrome?: boolean;
226
272
  children: Snippet;
227
273
  }
228
- declare const AppShell: Component<Props, {}, "">;
274
+ declare const AppShell: Component<Props, {}, "panelOpen">;
229
275
  type AppShell = ReturnType<typeof AppShell>;
230
276
  export default AppShell;
231
277
  //# sourceMappingURL=AppShell.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/AppShell.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,8CAA8C,CAAC;AACtD,OAAO,+CAA+C,CAAC;AACvD,OAAO,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAiB,MAAM,QAAQ,CAAC;AAKrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAOzE,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,oCAAoC,CAAC;AAY5C,OAAO,EAKL,KAAK,SAAS,EAIf,MAAM,mCAAmC,CAAC;AAO3C,OAAO,EACL,KAAK,eAAe,EAGpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAChC,MAAM,mCAAmC,CAAC;AAI3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;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AAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAC7C,0EAA0E;IAC1E,oBAAoB,CAAC,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAC;IAC/D,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,kBAAkB,CAAC;IAC3C;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAu1BD,QAAA,MAAM,QAAQ,mCAAwC,CAAC;AACvD,KAAK,QAAQ,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
@@ -61,16 +61,18 @@ function enhanceForm(form: HTMLFormElement) {
61
61
  ? t(M['ui.owner_setup.link_missing_heading'])
62
62
  : t(M['ui.owner_setup.heading'])}
63
63
  </h1>
64
- {#if link === 'unavailable'}
64
+ {#if data.launchMode === 'desktop' && link !== 'ready'}
65
+ <p data-owner-setup="desktop">{t(M['ui.owner_setup.desktop_reopen'])}</p>
66
+ {:else if link === 'unavailable'}
65
67
  <p data-owner-setup="unavailable">{t(M['ui.owner_setup.unavailable'])}</p>
66
68
  {:else if link === 'missing' || link === 'expired'}
67
69
  <div data-owner-setup="recovery">
68
70
  <p>{t(M['ui.owner_setup.link_missing_body'])}</p>
69
71
  <dl>
70
72
  <dt>{t(M['ui.owner_setup.recovery_open'])}</dt>
71
- <dd><code>{'pnpm app:open'}</code></dd>
73
+ <dd><code>{'smrt app open'}</code></dd>
72
74
  <dt>{t(M['ui.owner_setup.recovery_recover'])}</dt>
73
- <dd><code>{'pnpm app:recover'}</code></dd>
75
+ <dd><code>{'smrt app stop; smrt app recover; smrt app start; smrt app open'}</code></dd>
74
76
  </dl>
75
77
  </div>
76
78
  {:else}
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerSetupForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/OwnerSetupForm.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAGhC,UAAU,KAAK;IACb,6EAA6E;IAC7E,IAAI,EAAE,cAAc,CAAC;IACrB,qDAAqD;IACrD,IAAI,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACnC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACtE;AAsFD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"OwnerSetupForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/OwnerSetupForm.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAGhC,UAAU,KAAK;IACb,6EAA6E;IAC7E,IAAI,EAAE,cAAc,CAAC;IACrB,qDAAqD;IACrD,IAAI,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACnC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK;QAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACtE;AAwFD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -38,6 +38,16 @@ interface Props {
38
38
  budget: number;
39
39
  /** The dock toggle that gets a tab; without one a "Tools" tab opens the right edge when it has tools. */
40
40
  dockToggle?: DockToggle;
41
+ /**
42
+ * A tab for the docked panel (`AppShell` `panel` + `panelToggle`): pressed
43
+ * while the panel view is open. Takes the dock tab's place in the budget.
44
+ */
45
+ panelTab?: {
46
+ label: string;
47
+ icon: string;
48
+ open: boolean;
49
+ toggle: () => void;
50
+ };
41
51
  /** Renders host icon names. */
42
52
  iconComponent?: Component<{ name: string; size?: number }>;
43
53
  }
@@ -47,6 +57,7 @@ let {
47
57
  currentHref = '',
48
58
  budget,
49
59
  dockToggle,
60
+ panelTab,
50
61
  iconComponent,
51
62
  }: Props = $props();
52
63
 
@@ -57,7 +68,9 @@ const dock = useShellDock();
57
68
  const toolsTab = $derived(
58
69
  !dockToggle && shell.isEdgeShown('right') && shell.focusTools.length > 0,
59
70
  );
60
- const hasDockTab = $derived(Boolean(dockToggle) || toolsTab);
71
+ const hasDockTab = $derived(
72
+ Boolean(dockToggle) || toolsTab || Boolean(panelTab),
73
+ );
61
74
  const plan = $derived(planPhoneTabs(entries, budget, hasDockTab));
62
75
 
63
76
  function dockIcon(toggle: DockToggle): string {
@@ -140,6 +153,20 @@ const items = $derived.by(() => {
140
153
  onclick: openTools,
141
154
  });
142
155
  }
156
+ if (panelTab) {
157
+ out.push({
158
+ id: 'panel',
159
+ label: panelTab.label,
160
+ iconName:
161
+ isShellIconName(panelTab.icon) || iconComponent
162
+ ? panelTab.icon
163
+ : SHELL_DEFAULT_TOOL_ICON,
164
+ active: panelTab.open,
165
+ expanded: panelTab.open,
166
+ controls: 'smrt-admin-shell-panel-panel',
167
+ onclick: () => panelTab.toggle(),
168
+ });
169
+ }
143
170
  if (plan.more) {
144
171
  out.push({
145
172
  id: 'more',
@@ -10,6 +10,16 @@ interface Props {
10
10
  budget: number;
11
11
  /** The dock toggle that gets a tab; without one a "Tools" tab opens the right edge when it has tools. */
12
12
  dockToggle?: DockToggle;
13
+ /**
14
+ * A tab for the docked panel (`AppShell` `panel` + `panelToggle`): pressed
15
+ * while the panel view is open. Takes the dock tab's place in the budget.
16
+ */
17
+ panelTab?: {
18
+ label: string;
19
+ icon: string;
20
+ open: boolean;
21
+ toggle: () => void;
22
+ };
13
23
  /** Renders host icon names. */
14
24
  iconComponent?: Component<{
15
25
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"PhoneTabBar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/PhoneTabBar.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAWxC,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,KAAK;IACb,mEAAmE;IACnE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,yGAAyG;IACzG,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,+BAA+B;IAC/B,aAAa,CAAC,EAAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5D;AAmID,QAAA,MAAM,WAAW,0BAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"PhoneTabBar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/PhoneTabBar.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAWxC,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,KAAK,gBAAgB,EAEtB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,KAAK;IACb,mEAAmE;IACnE,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,yGAAyG;IACzG,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,EAAE,MAAM,IAAI,CAAC;KACpB,CAAC;IACF,+BAA+B;IAC/B,aAAa,CAAC,EAAE,SAAS,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5D;AAoJD,QAAA,MAAM,WAAW,0BAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -0,0 +1,46 @@
1
+ <script lang="ts">
2
+ /**
3
+ * `AppShell`'s account menu: `WorkspaceAccountMenu` plus the host's items
4
+ * (Approvals, History, ...) and, when asked, a Theme item that switches the
5
+ * color scheme of the `ThemeProvider` the shell mounts (no second scheme
6
+ * store). Order: host items, Theme, then the menu's Settings and Sign out.
7
+ */
8
+ import { useI18n } from '@happyvertical/smrt-ui/i18n';
9
+ import { getThemeContext } from '@happyvertical/smrt-ui/themes';
10
+ import type { ComponentProps } from 'svelte';
11
+ import { M } from '../../i18n/strings.workspace.js';
12
+ import type { WorkspaceAccountMenuItem } from '../workspace/admin-shell/types.js';
13
+ import WorkspaceAccountMenu from '../workspace/admin-shell/WorkspaceAccountMenu.svelte';
14
+
15
+ interface Props
16
+ extends Omit<ComponentProps<typeof WorkspaceAccountMenu>, 'items'> {
17
+ /** Host items shown first (see `WorkspaceAccountMenu` `items`). */
18
+ hostItems?: WorkspaceAccountMenuItem[];
19
+ /** Add the Theme item (needs the shell's `ThemeProvider`). */
20
+ themeItem?: boolean;
21
+ }
22
+
23
+ let { hostItems = [], themeItem = false, ...rest }: Props = $props();
24
+
25
+ const { t } = useI18n();
26
+ // svelte-ignore state_referenced_locally -- context is read once at init
27
+ const theme = themeItem ? getThemeContext() : null;
28
+ const dark = $derived(theme?.state.isDark ?? false);
29
+ const items = $derived.by(() => {
30
+ const out = [...hostItems];
31
+ if (theme) {
32
+ out.push({
33
+ id: 'theme',
34
+ label: t(M['ui.app_shell.theme_item'], {
35
+ mode: t(
36
+ M[dark ? 'ui.app_shell.theme_dark' : 'ui.app_shell.theme_light'],
37
+ ),
38
+ }),
39
+ onselect: () => theme.toggleColorScheme(),
40
+ });
41
+ }
42
+ return out;
43
+ });
44
+ </script>
45
+
46
+ <WorkspaceAccountMenu {...rest} {items} />
@@ -0,0 +1,13 @@
1
+ import type { ComponentProps } from 'svelte';
2
+ import type { WorkspaceAccountMenuItem } from '../workspace/admin-shell/types.js';
3
+ import WorkspaceAccountMenu from '../workspace/admin-shell/WorkspaceAccountMenu.svelte';
4
+ interface Props extends Omit<ComponentProps<typeof WorkspaceAccountMenu>, 'items'> {
5
+ /** Host items shown first (see `WorkspaceAccountMenu` `items`). */
6
+ hostItems?: WorkspaceAccountMenuItem[];
7
+ /** Add the Theme item (needs the shell's `ThemeProvider`). */
8
+ themeItem?: boolean;
9
+ }
10
+ declare const ShellAccountMenu: import("svelte").Component<Props, {}, "">;
11
+ type ShellAccountMenu = ReturnType<typeof ShellAccountMenu>;
12
+ export default ShellAccountMenu;
13
+ //# sourceMappingURL=ShellAccountMenu.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShellAccountMenu.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/ShellAccountMenu.svelte.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AAGxF,UAAU,KACR,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAClE,mEAAmE;IACnE,SAAS,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACvC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAsCD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}