zidane-ui 9.2.3 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/dist/adapters/live.d.ts +8 -0
  2. package/dist/adapters/live.js +19 -8
  3. package/dist/adapters/server-composer-host.js +22 -9
  4. package/dist/adapters/server-git-host.js +5 -2
  5. package/dist/adapters/server-host.js +158 -27
  6. package/dist/adapters/server-machines-host.js +7 -0
  7. package/dist/adapters/server-media.d.ts +9 -1
  8. package/dist/adapters/server-media.js +14 -1
  9. package/dist/adapters/server-session-host.js +49 -0
  10. package/dist/adapters/server-settings-sections.js +4 -1
  11. package/dist/adapters/sse-host.js +3 -0
  12. package/dist/adapters/sse-protocol.d.ts +10 -0
  13. package/dist/appearance/ZoomIndicator.js +5 -8
  14. package/dist/chat/HostTranscript.d.ts +0 -12
  15. package/dist/chat/HostTranscript.js +20 -1
  16. package/dist/chat/SessionStreamsProvider.d.ts +9 -1
  17. package/dist/chat/SessionStreamsProvider.js +11 -2
  18. package/dist/chat/Transcript.d.ts +21 -11
  19. package/dist/chat/Transcript.js +346 -161
  20. package/dist/chat/composer/ModelOptionsPicker.js +6 -2
  21. package/dist/chat/composer/ModelPicker.d.ts +1 -1
  22. package/dist/chat/composer/PlacePicker.d.ts +3 -1
  23. package/dist/chat/composer/PlacePicker.js +5 -1
  24. package/dist/chat/composer/use-draft-target.js +15 -3
  25. package/dist/chat/headless/block-runs.js +26 -1
  26. package/dist/chat/headless/chip-views.js +1 -1
  27. package/dist/chat/headless/draft-target.d.ts +28 -1
  28. package/dist/chat/headless/draft-target.js +22 -1
  29. package/dist/chat/headless/host.d.ts +43 -7
  30. package/dist/chat/headless/hosts.d.ts +4 -0
  31. package/dist/chat/headless/index.d.ts +27 -26
  32. package/dist/chat/headless/index.js +15 -14
  33. package/dist/chat/headless/labels.d.ts +17 -0
  34. package/dist/chat/headless/labels.js +17 -0
  35. package/dist/chat/headless/markdown-chunks.d.ts +2 -1
  36. package/dist/chat/headless/markdown-chunks.js +12 -20
  37. package/dist/chat/headless/markdown-scan.d.ts +64 -0
  38. package/dist/chat/headless/markdown-scan.js +119 -0
  39. package/dist/chat/headless/markdown-stream.d.ts +64 -0
  40. package/dist/chat/headless/markdown-stream.js +143 -0
  41. package/dist/chat/headless/output-pager.d.ts +68 -0
  42. package/dist/chat/headless/output-pager.js +113 -0
  43. package/dist/chat/headless/prompt-origin.d.ts +2 -0
  44. package/dist/chat/headless/prompt-origin.js +6 -2
  45. package/dist/chat/headless/session-list.d.ts +10 -0
  46. package/dist/chat/headless/sidebar/activity.d.ts +14 -0
  47. package/dist/chat/headless/sidebar/activity.js +32 -0
  48. package/dist/chat/headless/sidebar/directory.d.ts +19 -2
  49. package/dist/chat/headless/sidebar/directory.js +19 -51
  50. package/dist/chat/headless/sidebar/environment.d.ts +15 -4
  51. package/dist/chat/headless/sidebar/environment.js +27 -9
  52. package/dist/chat/headless/sidebar/index.d.ts +2 -2
  53. package/dist/chat/headless/sidebar/index.js +2 -2
  54. package/dist/chat/headless/sidebar/labels.d.ts +19 -2
  55. package/dist/chat/headless/sidebar/labels.js +8 -1
  56. package/dist/chat/headless/sidebar/prewarm.d.ts +68 -0
  57. package/dist/chat/headless/sidebar/prewarm.js +114 -0
  58. package/dist/chat/headless/streams/actions.d.ts +4 -2
  59. package/dist/chat/headless/streams/actions.js +2 -1
  60. package/dist/chat/headless/streams/event-bytes.d.ts +17 -0
  61. package/dist/chat/headless/streams/event-bytes.js +46 -0
  62. package/dist/chat/headless/streams/live-events.d.ts +25 -1
  63. package/dist/chat/headless/streams/live-events.js +53 -2
  64. package/dist/chat/headless/streams/selectors.d.ts +3 -0
  65. package/dist/chat/headless/streams/selectors.js +8 -1
  66. package/dist/chat/headless/streams/session-streams.d.ts +15 -3
  67. package/dist/chat/headless/streams/session-streams.js +31 -3
  68. package/dist/chat/headless/streams/store.d.ts +45 -6
  69. package/dist/chat/headless/streams/store.js +85 -31
  70. package/dist/chat/headless/streams/transcript-map.d.ts +57 -0
  71. package/dist/chat/headless/streams/transcript-map.js +85 -0
  72. package/dist/chat/headless/streams/transcript.d.ts +4 -2
  73. package/dist/chat/headless/streams/transcript.js +19 -7
  74. package/dist/chat/headless/streams/types.d.ts +2 -1
  75. package/dist/chat/headless/transcript/batch.js +5 -1
  76. package/dist/chat/headless/transcript/blob-media.d.ts +15 -0
  77. package/dist/chat/headless/transcript/blob-media.js +23 -0
  78. package/dist/chat/headless/transcript/collapse.d.ts +10 -0
  79. package/dist/chat/headless/transcript/collapse.js +35 -6
  80. package/dist/chat/headless/transcript/derive.d.ts +98 -0
  81. package/dist/chat/headless/transcript/derive.js +89 -0
  82. package/dist/chat/headless/transcript/exchange-media.d.ts +3 -1
  83. package/dist/chat/headless/transcript/exchange-media.js +8 -5
  84. package/dist/chat/headless/transcript/fold-attachments.d.ts +2 -0
  85. package/dist/chat/headless/transcript/fold-attachments.js +3 -2
  86. package/dist/chat/headless/transcript/fold.d.ts +2 -1
  87. package/dist/chat/headless/transcript/fold.js +16 -6
  88. package/dist/chat/headless/transcript/incremental.d.ts +53 -0
  89. package/dist/chat/headless/transcript/incremental.js +181 -0
  90. package/dist/chat/headless/transcript/index.d.ts +2 -2
  91. package/dist/chat/headless/transcript/index.js +2 -2
  92. package/dist/chat/headless/transcript/nesting.js +2 -1
  93. package/dist/chat/headless/transcript/rail.d.ts +50 -1
  94. package/dist/chat/headless/transcript/rail.js +165 -23
  95. package/dist/chat/headless/transcript/rows.d.ts +5 -1
  96. package/dist/chat/headless/transcript/run-failures.js +2 -1
  97. package/dist/chat/headless/transcript/seams.d.ts +78 -0
  98. package/dist/chat/headless/transcript/seams.js +116 -0
  99. package/dist/chat/headless/transcript/tool-media.d.ts +6 -7
  100. package/dist/chat/headless/transcript/tool-media.js +27 -9
  101. package/dist/chat/index.d.ts +9 -8
  102. package/dist/chat/index.js +18 -17
  103. package/dist/chat/sidebar/ProjectIcon.js +1 -1
  104. package/dist/chat/sidebar/RowChips.js +2 -2
  105. package/dist/chat/sidebar/SessionSidebar.d.ts +6 -0
  106. package/dist/chat/sidebar/SessionSidebar.js +23 -16
  107. package/dist/chat/sidebar/SidebarFilterMenu.js +0 -1
  108. package/dist/chat/sidebar/SidebarFold.js +17 -16
  109. package/dist/chat/sidebar/SidebarFooter.d.ts +8 -5
  110. package/dist/chat/sidebar/SidebarFooter.js +6 -6
  111. package/dist/chat/sidebar/SidebarSessionRow.d.ts +7 -1
  112. package/dist/chat/sidebar/SidebarSessionRow.js +11 -8
  113. package/dist/chat/sidebar/session-menu.d.ts +4 -0
  114. package/dist/chat/sidebar/session-menu.js +14 -2
  115. package/dist/chat/sidebar/sidebar-live.js +28 -4
  116. package/dist/chat/sidebar/useInboxRows.js +6 -6
  117. package/dist/chat/sidebar/useInboxTriage.js +50 -47
  118. package/dist/chat/sidebar/useSessionSearch.js +19 -18
  119. package/dist/chat/testing/contract.d.ts +5 -3
  120. package/dist/chat/testing/contract.js +66 -1
  121. package/dist/chat/transcript/DiffLines.d.ts +6 -1
  122. package/dist/chat/transcript/DiffLines.js +35 -20
  123. package/dist/chat/transcript/EditDiffBlock.d.ts +5 -1
  124. package/dist/chat/transcript/EditDiffBlock.js +89 -30
  125. package/dist/chat/transcript/FileChip.js +28 -0
  126. package/dist/chat/transcript/LazyRow.d.ts +40 -40
  127. package/dist/chat/transcript/LazyRow.js +100 -149
  128. package/dist/chat/transcript/MermaidDiagram.js +2 -1
  129. package/dist/chat/transcript/PromptEcho.js +3 -11
  130. package/dist/chat/transcript/SessionChip.d.ts +11 -0
  131. package/dist/chat/transcript/SessionChip.js +34 -0
  132. package/dist/chat/transcript/SubagentBlock.js +3 -2
  133. package/dist/chat/transcript/TranscriptRail.d.ts +25 -2
  134. package/dist/chat/transcript/TranscriptRail.js +175 -17
  135. package/dist/chat/transcript/TranscriptRow.d.ts +4 -7
  136. package/dist/chat/transcript/TranscriptRow.js +4 -3
  137. package/dist/chat/transcript/actions.d.ts +37 -1
  138. package/dist/chat/transcript/actions.js +27 -1
  139. package/dist/chat/transcript/chip-details.d.ts +11 -0
  140. package/dist/chat/transcript/chip-details.js +17 -1
  141. package/dist/chat/transcript/clipped-output.d.ts +58 -0
  142. package/dist/chat/transcript/clipped-output.js +131 -0
  143. package/dist/chat/transcript/fold-attachments.js +10 -5
  144. package/dist/chat/transcript/fold-worker.js +5 -3
  145. package/dist/chat/transcript/fold.js +13 -4
  146. package/dist/chat/transcript/index.d.ts +11 -10
  147. package/dist/chat/transcript/index.js +10 -9
  148. package/dist/chat/transcript/markdown-cache.d.ts +17 -2
  149. package/dist/chat/transcript/markdown-cache.js +48 -4
  150. package/dist/chat/transcript/markdown.js +110 -55
  151. package/dist/chat/transcript/media-gallery.d.ts +3 -2
  152. package/dist/chat/transcript/media-gallery.js +19 -19
  153. package/dist/chat/transcript/messages.js +5 -4
  154. package/dist/chat/transcript/notices.js +2 -1
  155. package/dist/chat/transcript/prompt.d.ts +1 -1
  156. package/dist/chat/transcript/prompt.js +6 -4
  157. package/dist/chat/transcript/prose.js +2 -1
  158. package/dist/chat/transcript/root-items.d.ts +96 -0
  159. package/dist/chat/transcript/root-items.js +180 -0
  160. package/dist/chat/transcript/row-mount.d.ts +184 -0
  161. package/dist/chat/transcript/row-mount.js +532 -0
  162. package/dist/chat/transcript/row-parking.d.ts +152 -0
  163. package/dist/chat/transcript/row-parking.js +171 -0
  164. package/dist/chat/transcript/row-ui-state.d.ts +37 -0
  165. package/dist/chat/transcript/row-ui-state.js +53 -0
  166. package/dist/chat/transcript/run-rows.js +3 -2
  167. package/dist/chat/transcript/script-input.d.ts +1 -1
  168. package/dist/chat/transcript/tasks.js +3 -2
  169. package/dist/chat/transcript/tool-media.d.ts +4 -2
  170. package/dist/chat/transcript/tool-media.js +15 -7
  171. package/dist/chat/transcript/tool-parts.d.ts +27 -4
  172. package/dist/chat/transcript/tool-parts.js +31 -6
  173. package/dist/chat/transcript/tool-payload.js +26 -11
  174. package/dist/chat/transcript/tool-row.d.ts +2 -1
  175. package/dist/chat/transcript/tool-row.js +38 -19
  176. package/dist/chat/transcript/use-transcript-rows.d.ts +25 -8
  177. package/dist/chat/transcript/use-transcript-rows.js +28 -46
  178. package/dist/chat/transcript/useHistoryBackfill.d.ts +42 -0
  179. package/dist/chat/transcript/useHistoryBackfill.js +170 -0
  180. package/dist/chat/transcript/useStickToBottom.js +2 -3
  181. package/dist/chat/transcript/useTranscriptFind.js +2 -4
  182. package/dist/chat/transcript/useTranscriptScroll.d.ts +7 -4
  183. package/dist/chat/transcript/useTranscriptScroll.js +12 -1
  184. package/dist/chat/transcript/useTranscriptSearch.d.ts +2 -2
  185. package/dist/chat/transcript/useTranscriptSearch.js +35 -19
  186. package/dist/chat/transcript/useTranscriptSelectionCopy.d.ts +5 -5
  187. package/dist/chat/transcript/useTranscriptSelectionCopy.js +28 -7
  188. package/dist/chat/transcript/view-scope.d.ts +26 -6
  189. package/dist/chat/transcript/view-scope.js +106 -20
  190. package/dist/code/editor/FileTree.d.ts +2 -0
  191. package/dist/code/editor/FileTree.js +1 -1
  192. package/dist/code/editor/FileView.js +16 -25
  193. package/dist/code/editor/find/useFind.js +17 -17
  194. package/dist/code/editor/useCodeDocument.js +22 -19
  195. package/dist/code/editor/useDetachCleanup.js +4 -3
  196. package/dist/code/use-highlighted-html.js +12 -13
  197. package/dist/components/IconButton.d.ts +3 -1
  198. package/dist/components/IconButton.js +7 -2
  199. package/dist/components/IconButtonTip.d.ts +3 -1
  200. package/dist/components/IconButtonTip.js +2 -1
  201. package/dist/components/RowActionsMenu.js +7 -14
  202. package/dist/components/Tooltip.d.ts +4 -1
  203. package/dist/components/Tooltip.js +8 -6
  204. package/dist/components/assign-ref.d.ts +8 -0
  205. package/dist/components/assign-ref.js +12 -0
  206. package/dist/components/floating/FloatingSurface.js +2 -2
  207. package/dist/components/floating/HoverCard.js +32 -14
  208. package/dist/components/floating/Popover.js +4 -7
  209. package/dist/components/floating/useAnchoredPosition.d.ts +5 -3
  210. package/dist/components/floating/useAnchoredPosition.js +7 -7
  211. package/dist/components/object-key.d.ts +7 -0
  212. package/dist/components/object-key.js +18 -0
  213. package/dist/components/palette/PaletteList.js +2 -7
  214. package/dist/components/tooltip-arming.d.ts +3 -0
  215. package/dist/components/tooltip-arming.js +8 -1
  216. package/dist/core.css +3 -3
  217. package/dist/dist/{index-E1Z0aPmi.d.ts → index-BheVJOLc.d.ts} +3 -1
  218. package/dist/dist/index.d.ts +2 -2
  219. package/dist/files/FilesTab.js +0 -1
  220. package/dist/files/TreeColumn.d.ts +2 -4
  221. package/dist/files/TreeColumn.js +0 -5
  222. package/dist/files/headless/host.d.ts +3 -7
  223. package/dist/files/headless/labels.d.ts +0 -1
  224. package/dist/files/headless/labels.js +0 -1
  225. package/dist/files/headless/workspace-diff.js +1 -1
  226. package/dist/files/useCodeReview.js +1 -3
  227. package/dist/files/useFilesDiagnostics.d.ts +1 -1
  228. package/dist/files/useFilesDiagnostics.js +4 -11
  229. package/dist/files/useOpenFiles.js +9 -12
  230. package/dist/files/useWorkspace.d.ts +5 -7
  231. package/dist/files/useWorkspace.js +4 -15
  232. package/dist/git/GitBar.js +5 -3
  233. package/dist/git/MoveSessionDialog.d.ts +18 -8
  234. package/dist/git/MoveSessionDialog.js +32 -53
  235. package/dist/git/MoveToDialog.d.ts +61 -0
  236. package/dist/git/MoveToDialog.js +240 -0
  237. package/dist/git/SandboxManager.js +9 -4
  238. package/dist/git/SyncChip.js +11 -4
  239. package/dist/git/TeleportSessionDialog.d.ts +69 -0
  240. package/dist/git/TeleportSessionDialog.js +440 -0
  241. package/dist/git/headless/host.d.ts +14 -0
  242. package/dist/git/headless/index.d.ts +2 -1
  243. package/dist/git/headless/index.js +2 -1
  244. package/dist/git/headless/labels.d.ts +44 -1
  245. package/dist/git/headless/labels.js +50 -0
  246. package/dist/git/headless/sandboxes.d.ts +1 -1
  247. package/dist/git/headless/sandboxes.js +4 -3
  248. package/dist/git/headless/teleport.d.ts +76 -0
  249. package/dist/git/headless/teleport.js +19 -0
  250. package/dist/git/index.d.ts +4 -2
  251. package/dist/git/index.js +4 -2
  252. package/dist/git/useEnvironmentChoices.d.ts +5 -2
  253. package/dist/git/useEnvironmentChoices.js +12 -4
  254. package/dist/hooks/useLatest.d.ts +8 -0
  255. package/dist/hooks/useLatest.js +17 -0
  256. package/dist/hooks/useMinuteTick.d.ts +6 -2
  257. package/dist/hooks/useMinuteTick.js +12 -6
  258. package/dist/hooks/useNearViewport.js +11 -8
  259. package/dist/index.d.ts +3 -2
  260. package/dist/index.js +2 -1
  261. package/dist/keybindings/KeybindingsProvider.js +3 -4
  262. package/dist/keybindings/headless/catalog.d.ts +1 -1
  263. package/dist/keybindings/headless/catalog.js +18 -0
  264. package/dist/machines/AddServerForm.js +55 -3
  265. package/dist/machines/Banners.d.ts +2 -2
  266. package/dist/machines/Banners.js +3 -3
  267. package/dist/machines/DaemonMenu.js +1 -3
  268. package/dist/machines/HostsSection.js +5 -1
  269. package/dist/machines/OrganizationPanel.d.ts +25 -0
  270. package/dist/machines/OrganizationPanel.js +266 -0
  271. package/dist/machines/PersonalLayerPanel.d.ts +32 -0
  272. package/dist/machines/PersonalLayerPanel.js +360 -0
  273. package/dist/machines/headless/fixture-host.d.ts +10 -0
  274. package/dist/machines/headless/fixture-host.js +44 -0
  275. package/dist/machines/headless/host.d.ts +21 -1
  276. package/dist/machines/headless/index.d.ts +3 -1
  277. package/dist/machines/headless/index.js +3 -1
  278. package/dist/machines/headless/labels.d.ts +55 -0
  279. package/dist/machines/headless/labels.js +58 -1
  280. package/dist/machines/headless/layer.d.ts +64 -0
  281. package/dist/machines/headless/layer.js +56 -0
  282. package/dist/machines/headless/organization.d.ts +38 -0
  283. package/dist/machines/headless/organization.js +44 -0
  284. package/dist/machines/index.d.ts +3 -1
  285. package/dist/machines/index.js +3 -1
  286. package/dist/machines/testing/contract.d.ts +25 -1
  287. package/dist/machines/testing/contract.js +97 -1
  288. package/dist/motion/grow.js +12 -13
  289. package/dist/motion/swap.js +2 -5
  290. package/dist/motion/use-flip-list.d.ts +14 -0
  291. package/dist/motion/use-flip-list.js +17 -12
  292. package/dist/palette/headless/app-sources.js +37 -0
  293. package/dist/palette/headless/labels.js +3 -0
  294. package/dist/server/sse-handler.js +25 -2
  295. package/dist/session/DiffFileTree.js +1 -4
  296. package/dist/session/OpenSessionsDialog.d.ts +46 -0
  297. package/dist/session/OpenSessionsDialog.js +170 -0
  298. package/dist/session/PlanTracker.js +1 -2
  299. package/dist/session/ProjectHome.js +10 -9
  300. package/dist/session/RemindersPanel.js +10 -12
  301. package/dist/session/SecretsPanel.js +2 -1
  302. package/dist/session/SessionHeader.js +1 -0
  303. package/dist/session/SessionPeopleStack.d.ts +23 -0
  304. package/dist/session/SessionPeopleStack.js +65 -0
  305. package/dist/session/SessionPlaceMenu.js +5 -4
  306. package/dist/session/ShareSessionDialog.d.ts +32 -0
  307. package/dist/session/ShareSessionDialog.js +342 -0
  308. package/dist/session/TypingLine.d.ts +22 -0
  309. package/dist/session/TypingLine.js +31 -0
  310. package/dist/session/headless/host.d.ts +40 -1
  311. package/dist/session/headless/index.d.ts +4 -2
  312. package/dist/session/headless/index.js +3 -1
  313. package/dist/session/headless/labels.d.ts +49 -0
  314. package/dist/session/headless/labels.js +56 -0
  315. package/dist/session/headless/people.d.ts +29 -0
  316. package/dist/session/headless/people.js +53 -0
  317. package/dist/session/headless/place.d.ts +5 -0
  318. package/dist/session/headless/place.js +5 -1
  319. package/dist/session/headless/typing.d.ts +37 -0
  320. package/dist/session/headless/typing.js +60 -0
  321. package/dist/session/index.d.ts +5 -1
  322. package/dist/session/index.js +5 -1
  323. package/dist/settings/headless/fixture-performance.js +4 -2
  324. package/dist/settings/headless/performance.d.ts +4 -0
  325. package/dist/settings/headless/search.d.ts +1 -1
  326. package/dist/settings/headless/sections-host.d.ts +7 -2
  327. package/dist/settings/section.d.ts +15 -3
  328. package/dist/settings/section.js +15 -3
  329. package/dist/settings/sections/environments/EnvironmentsSection.js +30 -6
  330. package/dist/settings/sections/keybindings/labels.d.ts +3 -0
  331. package/dist/settings/sections/keybindings/labels.js +3 -0
  332. package/dist/settings/sections/keybindings/rows.js +12 -0
  333. package/dist/settings/sections/logs/LogsSection.js +5 -8
  334. package/dist/settings/sections/performance/PerformanceSection.js +8 -1
  335. package/dist/settings/sections/performance/labels.d.ts +2 -0
  336. package/dist/settings/sections/performance/labels.js +2 -0
  337. package/dist/styles.css +65 -9
  338. package/dist/terminal/HostTerminalSurface.js +28 -30
  339. package/dist/terminal/TerminalPanel.js +4 -12
  340. package/dist/terminal/TerminalProvider.d.ts +10 -2
  341. package/dist/terminal/TerminalProvider.js +10 -2
  342. package/dist/terminal/headless/labels.d.ts +0 -1
  343. package/dist/terminal/headless/labels.js +1 -2
  344. package/dist/terminal/headless/store.js +5 -1
  345. package/dist/views/headless/answers.d.ts +8 -2
  346. package/dist/views/headless/answers.js +58 -1
  347. package/dist/views/headless/placement.d.ts +78 -0
  348. package/dist/views/headless/placement.js +154 -44
  349. package/dist/workspace/LayoutBudget.js +1 -7
  350. package/package.json +2 -2
  351. package/src/styles/chat.css +3 -1
  352. package/src/styles/palette.css +3 -3
  353. package/src/styles/transcript.css +50 -5
  354. /package/dist/dist/{index-De9AbmxS.d.ts → index-ttmMvjgM.d.ts} +0 -0
