chrome-devtools-frontend 1.0.1675430 → 1.0.1678416
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/AUTHORS +1 -0
- package/WATCHLISTS +0 -4
- package/front_end/core/common/EventTarget.ts +0 -5
- package/front_end/core/common/Settings.ts +0 -66
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +5 -0
- package/front_end/core/root/Runtime.ts +5 -5
- package/front_end/core/sdk/CSSMetadata.ts +5 -9
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -34
- package/front_end/core/sdk/DebuggerModel.ts +92 -57
- package/front_end/core/sdk/EmulationModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +16 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -9
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +10 -4
- package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
- package/front_end/core/sdk/SDKSettings.ts +117 -0
- package/front_end/core/sdk/Script.ts +9 -53
- package/front_end/core/sdk/sdk-meta.ts +0 -431
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +6 -5
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +14 -15
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +157 -0
- package/front_end/entrypoints/main/MainImpl.ts +32 -0
- package/front_end/entrypoints/shell/shell.ts +0 -1
- package/front_end/foundation/Universe.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +8 -8
- package/front_end/generated/SupportedCSSProperties.ts +53 -4
- package/front_end/generated/protocol-mapping.d.ts +27 -21
- package/front_end/generated/protocol-proxy-api.d.ts +22 -17
- package/front_end/generated/protocol.ts +43 -18
- package/front_end/models/ai_assistance/AiAgent2.ts +47 -2
- package/front_end/models/ai_assistance/AiConversation.ts +22 -5
- package/front_end/models/ai_assistance/README.md +52 -26
- package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +21 -87
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +24 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +100 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
- package/front_end/models/ai_assistance/skills/README.md +63 -1
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
- package/front_end/models/ai_assistance/skills/accessibility.md +7 -0
- package/front_end/models/ai_assistance/skills/performance.md +15 -1
- package/front_end/models/ai_assistance/skills/sources.md +16 -0
- package/front_end/models/ai_assistance/skills/storage.md +31 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +107 -0
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +122 -0
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +127 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +95 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +89 -0
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +26 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +22 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
- package/front_end/models/comment_manager/CommentManager.ts +141 -0
- package/front_end/models/comment_manager/comment_manager.ts +9 -0
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
- package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/persistence/persistence-meta.ts +9 -9
- package/front_end/models/trace/types/TraceEvents.ts +36 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +25 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
- package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
- package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +92 -12
- package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +10 -4
- package/front_end/panels/application/IndexedDBViews.ts +65 -63
- package/front_end/panels/application/StorageView.ts +116 -45
- package/front_end/panels/application/WebMCPView.ts +16 -7
- package/front_end/panels/application/application-meta.ts +11 -0
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
- package/front_end/panels/common/BadgeNotification.ts +8 -8
- package/front_end/panels/common/ExtensionPanel.ts +9 -8
- package/front_end/panels/common/ExtensionServer.ts +21 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
- package/front_end/panels/common/PersistenceUtils.ts +2 -2
- package/front_end/panels/common/common.ts +0 -97
- package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
- package/front_end/panels/console/ConsolePanel.ts +4 -0
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsolePrompt.ts +12 -0
- package/front_end/panels/console/ConsoleView.ts +31 -20
- package/front_end/panels/console/ConsoleViewMessage.ts +37 -13
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +455 -372
- package/front_end/panels/elements/LayoutPane.ts +2 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -15
- package/front_end/panels/elements/elements-meta.ts +152 -10
- package/front_end/panels/elements/elements.ts +0 -2
- package/front_end/panels/emulation/DeviceModeView.ts +9 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -2
- package/front_end/panels/media/PlayerMessagesView.ts +149 -68
- package/front_end/panels/network/BinaryResourceView.ts +134 -81
- package/front_end/panels/network/EventSourceMessagesView.ts +10 -10
- package/front_end/panels/network/FetchHeaderCommenting.ts +291 -0
- package/front_end/panels/network/NetworkConfigView.ts +10 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -14
- package/front_end/panels/network/NetworkItemView.ts +27 -28
- package/front_end/panels/network/NetworkLogView.ts +137 -38
- package/front_end/panels/network/NetworkLogViewColumns.ts +35 -35
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +2 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +4 -4
- package/front_end/panels/network/RequestHeadersView.ts +5 -5
- package/front_end/panels/network/RequestPayloadView.ts +4 -3
- package/front_end/panels/network/RequestTimingView.ts +8 -8
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +16 -16
- package/front_end/panels/network/binaryResourceView.css +14 -12
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +1 -1
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -2
- package/front_end/panels/network/network-meta.ts +1 -1
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
- package/front_end/panels/profiler/heapProfiler.css +0 -9
- package/front_end/panels/recorder/RecorderPanel.ts +2 -3
- package/front_end/panels/screencast/ScreencastView.ts +148 -138
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
- package/front_end/panels/sources/BreakpointsView.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +10 -59
- package/front_end/panels/sources/NavigatorView.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +23 -73
- package/front_end/panels/sources/SourcesView.ts +248 -157
- package/front_end/panels/sources/TabbedEditorContainer.ts +118 -23
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -9
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
- package/front_end/panels/sources/sources-meta.ts +52 -0
- package/front_end/panels/timeline/TimelineController.ts +36 -64
- package/front_end/panels/timeline/TimelinePanel.ts +11 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timelinePanel.css +0 -10
- package/front_end/panels/utils/utils.ts +7 -7
- package/front_end/services/tracing/PerformanceTracing.ts +5 -17
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +2 -2
- package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +430 -35
- package/front_end/ui/comments/CommentOverlayManager.ts +635 -0
- package/front_end/ui/comments/CommentsOverlayWidget.ts +134 -0
- package/front_end/ui/comments/comments.ts +4 -0
- package/front_end/ui/comments/commentsOverlay.css +49 -0
- package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
- package/front_end/ui/components/dialogs/dialogs.ts +4 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
- package/front_end/ui/components/text_editor/text_editor.ts +4 -0
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +0 -56
- package/front_end/ui/legacy/View.ts +10 -4
- package/front_end/ui/legacy/Widget.ts +10 -1
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +507 -209
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +38 -20
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +12 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +37 -6
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +22 -4
- package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +6 -1
- package/package.json +6 -6
- package/front_end/Images/toolbarResizerVertical.png +0 -0
- package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
- package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
- package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
- package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
- package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
- package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
- package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/iPad-landscape.svg +0 -73
- package/front_end/emulated_devices/iPad-portrait.svg +0 -76
- package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
- package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
- package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
- package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
- package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
- package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
- package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/README.md +0 -9
- package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
- package/front_end/models/ai_assistance/agents/README.md +0 -136
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +0 -89
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -27
- /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
- /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import '../../ui/legacy/legacy.js';
|
|
7
7
|
|
|
8
8
|
import * as Common from '../../core/common/common.js';
|
|
9
|
-
import * as Host from '../../core/host/host.js';
|
|
10
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
11
10
|
import * as Platform from '../../core/platform/platform.js';
|
|
11
|
+
import * as Root from '../../core/root/root.js';
|
|
12
12
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
13
13
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
14
14
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
@@ -16,7 +16,7 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
16
16
|
import * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';
|
|
17
17
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
18
18
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
19
|
-
import {html, render} from '../../ui/lit/lit.js';
|
|
19
|
+
import {Directives, html, render} from '../../ui/lit/lit.js';
|
|
20
20
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
21
21
|
|
|
22
22
|
import * as Components from './components/components.js';
|
|
@@ -25,6 +25,7 @@ import sourcesViewStyles from './sourcesView.css.js';
|
|
|
25
25
|
import {
|
|
26
26
|
type EditorSelectedEvent,
|
|
27
27
|
Events as TabbedEditorContainerEvents,
|
|
28
|
+
type SerializedHistoryItem,
|
|
28
29
|
TabbedEditorContainer,
|
|
29
30
|
type TabbedEditorContainerDelegate,
|
|
30
31
|
} from './TabbedEditorContainer.js';
|
|
@@ -32,93 +33,83 @@ import {Events as UISourceCodeFrameEvents, UISourceCodeFrame} from './UISourceCo
|
|
|
32
33
|
|
|
33
34
|
const UIStrings = {
|
|
34
35
|
/**
|
|
35
|
-
* @description
|
|
36
|
+
* @description Tooltip for the navigator toggle in the Sources panel. Command to open or show the
|
|
37
|
+
* sidebar containing the navigator tool.
|
|
36
38
|
*/
|
|
37
|
-
|
|
39
|
+
showNavigator: 'Show navigator',
|
|
38
40
|
/**
|
|
39
|
-
* @description
|
|
41
|
+
* @description Tooltip for the navigator toggle in the Sources panel. Command to close or hide
|
|
42
|
+
* the sidebar containing the navigator tool.
|
|
40
43
|
*/
|
|
41
|
-
|
|
44
|
+
hideNavigator: 'Hide navigator',
|
|
42
45
|
/**
|
|
43
|
-
* @description
|
|
46
|
+
* @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.
|
|
44
47
|
*/
|
|
45
|
-
|
|
48
|
+
navigatorShown: 'Navigator sidebar shown',
|
|
46
49
|
/**
|
|
47
|
-
* @description
|
|
50
|
+
* @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.
|
|
48
51
|
*/
|
|
49
|
-
|
|
52
|
+
navigatorHidden: 'Navigator sidebar hidden',
|
|
50
53
|
/**
|
|
51
|
-
* @description
|
|
54
|
+
* @description Screen reader announcement when the debugger sidebar is shown in the Sources panel.
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
debuggerShown: 'Debugger sidebar shown',
|
|
57
|
+
/**
|
|
58
|
+
* @description Screen reader announcement when the debugger sidebar is hidden in the Sources panel.
|
|
59
|
+
*/
|
|
60
|
+
debuggerHidden: 'Debugger sidebar hidden',
|
|
61
|
+
/**
|
|
62
|
+
* @description Tooltip for the debugger toggle in the Sources panel. Command to open or show the
|
|
63
|
+
* sidebar containing the debugger tool.
|
|
64
|
+
*/
|
|
65
|
+
showDebugger: 'Show debugger',
|
|
66
|
+
/**
|
|
67
|
+
* @description Tooltip for the debugger toggle in the Sources panel. Command to close or hide the
|
|
68
|
+
* sidebar containing the debugger tool.
|
|
69
|
+
*/
|
|
70
|
+
hideDebugger: 'Hide debugger',
|
|
54
71
|
} as const;
|
|
55
72
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesView.ts', UIStrings);
|
|
56
73
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
57
74
|
|
|
58
|
-
|
|
59
|
-
description: string;
|
|
60
|
-
onClick: () => void;
|
|
61
|
-
keys: string[];
|
|
62
|
-
}
|
|
75
|
+
const {widget, widgetRef} = UI.Widget;
|
|
63
76
|
|
|
64
77
|
export interface ViewInput {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
searchProvider: UI.SearchableView.Searchable;
|
|
79
|
+
replaceProvider: UI.SearchableView.Replaceable;
|
|
80
|
+
searchableViewId: string;
|
|
81
|
+
scriptViewToolbarItems: UI.Toolbar.ToolbarItem[];
|
|
82
|
+
bottomToolbarItems: UI.Toolbar.ToolbarItem[];
|
|
83
|
+
searchableViewFactory: () => UI.Widget.Widget;
|
|
84
|
+
delegate: TabbedEditorContainerDelegate;
|
|
85
|
+
previouslyViewedFilesSetting: Common.Settings.Setting<SerializedHistoryItem[]>;
|
|
73
86
|
}
|
|
74
87
|
|
|
75
88
|
export interface ViewOutput {
|
|
76
|
-
|
|
89
|
+
scriptViewToolbar?: UI.Toolbar.Toolbar;
|
|
90
|
+
editorContainer?: TabbedEditorContainer;
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
80
94
|
|
|
81
|
-
export const DEFAULT_VIEW = (input
|
|
95
|
+
export const DEFAULT_VIEW: View = (input, output, target): void => {
|
|
96
|
+
// clang-format off
|
|
82
97
|
render(html`
|
|
83
|
-
<devtools-widget class="vbox flex-auto" ${
|
|
84
|
-
<devtools-widget class="vbox flex-auto"
|
|
98
|
+
<devtools-widget class="vbox flex-auto" ${widget(input.searchableViewFactory)}>
|
|
99
|
+
<devtools-widget class="vbox flex-auto"
|
|
100
|
+
${widget(TabbedEditorContainer, {delegate: input.delegate, previouslyViewedFilesSetting: input.previouslyViewedFilesSetting})}
|
|
101
|
+
${widgetRef(TabbedEditorContainer, e => { output.editorContainer = e; })}>
|
|
85
102
|
</devtools-widget>
|
|
86
103
|
</devtools-widget>
|
|
87
104
|
<div class="sources-toolbar" jslog=${VisualLogging.toolbar('bottom')}>
|
|
88
|
-
${
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
<span class="icon-container">
|
|
97
|
-
<devtools-icon name="sync" class="sync-icon"></devtools-icon>
|
|
98
|
-
</span>
|
|
99
|
-
<span>
|
|
100
|
-
${i18nString(UIStrings.workspaceDropInAFolderToSyncSources)}
|
|
101
|
-
<button @click=${() => output.onSelectFolderClicked()}>${i18nString(UIStrings.selectFolder)}</button>
|
|
102
|
-
</span>
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div class="shortcuts-list tabbed-pane-placeholder-row" role="list"
|
|
106
|
-
aria-label=${i18nString(UIStrings.sourceViewActions)}>
|
|
107
|
-
${input.shortcuts.map(shortcut => {
|
|
108
|
-
if (!shortcut.keys.length) {
|
|
109
|
-
return html`<div class="shortcut-line" role="listitem"></div>`;
|
|
110
|
-
}
|
|
111
|
-
return html`<div class="shortcut-line" role="listitem">
|
|
112
|
-
<button @click=${shortcut.onClick}>${shortcut.description}</button>
|
|
113
|
-
<span class="shortcuts">
|
|
114
|
-
${shortcut.keys.map(key => html`
|
|
115
|
-
<span class="keybinds-key"><span>${key}</span></span>
|
|
116
|
-
`)}
|
|
117
|
-
</span>
|
|
118
|
-
</div>`;
|
|
119
|
-
})}
|
|
120
|
-
</div>`,
|
|
121
|
-
input.placeholderElement);
|
|
105
|
+
<devtools-toolbar class="script-view-toolbar" style="flex: auto;" ${Directives.ref(el => { output.scriptViewToolbar = el as UI.Toolbar.Toolbar; })}>
|
|
106
|
+
${input.scriptViewToolbarItems.map(item => item.element)}
|
|
107
|
+
</devtools-toolbar>
|
|
108
|
+
<devtools-toolbar class="bottom-toolbar">
|
|
109
|
+
${input.bottomToolbarItems.map(item => item.element)}
|
|
110
|
+
</devtools-toolbar>
|
|
111
|
+
</div>`, target);
|
|
112
|
+
// clang-format on
|
|
122
113
|
};
|
|
123
114
|
|
|
124
115
|
export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
@@ -128,19 +119,35 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
128
119
|
editorContainer?: TabbedEditorContainer;
|
|
129
120
|
#uiSourceCodes = new Set<Workspace.UISourceCode.UISourceCode>();
|
|
130
121
|
private readonly historyManager: EditingLocationHistoryManager;
|
|
131
|
-
|
|
132
|
-
|
|
122
|
+
#scriptViewToolbar?: UI.Toolbar.Toolbar;
|
|
123
|
+
#scriptViewToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
124
|
+
#bottomToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
133
125
|
private toolbarChangedListener: Common.EventTarget.EventDescriptor|null;
|
|
134
|
-
private readonly focusedPlaceholderElement?: HTMLElement;
|
|
135
126
|
private searchView?: UISourceCodeFrame;
|
|
136
127
|
private searchConfig?: UI.SearchableView.SearchConfig;
|
|
137
|
-
#leftToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
138
|
-
#rightToolbarItems: UI.Toolbar.ToolbarItem[] = [];
|
|
139
|
-
#placeholderElement: HTMLElement;
|
|
140
128
|
#view: View = DEFAULT_VIEW;
|
|
141
129
|
|
|
130
|
+
#toggleNavigatorSidebarButton: UI.Toolbar.ToolbarButton;
|
|
131
|
+
#toggleDebuggerSidebarButton: UI.Toolbar.ToolbarButton;
|
|
132
|
+
#onToggleNavigatorSidebar?: () => void;
|
|
133
|
+
#onToggleDebuggerSidebar?: () => void;
|
|
134
|
+
#isNavigatorSidebarOpen = false;
|
|
135
|
+
#isDebuggerSidebarOpen = false;
|
|
136
|
+
#navigatorSidebarInitialized = false;
|
|
137
|
+
#debuggerSidebarInitialized = false;
|
|
138
|
+
#isVertical = false;
|
|
139
|
+
#leftToolbarItems?: UI.Toolbar.ToolbarItem[];
|
|
140
|
+
#rightToolbarItems?: UI.Toolbar.ToolbarItem[];
|
|
141
|
+
#breakpointsActive?: boolean;
|
|
142
|
+
#editorContainerPromise: Promise<TabbedEditorContainer>;
|
|
143
|
+
#editorContainerResolve!: (container: TabbedEditorContainer) => void;
|
|
144
|
+
readonly previouslyViewedFilesSetting: Common.Settings.Setting<SerializedHistoryItem[]>;
|
|
145
|
+
|
|
142
146
|
constructor() {
|
|
143
147
|
super({jslog: `${VisualLogging.pane('editor').track({keydown: 'Escape'})}`});
|
|
148
|
+
this.#editorContainerPromise = new Promise(resolve => {
|
|
149
|
+
this.#editorContainerResolve = resolve;
|
|
150
|
+
});
|
|
144
151
|
this.registerRequiredCSS(sourcesViewStyles);
|
|
145
152
|
|
|
146
153
|
this.element.id = 'sources-panel-sources-view';
|
|
@@ -148,28 +155,31 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
148
155
|
|
|
149
156
|
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
150
157
|
|
|
151
|
-
this.#placeholderElement = document.createElement('div');
|
|
152
|
-
this.#placeholderElement.classList.add('sources-placeholder');
|
|
153
|
-
|
|
154
158
|
this.sourceViewByUISourceCode = new Map();
|
|
155
159
|
|
|
156
160
|
this.historyManager = new EditingLocationHistoryManager(this);
|
|
157
161
|
|
|
158
|
-
this.#scriptViewToolbar = document.createElement('devtools-toolbar') as UI.Toolbar.Toolbar;
|
|
159
|
-
this.#scriptViewToolbar.style.flex = 'auto';
|
|
160
|
-
this.#bottomToolbar = document.createElement('devtools-toolbar') as UI.Toolbar.Toolbar;
|
|
161
|
-
|
|
162
162
|
this.toolbarChangedListener = null;
|
|
163
163
|
|
|
164
|
-
this.#
|
|
165
|
-
|
|
164
|
+
this.#toggleNavigatorSidebarButton =
|
|
165
|
+
new UI.Toolbar.ToolbarButton(i18nString(UIStrings.showNavigator), 'left-panel-open');
|
|
166
|
+
this.#toggleNavigatorSidebarButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
167
|
+
this.#onToggleNavigatorSidebar?.();
|
|
168
|
+
});
|
|
169
|
+
this.#toggleNavigatorSidebarButton.element.setAttribute(
|
|
170
|
+
'jslog', `${VisualLogging.toggleSubpane().track({click: true}).context('navigator')}`);
|
|
166
171
|
|
|
167
|
-
|
|
172
|
+
this.#toggleDebuggerSidebarButton =
|
|
173
|
+
new UI.Toolbar.ToolbarButton(i18nString(UIStrings.showDebugger), 'right-panel-open');
|
|
174
|
+
this.#toggleDebuggerSidebarButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
175
|
+
this.#onToggleDebuggerSidebar?.();
|
|
176
|
+
});
|
|
177
|
+
this.#toggleDebuggerSidebarButton.element.setAttribute(
|
|
178
|
+
'jslog', `${VisualLogging.toggleSubpane().track({click: true}).context('debugger')}`);
|
|
179
|
+
|
|
180
|
+
this.previouslyViewedFilesSetting =
|
|
168
181
|
Common.Settings.Settings.instance().createLocalSetting('previously-viewed-files', []);
|
|
169
|
-
this.
|
|
170
|
-
this.focusedPlaceholderElement);
|
|
171
|
-
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_SELECTED, this.editorSelected, this);
|
|
172
|
-
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_CLOSED, this.editorClosed, this);
|
|
182
|
+
this.requestUpdate();
|
|
173
183
|
|
|
174
184
|
UI.UIUtils.startBatchUpdate();
|
|
175
185
|
workspace.uiSourceCodes().forEach(ui => this.addUISourceCode(ui));
|
|
@@ -180,8 +190,6 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
180
190
|
workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this.projectRemoved.bind(this), this);
|
|
181
191
|
SDK.TargetManager.TargetManager.instance().addScopeChangeListener(this.#onScopeChange.bind(this));
|
|
182
192
|
|
|
183
|
-
this.requestUpdate();
|
|
184
|
-
|
|
185
193
|
function handleBeforeUnload(event: Event): void {
|
|
186
194
|
if (event.returnValue) {
|
|
187
195
|
return;
|
|
@@ -216,19 +224,23 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
216
224
|
|
|
217
225
|
override performUpdate(): void {
|
|
218
226
|
const input: ViewInput = {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
+
searchProvider: this,
|
|
228
|
+
replaceProvider: this,
|
|
229
|
+
searchableViewId: 'sources-view-search-config',
|
|
230
|
+
scriptViewToolbarItems: this.#scriptViewToolbarItems,
|
|
231
|
+
bottomToolbarItems: this.#bottomToolbarItems,
|
|
232
|
+
searchableViewFactory: this.#searchableViewFactory,
|
|
233
|
+
delegate: this,
|
|
234
|
+
previouslyViewedFilesSetting: this.previouslyViewedFilesSetting,
|
|
227
235
|
};
|
|
228
236
|
|
|
237
|
+
const that = this;
|
|
229
238
|
const output: ViewOutput = {
|
|
230
|
-
|
|
231
|
-
|
|
239
|
+
set scriptViewToolbar(value: UI.Toolbar.Toolbar) {
|
|
240
|
+
that.#scriptViewToolbar = value;
|
|
241
|
+
},
|
|
242
|
+
set editorContainer(value: TabbedEditorContainer) {
|
|
243
|
+
that.setEditorContainer(value);
|
|
232
244
|
},
|
|
233
245
|
};
|
|
234
246
|
|
|
@@ -237,43 +249,44 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
237
249
|
|
|
238
250
|
override onDetach(): void {
|
|
239
251
|
super.onDetach();
|
|
240
|
-
this.editorContainer?.
|
|
252
|
+
this.editorContainer?.detachEditors();
|
|
241
253
|
}
|
|
242
254
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
if (!result) {
|
|
255
|
+
setEditorContainer(editorContainer: TabbedEditorContainer): void {
|
|
256
|
+
if (this.editorContainer === editorContainer) {
|
|
246
257
|
return;
|
|
247
258
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const shortcutKeys = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutsForAction(shortcut.actionId);
|
|
260
|
-
if (!shortcutKeys?.[0]) {
|
|
261
|
-
return {
|
|
262
|
-
description: shortcut.description,
|
|
263
|
-
onClick: () => {},
|
|
264
|
-
keys: [],
|
|
265
|
-
};
|
|
259
|
+
if (this.editorContainer) {
|
|
260
|
+
this.editorContainer.removeEventListener(TabbedEditorContainerEvents.EDITOR_SELECTED, this.editorSelected, this);
|
|
261
|
+
this.editorContainer.removeEventListener(TabbedEditorContainerEvents.EDITOR_CLOSED, this.editorClosed, this);
|
|
262
|
+
}
|
|
263
|
+
this.editorContainer = editorContainer;
|
|
264
|
+
if (this.editorContainer) {
|
|
265
|
+
if (this.#leftToolbarItems) {
|
|
266
|
+
this.editorContainer.leftToolbar().removeToolbarItems();
|
|
267
|
+
for (const item of this.#leftToolbarItems) {
|
|
268
|
+
this.editorContainer.leftToolbar().appendToolbarItem(item);
|
|
269
|
+
}
|
|
266
270
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
276
|
-
|
|
271
|
+
if (this.#rightToolbarItems) {
|
|
272
|
+
this.editorContainer.rightToolbar().removeToolbarItems();
|
|
273
|
+
for (const item of this.#rightToolbarItems) {
|
|
274
|
+
this.editorContainer.rightToolbar().appendToolbarItem(item);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (this.#breakpointsActive !== undefined) {
|
|
278
|
+
this.editorContainer.element.classList.toggle('breakpoints-deactivated', !this.#breakpointsActive);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
this.#editorContainerResolve(editorContainer);
|
|
282
|
+
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_SELECTED, this.editorSelected, this);
|
|
283
|
+
this.editorContainer.addEventListener(TabbedEditorContainerEvents.EDITOR_CLOSED, this.editorClosed, this);
|
|
284
|
+
UI.UIUtils.startBatchUpdate();
|
|
285
|
+
for (const uiSourceCode of this.#uiSourceCodes) {
|
|
286
|
+
this.editorContainer.addUISourceCode(uiSourceCode);
|
|
287
|
+
}
|
|
288
|
+
UI.UIUtils.endBatchUpdate();
|
|
289
|
+
}
|
|
277
290
|
}
|
|
278
291
|
|
|
279
292
|
static defaultUISourceCodeScores(): Map<Workspace.UISourceCode.UISourceCode, number> {
|
|
@@ -289,38 +302,103 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
289
302
|
return defaultScores;
|
|
290
303
|
}
|
|
291
304
|
|
|
292
|
-
set
|
|
293
|
-
this.#
|
|
294
|
-
const container = this.editorContainer;
|
|
295
|
-
if (container) {
|
|
296
|
-
container.leftToolbar().removeToolbarItems();
|
|
297
|
-
items.forEach(item => container.leftToolbar().appendToolbarItem(item));
|
|
298
|
-
}
|
|
305
|
+
set onToggleNavigatorSidebar(callback: () => void) {
|
|
306
|
+
this.#onToggleNavigatorSidebar = callback;
|
|
299
307
|
}
|
|
300
308
|
|
|
301
|
-
|
|
302
|
-
|
|
309
|
+
set onToggleDebuggerSidebar(callback: () => void) {
|
|
310
|
+
this.#onToggleDebuggerSidebar = callback;
|
|
303
311
|
}
|
|
304
312
|
|
|
305
|
-
set
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
if (
|
|
309
|
-
|
|
310
|
-
|
|
313
|
+
set isNavigatorSidebarOpen(isOpen: boolean) {
|
|
314
|
+
const isInitialized = this.#navigatorSidebarInitialized;
|
|
315
|
+
this.#navigatorSidebarInitialized = true;
|
|
316
|
+
if (this.#isNavigatorSidebarOpen === isOpen) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
this.#isNavigatorSidebarOpen = isOpen;
|
|
320
|
+
this.#updateNavigatorSidebarButton();
|
|
321
|
+
if (isInitialized) {
|
|
322
|
+
UI.ARIAUtils.LiveAnnouncer.alert(isOpen ? i18nString(UIStrings.navigatorShown) :
|
|
323
|
+
i18nString(UIStrings.navigatorHidden));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
set isDebuggerSidebarOpen(isOpen: boolean) {
|
|
328
|
+
const isInitialized = this.#debuggerSidebarInitialized;
|
|
329
|
+
this.#debuggerSidebarInitialized = true;
|
|
330
|
+
if (this.#isDebuggerSidebarOpen === isOpen) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
this.#isDebuggerSidebarOpen = isOpen;
|
|
334
|
+
this.#updateDebuggerSidebarButton();
|
|
335
|
+
if (isInitialized) {
|
|
336
|
+
UI.ARIAUtils.LiveAnnouncer.alert(isOpen ? i18nString(UIStrings.debuggerShown) :
|
|
337
|
+
i18nString(UIStrings.debuggerHidden));
|
|
311
338
|
}
|
|
312
339
|
}
|
|
313
340
|
|
|
314
|
-
|
|
315
|
-
|
|
341
|
+
#updateNavigatorSidebarButton(): void {
|
|
342
|
+
const navHidden = !this.#isNavigatorSidebarOpen;
|
|
343
|
+
this.#toggleNavigatorSidebarButton.setGlyph(navHidden ? 'left-panel-open' : 'left-panel-close');
|
|
344
|
+
this.#toggleNavigatorSidebarButton.setTitle(navHidden ? i18nString(UIStrings.showNavigator) :
|
|
345
|
+
i18nString(UIStrings.hideNavigator));
|
|
316
346
|
}
|
|
317
347
|
|
|
318
|
-
|
|
319
|
-
|
|
348
|
+
#updateDebuggerSidebarButton(): void {
|
|
349
|
+
const debuggerHidden = !this.#isDebuggerSidebarOpen;
|
|
350
|
+
const debuggerGlyph = debuggerHidden ? (this.#isVertical ? 'right-panel-open' : 'bottom-panel-open') :
|
|
351
|
+
(this.#isVertical ? 'right-panel-close' : 'bottom-panel-close');
|
|
352
|
+
this.#toggleDebuggerSidebarButton.setGlyph(debuggerGlyph);
|
|
353
|
+
this.#toggleDebuggerSidebarButton.setTitle(debuggerHidden ? i18nString(UIStrings.showDebugger) :
|
|
354
|
+
i18nString(UIStrings.hideDebugger));
|
|
320
355
|
}
|
|
321
356
|
|
|
322
|
-
|
|
323
|
-
|
|
357
|
+
toggleDebuggerSidebarButtonEnabled(enabled: boolean): void {
|
|
358
|
+
this.#toggleDebuggerSidebarButton.setEnabled(enabled);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
setLayoutMode(splitWidget: UI.SplitWidget.SplitWidget, isVertical: boolean, isInWrapper: boolean): void {
|
|
362
|
+
this.#bottomToolbarItems = [];
|
|
363
|
+
|
|
364
|
+
if (isVertical || isInWrapper) {
|
|
365
|
+
if (this.#scriptViewToolbar) {
|
|
366
|
+
splitWidget.uninstallResizer(this.#scriptViewToolbar);
|
|
367
|
+
}
|
|
368
|
+
} else if (this.#scriptViewToolbar) {
|
|
369
|
+
splitWidget.installResizer(this.#scriptViewToolbar);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
this.#isVertical = isVertical;
|
|
373
|
+
this.#updateNavigatorSidebarButton();
|
|
374
|
+
this.#updateDebuggerSidebarButton();
|
|
375
|
+
|
|
376
|
+
const leftItems: UI.Toolbar.ToolbarItem[] = [];
|
|
377
|
+
const rightItems: UI.Toolbar.ToolbarItem[] = [];
|
|
378
|
+
|
|
379
|
+
if (!isInWrapper) {
|
|
380
|
+
leftItems.push(this.#toggleNavigatorSidebarButton);
|
|
381
|
+
if (!Root.Runtime.Runtime.isTraceApp()) {
|
|
382
|
+
if (isVertical) {
|
|
383
|
+
rightItems.push(this.#toggleDebuggerSidebarButton);
|
|
384
|
+
} else {
|
|
385
|
+
this.#bottomToolbarItems.push(this.#toggleDebuggerSidebarButton);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
this.#leftToolbarItems = leftItems;
|
|
391
|
+
this.#rightToolbarItems = rightItems;
|
|
392
|
+
|
|
393
|
+
if (this.editorContainer) {
|
|
394
|
+
const editorContainer = this.editorContainer;
|
|
395
|
+
editorContainer.leftToolbar().removeToolbarItems();
|
|
396
|
+
leftItems.forEach(item => editorContainer.leftToolbar().appendToolbarItem(item));
|
|
397
|
+
|
|
398
|
+
editorContainer.rightToolbar().removeToolbarItems();
|
|
399
|
+
rightItems.forEach(item => editorContainer.rightToolbar().appendToolbarItem(item));
|
|
400
|
+
}
|
|
401
|
+
this.requestUpdate();
|
|
324
402
|
}
|
|
325
403
|
|
|
326
404
|
override wasShown(): void {
|
|
@@ -334,7 +412,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
334
412
|
}
|
|
335
413
|
|
|
336
414
|
searchableView(): UI.SearchableView.SearchableView {
|
|
337
|
-
return this.#
|
|
415
|
+
return this.#searchableViewFactory();
|
|
338
416
|
}
|
|
339
417
|
|
|
340
418
|
visibleView(): UI.Widget.Widget|null {
|
|
@@ -437,16 +515,16 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
437
515
|
const view = this.visibleView();
|
|
438
516
|
if (view instanceof UI.View.SimpleView) {
|
|
439
517
|
void view.toolbarItems().then(items => {
|
|
440
|
-
this.#scriptViewToolbar.removeToolbarItems();
|
|
441
518
|
if (Array.isArray(items)) {
|
|
442
|
-
|
|
519
|
+
this.#scriptViewToolbarItems = items;
|
|
443
520
|
} else {
|
|
444
521
|
const wrapper = document.createElement('div');
|
|
445
522
|
wrapper.style.display = 'contents';
|
|
446
523
|
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
447
524
|
render(items, wrapper);
|
|
448
|
-
this.#
|
|
525
|
+
this.#scriptViewToolbarItems = [new UI.Toolbar.ToolbarItem(wrapper)];
|
|
449
526
|
}
|
|
527
|
+
this.requestUpdate();
|
|
450
528
|
});
|
|
451
529
|
}
|
|
452
530
|
}
|
|
@@ -454,6 +532,9 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
454
532
|
async showSourceLocation(uiSourceCode: Workspace.UISourceCode.UISourceCode,
|
|
455
533
|
location?: SourceFrame.SourceFrame.RevealPosition, omitFocus?: boolean,
|
|
456
534
|
omitHighlight?: boolean): Promise<void> {
|
|
535
|
+
if (!this.editorContainer) {
|
|
536
|
+
await this.#editorContainerPromise;
|
|
537
|
+
}
|
|
457
538
|
const currentFrame = this.currentSourceFrame();
|
|
458
539
|
if (currentFrame) {
|
|
459
540
|
this.historyManager.updateCurrentState(currentFrame.uiSourceCode(),
|
|
@@ -574,7 +655,7 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
574
655
|
// SourcesNavigator does not need to update on EditorClosed.
|
|
575
656
|
this.removeToolbarChangedListener();
|
|
576
657
|
this.updateScriptViewToolbarItems();
|
|
577
|
-
this
|
|
658
|
+
this.searchableView().resetSearch();
|
|
578
659
|
|
|
579
660
|
const data = {
|
|
580
661
|
uiSourceCode,
|
|
@@ -590,11 +671,11 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
590
671
|
}
|
|
591
672
|
const currentSourceFrame = event.data.currentView instanceof UISourceCodeFrame ? event.data.currentView : null;
|
|
592
673
|
if (currentSourceFrame) {
|
|
593
|
-
currentSourceFrame.setSearchableView(this
|
|
674
|
+
currentSourceFrame.setSearchableView(this.searchableView());
|
|
594
675
|
}
|
|
595
676
|
|
|
596
|
-
this
|
|
597
|
-
this
|
|
677
|
+
this.searchableView().setReplaceable(Boolean(currentSourceFrame?.canEditSource()));
|
|
678
|
+
this.searchableView().refreshSearch();
|
|
598
679
|
this.updateToolbarChangedListener();
|
|
599
680
|
this.updateScriptViewToolbarItems();
|
|
600
681
|
|
|
@@ -728,8 +809,18 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
728
809
|
uiSourceCodeFrame.commitEditing();
|
|
729
810
|
}
|
|
730
811
|
|
|
812
|
+
#searchableViewFactory = (): UI.SearchableView.SearchableView => {
|
|
813
|
+
if (!this.#searchableView) {
|
|
814
|
+
this.#searchableView = new UI.SearchableView.SearchableView(this, this, 'sources.search-sources-tab');
|
|
815
|
+
this.#searchableView.setMinimalSearchQuerySize(0);
|
|
816
|
+
}
|
|
817
|
+
return this.#searchableView;
|
|
818
|
+
};
|
|
819
|
+
|
|
731
820
|
toggleBreakpointsActiveState(active: boolean): void {
|
|
732
|
-
this
|
|
821
|
+
this.#breakpointsActive = active;
|
|
822
|
+
this.editorContainer?.element.classList.toggle('breakpoints-deactivated', !active);
|
|
823
|
+
this.requestUpdate();
|
|
733
824
|
}
|
|
734
825
|
}
|
|
735
826
|
|