@mcp-b/react-components 0.63.0 → 0.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
  2. package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
  3. package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
  4. package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
  5. package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
  6. package/dist/CodeBlock-dt0L8md0.js +892 -0
  7. package/dist/{EmployeeChrome--PWdtg4B.d.ts → EmployeeChrome-kegSASjC.d.ts} +6 -5
  8. package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
  9. package/dist/ExecutionResult-CXnGcmM4.js +671 -0
  10. package/dist/FileTree-CjfzpN6X.js +968 -0
  11. package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
  12. package/dist/ManagerOffice-T79utm-P.js +2469 -0
  13. package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
  14. package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
  15. package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
  16. package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
  17. package/dist/SetupChecklist-DwscX3Bw.js +230 -0
  18. package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
  19. package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
  20. package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
  21. package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
  22. package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
  23. package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
  24. package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
  25. package/dist/{WorkspaceAutomation-yDZorXla.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
  26. package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
  27. package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
  28. package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
  29. package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
  30. package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
  31. package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
  32. package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
  33. package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
  34. package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
  35. package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
  36. package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
  37. package/dist/assets/desktop/README.md +43 -0
  38. package/dist/assets/desktop/automations.svg +19 -0
  39. package/dist/assets/desktop/document.svg +24 -0
  40. package/dist/assets/desktop/folder.png +0 -0
  41. package/dist/assets/desktop/mail.svg +31 -0
  42. package/dist/assets/desktop/settings.svg +9 -0
  43. package/dist/assets/desktop/trash-full.svg +23 -0
  44. package/dist/assets/desktop/trash.svg +19 -0
  45. package/dist/attachment-preview-DeRqFjdz.js +68 -0
  46. package/dist/attempt-CySQHJsF.js +21 -0
  47. package/dist/command-search-1fjmCBBo.js +34 -0
  48. package/dist/components/agents-sdk/AIProviderDialog.js +757 -224
  49. package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
  50. package/dist/components/agents-sdk/AgentActivity.js +78 -31
  51. package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
  52. package/dist/components/agents-sdk/AgentChat.js +1113 -386
  53. package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
  54. package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
  55. package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
  56. package/dist/components/agents-sdk/AgentComputer.js +8045 -0
  57. package/dist/components/agents-sdk/AgentEvent.js +164 -21
  58. package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
  59. package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
  60. package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
  61. package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
  62. package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
  63. package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
  64. package/dist/components/agents-sdk/BrowserReplay.js +298 -133
  65. package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
  66. package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
  67. package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
  68. package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
  69. package/dist/components/agents-sdk/EmployeeApp.js +108 -46
  70. package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
  71. package/dist/components/agents-sdk/EmployeeChat.js +500 -99
  72. package/dist/components/agents-sdk/EmployeeChrome.d.ts +1 -1
  73. package/dist/components/agents-sdk/EmployeeChrome.js +1375 -557
  74. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
  75. package/dist/components/agents-sdk/EmployeeSchedules.js +281 -64
  76. package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
  77. package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
  78. package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
  79. package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
  80. package/dist/components/agents-sdk/ManagerAccountActions.js +142 -35
  81. package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
  82. package/dist/components/agents-sdk/ManagerOffice.js +1 -1
  83. package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
  84. package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
  85. package/dist/components/agents-sdk/McpConnectionRequest.js +332 -117
  86. package/dist/components/agents-sdk/McpConnectorForm.js +320 -100
  87. package/dist/components/agents-sdk/McpPluginCatalog.js +697 -249
  88. package/dist/components/agents-sdk/McpServerIcon.js +57 -14
  89. package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
  90. package/dist/components/agents-sdk/McpServerPicker.js +542 -158
  91. package/dist/components/agents-sdk/ModelSelector.js +1151 -253
  92. package/dist/components/agents-sdk/PromptInputApproval.js +115 -27
  93. package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
  94. package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
  95. package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
  96. package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
  97. package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
  98. package/dist/components/agents-sdk/SubagentRunPanel.js +357 -129
  99. package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
  100. package/dist/components/agents-sdk/ThinkChat.d.ts +2 -2
  101. package/dist/components/agents-sdk/ThinkChat.js +321 -132
  102. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  103. package/dist/components/agents-sdk/ThinkChatActivity.js +306 -100
  104. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  105. package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
  106. package/dist/components/agents-sdk/ThinkChatToolPanels.js +1386 -404
  107. package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
  108. package/dist/components/agents-sdk/ThinkExecutionDetail.js +219 -45
  109. package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
  110. package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
  111. package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
  112. package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
  113. package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
  114. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +505 -124
  115. package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
  116. package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
  117. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +71 -26
  118. package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
  119. package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
  120. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
  121. package/dist/components/agents-sdk/ThinkScheduleActions.js +363 -132
  122. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  123. package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
  124. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  125. package/dist/components/agents-sdk/ThinkScheduleDetail.js +311 -90
  126. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
  127. package/dist/components/agents-sdk/ThinkScheduleForm.js +1318 -475
  128. package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
  129. package/dist/components/agents-sdk/ThinkThreadPicker.js +434 -214
  130. package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
  131. package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
  132. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  133. package/dist/components/agents-sdk/Workspace.js +491 -166
  134. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  135. package/dist/components/agents-sdk/WorkspaceAutomation.js +1492 -415
  136. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  137. package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1316 -525
  138. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
  139. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
  140. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  141. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  142. package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
  143. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
  144. package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
  145. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
  146. package/dist/components/agents-sdk/WorkspaceExplorer.js +267 -85
  147. package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
  148. package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
  149. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
  150. package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
  151. package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
  152. package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
  153. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
  154. package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
  155. package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
  156. package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
  157. package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
  158. package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
  159. package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
  160. package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
  161. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
  162. package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
  163. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
  164. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  165. package/dist/components/agents-sdk/WorkspaceMountManager.js +118 -58
  166. package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
  167. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  168. package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
  169. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  170. package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
  171. package/dist/components/ai-sdk/Activity.js +768 -192
  172. package/dist/components/ai-sdk/AgentAttention.js +286 -58
  173. package/dist/components/ai-sdk/AgentChatMessageEditor.js +193 -68
  174. package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
  175. package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
  176. package/dist/components/ai-sdk/AgentChatTurnError.js +75 -25
  177. package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
  178. package/dist/components/ai-sdk/Approval.js +574 -172
  179. package/dist/components/ai-sdk/Artifact.d.ts +1 -1
  180. package/dist/components/ai-sdk/Artifact.js +535 -128
  181. package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
  182. package/dist/components/ai-sdk/ChainOfThought.js +404 -80
  183. package/dist/components/ai-sdk/Checkpoint.js +229 -45
  184. package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
  185. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  186. package/dist/components/ai-sdk/ComposerLink.js +216 -48
  187. package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
  188. package/dist/components/ai-sdk/Context.js +737 -178
  189. package/dist/components/ai-sdk/Conversation.d.ts +1 -1
  190. package/dist/components/ai-sdk/Conversation.js +305 -68
  191. package/dist/components/ai-sdk/ExpansionState.js +74 -15
  192. package/dist/components/ai-sdk/Goal.js +435 -116
  193. package/dist/components/ai-sdk/InlineCitation.js +313 -76
  194. package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
  195. package/dist/components/ai-sdk/Message.d.ts +1 -1
  196. package/dist/components/ai-sdk/Message.js +1010 -195
  197. package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
  198. package/dist/components/ai-sdk/MessageScroller.js +264 -46
  199. package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
  200. package/dist/components/ai-sdk/Plan.js +639 -128
  201. package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
  202. package/dist/components/ai-sdk/PromptInput.js +2735 -794
  203. package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
  204. package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
  205. package/dist/components/ai-sdk/Queue.js +792 -154
  206. package/dist/components/ai-sdk/Reasoning.js +268 -69
  207. package/dist/components/ai-sdk/Sources.js +226 -63
  208. package/dist/components/ai-sdk/Task.js +294 -71
  209. package/dist/components/ai-sdk/ToolApproval.js +126 -26
  210. package/dist/components/ai-sdk/ToolInvocation.js +112 -22
  211. package/dist/components/extension/ChatGptSignInScreen.js +1 -82
  212. package/dist/components/extension/CodexModelSelector.d.ts +1 -1
  213. package/dist/components/extension/CodexModelSelector.js +467 -146
  214. package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
  215. package/dist/components/extension/ConversationTabPicker.js +254 -76
  216. package/dist/components/extension/FirstRunSetup.d.ts +100 -36
  217. package/dist/components/extension/FirstRunSetup.js +3974 -1016
  218. package/dist/components/foundations/Accordion.js +186 -41
  219. package/dist/components/foundations/AlertDialog.js +425 -97
  220. package/dist/components/foundations/AppIcon.d.ts +13 -13
  221. package/dist/components/foundations/AppIcon.js +183 -34
  222. package/dist/components/foundations/Autocomplete.js +408 -89
  223. package/dist/components/foundations/Avatar.d.ts +100 -2
  224. package/dist/components/foundations/Avatar.js +204 -44
  225. package/dist/components/foundations/Button.js +64 -13
  226. package/dist/components/foundations/Card.js +357 -63
  227. package/dist/components/foundations/Checkbox.js +82 -17
  228. package/dist/components/foundations/CheckboxGroup.js +266 -58
  229. package/dist/components/foundations/Collapsible.d.ts +2 -1
  230. package/dist/components/foundations/Collapsible.js +129 -26
  231. package/dist/components/foundations/Combobox.js +408 -89
  232. package/dist/components/foundations/ContextMenu.d.ts +2 -2
  233. package/dist/components/foundations/ContextMenu.js +591 -117
  234. package/dist/components/foundations/DescriptionList.js +159 -28
  235. package/dist/components/foundations/Dialog.js +373 -89
  236. package/dist/components/foundations/EmptyState.js +86 -23
  237. package/dist/components/foundations/Favicon.d.ts +17 -0
  238. package/dist/components/foundations/Favicon.js +62 -0
  239. package/dist/components/foundations/Field.js +525 -108
  240. package/dist/components/foundations/Fieldset.js +115 -23
  241. package/dist/components/foundations/Form.js +38 -9
  242. package/dist/components/foundations/FormattedDate.d.ts +19 -5
  243. package/dist/components/foundations/FormattedDate.js +82 -12
  244. package/dist/components/foundations/IconButton.d.ts +1 -1
  245. package/dist/components/foundations/IconButton.js +114 -17
  246. package/dist/components/foundations/Input.js +38 -9
  247. package/dist/components/foundations/Kbd.js +55 -10
  248. package/dist/components/foundations/Label.js +56 -12
  249. package/dist/components/foundations/LinkButton.js +67 -15
  250. package/dist/components/foundations/Marker.js +138 -29
  251. package/dist/components/foundations/Menu.d.ts +1 -1
  252. package/dist/components/foundations/Menu.js +634 -136
  253. package/dist/components/foundations/Menubar.d.ts +2 -2
  254. package/dist/components/foundations/Menubar.js +685 -130
  255. package/dist/components/foundations/Meter.js +186 -41
  256. package/dist/components/foundations/NavigationMenu.js +426 -95
  257. package/dist/components/foundations/NumberField.js +223 -49
  258. package/dist/components/foundations/Popover.js +398 -88
  259. package/dist/components/foundations/PreviewCard.js +234 -53
  260. package/dist/components/foundations/Progress.js +117 -25
  261. package/dist/components/foundations/RadioGroup.d.ts +13 -5
  262. package/dist/components/foundations/RadioGroup.js +132 -25
  263. package/dist/components/foundations/ScrollArea.js +230 -51
  264. package/dist/components/foundations/SearchField.d.ts +8 -3
  265. package/dist/components/foundations/SearchField.js +129 -28
  266. package/dist/components/foundations/Select.js +648 -145
  267. package/dist/components/foundations/Separator.js +61 -12
  268. package/dist/components/foundations/Slider.js +260 -57
  269. package/dist/components/foundations/Stepper.d.ts +1 -1
  270. package/dist/components/foundations/Stepper.js +561 -127
  271. package/dist/components/foundations/Switch.js +82 -18
  272. package/dist/components/foundations/Tabs.d.ts +2 -2
  273. package/dist/components/foundations/Tabs.js +282 -53
  274. package/dist/components/foundations/Textarea.js +43 -9
  275. package/dist/components/foundations/ThemeProvider.js +138 -52
  276. package/dist/components/foundations/Toast.d.ts +10 -2
  277. package/dist/components/foundations/Toast.js +322 -75
  278. package/dist/components/foundations/Toggle.d.ts +5 -2
  279. package/dist/components/foundations/Toggle.js +51 -10
  280. package/dist/components/foundations/ToggleGroup.d.ts +3 -3
  281. package/dist/components/foundations/ToggleGroup.js +215 -59
  282. package/dist/components/foundations/Toolbar.js +249 -61
  283. package/dist/components/foundations/Tooltip.d.ts +3 -3
  284. package/dist/components/foundations/Tooltip.js +311 -55
  285. package/dist/components/foundations/TransitionSurface.js +43 -9
  286. package/dist/components/foundations/icons.d.ts +2 -2
  287. package/dist/components/foundations/icons.js +2 -2
  288. package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
  289. package/dist/components/general-purpose/ActionGuide.js +290 -64
  290. package/dist/components/general-purpose/AppFrame.js +72 -14
  291. package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
  292. package/dist/components/general-purpose/AppTopBar.js +349 -60
  293. package/dist/components/general-purpose/BrandLoading.js +37 -9
  294. package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
  295. package/dist/components/general-purpose/CommandPalette.js +271 -0
  296. package/dist/components/general-purpose/Commit.d.ts +1 -1
  297. package/dist/components/general-purpose/Commit.js +937 -167
  298. package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
  299. package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
  300. package/dist/components/general-purpose/FileTree.d.ts +20 -7
  301. package/dist/components/general-purpose/FileTree.js +1 -1
  302. package/dist/components/general-purpose/ListDetail.d.ts +84 -0
  303. package/dist/components/general-purpose/ListDetail.js +423 -0
  304. package/dist/components/general-purpose/NotificationPrompt.js +20 -11
  305. package/dist/components/general-purpose/PricingBillingToggle.js +33 -6
  306. package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
  307. package/dist/components/general-purpose/PricingFAQ.js +53 -12
  308. package/dist/components/general-purpose/PricingPage.js +376 -139
  309. package/dist/components/general-purpose/PricingPlanCard.js +209 -84
  310. package/dist/components/general-purpose/PricingUsageCalculator.js +231 -81
  311. package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
  312. package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
  313. package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
  314. package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
  315. package/dist/components/general-purpose/ScreenStack.js +427 -0
  316. package/dist/components/general-purpose/SettingsFormDialog.js +235 -77
  317. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  318. package/dist/components/general-purpose/StatusScreen.js +82 -24
  319. package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
  320. package/dist/components/general-purpose/SwipeActions.js +357 -0
  321. package/dist/components/general-purpose/Terminal.d.ts +22 -48
  322. package/dist/components/general-purpose/Terminal.js +320 -174
  323. package/dist/components/general-purpose/TestResults.js +975 -196
  324. package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
  325. package/dist/components/general-purpose/ThemeModeControl.js +66 -23
  326. package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
  327. package/dist/components/general-purpose/WallpaperPicker.js +180 -0
  328. package/dist/components/general-purpose/WebPreview.d.ts +5 -7
  329. package/dist/components/general-purpose/WebPreview.js +770 -203
  330. package/dist/components/nanites/AgentConnection.js +323 -84
  331. package/dist/components/nanites/AgentToolDetail.js +233 -53
  332. package/dist/components/nanites/GithubMotionMark.js +37 -9
  333. package/dist/components/nanites/NaniteScene.js +535 -323
  334. package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
  335. package/dist/container-width-C43ccJ84.js +17 -0
  336. package/dist/context-Ddsp8HgD.js +43 -0
  337. package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
  338. package/dist/copy-button-DWBVJR6D.js +118 -0
  339. package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
  340. package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
  341. package/dist/icons-nLTnB9kd.js +470 -0
  342. package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
  343. package/dist/motion-CGM3i6lX.js +319 -0
  344. package/dist/motion-preferences-6qsDIDvH.js +13 -0
  345. package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
  346. package/dist/progress-ring-BO649JA9.js +79 -0
  347. package/dist/provider-logos-Ceu7iYFx.js +362 -0
  348. package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
  349. package/dist/styles/accessibility.css +26 -0
  350. package/dist/styles/accordion.css +0 -2
  351. package/dist/styles/activity.css +20 -12
  352. package/dist/styles/agent-attention.css +31 -10
  353. package/dist/styles/agent-chat.css +7 -6
  354. package/dist/styles/agent-computer-motion-reduction.css +118 -0
  355. package/dist/styles/agent-computer-motion.css +127 -0
  356. package/dist/styles/agent-computer-phone.css +942 -0
  357. package/dist/styles/agent-computer.css +1764 -0
  358. package/dist/styles/agent-connection.css +5 -5
  359. package/dist/styles/agent-screen-switcher.css +313 -0
  360. package/dist/styles/app-icon.css +34 -30
  361. package/dist/styles/app-top-bar.css +33 -18
  362. package/dist/styles/approval.css +3 -3
  363. package/dist/styles/artifact.css +1 -1
  364. package/dist/styles/attachment-preview.css +2 -4
  365. package/dist/styles/avatar.css +12 -14
  366. package/dist/styles/base-ui-motion.css +84 -18
  367. package/dist/styles/base-ui-motion.test.tsx +305 -0
  368. package/dist/styles/base.css +16 -12
  369. package/dist/styles/brand.test.ts +7 -20
  370. package/dist/styles/browser-control-overlay.css +1 -1
  371. package/dist/styles/browser-live-screen.css +2 -2
  372. package/dist/styles/browser-live-view.css +1 -1
  373. package/dist/styles/browser-replay.css +0 -8
  374. package/dist/styles/browser-run-panel.css +275 -37
  375. package/dist/styles/button.css +52 -9
  376. package/dist/styles/card.css +6 -5
  377. package/dist/styles/chain-of-thought.css +0 -10
  378. package/dist/styles/checkpoint.css +2 -2
  379. package/dist/styles/codex-model-selector.css +2 -2
  380. package/dist/styles/color-contrast.test.ts +18 -1
  381. package/dist/styles/command-palette.css +110 -0
  382. package/dist/styles/composer-link.css +11 -7
  383. package/dist/styles/composition-motion.css +3 -14
  384. package/dist/styles/context.css +2 -2
  385. package/dist/styles/conversation-tab-picker.css +7 -0
  386. package/dist/styles/conversation.css +8 -2
  387. package/dist/styles/dialog.css +2 -2
  388. package/dist/styles/employee-app.css +8 -2
  389. package/dist/styles/employee-chrome.css +4 -4
  390. package/dist/styles/execution-board.css +206 -114
  391. package/dist/styles/execution-result.css +2 -2
  392. package/dist/styles/field.css +187 -4
  393. package/dist/styles/file-tree.css +218 -40
  394. package/dist/styles/first-run-setup.css +914 -187
  395. package/dist/styles/github-motion-mark.css +0 -8
  396. package/dist/styles/index.css +145 -133
  397. package/dist/styles/inline-citation.css +5 -4
  398. package/dist/styles/list-detail.css +57 -0
  399. package/dist/styles/manager-office.css +6 -8
  400. package/dist/styles/manager-work.css +4 -2
  401. package/dist/styles/mcp-plugin-catalog.css +2 -2
  402. package/dist/styles/mcp-server-picker.css +3 -6
  403. package/dist/styles/media-preview-card.css +2 -2
  404. package/dist/styles/menu.css +0 -9
  405. package/dist/styles/menubar.css +18 -6
  406. package/dist/styles/message-scroller.css +47 -9
  407. package/dist/styles/message.css +3 -3
  408. package/dist/styles/model-selector.css +1 -1
  409. package/dist/styles/motion-reduction.css +39 -6
  410. package/dist/styles/pricing-page.css +1 -1
  411. package/dist/styles/prompt-input.css +29 -29
  412. package/dist/styles/queue.css +1 -1
  413. package/dist/styles/recipes.css +212 -28
  414. package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
  415. package/dist/styles/responsive-sidebar-shell.css +40 -43
  416. package/dist/styles/screen-stack.css +123 -0
  417. package/dist/styles/search-field.css +80 -3
  418. package/dist/styles/stepper.css +0 -10
  419. package/dist/styles/streamdown.css +2 -2
  420. package/dist/styles/subagent-run.css +9 -5
  421. package/dist/styles/swipe-actions.css +158 -0
  422. package/dist/styles/tabs.css +80 -23
  423. package/dist/styles/task.css +7 -1
  424. package/dist/styles/terminal.css +66 -78
  425. package/dist/styles/test-results.css +1 -19
  426. package/dist/styles/textarea.css +2 -1
  427. package/dist/styles/theme-mode-control.css +154 -26
  428. package/dist/styles/think-chat-tool-panels.css +1 -1
  429. package/dist/styles/think-execution-workbench.css +0 -9
  430. package/dist/styles/think-full-app.css +7 -1
  431. package/dist/styles/think-schedule.css +81 -54
  432. package/dist/styles/think-thread-picker.css +28 -37
  433. package/dist/styles/toast.css +11 -0
  434. package/dist/styles/toggle-group.css +0 -10
  435. package/dist/styles/toggle.css +13 -0
  436. package/dist/styles/tooltip.css +12 -0
  437. package/dist/styles/transition-surface.css +1 -0
  438. package/dist/styles/wallpaper-picker.css +224 -0
  439. package/dist/styles/web-preview.css +47 -18
  440. package/dist/styles/workspace-automation.css +116 -17
  441. package/dist/styles/workspace-concepts.css +1 -1
  442. package/dist/styles/workspace-desktop.css +124 -0
  443. package/dist/styles/workspace-entity-card.css +3 -1
  444. package/dist/styles/workspace-explorer.css +499 -5
  445. package/dist/utils/brand-marks.d.ts +13 -0
  446. package/dist/utils/brand-marks.js +14 -0
  447. package/dist/utils/desktop-artwork.d.ts +17 -0
  448. package/dist/utils/desktop-artwork.js +18 -0
  449. package/dist/utils/favicon.d.ts +6 -2
  450. package/dist/utils/favicon.js +16 -4
  451. package/dist/utils/structured-code.d.ts +1 -1
  452. package/dist/workspace-assets-DdtnBDU3.js +213 -0
  453. package/dist/{workspace-concept-panel-C_oYhPSx.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
  454. package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
  455. package/dist/workspace-delete-BOY6CMBf.js +183 -0
  456. package/dist/workspace-drag-B6hMXUNt.js +304 -0
  457. package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
  458. package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
  459. package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
  460. package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
  461. package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
  462. package/package.json +9 -3
  463. package/dist/Avatar-t1YRzdwB.d.ts +0 -101
  464. package/dist/CodeBlock-DYQdZUH6.js +0 -318
  465. package/dist/ExecutionResult-2fBkpIGN.js +0 -279
  466. package/dist/FileTree-CDLOD643.js +0 -323
  467. package/dist/ManagerOffice-CvVSHnOM.js +0 -1129
  468. package/dist/SetupChecklist-B-iEta9v.js +0 -78
  469. package/dist/ThinkSchedule-DPoOYWTQ.d.ts +0 -34
  470. package/dist/WorkspaceFileView-DwIkehSM.js +0 -783
  471. package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
  472. package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
  473. package/dist/attachment-preview-1CXJvrmb.js +0 -25
  474. package/dist/chatgpt-sign-in-button-D8AT6x4c.js +0 -32
  475. package/dist/connected-app-drafts-DtA2fBK5.js +0 -283
  476. package/dist/copy-button-DbR932tF.js +0 -45
  477. package/dist/icons-GoybMAB2.js +0 -141
  478. package/dist/progress-ring-L2bbF0ji.js +0 -40
  479. package/dist/provider-logos-DWYY8wNz.js +0 -99
  480. package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
  481. package/dist/workspace-assets-F3r6XltC.js +0 -107
  482. package/dist/workspace-concept-panel-D8oEvR0n.js +0 -66
  483. package/dist/workspace-delete-CQvv1eDE.js +0 -81
  484. package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
@@ -0,0 +1,1562 @@
1
+ import { desktopArtwork } from "./utils/desktop-artwork.js";
2
+ import { g as ChevronRightIcon, gt as XIcon, h as ChevronLeftIcon } from "./icons-nLTnB9kd.js";
3
+ import { Button } from "./components/foundations/Button.js";
4
+ import { Dialog } from "./components/foundations/Dialog.js";
5
+ import { AppIcon } from "./components/foundations/AppIcon.js";
6
+ import { i as workspaceBasename } from "./workspace-path-TZggP-u4.js";
7
+ import { i as PortalContext } from "./context-Ddsp8HgD.js";
8
+ import { AppTopBar } from "./components/general-purpose/AppTopBar.js";
9
+ import { ContextMenu } from "./components/foundations/ContextMenu.js";
10
+ import { workspaceFileCommandForKey } from "./components/agents-sdk/WorkspaceFileCommands.js";
11
+ import { r as WorkspacePreviewFrame } from "./workspace-media-preview-B4iB5Tvi.js";
12
+ import { c } from "react/compiler-runtime";
13
+ import * as React from "react";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ //#region src/components/_internal/file-grid.tsx
16
+ const OPTION$1 = "[data-workspace-path]";
17
+ const ARROW_KEYS = /* @__PURE__ */ new Set([
18
+ "ArrowDown",
19
+ "ArrowUp",
20
+ "ArrowLeft",
21
+ "ArrowRight"
22
+ ]);
23
+ /** Whether a key or a press is modified, so a view's plain-key handling leaves it alone. */
24
+ function hasModifier(event) {
25
+ return event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
26
+ }
27
+ /** Arrow keys walk the icons the way the Finder does: by geometry, not DOM order. */
28
+ function nextOption(options, index, key) {
29
+ const vertical = key === "ArrowDown" || key === "ArrowUp";
30
+ if (!vertical && key !== "ArrowLeft" && key !== "ArrowRight") return void 0;
31
+ const axis = vertical ? "top" : "left";
32
+ const cross = vertical ? "left" : "top";
33
+ const forward = key === "ArrowDown" || key === "ArrowRight";
34
+ const rects = options.map((option) => option.getBoundingClientRect());
35
+ const current = rects[index];
36
+ const candidates = rects.map((rect, i) => ({
37
+ rect,
38
+ i
39
+ })).filter(({ rect }) => forward ? rect[axis] > current[axis] : rect[axis] < current[axis]);
40
+ if (candidates.length === 0) return void 0;
41
+ const nearest = (forward ? Math.min : Math.max)(...candidates.map(({ rect }) => rect[axis]));
42
+ return candidates.filter(({ rect }) => rect[axis] === nearest).reduce((best, candidate) => Math.abs(candidate.rect[cross] - current[cross]) < Math.abs(best.rect[cross] - current[cross]) ? candidate : best).i;
43
+ }
44
+ /** The Finder's type-to-select pause: a longer gap starts a new name. */
45
+ const TYPE_AHEAD_MS = 1e3;
46
+ /**
47
+ * Typing selects the first object whose name starts with what was typed;
48
+ * repeating one letter steps through that letter's objects. Space joins the
49
+ * name only once typing has begun, so on its own it stays Quick Look.
50
+ */
51
+ function typeAhead(event, typed, collection) {
52
+ const list = event.currentTarget;
53
+ const target = event.target;
54
+ if (event.key.length !== 1 || event.altKey || event.ctrlKey || event.metaKey || event.nativeEvent.isComposing || target !== list && !target.matches(OPTION$1)) return;
55
+ const text = event.timeStamp - typed.time > TYPE_AHEAD_MS ? "" : typed.text;
56
+ if (event.key === " " && !text) return;
57
+ typed.text = text + event.key.toLocaleLowerCase();
58
+ typed.time = event.timeStamp;
59
+ event.preventDefault();
60
+ const options = [...list.querySelectorAll(OPTION$1)];
61
+ const names = collection?.names ?? options.map((option) => option.dataset.fileGridName ?? "");
62
+ const current = target === list ? -1 : optionIndex(options, target, collection);
63
+ const first = typed.text[0];
64
+ const cycling = typed.text.length > 1 && typed.text === first.repeat(typed.text.length);
65
+ const indexes = names.map((_, index) => index);
66
+ const order = cycling ? [...indexes.slice(current + 1), ...indexes.slice(0, current + 1)] : indexes;
67
+ const prefix = cycling ? first : typed.text;
68
+ const match = order.find((index) => names[index].toLocaleLowerCase().startsWith(prefix));
69
+ if (match !== void 0) focusOption(options, match, collection);
70
+ }
71
+ /** An option's place among all the objects, drawn or not. */
72
+ function optionIndex(options, option, collection) {
73
+ return collection ? Number(option.ariaPosInSet) - 1 : options.indexOf(option);
74
+ }
75
+ function focusOption(options, index, collection) {
76
+ if (collection) collection.focus(index);
77
+ else options[index]?.focus();
78
+ }
79
+ /**
80
+ * One listbox for every view of file objects — desktop icons, an icon grid, a
81
+ * list of rows. It is one tab stop; arrow keys then move focus by geometry, so
82
+ * the same handler walks a wrapped grid and a single column, and Home/End jump
83
+ * to the ends. In an `aria-multiselectable` grid, Shift with those keys moves
84
+ * focus as well, and the view extends its selection to it. Children are `<li role="none">` wrapping one element spread
85
+ * with `fileGridOption()`. A keydown the host handles first (Escape, Space)
86
+ * calls `preventDefault()` to keep it from moving focus. Typing a name
87
+ * focuses the first object it starts, as the Finder's type-to-select does.
88
+ */
89
+ function FileGrid(t0) {
90
+ const $ = c(16);
91
+ let collection;
92
+ let onKeyDown;
93
+ let onKeyDownCapture;
94
+ let props;
95
+ if ($[0] !== t0) {
96
+ ({onKeyDown, onKeyDownCapture, collection, ...props} = t0);
97
+ $[0] = t0;
98
+ $[1] = collection;
99
+ $[2] = onKeyDown;
100
+ $[3] = onKeyDownCapture;
101
+ $[4] = props;
102
+ } else {
103
+ collection = $[1];
104
+ onKeyDown = $[2];
105
+ onKeyDownCapture = $[3];
106
+ props = $[4];
107
+ }
108
+ let t1;
109
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
110
+ t1 = {
111
+ text: "",
112
+ time: -Infinity
113
+ };
114
+ $[5] = t1;
115
+ } else t1 = $[5];
116
+ const typed = React.useRef(t1);
117
+ let t2;
118
+ if ($[6] !== collection || $[7] !== onKeyDownCapture) {
119
+ t2 = (event) => {
120
+ onKeyDownCapture?.(event);
121
+ if (!event.defaultPrevented) typeAhead(event, typed.current, collection);
122
+ };
123
+ $[6] = collection;
124
+ $[7] = onKeyDownCapture;
125
+ $[8] = t2;
126
+ } else t2 = $[8];
127
+ let t3;
128
+ if ($[9] !== collection || $[10] !== onKeyDown) {
129
+ t3 = (event_0) => {
130
+ onKeyDown?.(event_0);
131
+ if (event_0.defaultPrevented || event_0.altKey || event_0.ctrlKey || event_0.metaKey || event_0.shiftKey && event_0.currentTarget.ariaMultiSelectable !== "true" || !event_0.currentTarget.contains(event_0.target)) return;
132
+ const options = [...event_0.currentTarget.querySelectorAll(OPTION$1)];
133
+ if (options.length === 0) return;
134
+ const onList = event_0.target === event_0.currentTarget;
135
+ const index = options.indexOf(event_0.target);
136
+ if (index < 0 && !onList) return;
137
+ const count = collection?.names.length ?? options.length;
138
+ const end = event_0.key === "Home" ? 0 : event_0.key === "End" ? count - 1 : onList && ARROW_KEYS.has(event_0.key) ? 0 : void 0;
139
+ if (end !== void 0) {
140
+ event_0.preventDefault();
141
+ focusOption(options, end, collection);
142
+ return;
143
+ }
144
+ const next = nextOption(options, index, event_0.key);
145
+ if (next === void 0) return;
146
+ event_0.preventDefault();
147
+ options[next]?.focus();
148
+ };
149
+ $[9] = collection;
150
+ $[10] = onKeyDown;
151
+ $[11] = t3;
152
+ } else t3 = $[11];
153
+ let t4;
154
+ if ($[12] !== props || $[13] !== t2 || $[14] !== t3) {
155
+ t4 = /* @__PURE__ */ jsx("ul", {
156
+ role: "listbox",
157
+ onKeyDownCapture: t2,
158
+ onKeyDown: t3,
159
+ ...props
160
+ });
161
+ $[12] = props;
162
+ $[13] = t2;
163
+ $[14] = t3;
164
+ $[15] = t4;
165
+ } else t4 = $[15];
166
+ return t4;
167
+ }
168
+ /**
169
+ * The option attributes for one file object: its path, the name typing
170
+ * matches, its selection, and whether it is the grid's single tab stop (the
171
+ * selected object, else the first).
172
+ */
173
+ function fileGridOption({ path, name, selected, tabStop, position }) {
174
+ return {
175
+ role: "option",
176
+ "aria-selected": selected,
177
+ "aria-posinset": position ? position.index + 1 : void 0,
178
+ "aria-setsize": position?.count,
179
+ tabIndex: tabStop ? 0 : -1,
180
+ "data-workspace-path": path,
181
+ "data-file-grid-name": name
182
+ };
183
+ }
184
+ /** An object's picture: the host's thumbnail, else the Finder's generic folder or page. */
185
+ function fileGridArtwork(entry, renderThumbnail) {
186
+ return renderThumbnail?.(entry) ?? /* @__PURE__ */ jsx(AppIcon.Root, { children: /* @__PURE__ */ jsx(AppIcon.Image, {
187
+ src: entry.type === "directory" ? desktopArtwork.folder : desktopArtwork.document,
188
+ alt: ""
189
+ }) });
190
+ }
191
+ //#endregion
192
+ //#region src/components/_internal/workspace-file-tile.tsx
193
+ /**
194
+ * One file object in a `FileGrid`, on the desktop or in a folder: its
195
+ * artwork, its name, its context menu and its rename field.
196
+ */
197
+ function WorkspaceFileTile(t0) {
198
+ const $ = c(41);
199
+ let classes;
200
+ let details;
201
+ let entry;
202
+ let menu;
203
+ let menuDisabled;
204
+ let menuFinalFocus;
205
+ let option;
206
+ let props;
207
+ let renameField;
208
+ let renaming;
209
+ let renderThumbnail;
210
+ if ($[0] !== t0) {
211
+ ({entry, option, classes, renderThumbnail, renaming, details, menu, menuFinalFocus, menuDisabled, renameField, ...props} = t0);
212
+ $[0] = t0;
213
+ $[1] = classes;
214
+ $[2] = details;
215
+ $[3] = entry;
216
+ $[4] = menu;
217
+ $[5] = menuDisabled;
218
+ $[6] = menuFinalFocus;
219
+ $[7] = option;
220
+ $[8] = props;
221
+ $[9] = renameField;
222
+ $[10] = renaming;
223
+ $[11] = renderThumbnail;
224
+ } else {
225
+ classes = $[1];
226
+ details = $[2];
227
+ entry = $[3];
228
+ menu = $[4];
229
+ menuDisabled = $[5];
230
+ menuFinalFocus = $[6];
231
+ option = $[7];
232
+ props = $[8];
233
+ renameField = $[9];
234
+ renaming = $[10];
235
+ renderThumbnail = $[11];
236
+ }
237
+ const portalContainer = React.use(PortalContext);
238
+ const t1 = classes.artwork;
239
+ let t2;
240
+ if ($[12] !== entry || $[13] !== renderThumbnail) {
241
+ t2 = fileGridArtwork(entry, renderThumbnail);
242
+ $[12] = entry;
243
+ $[13] = renderThumbnail;
244
+ $[14] = t2;
245
+ } else t2 = $[14];
246
+ let t3;
247
+ if ($[15] !== classes.artwork || $[16] !== t2) {
248
+ t3 = /* @__PURE__ */ jsx("span", {
249
+ className: t1,
250
+ "aria-hidden": "true",
251
+ children: t2
252
+ });
253
+ $[15] = classes.artwork;
254
+ $[16] = t2;
255
+ $[17] = t3;
256
+ } else t3 = $[17];
257
+ const t4 = `${classes.name} sigvelo-truncate`;
258
+ const t5 = renaming ? "" : void 0;
259
+ let t6;
260
+ if ($[18] !== entry.name || $[19] !== t4 || $[20] !== t5) {
261
+ t6 = /* @__PURE__ */ jsx("span", {
262
+ className: t4,
263
+ "data-file-name": "",
264
+ "data-renaming": t5,
265
+ children: entry.name
266
+ });
267
+ $[18] = entry.name;
268
+ $[19] = t4;
269
+ $[20] = t5;
270
+ $[21] = t6;
271
+ } else t6 = $[21];
272
+ let t7;
273
+ if ($[22] !== details || $[23] !== option || $[24] !== t3 || $[25] !== t6) {
274
+ t7 = /* @__PURE__ */ jsxs(ContextMenu.Trigger, {
275
+ render: option,
276
+ children: [
277
+ t3,
278
+ t6,
279
+ details
280
+ ]
281
+ });
282
+ $[22] = details;
283
+ $[23] = option;
284
+ $[24] = t3;
285
+ $[25] = t6;
286
+ $[26] = t7;
287
+ } else t7 = $[26];
288
+ let t8;
289
+ if ($[27] !== menu || $[28] !== menuFinalFocus) {
290
+ t8 = /* @__PURE__ */ jsx(ContextMenu.Positioner, { children: /* @__PURE__ */ jsx(ContextMenu.Popup, {
291
+ finalFocus: menuFinalFocus,
292
+ children: menu
293
+ }) });
294
+ $[27] = menu;
295
+ $[28] = menuFinalFocus;
296
+ $[29] = t8;
297
+ } else t8 = $[29];
298
+ let t9;
299
+ if ($[30] !== portalContainer || $[31] !== t8) {
300
+ t9 = /* @__PURE__ */ jsx(ContextMenu.Portal, {
301
+ container: portalContainer,
302
+ children: t8
303
+ });
304
+ $[30] = portalContainer;
305
+ $[31] = t8;
306
+ $[32] = t9;
307
+ } else t9 = $[32];
308
+ let t10;
309
+ if ($[33] !== menuDisabled || $[34] !== t7 || $[35] !== t9) {
310
+ t10 = /* @__PURE__ */ jsxs(ContextMenu.Root, {
311
+ disabled: menuDisabled,
312
+ children: [t7, t9]
313
+ });
314
+ $[33] = menuDisabled;
315
+ $[34] = t7;
316
+ $[35] = t9;
317
+ $[36] = t10;
318
+ } else t10 = $[36];
319
+ const t11 = renaming ? renameField : null;
320
+ let t12;
321
+ if ($[37] !== props || $[38] !== t10 || $[39] !== t11) {
322
+ t12 = /* @__PURE__ */ jsxs("li", {
323
+ role: "none",
324
+ ...props,
325
+ children: [t10, t11]
326
+ });
327
+ $[37] = props;
328
+ $[38] = t10;
329
+ $[39] = t11;
330
+ $[40] = t12;
331
+ } else t12 = $[40];
332
+ return t12;
333
+ }
334
+ //#endregion
335
+ //#region src/components/_internal/workspace-selection.tsx
336
+ const OPTION = "[data-workspace-path]";
337
+ /** The keys a file grid moves focus with; Shift with one extends the selection. */
338
+ const NAVIGATION_KEYS = /* @__PURE__ */ new Set([
339
+ "ArrowUp",
340
+ "ArrowDown",
341
+ "ArrowLeft",
342
+ "ArrowRight",
343
+ "Home",
344
+ "End"
345
+ ]);
346
+ /** How long a click on a selected object's name waits before renaming, so a double-click still opens. */
347
+ const RENAME_DELAY_MS = 600;
348
+ /** How far a press on empty space moves before it draws a selection rectangle. */
349
+ const MARQUEE_SLOP_PX = 3;
350
+ /**
351
+ * The Finder's handling of one view of workspace objects — the desktop, or a
352
+ * Finder window's list or grid: its selection (click, Command, Shift, ⌘A, a
353
+ * selection rectangle, and from the keyboard Shift with the arrows, Home and
354
+ * End from an anchor, and Control or Command with Space to add or remove the
355
+ * focused object), Quick Look, the rename field, the file shortcuts and the
356
+ * paste event. Commands that change the workspace go to the host's
357
+ * {@link WorkspaceFileCommands}; this hook only decides which one was asked
358
+ * for. When a command takes objects out of the view, selection and focus move
359
+ * to the next one, and the view's status says what happened.
360
+ */
361
+ function useWorkspaceSelection(t0) {
362
+ const $ = c(152);
363
+ const { order, directory, commands, finder, surface, open, quickLook } = t0;
364
+ let t1;
365
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
366
+ t1 = [];
367
+ $[0] = t1;
368
+ } else t1 = $[0];
369
+ let t2;
370
+ if ($[1] !== directory) {
371
+ t2 = {
372
+ directory,
373
+ paths: t1
374
+ };
375
+ $[1] = directory;
376
+ $[2] = t2;
377
+ } else t2 = $[2];
378
+ const [stored, setStored] = React.useState(t2);
379
+ const [renaming, setRenaming] = React.useState(null);
380
+ const [preview, setPreview] = React.useState(null);
381
+ const [announcement, setAnnouncement] = React.useState("");
382
+ let t3;
383
+ if ($[3] !== directory || $[4] !== stored.directory || $[5] !== stored.paths) {
384
+ t3 = stored.directory === directory ? stored.paths : [];
385
+ $[3] = directory;
386
+ $[4] = stored.directory;
387
+ $[5] = stored.paths;
388
+ $[6] = t3;
389
+ } else t3 = $[6];
390
+ const selection = t3;
391
+ let t4;
392
+ if ($[7] !== order || $[8] !== selection) {
393
+ let t5;
394
+ if ($[10] !== order) {
395
+ t5 = (path) => order.includes(path);
396
+ $[10] = order;
397
+ $[11] = t5;
398
+ } else t5 = $[11];
399
+ t4 = selection.filter(t5);
400
+ $[7] = order;
401
+ $[8] = selection;
402
+ $[9] = t4;
403
+ } else t4 = $[9];
404
+ const selected = t4;
405
+ const pointerType = React.useRef("mouse");
406
+ const deselectOnClick = React.useRef(false);
407
+ const renameOnClick = React.useRef(false);
408
+ const renameTimer = React.useRef(0);
409
+ const pasteFallback = React.useRef(0);
410
+ const marquee = React.useRef(null);
411
+ const overlay = React.useRef(null);
412
+ const pendingFocus = React.useRef(null);
413
+ const keepFocus = React.useRef(false);
414
+ const anchor = React.useRef(null);
415
+ const extending = React.useRef(false);
416
+ const departure = React.useRef(null);
417
+ let t5;
418
+ if ($[12] !== directory) {
419
+ t5 = (paths) => setStored({
420
+ directory,
421
+ paths
422
+ });
423
+ $[12] = directory;
424
+ $[13] = t5;
425
+ } else t5 = $[13];
426
+ const select = t5;
427
+ let t6;
428
+ if ($[14] !== selected) {
429
+ t6 = (path_0) => selected.includes(path_0);
430
+ $[14] = selected;
431
+ $[15] = t6;
432
+ } else t6 = $[15];
433
+ const isSelected = t6;
434
+ let t7;
435
+ if ($[16] !== directory || $[17] !== order || $[18] !== preview) {
436
+ t7 = preview && preview.directory === directory && order.includes(preview.path) ? preview : null;
437
+ $[16] = directory;
438
+ $[17] = order;
439
+ $[18] = preview;
440
+ $[19] = t7;
441
+ } else t7 = $[19];
442
+ const shown = t7;
443
+ if (preview && !shown) setPreview(null);
444
+ let t8;
445
+ let t9;
446
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
447
+ t8 = () => () => {
448
+ clearTimeout(renameTimer.current);
449
+ clearTimeout(pasteFallback.current);
450
+ };
451
+ t9 = [];
452
+ $[20] = t8;
453
+ $[21] = t9;
454
+ } else {
455
+ t8 = $[20];
456
+ t9 = $[21];
457
+ }
458
+ React.useEffect(t8, t9);
459
+ let t10;
460
+ let t11;
461
+ if ($[22] !== directory || $[23] !== order || $[24] !== surface) {
462
+ t10 = () => {
463
+ const pending = departure.current;
464
+ if (!pending) return;
465
+ if (pending.directory !== directory) {
466
+ departure.current = null;
467
+ return;
468
+ }
469
+ if (pending.removed.some((path_1) => order.includes(path_1))) return;
470
+ departure.current = null;
471
+ setAnnouncement(pending.message);
472
+ const next = pending.candidates.find((path_2) => order.includes(path_2));
473
+ if (next) {
474
+ setStored({
475
+ directory,
476
+ paths: [next]
477
+ });
478
+ anchor.current = next;
479
+ if (pending.focus) pendingFocus.current = next;
480
+ } else if (pending.focus) keepFocusInView(surface.current);
481
+ };
482
+ t11 = [
483
+ directory,
484
+ order,
485
+ surface
486
+ ];
487
+ $[22] = directory;
488
+ $[23] = order;
489
+ $[24] = surface;
490
+ $[25] = t10;
491
+ $[26] = t11;
492
+ } else {
493
+ t10 = $[25];
494
+ t11 = $[26];
495
+ }
496
+ React.useLayoutEffect(t10, t11);
497
+ let t12;
498
+ if ($[27] !== surface) {
499
+ t12 = () => {
500
+ const path_3 = pendingFocus.current;
501
+ if (path_3 === null) return;
502
+ const option = [...surface.current?.querySelectorAll(OPTION) ?? []].find((element) => element.dataset.workspacePath === path_3);
503
+ if (!option) return;
504
+ pendingFocus.current = null;
505
+ option.focus({ preventScroll: true });
506
+ };
507
+ $[27] = surface;
508
+ $[28] = t12;
509
+ } else t12 = $[28];
510
+ React.useLayoutEffect(t12);
511
+ let t13;
512
+ if ($[29] !== select) {
513
+ t13 = function startRename(path_4) {
514
+ clearTimeout(renameTimer.current);
515
+ select([path_4]);
516
+ setRenaming(path_4);
517
+ };
518
+ $[29] = select;
519
+ $[30] = t13;
520
+ } else t13 = $[30];
521
+ const startRename = t13;
522
+ let t14;
523
+ if ($[31] !== select) {
524
+ t14 = function endRename(path_5) {
525
+ setRenaming(null);
526
+ if (path_5) {
527
+ select([path_5]);
528
+ pendingFocus.current = path_5;
529
+ }
530
+ };
531
+ $[31] = select;
532
+ $[32] = t14;
533
+ } else t14 = $[32];
534
+ const endRename = t14;
535
+ let t15;
536
+ if ($[33] !== commands || $[34] !== directory || $[35] !== order || $[36] !== select || $[37] !== surface) {
537
+ t15 = async function run(command, target) {
538
+ if (!commands) return;
539
+ const focused = surface.current?.contains(document.activeElement) ?? false;
540
+ const leaving = (command === "trash" || command === "put-back") && target.paths.length ? {
541
+ directory,
542
+ removed: target.paths,
543
+ candidates: departureCandidates(order, target.paths),
544
+ message: departureMessage(command, target.paths),
545
+ focus: focused
546
+ } : null;
547
+ departure.current = leaving;
548
+ const result = await commands.run(command, target);
549
+ if (leaving) return;
550
+ if (focused) requestAnimationFrame(() => keepFocusInView(surface.current));
551
+ if (!result?.length) return;
552
+ select(result);
553
+ if (command === "new-folder") setRenaming(result[0]);
554
+ else pendingFocus.current = result.at(-1);
555
+ };
556
+ $[33] = commands;
557
+ $[34] = directory;
558
+ $[35] = order;
559
+ $[36] = select;
560
+ $[37] = surface;
561
+ $[38] = t15;
562
+ } else t15 = $[38];
563
+ const run = t15;
564
+ let t16;
565
+ if ($[39] !== order) {
566
+ t16 = function extendFromAnchor(path_6) {
567
+ const from = anchor.current !== null ? order.indexOf(anchor.current) : -1;
568
+ if (from < 0) {
569
+ anchor.current = path_6;
570
+ return [path_6];
571
+ }
572
+ const to = order.indexOf(path_6);
573
+ return [...order.slice(Math.min(from, to), Math.max(from, to) + 1).filter((candidate) => candidate !== path_6), path_6];
574
+ };
575
+ $[39] = order;
576
+ $[40] = t16;
577
+ } else t16 = $[40];
578
+ const extendFromAnchor = t16;
579
+ let t17;
580
+ if ($[41] !== directory || $[42] !== quickLook || $[43] !== select || $[44] !== selected) {
581
+ t17 = function showQuickLook(paths_0) {
582
+ const path_7 = paths_0.at(-1);
583
+ if (!quickLook || path_7 === void 0) return;
584
+ if (paths_0.join("\n") !== selected.join("\n")) select(paths_0);
585
+ setPreview({
586
+ directory,
587
+ path: path_7,
588
+ paths: paths_0.length > 1 ? paths_0 : null
589
+ });
590
+ };
591
+ $[41] = directory;
592
+ $[42] = quickLook;
593
+ $[43] = select;
594
+ $[44] = selected;
595
+ $[45] = t17;
596
+ } else t17 = $[45];
597
+ const showQuickLook = t17;
598
+ let t18;
599
+ if ($[46] !== selected || $[47] !== showQuickLook || $[48] !== shown) {
600
+ t18 = function toggleQuickLook(focused_0) {
601
+ if (shown) setPreview(null);
602
+ else showQuickLook(focused_0 && !selected.includes(focused_0) ? [focused_0] : selected);
603
+ };
604
+ $[46] = selected;
605
+ $[47] = showQuickLook;
606
+ $[48] = shown;
607
+ $[49] = t18;
608
+ } else t18 = $[49];
609
+ const toggleQuickLook = t18;
610
+ let t19;
611
+ if ($[50] !== order || $[51] !== selected) {
612
+ t19 = function extend(path_8) {
613
+ const from_0 = order.indexOf(selected.at(-1) ?? path_8);
614
+ const to_0 = order.indexOf(path_8);
615
+ const range_0 = order.slice(Math.min(from_0, to_0), Math.max(from_0, to_0) + 1);
616
+ return [...new Set([...selected, ...range_0].filter((candidate_0) => candidate_0 !== path_8)), path_8];
617
+ };
618
+ $[50] = order;
619
+ $[51] = selected;
620
+ $[52] = t19;
621
+ } else t19 = $[52];
622
+ const extend = t19;
623
+ let t20;
624
+ if ($[53] !== commands || $[54] !== directory || $[55] !== extend || $[56] !== extendFromAnchor || $[57] !== finder || $[58] !== isSelected || $[59] !== open || $[60] !== renaming || $[61] !== select || $[62] !== selected || $[63] !== startRename) {
625
+ t20 = function optionProps(path_9, onPress) {
626
+ return {
627
+ onPointerDown: (event) => {
628
+ pointerType.current = event.pointerType;
629
+ extending.current = false;
630
+ clearTimeout(renameTimer.current);
631
+ if (!finder) {
632
+ onPress?.(event, [path_9]);
633
+ return;
634
+ }
635
+ const wasSelected = isSelected(path_9);
636
+ deselectOnClick.current = event.metaKey && wasSelected;
637
+ renameOnClick.current = event.button === 0 && wasSelected && selected.length === 1 && !event.metaKey && !event.shiftKey && !event.altKey && !event.ctrlKey;
638
+ let next_0 = selected;
639
+ if (event.button === 0 && event.shiftKey) next_0 = extend(path_9);
640
+ else if (event.button === 0 && event.metaKey) {
641
+ anchor.current = path_9;
642
+ if (!wasSelected) next_0 = [...selected, path_9];
643
+ } else {
644
+ anchor.current = path_9;
645
+ if (!wasSelected) next_0 = [path_9];
646
+ }
647
+ if (next_0 !== selected) select(next_0);
648
+ onPress?.(event, next_0.includes(path_9) ? next_0 : [path_9]);
649
+ },
650
+ onFocus: finder ? () => {
651
+ if (renaming !== null) return;
652
+ if (extending.current) {
653
+ extending.current = false;
654
+ select(extendFromAnchor(path_9));
655
+ return;
656
+ }
657
+ if (!isSelected(path_9)) select([path_9]);
658
+ anchor.current = path_9;
659
+ } : void 0,
660
+ onClickCapture: finder ? (event_0) => {
661
+ if (event_0.detail === 0 || pointerType.current !== "mouse") return;
662
+ event_0.preventDefault();
663
+ event_0.stopPropagation();
664
+ if (event_0.metaKey || event_0.shiftKey) {
665
+ if (deselectOnClick.current) select(selected.filter((p) => p !== path_9));
666
+ return;
667
+ }
668
+ const onName = event_0.target instanceof Element && event_0.target.closest("[data-file-name]");
669
+ if (event_0.detail === 1 && renameOnClick.current && onName && commands?.canRun("rename", {
670
+ paths: [path_9],
671
+ directory
672
+ })) renameTimer.current = window.setTimeout(() => startRename(path_9), RENAME_DELAY_MS);
673
+ } : void 0,
674
+ onDoubleClick: finder ? () => {
675
+ clearTimeout(renameTimer.current);
676
+ open(path_9);
677
+ } : void 0
678
+ };
679
+ };
680
+ $[53] = commands;
681
+ $[54] = directory;
682
+ $[55] = extend;
683
+ $[56] = extendFromAnchor;
684
+ $[57] = finder;
685
+ $[58] = isSelected;
686
+ $[59] = open;
687
+ $[60] = renaming;
688
+ $[61] = select;
689
+ $[62] = selected;
690
+ $[63] = startRename;
691
+ $[64] = t20;
692
+ } else t20 = $[64];
693
+ const optionProps = t20;
694
+ let t21;
695
+ if ($[65] !== select || $[66] !== selected) {
696
+ t21 = function drawMarquee(event_1, state) {
697
+ const element_0 = event_1.currentTarget;
698
+ const box = element_0.getBoundingClientRect();
699
+ const left = Math.min(state.x, event_1.clientX);
700
+ const top = Math.min(state.y, event_1.clientY);
701
+ const right = Math.max(state.x, event_1.clientX);
702
+ const bottom = Math.max(state.y, event_1.clientY);
703
+ const rectangle = overlay.current;
704
+ if (rectangle) {
705
+ rectangle.hidden = false;
706
+ rectangle.style.insetInlineStart = `${left - box.left - element_0.clientLeft + element_0.scrollLeft}px`;
707
+ rectangle.style.insetBlockStart = `${top - box.top - element_0.clientTop + element_0.scrollTop}px`;
708
+ rectangle.style.inlineSize = `${right - left}px`;
709
+ rectangle.style.blockSize = `${bottom - top}px`;
710
+ }
711
+ const hits = [...element_0.querySelectorAll(OPTION)].filter((option_0) => {
712
+ const rect = option_0.getBoundingClientRect();
713
+ return rect.right > left && rect.left < right && rect.bottom > top && rect.top < bottom;
714
+ }).map(_temp);
715
+ const next_1 = state.toggle ? [...state.base.filter((path_10) => !hits.includes(path_10)), ...hits.filter((path_11) => !state.base.includes(path_11))] : [.../* @__PURE__ */ new Set([...state.base, ...hits])];
716
+ if (next_1.join("\n") !== selected.join("\n")) select(next_1);
717
+ };
718
+ $[65] = select;
719
+ $[66] = selected;
720
+ $[67] = t21;
721
+ } else t21 = $[67];
722
+ const drawMarquee = t21;
723
+ let t22;
724
+ if ($[68] === Symbol.for("react.memo_cache_sentinel")) {
725
+ t22 = function endMarquee(event_2) {
726
+ if (marquee.current?.pointerId !== event_2.pointerId) return;
727
+ marquee.current = null;
728
+ if (overlay.current) overlay.current.hidden = true;
729
+ };
730
+ $[68] = t22;
731
+ } else t22 = $[68];
732
+ const endMarquee = t22;
733
+ let t23;
734
+ if ($[69] !== commands || $[70] !== directory || $[71] !== finder || $[72] !== open || $[73] !== order || $[74] !== quickLook || $[75] !== run || $[76] !== select || $[77] !== selected || $[78] !== startRename || $[79] !== toggleQuickLook) {
735
+ t23 = function perform(asked) {
736
+ const target_0 = {
737
+ paths: selected,
738
+ directory
739
+ };
740
+ const command_0 = asked === "trash" && !commands?.canRun("trash", target_0) ? "put-back" : asked;
741
+ const last = selected.at(-1);
742
+ switch (command_0) {
743
+ case "select-all":
744
+ if (!finder) return false;
745
+ select(order);
746
+ return true;
747
+ case "open":
748
+ if (!last) return false;
749
+ open(last);
750
+ return true;
751
+ case "quick-look":
752
+ if (!last || !quickLook) return false;
753
+ toggleQuickLook();
754
+ return true;
755
+ case "rename":
756
+ if (selected.length !== 1 || !commands?.canRun("rename", target_0)) return false;
757
+ startRename(selected[0]);
758
+ return true;
759
+ case "paste":
760
+ if (!commands?.canRun("paste", target_0)) return false;
761
+ clearTimeout(pasteFallback.current);
762
+ pasteFallback.current = window.setTimeout(() => void run("paste", target_0));
763
+ return true;
764
+ default:
765
+ if (!commands?.canRun(command_0, target_0)) return false;
766
+ run(command_0, target_0);
767
+ return true;
768
+ }
769
+ };
770
+ $[69] = commands;
771
+ $[70] = directory;
772
+ $[71] = finder;
773
+ $[72] = open;
774
+ $[73] = order;
775
+ $[74] = quickLook;
776
+ $[75] = run;
777
+ $[76] = select;
778
+ $[77] = selected;
779
+ $[78] = startRename;
780
+ $[79] = toggleQuickLook;
781
+ $[80] = t23;
782
+ } else t23 = $[80];
783
+ const perform = t23;
784
+ let t24;
785
+ if ($[81] !== finder) {
786
+ t24 = (event_3) => {
787
+ extending.current = finder && event_3.shiftKey && !event_3.altKey && !event_3.ctrlKey && !event_3.metaKey && NAVIGATION_KEYS.has(event_3.key) && event_3.target instanceof Element && event_3.target.matches(`${OPTION}, [aria-multiselectable]`);
788
+ };
789
+ $[81] = finder;
790
+ $[82] = t24;
791
+ } else t24 = $[82];
792
+ let t25;
793
+ if ($[83] !== finder || $[84] !== select || $[85] !== selected) {
794
+ t25 = (event_4) => {
795
+ extending.current = false;
796
+ const target_1 = event_4.target;
797
+ if (!finder || event_4.button !== 0 && event_4.button !== 2 || !(target_1 instanceof Element) || !event_4.currentTarget.contains(target_1) || target_1.closest(`${OPTION}, input, a, button, [role="menu"]`)) return;
798
+ const adding = event_4.shiftKey || event_4.metaKey;
799
+ if (!adding) select([]);
800
+ if (event_4.button !== 0 || event_4.pointerType !== "mouse") return;
801
+ marquee.current = {
802
+ pointerId: event_4.pointerId,
803
+ x: event_4.clientX,
804
+ y: event_4.clientY,
805
+ base: adding ? selected : [],
806
+ toggle: event_4.metaKey,
807
+ drawn: false
808
+ };
809
+ event_4.currentTarget.setPointerCapture(event_4.pointerId);
810
+ };
811
+ $[83] = finder;
812
+ $[84] = select;
813
+ $[85] = selected;
814
+ $[86] = t25;
815
+ } else t25 = $[86];
816
+ let t26;
817
+ if ($[87] !== drawMarquee) {
818
+ t26 = (event_5) => {
819
+ const state_0 = marquee.current;
820
+ if (!state_0 || state_0.pointerId !== event_5.pointerId) return;
821
+ if (!state_0.drawn && Math.hypot(event_5.clientX - state_0.x, event_5.clientY - state_0.y) < MARQUEE_SLOP_PX) return;
822
+ state_0.drawn = true;
823
+ drawMarquee(event_5, state_0);
824
+ };
825
+ $[87] = drawMarquee;
826
+ $[88] = t26;
827
+ } else t26 = $[88];
828
+ let t27;
829
+ if ($[89] !== finder || $[90] !== isSelected || $[91] !== perform || $[92] !== quickLook || $[93] !== select || $[94] !== selected || $[95] !== toggleQuickLook) {
830
+ t27 = (event_6) => {
831
+ extending.current = false;
832
+ if (event_6.defaultPrevented) return;
833
+ if (event_6.key === " " && !event_6.altKey && !event_6.nativeEvent.isComposing) {
834
+ const element_1 = event_6.target instanceof Element ? event_6.target : null;
835
+ const option_2 = element_1?.closest(OPTION);
836
+ if (!finder || !element_1?.matches(`${OPTION}, [aria-multiselectable]`)) return;
837
+ if (event_6.ctrlKey || event_6.metaKey) {
838
+ if (event_6.shiftKey || !option_2) return;
839
+ event_6.preventDefault();
840
+ const path_12 = option_2.dataset.workspacePath;
841
+ anchor.current = path_12;
842
+ select(isSelected(path_12) ? selected.filter((p_0) => p_0 !== path_12) : [...selected, path_12]);
843
+ } else if (!event_6.shiftKey && quickLook) {
844
+ event_6.preventDefault();
845
+ if (!event_6.repeat) toggleQuickLook(option_2?.dataset.workspacePath);
846
+ }
847
+ return;
848
+ }
849
+ const command_1 = workspaceFileCommandForKey(event_6.nativeEvent);
850
+ if (command_1 && perform(command_1) && command_1 !== "paste") event_6.preventDefault();
851
+ };
852
+ $[89] = finder;
853
+ $[90] = isSelected;
854
+ $[91] = perform;
855
+ $[92] = quickLook;
856
+ $[93] = select;
857
+ $[94] = selected;
858
+ $[95] = toggleQuickLook;
859
+ $[96] = t27;
860
+ } else t27 = $[96];
861
+ let t28;
862
+ if ($[97] !== commands || $[98] !== directory || $[99] !== run || $[100] !== selected) {
863
+ t28 = (event_7) => {
864
+ if (event_7.target instanceof Element && event_7.target.closest("input, textarea")) return;
865
+ clearTimeout(pasteFallback.current);
866
+ const target_2 = {
867
+ paths: selected,
868
+ directory,
869
+ files: [...event_7.clipboardData.files]
870
+ };
871
+ if (!commands?.canRun("paste", target_2)) return;
872
+ event_7.preventDefault();
873
+ run("paste", target_2);
874
+ };
875
+ $[97] = commands;
876
+ $[98] = directory;
877
+ $[99] = run;
878
+ $[100] = selected;
879
+ $[101] = t28;
880
+ } else t28 = $[101];
881
+ let t29;
882
+ if ($[102] !== t24 || $[103] !== t25 || $[104] !== t26 || $[105] !== t27 || $[106] !== t28) {
883
+ t29 = {
884
+ onKeyDownCapture: t24,
885
+ onPointerDown: t25,
886
+ onPointerMove: t26,
887
+ onPointerUp: endMarquee,
888
+ onPointerCancel: endMarquee,
889
+ onKeyDown: t27,
890
+ onPaste: t28
891
+ };
892
+ $[102] = t24;
893
+ $[103] = t25;
894
+ $[104] = t26;
895
+ $[105] = t27;
896
+ $[106] = t28;
897
+ $[107] = t29;
898
+ } else t29 = $[107];
899
+ const surfaceProps = t29;
900
+ let t30;
901
+ if ($[108] !== finder) {
902
+ t30 = finder ? /* @__PURE__ */ jsx("div", {
903
+ ref: overlay,
904
+ className: "workspace-file-marquee",
905
+ "aria-hidden": "true",
906
+ hidden: true
907
+ }) : null;
908
+ $[108] = finder;
909
+ $[109] = t30;
910
+ } else t30 = $[109];
911
+ const marqueeElement = t30;
912
+ let t31;
913
+ if ($[110] !== announcement) {
914
+ t31 = /* @__PURE__ */ jsx("span", {
915
+ className: "sigvelo-visually-hidden",
916
+ role: "status",
917
+ "aria-atomic": "true",
918
+ children: announcement
919
+ });
920
+ $[110] = announcement;
921
+ $[111] = t31;
922
+ } else t31 = $[111];
923
+ const statusElement = t31;
924
+ const walked = shown?.paths ?? order;
925
+ const t32 = shown?.path ?? null;
926
+ const t33 = Boolean(shown?.paths);
927
+ let t34;
928
+ if ($[112] !== select || $[113] !== shown || $[114] !== walked) {
929
+ t34 = (offset) => {
930
+ if (!shown) return;
931
+ const next_2 = walked[walked.indexOf(shown.path) + offset];
932
+ if (next_2 === void 0) return;
933
+ if (shown.paths === null) {
934
+ select([next_2]);
935
+ anchor.current = next_2;
936
+ }
937
+ setPreview({
938
+ ...shown,
939
+ path: next_2
940
+ });
941
+ };
942
+ $[112] = select;
943
+ $[113] = shown;
944
+ $[114] = walked;
945
+ $[115] = t34;
946
+ } else t34 = $[115];
947
+ let t35;
948
+ if ($[116] === Symbol.for("react.memo_cache_sentinel")) {
949
+ t35 = () => setPreview(null);
950
+ $[116] = t35;
951
+ } else t35 = $[116];
952
+ let t36;
953
+ if ($[117] !== t32 || $[118] !== t33 || $[119] !== t34 || $[120] !== walked) {
954
+ t36 = {
955
+ path: t32,
956
+ paths: walked,
957
+ navigable: t33,
958
+ move: t34,
959
+ close: t35
960
+ };
961
+ $[117] = t32;
962
+ $[118] = t33;
963
+ $[119] = t34;
964
+ $[120] = walked;
965
+ $[121] = t36;
966
+ } else t36 = $[121];
967
+ const quickLookState = t36;
968
+ let t37;
969
+ if ($[122] !== commands || $[123] !== endRename || $[124] !== renaming) {
970
+ t37 = function renameField(path_13, name, folder) {
971
+ if (renaming !== path_13 || !commands) return null;
972
+ const service = commands;
973
+ return /* @__PURE__ */ jsx(WorkspaceRenameField, {
974
+ name,
975
+ folder,
976
+ onCommit: async (value) => endRename(await service.rename(path_13, value)),
977
+ onCancel: () => endRename(path_13)
978
+ }, path_13);
979
+ };
980
+ $[122] = commands;
981
+ $[123] = endRename;
982
+ $[124] = renaming;
983
+ $[125] = t37;
984
+ } else t37 = $[125];
985
+ const renameField = t37;
986
+ let t38;
987
+ if ($[126] !== directory || $[127] !== isSelected || $[128] !== selected) {
988
+ t38 = function menuTarget(path_14) {
989
+ return {
990
+ paths: path_14 === null ? [] : isSelected(path_14) ? selected : [path_14],
991
+ directory
992
+ };
993
+ };
994
+ $[126] = directory;
995
+ $[127] = isSelected;
996
+ $[128] = selected;
997
+ $[129] = t38;
998
+ } else t38 = $[129];
999
+ const menuTarget = t38;
1000
+ let t39;
1001
+ if ($[130] !== commands || $[131] !== menuTarget || $[132] !== open || $[133] !== quickLook || $[134] !== run || $[135] !== showQuickLook || $[136] !== startRename) {
1002
+ t39 = function menuItems(path_15, extra) {
1003
+ return /* @__PURE__ */ jsx(WorkspaceFileMenuItems, {
1004
+ target: menuTarget(path_15),
1005
+ commands,
1006
+ open,
1007
+ quickLook: quickLook ? showQuickLook : void 0,
1008
+ onRename: (target_3) => {
1009
+ keepFocus.current = true;
1010
+ startRename(target_3);
1011
+ },
1012
+ onRun: (command_2, target_4) => {
1013
+ if (command_2 === "new-folder") keepFocus.current = true;
1014
+ run(command_2, target_4);
1015
+ },
1016
+ extra
1017
+ });
1018
+ };
1019
+ $[130] = commands;
1020
+ $[131] = menuTarget;
1021
+ $[132] = open;
1022
+ $[133] = quickLook;
1023
+ $[134] = run;
1024
+ $[135] = showQuickLook;
1025
+ $[136] = startRename;
1026
+ $[137] = t39;
1027
+ } else t39 = $[137];
1028
+ const menuItems = t39;
1029
+ let t40;
1030
+ if ($[138] === Symbol.for("react.memo_cache_sentinel")) {
1031
+ t40 = function menuFinalFocus() {
1032
+ const keep = keepFocus.current;
1033
+ keepFocus.current = false;
1034
+ const active = document.activeElement;
1035
+ const moved = active instanceof HTMLElement && active !== document.body && !active.closest("[role=\"menu\"]");
1036
+ return !(keep || moved);
1037
+ };
1038
+ $[138] = t40;
1039
+ } else t40 = $[138];
1040
+ const menuFinalFocus = t40;
1041
+ let t41;
1042
+ if ($[139] !== isSelected || $[140] !== marqueeElement || $[141] !== menuItems || $[142] !== optionProps || $[143] !== perform || $[144] !== quickLookState || $[145] !== renameField || $[146] !== renaming || $[147] !== select || $[148] !== selected || $[149] !== statusElement || $[150] !== surfaceProps) {
1043
+ t41 = {
1044
+ selected,
1045
+ select,
1046
+ isSelected,
1047
+ renaming,
1048
+ perform,
1049
+ optionProps,
1050
+ surfaceProps,
1051
+ marqueeElement,
1052
+ statusElement,
1053
+ quickLook: quickLookState,
1054
+ renameField,
1055
+ menuItems,
1056
+ menuFinalFocus
1057
+ };
1058
+ $[139] = isSelected;
1059
+ $[140] = marqueeElement;
1060
+ $[141] = menuItems;
1061
+ $[142] = optionProps;
1062
+ $[143] = perform;
1063
+ $[144] = quickLookState;
1064
+ $[145] = renameField;
1065
+ $[146] = renaming;
1066
+ $[147] = select;
1067
+ $[148] = selected;
1068
+ $[149] = statusElement;
1069
+ $[150] = surfaceProps;
1070
+ $[151] = t41;
1071
+ } else t41 = $[151];
1072
+ return t41;
1073
+ }
1074
+ function _temp(option_1) {
1075
+ return option_1.dataset.workspacePath;
1076
+ }
1077
+ function keepFocusInView(view) {
1078
+ if (!view || document.activeElement && document.activeElement !== document.body) return;
1079
+ (view.querySelector("[aria-multiselectable][tabindex]") ?? view).focus({ preventScroll: true });
1080
+ }
1081
+ /** After objects leave: the next one in the view, then the ones before them, nearest first. */
1082
+ function departureCandidates(order, removed) {
1083
+ const indexes = removed.map((path) => order.indexOf(path)).filter((index) => index >= 0);
1084
+ if (!indexes.length) return [];
1085
+ const remaining = (paths) => paths.filter((path) => !removed.includes(path));
1086
+ return [...remaining(order.slice(Math.max(...indexes) + 1)), ...remaining(order.slice(0, Math.min(...indexes))).reverse()];
1087
+ }
1088
+ function departureMessage(command, paths) {
1089
+ const subject = paths.length === 1 ? `“${workspaceBasename(paths[0])}”` : `${paths.length} items`;
1090
+ return command === "trash" ? `Moved ${subject} to the Trash` : `Put back ${subject}`;
1091
+ }
1092
+ function plural(count) {
1093
+ return `${count} ${count === 1 ? "Item" : "Items"}`;
1094
+ }
1095
+ /**
1096
+ * The Finder's context menu for objects or for empty space, in its order and
1097
+ * words. Items that do not apply are left out, as the Finder leaves them.
1098
+ */
1099
+ function WorkspaceFileMenuItems(t0) {
1100
+ const $ = c(22);
1101
+ const { target, commands, open, quickLook, onRename, onRun, extra } = t0;
1102
+ const { paths } = target;
1103
+ let t1;
1104
+ if ($[0] !== commands || $[1] !== target) {
1105
+ t1 = (command) => commands?.canRun(command, target) ?? false;
1106
+ $[0] = commands;
1107
+ $[1] = target;
1108
+ $[2] = t1;
1109
+ } else t1 = $[2];
1110
+ const can = t1;
1111
+ let t2;
1112
+ if ($[3] !== can || $[4] !== onRun || $[5] !== target) {
1113
+ t2 = (command_0, label, onClick) => can(command_0) ? /* @__PURE__ */ jsx(ContextMenu.Item, {
1114
+ onClick: onClick ?? (() => onRun(command_0, target)),
1115
+ children: label
1116
+ }, command_0) : null;
1117
+ $[3] = can;
1118
+ $[4] = onRun;
1119
+ $[5] = target;
1120
+ $[6] = t2;
1121
+ } else t2 = $[6];
1122
+ const item = t2;
1123
+ let t3;
1124
+ if ($[7] !== paths) {
1125
+ t3 = paths.at(-1);
1126
+ $[7] = paths;
1127
+ $[8] = t3;
1128
+ } else t3 = $[8];
1129
+ const last = t3;
1130
+ let t4;
1131
+ if ($[9] !== paths[0] || $[10] !== paths.length) {
1132
+ t4 = paths.length === 1 ? `“${workspaceBasename(paths[0])}”` : plural(paths.length);
1133
+ $[9] = paths[0];
1134
+ $[10] = paths.length;
1135
+ $[11] = t4;
1136
+ } else t4 = $[11];
1137
+ const subject = t4;
1138
+ let t5;
1139
+ if ($[12] !== commands || $[13] !== extra || $[14] !== item || $[15] !== last || $[16] !== onRename || $[17] !== open || $[18] !== paths || $[19] !== quickLook || $[20] !== subject) {
1140
+ t5 = (last ? [
1141
+ [/* @__PURE__ */ jsx(ContextMenu.Item, {
1142
+ onClick: () => open(last),
1143
+ children: "Open"
1144
+ }, "open"), quickLook ? /* @__PURE__ */ jsx(ContextMenu.Item, {
1145
+ onClick: () => quickLook(paths),
1146
+ children: "Quick Look"
1147
+ }, "quick-look") : null],
1148
+ [item("put-back", "Put Back"), item("trash", "Move to Trash")],
1149
+ [
1150
+ item("get-info", "Get Info"),
1151
+ paths.length === 1 ? item("rename", "Rename", () => onRename(last)) : null,
1152
+ item("duplicate", "Duplicate")
1153
+ ],
1154
+ [item("copy", `Copy ${subject}`)],
1155
+ [item("show-in-finder", "Show in Finder")]
1156
+ ] : [
1157
+ [item("new-folder", "New Folder")],
1158
+ [item("get-info", "Get Info")],
1159
+ [commands?.pasteLabel ? item("paste", commands.pasteLabel) : null],
1160
+ [item("empty-trash", "Empty Trash…")],
1161
+ [extra ? /* @__PURE__ */ jsx(React.Fragment, { children: extra }, "extra") : null]
1162
+ ]).map(_temp2).filter(_temp3).flatMap(_temp4);
1163
+ $[12] = commands;
1164
+ $[13] = extra;
1165
+ $[14] = item;
1166
+ $[15] = last;
1167
+ $[16] = onRename;
1168
+ $[17] = open;
1169
+ $[18] = paths;
1170
+ $[19] = quickLook;
1171
+ $[20] = subject;
1172
+ $[21] = t5;
1173
+ } else t5 = $[21];
1174
+ return t5;
1175
+ }
1176
+ function _temp4(group_1, index) {
1177
+ return index ? [/* @__PURE__ */ jsx(ContextMenu.Separator, {}, `separator-${index}`), ...group_1] : group_1;
1178
+ }
1179
+ function _temp3(group_0) {
1180
+ return group_0.length;
1181
+ }
1182
+ function _temp2(group) {
1183
+ return group.filter(Boolean);
1184
+ }
1185
+ /**
1186
+ * The Finder's rename field, over the object's name: the name without its
1187
+ * extension is selected, Return keeps it, Escape or an unchanged name leaves
1188
+ * it, and clicking away keeps it. A refused name keeps the field open; the
1189
+ * host says why.
1190
+ */
1191
+ function WorkspaceRenameField(t0) {
1192
+ const $ = c(18);
1193
+ const { name, folder, onCommit, onCancel } = t0;
1194
+ const input = React.useRef(null);
1195
+ const busy = React.useRef(false);
1196
+ const refused = React.useRef(null);
1197
+ let t1;
1198
+ let t2;
1199
+ if ($[0] !== folder || $[1] !== name) {
1200
+ t1 = () => {
1201
+ const field = input.current;
1202
+ const item = field?.parentElement;
1203
+ const label = item?.querySelector("[data-file-name]");
1204
+ if (!field || !item || !label) return;
1205
+ const itemBox = item.getBoundingClientRect();
1206
+ const labelBox = label.getBoundingClientRect();
1207
+ const stacked = getComputedStyle(label.parentElement).flexDirection === "column";
1208
+ field.style.insetBlockStart = `${labelBox.top - itemBox.top}px`;
1209
+ field.style.insetInlineStart = stacked ? "0px" : `${labelBox.left - itemBox.left}px`;
1210
+ field.style.inlineSize = stacked ? `${itemBox.width}px` : `${Math.max(labelBox.width, 96)}px`;
1211
+ field.focus({ preventScroll: true });
1212
+ const dot = folder ? -1 : name.lastIndexOf(".");
1213
+ field.setSelectionRange(0, dot > 0 ? dot : name.length);
1214
+ };
1215
+ t2 = [folder, name];
1216
+ $[0] = folder;
1217
+ $[1] = name;
1218
+ $[2] = t1;
1219
+ $[3] = t2;
1220
+ } else {
1221
+ t1 = $[2];
1222
+ t2 = $[3];
1223
+ }
1224
+ React.useLayoutEffect(t1, t2);
1225
+ let t3;
1226
+ if ($[4] !== name || $[5] !== onCancel || $[6] !== onCommit) {
1227
+ t3 = async function commit(value) {
1228
+ if (busy.current) return;
1229
+ if (!value.trim() || value === name || value === refused.current) {
1230
+ onCancel();
1231
+ return;
1232
+ }
1233
+ busy.current = true;
1234
+ await onCommit(value).then(_temp5, () => {
1235
+ refused.current = value;
1236
+ });
1237
+ busy.current = false;
1238
+ };
1239
+ $[4] = name;
1240
+ $[5] = onCancel;
1241
+ $[6] = onCommit;
1242
+ $[7] = t3;
1243
+ } else t3 = $[7];
1244
+ const commit = t3;
1245
+ const t4 = `Rename ${name}`;
1246
+ let t5;
1247
+ if ($[8] !== commit || $[9] !== onCancel) {
1248
+ t5 = (event_0) => {
1249
+ event_0.stopPropagation();
1250
+ if (event_0.nativeEvent.isComposing) return;
1251
+ if (event_0.key === "Enter") {
1252
+ event_0.preventDefault();
1253
+ commit(event_0.currentTarget.value);
1254
+ } else if (event_0.key === "Escape") {
1255
+ event_0.preventDefault();
1256
+ onCancel();
1257
+ }
1258
+ };
1259
+ $[8] = commit;
1260
+ $[9] = onCancel;
1261
+ $[10] = t5;
1262
+ } else t5 = $[10];
1263
+ let t6;
1264
+ if ($[11] !== commit) {
1265
+ t6 = (event_1) => {
1266
+ const next = event_1.relatedTarget;
1267
+ if (next instanceof Element && next.closest("[role=\"alertdialog\"], [role=\"dialog\"]")) return;
1268
+ commit(event_1.currentTarget.value);
1269
+ };
1270
+ $[11] = commit;
1271
+ $[12] = t6;
1272
+ } else t6 = $[12];
1273
+ let t7;
1274
+ if ($[13] !== name || $[14] !== t4 || $[15] !== t5 || $[16] !== t6) {
1275
+ t7 = /* @__PURE__ */ jsx("input", {
1276
+ ref: input,
1277
+ className: "workspace-file-rename",
1278
+ "aria-label": t4,
1279
+ defaultValue: name,
1280
+ autoComplete: "off",
1281
+ spellCheck: false,
1282
+ onPointerDown: _temp6,
1283
+ onKeyDown: t5,
1284
+ onBlur: t6
1285
+ });
1286
+ $[13] = name;
1287
+ $[14] = t4;
1288
+ $[15] = t5;
1289
+ $[16] = t6;
1290
+ $[17] = t7;
1291
+ } else t7 = $[17];
1292
+ return t7;
1293
+ }
1294
+ function _temp6(event) {
1295
+ return event.stopPropagation();
1296
+ }
1297
+ function _temp5() {}
1298
+ //#endregion
1299
+ //#region src/components/_internal/workspace-quick-look.tsx
1300
+ /**
1301
+ * Quick Look over one view of workspace objects: a window sized by what it
1302
+ * previews, under one bar — the close, the file's name, and its app route as
1303
+ * a labelled push button. The arrow keys walk what the view hands it; arrows
1304
+ * of its own appear only for a multi-selection, as Apple draws them. Space or
1305
+ * Escape closes it, and focus goes back to the object shown.
1306
+ */
1307
+ function WorkspaceQuickLook(t0) {
1308
+ const $ = c(58);
1309
+ const { quickLook, entries, renderPreview, openLabel, onOpen, surface, fallbackFocus } = t0;
1310
+ const portalContainer = React.use(PortalContext);
1311
+ const popup = React.useRef(null);
1312
+ const openAfterClose = React.useRef(null);
1313
+ let t1;
1314
+ if ($[0] !== entries || $[1] !== quickLook.path) {
1315
+ t1 = entries.find((candidate) => candidate.path === quickLook.path) ?? null;
1316
+ $[0] = entries;
1317
+ $[1] = quickLook.path;
1318
+ $[2] = t1;
1319
+ } else t1 = $[2];
1320
+ const entry = t1;
1321
+ const [shown, setShown] = React.useState(entry);
1322
+ if (entry && entry !== shown) setShown(entry);
1323
+ let t2;
1324
+ if ($[3] !== quickLook.paths || $[4] !== shown) {
1325
+ t2 = shown ? quickLook.paths.indexOf(shown.path) : -1;
1326
+ $[3] = quickLook.paths;
1327
+ $[4] = shown;
1328
+ $[5] = t2;
1329
+ } else t2 = $[5];
1330
+ const index = t2;
1331
+ let t3;
1332
+ if ($[6] !== fallbackFocus || $[7] !== shown?.path || $[8] !== surface) {
1333
+ t3 = function returnFocus() {
1334
+ if (openAfterClose.current) return false;
1335
+ const view = surface.current;
1336
+ const target = [...view?.querySelectorAll("[data-workspace-path]") ?? []].find((option) => option.dataset.workspacePath === shown?.path) ?? view?.querySelector("[aria-multiselectable]");
1337
+ return target?.getClientRects().length && !target.closest("[inert]") && getComputedStyle(target).visibility === "visible" ? target : fallbackFocus?.() ?? false;
1338
+ };
1339
+ $[6] = fallbackFocus;
1340
+ $[7] = shown?.path;
1341
+ $[8] = surface;
1342
+ $[9] = t3;
1343
+ } else t3 = $[9];
1344
+ const returnFocus = t3;
1345
+ const t4 = entry !== null;
1346
+ let t5;
1347
+ if ($[10] !== quickLook) {
1348
+ t5 = (open) => {
1349
+ if (!open) quickLook.close();
1350
+ };
1351
+ $[10] = quickLook;
1352
+ $[11] = t5;
1353
+ } else t5 = $[11];
1354
+ let t6;
1355
+ if ($[12] !== onOpen) {
1356
+ t6 = (open_0) => {
1357
+ if (!open_0 && openAfterClose.current) {
1358
+ const opened = openAfterClose.current;
1359
+ openAfterClose.current = null;
1360
+ onOpen(opened);
1361
+ }
1362
+ };
1363
+ $[12] = onOpen;
1364
+ $[13] = t6;
1365
+ } else t6 = $[13];
1366
+ let t7;
1367
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
1368
+ t7 = /* @__PURE__ */ jsx(Dialog.Backdrop, { className: "workspace-quick-look__scrim" });
1369
+ $[14] = t7;
1370
+ } else t7 = $[14];
1371
+ let t8;
1372
+ if ($[15] !== quickLook) {
1373
+ t8 = (event) => {
1374
+ if (event.defaultPrevented || hasModifier(event) || event.target !== event.currentTarget) return;
1375
+ if (event.key === "ArrowLeft" || event.key === "ArrowRight") {
1376
+ event.preventDefault();
1377
+ quickLook.move(event.key === "ArrowLeft" ? -1 : 1);
1378
+ } else if (event.key === " ") {
1379
+ event.preventDefault();
1380
+ if (!event.repeat) quickLook.close();
1381
+ }
1382
+ };
1383
+ $[15] = quickLook;
1384
+ $[16] = t8;
1385
+ } else t8 = $[16];
1386
+ let t9;
1387
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1388
+ t9 = /* @__PURE__ */ jsx(Dialog.Close, { render: /* @__PURE__ */ jsx(AppTopBar.Button, {
1389
+ className: "workspace-quick-look__close",
1390
+ label: "Close Quick Look",
1391
+ children: /* @__PURE__ */ jsx(XIcon, { "aria-hidden": "true" })
1392
+ }) });
1393
+ $[17] = t9;
1394
+ } else t9 = $[17];
1395
+ let t10;
1396
+ if ($[18] !== index || $[19] !== quickLook) {
1397
+ t10 = quickLook.navigable ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AppTopBar.Button, {
1398
+ label: "Previous file",
1399
+ disabled: index <= 0,
1400
+ "aria-keyshortcuts": "ArrowLeft",
1401
+ onClick: () => quickLook.move(-1),
1402
+ children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
1403
+ }), /* @__PURE__ */ jsx(AppTopBar.Button, {
1404
+ label: "Next file",
1405
+ disabled: index >= quickLook.paths.length - 1,
1406
+ "aria-keyshortcuts": "ArrowRight",
1407
+ onClick: () => quickLook.move(1),
1408
+ children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
1409
+ })] }) : null;
1410
+ $[18] = index;
1411
+ $[19] = quickLook;
1412
+ $[20] = t10;
1413
+ } else t10 = $[20];
1414
+ let t11;
1415
+ if ($[21] !== t10) {
1416
+ t11 = /* @__PURE__ */ jsxs(AppTopBar.Leading, { children: [t9, t10] });
1417
+ $[21] = t10;
1418
+ $[22] = t11;
1419
+ } else t11 = $[22];
1420
+ let t12;
1421
+ if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
1422
+ t12 = /* @__PURE__ */ jsx(Dialog.Title, {});
1423
+ $[23] = t12;
1424
+ } else t12 = $[23];
1425
+ const t13 = shown?.name;
1426
+ let t14;
1427
+ if ($[24] !== t13) {
1428
+ t14 = /* @__PURE__ */ jsx(AppTopBar.Title, {
1429
+ render: t12,
1430
+ children: t13
1431
+ });
1432
+ $[24] = t13;
1433
+ $[25] = t14;
1434
+ } else t14 = $[25];
1435
+ let t15;
1436
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
1437
+ t15 = /* @__PURE__ */ jsx(Button, {
1438
+ variant: "surface",
1439
+ color: "neutral",
1440
+ size: "xs"
1441
+ });
1442
+ $[26] = t15;
1443
+ } else t15 = $[26];
1444
+ let t16;
1445
+ if ($[27] !== entry || $[28] !== quickLook) {
1446
+ t16 = () => {
1447
+ if (!entry) return;
1448
+ openAfterClose.current = entry;
1449
+ quickLook.close();
1450
+ };
1451
+ $[27] = entry;
1452
+ $[28] = quickLook;
1453
+ $[29] = t16;
1454
+ } else t16 = $[29];
1455
+ let t17;
1456
+ if ($[30] !== openLabel || $[31] !== t16) {
1457
+ t17 = /* @__PURE__ */ jsx(AppTopBar.Trailing, { children: /* @__PURE__ */ jsx(AppTopBar.Control, {
1458
+ render: t15,
1459
+ onClick: t16,
1460
+ children: openLabel
1461
+ }) });
1462
+ $[30] = openLabel;
1463
+ $[31] = t16;
1464
+ $[32] = t17;
1465
+ } else t17 = $[32];
1466
+ let t18;
1467
+ if ($[33] !== t11 || $[34] !== t14 || $[35] !== t17) {
1468
+ t18 = /* @__PURE__ */ jsxs(AppTopBar.Root, {
1469
+ className: "workspace-quick-look__bar",
1470
+ titleAlign: "start",
1471
+ "aria-label": "Quick Look controls",
1472
+ children: [
1473
+ t11,
1474
+ t14,
1475
+ t17
1476
+ ]
1477
+ });
1478
+ $[33] = t11;
1479
+ $[34] = t14;
1480
+ $[35] = t17;
1481
+ $[36] = t18;
1482
+ } else t18 = $[36];
1483
+ let t19;
1484
+ if ($[37] !== renderPreview || $[38] !== shown) {
1485
+ t19 = shown ? renderPreview(shown) : null;
1486
+ $[37] = renderPreview;
1487
+ $[38] = shown;
1488
+ $[39] = t19;
1489
+ } else t19 = $[39];
1490
+ let t20;
1491
+ if ($[40] !== t19) {
1492
+ t20 = /* @__PURE__ */ jsx("div", {
1493
+ className: "workspace-quick-look__content",
1494
+ children: /* @__PURE__ */ jsx(WorkspacePreviewFrame, {
1495
+ value: popup,
1496
+ children: t19
1497
+ })
1498
+ });
1499
+ $[40] = t19;
1500
+ $[41] = t20;
1501
+ } else t20 = $[41];
1502
+ const t21 = entry ? quickLook.navigable ? `${entry.name}, ${index + 1} of ${quickLook.paths.length}` : entry.name : null;
1503
+ let t22;
1504
+ if ($[42] !== t21) {
1505
+ t22 = /* @__PURE__ */ jsx("span", {
1506
+ className: "sigvelo-visually-hidden",
1507
+ role: "status",
1508
+ "aria-atomic": "true",
1509
+ children: t21
1510
+ });
1511
+ $[42] = t21;
1512
+ $[43] = t22;
1513
+ } else t22 = $[43];
1514
+ let t23;
1515
+ if ($[44] !== returnFocus || $[45] !== t18 || $[46] !== t20 || $[47] !== t22 || $[48] !== t8) {
1516
+ t23 = /* @__PURE__ */ jsxs(Dialog.Popup, {
1517
+ ref: popup,
1518
+ initialFocus: popup,
1519
+ finalFocus: returnFocus,
1520
+ className: "workspace-quick-look",
1521
+ onKeyDown: t8,
1522
+ children: [
1523
+ t18,
1524
+ t20,
1525
+ t22
1526
+ ]
1527
+ });
1528
+ $[44] = returnFocus;
1529
+ $[45] = t18;
1530
+ $[46] = t20;
1531
+ $[47] = t22;
1532
+ $[48] = t8;
1533
+ $[49] = t23;
1534
+ } else t23 = $[49];
1535
+ let t24;
1536
+ if ($[50] !== portalContainer || $[51] !== t23) {
1537
+ t24 = /* @__PURE__ */ jsxs(Dialog.Portal, {
1538
+ container: portalContainer,
1539
+ children: [t7, t23]
1540
+ });
1541
+ $[50] = portalContainer;
1542
+ $[51] = t23;
1543
+ $[52] = t24;
1544
+ } else t24 = $[52];
1545
+ let t25;
1546
+ if ($[53] !== t24 || $[54] !== t4 || $[55] !== t5 || $[56] !== t6) {
1547
+ t25 = /* @__PURE__ */ jsx(Dialog.Root, {
1548
+ open: t4,
1549
+ onOpenChange: t5,
1550
+ onOpenChangeComplete: t6,
1551
+ children: t24
1552
+ });
1553
+ $[53] = t24;
1554
+ $[54] = t4;
1555
+ $[55] = t5;
1556
+ $[56] = t6;
1557
+ $[57] = t25;
1558
+ } else t25 = $[57];
1559
+ return t25;
1560
+ }
1561
+ //#endregion
1562
+ export { fileGridOption as a, FileGrid as i, useWorkspaceSelection as n, hasModifier as o, WorkspaceFileTile as r, WorkspaceQuickLook as t };