zidane-ui 9.1.13 → 9.1.14

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 (309) hide show
  1. package/dist/adapters/index.d.ts +2 -2
  2. package/dist/adapters/index.js +2 -2
  3. package/dist/adapters/live.d.ts +29 -3
  4. package/dist/adapters/live.js +9 -1
  5. package/dist/adapters/server-composer-host.js +17 -2
  6. package/dist/adapters/server-extensions-host.d.ts +0 -1
  7. package/dist/adapters/server-extensions-host.js +5 -16
  8. package/dist/adapters/server-git-host.js +7 -16
  9. package/dist/adapters/server-host.js +181 -43
  10. package/dist/adapters/server-machines-host.d.ts +2 -0
  11. package/dist/adapters/server-machines-host.js +24 -25
  12. package/dist/adapters/server-onboarding-host.d.ts +1 -1
  13. package/dist/adapters/server-onboarding-host.js +3 -4
  14. package/dist/adapters/server-session-host.js +22 -3
  15. package/dist/adapters/server-settings-accounts.js +2 -2
  16. package/dist/adapters/server-settings-host.js +3 -3
  17. package/dist/adapters/server-settings-performance.js +7 -9
  18. package/dist/adapters/server-settings-sections.js +13 -14
  19. package/dist/adapters/server-sidebar-host.js +2 -2
  20. package/dist/adapters/sse-host.js +68 -3
  21. package/dist/adapters/sse-protocol.d.ts +12 -2
  22. package/dist/adapters/sse-protocol.js +4 -2
  23. package/dist/app/AppHostProvider.js +4 -3
  24. package/dist/app/ModalProvider.d.ts +13 -3
  25. package/dist/app/ModalProvider.js +103 -24
  26. package/dist/app/NoticeStack.d.ts +33 -0
  27. package/dist/app/NoticeStack.js +90 -0
  28. package/dist/app/index.d.ts +3 -2
  29. package/dist/app/index.js +3 -2
  30. package/dist/appearance/AppearanceProvider.js +2 -2
  31. package/dist/appearance/headless/index.js +1 -1
  32. package/dist/approvals/headless/index.js +2 -2
  33. package/dist/chat/SessionFilterMenu.d.ts +1 -1
  34. package/dist/chat/SessionFilterMenu.js +2 -1
  35. package/dist/chat/Transcript.js +1 -1
  36. package/dist/chat/composer/Composer.js +9 -6
  37. package/dist/chat/composer/ComposerEditor.js +1 -1
  38. package/dist/chat/composer/ConversationBadges.js +1 -1
  39. package/dist/chat/composer/ModelChainList.js +17 -8
  40. package/dist/chat/composer/ModelChainTooltip.js +5 -2
  41. package/dist/chat/composer/use-composer-stores.js +1 -1
  42. package/dist/chat/composer/use-draft-target.d.ts +20 -1
  43. package/dist/chat/composer/use-draft-target.js +122 -6
  44. package/dist/chat/composer/use-new-session-defaults.d.ts +5 -1
  45. package/dist/chat/composer/use-new-session-defaults.js +17 -4
  46. package/dist/chat/composer/use-run-meter.js +1 -1
  47. package/dist/chat/composer/use-send-prompt.js +1 -1
  48. package/dist/chat/headless/chip-labels.d.ts +1 -0
  49. package/dist/chat/headless/chip-labels.js +1 -0
  50. package/dist/chat/headless/composer/index.js +2 -2
  51. package/dist/chat/headless/draft-target.d.ts +21 -1
  52. package/dist/chat/headless/fixture-host.js +17 -2
  53. package/dist/chat/headless/host.d.ts +3 -3
  54. package/dist/chat/headless/index.d.ts +9 -9
  55. package/dist/chat/headless/index.js +15 -15
  56. package/dist/chat/headless/labels.d.ts +13 -4
  57. package/dist/chat/headless/labels.js +8 -5
  58. package/dist/chat/headless/session-list.d.ts +20 -6
  59. package/dist/chat/headless/session-list.js +1 -0
  60. package/dist/chat/headless/sidebar/directory.d.ts +56 -14
  61. package/dist/chat/headless/sidebar/directory.js +149 -70
  62. package/dist/chat/headless/sidebar/index.d.ts +3 -3
  63. package/dist/chat/headless/sidebar/index.js +3 -3
  64. package/dist/chat/headless/sidebar/labels.d.ts +15 -6
  65. package/dist/chat/headless/sidebar/types.d.ts +3 -1
  66. package/dist/chat/headless/sidebar/view.d.ts +13 -5
  67. package/dist/chat/headless/sidebar/view.js +31 -11
  68. package/dist/chat/headless/streams/actions.d.ts +5 -3
  69. package/dist/chat/headless/streams/actions.js +3 -2
  70. package/dist/chat/headless/streams/index.d.ts +3 -3
  71. package/dist/chat/headless/streams/merge.d.ts +6 -10
  72. package/dist/chat/headless/streams/merge.js +7 -21
  73. package/dist/chat/headless/streams/session-streams.d.ts +29 -4
  74. package/dist/chat/headless/streams/session-streams.js +86 -0
  75. package/dist/chat/headless/streams/store.d.ts +162 -16
  76. package/dist/chat/headless/streams/store.js +334 -38
  77. package/dist/chat/headless/streams/types.d.ts +10 -7
  78. package/dist/chat/headless/transcript-labels.d.ts +1 -0
  79. package/dist/chat/interactions/PlanCard.js +10 -3
  80. package/dist/chat/interactions/QuestionForm.js +7 -3
  81. package/dist/chat/interactions/card-ui.d.ts +5 -3
  82. package/dist/chat/interactions/card-ui.js +9 -7
  83. package/dist/chat/sidebar/SessionSidebar.js +5 -5
  84. package/dist/chat/sidebar/SidebarFilterMenu.js +3 -1
  85. package/dist/chat/sidebar/SidebarFrame.d.ts +4 -0
  86. package/dist/chat/sidebar/SidebarFrame.js +27 -9
  87. package/dist/chat/sidebar/SidebarGroupHeader.js +1 -1
  88. package/dist/chat/sidebar/SidebarHostProvider.d.ts +8 -5
  89. package/dist/chat/sidebar/SidebarHostProvider.js +13 -9
  90. package/dist/chat/sidebar/SidebarToggleButton.js +7 -3
  91. package/dist/chat/sidebar/index.d.ts +2 -2
  92. package/dist/chat/sidebar/session-menu.js +4 -4
  93. package/dist/chat/sidebar/useSaveViewAsSpace.js +2 -2
  94. package/dist/chat/testing/contract.js +2 -2
  95. package/dist/chat/transcript/AuthFailureCard.js +11 -8
  96. package/dist/chat/transcript/BadgeMenu.js +13 -2
  97. package/dist/chat/transcript/MermaidDiagram.js +7 -3
  98. package/dist/chat/transcript/fold.d.ts +4 -0
  99. package/dist/chat/transcript/fold.js +53 -22
  100. package/dist/chat/transcript/script-input.d.ts +1 -1
  101. package/dist/chat/transcript/shell-block.js +8 -4
  102. package/dist/chat/transcript/useStickToBottom.js +12 -0
  103. package/dist/components/BrowserSignIn.js +23 -21
  104. package/dist/components/Form.d.ts +6 -4
  105. package/dist/components/Form.js +16 -8
  106. package/dist/components/LoadError.d.ts +4 -2
  107. package/dist/components/LoadError.js +13 -9
  108. package/dist/components/Notice.d.ts +29 -0
  109. package/dist/components/Notice.js +63 -0
  110. package/dist/components/PanelEmpty.d.ts +1 -1
  111. package/dist/components/PanelEmpty.js +4 -2
  112. package/dist/components/Restricted.d.ts +1 -1
  113. package/dist/components/palette/PaletteList.js +8 -1
  114. package/dist/components/palette/PalettePanel.js +14 -6
  115. package/dist/core.css +24 -5
  116. package/dist/dist/{index-Bq87OcGy.d.ts → index-C6rzc-tt.d.ts} +28 -3
  117. package/dist/dist/index.d.ts +2 -2
  118. package/dist/dist/{timeout-B5pO5I5a.d.ts → timeout-Cz9dRF8Q.d.ts} +1 -1
  119. package/dist/extensions/ExtensionSettingsPage.js +2 -5
  120. package/dist/extensions/ExtensionSettingsSection.js +5 -4
  121. package/dist/extensions/ExtensionSettingsSidebar.js +3 -7
  122. package/dist/extensions/SettingsWireForm.d.ts +1 -7
  123. package/dist/extensions/SettingsWireForm.js +7 -5
  124. package/dist/extensions/headless/fixture-host.d.ts +1 -5
  125. package/dist/extensions/headless/fixture-host.js +2 -5
  126. package/dist/extensions/headless/host.d.ts +1 -11
  127. package/dist/extensions/headless/index.d.ts +3 -3
  128. package/dist/extensions/headless/index.js +6 -6
  129. package/dist/extensions/headless/select.d.ts +1 -11
  130. package/dist/extensions/headless/select.js +1 -18
  131. package/dist/extensions/hooks.js +1 -1
  132. package/dist/files/EditorColumn.js +13 -2
  133. package/dist/files/MediaDiff.js +1 -1
  134. package/dist/files/TreeColumn.js +13 -20
  135. package/dist/files/useEntryActions.js +1 -1
  136. package/dist/files/useOpenFiles.js +3 -1
  137. package/dist/git/BranchMenu.js +6 -4
  138. package/dist/git/ImportRepoDialog.js +18 -9
  139. package/dist/git/MoveSessionDialog.js +16 -8
  140. package/dist/git/RemoteFolderPicker.js +35 -17
  141. package/dist/git/SyncChip.js +17 -17
  142. package/dist/git/WherePicker.d.ts +16 -1
  143. package/dist/git/WherePicker.js +81 -37
  144. package/dist/git/headless/environment.d.ts +33 -3
  145. package/dist/git/headless/environment.js +33 -5
  146. package/dist/git/headless/index.d.ts +2 -2
  147. package/dist/git/headless/index.js +2 -2
  148. package/dist/git/headless/labels.d.ts +15 -2
  149. package/dist/git/headless/labels.js +17 -4
  150. package/dist/git/useEnvironmentChoices.d.ts +3 -1
  151. package/dist/git/useEnvironmentChoices.js +7 -4
  152. package/dist/index.d.ts +2 -1
  153. package/dist/index.js +2 -1
  154. package/dist/keybindings/KeyCommands.js +1 -1
  155. package/dist/keybindings/KeybindingsProvider.js +1 -1
  156. package/dist/keybindings/headless/index.js +2 -2
  157. package/dist/keybindings/headless/overrides.js +1 -1
  158. package/dist/labels.d.ts +5 -0
  159. package/dist/labels.js +5 -0
  160. package/dist/machines/AddMachineDialog.d.ts +34 -0
  161. package/dist/machines/AddMachineDialog.js +464 -0
  162. package/dist/machines/Banners.d.ts +33 -4
  163. package/dist/machines/Banners.js +64 -3
  164. package/dist/machines/DaemonMenu.js +27 -4
  165. package/dist/machines/HostCapabilities.d.ts +1 -3
  166. package/dist/machines/HostCapabilities.js +24 -45
  167. package/dist/machines/HostSyncPanel.js +124 -130
  168. package/dist/machines/HostsSection.d.ts +4 -1
  169. package/dist/machines/HostsSection.js +30 -7
  170. package/dist/machines/MachinesExplainer.d.ts +17 -0
  171. package/dist/machines/MachinesExplainer.js +71 -0
  172. package/dist/machines/MachinesProvider.d.ts +14 -2
  173. package/dist/machines/MachinesProvider.js +35 -1
  174. package/dist/machines/ServerAddedCard.d.ts +31 -0
  175. package/dist/machines/ServerAddedCard.js +72 -0
  176. package/dist/machines/ServerCard.js +91 -215
  177. package/dist/machines/ServerMachinesPanel.d.ts +2 -2
  178. package/dist/machines/ServerMachinesPanel.js +184 -323
  179. package/dist/machines/ServerUpdatePanel.js +51 -40
  180. package/dist/machines/ShareThisComputerForm.d.ts +19 -0
  181. package/dist/machines/ShareThisComputerForm.js +133 -0
  182. package/dist/machines/SyncOutcomeBadge.js +1 -1
  183. package/dist/machines/TokensPanel.d.ts +5 -3
  184. package/dist/machines/TokensPanel.js +98 -78
  185. package/dist/machines/headless/fixture-host.d.ts +19 -3
  186. package/dist/machines/headless/fixture-host.js +43 -6
  187. package/dist/machines/headless/fixtures.js +4 -6
  188. package/dist/machines/headless/host.d.ts +40 -19
  189. package/dist/machines/headless/index.d.ts +3 -3
  190. package/dist/machines/headless/index.js +3 -3
  191. package/dist/machines/headless/labels.d.ts +63 -20
  192. package/dist/machines/headless/labels.js +88 -25
  193. package/dist/machines/headless/messages.js +8 -0
  194. package/dist/machines/headless/stores.d.ts +9 -2
  195. package/dist/machines/headless/stores.js +28 -1
  196. package/dist/machines/index.d.ts +7 -3
  197. package/dist/machines/index.js +8 -4
  198. package/dist/machines/testing/contract.d.ts +15 -3
  199. package/dist/machines/testing/contract.js +68 -14
  200. package/dist/motion/grow.d.ts +8 -1
  201. package/dist/motion/grow.js +10 -4
  202. package/dist/onboarding/headless/labels.d.ts +13 -0
  203. package/dist/onboarding/headless/labels.js +8 -0
  204. package/dist/onboarding/sources/SourceBrowser.js +11 -7
  205. package/dist/onboarding/steps/ImportStep.js +4 -1
  206. package/dist/onboarding/steps/ReadyStep.js +9 -2
  207. package/dist/onboarding/steps/connect/KeyForm.js +6 -2
  208. package/dist/onboarding/steps/connect/ProviderPanel.js +6 -2
  209. package/dist/onboarding/steps/connect/ProviderReady.js +25 -20
  210. package/dist/onboarding/steps/tasks.js +17 -14
  211. package/dist/palette/app-sources.js +1 -1
  212. package/dist/server/sse-handler.js +141 -19
  213. package/dist/session/ArtifactsPanel.js +40 -18
  214. package/dist/session/PlanTracker.js +13 -8
  215. package/dist/session/ProjectHome.js +13 -11
  216. package/dist/session/RemindersPanel.js +35 -17
  217. package/dist/session/RunningWorkDialog.js +6 -2
  218. package/dist/session/SecretsPanel.js +29 -10
  219. package/dist/session/SessionDetailsDialog.d.ts +1 -1
  220. package/dist/session/SessionDetailsDialog.js +18 -10
  221. package/dist/session/SideChat.js +10 -7
  222. package/dist/session/TurnDetailsDialog.js +19 -5
  223. package/dist/session/UsagePanel.js +10 -4
  224. package/dist/session/headless/host.d.ts +2 -0
  225. package/dist/session/headless/index.js +2 -2
  226. package/dist/session/headless/labels.d.ts +19 -1
  227. package/dist/session/headless/labels.js +15 -1
  228. package/dist/session/headless/queue.js +2 -1
  229. package/dist/session/headless/reminder-labels.d.ts +4 -0
  230. package/dist/session/headless/reminder-labels.js +4 -0
  231. package/dist/settings/SettingsRestricted.d.ts +1 -1
  232. package/dist/settings/SettingsRestricted.js +4 -4
  233. package/dist/settings/SettingsShell.d.ts +7 -0
  234. package/dist/settings/SettingsShell.js +6 -1
  235. package/dist/settings/headless/fixture-performance.d.ts +1 -1
  236. package/dist/settings/headless/host.d.ts +2 -2
  237. package/dist/settings/headless/index.js +1 -1
  238. package/dist/settings/headless/labels.d.ts +3 -3
  239. package/dist/settings/headless/labels.js +3 -3
  240. package/dist/settings/headless/performance.d.ts +3 -4
  241. package/dist/settings/headless/search.d.ts +1 -1
  242. package/dist/settings/index.d.ts +2 -1
  243. package/dist/settings/index.js +2 -1
  244. package/dist/settings/sections/appearance/AppearanceSection.js +2 -2
  245. package/dist/settings/sections/claude-import/ClaudeImportDialog.js +1 -1
  246. package/dist/settings/sections/editor/EditorSection.js +8 -5
  247. package/dist/settings/sections/editor/labels.d.ts +1 -0
  248. package/dist/settings/sections/editor/labels.js +1 -0
  249. package/dist/settings/sections/environments/EnvironmentsSection.js +21 -14
  250. package/dist/settings/sections/environments/labels.d.ts +1 -0
  251. package/dist/settings/sections/environments/labels.js +2 -1
  252. package/dist/settings/sections/extensions/ChangeOriginDialog.js +1 -1
  253. package/dist/settings/sections/extensions/CreateExtensionDialog.js +1 -1
  254. package/dist/settings/sections/extensions/ExtensionConfigRows.d.ts +1 -3
  255. package/dist/settings/sections/extensions/ExtensionConfigRows.js +20 -19
  256. package/dist/settings/sections/extensions/ExtensionOptionsSection.js +2 -1
  257. package/dist/settings/sections/extensions/ExtensionsSection.js +1 -1
  258. package/dist/settings/sections/extensions/options-labels.d.ts +2 -1
  259. package/dist/settings/sections/extensions/options-labels.js +2 -1
  260. package/dist/settings/sections/host-catalog/HostCatalogSection.js +1 -1
  261. package/dist/settings/sections/index.d.ts +2 -1
  262. package/dist/settings/sections/index.js +2 -1
  263. package/dist/settings/sections/instructions/InstructionsSection.js +1 -1
  264. package/dist/settings/sections/logs/LogsSection.d.ts +2 -2
  265. package/dist/settings/sections/logs/LogsSection.js +2 -2
  266. package/dist/settings/sections/mcp/McpSection.d.ts +1 -1
  267. package/dist/settings/sections/mcp/McpSection.js +13 -7
  268. package/dist/settings/sections/mcp/McpServerRow.js +21 -14
  269. package/dist/settings/sections/mcp/labels.d.ts +8 -2
  270. package/dist/settings/sections/mcp/labels.js +8 -2
  271. package/dist/settings/sections/models/ModelRows.js +1 -1
  272. package/dist/settings/sections/models/NewChatPlaceRow.d.ts +26 -0
  273. package/dist/settings/sections/models/NewChatPlaceRow.js +78 -0
  274. package/dist/settings/sections/models/SpacesDefaultsSection.js +15 -3
  275. package/dist/settings/sections/models/labels.d.ts +7 -0
  276. package/dist/settings/sections/models/labels.js +7 -0
  277. package/dist/settings/sections/models/model-test.js +7 -4
  278. package/dist/settings/sections/performance/PerformanceSection.js +16 -6
  279. package/dist/settings/sections/performance/labels.d.ts +1 -1
  280. package/dist/settings/sections/performance/labels.js +1 -1
  281. package/dist/settings/sections/providers/ProvidersSection.d.ts +1 -1
  282. package/dist/settings/sections/providers/ProvidersSection.js +15 -8
  283. package/dist/settings/sections/providers/ServerProvidersSection.d.ts +1 -1
  284. package/dist/settings/sections/providers/ServerProvidersSection.js +12 -6
  285. package/dist/settings/sections/providers/labels.d.ts +2 -2
  286. package/dist/settings/sections/providers/labels.js +2 -2
  287. package/dist/settings/sections/shared/catalog.js +1 -1
  288. package/dist/settings/sections/skills/SkillsSection.js +1 -1
  289. package/dist/settings/testing/performance.contract.js +8 -12
  290. package/dist/styles.css +32 -3
  291. package/dist/terminal/HostTerminalSurface.js +17 -7
  292. package/dist/terminal/TerminalPanel.js +30 -17
  293. package/dist/terminal/TerminalSurface.js +11 -4
  294. package/dist/terminal/headless/labels.d.ts +5 -0
  295. package/dist/terminal/headless/labels.js +5 -0
  296. package/dist/terminal/headless/store.d.ts +1 -1
  297. package/dist/terminal/headless/store.js +6 -3
  298. package/dist/workspace/LayoutBudget.d.ts +5 -1
  299. package/dist/workspace/LayoutBudget.js +14 -1
  300. package/dist/workspace/PanelContentView.d.ts +1 -1
  301. package/dist/workspace/PanelContentView.js +17 -6
  302. package/dist/workspace/WorkspaceProvider.js +4 -3
  303. package/dist/workspace/extension-tabs.js +1 -1
  304. package/dist/workspace/headless/index.js +1 -1
  305. package/dist/workspace/headless/labels.d.ts +1 -0
  306. package/dist/workspace/headless/labels.js +1 -0
  307. package/package.json +3 -3
  308. package/src/styles/motion.css +8 -0
  309. package/src/styles/primitives.css +7 -0
