chrome-devtools-frontend 1.0.1023618 → 1.0.1024166
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/.eslintignore +1 -1
 - package/.eslintrc.js +1 -0
 - package/front_end/core/common/AppProvider.ts +1 -1
 - package/front_end/core/common/Object.ts +7 -2
 - package/front_end/core/common/SettingRegistration.ts +1 -1
 - package/front_end/core/common/Settings.ts +2 -3
 - package/front_end/core/host/InspectorFrontendHost.ts +13 -5
 - package/front_end/core/host/ResourceLoader.ts +1 -1
 - package/front_end/core/i18n/locales/en-US.json +15 -0
 - package/front_end/core/i18n/locales/en-XL.json +15 -0
 - package/front_end/core/platform/UserVisibleError.ts +1 -1
 - package/front_end/core/sdk/AccessibilityModel.ts +3 -4
 - package/front_end/core/sdk/CPUProfileDataModel.ts +1 -1
 - package/front_end/core/sdk/CPUProfilerModel.ts +3 -3
 - package/front_end/core/sdk/CPUThrottlingManager.ts +2 -2
 - package/front_end/core/sdk/CSSContainerQuery.ts +2 -2
 - package/front_end/core/sdk/CSSLayer.ts +1 -1
 - package/front_end/core/sdk/CSSMatchedStyles.ts +3 -3
 - package/front_end/core/sdk/CSSMedia.ts +1 -1
 - package/front_end/core/sdk/CSSModel.ts +6 -6
 - package/front_end/core/sdk/CSSProperty.ts +2 -2
 - package/front_end/core/sdk/CSSQuery.ts +2 -3
 - package/front_end/core/sdk/CSSRule.ts +2 -2
 - package/front_end/core/sdk/CSSScope.ts +1 -1
 - package/front_end/core/sdk/CSSStyleDeclaration.ts +3 -3
 - package/front_end/core/sdk/CSSStyleSheetHeader.ts +3 -3
 - package/front_end/core/sdk/CSSSupports.ts +1 -1
 - package/front_end/core/sdk/ChildTargetManager.ts +2 -2
 - package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -2
 - package/front_end/core/sdk/ConsoleModel.ts +15 -12
 - package/front_end/core/sdk/CookieModel.ts +4 -5
 - package/front_end/core/sdk/DOMDebuggerModel.ts +7 -7
 - package/front_end/core/sdk/DOMModel.ts +3 -3
 - package/front_end/core/sdk/DebuggerModel.ts +5 -6
 - package/front_end/core/sdk/EmulationModel.ts +2 -2
 - package/front_end/core/sdk/EventBreakpointsModel.ts +4 -4
 - package/front_end/core/sdk/FilmStripModel.ts +1 -2
 - package/front_end/core/sdk/FrameAssociated.ts +1 -1
 - package/front_end/core/sdk/FrameManager.ts +6 -6
 - package/front_end/core/sdk/HeapProfilerModel.ts +4 -4
 - package/front_end/core/sdk/IOModel.ts +2 -2
 - package/front_end/core/sdk/IsolateManager.ts +3 -3
 - package/front_end/core/sdk/IssuesModel.ts +1 -2
 - package/front_end/core/sdk/LayerTreeBase.ts +3 -4
 - package/front_end/core/sdk/LogModel.ts +1 -2
 - package/front_end/core/sdk/NetworkManager.ts +18 -9
 - package/front_end/core/sdk/NetworkRequest.ts +1 -2
 - package/front_end/core/sdk/OverlayModel.ts +5 -5
 - package/front_end/core/sdk/PageLoad.ts +1 -1
 - package/front_end/core/sdk/PageResourceLoader.ts +3 -3
 - package/front_end/core/sdk/PaintProfiler.ts +1 -2
 - package/front_end/core/sdk/PerformanceMetricsModel.ts +1 -2
 - package/front_end/core/sdk/ProfileTreeModel.ts +1 -1
 - package/front_end/core/sdk/RemoteObject.ts +3 -3
 - package/front_end/core/sdk/Resource.ts +2 -3
 - package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
 - package/front_end/core/sdk/RuntimeModel.ts +5 -5
 - package/front_end/core/sdk/SDKModel.ts +1 -1
 - package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
 - package/front_end/core/sdk/Script.ts +5 -6
 - package/front_end/core/sdk/SecurityOriginManager.ts +1 -2
 - package/front_end/core/sdk/ServerTiming.ts +1 -1
 - package/front_end/core/sdk/ServiceWorkerCacheModel.ts +3 -3
 - package/front_end/core/sdk/ServiceWorkerManager.ts +3 -4
 - package/front_end/core/sdk/SourceMap.ts +2 -2
 - package/front_end/core/sdk/SourceMapManager.ts +5 -5
 - package/front_end/core/sdk/StorageKeyManager.ts +1 -2
 - package/front_end/core/sdk/Target.ts +1 -1
 - package/front_end/core/sdk/TargetManager.ts +1 -1
 - package/front_end/core/sdk/TracingManager.ts +2 -3
 - package/front_end/core/sdk/TracingModel.ts +1 -1
 - package/front_end/core/sdk/WebAuthnModel.ts +1 -2
 - package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -1
 - package/front_end/entrypoints/formatter_worker/CSSRuleParser.ts +1 -2
 - package/front_end/entrypoints/formatter_worker/FormatterWorker.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 +2 -3
 - package/front_end/entrypoints/formatter_worker/JavaScriptOutline.ts +1 -1
 - package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
 - package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -1
 - package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +3 -3
 - package/front_end/models/bindings/BreakpointManager.ts +2 -2
 - package/front_end/models/bindings/CSSWorkspaceBinding.ts +5 -2
 - package/front_end/models/bindings/CompilerScriptMapping.ts +5 -1
 - package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
 - package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +4 -4
 - package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
 - package/front_end/models/bindings/IgnoreListManager.ts +1 -1
 - package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -2
 - package/front_end/models/bindings/ResourceScriptMapping.ts +2 -4
 - package/front_end/models/bindings/SASSSourceMapping.ts +2 -2
 - package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
 - package/front_end/models/bindings/TempFile.ts +1 -2
 - package/front_end/models/emulation/DeviceModeModel.ts +8 -2
 - package/front_end/models/extensions/ExtensionPanel.ts +1 -1
 - package/front_end/models/extensions/ExtensionServer.ts +3 -3
 - 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/formatter/SourceFormatter.ts +1 -2
 - package/front_end/models/har/Importer.ts +1 -1
 - package/front_end/models/har/Writer.ts +2 -2
 - package/front_end/models/issues_manager/AttributionReportingIssue.ts +1 -1
 - package/front_end/models/issues_manager/ClientHintIssue.ts +6 -2
 - package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +6 -2
 - package/front_end/models/issues_manager/CookieIssue.ts +6 -2
 - package/front_end/models/issues_manager/CorsIssue.ts +1 -1
 - package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +6 -2
 - package/front_end/models/issues_manager/DeprecationIssue.ts +2 -2
 - package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +6 -2
 - package/front_end/models/issues_manager/GenericIssue.ts +6 -2
 - 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 -3
 - 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/NavigatorUserAgentIssue.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 +1 -1
 - package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +3 -3
 - package/front_end/models/issues_manager/TrustedWebActivityIssue.ts +6 -2
 - package/front_end/models/persistence/Automapping.ts +1 -2
 - package/front_end/models/persistence/EditFileSystemView.ts +1 -1
 - package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +4 -4
 - package/front_end/models/persistence/IsolatedFileSystem.ts +1 -2
 - package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
 - package/front_end/models/persistence/NetworkPersistenceManager.ts +1 -2
 - package/front_end/models/persistence/PersistenceImpl.ts +1 -2
 - package/front_end/models/persistence/PersistenceUtils.ts +1 -2
 - package/front_end/models/persistence/WorkspaceSettingsTab.ts +2 -2
 - package/front_end/models/text_utils/StaticContentProvider.ts +1 -1
 - package/front_end/models/timeline_model/TimelineFrameModel.ts +2 -2
 - package/front_end/models/timeline_model/TimelineProfileTree.ts +1 -1
 - package/front_end/models/timeline_model/TracingLayerTree.ts +1 -1
 - package/front_end/models/workspace/UISourceCode.ts +1 -2
 - package/front_end/models/workspace/WorkspaceImpl.ts +1 -2
 - package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
 - package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
 - package/front_end/panels/animation/AnimationTimeline.ts +7 -2
 - package/front_end/panels/animation/AnimationUI.ts +3 -3
 - package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
 - package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -7
 - package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
 - package/front_end/panels/application/BackgroundServiceView.ts +1 -2
 - package/front_end/panels/application/DatabaseQueryView.ts +1 -1
 - package/front_end/panels/application/DatabaseTableView.ts +1 -1
 - package/front_end/panels/application/IndexedDBViews.ts +9 -2
 - package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
 - package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
 - package/front_end/panels/application/ResourcesPanel.ts +1 -1
 - package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
 - package/front_end/panels/application/components/FrameDetailsView.ts +9 -6
 - package/front_end/panels/console/ConsoleFilter.ts +1 -1
 - package/front_end/panels/console/ConsoleSidebar.ts +2 -3
 - package/front_end/panels/console/ConsoleView.ts +2 -4
 - package/front_end/panels/console/ConsoleViewMessage.ts +2 -2
 - package/front_end/panels/console/ConsoleViewport.ts +1 -1
 - package/front_end/panels/coverage/CoverageDecorationManager.ts +1 -1
 - package/front_end/panels/coverage/CoverageListView.ts +1 -2
 - package/front_end/panels/coverage/CoverageView.ts +1 -2
 - package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -5
 - package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
 - package/front_end/panels/css_overview/CSSOverviewModel.ts +3 -3
 - package/front_end/panels/css_overview/CSSOverviewPanel.ts +4 -5
 - package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -2
 - package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
 - package/front_end/panels/elements/ComputedStyleWidget.ts +3 -4
 - package/front_end/panels/elements/ElementsPanel.ts +7 -4
 - package/front_end/panels/elements/ElementsSidebarPane.ts +1 -2
 - package/front_end/panels/elements/ElementsTreeElement.ts +3 -4
 - package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
 - package/front_end/panels/elements/PlatformFontsWidget.ts +1 -2
 - package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
 - package/front_end/panels/elements/StylePropertiesSection.ts +1 -2
 - package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -2
 - package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -3
 - package/front_end/panels/elements/StylesSidebarPane.ts +39 -8
 - package/front_end/panels/elements/TopLayerContainer.ts +1 -1
 - package/front_end/panels/elements/components/AdornerSettingsPane.ts +1 -1
 - package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -3
 - package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +1 -1
 - package/front_end/panels/elements/components/LayoutPane.ts +1 -2
 - package/front_end/panels/elements/components/QueryContainer.ts +1 -1
 - package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -2
 - package/front_end/panels/emulation/AdvancedApp.ts +2 -2
 - package/front_end/panels/emulation/DeviceModeWrapper.ts +1 -1
 - package/front_end/panels/event_listeners/EventListenersView.ts +1 -2
 - package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
 - package/front_end/panels/issues/CorsIssueDetailsView.ts +2 -2
 - package/front_end/panels/issues/IssueView.ts +2 -2
 - package/front_end/panels/issues/IssuesPane.ts +6 -2
 - package/front_end/panels/layer_viewer/LayerDetailsView.ts +8 -2
 - package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
 - package/front_end/panels/layer_viewer/Layers3DView.ts +9 -2
 - package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
 - package/front_end/panels/lighthouse/LighthousePanel.ts +10 -6
 - package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +5 -1
 - package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -2
 - package/front_end/panels/lighthouse/LighthouseStatusView.ts +1 -2
 - package/front_end/panels/lighthouse/LighthouseTimespanView.ts +1 -2
 - package/front_end/panels/media/EventDisplayTable.ts +1 -1
 - package/front_end/panels/media/EventTimelineView.ts +9 -3
 - package/front_end/panels/media/MainView.ts +1 -2
 - package/front_end/panels/media/PlayerDetailView.ts +4 -3
 - package/front_end/panels/media/PlayerListView.ts +2 -2
 - package/front_end/panels/media/PlayerMessagesView.ts +76 -0
 - package/front_end/panels/media/playerMessagesView.css +15 -0
 - package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +6 -2
 - package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +1 -2
 - package/front_end/panels/mobile_throttling/ThrottlingManager.ts +7 -4
 - package/front_end/panels/network/NetworkDataGridNode.ts +1 -1
 - 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 +10 -3
 - package/front_end/panels/network/NetworkLogViewColumns.ts +7 -6
 - package/front_end/panels/network/NetworkPanel.ts +3 -4
 - package/front_end/panels/network/NetworkWaterfallColumn.ts +4 -4
 - package/front_end/panels/network/RequestTimingView.ts +1 -2
 - package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +2 -3
 - package/front_end/panels/profiler/CPUProfileView.ts +3 -3
 - package/front_end/panels/profiler/HeapProfileView.ts +4 -5
 - package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
 - package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +4 -4
 - package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +11 -7
 - package/front_end/panels/profiler/HeapSnapshotProxy.ts +1 -1
 - package/front_end/panels/profiler/HeapSnapshotView.ts +13 -8
 - package/front_end/panels/profiler/ProfileLauncherView.ts +2 -2
 - package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +6 -2
 - package/front_end/panels/profiler/ProfileView.ts +6 -6
 - package/front_end/panels/profiler/ProfilesPanel.ts +6 -2
 - package/front_end/panels/profiler/TopDownProfileDataGrid.ts +1 -2
 - package/front_end/panels/search/SearchResultsPane.ts +1 -1
 - package/front_end/panels/search/SearchView.ts +1 -2
 - package/front_end/panels/security/SecurityPanel.ts +7 -2
 - package/front_end/panels/settings/SettingsScreen.ts +1 -1
 - package/front_end/panels/settings/emulation/utils/UserAgentMetadata.ts +11 -2
 - 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 +7 -2
 - package/front_end/panels/sources/ScriptFormatterEditorAction.ts +7 -2
 - package/front_end/panels/sources/SourcesNavigator.ts +1 -2
 - package/front_end/panels/sources/SourcesPanel.ts +1 -1
 - package/front_end/panels/sources/SourcesSearchScope.ts +3 -0
 - package/front_end/panels/sources/SourcesView.ts +6 -2
 - package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
 - package/front_end/panels/timeline/CountersGraph.ts +2 -3
 - package/front_end/panels/timeline/EventsTimelineTreeView.ts +2 -2
 - package/front_end/panels/timeline/ExtensionTracingSession.ts +3 -3
 - package/front_end/panels/timeline/TimelineDetailsView.ts +6 -6
 - package/front_end/panels/timeline/TimelineEventOverview.ts +3 -3
 - package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -3
 - package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
 - package/front_end/panels/timeline/TimelineFlameChartView.ts +6 -6
 - package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
 - package/front_end/panels/timeline/TimelinePanel.ts +5 -5
 - package/front_end/panels/timeline/TimelineTreeView.ts +2 -2
 - package/front_end/panels/timeline/UIDevtoolsController.ts +1 -2
 - package/front_end/panels/timeline/components/WebVitalsLane.ts +9 -2
 - package/front_end/panels/timeline/components/WebVitalsTimeline.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 +9 -3
 - package/front_end/panels/web_audio/graph_visualizer/NodeRendererUtility.ts +2 -1
 - package/front_end/panels/web_audio/graph_visualizer/NodeView.ts +3 -1
 - package/front_end/third_party/.clang-format +1 -1
 - package/front_end/third_party/i18n/localized-string-set.ts +1 -1
 - package/front_end/ui/components/buttons/Button.ts +30 -5
 - package/front_end/ui/components/buttons/button.css +16 -0
 - package/front_end/ui/components/data_grid/DataGrid.ts +5 -1
 - package/front_end/ui/components/data_grid/DataGridContextMenuUtils.ts +2 -2
 - package/front_end/ui/components/data_grid/DataGridController.ts +12 -5
 - package/front_end/ui/components/data_grid/DataGridControllerIntegrator.ts +1 -2
 - package/front_end/ui/components/data_grid/DataGridEvents.ts +1 -1
 - package/front_end/ui/components/data_grid/DataGridRenderers.ts +1 -1
 - package/front_end/ui/components/docs/building-ui-documentation/CreatingComponents.md +112 -0
 - package/front_end/ui/components/docs/building-ui-documentation/README.md +19 -0
 - package/front_end/ui/components/docs/button/basic.html +11 -0
 - package/front_end/ui/components/docs/button/basic.ts +7 -0
 - package/front_end/ui/components/icon_button/IconButton.ts +1 -3
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +27 -13
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +9 -4
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +10 -5
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +8 -7
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +1 -1
 - package/front_end/ui/components/markdown_view/MarkdownImage.ts +1 -2
 - package/front_end/ui/components/markdown_view/MarkdownView.ts +2 -4
 - package/front_end/ui/components/tree_outline/TreeOutline.ts +3 -1
 - package/front_end/ui/legacy/ActionRegistry.ts +1 -2
 - package/front_end/ui/legacy/Context.ts +1 -1
 - package/front_end/ui/legacy/ContextMenu.ts +2 -2
 - package/front_end/ui/legacy/Dialog.ts +4 -4
 - package/front_end/ui/legacy/DockController.ts +4 -4
 - package/front_end/ui/legacy/FilterBar.ts +3 -3
 - package/front_end/ui/legacy/FilterSuggestionBuilder.ts +1 -1
 - package/front_end/ui/legacy/GlassPane.ts +3 -3
 - package/front_end/ui/legacy/Infobar.ts +1 -1
 - package/front_end/ui/legacy/InspectorView.ts +10 -10
 - package/front_end/ui/legacy/ListControl.ts +2 -2
 - package/front_end/ui/legacy/Panel.ts +1 -1
 - package/front_end/ui/legacy/ShortcutRegistry.ts +2 -3
 - package/front_end/ui/legacy/SoftDropDown.ts +4 -4
 - package/front_end/ui/legacy/SplitWidget.ts +2 -2
 - package/front_end/ui/legacy/SuggestBox.ts +2 -2
 - package/front_end/ui/legacy/TabbedPane.ts +2 -2
 - package/front_end/ui/legacy/TextPrompt.ts +1 -2
 - package/front_end/ui/legacy/Toolbar.ts +2 -3
 - package/front_end/ui/legacy/Treeoutline.ts +3 -3
 - package/front_end/ui/legacy/UIUtils.ts +2 -3
 - package/front_end/ui/legacy/View.ts +4 -4
 - package/front_end/ui/legacy/ViewManager.ts +8 -8
 - package/front_end/ui/legacy/ViewRegistration.ts +2 -2
 - package/front_end/ui/legacy/XLink.ts +1 -1
 - package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +1 -2
 - package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +1 -2
 - package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
 - package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +1 -2
 - package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +1 -2
 - package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +4 -5
 - package/front_end/ui/legacy/components/inline_editor/CSSAngleEditor.ts +1 -1
 - package/front_end/ui/legacy/components/inline_editor/CSSAngleSwatch.ts +1 -2
 - package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +1 -2
 - package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -2
 - package/front_end/ui/legacy/components/inline_editor/Swatches.ts +1 -1
 - package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -4
 - package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +1 -2
 - package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +2 -3
 - package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -2
 - package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -2
 - package/inspector_overlay/css_grid_label_helpers.ts +1 -2
 - package/inspector_overlay/highlight_common.ts +1 -1
 - package/inspector_overlay/highlight_container_query.ts +3 -3
 - package/inspector_overlay/highlight_flex_common.ts +12 -3
 - package/inspector_overlay/highlight_grid_common.ts +3 -3
 - package/inspector_overlay/highlight_isolated_element.ts +1 -1
 - package/inspector_overlay/highlight_scroll_snap.ts +3 -3
 - package/inspector_overlay/main.ts +6 -6
 - package/inspector_overlay/tool_highlight.ts +26 -12
 - package/inspector_overlay/tool_persistent.ts +13 -14
 - package/inspector_overlay/tool_source_order.ts +3 -4
 - package/package.json +1 -1
 - package/scripts/protocol_typescript/protocol_dts_generator.ts +1 -1
 
