@happyvertical/smrt-svelte 0.55.15 → 0.55.17

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 (153) hide show
  1. package/README.md +5 -3
  2. package/agents/cookbook-shell.md +7 -1
  3. package/agents/overview-surfaces.md +5 -0
  4. package/agents/workspace.md +145 -11
  5. package/dist/browser-ai/svelte/components/DownloadProgress.svelte +22 -19
  6. package/dist/browser-ai/svelte/components/ModelStatusControl.svelte +16 -13
  7. package/dist/browser-ai/svelte/components/STTTest.svelte +41 -38
  8. package/dist/browser-ai/svelte/components/VoiceInput.svelte +17 -14
  9. package/dist/components/activity/ActivityList.svelte +1 -1
  10. package/dist/components/app/AppShell.svelte +274 -9
  11. package/dist/components/app/AppShell.svelte.d.ts +63 -2
  12. package/dist/components/app/AppShell.svelte.d.ts.map +1 -1
  13. package/dist/components/app/DockToggles.svelte +27 -1
  14. package/dist/components/app/DockToggles.svelte.d.ts.map +1 -1
  15. package/dist/components/app/OwnerSetupForm.svelte +98 -34
  16. package/dist/components/app/OwnerSetupForm.svelte.d.ts +4 -0
  17. package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -1
  18. package/dist/components/app/PhoneTabBar.svelte +136 -0
  19. package/dist/components/app/PhoneTabBar.svelte.d.ts +22 -0
  20. package/dist/components/app/PhoneTabBar.svelte.d.ts.map +1 -0
  21. package/dist/components/app/ShellSettingsPage.svelte +17 -2
  22. package/dist/components/app/ShellSettingsPage.svelte.d.ts +11 -16
  23. package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -1
  24. package/dist/components/app/dock-toggle.d.ts +3 -2
  25. package/dist/components/app/dock-toggle.d.ts.map +1 -1
  26. package/dist/components/app/index.d.ts +2 -1
  27. package/dist/components/app/index.d.ts.map +1 -1
  28. package/dist/components/app/index.js +1 -0
  29. package/dist/components/app/owner-setup-types.d.ts +5 -0
  30. package/dist/components/app/owner-setup-types.d.ts.map +1 -1
  31. package/dist/components/app/phone-tabs.d.ts +41 -0
  32. package/dist/components/app/phone-tabs.d.ts.map +1 -0
  33. package/dist/components/app/phone-tabs.js +66 -0
  34. package/dist/components/app/slot-item.d.ts +16 -0
  35. package/dist/components/app/slot-item.d.ts.map +1 -1
  36. package/dist/components/app/view-transition.d.ts +43 -0
  37. package/dist/components/app/view-transition.d.ts.map +1 -0
  38. package/dist/components/app/view-transition.js +76 -0
  39. package/dist/components/audit/AuditList.svelte +4 -1
  40. package/dist/components/audit/RecordHistory.svelte +4 -1
  41. package/dist/components/board/Board.svelte +4 -1
  42. package/dist/components/command-palette/CommandPalette.svelte +4 -1
  43. package/dist/components/command-palette/CommandPalette.svelte.d.ts +2 -0
  44. package/dist/components/command-palette/CommandPalette.svelte.d.ts.map +1 -1
  45. package/dist/components/command-palette/CommandPaletteDialog.svelte +3 -0
  46. package/dist/components/command-palette/CommandPaletteTrigger.svelte +3 -0
  47. package/dist/components/cookbook/CookbookApp.svelte +2 -1
  48. package/dist/components/cookbook/CookbookApp.svelte.d.ts.map +1 -1
  49. package/dist/components/cookbook/CookbookSectionPage.svelte +4 -1
  50. package/dist/components/cookbook/brand-theme.d.ts.map +1 -1
  51. package/dist/components/cookbook/brand-theme.js +21 -2
  52. package/dist/components/cookbook/build.js +1 -1
  53. package/dist/components/cookbook/theme.d.ts.map +1 -1
  54. package/dist/components/cookbook/theme.js +9 -5
  55. package/dist/components/cookbook/types.d.ts +5 -1
  56. package/dist/components/cookbook/types.d.ts.map +1 -1
  57. package/dist/components/forms/AddressInput.svelte +25 -22
  58. package/dist/components/forms/CheckboxInput.svelte +8 -5
  59. package/dist/components/forms/DateRangeInput.svelte +41 -38
  60. package/dist/components/forms/DateTimeInput.svelte +29 -26
  61. package/dist/components/forms/FileUpload.svelte +24 -21
  62. package/dist/components/forms/Form.svelte +34 -31
  63. package/dist/components/forms/FormMicButton.svelte +10 -7
  64. package/dist/components/forms/FormScope.svelte +4 -1
  65. package/dist/components/forms/MeasurementInput.svelte +26 -23
  66. package/dist/components/forms/MoneyInput.svelte +18 -15
  67. package/dist/components/forms/NumberInput.svelte +17 -14
  68. package/dist/components/forms/PhoneInput.svelte +37 -34
  69. package/dist/components/forms/SearchInput.svelte +16 -13
  70. package/dist/components/forms/SelectInput.svelte +17 -14
  71. package/dist/components/forms/TextInput.svelte +19 -16
  72. package/dist/components/forms/TextareaInput.svelte +21 -18
  73. package/dist/components/import-export/ImportExport.svelte +4 -1
  74. package/dist/components/module/ModulePanel.svelte +14 -11
  75. package/dist/components/notifications/NotificationBell.svelte +4 -1
  76. package/dist/components/overview/OverviewAssistantUndo.svelte +4 -1
  77. package/dist/components/overview/OverviewGrid.svelte +11 -6
  78. package/dist/components/overview/OverviewGrid.svelte.d.ts.map +1 -1
  79. package/dist/components/overview/WidgetOptionsForm.svelte +3 -0
  80. package/dist/components/overview/widgets/ChartWidget.svelte +7 -4
  81. package/dist/components/overview/widgets/MetricWidget.svelte +5 -2
  82. package/dist/components/overview/widgets/NoteWidget.svelte +5 -2
  83. package/dist/components/overview/widgets/RecordListWidget.svelte +6 -3
  84. package/dist/components/overview/widgets/ShortcutsWidget.svelte +12 -6
  85. package/dist/components/overview/widgets/ShortcutsWidget.svelte.d.ts.map +1 -1
  86. package/dist/components/screens/DetailScreen.svelte +6 -3
  87. package/dist/components/screens/EditForm.svelte +6 -3
  88. package/dist/components/screens/ListScreen.svelte +4 -1
  89. package/dist/components/screens/RecipeScreens.svelte +1 -1
  90. package/dist/components/settings/SettingsCatalog.svelte +4 -1
  91. package/dist/components/sortable/Sortable.svelte +11 -5
  92. package/dist/components/sortable/Sortable.svelte.d.ts.map +1 -1
  93. package/dist/components/workspace/Breadcrumbs.svelte +4 -1
  94. package/dist/components/workspace/NavTree.svelte +4 -1
  95. package/dist/components/workspace/RoleShell.svelte +4 -1
  96. package/dist/components/workspace/WorkspaceShell.svelte +43 -40
  97. package/dist/components/workspace/admin-shell/ActivityItem.svelte +4 -1
  98. package/dist/components/workspace/admin-shell/ActivityList.svelte +5 -2
  99. package/dist/components/workspace/admin-shell/ActivityTicker.svelte +6 -3
  100. package/dist/components/workspace/admin-shell/ActivityToasts.svelte +4 -1
  101. package/dist/components/workspace/admin-shell/AdminShell.svelte +502 -72
  102. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +7 -1
  103. package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
  104. package/dist/components/workspace/admin-shell/AppScopePanel.svelte +4 -1
  105. package/dist/components/workspace/admin-shell/HotkeyInput.svelte +4 -1
  106. package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte +21 -8
  107. package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts +9 -2
  108. package/dist/components/workspace/admin-shell/PhoneBottomBar.svelte.d.ts.map +1 -1
  109. package/dist/components/workspace/admin-shell/PhoneTopBar.svelte +4 -1
  110. package/dist/components/workspace/admin-shell/ShellBrand.svelte +3 -0
  111. package/dist/components/workspace/admin-shell/ShellCorner.svelte +4 -1
  112. package/dist/components/workspace/admin-shell/ShellIconButton.svelte +4 -1
  113. package/dist/components/workspace/admin-shell/ShellLayoutEditor.svelte +4 -1
  114. package/dist/components/workspace/admin-shell/ShellNavEditor.svelte +13 -7
  115. package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts +1 -1
  116. package/dist/components/workspace/admin-shell/ShellNavEditor.svelte.d.ts.map +1 -1
  117. package/dist/components/workspace/admin-shell/ShellNavToggle.svelte +4 -1
  118. package/dist/components/workspace/admin-shell/ShellSectionIcon.svelte +4 -1
  119. package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte +15 -10
  120. package/dist/components/workspace/admin-shell/ShellSectionMenu.svelte.d.ts.map +1 -1
  121. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte +236 -48
  122. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts +11 -1
  123. package/dist/components/workspace/admin-shell/ShellSettingsPanel.svelte.d.ts.map +1 -1
  124. package/dist/components/workspace/admin-shell/ShellTitle.svelte +4 -1
  125. package/dist/components/workspace/admin-shell/ShortcutsOverlay.svelte +4 -1
  126. package/dist/components/workspace/admin-shell/SystemScopePanel.svelte +4 -1
  127. package/dist/components/workspace/admin-shell/SystemStatusChips.svelte +5 -2
  128. package/dist/components/workspace/admin-shell/TenantNav.svelte +81 -36
  129. package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts +4 -3
  130. package/dist/components/workspace/admin-shell/TenantNav.svelte.d.ts.map +1 -1
  131. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte +305 -53
  132. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts +15 -2
  133. package/dist/components/workspace/admin-shell/WorkspaceAccountMenu.svelte.d.ts.map +1 -1
  134. package/dist/components/workspace/admin-shell/motion.d.ts +19 -0
  135. package/dist/components/workspace/admin-shell/motion.d.ts.map +1 -0
  136. package/dist/components/workspace/admin-shell/motion.js +44 -0
  137. package/dist/components/workspace/admin-shell/settings.d.ts +1 -0
  138. package/dist/components/workspace/admin-shell/settings.d.ts.map +1 -1
  139. package/dist/components/workspace/admin-shell/settings.js +1 -1
  140. package/dist/components/workspace/admin-shell/shell-icons.d.ts +8 -0
  141. package/dist/components/workspace/admin-shell/shell-icons.d.ts.map +1 -1
  142. package/dist/components/workspace/admin-shell/shell-icons.js +8 -0
  143. package/dist/components/workspace/admin-shell/state.svelte.d.ts +6 -0
  144. package/dist/components/workspace/admin-shell/state.svelte.d.ts.map +1 -1
  145. package/dist/components/workspace/admin-shell/state.svelte.js +15 -0
  146. package/dist/components/workspace/admin-shell/types.d.ts +13 -3
  147. package/dist/components/workspace/admin-shell/types.d.ts.map +1 -1
  148. package/dist/components/workspace/tools-dock/ToolsDock.svelte +41 -38
  149. package/dist/i18n/strings.workspace.d.ts +37 -0
  150. package/dist/i18n/strings.workspace.d.ts.map +1 -1
  151. package/dist/i18n/strings.workspace.js +42 -2
  152. package/dist/mcp-apps/McpAppsBridge.svelte +4 -1
  153. package/package.json +14 -14
