@mcp-use/inspector 20.0.0-beta.5 → 20.0.0-beta.51
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/README.md +31 -78
- package/dist/app/inspector.css.gz +0 -0
- package/dist/app/inspector.js.gz +0 -0
- package/dist/app/providers/anthropic.png +0 -0
- package/dist/app/providers/google.png +0 -0
- package/dist/app/providers/openai.png +0 -0
- package/dist/cli.js +332 -1384
- package/dist/client/index.d.ts +1405 -50
- package/dist/client/index.js +165 -24019
- package/dist/server/index.d.ts +79 -7
- package/dist/server/index.js +370 -22
- package/package.json +77 -35
- package/dist/cdn/AnimatePresence-Dcw-FOy8.js +0 -393
- package/dist/cdn/ChatTab-B255lH5i.js +0 -6744
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/ConnectionSettingsForm-DF-NS58d.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-dI-Cqe79.js +0 -150
- package/dist/cdn/ElicitationTab-CL1KJ0bz.js +0 -654
- package/dist/cdn/FormContext-tmgN_Vdr.js +0 -135
- package/dist/cdn/InspectorContext-UjtEbNod.js +0 -123
- package/dist/cdn/JSONDisplay-BFxf5oEu.js +0 -324
- package/dist/cdn/ListTabHeader-Cv-GmtGF.js +0 -88
- package/dist/cdn/ManufactOAuthCallback-B98kSYCj.js +0 -31
- package/dist/cdn/MarkdownRenderer-Ba7nA4Ie.js +0 -3610
- package/dist/cdn/NotificationsTab-CeImSrhx.js +0 -290
- package/dist/cdn/OAuthCallback-Blc2Asxc.js +0 -58
- package/dist/cdn/PromptsTab-BYKnY7Rp.js +0 -901
- package/dist/cdn/ResourcesTab-BGualKW-.js +0 -564
- package/dist/cdn/SamplingTab-BeZBUeni.js +0 -658
- package/dist/cdn/ServerMetadataTab-CvrKX8fz.js +0 -244
- package/dist/cdn/StatusIcon-D0-ARyOh.js +0 -66
- package/dist/cdn/ToolsTab-j6n4O_3s.js +0 -2033
- package/dist/cdn/ViewPreview-DihyG6Qd.js +0 -238
- package/dist/cdn/WidgetDebugContext-D4usL_MA.js +0 -324
- package/dist/cdn/WidgetWrapper-B4H3Fek7.js +0 -2210
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-CGjAO_0s.js +0 -10
- package/dist/cdn/browser-CbQIH4w2.js +0 -42
- package/dist/cdn/brush-B_mKhyxG.js +0 -17
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-By0FklhG.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-CmUbSx_B.js +0 -12
- package/dist/cdn/code-V_0nf5rg.js +0 -10
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/dialog-BsDpuJd3.js +0 -1028
- package/dist/cdn/dist-DaMB0Su9.js +0 -616
- package/dist/cdn/dist-DbX5yidW.js +0 -2306
- package/dist/cdn/external-link-CjmfT6rW.js +0 -17
- package/dist/cdn/eye-B7H96av8.js +0 -29
- package/dist/cdn/folder-open-B3lu2rG_.js +0 -7
- package/dist/cdn/hash-BVQnWi7q.js +0 -33
- package/dist/cdn/history-Csw4rb44.js +0 -17
- package/dist/cdn/index-browser-DkQOzkvX.js +0 -1934
- package/dist/cdn/info-CNiOwqkf.js +0 -19
- package/dist/cdn/input-C2OBd4PJ.js +0 -12160
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/inspector.css +0 -2
- package/dist/cdn/inspector.js +0 -24523
- package/dist/cdn/jsx-runtime-CIxvMpEo.js +0 -180
- package/dist/cdn/label-B9Jmm9be.js +0 -60
- package/dist/cdn/loader-circle-BLy9A_pp.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-CH5Lq90B.js +0 -21
- package/dist/cdn/maximize-BALCV_ep.js +0 -21
- package/dist/cdn/message-square-BnxdpJxZ.js +0 -7
- package/dist/cdn/not-found-DEtSM_Wd.js +0 -34
- package/dist/cdn/play-vuZ5PLnI.js +0 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/providers/anthropic.png +0 -0
- package/dist/cdn/providers/google.png +0 -0
- package/dist/cdn/providers/openai.png +0 -0
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/react-BajV-X4P.js +0 -5425
- package/dist/cdn/refresh-cw-BXY-Pa0U.js +0 -21
- package/dist/cdn/save-Tgil_AJZ.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-DDdiIPR2.js +0 -2594
- package/dist/cdn/servers-Dm72iTpY.js +0 -26
- package/dist/cdn/shared-DaILIQPP.js +0 -1700
- package/dist/cdn/sheet-Br_l2kry.js +0 -2077
- package/dist/cdn/sparkles-BntO2rDR.js +0 -23
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/cdn/square-check-big-BvwQ17Bl.js +0 -10
- package/dist/cdn/switch-C3IyQuid.js +0 -664
- package/dist/cdn/tabs-subtle-CkdI6Mac.js +0 -787
- package/dist/cdn/telemetry-DabTAQ8x.js +0 -240
- package/dist/cdn/textarea-DSbwcFVt.js +0 -14
- package/dist/cdn/trash-2-RwpJY5SL.js +0 -25
- package/dist/cdn/useAriaLabelledBy-DqAdnppm.js +0 -29
- package/dist/cdn/useCompositeItem-BRqEzYh-.js +0 -26
- package/dist/cdn/useConfig-Btmh8wjJ.js +0 -235
- package/dist/cdn/useSavedRequests-Ci2I919u.js +0 -51
- package/dist/cdn/useViewHostProps-B6SKeeH9.js +0 -349
- package/dist/cdn/wrench-DzGmCfnb.js +0 -7
- package/dist/cdn/x-C3vRQIYu.js +0 -10
- package/dist/cdn/zap-Mb-pbw2X.js +0 -10
- package/dist/client/auth/manufact-auth.d.ts +0 -32
- package/dist/client/auth/manufact-auth.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryHeader.d.ts +0 -4
- package/dist/client/chat-history/ChatHistoryHeader.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryPanel.d.ts +0 -28
- package/dist/client/chat-history/ChatHistoryPanel.d.ts.map +0 -1
- package/dist/client/chat-history/ChatHistoryRail.d.ts +0 -5
- package/dist/client/chat-history/ChatHistoryRail.d.ts.map +0 -1
- package/dist/client/chat-history/ChatList.d.ts +0 -18
- package/dist/client/chat-history/ChatList.d.ts.map +0 -1
- package/dist/client/chat-history/ChatTitleReveal.d.ts +0 -10
- package/dist/client/chat-history/ChatTitleReveal.d.ts.map +0 -1
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts +0 -13
- package/dist/client/chat-history/chat-events-to-inspector-messages.d.ts.map +0 -1
- package/dist/client/chat-history/chat-title.d.ts +0 -10
- package/dist/client/chat-history/chat-title.d.ts.map +0 -1
- package/dist/client/chat-history/providers/local-storage.d.ts +0 -21
- package/dist/client/chat-history/providers/local-storage.d.ts.map +0 -1
- package/dist/client/chat-history/types.d.ts +0 -39
- package/dist/client/chat-history/types.d.ts.map +0 -1
- package/dist/client/chat-history/useChatHistory.d.ts +0 -20
- package/dist/client/chat-history/useChatHistory.d.ts.map +0 -1
- package/dist/client/chat-history/useChatTitleGeneration.d.ts +0 -17
- package/dist/client/chat-history/useChatTitleGeneration.d.ts.map +0 -1
- package/dist/client/components/AddToClientDropdown.d.ts +0 -52
- package/dist/client/components/AddToClientDropdown.d.ts.map +0 -1
- package/dist/client/components/ChatTab.d.ts +0 -98
- package/dist/client/components/ChatTab.d.ts.map +0 -1
- package/dist/client/components/IframeConsole.d.ts +0 -7
- package/dist/client/components/IframeConsole.d.ts.map +0 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts +0 -19
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +0 -1
- package/dist/client/components/PromptsTab.d.ts +0 -34
- package/dist/client/components/PromptsTab.d.ts.map +0 -1
- package/dist/client/components/ResourcesTab.d.ts +0 -31
- package/dist/client/components/ResourcesTab.d.ts.map +0 -1
- package/dist/client/components/ToolsTab.d.ts +0 -39
- package/dist/client/components/ToolsTab.d.ts.map +0 -1
- package/dist/client/components/chat/AssistantMessage.d.ts +0 -10
- package/dist/client/components/chat/AssistantMessage.d.ts.map +0 -1
- package/dist/client/components/chat/ChatHeader.d.ts +0 -70
- package/dist/client/components/chat/ChatHeader.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInput.d.ts +0 -29
- package/dist/client/components/chat/ChatInput.d.ts.map +0 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +0 -65
- package/dist/client/components/chat/ChatInputArea.d.ts.map +0 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +0 -15
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +0 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +0 -10
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollToBottomButton.d.ts.map +0 -1
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +0 -7
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +0 -1
- package/dist/client/components/chat/ChatTraceView.d.ts +0 -7
- package/dist/client/components/chat/ChatTraceView.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts +0 -42
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +0 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +0 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +0 -1
- package/dist/client/components/chat/CopyButton.d.ts +0 -10
- package/dist/client/components/chat/CopyButton.d.ts.map +0 -1
- package/dist/client/components/chat/FloatingChatElicitation.d.ts +0 -10
- package/dist/client/components/chat/FloatingChatElicitation.d.ts.map +0 -1
- package/dist/client/components/chat/McpReconnectBanner.d.ts +0 -10
- package/dist/client/components/chat/McpReconnectBanner.d.ts.map +0 -1
- package/dist/client/components/chat/MessageList.d.ts +0 -47
- package/dist/client/components/chat/MessageList.d.ts.map +0 -1
- package/dist/client/components/chat/MessageMetaActions.d.ts +0 -7
- package/dist/client/components/chat/MessageMetaActions.d.ts.map +0 -1
- package/dist/client/components/chat/PromptResultsList.d.ts +0 -8
- package/dist/client/components/chat/PromptResultsList.d.ts.map +0 -1
- package/dist/client/components/chat/PromptsDropdown.d.ts +0 -11
- package/dist/client/components/chat/PromptsDropdown.d.ts.map +0 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts +0 -7
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +0 -1
- package/dist/client/components/chat/SystemPromptButton.d.ts +0 -11
- package/dist/client/components/chat/SystemPromptButton.d.ts.map +0 -1
- package/dist/client/components/chat/ToolCallDisplay.d.ts +0 -10
- package/dist/client/components/chat/ToolCallDisplay.d.ts.map +0 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts +0 -15
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +0 -1
- package/dist/client/components/chat/ToolSelector.d.ts +0 -13
- package/dist/client/components/chat/ToolSelector.d.ts.map +0 -1
- package/dist/client/components/chat/UserMessage.d.ts +0 -10
- package/dist/client/components/chat/UserMessage.d.ts.map +0 -1
- package/dist/client/components/chat/chat-bar-styles.d.ts +0 -6
- package/dist/client/components/chat/chat-bar-styles.d.ts.map +0 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +0 -11
- package/dist/client/components/chat/chatModeStorage.d.ts.map +0 -1
- package/dist/client/components/chat/conversion.d.ts +0 -19
- package/dist/client/components/chat/conversion.d.ts.map +0 -1
- package/dist/client/components/chat/freeTier.d.ts +0 -32
- package/dist/client/components/chat/freeTier.d.ts.map +0 -1
- package/dist/client/components/chat/managedChatNotice.d.ts +0 -16
- package/dist/client/components/chat/managedChatNotice.d.ts.map +0 -1
- package/dist/client/components/chat/providerMeta.d.ts +0 -27
- package/dist/client/components/chat/providerMeta.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/local-storage.d.ts +0 -5
- package/dist/client/components/chat/system-prompt/local-storage.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/types.d.ts +0 -8
- package/dist/client/components/chat/system-prompt/types.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts +0 -3
- package/dist/client/components/chat/system-prompt/useLocalSystemPrompt.d.ts.map +0 -1
- package/dist/client/components/chat/system-prompt-default.d.ts +0 -2
- package/dist/client/components/chat/system-prompt-default.d.ts.map +0 -1
- package/dist/client/components/chat/trace.d.ts +0 -84
- package/dist/client/components/chat/trace.d.ts.map +0 -1
- package/dist/client/components/chat/types.d.ts +0 -75
- package/dist/client/components/chat/types.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessages.d.ts +0 -76
- package/dist/client/components/chat/useChatMessages.d.ts.map +0 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +0 -43
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +0 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +0 -14
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +0 -1
- package/dist/client/components/chat/useConfig.d.ts +0 -24
- package/dist/client/components/chat/useConfig.d.ts.map +0 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +0 -14
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +0 -1
- package/dist/client/components/chat/useManagedCloudModel.d.ts +0 -14
- package/dist/client/components/chat/useManagedCloudModel.d.ts.map +0 -1
- package/dist/client/components/chat/utils.d.ts +0 -11
- package/dist/client/components/chat/utils.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts +0 -12
- package/dist/client/components/elicitation/shared/ElicitationAskUserPanel.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts +0 -9
- package/dist/client/components/elicitation/shared/elicitationToAskUserQuestions.d.ts.map +0 -1
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts +0 -8
- package/dist/client/components/elicitation/shared/schemaHelpers.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts +0 -13
- package/dist/client/components/prompts/PromptExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptInputForm.d.ts +0 -9
- package/dist/client/components/prompts/PromptInputForm.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptMessageCard.d.ts +0 -29
- package/dist/client/components/prompts/PromptMessageCard.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptResultDisplay.d.ts +0 -34
- package/dist/client/components/prompts/PromptResultDisplay.d.ts.map +0 -1
- package/dist/client/components/prompts/PromptsList.d.ts +0 -10
- package/dist/client/components/prompts/PromptsList.d.ts.map +0 -1
- package/dist/client/components/prompts/SavedPromptsList.d.ts +0 -19
- package/dist/client/components/prompts/SavedPromptsList.d.ts.map +0 -1
- package/dist/client/components/resources/PropsConfigDialog.d.ts +0 -16
- package/dist/client/components/resources/PropsConfigDialog.d.ts.map +0 -1
- package/dist/client/components/resources/ResourceResultDisplay.d.ts +0 -30
- package/dist/client/components/resources/ResourceResultDisplay.d.ts.map +0 -1
- package/dist/client/components/resources/ResourcesList.d.ts +0 -10
- package/dist/client/components/resources/ResourcesList.d.ts.map +0 -1
- package/dist/client/components/shared/CollapsibleJSON.d.ts +0 -6
- package/dist/client/components/shared/CollapsibleJSON.d.ts.map +0 -1
- package/dist/client/components/shared/InspectorScrollArea.d.ts +0 -9
- package/dist/client/components/shared/InspectorScrollArea.d.ts.map +0 -1
- package/dist/client/components/shared/JSONDisplay.d.ts +0 -12
- package/dist/client/components/shared/JSONDisplay.d.ts.map +0 -1
- package/dist/client/components/shared/ListItem.d.ts +0 -24
- package/dist/client/components/shared/ListItem.d.ts.map +0 -1
- package/dist/client/components/shared/ListTabHeader.d.ts +0 -47
- package/dist/client/components/shared/ListTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +0 -15
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +0 -1
- package/dist/client/components/shared/SchemaFormField.d.ts +0 -12
- package/dist/client/components/shared/SchemaFormField.d.ts.map +0 -1
- package/dist/client/components/shared/SearchTabHeader.d.ts +0 -28
- package/dist/client/components/shared/SearchTabHeader.d.ts.map +0 -1
- package/dist/client/components/shared/StatusIcon.d.ts +0 -12
- package/dist/client/components/shared/StatusIcon.d.ts.map +0 -1
- package/dist/client/components/shared/index.d.ts +0 -7
- package/dist/client/components/shared/index.d.ts.map +0 -1
- package/dist/client/components/tools/SaveRequestDialog.d.ts +0 -11
- package/dist/client/components/tools/SaveRequestDialog.d.ts.map +0 -1
- package/dist/client/components/tools/SavedRequestsList.d.ts +0 -19
- package/dist/client/components/tools/SavedRequestsList.d.ts.map +0 -1
- package/dist/client/components/tools/ToolExecutionPanel.d.ts +0 -20
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +0 -1
- package/dist/client/components/tools/ToolInputForm.d.ts +0 -14
- package/dist/client/components/tools/ToolInputForm.d.ts.map +0 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +0 -24
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +0 -1
- package/dist/client/components/tools/ToolsList.d.ts +0 -10
- package/dist/client/components/tools/ToolsList.d.ts.map +0 -1
- package/dist/client/components/tools/schema-utils.d.ts +0 -13
- package/dist/client/components/tools/schema-utils.d.ts.map +0 -1
- package/dist/client/components/tools/useToolExecution.d.ts +0 -26
- package/dist/client/components/tools/useToolExecution.d.ts.map +0 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts +0 -35
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +0 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +0 -13
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +0 -1
- package/dist/client/components/ui/WidgetWrapper.d.ts +0 -12
- package/dist/client/components/ui/WidgetWrapper.d.ts.map +0 -1
- package/dist/client/components/ui/alert-dialog.d.ts +0 -15
- package/dist/client/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/client/components/ui/ask-user-questions.d.ts +0 -80
- package/dist/client/components/ui/ask-user-questions.d.ts.map +0 -1
- package/dist/client/components/ui/badge.d.ts +0 -34
- package/dist/client/components/ui/badge.d.ts.map +0 -1
- package/dist/client/components/ui/blur-fade.d.ts +0 -25
- package/dist/client/components/ui/blur-fade.d.ts.map +0 -1
- package/dist/client/components/ui/button.d.ts +0 -34
- package/dist/client/components/ui/button.d.ts.map +0 -1
- package/dist/client/components/ui/chat-message.d.ts +0 -23
- package/dist/client/components/ui/chat-message.d.ts.map +0 -1
- package/dist/client/components/ui/checkbox.d.ts +0 -4
- package/dist/client/components/ui/checkbox.d.ts.map +0 -1
- package/dist/client/components/ui/client-icons.d.ts +0 -20
- package/dist/client/components/ui/client-icons.d.ts.map +0 -1
- package/dist/client/components/ui/command.d.ts +0 -17
- package/dist/client/components/ui/command.d.ts.map +0 -1
- package/dist/client/components/ui/dialog.d.ts +0 -37
- package/dist/client/components/ui/dialog.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown-menu.d.ts +0 -25
- package/dist/client/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/client/components/ui/dropdown.d.ts +0 -30
- package/dist/client/components/ui/dropdown.d.ts.map +0 -1
- package/dist/client/components/ui/file-thumbnail.d.ts +0 -9
- package/dist/client/components/ui/file-thumbnail.d.ts.map +0 -1
- package/dist/client/components/ui/input.d.ts +0 -4
- package/dist/client/components/ui/input.d.ts.map +0 -1
- package/dist/client/components/ui/kbd.d.ts +0 -3
- package/dist/client/components/ui/kbd.d.ts.map +0 -1
- package/dist/client/components/ui/label.d.ts +0 -4
- package/dist/client/components/ui/label.d.ts.map +0 -1
- package/dist/client/components/ui/menu-item.d.ts +0 -52
- package/dist/client/components/ui/menu-item.d.ts.map +0 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +0 -12
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +0 -1
- package/dist/client/components/ui/not-found.d.ts +0 -9
- package/dist/client/components/ui/not-found.d.ts.map +0 -1
- package/dist/client/components/ui/popover.d.ts +0 -6
- package/dist/client/components/ui/popover.d.ts.map +0 -1
- package/dist/client/components/ui/resizable.d.ts +0 -10
- package/dist/client/components/ui/resizable.d.ts.map +0 -1
- package/dist/client/components/ui/scroll-area.d.ts +0 -4
- package/dist/client/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/client/components/ui/select.d.ts +0 -52
- package/dist/client/components/ui/select.d.ts.map +0 -1
- package/dist/client/components/ui/sheet.d.ts +0 -14
- package/dist/client/components/ui/sheet.d.ts.map +0 -1
- package/dist/client/components/ui/skeleton.d.ts +0 -4
- package/dist/client/components/ui/skeleton.d.ts.map +0 -1
- package/dist/client/components/ui/spinner.d.ts +0 -3
- package/dist/client/components/ui/spinner.d.ts.map +0 -1
- package/dist/client/components/ui/switch.d.ts +0 -22
- package/dist/client/components/ui/switch.d.ts.map +0 -1
- package/dist/client/components/ui/table.d.ts +0 -9
- package/dist/client/components/ui/table.d.ts.map +0 -1
- package/dist/client/components/ui/tabs-subtle.d.ts +0 -25
- package/dist/client/components/ui/tabs-subtle.d.ts.map +0 -1
- package/dist/client/components/ui/text-shimmer.d.ts +0 -11
- package/dist/client/components/ui/text-shimmer.d.ts.map +0 -1
- package/dist/client/components/ui/textarea.d.ts +0 -4
- package/dist/client/components/ui/textarea.d.ts.map +0 -1
- package/dist/client/components/ui/tooltip.d.ts +0 -43
- package/dist/client/components/ui/tooltip.d.ts.map +0 -1
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts +0 -19
- package/dist/client/components/ui-playground/shared/SafeAreaInsetsEditor.d.ts.map +0 -1
- package/dist/client/console-log-bus.d.ts +0 -24
- package/dist/client/console-log-bus.d.ts.map +0 -1
- package/dist/client/constants/debug-options.d.ts +0 -16
- package/dist/client/constants/debug-options.d.ts.map +0 -1
- package/dist/client/context/InspectorContext.d.ts +0 -134
- package/dist/client/context/InspectorContext.d.ts.map +0 -1
- package/dist/client/context/ThemeContext.d.ts +0 -17
- package/dist/client/context/ThemeContext.d.ts.map +0 -1
- package/dist/client/context/WidgetDebugContext.d.ts +0 -121
- package/dist/client/context/WidgetDebugContext.d.ts.map +0 -1
- package/dist/client/hooks/use-merge-split.d.ts +0 -36
- package/dist/client/hooks/use-merge-split.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover-index.d.ts +0 -27
- package/dist/client/hooks/use-proximity-hover-index.d.ts.map +0 -1
- package/dist/client/hooks/use-proximity-hover.d.ts +0 -26
- package/dist/client/hooks/use-proximity-hover.d.ts.map +0 -1
- package/dist/client/hooks/use-touch-primary.d.ts +0 -2
- package/dist/client/hooks/use-touch-primary.d.ts.map +0 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +0 -18
- package/dist/client/hooks/useDeviceViewport.d.ts.map +0 -1
- package/dist/client/hooks/useHostedSession.d.ts +0 -9
- package/dist/client/hooks/useHostedSession.d.ts.map +0 -1
- package/dist/client/hooks/useIframeConsole.d.ts +0 -24
- package/dist/client/hooks/useIframeConsole.d.ts.map +0 -1
- package/dist/client/hooks/useKeyboardShortcuts.d.ts +0 -28
- package/dist/client/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/client/hooks/useMCPPrompts.d.ts +0 -94
- package/dist/client/hooks/useMCPPrompts.d.ts.map +0 -1
- package/dist/client/hooks/useMcpAppsHostContext.d.ts +0 -27
- package/dist/client/hooks/useMcpAppsHostContext.d.ts.map +0 -1
- package/dist/client/hooks/usePropsLLM.d.ts +0 -20
- package/dist/client/hooks/usePropsLLM.d.ts.map +0 -1
- package/dist/client/hooks/useResourceProps.d.ts +0 -14
- package/dist/client/hooks/useResourceProps.d.ts.map +0 -1
- package/dist/client/hooks/useSavedRequests.d.ts +0 -6
- package/dist/client/hooks/useSavedRequests.d.ts.map +0 -1
- package/dist/client/hooks/useViewHostProps.d.ts +0 -19
- package/dist/client/hooks/useViewHostProps.d.ts.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/lib/elevated.d.ts +0 -28
- package/dist/client/lib/elevated.d.ts.map +0 -1
- package/dist/client/lib/font-weight.d.ts +0 -10
- package/dist/client/lib/font-weight.d.ts.map +0 -1
- package/dist/client/lib/icon-context.d.ts +0 -15
- package/dist/client/lib/icon-context.d.ts.map +0 -1
- package/dist/client/lib/shape-context.d.ts +0 -21
- package/dist/client/lib/shape-context.d.ts.map +0 -1
- package/dist/client/lib/springs.d.ts +0 -32
- package/dist/client/lib/springs.d.ts.map +0 -1
- package/dist/client/lib/surface-classes.d.ts +0 -2
- package/dist/client/lib/surface-classes.d.ts.map +0 -1
- package/dist/client/lib/surface-context.d.ts +0 -7
- package/dist/client/lib/surface-context.d.ts.map +0 -1
- package/dist/client/lib/utils.d.ts +0 -3
- package/dist/client/lib/utils.d.ts.map +0 -1
- package/dist/client/mcp-apps/csp.d.ts +0 -26
- package/dist/client/mcp-apps/csp.d.ts.map +0 -1
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts +0 -17
- package/dist/client/mcp-apps/debug/csp-suggestions.d.ts.map +0 -1
- package/dist/client/mcp-apps/logging-transport.d.ts +0 -13
- package/dist/client/mcp-apps/logging-transport.d.ts.map +0 -1
- package/dist/client/rpc-traffic-coalesce.d.ts +0 -7
- package/dist/client/rpc-traffic-coalesce.d.ts.map +0 -1
- package/dist/client/rpc-traffic-store.d.ts +0 -37
- package/dist/client/rpc-traffic-store.d.ts.map +0 -1
- package/dist/client/telemetry/capture.d.ts +0 -7
- package/dist/client/telemetry/capture.d.ts.map +0 -1
- package/dist/client/telemetry/events.d.ts +0 -168
- package/dist/client/telemetry/events.d.ts.map +0 -1
- package/dist/client/telemetry/index.d.ts +0 -5
- package/dist/client/telemetry/index.d.ts.map +0 -1
- package/dist/client/telemetry/init.d.ts +0 -2
- package/dist/client/telemetry/init.d.ts.map +0 -1
- package/dist/client/telemetry/utils.d.ts +0 -7
- package/dist/client/telemetry/utils.d.ts.map +0 -1
- package/dist/client/types/message-content-block.d.ts +0 -19
- package/dist/client/types/message-content-block.d.ts.map +0 -1
- package/dist/client/types/pending-requests.d.ts +0 -17
- package/dist/client/types/pending-requests.d.ts.map +0 -1
- package/dist/client/utils/basePath.d.ts +0 -34
- package/dist/client/utils/basePath.d.ts.map +0 -1
- package/dist/client/utils/browser.d.ts +0 -5
- package/dist/client/utils/browser.d.ts.map +0 -1
- package/dist/client/utils/format.d.ts +0 -4
- package/dist/client/utils/format.d.ts.map +0 -1
- package/dist/client/utils/highlightJson.d.ts +0 -11
- package/dist/client/utils/highlightJson.d.ts.map +0 -1
- package/dist/client/utils/jsonUtils.d.ts +0 -24
- package/dist/client/utils/jsonUtils.d.ts.map +0 -1
- package/dist/client/utils/mcpClientUtils.d.ts +0 -131
- package/dist/client/utils/mcpClientUtils.d.ts.map +0 -1
- package/dist/client/utils/servers.d.ts +0 -14
- package/dist/client/utils/servers.d.ts.map +0 -1
- package/dist/server/asset-urls.d.ts +0 -18
- package/dist/server/asset-urls.d.ts.map +0 -1
- package/dist/server/asset-urls.js +0 -17
- package/dist/server/cdn-shell.d.ts +0 -18
- package/dist/server/cdn-shell.d.ts.map +0 -1
- package/dist/server/cdn-shell.js +0 -12
- package/dist/server/chunk-DSTNUYWX.js +0 -148
- package/dist/server/chunk-H6ZCIKBS.js +0 -63
- package/dist/server/chunk-IKTZUWSX.js +0 -0
- package/dist/server/chunk-J4FNYLBF.js +0 -54
- package/dist/server/chunk-K2F2AJOI.js +0 -619
- package/dist/server/chunk-KD7K27XK.js +0 -77
- package/dist/server/chunk-M5TZA42I.js +0 -54
- package/dist/server/chunk-OWR2BIBW.js +0 -40
- package/dist/server/chunk-PKBMQBKP.js +0 -7
- package/dist/server/chunk-SQ4XNMLT.js +0 -72
- package/dist/server/chunk-UJLXHNQP.js +0 -43
- package/dist/server/chunk-WFT4JHYI.js +0 -24
- package/dist/server/chunk-XCNS5CIW.js +0 -199
- package/dist/server/chunk-ZCGLU5T7.js +0 -156
- package/dist/server/cli.d.ts +0 -3
- package/dist/server/cli.d.ts.map +0 -1
- package/dist/server/cli.js +0 -141
- package/dist/server/create-dev-api-app.d.ts +0 -4
- package/dist/server/create-dev-api-app.d.ts.map +0 -1
- package/dist/server/create-dev-api-app.js +0 -11
- package/dist/server/dev-callback-redirect.d.ts +0 -3
- package/dist/server/dev-callback-redirect.d.ts.map +0 -1
- package/dist/server/dev-callback-redirect.js +0 -18
- package/dist/server/favicon-links.d.ts +0 -12
- package/dist/server/favicon-links.d.ts.map +0 -1
- package/dist/server/favicon-links.js +0 -11
- package/dist/server/favicon-static.d.ts +0 -4
- package/dist/server/favicon-static.d.ts.map +0 -1
- package/dist/server/favicon-static.js +0 -8
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/middleware.d.ts +0 -40
- package/dist/server/middleware.d.ts.map +0 -1
- package/dist/server/middleware.js +0 -17
- package/dist/server/proxy/index.d.ts +0 -3
- package/dist/server/proxy/index.d.ts.map +0 -1
- package/dist/server/proxy/index.js +0 -12
- package/dist/server/proxy/mcp-proxy.d.ts +0 -101
- package/dist/server/proxy/mcp-proxy.d.ts.map +0 -1
- package/dist/server/proxy/mcp-proxy.js +0 -10
- package/dist/server/proxy/oauth-proxy.d.ts +0 -26
- package/dist/server/proxy/oauth-proxy.d.ts.map +0 -1
- package/dist/server/proxy/oauth-proxy.js +0 -9
- package/dist/server/proxy-routes.d.ts +0 -16
- package/dist/server/proxy-routes.d.ts.map +0 -1
- package/dist/server/proxy-routes.js +0 -10
- package/dist/server/rpc-log-bus.d.ts +0 -17
- package/dist/server/rpc-log-bus.d.ts.map +0 -1
- package/dist/server/rpc-log-bus.js +0 -77
- package/dist/server/server.d.ts +0 -15
- package/dist/server/server.d.ts.map +0 -1
- package/dist/server/server.js +0 -66
- package/dist/server/static-assets.d.ts +0 -5
- package/dist/server/static-assets.d.ts.map +0 -1
- package/dist/server/static-assets.js +0 -9
- package/dist/server/utils.d.ts +0 -33
- package/dist/server/utils.d.ts.map +0 -1
- package/dist/server/utils.js +0 -17
- package/dist/server/version.d.ts +0 -7
- package/dist/server/version.d.ts.map +0 -1
- package/dist/server/version.js +0 -9
- package/dist/server/vite-dev-api-plugin.d.ts +0 -4
- package/dist/server/vite-dev-api-plugin.d.ts.map +0 -1
- package/dist/server/vite-dev-api-plugin.js +0 -30
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-BCobuZDc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-BjGkLwVu.js +0 -1
- package/dist/web/assets/ElicitationTab-D3ZUKHND.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/ManufactOAuthCallback-CS3ydSZg.js +0 -1
- package/dist/web/assets/MarkdownRenderer-BeeBfQhv.js +0 -47
- package/dist/web/assets/NotificationsTab-Uj0_DrmK.js +0 -1
- package/dist/web/assets/OAuthCallback-C0ljgCiw.js +0 -1
- package/dist/web/assets/PromptsTab-Bns2u0G-.js +0 -15
- package/dist/web/assets/ResourcesTab-CO24312V.js +0 -2
- package/dist/web/assets/SamplingTab-7gtN7FwU.js +0 -1
- package/dist/web/assets/ServerMetadataTab-CQwqYSjL.js +0 -1
- package/dist/web/assets/ToolsTab-bDdRxI1b.js +0 -8
- package/dist/web/assets/ViewPreview-Ba1Ec5uA.js +0 -1
- package/dist/web/assets/WidgetWrapper-CYHfzrtb.js +0 -34
- package/dist/web/assets/brush--0LobUi4.js +0 -1
- package/dist/web/assets/checkbox-CzBkaNKa.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/dist-C5JjLJN9.js +0 -21
- package/dist/web/assets/index-TQ5V7cM9.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/label-Cdim77Jw.js +0 -1
- package/dist/web/assets/maximize-2-BTT9QQU9.js +0 -1
- package/dist/web/assets/maximize-_O55kFcr.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-C9wQl8_d.js +0 -1
- package/dist/web/assets/save-B-MsgxX9.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-BF0rJNdE.js +0 -1
- package/dist/web/assets/sparkles-2OAsc1aP.js +0 -1
- package/dist/web/assets/tabs-subtle-6D79T1xd.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useConfig-BAgALiZg.js +0 -1
- package/dist/web/assets/useViewHostProps-BYitt_6K.js +0 -1
- package/dist/web/assets/zap-Du2Uc5pa.js +0 -1
- package/dist/web/favicon-96x96.png +0 -0
- package/dist/web/favicon-black.svg +0 -5
- package/dist/web/favicon-white.svg +0 -5
- package/dist/web/favicon.ico +0 -0
- package/dist/web/favicon.svg +0 -5
- package/dist/web/index.html +0 -89
- package/dist/web/providers/anthropic.png +0 -0
- package/dist/web/providers/google.png +0 -0
- package/dist/web/providers/openai.png +0 -0
- package/dist/web/site.webmanifest +0 -21
- package/dist/web/web-app-manifest-192x192.png +0 -0
- package/dist/web/web-app-manifest-512x512.png +0 -0
- /package/dist/{cdn → app}/apple-touch-icon.png +0 -0
- /package/dist/{cdn → app}/favicon-96x96.png +0 -0
- /package/dist/{cdn → app}/favicon-black.svg +0 -0
- /package/dist/{cdn → app}/favicon-white.svg +0 -0
- /package/dist/{cdn → app}/favicon.ico +0 -0
- /package/dist/{cdn → app}/favicon.svg +0 -0
- /package/dist/{cdn → app}/site.webmanifest +0 -0
- /package/dist/{cdn → app}/web-app-manifest-192x192.png +0 -0
- /package/dist/{cdn → app}/web-app-manifest-512x512.png +0 -0
|
@@ -1,1700 +0,0 @@
|
|
|
1
|
-
import { i as e, s as t, t as n } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { G as r, Pr as i, Rr as a, a as o, d as s, l as c, n as l, r as u, sr as d, t as f, u as p } from "./input-C2OBd4PJ.js";
|
|
3
|
-
import { t as m } from "./jsx-runtime-CIxvMpEo.js";
|
|
4
|
-
import { t as h } from "./createLucideIcon-C5fZZ6oB.js";
|
|
5
|
-
import "./StatusIcon-D0-ARyOh.js";
|
|
6
|
-
import { t as g } from "./refresh-cw-BXY-Pa0U.js";
|
|
7
|
-
import { r as _ } from "./ListTabHeader-Cv-GmtGF.js";
|
|
8
|
-
var v = h("grip-vertical", [
|
|
9
|
-
["circle", {
|
|
10
|
-
cx: "9",
|
|
11
|
-
cy: "12",
|
|
12
|
-
r: "1",
|
|
13
|
-
key: "1vctgf"
|
|
14
|
-
}],
|
|
15
|
-
["circle", {
|
|
16
|
-
cx: "9",
|
|
17
|
-
cy: "5",
|
|
18
|
-
r: "1",
|
|
19
|
-
key: "hp0tcf"
|
|
20
|
-
}],
|
|
21
|
-
["circle", {
|
|
22
|
-
cx: "9",
|
|
23
|
-
cy: "19",
|
|
24
|
-
r: "1",
|
|
25
|
-
key: "fkjjf6"
|
|
26
|
-
}],
|
|
27
|
-
["circle", {
|
|
28
|
-
cx: "15",
|
|
29
|
-
cy: "12",
|
|
30
|
-
r: "1",
|
|
31
|
-
key: "1tmaij"
|
|
32
|
-
}],
|
|
33
|
-
["circle", {
|
|
34
|
-
cx: "15",
|
|
35
|
-
cy: "5",
|
|
36
|
-
r: "1",
|
|
37
|
-
key: "19l28e"
|
|
38
|
-
}],
|
|
39
|
-
["circle", {
|
|
40
|
-
cx: "15",
|
|
41
|
-
cy: "19",
|
|
42
|
-
r: "1",
|
|
43
|
-
key: "f4zoj3"
|
|
44
|
-
}]
|
|
45
|
-
]), y = /* @__PURE__ */ e({
|
|
46
|
-
Group: () => Qe,
|
|
47
|
-
Panel: () => ot,
|
|
48
|
-
Separator: () => dt,
|
|
49
|
-
isCoarsePointer: () => ae,
|
|
50
|
-
useDefaultLayout: () => et,
|
|
51
|
-
useGroupCallbackRef: () => nt,
|
|
52
|
-
useGroupRef: () => rt,
|
|
53
|
-
usePanelCallbackRef: () => ct,
|
|
54
|
-
usePanelRef: () => lt
|
|
55
|
-
}), b = m(), x = /* @__PURE__ */ t(n(), 1);
|
|
56
|
-
function S(e, t) {
|
|
57
|
-
let n = getComputedStyle(e);
|
|
58
|
-
return t * parseFloat(n.fontSize);
|
|
59
|
-
}
|
|
60
|
-
function C(e, t) {
|
|
61
|
-
let n = getComputedStyle(e.ownerDocument.body);
|
|
62
|
-
return t * parseFloat(n.fontSize);
|
|
63
|
-
}
|
|
64
|
-
function w(e) {
|
|
65
|
-
return e / 100 * window.innerHeight;
|
|
66
|
-
}
|
|
67
|
-
function T(e) {
|
|
68
|
-
return e / 100 * window.innerWidth;
|
|
69
|
-
}
|
|
70
|
-
function E(e) {
|
|
71
|
-
switch (typeof e) {
|
|
72
|
-
case "number": return [e, "px"];
|
|
73
|
-
case "string": {
|
|
74
|
-
let t = parseFloat(e);
|
|
75
|
-
return e.endsWith("%") ? [t, "%"] : e.endsWith("px") ? [t, "px"] : e.endsWith("rem") ? [t, "rem"] : e.endsWith("em") ? [t, "em"] : e.endsWith("vh") ? [t, "vh"] : e.endsWith("vw") ? [t, "vw"] : [t, "%"];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function D({ groupSize: e, panelElement: t, styleProp: n }) {
|
|
80
|
-
let r, [i, a] = E(n);
|
|
81
|
-
switch (a) {
|
|
82
|
-
case "%":
|
|
83
|
-
r = i / 100 * e;
|
|
84
|
-
break;
|
|
85
|
-
case "px":
|
|
86
|
-
r = i;
|
|
87
|
-
break;
|
|
88
|
-
case "rem":
|
|
89
|
-
r = C(t, i);
|
|
90
|
-
break;
|
|
91
|
-
case "em":
|
|
92
|
-
r = S(t, i);
|
|
93
|
-
break;
|
|
94
|
-
case "vh":
|
|
95
|
-
r = w(i);
|
|
96
|
-
break;
|
|
97
|
-
case "vw":
|
|
98
|
-
r = T(i);
|
|
99
|
-
break;
|
|
100
|
-
}
|
|
101
|
-
return r;
|
|
102
|
-
}
|
|
103
|
-
function O(e) {
|
|
104
|
-
return parseFloat(e.toFixed(3));
|
|
105
|
-
}
|
|
106
|
-
function k({ group: e }) {
|
|
107
|
-
let { orientation: t, panels: n } = e;
|
|
108
|
-
return n.reduce((e, n) => (e += t === "horizontal" ? n.element.offsetWidth : n.element.offsetHeight, e), 0);
|
|
109
|
-
}
|
|
110
|
-
function A(e) {
|
|
111
|
-
let { panels: t } = e, n = k({ group: e });
|
|
112
|
-
return n === 0 ? t.map((e) => ({
|
|
113
|
-
collapsedSize: 0,
|
|
114
|
-
collapsible: e.panelConstraints.collapsible === !0,
|
|
115
|
-
defaultSize: void 0,
|
|
116
|
-
disabled: e.panelConstraints.disabled,
|
|
117
|
-
minSize: 0,
|
|
118
|
-
maxSize: 100,
|
|
119
|
-
panelId: e.id
|
|
120
|
-
})) : t.map((e) => {
|
|
121
|
-
let { element: t, panelConstraints: r } = e, i = 0;
|
|
122
|
-
r.collapsedSize !== void 0 && (i = O(D({
|
|
123
|
-
groupSize: n,
|
|
124
|
-
panelElement: t,
|
|
125
|
-
styleProp: r.collapsedSize
|
|
126
|
-
}) / n * 100));
|
|
127
|
-
let a;
|
|
128
|
-
r.defaultSize !== void 0 && (a = O(D({
|
|
129
|
-
groupSize: n,
|
|
130
|
-
panelElement: t,
|
|
131
|
-
styleProp: r.defaultSize
|
|
132
|
-
}) / n * 100));
|
|
133
|
-
let o = 0;
|
|
134
|
-
r.minSize !== void 0 && (o = O(D({
|
|
135
|
-
groupSize: n,
|
|
136
|
-
panelElement: t,
|
|
137
|
-
styleProp: r.minSize
|
|
138
|
-
}) / n * 100));
|
|
139
|
-
let s = 100;
|
|
140
|
-
return r.maxSize !== void 0 && (s = O(D({
|
|
141
|
-
groupSize: n,
|
|
142
|
-
panelElement: t,
|
|
143
|
-
styleProp: r.maxSize
|
|
144
|
-
}) / n * 100)), {
|
|
145
|
-
collapsedSize: i,
|
|
146
|
-
collapsible: r.collapsible === !0,
|
|
147
|
-
defaultSize: a,
|
|
148
|
-
disabled: r.disabled,
|
|
149
|
-
minSize: o,
|
|
150
|
-
maxSize: s,
|
|
151
|
-
panelId: e.id
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function j(e, t = "Assertion error") {
|
|
156
|
-
if (!e) throw Error(t);
|
|
157
|
-
}
|
|
158
|
-
function M(e, t) {
|
|
159
|
-
return Array.from(t).sort(e === "horizontal" ? ee : te);
|
|
160
|
-
}
|
|
161
|
-
function ee(e, t) {
|
|
162
|
-
let n = e.element.offsetLeft - t.element.offsetLeft;
|
|
163
|
-
return n === 0 ? e.element.offsetWidth - t.element.offsetWidth : n;
|
|
164
|
-
}
|
|
165
|
-
function te(e, t) {
|
|
166
|
-
let n = e.element.offsetTop - t.element.offsetTop;
|
|
167
|
-
return n === 0 ? e.element.offsetHeight - t.element.offsetHeight : n;
|
|
168
|
-
}
|
|
169
|
-
function ne(e) {
|
|
170
|
-
return typeof e == "object" && !!e && "nodeType" in e && e.nodeType === Node.ELEMENT_NODE;
|
|
171
|
-
}
|
|
172
|
-
function re(e, t) {
|
|
173
|
-
return {
|
|
174
|
-
x: e.x >= t.left && e.x <= t.right ? 0 : Math.min(Math.abs(e.x - t.left), Math.abs(e.x - t.right)),
|
|
175
|
-
y: e.y >= t.top && e.y <= t.bottom ? 0 : Math.min(Math.abs(e.y - t.top), Math.abs(e.y - t.bottom))
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
function ie({ orientation: e, rects: t, targetRect: n }) {
|
|
179
|
-
let r = {
|
|
180
|
-
x: n.x + n.width / 2,
|
|
181
|
-
y: n.y + n.height / 2
|
|
182
|
-
}, i, a = Number.MAX_VALUE;
|
|
183
|
-
for (let n of t) {
|
|
184
|
-
let { x: t, y: o } = re(r, n), s = e === "horizontal" ? t : o;
|
|
185
|
-
s < a && (a = s, i = n);
|
|
186
|
-
}
|
|
187
|
-
return j(i, "No rect found"), i;
|
|
188
|
-
}
|
|
189
|
-
var N;
|
|
190
|
-
function ae() {
|
|
191
|
-
return N === void 0 && (N = typeof matchMedia == "function" ? !!matchMedia("(pointer:coarse)").matches : !1), N;
|
|
192
|
-
}
|
|
193
|
-
function oe(e) {
|
|
194
|
-
let { element: t, orientation: n, panels: r, separators: i } = e, a = M(n, Array.from(t.children).filter(ne).map((e) => ({ element: e }))).map(({ element: e }) => e), o = [], s = !1, c = !1, l = -1, u = -1, d = 0, f, p = [];
|
|
195
|
-
{
|
|
196
|
-
let e = -1;
|
|
197
|
-
for (let t of a) t.hasAttribute("data-panel") && (e++, t.ariaDisabled === null && (d++, l === -1 && (l = e), u = e));
|
|
198
|
-
}
|
|
199
|
-
if (d > 1) {
|
|
200
|
-
let t = -1;
|
|
201
|
-
for (let d of a) if (d.hasAttribute("data-panel")) {
|
|
202
|
-
t++;
|
|
203
|
-
let i = r.find((e) => e.element === d);
|
|
204
|
-
if (i) {
|
|
205
|
-
if (f) {
|
|
206
|
-
let r = f.element.getBoundingClientRect(), a = d.getBoundingClientRect(), m;
|
|
207
|
-
if (c) {
|
|
208
|
-
let e = n === "horizontal" ? new DOMRect(r.right, r.top, 0, r.height) : new DOMRect(r.left, r.bottom, r.width, 0), t = n === "horizontal" ? new DOMRect(a.left, a.top, 0, a.height) : new DOMRect(a.left, a.top, a.width, 0);
|
|
209
|
-
switch (p.length) {
|
|
210
|
-
case 0:
|
|
211
|
-
m = [e, t];
|
|
212
|
-
break;
|
|
213
|
-
case 1: {
|
|
214
|
-
let i = p[0];
|
|
215
|
-
m = [i, ie({
|
|
216
|
-
orientation: n,
|
|
217
|
-
rects: [r, a],
|
|
218
|
-
targetRect: i.element.getBoundingClientRect()
|
|
219
|
-
}) === r ? t : e];
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
default:
|
|
223
|
-
m = p;
|
|
224
|
-
break;
|
|
225
|
-
}
|
|
226
|
-
} else m = p.length ? p : [n === "horizontal" ? new DOMRect(r.right, a.top, a.left - r.right, a.height) : new DOMRect(a.left, r.bottom, a.width, a.top - r.bottom)];
|
|
227
|
-
for (let n of m) {
|
|
228
|
-
let r = "width" in n ? n : n.element.getBoundingClientRect(), a = ae() ? e.resizeTargetMinimumSize.coarse : e.resizeTargetMinimumSize.fine;
|
|
229
|
-
if (r.width < a) {
|
|
230
|
-
let e = a - r.width;
|
|
231
|
-
r = new DOMRect(r.x - e / 2, r.y, r.width + e, r.height);
|
|
232
|
-
}
|
|
233
|
-
if (r.height < a) {
|
|
234
|
-
let e = a - r.height;
|
|
235
|
-
r = new DOMRect(r.x, r.y - e / 2, r.width, r.height + e);
|
|
236
|
-
}
|
|
237
|
-
!s && !(t <= l || t > u) && o.push({
|
|
238
|
-
group: e,
|
|
239
|
-
groupSize: k({ group: e }),
|
|
240
|
-
panels: [f, i],
|
|
241
|
-
separator: "width" in n ? void 0 : n,
|
|
242
|
-
rect: r
|
|
243
|
-
}), s = !1;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
c = !1, f = i, p = [];
|
|
247
|
-
}
|
|
248
|
-
} else if (d.hasAttribute("data-separator")) {
|
|
249
|
-
d.ariaDisabled !== null && (s = !0);
|
|
250
|
-
let e = i.find((e) => e.element === d);
|
|
251
|
-
e ? p.push(e) : (f = void 0, p = []);
|
|
252
|
-
} else c = !0;
|
|
253
|
-
}
|
|
254
|
-
return o;
|
|
255
|
-
}
|
|
256
|
-
var se = class {
|
|
257
|
-
#e = {};
|
|
258
|
-
addListener(e, t) {
|
|
259
|
-
let n = this.#e[e];
|
|
260
|
-
return n === void 0 ? this.#e[e] = [t] : n.includes(t) || n.push(t), () => {
|
|
261
|
-
this.removeListener(e, t);
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
emit(e, t) {
|
|
265
|
-
let n = this.#e[e];
|
|
266
|
-
if (n !== void 0) if (n.length === 1) n[0].call(null, t);
|
|
267
|
-
else {
|
|
268
|
-
let e = !1, r = null, i = Array.from(n);
|
|
269
|
-
for (let n = 0; n < i.length; n++) {
|
|
270
|
-
let a = i[n];
|
|
271
|
-
try {
|
|
272
|
-
a.call(null, t);
|
|
273
|
-
} catch (t) {
|
|
274
|
-
r === null && (e = !0, r = t);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
if (e) throw r;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
removeAllListeners() {
|
|
281
|
-
this.#e = {};
|
|
282
|
-
}
|
|
283
|
-
removeListener(e, t) {
|
|
284
|
-
let n = this.#e[e];
|
|
285
|
-
if (n !== void 0) {
|
|
286
|
-
let e = n.indexOf(t);
|
|
287
|
-
e >= 0 && n.splice(e, 1);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
function P(e, t, n = 0) {
|
|
292
|
-
return Math.abs(O(e) - O(t)) <= n;
|
|
293
|
-
}
|
|
294
|
-
var F = {
|
|
295
|
-
cursorFlags: 0,
|
|
296
|
-
interactionState: { state: "inactive" },
|
|
297
|
-
mountedGroups: /* @__PURE__ */ new Map()
|
|
298
|
-
}, I = new se();
|
|
299
|
-
function L() {
|
|
300
|
-
return F;
|
|
301
|
-
}
|
|
302
|
-
function R(e) {
|
|
303
|
-
let t = typeof e == "function" ? e(F) : e;
|
|
304
|
-
if (F === t) return F;
|
|
305
|
-
let n = F;
|
|
306
|
-
return F = {
|
|
307
|
-
...F,
|
|
308
|
-
...t
|
|
309
|
-
}, t.cursorFlags !== void 0 && I.emit("cursorFlagsChange", F.cursorFlags), t.interactionState !== void 0 && I.emit("interactionStateChange", F.interactionState), t.mountedGroups !== void 0 && (F.mountedGroups.forEach((e, t) => {
|
|
310
|
-
e.derivedPanelConstraints.forEach((r) => {
|
|
311
|
-
if (r.collapsible) {
|
|
312
|
-
let { layout: i } = n.mountedGroups.get(t) ?? {};
|
|
313
|
-
if (i) {
|
|
314
|
-
let n = P(r.collapsedSize, e.layout[r.panelId]), a = P(r.collapsedSize, i[r.panelId]);
|
|
315
|
-
n && !a && (t.inMemoryLastExpandedPanelSizes[r.panelId] = i[r.panelId]);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
});
|
|
319
|
-
}), I.emit("mountedGroupsChange", F.mountedGroups)), F;
|
|
320
|
-
}
|
|
321
|
-
function ce(e, t, n) {
|
|
322
|
-
let r, i = {
|
|
323
|
-
x: Infinity,
|
|
324
|
-
y: Infinity
|
|
325
|
-
};
|
|
326
|
-
for (let a of t) {
|
|
327
|
-
let t = re(n, a.rect);
|
|
328
|
-
switch (e) {
|
|
329
|
-
case "horizontal":
|
|
330
|
-
t.x <= i.x && (r = a, i = t);
|
|
331
|
-
break;
|
|
332
|
-
case "vertical":
|
|
333
|
-
t.y <= i.y && (r = a, i = t);
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return r ? {
|
|
338
|
-
distance: i,
|
|
339
|
-
hitRegion: r
|
|
340
|
-
} : void 0;
|
|
341
|
-
}
|
|
342
|
-
function le(e) {
|
|
343
|
-
return typeof e == "object" && !!e && "nodeType" in e && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
344
|
-
}
|
|
345
|
-
function ue(e, t) {
|
|
346
|
-
if (e === t) throw Error("Cannot compare node with itself");
|
|
347
|
-
let n = {
|
|
348
|
-
a: ge(e),
|
|
349
|
-
b: ge(t)
|
|
350
|
-
}, r;
|
|
351
|
-
for (; n.a.at(-1) === n.b.at(-1);) r = n.a.pop(), n.b.pop();
|
|
352
|
-
j(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
353
|
-
let i = {
|
|
354
|
-
a: he(me(n.a)),
|
|
355
|
-
b: he(me(n.b))
|
|
356
|
-
};
|
|
357
|
-
if (i.a === i.b) {
|
|
358
|
-
let e = r.childNodes, t = {
|
|
359
|
-
a: n.a.at(-1),
|
|
360
|
-
b: n.b.at(-1)
|
|
361
|
-
}, i = e.length;
|
|
362
|
-
for (; i--;) {
|
|
363
|
-
let n = e[i];
|
|
364
|
-
if (n === t.a) return 1;
|
|
365
|
-
if (n === t.b) return -1;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
return Math.sign(i.a - i.b);
|
|
369
|
-
}
|
|
370
|
-
var de = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
|
|
371
|
-
function fe(e) {
|
|
372
|
-
let t = getComputedStyle(_e(e) ?? e).display;
|
|
373
|
-
return t === "flex" || t === "inline-flex";
|
|
374
|
-
}
|
|
375
|
-
function pe(e) {
|
|
376
|
-
let t = getComputedStyle(e);
|
|
377
|
-
return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || fe(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || de.test(t.willChange) || t.webkitOverflowScrolling === "touch");
|
|
378
|
-
}
|
|
379
|
-
function me(e) {
|
|
380
|
-
let t = e.length;
|
|
381
|
-
for (; t--;) {
|
|
382
|
-
let n = e[t];
|
|
383
|
-
if (j(n, "Missing node"), pe(n)) return n;
|
|
384
|
-
}
|
|
385
|
-
return null;
|
|
386
|
-
}
|
|
387
|
-
function he(e) {
|
|
388
|
-
return e && Number(getComputedStyle(e).zIndex) || 0;
|
|
389
|
-
}
|
|
390
|
-
function ge(e) {
|
|
391
|
-
let t = [];
|
|
392
|
-
for (; e;) t.push(e), e = _e(e);
|
|
393
|
-
return t;
|
|
394
|
-
}
|
|
395
|
-
function _e(e) {
|
|
396
|
-
let { parentNode: t } = e;
|
|
397
|
-
return le(t) ? t.host : t;
|
|
398
|
-
}
|
|
399
|
-
function ve(e, t) {
|
|
400
|
-
return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
|
|
401
|
-
}
|
|
402
|
-
function ye({ groupElement: e, hitRegion: t, pointerEventTarget: n }) {
|
|
403
|
-
if (!ne(n) || n.contains(e) || e.contains(n)) return !0;
|
|
404
|
-
if (ue(n, e) > 0) {
|
|
405
|
-
let r = n;
|
|
406
|
-
for (; r;) {
|
|
407
|
-
if (r.contains(e)) return !0;
|
|
408
|
-
if (ve(r.getBoundingClientRect(), t)) return !1;
|
|
409
|
-
r = r.parentElement;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return !0;
|
|
413
|
-
}
|
|
414
|
-
function z(e, t) {
|
|
415
|
-
let n = [];
|
|
416
|
-
return t.forEach((t, r) => {
|
|
417
|
-
if (r.disabled) return;
|
|
418
|
-
let i = oe(r), a = ce(r.orientation, i, {
|
|
419
|
-
x: e.clientX,
|
|
420
|
-
y: e.clientY
|
|
421
|
-
});
|
|
422
|
-
a && a.distance.x <= 0 && a.distance.y <= 0 && ye({
|
|
423
|
-
groupElement: r.element,
|
|
424
|
-
hitRegion: a.hitRegion.rect,
|
|
425
|
-
pointerEventTarget: e.target
|
|
426
|
-
}) && n.push(a.hitRegion);
|
|
427
|
-
}), n;
|
|
428
|
-
}
|
|
429
|
-
function be(e, t) {
|
|
430
|
-
if (e.length !== t.length) return !1;
|
|
431
|
-
for (let n = 0; n < e.length; n++) if (e[n] != t[n]) return !1;
|
|
432
|
-
return !0;
|
|
433
|
-
}
|
|
434
|
-
function B(e, t) {
|
|
435
|
-
return P(e, t) ? 0 : e > t ? 1 : -1;
|
|
436
|
-
}
|
|
437
|
-
function V({ overrideDisabledPanels: e, panelConstraints: t, prevSize: n, size: r }) {
|
|
438
|
-
let { collapsedSize: i = 0, collapsible: a, disabled: o, maxSize: s = 100, minSize: c = 0 } = t;
|
|
439
|
-
if (o && !e) return n;
|
|
440
|
-
if (B(r, c) < 0) if (a) {
|
|
441
|
-
let e = (i + c) / 2;
|
|
442
|
-
r = B(r, e) < 0 ? i : c;
|
|
443
|
-
} else r = c;
|
|
444
|
-
return r = Math.min(s, r), r = O(r), r;
|
|
445
|
-
}
|
|
446
|
-
function H({ delta: e, initialLayout: t, panelConstraints: n, pivotIndices: r, prevLayout: i, trigger: a }) {
|
|
447
|
-
if (P(e, 0)) return t;
|
|
448
|
-
let o = a === "imperative-api", s = Object.values(t), c = Object.values(i), l = [...s], [u, d] = r;
|
|
449
|
-
j(u != null, "Invalid first pivot index"), j(d != null, "Invalid second pivot index");
|
|
450
|
-
let f = 0;
|
|
451
|
-
switch (a) {
|
|
452
|
-
case "keyboard":
|
|
453
|
-
{
|
|
454
|
-
let t = e < 0 ? d : u, r = n[t];
|
|
455
|
-
j(r, `Panel constraints not found for index ${t}`);
|
|
456
|
-
let { collapsedSize: i = 0, collapsible: a, minSize: o = 0 } = r;
|
|
457
|
-
if (a) {
|
|
458
|
-
let n = s[t];
|
|
459
|
-
if (j(n != null, `Previous layout not found for panel index ${t}`), P(n, i)) {
|
|
460
|
-
let t = o - n;
|
|
461
|
-
B(t, Math.abs(e)) > 0 && (e = e < 0 ? 0 - t : t);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
{
|
|
466
|
-
let t = e < 0 ? u : d, r = n[t];
|
|
467
|
-
j(r, `No panel constraints found for index ${t}`);
|
|
468
|
-
let { collapsedSize: i = 0, collapsible: a, minSize: o = 0 } = r;
|
|
469
|
-
if (a) {
|
|
470
|
-
let n = s[t];
|
|
471
|
-
if (j(n != null, `Previous layout not found for panel index ${t}`), P(n, o)) {
|
|
472
|
-
let t = n - i;
|
|
473
|
-
B(t, Math.abs(e)) > 0 && (e = e < 0 ? 0 - t : t);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
break;
|
|
478
|
-
default: {
|
|
479
|
-
let t = e < 0 ? d : u, r = n[t];
|
|
480
|
-
j(r, `Panel constraints not found for index ${t}`);
|
|
481
|
-
let i = s[t], { collapsible: a, collapsedSize: o, minSize: c } = r;
|
|
482
|
-
if (a && B(i, c) < 0) if (e > 0) {
|
|
483
|
-
let t = c - o, n = t / 2;
|
|
484
|
-
B(i + e, c) < 0 && (e = B(e, n) <= 0 ? 0 : t);
|
|
485
|
-
} else {
|
|
486
|
-
let t = c - o, n = 100 - t / 2;
|
|
487
|
-
B(i - e, c) < 0 && (e = B(100 + e, n) > 0 ? 0 : -t);
|
|
488
|
-
}
|
|
489
|
-
break;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
{
|
|
493
|
-
let t = e < 0 ? 1 : -1, r = e < 0 ? d : u, i = 0;
|
|
494
|
-
for (;;) {
|
|
495
|
-
let e = s[r];
|
|
496
|
-
j(e != null, `Previous layout not found for panel index ${r}`);
|
|
497
|
-
let a = V({
|
|
498
|
-
overrideDisabledPanels: o,
|
|
499
|
-
panelConstraints: n[r],
|
|
500
|
-
prevSize: e,
|
|
501
|
-
size: 100
|
|
502
|
-
}) - e;
|
|
503
|
-
if (i += a, r += t, r < 0 || r >= n.length) break;
|
|
504
|
-
}
|
|
505
|
-
let a = Math.min(Math.abs(e), Math.abs(i));
|
|
506
|
-
e = e < 0 ? 0 - a : a;
|
|
507
|
-
}
|
|
508
|
-
{
|
|
509
|
-
let t = e < 0 ? u : d;
|
|
510
|
-
for (; t >= 0 && t < n.length;) {
|
|
511
|
-
let r = Math.abs(e) - Math.abs(f), i = s[t];
|
|
512
|
-
j(i != null, `Previous layout not found for panel index ${t}`);
|
|
513
|
-
let a = i - r, c = V({
|
|
514
|
-
overrideDisabledPanels: o,
|
|
515
|
-
panelConstraints: n[t],
|
|
516
|
-
prevSize: i,
|
|
517
|
-
size: a
|
|
518
|
-
});
|
|
519
|
-
if (!P(i, c) && (f += i - c, l[t] = c, f.toFixed(3).localeCompare(Math.abs(e).toFixed(3), void 0, { numeric: !0 }) >= 0)) break;
|
|
520
|
-
e < 0 ? t-- : t++;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
if (be(c, l)) return i;
|
|
524
|
-
{
|
|
525
|
-
let t = e < 0 ? d : u, r = s[t];
|
|
526
|
-
j(r != null, `Previous layout not found for panel index ${t}`);
|
|
527
|
-
let i = r + f, a = V({
|
|
528
|
-
overrideDisabledPanels: o,
|
|
529
|
-
panelConstraints: n[t],
|
|
530
|
-
prevSize: r,
|
|
531
|
-
size: i
|
|
532
|
-
});
|
|
533
|
-
if (l[t] = a, !P(a, i)) {
|
|
534
|
-
let t = i - a, r = e < 0 ? d : u;
|
|
535
|
-
for (; r >= 0 && r < n.length;) {
|
|
536
|
-
let i = l[r];
|
|
537
|
-
j(i != null, `Previous layout not found for panel index ${r}`);
|
|
538
|
-
let a = i + t, s = V({
|
|
539
|
-
overrideDisabledPanels: o,
|
|
540
|
-
panelConstraints: n[r],
|
|
541
|
-
prevSize: i,
|
|
542
|
-
size: a
|
|
543
|
-
});
|
|
544
|
-
if (P(i, s) || (t -= s - i, l[r] = s), P(t, 0)) break;
|
|
545
|
-
e > 0 ? r-- : r++;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
if (!P(Object.values(l).reduce((e, t) => t + e, 0), 100, .1)) return i;
|
|
550
|
-
let p = Object.keys(i);
|
|
551
|
-
return l.reduce((e, t, n) => (e[p[n]] = t, e), {});
|
|
552
|
-
}
|
|
553
|
-
function U(e, t) {
|
|
554
|
-
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
555
|
-
for (let n in e) if (t[n] === void 0 || B(e[n], t[n]) !== 0) return !1;
|
|
556
|
-
return !0;
|
|
557
|
-
}
|
|
558
|
-
function W({ layout: e, panelConstraints: t }) {
|
|
559
|
-
let n = Object.values(e), r = [...n], i = r.reduce((e, t) => e + t, 0);
|
|
560
|
-
if (r.length !== t.length) throw Error(`Invalid ${t.length} panel layout: ${r.map((e) => `${e}%`).join(", ")}`);
|
|
561
|
-
if (!P(i, 100) && r.length > 0) for (let e = 0; e < t.length; e++) {
|
|
562
|
-
let t = r[e];
|
|
563
|
-
j(t != null, `No layout data found for index ${e}`), r[e] = 100 / i * t;
|
|
564
|
-
}
|
|
565
|
-
let a = 0;
|
|
566
|
-
for (let e = 0; e < t.length; e++) {
|
|
567
|
-
let i = n[e];
|
|
568
|
-
j(i != null, `No layout data found for index ${e}`);
|
|
569
|
-
let o = r[e];
|
|
570
|
-
j(o != null, `No layout data found for index ${e}`);
|
|
571
|
-
let s = V({
|
|
572
|
-
overrideDisabledPanels: !0,
|
|
573
|
-
panelConstraints: t[e],
|
|
574
|
-
prevSize: i,
|
|
575
|
-
size: o
|
|
576
|
-
});
|
|
577
|
-
o != s && (a += o - s, r[e] = s);
|
|
578
|
-
}
|
|
579
|
-
if (!P(a, 0)) for (let e = 0; e < t.length; e++) {
|
|
580
|
-
let n = r[e];
|
|
581
|
-
j(n != null, `No layout data found for index ${e}`);
|
|
582
|
-
let i = n + a, o = V({
|
|
583
|
-
overrideDisabledPanels: !0,
|
|
584
|
-
panelConstraints: t[e],
|
|
585
|
-
prevSize: n,
|
|
586
|
-
size: i
|
|
587
|
-
});
|
|
588
|
-
if (n !== o && (a -= o - n, r[e] = o, P(a, 0))) break;
|
|
589
|
-
}
|
|
590
|
-
let o = Object.keys(e);
|
|
591
|
-
return r.reduce((e, t, n) => (e[o[n]] = t, e), {});
|
|
592
|
-
}
|
|
593
|
-
function xe({ groupId: e, panelId: t }) {
|
|
594
|
-
let n = () => {
|
|
595
|
-
let { mountedGroups: t } = L();
|
|
596
|
-
for (let [n, { defaultLayoutDeferred: r, derivedPanelConstraints: i, layout: a, separatorToPanels: o }] of t) if (n.id === e) return {
|
|
597
|
-
defaultLayoutDeferred: r,
|
|
598
|
-
derivedPanelConstraints: i,
|
|
599
|
-
group: n,
|
|
600
|
-
layout: a,
|
|
601
|
-
separatorToPanels: o
|
|
602
|
-
};
|
|
603
|
-
throw Error(`Group ${e} not found`);
|
|
604
|
-
}, r = () => {
|
|
605
|
-
let e = n().derivedPanelConstraints.find((e) => e.panelId === t);
|
|
606
|
-
if (e !== void 0) return e;
|
|
607
|
-
throw Error(`Panel constraints not found for Panel ${t}`);
|
|
608
|
-
}, i = () => {
|
|
609
|
-
let e = n().group.panels.find((e) => e.id === t);
|
|
610
|
-
if (e !== void 0) return e;
|
|
611
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
612
|
-
}, a = () => {
|
|
613
|
-
let e = n().layout[t];
|
|
614
|
-
if (e !== void 0) return e;
|
|
615
|
-
throw Error(`Layout not found for Panel ${t}`);
|
|
616
|
-
}, o = (e) => {
|
|
617
|
-
let r = a();
|
|
618
|
-
if (e === r) return;
|
|
619
|
-
let { defaultLayoutDeferred: i, derivedPanelConstraints: o, group: s, layout: c, separatorToPanels: l } = n(), u = s.panels.findIndex((e) => e.id === t), d = u === s.panels.length - 1, f = W({
|
|
620
|
-
layout: H({
|
|
621
|
-
delta: d ? r - e : e - r,
|
|
622
|
-
initialLayout: c,
|
|
623
|
-
panelConstraints: o,
|
|
624
|
-
pivotIndices: d ? [u - 1, u] : [u, u + 1],
|
|
625
|
-
prevLayout: c,
|
|
626
|
-
trigger: "imperative-api"
|
|
627
|
-
}),
|
|
628
|
-
panelConstraints: o
|
|
629
|
-
});
|
|
630
|
-
U(c, f) || R((e) => ({ mountedGroups: new Map(e.mountedGroups).set(s, {
|
|
631
|
-
defaultLayoutDeferred: i,
|
|
632
|
-
derivedPanelConstraints: o,
|
|
633
|
-
layout: f,
|
|
634
|
-
separatorToPanels: l
|
|
635
|
-
}) }));
|
|
636
|
-
};
|
|
637
|
-
return {
|
|
638
|
-
collapse: () => {
|
|
639
|
-
let { collapsible: e, collapsedSize: t } = r(), { mutableValues: n } = i(), s = a();
|
|
640
|
-
e && s !== t && (n.expandToSize = s, o(t));
|
|
641
|
-
},
|
|
642
|
-
expand: () => {
|
|
643
|
-
let { collapsible: e, collapsedSize: t, minSize: n } = r(), { mutableValues: s } = i(), c = a();
|
|
644
|
-
if (e && c === t) {
|
|
645
|
-
let e = s.expandToSize ?? n;
|
|
646
|
-
e === 0 && (e = 1), o(e);
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
getSize: () => {
|
|
650
|
-
let { group: e } = n(), t = a(), { element: r } = i();
|
|
651
|
-
return {
|
|
652
|
-
asPercentage: t,
|
|
653
|
-
inPixels: e.orientation === "horizontal" ? r.offsetWidth : r.offsetHeight
|
|
654
|
-
};
|
|
655
|
-
},
|
|
656
|
-
isCollapsed: () => {
|
|
657
|
-
let { collapsible: e, collapsedSize: t } = r(), n = a();
|
|
658
|
-
return e && P(t, n);
|
|
659
|
-
},
|
|
660
|
-
resize: (e) => {
|
|
661
|
-
if (a() !== e) {
|
|
662
|
-
let t;
|
|
663
|
-
switch (typeof e) {
|
|
664
|
-
case "number": {
|
|
665
|
-
let { group: r } = n();
|
|
666
|
-
t = O(e / k({ group: r }) * 100);
|
|
667
|
-
break;
|
|
668
|
-
}
|
|
669
|
-
case "string":
|
|
670
|
-
t = parseFloat(e);
|
|
671
|
-
break;
|
|
672
|
-
}
|
|
673
|
-
o(t);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
function Se(e) {
|
|
679
|
-
if (e.defaultPrevented) return;
|
|
680
|
-
let { mountedGroups: t } = L();
|
|
681
|
-
z(e, t).forEach((t) => {
|
|
682
|
-
if (t.separator) {
|
|
683
|
-
let n = t.panels.find((e) => e.panelConstraints.defaultSize !== void 0);
|
|
684
|
-
if (n) {
|
|
685
|
-
let r = n.panelConstraints.defaultSize, i = xe({
|
|
686
|
-
groupId: t.group.id,
|
|
687
|
-
panelId: n.id
|
|
688
|
-
});
|
|
689
|
-
i && r !== void 0 && (i.resize(r), e.preventDefault());
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
});
|
|
693
|
-
}
|
|
694
|
-
function G(e) {
|
|
695
|
-
let { mountedGroups: t } = L();
|
|
696
|
-
for (let [n] of t) if (n.separators.some((t) => t.element === e)) return n;
|
|
697
|
-
throw Error("Could not find parent Group for separator element");
|
|
698
|
-
}
|
|
699
|
-
function Ce({ groupId: e }) {
|
|
700
|
-
let t = () => {
|
|
701
|
-
let { mountedGroups: t } = L();
|
|
702
|
-
for (let [n, r] of t) if (n.id === e) return {
|
|
703
|
-
group: n,
|
|
704
|
-
...r
|
|
705
|
-
};
|
|
706
|
-
throw Error(`Could not find Group with id "${e}"`);
|
|
707
|
-
};
|
|
708
|
-
return {
|
|
709
|
-
getLayout() {
|
|
710
|
-
let { defaultLayoutDeferred: e, layout: n } = t();
|
|
711
|
-
return e ? {} : n;
|
|
712
|
-
},
|
|
713
|
-
setLayout(e) {
|
|
714
|
-
let { defaultLayoutDeferred: n, derivedPanelConstraints: r, group: i, layout: a, separatorToPanels: o } = t(), s = W({
|
|
715
|
-
layout: e,
|
|
716
|
-
panelConstraints: r
|
|
717
|
-
});
|
|
718
|
-
if (n) return a;
|
|
719
|
-
if (!U(a, s)) {
|
|
720
|
-
R((e) => ({ mountedGroups: new Map(e.mountedGroups).set(i, {
|
|
721
|
-
defaultLayoutDeferred: n,
|
|
722
|
-
derivedPanelConstraints: r,
|
|
723
|
-
layout: s,
|
|
724
|
-
separatorToPanels: o
|
|
725
|
-
}) }));
|
|
726
|
-
let e = i.panels.map(({ id: e }) => e).join(",");
|
|
727
|
-
i.inMemoryLayouts[e] = s;
|
|
728
|
-
}
|
|
729
|
-
return s;
|
|
730
|
-
}
|
|
731
|
-
};
|
|
732
|
-
}
|
|
733
|
-
function we(e) {
|
|
734
|
-
let { mountedGroups: t } = L(), n = t.get(e);
|
|
735
|
-
return j(n, `Mounted Group ${e.id} not found`), n;
|
|
736
|
-
}
|
|
737
|
-
function K(e, t) {
|
|
738
|
-
let n = G(e), r = we(n), i = n.separators.find((t) => t.element === e);
|
|
739
|
-
j(i, "Matching separator not found");
|
|
740
|
-
let a = r.separatorToPanels.get(i);
|
|
741
|
-
j(a, "Matching panels not found");
|
|
742
|
-
let o = a.map((e) => n.panels.indexOf(e)), s = Ce({ groupId: n.id }).getLayout(), c = W({
|
|
743
|
-
layout: H({
|
|
744
|
-
delta: t,
|
|
745
|
-
initialLayout: s,
|
|
746
|
-
panelConstraints: r.derivedPanelConstraints,
|
|
747
|
-
pivotIndices: o,
|
|
748
|
-
prevLayout: s,
|
|
749
|
-
trigger: "keyboard"
|
|
750
|
-
}),
|
|
751
|
-
panelConstraints: r.derivedPanelConstraints
|
|
752
|
-
});
|
|
753
|
-
U(s, c) || R((e) => ({ mountedGroups: new Map(e.mountedGroups).set(n, {
|
|
754
|
-
defaultLayoutDeferred: r.defaultLayoutDeferred,
|
|
755
|
-
derivedPanelConstraints: r.derivedPanelConstraints,
|
|
756
|
-
layout: c,
|
|
757
|
-
separatorToPanels: r.separatorToPanels
|
|
758
|
-
}) }));
|
|
759
|
-
}
|
|
760
|
-
function Te(e) {
|
|
761
|
-
if (e.defaultPrevented) return;
|
|
762
|
-
let t = e.currentTarget, n = G(t);
|
|
763
|
-
if (!n.disabled) switch (e.key) {
|
|
764
|
-
case "ArrowDown":
|
|
765
|
-
e.preventDefault(), n.orientation === "vertical" && K(t, 5);
|
|
766
|
-
break;
|
|
767
|
-
case "ArrowLeft":
|
|
768
|
-
e.preventDefault(), n.orientation === "horizontal" && K(t, -5);
|
|
769
|
-
break;
|
|
770
|
-
case "ArrowRight":
|
|
771
|
-
e.preventDefault(), n.orientation === "horizontal" && K(t, 5);
|
|
772
|
-
break;
|
|
773
|
-
case "ArrowUp":
|
|
774
|
-
e.preventDefault(), n.orientation === "vertical" && K(t, -5);
|
|
775
|
-
break;
|
|
776
|
-
case "End":
|
|
777
|
-
e.preventDefault(), K(t, 100);
|
|
778
|
-
break;
|
|
779
|
-
case "Enter": {
|
|
780
|
-
e.preventDefault();
|
|
781
|
-
let n = G(t), { derivedPanelConstraints: r, layout: i, separatorToPanels: a } = we(n), o = n.separators.find((e) => e.element === t);
|
|
782
|
-
j(o, "Matching separator not found");
|
|
783
|
-
let s = a.get(o);
|
|
784
|
-
j(s, "Matching panels not found");
|
|
785
|
-
let c = s[0], l = r.find((e) => e.panelId === c.id);
|
|
786
|
-
if (j(l, "Panel metadata not found"), l.collapsible) {
|
|
787
|
-
let e = i[c.id];
|
|
788
|
-
K(t, (l.collapsedSize === e ? n.inMemoryLastExpandedPanelSizes[c.id] ?? l.minSize : l.collapsedSize) - e);
|
|
789
|
-
}
|
|
790
|
-
break;
|
|
791
|
-
}
|
|
792
|
-
case "F6": {
|
|
793
|
-
e.preventDefault();
|
|
794
|
-
let n = G(t).separators.map((e) => e.element), r = Array.from(n).findIndex((t) => t === e.currentTarget);
|
|
795
|
-
j(r !== null, "Index not found"), n[e.shiftKey ? r > 0 ? r - 1 : n.length - 1 : r + 1 < n.length ? r + 1 : 0].focus();
|
|
796
|
-
break;
|
|
797
|
-
}
|
|
798
|
-
case "Home":
|
|
799
|
-
e.preventDefault(), K(t, -100);
|
|
800
|
-
break;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
function Ee(e) {
|
|
804
|
-
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0) return;
|
|
805
|
-
let { mountedGroups: t } = L(), n = z(e, t), r = /* @__PURE__ */ new Map(), i = !1;
|
|
806
|
-
n.forEach((e) => {
|
|
807
|
-
e.separator && (i || (i = !0, e.separator.element.focus()));
|
|
808
|
-
let n = t.get(e.group);
|
|
809
|
-
n && r.set(e.group, n.layout);
|
|
810
|
-
}), R({ interactionState: {
|
|
811
|
-
hitRegions: n,
|
|
812
|
-
initialLayoutMap: r,
|
|
813
|
-
pointerDownAtPoint: {
|
|
814
|
-
x: e.clientX,
|
|
815
|
-
y: e.clientY
|
|
816
|
-
},
|
|
817
|
-
state: "active"
|
|
818
|
-
} }), n.length && e.preventDefault();
|
|
819
|
-
}
|
|
820
|
-
var De = (e) => e, q = () => {}, Oe = 1, ke = 2, Ae = 4, je = 8, Me = 3, Ne = 12, J;
|
|
821
|
-
function Pe() {
|
|
822
|
-
return J === void 0 && (J = !1, typeof window < "u" && (window.navigator.userAgent.includes("Chrome") || window.navigator.userAgent.includes("Firefox")) && (J = !0)), J;
|
|
823
|
-
}
|
|
824
|
-
function Fe({ cursorFlags: e, groups: t, state: n }) {
|
|
825
|
-
let r = 0, i = 0;
|
|
826
|
-
switch (n) {
|
|
827
|
-
case "active":
|
|
828
|
-
case "hover": t.forEach((e) => {
|
|
829
|
-
if (!e.disableCursor) switch (e.orientation) {
|
|
830
|
-
case "horizontal":
|
|
831
|
-
r++;
|
|
832
|
-
break;
|
|
833
|
-
case "vertical":
|
|
834
|
-
i++;
|
|
835
|
-
break;
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
if (!(r === 0 && i === 0)) {
|
|
840
|
-
switch (n) {
|
|
841
|
-
case "active":
|
|
842
|
-
if (e && Pe()) {
|
|
843
|
-
let t = (e & Oe) !== 0, n = (e & ke) !== 0, r = (e & Ae) !== 0, i = (e & je) !== 0;
|
|
844
|
-
if (t) return r ? "se-resize" : i ? "ne-resize" : "e-resize";
|
|
845
|
-
if (n) return r ? "sw-resize" : i ? "nw-resize" : "w-resize";
|
|
846
|
-
if (r) return "s-resize";
|
|
847
|
-
if (i) return "n-resize";
|
|
848
|
-
}
|
|
849
|
-
break;
|
|
850
|
-
}
|
|
851
|
-
return Pe() ? r > 0 && i > 0 ? "move" : r > 0 ? "ew-resize" : "ns-resize" : r > 0 && i > 0 ? "grab" : r > 0 ? "col-resize" : "row-resize";
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
var Ie = /* @__PURE__ */ new WeakMap();
|
|
855
|
-
function Y(e) {
|
|
856
|
-
if (e.defaultView === null || e.defaultView === void 0) return;
|
|
857
|
-
let { prevStyle: t, styleSheet: n } = Ie.get(e) ?? {};
|
|
858
|
-
n === void 0 && (n = new e.defaultView.CSSStyleSheet(), e.adoptedStyleSheets.push(n));
|
|
859
|
-
let { cursorFlags: r, interactionState: i } = L();
|
|
860
|
-
switch (i.state) {
|
|
861
|
-
case "active":
|
|
862
|
-
case "hover": {
|
|
863
|
-
let e = Fe({
|
|
864
|
-
cursorFlags: r,
|
|
865
|
-
groups: i.hitRegions.map((e) => e.group),
|
|
866
|
-
state: i.state
|
|
867
|
-
}), a = `*, *:hover {cursor: ${e} !important; }`;
|
|
868
|
-
if (t === a) return;
|
|
869
|
-
t = a, e ? n.cssRules.length === 0 ? n.insertRule(a) : n.replaceSync(a) : n.cssRules.length === 1 && n.deleteRule(0);
|
|
870
|
-
break;
|
|
871
|
-
}
|
|
872
|
-
case "inactive":
|
|
873
|
-
t = void 0, n.cssRules.length === 1 && n.deleteRule(0);
|
|
874
|
-
break;
|
|
875
|
-
}
|
|
876
|
-
Ie.set(e, {
|
|
877
|
-
prevStyle: t,
|
|
878
|
-
styleSheet: n
|
|
879
|
-
});
|
|
880
|
-
}
|
|
881
|
-
function Le({ document: e, event: t, hitRegions: n, initialLayoutMap: r, mountedGroups: i, pointerDownAtPoint: a, prevCursorFlags: o }) {
|
|
882
|
-
let s = 0, c = new Map(i);
|
|
883
|
-
n.forEach((e) => {
|
|
884
|
-
let { group: n, groupSize: o } = e, { disableCursor: l, orientation: u, panels: d } = n, f = 0;
|
|
885
|
-
f = a ? u === "horizontal" ? (t.clientX - a.x) / o * 100 : (t.clientY - a.y) / o * 100 : u === "horizontal" ? t.clientX < 0 ? -100 : 100 : t.clientY < 0 ? -100 : 100;
|
|
886
|
-
let p = r.get(n), { defaultLayoutDeferred: m, derivedPanelConstraints: h, layout: g, separatorToPanels: _ } = i.get(n) ?? { defaultLayoutDeferred: !1 };
|
|
887
|
-
if (h && p && g && _) {
|
|
888
|
-
let t = H({
|
|
889
|
-
delta: f,
|
|
890
|
-
initialLayout: p,
|
|
891
|
-
panelConstraints: h,
|
|
892
|
-
pivotIndices: e.panels.map((e) => d.indexOf(e)),
|
|
893
|
-
prevLayout: g,
|
|
894
|
-
trigger: "mouse-or-touch"
|
|
895
|
-
});
|
|
896
|
-
if (U(t, g)) {
|
|
897
|
-
if (f !== 0 && !l) switch (u) {
|
|
898
|
-
case "horizontal":
|
|
899
|
-
s |= f < 0 ? Oe : ke;
|
|
900
|
-
break;
|
|
901
|
-
case "vertical":
|
|
902
|
-
s |= f < 0 ? Ae : je;
|
|
903
|
-
break;
|
|
904
|
-
}
|
|
905
|
-
} else {
|
|
906
|
-
c.set(e.group, {
|
|
907
|
-
defaultLayoutDeferred: m,
|
|
908
|
-
derivedPanelConstraints: h,
|
|
909
|
-
layout: t,
|
|
910
|
-
separatorToPanels: _
|
|
911
|
-
});
|
|
912
|
-
let n = e.group.panels.map(({ id: e }) => e).join(",");
|
|
913
|
-
e.group.inMemoryLayouts[n] = t;
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
});
|
|
917
|
-
let l = 0;
|
|
918
|
-
t.movementX === 0 ? l |= o & Me : l |= s & Me, t.movementY === 0 ? l |= o & Ne : l |= s & Ne, R({
|
|
919
|
-
cursorFlags: l,
|
|
920
|
-
mountedGroups: c
|
|
921
|
-
}), Y(e);
|
|
922
|
-
}
|
|
923
|
-
function Re(e) {
|
|
924
|
-
let { cursorFlags: t, interactionState: n, mountedGroups: r } = L();
|
|
925
|
-
switch (n.state) {
|
|
926
|
-
case "active": Le({
|
|
927
|
-
document: e.currentTarget,
|
|
928
|
-
event: e,
|
|
929
|
-
hitRegions: n.hitRegions,
|
|
930
|
-
initialLayoutMap: n.initialLayoutMap,
|
|
931
|
-
mountedGroups: r,
|
|
932
|
-
prevCursorFlags: t
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
function ze(e) {
|
|
937
|
-
if (e.defaultPrevented) return;
|
|
938
|
-
let { cursorFlags: t, interactionState: n, mountedGroups: r } = L();
|
|
939
|
-
switch (n.state) {
|
|
940
|
-
case "active":
|
|
941
|
-
if (e.buttons === 0) {
|
|
942
|
-
R((e) => e.interactionState.state === "inactive" ? e : {
|
|
943
|
-
cursorFlags: 0,
|
|
944
|
-
interactionState: { state: "inactive" }
|
|
945
|
-
}), R((e) => ({ mountedGroups: new Map(e.mountedGroups) }));
|
|
946
|
-
return;
|
|
947
|
-
}
|
|
948
|
-
Le({
|
|
949
|
-
document: e.currentTarget,
|
|
950
|
-
event: e,
|
|
951
|
-
hitRegions: n.hitRegions,
|
|
952
|
-
initialLayoutMap: n.initialLayoutMap,
|
|
953
|
-
mountedGroups: r,
|
|
954
|
-
pointerDownAtPoint: n.pointerDownAtPoint,
|
|
955
|
-
prevCursorFlags: t
|
|
956
|
-
});
|
|
957
|
-
break;
|
|
958
|
-
default: {
|
|
959
|
-
let t = z(e, r);
|
|
960
|
-
t.length === 0 ? n.state !== "inactive" && R({ interactionState: { state: "inactive" } }) : R({ interactionState: {
|
|
961
|
-
hitRegions: t,
|
|
962
|
-
state: "hover"
|
|
963
|
-
} }), Y(e.currentTarget);
|
|
964
|
-
break;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
function Be(e) {
|
|
969
|
-
if (e.relatedTarget instanceof HTMLIFrameElement) {
|
|
970
|
-
let { interactionState: e } = L();
|
|
971
|
-
switch (e.state) {
|
|
972
|
-
case "hover": R({ interactionState: { state: "inactive" } });
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
function Ve(e) {
|
|
977
|
-
if (e.defaultPrevented || e.pointerType === "mouse" && e.button > 0) return;
|
|
978
|
-
let { interactionState: t } = L();
|
|
979
|
-
switch (t.state) {
|
|
980
|
-
case "active": R({
|
|
981
|
-
cursorFlags: 0,
|
|
982
|
-
interactionState: { state: "inactive" }
|
|
983
|
-
}), t.hitRegions.length > 0 && (Y(e.currentTarget), R((e) => ({ mountedGroups: new Map(e.mountedGroups) })), e.preventDefault());
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
function He(e) {
|
|
987
|
-
let t = 0, n = 0, r = {};
|
|
988
|
-
for (let i of e) if (i.defaultSize !== void 0) {
|
|
989
|
-
t++;
|
|
990
|
-
let e = O(i.defaultSize);
|
|
991
|
-
n += e, r[i.panelId] = e;
|
|
992
|
-
} else r[i.panelId] = void 0;
|
|
993
|
-
let i = e.length - t;
|
|
994
|
-
if (i !== 0) {
|
|
995
|
-
let t = O((100 - n) / i);
|
|
996
|
-
for (let n of e) n.defaultSize === void 0 && (r[n.panelId] = t);
|
|
997
|
-
}
|
|
998
|
-
return r;
|
|
999
|
-
}
|
|
1000
|
-
function Ue(e, t, n) {
|
|
1001
|
-
if (!n[0]) return;
|
|
1002
|
-
let r = e.panels.find((e) => e.element === t);
|
|
1003
|
-
if (!r || !r.onResize) return;
|
|
1004
|
-
let i = k({ group: e }), a = e.orientation === "horizontal" ? r.element.offsetWidth : r.element.offsetHeight, o = r.mutableValues.prevSize, s = {
|
|
1005
|
-
asPercentage: O(a / i * 100),
|
|
1006
|
-
inPixels: a
|
|
1007
|
-
};
|
|
1008
|
-
r.mutableValues.prevSize = s, r.onResize(s, r.id, o);
|
|
1009
|
-
}
|
|
1010
|
-
function We(e, t) {
|
|
1011
|
-
if (Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
1012
|
-
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
1013
|
-
return !0;
|
|
1014
|
-
}
|
|
1015
|
-
function Ge(e, t) {
|
|
1016
|
-
let n = e.map((e) => e.id), r = Object.keys(t);
|
|
1017
|
-
if (n.length !== r.length) return !1;
|
|
1018
|
-
for (let e of n) if (!r.includes(e)) return !1;
|
|
1019
|
-
return !0;
|
|
1020
|
-
}
|
|
1021
|
-
var X = /* @__PURE__ */ new Map();
|
|
1022
|
-
function Ke(e) {
|
|
1023
|
-
let t = !0;
|
|
1024
|
-
j(e.element.ownerDocument.defaultView, "Cannot register an unmounted Group");
|
|
1025
|
-
let n = e.element.ownerDocument.defaultView.ResizeObserver, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = new n((n) => {
|
|
1026
|
-
for (let r of n) {
|
|
1027
|
-
let { borderBoxSize: n, target: i } = r;
|
|
1028
|
-
if (i === e.element) {
|
|
1029
|
-
if (t) {
|
|
1030
|
-
if (k({ group: e }) === 0) return;
|
|
1031
|
-
R((t) => {
|
|
1032
|
-
let n = t.mountedGroups.get(e);
|
|
1033
|
-
if (n) {
|
|
1034
|
-
let r = A(e), i = n.defaultLayoutDeferred ? He(r) : n.layout, a = W({
|
|
1035
|
-
layout: i,
|
|
1036
|
-
panelConstraints: r
|
|
1037
|
-
});
|
|
1038
|
-
return !n.defaultLayoutDeferred && U(i, a) && We(n.derivedPanelConstraints, r) ? t : { mountedGroups: new Map(t.mountedGroups).set(e, {
|
|
1039
|
-
defaultLayoutDeferred: !1,
|
|
1040
|
-
derivedPanelConstraints: r,
|
|
1041
|
-
layout: a,
|
|
1042
|
-
separatorToPanels: n.separatorToPanels
|
|
1043
|
-
}) };
|
|
1044
|
-
}
|
|
1045
|
-
return t;
|
|
1046
|
-
});
|
|
1047
|
-
}
|
|
1048
|
-
} else Ue(e, i, n);
|
|
1049
|
-
}
|
|
1050
|
-
});
|
|
1051
|
-
a.observe(e.element), e.panels.forEach((e) => {
|
|
1052
|
-
j(!r.has(e.id), `Panel ids must be unique; id "${e.id}" was used more than once`), r.add(e.id), e.onResize && a.observe(e.element);
|
|
1053
|
-
});
|
|
1054
|
-
let o = k({ group: e }), s = A(e), c = e.panels.map(({ id: e }) => e).join(","), l = e.defaultLayout;
|
|
1055
|
-
l && (Ge(e.panels, l) || (l = void 0));
|
|
1056
|
-
let u = W({
|
|
1057
|
-
layout: e.inMemoryLayouts[c] ?? l ?? He(s),
|
|
1058
|
-
panelConstraints: s
|
|
1059
|
-
}), d = oe(e), f = e.element.ownerDocument;
|
|
1060
|
-
return R((t) => {
|
|
1061
|
-
let n = /* @__PURE__ */ new Map();
|
|
1062
|
-
return X.set(f, (X.get(f) ?? 0) + 1), d.forEach((e) => {
|
|
1063
|
-
e.separator && n.set(e.separator, e.panels);
|
|
1064
|
-
}), { mountedGroups: new Map(t.mountedGroups).set(e, {
|
|
1065
|
-
defaultLayoutDeferred: o === 0,
|
|
1066
|
-
derivedPanelConstraints: s,
|
|
1067
|
-
layout: u,
|
|
1068
|
-
separatorToPanels: n
|
|
1069
|
-
}) };
|
|
1070
|
-
}), e.separators.forEach((e) => {
|
|
1071
|
-
j(!i.has(e.id), `Separator ids must be unique; id "${e.id}" was used more than once`), i.add(e.id), e.element.addEventListener("keydown", Te);
|
|
1072
|
-
}), X.get(f) === 1 && (f.addEventListener("dblclick", Se, !0), f.addEventListener("pointerdown", Ee, !0), f.addEventListener("pointerleave", Re), f.addEventListener("pointermove", ze), f.addEventListener("pointerout", Be), f.addEventListener("pointerup", Ve, !0)), function() {
|
|
1073
|
-
t = !1, X.set(f, Math.max(0, (X.get(f) ?? 0) - 1)), R((t) => {
|
|
1074
|
-
let n = new Map(t.mountedGroups);
|
|
1075
|
-
return n.delete(e), { mountedGroups: n };
|
|
1076
|
-
}), e.separators.forEach((e) => {
|
|
1077
|
-
e.element.removeEventListener("keydown", Te);
|
|
1078
|
-
}), X.get(f) || (f.removeEventListener("dblclick", Se, !0), f.removeEventListener("pointerdown", Ee, !0), f.removeEventListener("pointerleave", Re), f.removeEventListener("pointermove", ze), f.removeEventListener("pointerout", Be), f.removeEventListener("pointerup", Ve, !0)), a.disconnect();
|
|
1079
|
-
};
|
|
1080
|
-
}
|
|
1081
|
-
function qe() {
|
|
1082
|
-
let [e, t] = (0, x.useState)({});
|
|
1083
|
-
return [e, (0, x.useCallback)(() => t({}), [])];
|
|
1084
|
-
}
|
|
1085
|
-
function Z(e) {
|
|
1086
|
-
let t = (0, x.useId)();
|
|
1087
|
-
return `${e ?? t}`;
|
|
1088
|
-
}
|
|
1089
|
-
var Q = typeof window < "u" ? x.useLayoutEffect : x.useEffect;
|
|
1090
|
-
function $(e) {
|
|
1091
|
-
let t = (0, x.useRef)(e);
|
|
1092
|
-
return Q(() => {
|
|
1093
|
-
t.current = e;
|
|
1094
|
-
}, [e]), (0, x.useCallback)((...e) => t.current?.(...e), [t]);
|
|
1095
|
-
}
|
|
1096
|
-
function Je(...e) {
|
|
1097
|
-
return $((t) => {
|
|
1098
|
-
e.forEach((e) => {
|
|
1099
|
-
if (e) switch (typeof e) {
|
|
1100
|
-
case "function":
|
|
1101
|
-
e(t);
|
|
1102
|
-
break;
|
|
1103
|
-
case "object":
|
|
1104
|
-
e.current = t;
|
|
1105
|
-
break;
|
|
1106
|
-
}
|
|
1107
|
-
});
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1110
|
-
function Ye(e) {
|
|
1111
|
-
let t = (0, x.useRef)({ ...e });
|
|
1112
|
-
return Q(() => {
|
|
1113
|
-
for (let n in e) t.current[n] = e[n];
|
|
1114
|
-
}, [e]), t.current;
|
|
1115
|
-
}
|
|
1116
|
-
var Xe = (0, x.createContext)(null);
|
|
1117
|
-
function Ze(e, t) {
|
|
1118
|
-
let n = (0, x.useRef)({
|
|
1119
|
-
getLayout: () => ({}),
|
|
1120
|
-
setLayout: De
|
|
1121
|
-
});
|
|
1122
|
-
(0, x.useImperativeHandle)(t, () => n.current, []), Q(() => {
|
|
1123
|
-
Object.assign(n.current, Ce({ groupId: e }));
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
function Qe({ children: e, className: t, defaultLayout: n, disableCursor: r, disabled: i, elementRef: a, groupRef: o, id: s, onLayoutChange: c, onLayoutChanged: l, orientation: u = "horizontal", resizeTargetMinimumSize: d = {
|
|
1127
|
-
coarse: 20,
|
|
1128
|
-
fine: 10
|
|
1129
|
-
}, style: f, ...p }) {
|
|
1130
|
-
let m = (0, x.useRef)({
|
|
1131
|
-
onLayoutChange: {},
|
|
1132
|
-
onLayoutChanged: {}
|
|
1133
|
-
}), h = $((e) => {
|
|
1134
|
-
U(m.current.onLayoutChange, e) || (m.current.onLayoutChange = e, c?.(e));
|
|
1135
|
-
}), g = $((e) => {
|
|
1136
|
-
U(m.current.onLayoutChanged, e) || (m.current.onLayoutChanged = e, l?.(e));
|
|
1137
|
-
}), _ = Z(s), v = (0, x.useRef)(null), [y, S] = qe(), C = (0, x.useRef)({
|
|
1138
|
-
lastExpandedPanelSizes: {},
|
|
1139
|
-
layouts: {},
|
|
1140
|
-
panels: [],
|
|
1141
|
-
resizeTargetMinimumSize: d,
|
|
1142
|
-
separators: []
|
|
1143
|
-
}), w = Je(v, a);
|
|
1144
|
-
Ze(_, o);
|
|
1145
|
-
let T = $((e, t) => {
|
|
1146
|
-
let { interactionState: r, mountedGroups: i } = L();
|
|
1147
|
-
for (let n of i.keys()) if (n.id === e) {
|
|
1148
|
-
let e = i.get(n);
|
|
1149
|
-
if (e) {
|
|
1150
|
-
let i = !1;
|
|
1151
|
-
switch (r.state) {
|
|
1152
|
-
case "active":
|
|
1153
|
-
i = r.hitRegions.some((e) => e.group === n);
|
|
1154
|
-
break;
|
|
1155
|
-
}
|
|
1156
|
-
return {
|
|
1157
|
-
flexGrow: e.layout[t] ?? 1,
|
|
1158
|
-
pointerEvents: i ? "none" : void 0
|
|
1159
|
-
};
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
return { flexGrow: n?.[t] ?? 1 };
|
|
1163
|
-
}), E = Ye({
|
|
1164
|
-
defaultLayout: n,
|
|
1165
|
-
disableCursor: r
|
|
1166
|
-
}), D = (0, x.useMemo)(() => ({
|
|
1167
|
-
get disableCursor() {
|
|
1168
|
-
return !!E.disableCursor;
|
|
1169
|
-
},
|
|
1170
|
-
getPanelStyles: T,
|
|
1171
|
-
id: _,
|
|
1172
|
-
orientation: u,
|
|
1173
|
-
registerPanel: (e) => {
|
|
1174
|
-
let t = C.current;
|
|
1175
|
-
return t.panels = M(u, [...t.panels, e]), S(), () => {
|
|
1176
|
-
t.panels = t.panels.filter((t) => t !== e), S();
|
|
1177
|
-
};
|
|
1178
|
-
},
|
|
1179
|
-
registerSeparator: (e) => {
|
|
1180
|
-
let t = C.current;
|
|
1181
|
-
return t.separators = M(u, [...t.separators, e]), S(), () => {
|
|
1182
|
-
t.separators = t.separators.filter((t) => t !== e), S();
|
|
1183
|
-
};
|
|
1184
|
-
},
|
|
1185
|
-
togglePanelDisabled: (e, t) => {
|
|
1186
|
-
let n = C.current.panels.find((t) => t.id === e);
|
|
1187
|
-
n && (n.panelConstraints.disabled = t);
|
|
1188
|
-
let { mountedGroups: r } = L();
|
|
1189
|
-
for (let e of r.keys()) if (e.id === _) {
|
|
1190
|
-
let t = r.get(e);
|
|
1191
|
-
t && (t.derivedPanelConstraints = A(e));
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
toggleSeparatorDisabled: (e, t) => {
|
|
1195
|
-
let n = C.current.separators.find((t) => t.id === e);
|
|
1196
|
-
n && (n.disabled = t);
|
|
1197
|
-
}
|
|
1198
|
-
}), [
|
|
1199
|
-
T,
|
|
1200
|
-
_,
|
|
1201
|
-
S,
|
|
1202
|
-
u,
|
|
1203
|
-
E
|
|
1204
|
-
]), O = (0, x.useRef)(null);
|
|
1205
|
-
return Q(() => {
|
|
1206
|
-
let e = v.current;
|
|
1207
|
-
if (e === null) return;
|
|
1208
|
-
let t = C.current, n;
|
|
1209
|
-
if (E.defaultLayout !== void 0 && Object.keys(E.defaultLayout).length === t.panels.length) {
|
|
1210
|
-
n = {};
|
|
1211
|
-
for (let e of t.panels) {
|
|
1212
|
-
let t = E.defaultLayout[e.id];
|
|
1213
|
-
t !== void 0 && (n[e.id] = t);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
let r = {
|
|
1217
|
-
defaultLayout: n,
|
|
1218
|
-
disableCursor: !!E.disableCursor,
|
|
1219
|
-
disabled: !!i,
|
|
1220
|
-
element: e,
|
|
1221
|
-
id: _,
|
|
1222
|
-
inMemoryLastExpandedPanelSizes: C.current.lastExpandedPanelSizes,
|
|
1223
|
-
inMemoryLayouts: C.current.layouts,
|
|
1224
|
-
orientation: u,
|
|
1225
|
-
panels: t.panels,
|
|
1226
|
-
resizeTargetMinimumSize: t.resizeTargetMinimumSize,
|
|
1227
|
-
separators: t.separators
|
|
1228
|
-
};
|
|
1229
|
-
O.current = r;
|
|
1230
|
-
let a = Ke(r), o = L().mountedGroups.get(r);
|
|
1231
|
-
if (o) {
|
|
1232
|
-
let { defaultLayoutDeferred: e, derivedPanelConstraints: t, layout: n } = o;
|
|
1233
|
-
!e && t.length > 0 && (h(n), g(n));
|
|
1234
|
-
}
|
|
1235
|
-
let s = I.addListener("interactionStateChange", (e) => {
|
|
1236
|
-
e.state;
|
|
1237
|
-
}), c = I.addListener("mountedGroupsChange", (e) => {
|
|
1238
|
-
let t = e.get(r);
|
|
1239
|
-
if (t) {
|
|
1240
|
-
let { defaultLayoutDeferred: e, derivedPanelConstraints: n, layout: r } = t;
|
|
1241
|
-
if (e || n.length === 0) return;
|
|
1242
|
-
let { interactionState: i } = L(), a = i.state !== "active";
|
|
1243
|
-
h(r), a && g(r);
|
|
1244
|
-
}
|
|
1245
|
-
});
|
|
1246
|
-
return () => {
|
|
1247
|
-
O.current = null, a(), s(), c();
|
|
1248
|
-
};
|
|
1249
|
-
}, [
|
|
1250
|
-
i,
|
|
1251
|
-
_,
|
|
1252
|
-
g,
|
|
1253
|
-
h,
|
|
1254
|
-
u,
|
|
1255
|
-
y,
|
|
1256
|
-
E
|
|
1257
|
-
]), (0, x.useEffect)(() => {
|
|
1258
|
-
let e = O.current;
|
|
1259
|
-
e && (e.defaultLayout = n, e.disableCursor = !!r);
|
|
1260
|
-
}), /* @__PURE__ */ (0, b.jsx)(Xe.Provider, {
|
|
1261
|
-
value: D,
|
|
1262
|
-
children: /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1263
|
-
...p,
|
|
1264
|
-
className: t,
|
|
1265
|
-
"data-group": !0,
|
|
1266
|
-
"data-testid": _,
|
|
1267
|
-
id: _,
|
|
1268
|
-
ref: w,
|
|
1269
|
-
style: {
|
|
1270
|
-
height: "100%",
|
|
1271
|
-
width: "100%",
|
|
1272
|
-
overflow: "hidden",
|
|
1273
|
-
...f,
|
|
1274
|
-
display: "flex",
|
|
1275
|
-
flexDirection: u === "horizontal" ? "row" : "column",
|
|
1276
|
-
flexWrap: "nowrap",
|
|
1277
|
-
touchAction: u === "horizontal" ? "pan-y" : "pan-x"
|
|
1278
|
-
},
|
|
1279
|
-
children: e
|
|
1280
|
-
})
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
Qe.displayName = "Group";
|
|
1284
|
-
function $e(e, t) {
|
|
1285
|
-
return `react-resizable-panels:${[e, ...t].join(":")}`;
|
|
1286
|
-
}
|
|
1287
|
-
function et({ debounceSaveMs: e = 100, panelIds: t, storage: n = localStorage, ...r }) {
|
|
1288
|
-
let i = t !== void 0, a = "id" in r ? r.id : r.groupId, o = $e(a, t ?? []), s = (0, x.useSyncExternalStore)(tt, () => n.getItem(o), () => n.getItem(o)), c = (0, x.useMemo)(() => s ? JSON.parse(s) : void 0, [s]), l = (0, x.useRef)(null), u = (0, x.useCallback)(() => {
|
|
1289
|
-
let e = l.current;
|
|
1290
|
-
e && (l.current = null, clearTimeout(e));
|
|
1291
|
-
}, []);
|
|
1292
|
-
(0, x.useLayoutEffect)(() => () => {
|
|
1293
|
-
u();
|
|
1294
|
-
}, [u]);
|
|
1295
|
-
let d = (0, x.useCallback)((e) => {
|
|
1296
|
-
u();
|
|
1297
|
-
let t;
|
|
1298
|
-
t = i ? $e(a, Object.keys(e)) : $e(a, []);
|
|
1299
|
-
try {
|
|
1300
|
-
n.setItem(t, JSON.stringify(e));
|
|
1301
|
-
} catch (e) {
|
|
1302
|
-
console.error(e);
|
|
1303
|
-
}
|
|
1304
|
-
}, [
|
|
1305
|
-
u,
|
|
1306
|
-
i,
|
|
1307
|
-
a,
|
|
1308
|
-
n
|
|
1309
|
-
]);
|
|
1310
|
-
return {
|
|
1311
|
-
defaultLayout: c,
|
|
1312
|
-
onLayoutChange: (0, x.useCallback)((t) => {
|
|
1313
|
-
u(), e === 0 ? d(t) : l.current = setTimeout(() => {
|
|
1314
|
-
d(t);
|
|
1315
|
-
}, e);
|
|
1316
|
-
}, [
|
|
1317
|
-
u,
|
|
1318
|
-
e,
|
|
1319
|
-
d
|
|
1320
|
-
]),
|
|
1321
|
-
onLayoutChanged: d
|
|
1322
|
-
};
|
|
1323
|
-
}
|
|
1324
|
-
function tt() {
|
|
1325
|
-
return function() {};
|
|
1326
|
-
}
|
|
1327
|
-
function nt() {
|
|
1328
|
-
return (0, x.useState)(null);
|
|
1329
|
-
}
|
|
1330
|
-
function rt() {
|
|
1331
|
-
return (0, x.useRef)(null);
|
|
1332
|
-
}
|
|
1333
|
-
function it() {
|
|
1334
|
-
let e = (0, x.useContext)(Xe);
|
|
1335
|
-
return j(e, "Group Context not found; did you render a Panel or Separator outside of a Group?"), e;
|
|
1336
|
-
}
|
|
1337
|
-
function at(e, t) {
|
|
1338
|
-
let { id: n } = it(), r = (0, x.useRef)({
|
|
1339
|
-
collapse: q,
|
|
1340
|
-
expand: q,
|
|
1341
|
-
getSize: () => ({
|
|
1342
|
-
asPercentage: 0,
|
|
1343
|
-
inPixels: 0
|
|
1344
|
-
}),
|
|
1345
|
-
isCollapsed: () => !1,
|
|
1346
|
-
resize: q
|
|
1347
|
-
});
|
|
1348
|
-
(0, x.useImperativeHandle)(t, () => r.current, []), Q(() => {
|
|
1349
|
-
Object.assign(r.current, xe({
|
|
1350
|
-
groupId: n,
|
|
1351
|
-
panelId: e
|
|
1352
|
-
}));
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
function ot({ children: e, className: t, collapsedSize: n = "0%", collapsible: r = !1, defaultSize: i, disabled: a, elementRef: o, id: s, maxSize: c = "100%", minSize: l = "0%", onResize: u, panelRef: d, style: f, ...p }) {
|
|
1356
|
-
let m = !!s, h = Z(s), g = Ye({ disabled: a }), _ = (0, x.useRef)(null), v = Je(_, o), { getPanelStyles: y, id: S, orientation: C, registerPanel: w, togglePanelDisabled: T } = it(), E = u !== null, D = $((e, t, n) => {
|
|
1357
|
-
u?.(e, s, n);
|
|
1358
|
-
});
|
|
1359
|
-
Q(() => {
|
|
1360
|
-
let e = _.current;
|
|
1361
|
-
if (e !== null) return w({
|
|
1362
|
-
element: e,
|
|
1363
|
-
id: h,
|
|
1364
|
-
idIsStable: m,
|
|
1365
|
-
mutableValues: {
|
|
1366
|
-
expandToSize: void 0,
|
|
1367
|
-
prevSize: void 0
|
|
1368
|
-
},
|
|
1369
|
-
onResize: E ? D : void 0,
|
|
1370
|
-
panelConstraints: {
|
|
1371
|
-
collapsedSize: n,
|
|
1372
|
-
collapsible: r,
|
|
1373
|
-
defaultSize: i,
|
|
1374
|
-
disabled: g.disabled,
|
|
1375
|
-
maxSize: c,
|
|
1376
|
-
minSize: l
|
|
1377
|
-
}
|
|
1378
|
-
});
|
|
1379
|
-
}, [
|
|
1380
|
-
n,
|
|
1381
|
-
r,
|
|
1382
|
-
i,
|
|
1383
|
-
E,
|
|
1384
|
-
h,
|
|
1385
|
-
m,
|
|
1386
|
-
c,
|
|
1387
|
-
l,
|
|
1388
|
-
D,
|
|
1389
|
-
w,
|
|
1390
|
-
g
|
|
1391
|
-
]), (0, x.useEffect)(() => {
|
|
1392
|
-
T(h, !!a);
|
|
1393
|
-
}, [
|
|
1394
|
-
a,
|
|
1395
|
-
h,
|
|
1396
|
-
T
|
|
1397
|
-
]), at(h, d);
|
|
1398
|
-
let O = (0, x.useSyncExternalStore)((e) => (I.addListener("mountedGroupsChange", e), () => {
|
|
1399
|
-
I.removeListener("mountedGroupsChange", e);
|
|
1400
|
-
}), () => JSON.stringify(y(S, h)), () => JSON.stringify(y(S, h)));
|
|
1401
|
-
return /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1402
|
-
...p,
|
|
1403
|
-
"aria-disabled": a || void 0,
|
|
1404
|
-
"data-panel": !0,
|
|
1405
|
-
"data-testid": h,
|
|
1406
|
-
id: h,
|
|
1407
|
-
ref: v,
|
|
1408
|
-
style: {
|
|
1409
|
-
...st,
|
|
1410
|
-
display: "flex",
|
|
1411
|
-
flexBasis: 0,
|
|
1412
|
-
flexShrink: 1,
|
|
1413
|
-
overflow: "hidden",
|
|
1414
|
-
...JSON.parse(O)
|
|
1415
|
-
},
|
|
1416
|
-
children: /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1417
|
-
className: t,
|
|
1418
|
-
style: {
|
|
1419
|
-
maxHeight: "100%",
|
|
1420
|
-
maxWidth: "100%",
|
|
1421
|
-
flexGrow: 1,
|
|
1422
|
-
...f,
|
|
1423
|
-
touchAction: C === "horizontal" ? "pan-y" : "pan-x"
|
|
1424
|
-
},
|
|
1425
|
-
children: e
|
|
1426
|
-
})
|
|
1427
|
-
});
|
|
1428
|
-
}
|
|
1429
|
-
ot.displayName = "Panel";
|
|
1430
|
-
var st = {
|
|
1431
|
-
minHeight: 0,
|
|
1432
|
-
maxHeight: "100%",
|
|
1433
|
-
height: "auto",
|
|
1434
|
-
minWidth: 0,
|
|
1435
|
-
maxWidth: "100%",
|
|
1436
|
-
width: "auto",
|
|
1437
|
-
border: "none",
|
|
1438
|
-
borderWidth: 0,
|
|
1439
|
-
padding: 0,
|
|
1440
|
-
margin: 0
|
|
1441
|
-
};
|
|
1442
|
-
function ct() {
|
|
1443
|
-
return (0, x.useState)(null);
|
|
1444
|
-
}
|
|
1445
|
-
function lt() {
|
|
1446
|
-
return (0, x.useRef)(null);
|
|
1447
|
-
}
|
|
1448
|
-
function ut({ layout: e, panelConstraints: t, panelId: n, panelIndex: r }) {
|
|
1449
|
-
let i, a, o = e[n], s = t.find((e) => e.panelId === n);
|
|
1450
|
-
if (s) {
|
|
1451
|
-
let c = s.maxSize, l = s.collapsible ? s.collapsedSize : s.minSize, u = [r, r + 1];
|
|
1452
|
-
a = W({
|
|
1453
|
-
layout: H({
|
|
1454
|
-
delta: l - o,
|
|
1455
|
-
initialLayout: e,
|
|
1456
|
-
panelConstraints: t,
|
|
1457
|
-
pivotIndices: u,
|
|
1458
|
-
prevLayout: e
|
|
1459
|
-
}),
|
|
1460
|
-
panelConstraints: t
|
|
1461
|
-
})[n], i = W({
|
|
1462
|
-
layout: H({
|
|
1463
|
-
delta: c - o,
|
|
1464
|
-
initialLayout: e,
|
|
1465
|
-
panelConstraints: t,
|
|
1466
|
-
pivotIndices: u,
|
|
1467
|
-
prevLayout: e
|
|
1468
|
-
}),
|
|
1469
|
-
panelConstraints: t
|
|
1470
|
-
})[n];
|
|
1471
|
-
}
|
|
1472
|
-
return {
|
|
1473
|
-
valueControls: n,
|
|
1474
|
-
valueMax: i,
|
|
1475
|
-
valueMin: a,
|
|
1476
|
-
valueNow: o
|
|
1477
|
-
};
|
|
1478
|
-
}
|
|
1479
|
-
function dt({ children: e, className: t, disabled: n, elementRef: r, id: i, style: a, ...o }) {
|
|
1480
|
-
let s = Z(i), c = Ye({ disabled: n }), [l, u] = (0, x.useState)({}), [d, f] = (0, x.useState)("inactive"), p = (0, x.useRef)(null), m = Je(p, r), { disableCursor: h, id: g, orientation: _, registerSeparator: v, toggleSeparatorDisabled: y } = it(), S = _ === "horizontal" ? "vertical" : "horizontal";
|
|
1481
|
-
Q(() => {
|
|
1482
|
-
let e = p.current;
|
|
1483
|
-
if (e !== null) {
|
|
1484
|
-
let t = {
|
|
1485
|
-
disabled: c.disabled,
|
|
1486
|
-
element: e,
|
|
1487
|
-
id: s
|
|
1488
|
-
}, n = v(t), r = I.addListener("interactionStateChange", (e) => {
|
|
1489
|
-
f(e.state !== "inactive" && e.hitRegions.some((e) => e.separator === t) ? e.state : "inactive");
|
|
1490
|
-
}), i = I.addListener("mountedGroupsChange", (e) => {
|
|
1491
|
-
e.forEach(({ derivedPanelConstraints: e, layout: n, separatorToPanels: r }, i) => {
|
|
1492
|
-
if (i.id === g) {
|
|
1493
|
-
let a = r.get(t);
|
|
1494
|
-
if (a) {
|
|
1495
|
-
let t = a[0], r = i.panels.indexOf(t);
|
|
1496
|
-
u(ut({
|
|
1497
|
-
layout: n,
|
|
1498
|
-
panelConstraints: e,
|
|
1499
|
-
panelId: t.id,
|
|
1500
|
-
panelIndex: r
|
|
1501
|
-
}));
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
});
|
|
1505
|
-
});
|
|
1506
|
-
return () => {
|
|
1507
|
-
r(), i(), n();
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
}, [
|
|
1511
|
-
g,
|
|
1512
|
-
s,
|
|
1513
|
-
v,
|
|
1514
|
-
c
|
|
1515
|
-
]), (0, x.useEffect)(() => {
|
|
1516
|
-
y(s, !!n);
|
|
1517
|
-
}, [
|
|
1518
|
-
n,
|
|
1519
|
-
s,
|
|
1520
|
-
y
|
|
1521
|
-
]);
|
|
1522
|
-
let C;
|
|
1523
|
-
return n && !h && (C = "not-allowed"), /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1524
|
-
...o,
|
|
1525
|
-
"aria-controls": l.valueControls,
|
|
1526
|
-
"aria-disabled": n || void 0,
|
|
1527
|
-
"aria-orientation": S,
|
|
1528
|
-
"aria-valuemax": l.valueMax,
|
|
1529
|
-
"aria-valuemin": l.valueMin,
|
|
1530
|
-
"aria-valuenow": l.valueNow,
|
|
1531
|
-
children: e,
|
|
1532
|
-
className: t,
|
|
1533
|
-
"data-separator": n ? "disabled" : d,
|
|
1534
|
-
"data-testid": s,
|
|
1535
|
-
id: s,
|
|
1536
|
-
ref: m,
|
|
1537
|
-
role: "separator",
|
|
1538
|
-
style: {
|
|
1539
|
-
flexBasis: "auto",
|
|
1540
|
-
cursor: C,
|
|
1541
|
-
...a,
|
|
1542
|
-
flexGrow: 0,
|
|
1543
|
-
flexShrink: 0,
|
|
1544
|
-
touchAction: "none"
|
|
1545
|
-
},
|
|
1546
|
-
tabIndex: n ? void 0 : 0
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
dt.displayName = "Separator";
|
|
1550
|
-
//#endregion
|
|
1551
|
-
//#region src/client/components/ui/resizable.tsx
|
|
1552
|
-
var { usePanelRef: ft } = y;
|
|
1553
|
-
function pt({ className: e, ...t }) {
|
|
1554
|
-
return /* @__PURE__ */ (0, b.jsx)(Qe, {
|
|
1555
|
-
"data-slot": "resizable-panel-group",
|
|
1556
|
-
className: a("flex h-full w-full aria-[orientation=vertical]:flex-col", e),
|
|
1557
|
-
...t
|
|
1558
|
-
});
|
|
1559
|
-
}
|
|
1560
|
-
function mt({ ...e }) {
|
|
1561
|
-
return /* @__PURE__ */ (0, b.jsx)(ot, {
|
|
1562
|
-
"data-slot": "resizable-panel",
|
|
1563
|
-
...e
|
|
1564
|
-
});
|
|
1565
|
-
}
|
|
1566
|
-
function ht({ withHandle: e, className: t, ...n }) {
|
|
1567
|
-
return /* @__PURE__ */ (0, b.jsx)(dt, {
|
|
1568
|
-
"data-slot": "resizable-handle",
|
|
1569
|
-
className: a("relative flex items-center justify-center bg-border", "focus-visible:ring-ring focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden", "after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2", "aria-[orientation=vertical]:h-auto aria-[orientation=vertical]:w-px", "aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full", "aria-[orientation=vertical]:after:left-0 aria-[orientation=vertical]:after:h-1 aria-[orientation=vertical]:after:w-full aria-[orientation=vertical]:after:translate-x-0 aria-[orientation=vertical]:after:-translate-y-1/2", "[&[aria-orientation=horizontal]>div]:rotate-90", t),
|
|
1570
|
-
...n,
|
|
1571
|
-
children: e && /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1572
|
-
className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",
|
|
1573
|
-
children: /* @__PURE__ */ (0, b.jsx)(v, { className: "size-2.5" })
|
|
1574
|
-
})
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1577
|
-
//#endregion
|
|
1578
|
-
//#region src/client/components/shared/ListItem.tsx
|
|
1579
|
-
function gt({ id: e, isSelected: t, isFocused: n, title: r, description: i, metadata: o, onClick: s, className: c, "data-testid": l }) {
|
|
1580
|
-
return /* @__PURE__ */ (0, b.jsx)("button", {
|
|
1581
|
-
id: e,
|
|
1582
|
-
"data-testid": l,
|
|
1583
|
-
type: "button",
|
|
1584
|
-
onClick: s,
|
|
1585
|
-
className: a("w-full text-left cursor-pointer p-2 sm:p-4 border-b dark:border-zinc-700 hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors group", t && "bg-zinc-50 dark:bg-zinc-800 border-l-4 border-l-zinc-500", n && "ring-2 ring-zinc-500 dark:ring-zinc-400 ring-inset", c),
|
|
1586
|
-
children: /* @__PURE__ */ (0, b.jsxs)("div", {
|
|
1587
|
-
className: "flex items-start gap-2 sm:gap-3",
|
|
1588
|
-
children: [/* @__PURE__ */ (0, b.jsxs)("div", {
|
|
1589
|
-
className: "flex-1 min-w-0",
|
|
1590
|
-
children: [/* @__PURE__ */ (0, b.jsx)("div", {
|
|
1591
|
-
className: "flex items-center gap-2 mb-1",
|
|
1592
|
-
children: /* @__PURE__ */ (0, b.jsx)("h3", {
|
|
1593
|
-
className: a("font-medium truncate font-mono text-sm"),
|
|
1594
|
-
children: r
|
|
1595
|
-
})
|
|
1596
|
-
}), i && /* @__PURE__ */ (0, b.jsx)("p", {
|
|
1597
|
-
className: "text-sm text-gray-600 dark:text-gray-400 line-clamp-2",
|
|
1598
|
-
children: i
|
|
1599
|
-
})]
|
|
1600
|
-
}), o && /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1601
|
-
className: "flex-shrink-0 flex items-center self-center",
|
|
1602
|
-
children: o
|
|
1603
|
-
})]
|
|
1604
|
-
})
|
|
1605
|
-
});
|
|
1606
|
-
}
|
|
1607
|
-
//#endregion
|
|
1608
|
-
//#region src/client/components/shared/InspectorScrollArea.tsx
|
|
1609
|
-
function _t({ className: e, scrollRef: t, children: n }) {
|
|
1610
|
-
let [r, i] = (0, x.useState)(!1);
|
|
1611
|
-
return /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1612
|
-
ref: t,
|
|
1613
|
-
className: a("h-full overflow-y-auto overscroll-none", e),
|
|
1614
|
-
onScroll: (e) => i(e.currentTarget.scrollTop > 0),
|
|
1615
|
-
children: /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1616
|
-
className: "flex min-h-full flex-col",
|
|
1617
|
-
children: n(r)
|
|
1618
|
-
})
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
//#endregion
|
|
1622
|
-
//#region src/client/components/shared/SearchTabHeader.tsx
|
|
1623
|
-
function vt({ title: e, count: t, icon: n, isSearchExpanded: a, searchQuery: m, searchPlaceholder: h, onSearchExpand: v, onSearchChange: y, onSearchBlur: x, searchInputRef: S, titleTestId: C, bulkAction: w, onRefresh: T, isRefreshing: E = !1, isScrolled: D = !1 }) {
|
|
1624
|
-
let O = w?.icon;
|
|
1625
|
-
return /* @__PURE__ */ (0, b.jsxs)("div", {
|
|
1626
|
-
className: `flex flex-row items-center justify-between gap-2 ${c(D)} ${p}`,
|
|
1627
|
-
children: [/* @__PURE__ */ (0, b.jsx)("div", {
|
|
1628
|
-
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
1629
|
-
children: a ? /* @__PURE__ */ (0, b.jsx)(f, {
|
|
1630
|
-
ref: S,
|
|
1631
|
-
placeholder: h,
|
|
1632
|
-
value: m,
|
|
1633
|
-
onChange: (e) => y(e.target.value),
|
|
1634
|
-
onBlur: x,
|
|
1635
|
-
className: "h-8 border-gray-300 dark:border-zinc-600"
|
|
1636
|
-
}) : /* @__PURE__ */ (0, b.jsxs)(b.Fragment, { children: [
|
|
1637
|
-
/* @__PURE__ */ (0, b.jsxs)("h2", {
|
|
1638
|
-
className: `${s} flex items-center gap-1.5`,
|
|
1639
|
-
"data-testid": C,
|
|
1640
|
-
children: [n ? /* @__PURE__ */ (0, b.jsx)(n, {
|
|
1641
|
-
className: "h-3.5 w-3.5 shrink-0 text-muted-foreground",
|
|
1642
|
-
"aria-hidden": !0
|
|
1643
|
-
}) : null, e]
|
|
1644
|
-
}),
|
|
1645
|
-
/* @__PURE__ */ (0, b.jsx)(i, {
|
|
1646
|
-
className: "bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",
|
|
1647
|
-
variant: "outline",
|
|
1648
|
-
children: t
|
|
1649
|
-
}),
|
|
1650
|
-
/* @__PURE__ */ (0, b.jsxs)(l, { children: [/* @__PURE__ */ (0, b.jsx)(o, {
|
|
1651
|
-
render: /* @__PURE__ */ (0, b.jsx)(d, {
|
|
1652
|
-
variant: "ghost",
|
|
1653
|
-
size: "sm",
|
|
1654
|
-
onClick: v,
|
|
1655
|
-
className: "h-8 w-8 p-0",
|
|
1656
|
-
children: /* @__PURE__ */ (0, b.jsx)(r, { className: "h-4 w-4" })
|
|
1657
|
-
}),
|
|
1658
|
-
nativeButton: !0
|
|
1659
|
-
}), /* @__PURE__ */ (0, b.jsxs)(u, {
|
|
1660
|
-
side: "bottom",
|
|
1661
|
-
className: "flex gap-2",
|
|
1662
|
-
children: ["Search", /* @__PURE__ */ (0, b.jsx)(_, { children: "F" })]
|
|
1663
|
-
})] }),
|
|
1664
|
-
T && /* @__PURE__ */ (0, b.jsxs)(l, { children: [/* @__PURE__ */ (0, b.jsx)(o, {
|
|
1665
|
-
render: /* @__PURE__ */ (0, b.jsx)(d, {
|
|
1666
|
-
variant: "ghost",
|
|
1667
|
-
size: "sm",
|
|
1668
|
-
onClick: T,
|
|
1669
|
-
disabled: E,
|
|
1670
|
-
className: "h-8 w-8 p-0",
|
|
1671
|
-
children: /* @__PURE__ */ (0, b.jsx)(g, { className: `h-4 w-4 ${E ? "animate-spin" : ""}` })
|
|
1672
|
-
}),
|
|
1673
|
-
nativeButton: !0
|
|
1674
|
-
}), /* @__PURE__ */ (0, b.jsxs)(u, {
|
|
1675
|
-
side: "bottom",
|
|
1676
|
-
className: "flex gap-2",
|
|
1677
|
-
children: ["Refresh list", /* @__PURE__ */ (0, b.jsx)(_, { children: "R" })]
|
|
1678
|
-
})] })
|
|
1679
|
-
] })
|
|
1680
|
-
}), w && O && /* @__PURE__ */ (0, b.jsx)("div", {
|
|
1681
|
-
className: "flex items-center gap-2",
|
|
1682
|
-
children: /* @__PURE__ */ (0, b.jsxs)(l, { children: [/* @__PURE__ */ (0, b.jsx)(o, {
|
|
1683
|
-
render: /* @__PURE__ */ (0, b.jsx)(d, {
|
|
1684
|
-
variant: "ghost",
|
|
1685
|
-
size: "sm",
|
|
1686
|
-
onClick: w.onClick,
|
|
1687
|
-
disabled: w.disabled,
|
|
1688
|
-
className: "h-8 w-8 p-0",
|
|
1689
|
-
children: /* @__PURE__ */ (0, b.jsx)(O, { className: "h-4 w-4" })
|
|
1690
|
-
}),
|
|
1691
|
-
nativeButton: !0
|
|
1692
|
-
}), /* @__PURE__ */ (0, b.jsx)(u, {
|
|
1693
|
-
side: "bottom",
|
|
1694
|
-
children: w.label
|
|
1695
|
-
})] })
|
|
1696
|
-
})]
|
|
1697
|
-
});
|
|
1698
|
-
}
|
|
1699
|
-
//#endregion
|
|
1700
|
-
export { mt as a, ht as i, _t as n, pt as o, gt as r, ft as s, vt as t };
|