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,182 @@
|
|
|
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 Common from '../../../core/common/common.js';
|
|
6
|
+
import * as Host from '../../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
|
+
import * as AiCodeGeneration from '../../../models/ai_code_generation/ai_code_generation.js';
|
|
9
|
+
import * as PanelCommon from '../../../panels/common/common.js';
|
|
10
|
+
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
11
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
12
|
+
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
13
|
+
|
|
14
|
+
import {AiCodeCompletionTeaserPlaceholder} from './AiCodeCompletionTeaserPlaceholder.js';
|
|
15
|
+
import type {TextEditor} from './TextEditor.js';
|
|
16
|
+
|
|
17
|
+
export enum AiCodeGenerationTeaserMode {
|
|
18
|
+
ACTIVE = 'active',
|
|
19
|
+
DISMISSED = 'dismissed',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const setAiCodeGenerationTeaserMode = CodeMirror.StateEffect.define<AiCodeGenerationTeaserMode>();
|
|
23
|
+
|
|
24
|
+
const aiCodeGenerationTeaserModeState = CodeMirror.StateField.define<AiCodeGenerationTeaserMode>({
|
|
25
|
+
create: () => AiCodeGenerationTeaserMode.ACTIVE,
|
|
26
|
+
update(value, tr) {
|
|
27
|
+
return tr.effects.find(effect => effect.is(setAiCodeGenerationTeaserMode))?.value ?? value;
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export class AiCodeGenerationProvider {
|
|
32
|
+
#devtoolsLocale: string;
|
|
33
|
+
#aiCodeCompletionSetting = Common.Settings.Settings.instance().createSetting('ai-code-completion-enabled', false);
|
|
34
|
+
#generationTeaserCompartment = new CodeMirror.Compartment();
|
|
35
|
+
#generationTeaser: PanelCommon.AiCodeGenerationTeaser;
|
|
36
|
+
#editor?: TextEditor;
|
|
37
|
+
|
|
38
|
+
#boundOnUpdateAiCodeGenerationState = this.#updateAiCodeGenerationState.bind(this);
|
|
39
|
+
|
|
40
|
+
private constructor() {
|
|
41
|
+
this.#devtoolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance().locale;
|
|
42
|
+
if (!AiCodeGeneration.AiCodeGeneration.AiCodeGeneration.isAiCodeGenerationEnabled(this.#devtoolsLocale)) {
|
|
43
|
+
throw new Error('AI code generation feature is not enabled.');
|
|
44
|
+
}
|
|
45
|
+
this.#generationTeaser = new PanelCommon.AiCodeGenerationTeaser();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static createInstance(): AiCodeGenerationProvider {
|
|
49
|
+
return new AiCodeGenerationProvider();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
extension(): CodeMirror.Extension[] {
|
|
53
|
+
return [
|
|
54
|
+
CodeMirror.EditorView.updateListener.of(update => this.activateTeaser(update)),
|
|
55
|
+
aiCodeGenerationTeaserModeState,
|
|
56
|
+
this.#generationTeaserCompartment.of([]),
|
|
57
|
+
CodeMirror.Prec.highest(CodeMirror.keymap.of(this.#editorKeymap())),
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
dispose(): void {
|
|
62
|
+
this.#cleanupAiCodeGeneration();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
editorInitialized(editor: TextEditor): void {
|
|
66
|
+
this.#editor = editor;
|
|
67
|
+
Host.AidaClient.HostConfigTracker.instance().addEventListener(
|
|
68
|
+
Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED, this.#boundOnUpdateAiCodeGenerationState);
|
|
69
|
+
this.#aiCodeCompletionSetting.addChangeListener(this.#boundOnUpdateAiCodeGenerationState);
|
|
70
|
+
void this.#updateAiCodeGenerationState();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#setupAiCodeGeneration(): void {
|
|
74
|
+
this.#editor?.dispatch({
|
|
75
|
+
effects:
|
|
76
|
+
[this.#generationTeaserCompartment.reconfigure([aiCodeGenerationTeaserExtension(this.#generationTeaser)])],
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#cleanupAiCodeGeneration(): void {
|
|
81
|
+
this.#editor?.dispatch({
|
|
82
|
+
effects: [this.#generationTeaserCompartment.reconfigure([])],
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async #updateAiCodeGenerationState(): Promise<void> {
|
|
87
|
+
const aidaAvailability = await Host.AidaClient.AidaClient.checkAccessPreconditions();
|
|
88
|
+
const isAvailable = aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE;
|
|
89
|
+
const isEnabled = this.#aiCodeCompletionSetting.get();
|
|
90
|
+
if (isAvailable && isEnabled) {
|
|
91
|
+
this.#setupAiCodeGeneration();
|
|
92
|
+
} else {
|
|
93
|
+
this.#cleanupAiCodeGeneration();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
#editorKeymap(): readonly CodeMirror.KeyBinding[] {
|
|
98
|
+
return [
|
|
99
|
+
{
|
|
100
|
+
key: 'Escape',
|
|
101
|
+
run: (): boolean => {
|
|
102
|
+
if (!this.#editor || !this.#generationTeaser.isShowing() || !this.#generationTeaser.loading) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
this.#editor.dispatch({effects: setAiCodeGenerationTeaserMode.of(AiCodeGenerationTeaserMode.DISMISSED)});
|
|
106
|
+
return true;
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
any: (_view: unknown, event: KeyboardEvent) => {
|
|
111
|
+
if (!this.#editor || !this.#generationTeaser.isShowing()) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
if (UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event)) {
|
|
115
|
+
if (event.key === 'i') {
|
|
116
|
+
event.consume(true);
|
|
117
|
+
void VisualLogging.logKeyDown(event.currentTarget, event, 'ai-code-generation.triggered');
|
|
118
|
+
this.#generationTeaser.loading = true;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async activateTeaser(update: CodeMirror.ViewUpdate): Promise<void> {
|
|
129
|
+
const currentTeaserMode = update.state.field(aiCodeGenerationTeaserModeState);
|
|
130
|
+
if (currentTeaserMode === AiCodeGenerationTeaserMode.ACTIVE) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (!update.docChanged && update.state.selection.main.head === update.startState.selection.main.head) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
update.view.dispatch({effects: setAiCodeGenerationTeaserMode.of(AiCodeGenerationTeaserMode.ACTIVE)});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// TODO(b/445899453): Handle teaser's discovery mode
|
|
141
|
+
function aiCodeGenerationTeaserExtension(teaser: PanelCommon.AiCodeGenerationTeaser): CodeMirror.Extension {
|
|
142
|
+
return CodeMirror.ViewPlugin.fromClass(class {
|
|
143
|
+
#teaserMode: AiCodeGenerationTeaserMode;
|
|
144
|
+
|
|
145
|
+
constructor(readonly view: CodeMirror.EditorView) {
|
|
146
|
+
this.#teaserMode = view.state.field(aiCodeGenerationTeaserModeState);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
update(update: CodeMirror.ViewUpdate): void {
|
|
150
|
+
const currentTeaserMode = update.state.field(aiCodeGenerationTeaserModeState);
|
|
151
|
+
if (currentTeaserMode !== this.#teaserMode) {
|
|
152
|
+
this.#teaserMode = currentTeaserMode;
|
|
153
|
+
}
|
|
154
|
+
if (!update.docChanged && update.state.selection.main.head === update.startState.selection.main.head) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (teaser.loading) {
|
|
158
|
+
teaser.loading = false;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
get decorations(): CodeMirror.DecorationSet {
|
|
163
|
+
if (this.#teaserMode === AiCodeGenerationTeaserMode.DISMISSED) {
|
|
164
|
+
return CodeMirror.Decoration.none;
|
|
165
|
+
}
|
|
166
|
+
const cursorPosition = this.view.state.selection.main.head;
|
|
167
|
+
const line = this.view.state.doc.lineAt(cursorPosition);
|
|
168
|
+
// TODO(b/445899453): Detect all types of comments
|
|
169
|
+
const isComment = line.text.startsWith('//');
|
|
170
|
+
const isCursorAtEndOfLine = cursorPosition >= line.to;
|
|
171
|
+
if (!isComment || !isCursorAtEndOfLine) {
|
|
172
|
+
return CodeMirror.Decoration.none;
|
|
173
|
+
}
|
|
174
|
+
return CodeMirror.Decoration.set([
|
|
175
|
+
CodeMirror.Decoration.widget({widget: new AiCodeCompletionTeaserPlaceholder(teaser), side: 1})
|
|
176
|
+
.range(cursorPosition),
|
|
177
|
+
]);
|
|
178
|
+
}
|
|
179
|
+
}, {
|
|
180
|
+
decorations: v => v.decorations,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
export * as AiCodeCompletionProvider from './AiCodeCompletionProvider.js';
|
|
6
6
|
export * as AiCodeCompletionTeaserPlaceholder from './AiCodeCompletionTeaserPlaceholder.js';
|
|
7
|
+
export * as AiCodeGenerationProvider from './AiCodeGenerationProvider.js';
|
|
7
8
|
export * as AutocompleteHistory from './AutocompleteHistory.js';
|
|
8
9
|
export * as Config from './config.js';
|
|
9
10
|
export * as ExecutionPositionHighlighter from './ExecutionPositionHighlighter.js';
|
|
@@ -58,7 +58,11 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
58
58
|
* @see https://en.wikipedia.org/wiki/UTM_parameters
|
|
59
59
|
*/
|
|
60
60
|
export function openInNewTab(url: URL|string): void {
|
|
61
|
-
url = new URL(
|
|
61
|
+
url = new URL(url);
|
|
62
|
+
if (Common.ParsedURL.schemeIs(url, 'javascript:')) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
// Navigating to a chrome:// link via a normal anchor doesn't work, so we "navigate"
|
|
63
67
|
// there using CDP.
|
|
64
68
|
if (Common.ParsedURL.schemeIs(url, 'chrome:')) {
|
|
@@ -14,7 +14,7 @@ const {repeat} = Directives;
|
|
|
14
14
|
*/
|
|
15
15
|
export function getFormatLocalizedString(
|
|
16
16
|
registeredStrings: ThirdPartyI18n.LocalizedStringSet.RegisteredFileStrings, stringId: string,
|
|
17
|
-
placeholders: Record<string,
|
|
17
|
+
placeholders: Record<string, Node|string>): HTMLSpanElement {
|
|
18
18
|
const formatter = registeredStrings.getLocalizedStringSetFor(I18n.DevToolsLocale.DevToolsLocale.instance().locale)
|
|
19
19
|
.getMessageFormatterFor(stringId);
|
|
20
20
|
|
|
@@ -23,7 +23,7 @@ export function getFormatLocalizedString(
|
|
|
23
23
|
if (icuElement.type === /* argumentElement */ 1) {
|
|
24
24
|
const placeholderValue = placeholders[icuElement.value];
|
|
25
25
|
if (placeholderValue) {
|
|
26
|
-
element.append(placeholderValue
|
|
26
|
+
element.append(placeholderValue);
|
|
27
27
|
}
|
|
28
28
|
} else if ('value' in icuElement) {
|
|
29
29
|
element.append(String(icuElement.value));
|
|
@@ -34,14 +34,14 @@ export function getFormatLocalizedString(
|
|
|
34
34
|
|
|
35
35
|
export function getFormatLocalizedStringTemplate(
|
|
36
36
|
registeredStrings: ThirdPartyI18n.LocalizedStringSet.RegisteredFileStrings, stringId: string,
|
|
37
|
-
placeholders: Record<string,
|
|
37
|
+
placeholders: Record<string, Node|string|LitTemplate>): LitTemplate {
|
|
38
38
|
const formatter = registeredStrings.getLocalizedStringSetFor(I18n.DevToolsLocale.DevToolsLocale.instance().locale)
|
|
39
39
|
.getMessageFormatterFor(stringId);
|
|
40
40
|
|
|
41
|
-
return html`<span>${
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
return html`<span>${repeat(formatter.getAst(), icuElement => {
|
|
42
|
+
if (icuElement.type === /* argumentElement */ 1) {
|
|
43
|
+
return placeholders[icuElement.value] ?? nothing;
|
|
44
|
+
}
|
|
45
|
+
return 'value' in icuElement ? String(icuElement.value) : nothing;
|
|
46
|
+
})}</span>`;
|
|
47
47
|
}
|
|
@@ -2,76 +2,33 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../kit.js';
|
|
6
|
+
|
|
5
7
|
import * as Lit from '../../lit/lit.js';
|
|
6
|
-
import {createIcon} from '../kit.js';
|
|
7
8
|
|
|
8
9
|
const {html} = Lit;
|
|
9
10
|
|
|
10
11
|
export function render(container: HTMLElement): void {
|
|
11
|
-
const iconTable = document.createElement('table');
|
|
12
|
-
const header = document.createElement('tr');
|
|
13
|
-
const th1 = document.createElement('th');
|
|
14
|
-
th1.textContent = 'Icon description';
|
|
15
|
-
header.appendChild(th1);
|
|
16
|
-
const th2 = document.createElement('th');
|
|
17
|
-
th2.textContent = 'Icon';
|
|
18
|
-
header.appendChild(th2);
|
|
19
|
-
iconTable.appendChild(header);
|
|
20
|
-
|
|
21
|
-
container.appendChild(iconTable);
|
|
22
|
-
|
|
23
|
-
const row1 = document.createElement('tr');
|
|
24
|
-
const iconDescription1 = document.createElement('td');
|
|
25
|
-
iconDescription1.textContent = 'Programmatically created with default size and color';
|
|
26
|
-
row1.appendChild(iconDescription1);
|
|
27
|
-
|
|
28
|
-
const icon = createIcon('select-element');
|
|
29
|
-
const icon1 = document.createElement('td');
|
|
30
|
-
icon1.appendChild(icon);
|
|
31
|
-
row1.appendChild(icon1);
|
|
32
|
-
|
|
33
|
-
iconTable.appendChild(row1);
|
|
34
|
-
|
|
35
|
-
const row2 = document.createElement('tr');
|
|
36
|
-
const iconDescription2 = document.createElement('td');
|
|
37
|
-
iconDescription2.textContent = 'Programmatically created with custom size and color';
|
|
38
|
-
row2.appendChild(iconDescription2);
|
|
39
|
-
|
|
40
|
-
const otherIcon = createIcon('issue-exclamation-filled');
|
|
41
|
-
otherIcon.classList.toggle('custom-size-and-color');
|
|
42
|
-
const icon2 = document.createElement('td');
|
|
43
|
-
icon2.appendChild(otherIcon);
|
|
44
|
-
row2.appendChild(icon2);
|
|
45
|
-
|
|
46
|
-
iconTable.appendChild(row2);
|
|
47
|
-
|
|
48
|
-
const row3 = document.createElement('tr');
|
|
49
|
-
const iconDescription3 = document.createElement('td');
|
|
50
|
-
iconDescription3.textContent = 'Created through html template with default size and color';
|
|
51
|
-
row3.appendChild(iconDescription3);
|
|
52
|
-
|
|
53
|
-
const icon3 = document.createElement('td');
|
|
54
|
-
Lit.render(
|
|
55
|
-
html`
|
|
56
|
-
<devtools-icon name="select-element"></devtools-icon>
|
|
57
|
-
`,
|
|
58
|
-
icon3);
|
|
59
|
-
row3.appendChild(icon3);
|
|
60
|
-
|
|
61
|
-
iconTable.appendChild(row3);
|
|
62
|
-
|
|
63
|
-
const row4 = document.createElement('tr');
|
|
64
|
-
const iconDescription4 = document.createElement('td');
|
|
65
|
-
iconDescription4.textContent = 'Created through html template with custom size and color';
|
|
66
|
-
row4.appendChild(iconDescription4);
|
|
67
|
-
|
|
68
|
-
const icon4 = document.createElement('td');
|
|
69
12
|
Lit.render(
|
|
70
13
|
html`
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
14
|
+
<table>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>Icon description</th>
|
|
17
|
+
<th>Icon</th>
|
|
18
|
+
</tr>
|
|
19
|
+
<tr>
|
|
20
|
+
<td>Created through html template with default size and color</td>
|
|
21
|
+
<td>
|
|
22
|
+
<devtools-icon name="select-element"></devtools-icon>
|
|
23
|
+
</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td>Created through html template with custom size and color</td>
|
|
27
|
+
<td>
|
|
28
|
+
<devtools-icon name="select-element" class="custom-color small"></devtools-icon>
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
</table>
|
|
32
|
+
`,
|
|
33
|
+
container);
|
|
77
34
|
}
|
package/front_end/ui/kit/kit.ts
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
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 '../kit.js';
|
|
6
|
+
|
|
7
|
+
import * as Lit from '../../lit/lit.js';
|
|
8
|
+
|
|
9
|
+
const {html} = Lit;
|
|
10
|
+
|
|
11
|
+
export function render(container: HTMLElement) {
|
|
12
|
+
// We should stop the click as we have the wiring only in a
|
|
13
|
+
// full DevTools env
|
|
14
|
+
Lit.render(html`<devtools-link @click=${(ev: Event) => ev.consume()}>I am a link</devtools-link>`, container);
|
|
15
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
+
|
|
6
|
+
import * as Platform from '../../../core/platform/platform.js';
|
|
7
|
+
import * as UIHelpers from '../../helpers/helpers.js';
|
|
8
|
+
import {html, render} from '../../lit/lit.js';
|
|
9
|
+
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
10
|
+
|
|
11
|
+
import linkStyles from './link.css.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A simple icon component to handle external links.
|
|
15
|
+
* Handles both normal links `https://example.com`
|
|
16
|
+
* and chrome links `chrome://flags`.
|
|
17
|
+
*
|
|
18
|
+
* html`
|
|
19
|
+
* <devtools-link href=""></devtools-link>
|
|
20
|
+
* `;
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @property href - The href to the place the link wants to navigate
|
|
24
|
+
* @property jslogContext - The `"jslogcontext"` attribute is reflected as a property.
|
|
25
|
+
*
|
|
26
|
+
* @attribute href - The href to the place the link wants to navigate
|
|
27
|
+
* @attribute jslogcontext -
|
|
28
|
+
* The context for the `jslog` attribute. A `jslog`
|
|
29
|
+
* attribute is generated automatically with the
|
|
30
|
+
* provided context.
|
|
31
|
+
*/
|
|
32
|
+
export class Link extends HTMLElement {
|
|
33
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
34
|
+
|
|
35
|
+
static readonly observedAttributes = ['href', 'jslogcontext'];
|
|
36
|
+
|
|
37
|
+
connectedCallback(): void {
|
|
38
|
+
if (!this.hasAttribute('tabindex')) {
|
|
39
|
+
this.setAttribute('tabindex', '0');
|
|
40
|
+
}
|
|
41
|
+
this.#setDefaultTitle();
|
|
42
|
+
|
|
43
|
+
this.setAttribute('role', 'link');
|
|
44
|
+
this.setAttribute('target', '_blank');
|
|
45
|
+
|
|
46
|
+
this.addEventListener('click', this.#onClick);
|
|
47
|
+
this.addEventListener('keydown', this.#onKeyDown);
|
|
48
|
+
this.#render();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
disconnectedCallback(): void {
|
|
52
|
+
this.removeEventListener('click', this.#onClick);
|
|
53
|
+
this.removeEventListener('keydown', this.#onKeyDown);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#handleOpeningLink(event: Event): void {
|
|
57
|
+
const href = this.href as Platform.DevToolsPath.UrlString | undefined;
|
|
58
|
+
if (!href) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
UIHelpers.openInNewTab(href);
|
|
63
|
+
|
|
64
|
+
event.consume();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
get href(): string|null {
|
|
68
|
+
return this.getAttribute('href');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
set href(href: Platform.DevToolsPath.UrlString) {
|
|
72
|
+
this.setAttribute('href', href);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
get jslogContext(): string|null {
|
|
76
|
+
return this.getAttribute('jslogcontext');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
set jslogContext(jslogContext: string) {
|
|
80
|
+
this.setAttribute('jslogcontext', jslogContext);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
#onJslogContextChange(): void {
|
|
84
|
+
const href = this.href;
|
|
85
|
+
if (!href) {
|
|
86
|
+
throw new Error('`href` is a required attribute.');
|
|
87
|
+
}
|
|
88
|
+
const urlForContext = new URL(href);
|
|
89
|
+
urlForContext.search = '';
|
|
90
|
+
const jslogContext = Platform.StringUtilities.toKebabCase(
|
|
91
|
+
this.jslogContext ?? urlForContext.toString(),
|
|
92
|
+
);
|
|
93
|
+
const jslog = VisualLogging.link().track({click: true, keydown: 'Enter|Space'}).context(jslogContext);
|
|
94
|
+
this.setAttribute('jslog', jslog.toString());
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
#setDefaultTitle(): void {
|
|
98
|
+
if (!this.hasAttribute('title') && this.href) {
|
|
99
|
+
this.setAttribute('title', this.href);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
attributeChangedCallback(
|
|
104
|
+
name: string,
|
|
105
|
+
oldValue: string|null,
|
|
106
|
+
newValue: string|null,
|
|
107
|
+
): void {
|
|
108
|
+
if (oldValue !== newValue) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (name === 'jslogcontext') {
|
|
112
|
+
return this.#onJslogContextChange();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (name === 'href') {
|
|
116
|
+
this.#setDefaultTitle();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
this.#render();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
#onClick = (event: Event): void => {
|
|
123
|
+
this.#handleOpeningLink(event);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
#onKeyDown = (event: KeyboardEvent): void => {
|
|
127
|
+
if (Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {
|
|
128
|
+
this.#handleOpeningLink(event);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
#render(): void {
|
|
133
|
+
// clang-format off
|
|
134
|
+
render(
|
|
135
|
+
html`<style>
|
|
136
|
+
${linkStyles}
|
|
137
|
+
</style><slot></slot>`,
|
|
138
|
+
this.#shadow,
|
|
139
|
+
{ host: this },
|
|
140
|
+
);
|
|
141
|
+
// clang-format on
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
customElements.define('devtools-link', Link);
|
|
146
|
+
|
|
147
|
+
declare global {
|
|
148
|
+
interface HTMLElementTagNameMap {
|
|
149
|
+
'devtools-link': Link;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: inline-block;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
text-decoration: underline;
|
|
11
|
+
color: var(--text-link);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
:host {
|
|
16
|
+
background: Highlight;
|
|
17
|
+
color: HighlightText;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host(:focus-visible) {
|
|
22
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
23
|
+
outline-offset: 2px;
|
|
24
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
25
|
+
outline-style: solid !important;
|
|
26
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
27
|
+
}
|
|
@@ -89,6 +89,12 @@ export class EmptyWidget extends VBox {
|
|
|
89
89
|
this.performUpdate();
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
set extraElements(elements: HTMLElement[]) {
|
|
93
|
+
this.#extraElements = elements;
|
|
94
|
+
this.#firstUpdate = false;
|
|
95
|
+
this.requestUpdate();
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
override performUpdate(): void {
|
|
93
99
|
if (this.#firstUpdate) {
|
|
94
100
|
this.#extraElements = [...this.element.children];
|