| 
         @@ -10,14 +10,14 @@ import * as Components from '../../ui/legacy/components/utils/utils.js'; 
     | 
|
| 
       10 
10 
     | 
    
         
             
            import * as UI from '../../ui/legacy/legacy.js';
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            import {EventsTimelineTreeView} from './EventsTimelineTreeView.js';
         
     | 
| 
       13 
     | 
    
         
            -
             
     | 
| 
       14 
     | 
    
         
            -
            import {Events} from './PerformanceModel.js';
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            import {Events, type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
       15 
15 
     | 
    
         
             
            import {TimelineLayersView} from './TimelineLayersView.js';
         
     | 
| 
       16 
16 
     | 
    
         
             
            import {TimelinePaintProfilerView} from './TimelinePaintProfilerView.js';
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            import {TimelineSelection} from './TimelinePanel.js';
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            import {BottomUpTimelineTreeView, CallTreeTimelineTreeView} from './TimelineTreeView.js';
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            import {TimelineSelection, type TimelineModeViewDelegate} from './TimelinePanel.js';
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            import {BottomUpTimelineTreeView, CallTreeTimelineTreeView, type TimelineTreeView} from './TimelineTreeView.js';
         
     | 
| 
       21 
21 
     | 
    
         
             
            import {TimelineDetailsContentHelper, TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
         @@ -37,9 +37,9 @@ import * as UI from '../../ui/legacy/legacy.js'; 
     | 
|
| 
       37 
37 
     | 
    
         
             
            import * as Coverage from '../coverage/coverage.js';
         
     | 
| 
       38 
38 
     | 
    
         
             
            import * as Protocol from '../../generated/protocol.js';
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
     | 
    
         
            -
            import type  
     | 
| 
       41 
     | 
    
         
            -
             
     | 
| 
       42 
     | 
    
         
            -
            import {TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
      
 40 
     | 
    
         
            +
            import {type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            import {TimelineUIUtils, type EventDispatchTypeDescriptor, type TimelineCategory} from './TimelineUIUtils.js';
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
       45 
45 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -42,11 +42,11 @@ import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js'; 
     | 
|
| 
       42 
42 
     | 
    
         | 
| 
       43 
43 
     | 
    
         
             
            import timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js';
         
     | 
| 
       44 
44 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
            import type  
     | 
| 
      
 45 
     | 
    
         
            +
            import {type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
       46 
46 
     | 
    
         
             
            import {FlameChartStyle, Selection, TimelineFlameChartMarker} from './TimelineFlameChartView.js';
         
     | 
| 
       47 
47 
     | 
    
         
             
            import {TimelineSelection} from './TimelinePanel.js';
         
     | 
| 
       48 
     | 
    
         
            -
             
     | 
| 
       49 
     | 
    
         
            -
            import {TimelineUIUtils, assignLayoutShiftsToClusters} from './TimelineUIUtils.js';
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
            import {TimelineUIUtils, assignLayoutShiftsToClusters, type TimelineCategory} from './TimelineUIUtils.js';
         
     | 
| 
       50 
50 
     | 
    
         | 
| 
       51 
51 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
       52 
52 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -15,7 +15,7 @@ import * as UI from '../../ui/legacy/legacy.js'; 
     | 
|
| 
       15 
15 
     | 
    
         
             
            import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
         
     | 
| 
       16 
16 
     | 
    
         
             
            import * as Protocol from '../../generated/protocol.js';
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            import type  
     | 
| 
      
 18 
     | 
    
         
            +
            import {type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
       19 
19 
     | 
    
         
             
            import {FlameChartStyle, Selection} from './TimelineFlameChartView.js';
         
     | 
| 
       20 
20 
     | 
    
         
             
            import {TimelineSelection} from './TimelinePanel.js';
         
     | 
| 
       21 
21 
     | 
    
         
             
            import {TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
         @@ -13,8 +13,8 @@ import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js'; 
     | 
|
| 
       13 
13 
     | 
    
         
             
            import * as UI from '../../ui/legacy/legacy.js';
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
            import {CountersGraph} from './CountersGraph.js';
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            import {Events as PerformanceModelEvents} from './PerformanceModel.js';
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            import {Events as PerformanceModelEvents, type PerformanceModel, type WindowChangedEvent} from './PerformanceModel.js';
         
     | 
| 
       18 
18 
     | 
    
         
             
            import {TimelineDetailsView} from './TimelineDetailsView.js';
         
     | 
| 
       19 
19 
     | 
    
         
             
            import {TimelineRegExp} from './TimelineFilters.js';
         
     | 
| 
       20 
20 
     | 
    
         
             
            import {
         
     | 
| 
         @@ -22,11 +22,11 @@ import { 
     | 
|
| 
       22 
22 
     | 
    
         
             
              TimelineFlameChartDataProvider,
         
     | 
| 
       23 
23 
     | 
    
         
             
            } from './TimelineFlameChartDataProvider.js';
         
     | 
| 
       24 
24 
     | 
    
         
             
            import {TimelineFlameChartNetworkDataProvider} from './TimelineFlameChartNetworkDataProvider.js';
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
            import {TimelineSelection} from './TimelinePanel.js';
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            import {TimelineSelection, type TimelineModeViewDelegate} from './TimelinePanel.js';
         
     | 
| 
       27 
27 
     | 
    
         
             
            import {AggregatedTimelineTreeView} from './TimelineTreeView.js';
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
            import {TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            import {TimelineUIUtils, type TimelineMarkerStyle} from './TimelineUIUtils.js';
         
     | 
| 
       30 
30 
     | 
    
         
             
            import {WebVitalsIntegrator} from './WebVitalsTimelineUtils.js';
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
         @@ -9,7 +9,7 @@ import * as UI from '../../ui/legacy/legacy.js'; 
     | 
|
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            import timelineHistoryManagerStyles from './timelineHistoryManager.css.js';
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            import type  
     | 
| 
      
 12 
     | 
    
         
            +
            import {type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
       13 
13 
     | 
    
         
             
            import {
         
     | 
| 
       14 
14 
     | 
    
         
             
              TimelineEventOverviewCPUActivity,
         
     | 
| 
       15 
15 
     | 
    
         
             
              TimelineEventOverviewNetwork,
         
     | 
| 
         @@ -52,11 +52,10 @@ import timelineStatusDialogStyles from './timelineStatusDialog.css.js'; 
     | 
|
| 
       52 
52 
     | 
    
         
             
            import type * as Coverage from '../coverage/coverage.js';
         
     | 
| 
       53 
53 
     | 
    
         
             
            import * as MobileThrottling from '../mobile_throttling/mobile_throttling.js';
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
     | 
    
         
            -
            import type  
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
            import type  
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
     | 
    
         
            -
            import type {TimelineEventOverview} from './TimelineEventOverview.js';
         
     | 
| 
      
 55 
     | 
    
         
            +
            import {Events, PerformanceModel, type WindowChangedEvent} from './PerformanceModel.js';
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            import {TimelineController, type Client} from './TimelineController.js';
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
       60 
59 
     | 
    
         
             
            import {
         
     | 
| 
       61 
60 
     | 
    
         
             
              TimelineEventOverviewCoverage,
         
     | 
| 
       62 
61 
     | 
    
         
             
              TimelineEventOverviewCPUActivity,
         
     | 
| 
         @@ -65,6 +64,7 @@ import { 
     | 
|
| 
       65 
64 
     | 
    
         
             
              TimelineEventOverviewNetwork,
         
     | 
| 
       66 
65 
     | 
    
         
             
              TimelineEventOverviewResponsiveness,
         
     | 
| 
       67 
66 
     | 
    
         
             
              TimelineFilmStripOverview,
         
     | 
| 
      
 67 
     | 
    
         
            +
              type TimelineEventOverview,
         
     | 
| 
       68 
68 
     | 
    
         
             
            } from './TimelineEventOverview.js';
         
     | 
| 
       69 
69 
     | 
    
         
             
            import {TimelineFlameChartView} from './TimelineFlameChartView.js';
         
     | 
| 
       70 
70 
     | 
    
         
             
            import {TimelineHistoryManager} from './TimelineHistoryManager.js';
         
     | 
| 
         @@ -12,9 +12,9 @@ import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js'; 
     | 
|
| 
       12 
12 
     | 
    
         
             
            import * as Components from '../../ui/legacy/components/utils/utils.js';
         
     | 
| 
       13 
13 
     | 
    
         
             
            import * as UI from '../../ui/legacy/legacy.js';
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
            import type  
     | 
| 
      
 15 
     | 
    
         
            +
            import {type PerformanceModel} from './PerformanceModel.js';
         
     | 
| 
       16 
16 
     | 
    
         
             
            import {TimelineRegExp} from './TimelineFilters.js';
         
     | 
| 
       17 
     | 
    
         
            -
            import type  
     | 
| 
      
 17 
     | 
    
         
            +
            import {type TimelineSelection} from './TimelinePanel.js';
         
     | 
| 
       18 
18 
     | 
    
         
             
            import {TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
         @@ -30,8 +30,7 @@ 
     | 
|
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
            import type * as SDK from '../../core/sdk/sdk.js';
         
     | 
| 
       32 
32 
     | 
    
         | 
| 
       33 
     | 
    
         
            -
            import type  
     | 
| 
       34 
     | 
    
         
            -
            import {TimelineController} from './TimelineController.js';
         
     | 
| 
      
 33 
     | 
    
         
            +
            import {TimelineController, type Client} from './TimelineController.js';
         
     | 
| 
       35 
34 
     | 
    
         
             
            import {TimelineUIUtils} from './TimelineUIUtils.js';
         
     | 
| 
       36 
35 
     | 
    
         
             
            import {UIDevtoolsUtils} from './UIDevtoolsUtils.js';
         
     | 
| 
       37 
36 
     | 
    
         | 
| 
         @@ -6,8 +6,15 @@ import * as Host from '../../../core/host/host.js'; 
     | 
|
| 
       6 
6 
     | 
    
         
             
            import type * as LitHtml from '../../../ui/lit-html/lit-html.js';
         
     | 
| 
       7 
7 
     | 
    
         
             
            import * as i18n from '../../../core/i18n/i18n.js';
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
            import  
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
      
 9 
     | 
    
         
            +
            import {
         
     | 
| 
      
 10 
     | 
    
         
            +
              assertInstanceOf,
         
     | 
| 
      
 11 
     | 
    
         
            +
              LONG_TASK_THRESHOLD,
         
     | 
| 
      
 12 
     | 
    
         
            +
              MarkerType,
         
     | 
| 
      
 13 
     | 
    
         
            +
              type Event,
         
     | 
| 
      
 14 
     | 
    
         
            +
              type Marker,
         
     | 
| 
      
 15 
     | 
    
         
            +
              type Timebox,
         
     | 
| 
      
 16 
     | 
    
         
            +
              type WebVitalsTimeline,
         
     | 
| 
      
 17 
     | 
    
         
            +
            } from './WebVitalsTimeline.js';
         
     | 
| 
       11 
18 
     | 
    
         | 
| 
       12 
19 
     | 
    
         
             
            type GetMarkerTypeCallback = (event: Event) => MarkerType;
         
     | 
| 
       13 
20 
     | 
    
         
             
            type GetMarkerOverlayCallback = (marker: Marker) => LitHtml.TemplateResult;
         
     | 
| 
         @@ -11,7 +11,7 @@ import * as LitHtml from '../../../ui/lit-html/lit-html.js'; 
     | 
|
| 
       11 
11 
     | 
    
         
             
            const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
            import {WebVitalsEventLane, WebVitalsTimeboxLane} from './WebVitalsLane.js';
         
     | 
| 
       14 
     | 
    
         
            -
            import type  
     | 
| 
      
 14 
     | 
    
         
            +
            import {type WebVitalsTooltip} from './WebVitalsTooltip.js';
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
            const UIStrings = {
         
     | 
| 
       17 
17 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       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 type  
     | 
| 
      
 5 
     | 
    
         
            +
            import {type NodeParamConnectionData, type NodesConnectionData} from './GraphStyle.js';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import {generateInputPortId, generateOutputPortId, generateParamPortId} from './NodeView.js';
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            // A class that represents an edge of a graph, including node-to-node connection,
         
     | 
| 
         @@ -6,9 +6,15 @@ import * as Common from '../../../core/common/common.js'; 
     | 
|
| 
       6 
6 
     | 
    
         
             
            import * as Platform from '../../../core/platform/platform.js';
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            import {EdgeTypes, EdgeView, generateEdgePortIdsByData} from './EdgeView.js';
         
     | 
| 
       9 
     | 
    
         
            -
            import  
     | 
| 
       10 
     | 
    
         
            -
              NodeCreationData, 
     | 
| 
       11 
     | 
    
         
            -
               
     | 
| 
      
 9 
     | 
    
         
            +
            import {
         
     | 
| 
      
 10 
     | 
    
         
            +
              type NodeCreationData,
         
     | 
| 
      
 11 
     | 
    
         
            +
              type NodeParamConnectionData,
         
     | 
| 
      
 12 
     | 
    
         
            +
              type NodeParamDisconnectionData,
         
     | 
| 
      
 13 
     | 
    
         
            +
              type NodesConnectionData,
         
     | 
| 
      
 14 
     | 
    
         
            +
              type NodesDisconnectionData,
         
     | 
| 
      
 15 
     | 
    
         
            +
              type NodesDisconnectionDataWithDestination,
         
     | 
| 
      
 16 
     | 
    
         
            +
              type ParamCreationData,
         
     | 
| 
      
 17 
     | 
    
         
            +
            } from './GraphStyle.js';
         
     | 
| 
       12 
18 
     | 
    
         
             
            import {NodeLabelGenerator, NodeView} from './NodeView.js';
         
     | 
| 
       13 
19 
     | 
    
         | 
| 
       14 
20 
     | 
    
         
             
            // A class that tracks all the nodes and edges of an audio graph.
         
     | 
| 
         @@ -2,7 +2,6 @@ 
     | 
|
| 
       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 type {Point, Size} from './GraphStyle.js';
         
     | 
| 
       6 
5 
     | 
    
         
             
            import {
         
     | 
| 
       7 
6 
     | 
    
         
             
              AudioParamRadius,
         
     | 
| 
       8 
7 
     | 
    
         
             
              InputPortRadius,
         
     | 
| 
         @@ -10,6 +9,8 @@ import { 
     | 
|
| 
       10 
9 
     | 
    
         
             
              TotalInputPortHeight,
         
     | 
| 
       11 
10 
     | 
    
         
             
              TotalOutputPortHeight,
         
     | 
| 
       12 
11 
     | 
    
         
             
              TotalParamPortHeight,
         
     | 
| 
      
 12 
     | 
    
         
            +
              type Point,
         
     | 
| 
      
 13 
     | 
    
         
            +
              type Size,
         
     | 
| 
       13 
14 
     | 
    
         
             
            } from './GraphStyle.js';
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
       15 
16 
     | 
    
         
             
            /**
         
     | 
| 
         @@ -4,7 +4,6 @@ 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            import * as UI from '../../../ui/legacy/legacy.js';
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            import type {NodeCreationData, NodeLayout, Port} from './GraphStyle.js';
         
     | 
| 
       8 
7 
     | 
    
         
             
            import {
         
     | 
| 
       9 
8 
     | 
    
         
             
              BottomPaddingWithoutParam,
         
     | 
| 
       10 
9 
     | 
    
         
             
              BottomPaddingWithParam,
         
     | 
| 
         @@ -17,6 +16,9 @@ import { 
     | 
|
| 
       17 
16 
     | 
    
         
             
              TotalInputPortHeight,
         
     | 
| 
       18 
17 
     | 
    
         
             
              TotalOutputPortHeight,
         
     | 
| 
       19 
18 
     | 
    
         
             
              TotalParamPortHeight,
         
     | 
| 
      
 19 
     | 
    
         
            +
              type NodeCreationData,
         
     | 
| 
      
 20 
     | 
    
         
            +
              type NodeLayout,
         
     | 
| 
      
 21 
     | 
    
         
            +
              type Port,
         
     | 
| 
       20 
22 
     | 
    
         
             
            } from './GraphStyle.js';
         
     | 
| 
       21 
23 
     | 
    
         
             
            import {calculateInputPortXY, calculateOutputPortXY, calculateParamPortXY} from './NodeRendererUtility.js';
         
     | 
| 
       22 
24 
     | 
    
         | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            DisableFormat: true
         
     | 
| 
      
 1 
     | 
    
         
            +
            DisableFormat: true
         
     | 
| 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
         
     | 
| 
       3 
3 
     | 
    
         
             
            // Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
            import type  
     | 
| 
      
 5 
     | 
    
         
            +
            import {type LocalizedMessages, type UIStrings} from './i18n-impl.js';
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            import * as IntlMessageFormat from '../intl-messageformat/intl-messageformat.js';
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
         @@ -17,7 +17,16 @@ declare global { 
     | 
|
| 
       17 
17 
     | 
    
         
             
            export const enum Variant {
         
     | 
| 
       18 
18 
     | 
    
         
             
              PRIMARY = 'primary',
         
     | 
| 
       19 
19 
     | 
    
         
             
              SECONDARY = 'secondary',
         
     | 
| 
      
 20 
     | 
    
         
            +
              // This is a bit confusing: the TOOLBAR variant is the historical variant
         
     | 
| 
      
 21 
     | 
    
         
            +
              // that has been used when adding toolbar icons to legacy DevTools toolbars.
         
     | 
| 
      
 22 
     | 
    
         
            +
              // In July 2022 we began work on the new unified toolbar, which will first be
         
     | 
| 
      
 23 
     | 
    
         
            +
              // built for Performance Insights and then rolled out across the panels. Once
         
     | 
| 
      
 24 
     | 
    
         
            +
              // that work is done, we can remove these two variants and revert back to
         
     | 
| 
      
 25 
     | 
    
         
            +
              // having one.
         
     | 
| 
      
 26 
     | 
    
         
            +
              // We need to differentiate because the unified toolbar icons are 16px in
         
     | 
| 
      
 27 
     | 
    
         
            +
              // size, not 18px (which the toolbar small icons are).
         
     | 
| 
       20 
28 
     | 
    
         
             
              TOOLBAR = 'toolbar',
         
     | 
| 
      
 29 
     | 
    
         
            +
              UNIFIED_TOOLBAR_2022 = 'unified_toolbar_2022',
         
     | 
| 
       21 
30 
     | 
    
         
             
              ROUND = 'round',
         
     | 
| 
       22 
31 
     | 
    
         
             
            }
         
     | 
| 
       23 
32 
     | 
    
         | 
| 
         @@ -60,6 +69,12 @@ export type ButtonData = { 
     | 
|
| 
       60 
69 
     | 
    
         
             
              type?: ButtonType,
         
     | 
| 
       61 
70 
     | 
    
         
             
              value?: string,
         
     | 
| 
       62 
71 
     | 
    
         
             
              title?: string,
         
     | 
| 
      
 72 
     | 
    
         
            +
            }|{
         
     | 
| 
      
 73 
     | 
    
         
            +
              variant: Variant.UNIFIED_TOOLBAR_2022,
         
     | 
| 
      
 74 
     | 
    
         
            +
              iconUrl: string,
         
     | 
| 
      
 75 
     | 
    
         
            +
              disabled?: boolean,
         
     | 
| 
      
 76 
     | 
    
         
            +
              active?: boolean,
         
     | 
| 
      
 77 
     | 
    
         
            +
              title?: string,
         
     | 
| 
       63 
78 
     | 
    
         
             
            };
         
     | 
| 
       64 
79 
     | 
    
         | 
| 
       65 
80 
     | 
    
         
             
            interface ButtonElementInternals extends ElementInternals {
         
     | 
| 
         @@ -100,10 +115,19 @@ export class Button extends HTMLElement { 
     | 
|
| 
       100 
115 
     | 
    
         
             
              set data(data: ButtonData) {
         
     | 
| 
       101 
116 
     | 
    
         
             
                this.#props.variant = data.variant;
         
     | 
| 
       102 
117 
     | 
    
         
             
                this.#props.iconUrl = data.iconUrl;
         
     | 
| 
       103 
     | 
    
         
            -
                this.#props.size =  
     | 
| 
      
 118 
     | 
    
         
            +
                this.#props.size = Size.MEDIUM;
         
     | 
| 
      
 119 
     | 
    
         
            +
             
     | 
| 
      
 120 
     | 
    
         
            +
                if ('size' in data && data.size) {
         
     | 
| 
      
 121 
     | 
    
         
            +
                  this.#props.size = data.size;
         
     | 
| 
      
 122 
     | 
    
         
            +
                }
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
       104 
124 
     | 
    
         
             
                this.#props.active = Boolean(data.active);
         
     | 
| 
       105 
     | 
    
         
            -
                this.#props.spinner = Boolean(data.spinner);
         
     | 
| 
       106 
     | 
    
         
            -
             
     | 
| 
      
 125 
     | 
    
         
            +
                this.#props.spinner = Boolean('spinner' in data ? data.spinner : false);
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
                this.#props.type = 'button';
         
     | 
| 
      
 128 
     | 
    
         
            +
                if ('type' in data && data.type) {
         
     | 
| 
      
 129 
     | 
    
         
            +
                  this.#props.type = data.type;
         
     | 
| 
      
 130 
     | 
    
         
            +
                }
         
     | 
| 
       107 
131 
     | 
    
         
             
                this.#setDisabledProperty(data.disabled || false);
         
     | 
| 
       108 
132 
     | 
    
         
             
                this.#props.title = data.title;
         
     | 
| 
       109 
133 
     | 
    
         
             
                void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
         
     | 
| 
         @@ -192,7 +216,7 @@ export class Button extends HTMLElement { 
     | 
|
| 
       192 
216 
     | 
    
         
             
                if (!this.#props.variant) {
         
     | 
| 
       193 
217 
     | 
    
         
             
                  throw new Error('Button requires a variant to be defined');
         
     | 
| 
       194 
218 
     | 
    
         
             
                }
         
     | 
| 
       195 
     | 
    
         
            -
                if (this.#props.variant === Variant.TOOLBAR) {
         
     | 
| 
      
 219 
     | 
    
         
            +
                if (this.#props.variant === Variant.TOOLBAR || this.#props.variant === Variant.UNIFIED_TOOLBAR_2022) {
         
     | 
| 
       196 
220 
     | 
    
         
             
                  if (!this.#props.iconUrl) {
         
     | 
| 
       197 
221 
     | 
    
         
             
                    throw new Error('Toolbar button requires an icon');
         
     | 
| 
       198 
222 
     | 
    
         
             
                  }
         
     | 
| 
         @@ -211,7 +235,8 @@ export class Button extends HTMLElement { 
     | 
|
| 
       211 
235 
     | 
    
         
             
                const classes = {
         
     | 
| 
       212 
236 
     | 
    
         
             
                  primary: this.#props.variant === Variant.PRIMARY,
         
     | 
| 
       213 
237 
     | 
    
         
             
                  secondary: this.#props.variant === Variant.SECONDARY,
         
     | 
| 
       214 
     | 
    
         
            -
                  toolbar: this.#props.variant === Variant.TOOLBAR,
         
     | 
| 
      
 238 
     | 
    
         
            +
                  toolbar: this.#props.variant === Variant.TOOLBAR || this.#props.variant === Variant.UNIFIED_TOOLBAR_2022,
         
     | 
| 
      
 239 
     | 
    
         
            +
                  'unified-toolbar-2022': this.#props.variant === Variant.UNIFIED_TOOLBAR_2022,
         
     | 
| 
       215 
240 
     | 
    
         
             
                  round: this.#props.variant === Variant.ROUND,
         
     | 
| 
       216 
241 
     | 
    
         
             
                  'text-with-icon': Boolean(this.#props.iconUrl) && !this.#isEmpty,
         
     | 
| 
       217 
242 
     | 
    
         
             
                  'only-icon': Boolean(this.#props.iconUrl) && this.#isEmpty,
         
     | 
| 
         @@ -85,6 +85,15 @@ button.toolbar.small { 
     | 
|
| 
       85 
85 
     | 
    
         
             
              width: 18px;
         
     | 
| 
       86 
86 
     | 
    
         
             
            }
         
     | 
| 
       87 
87 
     | 
    
         | 
| 
      
 88 
     | 
    
         
            +
            button.unified-toolbar-2022 {
         
     | 
| 
      
 89 
     | 
    
         
            +
              /* These buttons are always 16px in dimension, and don't have different
         
     | 
| 
      
 90 
     | 
    
         
            +
               * sizes, hence the lack of a size class above and the use of important! to
         
     | 
| 
      
 91 
     | 
    
         
            +
               * ensure no sizing classes accidentally interfere.
         
     | 
| 
      
 92 
     | 
    
         
            +
               */
         
     | 
| 
      
 93 
     | 
    
         
            +
              height: 16px !important; /* stylelint-disable-line declaration-no-important */
         
     | 
| 
      
 94 
     | 
    
         
            +
              width: 16px !important;/* stylelint-disable-line declaration-no-important */
         
     | 
| 
      
 95 
     | 
    
         
            +
            }
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
       88 
97 
     | 
    
         
             
            button.round.small {
         
     | 
| 
       89 
98 
     | 
    
         
             
              height: 24px;
         
     | 
| 
       90 
99 
     | 
    
         
             
              width: 24px;
         
     | 
| 
         @@ -199,6 +208,13 @@ button.round devtools-icon { 
     | 
|
| 
       199 
208 
     | 
    
         
             
              --icon-color: var(--color-text-secondary);
         
     | 
| 
       200 
209 
     | 
    
         
             
            }
         
     | 
| 
       201 
210 
     | 
    
         | 
| 
      
 211 
     | 
    
         
            +
            button.unified-toolbar-2022 devtools-icon {
         
     | 
| 
      
 212 
     | 
    
         
            +
              width: 16px;
         
     | 
| 
      
 213 
     | 
    
         
            +
              height: 16px;
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
              --icon-color: var(--color-text-secondary);
         
     | 
| 
      
 216 
     | 
    
         
            +
            }
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
       202 
218 
     | 
    
         
             
            button.primary devtools-icon {
         
     | 
| 
       203 
219 
     | 
    
         
             
              --icon-color: var(--color-background);
         
     | 
| 
       204 
220 
     | 
    
         
             
            }
         
     | 
| 
         @@ -15,7 +15,7 @@ import {BodyCellFocusedEvent, ColumnHeaderClickEvent, ContextMenuHeaderResetClic 
     | 
|
| 
       15 
15 
     | 
    
         
             
            const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
            import {addColumnVisibilityCheckboxes, addSortableColumnItems} from './DataGridContextMenuUtils.js';
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
       19 
19 
     | 
    
         
             
            import {
         
     | 
| 
       20 
20 
     | 
    
         
             
              calculateColumnWidthPercentageFromWeighting,
         
     | 
| 
       21 
21 
     | 
    
         
             
              calculateFirstFocusableCell,
         
     | 
| 
         @@ -24,6 +24,10 @@ import { 
     | 
|
| 
       24 
24 
     | 
    
         
             
              handleArrowKeyNavigation,
         
     | 
| 
       25 
25 
     | 
    
         
             
              renderCellValue,
         
     | 
| 
       26 
26 
     | 
    
         
             
              SortDirection,
         
     | 
| 
      
 27 
     | 
    
         
            +
              type CellPosition,
         
     | 
| 
      
 28 
     | 
    
         
            +
              type Column,
         
     | 
| 
      
 29 
     | 
    
         
            +
              type Row,
         
     | 
| 
      
 30 
     | 
    
         
            +
              type SortState,
         
     | 
| 
       27 
31 
     | 
    
         
             
            } from './DataGridUtils.js';
         
     | 
| 
       28 
32 
     | 
    
         | 
| 
       29 
33 
     | 
    
         
             
            import * as i18n from '../../../core/i18n/i18n.js';
         
     | 
| 
         @@ -3,9 +3,9 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            // found in the LICENSE file.
         
     | 
| 
       4 
4 
     | 
    
         
             
            import type * as UI from '../../legacy/legacy.js';
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
            import type  
     | 
| 
      
 6 
     | 
    
         
            +
            import {type DataGrid} from './DataGrid.js';
         
     | 
| 
       7 
7 
     | 
    
         
             
            import {ContextMenuColumnSortClickEvent} from './DataGridEvents.js';
         
     | 
| 
       8 
     | 
    
         
            -
            import type  
     | 
| 
      
 8 
     | 
    
         
            +
            import {type Column} from './DataGridUtils.js';
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
            function toggleColumnVisibility(dataGrid: DataGrid, column: Column): void {
         
     | 
| 
       11 
11 
     | 
    
         
             
              const newVisibility = !column.visible;
         
     | 
| 
         @@ -5,11 +5,18 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
            import * as LitHtml from '../../../ui/lit-html/lit-html.js';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import * as ComponentHelpers from '../helpers/helpers.js';
         
     | 
| 
       7 
7 
     | 
    
         
             
            import type * as TextUtils from '../../../models/text_utils/text_utils.js';
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            import { 
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            import {
         
     | 
| 
      
 10 
     | 
    
         
            +
              SortDirection,
         
     | 
| 
      
 11 
     | 
    
         
            +
              getRowEntryForColumnId,
         
     | 
| 
      
 12 
     | 
    
         
            +
              getStringifiedCellValues,
         
     | 
| 
      
 13 
     | 
    
         
            +
              type SortState,
         
     | 
| 
      
 14 
     | 
    
         
            +
              type Column,
         
     | 
| 
      
 15 
     | 
    
         
            +
              type Row,
         
     | 
| 
      
 16 
     | 
    
         
            +
            } from './DataGridUtils.js';
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            import {type ContextMenuColumnSortClickEvent, type ColumnHeaderClickEvent} from './DataGridEvents.js';
         
     | 
| 
      
 19 
     | 
    
         
            +
            import {DataGrid, type DataGridData, type DataGridContextMenusConfiguration} from './DataGrid.js';
         
     | 
| 
       13 
20 
     | 
    
         
             
            import dataGridControllerStyles from './dataGridController.css.js';
         
     | 
| 
       14 
21 
     | 
    
         | 
| 
       15 
22 
     | 
    
         
             
            export interface DataGridControllerData {
         
     | 
| 
         @@ -3,8 +3,7 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            // found in the LICENSE file.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            import * as UI from '../../legacy/legacy.js';
         
     | 
| 
       6 
     | 
    
         
            -
            import {DataGridController} from './DataGridController.js';
         
     | 
| 
       7 
     | 
    
         
            -
            import type {DataGridControllerData} from './DataGridController.js';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import {DataGridController, type DataGridControllerData} from './DataGridController.js';
         
     | 
| 
       8 
7 
     | 
    
         | 
| 
       9 
8 
     | 
    
         
             
            export class DataGridControllerIntegrator extends UI.Widget.VBox {
         
     | 
| 
       10 
9 
     | 
    
         
             
              readonly dataGrid: DataGridController;
         
     | 
| 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            // Copyright (c) 2021 The Chromium Authors. All rights reserved.
         
     | 
| 
       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 
     | 
    
         
            -
            import type  
     | 
| 
      
 4 
     | 
    
         
            +
            import {type Cell, type Column, type Row} from './DataGridUtils.js';
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            export class ColumnHeaderClickEvent extends Event {
         
     | 
| 
       7 
7 
     | 
    
         
             
              static readonly eventName = 'columnheaderclick';
         
     | 
| 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       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 
     | 
    
         
             
            import * as LitHtml from '../../../ui/lit-html/lit-html.js';
         
     | 
| 
       5 
     | 
    
         
            -
            import type  
     | 
| 
      
 5 
     | 
    
         
            +
            import {type CellValue} from './DataGridUtils.js';
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            export const primitiveRenderer = (value: CellValue): LitHtml.TemplateResult => {
         
     | 
| 
       8 
8 
     | 
    
         
             
              return LitHtml.html`${value}`;
         
     | 
| 
         @@ -0,0 +1,112 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Creating components
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            A component is created by extending `HTMLElement`. The name of the component should match the filename. The component should be exported by the file.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 6 
     | 
    
         
            +
            // ElementBreadcrumbs.ts
         
     | 
| 
      
 7 
     | 
    
         
            +
            export class ElementBreadcrumbs extends HTMLElement {
         
     | 
| 
      
 8 
     | 
    
         
            +
            }
         
     | 
| 
      
 9 
     | 
    
         
            +
            ```
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## Where to put components
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            If the component is for a specific panel, and not expected to be re-usable, it should be created within the panel's folder, within a sub-directory of `components`:
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            ```
         
     | 
| 
      
 16 
     | 
    
         
            +
            front_end/panels/elements/components/ElementsBreadcrumbs.ts
         
     | 
| 
      
 17 
     | 
    
         
            +
            ```
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            If a component is designed to be re-usable, it should live in `front_end/ui/components`, in its own folder. That folder also contains an entrypoint, along with files for the component's definition.
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            ```
         
     | 
| 
      
 22 
     | 
    
         
            +
            front_end/ui/components/button/button.ts // entrypoint
         
     | 
| 
      
 23 
     | 
    
         
            +
            front_end/ui/components/button/Button.ts // component definition
         
     | 
| 
      
 24 
     | 
    
         
            +
            ```
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            ## Defining and naming a component
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            A component should be given a `static readonly litTagName` property, which defines its name:
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 31 
     | 
    
         
            +
            // ElementBreadcrumbs.ts
         
     | 
| 
      
 32 
     | 
    
         
            +
            export class ElementBreadcrumbs extends HTMLElement {
         
     | 
| 
      
 33 
     | 
    
         
            +
              static readonly litTagName = LitHtml.literal`devtools-elements-breadcrumbs`;
         
     | 
| 
      
 34 
     | 
    
         
            +
            }
         
     | 
| 
      
 35 
     | 
    
         
            +
            ```
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
      
 37 
     | 
    
         
            +
            > Remember that all custom elements **must** contain a hyphen. Prefer `devtools-` as the prefix by default.
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            We then use the `ComponentHelpers` module (`front_end/ui/components/helpers`) to define the component and register it with the browser:
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 42 
     | 
    
         
            +
            ComponentHelpers.CustomElements.defineComponent('devtools-elements-breadcrumbs', ElementsBreadcrumbs);
         
     | 
| 
      
 43 
     | 
    
         
            +
            ```
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            And finally we tell TypeScript that this component exists:
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 48 
     | 
    
         
            +
            declare global {
         
     | 
| 
      
 49 
     | 
    
         
            +
              interface HTMLElementTagNameMap {
         
     | 
| 
      
 50 
     | 
    
         
            +
                'devtools-elements-breadcrumbs': ElementsBreadcrumbs;
         
     | 
| 
      
 51 
     | 
    
         
            +
              }
         
     | 
| 
      
 52 
     | 
    
         
            +
            }
         
     | 
| 
      
 53 
     | 
    
         
            +
            ```
         
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            By doing this, TypeScript understands that `document.querySelector('devtools-elements-breadcrumbs')` returns an `ElementsBreadcrumbs` instance.
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
            We have a custom ESLint rule that ensures that the tag name is used consistently in all the locations where it is required.
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
            ## Creating a shadow root
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
            Each component gets its own Shadow Root to ensure that styles and events that occur within it are encapsulated and do not leak out:
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 64 
     | 
    
         
            +
            export class ElementsBreadcrumbs extends HTMLElement {
         
     | 
| 
      
 65 
     | 
    
         
            +
              static readonly litTagName = LitHtml.literal`devtools-elements-breadcrumbs`;
         
     | 
| 
      
 66 
     | 
    
         
            +
              readonly #shadow = this.attachShadow({mode: 'open'});
         
     | 
| 
      
 67 
     | 
    
         
            +
            }
         
     | 
| 
      
 68 
     | 
    
         
            +
            ```
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
            > We set the mode to `open` so it's open to inspection via DevTools. [See this MDN explainer](https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/mode) for more details.
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
            ## Rendering a component
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            Each component defines a `#render` method which is responsible for invoking LitHtml and having the component render HTML into the DOM.
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
            > The `#` symbol indicates a [private class method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields).
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
            The `#render` method calls `LitHtml.render`, building up a template with `LitHtml.html`:
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 81 
     | 
    
         
            +
            LitHtml.render(LitHtml.html``, this.#shadow, {host: this});
         
     | 
| 
      
 82 
     | 
    
         
            +
            ```
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
            There is unfortunately a [clang-format bug](crbug.com/1079231) which makes its auto-formatting of LitHtml templates very unreadable, so we usually disable clang-format round the call:
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 87 
     | 
    
         
            +
            // clang-format off
         
     | 
| 
      
 88 
     | 
    
         
            +
            LitHtml.render(...)
         
     | 
| 
      
 89 
     | 
    
         
            +
            // clang-format on
         
     | 
| 
      
 90 
     | 
    
         
            +
            ```
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
            ## Scheduled and batched rendering
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
            To have your component render, you could manually call `this.#render()`. However, if you were to have multiple updates to a component (perhaps some values it's passed get changed), we want to avoid having multiple renders where possible and instead batch them.
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
            We can use the `ScheduledRender` helper (`front_end/ui/components/helpers/scheduled-render.ts`) to achieve this. First, bind the `#render` method of your component, to ensure it's always bound to the component instance's scope:
         
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 99 
     | 
    
         
            +
            export class ElementsBreadcrumbs extends HTMLElement {
         
     | 
| 
      
 100 
     | 
    
         
            +
              static readonly litTagName = LitHtml.literal`devtools-chrome-link`;
         
     | 
| 
      
 101 
     | 
    
         
            +
              readonly #shadow = this.attachShadow({mode: 'open'});
         
     | 
| 
      
 102 
     | 
    
         
            +
              readonly #boundRender = this.#render.bind(this);
         
     | 
| 
      
 103 
     | 
    
         
            +
            }
         
     | 
| 
      
 104 
     | 
    
         
            +
            ```
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
            Then, rather than call `this.#render()` directly, you instead call the scheduler:
         
     | 
| 
      
 107 
     | 
    
         
            +
             
     | 
| 
      
 108 
     | 
    
         
            +
            ```ts
         
     | 
| 
      
 109 
     | 
    
         
            +
            void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
         
     | 
| 
      
 110 
     | 
    
         
            +
            ```
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
            > `scheduleRender` returns a promise; we use the `void` keyword to instruct TypeScript that we are purposefully not using `await` to wait for the promise to resolve. When scheduling a render it's most common to "fire and forget".
         
     | 
| 
         @@ -0,0 +1,19 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Building UI elements in DevTools
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            This is the documentation containing all the information you need to be able to build UI in DevTools and get familiar with our front-end stack.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Note that this documentation is a work in progress as it is migrated from the [original Google Doc](https://docs.google.com/document/d/1Gwd-w7LoW1qnWu3uku438-MQ82m4AinKDIdy9z3fl3Q/edit?resourcekey=0-vxHqiKAvfJ4JAOj4bZ4EFA#). crbug.com/1344124 tracks this work.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ## Table of Contents
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            1. [Creating components](./CreatingComponents.md)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            ## FAQs
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            > Wasn't this a google doc before?
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            Yes. The original version of this documentation was a publicly accessible Google Doc. However, keeping the documentation apart from the code was a challenge, along with the fact that Docs aren't the best for dealing with lots of code. That motivated the change to move the documentation into the repository, hopefully helping it keep up to date and still remaining public.
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            > What should I do if I want to make a change?
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            Please send a CL and ask jacktfranklin@ to review it. If you're not sure on the change, feel free to ping jacktfranklin@ to discuss.
         
     | 
| 
         @@ -35,6 +35,15 @@ 
     | 
|
| 
       35 
35 
     | 
    
         
             
                    padding: 0px 5px;
         
     | 
| 
       36 
36 
     | 
    
         
             
                    height: 23px;
         
     | 
| 
       37 
37 
     | 
    
         
             
                  }
         
     | 
| 
      
 38 
     | 
    
         
            +
                  #unified-toolbar {
         
     | 
| 
      
 39 
     | 
    
         
            +
                    background-color: var(--color-background);
         
     | 
| 
      
 40 
     | 
    
         
            +
                    display: flex;
         
     | 
| 
      
 41 
     | 
    
         
            +
                    flex-direction: row;
         
     | 
| 
      
 42 
     | 
    
         
            +
                    align-items: center;
         
     | 
| 
      
 43 
     | 
    
         
            +
                    border-bottom: 1px solid var(--color-details-hairline);
         
     | 
| 
      
 44 
     | 
    
         
            +
                    padding: 5px 6px;
         
     | 
| 
      
 45 
     | 
    
         
            +
                    height: 26px;
         
     | 
| 
      
 46 
     | 
    
         
            +
                  }
         
     | 
| 
       38 
47 
     | 
    
         
             
                  .separator {
         
     | 
| 
       39 
48 
     | 
    
         
             
                    background-color: var(--color-details-hairline);
         
     | 
| 
       40 
49 
     | 
    
         
             
                    width: 1px;
         
     | 
| 
         @@ -50,6 +59,8 @@ 
     | 
|
| 
       50 
59 
     | 
    
         
             
                </div>
         
     | 
| 
       51 
60 
     | 
    
         
             
                <div id="small-toolbar">
         
     | 
| 
       52 
61 
     | 
    
         
             
                </div>
         
     | 
| 
      
 62 
     | 
    
         
            +
                <div id="unified-toolbar">
         
     | 
| 
      
 63 
     | 
    
         
            +
                </div>
         
     | 
| 
       53 
64 
     | 
    
         
             
                <form onsubmit="event.preventDefault(); alert('submitted');" id="form">
         
     | 
| 
       54 
65 
     | 
    
         
             
                  <input name="field" placeholder="Enter smth" />
         
     | 
| 
       55 
66 
     | 
    
         
             
                </form>
         
     | 
| 
         @@ -299,6 +299,13 @@ for (let i = 0; i < 6; i++) { 
     | 
|
| 
       299 
299 
     | 
    
         
             
              }
         
     | 
| 
       300 
300 
     | 
    
         
             
            }
         
     | 
| 
       301 
301 
     | 
    
         | 
| 
      
 302 
     | 
    
         
            +
            const unifiedToolbarButton = new Buttons.Button.Button();
         
     | 
| 
      
 303 
     | 
    
         
            +
            unifiedToolbarButton.data = {
         
     | 
| 
      
 304 
     | 
    
         
            +
              variant: Buttons.Button.Variant.UNIFIED_TOOLBAR_2022,
         
     | 
| 
      
 305 
     | 
    
         
            +
              iconUrl: testIcon,
         
     | 
| 
      
 306 
     | 
    
         
            +
            };
         
     | 
| 
      
 307 
     | 
    
         
            +
            document.querySelector('#unified-toolbar')?.appendChild(unifiedToolbarButton);
         
     | 
| 
      
 308 
     | 
    
         
            +
             
     | 
| 
       302 
309 
     | 
    
         
             
            // Submit Button
         
     | 
| 
       303 
310 
     | 
    
         
             
            const submitButton = new Buttons.Button.Button();
         
     | 
| 
       304 
311 
     | 
    
         
             
            submitButton.data = {
         
     | 
| 
         @@ -5,11 +5,9 @@ 
     | 
|
| 
       5 
5 
     | 
    
         
             
            import * as ComponentHelpers from '../../components/helpers/helpers.js';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import * as LitHtml from '../../lit-html/lit-html.js';
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
     | 
    
         
            -
            import {Icon} from './Icon.js';
         
     | 
| 
      
 8 
     | 
    
         
            +
            import {Icon, type IconData} from './Icon.js';
         
     | 
| 
       9 
9 
     | 
    
         
             
            import iconButtonStyles from './iconButton.css.js';
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
            import type {IconData} from './Icon.js';
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
11 
     | 
    
         
             
            export interface IconWithTextData {
         
     | 
| 
       14 
12 
     | 
    
         
             
              iconName: string;
         
     | 
| 
       15 
13 
     | 
    
         
             
              iconColor?: string;
         
     |