@@ -29,6 +29,49 @@ export interface ReplyViewPlace {
29
29
  * @param previous - The result of the last call, or `undefined`.
30
30
  */
31
31
  export declare function viewPlacements(events: readonly ChatEvent[], previous?: ReadonlyMap<string, ReplyViewPlace>): Map<string, ReplyViewPlace>;
32
+ /** A map read through to `base`, written to its own entries: a fold resumed from a settled state copies nothing of it. */
33
+ export declare class LayeredMap<K, V> {
34
+ readonly base: ReadonlyMap<K, V>;
35
+ readonly top: Map<K, V>;
36
+ constructor(base?: ReadonlyMap<K, V>);
37
+ get(key: K): V | undefined;
38
+ has(key: K): boolean;
39
+ set(key: K, value: V): this;
40
+ }
41
+ /** The state of {@link viewPlacements} part way through a transcript: resumed on the events after it. */
42
+ export interface PlacementFold {
43
+ places: Map<string, ReplyViewPlace> | LayeredMap<string, ReplyViewPlace>;
44
+ ordinals: Map<string, number> | LayeredMap<string, number>;
45
+ fencesByTurn: Map<string, number> | LayeredMap<string, number>;
46
+ exchangeTurns: string[];
47
+ finalReply: string | undefined;
48
+ }
49
+ /**
50
+ * A fold at the start of a transcript, or resumed after `base` (read through, never written).
51
+ *
52
+ * @param base - The fold of the events before, or none.
53
+ */
54
+ export declare function placementFold(base?: PlacementFold): PlacementFold;
55
+ /**
56
+ * Gives the open exchange's final reply the turns whose unplaced codemode views it draws, and starts the next exchange.
57
+ *
58
+ * @param fold - The fold.
59
+ */
60
+ export declare function closePlacementExchange(fold: PlacementFold): void;
61
+ /**
62
+ * Reads `events` into the fold (the open exchange stays open).
63
+ *
64
+ * @param fold - The fold.
65
+ * @param events - The events after those it read, oldest first.
66
+ */
67
+ export declare function foldPlacements(fold: PlacementFold, events: readonly ChatEvent[]): void;
68
+ /**
69
+ * Whether two places send a reply's views to the same spots.
70
+ *
71
+ * @param a - One place.
72
+ * @param b - The other.
73
+ */
74
+ export declare function sameViewPlace(a: ReplyViewPlace, b: ReplyViewPlace): boolean;
32
75
  /**
33
76
  * Whether a session with these events can hold a view: a reply with a `view` fence, or a tool
34
77
  * call (a codemode script or an MCP app makes the others).
@@ -62,6 +105,41 @@ export interface TextlessExchange {
62
105
  * @param events - The session's events, oldest first.
63
106
  */
64
107
  export declare function textlessExchanges(events: readonly ChatEvent[]): TextlessExchange[];
108
+ /** The state of {@link textlessExchanges} part way through a transcript: the closed exchanges, and the open one. */
109
+ export interface TextlessFold {
110
+ /** The closed exchanges with no reply text. */
111
+ out: TextlessExchange[];
112
+ /** `out` is the base fold's: copied before the first push. */
113
+ shared: boolean;
114
+ turns: string[];
115
+ replied: boolean;
116
+ }
117
+ /**
118
+ * A fold at the start of a transcript, or resumed after `base` (its closed list is shared until one closes).
119
+ *
120
+ * @param base - The fold of the events before, or none.
121
+ */
122
+ export declare function textlessFold(base?: TextlessFold): TextlessFold;
123
+ /**
124
+ * Reads `events` into the fold.
125
+ *
126
+ * @param fold - The fold.
127
+ * @param events - The events after those it read, oldest first.
128
+ */
129
+ export declare function foldTextless(fold: TextlessFold, events: readonly ChatEvent[]): void;
130
+ /**
131
+ * The fold's exchanges with no reply text, the open one last.
132
+ *
133
+ * @param fold - The fold.
134
+ */
135
+ export declare function textlessOf(fold: TextlessFold): TextlessExchange[];
136
+ /**
137
+ * Whether two lists name the same exchanges, turns and states.
138
+ *
139
+ * @param a - One list.
140
+ * @param b - The other.
141
+ */
142
+ export declare function sameTextless(a: readonly TextlessExchange[], b: readonly TextlessExchange[]): boolean;
65
143
  /** Container widths where a view's stored height changes, in CSS pixels. */
66
144
  export declare const VIEW_WIDTH_STEPS: readonly [480, 720, 960];
67
145
  /**
@@ -26,50 +26,109 @@ function samePlace(a, b) {
26
26
  * @param previous - The result of the last call, or `undefined`.
27
27
  */
28
28
  function viewPlacements(events, previous) {
29
- const places = /* @__PURE__ */ new Map();
30
- const ordinals = /* @__PURE__ */ new Map();
31
- const fencesByTurn = /* @__PURE__ */ new Map();
32
- let exchangeTurns = [];
33
- let finalReply;
34
- const closeExchange = () => {
35
- if (finalReply && exchangeTurns.length > 0) {
36
- const place = places.get(finalReply);
37
- places.set(finalReply, {
38
- ...place,
39
- codemodeTurns: exchangeTurns
40
- });
41
- }
42
- exchangeTurns = [];
43
- finalReply = void 0;
29
+ const fold = placementFold();
30
+ foldPlacements(fold, events);
31
+ closePlacementExchange(fold);
32
+ const places = fold.places;
33
+ if (previous) for (const [rowId, place] of places) {
34
+ const before = previous.get(rowId);
35
+ if (before && samePlace(before, place)) places.set(rowId, before);
36
+ }
37
+ return places;
38
+ }
39
+ /** A map read through to `base`, written to its own entries: a fold resumed from a settled state copies nothing of it. */
40
+ var LayeredMap = class {
41
+ base;
42
+ top = /* @__PURE__ */ new Map();
43
+ constructor(base = /* @__PURE__ */ new Map()) {
44
+ this.base = base;
45
+ }
46
+ get(key) {
47
+ return this.top.has(key) ? this.top.get(key) : this.base.get(key);
48
+ }
49
+ has(key) {
50
+ return this.top.has(key) || this.base.has(key);
51
+ }
52
+ set(key, value) {
53
+ this.top.set(key, value);
54
+ return this;
55
+ }
56
+ };
57
+ /**
58
+ * A fold at the start of a transcript, or resumed after `base` (read through, never written).
59
+ *
60
+ * @param base - The fold of the events before, or none.
61
+ */
62
+ function placementFold(base) {
63
+ if (!base) return {
64
+ places: /* @__PURE__ */ new Map(),
65
+ ordinals: /* @__PURE__ */ new Map(),
66
+ fencesByTurn: /* @__PURE__ */ new Map(),
67
+ exchangeTurns: [],
68
+ finalReply: void 0
69
+ };
70
+ return {
71
+ places: new LayeredMap(base.places),
72
+ ordinals: new LayeredMap(base.ordinals),
73
+ fencesByTurn: new LayeredMap(base.fencesByTurn),
74
+ exchangeTurns: [...base.exchangeTurns],
75
+ finalReply: base.finalReply
44
76
  };
77
+ }
78
+ /**
79
+ * Gives the open exchange's final reply the turns whose unplaced codemode views it draws, and starts the next exchange.
80
+ *
81
+ * @param fold - The fold.
82
+ */
83
+ function closePlacementExchange(fold) {
84
+ if (fold.finalReply && fold.exchangeTurns.length > 0) {
85
+ const place = fold.places.get(fold.finalReply);
86
+ fold.places.set(fold.finalReply, {
87
+ ...place,
88
+ codemodeTurns: fold.exchangeTurns
89
+ });
90
+ }
91
+ fold.exchangeTurns = [];
92
+ fold.finalReply = void 0;
93
+ }
94
+ /**
95
+ * Reads `events` into the fold (the open exchange stays open).
96
+ *
97
+ * @param fold - The fold.
98
+ * @param events - The events after those it read, oldest first.
99
+ */
100
+ function foldPlacements(fold, events) {
45
101
  for (const event of events) {
46
102
  const top = event.childId === void 0;
47
103
  if (event.kind === "user-prompt" && top) {
48
- closeExchange();
104
+ closePlacementExchange(fold);
49
105
  continue;
50
106
  }
51
107
  const turnId = event.turnId;
52
108
  if (!turnId) continue;
53
- if (top && !exchangeTurns.includes(turnId)) exchangeTurns.push(turnId);
109
+ if (top && !fold.exchangeTurns.includes(turnId)) fold.exchangeTurns.push(turnId);
54
110
  if (event.kind !== "markdown") continue;
55
111
  const key = `${turnId}\u0000${event.childId ?? ""}`;
56
- const ordinal = (ordinals.get(key) ?? 0) + 1;
57
- ordinals.set(key, ordinal);
112
+ const ordinal = (fold.ordinals.get(key) ?? 0) + 1;
113
+ fold.ordinals.set(key, ordinal);
58
114
  const rowId = `m-${turnId}-${ordinal}`;
59
- const fenceBase = fencesByTurn.get(turnId) ?? 0;
60
- fencesByTurn.set(turnId, fenceBase + fencesIn(event));
61
- places.set(rowId, {
115
+ const fenceBase = fold.fencesByTurn.get(turnId) ?? 0;
116
+ fold.fencesByTurn.set(turnId, fenceBase + fencesIn(event));
117
+ fold.places.set(rowId, {
62
118
  turnId,
63
119
  fenceBase
64
120
  });
65
- if (top) finalReply = rowId;
121
+ if (top) fold.finalReply = rowId;
66
122
  }
67
- closeExchange();
68
- if (previous) for (const [rowId, place] of places) {
69
- const before = previous.get(rowId);
70
- if (before && samePlace(before, place)) places.set(rowId, before);
71
- }
72
- return places;
123
+ }
124
+ /**
125
+ * Whether two places send a reply's views to the same spots.
126
+ *
127
+ * @param a - One place.
128
+ * @param b - The other.
129
+ */
130
+ function sameViewPlace(a, b) {
131
+ return samePlace(a, b);
73
132
  }
74
133
  /**
75
134
  * Whether a session with these events can hold a view: a reply with a `view` fence, or a tool
@@ -107,28 +166,79 @@ function onlyLastTextChanged(previous, next) {
107
166
  * @param events - The session's events, oldest first.
108
167
  */
109
168
  function textlessExchanges(events) {
110
- const out = [];
111
- let turns = [];
112
- let replied = false;
169
+ const fold = textlessFold();
170
+ foldTextless(fold, events);
171
+ return textlessOf(fold);
172
+ }
173
+ /**
174
+ * A fold at the start of a transcript, or resumed after `base` (its closed list is shared until one closes).
175
+ *
176
+ * @param base - The fold of the events before, or none.
177
+ */
178
+ function textlessFold(base) {
179
+ return base ? {
180
+ out: base.out,
181
+ shared: true,
182
+ turns: [...base.turns],
183
+ replied: base.replied
184
+ } : {
185
+ out: [],
186
+ shared: false,
187
+ turns: [],
188
+ replied: false
189
+ };
190
+ }
191
+ /**
192
+ * Reads `events` into the fold.
193
+ *
194
+ * @param fold - The fold.
195
+ * @param events - The events after those it read, oldest first.
196
+ */
197
+ function foldTextless(fold, events) {
113
198
  for (const event of events) {
114
199
  if (event.childId !== void 0) continue;
115
200
  if (event.kind === "user-prompt") {
116
- if (!replied && turns.length > 0) out.push({
117
- turns,
118
- closed: true
119
- });
120
- turns = [];
121
- replied = false;
201
+ if (!fold.replied && fold.turns.length > 0) {
202
+ if (fold.shared) {
203
+ fold.out = [...fold.out];
204
+ fold.shared = false;
205
+ }
206
+ fold.out.push({
207
+ turns: fold.turns,
208
+ closed: true
209
+ });
210
+ }
211
+ fold.turns = [];
212
+ fold.replied = false;
122
213
  continue;
123
214
  }
124
- if (event.turnId && !turns.includes(event.turnId)) turns.push(event.turnId);
125
- if (event.kind === "markdown" && event.turnId) replied = true;
215
+ if (event.turnId && !fold.turns.includes(event.turnId)) fold.turns.push(event.turnId);
216
+ if (event.kind === "markdown" && event.turnId) fold.replied = true;
126
217
  }
127
- if (!replied && turns.length > 0) out.push({
128
- turns,
218
+ }
219
+ /**
220
+ * The fold's exchanges with no reply text, the open one last.
221
+ *
222
+ * @param fold - The fold.
223
+ */
224
+ function textlessOf(fold) {
225
+ return !fold.replied && fold.turns.length > 0 ? [...fold.out, {
226
+ turns: fold.turns,
129
227
  closed: false
228
+ }] : [...fold.out];
229
+ }
230
+ /**
231
+ * Whether two lists name the same exchanges, turns and states.
232
+ *
233
+ * @param a - One list.
234
+ * @param b - The other.
235
+ */
236
+ function sameTextless(a, b) {
237
+ if (a === b) return true;
238
+ return a.length === b.length && a.every((x, i) => {
239
+ const y = b[i];
240
+ return x === y || x.closed === y.closed && sameTurns(x.turns, y.turns);
130
241
  });
131
- return out;
132
242
  }
133
243
  /** Container widths where a view's stored height changes, in CSS pixels. */
134
244
  const VIEW_WIDTH_STEPS = [
@@ -246,4 +356,4 @@ function unplacedCodemodeViews(views, turns, options = {}) {
246
356
  const apps = options.mcpApps !== false;
247
357
  return views.filter((view) => (apps && view.anchor.kind === "mcp-app" || view.anchor.kind === "codemode" && view.placed !== true) && turns.includes(view.anchor.turnId));
248
358
  }
249
- export { VIEW_WIDTH_STEPS, eventsMayHoldViews, fenceViewOf, heightFor, onlyLastTextChanged, textlessExchanges, unplacedCodemodeViews, viewById, viewPlacements, viewVersion, widthRange, withHeight };
359
+ export { LayeredMap, VIEW_WIDTH_STEPS, closePlacementExchange, eventsMayHoldViews, fenceViewOf, foldPlacements, foldTextless, heightFor, onlyLastTextChanged, placementFold, sameTextless, sameViewPlace, textlessExchanges, textlessFold, textlessOf, unplacedCodemodeViews, viewById, viewPlacements, viewVersion, widthRange, withHeight };
@@ -31,13 +31,7 @@ function LayoutBudgetProvider({ sidebar, panel, resetKey = null, children }) {
31
31
  const resolved = sameResolved(lastResolved.current, computed) ? lastResolved.current : computed;
32
32
  lastResolved.current = resolved;
33
33
  const [panelHidden, setPanelHidden] = useState(false);
34
- useEffect(() => {
35
- if (resolved.panelMode === "docked" || !panelOpen) setPanelHidden(false);
36
- }, [
37
- resolved.panelMode,
38
- panelOpen,
39
- resetKey
40
- ]);
34
+ if (panelHidden && (resolved.panelMode === "docked" || !panelOpen)) setPanelHidden(false);
41
35
  const hidePanel = useCallback(() => setPanelHidden(true), []);
42
36
  const revealPanel = useCallback(() => setPanelHidden(false), []);
43
37
  const [peek, setPeek] = useState(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zidane-ui",
3
- "version": "9.2.3",
3
+ "version": "9.4.0",
4
4
  "description": "Zidane design system and chat kit: tokens, surface primitives, theme engine, React components, the chat layer (sessions, transcript, composer) and ChatHost adapters.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -584,7 +584,7 @@
584
584
  "react": "^19.3.0",
585
585
  "react-dom": "^19.3.0",
586
586
  "unocss": ">=66.0.0",
587
- "zidane": "^9.2.3",
587
+ "zidane": "^9.4.0",
588
588
  "vitest": ">=3"
589
589
  },
590
590
  "peerDependenciesMeta": {
@@ -20,7 +20,9 @@
20
20
  left: 50%;
21
21
  width: max(100%, 40px);
22
22
  height: max(100%, 40px);
23
- transform: translate(-50%, -50%);
23
+ /* `translate`, as `.zg-hit::after` (every IconButton) centres it: a `transform` on top would
24
+ add to it and shift the area a whole width up and left, over the button next to it. */
25
+ translate: -50% -50%;
24
26
  }
25
27
 
26
28
  /* --- Sidebar session rows ------------------------------------------------
@@ -18,8 +18,8 @@
18
18
 
19
19
  /* Command palette. The cursor is one block under the rows that glides to
20
20
  the marked row (a transform: no layout, no repaint of the rows); a new list
21
- puts it in place at once (`data-snap`). The rows draw no background of their
22
- own, so hover and keyboard mark the same way. */
21
+ puts a new one in place at once (`PaletteList` keys it by the list). The rows
22
+ draw no background of their own, so hover and keyboard mark the same way. */
23
23
  .zg-palette-cursor {
24
24
  position: absolute;
25
25
  top: 0;
@@ -63,7 +63,7 @@
63
63
  /* `snap`'s curve, quicker: the cursor follows a held arrow key, so it must
64
64
  land before the next repeat. Scaling the duration keeps every motion mode
65
65
  (springs off: the tween; reduced, off: 0ms). */
66
- .zg-palette-cursor:not([data-snap]) {
66
+ .zg-palette-cursor {
67
67
  transition: transform calc(var(--zg-motion-snap-duration) * 0.6) var(--zg-motion-snap-ease);
68
68
  }
69
69
 
@@ -130,14 +130,27 @@ html[data-motion='reduced'] .zg-arc::after {
130
130
  transition: opacity var(--zg-motion-fade);
131
131
  }
132
132
 
133
+ /* Past its most ticks (TranscriptRail sets the height) it scrolls; an end with more ticks fades. */
133
134
  .zg-prompt-rail-ticks {
134
135
  display: flex;
135
136
  flex-direction: column;
136
- max-height: 192px;
137
137
  overflow-y: auto;
138
+ overscroll-behavior: contain;
138
139
  scrollbar-width: none;
139
140
  }
140
141
 
142
+ .zg-prompt-rail-ticks[data-fade-top] {
143
+ mask-image: linear-gradient(to bottom, transparent, #000 24px);
144
+ }
145
+
146
+ .zg-prompt-rail-ticks[data-fade-bottom] {
147
+ mask-image: linear-gradient(to top, transparent, #000 24px);
148
+ }
149
+
150
+ .zg-prompt-rail-ticks[data-fade-top][data-fade-bottom] {
151
+ mask-image: linear-gradient(to bottom, transparent, #000 24px, #000 calc(100% - 24px), transparent);
152
+ }
153
+
141
154
  .zg-prompt-rail-ticks::-webkit-scrollbar {
142
155
  display: none;
143
156
  }
@@ -145,8 +158,8 @@ html[data-motion='reduced'] .zg-arc::after {
145
158
  .zg-prompt-rail-tick {
146
159
  position: relative;
147
160
  flex: none;
148
- width: 100%;
149
161
  height: 8px;
162
+ width: 100%;
150
163
  padding: 0;
151
164
  border: 0;
152
165
  background: none;
@@ -183,6 +196,24 @@ html[data-motion='reduced'] .zg-arc::after {
183
196
  background: var(--zg-text);
184
197
  }
185
198
 
199
+ /* A prompt whose history is loading for a jump to it. */
200
+ .zg-prompt-rail-tick[data-pending]::before {
201
+ background: var(--zg-text-muted);
202
+ transform: scaleX(1);
203
+ animation: zg-prompt-rail-pending 0.9s ease-in-out infinite alternate;
204
+ }
205
+
206
+ @keyframes zg-prompt-rail-pending {
207
+ to {
208
+ opacity: 0.35;
209
+ }
210
+ }
211
+
212
+ html[data-motion='off'] .zg-prompt-rail-tick[data-pending]::before,
213
+ html[data-motion='reduced'] .zg-prompt-rail-tick[data-pending]::before {
214
+ animation: none;
215
+ }
216
+
186
217
  .zg-prompt-rail-tick:focus-visible {
187
218
  outline: 2px solid var(--zg-ring);
188
219
  outline-offset: 1px;
@@ -303,6 +334,12 @@ html[data-motion='reduced'] .zg-arc::after {
303
334
  padding-inline: 6px;
304
335
  margin-inline: -6px;
305
336
  }
337
+ /* A placeholder (`LazyRow` before its content mounts, or parked) is a plain
338
+ box of its height: the browser checks every `content-visibility: auto`
339
+ element each scrolled frame, and a long history holds thousands. */
340
+ .zg-cv-row[data-lazy] {
341
+ content-visibility: visible;
342
+ }
306
343
  /* A row inside a row (an open fold's, a message group's, a worker's) renders
307
344
  with its parent. Skipped on its own, it lagged a frame behind the parent
308
345
  coming into view: still at its estimate as it scrolled in, then snapping
@@ -1146,18 +1183,26 @@ html[data-motion='reduced'] .zg-script-line::after {
1146
1183
  /* Each streamed line grows in (`Grow`, a grid-row tween): keep that layout
1147
1184
  inside the box, not spreading to the scroller and every visible row. */
1148
1185
  contain: layout;
1186
+ /* Never taller than a full window: wrapped lines and a burst of rows growing in
1187
+ while others shrink out stay inside, clipped at the top, newest at the bottom. */
1188
+ max-height: calc(var(--zg-live-tail) * 1.5em + 1rem);
1189
+ overflow: hidden;
1149
1190
  }
1150
1191
  .zg-live-output[data-full] {
1151
- min-height: calc(var(--zg-live-tail) * 1.5em + 1rem);
1192
+ height: calc(var(--zg-live-tail) * 1.5em + 1rem);
1152
1193
  }
1153
- /* A full window: the new line grows in as the oldest shrinks out, on one curve, so the
1154
- box keeps its height and the lines slide up instead of the box breathing. */
1155
1194
  .zg-live-output > .zg-grow,
1156
1195
  .zg-live-output > .zg-grow[data-shown] {
1157
1196
  transition:
1158
1197
  grid-template-rows var(--zg-motion-settle),
1159
1198
  opacity var(--zg-motion-fade);
1160
1199
  }
1200
+ /* A full window holds still: lines flow through it at once. Animating each one squashes
1201
+ a burst (many growing in as many shrink out) into overlapping, half-drawn rows. */
1202
+ .zg-live-output[data-full] > .zg-grow,
1203
+ .zg-live-output[data-full] > .zg-grow[data-shown] {
1204
+ transition: none;
1205
+ }
1161
1206
  .zg-live-output [data-stream='console'],
1162
1207
  .zg-live-output [data-stream='stderr'] {
1163
1208
  color: var(--zg-text-subtle);