chrome-devtools-frontend 1.0.1550444 → 1.0.1553956
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/docs/styleguide/ux/components.md +34 -8
- package/eslint.config.mjs +7 -0
- package/front_end/Images/generate-css-vars.js +8 -4
- package/front_end/core/common/Settings.ts +20 -8
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/i18n/collect-ui-strings.js +19 -10
- package/front_end/core/i18n/generate-locales-js.js +4 -4
- package/front_end/core/protocol_client/CDPConnection.ts +1 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +5 -1
- package/front_end/core/root/Runtime.ts +0 -12
- package/front_end/core/sdk/DOMModel.ts +38 -3
- package/front_end/core/sdk/DebuggerModel.ts +9 -4
- package/front_end/core/sdk/IsolateManager.ts +7 -0
- package/front_end/core/sdk/PageResourceLoader.ts +3 -3
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/entrypoints/main/MainImpl.ts +28 -10
- package/front_end/generated/SupportedCSSProperties.js +14 -0
- package/front_end/models/ai_assistance/AiConversation.ts +94 -4
- package/front_end/models/ai_assistance/agents/AiAgent.ts +30 -15
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +179 -41
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +5 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +62 -0
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +1 -7
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +124 -12
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +125 -30
- package/front_end/models/ai_assistance/performance/AICallTree.ts +42 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +12 -0
- package/front_end/models/issues_manager/Issue.ts +1 -0
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/PermissionElementIssue.ts +262 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabled.md +7 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
- package/front_end/models/issues_manager/descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFencedFrameDisallowed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooLarge.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementFontSizeTooSmall.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementGeolocationDeprecated.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidDisplayStyle.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidSizeValue.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidType.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementInvalidTypeActivation.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementLowContrast.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementNonOpaqueColor.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPaddingRightUnsupported.md +6 -0
- package/front_end/models/issues_manager/descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRegistrationFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementRequestInProgress.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementSecurityChecksFailed.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementTypeNotSupported.md +5 -0
- package/front_end/models/issues_manager/descriptions/permissionElementUntrustedEvent.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +37 -18
- package/front_end/models/trace/Processor.ts +14 -15
- package/front_end/models/trace/insights/Common.ts +2 -8
- package/front_end/models/trace/insights/types.ts +12 -2
- package/front_end/models/trace/types/TraceEvents.ts +4 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +28 -6
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +9 -23
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +78 -2
- package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +71 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentFlameChart.ts +126 -0
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +131 -2
- package/front_end/panels/ai_assistance/components/chatView.css +28 -0
- package/front_end/panels/ai_assistance/components/collapsibleAssistanceContentWidget.css +33 -0
- package/front_end/panels/application/AppManifestView.ts +1007 -521
- package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -17
- package/front_end/panels/application/ExtensionStorageItemsView.ts +3 -5
- package/front_end/panels/application/KeyValueStorageItemsView.ts +3 -2
- package/front_end/panels/application/components/BackForwardCacheView.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +46 -45
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +80 -75
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +169 -133
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +74 -93
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +142 -117
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +51 -11
- package/front_end/panels/application/preloading/components/components.ts +0 -2
- package/front_end/panels/common/Annotation.ts +184 -0
- package/front_end/panels/common/AnnotationManager.ts +148 -11
- package/front_end/panels/common/ExtensionView.ts +47 -0
- package/front_end/panels/common/PersistenceUtils.ts +22 -25
- package/front_end/panels/common/annotation.css +40 -0
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsoleInsightTeaser.ts +187 -5
- package/front_end/panels/console/ConsolePinPane.ts +437 -217
- package/front_end/panels/console/ConsolePrompt.ts +32 -223
- package/front_end/panels/console/ConsoleView.ts +67 -66
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -3
- package/front_end/panels/console/consoleInsightTeaser.css +23 -0
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +89 -0
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +2 -2
- package/front_end/panels/elements/ComputedStyleWidget.ts +16 -5
- package/front_end/panels/elements/ElementsPanel.ts +38 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +1 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +313 -353
- package/front_end/panels/elements/ElementsTreeOutline.ts +39 -13
- package/front_end/panels/elements/StylePropertyTreeElement.ts +15 -14
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/emulation/MediaQueryInspector.ts +171 -125
- package/front_end/panels/explain/components/ConsoleInsight.ts +175 -150
- package/front_end/panels/explain/components/consoleInsight.css +348 -347
- package/front_end/panels/issues/AffectedPermissionElementsView.ts +46 -0
- package/front_end/panels/issues/IssueView.ts +2 -0
- package/front_end/panels/issues/IssuesPane.ts +6 -0
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +165 -149
- package/front_end/panels/layer_viewer/Layers3DView.ts +131 -78
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +149 -100
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +90 -64
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +25 -34
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +60 -44
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +170 -151
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +50 -51
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +0 -13
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +20 -18
- package/front_end/panels/mobile_throttling/CalibrationController.ts +3 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -6
- package/front_end/panels/network/NetworkItemView.ts +42 -3
- package/front_end/panels/network/NetworkLogView.ts +10 -11
- package/front_end/panels/network/NetworkPanel.ts +63 -1
- package/front_end/panels/network/RequestInitiatorView.ts +146 -113
- package/front_end/panels/network/components/RequestHeaderSection.css +51 -50
- package/front_end/panels/network/components/RequestHeaderSection.ts +81 -71
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/network/components/RequestHeadersView.ts +26 -11
- package/front_end/panels/network/components/RequestTrustTokensView.css +24 -14
- package/front_end/panels/network/components/RequestTrustTokensView.ts +144 -140
- package/front_end/panels/profiler/IsolateSelector.ts +2 -1
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +49 -33
- package/front_end/panels/recorder/RecorderController.ts +2 -3
- package/front_end/panels/recorder/components/ControlButton.ts +68 -34
- package/front_end/panels/recorder/components/CreateRecordingView.ts +9 -6
- package/front_end/panels/recorder/components/RecordingView.ts +81 -88
- package/front_end/panels/recorder/components/ReplaySection.ts +226 -145
- package/front_end/panels/recorder/{controllers → components}/SelectorPicker.ts +129 -52
- package/front_end/panels/recorder/components/StepEditor.ts +21 -67
- package/front_end/panels/recorder/components/StepView.ts +222 -180
- package/front_end/panels/recorder/components/TimelineSection.ts +69 -48
- package/front_end/panels/recorder/components/components.ts +2 -2
- package/front_end/panels/recorder/components/selectorPicker.css +14 -0
- package/front_end/panels/recorder/components/stepEditor.css +0 -5
- package/front_end/panels/recorder/components/stepView.css +196 -198
- package/front_end/panels/recorder/extensions/ExtensionManager.ts +4 -48
- package/front_end/panels/recorder/models/ScreenshotUtils.ts +17 -11
- package/front_end/panels/security/CookieControlsView.ts +9 -16
- package/front_end/panels/settings/components/SyncSection.ts +0 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +60 -75
- package/front_end/panels/sources/SourcesPanel.ts +1 -11
- package/front_end/panels/sources/TabbedEditorContainer.ts +11 -8
- package/front_end/panels/sources/ThreadsSidebarPane.ts +96 -101
- package/front_end/panels/sources/threadsSidebarPane.css +6 -5
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +2 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +23 -33
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +4 -3
- package/front_end/panels/timeline/TimelineFlameChartView.ts +12 -0
- package/front_end/panels/timeline/TimelinePanel.ts +3 -5
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +164 -142
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +48 -28
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +18 -23
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +98 -73
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +9 -12
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +262 -291
- package/front_end/panels/timeline/components/Utils.ts +25 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +210 -146
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +8 -20
- package/front_end/panels/timeline/components/insights/Cache.ts +0 -9
- package/front_end/panels/timeline/components/insights/DOMSize.ts +11 -33
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +0 -9
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/EventRef.ts +47 -109
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +0 -9
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +0 -9
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -10
- package/front_end/panels/timeline/components/insights/ImageRef.ts +112 -0
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +91 -0
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +0 -9
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +4 -11
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +0 -9
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +0 -9
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +6 -21
- package/front_end/panels/timeline/components/insights/NodeLink.ts +68 -43
- package/front_end/panels/timeline/components/insights/README.md +2 -3
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +0 -9
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +0 -9
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +0 -9
- package/front_end/panels/timeline/components/insights/Viewport.ts +7 -19
- package/front_end/panels/timeline/components/insights/baseInsightComponent.css +5 -0
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/timeline/components/interactionBreakdown.css +15 -13
- package/front_end/panels/timeline/enable-easter-egg.js +7 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +5 -24
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js +42 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js +90 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +4 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +30 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/LaunchOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +182 -95
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts +96 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +87 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +2 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +4 -22
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js +38 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts +27 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js +85 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +4 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts +18 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js +26 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BluetoothEmulation.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +22 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +2 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js +8 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebWorker.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +31 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +15 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +2 -13
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts +5 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js +16 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/LaunchOptions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +221 -4
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/BluetoothEmulation.ts +103 -0
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +96 -1
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +2 -10
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/BluetoothEmulation.ts +52 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +15 -0
- package/front_end/third_party/puppeteer/package/src/bidi/DeviceRequestPrompt.ts +138 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +10 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +30 -2
- package/front_end/third_party/puppeteer/package/src/bidi/util.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BluetoothEmulation.ts +47 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +33 -3
- package/front_end/third_party/puppeteer/package/src/cdp/CdpSession.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +3 -8
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +8 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +45 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +20 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +5 -17
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +23 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +4 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +153 -13
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +0 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaserPlaceholder.ts +12 -3
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +182 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/helpers/OpenInNewTab.ts +5 -1
- package/front_end/ui/i18n/i18n.ts +9 -9
- package/front_end/ui/kit/icons/Icon.docs.ts +22 -65
- package/front_end/ui/kit/kit.ts +1 -0
- package/front_end/ui/kit/link/Link.docs.ts +15 -0
- package/front_end/ui/kit/link/Link.ts +151 -0
- package/front_end/ui/kit/link/link.css +27 -0
- package/front_end/ui/legacy/EmptyWidget.ts +6 -0
- package/front_end/ui/legacy/Floaty.ts +442 -0
- package/front_end/ui/legacy/InspectorView.ts +12 -0
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +0 -1
- package/front_end/ui/legacy/TabbedPane.ts +131 -53
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +36 -36
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +22 -37
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +31 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +2 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -11
- package/front_end/ui/legacy/floaty.css +77 -0
- package/front_end/ui/legacy/legacy.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +6 -0
- package/inspector_overlay/loadCSS.rollup.js +5 -4
- package/package.json +2 -2
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +0 -99
- package/front_end/panels/recorder/components/SelectButton.ts +0 -304
- package/front_end/panels/recorder/controllers/controllers.ts +0 -7
- package/front_end/ui/components/chrome_link/ChromeLink.ts +0 -76
- package/front_end/ui/components/chrome_link/chromeLink.css +0 -12
- package/front_end/ui/components/chrome_link/chrome_link.ts +0 -9
- /package/front_end/panels/recorder/components/{selectButton.css → replaySection.css} +0 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
7
|
+
import * as Root from '../../core/root/root.js';
|
|
8
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
10
|
+
import * as Logs from '../../models/logs/logs.js';
|
|
11
|
+
import * as Trace from '../../models/trace/trace.js';
|
|
12
|
+
import * as Buttons from '../components/buttons/buttons.js';
|
|
13
|
+
import {html, render, type TemplateResult} from '../lit/lit.js';
|
|
14
|
+
|
|
15
|
+
import {Context} from './Context.js';
|
|
16
|
+
import floatyStyles from './floaty.css.js';
|
|
17
|
+
import {Widget} from './Widget.js';
|
|
18
|
+
|
|
19
|
+
let instance: Floaty|null = null;
|
|
20
|
+
|
|
21
|
+
export const enum FloatyContextTypes {
|
|
22
|
+
ELEMENT_NODE_ID = 'ELEMENT_NODE_ID',
|
|
23
|
+
NETWORK_REQUEST = 'NETWORK_REQUEST',
|
|
24
|
+
PERFORMANCE_EVENT = 'PERFORMANCE_EVENT',
|
|
25
|
+
PERFORMANCE_INSIGHT = 'PERFORMANCE_INSIGHT'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type FloatyContextSelection = SDK.DOMModel.DOMNode|SDK.NetworkRequest.NetworkRequest|
|
|
29
|
+
{event: Trace.Types.Events.Event, traceStartTime: Trace.Types.Timing.Micro}|
|
|
30
|
+
{insight: Trace.Insights.Types.InsightModel, trace: Trace.TraceModel.ParsedTrace};
|
|
31
|
+
|
|
32
|
+
const enum State {
|
|
33
|
+
READONLY = 'readonly',
|
|
34
|
+
INSPECT_MODE = 'inspect',
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class FloatyFlavor {
|
|
38
|
+
selectedContexts: FloatyContextSelection[] = [];
|
|
39
|
+
|
|
40
|
+
constructor(contexts: Set<FloatyContextSelection>) {
|
|
41
|
+
this.selectedContexts = Array.from(contexts);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class Floaty {
|
|
46
|
+
static defaultVisibility = false;
|
|
47
|
+
|
|
48
|
+
#container: HTMLElement;
|
|
49
|
+
#floaty: FloatyUI;
|
|
50
|
+
|
|
51
|
+
#boundKeyDown = this.#onKeyShortcut.bind(this);
|
|
52
|
+
|
|
53
|
+
static exists(): boolean {
|
|
54
|
+
return instance !== null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static instance(opts: {
|
|
58
|
+
forceNew: boolean|null,
|
|
59
|
+
document: Document|null,
|
|
60
|
+
} = {forceNew: null, document: null}): Floaty {
|
|
61
|
+
if (instance) {
|
|
62
|
+
return instance;
|
|
63
|
+
}
|
|
64
|
+
if (!opts.document) {
|
|
65
|
+
throw new Error('document required');
|
|
66
|
+
}
|
|
67
|
+
instance = new Floaty(opts.document);
|
|
68
|
+
return instance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private constructor(document: Document) {
|
|
72
|
+
// eslint-disable-next-line @devtools/no-imperative-dom-api
|
|
73
|
+
this.#container = document.createElement('div');
|
|
74
|
+
this.#container.classList.add('floaty-container');
|
|
75
|
+
this.#floaty = new FloatyUI();
|
|
76
|
+
this.#floaty.markAsRoot();
|
|
77
|
+
this.#insertIntoDOM();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#onKeyShortcut(e: KeyboardEvent): void {
|
|
81
|
+
const origin = e.composedPath().at(0);
|
|
82
|
+
// If the user was typing into an input field, don't make it trigger the Floaty.
|
|
83
|
+
if (origin && (origin instanceof HTMLTextAreaElement || origin instanceof HTMLInputElement)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (e.key === 'f') {
|
|
87
|
+
this.open();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
#insertIntoDOM(): void {
|
|
92
|
+
if (Root.Runtime.hostConfig.devToolsGreenDevUi?.enabled) {
|
|
93
|
+
this.#floaty.show(this.#container);
|
|
94
|
+
document.body.appendChild(this.#container);
|
|
95
|
+
document.body.addEventListener('keydown', this.#boundKeyDown);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
setDevToolsRect(rect: DOMRect): void {
|
|
100
|
+
this.#floaty.devtoolsRect = rect;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
open(): void {
|
|
104
|
+
this.#floaty.open = true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
registerClick(input: Readonly<FloatyClickInput>): void {
|
|
108
|
+
if (this.#floaty.state !== State.INSPECT_MODE) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const type = input.type; // Switching on type, rather than input.type, means TS narrows it properly.
|
|
113
|
+
switch (type) {
|
|
114
|
+
case FloatyContextTypes.ELEMENT_NODE_ID: {
|
|
115
|
+
const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
116
|
+
if (!mainTarget) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const domModel = mainTarget.model(SDK.DOMModel.DOMModel);
|
|
120
|
+
const node = domModel?.nodeForId(input.data.nodeId);
|
|
121
|
+
if (node) {
|
|
122
|
+
this.#floaty.addSelectedContext(node);
|
|
123
|
+
}
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case FloatyContextTypes.NETWORK_REQUEST: {
|
|
127
|
+
const networkRequests = Logs.NetworkLog.NetworkLog.instance().requestsForId(input.data.requestId);
|
|
128
|
+
for (const req of networkRequests) {
|
|
129
|
+
this.#floaty.addSelectedContext(req);
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
case FloatyContextTypes.PERFORMANCE_EVENT: {
|
|
134
|
+
this.#floaty.addSelectedContext(input.data);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
case FloatyContextTypes.PERFORMANCE_INSIGHT: {
|
|
138
|
+
this.#floaty.addSelectedContext(input.data);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
default:
|
|
142
|
+
Platform.assertNever(type, 'Unsupported Floaty Context type');
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
inInspectMode(): boolean {
|
|
147
|
+
return this.#floaty.state === State.INSPECT_MODE;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
deleteContext(context: FloatyContextSelection): void {
|
|
151
|
+
this.#floaty.removeSelectedContext(context);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
type FloatyClickInput = {
|
|
156
|
+
type: FloatyContextTypes.ELEMENT_NODE_ID,
|
|
157
|
+
data: {nodeId: Protocol.DOM.NodeId},
|
|
158
|
+
}|{
|
|
159
|
+
type: FloatyContextTypes.NETWORK_REQUEST,
|
|
160
|
+
data: {requestId: string},
|
|
161
|
+
}|{
|
|
162
|
+
type: FloatyContextTypes.PERFORMANCE_EVENT,
|
|
163
|
+
data: {event: Trace.Types.Events.Event, traceStartTime: Trace.Types.Timing.Micro},
|
|
164
|
+
}|{
|
|
165
|
+
type: FloatyContextTypes.PERFORMANCE_INSIGHT,
|
|
166
|
+
data: {
|
|
167
|
+
insight: Trace.Insights.Types.InsightModel,
|
|
168
|
+
trace: Trace.TraceModel.ParsedTrace,
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export function enabled(): boolean {
|
|
173
|
+
return Root.Runtime.hostConfig.devToolsGreenDevUi?.enabled === true;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function onFloatyOpen(): void {
|
|
177
|
+
if (!enabled()) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
Floaty.instance().open();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export function onFloatyContextDelete(context: FloatyContextSelection): void {
|
|
184
|
+
if (!enabled()) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
Floaty.instance().deleteContext(context);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Registers a click to the Floaty.
|
|
192
|
+
* @returns true if the element was added to the floaty context, and false
|
|
193
|
+
* otherwise. This lets callers determine if this should override the default
|
|
194
|
+
* click behaviour.
|
|
195
|
+
*/
|
|
196
|
+
export function onFloatyClick(input: FloatyClickInput): boolean {
|
|
197
|
+
if (!enabled()) {
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
const floaty = Floaty.instance();
|
|
201
|
+
if (floaty.inInspectMode()) {
|
|
202
|
+
floaty.registerClick(input);
|
|
203
|
+
return true;
|
|
204
|
+
}
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export class FloatyUI extends Widget {
|
|
209
|
+
#view: (input: ViewInput, output: null, target: HTMLElement) => void;
|
|
210
|
+
#dialog: HTMLDialogElement|null = null;
|
|
211
|
+
#initialMouseX = 0;
|
|
212
|
+
#initialMouseY = 0;
|
|
213
|
+
#initialDialogLeft = 0;
|
|
214
|
+
#initialDialogTop = 0;
|
|
215
|
+
#devtoolsRect: DOMRect|null = null;
|
|
216
|
+
#selectedContexts = new Set<FloatyContextSelection>();
|
|
217
|
+
#open = Floaty.defaultVisibility;
|
|
218
|
+
#state = State.READONLY;
|
|
219
|
+
|
|
220
|
+
constructor(element?: HTMLElement, view = VIEW) {
|
|
221
|
+
super(element);
|
|
222
|
+
this.#view = view;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
get devtoolsRect(): DOMRect|null {
|
|
226
|
+
return this.#devtoolsRect;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
get state(): State {
|
|
230
|
+
return this.#state;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
set state(x: State) {
|
|
234
|
+
this.#state = x;
|
|
235
|
+
this.requestUpdate();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
set devtoolsRect(rect: DOMRect) {
|
|
239
|
+
this.#devtoolsRect = rect;
|
|
240
|
+
this.#repositionWithNewRect(rect);
|
|
241
|
+
this.requestUpdate();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
addSelectedContext(context: FloatyContextSelection): void {
|
|
245
|
+
if (this.#selectedContexts.has(context)) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
this.#selectedContexts.add(context);
|
|
250
|
+
Context.instance().setFlavor(FloatyFlavor, new FloatyFlavor(this.#selectedContexts));
|
|
251
|
+
this.requestUpdate();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
removeSelectedContext(context: FloatyContextSelection): void {
|
|
255
|
+
this.#selectedContexts.delete(context);
|
|
256
|
+
this.#state = State.READONLY;
|
|
257
|
+
Context.instance().setFlavor(FloatyFlavor, new FloatyFlavor(this.#selectedContexts));
|
|
258
|
+
this.requestUpdate();
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
get open(): boolean {
|
|
262
|
+
return this.#open;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
set open(open: boolean) {
|
|
266
|
+
this.#open = open;
|
|
267
|
+
this.requestUpdate();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
override wasShown(): void {
|
|
271
|
+
super.wasShown();
|
|
272
|
+
this.requestUpdate();
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
#repositionWithNewRect(rect: DOMRect): void {
|
|
276
|
+
if (!this.#dialog) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const computedStyle = window.getComputedStyle(this.#dialog);
|
|
280
|
+
const currentLeft = parseInt(computedStyle.left, 10);
|
|
281
|
+
const currentTop = parseInt(computedStyle.top, 10);
|
|
282
|
+
this.#dialog.style.left = `${Math.max(currentLeft, rect.left)}px`;
|
|
283
|
+
this.#dialog.style.top = `${Math.max(currentTop, rect.top)}px`;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
#onInspectClick(): void {
|
|
287
|
+
if (this.#state === State.INSPECT_MODE) {
|
|
288
|
+
this.#state = State.READONLY;
|
|
289
|
+
} else {
|
|
290
|
+
this.#state = State.INSPECT_MODE;
|
|
291
|
+
}
|
|
292
|
+
this.requestUpdate();
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
#onDialogClose(e: PointerEvent): void {
|
|
296
|
+
e.preventDefault();
|
|
297
|
+
this.#open = false;
|
|
298
|
+
this.requestUpdate();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
#onContextDelete(context: FloatyContextSelection): (e: MouseEvent) => void {
|
|
302
|
+
return e => {
|
|
303
|
+
e.preventDefault();
|
|
304
|
+
this.removeSelectedContext(context);
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
override performUpdate(): void {
|
|
309
|
+
this.#view(
|
|
310
|
+
{
|
|
311
|
+
open: this.open,
|
|
312
|
+
onDragStart: this.#onDragStart,
|
|
313
|
+
selectedContexts: this.#selectedContexts,
|
|
314
|
+
state: this.#state,
|
|
315
|
+
onInspectClick: this.#onInspectClick.bind(this),
|
|
316
|
+
onDialogClose: this.#onDialogClose.bind(this),
|
|
317
|
+
onContextDelete: this.#onContextDelete.bind(this)
|
|
318
|
+
},
|
|
319
|
+
null, this.contentElement);
|
|
320
|
+
this.#dialog = this.contentElement.querySelector('dialog');
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
#onDragStart = (event: MouseEvent): void => {
|
|
324
|
+
if (!this.#dialog) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
this.#initialMouseX = event.clientX;
|
|
328
|
+
this.#initialMouseY = event.clientY;
|
|
329
|
+
const computedStyle = window.getComputedStyle(this.#dialog);
|
|
330
|
+
this.#initialDialogLeft = parseInt(computedStyle.left, 10);
|
|
331
|
+
this.#initialDialogTop = parseInt(computedStyle.top, 10);
|
|
332
|
+
|
|
333
|
+
document.addEventListener('mousemove', this.#onDrag);
|
|
334
|
+
document.addEventListener('mouseup', this.#onDragEnd);
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
#onDrag = (event: MouseEvent): void => {
|
|
338
|
+
if (!this.#dialog) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const deltaX = event.clientX - this.#initialMouseX;
|
|
342
|
+
const deltaY = event.clientY - this.#initialMouseY;
|
|
343
|
+
|
|
344
|
+
const minLeft = this.#devtoolsRect?.left ?? 0;
|
|
345
|
+
const minTop = this.#devtoolsRect?.top ?? 0;
|
|
346
|
+
const newLeft = Math.max(minLeft, this.#initialDialogLeft + deltaX);
|
|
347
|
+
const newTop = Math.max(minTop, this.#initialDialogTop + deltaY);
|
|
348
|
+
this.#dialog.style.left = `${newLeft}px`;
|
|
349
|
+
this.#dialog.style.top = `${newTop}px`;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
#onDragEnd = (): void => {
|
|
353
|
+
document.removeEventListener('mousemove', this.#onDrag);
|
|
354
|
+
document.removeEventListener('mouseup', this.#onDragEnd);
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
interface ViewInput {
|
|
359
|
+
onDragStart: (event: MouseEvent) => void;
|
|
360
|
+
selectedContexts: ReadonlySet<FloatyContextSelection>;
|
|
361
|
+
open: boolean;
|
|
362
|
+
state: State;
|
|
363
|
+
onInspectClick: () => void;
|
|
364
|
+
onDialogClose: (e: PointerEvent) => void;
|
|
365
|
+
onContextDelete: (item: FloatyContextSelection) => (e: MouseEvent) => void;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
const VIEW = (input: ViewInput, _output: null, target: HTMLElement): void => {
|
|
369
|
+
const contexts = Array.from(input.selectedContexts);
|
|
370
|
+
// clang-format off
|
|
371
|
+
render(html`
|
|
372
|
+
<style>${floatyStyles}</style>
|
|
373
|
+
<dialog ?open=${input.open} @mousedown=${input.onDragStart}>
|
|
374
|
+
<header>
|
|
375
|
+
<span>DevTools context picker</span>
|
|
376
|
+
<devtools-button
|
|
377
|
+
class="close-button"
|
|
378
|
+
@click=${input.onDialogClose}
|
|
379
|
+
.data=${{
|
|
380
|
+
variant: Buttons.Button.Variant.TOOLBAR,
|
|
381
|
+
iconName: 'cross',
|
|
382
|
+
title: 'Close',
|
|
383
|
+
size: Buttons.Button.Size.SMALL,
|
|
384
|
+
} as Buttons.Button.ButtonData}
|
|
385
|
+
></devtools-button>
|
|
386
|
+
</header>
|
|
387
|
+
<section class="body">
|
|
388
|
+
<section class="contexts">
|
|
389
|
+
${contexts.length === 0 ? html`
|
|
390
|
+
<span class="no-context">Select items to add them to the AI agent's context.</span>
|
|
391
|
+
` : html`
|
|
392
|
+
<ul class="floaty-contexts">
|
|
393
|
+
${contexts.map(context => {
|
|
394
|
+
return html`<li>
|
|
395
|
+
<span class="context-item">
|
|
396
|
+
${floatyContextToUI(context)}
|
|
397
|
+
</span>
|
|
398
|
+
<devtools-button
|
|
399
|
+
class="close-button"
|
|
400
|
+
@click=${input.onContextDelete(context)}
|
|
401
|
+
.data=${{
|
|
402
|
+
variant: Buttons.Button.Variant.TOOLBAR,
|
|
403
|
+
iconName: 'cross',
|
|
404
|
+
title: 'Delete',
|
|
405
|
+
size: Buttons.Button.Size.SMALL,
|
|
406
|
+
} as Buttons.Button.ButtonData}
|
|
407
|
+
></devtools-button>
|
|
408
|
+
</li>`;
|
|
409
|
+
})}
|
|
410
|
+
</ul>
|
|
411
|
+
`}
|
|
412
|
+
</section>
|
|
413
|
+
<section class="actions">
|
|
414
|
+
<devtools-button title="Select" @click=${input.onInspectClick}
|
|
415
|
+
.active=${input.state === State.INSPECT_MODE}
|
|
416
|
+
.variant=${Buttons.Button.Variant.TONAL} .iconName=${'select-element'}
|
|
417
|
+
>Select</devtools-button>
|
|
418
|
+
</devtools-toolbar>
|
|
419
|
+
</section>
|
|
420
|
+
</section>
|
|
421
|
+
</dialog>`,
|
|
422
|
+
target);
|
|
423
|
+
// clang-format on
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
function floatyContextToUI(context: FloatyContextSelection): TemplateResult {
|
|
427
|
+
if (context instanceof SDK.NetworkRequest.NetworkRequest) {
|
|
428
|
+
return html`${context.url()}`;
|
|
429
|
+
}
|
|
430
|
+
if (context instanceof SDK.DOMModel.DOMNode) {
|
|
431
|
+
return html`${context.simpleSelector()}`;
|
|
432
|
+
}
|
|
433
|
+
if ('insight' in context) {
|
|
434
|
+
return html`Insight: ${context.insight.title}`;
|
|
435
|
+
}
|
|
436
|
+
if ('event' in context && 'traceStartTime' in context) {
|
|
437
|
+
const time = Trace.Types.Timing.Micro(context.event.ts - context.traceStartTime);
|
|
438
|
+
return html`${context.event.name} @ ${i18n.TimeUtilities.formatMicroSecondsAsMillisFixed(time)}`;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
Platform.assertNever(context, '');
|
|
442
|
+
}
|
|
@@ -19,6 +19,7 @@ import type {Context} from './Context.js';
|
|
|
19
19
|
import type {ContextMenu} from './ContextMenu.js';
|
|
20
20
|
import {Dialog} from './Dialog.js';
|
|
21
21
|
import {DockController, DockState, Events as DockControllerEvents} from './DockController.js';
|
|
22
|
+
import {Floaty} from './Floaty.js';
|
|
22
23
|
import {GlassPane} from './GlassPane.js';
|
|
23
24
|
import {Infobar, Type as InfobarType} from './Infobar.js';
|
|
24
25
|
import {KeyboardShortcut} from './KeyboardShortcut.js';
|
|
@@ -359,6 +360,10 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
359
360
|
this.element.style.setProperty('--devtools-window-top', `${rect.top}px`);
|
|
360
361
|
this.element.style.setProperty('--devtools-window-bottom', `${window.innerHeight - rect.bottom}px`);
|
|
361
362
|
this.element.style.setProperty('--devtools-window-height', `${rect.height}px`);
|
|
363
|
+
|
|
364
|
+
if (Floaty.exists()) {
|
|
365
|
+
Floaty.instance().setDevToolsRect(rect);
|
|
366
|
+
}
|
|
362
367
|
}
|
|
363
368
|
|
|
364
369
|
override wasShown(): void {
|
|
@@ -369,6 +374,13 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
369
374
|
DockController.instance().addEventListener(
|
|
370
375
|
DockControllerEvents.DOCK_SIDE_CHANGED, this.#applyDrawerOrientationForDockSide, this);
|
|
371
376
|
this.#applyDrawerOrientationForDockSide();
|
|
377
|
+
|
|
378
|
+
if (Root.Runtime.hostConfig.devToolsGreenDevUi?.enabled) {
|
|
379
|
+
Floaty.instance({
|
|
380
|
+
forceNew: true,
|
|
381
|
+
document: this.element.ownerDocument,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
372
384
|
}
|
|
373
385
|
|
|
374
386
|
override willHide(): void {
|
|
@@ -182,7 +182,7 @@ export class Section extends VBox {
|
|
|
182
182
|
return row.lastElementChild as HTMLElement;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
appendFlexedField(title: string, textValue?: string):
|
|
185
|
+
appendFlexedField(title: string, textValue?: string): HTMLElement {
|
|
186
186
|
const field = this.appendField(title, textValue);
|
|
187
187
|
field.classList.add('report-field-value-is-flexed');
|
|
188
188
|
return field;
|
|
@@ -24,7 +24,6 @@ export function render(container: HTMLElement) {
|
|
|
24
24
|
function onChange(event: Event): void {
|
|
25
25
|
const menu = event.target;
|
|
26
26
|
if (menu instanceof HTMLSelectElement) {
|
|
27
|
-
// eslint-disable-next-line no-console
|
|
28
27
|
console.log('Option selected: ', menu.value);
|
|
29
28
|
}
|
|
30
29
|
}
|