@@ -1,9 +1,9 @@
1
1
  import { iconButtonClass } from "../../components/IconButton.js";
2
2
  import { CopyButton } from "../../components/CopyButton.js";
3
+ import { Notice } from "../../components/Notice.js";
3
4
  import { Grow, GrowPresence } from "../../motion/grow.js";
4
5
  import { SmoothHeight } from "../../motion/size.js";
5
6
  import { constant, useReadable } from "../headless/store.js";
6
- import "../headless/block-runs.js";
7
7
  import { useOptionalChatHost } from "../ChatProvider.js";
8
8
  import { useChatLabels } from "../useChatLabels.js";
9
9
  import { relativeTime } from "../headless/session-list.js";
@@ -12,6 +12,7 @@ import { useTranscriptActions } from "./actions.js";
12
12
  import { AnsiText } from "./AnsiText.js";
13
13
  import { LiveOutput } from "./LiveOutput.js";
14
14
  import { ToolTiming } from "./tool-parts.js";
15
+ import "../headless/block-runs.js";
15
16
  import { pushComposerAttachment, textAttachment } from "../composer/composer-bus.js";
16
17
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
17
18
  import { Suspense, lazy, useLayoutEffect, useMemo, useRef, useState } from "react";
@@ -200,9 +201,12 @@ function RunPanel({ code, live, saved, onAgain, onTerminal, onRemove }) {
200
201
  running: true
201
202
  })]
