chrome-devtools-frontend 1.0.1362775 → 1.0.1367881
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/.eslintrc.js +1 -0
- package/.stylelintrc.json +2 -1
- package/config/gni/devtools_grd_files.gni +14 -2
- package/config/gni/devtools_image_files.gni +2 -1
- package/docs/contributing/issues.md +15 -0
- package/extensions/cxx_debugging/src/ExtensionOptions.ts +0 -1
- package/extensions/cxx_debugging/third_party/llvm/README.chromium +1 -1
- package/front_end/.eslintrc.js +0 -5
- package/front_end/Images/src/button-magic.svg +3 -0
- package/front_end/Images/src/performance-panel-delete-annotation.svg +32 -0
- package/front_end/Images/src/performance-panel-diagram.svg +19 -14
- package/front_end/Images/src/performance-panel-entry-label.svg +9 -16
- package/front_end/Images/src/performance-panel-time-range.svg +2 -8
- package/front_end/core/common/AppProvider.ts +1 -1
- package/front_end/core/common/Object.ts +2 -7
- package/front_end/core/common/SettingRegistration.ts +1 -1
- package/front_end/core/common/Settings.ts +1 -1
- package/front_end/core/host/AidaClient.ts +7 -1
- package/front_end/core/host/InspectorFrontendHost.ts +1 -1
- package/front_end/core/host/ResourceLoader.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +14 -2
- package/front_end/core/i18n/time-utilities.ts +7 -1
- package/front_end/core/platform/ArrayUtilities.ts +1 -0
- package/front_end/core/platform/DevToolsPath.ts +1 -1
- package/front_end/core/platform/Timing.ts +1 -1
- package/front_end/core/platform/UIString.ts +1 -1
- package/front_end/core/platform/UserVisibleError.ts +1 -1
- package/front_end/core/root/Runtime.ts +11 -2
- package/front_end/core/sdk/AccessibilityModel.ts +3 -4
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -4
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -3
- package/front_end/core/sdk/CSSLayer.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.test.ts +1 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +10 -2
- package/front_end/core/sdk/CSSMedia.ts +2 -2
- package/front_end/core/sdk/CSSMetadata.ts +21 -0
- package/front_end/core/sdk/CSSModel.ts +1 -0
- package/front_end/core/sdk/CSSProperty.ts +2 -2
- package/front_end/core/sdk/CSSQuery.ts +2 -2
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/CSSScope.ts +2 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +3 -3
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/CSSSupports.ts +2 -2
- package/front_end/core/sdk/CookieModel.ts +1 -1
- package/front_end/core/sdk/DOMDebuggerModel.ts +1 -1
- package/front_end/core/sdk/DebuggerModel.ts +9 -3
- package/front_end/core/sdk/EnhancedTracesParser.test.ts +1 -5
- package/front_end/core/sdk/EnhancedTracesParser.ts +2 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +1 -2
- package/front_end/core/sdk/FrameAssociated.ts +1 -1
- package/front_end/core/sdk/FrameManager.ts +9 -7
- package/front_end/core/sdk/HeapProfilerModel.ts +3 -4
- package/front_end/core/sdk/IsolateManager.ts +2 -3
- package/front_end/core/sdk/LayerTreeBase.ts +2 -2
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/OverlayModel.ts +2 -2
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +1 -1
- package/front_end/core/sdk/PageLoad.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +3 -3
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SDKModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +5 -5
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +5 -7
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/SourceMapManager.ts +1 -1
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +2 -2
- package/front_end/core/sdk/Target.ts +3 -2
- package/front_end/core/sdk/TargetManager.ts +4 -1
- package/front_end/core/sdk/WebAuthnModel.ts +20 -0
- package/front_end/core/sdk/sdk-meta.ts +7 -0
- package/front_end/devtools_compatibility.js +3 -3
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/IdentityFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/JSONFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +12 -12
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +11 -1
- package/front_end/generated/InspectorBackendCommands.js +5 -3
- package/front_end/generated/SupportedCSSProperties.js +20 -14
- package/front_end/generated/protocol-mapping.d.ts +10 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +32 -1
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +4 -2
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +2 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.test.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
- package/front_end/models/bindings/IgnoreListManager.test.ts +49 -12
- package/front_end/models/bindings/IgnoreListManager.ts +79 -5
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/StylesSourceMapping.ts +11 -6
- package/front_end/models/breakpoints/BreakpointManager.test.ts +1 -1
- package/front_end/models/extensions/ExtensionPanel.ts +1 -1
- package/front_end/models/extensions/ExtensionServer.test.ts +1 -1
- package/front_end/models/extensions/ExtensionServer.ts +1 -1
- package/front_end/models/extensions/ExtensionView.ts +1 -1
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +1 -1
- package/front_end/models/extensions/RecorderPluginManager.ts +1 -1
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +1 -1
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -2
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
- package/front_end/models/issues_manager/CorsIssue.ts +1 -1
- package/front_end/models/issues_manager/HeavyAdIssue.ts +1 -1
- package/front_end/models/issues_manager/Issue.ts +1 -1
- package/front_end/models/issues_manager/IssueResolver.ts +2 -2
- package/front_end/models/issues_manager/IssuesManager.ts +1 -1
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +1 -1
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +1 -1
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/RelatedIssue.ts +1 -1
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +3 -3
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +1 -1
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +1 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +69 -61
- package/front_end/models/live-metrics/LiveMetrics.ts +41 -34
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +1 -1
- package/front_end/models/persistence/EditFileSystemView.ts +1 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +2 -3
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -3
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +2 -2
- package/front_end/models/text_utils/ContentProvider.ts +3 -3
- package/front_end/models/text_utils/StaticContentProvider.ts +1 -5
- package/front_end/models/text_utils/TextUtils.ts +1 -1
- package/front_end/models/text_utils/WasmDisassembly.ts +1 -1
- package/front_end/models/timeline_model/TimelineProfileTree.test.ts +21 -21
- package/front_end/models/timeline_model/TimelineProfileTree.ts +1 -1
- package/front_end/models/trace/ModelImpl.test.ts +1 -1
- package/front_end/models/trace/ModelImpl.ts +10 -27
- package/front_end/models/trace/Processor.test.ts +16 -15
- package/front_end/models/trace/Processor.ts +33 -9
- package/front_end/models/trace/extras/FilmStrip.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.test.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +10 -1
- package/front_end/models/trace/handlers/MetaHandler.ts +4 -0
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +1 -1
- package/front_end/models/trace/handlers/RendererHandler.test.ts +1 -1
- package/front_end/models/trace/handlers/SamplesHandler.test.ts +2 -2
- package/front_end/models/trace/handlers/ScreenshotsHandler.test.ts +5 -4
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +7 -5
- package/front_end/models/trace/handlers/Threads.ts +2 -2
- package/front_end/models/trace/handlers/WarningsHandler.ts +1 -1
- package/front_end/models/trace/helpers/Network.ts +20 -2
- package/front_end/models/trace/helpers/SyntheticEvents.test.ts +1 -1
- package/front_end/models/trace/helpers/Trace.test.ts +34 -3
- package/front_end/models/trace/helpers/Trace.ts +12 -0
- package/front_end/models/trace/helpers/TreeHelpers.test.ts +52 -0
- package/front_end/models/trace/helpers/TreeHelpers.ts +80 -1
- package/front_end/models/trace/insights/Common.ts +1 -1
- package/front_end/models/trace/insights/CumulativeLayoutShift.test.ts +24 -2
- package/front_end/models/trace/insights/CumulativeLayoutShift.ts +102 -27
- package/front_end/models/trace/insights/DocumentLatency.test.ts +22 -11
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -6
- package/front_end/models/trace/insights/FontDisplay.ts +5 -1
- package/front_end/models/trace/insights/InteractionToNextPaint.ts +4 -3
- package/front_end/models/trace/insights/LargestContentfulPaint.test.ts +9 -1
- package/front_end/models/trace/insights/LargestContentfulPaint.ts +26 -6
- package/front_end/models/trace/insights/RenderBlocking.test.ts +10 -16
- package/front_end/models/trace/insights/RenderBlocking.ts +6 -4
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -1
- package/front_end/models/trace/insights/ThirdPartyWeb.ts +15 -2
- package/front_end/models/trace/insights/Viewport.ts +1 -0
- package/front_end/models/trace/insights/types.ts +14 -11
- package/front_end/models/trace/lantern/graph/BaseNode.ts +2 -2
- package/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +4 -3
- package/front_end/models/trace/lantern/simulation/TCPConnection.ts +1 -1
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +1 -1
- package/front_end/models/trace/root-causes/LayoutShift.ts +3 -20
- package/front_end/models/trace/types/Extensions.ts +3 -7
- package/front_end/models/trace/types/File.ts +2 -8
- package/front_end/models/trace/types/TraceEvents.ts +10 -4
- package/front_end/models/workspace/UISourceCode.test.ts +3 -3
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationModel.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.test.ts +90 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +123 -20
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +1 -1
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/DOMStorageItemsView.ts +4 -2
- package/front_end/panels/application/ExtensionStorageItemsView.test.ts +89 -0
- package/front_end/panels/application/ExtensionStorageItemsView.ts +219 -0
- package/front_end/panels/application/ExtensionStorageModel.test.ts +12 -0
- package/front_end/panels/application/ExtensionStorageModel.ts +56 -13
- package/front_end/panels/application/IndexedDBViews.ts +14 -19
- package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ResourcesPanel.ts +18 -1
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -1
- package/front_end/panels/application/SharedStorageListTreeElement.ts +1 -1
- package/front_end/panels/application/SharedStorageTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +76 -72
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +32 -29
- package/front_end/panels/application/components/EndpointsGrid.ts +5 -4
- package/front_end/panels/application/components/FrameDetailsView.ts +110 -127
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +11 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +36 -34
- package/front_end/panels/application/components/PermissionsPolicySection.ts +31 -33
- package/front_end/panels/application/components/ProtocolHandlersView.ts +15 -14
- package/front_end/panels/application/components/ReportsGrid.ts +11 -9
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +0 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +11 -11
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +16 -14
- package/front_end/panels/application/components/StackTrace.ts +18 -17
- package/front_end/panels/application/components/StorageMetadataView.ts +19 -18
- package/front_end/panels/application/components/TrustTokensView.ts +17 -16
- package/front_end/panels/application/preloading/PreloadingView.ts +14 -11
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +7 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +42 -45
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +13 -11
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +11 -9
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +5 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +10 -8
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +20 -16
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +50 -57
- package/front_end/panels/application/resourcesSidebar.css +0 -3
- package/front_end/panels/autofill/AutofillView.ts +19 -14
- package/front_end/panels/console/ConsoleFilter.ts +1 -1
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -2
- package/front_end/panels/console/consoleView.css +4 -3
- package/front_end/panels/coverage/CoverageDecorationManager.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +2 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +5 -7
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +12 -10
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +9 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +6 -4
- package/front_end/panels/elements/ElementsPanel.ts +7 -6
- package/front_end/panels/elements/ElementsTreeElement.ts +35 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/PropertyMatchers.test.ts +57 -0
- package/front_end/panels/elements/PropertyMatchers.ts +78 -1
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertiesSection.test.ts +1 -0
- package/front_end/panels/elements/StylePropertyHighlighter.test.ts +1 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.test.ts +36 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +72 -26
- package/front_end/panels/elements/StylesSidebarPane.test.ts +2 -0
- package/front_end/panels/elements/TopLayerContainer.ts +1 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +8 -7
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +3 -4
- package/front_end/panels/elements/components/AnchorFunctionLinkSwatch.ts +8 -7
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +3 -2
- package/front_end/panels/elements/components/CSSQuery.ts +0 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +1 -3
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +0 -1
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +0 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +15 -11
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +6 -4
- package/front_end/panels/elements/components/LayoutPane.ts +8 -7
- package/front_end/panels/elements/components/QueryContainer.test.ts +2 -3
- package/front_end/panels/elements/components/QueryContainer.ts +10 -9
- package/front_end/panels/elements/components/StylePropertyEditor.ts +4 -4
- package/front_end/panels/elements/components/computedStyleProperty.css +2 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -2
- package/front_end/panels/elements/elementsTreeOutline.css +17 -0
- package/front_end/panels/elements/stylesSidebarPane.css +2 -2
- package/front_end/panels/emulation/DeviceModeWrapper.ts +1 -1
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +3 -1
- package/front_end/panels/explain/components/ConsoleInsight.ts +47 -46
- package/front_end/panels/explain/components/consoleInsight.css +0 -9
- package/front_end/panels/freestyler/AiAgent.ts +8 -2
- package/front_end/panels/freestyler/DrJonesFileAgent.test.ts +201 -0
- package/front_end/panels/freestyler/DrJonesFileAgent.ts +196 -0
- package/front_end/panels/freestyler/DrJonesNetworkAgent.test.ts +1 -1
- package/front_end/panels/freestyler/DrJonesNetworkAgent.ts +34 -31
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts +195 -0
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.ts +193 -0
- package/front_end/panels/freestyler/FreestylerAgent.test.ts +177 -12
- package/front_end/panels/freestyler/FreestylerAgent.ts +83 -8
- package/front_end/panels/freestyler/FreestylerEvaluateAction.test.ts +21 -1
- package/front_end/panels/freestyler/FreestylerEvaluateAction.ts +3 -0
- package/front_end/panels/freestyler/FreestylerPanel.test.ts +16 -2
- package/front_end/panels/freestyler/FreestylerPanel.ts +126 -15
- package/front_end/panels/freestyler/components/FreestylerChatUi.test.ts +21 -2
- package/front_end/panels/freestyler/components/FreestylerChatUi.ts +294 -145
- package/front_end/panels/freestyler/components/ProvideFeedback.ts +16 -13
- package/front_end/panels/freestyler/components/freestylerChatUi.css +78 -26
- package/front_end/panels/freestyler/freestyler-meta.ts +64 -9
- package/front_end/panels/freestyler/freestyler.ts +2 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +5 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -6
- package/front_end/panels/issues/GenericIssueDetailsView.ts +3 -3
- package/front_end/panels/issues/IssueView.ts +2 -2
- package/front_end/panels/issues/components/ElementsPanelLink.ts +3 -1
- package/front_end/panels/issues/components/HideIssuesMenu.ts +6 -5
- package/front_end/panels/lighthouse/LighthouseController.ts +2 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -6
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +8 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.test.ts +11 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +26 -31
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +5 -5
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +11 -14
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -3
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +5 -4
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +0 -1
- package/front_end/panels/media/EventDisplayTable.ts +1 -1
- package/front_end/panels/media/EventTimelineView.ts +1 -1
- package/front_end/panels/media/PlayerDetailView.ts +3 -3
- package/front_end/panels/media/PlayerListView.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +23 -29
- package/front_end/panels/network/NetworkConfigView.ts +1 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +4 -153
- package/front_end/panels/network/NetworkFrameGrouper.ts +1 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +4 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +5 -8
- package/front_end/panels/network/RequestBinaryResponseView.test.ts +69 -0
- package/front_end/panels/network/RequestBinaryResponseView.ts +67 -0
- package/front_end/panels/network/RequestResponseView.test.ts +28 -1
- package/front_end/panels/network/RequestResponseView.ts +14 -7
- package/front_end/panels/network/components/EditableSpan.ts +0 -1
- package/front_end/panels/network/components/HeaderSectionRow.test.ts +1 -1
- package/front_end/panels/network/components/HeaderSectionRow.ts +22 -21
- package/front_end/panels/network/components/RequestHeaderSection.ts +7 -7
- package/front_end/panels/network/components/RequestHeadersView.ts +25 -26
- package/front_end/panels/network/components/RequestTrustTokensView.ts +32 -35
- package/front_end/panels/network/components/ResponseHeaderSection.ts +8 -10
- package/front_end/panels/network/components/WebBundleInfoView.ts +13 -11
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/network/networkConfigView.css +12 -5
- package/front_end/panels/network/networkLogView.css +4 -15
- package/front_end/panels/network/requestHTMLView.css +1 -0
- package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +1 -1
- package/front_end/panels/profiler/ProfileLauncherView.ts +3 -3
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
- package/front_end/panels/protocol_monitor/components/JSONEditor.ts +22 -15
- package/front_end/panels/protocol_monitor/components/Toolbar.ts +4 -4
- package/front_end/panels/recorder/RecorderController.ts +39 -43
- package/front_end/panels/recorder/components/ControlButton.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +15 -15
- package/front_end/panels/recorder/components/ExtensionView.ts +9 -8
- package/front_end/panels/recorder/components/RecordingListView.ts +15 -13
- package/front_end/panels/recorder/components/RecordingView.ts +92 -84
- package/front_end/panels/recorder/components/ReplaySection.ts +6 -6
- package/front_end/panels/recorder/components/SelectButton.ts +21 -20
- package/front_end/panels/recorder/components/StartView.ts +14 -18
- package/front_end/panels/recorder/components/StepEditor.ts +3 -3
- package/front_end/panels/recorder/components/StepView.ts +20 -20
- package/front_end/panels/recorder/components/TimelineSection.ts +3 -2
- package/front_end/panels/recorder/converters/ExtensionConverter.ts +2 -2
- package/front_end/panels/recorder/converters/JSONConverter.ts +1 -1
- package/front_end/panels/recorder/converters/LighthouseConverter.ts +1 -1
- package/front_end/panels/recorder/converters/PuppeteerConverter.ts +1 -1
- package/front_end/panels/recorder/converters/PuppeteerReplayConverter.ts +1 -1
- package/front_end/panels/recorder/injected/RecordingClient.ts +7 -10
- package/front_end/panels/recorder/injected/SelectorComputer.ts +5 -5
- package/front_end/panels/recorder/injected/SelectorPicker.ts +2 -2
- package/front_end/panels/recorder/injected/Step.ts +1 -1
- package/front_end/panels/recorder/injected/injected.ts +1 -1
- package/front_end/panels/recorder/injected/selectors/ARIASelector.ts +1 -1
- package/front_end/panels/recorder/injected/selectors/PierceSelector.ts +6 -7
- package/front_end/panels/recorder/injected/selectors/TextSelector.ts +3 -5
- package/front_end/panels/recorder/injected/util.ts +1 -1
- package/front_end/panels/recorder/models/RecordingPlayer.ts +1 -1
- package/front_end/panels/recorder/models/RecordingSettings.ts +1 -4
- package/front_end/panels/recorder/models/RecordingStorage.ts +1 -1
- package/front_end/panels/recorder/models/SDKUtils.ts +3 -2
- package/front_end/panels/recorder/models/ScreenshotUtils.ts +1 -1
- package/front_end/panels/recorder/models/Section.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +1 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/OriginTreeElement.ts +1 -1
- package/front_end/panels/security/SecurityAndPrivacyPanelSidebar.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +1 -1
- package/front_end/panels/sensors/SensorsView.ts +16 -0
- package/front_end/panels/sensors/sensors.css +16 -0
- package/front_end/panels/settings/AISettingsTab.test.ts +41 -11
- package/front_end/panels/settings/AISettingsTab.ts +103 -58
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +9 -0
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/components/SyncSection.ts +18 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +33 -30
- package/front_end/panels/settings/settings-meta.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +2 -2
- package/front_end/panels/sources/GoToLineQuickOpen.ts +1 -1
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +1 -1
- package/front_end/panels/sources/OutlineQuickOpen.ts +1 -1
- package/front_end/panels/sources/SourcesNavigator.test.ts +1 -0
- package/front_end/panels/sources/SourcesPanel.ts +7 -0
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/components/BreakpointsView.ts +25 -26
- package/front_end/panels/sources/components/HeadersView.ts +17 -15
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +18 -3
- package/front_end/panels/timeline/AnnotationHelpers.ts +1 -1
- package/front_end/panels/timeline/AppenderUtils.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +27 -10
- package/front_end/panels/timeline/CountersGraph.ts +1 -1
- package/front_end/panels/timeline/EntriesFilter.test.ts +68 -0
- package/front_end/panels/timeline/EntriesFilter.ts +13 -0
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +10 -0
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +135 -1
- package/front_end/panels/timeline/ModificationsManager.test.ts +160 -0
- package/front_end/panels/timeline/ModificationsManager.ts +31 -0
- package/front_end/panels/timeline/TimelineDetailsView.test.ts +4 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +34 -12
- package/front_end/panels/timeline/TimelineEventOverview.ts +1 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts +53 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +50 -20
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.test.ts +57 -0
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +18 -0
- package/front_end/panels/timeline/TimelineFlameChartView.ts +90 -29
- package/front_end/panels/timeline/TimelineHistoryManager.ts +3 -1
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +49 -37
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +16 -12
- package/front_end/panels/timeline/TimelineTreeView.test.ts +9 -9
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +116 -41
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +2 -3
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +8 -7
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +28 -27
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -2
- package/front_end/panels/timeline/components/LayoutShiftDetails.test.ts +13 -11
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +217 -87
- package/front_end/panels/timeline/components/LiveMetricsView.test.ts +194 -69
- package/front_end/panels/timeline/components/LiveMetricsView.ts +327 -141
- package/front_end/panels/timeline/components/MetricCard.test.ts +8 -8
- package/front_end/panels/timeline/components/MetricCard.ts +6 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +16 -13
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +12 -10
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.test.ts +35 -2
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +30 -13
- package/front_end/panels/timeline/components/RelatedInsightChips.test.ts +74 -0
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +92 -0
- package/front_end/panels/timeline/components/Sidebar.test.ts +74 -0
- package/front_end/panels/timeline/components/Sidebar.ts +32 -13
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.test.ts +66 -0
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +108 -39
- package/front_end/panels/timeline/components/SidebarInsightsTab.test.ts +11 -1
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +70 -37
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +59 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +90 -34
- package/front_end/panels/timeline/components/Utils.test.ts +65 -0
- package/front_end/panels/timeline/components/Utils.ts +117 -0
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +67 -53
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +98 -14
- package/front_end/panels/timeline/components/insights/EventRef.ts +92 -0
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +24 -13
- package/front_end/panels/timeline/components/insights/Helpers.ts +48 -43
- package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +20 -18
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +93 -48
- package/front_end/panels/timeline/components/insights/LCPPhases.ts +28 -9
- package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -1
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +33 -25
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +92 -15
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +26 -39
- package/front_end/panels/timeline/components/insights/Table.ts +12 -9
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +20 -12
- package/front_end/panels/timeline/components/insights/Viewport.ts +23 -20
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/timeline/components/insights/sidebarInsight.css +54 -9
- package/front_end/panels/timeline/components/insights/table.css +9 -1
- package/front_end/panels/timeline/components/layoutShiftDetails.css +22 -20
- package/front_end/panels/timeline/components/liveMetricsView.css +46 -16
- package/front_end/panels/timeline/components/networkRequestDetails.css +2 -1
- package/front_end/panels/timeline/components/relatedInsightChips.css +45 -0
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +24 -6
- package/front_end/panels/timeline/components/sidebarSingleInsightSet.css +18 -4
- package/front_end/panels/timeline/extensions/ExtensionUI.ts +4 -1
- package/front_end/panels/timeline/fixtures/traces/basic.json.gz +0 -0
- package/front_end/panels/timeline/fixtures/traces/many-redirects.json.gz +0 -0
- package/front_end/panels/timeline/fixtures/traces/missing-url.json.gz +0 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.test.ts +40 -51
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +87 -39
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +13 -11
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +24 -32
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +23 -24
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.test.ts +42 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +25 -19
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +0 -14
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +16 -13
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +59 -20
- package/front_end/panels/timeline/timelineFlameChartView.css +3 -2
- package/front_end/panels/timeline/timelineFlamechartPopover.css +19 -0
- package/front_end/panels/timeline/timelineHistoryManager.css +4 -0
- package/front_end/panels/timeline/timelinePanel.css +2 -10
- package/front_end/panels/timeline/track_appenders/LayoutShiftsTrackAppender.test.ts +7 -7
- package/front_end/panels/timeline/track_appenders/TimingsTrackAppender.test.ts +1 -1
- package/front_end/panels/timeline/utils/Helpers.test.ts +38 -0
- package/front_end/panels/timeline/utils/Helpers.ts +94 -0
- package/front_end/panels/timeline/utils/ImageCache.test.ts +106 -0
- package/front_end/panels/timeline/utils/ImageCache.ts +55 -0
- package/front_end/panels/timeline/utils/SourceMapsResolver.test.ts +13 -1
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +11 -2
- package/front_end/panels/timeline/utils/utils.ts +4 -0
- package/front_end/panels/utils/utils.ts +1 -1
- package/front_end/panels/web_audio/graph_visualizer/EdgeView.ts +1 -1
- package/front_end/panels/web_audio/graph_visualizer/GraphView.ts +3 -9
- package/front_end/panels/webauthn/WebauthnPane.test.ts +75 -4
- package/front_end/panels/webauthn/WebauthnPane.ts +24 -3
- package/front_end/testing/EnvironmentHelpers.ts +19 -4
- package/front_end/testing/ExtensionHelpers.ts +1 -1
- package/front_end/testing/LanguagePluginHelpers.ts +1 -1
- package/front_end/testing/MockConnection.ts +1 -1
- package/front_end/testing/MockIssuesManager.ts +1 -1
- package/front_end/testing/MockScopeChain.ts +1 -1
- package/front_end/testing/MutationHelpers.test.ts +6 -8
- package/front_end/testing/TraceHelpers.ts +3 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +11 -3
- package/front_end/third_party/codemirror.next/package.json +5 -5
- package/front_end/third_party/i18n/localized-string-set.ts +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- 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/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +9 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +84 -84
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- 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/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Session.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Session.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +7 -4
- 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/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PQuerySelector.js.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/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +114 -97
- 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/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +9 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +82 -83
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- 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/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Session.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Session.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +7 -4
- 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/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +89 -89
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +6 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Session.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserPrompt.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +9 -5
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +22 -1
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/common/QueryHandler.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/PQuerySelector.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/puppeteer.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +18 -17
- package/front_end/ui/components/buttons/button.css +0 -4
- package/front_end/ui/components/cards/Card.test.ts +66 -0
- package/front_end/ui/components/cards/Card.ts +57 -0
- package/front_end/ui/components/cards/card.css +32 -0
- package/front_end/ui/components/cards/cards.ts +9 -0
- package/front_end/ui/components/chrome_link/ChromeLink.test.ts +5 -3
- package/front_end/ui/components/chrome_link/ChromeLink.ts +3 -1
- package/front_end/ui/components/data_grid/DataGrid.test.ts +3 -1
- package/front_end/ui/components/data_grid/DataGrid.ts +25 -23
- package/front_end/ui/components/data_grid/DataGridContextMenuUtils.ts +2 -2
- package/front_end/ui/components/data_grid/DataGridController.ts +9 -5
- package/front_end/ui/components/data_grid/DataGridEvents.ts +1 -1
- package/front_end/ui/components/data_grid/DataGridRenderers.ts +7 -4
- package/front_end/ui/components/dialogs/Dialog.ts +4 -2
- package/front_end/ui/components/dialogs/IconDialog.ts +9 -7
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +10 -8
- package/front_end/ui/components/diff_view/DiffView.ts +9 -8
- package/front_end/ui/components/docs/create_breadcrumbs.ts +3 -1
- package/front_end/ui/components/docs/expandable_list/basic.ts +4 -2
- package/front_end/ui/components/docs/floating_button/basic.html +26 -0
- package/front_end/ui/components/docs/floating_button/basic.ts +20 -0
- package/front_end/ui/components/docs/freestyler/basic.ts +5 -0
- package/front_end/ui/components/docs/freestyler/empty_state.ts +5 -0
- package/front_end/ui/components/docs/icon_dialog/basic.ts +5 -3
- package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +7 -4
- package/front_end/ui/components/docs/performance_panel/flamechart.html +4 -0
- package/front_end/ui/components/docs/performance_panel/flamechart.ts +45 -0
- package/front_end/ui/components/docs/recorder_select_button/basic.ts +21 -18
- package/front_end/ui/components/docs/report/basic.ts +19 -23
- package/front_end/ui/components/docs/theme_colors/basic.ts +4 -2
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +4 -2
- package/front_end/ui/components/expandable_list/ExpandableList.test.ts +5 -3
- package/front_end/ui/components/expandable_list/ExpandableList.ts +6 -4
- package/front_end/ui/components/floating_button/FloatingButton.ts +51 -0
- package/front_end/ui/components/floating_button/floatingButton.css +63 -0
- package/front_end/ui/components/floating_button/floating_button.ts +7 -0
- package/front_end/ui/components/helpers/helpers.test.ts +18 -14
- package/front_end/ui/components/icon_button/Icon.ts +2 -2
- package/front_end/ui/components/icon_button/IconButton.ts +15 -10
- package/front_end/ui/components/issue_counter/IssueCounter.ts +5 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +7 -4
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +0 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +3 -1
- package/front_end/ui/components/markdown_view/CodeBlock.test.ts +7 -7
- package/front_end/ui/components/markdown_view/CodeBlock.ts +33 -41
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +12 -9
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +3 -1
- package/front_end/ui/components/markdown_view/MarkdownView.test.ts +51 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -22
- package/front_end/ui/components/markdown_view/codeBlock.css +6 -28
- package/front_end/ui/components/markdown_view/markdownLink.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +4 -0
- package/front_end/ui/components/menus/Menu.ts +7 -5
- package/front_end/ui/components/menus/SelectMenu.test.ts +3 -1
- package/front_end/ui/components/menus/SelectMenu.ts +17 -15
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +5 -3
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +8 -4
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +6 -4
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +3 -1
- package/front_end/ui/components/report_view/ReportView.test.ts +5 -3
- package/front_end/ui/components/report_view/ReportView.ts +9 -7
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +8 -5
- package/front_end/ui/components/settings/SettingCheckbox.ts +14 -12
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +7 -4
- package/front_end/ui/components/spinners/Spinner.ts +3 -1
- package/front_end/ui/components/split_view/SplitView.ts +3 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +3 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +3 -2
- package/front_end/ui/components/survey_link/SurveyLink.ts +7 -3
- package/front_end/ui/components/switch/SwitchImpl.ts +3 -1
- package/front_end/ui/components/text_editor/TextEditorHistory.ts +2 -2
- package/front_end/ui/components/text_prompt/TextPrompt.ts +3 -1
- package/front_end/ui/components/tree_outline/TreeOutline.test.ts +8 -6
- package/front_end/ui/components/tree_outline/TreeOutline.ts +9 -8
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.ts +5 -3
- package/front_end/ui/legacy/Context.ts +1 -1
- package/front_end/ui/legacy/Dialog.ts +2 -2
- package/front_end/ui/legacy/DockController.ts +2 -2
- package/front_end/ui/legacy/FilterBar.ts +1 -1
- package/front_end/ui/legacy/FilterSuggestionBuilder.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/Infobar.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +5 -5
- package/front_end/ui/legacy/Panel.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.test.ts +33 -1
- package/front_end/ui/legacy/SplitWidget.ts +62 -7
- package/front_end/ui/legacy/TabbedPane.ts +24 -0
- package/front_end/ui/legacy/Toolbar.test.ts +39 -0
- package/front_end/ui/legacy/Toolbar.ts +16 -17
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/View.ts +2 -2
- package/front_end/ui/legacy/ViewManager.ts +3 -2
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +62 -14
- package/front_end/ui/legacy/XElement.ts +0 -1
- package/front_end/ui/legacy/XLink.test.ts +3 -1
- package/front_end/ui/legacy/XLink.ts +6 -4
- package/front_end/ui/legacy/checkboxTextLabel.css +4 -0
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridWithPreview.ts +21 -10
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +10 -7
- package/front_end/ui/legacy/components/inline_editor/ColorMixSwatch.ts +3 -1
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +3 -1
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +9 -9
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -4
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.test.ts +9 -9
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +49 -13
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +0 -1
- package/front_end/ui/legacy/themeColors.css +10 -0
- package/front_end/ui/legacy/toolbar.css +4 -0
- package/front_end/ui/legacy/treeoutline.css +0 -3
- package/front_end/ui/lit-html/static.test.ts +8 -8
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +32 -3
- package/front_end/ui/visual_logging/LoggingDriver.ts +1 -1
- package/front_end/ui/visual_logging/LoggingEvents.ts +28 -28
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/NonDomState.ts +2 -2
- package/front_end/ui/visual_logging/visual_logging.ts +3 -1
- package/inspector_overlay/css_grid_label_helpers.test.ts +103 -0
- package/inspector_overlay/css_grid_label_helpers.ts +63 -12
- package/inspector_overlay/highlight_common.ts +2 -2
- package/inspector_overlay/highlight_container_query.ts +1 -2
- package/inspector_overlay/highlight_flex_common.test.ts +1 -1
- package/inspector_overlay/highlight_flex_common.ts +2 -3
- package/inspector_overlay/highlight_grid_common.ts +10 -4
- package/inspector_overlay/highlight_isolated_element.ts +1 -1
- package/inspector_overlay/highlight_scroll_snap.ts +1 -2
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +1 -1
- package/inspector_overlay/tool_highlight.ts +4 -8
- package/package.json +4 -3
- package/scripts/devtools_paths.js +9 -2
- package/scripts/eslint_rules/lib/avoid_assert_equal.js +34 -7
- package/scripts/eslint_rules/lib/html_tagged_template.js +55 -0
- package/scripts/eslint_rules/lib/inline_type_imports.js +22 -23
- package/scripts/eslint_rules/tests/avoid_assert_equal_test.js +61 -2
- package/scripts/eslint_rules/tests/html_tagged_template_test.js +96 -0
- package/scripts/eslint_rules/tests/inline_type_imports_test.js +5 -25
- package/scripts/freestyler/eval/index.js +83 -47
- package/scripts/protocol_typescript/protocol_dts_generator.ts +1 -1
- package/scripts/stylelint_rules/lib/use_theme_colors.js +2 -1
- package/scripts/stylelint_rules/tests/use_theme_colors_test.js +16 -0
- package/front_end/Images/src/spark.svg +0 -3
- package/front_end/panels/timeline/components/insights/lcpDiscovery.css +0 -13
- package/scripts/eslint_rules/lib/ban_literal_devtools_component_tag_names.js +0 -40
- package/scripts/eslint_rules/lib/check_component_naming.js +0 -214
- package/scripts/eslint_rules/tests/ban_literal_devtools_component_tag_names_test.js +0 -38
- package/scripts/eslint_rules/tests/check_component_naming_test.js +0 -246
@@ -176,6 +176,7 @@ const API = {
|
|
176
176
|
const viewState = {
|
177
177
|
dataIds: [],
|
178
178
|
dataId: null,
|
179
|
+
compareWithDataId: null,
|
179
180
|
selectedExampleIndex: 0
|
180
181
|
};
|
181
182
|
|
@@ -196,7 +197,7 @@ function createPointRadios({onChange, id, points, titleText, noBorder}) {
|
|
196
197
|
padding-bottom: 4px;
|
197
198
|
`);
|
198
199
|
title.textContent = titleText;
|
199
|
-
container.
|
200
|
+
container.append(title);
|
200
201
|
for (const point of points) {
|
201
202
|
const radioContainer = document.createElement('div');
|
202
203
|
radioContainer.setAttribute('style', 'display: inline-flex; gap: 8px;');
|
@@ -213,9 +214,9 @@ function createPointRadios({onChange, id, points, titleText, noBorder}) {
|
|
213
214
|
const label = document.createElement('label');
|
214
215
|
label.setAttribute('for', `${point}-${id}`);
|
215
216
|
label.textContent = point;
|
216
|
-
radioContainer.
|
217
|
-
radioContainer.
|
218
|
-
container.
|
217
|
+
radioContainer.append(radio);
|
218
|
+
radioContainer.append(label);
|
219
|
+
container.append(radioContainer);
|
219
220
|
}
|
220
221
|
return container;
|
221
222
|
}
|
@@ -240,7 +241,7 @@ function createChatBubble({text, evaluationId, onEvaluationChange}) {
|
|
240
241
|
|
241
242
|
const pointsContainer = document.createElement('div');
|
242
243
|
pointsContainer.setAttribute('style', 'margin-top: 12px;');
|
243
|
-
pointsContainer.
|
244
|
+
pointsContainer.append(createPointRadios({
|
244
245
|
points,
|
245
246
|
titleText: 'Evaluation',
|
246
247
|
id: evaluationId,
|
@@ -248,14 +249,14 @@ function createChatBubble({text, evaluationId, onEvaluationChange}) {
|
|
248
249
|
onEvaluationChange(point);
|
249
250
|
}
|
250
251
|
}));
|
251
|
-
el.
|
252
|
+
el.append(pointsContainer);
|
252
253
|
return el;
|
253
254
|
}
|
254
255
|
|
255
|
-
function renderExample(container, {onEvaluationChange}) {
|
256
|
+
function renderExample(container, sourceMap, {onEvaluationChange}) {
|
256
257
|
const exampleIds = Object.keys(viewState.examplesMap);
|
257
258
|
const exampleId = exampleIds[viewState.selectedExampleIndex];
|
258
|
-
const requestResponses =
|
259
|
+
const requestResponses = sourceMap[exampleId];
|
259
260
|
container.innerHTML = '';
|
260
261
|
|
261
262
|
let i = 0;
|
@@ -266,7 +267,7 @@ function renderExample(container, {onEvaluationChange}) {
|
|
266
267
|
exampleId,
|
267
268
|
requestResponseIndex: i,
|
268
269
|
});
|
269
|
-
container.
|
270
|
+
container.append(createChatBubble({
|
270
271
|
text,
|
271
272
|
evaluationId,
|
272
273
|
onEvaluationChange: point => {
|
@@ -285,7 +286,7 @@ function renderExample(container, {onEvaluationChange}) {
|
|
285
286
|
border-radius: 12px;
|
286
287
|
`);
|
287
288
|
const finalEvaluationId = JSON.stringify({datasetTitle: viewState.dataId, exampleId});
|
288
|
-
finalResponseRatingContainer.
|
289
|
+
finalResponseRatingContainer.append(createPointRadios({
|
289
290
|
points: ['Correct', 'Wrong'],
|
290
291
|
titleText: 'The final answer is:',
|
291
292
|
noBorder: true,
|
@@ -296,7 +297,7 @@ function renderExample(container, {onEvaluationChange}) {
|
|
296
297
|
onEvaluationChange();
|
297
298
|
}
|
298
299
|
}));
|
299
|
-
container.
|
300
|
+
container.append(finalResponseRatingContainer);
|
300
301
|
}
|
301
302
|
|
302
303
|
function renderExampleSelector(container, {onChange}) {
|
@@ -310,15 +311,38 @@ function renderExampleSelector(container, {onChange}) {
|
|
310
311
|
option.selected = exampleId === exampleIds[viewState.selectedExampleIndex];
|
311
312
|
option.textContent = exampleId;
|
312
313
|
option.name = exampleId;
|
313
|
-
select.
|
314
|
+
select.append(option);
|
314
315
|
}
|
315
316
|
|
316
317
|
select.selectedIndex = viewState.selectedExampleIndex;
|
317
318
|
select.addEventListener('change', ev => {
|
318
319
|
onChange(ev.target.selectedIndex);
|
319
320
|
});
|
320
|
-
container.
|
321
|
-
container.
|
321
|
+
container.append(label);
|
322
|
+
container.append(select);
|
323
|
+
}
|
324
|
+
|
325
|
+
function createDataSetSelector(label, selectedId, onChange) {
|
326
|
+
const dataSelectorContainer = document.createElement('div');
|
327
|
+
const dataSelect = document.createElement('select');
|
328
|
+
viewState.dataIds.forEach(dataId => {
|
329
|
+
const option = document.createElement('option');
|
330
|
+
option.name = dataId;
|
331
|
+
option.textContent = dataId;
|
332
|
+
dataSelect.append(option);
|
333
|
+
});
|
334
|
+
dataSelect.selectedIndex = viewState.dataIds.findIndex(dataId => selectedId === dataId);
|
335
|
+
dataSelect.addEventListener('change', ev => {
|
336
|
+
onChange(ev);
|
337
|
+
document.startViewTransition(() => {
|
338
|
+
renderMainPage();
|
339
|
+
});
|
340
|
+
});
|
341
|
+
const dataSelectSpan = document.createElement('span');
|
342
|
+
dataSelectSpan.textContent = label;
|
343
|
+
dataSelectorContainer.append(dataSelectSpan);
|
344
|
+
dataSelectorContainer.append(dataSelect);
|
345
|
+
return dataSelectorContainer;
|
322
346
|
}
|
323
347
|
|
324
348
|
async function renderMainPage() {
|
@@ -327,6 +351,10 @@ async function renderMainPage() {
|
|
327
351
|
container.setAttribute('style', 'padding-bottom: 24px;');
|
328
352
|
const {examplesMap, metadata} = await API.getExamplesMap({title: viewState.dataId});
|
329
353
|
viewState.examplesMap = examplesMap;
|
354
|
+
if (viewState.compareWithDataId) {
|
355
|
+
const {examplesMap} = await API.getExamplesMap({title: viewState.compareWithDataId});
|
356
|
+
viewState.compareWithExamplesMap = examplesMap;
|
357
|
+
}
|
330
358
|
viewState.metadata = metadata;
|
331
359
|
viewState.selectedExampleIndex = 0;
|
332
360
|
|
@@ -340,26 +368,13 @@ async function renderMainPage() {
|
|
340
368
|
const heading = document.createElement('h1');
|
341
369
|
heading.textContent = 'Freestyler Eval Tool';
|
342
370
|
|
343
|
-
const dataSelectorContainer =
|
344
|
-
const dataSelect = document.createElement('select');
|
345
|
-
viewState.dataIds.forEach(dataId => {
|
346
|
-
const option = document.createElement('option');
|
347
|
-
option.name = dataId;
|
348
|
-
option.textContent = dataId;
|
349
|
-
dataSelect.appendChild(option);
|
350
|
-
});
|
351
|
-
dataSelect.selectedIndex = viewState.dataIds.findIndex(dataId => viewState.dataId === dataId);
|
352
|
-
dataSelect.addEventListener('change', ev => {
|
371
|
+
const dataSelectorContainer = createDataSetSelector('Dataset: ', viewState.dataId, ev => {
|
353
372
|
viewState.dataId = viewState.dataIds[ev.target.selectedIndex];
|
354
373
|
viewState.selectedExampleIndex = 0;
|
355
|
-
document.startViewTransition(() => {
|
356
|
-
renderMainPage();
|
357
|
-
});
|
358
374
|
});
|
359
|
-
const
|
360
|
-
|
361
|
-
|
362
|
-
dataSelectorContainer.appendChild(dataSelect);
|
375
|
+
const compareWithDataSelectorContainer = createDataSetSelector('Compare with: ', viewState.compareWithDataId, ev => {
|
376
|
+
viewState.compareWithDataId = viewState.dataIds[ev.target.selectedIndex];
|
377
|
+
});
|
363
378
|
const exampleSelectorContainer = document.createElement('div');
|
364
379
|
|
365
380
|
const exportContainer = document.createElement('div');
|
@@ -371,7 +386,7 @@ async function renderMainPage() {
|
|
371
386
|
const datasetId = viewState.dataId;
|
372
387
|
exportContainer.innerHTML = '';
|
373
388
|
const dialogContainer = document.createElement('div');
|
374
|
-
exportContainer.
|
389
|
+
exportContainer.append(dialogContainer);
|
375
390
|
|
376
391
|
const evaluationIds = (Object.keys(evaluationState)).map(key => JSON.parse(key));
|
377
392
|
const evaluationIdsForDataset = evaluationIds.filter(evaluationIdObj => evaluationIdObj.datasetTitle === datasetId);
|
@@ -416,10 +431,10 @@ async function renderMainPage() {
|
|
416
431
|
await navigator.clipboard.writeText(csvText);
|
417
432
|
});
|
418
433
|
|
419
|
-
resultsContainer.
|
420
|
-
resultsContainer.
|
421
|
-
exportContainer.
|
422
|
-
exportContainer.
|
434
|
+
resultsContainer.append(resultsSummary);
|
435
|
+
resultsContainer.append(resultsText);
|
436
|
+
exportContainer.append(resultsContainer);
|
437
|
+
exportContainer.append(exportButton);
|
423
438
|
}
|
424
439
|
|
425
440
|
const exampleDescriptionContainer = document.createElement('div');
|
@@ -430,26 +445,42 @@ async function renderMainPage() {
|
|
430
445
|
exampleDescriptionContainer.innerHTML = '';
|
431
446
|
const exampleHeading = document.createElement('h2');
|
432
447
|
exampleHeading.textContent = exampleId;
|
433
|
-
exampleDescriptionContainer.
|
448
|
+
exampleDescriptionContainer.append(exampleHeading);
|
434
449
|
const explanationContainer = document.createElement('div');
|
435
450
|
const explanation = metadata.find(data => data.exampleId === exampleId)?.explanation;
|
436
451
|
explanationContainer.innerHTML = explanation ? `Evaluation tip: <strong>${explanation}</strong>` : '';
|
437
|
-
exampleDescriptionContainer.
|
452
|
+
exampleDescriptionContainer.append(explanationContainer);
|
438
453
|
}
|
439
454
|
|
440
|
-
header.
|
441
|
-
header.
|
442
|
-
header.
|
443
|
-
header.
|
444
|
-
header.
|
445
|
-
|
455
|
+
header.append(heading);
|
456
|
+
header.append(dataSelectorContainer);
|
457
|
+
header.append(compareWithDataSelectorContainer);
|
458
|
+
header.append(exampleSelectorContainer);
|
459
|
+
header.append(exportContainer);
|
460
|
+
header.append(exampleDescriptionContainer);
|
461
|
+
container.append(header);
|
462
|
+
|
463
|
+
const gridContainer = document.createElement('div');
|
464
|
+
gridContainer.style = `
|
465
|
+
display: flex;
|
466
|
+
flex-direction: row;
|
467
|
+
`;
|
468
|
+
container.append(gridContainer);
|
446
469
|
|
447
470
|
const exampleContainer = document.createElement('div');
|
448
|
-
|
471
|
+
gridContainer.append(exampleContainer);
|
472
|
+
|
473
|
+
const compareWithExampleContainer = document.createElement('div');
|
474
|
+
gridContainer.append(compareWithExampleContainer);
|
449
475
|
|
450
476
|
viewState.handleExampleChange = () => {
|
451
477
|
document.startViewTransition(() => {
|
452
|
-
renderExample(exampleContainer, {onEvaluationChange: () => renderResultsTable()});
|
478
|
+
renderExample(exampleContainer, viewState.examplesMap, {onEvaluationChange: () => renderResultsTable()});
|
479
|
+
if (viewState.compareWithDataId) {
|
480
|
+
renderExample(
|
481
|
+
compareWithExampleContainer, viewState.compareWithExamplesMap,
|
482
|
+
{onEvaluationChange: () => renderResultsTable()});
|
483
|
+
}
|
453
484
|
renderExampleDescription();
|
454
485
|
renderExampleSelector(exampleSelectorContainer, {
|
455
486
|
onChange: selectedExampleIndex => {
|
@@ -461,7 +492,12 @@ async function renderMainPage() {
|
|
461
492
|
};
|
462
493
|
|
463
494
|
renderResultsTable();
|
464
|
-
renderExample(exampleContainer, {onEvaluationChange: () => renderResultsTable()});
|
495
|
+
renderExample(exampleContainer, viewState.examplesMap, {onEvaluationChange: () => renderResultsTable()});
|
496
|
+
if (viewState.compareWithDataId) {
|
497
|
+
renderExample(
|
498
|
+
compareWithExampleContainer, viewState.compareWithExamplesMap,
|
499
|
+
{onEvaluationChange: () => renderResultsTable()});
|
500
|
+
}
|
465
501
|
renderExampleDescription();
|
466
502
|
renderExampleSelector(exampleSelectorContainer, {
|
467
503
|
onChange: selectedExampleIndex => {
|
@@ -9,7 +9,7 @@
|
|
9
9
|
import * as fs from 'fs';
|
10
10
|
import * as path from 'path';
|
11
11
|
|
12
|
-
import
|
12
|
+
import type {Protocol} from './protocol_schema.js';
|
13
13
|
|
14
14
|
const PROTOCOL_JSON_PATH = path.resolve(
|
15
15
|
__dirname, path.join('..', '..', 'third_party', 'blink', 'public', 'devtools_protocol', 'browser_protocol.json'));
|
@@ -221,8 +221,9 @@ module.exports = stylelint.createPlugin(RULE_NAME, function(primary, secondary,
|
|
221
221
|
/**
|
222
222
|
* If we're checking a border-{top/bottom/left/right}, we need to regex
|
223
223
|
* out just the color part of the declaration to check.
|
224
|
+
* We also apply the same check for outline.
|
224
225
|
*/
|
225
|
-
if (borderCombinedDeclarations.has(declaration.prop)) {
|
226
|
+
if (borderCombinedDeclarations.has(declaration.prop) || declaration.prop === 'outline') {
|
226
227
|
// This is a pretty basic regex but it should split border-bottom:
|
227
228
|
// var(--foo) solid var(--bar) into the three parts we need.
|
228
229
|
// If this rule picks up false positives, we can improve this regex.
|
@@ -307,6 +307,22 @@ describe('use_theme_colors', () => {
|
|
307
307
|
assert.lengthOf(warnings, 0);
|
308
308
|
});
|
309
309
|
|
310
|
+
it('does not error when there is a var for the outline width', async () => {
|
311
|
+
const warnings = await lint(
|
312
|
+
'p { outline: var(--button-border-size) solid var(--color-primary); }',
|
313
|
+
);
|
314
|
+
|
315
|
+
assert.lengthOf(warnings, 0);
|
316
|
+
});
|
317
|
+
|
318
|
+
it('does not error when the outline is set to none', async () => {
|
319
|
+
const warnings = await lint(
|
320
|
+
'p { outline: none; }',
|
321
|
+
);
|
322
|
+
|
323
|
+
assert.lengthOf(warnings, 0);
|
324
|
+
});
|
325
|
+
|
310
326
|
it('does not error when using --sys-elevation for box-shadow', async () => {
|
311
327
|
const warnings = await lint(
|
312
328
|
'p { box-shadow: var(--sys-elevation-level1); }',
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
2
|
-
<path d="M10.0013 18.3307C10.0013 17.178 9.78255 16.0946 9.34505 15.0807C8.90755 14.0668 8.3138 13.1849 7.5638 12.4349C6.8138 11.6849 5.93186 11.0911 4.91797 10.6536C3.90408 10.2161 2.82075 9.9974 1.66797 9.9974C2.82075 9.9974 3.90408 9.77865 4.91797 9.34115C5.93186 8.90365 6.8138 8.3099 7.5638 7.5599C8.3138 6.8099 8.90755 5.92795 9.34505 4.91406C9.78255 3.90017 10.0013 2.81684 10.0013 1.66406C10.0013 2.81684 10.2201 3.90017 10.6576 4.91406C11.0951 5.92795 11.6888 6.8099 12.4388 7.5599C13.1888 8.3099 14.0707 8.90365 15.0846 9.34115C16.0985 9.77865 17.1819 9.9974 18.3346 9.9974C17.1819 9.9974 16.0985 10.2161 15.0846 10.6536C14.0707 11.0911 13.1888 11.6849 12.4388 12.4349C11.6888 13.1849 11.0951 14.0668 10.6576 15.0807C10.2201 16.0946 10.0013 17.178 10.0013 18.3307Z" fill="#1B6EF3"/>
|
3
|
-
</svg>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2024 The Chromium Authors. All rights reserved.
|
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
|
-
.discovery-delay {
|
8
|
-
margin-top: 0;
|
9
|
-
}
|
10
|
-
|
11
|
-
.discovery-time-ms {
|
12
|
-
color: var(--sys-color-error-bright);
|
13
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
// Copyright 2020 The Chromium Authors. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
3
|
-
// found in the LICENSE file.
|
4
|
-
'use strict';
|
5
|
-
|
6
|
-
const {isLitHtmlTemplateCall} = require('./utils.js');
|
7
|
-
|
8
|
-
module.exports = {
|
9
|
-
meta: {
|
10
|
-
type: 'problem',
|
11
|
-
|
12
|
-
docs: {
|
13
|
-
description: 'Check for <devtools-* in Lit templates instead of tag names.',
|
14
|
-
category: 'Possible Errors',
|
15
|
-
},
|
16
|
-
fixable: 'code',
|
17
|
-
schema: [] // no options
|
18
|
-
},
|
19
|
-
create: function(context) {
|
20
|
-
return {
|
21
|
-
TaggedTemplateExpression(node) {
|
22
|
-
const isLitHtmlCall = isLitHtmlTemplateCall(node);
|
23
|
-
if (!isLitHtmlCall) {
|
24
|
-
return;
|
25
|
-
}
|
26
|
-
|
27
|
-
// node.quasi.quasis are all the static parts of the template literal.
|
28
|
-
for (const templatePart of node.quasi.quasis) {
|
29
|
-
if (templatePart.value.raw.includes('<devtools-')) {
|
30
|
-
context.report({
|
31
|
-
node,
|
32
|
-
message:
|
33
|
-
'Rendering other DevTools components should be done using LitHtml static expressions (<${Component.litTagName}>).',
|
34
|
-
});
|
35
|
-
}
|
36
|
-
}
|
37
|
-
},
|
38
|
-
};
|
39
|
-
}
|
40
|
-
};
|
@@ -1,214 +0,0 @@
|
|
1
|
-
// Copyright 2021 The Chromium Authors. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
3
|
-
// found in the LICENSE file.
|
4
|
-
'use strict';
|
5
|
-
|
6
|
-
module.exports = {
|
7
|
-
meta: {
|
8
|
-
type: 'problem',
|
9
|
-
|
10
|
-
docs: {
|
11
|
-
description: 'check license headers',
|
12
|
-
category: 'Possible Errors',
|
13
|
-
},
|
14
|
-
fixable: 'code',
|
15
|
-
schema: [],
|
16
|
-
messages: {
|
17
|
-
noStaticTagName: 'Found a component class that does not define a static litTagName property.',
|
18
|
-
noTSInterface: 'Could not find the TS interface declaration for the component {{ tagName }}.',
|
19
|
-
noDefineCall: 'Could not find a customElements.define() call for the component {{ tagName }}.',
|
20
|
-
defineCallNonLiteral: 'customElements.define() first argument must be a string literal.',
|
21
|
-
staticLiteralInvalid: 'static readonly litTagName must use a literal string, with no interpolation.',
|
22
|
-
duplicateStaticLitTagName: 'found a duplicated litTagName: {{ tagName }}',
|
23
|
-
litTagNameNotLiteral:
|
24
|
-
'litTagName must be defined as a string passed in as LitHtml.literal`component-name`, but no tagged template was found.',
|
25
|
-
staticLiteralNotReadonly: 'static litTagName must be readonly.'
|
26
|
-
}
|
27
|
-
},
|
28
|
-
create: function(context) {
|
29
|
-
const baseClassExtendingHTMLElement = [
|
30
|
-
'ResponseHeaderSectionBase'
|
31
|
-
];
|
32
|
-
|
33
|
-
function nodeExtendsHTMLElement(node) {
|
34
|
-
return node.superClass && (node.superClass.name === 'HTMLElement' || baseClassExtendingHTMLElement.includes(node.superClass.name));
|
35
|
-
}
|
36
|
-
|
37
|
-
function nodeIsFilteredHTMLElementBaseClass(node) {
|
38
|
-
return node.id && baseClassExtendingHTMLElement.includes(node.id.name);
|
39
|
-
}
|
40
|
-
|
41
|
-
function nodeIsHTMLElementClassDeclaration(node) {
|
42
|
-
return node.type === 'ClassDeclaration' && nodeExtendsHTMLElement(node) && !nodeIsFilteredHTMLElementBaseClass(node);
|
43
|
-
}
|
44
|
-
|
45
|
-
function findAllComponentClassDefinitions(programNode) {
|
46
|
-
const nodesWithClassDeclaration = programNode.body.filter(node => {
|
47
|
-
if (node.type === 'ExportNamedDeclaration' && node.declaration) {
|
48
|
-
return nodeIsHTMLElementClassDeclaration(node.declaration);
|
49
|
-
}
|
50
|
-
return nodeIsHTMLElementClassDeclaration(node);
|
51
|
-
});
|
52
|
-
|
53
|
-
return nodesWithClassDeclaration.map(node => {
|
54
|
-
return node.type === 'ExportNamedDeclaration' ? node.declaration : node;
|
55
|
-
});
|
56
|
-
}
|
57
|
-
|
58
|
-
function findComponentTagNameFromStaticProperty(classBodyNode) {
|
59
|
-
return classBodyNode.body.find(node => {
|
60
|
-
return node.type === 'PropertyDefinition' && node.key.name === 'litTagName';
|
61
|
-
});
|
62
|
-
}
|
63
|
-
|
64
|
-
function findCustomElementsDefineCalls(programNode) {
|
65
|
-
return programNode.body.filter(node => {
|
66
|
-
if (node.type !== 'ExpressionStatement') {
|
67
|
-
return false;
|
68
|
-
}
|
69
|
-
|
70
|
-
if (!node.expression.callee) {
|
71
|
-
return false;
|
72
|
-
}
|
73
|
-
|
74
|
-
if (node.expression.callee.type !== 'MemberExpression') {
|
75
|
-
return false;
|
76
|
-
}
|
77
|
-
|
78
|
-
return node.expression.callee.object.name === 'customElements' &&
|
79
|
-
node.expression.callee.property.name === 'define';
|
80
|
-
});
|
81
|
-
}
|
82
|
-
|
83
|
-
function findTypeScriptDeclareGlobalHTMLInterfaceCalls(programNode) {
|
84
|
-
const matchingNode = programNode.body.find(node => {
|
85
|
-
// matches `declare global {}`
|
86
|
-
const isGlobalCall = node.type === 'TSModuleDeclaration' && node.id.name === 'global';
|
87
|
-
if (!isGlobalCall) {
|
88
|
-
return false;
|
89
|
-
}
|
90
|
-
|
91
|
-
return node.body.body.find(node => {
|
92
|
-
return node.type === 'TSInterfaceDeclaration' && node.id.name === 'HTMLElementTagNameMap';
|
93
|
-
});
|
94
|
-
});
|
95
|
-
|
96
|
-
if (!matchingNode) {
|
97
|
-
return [];
|
98
|
-
}
|
99
|
-
|
100
|
-
return matchingNode.body.body.filter(node => {
|
101
|
-
return node.type === 'TSInterfaceDeclaration' && node.id.name === 'HTMLElementTagNameMap';
|
102
|
-
});
|
103
|
-
}
|
104
|
-
|
105
|
-
// Map of litTagName to the class node.
|
106
|
-
/** @type {Map<string, any}>} */
|
107
|
-
const componentClassDefinitionLitTagNameNodes = new Map();
|
108
|
-
|
109
|
-
/** @type {Set<string>} */
|
110
|
-
const customElementsDefineCallsFound = new Set();
|
111
|
-
|
112
|
-
/** @type {Set<string>} */
|
113
|
-
const tsInterfaceExtendedEntriesFound = new Set();
|
114
|
-
|
115
|
-
return {
|
116
|
-
Program(node) {
|
117
|
-
/* We allow there to be multiple components defined in one file.
|
118
|
-
* Therefore, this rule gathers all nodes relating to the component
|
119
|
-
* definition and then checks that for each class found that extends
|
120
|
-
* HTMLElement, we have:
|
121
|
-
* 1) the class with a static readonly litTagName
|
122
|
-
* 2) The call to customElements.define()
|
123
|
-
* 3) The global interface extension
|
124
|
-
* And that for each of those, the component name string (e.g. 'devtools-foo') is the same.
|
125
|
-
*/
|
126
|
-
|
127
|
-
const componentClassDefinitions = findAllComponentClassDefinitions(node);
|
128
|
-
if (componentClassDefinitions.length === 0) {
|
129
|
-
// No components found, our work is done!
|
130
|
-
return;
|
131
|
-
}
|
132
|
-
|
133
|
-
// Do some checks on the component classes and store the component names that we've found.
|
134
|
-
for (const componentClassDefinition of componentClassDefinitions) {
|
135
|
-
const componentTagNameNode = findComponentTagNameFromStaticProperty(componentClassDefinition.body);
|
136
|
-
if (!componentTagNameNode) {
|
137
|
-
context.report({node: componentClassDefinition, messageId: 'noStaticTagName'});
|
138
|
-
return;
|
139
|
-
}
|
140
|
-
if (componentTagNameNode.value.type !== 'TaggedTemplateExpression') {
|
141
|
-
// This means that the value is not LitHtml.literal``. Most likely
|
142
|
-
// the user forgot to add LitHtml.literal and has defined the value
|
143
|
-
// as a regular string.
|
144
|
-
context.report({node: componentTagNameNode, messageId: 'litTagNameNotLiteral'});
|
145
|
-
return;
|
146
|
-
}
|
147
|
-
if (componentTagNameNode.value.quasi.quasis.length > 1) {
|
148
|
-
// This means that there's >1 template parts, which means they are
|
149
|
-
// being split by an interpolated value, which is not allowed.
|
150
|
-
context.report({node: componentTagNameNode, messageId: 'staticLiteralInvalid'});
|
151
|
-
return;
|
152
|
-
}
|
153
|
-
|
154
|
-
// Enforce that the property is declared as readonly (static readonly litTagName = ...)
|
155
|
-
if (!componentTagNameNode.readonly) {
|
156
|
-
context.report({node: componentTagNameNode, messageId: 'staticLiteralNotReadonly'});
|
157
|
-
return;
|
158
|
-
}
|
159
|
-
|
160
|
-
// Grab the name of the component, e.g:
|
161
|
-
// LitHtml.literal`devtools-foo` will pull "devtools-foo" out.
|
162
|
-
const componentTagName = componentTagNameNode.value.quasi.quasis[0].value.cooked;
|
163
|
-
|
164
|
-
// Now we ensure that we haven't found this tag name before. If we
|
165
|
-
// have, we have two components with the same litTagName property,
|
166
|
-
// which is an error.
|
167
|
-
if (componentClassDefinitionLitTagNameNodes.has(componentTagName)) {
|
168
|
-
context.report({node: componentClassDefinition, messageId: 'duplicateStaticLitTagName', data: {tagName: componentTagName}});
|
169
|
-
}
|
170
|
-
|
171
|
-
componentClassDefinitionLitTagNameNodes.set(componentTagName, componentClassDefinition);
|
172
|
-
}
|
173
|
-
|
174
|
-
// Find all customElements.define() calls and store the arguments to them.
|
175
|
-
|
176
|
-
// Now find the customElements.define() line
|
177
|
-
const customElementsDefineCalls = findCustomElementsDefineCalls(node);
|
178
|
-
for (const customElementsDefineCall of customElementsDefineCalls) {
|
179
|
-
const firstArgumentToDefineCall = customElementsDefineCall.expression.arguments[0];
|
180
|
-
if (!firstArgumentToDefineCall || firstArgumentToDefineCall.type !== 'Literal') {
|
181
|
-
context.report({
|
182
|
-
node: customElementsDefineCall,
|
183
|
-
messageId: 'defineCallNonLiteral',
|
184
|
-
});
|
185
|
-
return;
|
186
|
-
}
|
187
|
-
const tagNamePassedToDefineCall = firstArgumentToDefineCall.value;
|
188
|
-
customElementsDefineCallsFound.add(tagNamePassedToDefineCall);
|
189
|
-
}
|
190
|
-
const allTSDeclareGlobalInterfaceCalls = findTypeScriptDeclareGlobalHTMLInterfaceCalls(node);
|
191
|
-
|
192
|
-
for (const interfaceDeclaration of allTSDeclareGlobalInterfaceCalls) {
|
193
|
-
for (const node of interfaceDeclaration.body.body) {
|
194
|
-
if (node.type === 'TSPropertySignature') {
|
195
|
-
tsInterfaceExtendedEntriesFound.add(node.key.value);
|
196
|
-
}
|
197
|
-
}
|
198
|
-
}
|
199
|
-
|
200
|
-
for (const [tagName, classNode] of componentClassDefinitionLitTagNameNodes) {
|
201
|
-
// Check that each tagName has a matching entry in both other places we expect it.
|
202
|
-
if (!customElementsDefineCallsFound.has(tagName)) {
|
203
|
-
context.report({node: classNode, messageId: 'noDefineCall', data: {tagName}});
|
204
|
-
}
|
205
|
-
if (!tsInterfaceExtendedEntriesFound.has(tagName)) {
|
206
|
-
context.report({node: classNode, messageId: 'noTSInterface', data: {tagName}});
|
207
|
-
}
|
208
|
-
}
|
209
|
-
|
210
|
-
// if we got here, everything is valid and the name is correct in all three locations
|
211
|
-
}
|
212
|
-
};
|
213
|
-
}
|
214
|
-
};
|
@@ -1,38 +0,0 @@
|
|
1
|
-
// Copyright 2020 The Chromium Authors. All rights reserved.
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
3
|
-
// found in the LICENSE file.
|
4
|
-
'use strict';
|
5
|
-
|
6
|
-
const rule = require('../lib/ban_literal_devtools_component_tag_names.js');
|
7
|
-
const ruleTester = new (require('eslint').RuleTester)({
|
8
|
-
parserOptions: {ecmaVersion: 9, sourceType: 'module'},
|
9
|
-
parser: require.resolve('@typescript-eslint/parser'),
|
10
|
-
});
|
11
|
-
|
12
|
-
const EXPECTED_ERROR_MESSAGE =
|
13
|
-
'Rendering other DevTools components should be done using LitHtml static expressions (<${Component.litTagName}>).';
|
14
|
-
|
15
|
-
ruleTester.run('ban_literal_devtools_component_tag_names', rule, {
|
16
|
-
valid: [
|
17
|
-
{
|
18
|
-
code: 'LitHtml.html`<p></p>`',
|
19
|
-
filename: 'front_end/components/test.ts',
|
20
|
-
},
|
21
|
-
{
|
22
|
-
code: 'LitHtml.html`<${DataGrid.litTagName}></${DataGrid.litTagName}>`',
|
23
|
-
filename: 'front_end/components/test.ts',
|
24
|
-
},
|
25
|
-
],
|
26
|
-
invalid: [
|
27
|
-
{
|
28
|
-
code: 'LitHtml.html`<devtools-foo></devtools-foo>`',
|
29
|
-
filename: 'front_end/components/test.ts',
|
30
|
-
errors: [{message: EXPECTED_ERROR_MESSAGE}],
|
31
|
-
},
|
32
|
-
{
|
33
|
-
code: 'LitHtml.html`<p>${foo}</p><devtools-foo></devtools-foo>`',
|
34
|
-
filename: 'front_end/components/test.ts',
|
35
|
-
errors: [{message: EXPECTED_ERROR_MESSAGE}]
|
36
|
-
},
|
37
|
-
]
|
38
|
-
});
|