chrome-devtools-frontend 1.0.1550444 → 1.0.1555174
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/Images/src/spark.svg +10 -0
- 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/core/sdk/ResourceTreeModel.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +28 -10
- package/front_end/generated/SupportedCSSProperties.js +32 -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 +23 -23
- 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/BounceTrackingMitigationsTreeElement.ts +2 -6
- 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/components/BounceTrackingMitigationsView.ts +133 -118
- 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 +30 -26
- 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/CompatibilityTracksAppender.ts +0 -1
- 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/Sidebar.ts +16 -7
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +174 -137
- 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/Checklist.ts +53 -43
- package/front_end/panels/timeline/components/insights/DOMSize.ts +11 -33
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +6 -12
- 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 +11 -14
- 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/components/sidebarInsightsTab.css +50 -48
- 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/settings/SettingCheckbox.ts +4 -6
- 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 +150 -65
- package/front_end/ui/legacy/Widget.ts +1 -3
- 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/legacy/tabbedPane.css +4 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -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
|
@@ -95,9 +95,8 @@ export class CdpWebWorker extends WebWorker {
|
|
|
95
95
|
|
|
96
96
|
override async close(): Promise<void> {
|
|
97
97
|
switch (this.#targetType) {
|
|
98
|
-
case TargetType.SERVICE_WORKER:
|
|
99
|
-
|
|
100
|
-
// For service and shared workers we need to close the target and detach to allow
|
|
98
|
+
case TargetType.SERVICE_WORKER: {
|
|
99
|
+
// For service workers we need to close the target and detach to allow
|
|
101
100
|
// the worker to stop.
|
|
102
101
|
await this.client.connection()?.send('Target.closeTarget', {
|
|
103
102
|
targetId: this.#id,
|
|
@@ -107,6 +106,12 @@ export class CdpWebWorker extends WebWorker {
|
|
|
107
106
|
});
|
|
108
107
|
break;
|
|
109
108
|
}
|
|
109
|
+
case TargetType.SHARED_WORKER: {
|
|
110
|
+
await this.client.connection()?.send('Target.closeTarget', {
|
|
111
|
+
targetId: this.#id,
|
|
112
|
+
});
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
110
115
|
default:
|
|
111
116
|
await this.evaluate(() => {
|
|
112
117
|
self.close();
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type {Browser} from '../api/Browser.js';
|
|
8
8
|
import {_connectToBiDiBrowser} from '../bidi/BrowserConnector.js';
|
|
9
9
|
import {_connectToCdpBrowser} from '../cdp/BrowserConnector.js';
|
|
10
|
-
import {isNode} from '../environment.js';
|
|
10
|
+
import {environment, isNode} from '../environment.js';
|
|
11
11
|
import {assert} from '../util/assert.js';
|
|
12
12
|
import {isErrorLike} from '../util/ErrorLike.js';
|
|
13
13
|
|
|
@@ -84,6 +84,50 @@ async function getConnectionTransport(
|
|
|
84
84
|
connectionTransport: connectionTransport,
|
|
85
85
|
endpointUrl: connectionURL,
|
|
86
86
|
};
|
|
87
|
+
} else if (options.channel && isNode) {
|
|
88
|
+
const {detectBrowserPlatform, resolveDefaultUserDataDir, Browser} =
|
|
89
|
+
await import('@puppeteer/browsers');
|
|
90
|
+
const platform = detectBrowserPlatform();
|
|
91
|
+
if (!platform) {
|
|
92
|
+
throw new Error('Could not detect required browser platform');
|
|
93
|
+
}
|
|
94
|
+
const {convertPuppeteerChannelToBrowsersChannel} = await import(
|
|
95
|
+
'../node/LaunchOptions.js'
|
|
96
|
+
);
|
|
97
|
+
const {join} = await import('node:path');
|
|
98
|
+
const userDataDir = resolveDefaultUserDataDir(
|
|
99
|
+
Browser.CHROME,
|
|
100
|
+
platform,
|
|
101
|
+
convertPuppeteerChannelToBrowsersChannel(options.channel),
|
|
102
|
+
);
|
|
103
|
+
const portPath = join(userDataDir, 'DevToolsActivePort');
|
|
104
|
+
try {
|
|
105
|
+
const portRawValue = await environment.value.fs.promises.readFile(
|
|
106
|
+
portPath,
|
|
107
|
+
'ascii',
|
|
108
|
+
);
|
|
109
|
+
const port = parseInt(portRawValue, 10);
|
|
110
|
+
if (isNaN(port) || port <= 0 || port > 65535) {
|
|
111
|
+
throw new Error(`Invalid port '${portRawValue}' found`);
|
|
112
|
+
}
|
|
113
|
+
const browserWSEndpoint = `ws://localhost:${port}`;
|
|
114
|
+
const WebSocketClass = await getWebSocketTransportClass();
|
|
115
|
+
const connectionTransport = await WebSocketClass.create(
|
|
116
|
+
browserWSEndpoint,
|
|
117
|
+
headers,
|
|
118
|
+
);
|
|
119
|
+
return {
|
|
120
|
+
connectionTransport: connectionTransport,
|
|
121
|
+
endpointUrl: browserWSEndpoint,
|
|
122
|
+
};
|
|
123
|
+
} catch (error) {
|
|
124
|
+
throw new Error(
|
|
125
|
+
`Could not find DevToolsActivePort for ${options.channel} at ${portPath}`,
|
|
126
|
+
{
|
|
127
|
+
cause: error,
|
|
128
|
+
},
|
|
129
|
+
);
|
|
130
|
+
}
|
|
87
131
|
}
|
|
88
132
|
throw new Error('Invalid connection options');
|
|
89
133
|
}
|
|
@@ -38,6 +38,15 @@ export interface SupportedWebDriverCapabilities {
|
|
|
38
38
|
alwaysMatch?: SupportedWebDriverCapability;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export type ChromeReleaseChannel =
|
|
45
|
+
| 'chrome'
|
|
46
|
+
| 'chrome-beta'
|
|
47
|
+
| 'chrome-canary'
|
|
48
|
+
| 'chrome-dev';
|
|
49
|
+
|
|
41
50
|
/**
|
|
42
51
|
* Generic browser options that can be passed when launching any browser or when
|
|
43
52
|
* connecting to an existing browser instance.
|
|
@@ -49,6 +58,17 @@ export interface ConnectOptions {
|
|
|
49
58
|
* @defaultValue `false`
|
|
50
59
|
*/
|
|
51
60
|
acceptInsecureCerts?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* If specified, puppeteer looks for an open WebSocket at the well-known
|
|
63
|
+
* default user data directory for the specified channel and attempts to
|
|
64
|
+
* connect to it using ws://localhost:$ActivePort/devtools/browser. Only works
|
|
65
|
+
* for Chrome and when run in Node.js.
|
|
66
|
+
*
|
|
67
|
+
* This option is experimental when used with puppeteer.connect().
|
|
68
|
+
*
|
|
69
|
+
* @experimental
|
|
70
|
+
*/
|
|
71
|
+
channel?: ChromeReleaseChannel;
|
|
52
72
|
/**
|
|
53
73
|
* Experimental setting to disable monitoring network events by default. When
|
|
54
74
|
* set to `false`, parts of Puppeteer that depend on network events would not
|
|
@@ -11,7 +11,6 @@ import path from 'node:path';
|
|
|
11
11
|
import {
|
|
12
12
|
computeSystemExecutablePath,
|
|
13
13
|
Browser as SupportedBrowsers,
|
|
14
|
-
ChromeReleaseChannel as BrowsersChromeReleaseChannel,
|
|
15
14
|
} from '@puppeteer/browsers';
|
|
16
15
|
|
|
17
16
|
import type {Browser} from '../api/Browser.js';
|
|
@@ -19,7 +18,11 @@ import {debugError} from '../common/util.js';
|
|
|
19
18
|
import {assert} from '../util/assert.js';
|
|
20
19
|
|
|
21
20
|
import {BrowserLauncher, type ResolvedLaunchArgs} from './BrowserLauncher.js';
|
|
22
|
-
import
|
|
21
|
+
import {
|
|
22
|
+
convertPuppeteerChannelToBrowsersChannel,
|
|
23
|
+
type ChromeReleaseChannel,
|
|
24
|
+
type LaunchOptions,
|
|
25
|
+
} from './LaunchOptions.js';
|
|
23
26
|
import type {PuppeteerNode} from './PuppeteerNode.js';
|
|
24
27
|
import {rm} from './util/fs.js';
|
|
25
28
|
|
|
@@ -285,21 +288,6 @@ export class ChromeLauncher extends BrowserLauncher {
|
|
|
285
288
|
}
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
function convertPuppeteerChannelToBrowsersChannel(
|
|
289
|
-
channel: ChromeReleaseChannel,
|
|
290
|
-
): BrowsersChromeReleaseChannel {
|
|
291
|
-
switch (channel) {
|
|
292
|
-
case 'chrome':
|
|
293
|
-
return BrowsersChromeReleaseChannel.STABLE;
|
|
294
|
-
case 'chrome-dev':
|
|
295
|
-
return BrowsersChromeReleaseChannel.DEV;
|
|
296
|
-
case 'chrome-beta':
|
|
297
|
-
return BrowsersChromeReleaseChannel.BETA;
|
|
298
|
-
case 'chrome-canary':
|
|
299
|
-
return BrowsersChromeReleaseChannel.CANARY;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
291
|
/**
|
|
304
292
|
* Extracts all features from the given command-line flag
|
|
305
293
|
* (e.g. `--enable-features`, `--enable-features=`).
|
|
@@ -4,17 +4,33 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import {ChromeReleaseChannel as BrowsersChromeReleaseChannel} from '@puppeteer/browsers';
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
ChromeReleaseChannel,
|
|
11
|
+
ConnectOptions,
|
|
12
|
+
} from '../common/ConnectOptions.js';
|
|
8
13
|
import type {SupportedBrowser} from '../common/SupportedBrowser.js';
|
|
9
14
|
|
|
15
|
+
export type {ChromeReleaseChannel};
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
|
-
* @
|
|
18
|
+
* @internal
|
|
12
19
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
export function convertPuppeteerChannelToBrowsersChannel(
|
|
21
|
+
channel: ChromeReleaseChannel,
|
|
22
|
+
): BrowsersChromeReleaseChannel {
|
|
23
|
+
switch (channel) {
|
|
24
|
+
case 'chrome':
|
|
25
|
+
return BrowsersChromeReleaseChannel.STABLE;
|
|
26
|
+
case 'chrome-dev':
|
|
27
|
+
return BrowsersChromeReleaseChannel.DEV;
|
|
28
|
+
case 'chrome-beta':
|
|
29
|
+
return BrowsersChromeReleaseChannel.BETA;
|
|
30
|
+
case 'chrome-canary':
|
|
31
|
+
return BrowsersChromeReleaseChannel.CANARY;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
18
34
|
|
|
19
35
|
/**
|
|
20
36
|
* Generic launch options that can be passed when launching any browser.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '
|
|
12
|
-
'chrome-headless-shell': '
|
|
13
|
-
firefox: 'stable_145.0.
|
|
11
|
+
chrome: '143.0.7499.40',
|
|
12
|
+
'chrome-headless-shell': '143.0.7499.40',
|
|
13
|
+
firefox: 'stable_145.0.2',
|
|
14
14
|
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"composite": true
|
|
4
4
|
},
|
|
5
5
|
"files": [
|
|
6
|
+
"package/lib/esm/puppeteer/api/BluetoothEmulation.js",
|
|
6
7
|
"package/lib/esm/puppeteer/api/Browser.js",
|
|
7
8
|
"package/lib/esm/puppeteer/api/BrowserContext.js",
|
|
8
9
|
"package/lib/esm/puppeteer/api/CDPSession.js",
|
|
@@ -23,12 +24,14 @@
|
|
|
23
24
|
"package/lib/esm/puppeteer/api/api.js",
|
|
24
25
|
"package/lib/esm/puppeteer/api/locators/locators.js",
|
|
25
26
|
"package/lib/esm/puppeteer/bidi/BidiOverCdp.js",
|
|
27
|
+
"package/lib/esm/puppeteer/bidi/BluetoothEmulation.js",
|
|
26
28
|
"package/lib/esm/puppeteer/bidi/Browser.js",
|
|
27
29
|
"package/lib/esm/puppeteer/bidi/BrowserConnector.js",
|
|
28
30
|
"package/lib/esm/puppeteer/bidi/BrowserContext.js",
|
|
29
31
|
"package/lib/esm/puppeteer/bidi/CDPSession.js",
|
|
30
32
|
"package/lib/esm/puppeteer/bidi/Connection.js",
|
|
31
33
|
"package/lib/esm/puppeteer/bidi/Deserializer.js",
|
|
34
|
+
"package/lib/esm/puppeteer/bidi/DeviceRequestPrompt.js",
|
|
32
35
|
"package/lib/esm/puppeteer/bidi/Dialog.js",
|
|
33
36
|
"package/lib/esm/puppeteer/bidi/ElementHandle.js",
|
|
34
37
|
"package/lib/esm/puppeteer/bidi/ExposedFunction.js",
|
|
@@ -56,6 +59,7 @@
|
|
|
56
59
|
"package/lib/esm/puppeteer/bidi/util.js",
|
|
57
60
|
"package/lib/esm/puppeteer/cdp/Accessibility.js",
|
|
58
61
|
"package/lib/esm/puppeteer/cdp/Binding.js",
|
|
62
|
+
"package/lib/esm/puppeteer/cdp/BluetoothEmulation.js",
|
|
59
63
|
"package/lib/esm/puppeteer/cdp/Browser.js",
|
|
60
64
|
"package/lib/esm/puppeteer/cdp/BrowserConnector.js",
|
|
61
65
|
"package/lib/esm/puppeteer/cdp/BrowserContext.js",
|
|
@@ -8,12 +8,12 @@ import type * as SDK from '../../../core/sdk/sdk.js';
|
|
|
8
8
|
|
|
9
9
|
import {AnnotationType} from './AnnotationType.js';
|
|
10
10
|
|
|
11
|
-
interface BaseAnnotationData {
|
|
11
|
+
export interface BaseAnnotationData {
|
|
12
12
|
id: number;
|
|
13
13
|
type: AnnotationType;
|
|
14
14
|
message: string;
|
|
15
15
|
// Sometimes the anchor for an annotation is not known, but is provided using a
|
|
16
|
-
// string id instead (which can be converted to
|
|
16
|
+
// string id instead (which can be converted to a proper `anchor`).
|
|
17
17
|
lookupId: string;
|
|
18
18
|
// Sometimes we want annotations to anchor to a particular string on the page.
|
|
19
19
|
anchorToString?: string;
|
|
@@ -24,18 +24,35 @@ export interface ElementsAnnotationData extends BaseAnnotationData {
|
|
|
24
24
|
anchor?: SDK.DOMModel.DOMNode;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export interface NetworkRequestAnnotationData extends BaseAnnotationData {
|
|
28
|
+
type: AnnotationType.NETWORK_REQUEST;
|
|
29
|
+
anchor?: SDK.NetworkRequest.NetworkRequest;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface NetworkRequestDetailsAnnotationData extends BaseAnnotationData {
|
|
33
|
+
type: AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS;
|
|
34
|
+
anchor?: SDK.NetworkRequest.NetworkRequest;
|
|
35
|
+
}
|
|
36
|
+
|
|
27
37
|
export const enum Events {
|
|
28
38
|
ANNOTATION_ADDED = 'AnnotationAdded',
|
|
39
|
+
ANNOTATION_DELETED = 'AnnotationDeleted',
|
|
40
|
+
ALL_ANNOTATIONS_DELETED = 'AllAnnotationsDeleted',
|
|
29
41
|
}
|
|
30
42
|
|
|
31
43
|
export interface EventTypes {
|
|
32
44
|
[Events.ANNOTATION_ADDED]: BaseAnnotationData;
|
|
45
|
+
[Events.ANNOTATION_DELETED]: {id: number};
|
|
46
|
+
[Events.ALL_ANNOTATIONS_DELETED]: void;
|
|
33
47
|
}
|
|
34
48
|
|
|
35
49
|
export class AnnotationRepository {
|
|
36
50
|
static #instance: AnnotationRepository|null = null;
|
|
51
|
+
static #hasRepliedGreenDevDisabled = false;
|
|
52
|
+
static #hasShownFlagWarning = false;
|
|
53
|
+
|
|
37
54
|
#events = new Common.ObjectWrapper.ObjectWrapper<EventTypes>();
|
|
38
|
-
#
|
|
55
|
+
#annotationData: BaseAnnotationData[] = [];
|
|
39
56
|
#nextId = 0;
|
|
40
57
|
|
|
41
58
|
static instance(): AnnotationRepository {
|
|
@@ -46,7 +63,17 @@ export class AnnotationRepository {
|
|
|
46
63
|
}
|
|
47
64
|
|
|
48
65
|
static annotationsEnabled(): boolean {
|
|
49
|
-
|
|
66
|
+
const enabled = Boolean(Root.Runtime.hostConfig.devToolsGreenDevUi?.enabled);
|
|
67
|
+
// TODO(finnur): Fix race when Repository is created before feature flags have been set properly.
|
|
68
|
+
if (!enabled) {
|
|
69
|
+
this.#hasRepliedGreenDevDisabled = true;
|
|
70
|
+
} else if (this.#hasRepliedGreenDevDisabled && !this.#hasShownFlagWarning) {
|
|
71
|
+
console.warn(
|
|
72
|
+
'Flag controlling GreenDev has flipped from false to true. ' +
|
|
73
|
+
'Only some callers will expect GreenDev to be enabled, which can lead to unexpected results.');
|
|
74
|
+
this.#hasShownFlagWarning = true;
|
|
75
|
+
}
|
|
76
|
+
return Boolean(enabled);
|
|
50
77
|
}
|
|
51
78
|
|
|
52
79
|
addEventListener<T extends keyof EventTypes>(
|
|
@@ -58,20 +85,65 @@ export class AnnotationRepository {
|
|
|
58
85
|
return this.#events.addEventListener(eventType, listener, thisObject);
|
|
59
86
|
}
|
|
60
87
|
|
|
61
|
-
|
|
88
|
+
getAnnotationDataByType(type: AnnotationType): BaseAnnotationData[] {
|
|
62
89
|
if (!AnnotationRepository.annotationsEnabled()) {
|
|
63
90
|
console.warn('Received query for annotation types with annotations disabled');
|
|
64
91
|
return [];
|
|
65
92
|
}
|
|
66
93
|
|
|
67
|
-
const annotations = this.#
|
|
94
|
+
const annotations = this.#annotationData.filter(annotation => annotation.type === type);
|
|
68
95
|
return annotations;
|
|
69
96
|
}
|
|
70
97
|
|
|
98
|
+
getAnnotationDataById(id: number): BaseAnnotationData|undefined {
|
|
99
|
+
if (!AnnotationRepository.annotationsEnabled()) {
|
|
100
|
+
console.warn('Received query for annotation type with annotations disabled');
|
|
101
|
+
return undefined;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return this.#annotationData.find(annotation => annotation.id === id);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
#getExistingAnnotation(type: AnnotationType, anchor?: SDK.DOMModel.DOMNode|SDK.NetworkRequest.NetworkRequest|string):
|
|
108
|
+
BaseAnnotationData|undefined {
|
|
109
|
+
const annotations = this.getAnnotationDataByType(type);
|
|
110
|
+
const annotation = annotations.find(annotation => {
|
|
111
|
+
if (typeof anchor === 'string') {
|
|
112
|
+
return annotation.lookupId === anchor;
|
|
113
|
+
}
|
|
114
|
+
switch (type) {
|
|
115
|
+
case AnnotationType.ELEMENT_NODE: {
|
|
116
|
+
const elementAnnotation = annotation as ElementsAnnotationData;
|
|
117
|
+
return elementAnnotation.anchor === anchor;
|
|
118
|
+
}
|
|
119
|
+
case AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS: {
|
|
120
|
+
const networkRequestDetailsAnnotation = annotation as NetworkRequestDetailsAnnotationData;
|
|
121
|
+
return networkRequestDetailsAnnotation.anchor === anchor;
|
|
122
|
+
}
|
|
123
|
+
default:
|
|
124
|
+
console.warn('[AnnotationRepository] Unknown AnnotationType', type);
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return annotation;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
#updateExistingAnnotationLabel(
|
|
132
|
+
label: string, type: AnnotationType,
|
|
133
|
+
anchor?: SDK.DOMModel.DOMNode|SDK.NetworkRequest.NetworkRequest|string): boolean {
|
|
134
|
+
const annotation = this.#getExistingAnnotation(type, anchor);
|
|
135
|
+
if (annotation) {
|
|
136
|
+
// TODO(finnur): This should work for annotations that have not been displayed yet,
|
|
137
|
+
// but we need to also notify the AnnotationManager for those that have been shown.
|
|
138
|
+
annotation.message = label;
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
|
|
71
144
|
addElementsAnnotation(
|
|
72
145
|
label: string,
|
|
73
|
-
|
|
74
|
-
anchor?: SDK.DOMModel.DOMNode,
|
|
146
|
+
anchor?: SDK.DOMModel.DOMNode|string,
|
|
75
147
|
anchorToString?: string,
|
|
76
148
|
): void {
|
|
77
149
|
if (!AnnotationRepository.annotationsEnabled()) {
|
|
@@ -79,20 +151,88 @@ export class AnnotationRepository {
|
|
|
79
151
|
return;
|
|
80
152
|
}
|
|
81
153
|
|
|
154
|
+
if (this.#updateExistingAnnotationLabel(label, AnnotationType.ELEMENT_NODE, anchor)) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
82
158
|
const annotationData: ElementsAnnotationData = {
|
|
83
159
|
id: this.#nextId++,
|
|
84
160
|
type: AnnotationType.ELEMENT_NODE,
|
|
85
161
|
message: label,
|
|
86
|
-
lookupId:
|
|
87
|
-
anchor,
|
|
88
|
-
anchorToString
|
|
162
|
+
lookupId: typeof anchor === 'string' ? anchor : '',
|
|
163
|
+
anchor: typeof anchor !== 'string' ? anchor : undefined,
|
|
164
|
+
anchorToString,
|
|
165
|
+
};
|
|
166
|
+
this.#annotationData.push(annotationData);
|
|
167
|
+
// eslint-disable-next-line no-console
|
|
168
|
+
console.log('[AnnotationRepository] Added element annotation:', label, {
|
|
169
|
+
annotationData,
|
|
170
|
+
annotations: this.#annotationData.length,
|
|
171
|
+
});
|
|
172
|
+
this.#events.dispatchEventToListeners(Events.ANNOTATION_ADDED, annotationData);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
addNetworkRequestAnnotation(
|
|
176
|
+
label: string,
|
|
177
|
+
anchor?: SDK.NetworkRequest.NetworkRequest|string,
|
|
178
|
+
anchorToString?: string,
|
|
179
|
+
): void {
|
|
180
|
+
if (!AnnotationRepository.annotationsEnabled()) {
|
|
181
|
+
console.warn('Received annotation registration with annotations disabled');
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// We only need to update the NETWORK_REQUEST_SUBPANEL_HEADERS because the
|
|
186
|
+
// NETWORK_REQUEST Annotation has no meaningful label.
|
|
187
|
+
if (this.#updateExistingAnnotationLabel(label, AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS, anchor)) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
const annotationData: NetworkRequestAnnotationData = {
|
|
192
|
+
id: this.#nextId++,
|
|
193
|
+
type: AnnotationType.NETWORK_REQUEST,
|
|
194
|
+
message: '',
|
|
195
|
+
lookupId: typeof anchor === 'string' ? anchor : '',
|
|
196
|
+
anchor: typeof anchor !== 'string' ? anchor : undefined,
|
|
197
|
+
anchorToString,
|
|
89
198
|
};
|
|
90
|
-
this.#
|
|
199
|
+
this.#annotationData.push(annotationData);
|
|
91
200
|
// eslint-disable-next-line no-console
|
|
92
201
|
console.log('[AnnotationRepository] Added annotation:', label, {
|
|
93
202
|
annotationData,
|
|
94
|
-
annotations: this.#
|
|
203
|
+
annotations: this.#annotationData.length,
|
|
95
204
|
});
|
|
96
205
|
this.#events.dispatchEventToListeners(Events.ANNOTATION_ADDED, annotationData);
|
|
206
|
+
|
|
207
|
+
const annotationDetailsData: NetworkRequestDetailsAnnotationData = {
|
|
208
|
+
id: this.#nextId++,
|
|
209
|
+
type: AnnotationType.NETWORK_REQUEST_SUBPANEL_HEADERS,
|
|
210
|
+
message: label,
|
|
211
|
+
lookupId: typeof anchor === 'string' ? anchor : '',
|
|
212
|
+
anchor: typeof anchor !== 'string' ? anchor : undefined,
|
|
213
|
+
anchorToString,
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
this.#annotationData.push(annotationDetailsData);
|
|
217
|
+
this.#events.dispatchEventToListeners(Events.ANNOTATION_ADDED, annotationDetailsData);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
deleteAllAnnotations(): void {
|
|
221
|
+
this.#annotationData = [];
|
|
222
|
+
this.#events.dispatchEventToListeners(Events.ALL_ANNOTATIONS_DELETED);
|
|
223
|
+
// eslint-disable-next-line no-console
|
|
224
|
+
console.log('[AnnotationRepository] Deleting all annotations');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
deleteAnnotation(id: number): void {
|
|
228
|
+
const index = this.#annotationData.findIndex(annotation => annotation.id === id);
|
|
229
|
+
if (index === -1) {
|
|
230
|
+
console.warn(`[AnnotationRepository] Could not find annotation with id ${id}`);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.#annotationData.splice(index, 1);
|
|
234
|
+
this.#events.dispatchEventToListeners(Events.ANNOTATION_DELETED, {id});
|
|
235
|
+
// eslint-disable-next-line no-console
|
|
236
|
+
console.log(`[AnnotationRepository] Deleted annotation with id ${id}`);
|
|
97
237
|
}
|
|
98
238
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import '../tooltips/tooltips.js';
|
|
7
7
|
import './SettingDeprecationWarning.js';
|
|
8
|
-
import '../../
|
|
8
|
+
import '../../kit/kit.js';
|
|
9
9
|
|
|
10
10
|
import type * as Common from '../../../core/common/common.js';
|
|
11
11
|
import * as Host from '../../../core/host/host.js';
|
|
@@ -90,13 +90,11 @@ export class SettingCheckbox extends HTMLElement {
|
|
|
90
90
|
<devtools-tooltip id=${id} variant="rich">
|
|
91
91
|
<span>${learnMore.tooltip()}</span><br />
|
|
92
92
|
${url
|
|
93
|
-
? html`<
|
|
93
|
+
? html`<devtools-link
|
|
94
94
|
href=${url}
|
|
95
95
|
class="link"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
})}
|
|
99
|
-
>${i18nString(UIStrings.learnMore)}</x-link
|
|
96
|
+
.jslogContext=${jsLogContext}
|
|
97
|
+
>${i18nString(UIStrings.learnMore)}</devtools-link
|
|
100
98
|
>`
|
|
101
99
|
: Lit.nothing}
|
|
102
100
|
</devtools-tooltip>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
5
|
|
|
6
|
-
import type * as PanelCommon from '../../../panels/common/common.js';
|
|
7
6
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
7
|
+
import type * as UI from '../../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
9
|
export function flattenRect(rect: DOMRect, left: boolean): {
|
|
10
10
|
left: number,
|
|
@@ -16,8 +16,17 @@ export function flattenRect(rect: DOMRect, left: boolean): {
|
|
|
16
16
|
return {left: x, right: x, top: rect.top, bottom: rect.bottom};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// TODO(b/462393094): Rename this to be a generic accessible placeholder
|
|
20
|
+
/**
|
|
21
|
+
* A CodeMirror WidgetType that displays a UI.Widget.Widget as a placeholder.
|
|
22
|
+
*
|
|
23
|
+
* This custom placeholder implementation is used in place of the default
|
|
24
|
+
* CodeMirror placeholder to provide better accessibility. Specifically,
|
|
25
|
+
* it ensures that screen readers can properly announce the content within
|
|
26
|
+
* the encapsulated widget.
|
|
27
|
+
*/
|
|
19
28
|
export class AiCodeCompletionTeaserPlaceholder extends CM.WidgetType {
|
|
20
|
-
constructor(readonly teaser:
|
|
29
|
+
constructor(readonly teaser: UI.Widget.Widget) {
|
|
21
30
|
super();
|
|
22
31
|
}
|
|
23
32
|
|
|
@@ -64,7 +73,7 @@ export class AiCodeCompletionTeaserPlaceholder extends CM.WidgetType {
|
|
|
64
73
|
}
|
|
65
74
|
}
|
|
66
75
|
|
|
67
|
-
export function aiCodeCompletionTeaserPlaceholder(teaser:
|
|
76
|
+
export function aiCodeCompletionTeaserPlaceholder(teaser: UI.Widget.Widget): CM.Extension {
|
|
68
77
|
const plugin = CM.ViewPlugin.fromClass(class {
|
|
69
78
|
placeholder: CM.DecorationSet;
|
|
70
79
|
|