@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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as KeyboardIcon, et as RefreshIcon, r as ArrowLeftIcon } from "../../icons-nLTnB9kd.js";
|
|
2
2
|
import { Button } from "../foundations/Button.js";
|
|
3
3
|
import { WebPreviewNavigationButton } from "../general-purpose/WebPreview.js";
|
|
4
4
|
import { BrowserLiveView } from "./BrowserLiveView.js";
|
|
5
5
|
import { BrowserRunPanel } from "./BrowserRunPanel.js";
|
|
6
|
-
import {
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { useEffect, useEffectEvent, useLayoutEffect, useRef, useState } from "react";
|
|
7
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/agents-sdk/BrowserLiveScreen.tsx
|
|
9
10
|
const BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS = 1e4;
|
|
@@ -14,461 +15,663 @@ const BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS = 1e4;
|
|
|
14
15
|
* tab summaries and selection. This component owns the peer connection, remote-input
|
|
15
16
|
* mapping, reconnect lifecycle, synthesized browser chrome, and cleanup.
|
|
16
17
|
*/
|
|
17
|
-
function BrowserLiveScreen(
|
|
18
|
+
function BrowserLiveScreen(t0) {
|
|
19
|
+
const $ = c(97);
|
|
20
|
+
const { sendSignal: sendHostSignal, subscribeSignals, protocol, getIceServers, label: t1, controlLabel: t2, tabs: t3, tabId: selectedTabId, onTabChange } = t0;
|
|
21
|
+
const label = t1 === void 0 ? "Employee browser" : t1;
|
|
22
|
+
const controlLabel = t2 === void 0 ? "Control employee browser" : t2;
|
|
23
|
+
let t4;
|
|
24
|
+
if ($[0] !== t3) {
|
|
25
|
+
t4 = t3 === void 0 ? [] : t3;
|
|
26
|
+
$[0] = t3;
|
|
27
|
+
$[1] = t4;
|
|
28
|
+
} else t4 = $[1];
|
|
29
|
+
const tabs = t4;
|
|
18
30
|
const video = useRef(null);
|
|
19
31
|
const input = useRef(null);
|
|
32
|
+
const channel = useRef(null);
|
|
33
|
+
const geometry = useRef(null);
|
|
34
|
+
const currentProtocol = useRef(protocol);
|
|
35
|
+
let t5;
|
|
36
|
+
let t6;
|
|
37
|
+
if ($[2] !== protocol) {
|
|
38
|
+
t5 = () => {
|
|
39
|
+
currentProtocol.current = protocol;
|
|
40
|
+
};
|
|
41
|
+
t6 = [protocol];
|
|
42
|
+
$[2] = protocol;
|
|
43
|
+
$[3] = t5;
|
|
44
|
+
$[4] = t6;
|
|
45
|
+
} else {
|
|
46
|
+
t5 = $[3];
|
|
47
|
+
t6 = $[4];
|
|
48
|
+
}
|
|
49
|
+
useLayoutEffect(t5, t6);
|
|
50
|
+
let t7;
|
|
51
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
52
|
+
t7 = function sendInput(events) {
|
|
53
|
+
const open = channel.current;
|
|
54
|
+
const status = geometry.current;
|
|
55
|
+
if (open?.readyState !== "open" || !status || events.length === 0) return false;
|
|
56
|
+
open.send(currentProtocol.current.serializeInput({
|
|
57
|
+
tabId: status.tabId,
|
|
58
|
+
streamGeneration: status.streamGeneration,
|
|
59
|
+
events
|
|
60
|
+
}));
|
|
61
|
+
return true;
|
|
62
|
+
};
|
|
63
|
+
$[5] = t7;
|
|
64
|
+
} else t7 = $[5];
|
|
65
|
+
const sendInput = t7;
|
|
66
|
+
let t8;
|
|
67
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
68
|
+
t8 = function sendCommand(command) {
|
|
69
|
+
const open_0 = channel.current;
|
|
70
|
+
if (open_0?.readyState !== "open") return;
|
|
71
|
+
open_0.send(currentProtocol.current.serializeCommand(command));
|
|
72
|
+
};
|
|
73
|
+
$[6] = t8;
|
|
74
|
+
} else t8 = $[6];
|
|
75
|
+
const sendCommand = t8;
|
|
76
|
+
let t9;
|
|
77
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
78
|
+
t9 = function currentViewGeometry() {
|
|
79
|
+
const element = video.current;
|
|
80
|
+
const status_0 = geometry.current;
|
|
81
|
+
if (!element || !status_0) return null;
|
|
82
|
+
const bounds = element.getBoundingClientRect();
|
|
83
|
+
const sourceWidth = element.videoWidth || status_0.metadata.deviceWidth;
|
|
84
|
+
const sourceHeight = element.videoHeight || status_0.metadata.deviceHeight;
|
|
85
|
+
if (bounds.width === 0 || bounds.height === 0 || sourceWidth <= 0 || sourceHeight <= 0) return null;
|
|
86
|
+
const containScale = Math.min(bounds.width / sourceWidth, bounds.height / sourceHeight);
|
|
87
|
+
const renderedWidth = sourceWidth * containScale;
|
|
88
|
+
const renderedHeight = sourceHeight * containScale;
|
|
89
|
+
return {
|
|
90
|
+
renderedLeft: bounds.left + (bounds.width - renderedWidth) / 2,
|
|
91
|
+
renderedTop: bounds.top + (bounds.height - renderedHeight) / 2,
|
|
92
|
+
renderedWidth,
|
|
93
|
+
renderedHeight,
|
|
94
|
+
zoom: renderedWidth / status_0.metadata.deviceWidth
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
$[7] = t9;
|
|
98
|
+
} else t9 = $[7];
|
|
99
|
+
const currentViewGeometry = t9;
|
|
100
|
+
let t10;
|
|
101
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
102
|
+
t10 = function syncInputBounds() {
|
|
103
|
+
const element_0 = input.current;
|
|
104
|
+
if (!element_0) return;
|
|
105
|
+
const view = currentViewGeometry();
|
|
106
|
+
const surface = element_0.parentElement;
|
|
107
|
+
if (!view || !surface) {
|
|
108
|
+
element_0.style.removeProperty("inset");
|
|
109
|
+
element_0.style.removeProperty("left");
|
|
110
|
+
element_0.style.removeProperty("top");
|
|
111
|
+
element_0.style.removeProperty("width");
|
|
112
|
+
element_0.style.removeProperty("height");
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const bounds_0 = surface.getBoundingClientRect();
|
|
116
|
+
element_0.style.inset = "auto";
|
|
117
|
+
element_0.style.left = `${view.renderedLeft - bounds_0.left}px`;
|
|
118
|
+
element_0.style.top = `${view.renderedTop - bounds_0.top}px`;
|
|
119
|
+
element_0.style.width = `${view.renderedWidth}px`;
|
|
120
|
+
element_0.style.height = `${view.renderedHeight}px`;
|
|
121
|
+
};
|
|
122
|
+
$[8] = t10;
|
|
123
|
+
} else t10 = $[8];
|
|
124
|
+
const syncInputBounds = t10;
|
|
125
|
+
let t11;
|
|
126
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
127
|
+
t11 = function toPagePoint(event) {
|
|
128
|
+
const view_0 = currentViewGeometry();
|
|
129
|
+
return view_0 ? pointWithin(view_0, event) : null;
|
|
130
|
+
};
|
|
131
|
+
$[9] = t11;
|
|
132
|
+
} else t11 = $[9];
|
|
133
|
+
const toPagePoint = t11;
|
|
20
134
|
const [inputElement, setInputElement] = useState(null);
|
|
21
135
|
const [videoElement, setVideoElement] = useState(null);
|
|
22
136
|
const track = useRef(null);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
137
|
+
let t12;
|
|
138
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
139
|
+
t12 = (element_1) => {
|
|
140
|
+
video.current = element_1;
|
|
141
|
+
if (element_1) element_1.srcObject = track.current;
|
|
142
|
+
setVideoElement(element_1);
|
|
143
|
+
};
|
|
144
|
+
$[10] = t12;
|
|
145
|
+
} else t12 = $[10];
|
|
146
|
+
const attachVideo = t12;
|
|
147
|
+
let t13;
|
|
148
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
149
|
+
t13 = (stream) => {
|
|
150
|
+
track.current = stream;
|
|
151
|
+
if (video.current) {
|
|
152
|
+
video.current.srcObject = stream;
|
|
153
|
+
syncInputBounds();
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
$[11] = t13;
|
|
157
|
+
} else t13 = $[11];
|
|
158
|
+
const showTrack = t13;
|
|
159
|
+
const [link, setLink] = useState(null);
|
|
38
160
|
const [failure, setFailure] = useState(null);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
161
|
+
let t14;
|
|
162
|
+
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
163
|
+
t14 = () => syncInputBounds();
|
|
164
|
+
$[12] = t14;
|
|
165
|
+
} else t14 = $[12];
|
|
166
|
+
const syncVideoInputBounds = useEffectEvent(t14);
|
|
167
|
+
let t15;
|
|
168
|
+
if ($[13] !== syncVideoInputBounds || $[14] !== videoElement) {
|
|
169
|
+
t15 = () => {
|
|
170
|
+
if (!videoElement) return;
|
|
171
|
+
videoElement.addEventListener("resize", syncVideoInputBounds);
|
|
172
|
+
const observer = new ResizeObserver(syncVideoInputBounds);
|
|
173
|
+
observer.observe(videoElement);
|
|
174
|
+
syncVideoInputBounds();
|
|
175
|
+
return () => {
|
|
176
|
+
videoElement.removeEventListener("resize", syncVideoInputBounds);
|
|
177
|
+
observer.disconnect();
|
|
178
|
+
};
|
|
49
179
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
180
|
+
$[13] = syncVideoInputBounds;
|
|
181
|
+
$[14] = videoElement;
|
|
182
|
+
$[15] = t15;
|
|
183
|
+
} else t15 = $[15];
|
|
184
|
+
let t16;
|
|
185
|
+
if ($[16] !== videoElement) {
|
|
186
|
+
t16 = [videoElement];
|
|
187
|
+
$[16] = videoElement;
|
|
188
|
+
$[17] = t16;
|
|
189
|
+
} else t16 = $[17];
|
|
190
|
+
useEffect(t15, t16);
|
|
191
|
+
let t17;
|
|
192
|
+
if ($[18] !== sendHostSignal) {
|
|
193
|
+
t17 = (viewerId, payload) => sendHostSignal({
|
|
194
|
+
viewerId,
|
|
195
|
+
payload
|
|
196
|
+
});
|
|
197
|
+
$[18] = sendHostSignal;
|
|
198
|
+
$[19] = t17;
|
|
199
|
+
} else t17 = $[19];
|
|
200
|
+
const sendSignal = useEffectEvent(t17);
|
|
201
|
+
let t18;
|
|
202
|
+
if ($[20] !== getIceServers) {
|
|
203
|
+
t18 = async () => await getIceServers?.() ?? [];
|
|
204
|
+
$[20] = getIceServers;
|
|
205
|
+
$[21] = t18;
|
|
206
|
+
} else t18 = $[21];
|
|
207
|
+
const loadIceServers = useEffectEvent(t18);
|
|
208
|
+
let t19;
|
|
209
|
+
if ($[22] !== subscribeSignals) {
|
|
210
|
+
t19 = (listener) => subscribeSignals(listener);
|
|
211
|
+
$[22] = subscribeSignals;
|
|
212
|
+
$[23] = t19;
|
|
213
|
+
} else t19 = $[23];
|
|
214
|
+
const subscribe = useEffectEvent(t19);
|
|
215
|
+
let t20;
|
|
216
|
+
if ($[24] !== protocol) {
|
|
217
|
+
t20 = (value) => protocol.parseStatus(value);
|
|
218
|
+
$[24] = protocol;
|
|
219
|
+
$[25] = t20;
|
|
220
|
+
} else t20 = $[25];
|
|
221
|
+
const parseStatus = useEffectEvent(t20);
|
|
62
222
|
const captureTabId = tabs.some((tab) => tab.tabId === selectedTabId) ? selectedTabId : void 0;
|
|
63
223
|
const dataChannelLabel = protocol.dataChannelLabel;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
224
|
+
let t21;
|
|
225
|
+
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
226
|
+
t21 = (event_0) => {
|
|
227
|
+
event_0.preventDefault();
|
|
228
|
+
const point = toPagePoint(event_0);
|
|
229
|
+
if (!point) return;
|
|
230
|
+
sendInput([{
|
|
231
|
+
kind: "mouse",
|
|
232
|
+
type: "mouseWheel",
|
|
233
|
+
...point,
|
|
234
|
+
deltaX: event_0.deltaX,
|
|
235
|
+
deltaY: event_0.deltaY,
|
|
236
|
+
modifiers: modifiers(event_0)
|
|
237
|
+
}]);
|
|
238
|
+
};
|
|
239
|
+
$[26] = t21;
|
|
240
|
+
} else t21 = $[26];
|
|
241
|
+
const handleWheel = useEffectEvent(t21);
|
|
77
242
|
const [keyboardOpen, setKeyboardOpen] = useState(false);
|
|
78
243
|
const touch = useRef(null);
|
|
79
244
|
const mousePress = useRef(null);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
cancelForwardedKeys();
|
|
114
|
-
}
|
|
115
|
-
input.current = element;
|
|
116
|
-
setInputElement(element);
|
|
117
|
-
syncInputBounds();
|
|
118
|
-
}, []);
|
|
119
|
-
useEffect(() => {
|
|
120
|
-
if (!inputElement) return;
|
|
121
|
-
inputElement.addEventListener("wheel", handleWheel, { passive: false });
|
|
122
|
-
return () => inputElement.removeEventListener("wheel", handleWheel);
|
|
123
|
-
}, [inputElement]);
|
|
124
|
-
const [streamed, setStreamed] = useState(null);
|
|
125
|
-
useEffect(() => {
|
|
126
|
-
if (captureTabId === void 0) {
|
|
127
|
-
setPhase("idle");
|
|
128
|
-
setStreamed(null);
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
const tabId = captureTabId;
|
|
132
|
-
setPhase("connecting");
|
|
133
|
-
let disposed = false;
|
|
134
|
-
let connection;
|
|
135
|
-
let viewerId = "";
|
|
136
|
-
let attempt = 0;
|
|
137
|
-
let pendingCandidates = [];
|
|
138
|
-
let retryTimer;
|
|
139
|
-
let negotiationTimer;
|
|
140
|
-
let signaling = Promise.resolve();
|
|
141
|
-
function clearRetry() {
|
|
142
|
-
if (retryTimer !== void 0) clearTimeout(retryTimer);
|
|
143
|
-
retryTimer = void 0;
|
|
144
|
-
}
|
|
145
|
-
function clearNegotiationTimeout() {
|
|
146
|
-
if (negotiationTimer !== void 0) clearTimeout(negotiationTimer);
|
|
147
|
-
negotiationTimer = void 0;
|
|
148
|
-
}
|
|
149
|
-
function closeCurrent(notify) {
|
|
150
|
-
const closing = connection;
|
|
151
|
-
const closingViewerId = viewerId;
|
|
152
|
-
connection = void 0;
|
|
153
|
-
cancelPointerState();
|
|
154
|
-
cancelForwardedKeys();
|
|
155
|
-
channel.current = null;
|
|
156
|
-
geometry.current = null;
|
|
157
|
-
if (!disposed) setStreamed(null);
|
|
158
|
-
showTrack(null);
|
|
159
|
-
pendingCandidates = [];
|
|
160
|
-
signaling = Promise.resolve();
|
|
161
|
-
clearNegotiationTimeout();
|
|
162
|
-
closing?.close();
|
|
163
|
-
if (notify && closingViewerId) sendSignal(closingViewerId, { kind: "close" }).catch(() => void 0);
|
|
164
|
-
}
|
|
165
|
-
function scheduleReconnect(error) {
|
|
166
|
-
if (disposed) return;
|
|
167
|
-
clearNegotiationTimeout();
|
|
168
|
-
setPhase("reconnecting");
|
|
169
|
-
if (error !== void 0) setFailure(error instanceof Error ? error.message : "Live view connection failed.");
|
|
170
|
-
retryTimer ??= setTimeout(() => {
|
|
171
|
-
retryTimer = void 0;
|
|
172
|
-
restart();
|
|
173
|
-
}, RECONNECT_DELAY_MS);
|
|
174
|
-
}
|
|
175
|
-
const unsubscribe = subscribe((signal) => {
|
|
176
|
-
if (signal.viewerId !== viewerId) return;
|
|
177
|
-
const payload = signal.payload;
|
|
178
|
-
const signalViewerId = signal.viewerId;
|
|
179
|
-
signaling = signaling.then(async () => {
|
|
180
|
-
const peer = connection;
|
|
181
|
-
if (!peer || signalViewerId !== viewerId) return;
|
|
182
|
-
if (payload.kind === "answer") {
|
|
183
|
-
await peer.setRemoteDescription({
|
|
184
|
-
type: "answer",
|
|
185
|
-
sdp: payload.sdp
|
|
186
|
-
});
|
|
187
|
-
if (peer !== connection || signalViewerId !== viewerId) return;
|
|
188
|
-
for (const candidate of pendingCandidates.splice(0)) await peer.addIceCandidate(candidate);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
if (payload.kind === "candidate") {
|
|
192
|
-
if (!peer.remoteDescription) {
|
|
193
|
-
pendingCandidates.push(payload.candidate);
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
await peer.addIceCandidate(payload.candidate);
|
|
197
|
-
}
|
|
198
|
-
}).catch((error) => {
|
|
199
|
-
if (signalViewerId === viewerId) scheduleReconnect(error);
|
|
245
|
+
let t22;
|
|
246
|
+
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
|
|
247
|
+
t22 = /* @__PURE__ */ new Map();
|
|
248
|
+
$[27] = t22;
|
|
249
|
+
} else t22 = $[27];
|
|
250
|
+
const forwardedKeys = useRef(t22);
|
|
251
|
+
let t23;
|
|
252
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
253
|
+
t23 = function cancelPointerState() {
|
|
254
|
+
const activeTouch = touch.current;
|
|
255
|
+
const activeMouse = mousePress.current;
|
|
256
|
+
if (activeTouch) clearTimeout(activeTouch.holdTimer);
|
|
257
|
+
touch.current = null;
|
|
258
|
+
mousePress.current = null;
|
|
259
|
+
const releases = [];
|
|
260
|
+
if (activeTouch?.mode === "drag") releases.push(release(activeTouch.lastPage, "left", 0, 1, 0));
|
|
261
|
+
if (activeMouse?.pressed) releases.push(release(activeMouse.lastPage, activeMouse.button, 0, activeMouse.clickCount, activeMouse.modifiers));
|
|
262
|
+
sendInput(releases);
|
|
263
|
+
};
|
|
264
|
+
$[28] = t23;
|
|
265
|
+
} else t23 = $[28];
|
|
266
|
+
const cancelPointerState = t23;
|
|
267
|
+
let t24;
|
|
268
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
269
|
+
t24 = function cancelForwardedKeys() {
|
|
270
|
+
const releases_0 = [];
|
|
271
|
+
for (const { key, code, keyCode } of forwardedKeys.current.values()) releases_0.push({
|
|
272
|
+
kind: "key",
|
|
273
|
+
type: "keyUp",
|
|
274
|
+
key,
|
|
275
|
+
code,
|
|
276
|
+
windowsVirtualKeyCode: keyCode,
|
|
277
|
+
modifiers: 0
|
|
200
278
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
279
|
+
forwardedKeys.current.clear();
|
|
280
|
+
sendInput(releases_0);
|
|
281
|
+
};
|
|
282
|
+
$[29] = t24;
|
|
283
|
+
} else t24 = $[29];
|
|
284
|
+
const cancelForwardedKeys = t24;
|
|
285
|
+
let t25;
|
|
286
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
287
|
+
t25 = () => cancelForwardedKeys();
|
|
288
|
+
$[30] = t25;
|
|
289
|
+
} else t25 = $[30];
|
|
290
|
+
const releaseKeysOnWindowBlur = useEffectEvent(t25);
|
|
291
|
+
let t26;
|
|
292
|
+
if ($[31] !== releaseKeysOnWindowBlur) {
|
|
293
|
+
t26 = () => {
|
|
294
|
+
window.addEventListener("blur", releaseKeysOnWindowBlur);
|
|
295
|
+
return () => window.removeEventListener("blur", releaseKeysOnWindowBlur);
|
|
296
|
+
};
|
|
297
|
+
$[31] = releaseKeysOnWindowBlur;
|
|
298
|
+
$[32] = t26;
|
|
299
|
+
} else t26 = $[32];
|
|
300
|
+
let t27;
|
|
301
|
+
if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
302
|
+
t27 = [];
|
|
303
|
+
$[33] = t27;
|
|
304
|
+
} else t27 = $[33];
|
|
305
|
+
useEffect(t26, t27);
|
|
306
|
+
let t28;
|
|
307
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
308
|
+
t28 = (element_2) => {
|
|
309
|
+
if (input.current !== element_2) {
|
|
310
|
+
cancelPointerState();
|
|
311
|
+
cancelForwardedKeys();
|
|
208
312
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
313
|
+
input.current = element_2;
|
|
314
|
+
setInputElement(element_2);
|
|
315
|
+
syncInputBounds();
|
|
316
|
+
};
|
|
317
|
+
$[34] = t28;
|
|
318
|
+
} else t28 = $[34];
|
|
319
|
+
const attachInput = t28;
|
|
320
|
+
let t29;
|
|
321
|
+
if ($[35] !== handleWheel || $[36] !== inputElement) {
|
|
322
|
+
t29 = () => {
|
|
323
|
+
if (!inputElement) return;
|
|
324
|
+
inputElement.addEventListener("wheel", handleWheel, { passive: false });
|
|
325
|
+
return () => inputElement.removeEventListener("wheel", handleWheel);
|
|
326
|
+
};
|
|
327
|
+
$[35] = handleWheel;
|
|
328
|
+
$[36] = inputElement;
|
|
329
|
+
$[37] = t29;
|
|
330
|
+
} else t29 = $[37];
|
|
331
|
+
let t30;
|
|
332
|
+
if ($[38] !== inputElement) {
|
|
333
|
+
t30 = [inputElement];
|
|
334
|
+
$[38] = inputElement;
|
|
335
|
+
$[39] = t30;
|
|
336
|
+
} else t30 = $[39];
|
|
337
|
+
useEffect(t29, t30);
|
|
338
|
+
const live = captureTabId !== void 0 && link?.tabId === captureTabId ? link : null;
|
|
339
|
+
const phase = captureTabId === void 0 ? "idle" : live?.phase ?? "connecting";
|
|
340
|
+
const streamed = live?.streamed ?? null;
|
|
341
|
+
let t31;
|
|
342
|
+
if ($[40] !== captureTabId || $[41] !== dataChannelLabel || $[42] !== loadIceServers || $[43] !== parseStatus || $[44] !== sendSignal || $[45] !== subscribe) {
|
|
343
|
+
t31 = () => {
|
|
344
|
+
if (captureTabId === void 0) return;
|
|
345
|
+
const tabId = captureTabId;
|
|
346
|
+
const report = (patch) => setLink((current) => ({
|
|
347
|
+
tabId,
|
|
348
|
+
phase: "connecting",
|
|
349
|
+
streamed: null,
|
|
350
|
+
...current?.tabId === tabId ? current : void 0,
|
|
351
|
+
...patch
|
|
352
|
+
}));
|
|
353
|
+
let disposed = false;
|
|
354
|
+
let connection;
|
|
355
|
+
let viewerId_0 = "";
|
|
356
|
+
let attempt = 0;
|
|
357
|
+
let pendingCandidates = [];
|
|
358
|
+
let retryTimer;
|
|
359
|
+
let negotiationTimer;
|
|
360
|
+
let signaling = Promise.resolve();
|
|
361
|
+
const clearRetry = function clearRetry() {
|
|
362
|
+
if (retryTimer !== void 0) clearTimeout(retryTimer);
|
|
363
|
+
retryTimer = void 0;
|
|
226
364
|
};
|
|
227
|
-
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
candidate: event.candidate.toJSON()
|
|
231
|
-
}).catch((error) => {
|
|
232
|
-
if (peer === connection && currentViewerId === viewerId) scheduleReconnect(error);
|
|
233
|
-
});
|
|
365
|
+
const clearNegotiationTimeout = function clearNegotiationTimeout() {
|
|
366
|
+
if (negotiationTimer !== void 0) clearTimeout(negotiationTimer);
|
|
367
|
+
negotiationTimer = void 0;
|
|
234
368
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (
|
|
369
|
+
const closeCurrent = function closeCurrent(notify) {
|
|
370
|
+
const closing = connection;
|
|
371
|
+
const closingViewerId = viewerId_0;
|
|
372
|
+
connection = void 0;
|
|
373
|
+
cancelPointerState();
|
|
374
|
+
cancelForwardedKeys();
|
|
375
|
+
channel.current = null;
|
|
376
|
+
geometry.current = null;
|
|
377
|
+
if (!disposed) report({ streamed: null });
|
|
378
|
+
showTrack(null);
|
|
379
|
+
pendingCandidates = [];
|
|
380
|
+
signaling = Promise.resolve();
|
|
381
|
+
clearNegotiationTimeout();
|
|
382
|
+
closing?.close();
|
|
383
|
+
if (notify && closingViewerId) sendSignal(closingViewerId, { kind: "close" }).catch(_temp);
|
|
244
384
|
};
|
|
245
|
-
const
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
385
|
+
const scheduleReconnect = function scheduleReconnect(error) {
|
|
386
|
+
if (disposed) return;
|
|
387
|
+
clearNegotiationTimeout();
|
|
388
|
+
report({ phase: "reconnecting" });
|
|
389
|
+
if (error !== void 0) setFailure(error instanceof Error ? error.message : "Live view connection failed.");
|
|
390
|
+
if (retryTimer !== void 0) return;
|
|
391
|
+
retryTimer = setTimeout(() => {
|
|
392
|
+
retryTimer = void 0;
|
|
393
|
+
restart();
|
|
394
|
+
}, RECONNECT_DELAY_MS);
|
|
254
395
|
};
|
|
255
|
-
|
|
256
|
-
if (
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
396
|
+
const unsubscribe = subscribe((signal) => {
|
|
397
|
+
if (signal.viewerId !== viewerId_0) return;
|
|
398
|
+
const payload_0 = signal.payload;
|
|
399
|
+
const signalViewerId = signal.viewerId;
|
|
400
|
+
signaling = signaling.then(async () => {
|
|
401
|
+
const peer = connection;
|
|
402
|
+
if (!peer || signalViewerId !== viewerId_0) return;
|
|
403
|
+
if (payload_0.kind === "answer") {
|
|
404
|
+
await peer.setRemoteDescription({
|
|
405
|
+
type: "answer",
|
|
406
|
+
sdp: payload_0.sdp
|
|
407
|
+
});
|
|
408
|
+
if (peer !== connection || signalViewerId !== viewerId_0) return;
|
|
409
|
+
for (const candidate of pendingCandidates.splice(0)) await peer.addIceCandidate(candidate);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
if (payload_0.kind === "candidate") {
|
|
413
|
+
if (!peer.remoteDescription) {
|
|
414
|
+
pendingCandidates.push(payload_0.candidate);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
await peer.addIceCandidate(payload_0.candidate);
|
|
418
|
+
}
|
|
419
|
+
}).catch((error_0) => {
|
|
420
|
+
if (signalViewerId === viewerId_0) scheduleReconnect(error_0);
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
const connect = async function connect() {
|
|
424
|
+
attempt = attempt + 1;
|
|
425
|
+
const currentAttempt = attempt;
|
|
426
|
+
try {
|
|
427
|
+
await connectAs(currentAttempt);
|
|
428
|
+
} catch (t32) {
|
|
429
|
+
const error_1 = t32;
|
|
430
|
+
if (currentAttempt === attempt) scheduleReconnect(error_1);
|
|
268
431
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
432
|
+
};
|
|
433
|
+
async function connectAs(currentAttempt_0) {
|
|
434
|
+
const currentViewerId = crypto.randomUUID();
|
|
435
|
+
viewerId_0 = currentViewerId;
|
|
436
|
+
setFailure(null);
|
|
437
|
+
clearNegotiationTimeout();
|
|
438
|
+
negotiationTimer = setTimeout(() => {
|
|
439
|
+
if (currentAttempt_0 === attempt) scheduleReconnect(/* @__PURE__ */ new Error("The employee machine did not answer the live view."));
|
|
440
|
+
}, BROWSER_LIVE_SCREEN_NEGOTIATION_TIMEOUT_MS);
|
|
441
|
+
const iceServers = await loadIceServers();
|
|
442
|
+
if (disposed || currentAttempt_0 !== attempt) return;
|
|
443
|
+
const peer_0 = new RTCPeerConnection({ iceServers });
|
|
444
|
+
connection = peer_0;
|
|
445
|
+
pendingCandidates = [];
|
|
446
|
+
peer_0.ontrack = (event_1) => {
|
|
447
|
+
if (peer_0 !== connection) return;
|
|
448
|
+
showTrack(event_1.streams[0] ?? new MediaStream([event_1.track]));
|
|
449
|
+
};
|
|
450
|
+
peer_0.onicecandidate = (event_2) => {
|
|
451
|
+
if (event_2.candidate && peer_0 === connection) sendSignal(currentViewerId, {
|
|
452
|
+
kind: "candidate",
|
|
453
|
+
candidate: event_2.candidate.toJSON()
|
|
454
|
+
}).catch((error_2) => {
|
|
455
|
+
if (peer_0 === connection && currentViewerId === viewerId_0) scheduleReconnect(error_2);
|
|
456
|
+
});
|
|
457
|
+
};
|
|
458
|
+
peer_0.onconnectionstatechange = () => {
|
|
459
|
+
if (peer_0 !== connection) return;
|
|
460
|
+
if (peer_0.connectionState === "connected") {
|
|
461
|
+
clearRetry();
|
|
462
|
+
clearNegotiationTimeout();
|
|
463
|
+
setFailure(null);
|
|
464
|
+
const restored = geometry.current ? "streaming" : "idle";
|
|
465
|
+
setLink((current_0) => current_0?.tabId === tabId && current_0.phase === "reconnecting" ? {
|
|
466
|
+
...current_0,
|
|
467
|
+
phase: restored
|
|
468
|
+
} : current_0);
|
|
469
|
+
}
|
|
470
|
+
if (peer_0.connectionState === "failed" || peer_0.connectionState === "disconnected") scheduleReconnect();
|
|
471
|
+
};
|
|
472
|
+
const dataChannel = peer_0.createDataChannel(dataChannelLabel);
|
|
473
|
+
channel.current = dataChannel;
|
|
474
|
+
dataChannel.onopen = () => {
|
|
475
|
+
if (disposed || peer_0 !== connection || channel.current !== dataChannel) return;
|
|
476
|
+
dataChannel.send(currentProtocol.current.serializeInput({
|
|
477
|
+
tabId,
|
|
478
|
+
streamGeneration: 0,
|
|
479
|
+
events: []
|
|
480
|
+
}));
|
|
481
|
+
};
|
|
482
|
+
dataChannel.onmessage = (event_3) => {
|
|
483
|
+
if (disposed || peer_0 !== connection || channel.current !== dataChannel) return;
|
|
484
|
+
const status_1 = parseStatus(event_3.data);
|
|
485
|
+
if (!status_1) return;
|
|
486
|
+
if (status_1.kind === "idle") {
|
|
273
487
|
cancelPointerState();
|
|
274
488
|
cancelForwardedKeys();
|
|
489
|
+
geometry.current = null;
|
|
490
|
+
syncInputBounds();
|
|
491
|
+
setFailure(null);
|
|
492
|
+
report({
|
|
493
|
+
phase: "idle",
|
|
494
|
+
streamed: null
|
|
495
|
+
});
|
|
496
|
+
return;
|
|
275
497
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
498
|
+
if (status_1.kind === "streaming") {
|
|
499
|
+
if (status_1.tabId !== tabId) return;
|
|
500
|
+
const previous = geometry.current;
|
|
501
|
+
if (previous?.tabId !== status_1.tabId || previous.streamGeneration !== status_1.streamGeneration) {
|
|
502
|
+
cancelPointerState();
|
|
503
|
+
cancelForwardedKeys();
|
|
504
|
+
}
|
|
505
|
+
geometry.current = status_1;
|
|
506
|
+
syncInputBounds();
|
|
507
|
+
setFailure(null);
|
|
508
|
+
report({
|
|
509
|
+
phase: "streaming",
|
|
510
|
+
streamed: status_1
|
|
511
|
+
});
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
setFailure(status_1.message);
|
|
515
|
+
};
|
|
516
|
+
peer_0.addTransceiver("video", { direction: "recvonly" });
|
|
517
|
+
const offer = await peer_0.createOffer();
|
|
518
|
+
await peer_0.setLocalDescription(offer);
|
|
519
|
+
if (disposed || peer_0 !== connection) return;
|
|
520
|
+
await sendSignal(currentViewerId, {
|
|
521
|
+
kind: "offer",
|
|
522
|
+
sdp: offer.sdp ?? "",
|
|
523
|
+
tabId
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
function restart() {
|
|
527
|
+
clearRetry();
|
|
528
|
+
closeCurrent(true);
|
|
529
|
+
if (disposed) return;
|
|
530
|
+
connect();
|
|
531
|
+
}
|
|
299
532
|
connect();
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
533
|
+
return () => {
|
|
534
|
+
disposed = true;
|
|
535
|
+
attempt = attempt + 1;
|
|
536
|
+
clearRetry();
|
|
537
|
+
unsubscribe();
|
|
538
|
+
closeCurrent(true);
|
|
539
|
+
setLink(null);
|
|
540
|
+
};
|
|
308
541
|
};
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
renderedHeight,
|
|
356
|
-
zoom: renderedWidth / status.metadata.deviceWidth
|
|
542
|
+
$[40] = captureTabId;
|
|
543
|
+
$[41] = dataChannelLabel;
|
|
544
|
+
$[42] = loadIceServers;
|
|
545
|
+
$[43] = parseStatus;
|
|
546
|
+
$[44] = sendSignal;
|
|
547
|
+
$[45] = subscribe;
|
|
548
|
+
$[46] = t31;
|
|
549
|
+
} else t31 = $[46];
|
|
550
|
+
let t32;
|
|
551
|
+
if ($[47] !== captureTabId || $[48] !== dataChannelLabel) {
|
|
552
|
+
t32 = [
|
|
553
|
+
dataChannelLabel,
|
|
554
|
+
captureTabId,
|
|
555
|
+
showTrack
|
|
556
|
+
];
|
|
557
|
+
$[47] = captureTabId;
|
|
558
|
+
$[48] = dataChannelLabel;
|
|
559
|
+
$[49] = t32;
|
|
560
|
+
} else t32 = $[49];
|
|
561
|
+
useEffect(t31, t32);
|
|
562
|
+
let t33;
|
|
563
|
+
if ($[50] === Symbol.for("react.memo_cache_sentinel")) {
|
|
564
|
+
t33 = function beginTouch(event_4) {
|
|
565
|
+
if (touch.current) return;
|
|
566
|
+
const view_1 = currentViewGeometry();
|
|
567
|
+
const startPage = view_1 ? pointWithin(view_1, event_4) : null;
|
|
568
|
+
if (!view_1 || !startPage) return;
|
|
569
|
+
const client = {
|
|
570
|
+
x: event_4.clientX,
|
|
571
|
+
y: event_4.clientY
|
|
572
|
+
};
|
|
573
|
+
const gesture = {
|
|
574
|
+
pointerId: event_4.pointerId,
|
|
575
|
+
mode: "pending",
|
|
576
|
+
view: view_1,
|
|
577
|
+
startClient: client,
|
|
578
|
+
startPage,
|
|
579
|
+
lastClient: client,
|
|
580
|
+
lastPage: startPage,
|
|
581
|
+
holdTimer: setTimeout(() => {
|
|
582
|
+
gesture.mode = "drag";
|
|
583
|
+
sendInput([move(startPage, 0, 0), press(startPage, "left", 1, 1, 0)]);
|
|
584
|
+
}, TOUCH_HOLD_MS)
|
|
585
|
+
};
|
|
586
|
+
touch.current = gesture;
|
|
587
|
+
event_4.currentTarget.setPointerCapture(event_4.pointerId);
|
|
357
588
|
};
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
589
|
+
$[50] = t33;
|
|
590
|
+
} else t33 = $[50];
|
|
591
|
+
const beginTouch = t33;
|
|
592
|
+
let t34;
|
|
593
|
+
if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
|
|
594
|
+
t34 = function moveTouch(event_5) {
|
|
595
|
+
const gesture_0 = touch.current;
|
|
596
|
+
if (!gesture_0 || event_5.pointerId !== gesture_0.pointerId) return;
|
|
597
|
+
const client_0 = {
|
|
598
|
+
x: event_5.clientX,
|
|
599
|
+
y: event_5.clientY
|
|
600
|
+
};
|
|
601
|
+
if (gesture_0.mode === "pending") {
|
|
602
|
+
if (Math.hypot(client_0.x - gesture_0.startClient.x, client_0.y - gesture_0.startClient.y) <= TOUCH_TAP_SLOP_PX) return;
|
|
603
|
+
clearTimeout(gesture_0.holdTimer);
|
|
604
|
+
gesture_0.mode = "scroll";
|
|
605
|
+
}
|
|
606
|
+
if (gesture_0.mode === "scroll") {
|
|
607
|
+
const deltaX = (gesture_0.lastClient.x - client_0.x) / gesture_0.view.zoom;
|
|
608
|
+
const deltaY = (gesture_0.lastClient.y - client_0.y) / gesture_0.view.zoom;
|
|
609
|
+
gesture_0.lastClient = client_0;
|
|
610
|
+
if (deltaX !== 0 || deltaY !== 0) sendInput([{
|
|
611
|
+
kind: "mouse",
|
|
612
|
+
type: "mouseWheel",
|
|
613
|
+
...gesture_0.startPage,
|
|
614
|
+
deltaX,
|
|
615
|
+
deltaY
|
|
616
|
+
}]);
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
const point_0 = pointWithin(gesture_0.view, event_5);
|
|
620
|
+
if (!point_0) return;
|
|
621
|
+
gesture_0.lastPage = point_0;
|
|
622
|
+
sendInput([move(point_0, 1, 0)]);
|
|
391
623
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
624
|
+
$[51] = t34;
|
|
625
|
+
} else t34 = $[51];
|
|
626
|
+
const moveTouch = t34;
|
|
627
|
+
let t35;
|
|
628
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
629
|
+
t35 = function endTouch(event_6, cancelled) {
|
|
630
|
+
const gesture_1 = touch.current;
|
|
631
|
+
if (!gesture_1 || event_6.pointerId !== gesture_1.pointerId) return;
|
|
632
|
+
touch.current = null;
|
|
633
|
+
clearTimeout(gesture_1.holdTimer);
|
|
634
|
+
if (event_6.currentTarget.hasPointerCapture(event_6.pointerId)) event_6.currentTarget.releasePointerCapture(event_6.pointerId);
|
|
635
|
+
if (gesture_1.mode === "pending") {
|
|
636
|
+
if (cancelled) return;
|
|
637
|
+
sendInput([
|
|
638
|
+
move(gesture_1.startPage, 0, 0),
|
|
639
|
+
press(gesture_1.startPage, "left", 1, 1, 0),
|
|
640
|
+
release(gesture_1.startPage, "left", 0, 1, 0)
|
|
641
|
+
]);
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
if (gesture_1.mode === "drag") sendInput([release(gesture_1.lastPage, "left", 0, 1, 0)]);
|
|
404
645
|
};
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
646
|
+
$[52] = t35;
|
|
647
|
+
} else t35 = $[52];
|
|
648
|
+
const endTouch = t35;
|
|
649
|
+
let t36;
|
|
650
|
+
if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
|
|
651
|
+
t36 = function endMouse(event_7) {
|
|
652
|
+
const gesture_2 = mousePress.current;
|
|
653
|
+
if (!gesture_2 || event_7.pointerId !== gesture_2.pointerId) return;
|
|
654
|
+
const point_1 = toPagePoint(event_7) ?? gesture_2.lastPage;
|
|
655
|
+
mousePress.current = null;
|
|
656
|
+
if (!gesture_2.pressed) return;
|
|
657
|
+
sendInput([release(point_1, gesture_2.button, event_7.buttons, gesture_2.clickCount, modifiers(event_7))]);
|
|
414
658
|
};
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
gesture.mode = "scroll";
|
|
419
|
-
}
|
|
420
|
-
if (gesture.mode === "scroll") {
|
|
421
|
-
const deltaX = (gesture.lastClient.x - client.x) / gesture.view.zoom;
|
|
422
|
-
const deltaY = (gesture.lastClient.y - client.y) / gesture.view.zoom;
|
|
423
|
-
gesture.lastClient = client;
|
|
424
|
-
if (deltaX !== 0 || deltaY !== 0) sendInput([{
|
|
425
|
-
kind: "mouse",
|
|
426
|
-
type: "mouseWheel",
|
|
427
|
-
...gesture.startPage,
|
|
428
|
-
deltaX,
|
|
429
|
-
deltaY
|
|
430
|
-
}]);
|
|
431
|
-
return;
|
|
432
|
-
}
|
|
433
|
-
const point = pointWithin(gesture.view, event);
|
|
434
|
-
if (!point) return;
|
|
435
|
-
gesture.lastPage = point;
|
|
436
|
-
sendInput([move(point, 1, 0)]);
|
|
437
|
-
}
|
|
438
|
-
function endTouch(event, cancelled) {
|
|
439
|
-
const gesture = touch.current;
|
|
440
|
-
if (!gesture || event.pointerId !== gesture.pointerId) return;
|
|
441
|
-
touch.current = null;
|
|
442
|
-
clearTimeout(gesture.holdTimer);
|
|
443
|
-
if (event.currentTarget.hasPointerCapture(event.pointerId)) event.currentTarget.releasePointerCapture(event.pointerId);
|
|
444
|
-
if (gesture.mode === "pending") {
|
|
445
|
-
if (cancelled) return;
|
|
446
|
-
sendInput([
|
|
447
|
-
move(gesture.startPage, 0, 0),
|
|
448
|
-
press(gesture.startPage, "left", 1, 1, 0),
|
|
449
|
-
release(gesture.startPage, "left", 0, 1, 0)
|
|
450
|
-
]);
|
|
451
|
-
return;
|
|
452
|
-
}
|
|
453
|
-
if (gesture.mode === "drag") sendInput([release(gesture.lastPage, "left", 0, 1, 0)]);
|
|
454
|
-
}
|
|
455
|
-
function endMouse(event) {
|
|
456
|
-
const gesture = mousePress.current;
|
|
457
|
-
if (!gesture || event.pointerId !== gesture.pointerId) return;
|
|
458
|
-
const point = toPagePoint(event) ?? gesture.lastPage;
|
|
459
|
-
mousePress.current = null;
|
|
460
|
-
if (!gesture.pressed) return;
|
|
461
|
-
sendInput([release(point, gesture.button, event.buttons, gesture.clickCount, modifiers(event))]);
|
|
462
|
-
}
|
|
659
|
+
$[53] = t36;
|
|
660
|
+
} else t36 = $[53];
|
|
661
|
+
const endMouse = t36;
|
|
463
662
|
const notice = failure ?? (phase === "streaming" ? void 0 : PHASE_TEXT[phase]);
|
|
464
|
-
|
|
663
|
+
let t37;
|
|
664
|
+
if ($[54] !== streamed || $[55] !== tabs) {
|
|
665
|
+
t37 = streamed ? tabs.find((tab_0) => tab_0.tabId === streamed.tabId) : void 0;
|
|
666
|
+
$[54] = streamed;
|
|
667
|
+
$[55] = tabs;
|
|
668
|
+
$[56] = t37;
|
|
669
|
+
} else t37 = $[56];
|
|
670
|
+
const streamedTab = t37;
|
|
465
671
|
const displayUrl = streamed?.pageUrl ?? streamedTab?.url ?? "";
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
phase,
|
|
470
|
-
statusLabel: notice,
|
|
471
|
-
renderMedia: (_placement, statusId) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
672
|
+
let t38;
|
|
673
|
+
if ($[57] !== controlLabel || $[58] !== keyboardOpen || $[59] !== notice) {
|
|
674
|
+
t38 = (_placement, statusId) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
472
675
|
/* @__PURE__ */ jsx("video", {
|
|
473
676
|
ref: attachVideo,
|
|
474
677
|
autoPlay: true,
|
|
@@ -485,12 +688,12 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
|
|
|
485
688
|
className: "browser-live-screen__input",
|
|
486
689
|
inputMode: keyboardOpen ? "text" : "none",
|
|
487
690
|
spellCheck: false,
|
|
488
|
-
onBeforeInput: (
|
|
489
|
-
const nativeInput =
|
|
691
|
+
onBeforeInput: (event_8) => {
|
|
692
|
+
const nativeInput = event_8.nativeEvent;
|
|
490
693
|
if (nativeInput.isComposing) return;
|
|
491
694
|
if (nativeInput.inputType === "insertLineBreak" || nativeInput.inputType === "insertParagraph") {
|
|
492
|
-
|
|
493
|
-
|
|
695
|
+
event_8.preventDefault();
|
|
696
|
+
event_8.currentTarget.value = "";
|
|
494
697
|
sendInput([{
|
|
495
698
|
kind: "key",
|
|
496
699
|
type: "keyDown",
|
|
@@ -510,42 +713,43 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
|
|
|
510
713
|
return;
|
|
511
714
|
}
|
|
512
715
|
if (!nativeInput.data) return;
|
|
513
|
-
|
|
514
|
-
|
|
716
|
+
event_8.preventDefault();
|
|
717
|
+
event_8.currentTarget.value = "";
|
|
515
718
|
sendInput([{
|
|
516
719
|
kind: "text",
|
|
517
720
|
text: nativeInput.data
|
|
518
721
|
}]);
|
|
519
722
|
},
|
|
520
|
-
onInput: (
|
|
521
|
-
if ("isComposing" in
|
|
522
|
-
const text =
|
|
523
|
-
|
|
723
|
+
onInput: (event_9) => {
|
|
724
|
+
if ("isComposing" in event_9.nativeEvent && event_9.nativeEvent.isComposing) return;
|
|
725
|
+
const text = event_9.currentTarget.value;
|
|
726
|
+
event_9.currentTarget.value = "";
|
|
524
727
|
if (text) sendInput([{
|
|
525
728
|
kind: "text",
|
|
526
729
|
text
|
|
527
730
|
}]);
|
|
528
731
|
},
|
|
529
|
-
onKeyDown: (
|
|
530
|
-
|
|
531
|
-
if (
|
|
532
|
-
if (
|
|
533
|
-
|
|
732
|
+
onKeyDown: (event_10) => {
|
|
733
|
+
event_10.currentTarget.removeAttribute("data-pointer-focus");
|
|
734
|
+
if (event_10.nativeEvent.isComposing || event_10.nativeEvent.keyCode === 229) return;
|
|
735
|
+
if (event_10.key === "Enter" || event_10.key === "Tab") event_10.preventDefault();
|
|
736
|
+
const key_0 = {
|
|
534
737
|
kind: "key",
|
|
535
738
|
type: "keyDown",
|
|
536
|
-
key:
|
|
537
|
-
code:
|
|
538
|
-
windowsVirtualKeyCode:
|
|
539
|
-
...
|
|
540
|
-
modifiers: modifiers(
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
739
|
+
key: event_10.key,
|
|
740
|
+
code: event_10.code,
|
|
741
|
+
windowsVirtualKeyCode: event_10.keyCode,
|
|
742
|
+
...event_10.key === "Enter" ? { text: "\r" } : {},
|
|
743
|
+
modifiers: modifiers(event_10)
|
|
744
|
+
};
|
|
745
|
+
if (sendInput([key_0])) forwardedKeys.current.set(event_10.code || event_10.key, {
|
|
746
|
+
key: event_10.key,
|
|
747
|
+
code: event_10.code,
|
|
748
|
+
keyCode: event_10.keyCode
|
|
545
749
|
});
|
|
546
750
|
},
|
|
547
|
-
onKeyUp: (
|
|
548
|
-
const physicalKey =
|
|
751
|
+
onKeyUp: (event_11) => {
|
|
752
|
+
const physicalKey = event_11.code || event_11.key;
|
|
549
753
|
const forwardedKey = forwardedKeys.current.get(physicalKey);
|
|
550
754
|
if (!forwardedKey) return;
|
|
551
755
|
forwardedKeys.current.delete(physicalKey);
|
|
@@ -555,93 +759,91 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
|
|
|
555
759
|
key: forwardedKey.key,
|
|
556
760
|
code: forwardedKey.code,
|
|
557
761
|
windowsVirtualKeyCode: forwardedKey.keyCode,
|
|
558
|
-
modifiers: modifiers(
|
|
762
|
+
modifiers: modifiers(event_11)
|
|
559
763
|
}]);
|
|
560
764
|
},
|
|
561
|
-
onPaste: (
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
if (
|
|
765
|
+
onPaste: (event_12) => {
|
|
766
|
+
event_12.preventDefault();
|
|
767
|
+
const text_0 = event_12.clipboardData.getData("text");
|
|
768
|
+
if (text_0) sendInput([{
|
|
565
769
|
kind: "text",
|
|
566
|
-
text
|
|
770
|
+
text: text_0
|
|
567
771
|
}]);
|
|
568
772
|
},
|
|
569
|
-
onContextMenu:
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
onBlur: (event) => {
|
|
573
|
-
event.currentTarget.removeAttribute("data-pointer-focus");
|
|
773
|
+
onContextMenu: _temp2,
|
|
774
|
+
onBlur: (event_14) => {
|
|
775
|
+
event_14.currentTarget.removeAttribute("data-pointer-focus");
|
|
574
776
|
cancelForwardedKeys();
|
|
575
777
|
},
|
|
576
|
-
onMouseDown: (
|
|
577
|
-
const
|
|
578
|
-
if (!
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
sendInput([press(
|
|
778
|
+
onMouseDown: (event_15) => {
|
|
779
|
+
const gesture_3 = mousePress.current;
|
|
780
|
+
if (!gesture_3 || gesture_3.pressed) return;
|
|
781
|
+
gesture_3.button = mouseButton(event_15.button);
|
|
782
|
+
gesture_3.clickCount = event_15.detail > 0 ? event_15.detail : 1;
|
|
783
|
+
gesture_3.modifiers = modifiers(event_15);
|
|
784
|
+
gesture_3.pressed = true;
|
|
785
|
+
sendInput([press(gesture_3.lastPage, gesture_3.button, event_15.buttons, gesture_3.clickCount, gesture_3.modifiers)]);
|
|
584
786
|
},
|
|
585
|
-
onPointerDown: (
|
|
586
|
-
|
|
587
|
-
if (
|
|
588
|
-
beginTouch(
|
|
787
|
+
onPointerDown: (event_16) => {
|
|
788
|
+
event_16.currentTarget.dataset.pointerFocus = "";
|
|
789
|
+
if (event_16.pointerType === "touch") {
|
|
790
|
+
beginTouch(event_16);
|
|
589
791
|
return;
|
|
590
792
|
}
|
|
591
|
-
const
|
|
592
|
-
if (
|
|
593
|
-
const button = mouseButton(
|
|
594
|
-
const clickCount =
|
|
595
|
-
const modifierMask = modifiers(
|
|
596
|
-
const pressed =
|
|
597
|
-
|
|
793
|
+
const point_2 = toPagePoint(event_16);
|
|
794
|
+
if (point_2) {
|
|
795
|
+
const button = mouseButton(event_16.button);
|
|
796
|
+
const clickCount = event_16.detail > 0 ? event_16.detail : 1;
|
|
797
|
+
const modifierMask = modifiers(event_16);
|
|
798
|
+
const pressed = event_16.pointerType !== "mouse";
|
|
799
|
+
event_16.currentTarget.setPointerCapture(event_16.pointerId);
|
|
598
800
|
mousePress.current = {
|
|
599
801
|
button,
|
|
600
802
|
clickCount,
|
|
601
|
-
lastPage:
|
|
803
|
+
lastPage: point_2,
|
|
602
804
|
modifiers: modifierMask,
|
|
603
|
-
pointerId:
|
|
805
|
+
pointerId: event_16.pointerId,
|
|
604
806
|
pressed
|
|
605
807
|
};
|
|
606
|
-
if (pressed) sendInput([press(
|
|
808
|
+
if (pressed) sendInput([press(point_2, button, event_16.buttons, clickCount, modifierMask)]);
|
|
607
809
|
}
|
|
608
810
|
},
|
|
609
|
-
onPointerMove: (
|
|
610
|
-
if (
|
|
611
|
-
moveTouch(
|
|
811
|
+
onPointerMove: (event_17) => {
|
|
812
|
+
if (event_17.pointerType === "touch") {
|
|
813
|
+
moveTouch(event_17);
|
|
612
814
|
return;
|
|
613
815
|
}
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
const
|
|
816
|
+
const point_3 = toPagePoint(event_17);
|
|
817
|
+
if (point_3) {
|
|
818
|
+
const modifierMask_0 = modifiers(event_17);
|
|
617
819
|
if (mousePress.current) {
|
|
618
|
-
mousePress.current.lastPage =
|
|
619
|
-
mousePress.current.modifiers =
|
|
820
|
+
mousePress.current.lastPage = point_3;
|
|
821
|
+
mousePress.current.modifiers = modifierMask_0;
|
|
620
822
|
}
|
|
621
|
-
sendInput([move(
|
|
823
|
+
sendInput([move(point_3, event_17.buttons, modifierMask_0)]);
|
|
622
824
|
}
|
|
623
825
|
},
|
|
624
|
-
onPointerUp: (
|
|
625
|
-
if (
|
|
626
|
-
endTouch(
|
|
826
|
+
onPointerUp: (event_18) => {
|
|
827
|
+
if (event_18.pointerType === "touch") {
|
|
828
|
+
endTouch(event_18, false);
|
|
627
829
|
return;
|
|
628
830
|
}
|
|
629
|
-
endMouse(
|
|
630
|
-
if (
|
|
831
|
+
endMouse(event_18);
|
|
832
|
+
if (event_18.currentTarget.hasPointerCapture(event_18.pointerId)) event_18.currentTarget.releasePointerCapture(event_18.pointerId);
|
|
631
833
|
},
|
|
632
|
-
onPointerCancel: (
|
|
633
|
-
if (
|
|
634
|
-
endTouch(
|
|
834
|
+
onPointerCancel: (event_19) => {
|
|
835
|
+
if (event_19.pointerType === "touch") {
|
|
836
|
+
endTouch(event_19, true);
|
|
635
837
|
return;
|
|
636
838
|
}
|
|
637
|
-
endMouse(
|
|
839
|
+
endMouse(event_19);
|
|
638
840
|
},
|
|
639
|
-
onLostPointerCapture: (
|
|
640
|
-
if (
|
|
641
|
-
endTouch(
|
|
841
|
+
onLostPointerCapture: (event_20) => {
|
|
842
|
+
if (event_20.pointerType === "touch") {
|
|
843
|
+
endTouch(event_20, true);
|
|
642
844
|
return;
|
|
643
845
|
}
|
|
644
|
-
endMouse(
|
|
846
|
+
endMouse(event_20);
|
|
645
847
|
}
|
|
646
848
|
}),
|
|
647
849
|
/* @__PURE__ */ jsx(Button, {
|
|
@@ -653,29 +855,53 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
|
|
|
653
855
|
size: "sm",
|
|
654
856
|
variant: "ghost",
|
|
655
857
|
onClick: () => {
|
|
656
|
-
const
|
|
657
|
-
const
|
|
658
|
-
setKeyboardOpen(
|
|
659
|
-
if (!
|
|
660
|
-
|
|
661
|
-
if (
|
|
662
|
-
else
|
|
858
|
+
const element_3 = input.current;
|
|
859
|
+
const open_1 = !keyboardOpen;
|
|
860
|
+
setKeyboardOpen(open_1);
|
|
861
|
+
if (!element_3) return;
|
|
862
|
+
element_3.inputMode = open_1 ? "text" : "none";
|
|
863
|
+
if (open_1) element_3.focus();
|
|
864
|
+
else element_3.blur();
|
|
663
865
|
},
|
|
664
866
|
children: /* @__PURE__ */ jsx(KeyboardIcon, {})
|
|
665
867
|
})
|
|
666
|
-
] })
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
868
|
+
] });
|
|
869
|
+
$[57] = controlLabel;
|
|
870
|
+
$[58] = keyboardOpen;
|
|
871
|
+
$[59] = notice;
|
|
872
|
+
$[60] = t38;
|
|
873
|
+
} else t38 = $[60];
|
|
874
|
+
let t39;
|
|
875
|
+
if ($[61] !== notice || $[62] !== phase || $[63] !== t38) {
|
|
876
|
+
t39 = /* @__PURE__ */ jsx(BrowserLiveView, {
|
|
877
|
+
expandable: false,
|
|
878
|
+
fill: true,
|
|
879
|
+
phase,
|
|
880
|
+
statusLabel: notice,
|
|
881
|
+
renderMedia: t38
|
|
882
|
+
});
|
|
883
|
+
$[61] = notice;
|
|
884
|
+
$[62] = phase;
|
|
885
|
+
$[63] = t38;
|
|
886
|
+
$[64] = t39;
|
|
887
|
+
} else t39 = $[64];
|
|
888
|
+
const view_2 = t39;
|
|
889
|
+
let t40;
|
|
890
|
+
if ($[65] !== tabs) {
|
|
891
|
+
t40 = tabs.map(_temp3);
|
|
892
|
+
$[65] = tabs;
|
|
893
|
+
$[66] = t40;
|
|
894
|
+
} else t40 = $[66];
|
|
895
|
+
const t41 = captureTabId === void 0 ? null : String(captureTabId);
|
|
896
|
+
let t42;
|
|
897
|
+
if ($[67] !== onTabChange) {
|
|
898
|
+
t42 = (id) => onTabChange(Number(id));
|
|
899
|
+
$[67] = onTabChange;
|
|
900
|
+
$[68] = t42;
|
|
901
|
+
} else t42 = $[68];
|
|
902
|
+
let t43;
|
|
903
|
+
if ($[69] !== streamed) {
|
|
904
|
+
t43 = (next) => {
|
|
679
905
|
if (!streamed) return;
|
|
680
906
|
const url = normalizeOpenUrl(next);
|
|
681
907
|
if (url) sendCommand({
|
|
@@ -683,32 +909,115 @@ function BrowserLiveScreen({ sendSignal: sendHostSignal, subscribeSignals, proto
|
|
|
683
909
|
tabId: streamed.tabId,
|
|
684
910
|
url
|
|
685
911
|
});
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
912
|
+
};
|
|
913
|
+
$[69] = streamed;
|
|
914
|
+
$[70] = t43;
|
|
915
|
+
} else t43 = $[70];
|
|
916
|
+
const t44 = streamed ? "Open a page…" : "Nothing is streaming";
|
|
917
|
+
const t45 = !streamed;
|
|
918
|
+
const t46 = !streamed;
|
|
919
|
+
let t47;
|
|
920
|
+
if ($[71] !== streamed) {
|
|
921
|
+
t47 = () => streamed && sendCommand({
|
|
922
|
+
kind: "navigate",
|
|
923
|
+
tabId: streamed.tabId,
|
|
924
|
+
action: "back"
|
|
925
|
+
});
|
|
926
|
+
$[71] = streamed;
|
|
927
|
+
$[72] = t47;
|
|
928
|
+
} else t47 = $[72];
|
|
929
|
+
let t48;
|
|
930
|
+
if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
|
|
931
|
+
t48 = /* @__PURE__ */ jsx(ArrowLeftIcon, {});
|
|
932
|
+
$[73] = t48;
|
|
933
|
+
} else t48 = $[73];
|
|
934
|
+
let t49;
|
|
935
|
+
if ($[74] !== t46 || $[75] !== t47) {
|
|
936
|
+
t49 = /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
|
|
691
937
|
label: "Back",
|
|
692
|
-
disabled:
|
|
693
|
-
onClick:
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
938
|
+
disabled: t46,
|
|
939
|
+
onClick: t47,
|
|
940
|
+
children: t48
|
|
941
|
+
});
|
|
942
|
+
$[74] = t46;
|
|
943
|
+
$[75] = t47;
|
|
944
|
+
$[76] = t49;
|
|
945
|
+
} else t49 = $[76];
|
|
946
|
+
const t50 = !streamed;
|
|
947
|
+
let t51;
|
|
948
|
+
if ($[77] !== streamed) {
|
|
949
|
+
t51 = () => streamed && sendCommand({
|
|
950
|
+
kind: "navigate",
|
|
951
|
+
tabId: streamed.tabId,
|
|
952
|
+
action: "reload"
|
|
953
|
+
});
|
|
954
|
+
$[77] = streamed;
|
|
955
|
+
$[78] = t51;
|
|
956
|
+
} else t51 = $[78];
|
|
957
|
+
let t52;
|
|
958
|
+
if ($[79] === Symbol.for("react.memo_cache_sentinel")) {
|
|
959
|
+
t52 = /* @__PURE__ */ jsx(RefreshIcon, {});
|
|
960
|
+
$[79] = t52;
|
|
961
|
+
} else t52 = $[79];
|
|
962
|
+
let t53;
|
|
963
|
+
if ($[80] !== t50 || $[81] !== t51) {
|
|
964
|
+
t53 = /* @__PURE__ */ jsx(WebPreviewNavigationButton, {
|
|
700
965
|
label: "Reload",
|
|
701
|
-
disabled:
|
|
702
|
-
onClick:
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
966
|
+
disabled: t50,
|
|
967
|
+
onClick: t51,
|
|
968
|
+
children: t52
|
|
969
|
+
});
|
|
970
|
+
$[80] = t50;
|
|
971
|
+
$[81] = t51;
|
|
972
|
+
$[82] = t53;
|
|
973
|
+
} else t53 = $[82];
|
|
974
|
+
let t54;
|
|
975
|
+
if ($[83] !== t49 || $[84] !== t53) {
|
|
976
|
+
t54 = /* @__PURE__ */ jsxs(Fragment, { children: [t49, t53] });
|
|
977
|
+
$[83] = t49;
|
|
978
|
+
$[84] = t53;
|
|
979
|
+
$[85] = t54;
|
|
980
|
+
} else t54 = $[85];
|
|
981
|
+
let t55;
|
|
982
|
+
if ($[86] !== displayUrl || $[87] !== label || $[88] !== t40 || $[89] !== t41 || $[90] !== t42 || $[91] !== t43 || $[92] !== t44 || $[93] !== t45 || $[94] !== t54 || $[95] !== view_2) {
|
|
983
|
+
t55 = /* @__PURE__ */ jsx(BrowserRunPanel, {
|
|
984
|
+
label,
|
|
985
|
+
tabs: t40,
|
|
986
|
+
selectedTabId: t41,
|
|
987
|
+
onSelectTab: t42,
|
|
988
|
+
url: displayUrl,
|
|
989
|
+
onOpenUrl: t43,
|
|
990
|
+
urlLabel: "Streamed page URL",
|
|
991
|
+
urlPlaceholder: t44,
|
|
992
|
+
urlDisabled: t45,
|
|
993
|
+
navigation: t54,
|
|
994
|
+
children: view_2
|
|
995
|
+
});
|
|
996
|
+
$[86] = displayUrl;
|
|
997
|
+
$[87] = label;
|
|
998
|
+
$[88] = t40;
|
|
999
|
+
$[89] = t41;
|
|
1000
|
+
$[90] = t42;
|
|
1001
|
+
$[91] = t43;
|
|
1002
|
+
$[92] = t44;
|
|
1003
|
+
$[93] = t45;
|
|
1004
|
+
$[94] = t54;
|
|
1005
|
+
$[95] = view_2;
|
|
1006
|
+
$[96] = t55;
|
|
1007
|
+
} else t55 = $[96];
|
|
1008
|
+
return t55;
|
|
1009
|
+
}
|
|
1010
|
+
function _temp3(tab_1) {
|
|
1011
|
+
return {
|
|
1012
|
+
id: String(tab_1.tabId),
|
|
1013
|
+
title: tab_1.title || tab_1.url || `Tab ${String(tab_1.tabId)}`,
|
|
1014
|
+
...tab_1.url === void 0 ? {} : { url: tab_1.url }
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
function _temp2(event_13) {
|
|
1018
|
+
event_13.preventDefault();
|
|
711
1019
|
}
|
|
1020
|
+
function _temp() {}
|
|
712
1021
|
/**
|
|
713
1022
|
* What a thumb types is rarely a URL: absent scheme becomes https, and
|
|
714
1023
|
* anything that still is not an http(s) page is refused here, mirroring the
|