202
203
  });
203
- if (live?.error !== void 0) return /* @__PURE__ */ jsx("span", {
204
- className: "text-zg-danger",
205
- children: labels.blockRunFailed(live.error)
204
+ if (live?.error !== void 0) return /* @__PURE__ */ jsx(Notice, {
205
+ tone: "error",
206
+ compact: true,
207
+ detail: live.error,
208
+ className: "min-w-0",
209
+ children: labels.blockRunError
206
210
  });
207
211
  if (!saved) return null;
208
212
  const label = saved.stopped === "timeout" ? labels.blockRunTimedOut : saved.stopped === "cancelled" ? labels.blockRunStopped : saved.exitCode === null ? labels.shellKilled : labels.shellExit(saved.exitCode);
@@ -422,6 +422,17 @@ function useStickToBottom(scrollRef, { paused = false, rowSelector = ".zg-cv-row
422
422
  ro.observe(el);
423
423
  const content = el.firstElementChild;
424
424
  if (content) ro.observe(content);
425
+ const clamps = new MutationObserver(() => {
426
+ if (!pinnedRef.current || held.current || pausedRef.current) return;
427
+ const top = el.scrollTop;
428
+ if (top < lastTop.current - 1 && el.scrollHeight - el.clientHeight - top <= 1) lastTop.current = top;
429
+ });
430
+ if (content) clamps.observe(content, {
431
+ childList: true,
432
+ subtree: true,
433
+ characterData: true,
434
+ attributes: true
435
+ });
425
436
  lastTop.current = el.scrollTop;
426
437
  const glideState = glide.current;
427
438
  return () => {
@@ -436,6 +447,7 @@ function useStickToBottom(scrollRef, { paused = false, rowSelector = ".zg-cv-row
436
447
  el.removeEventListener("wheel", onWheel);
437
448
  el.removeEventListener("keydown", onKey);
438
449
  ro.disconnect();
450
+ clamps.disconnect();
439
451
  };
440
452
  }, [
441
453
  scrollRef,
@@ -1,6 +1,7 @@
1
1
  import { useLabels } from "../labels.js";
2
2
  import { buttonClass } from "./button.js";
3
3
  import { CopyButton } from "./CopyButton.js";
4
+ import { Notice } from "./Notice.js";
4
5
  import { INPUT_CLASS } from "./Form.js";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { useState } from "react";
@@ -27,12 +28,27 @@ function hostOf(url) {
27
28
  */
28
29
  function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className = "", style }) {
29
30
  const labels = useLabels();
30
- const failed = state.kind === "error";
31
+ if (state.kind === "error") return /* @__PURE__ */ jsx(Notice, {
32
+ tone: "error",
33
+ detail: state.message,
34
+ action: onRetry && /* @__PURE__ */ jsx("button", {
35
+ type: "button",
36
+ onClick: onRetry,
37
+ className: buttonClass({
38
+ variant: "primary",
39
+ size: "sm"
40
+ }),
41
+ children: labels.retry
42
+ }),
43
+ className: `text-zg-label ${className}`.trimEnd(),
44
+ style,
45
+ children: labels.signInFailed
46
+ });
31
47
  const done = state.kind === "done";
32
48
  return /* @__PURE__ */ jsxs("div", {
33
- role: failed ? "alert" : "status",
34
- "aria-live": failed ? void 0 : "polite",
35
- className: `flex flex-col gap-3 px-3 py-2.5 rounded-zg-md text-zg-label ${failed ? "bg-zg-danger/10" : "zg-tray"} ${className}`,
49
+ role: "status",
50
+ "aria-live": "polite",
51
+ className: `flex flex-col gap-3 px-3 py-2.5 rounded-zg-md text-zg-label zg-tray ${className}`,
36
52
  style,
37
53
  children: [/* @__PURE__ */ jsxs("div", {
38
54
  className: "flex items-start gap-3",
@@ -40,7 +56,7 @@ function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className
40
56
  /* @__PURE__ */ jsx("span", {
41
57
  className: "mt-0.5 shrink-0",
42
58
  "aria-hidden": true,
43
- children: done ? /* @__PURE__ */ jsx("span", { className: "i-ph-check-circle-fill text-zg-body text-[var(--zg-accent)]" }) : failed ? /* @__PURE__ */ jsx("span", { className: "i-ph-warning-circle-fill text-zg-body text-zg-danger" }) : /* @__PURE__ */ jsx("span", { className: "zg-spin-ring zg-loop block mt-px text-[var(--zg-accent)]" })
59
+ children: done ? /* @__PURE__ */ jsx("span", { className: "i-ph-check-circle-fill text-zg-body text-[var(--zg-accent)]" }) : /* @__PURE__ */ jsx("span", { className: "zg-spin-ring zg-loop block mt-px text-[var(--zg-accent)]" })
44
60
  }),
45
61
  /* @__PURE__ */ jsx("div", {
46
62
  className: "flex-1 min-w-0 flex flex-col gap-1",
@@ -49,15 +65,7 @@ function BrowserSignIn({ state, service, onCancel, onRetry, onSubmit, className
49
65
  service
50
66
  })
51
67
  }),
52
- failed ? onRetry && /* @__PURE__ */ jsx("button", {
53
- type: "button",
54
- onClick: onRetry,
55
- className: buttonClass({
56
- variant: "primary",
57
- size: "sm"
58
- }),
59
- children: labels.retry
60
- }) : !done && onCancel && /* @__PURE__ */ jsx("button", {
68
+ !done && onCancel && /* @__PURE__ */ jsx("button", {
61
69
  type: "button",
62
70
  onClick: onCancel,
63
71
  className: buttonClass({
@@ -88,13 +96,7 @@ function SignInMessage({ state, service }) {
88
96
  className: "text-[var(--zg-text)]",
89
97
  children: labels.signInDone(state.account)
90
98
  });
91
- case "error": return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
92
- className: "text-zg-danger font-medium",
93
- children: labels.signInFailed
94
- }), /* @__PURE__ */ jsx("span", {
95
- className: "text-[var(--zg-text-muted)] break-words",
96
- children: state.message
97
- })] });
99
+ case "error": return null;
98
100
  case "url": return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
99
101
  className: "text-[var(--zg-text)]",
100
102
  children: state.instructions ?? labels.signInInBrowser(service)
@@ -18,25 +18,27 @@ declare const FIELD_LABEL_CLASS = "block text-xs text-[var(--zg-text-muted)] mb-
18
18
  declare const FORM_CARD_CLASS = "zg-raised border rounded-zg-lg p-4 space-y-3";
19
19
  /** Props for {@link ErrorNote}. */
20
20
  interface ErrorNoteProps {
21
- /** The error message. */
21
+ /** The error message, worded for people. */
22
22
  children: ReactNode;
23
+ /** The raw words behind it (an exception's message): folded under Details. */
24
+ detail?: string;
23
25
  /** Extra classes on the root element. */
24
26
  className?: string;
25
27
  /** Inline styles on the root element, merged after the component's own. */
26
28
  style?: CSSProperties;
27
29
  }
28
30
  /**
29
- * A failure worth reading: a soft danger wash, no border.
31
+ * A failure worth reading: an error {@link Notice}.
30
32
  *
31
33
  * @param props - Component props.
32
34
  */
33
- declare function ErrorNote({ children, className, style }: ErrorNoteProps): import("react").JSX.Element;
35
+ declare function ErrorNote({ children, detail, className, style }: ErrorNoteProps): import("react").JSX.Element;
34
36
  /** Props for {@link OpLine}. */
35
37
  interface OpLineProps {
36
38
  /**
37
39
  * Tone of the line: `busy` and `notice` are muted (a result worth a quiet line,
38
40
  * never a celebration: a success that shows elsewhere needs no line at all), and
39
- * `error` is danger-coloured and announced as an alert.
41
+ * `error` is a compact error {@link Notice}.
40
42
  */
41
43
  kind: 'busy' | 'notice' | 'error';
42
44
  /** The feedback text. */
@@ -1,3 +1,4 @@
1
+ import { Notice } from "./Notice.js";
1
2
  import { Segmented } from "./Segmented.js";
2
3
  import { Raised, SectionLabel, Tray } from "./Surface.js";
3
4
  import { SwitchGlyph } from "./SwitchGlyph.js";
@@ -23,15 +24,16 @@ const FIELD_LABEL_CLASS = "block text-xs text-[var(--zg-text-muted)] mb-1";
23
24
  /** An inline add / install form: a raised card above the list it feeds. */
24
25
  const FORM_CARD_CLASS = "zg-raised border rounded-zg-lg p-4 space-y-3";
25
26
  /**
26
- * A failure worth reading: a soft danger wash, no border.
27
+ * A failure worth reading: an error {@link Notice}.
27
28
  *
28
29
  * @param props - Component props.
29
30
  */
30
- function ErrorNote({ children, className, style }) {
31
- return /* @__PURE__ */ jsx("div", {
32
- role: "alert",
33
- className: ["px-3 py-2 rounded-zg-md bg-zg-danger/10 text-xs text-zg-danger break-words", className].filter(Boolean).join(" "),
34
- style,
31
+ function ErrorNote({ children, detail, className, style }) {
32
+ return /* @__PURE__ */ jsx(Notice, {
33
+ tone: "error",
34
+ ...detail ? { detail } : {},
35
+ ...className ? { className } : {},
36
+ ...style ? { style } : {},
35
37
  children
36
38
  });
37
39
  }
@@ -41,9 +43,15 @@ function ErrorNote({ children, className, style }) {
41
43
  * @param props - Component props.
42
44
  */
43
45
  function OpLine({ kind, children, className, style }) {
46
+ if (kind === "error") return /* @__PURE__ */ jsx(Notice, {
47
+ tone: "error",
48
+ compact: true,
49
+ ...className ? { className } : {},
50
+ ...style ? { style } : {},
51
+ children
52
+ });
44
53
  return /* @__PURE__ */ jsx("div", {
45
- role: kind === "error" ? "alert" : void 0,
46
- className: [`px-1 text-xs break-words ${kind === "error" ? "text-zg-danger" : "text-[var(--zg-text-muted)]"}`, className].filter(Boolean).join(" "),
54
+ className: ["px-1 text-xs break-words text-[var(--zg-text-muted)]", className].filter(Boolean).join(" "),
47
55
  style,
48
56
  children
49
57
  });
@@ -4,6 +4,8 @@ import { CSSProperties, ReactNode } from "react";
4
4
  interface LoadErrorProps {
5
5
  /** The line: what could not be read and why. */
6
6
  children: ReactNode;
7
+ /** The raw words behind it (an exception's message): folded under Details. */
8
+ detail?: string;
7
9
  /** Reads again; absent, no Retry. */
8
10
  onRetry?: () => void;
9
11
  /** Spacing from the surroundings. */
@@ -12,10 +14,10 @@ interface LoadErrorProps {
12
14
  style?: CSSProperties;
13
15
  }
14
16
  /**
15
- * Renders a failed read's line in the danger colour, `children` first (`Couldn't scan for plugins: …`).
17
+ * Renders a failed read's line as a compact error notice, `children` first (`Couldn't scan for plugins`).
16
18
  *
17
19
  * @param props - Component props.
18
20
  */
19
- declare function LoadError({ children, onRetry, className, style }: LoadErrorProps): import("react").JSX.Element;
21
+ declare function LoadError({ children, detail, onRetry, className, style }: LoadErrorProps): import("react").JSX.Element;
20
22
  //#endregion
21
23
  export { LoadError, LoadErrorProps };
@@ -1,23 +1,27 @@
1
1
  import { useLabels } from "../labels.js";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { Notice } from "./Notice.js";
3
+ import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/LoadError.tsx
4
5
  /**
5
- * Renders a failed read's line in the danger colour, `children` first (`Couldn't scan for plugins: …`).
6
+ * Renders a failed read's line as a compact error notice, `children` first (`Couldn't scan for plugins`).
6
7
  *
7
8
  * @param props - Component props.
8
9
  */
9
- function LoadError({ children, onRetry, className = "", style }) {
10
+ function LoadError({ children, detail, onRetry, className, style }) {
10
11
  const labels = useLabels();
11
- return /* @__PURE__ */ jsxs("p", {
12
- role: "alert",
13
- className: `m-0 text-xs text-zg-danger ${className}`,
14
- style,
15
- children: [children, onRetry && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx("button", {
12
+ return /* @__PURE__ */ jsx(Notice, {
13
+ tone: "error",
14
+ compact: true,
15
+ ...detail ? { detail } : {},
16
+ ...className ? { className } : {},
17
+ ...style ? { style } : {},
18
+ ...onRetry ? { action: /* @__PURE__ */ jsx("button", {
16
19
  type: "button",
17
20
  className: "bg-transparent border-0 p-0 cursor-pointer underline text-inherit",
18
21
  onClick: onRetry,
19
22
  children: labels.retry
20
- })] })]
23
+ }) } : {},
24
+ children
21
25
  });
22
26
  }
23
27
  //#endregion
@@ -0,0 +1,29 @@
1
+ import { CSSProperties, ReactNode } from "react";
2
+ //#region src/components/Notice.d.ts
3
+ /** How serious a {@link Notice} is. */
4
+ type NoticeTone = 'error' | 'warning' | 'info';
5
+ /** Props for {@link Notice}. */
6
+ interface NoticeProps {
7
+ /** How serious it is: the glyph, the colour, and `alert` (error) or `status`. */
8
+ tone: NoticeTone;
9
+ /** The message, worded for people. */
10
+ children: ReactNode;
11
+ /** The raw words behind it (an exception's message, a server's answer): folded under Details. */
12
+ detail?: string;
13
+ /** A control after the message (Retry, Open settings). */
14
+ action?: ReactNode;
15
+ /** One tight line, for a row or a form field. Default: a block with room around it. */
16
+ compact?: boolean;
17
+ /** Extra classes on the root element. */
18
+ className?: string;
19
+ /** Inline styles on the root element, merged after the component's own. */
20
+ style?: CSSProperties;
21
+ }
22
+ /**
23
+ * Renders a toned message: glyph, the words, an optional action, and the raw detail folded away.
24
+ *
25
+ * @param props - {@link NoticeProps}.
26
+ */
27
+ declare function Notice({ tone, children, detail, action, compact, className, style }: NoticeProps): import("react").JSX.Element;
28
+ //#endregion
29
+ export { Notice, NoticeProps, NoticeTone };
@@ -0,0 +1,63 @@
1
+ import { useLabels } from "../labels.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/Notice.tsx
4
+ const TONES = {
5
+ error: {
6
+ wash: "bg-zg-danger/10",
7
+ text: "text-zg-danger",
8
+ icon: "i-ph-warning-circle"
9
+ },
10
+ warning: {
11
+ wash: "bg-zg-warn/10",
12
+ text: "text-zg-warn",
13
+ icon: "i-ph-warning"
14
+ },
15
+ info: {
16
+ wash: "bg-zg-info/10",
17
+ text: "text-[var(--zg-text-muted)]",
18
+ icon: "i-ph-info"
19
+ }
20
+ };
21
+ /**
22
+ * Renders a toned message: glyph, the words, an optional action, and the raw detail folded away.
23
+ *
24
+ * @param props - {@link NoticeProps}.
25
+ */
26
+ function Notice({ tone, children, detail, action, compact = false, className, style }) {
27
+ const labels = useLabels();
28
+ const t = TONES[tone];
29
+ return /* @__PURE__ */ jsxs("div", {
30
+ role: tone === "error" ? "alert" : "status",
31
+ "data-tone": tone,
32
+ className: [
33
+ compact ? "px-2 py-1 rounded-zg-sm" : "px-3 py-2 rounded-zg-md",
34
+ `flex items-start gap-2 text-xs break-words ${t.wash} ${t.text}`,
35
+ className
36
+ ].filter(Boolean).join(" "),
37
+ style,
38
+ children: [/* @__PURE__ */ jsx("span", {
39
+ "aria-hidden": true,
40
+ className: `${t.icon} shrink-0 mt-[2px]`
41
+ }), /* @__PURE__ */ jsxs("div", {
42
+ className: "flex-1 min-w-0",
43
+ children: [/* @__PURE__ */ jsxs("div", {
44
+ className: "flex flex-wrap items-baseline gap-x-2 gap-y-1",
45
+ children: [/* @__PURE__ */ jsx("span", {
46
+ className: "min-w-0",
47
+ children
48
+ }), action]
49
+ }), detail && /* @__PURE__ */ jsxs("details", {
50
+ className: "mt-1 text-[var(--zg-text-muted)]",
51
+ children: [/* @__PURE__ */ jsx("summary", {
52
+ className: "cursor-pointer select-none",
53
+ children: labels.noticeDetails
54
+ }), /* @__PURE__ */ jsx("pre", {
55
+ className: "m-0 mt-1 whitespace-pre-wrap break-words font-mono text-zg-meta",
56
+ children: detail
57
+ })]
58
+ })]
59
+ })]
60
+ });
61
+ }
62
+ //#endregion
63
+ export { Notice };
@@ -4,7 +4,7 @@ import { CSSProperties, ReactNode } from "react";
4
4
  interface PanelEmptyProps {
5
5
  /** Icon class shown above the title, such as `i-ph-files`. */
6
6
  icon?: string;
7
- /** Main message. It takes the warning colour when `warn` is set. */
7
+ /** Main message. With `warn`, a warning {@link Notice}. */
8
8
  title: ReactNode;
9
9
  /** Secondary text under the title. */
10
10
  hint?: ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { useLabels } from "../labels.js";
2
+ import { Notice } from "./Notice.js";
2
3
  import { EmptyState } from "./Surface.js";
3
4
  import { SegmentSpinner } from "./SegmentSpinner.js";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -15,8 +16,9 @@ function PanelEmpty({ icon, title, hint, warn = false, className, style }) {
15
16
  style,
16
17
  children: /* @__PURE__ */ jsx(EmptyState, {
17
18
  icon,
18
- title: warn ? /* @__PURE__ */ jsx("span", {
19
- className: "text-[var(--zg-warn)]",
19
+ title: warn ? /* @__PURE__ */ jsx(Notice, {
20
+ tone: "warning",
21
+ compact: true,
20
22
  children: title
21
23
  }) : title,
22
24
  hint,
@@ -4,7 +4,7 @@ import { CSSProperties, ReactNode } from "react";
4
4
  interface RestrictedProps {
5
5
  /** Whether this connection may not change what it wraps. */
6
6
  restricted: boolean;
7
- /** Why, short: the tooltip and the group's accessible name ("Admin only"). */
7
+ /** Why, short: the tooltip and the group's accessible name ("The server does not offer this"). */
8
8
  reason: string;
9
9
  /** What it wraps. */
10
10
  children: ReactNode;
@@ -79,7 +79,14 @@ function PaletteList({ groups, cursor, query, nested, onHover, onRun, renderRow,
79
79
  ref: scroller,
80
80
  id: "zg-palette-list",
81
81
  role: "listbox",
82
- className: ["zg-palette-list overflow-y-auto overscroll-contain", className].filter(Boolean).join(" "),
82
+ tabIndex: -1,
83
+ onMouseDown: (e) => {
84
+ if (e.target !== e.currentTarget) e.preventDefault();
85
+ },
86
+ onFocus: (e) => {
87
+ if (e.target === e.currentTarget && e.relatedTarget instanceof HTMLElement) e.relatedTarget.focus();
88
+ },
89
+ className: ["zg-palette-list select-none overflow-y-auto overscroll-contain", className].filter(Boolean).join(" "),
83
90
  style: {
84
91
  height: viewHeight,
85
92
  ...style
@@ -1,5 +1,6 @@
1
1
  import { useLabels } from "../../labels.js";
2
2
  import { IconButton } from "../IconButton.js";
3
+ import { Notice } from "../Notice.js";
3
4
  import { PaletteList, defaultPaletteKeys } from "./PaletteList.js";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  import { Fragment as Fragment$1, useEffect, useMemo, useRef, useState } from "react";
@@ -115,12 +116,12 @@ function PalettePanel({ groups, query, onQueryChange, cursor, onCursorChange, on
115
116
  return;
116
117
  }
117
118
  case "Tab":
119
+ e.preventDefault();
120
+ e.stopPropagation();
118
121
  if (e.shiftKey && !nested && onScopeNext) {
119
- e.preventDefault();
120
- e.stopPropagation();
121
122
  onScopeNext();
122
123
  onCursorChange(0);
123
- }
124
+ } else if (flat.length > 0) onCursorChange(e.shiftKey ? (cursor - 1 + flat.length) % flat.length : (cursor + 1) % flat.length);
124
125
  return;
125
126
  case "Backspace":
126
127
  if (query === "" && nested && onBack) {
@@ -225,11 +226,18 @@ function PalettePanel({ groups, query, onQueryChange, cursor, onCursorChange, on
225
226
  })
226
227
  ]
227
228
  }),
228
- notice && /* @__PURE__ */ jsx("div", {
229
+ notice && (notice.tone === "error" || notice.tone === "warn" ? /* @__PURE__ */ jsx("div", {
230
+ className: "px-3 py-2 shadow-[inset_0_1px_0_var(--zg-hairline)]",
231
+ children: /* @__PURE__ */ jsx(Notice, {
232
+ tone: notice.tone === "error" ? "error" : "warning",
233
+ compact: true,
234
+ children: notice.text
235
+ })
236
+ }) : /* @__PURE__ */ jsx("div", {
229
237
  role: "status",
230
- className: `px-3 py-2 shadow-[inset_0_1px_0_var(--zg-hairline)] text-zg-label ${notice.tone === "error" ? "text-zg-danger" : notice.tone === "warn" ? "text-zg-warn" : "text-[var(--zg-text-muted)]"}`,
238
+ className: "px-3 py-2 shadow-[inset_0_1px_0_var(--zg-hairline)] text-zg-label text-[var(--zg-text-muted)]",
231
239
  children: notice.text
232
- })
240
+ }))
233
241
  ]
234
242
  });
235
243
  }
package/dist/core.css CHANGED
@@ -28,7 +28,6 @@
28
28
  .i-ph-text-align-left{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M32 64a8 8 0 0 1 8-8h176a8 8 0 0 1 0 16H40a8 8 0 0 1-8-8m8 48h128a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16m176 24H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16m-48 40H40a8 8 0 0 0 0 16h128a8 8 0 0 0 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
29
29
  .i-ph-warning{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M236.8 188.09L149.35 36.22a24.76 24.76 0 0 0-42.7 0L19.2 188.09a23.51 23.51 0 0 0 0 23.72A24.35 24.35 0 0 0 40.55 224h174.9a24.35 24.35 0 0 0 21.33-12.19a23.51 23.51 0 0 0 .02-23.72m-13.87 15.71a8.5 8.5 0 0 1-7.48 4.2H40.55a8.5 8.5 0 0 1-7.48-4.2a7.59 7.59 0 0 1 0-7.72l87.45-151.87a8.75 8.75 0 0 1 15 0l87.45 151.87a7.59 7.59 0 0 1-.04 7.72M120 144v-40a8 8 0 0 1 16 0v40a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
30
30
  .i-ph-warning-circle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m0 192a88 88 0 1 1 88-88a88.1 88.1 0 0 1-88 88m-8-80V80a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0m20 36a12 12 0 1 1-12-12a12 12 0 0 1 12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
31
- .i-ph-warning-circle-fill{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-8 56a8 8 0 0 1 16 0v56a8 8 0 0 1-16 0Zm8 104a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
32
31
  .i-ph-x{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' height='1em' width='1em' display='inline-block' vertical-align='middle' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L50.34 61.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;height:1em;width:1em;display:inline-block;vertical-align:middle;}
33
32
  /* layer: shortcuts */
34
33
  .container{width:100%;}
@@ -87,6 +86,7 @@
87
86
  .m4\.7144{margin:1.1786rem;}
88
87
  .-mx-1{margin-left:-0.25rem;margin-right:-0.25rem;}
89
88
  .-mx-2{margin-left:-0.5rem;margin-right:-0.5rem;}
89
+ .mx-3{margin-left:0.75rem;margin-right:0.75rem;}
90
90
  .my-2{margin-top:0.5rem;margin-bottom:0.5rem;}
91
91
  .my-auto{margin-top:auto;margin-bottom:auto;}
92
92
  .-ml-2{margin-left:-0.5rem;}
@@ -107,6 +107,7 @@
107
107
  .ml-auto{margin-left:auto;}
108
108
  .ms{margin-inline-start:1rem;}
109
109
  .mt-\[13vh\]{margin-top:13vh;}
110
+ .mt-\[2px\]{margin-top:2px;}
110
111
  .mt-0\.5{margin-top:0.125rem;}
111
112
  .mt-1{margin-top:0.25rem;}
112
113
  .mt-1\.5{margin-top:0.375rem;}
@@ -196,6 +197,7 @@
196
197
  .cursor-text{cursor:text;}
197
198
  .cursor-grabbing{cursor:grabbing;}
198
199
  .select-text{-webkit-user-select:text;user-select:text;}
200
+ .select-none{-webkit-user-select:none;user-select:none;}
199
201
  .resize-y{resize:vertical;}
200
202
  .resize{resize:both;}
201
203
  .list-none{list-style-type:none;}
@@ -220,6 +222,8 @@
220
222
  .gap-3\.5{gap:0.875rem;}
221
223
  .gap-4{gap:1rem;}
222
224
  .gap-6{gap:1.5rem;}
225
+ .gap-x-2{column-gap:0.5rem;}
226
+ .gap-y-1{row-gap:0.25rem;}
223
227
  .space-y-3>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(0.75rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(0.75rem * var(--un-space-y-reverse));}
224
228
  .space-y-5>:not([hidden])~:not([hidden]){--un-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--un-space-y-reverse)));margin-bottom:calc(1.25rem * var(--un-space-y-reverse));}
225
229
  .divide-y>:not([hidden])~:not([hidden]){--un-divide-y-reverse:0;border-top-width:calc(1px * calc(1 - var(--un-divide-y-reverse)));border-bottom-width:calc(1px * var(--un-divide-y-reverse));}
@@ -352,17 +356,15 @@
352
356
  .text-\[var\(--zg-accent\)\]{color:var(--zg-accent);}
353
357
  .text-\[var\(--zg-bg\)\]{color:var(--zg-bg);}
354
358
  .text-\[var\(--zg-code-fg\)\]{color:var(--zg-code-fg);}
355
- .text-\[var\(--zg-danger\)\],
356
- .text-zg-danger{color:var(--zg-danger);}
357
359
  .text-\[var\(--zg-text-muted\)\],
358
360
  .text-zg-muted{color:var(--zg-text-muted);}
359
361
  .text-\[var\(--zg-text-subtle\)\]{color:var(--zg-text-subtle);}
360
362
  .text-\[var\(--zg-text\)\]{color:var(--zg-text);}
361
- .text-\[var\(--zg-warn\)\],
362
- .text-zg-warn{color:var(--zg-warn);}
363
363
  .text-zg-accent-fill-fg{color:var(--zg-accent-fill-fg);}
364
+ .text-zg-danger{color:var(--zg-danger);}
364
365
  .text-zg-info{color:var(--zg-info);}
365
366
  .text-zg-success{color:var(--zg-success);}
367
+ .text-zg-warn{color:var(--zg-warn);}
366
368
  .hover\:\!text-zg-danger:hover{color:var(--zg-danger) !important;}
367
369
  .hover\:text-\[var\(--zg-text\)\]:hover{color:var(--zg-text);}
368
370
  .placeholder\:text-\[var\(--zg-text-subtle\)\]::placeholder{color:var(--zg-text-subtle);}
@@ -427,6 +429,8 @@
427
429
  .z-zg-overlay{z-index:var(--zg-z-overlay);}
428
430
  .z-zg-tooltip{z-index:var(--zg-z-tooltip);}
429
431
  .bg-zg-danger\/10{background-color:color-mix(in srgb, var(--zg-danger) 10%, transparent);}
432
+ .bg-zg-info\/10{background-color:color-mix(in srgb, var(--zg-info) 10%, transparent);}
433
+ .bg-zg-warn\/10{background-color:color-mix(in srgb, var(--zg-warn) 10%, transparent);}
430
434
  .hover\:before\:bg-zg-danger\/10:hover::before{background-color:color-mix(in srgb, var(--zg-danger) 10%, transparent);}
431
435
  @media (min-width: 640px){
432
436
  .sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr));}
@@ -1054,6 +1058,13 @@ html[data-motion='off'] {
1054
1058
  padding: 6px 10px;
1055
1059
  align-items: flex-start;
1056
1060
  }
1061
+ /* A row that belongs to the row above it (a server's machines): one glyph column in. */
1062
+ .zg-menu-row.zg-menu-row-nested {
1063
+ padding-left: 26px;
1064
+ }
1065
+ .zg-menu-row.zg-menu-row-nested[data-size='lg'] {
1066
+ padding-left: 28px;
1067
+ }
1057
1068
  .zg-menu-row:hover:not(:disabled) {
1058
1069
  background: var(--zg-row-hover);
1059
1070
  }
@@ -1688,6 +1699,14 @@ html[data-motion='reduced'] .zg-shimmer {
1688
1699
  opacity var(--zg-motion-fade),
1689
1700
  margin-left var(--zg-motion-settle);
1690
1701
  }
1702
+ /* `Grow symmetric`: leaving on the curve it arrived on, so a row shrinking out
1703
+ as another grows in mirrors it exactly and the list's height holds. */
1704
+ .zg-grow[data-symmetric]:not([data-shown]) {
1705
+ transition:
1706
+ grid-template-rows var(--zg-motion-settle),
1707
+ opacity var(--zg-motion-fade-out),
1708
+ margin-left var(--zg-motion-settle);
1709
+ }
1691
1710
  .zg-grow-clip {
1692
1711
  min-height: 0;
1693
1712
  overflow-x: visible;
@@ -6,7 +6,7 @@ import "../node_modules/.bun/@earendil-works_pi-ai@1.3.0_bff1df87cb190f90/node_m
6
6
  import "../node_modules/.bun/@anthropic-ai_sdk@0.104.2_fff7ddf946fac095/node_modules/@anthropic-ai/sdk/index.js";
7
7
  import "../node_modules/.bun/@anthropic-ai_sdk@0.104.2_fff7ddf946fac095/node_modules/@anthropic-ai/sdk/resources2.js";
8
8
  import { ReactNode } from "react";
9
- //#region ../dist/index-Bq87OcGy.d.ts
9
+ //#region ../dist/index-C6rzc-tt.d.ts
10
10
  //#endregion
11
11
  //#region src/thinking-levels.d.ts
12
12
  /**
@@ -51,6 +51,23 @@ interface EnvironmentSettings {
51
51
  config?: Record<string, Record<string, EnvironmentConfigValue>>;
52
52
  }
53
53
  //#endregion
54
+ //#region src/chat/places.d.ts
55
+ /** Where new chats start. */
56
+ interface NewChatPlace {
57
+ /** `local` (This computer) or a saved server's id (its own `hostId`). */
58
+ hostId: string;
59
+ /** The server's name when the place was set: shown on a device that has not saved it. */
60
+ hostName?: string;
61
+ /** The server's URL when the place was set: offered to a device that has not saved it. */
62
+ hostUrl?: string;
63
+ /** One of the host's machines, by name. Absent: the host itself. */
64
+ machine?: string;
65
+ /** A folder on the host, or on the machine. Absent: the usual folder (the host's first root, the machine's first folder). */
66
+ folder?: string;
67
+ /** The isolation, without a machine (`local`, `worktree`, `docker`…). Absent: the host's default. */
68
+ isolation?: string;
69
+ }
70
+ //#endregion
54
71
  //#region src/chat/ansi.d.ts
55
72
  /**
56
73
  * Terminal output as styled lines: ANSI SGR codes (colors, bold, dim, italic,
@@ -179,7 +196,7 @@ type QueryBound = number | string;
179
196
  * session without an environment. `projectName` is computed: the folder name
180
197
  * (last path segment) of `projectRoot`, or of `cwd` without one.
181
198
  */
182
- type SessionFieldName = 'id' | 'title' | 'projectRoot' | 'projectName' | 'cwd' | 'agentId' | 'status' | 'createdAt' | 'updatedAt' | 'runStartedAt' | 'archived' | 'favorite' | 'isMain' | 'spaceId' | 'scheduleId' | 'providerKey' | 'modelId' | 'account' | 'effort' | 'hostId' | 'repoKey' | 'environment.kind' | 'environment.state' | 'environment.branch' | 'wakes';
199
+ type SessionFieldName = 'id' | 'title' | 'projectRoot' | 'projectName' | 'cwd' | 'agentId' | 'status' | 'createdAt' | 'updatedAt' | 'lastUserMessageAt' | 'runStartedAt' | 'archived' | 'favorite' | 'isMain' | 'spaceId' | 'scheduleId' | 'providerKey' | 'modelId' | 'account' | 'effort' | 'hostId' | 'repoKey' | 'environment.kind' | 'environment.state' | 'environment.branch' | 'wakes';
183
200
  /**
184
201
  * A facet an extension computes for each session: `facet.<extensionId>.<key>`,
185
202
  * optionally followed by `.<property>` steps into an object value (a number
@@ -296,6 +313,8 @@ interface Space {
296
313
  modelOptions?: Record<string, boolean>;
297
314
  /** Agent new sessions in this space start on (`AgentProfile.id`); absent = the global default (`Settings.defaultAgent`). */
298
315
  agentId?: string;
316
+ /** Where new chats in this space start (a host, a machine, a folder, an isolation); absent = the global default (`Settings.defaultPlace`). */
317
+ place?: NewChatPlace;
299
318
  /**
300
319
  * A query space (an extension's, or a view the user saved): the sessions
301
320
  * it lists besides those stamped with its id. Absent: only those.
@@ -773,6 +792,12 @@ interface Settings {
773
792
  * Offline) before it stops with a notice. Unset → 15.
774
793
  */
775
794
  machineWaitMinutes?: number;
795
+ /**
796
+ * Where new chats start (`places.ts`): This computer, a saved server, one
797
+ * of its machines, a folder and an isolation. A space's own place wins
798
+ * (`Space.place`). Unset → This computer.
799
+ */
800
+ defaultPlace?: NewChatPlace | null;
776
801
  /**
777
802
  * Session environments — which kinds are offered at creation, the
778
803
  * default, and each kind's options (secrets live in the environment
@@ -1489,4 +1514,4 @@ interface Settings {
1489
1514
  activeIcon: string;
1490
1515
  }
1491
1516
  //#endregion
1492
- export { EditDiffDisplay as $d, SessionQueryNot as Eb, SpaceIcon as Ef, ScriptCallStatus as Hw, ScriptOutputLine as Jw, SecretTtl as KC, SessionSort as Ob, ApprovalMode as Qd, SessionQueryAny as Sb, Space as Tf, DurabilityMode as UD, ScriptLineProgress as Uw, ThinkingLevel as WR, EnvironmentSettings as XE, ScriptProgress as Yw, AnsiStyle as _T, SessionGroupBy as _b, MessageDelivery as af, SessionQuery as bb, OpenInTarget as cf, OutputStream as dT, QueryBound as db, QueryValue as fb, AnsiSpan as gT, EnvironmentConfigValue as hD, SessionFieldPath as hb, Settings as hf, InteractionMode as if, AnsiColor as mT, SessionFieldName as mb, SessionCondition as pb, OutputLine as uT, FacetPath as ub, SessionGroupOrder as vb, ToolCallDisplay as vf, SessionQueryAll as xb, TranscriptDensity as yf };
1517
+ export { SessionQueryAll as Ab, AnsiColor as CT, SessionFieldName as Cb, ToolCallDisplay as Cf, SessionGroupOrder as Db, AnsiStyle as ET, SessionGroupBy as Eb, SessionQueryNot as Fb, SessionSort as Lb, Space as Mf, NewChatPlace as NT, SpaceIcon as Nf, ScriptLineProgress as Qw, SessionCondition as Sb, AnsiSpan as TT, ScriptCallStatus as Zw, OutputStream as bT, QueryBound as bb, Settings as bf, ScriptProgress as iT, EditDiffDisplay as if, SessionQueryAny as jb, EnvironmentConfigValue as kD, SessionQuery as kb, InteractionMode as lf, OpenInTarget as pf, DurabilityMode as rO, ScriptOutputLine as rT, ApprovalMode as rf, ThinkingLevel as rz, SecretTtl as tw, EnvironmentSettings as uD, MessageDelivery as uf, SessionFieldPath as wb, TranscriptDensity as wf, QueryValue as xb, OutputLine as yT, FacetPath as yb };