@mcp-b/react-components 0.62.0 → 0.64.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.
- package/dist/{AgentActivity-DptCj8XQ.d.ts → AgentActivity-Cngwkalq.d.ts} +2 -9
- package/dist/{AgentChatQueue-DG2rGyCI.d.ts → AgentChatQueue-C1TDnVAn.d.ts} +1 -1
- package/dist/{AppTopBar-DwzydmXu.d.ts → AppTopBar-CM57rJID.d.ts} +7 -3
- package/dist/ChatGptSignInScreen-CmbBe09G.js +298 -0
- package/dist/{CodeBlock-BTkag9ms.d.ts → CodeBlock-BDupVceI.d.ts} +1 -1
- package/dist/CodeBlock-dt0L8md0.js +892 -0
- package/dist/{EmployeeChrome-D5x4EM9y.d.ts → EmployeeChrome-kegSASjC.d.ts} +15 -8
- package/dist/{ExecutionBoard-DvPGdn4F.d.ts → ExecutionBoard-DBj1Aiva.d.ts} +8 -1
- package/dist/ExecutionResult-CXnGcmM4.js +671 -0
- package/dist/FileTree-CjfzpN6X.js +968 -0
- package/dist/{IconButton-FWsa9562.d.ts → IconButton-DXtGMkMI.d.ts} +7 -5
- package/dist/ManagerOffice-T79utm-P.js +2469 -0
- package/dist/{Menu-FA4P6KrA.d.ts → Menu-DajfQr3T.d.ts} +4 -2
- package/dist/{Message-BUedRDN1.d.ts → Message-BLyl6kWe.d.ts} +2 -2
- package/dist/{PromptInput-Dbe6WgWA.d.ts → PromptInput-DEwFMj6f.d.ts} +5 -8
- package/dist/{ResponsiveSidebarShell-DSAMNDdg.d.ts → ResponsiveSidebarShell-RwvmlMHS.d.ts} +23 -13
- package/dist/SetupChecklist-DwscX3Bw.js +230 -0
- package/dist/{Tabs-BYs-RgJ7.d.ts → Tabs-tyvVX3nc.d.ts} +29 -10
- package/dist/{ThinkChatActivity-zZaSsbC-.d.ts → ThinkChatActivity-C7xnO0Fx.d.ts} +1 -1
- package/dist/{ThinkChatActivitySummary-8MO1VjAJ.d.ts → ThinkChatActivitySummary-Dh4Av7x_.d.ts} +1 -1
- package/dist/{ThinkExecutionRun-DJ2TFDmZ.d.ts → ThinkExecutionRun-QzZVWX75.d.ts} +11 -3
- package/dist/ThinkSchedule-D4Ulsa0-.d.ts +53 -0
- package/dist/{ThinkThreadPicker-BmIZmpae.d.ts → ThinkThreadPicker-O-i2KloZ.d.ts} +1 -1
- package/dist/{Workspace-42LA9Zrb.d.ts → Workspace-B9nuTfIi.d.ts} +1 -1
- package/dist/{WorkspaceAutomation-CMvICi-p.d.ts → WorkspaceAutomation-C0fghGLi.d.ts} +3 -3
- package/dist/WorkspaceBrowser-oBJv-Dac.js +985 -0
- package/dist/{WorkspaceConcept-BjrgGE1w.d.ts → WorkspaceConcept-D46cYerS.d.ts} +1 -1
- package/dist/{WorkspaceFile-nK2n0i4S.d.ts → WorkspaceFile-BJC6vlp_.d.ts} +15 -4
- package/dist/WorkspaceFileCommands-SNIjRgtU.d.ts +145 -0
- package/dist/WorkspaceFileTransfer-BRD22nW-.d.ts +159 -0
- package/dist/WorkspaceLink-DDkj-Tq5.js +407 -0
- package/dist/{WorkspaceMessageResponse-BZ-_I18b.js → WorkspaceMessageResponse-CXGOQgpo.js} +111 -24
- package/dist/{agent-tool-runs-DsOp_X2y.js → agent-tool-runs-BXKdcxl8.js} +55 -28
- package/dist/app-bar-outlet-BEIGl9iF.js +35 -0
- package/{LICENSE → dist/assets/desktop/LICENSE.fluent.txt} +1 -1
- package/dist/assets/desktop/LICENSE.mac-icons.txt +7 -0
- package/dist/assets/desktop/README.md +43 -0
- package/dist/assets/desktop/automations.svg +19 -0
- package/dist/assets/desktop/document.svg +24 -0
- package/dist/assets/desktop/folder.png +0 -0
- package/dist/assets/desktop/mail.svg +31 -0
- package/dist/assets/desktop/settings.svg +9 -0
- package/dist/assets/desktop/trash-full.svg +23 -0
- package/dist/assets/desktop/trash.svg +19 -0
- package/dist/attachment-preview-DeRqFjdz.js +68 -0
- package/dist/attempt-CySQHJsF.js +21 -0
- package/dist/{codex-model-catalog-18yO7dln.d.ts → codex-model-catalog-CFEGgUAj.d.ts} +8 -8
- package/dist/command-search-1fjmCBBo.js +34 -0
- package/dist/components/agents-sdk/AIProviderDialog.d.ts +53 -0
- package/dist/components/agents-sdk/AIProviderDialog.js +902 -0
- package/dist/components/agents-sdk/AgentActivity.d.ts +2 -2
- package/dist/components/agents-sdk/AgentActivity.js +78 -31
- package/dist/components/agents-sdk/AgentChat.d.ts +3 -3
- package/dist/components/agents-sdk/AgentChat.js +1120 -393
- package/dist/components/agents-sdk/AgentChatQueue.d.ts +1 -1
- package/dist/components/agents-sdk/AgentChatQueue.js +290 -173
- package/dist/components/agents-sdk/AgentComputer.d.ts +270 -0
- package/dist/components/agents-sdk/AgentComputer.js +8045 -0
- package/dist/components/agents-sdk/AgentEvent.js +165 -22
- package/dist/components/agents-sdk/AgentScreenSwitcher.d.ts +46 -0
- package/dist/components/agents-sdk/AgentScreenSwitcher.js +409 -0
- package/dist/components/agents-sdk/AgentToolRunsContext.js +139 -41
- package/dist/components/agents-sdk/BrowserLiveScreen.js +860 -551
- package/dist/components/agents-sdk/BrowserLiveView.d.ts +1 -1
- package/dist/components/agents-sdk/BrowserLiveView.js +244 -88
- package/dist/components/agents-sdk/BrowserReplay.js +298 -133
- package/dist/components/agents-sdk/BrowserRunPanel.d.ts +57 -1
- package/dist/components/agents-sdk/BrowserRunPanel.js +979 -129
- package/dist/components/agents-sdk/DiscordConnectionDialog.js +104 -57
- package/dist/components/agents-sdk/EmployeeApp.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeApp.js +109 -47
- package/dist/components/agents-sdk/EmployeeChat.d.ts +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +504 -103
- package/dist/components/agents-sdk/EmployeeChrome.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeChrome.js +1383 -522
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +3 -3
- package/dist/components/agents-sdk/EmployeeSchedules.js +283 -66
- package/dist/components/agents-sdk/EmployeeStartScreen.d.ts +2 -2
- package/dist/components/agents-sdk/EmployeeStartScreen.js +185 -52
- package/dist/components/agents-sdk/ExecutionBoard.d.ts +1 -1
- package/dist/components/agents-sdk/ExecutionBoard.js +1661 -462
- package/dist/components/agents-sdk/ManagerAccountActions.js +143 -36
- package/dist/components/agents-sdk/ManagerOffice.d.ts +15 -8
- package/dist/components/agents-sdk/ManagerOffice.js +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.d.ts +1 -1
- package/dist/components/agents-sdk/ManagerOfficeScreens.js +551 -185
- package/dist/components/agents-sdk/McpConnectionRequest.js +331 -116
- package/dist/components/agents-sdk/McpConnectorForm.js +321 -101
- package/dist/components/agents-sdk/McpPluginCatalog.js +698 -250
- package/dist/components/agents-sdk/McpServerIcon.js +57 -14
- package/dist/components/agents-sdk/McpServerPicker.d.ts +1 -1
- package/dist/components/agents-sdk/McpServerPicker.js +543 -159
- package/dist/components/agents-sdk/ModelSelector.d.ts +1 -1
- package/dist/components/agents-sdk/ModelSelector.js +1154 -256
- package/dist/components/agents-sdk/PromptInputApproval.js +116 -28
- package/dist/components/agents-sdk/PromptInputCommands.d.ts +1 -1
- package/dist/components/agents-sdk/PromptInputCommands.js +33 -46
- package/dist/components/agents-sdk/SlackConnectionDialog.js +38 -14
- package/dist/components/agents-sdk/SubagentRunIndicator.js +118 -25
- package/dist/components/agents-sdk/SubagentRunLanes.js +291 -107
- package/dist/components/agents-sdk/SubagentRunPanel.js +359 -131
- package/dist/components/agents-sdk/SubagentRunSelector.js +123 -26
- package/dist/components/agents-sdk/ThinkChat.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkChat.js +321 -129
- package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivity.js +307 -101
- package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkChatActivitySummary.js +15 -9
- package/dist/components/agents-sdk/ThinkChatToolPanels.js +1389 -407
- package/dist/components/agents-sdk/ThinkExecutionDetail.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionDetail.js +220 -46
- package/dist/components/agents-sdk/ThinkExecutionRun.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkExecutionRun.js +19 -11
- package/dist/components/agents-sdk/ThinkExecutionStatus.d.ts +5 -3
- package/dist/components/agents-sdk/ThinkExecutionStatus.js +224 -37
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.d.ts +8 -5
- package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +506 -125
- package/dist/components/agents-sdk/ThinkFullApp.js +147 -44
- package/dist/components/agents-sdk/ThinkPendingApproval.js +381 -75
- package/dist/components/agents-sdk/ThinkRecoveryNotice.d.ts +3 -1
- package/dist/components/agents-sdk/ThinkRecoveryNotice.js +72 -26
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkSchedule.js +124 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +3 -3
- package/dist/components/agents-sdk/ThinkScheduleActions.js +364 -133
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.js +249 -116
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleDetail.js +312 -91
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +6 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.js +1324 -481
- package/dist/components/agents-sdk/ThinkThreadPicker.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkThreadPicker.js +435 -215
- package/dist/components/agents-sdk/TypeSafeConnectionDialog.js +30 -13
- package/dist/components/agents-sdk/WorkbenchBack.js +66 -20
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +491 -166
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomation.js +1496 -419
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.js +1320 -529
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +72 -2
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -94
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.js +619 -178
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +45 -0
- package/dist/components/agents-sdk/WorkspaceDesktop.js +240 -0
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +52 -1
- package/dist/components/agents-sdk/WorkspaceExplorer.js +268 -86
- package/dist/components/agents-sdk/WorkspaceFile.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceFile.js +30 -9
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +890 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.d.ts +29 -0
- package/dist/components/agents-sdk/WorkspaceFileDetails.js +271 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +2 -0
- package/dist/components/agents-sdk/WorkspaceFileTransfer.js +505 -0
- package/dist/components/agents-sdk/WorkspaceFileView.d.ts +18 -3
- package/dist/components/agents-sdk/WorkspaceFileView.js +866 -1
- package/dist/components/agents-sdk/WorkspaceHeader.js +71 -26
- package/dist/components/agents-sdk/WorkspaceLink.js +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceLive.js +126 -73
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +63 -0
- package/dist/components/agents-sdk/WorkspaceLocalFolder.js +455 -0
- package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
- package/dist/components/agents-sdk/WorkspaceMountManager.js +119 -59
- package/dist/components/agents-sdk/WorkspaceNavigationRestoration.js +90 -54
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspacePerson.js +172 -41
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.js +175 -41
- package/dist/components/ai-sdk/Activity.js +768 -192
- package/dist/components/ai-sdk/AgentAttention.js +286 -58
- package/dist/components/ai-sdk/AgentChatMessageEditor.js +194 -69
- package/dist/components/ai-sdk/AgentChatStartScreen.d.ts +1 -1
- package/dist/components/ai-sdk/AgentChatStartScreen.js +368 -80
- package/dist/components/ai-sdk/AgentChatTurnError.d.ts +6 -1
- package/dist/components/ai-sdk/AgentChatTurnError.js +77 -25
- package/dist/components/ai-sdk/AgentMessageParts.js +0 -1
- package/dist/components/ai-sdk/Approval.js +574 -172
- package/dist/components/ai-sdk/Artifact.d.ts +1 -1
- package/dist/components/ai-sdk/Artifact.js +535 -128
- package/dist/components/ai-sdk/ChainOfThought.d.ts +1 -1
- package/dist/components/ai-sdk/ChainOfThought.js +404 -80
- package/dist/components/ai-sdk/Checkpoint.js +229 -45
- package/dist/components/ai-sdk/CodeBlock.d.ts +1 -1
- package/dist/components/ai-sdk/CodeBlock.js +1 -1
- package/dist/components/ai-sdk/ComposerLink.js +216 -48
- package/dist/components/ai-sdk/ConnectedAppCards.js +229 -52
- package/dist/components/ai-sdk/Context.js +738 -179
- package/dist/components/ai-sdk/Conversation.d.ts +1 -1
- package/dist/components/ai-sdk/Conversation.js +305 -68
- package/dist/components/ai-sdk/ExpansionState.js +74 -15
- package/dist/components/ai-sdk/Goal.js +435 -116
- package/dist/components/ai-sdk/InlineCitation.js +313 -76
- package/dist/components/ai-sdk/MediaPreviewCard.js +451 -135
- package/dist/components/ai-sdk/Message.d.ts +1 -1
- package/dist/components/ai-sdk/Message.js +1010 -195
- package/dist/components/ai-sdk/MessageScroller.d.ts +1 -1
- package/dist/components/ai-sdk/MessageScroller.js +264 -46
- package/dist/components/ai-sdk/MessageScrollerVirtual.js +6 -6
- package/dist/components/ai-sdk/Plan.js +639 -128
- package/dist/components/ai-sdk/PromptInput.d.ts +1 -1
- package/dist/components/ai-sdk/PromptInput.js +2738 -797
- package/dist/components/ai-sdk/PromptInputComposerEditor.d.ts +1 -3
- package/dist/components/ai-sdk/PromptInputComposerEditor.js +188 -83
- package/dist/components/ai-sdk/Queue.js +793 -155
- package/dist/components/ai-sdk/Reasoning.js +268 -69
- package/dist/components/ai-sdk/Sources.js +226 -63
- package/dist/components/ai-sdk/Task.js +294 -71
- package/dist/components/ai-sdk/ToolApproval.js +126 -26
- package/dist/components/ai-sdk/ToolInvocation.js +112 -22
- package/dist/components/extension/ChatGptSignInScreen.js +1 -82
- package/dist/components/extension/CodexModelSelector.d.ts +2 -2
- package/dist/components/extension/CodexModelSelector.js +468 -147
- package/dist/components/extension/ConversationTabPicker.d.ts +1 -1
- package/dist/components/extension/ConversationTabPicker.js +254 -76
- package/dist/components/extension/FirstRunSetup.d.ts +61 -35
- package/dist/components/extension/FirstRunSetup.js +3833 -1011
- package/dist/components/foundations/Accordion.js +186 -41
- package/dist/components/foundations/AlertDialog.js +425 -97
- package/dist/components/foundations/AppIcon.d.ts +13 -13
- package/dist/components/foundations/AppIcon.js +183 -34
- package/dist/components/foundations/Autocomplete.js +408 -89
- package/dist/components/foundations/Avatar.d.ts +100 -2
- package/dist/components/foundations/Avatar.js +204 -44
- package/dist/components/foundations/Button.js +64 -13
- package/dist/components/foundations/Card.js +357 -63
- package/dist/components/foundations/Checkbox.js +83 -18
- package/dist/components/foundations/CheckboxGroup.js +266 -58
- package/dist/components/foundations/Collapsible.d.ts +2 -1
- package/dist/components/foundations/Collapsible.js +130 -27
- package/dist/components/foundations/Combobox.js +408 -89
- package/dist/components/foundations/ContextMenu.d.ts +2 -2
- package/dist/components/foundations/ContextMenu.js +591 -117
- package/dist/components/foundations/DescriptionList.js +159 -28
- package/dist/components/foundations/Dialog.js +373 -89
- package/dist/components/foundations/EmptyState.js +86 -23
- package/dist/components/foundations/Favicon.d.ts +17 -0
- package/dist/components/foundations/Favicon.js +62 -0
- package/dist/components/foundations/Field.js +525 -108
- package/dist/components/foundations/Fieldset.js +115 -23
- package/dist/components/foundations/Form.js +38 -9
- package/dist/components/foundations/FormattedDate.d.ts +19 -5
- package/dist/components/foundations/FormattedDate.js +82 -12
- package/dist/components/foundations/IconButton.d.ts +1 -1
- package/dist/components/foundations/IconButton.js +114 -17
- package/dist/components/foundations/Input.js +38 -9
- package/dist/components/foundations/Kbd.js +55 -10
- package/dist/components/foundations/Label.js +56 -12
- package/dist/components/foundations/LinkButton.js +67 -15
- package/dist/components/foundations/Marker.js +138 -29
- package/dist/components/foundations/Menu.d.ts +1 -1
- package/dist/components/foundations/Menu.js +634 -136
- package/dist/components/foundations/Menubar.d.ts +2 -2
- package/dist/components/foundations/Menubar.js +685 -130
- package/dist/components/foundations/Meter.js +186 -41
- package/dist/components/foundations/NavigationMenu.js +426 -95
- package/dist/components/foundations/NumberField.js +223 -49
- package/dist/components/foundations/Popover.js +398 -88
- package/dist/components/foundations/PreviewCard.js +234 -53
- package/dist/components/foundations/Progress.js +117 -25
- package/dist/components/foundations/RadioGroup.d.ts +13 -5
- package/dist/components/foundations/RadioGroup.js +132 -25
- package/dist/components/foundations/ScrollArea.js +230 -51
- package/dist/components/foundations/SearchField.d.ts +8 -3
- package/dist/components/foundations/SearchField.js +129 -28
- package/dist/components/foundations/Select.js +648 -145
- package/dist/components/foundations/Separator.js +61 -12
- package/dist/components/foundations/Slider.js +260 -57
- package/dist/components/foundations/Stepper.d.ts +1 -1
- package/dist/components/foundations/Stepper.js +561 -127
- package/dist/components/foundations/Switch.js +82 -18
- package/dist/components/foundations/Tabs.d.ts +2 -2
- package/dist/components/foundations/Tabs.js +282 -53
- package/dist/components/foundations/Textarea.js +43 -9
- package/dist/components/foundations/ThemeProvider.js +138 -52
- package/dist/components/foundations/Toast.d.ts +10 -2
- package/dist/components/foundations/Toast.js +322 -75
- package/dist/components/foundations/Toggle.d.ts +5 -2
- package/dist/components/foundations/Toggle.js +51 -10
- package/dist/components/foundations/ToggleGroup.d.ts +4 -4
- package/dist/components/foundations/ToggleGroup.js +216 -60
- package/dist/components/foundations/Toolbar.js +249 -61
- package/dist/components/foundations/Tooltip.d.ts +3 -3
- package/dist/components/foundations/Tooltip.js +311 -55
- package/dist/components/foundations/TransitionSurface.js +43 -9
- package/dist/components/foundations/icons.d.ts +2 -2
- package/dist/components/foundations/icons.js +2 -2
- package/dist/components/general-purpose/AccountSignInDialog.js +99 -17
- package/dist/components/general-purpose/ActionGuide.js +290 -64
- package/dist/components/general-purpose/AppFrame.js +72 -14
- package/dist/components/general-purpose/AppTopBar.d.ts +1 -1
- package/dist/components/general-purpose/AppTopBar.js +349 -60
- package/dist/components/general-purpose/BrandLoading.js +37 -9
- package/dist/components/general-purpose/CommandPalette.d.ts +47 -0
- package/dist/components/general-purpose/CommandPalette.js +271 -0
- package/dist/components/general-purpose/Commit.d.ts +1 -1
- package/dist/components/general-purpose/Commit.js +937 -167
- package/dist/components/general-purpose/EnvironmentVariables.d.ts +1 -1
- package/dist/components/general-purpose/EnvironmentVariables.js +600 -114
- package/dist/components/general-purpose/FileTree.d.ts +20 -7
- package/dist/components/general-purpose/FileTree.js +1 -1
- package/dist/components/general-purpose/ListDetail.d.ts +84 -0
- package/dist/components/general-purpose/ListDetail.js +423 -0
- package/dist/components/general-purpose/NotificationPrompt.js +20 -11
- package/dist/components/general-purpose/PricingBillingToggle.js +34 -7
- package/dist/components/general-purpose/PricingConfirmationDialog.js +126 -42
- package/dist/components/general-purpose/PricingFAQ.js +53 -12
- package/dist/components/general-purpose/PricingPage.js +376 -139
- package/dist/components/general-purpose/PricingPlanCard.js +210 -85
- package/dist/components/general-purpose/PricingUsageCalculator.js +233 -83
- package/dist/components/general-purpose/ResizableSidePanel.js +316 -117
- package/dist/components/general-purpose/ResponsiveSidebarShell.d.ts +1 -1
- package/dist/components/general-purpose/ResponsiveSidebarShell.js +840 -342
- package/dist/components/general-purpose/ScreenStack.d.ts +54 -0
- package/dist/components/general-purpose/ScreenStack.js +427 -0
- package/dist/components/general-purpose/SettingsFormDialog.d.ts +10 -2
- package/dist/components/general-purpose/SettingsFormDialog.js +238 -74
- package/dist/components/general-purpose/SetupChecklist.js +1 -1
- package/dist/components/general-purpose/StatusScreen.js +82 -24
- package/dist/components/general-purpose/SwipeActions.d.ts +54 -0
- package/dist/components/general-purpose/SwipeActions.js +357 -0
- package/dist/components/general-purpose/Terminal.d.ts +22 -48
- package/dist/components/general-purpose/Terminal.js +320 -174
- package/dist/components/general-purpose/TestResults.js +975 -196
- package/dist/components/general-purpose/ThemeModeControl.d.ts +3 -1
- package/dist/components/general-purpose/ThemeModeControl.js +67 -24
- package/dist/components/general-purpose/WallpaperPicker.d.ts +33 -0
- package/dist/components/general-purpose/WallpaperPicker.js +180 -0
- package/dist/components/general-purpose/WebPreview.d.ts +5 -7
- package/dist/components/general-purpose/WebPreview.js +770 -203
- package/dist/components/nanites/AgentConnection.js +323 -84
- package/dist/components/nanites/AgentToolDetail.js +237 -57
- package/dist/components/nanites/GithubMotionMark.js +37 -9
- package/dist/components/nanites/NaniteScene.js +535 -323
- package/dist/connected-app-drafts-Bocdg3Z-.js +637 -0
- package/dist/container-width-C43ccJ84.js +17 -0
- package/dist/context-Ddsp8HgD.js +43 -0
- package/dist/{copy-button-B09hHWd1.d.ts → copy-button-C2HRdomn.d.ts} +1 -1
- package/dist/copy-button-DWBVJR6D.js +118 -0
- package/dist/{format-CWaZEp5o.js → format-DL7f2rqp.js} +5 -1
- package/dist/{icons-CReP3qYl.d.ts → icons-B3n7zvU7.d.ts} +10 -2
- package/dist/icons-nLTnB9kd.js +470 -0
- package/dist/{merge-refs-DAh6reu8.js → merge-refs-DTX97mLp.js} +17 -1
- package/dist/motion-CGM3i6lX.js +319 -0
- package/dist/motion-preferences-6qsDIDvH.js +13 -0
- package/dist/{navigation-link-kqMa81v5.js → navigation-link-DMmtdqsM.js} +32 -8
- package/dist/progress-ring-BO649JA9.js +79 -0
- package/dist/provider-logos-Ceu7iYFx.js +362 -0
- package/dist/scheduled-table-source-gGpVJ1TN.js +92 -0
- package/dist/styles/accessibility.css +26 -0
- package/dist/styles/accordion.css +0 -2
- package/dist/styles/activity.css +20 -12
- package/dist/styles/agent-attention.css +31 -10
- package/dist/styles/agent-chat.css +7 -6
- package/dist/styles/agent-computer-motion-reduction.css +118 -0
- package/dist/styles/agent-computer-motion.css +127 -0
- package/dist/styles/agent-computer-phone.css +942 -0
- package/dist/styles/agent-computer.css +1764 -0
- package/dist/styles/agent-connection.css +5 -5
- package/dist/styles/agent-screen-switcher.css +313 -0
- package/dist/styles/ai-provider-dialog.css +46 -0
- package/dist/styles/app-icon.css +34 -30
- package/dist/styles/app-top-bar.css +33 -18
- package/dist/styles/approval.css +3 -3
- package/dist/styles/artifact.css +1 -1
- package/dist/styles/attachment-preview.css +2 -4
- package/dist/styles/avatar.css +12 -14
- package/dist/styles/base-ui-motion.css +84 -18
- package/dist/styles/base-ui-motion.test.tsx +305 -0
- package/dist/styles/base.css +16 -12
- package/dist/styles/brand.test.ts +7 -20
- package/dist/styles/browser-control-overlay.css +1 -1
- package/dist/styles/browser-live-screen.css +2 -2
- package/dist/styles/browser-live-view.css +1 -1
- package/dist/styles/browser-replay.css +0 -8
- package/dist/styles/browser-run-panel.css +275 -37
- package/dist/styles/button.css +52 -9
- package/dist/styles/card.css +6 -5
- package/dist/styles/chain-of-thought.css +0 -10
- package/dist/styles/checkpoint.css +2 -2
- package/dist/styles/codex-model-selector.css +2 -2
- package/dist/styles/color-contrast.test.ts +18 -1
- package/dist/styles/command-palette.css +110 -0
- package/dist/styles/composer-link.css +11 -7
- package/dist/styles/composition-motion.css +3 -14
- package/dist/styles/context.css +2 -2
- package/dist/styles/conversation-tab-picker.css +7 -0
- package/dist/styles/conversation.css +8 -2
- package/dist/styles/dialog.css +2 -2
- package/dist/styles/employee-app.css +8 -2
- package/dist/styles/employee-chrome.css +15 -6
- package/dist/styles/execution-board.css +206 -114
- package/dist/styles/execution-result.css +2 -2
- package/dist/styles/field.css +187 -4
- package/dist/styles/file-tree.css +218 -40
- package/dist/styles/first-run-setup.css +914 -187
- package/dist/styles/github-motion-mark.css +0 -8
- package/dist/styles/index.css +145 -132
- package/dist/styles/inline-citation.css +5 -4
- package/dist/styles/list-detail.css +57 -0
- package/dist/styles/manager-office.css +6 -8
- package/dist/styles/manager-work.css +4 -2
- package/dist/styles/mcp-plugin-catalog.css +2 -2
- package/dist/styles/mcp-server-picker.css +3 -6
- package/dist/styles/media-preview-card.css +2 -2
- package/dist/styles/menu.css +0 -9
- package/dist/styles/menubar.css +18 -6
- package/dist/styles/message-scroller.css +47 -9
- package/dist/styles/message.css +3 -3
- package/dist/styles/model-selector.css +1 -1
- package/dist/styles/motion-reduction.css +39 -6
- package/dist/styles/pricing-page.css +1 -1
- package/dist/styles/prompt-input.css +29 -29
- package/dist/styles/queue.css +1 -1
- package/dist/styles/recipes.css +212 -28
- package/dist/styles/responsive-sidebar-shell-motion.test.ts +81 -1
- package/dist/styles/responsive-sidebar-shell.css +40 -43
- package/dist/styles/screen-stack.css +123 -0
- package/dist/styles/search-field.css +80 -3
- package/dist/styles/stepper.css +0 -10
- package/dist/styles/streamdown.css +2 -2
- package/dist/styles/subagent-run.css +9 -5
- package/dist/styles/swipe-actions.css +158 -0
- package/dist/styles/tabs.css +80 -23
- package/dist/styles/task.css +7 -1
- package/dist/styles/terminal.css +66 -78
- package/dist/styles/test-results.css +1 -19
- package/dist/styles/textarea.css +2 -1
- package/dist/styles/theme-mode-control.css +154 -26
- package/dist/styles/think-chat-tool-panels.css +1 -1
- package/dist/styles/think-execution-workbench.css +0 -9
- package/dist/styles/think-full-app.css +7 -1
- package/dist/styles/think-schedule.css +81 -54
- package/dist/styles/think-thread-picker.css +28 -37
- package/dist/styles/toast.css +11 -0
- package/dist/styles/toggle-group.css +0 -10
- package/dist/styles/toggle.css +13 -0
- package/dist/styles/tooltip.css +12 -0
- package/dist/styles/transition-surface.css +1 -0
- package/dist/styles/wallpaper-picker.css +224 -0
- package/dist/styles/web-preview.css +47 -18
- package/dist/styles/workspace-automation.css +116 -17
- package/dist/styles/workspace-concepts.css +1 -1
- package/dist/styles/workspace-desktop.css +124 -0
- package/dist/styles/workspace-entity-card.css +3 -1
- package/dist/styles/workspace-explorer.css +499 -5
- package/dist/utils/brand-marks.d.ts +13 -0
- package/dist/utils/brand-marks.js +14 -0
- package/dist/utils/codex-model-catalog.d.ts +1 -1
- package/dist/utils/desktop-artwork.d.ts +17 -0
- package/dist/utils/desktop-artwork.js +18 -0
- package/dist/utils/favicon.d.ts +6 -2
- package/dist/utils/favicon.js +16 -4
- package/dist/utils/model-provider-error.d.ts +17 -0
- package/dist/utils/model-provider-error.js +76 -0
- package/dist/utils/structured-code.d.ts +1 -1
- package/dist/workspace-assets-DdtnBDU3.js +213 -0
- package/dist/{workspace-concept-panel-KpMmznB_.d.ts → workspace-concept-panel-BDTBISNO.d.ts} +2 -2
- package/dist/workspace-concept-panel-VkjvFCY_.js +140 -0
- package/dist/workspace-delete-BOY6CMBf.js +183 -0
- package/dist/workspace-drag-B6hMXUNt.js +304 -0
- package/dist/workspace-entity-card-9YcsNiqU.js +178 -0
- package/dist/workspace-media-preview-B4iB5Tvi.js +1295 -0
- package/dist/{workspace-path-L_KmjRjq.js → workspace-path-TZggP-u4.js} +14 -1
- package/dist/{workspace-person-BVkYb3dv.js → workspace-person-ZwPqu5TX.js} +67 -21
- package/dist/workspace-quick-look-9V-UFpjj.js +1562 -0
- package/package.json +9 -3
- package/dist/Avatar-t1YRzdwB.d.ts +0 -101
- package/dist/CodeBlock-CNvOYR0Q.js +0 -318
- package/dist/ExecutionResult-DmC21cll.js +0 -279
- package/dist/FileTree-H31EVRv_.js +0 -323
- package/dist/ManagerOffice-B3X3iZV9.js +0 -1129
- package/dist/SetupChecklist-Wo4akaSG.js +0 -78
- package/dist/ThinkSchedule-CSuDGrZ9.d.ts +0 -34
- package/dist/WorkspaceFileView-BWI_AJlV.js +0 -783
- package/dist/WorkspaceLink-BeFAXpbI.js +0 -225
- package/dist/app-bar-outlet-CNfNzY4Y.js +0 -6
- package/dist/attachment-preview-1CXJvrmb.js +0 -25
- package/dist/chatgpt-sign-in-button-DNchrZHs.js +0 -32
- package/dist/components/agents-sdk/ModelEndpointDialog.d.ts +0 -31
- package/dist/components/agents-sdk/ModelEndpointDialog.js +0 -141
- package/dist/connected-app-drafts-B9i69bkj.js +0 -283
- package/dist/copy-button-z20VEXRF.js +0 -45
- package/dist/icons-Yp99gmMC.js +0 -141
- package/dist/progress-ring-L2bbF0ji.js +0 -40
- package/dist/provider-logos-DWYY8wNz.js +0 -99
- package/dist/scheduled-table-source-NZR1vFc_.js +0 -38
- package/dist/workspace-assets-Dq5toMQc.js +0 -107
- package/dist/workspace-concept-panel-CxZfmFkP.js +0 -66
- package/dist/workspace-delete-CoB0l6ZU.js +0 -81
- package/dist/workspace-entity-card-B1aV-jBj.js +0 -61
|
@@ -0,0 +1,890 @@
|
|
|
1
|
+
import { o as formatOperationError } from "../../format-DL7f2rqp.js";
|
|
2
|
+
import { Button } from "../foundations/Button.js";
|
|
3
|
+
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
4
|
+
import { a as workspaceDirname, i as workspaceBasename, r as joinWorkspacePath } from "../../workspace-path-TZggP-u4.js";
|
|
5
|
+
import { availableWorkspacePath, useWorkspaceTransfer } from "./WorkspaceFileTransfer.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
10
|
+
//#region src/components/agents-sdk/WorkspaceFileCommands.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Every file shortcut, first one per command shown in menus. macOS's own key
|
|
13
|
+
* is used wherever Chrome lets a page have it; New Folder (⇧⌘N, which opens
|
|
14
|
+
* an Incognito window) takes ⌥⌘N instead.
|
|
15
|
+
*/
|
|
16
|
+
const SHORTCUTS = [
|
|
17
|
+
{
|
|
18
|
+
command: "open",
|
|
19
|
+
key: "KeyO",
|
|
20
|
+
mod: true,
|
|
21
|
+
glyph: "⌘O",
|
|
22
|
+
aria: "Meta+O"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
command: "open",
|
|
26
|
+
key: "ArrowDown",
|
|
27
|
+
mod: true,
|
|
28
|
+
glyph: "⌘↓",
|
|
29
|
+
aria: "Meta+ArrowDown"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
command: "quick-look",
|
|
33
|
+
key: "KeyY",
|
|
34
|
+
mod: true,
|
|
35
|
+
glyph: "⌘Y",
|
|
36
|
+
aria: "Meta+Y"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
command: "trash",
|
|
40
|
+
key: "Backspace",
|
|
41
|
+
mod: true,
|
|
42
|
+
glyph: "⌘⌫",
|
|
43
|
+
aria: "Meta+Backspace"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
command: "trash",
|
|
47
|
+
key: "Delete",
|
|
48
|
+
mod: true,
|
|
49
|
+
glyph: "⌘⌦",
|
|
50
|
+
aria: "Meta+Delete"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
command: "put-back",
|
|
54
|
+
key: "Backspace",
|
|
55
|
+
mod: true,
|
|
56
|
+
glyph: "⌘⌫",
|
|
57
|
+
aria: "Meta+Backspace"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
command: "empty-trash",
|
|
61
|
+
key: "Backspace",
|
|
62
|
+
mod: true,
|
|
63
|
+
shift: true,
|
|
64
|
+
glyph: "⇧⌘⌫",
|
|
65
|
+
aria: "Shift+Meta+Backspace"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
command: "get-info",
|
|
69
|
+
key: "KeyI",
|
|
70
|
+
mod: true,
|
|
71
|
+
glyph: "⌘I",
|
|
72
|
+
aria: "Meta+I"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
command: "rename",
|
|
76
|
+
key: "Enter",
|
|
77
|
+
mod: false,
|
|
78
|
+
glyph: "↩",
|
|
79
|
+
aria: "Enter"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
command: "duplicate",
|
|
83
|
+
key: "KeyD",
|
|
84
|
+
mod: true,
|
|
85
|
+
glyph: "⌘D",
|
|
86
|
+
aria: "Meta+D"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
command: "cut",
|
|
90
|
+
key: "KeyX",
|
|
91
|
+
mod: true,
|
|
92
|
+
glyph: "⌘X",
|
|
93
|
+
aria: "Meta+X"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
command: "copy",
|
|
97
|
+
key: "KeyC",
|
|
98
|
+
mod: true,
|
|
99
|
+
glyph: "⌘C",
|
|
100
|
+
aria: "Meta+C"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
command: "paste",
|
|
104
|
+
key: "KeyV",
|
|
105
|
+
mod: true,
|
|
106
|
+
glyph: "⌘V",
|
|
107
|
+
aria: "Meta+V"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
command: "move-here",
|
|
111
|
+
key: "KeyV",
|
|
112
|
+
mod: true,
|
|
113
|
+
alt: true,
|
|
114
|
+
glyph: "⌥⌘V",
|
|
115
|
+
aria: "Alt+Meta+V"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
command: "new-folder",
|
|
119
|
+
key: "KeyN",
|
|
120
|
+
mod: true,
|
|
121
|
+
alt: true,
|
|
122
|
+
glyph: "⌥⌘N",
|
|
123
|
+
aria: "Alt+Meta+N"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
command: "select-all",
|
|
127
|
+
key: "KeyA",
|
|
128
|
+
mod: true,
|
|
129
|
+
glyph: "⌘A",
|
|
130
|
+
aria: "Meta+A"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
command: "undo",
|
|
134
|
+
key: "KeyZ",
|
|
135
|
+
mod: true,
|
|
136
|
+
glyph: "⌘Z",
|
|
137
|
+
aria: "Meta+Z"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
command: "redo",
|
|
141
|
+
key: "KeyZ",
|
|
142
|
+
mod: true,
|
|
143
|
+
shift: true,
|
|
144
|
+
glyph: "⇧⌘Z",
|
|
145
|
+
aria: "Shift+Meta+Z"
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
/**
|
|
149
|
+
* A command's shortcut, for a host menu bar's item that runs it through
|
|
150
|
+
* `WorkspaceBrowserActions`: the glyphs it shows and its `aria-keyshortcuts`.
|
|
151
|
+
*/
|
|
152
|
+
function workspaceFileShortcut(command) {
|
|
153
|
+
return SHORTCUTS.find((shortcut) => shortcut.command === command);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The command a keydown names, or null. Command and Control both count as
|
|
157
|
+
* the modifier, so the same keys work off a Mac. Keys typed into a field, or
|
|
158
|
+
* mid-composition, are never commands.
|
|
159
|
+
*/
|
|
160
|
+
function workspaceFileCommandForKey(event) {
|
|
161
|
+
if (event.isComposing) return null;
|
|
162
|
+
const target = event.target;
|
|
163
|
+
if (target instanceof Element && target.closest("input, textarea, select, [contenteditable]:not([contenteditable='false'])")) return null;
|
|
164
|
+
const mod = event.metaKey || event.ctrlKey;
|
|
165
|
+
return SHORTCUTS.find((shortcut) => (shortcut.key === event.code || shortcut.key === event.key) && shortcut.mod === mod && Boolean(shortcut.shift) === event.shiftKey && Boolean(shortcut.alt) === event.altKey)?.command ?? null;
|
|
166
|
+
}
|
|
167
|
+
/** The folder each workspace volume keeps its Trash in. */
|
|
168
|
+
const WORKSPACE_TRASH = "/.Trash";
|
|
169
|
+
/** Where the Trash records each item's original location, so Put Back survives a reload. */
|
|
170
|
+
const PUT_BACK_RECORD = `${WORKSPACE_TRASH}/.put-back.json`;
|
|
171
|
+
/** Finder hides names that start with a dot, the Trash among them. */
|
|
172
|
+
function isHiddenWorkspaceEntry(entry) {
|
|
173
|
+
return entry.name.startsWith(".");
|
|
174
|
+
}
|
|
175
|
+
/** Whether `path` is in the Trash (the Trash itself excluded). */
|
|
176
|
+
function isInWorkspaceTrash(path) {
|
|
177
|
+
return path.startsWith(`${WORKSPACE_TRASH}/`);
|
|
178
|
+
}
|
|
179
|
+
/** The Trash's record of where each item came from, by its name in the Trash. */
|
|
180
|
+
async function readPutBackRecord(source) {
|
|
181
|
+
const text = await source.readFile(PUT_BACK_RECORD);
|
|
182
|
+
if (!text) return {};
|
|
183
|
+
try {
|
|
184
|
+
const parsed = JSON.parse(text);
|
|
185
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
186
|
+
} catch {
|
|
187
|
+
return {};
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async function writePutBackRecord(source, record) {
|
|
191
|
+
await source.writeFile(PUT_BACK_RECORD, JSON.stringify(record), "application/json");
|
|
192
|
+
}
|
|
193
|
+
/** Whether the volume's Trash holds anything: the Dock's full or empty Trash. */
|
|
194
|
+
async function workspaceTrashIsFull(source) {
|
|
195
|
+
if (!await source.exists("/.Trash")) return false;
|
|
196
|
+
return (await source.readDir(WORKSPACE_TRASH)).some((entry) => !isHiddenWorkspaceEntry(entry));
|
|
197
|
+
}
|
|
198
|
+
/** Deletes everything in the Trash for good. */
|
|
199
|
+
async function emptyWorkspaceTrash(source) {
|
|
200
|
+
if (!await source.exists("/.Trash")) return;
|
|
201
|
+
for (const entry of await source.readDir(WORKSPACE_TRASH)) await source.rm(entry.path, {
|
|
202
|
+
recursive: true,
|
|
203
|
+
force: true
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async function runOperation(source, operation) {
|
|
207
|
+
const folder = async (path) => (await source.stat(path))?.type === "directory";
|
|
208
|
+
if (operation.kind === "move") {
|
|
209
|
+
const { from, to } = operation;
|
|
210
|
+
if (!await source.exists(from)) throw new Error(`“${workspaceBasename(from)}” is no longer available.`);
|
|
211
|
+
if (await source.exists(to)) throw new Error(`An item named “${workspaceBasename(to)}” already exists in this location.`);
|
|
212
|
+
await source.mv(from, to, { recursive: true });
|
|
213
|
+
return {
|
|
214
|
+
kind: "move",
|
|
215
|
+
from: to,
|
|
216
|
+
to: from
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
if (operation.kind === "trash") {
|
|
220
|
+
const { path } = operation;
|
|
221
|
+
if (!await source.exists(path)) throw new Error(`“${workspaceBasename(path)}” is no longer available.`);
|
|
222
|
+
await source.mkdir(WORKSPACE_TRASH, { recursive: true });
|
|
223
|
+
const to = await availableWorkspacePath(source, WORKSPACE_TRASH, workspaceBasename(path), {
|
|
224
|
+
folder: await folder(path),
|
|
225
|
+
copy: false
|
|
226
|
+
});
|
|
227
|
+
await source.mv(path, to, { recursive: true });
|
|
228
|
+
const record = await readPutBackRecord(source);
|
|
229
|
+
record[workspaceBasename(to)] = path;
|
|
230
|
+
await writePutBackRecord(source, record);
|
|
231
|
+
return {
|
|
232
|
+
kind: "put-back",
|
|
233
|
+
path: to
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
const { path } = operation;
|
|
237
|
+
if (!await source.exists(path)) throw new Error(`“${workspaceBasename(path)}” is no longer in the Trash.`);
|
|
238
|
+
const record = await readPutBackRecord(source);
|
|
239
|
+
const origin = record[workspaceBasename(path)] ?? joinWorkspacePath("/", workspaceBasename(path));
|
|
240
|
+
const directory = workspaceDirname(origin);
|
|
241
|
+
await source.mkdir(directory, { recursive: true });
|
|
242
|
+
const to = await source.exists(origin) ? await availableWorkspacePath(source, directory, workspaceBasename(origin), {
|
|
243
|
+
folder: await folder(path),
|
|
244
|
+
copy: false
|
|
245
|
+
}) : origin;
|
|
246
|
+
await source.mv(path, to, { recursive: true });
|
|
247
|
+
delete record[workspaceBasename(path)];
|
|
248
|
+
await writePutBackRecord(source, record);
|
|
249
|
+
return {
|
|
250
|
+
kind: "trash",
|
|
251
|
+
path: to
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Applies `operations` in order and resolves to the operations that reverse
|
|
256
|
+
* them, already in the order to apply: undoing is running the result, and
|
|
257
|
+
* redoing is running what that run returns. Stops at the first failure,
|
|
258
|
+
* with the operations before it applied.
|
|
259
|
+
*/
|
|
260
|
+
async function runWorkspaceFileOperations(source, operations) {
|
|
261
|
+
const inverses = [];
|
|
262
|
+
for (const operation of operations) inverses.unshift(await runOperation(source, operation));
|
|
263
|
+
return inverses;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Where the objects are after a run, read from the operations that run
|
|
267
|
+
* returned (its inverses): what to select afterwards.
|
|
268
|
+
*/
|
|
269
|
+
function workspaceFileOperationPaths(operations) {
|
|
270
|
+
return operations.flatMap((operation) => operation.kind === "move" ? [operation.from] : operation.kind === "trash" ? [operation.path] : []);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Where a rename lands, checked as the Finder checks it. Rejects with the
|
|
274
|
+
* alert's words for a name that cannot be used or is taken.
|
|
275
|
+
*/
|
|
276
|
+
async function workspaceRenameTarget(source, path, name) {
|
|
277
|
+
const trimmed = name.trim();
|
|
278
|
+
if (!trimmed) throw new Error("A name can’t be empty.");
|
|
279
|
+
if (trimmed.includes("/")) throw new Error("A name can’t contain “/”.");
|
|
280
|
+
if (trimmed.startsWith(".")) throw new Error("Names that begin with a dot are reserved for the system.");
|
|
281
|
+
const to = joinWorkspacePath(workspaceDirname(path), trimmed);
|
|
282
|
+
if (to === path) return null;
|
|
283
|
+
if (await source.exists(to)) throw new Error(`The name “${trimmed}” is already taken. Please choose a different name.`);
|
|
284
|
+
return to;
|
|
285
|
+
}
|
|
286
|
+
/** "untitled folder", or the first free "untitled folder 2"… in `directory`. */
|
|
287
|
+
function newWorkspaceFolderPath(source, directory) {
|
|
288
|
+
return availableWorkspacePath(source, directory, "untitled folder", {
|
|
289
|
+
folder: true,
|
|
290
|
+
copy: false
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
const IMAGE = /\.(png|jpe?g|gif|webp|svg)$/i;
|
|
294
|
+
/** “name” for one object, "N Items" for more: the Finder's menu subject. */
|
|
295
|
+
function subject(paths) {
|
|
296
|
+
return paths.length === 1 ? `“${workspaceBasename(paths[0])}”` : `${paths.length} Items`;
|
|
297
|
+
}
|
|
298
|
+
/** An image file as PNG, the one image type Chrome writes to the system clipboard. */
|
|
299
|
+
async function pngOf(source, path) {
|
|
300
|
+
const info = await source.stat(path);
|
|
301
|
+
const bytes = await source.readFileBytes(path);
|
|
302
|
+
if (!info || !bytes) throw new Error("The image is no longer available.");
|
|
303
|
+
const blob = new Blob([Uint8Array.from(bytes).buffer], { type: info.mimeType });
|
|
304
|
+
if (info.mimeType === "image/png") return blob;
|
|
305
|
+
const url = URL.createObjectURL(blob);
|
|
306
|
+
const image = new Image();
|
|
307
|
+
image.src = url;
|
|
308
|
+
await image.decode().finally(() => URL.revokeObjectURL(url));
|
|
309
|
+
const canvas = new OffscreenCanvas(image.naturalWidth || 512, image.naturalHeight || 512);
|
|
310
|
+
canvas.getContext("2d").drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
311
|
+
return canvas.convertToBlob({ type: "image/png" });
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* What the computer's clipboard can carry from a copy: the names as text, and
|
|
315
|
+
* one image as PNG. Must run in the copy's own event, which grants the write.
|
|
316
|
+
*/
|
|
317
|
+
function writeSystemClipboard(source, paths) {
|
|
318
|
+
const names = paths.map(workspaceBasename).join("\n");
|
|
319
|
+
const image = paths.length === 1 && IMAGE.test(paths[0]);
|
|
320
|
+
const item = new ClipboardItem(image ? {
|
|
321
|
+
"text/plain": names,
|
|
322
|
+
"image/png": pngOf(source, paths[0])
|
|
323
|
+
} : { "text/plain": names });
|
|
324
|
+
navigator.clipboard.write([item]).catch(() => image ? navigator.clipboard.writeText(names) : void 0).catch(() => void 0);
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* One computer's file commands, shared by its desktop and every browser
|
|
328
|
+
* window: the clipboard, Undo and Redo, the Trash, and the alerts they ask.
|
|
329
|
+
* Drops, pastes and imports run through {@link useWorkspaceTransfer}, so a
|
|
330
|
+
* drag, a shortcut and a menu item do the same thing.
|
|
331
|
+
*
|
|
332
|
+
* ```tsx
|
|
333
|
+
* const files = useWorkspaceFileCommands({ home, openFolder });
|
|
334
|
+
* <WorkspaceDesktop commands={files.commands(home, "desktop")} … />
|
|
335
|
+
* {files.dialogs}
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
function useWorkspaceFileCommands(t0) {
|
|
339
|
+
const $ = c(102);
|
|
340
|
+
const { home, openFolder, getInfo, onStatus } = t0;
|
|
341
|
+
const queryClient = useQueryClient();
|
|
342
|
+
let t1;
|
|
343
|
+
if ($[0] !== onStatus) {
|
|
344
|
+
t1 = { onStatus };
|
|
345
|
+
$[0] = onStatus;
|
|
346
|
+
$[1] = t1;
|
|
347
|
+
} else t1 = $[1];
|
|
348
|
+
const transfer = useWorkspaceTransfer(t1);
|
|
349
|
+
const [clipboard, setClipboard] = React.useState(null);
|
|
350
|
+
let t2;
|
|
351
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
352
|
+
t2 = [];
|
|
353
|
+
$[2] = t2;
|
|
354
|
+
} else t2 = $[2];
|
|
355
|
+
const [undoStack, setUndoStack] = React.useState(t2);
|
|
356
|
+
let t3;
|
|
357
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
358
|
+
t3 = [];
|
|
359
|
+
$[3] = t3;
|
|
360
|
+
} else t3 = $[3];
|
|
361
|
+
const [redoStack, setRedoStack] = React.useState(t3);
|
|
362
|
+
const [confirm, setConfirm] = React.useState(null);
|
|
363
|
+
const busy = React.useRef(false);
|
|
364
|
+
const trashFull = useQuery({
|
|
365
|
+
queryKey: [
|
|
366
|
+
"workspace",
|
|
367
|
+
home.sourceKey,
|
|
368
|
+
"trash"
|
|
369
|
+
],
|
|
370
|
+
queryFn: () => workspaceTrashIsFull(home.source)
|
|
371
|
+
}).data ?? false;
|
|
372
|
+
let t4;
|
|
373
|
+
if ($[4] !== queryClient) {
|
|
374
|
+
t4 = (volume) => queryClient.invalidateQueries({ queryKey: ["workspace", volume.sourceKey] });
|
|
375
|
+
$[4] = queryClient;
|
|
376
|
+
$[5] = t4;
|
|
377
|
+
} else t4 = $[5];
|
|
378
|
+
const reload = t4;
|
|
379
|
+
let t5;
|
|
380
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
381
|
+
t5 = function record(entry) {
|
|
382
|
+
if (!entry.operations.length) return;
|
|
383
|
+
setUndoStack((stack) => [...stack, entry]);
|
|
384
|
+
setRedoStack([]);
|
|
385
|
+
};
|
|
386
|
+
$[6] = t5;
|
|
387
|
+
} else t5 = $[6];
|
|
388
|
+
const record = t5;
|
|
389
|
+
let t6;
|
|
390
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
391
|
+
t6 = function ask(question) {
|
|
392
|
+
return new Promise((resolve) => setConfirm({
|
|
393
|
+
...question,
|
|
394
|
+
resolve
|
|
395
|
+
}));
|
|
396
|
+
};
|
|
397
|
+
$[7] = t6;
|
|
398
|
+
} else t6 = $[7];
|
|
399
|
+
const ask = t6;
|
|
400
|
+
let t7;
|
|
401
|
+
if ($[8] !== confirm) {
|
|
402
|
+
t7 = function answer(confirmed) {
|
|
403
|
+
confirm?.resolve(confirmed);
|
|
404
|
+
setConfirm(null);
|
|
405
|
+
};
|
|
406
|
+
$[8] = confirm;
|
|
407
|
+
$[9] = t7;
|
|
408
|
+
} else t7 = $[9];
|
|
409
|
+
const answer = t7;
|
|
410
|
+
let t8;
|
|
411
|
+
if ($[10] !== transfer) {
|
|
412
|
+
t8 = async function exclusive(title, work) {
|
|
413
|
+
if (busy.current) return;
|
|
414
|
+
busy.current = true;
|
|
415
|
+
const result = await work().then(_temp, _temp2);
|
|
416
|
+
busy.current = false;
|
|
417
|
+
if ("error" in result) {
|
|
418
|
+
transfer.alert({
|
|
419
|
+
title,
|
|
420
|
+
detail: formatOperationError(result.error)
|
|
421
|
+
});
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
return result.value;
|
|
425
|
+
};
|
|
426
|
+
$[10] = transfer;
|
|
427
|
+
$[11] = t8;
|
|
428
|
+
} else t8 = $[11];
|
|
429
|
+
const exclusive = t8;
|
|
430
|
+
let t9;
|
|
431
|
+
if ($[12] !== exclusive || $[13] !== reload) {
|
|
432
|
+
t9 = async function apply(volume_0, label, operations) {
|
|
433
|
+
const inverse = await exclusive(`${label} couldn’t be completed`, () => runWorkspaceFileOperations(volume_0.source, operations));
|
|
434
|
+
await reload(volume_0);
|
|
435
|
+
if (!inverse) return [];
|
|
436
|
+
record({
|
|
437
|
+
label,
|
|
438
|
+
volume: volume_0,
|
|
439
|
+
operations: inverse
|
|
440
|
+
});
|
|
441
|
+
return workspaceFileOperationPaths(inverse);
|
|
442
|
+
};
|
|
443
|
+
$[12] = exclusive;
|
|
444
|
+
$[13] = reload;
|
|
445
|
+
$[14] = t9;
|
|
446
|
+
} else t9 = $[14];
|
|
447
|
+
const apply = t9;
|
|
448
|
+
let t10;
|
|
449
|
+
if ($[15] !== apply || $[16] !== exclusive || $[17] !== reload) {
|
|
450
|
+
t10 = async function trash(volume_1, paths) {
|
|
451
|
+
if (!volume_1.linked) {
|
|
452
|
+
await apply(volume_1, `Move of ${subject(paths)}`, paths.map(_temp3));
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (!await ask({
|
|
456
|
+
title: paths.length === 1 ? `Are you sure you want to delete ${subject(paths)}?` : `Are you sure you want to delete these ${paths.length} items?`,
|
|
457
|
+
detail: `${paths.length === 1 ? "This item" : "These items"} will be deleted immediately. You can’t undo this action.`,
|
|
458
|
+
action: "Delete"
|
|
459
|
+
})) return;
|
|
460
|
+
await exclusive("The items couldn’t be deleted", async () => {
|
|
461
|
+
for (const path_0 of paths) await volume_1.source.rm(path_0, {
|
|
462
|
+
recursive: true,
|
|
463
|
+
force: true
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
await reload(volume_1);
|
|
467
|
+
};
|
|
468
|
+
$[15] = apply;
|
|
469
|
+
$[16] = exclusive;
|
|
470
|
+
$[17] = reload;
|
|
471
|
+
$[18] = t10;
|
|
472
|
+
} else t10 = $[18];
|
|
473
|
+
const trash = t10;
|
|
474
|
+
let t11;
|
|
475
|
+
if ($[19] !== exclusive || $[20] !== home || $[21] !== reload) {
|
|
476
|
+
t11 = async function emptyTrash() {
|
|
477
|
+
if (!await ask({
|
|
478
|
+
title: "Are you sure you want to permanently erase the items in the Trash?",
|
|
479
|
+
detail: "You can’t undo this action.",
|
|
480
|
+
action: "Empty Trash"
|
|
481
|
+
})) return;
|
|
482
|
+
await exclusive("The Trash couldn’t be emptied", () => emptyWorkspaceTrash(home.source));
|
|
483
|
+
await reload(home);
|
|
484
|
+
};
|
|
485
|
+
$[19] = exclusive;
|
|
486
|
+
$[20] = home;
|
|
487
|
+
$[21] = reload;
|
|
488
|
+
$[22] = t11;
|
|
489
|
+
} else t11 = $[22];
|
|
490
|
+
const emptyTrash = t11;
|
|
491
|
+
let t12;
|
|
492
|
+
if ($[23] !== transfer || $[24] !== trash) {
|
|
493
|
+
t12 = async function drop(volume_2, dropped, directory, operation, label_0) {
|
|
494
|
+
if (dropped.kind === "workspace" && dropped.sourceKey === volume_2.sourceKey && !volume_2.linked && directory === "/.Trash") {
|
|
495
|
+
await trash(volume_2, dropped.paths);
|
|
496
|
+
return [];
|
|
497
|
+
}
|
|
498
|
+
const result_0 = await transfer.run({
|
|
499
|
+
drop: dropped,
|
|
500
|
+
destination: volume_2.source,
|
|
501
|
+
destinationKey: volume_2.sourceKey,
|
|
502
|
+
directory,
|
|
503
|
+
operation
|
|
504
|
+
});
|
|
505
|
+
if (!result_0) return [];
|
|
506
|
+
const moved = dropped.kind === "workspace" && dropped.sourceKey === volume_2.sourceKey;
|
|
507
|
+
const operations_0 = result_0.landed.flatMap((t13) => {
|
|
508
|
+
const { from, path: path_1 } = t13;
|
|
509
|
+
return moved && operation === "move" && from ? [{
|
|
510
|
+
kind: "move",
|
|
511
|
+
from: path_1,
|
|
512
|
+
to: from
|
|
513
|
+
}] : volume_2.linked ? [] : [{
|
|
514
|
+
kind: "trash",
|
|
515
|
+
path: path_1
|
|
516
|
+
}];
|
|
517
|
+
});
|
|
518
|
+
const paths_0 = result_0.landed.map(_temp4);
|
|
519
|
+
record({
|
|
520
|
+
label: label_0 ?? `${moved && operation === "move" ? "Move" : "Copy"} of ${subject(paths_0)}`,
|
|
521
|
+
volume: volume_2,
|
|
522
|
+
operations: operations_0.toReversed()
|
|
523
|
+
});
|
|
524
|
+
return paths_0;
|
|
525
|
+
};
|
|
526
|
+
$[23] = transfer;
|
|
527
|
+
$[24] = trash;
|
|
528
|
+
$[25] = t12;
|
|
529
|
+
} else t12 = $[25];
|
|
530
|
+
const drop = t12;
|
|
531
|
+
let t13;
|
|
532
|
+
if ($[26] !== exclusive || $[27] !== redoStack || $[28] !== reload || $[29] !== undoStack) {
|
|
533
|
+
t13 = async function step(direction) {
|
|
534
|
+
const [from_0, setFrom, setTo] = direction === "undo" ? [
|
|
535
|
+
undoStack,
|
|
536
|
+
setUndoStack,
|
|
537
|
+
setRedoStack
|
|
538
|
+
] : [
|
|
539
|
+
redoStack,
|
|
540
|
+
setRedoStack,
|
|
541
|
+
setUndoStack
|
|
542
|
+
];
|
|
543
|
+
const entry_0 = from_0.at(-1);
|
|
544
|
+
if (!entry_0) return [];
|
|
545
|
+
const inverse_0 = await exclusive(`${direction === "undo" ? "Undo" : "Redo"} ${entry_0.label} couldn’t be completed`, () => runWorkspaceFileOperations(entry_0.volume.source, entry_0.operations));
|
|
546
|
+
await reload(entry_0.volume);
|
|
547
|
+
setFrom(_temp5);
|
|
548
|
+
if (!inverse_0) return [];
|
|
549
|
+
setTo((stack_1) => [...stack_1, {
|
|
550
|
+
...entry_0,
|
|
551
|
+
operations: inverse_0
|
|
552
|
+
}]);
|
|
553
|
+
return workspaceFileOperationPaths(inverse_0);
|
|
554
|
+
};
|
|
555
|
+
$[26] = exclusive;
|
|
556
|
+
$[27] = redoStack;
|
|
557
|
+
$[28] = reload;
|
|
558
|
+
$[29] = undoStack;
|
|
559
|
+
$[30] = t13;
|
|
560
|
+
} else t13 = $[30];
|
|
561
|
+
const step = t13;
|
|
562
|
+
let t14;
|
|
563
|
+
if ($[31] !== apply || $[32] !== clipboard || $[33] !== drop || $[34] !== emptyTrash || $[35] !== exclusive || $[36] !== getInfo || $[37] !== openFolder || $[38] !== redoStack.length || $[39] !== reload || $[40] !== step || $[41] !== transfer || $[42] !== trash || $[43] !== trashFull || $[44] !== undoStack.length) {
|
|
564
|
+
t14 = function commands(volume_3, surface) {
|
|
565
|
+
const canRun = (command, target) => {
|
|
566
|
+
const inTrash = !volume_3.linked && target.directory === "/.Trash";
|
|
567
|
+
const some = target.paths.length > 0;
|
|
568
|
+
switch (command) {
|
|
569
|
+
case "open":
|
|
570
|
+
case "quick-look":
|
|
571
|
+
case "copy":
|
|
572
|
+
case "cut": return some;
|
|
573
|
+
case "get-info": return getInfo !== void 0;
|
|
574
|
+
case "select-all": return true;
|
|
575
|
+
case "rename": return target.paths.length === 1 && !inTrash;
|
|
576
|
+
case "duplicate":
|
|
577
|
+
case "trash": return some && !inTrash;
|
|
578
|
+
case "paste": return !inTrash && (clipboard !== null || Boolean(target.files?.length));
|
|
579
|
+
case "move-here": return !inTrash && clipboard !== null;
|
|
580
|
+
case "new-folder": return !inTrash;
|
|
581
|
+
case "put-back": return some && inTrash;
|
|
582
|
+
case "empty-trash": return inTrash && trashFull;
|
|
583
|
+
case "show-in-finder": return surface === "desktop" && some;
|
|
584
|
+
case "undo": return undoStack.length > 0;
|
|
585
|
+
case "redo": return redoStack.length > 0;
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
return {
|
|
589
|
+
canRun,
|
|
590
|
+
pasteLabel: clipboard ? `Paste ${clipboard.paths.length === 1 ? "Item" : `${clipboard.paths.length} Items`}` : null,
|
|
591
|
+
rename: async (path_3, name) => {
|
|
592
|
+
const to = await workspaceRenameTarget(volume_3.source, path_3, name).catch((error_0) => {
|
|
593
|
+
transfer.alert({
|
|
594
|
+
title: "That name can’t be used",
|
|
595
|
+
detail: formatOperationError(error_0)
|
|
596
|
+
});
|
|
597
|
+
throw error_0;
|
|
598
|
+
});
|
|
599
|
+
if (!to) return path_3;
|
|
600
|
+
return (await apply(volume_3, "Rename", [{
|
|
601
|
+
kind: "move",
|
|
602
|
+
from: path_3,
|
|
603
|
+
to
|
|
604
|
+
}])).length ? to : path_3;
|
|
605
|
+
},
|
|
606
|
+
run: async (command_0, target_0) => {
|
|
607
|
+
if (!canRun(command_0, target_0)) return;
|
|
608
|
+
const { paths: paths_1, directory: directory_0 } = target_0;
|
|
609
|
+
switch (command_0) {
|
|
610
|
+
case "copy":
|
|
611
|
+
case "cut":
|
|
612
|
+
writeSystemClipboard(volume_3.source, paths_1);
|
|
613
|
+
setClipboard({
|
|
614
|
+
volume: volume_3,
|
|
615
|
+
paths: paths_1,
|
|
616
|
+
cut: command_0 === "cut"
|
|
617
|
+
});
|
|
618
|
+
return;
|
|
619
|
+
case "paste":
|
|
620
|
+
case "move-here": {
|
|
621
|
+
if (target_0.files?.length) return drop(volume_3, {
|
|
622
|
+
kind: "files",
|
|
623
|
+
items: target_0.files.map(_temp6)
|
|
624
|
+
}, directory_0, "copy");
|
|
625
|
+
if (!clipboard) return;
|
|
626
|
+
const move = command_0 === "move-here" || clipboard.cut;
|
|
627
|
+
const landed = await drop(volume_3, {
|
|
628
|
+
kind: "workspace",
|
|
629
|
+
...clipboard.volume,
|
|
630
|
+
paths: clipboard.paths
|
|
631
|
+
}, directory_0, move ? "move" : "copy");
|
|
632
|
+
if (move) setClipboard(null);
|
|
633
|
+
return landed;
|
|
634
|
+
}
|
|
635
|
+
case "duplicate": return drop(volume_3, {
|
|
636
|
+
kind: "workspace",
|
|
637
|
+
...volume_3,
|
|
638
|
+
paths: paths_1
|
|
639
|
+
}, directory_0, "copy", `Duplicate of ${subject(paths_1)}`);
|
|
640
|
+
case "new-folder": {
|
|
641
|
+
const path_6 = await exclusive("The folder couldn’t be created", async () => {
|
|
642
|
+
const path_5 = await newWorkspaceFolderPath(volume_3.source, directory_0);
|
|
643
|
+
await volume_3.source.mkdir(path_5);
|
|
644
|
+
return path_5;
|
|
645
|
+
});
|
|
646
|
+
await reload(volume_3);
|
|
647
|
+
if (!path_6) return;
|
|
648
|
+
if (!volume_3.linked) record({
|
|
649
|
+
label: "New Folder",
|
|
650
|
+
volume: volume_3,
|
|
651
|
+
operations: [{
|
|
652
|
+
kind: "trash",
|
|
653
|
+
path: path_6
|
|
654
|
+
}]
|
|
655
|
+
});
|
|
656
|
+
return [path_6];
|
|
657
|
+
}
|
|
658
|
+
case "trash": return trash(volume_3, paths_1);
|
|
659
|
+
case "put-back": return apply(volume_3, "Put Back", paths_1.map(_temp7));
|
|
660
|
+
case "empty-trash": return emptyTrash();
|
|
661
|
+
case "get-info": return getInfo?.(volume_3, paths_1.length ? paths_1 : [directory_0]);
|
|
662
|
+
case "show-in-finder":
|
|
663
|
+
openFolder(workspaceDirname(paths_1.at(-1)));
|
|
664
|
+
return;
|
|
665
|
+
case "undo":
|
|
666
|
+
case "redo": return step(command_0);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
$[31] = apply;
|
|
672
|
+
$[32] = clipboard;
|
|
673
|
+
$[33] = drop;
|
|
674
|
+
$[34] = emptyTrash;
|
|
675
|
+
$[35] = exclusive;
|
|
676
|
+
$[36] = getInfo;
|
|
677
|
+
$[37] = openFolder;
|
|
678
|
+
$[38] = redoStack.length;
|
|
679
|
+
$[39] = reload;
|
|
680
|
+
$[40] = step;
|
|
681
|
+
$[41] = transfer;
|
|
682
|
+
$[42] = trash;
|
|
683
|
+
$[43] = trashFull;
|
|
684
|
+
$[44] = undoStack.length;
|
|
685
|
+
$[45] = t14;
|
|
686
|
+
} else t14 = $[45];
|
|
687
|
+
const commands = t14;
|
|
688
|
+
const t15 = confirm !== null;
|
|
689
|
+
let t16;
|
|
690
|
+
if ($[46] !== answer) {
|
|
691
|
+
t16 = (open) => !open && answer(false);
|
|
692
|
+
$[46] = answer;
|
|
693
|
+
$[47] = t16;
|
|
694
|
+
} else t16 = $[47];
|
|
695
|
+
let t17;
|
|
696
|
+
if ($[48] === Symbol.for("react.memo_cache_sentinel")) {
|
|
697
|
+
t17 = /* @__PURE__ */ jsx(AlertDialog.Backdrop, {});
|
|
698
|
+
$[48] = t17;
|
|
699
|
+
} else t17 = $[48];
|
|
700
|
+
const t18 = confirm?.title;
|
|
701
|
+
let t19;
|
|
702
|
+
if ($[49] !== t18) {
|
|
703
|
+
t19 = /* @__PURE__ */ jsx(AlertDialog.Title, { children: t18 });
|
|
704
|
+
$[49] = t18;
|
|
705
|
+
$[50] = t19;
|
|
706
|
+
} else t19 = $[50];
|
|
707
|
+
const t20 = confirm?.detail;
|
|
708
|
+
let t21;
|
|
709
|
+
if ($[51] !== t20) {
|
|
710
|
+
t21 = /* @__PURE__ */ jsx(AlertDialog.Description, { children: t20 });
|
|
711
|
+
$[51] = t20;
|
|
712
|
+
$[52] = t21;
|
|
713
|
+
} else t21 = $[52];
|
|
714
|
+
let t22;
|
|
715
|
+
if ($[53] !== t19 || $[54] !== t21) {
|
|
716
|
+
t22 = /* @__PURE__ */ jsxs(AlertDialog.Header, { children: [t19, t21] });
|
|
717
|
+
$[53] = t19;
|
|
718
|
+
$[54] = t21;
|
|
719
|
+
$[55] = t22;
|
|
720
|
+
} else t22 = $[55];
|
|
721
|
+
let t23;
|
|
722
|
+
if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
|
|
723
|
+
t23 = /* @__PURE__ */ jsx(AlertDialog.Close, { children: "Cancel" });
|
|
724
|
+
$[56] = t23;
|
|
725
|
+
} else t23 = $[56];
|
|
726
|
+
let t24;
|
|
727
|
+
if ($[57] !== answer) {
|
|
728
|
+
t24 = () => answer(true);
|
|
729
|
+
$[57] = answer;
|
|
730
|
+
$[58] = t24;
|
|
731
|
+
} else t24 = $[58];
|
|
732
|
+
const t25 = confirm?.action;
|
|
733
|
+
let t26;
|
|
734
|
+
if ($[59] !== t24 || $[60] !== t25) {
|
|
735
|
+
t26 = /* @__PURE__ */ jsxs(AlertDialog.Footer, { children: [t23, /* @__PURE__ */ jsx(Button, {
|
|
736
|
+
color: "destructive",
|
|
737
|
+
onClick: t24,
|
|
738
|
+
children: t25
|
|
739
|
+
})] });
|
|
740
|
+
$[59] = t24;
|
|
741
|
+
$[60] = t25;
|
|
742
|
+
$[61] = t26;
|
|
743
|
+
} else t26 = $[61];
|
|
744
|
+
let t27;
|
|
745
|
+
if ($[62] !== t22 || $[63] !== t26) {
|
|
746
|
+
t27 = /* @__PURE__ */ jsxs(AlertDialog.Portal, { children: [t17, /* @__PURE__ */ jsx(AlertDialog.Viewport, { children: /* @__PURE__ */ jsxs(AlertDialog.Popup, {
|
|
747
|
+
size: "sm",
|
|
748
|
+
children: [t22, t26]
|
|
749
|
+
}) })] });
|
|
750
|
+
$[62] = t22;
|
|
751
|
+
$[63] = t26;
|
|
752
|
+
$[64] = t27;
|
|
753
|
+
} else t27 = $[64];
|
|
754
|
+
let t28;
|
|
755
|
+
if ($[65] !== t15 || $[66] !== t16 || $[67] !== t27) {
|
|
756
|
+
t28 = /* @__PURE__ */ jsx(AlertDialog.Root, {
|
|
757
|
+
open: t15,
|
|
758
|
+
onOpenChange: t16,
|
|
759
|
+
children: t27
|
|
760
|
+
});
|
|
761
|
+
$[65] = t15;
|
|
762
|
+
$[66] = t16;
|
|
763
|
+
$[67] = t27;
|
|
764
|
+
$[68] = t28;
|
|
765
|
+
} else t28 = $[68];
|
|
766
|
+
let t29;
|
|
767
|
+
if ($[69] !== t28 || $[70] !== transfer.dialogs) {
|
|
768
|
+
t29 = /* @__PURE__ */ jsxs(Fragment, { children: [transfer.dialogs, t28] });
|
|
769
|
+
$[69] = t28;
|
|
770
|
+
$[70] = transfer.dialogs;
|
|
771
|
+
$[71] = t29;
|
|
772
|
+
} else t29 = $[71];
|
|
773
|
+
const dialogs = t29;
|
|
774
|
+
let t30;
|
|
775
|
+
if ($[72] !== undoStack) {
|
|
776
|
+
t30 = undoStack.at(-1)?.label ?? null;
|
|
777
|
+
$[72] = undoStack;
|
|
778
|
+
$[73] = t30;
|
|
779
|
+
} else t30 = $[73];
|
|
780
|
+
let t31;
|
|
781
|
+
if ($[74] !== redoStack) {
|
|
782
|
+
t31 = redoStack.at(-1)?.label ?? null;
|
|
783
|
+
$[74] = redoStack;
|
|
784
|
+
$[75] = t31;
|
|
785
|
+
} else t31 = $[75];
|
|
786
|
+
let t32;
|
|
787
|
+
let t33;
|
|
788
|
+
if ($[76] !== step) {
|
|
789
|
+
t32 = () => void step("undo");
|
|
790
|
+
t33 = () => void step("redo");
|
|
791
|
+
$[76] = step;
|
|
792
|
+
$[77] = t32;
|
|
793
|
+
$[78] = t33;
|
|
794
|
+
} else {
|
|
795
|
+
t32 = $[77];
|
|
796
|
+
t33 = $[78];
|
|
797
|
+
}
|
|
798
|
+
let t34;
|
|
799
|
+
if ($[79] !== emptyTrash) {
|
|
800
|
+
t34 = () => void emptyTrash();
|
|
801
|
+
$[79] = emptyTrash;
|
|
802
|
+
$[80] = t34;
|
|
803
|
+
} else t34 = $[80];
|
|
804
|
+
let t35;
|
|
805
|
+
if ($[81] !== home.source || $[82] !== openFolder) {
|
|
806
|
+
t35 = () => void home.source.mkdir(WORKSPACE_TRASH, { recursive: true }).then(() => openFolder(WORKSPACE_TRASH));
|
|
807
|
+
$[81] = home.source;
|
|
808
|
+
$[82] = openFolder;
|
|
809
|
+
$[83] = t35;
|
|
810
|
+
} else t35 = $[83];
|
|
811
|
+
let t36;
|
|
812
|
+
if ($[84] !== home || $[85] !== trash) {
|
|
813
|
+
t36 = (t37) => {
|
|
814
|
+
const { sourceKey, paths: paths_2 } = t37;
|
|
815
|
+
if (sourceKey === home.sourceKey) trash(home, paths_2);
|
|
816
|
+
};
|
|
817
|
+
$[84] = home;
|
|
818
|
+
$[85] = trash;
|
|
819
|
+
$[86] = t36;
|
|
820
|
+
} else t36 = $[86];
|
|
821
|
+
let t37;
|
|
822
|
+
if ($[87] !== commands || $[88] !== dialogs || $[89] !== drop || $[90] !== home || $[91] !== t30 || $[92] !== t31 || $[93] !== t32 || $[94] !== t33 || $[95] !== t34 || $[96] !== t35 || $[97] !== t36 || $[98] !== transfer.cancel || $[99] !== transfer.transferring || $[100] !== trashFull) {
|
|
823
|
+
t37 = {
|
|
824
|
+
home,
|
|
825
|
+
commands,
|
|
826
|
+
drop,
|
|
827
|
+
undoLabel: t30,
|
|
828
|
+
redoLabel: t31,
|
|
829
|
+
undo: t32,
|
|
830
|
+
redo: t33,
|
|
831
|
+
trashFull,
|
|
832
|
+
emptyTrash: t34,
|
|
833
|
+
openTrash: t35,
|
|
834
|
+
trashDrop: t36,
|
|
835
|
+
transferring: transfer.transferring,
|
|
836
|
+
cancelTransfer: transfer.cancel,
|
|
837
|
+
dialogs
|
|
838
|
+
};
|
|
839
|
+
$[87] = commands;
|
|
840
|
+
$[88] = dialogs;
|
|
841
|
+
$[89] = drop;
|
|
842
|
+
$[90] = home;
|
|
843
|
+
$[91] = t30;
|
|
844
|
+
$[92] = t31;
|
|
845
|
+
$[93] = t32;
|
|
846
|
+
$[94] = t33;
|
|
847
|
+
$[95] = t34;
|
|
848
|
+
$[96] = t35;
|
|
849
|
+
$[97] = t36;
|
|
850
|
+
$[98] = transfer.cancel;
|
|
851
|
+
$[99] = transfer.transferring;
|
|
852
|
+
$[100] = trashFull;
|
|
853
|
+
$[101] = t37;
|
|
854
|
+
} else t37 = $[101];
|
|
855
|
+
return t37;
|
|
856
|
+
}
|
|
857
|
+
function _temp7(path_4) {
|
|
858
|
+
return {
|
|
859
|
+
kind: "put-back",
|
|
860
|
+
path: path_4
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
function _temp6(file) {
|
|
864
|
+
return {
|
|
865
|
+
kind: "file",
|
|
866
|
+
name: file.name,
|
|
867
|
+
file
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
function _temp5(stack_0) {
|
|
871
|
+
return stack_0.slice(0, -1);
|
|
872
|
+
}
|
|
873
|
+
function _temp4(t0) {
|
|
874
|
+
const { path: path_2 } = t0;
|
|
875
|
+
return path_2;
|
|
876
|
+
}
|
|
877
|
+
function _temp3(path) {
|
|
878
|
+
return {
|
|
879
|
+
kind: "trash",
|
|
880
|
+
path
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
function _temp2(error) {
|
|
884
|
+
return { error };
|
|
885
|
+
}
|
|
886
|
+
function _temp(value) {
|
|
887
|
+
return { value };
|
|
888
|
+
}
|
|
889
|
+
//#endregion
|
|
890
|
+
export { WORKSPACE_TRASH, isHiddenWorkspaceEntry, isInWorkspaceTrash, runWorkspaceFileOperations, useWorkspaceFileCommands, workspaceFileCommandForKey, workspaceFileShortcut, workspaceRenameTarget, workspaceTrashIsFull };
|