@@ -1,5 +1,10 @@
1
1
  <script lang="ts">
2
2
  import { useShellDock } from '../workspace/admin-shell/dock.js';
3
+ import {
4
+ isShellIconName,
5
+ SHELL_DEFAULT_TOOL_ICON,
6
+ SHELL_ICON_PATHS,
7
+ } from '../workspace/admin-shell/shell-icons.js';
3
8
  import type { DockToggle } from './dock-toggle.js';
4
9
 
5
10
  interface Props {
@@ -54,14 +59,27 @@ function press(event: MouseEvent, toggle: DockToggle): void {
54
59
  >
55
60
  <path d="M21 11.5a8.5 8.5 0 0 1-12.4 7.5L3 20.5l1.6-5A8.5 8.5 0 1 1 21 11.5z" />
56
61
  </svg>
62
+ {:else if icon === undefined || isShellIconName(icon)}
63
+ <svg
64
+ viewBox="0 0 24 24"
65
+ width="20"
66
+ height="20"
67
+ fill="currentColor"
68
+ aria-hidden="true"
69
+ focusable="false"
70
+ >
71
+ <path d={SHELL_ICON_PATHS[icon === undefined ? SHELL_DEFAULT_TOOL_ICON : icon]} />
72
+ </svg>
57
73
  {:else}
58
- <span aria-hidden="true">{icon ?? toggle.label.charAt(0)}</span>
74
+ <span aria-hidden="true">{icon}</span>
59
75
  {/if}
60
76
  </button>
61
77
  {/each}
62
78
  </div>
63
79
 
64
80
  <style>
81
+ @layer smrt.reset, smrt.structure, smrt.theme;
82
+ @layer smrt.theme {
65
83
  .smrt-dock-toggles {
66
84
  display: flex;
67
85
  align-items: center;
@@ -81,6 +99,13 @@ function press(event: MouseEvent, toggle: DockToggle): void {
81
99
  cursor: pointer;
82
100
  }
83
101
 
102
+ @media (max-width: 48rem) {
103
+ .smrt-dock-toggles__button {
104
+ min-inline-size: var(--smrt-touch-target-min);
105
+ min-block-size: var(--smrt-touch-target-min);
106
+ }
107
+ }
108
+
84
109
  .smrt-dock-toggles__button:hover {
85
110
  background: var(--smrt-color-surface-container-high);
86
111
  }
@@ -99,4 +124,5 @@ function press(event: MouseEvent, toggle: DockToggle): void {
99
124
  opacity: 0.5;
100
125
  cursor: default;
101
126
  }
127
+ }
102
128
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"DockToggles.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/DockToggles.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,UAAU,KAAK;IACb,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AA2CD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"DockToggles.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/DockToggles.svelte.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,UAAU,KAAK;IACb,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAgDD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { Input } from '@happyvertical/smrt-ui/forms';
3
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
- import { Button } from '@happyvertical/smrt-ui/ui';
4
+ import { Button, Card } from '@happyvertical/smrt-ui/ui';
5
5
  import { M } from '../../i18n/strings.workspace.js';
6
6
  import type {
7
7
  OwnerSetupData,
@@ -13,6 +13,10 @@ interface Props {
13
13
  data: OwnerSetupData;
14
14
  /** The route's `form` prop (action failure data). */
15
15
  form?: OwnerSetupFormResult | null;
16
+ /** Application name shown as the brand above the card. */
17
+ title?: string;
18
+ /** Optional logo shown before the title. */
19
+ logoSrc?: string;
16
20
  /** Also ask for an optional workspace name (field `tenantName`). */
17
21
  askTenantName?: boolean;
18
22
  /** Form action URL; omit to post to the current route's default action. */
@@ -27,11 +31,17 @@ interface Props {
27
31
  let {
28
32
  data,
29
33
  form = null,
34
+ title = 'SMRT',
35
+ logoSrc,
30
36
  askTenantName = false,
31
37
  action,
32
38
  enhance,
33
39
  }: Props = $props();
34
40
  const { t } = useI18n();
41
+ const link = $derived(
42
+ data.link ??
43
+ (!data.available ? 'unavailable' : data.token ? 'ready' : 'missing'),
44
+ );
35
45
 
36
46
  function enhanceForm(form: HTMLFormElement) {
37
47
  const handle = enhance?.(form);
@@ -39,51 +49,105 @@ function enhanceForm(form: HTMLFormElement) {
39
49
  }
40
50
  </script>
41
51
 
42
- <main class="smrt-owner-setup">
43
- <h1>{t(M['ui.owner_setup.heading'])}</h1>
44
- {#if !data.available}
45
- <p data-owner-setup="unavailable">{t(M['ui.owner_setup.unavailable'])}</p>
46
- {:else}
47
- <p>{t(M['ui.owner_setup.intro'])}</p>
48
- {#if form?.message}<p role="alert" data-owner-setup="error">{form.message}</p>{/if}
49
- <!-- raw-primitive-allow: native POST form so owner setup works without JavaScript; the host's SvelteKit `enhance` is attached when available -->
50
- <form method="POST" {action} {@attach enhanceForm}>
51
- <!-- raw-primitive-allow: hidden, non-interactive carrier for the single-use bootstrap token -->
52
- <input type="hidden" name="token" value={data.token} />
53
- <label>
54
- {t(M['ui.owner_setup.name'])}
55
- <Input name="name" autocomplete="name" required />
56
- </label>
57
- <label>
58
- {t(M['ui.owner_setup.email'])}
59
- <Input name="email" type="email" autocomplete="email" required />
60
- </label>
61
- {#if askTenantName}
52
+ <main class="smrt-owner-setup" data-smrt-component="OwnerSetupForm">
53
+ <div class="smrt-owner-setup__brand" data-smrt-part="brand">
54
+ {#if logoSrc}<img src={logoSrc} alt="" />{/if}
55
+ <strong>{title}</strong>
56
+ </div>
57
+ <div class="smrt-owner-setup__card" data-smrt-part="panel">
58
+ <Card padding="lg">
59
+ <h1>
60
+ {link === 'missing' || link === 'expired'
61
+ ? t(M['ui.owner_setup.link_missing_heading'])
62
+ : t(M['ui.owner_setup.heading'])}
63
+ </h1>
64
+ {#if link === 'unavailable'}
65
+ <p data-owner-setup="unavailable">{t(M['ui.owner_setup.unavailable'])}</p>
66
+ {:else if link === 'missing' || link === 'expired'}
67
+ <div data-owner-setup="recovery">
68
+ <p>{t(M['ui.owner_setup.link_missing_body'])}</p>
69
+ <dl>
70
+ <dt>{t(M['ui.owner_setup.recovery_open'])}</dt>
71
+ <dd><code>{'pnpm app:open'}</code></dd>
72
+ <dt>{t(M['ui.owner_setup.recovery_recover'])}</dt>
73
+ <dd><code>{'pnpm app:recover'}</code></dd>
74
+ </dl>
75
+ </div>
76
+ {:else}
77
+ <p>{t(M['ui.owner_setup.intro'])}</p>
78
+ {#if form?.message}<p role="alert" data-owner-setup="error">{form.message}</p>{/if}
79
+ <!-- raw-primitive-allow: native POST form so owner setup works without JavaScript; the host's SvelteKit `enhance` is attached when available -->
80
+ <form method="POST" {action} {@attach enhanceForm}>
81
+ <!-- raw-primitive-allow: hidden, non-interactive carrier for the single-use bootstrap token -->
82
+ <input type="hidden" name="token" value={data.token} />
62
83
  <label>
63
- {t(M['ui.owner_setup.tenant_name'])}
64
- <Input name="tenantName" autocomplete="organization" />
84
+ {t(M['ui.owner_setup.name'])}
85
+ <Input name="name" autocomplete="name" required />
65
86
  </label>
66
- {/if}
67
- <Button type="submit">{t(M['ui.owner_setup.submit'])}</Button>
68
- </form>
69
- {/if}
87
+ <label>
88
+ {t(M['ui.owner_setup.email'])}
89
+ <Input name="email" type="email" autocomplete="email" required />
90
+ </label>
91
+ {#if askTenantName}
92
+ <label>
93
+ {t(M['ui.owner_setup.tenant_name'])}
94
+ <Input name="tenantName" autocomplete="organization" />
95
+ </label>
96
+ {/if}
97
+ <Button type="submit">{t(M['ui.owner_setup.submit'])}</Button>
98
+ </form>
99
+ {/if}
100
+ </Card>
101
+ </div>
70
102
  </main>
71
103
 
72
104
  <style>
105
+ @layer smrt.reset, smrt.structure, smrt.theme;
106
+ @layer smrt.theme {
73
107
  .smrt-owner-setup {
74
- max-width: 36rem;
75
- margin: 4rem auto;
76
- padding: 1.5rem;
108
+ display: grid;
109
+ gap: var(--smrt-spacing-5);
110
+ justify-items: center;
111
+ align-content: center;
112
+ min-block-size: 100dvh;
113
+ box-sizing: border-box;
114
+ padding: var(--smrt-spacing-6);
115
+ }
116
+ .smrt-owner-setup__card {
117
+ inline-size: 100%;
118
+ max-inline-size: 36rem;
119
+ }
120
+ .smrt-owner-setup__brand {
121
+ display: flex;
122
+ align-items: center;
123
+ gap: var(--smrt-spacing-3);
124
+ color: var(--smrt-color-on-surface);
77
125
  }
78
- form {
126
+ .smrt-owner-setup__brand img {
127
+ block-size: var(--smrt-control-target-min);
128
+ inline-size: auto;
129
+ }
130
+ h1 {
131
+ margin-block-start: 0;
132
+ }
133
+ form,
134
+ dl {
79
135
  display: grid;
80
- gap: 1rem;
136
+ gap: var(--smrt-spacing-4);
137
+ }
138
+ dl,
139
+ dd {
140
+ margin: 0;
141
+ }
142
+ dt {
143
+ color: var(--smrt-color-on-surface-variant);
81
144
  }
82
145
  label {
83
146
  display: grid;
84
- gap: 0.35rem;
147
+ gap: var(--smrt-spacing-2);
85
148
  }
86
149
  [role='alert'] {
87
- color: var(--smrt-color-error, #b3261e);
150
+ color: var(--smrt-color-error);
88
151
  }
152
+ }
89
153
  </style>
@@ -4,6 +4,10 @@ interface Props {
4
4
  data: OwnerSetupData;
5
5
  /** The route's `form` prop (action failure data). */
6
6
  form?: OwnerSetupFormResult | null;
7
+ /** Application name shown as the brand above the card. */
8
+ title?: string;
9
+ /** Optional logo shown before the title. */
10
+ logoSrc?: string;
7
11
  /** Also ask for an optional workspace name (field `tenantName`). */
8
12
  askTenantName?: boolean;
9
13
  /** Form action URL; omit to post to the current route's default action. */
@@ -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,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;AA0DD,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;AAsFD,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
@@ -0,0 +1,136 @@
1
+ <script lang="ts">
2
+ /**
3
+ * Phone tab bar: the footer region's phone presentation (conceptually the
4
+ * footer's center slot), not a new region. Navigation tabs (icon, label,
5
+ * `aria-current`), then the dock tab, then "More" when navigation overflows.
6
+ * Rendered by `AppShell` into `AdminShell`'s `phoneBottomBar` track when
7
+ * `phoneTabBar` is on.
8
+ */
9
+ import { useI18n } from '@happyvertical/smrt-ui/i18n';
10
+ import type { Component } from 'svelte';
11
+ import { M } from '../../i18n/strings.workspace.js';
12
+ import { useAdminShell } from '../workspace/admin-shell/context.js';
13
+ import { useShellDock } from '../workspace/admin-shell/dock.js';
14
+ import PhoneBottomBar from '../workspace/admin-shell/PhoneBottomBar.svelte';
15
+ import {
16
+ isShellIconName,
17
+ SHELL_DEFAULT_TOOL_ICON,
18
+ SHELL_PLACEHOLDER_ICON,
19
+ } from '../workspace/admin-shell/shell-icons.js';
20
+ import type { PhoneBottomBarEntry } from '../workspace/admin-shell/types.js';
21
+ import type { DockToggle } from './dock-toggle.js';
22
+ import {
23
+ isTabCurrent,
24
+ type PhoneTabNavEntry,
25
+ planPhoneTabs,
26
+ } from './phone-tabs.js';
27
+
28
+ interface Props {
29
+ /** Navigation destinations in order (see `phoneTabNavEntries`). */
30
+ entries: PhoneTabNavEntry[];
31
+ /** Current path, for `aria-current`. */
32
+ currentHref?: string;
33
+ /** Navigation and dock tabs before "More". */
34
+ budget: number;
35
+ /** The dock toggle that gets a tab; without one a "Tools" tab opens the right edge when it has tools. */
36
+ dockToggle?: DockToggle;
37
+ /** Renders host icon names. */
38
+ iconComponent?: Component<{ name: string; size?: number }>;
39
+ }
40
+
41
+ let {
42
+ entries,
43
+ currentHref = '',
44
+ budget,
45
+ dockToggle,
46
+ iconComponent,
47
+ }: Props = $props();
48
+
49
+ const { t } = useI18n();
50
+ const shell = useAdminShell();
51
+ const dock = useShellDock();
52
+
53
+ const toolsTab = $derived(
54
+ !dockToggle && shell.isEdgeShown('right') && shell.focusTools.length > 0,
55
+ );
56
+ const hasDockTab = $derived(Boolean(dockToggle) || toolsTab);
57
+ const plan = $derived(planPhoneTabs(entries, budget, hasDockTab));
58
+
59
+ function dockIcon(toggle: DockToggle): string {
60
+ const icon =
61
+ toggle.icon ?? (toggle.tool === 'assistant' ? 'chat' : undefined);
62
+ return icon && (isShellIconName(icon) || iconComponent)
63
+ ? icon
64
+ : SHELL_DEFAULT_TOOL_ICON;
65
+ }
66
+
67
+ function openTools(): void {
68
+ if (shell.panels.right === 'expanded') {
69
+ shell.collapsePanel('right');
70
+ return;
71
+ }
72
+ const tool =
73
+ shell.focusTools.find((entry) => entry.id === shell.activeFocusToolId) ??
74
+ shell.focusTools[0];
75
+ if (tool) shell.openFocusTool(tool.id);
76
+ else shell.expandPanel('right');
77
+ }
78
+
79
+ function openMore(): void {
80
+ shell.setPanelState(
81
+ 'left',
82
+ shell.panels.left === 'expanded' ? 'collapsed' : 'expanded',
83
+ );
84
+ }
85
+
86
+ const items = $derived.by(() => {
87
+ const out: PhoneBottomBarEntry[] = plan.nav.map((entry) => ({
88
+ id: entry.id,
89
+ label: entry.label,
90
+ href: entry.href,
91
+ iconName: entry.icon ?? SHELL_PLACEHOLDER_ICON,
92
+ active: isTabCurrent(entry.href, currentHref),
93
+ }));
94
+ if (dockToggle) {
95
+ const tool = dockToggle.tool;
96
+ out.push({
97
+ id: `dock:${tool}`,
98
+ label: dockToggle.label,
99
+ iconName: dockIcon(dockToggle),
100
+ active: dock.isOpen(tool),
101
+ expanded: dock.isOpen(tool),
102
+ controls: 'smrt-admin-shell-right-panel',
103
+ onclick: () => {
104
+ if (dock.has(tool) && dock.available) dock.toggle(tool);
105
+ },
106
+ });
107
+ } else if (toolsTab) {
108
+ out.push({
109
+ id: 'tools',
110
+ label: t(M['ui.admin_shell.tools']),
111
+ iconName: SHELL_DEFAULT_TOOL_ICON,
112
+ active: shell.panels.right === 'expanded',
113
+ expanded: shell.panels.right === 'expanded',
114
+ controls: 'smrt-admin-shell-right-panel',
115
+ onclick: openTools,
116
+ });
117
+ }
118
+ if (plan.more) {
119
+ out.push({
120
+ id: 'more',
121
+ label: t(M['ui.phone_tab_bar.more']),
122
+ iconName: 'more',
123
+ expanded: shell.panels.left === 'expanded',
124
+ controls: 'smrt-admin-shell-left-panel',
125
+ onclick: openMore,
126
+ });
127
+ }
128
+ return out;
129
+ });
130
+ </script>
131
+
132
+ <PhoneBottomBar
133
+ {items}
134
+ {iconComponent}
135
+ label={t(M['ui.phone_tab_bar.label'])}
136
+ />
@@ -0,0 +1,22 @@
1
+ import type { Component } from 'svelte';
2
+ import type { DockToggle } from './dock-toggle.js';
3
+ import { type PhoneTabNavEntry } from './phone-tabs.js';
4
+ interface Props {
5
+ /** Navigation destinations in order (see `phoneTabNavEntries`). */
6
+ entries: PhoneTabNavEntry[];
7
+ /** Current path, for `aria-current`. */
8
+ currentHref?: string;
9
+ /** Navigation and dock tabs before "More". */
10
+ budget: number;
11
+ /** The dock toggle that gets a tab; without one a "Tools" tab opens the right edge when it has tools. */
12
+ dockToggle?: DockToggle;
13
+ /** Renders host icon names. */
14
+ iconComponent?: Component<{
15
+ name: string;
16
+ size?: number;
17
+ }>;
18
+ }
19
+ declare const PhoneTabBar: Component<Props, {}, "">;
20
+ type PhoneTabBar = ReturnType<typeof PhoneTabBar>;
21
+ export default PhoneTabBar;
22
+ //# sourceMappingURL=PhoneTabBar.svelte.d.ts.map
@@ -0,0 +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,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,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;AA8GD,QAAA,MAAM,WAAW,0BAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -3,18 +3,32 @@ import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
3
  import { M } from '../../i18n/strings.workspace.js';
4
4
  import ShellSettingsPanel from '../workspace/admin-shell/ShellSettingsPanel.svelte';
5
5
 
6
+ interface Props {
7
+ /**
8
+ * Where the Account section's sign-out link goes; shown only when given. A
9
+ * link is a GET: never point it at the runtime's POST-only `/sign-out`; use
10
+ * `onSignOut` for that.
11
+ */
12
+ signOutHref?: string;
13
+ /** Called by the sign-out control instead of following `signOutHref`. */
14
+ onSignOut?: () => void;
15
+ }
16
+
17
+ const { signOutHref, onSignOut }: Props = $props();
6
18
  const { t } = useI18n();
7
19
  </script>
8
20
 
9
- <section class="smrt-shell-settings-page">
21
+ <section class="smrt-shell-settings-page" data-smrt-component="ShellSettingsPage">
10
22
  <header>
11
23
  <h1>{t(M['ui.shell_settings_page.heading'])}</h1>
12
24
  <p>{t(M['ui.shell_settings_page.description'])}</p>
13
25
  </header>
14
- <ShellSettingsPanel />
26
+ <ShellSettingsPanel appearance account {signOutHref} {onSignOut} />
15
27
  </section>
16
28
 
17
29
  <style>
30
+ @layer smrt.reset, smrt.structure, smrt.theme;
31
+ @layer smrt.theme {
18
32
  .smrt-shell-settings-page {
19
33
  display: grid;
20
34
  gap: var(--smrt-spacing-6, 1.5rem);
@@ -29,4 +43,5 @@ const { t } = useI18n();
29
43
  p {
30
44
  margin: 0;
31
45
  }
46
+ }
32
47
  </style>
@@ -1,19 +1,14 @@
1
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
- $$bindings?: Bindings;
4
- } & Exports;
5
- (internal: unknown, props: {
6
- $$events?: Events;
7
- $$slots?: Slots;
8
- }): Exports & {
9
- $set?: any;
10
- $on?: any;
11
- };
12
- z_$$bindings?: Bindings;
1
+ interface Props {
2
+ /**
3
+ * Where the Account section's sign-out link goes; shown only when given. A
4
+ * link is a GET: never point it at the runtime's POST-only `/sign-out`; use
5
+ * `onSignOut` for that.
6
+ */
7
+ signOutHref?: string;
8
+ /** Called by the sign-out control instead of following `signOutHref`. */
9
+ onSignOut?: () => void;
13
10
  }
14
- declare const ShellSettingsPage: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type ShellSettingsPage = InstanceType<typeof ShellSettingsPage>;
11
+ declare const ShellSettingsPage: import("svelte").Component<Props, {}, "">;
12
+ type ShellSettingsPage = ReturnType<typeof ShellSettingsPage>;
18
13
  export default ShellSettingsPage;
19
14
  //# sourceMappingURL=ShellSettingsPage.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ShellSettingsPage.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/ShellSettingsPage.svelte.ts"],"names":[],"mappings":"AA2BA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,iBAAiB;;kBAA+E,CAAC;AACrF,KAAK,iBAAiB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAClE,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ShellSettingsPage.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/app/ShellSettingsPage.svelte.ts"],"names":[],"mappings":"AAQA,UAAU,KAAK;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAuBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
@@ -7,8 +7,9 @@ export interface DockToggle {
7
7
  label: string;
8
8
  /**
9
9
  * Icon name. `chat` (the default for the `assistant` tool) draws a
10
- * chat bubble; any other text is shown as a glyph. Without an icon the
11
- * label's first letter stands in.
10
+ * chat bubble, a shell icon name (`SHELL_ICON_PATHS`) draws that icon, and
11
+ * any other text is shown as a glyph. Without an icon a generic tool icon
12
+ * stands in, never the label's first letter.
12
13
  */
13
14
  icon?: string;
14
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dock-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/app/dock-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
1
+ {"version":3,"file":"dock-toggle.d.ts","sourceRoot":"","sources":["../../../src/components/app/dock-toggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAEnE,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
@@ -13,5 +13,6 @@ export type { OwnerSetupData, OwnerSetupFormResult, } from './owner-setup-types.
13
13
  export { default as RuntimeDiagnosticsWebMcp } from './RuntimeDiagnosticsWebMcp.svelte';
14
14
  export { createRuntimeDiagnosticsWebMcpTool, type RegisterRuntimeDiagnosticsWebMcpOptions, RUNTIME_DIAGNOSTICS_ENDPOINT, RUNTIME_DIAGNOSTICS_WEBMCP_TOOL_NAME, type RuntimeDiagnosticsWebMcpOwner, registerRuntimeDiagnosticsWebMcp, } from './runtime-diagnostics-webmcp.js';
15
15
  export { default as ShellSettingsPage } from './ShellSettingsPage.svelte';
16
- export type { ShellSlotItem } from './slot-item.js';
16
+ export type { AppShellAccountMenu, AppShellCommandPalette, ShellSlotItem, } from './slot-item.js';
17
+ export { createOnNavigateViewTransition, type RunViewTransitionOptions, runViewTransition, VIEW_TRANSITION_ATTRIBUTE, type ViewTransitionNavigation, } from './view-transition.js';
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,0BAA0B,EAC/B,iBAAiB,EACjB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EACL,kCAAkC,EAClC,KAAK,uCAAuC,EAC5C,4BAA4B,EAC5B,oCAAoC,EACpC,KAAK,6BAA6B,EAClC,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/app/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,WAAW,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,0BAA0B,EAC/B,iBAAiB,EACjB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EACV,cAAc,EACd,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AACxF,OAAO,EACL,kCAAkC,EAClC,KAAK,uCAAuC,EAC5C,4BAA4B,EAC5B,oCAAoC,EACpC,KAAK,6BAA6B,EAClC,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,KAAK,wBAAwB,EAC7B,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,wBAAwB,GAC9B,MAAM,sBAAsB,CAAC"}
@@ -11,3 +11,4 @@ export { default as OwnerSetupForm } from './OwnerSetupForm.svelte';
11
11
  export { default as RuntimeDiagnosticsWebMcp } from './RuntimeDiagnosticsWebMcp.svelte';
12
12
  export { createRuntimeDiagnosticsWebMcpTool, RUNTIME_DIAGNOSTICS_ENDPOINT, RUNTIME_DIAGNOSTICS_WEBMCP_TOOL_NAME, registerRuntimeDiagnosticsWebMcp, } from './runtime-diagnostics-webmcp.js';
13
13
  export { default as ShellSettingsPage } from './ShellSettingsPage.svelte';
14
+ export { createOnNavigateViewTransition, runViewTransition, VIEW_TRANSITION_ATTRIBUTE, } from './view-transition.js';
@@ -4,6 +4,11 @@ export interface OwnerSetupData {
4
4
  available: boolean;
5
5
  /** Single-use bootstrap token carried from the setup link. */
6
6
  token: string;
7
+ /**
8
+ * State of the setup link (`createOwnerSetupPage` sets it). Omitted by older
9
+ * loads: derived from `available` and `token`.
10
+ */
11
+ link?: 'ready' | 'missing' | 'expired' | 'unavailable';
7
12
  }
8
13
  /** Shape of the setup action's failure data (`fail(status, { code, message })`). */
9
14
  export interface OwnerSetupFormResult {
@@ -1 +1 @@
1
- {"version":3,"file":"owner-setup-types.d.ts","sourceRoot":"","sources":["../../../src/components/app/owner-setup-types.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,SAAS,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,oFAAoF;AACpF,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
1
+ {"version":3,"file":"owner-setup-types.d.ts","sourceRoot":"","sources":["../../../src/components/app/owner-setup-types.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,SAAS,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;CACxD;AAED,oFAAoF;AACpF,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,41 @@
1
+ import type { ShellNavGroup, ShellNavItem } from '../workspace/admin-shell/types.js';
2
+ /** `phoneTabBar` option object. */
3
+ export interface PhoneTabBarOptions {
4
+ /** Navigation and dock tabs shown before "More" (default 4). */
5
+ items?: number;
6
+ }
7
+ /** Default number of navigation and dock tabs. */
8
+ export declare const PHONE_TAB_DEFAULT_ITEMS = 4;
9
+ /** One navigation destination eligible for a tab. */
10
+ export interface PhoneTabNavEntry {
11
+ id: string;
12
+ label: string;
13
+ href: string;
14
+ icon?: string;
15
+ }
16
+ /** The tabs a phone bar shows for a navigation and dock configuration. */
17
+ export interface PhoneTabPlan {
18
+ /** Navigation tabs, in order. */
19
+ nav: PhoneTabNavEntry[];
20
+ /** True when navigation overflows and a "More" tab opens the drawer. */
21
+ more: boolean;
22
+ }
23
+ /** Normalise the `phoneTabBar` prop: `null` when off, else the item budget. */
24
+ export declare function resolvePhoneTabBar(value: boolean | PhoneTabBarOptions | undefined): {
25
+ items: number;
26
+ } | null;
27
+ /**
28
+ * Top-level navigation destinations in order: the flat items, then either each
29
+ * group's entries (`items` mode) or one entry per group (`sections` modes),
30
+ * the way the left sidebar lists them.
31
+ */
32
+ export declare function phoneTabNavEntries(nav: readonly ShellNavItem[], groups: readonly ShellNavGroup[], navMode?: 'items' | 'sections' | 'sections-with-items', sectionHref?: (sectionId: string) => string | undefined): PhoneTabNavEntry[];
33
+ /**
34
+ * Choose the tabs: `budget` counts navigation and dock tabs together (the
35
+ * dock tab takes one place when present); "More" is added on top only when
36
+ * navigation overflows.
37
+ */
38
+ export declare function planPhoneTabs(entries: readonly PhoneTabNavEntry[], budget: number, hasDockTab: boolean): PhoneTabPlan;
39
+ /** True when `href` is the current page or an ancestor of it. */
40
+ export declare function isTabCurrent(href: string, currentHref: string): boolean;
41
+ //# sourceMappingURL=phone-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-tabs.d.ts","sourceRoot":"","sources":["../../../src/components/app/phone-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACb,MAAM,mCAAmC,CAAC;AAE3C,mCAAmC;AACnC,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,GAAG,EAAE,gBAAgB,EAAE,CAAC;IACxB,wEAAwE;IACxE,IAAI,EAAE,OAAO,CAAC;CACf;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,GAC9C;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAO1B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,SAAS,YAAY,EAAE,EAC5B,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,OAAO,GAAE,OAAO,GAAG,UAAU,GAAG,qBAA+B,EAC/D,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GACtD,gBAAgB,EAAE,CA8BpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,SAAS,gBAAgB,EAAE,EACpC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,GAClB,YAAY,CAMd;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAEvE"}