chrome-devtools-frontend 1.0.1616061 → 1.0.1621064
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/AUTHORS +1 -0
- package/docs/checklist/README.md +8 -7
- package/eslint.config.mjs +7 -0
- package/front_end/core/common/Object.ts +11 -2
- package/front_end/core/dom_extension/DOMExtension.ts +11 -8
- package/front_end/core/host/AidaClient.ts +8 -0
- package/front_end/core/host/AidaGcaTranslation.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/platform/api/HostRuntime.ts +2 -2
- package/front_end/core/platform/browser/HostRuntime.ts +4 -2
- package/front_end/core/platform/node/HostRuntime.ts +2 -2
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/NetworkManager.ts +30 -4
- package/front_end/core/sdk/NetworkRequest.ts +2 -10
- package/front_end/core/sdk/Resource.ts +2 -1
- package/front_end/core/sdk/ServerSentEventsProtocol.ts +1 -1
- package/front_end/core/sdk/TraceObject.ts +7 -2
- package/front_end/entrypoint_template.html +1 -2
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +119 -15
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +43 -33
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +2 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +9 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/generated/InspectorBackendCommands.ts +8 -7
- package/front_end/generated/SupportedCSSProperties.js +119 -100
- package/front_end/generated/protocol-mapping.d.ts +1 -9
- package/front_end/generated/protocol-proxy-api.d.ts +1 -9
- package/front_end/generated/protocol.ts +24 -1
- package/front_end/legacy/legacy-defs.d.ts +1 -1
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +39 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -0
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +28 -16
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +512 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +112 -145
- package/front_end/models/ai_assistance/agents/README.md +0 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +9 -16
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +19 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +48 -13
- package/front_end/models/bindings/SymbolizedError.ts +95 -8
- package/front_end/models/emulation/DeviceModeModel.ts +42 -13
- package/front_end/models/emulation/EmulatedDevices.ts +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +13 -6
- package/front_end/models/issues_manager/IssuesManagerEvents.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -0
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +49 -10
- package/front_end/models/stack_trace/ErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/StackTraceModel.ts +5 -1
- package/front_end/models/text_utils/ContentData.ts +71 -10
- package/front_end/models/trace/types/File.ts +8 -1
- package/front_end/models/web_mcp/WebMCPModel.ts +22 -0
- package/front_end/models/workspace/UISourceCode.ts +4 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +4 -4
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +3 -2
- package/front_end/panels/accessibility/SourceOrderView.ts +4 -4
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatInput.ts +66 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +144 -21
- package/front_end/panels/ai_assistance/components/ChatView.ts +43 -8
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +1 -0
- package/front_end/panels/ai_assistance/components/WalkthroughUtils.ts +74 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +34 -5
- package/front_end/panels/ai_assistance/components/chatMessage.css +11 -0
- package/front_end/panels/ai_assistance/components/walkthroughView.css +7 -0
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +8 -9
- package/front_end/panels/application/DOMStorageItemsView.ts +3 -3
- package/front_end/panels/application/DeviceBoundSessionsModel.ts +7 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +21 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +32 -14
- package/front_end/panels/application/ResourcesPanel.ts +5 -5
- package/front_end/panels/application/StorageItemsToolbar.ts +0 -19
- package/front_end/panels/application/WebMCPView.ts +285 -86
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +4 -4
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +4 -4
- package/front_end/panels/application/webMCPView.css +261 -182
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +9 -5
- package/front_end/panels/changes/ChangesSidebar.ts +2 -2
- package/front_end/panels/changes/ChangesView.ts +9 -14
- package/front_end/panels/console/ConsolePanel.ts +10 -3
- package/front_end/panels/console/ConsoleSidebar.ts +5 -5
- package/front_end/panels/console/ConsoleView.ts +11 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -19
- package/front_end/panels/coverage/CoverageView.ts +4 -5
- package/front_end/panels/elements/ElementsPanel.ts +9 -12
- package/front_end/panels/elements/ElementsSidebarPane.ts +4 -5
- package/front_end/panels/elements/ElementsTreeElement.ts +61 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +46 -0
- package/front_end/panels/elements/LayersWidget.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +5 -4
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +11 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +19 -20
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +29 -29
- package/front_end/panels/elements/components/QueryContainer.ts +5 -6
- package/front_end/panels/elements/components/components.ts +0 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +4 -7
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -7
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseStartView.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +47 -66
- package/front_end/panels/network/NetworkConfigView.ts +11 -11
- package/front_end/panels/network/RequestConditionsDrawer.ts +6 -4
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +4 -5
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +6 -9
- package/front_end/panels/profiler/HeapProfileView.ts +29 -4
- package/front_end/panels/profiler/ProfilesPanel.ts +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.css +8 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +7 -2
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +6 -4
- package/front_end/panels/recorder/components/ControlButton.ts +4 -4
- package/front_end/panels/recorder/components/StepView.ts +6 -6
- package/front_end/panels/search/SearchView.ts +4 -7
- package/front_end/panels/sources/DebuggerPausedMessage.ts +18 -22
- package/front_end/panels/sources/SourcesView.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +24 -20
- package/front_end/panels/timeline/StatusDialog.ts +5 -8
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +10 -0
- package/front_end/panels/timeline/TimelineLoader.ts +3 -4
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +2 -0
- package/front_end/panels/timeline/components/TimelineSummary.ts +9 -1
- package/front_end/panels/timeline/components/timelineSummary.css +4 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +2 -2
- package/front_end/panels/timeline/thirdPartyTreeView.css +8 -1
- package/front_end/panels/web_audio/WebAudioView.ts +5 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -9
- package/front_end/panels/whats_new/resources/WNDT.md +9 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +41 -2
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Extension.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 -0
- 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/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.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 +1 -0
- 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/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/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/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/third_party/urlpattern-polyfill/urlpattern-polyfill.js +853 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +1046 -33
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +41 -2
- 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.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.js +21 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Extension.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 +1 -0
- 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/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.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 +1 -0
- 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/Extension.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Extension.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +52 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +25 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/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/esm/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/third_party/urlpattern-polyfill/urlpattern-polyfill.js +805 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +91 -11
- package/front_end/third_party/puppeteer/package/package.json +3 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +53 -11
- package/front_end/third_party/puppeteer/package/src/api/Extension.ts +29 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Extension.ts +9 -2
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +59 -0
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +6 -1
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +26 -0
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/README.md +21 -10
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onCLS.js +2 -4
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onFCP.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +44 -39
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onLCP.js +25 -19
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onTTFB.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/doubleRAF.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getActivationStart.js +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getLoadState.js +16 -18
- package/front_end/third_party/web-vitals/package/dist/modules/lib/getVisibilityWatcher.js +2 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/initMetric.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/observe.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.d.ts +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/polyfills/interactionCountPolyfill.js +1 -3
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenActivated.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/lib/whenIdleOrHidden.js +11 -7
- package/front_end/third_party/web-vitals/package/dist/modules/onCLS.js +1 -1
- package/front_end/third_party/web-vitals/package/dist/modules/types/inp.d.ts +4 -0
- package/front_end/third_party/web-vitals/package/dist/modules/types.d.ts +1 -2
- package/front_end/third_party/web-vitals/package/dist/modules/types.js +0 -1
- package/front_end/third_party/web-vitals/package/package.json +24 -27
- package/front_end/third_party/web-vitals/package/src/attribution/onCLS.ts +2 -7
- package/front_end/third_party/web-vitals/package/src/attribution/onFCP.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +49 -43
- package/front_end/third_party/web-vitals/package/src/attribution/onLCP.ts +27 -24
- package/front_end/third_party/web-vitals/package/src/attribution/onTTFB.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/doubleRAF.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/getActivationStart.ts +1 -2
- package/front_end/third_party/web-vitals/package/src/lib/getLoadState.ts +21 -20
- package/front_end/third_party/web-vitals/package/src/lib/getVisibilityWatcher.ts +2 -3
- package/front_end/third_party/web-vitals/package/src/lib/observe.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/polyfills/interactionCountPolyfill.ts +2 -4
- package/front_end/third_party/web-vitals/package/src/lib/whenActivated.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/lib/whenIdleOrHidden.ts +13 -7
- package/front_end/third_party/web-vitals/package/src/onCLS.ts +1 -1
- package/front_end/third_party/web-vitals/package/src/types/inp.ts +4 -0
- package/front_end/third_party/web-vitals/package/src/types.ts +1 -2
- package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch +13 -74
- package/front_end/third_party/web-vitals/rebuild.sh +3 -3
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -1
- package/front_end/ui/components/icon_button/iconButton.css +1 -0
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +6 -6
- package/front_end/ui/components/lists/list.css +4 -0
- package/front_end/ui/legacy/Dialog.ts +21 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +9 -9
- package/front_end/ui/legacy/TabbedPane.ts +12 -12
- package/front_end/ui/legacy/View.ts +24 -22
- package/front_end/ui/legacy/ViewManager.ts +12 -12
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +165 -119
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +9 -6
- package/front_end/ui/legacy/components/utils/Linkifier.ts +37 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +1 -0
- package/front_end/ui/legacy/inspectorCommon.css +0 -6
- package/front_end/ui/lit/render.ts +11 -9
- package/front_end/ui/visual_logging/KnownContextValues.ts +36 -0
- package/package.json +1 -1
- package/front_end/Images/src/dots-circle.svg +0 -10
- package/front_end/panels/elements/components/Helper.ts +0 -35
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.d.ts +0 -4
- package/front_end/third_party/web-vitals/package/dist/modules/types/polyfills.js +0 -16
- package/front_end/third_party/web-vitals/package/src/types/polyfills.ts +0 -24
package/front_end/third_party/web-vitals/patches/0001-Add-onEachInteraction-to-onINP-options.patch
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
From
|
|
2
|
-
From:
|
|
3
|
-
Date:
|
|
1
|
+
From 0655370c830a309d8808ef365dff611725ea73b1 Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Barry Pollard <barrypollard@google.com>
|
|
3
|
+
Date: Tue, 21 Apr 2026 12:43:38 +0100
|
|
4
4
|
Subject: [PATCH] Add onEachInteraction to onINP options
|
|
5
5
|
|
|
6
6
|
This adds an "onEachInteraction" option to onINP, which exposes to us
|
|
@@ -8,77 +8,15 @@ each interaction. It also calls attributeINP on each value given to the
|
|
|
8
8
|
callback.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
|
-
|
|
12
|
-
src/
|
|
13
|
-
|
|
14
|
-
3 files changed, 56 insertions(+), 5 deletions(-)
|
|
11
|
+
src/attribution/onINP.ts | 35 ++++++++++++++++++++++++++++++++++-
|
|
12
|
+
src/types/inp.ts | 1 +
|
|
13
|
+
2 files changed, 35 insertions(+), 1 deletion(-)
|
|
15
14
|
|
|
16
|
-
diff --git a/dist/modules/attribution/onINP.js b/dist/modules/attribution/onINP.js
|
|
17
|
-
index 479a00f..d295263 100644
|
|
18
|
-
--- a/dist/modules/attribution/onINP.js
|
|
19
|
-
+++ b/dist/modules/attribution/onINP.js
|
|
20
|
-
@@ -121,7 +121,11 @@
|
|
21
|
-
group.startTime = Math.min(entry.startTime, group.startTime);
|
|
22
|
-
group.processingStart = Math.min(entry.processingStart, group.processingStart);
|
|
23
|
-
group.processingEnd = Math.max(entry.processingEnd, group.processingEnd);
|
|
24
|
-
- group.entries.push(entry);
|
|
25
|
-
+ // Entries are not needed in DevTools since we're only displaying the
|
|
26
|
-
+ // summary information, and also emitting events as they come in. Stop
|
|
27
|
-
+ // holding a reference to avoid memory issues.
|
|
28
|
-
+ // See https://crbug.com/484342204
|
|
29
|
-
+ // group.entries.push(entry);
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
@@ -135,7 +139,12 @@
|
|
34
|
-
group = {
|
|
35
|
-
startTime: entry.startTime,
|
|
36
|
-
processingStart: entry.processingStart,
|
|
37
|
-
processingEnd: entry.processingEnd,
|
|
38
|
-
renderTime,
|
|
39
|
-
- entries: [entry],
|
|
40
|
-
+ // Entries are not needed in DevTools since we're only displaying the
|
|
41
|
-
+ // summary information, and also emiting events as they come in. Stop
|
|
42
|
-
+ // holding a reference to avoid memory issues.
|
|
43
|
-
+ // See https://crbug.com/484342204
|
|
44
|
-
+ // entries: [entry],
|
|
45
|
-
+ entries: [],
|
|
46
|
-
};
|
|
47
|
-
pendingEntriesGroups.push(group);
|
|
48
|
-
}
|
|
49
15
|
diff --git a/src/attribution/onINP.ts b/src/attribution/onINP.ts
|
|
50
|
-
index
|
|
16
|
+
index 0d6d098..3fe5050 100644
|
|
51
17
|
--- a/src/attribution/onINP.ts
|
|
52
18
|
+++ b/src/attribution/onINP.ts
|
|
53
|
-
@@ -
|
|
54
|
-
group.processingEnd = Math.max(
|
|
55
|
-
entry.processingEnd,
|
|
56
|
-
group.processingEnd,
|
|
57
|
-
);
|
|
58
|
-
- group.entries.push(entry);
|
|
59
|
-
+ // Entries are not needed in DevTools since we're only displaying the
|
|
60
|
-
+ // summary information, and also emitting events as they come in. Stop
|
|
61
|
-
+ // holding a reference to avoid memory issues.
|
|
62
|
-
+ // See https://crbug.com/484342204
|
|
63
|
-
+ // group.entries.push(entry);
|
|
64
|
-
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
@@ -186,7 +190,12 @@
|
|
68
|
-
processingStart: entry.processingStart,
|
|
69
|
-
processingEnd: entry.processingEnd,
|
|
70
|
-
renderTime,
|
|
71
|
-
- entries: [entry],
|
|
72
|
-
+ // Entries are not needed in DevTools since we're only displaying the
|
|
73
|
-
+ // summary information, and also emiting events as they come in. Stop
|
|
74
|
-
+ // holding a reference to avoid memory issues.
|
|
75
|
-
+ // See https://crbug.com/484342204
|
|
76
|
-
+ // entries: [entry],
|
|
77
|
-
+ entries: [],
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
pendingEntriesGroups.push(group);
|
|
81
|
-
@@ -240,7 +240,40 @@ export const onINP = (
|
|
19
|
+
@@ -260,7 +260,40 @@ export const onINP = (
|
|
82
20
|
cleanupPending = false;
|
|
83
21
|
};
|
|
84
22
|
|
|
@@ -121,16 +59,17 @@ index 479a00f..d295263 100644
|
|
|
121
59
|
|
|
122
60
|
const getIntersectingLoAFs = (
|
|
123
61
|
diff --git a/src/types/inp.ts b/src/types/inp.ts
|
|
124
|
-
index
|
|
62
|
+
index 6041b2d..9b6bd2e 100644
|
|
125
63
|
--- a/src/types/inp.ts
|
|
126
64
|
+++ b/src/types/inp.ts
|
|
127
|
-
@@ -
|
|
128
|
-
|
|
65
|
+
@@ -28,6 +28,7 @@ export interface INPReportOpts extends ReportOpts {
|
|
129
66
|
export interface INPAttributionReportOpts extends AttributionReportOpts {
|
|
130
67
|
durationThreshold?: number;
|
|
68
|
+
includeProcessedEventEntries?: boolean;
|
|
131
69
|
+ onEachInteraction?: (interaction: INPMetricWithAttribution) => void;
|
|
132
70
|
}
|
|
133
71
|
|
|
134
72
|
/**
|
|
135
73
|
--
|
|
136
|
-
2.
|
|
74
|
+
2.50.1 (Apple Git-155)
|
|
75
|
+
|
|
@@ -4,8 +4,8 @@ set -euo pipefail
|
|
|
4
4
|
|
|
5
5
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
6
6
|
|
|
7
|
-
VERSION=5.
|
|
8
|
-
GIT_SHA=
|
|
7
|
+
VERSION=5.2.0
|
|
8
|
+
GIT_SHA=331486c02721e1d37835177ffc89589a580ba57e # web-vitals does not tag releases.
|
|
9
9
|
|
|
10
10
|
# Note: this is just to handle updating README.chromium.
|
|
11
11
|
# For the actual sources, below we checkout the repo, apply local patches, then build with tsc.
|
|
@@ -33,6 +33,6 @@ cd -
|
|
|
33
33
|
|
|
34
34
|
# Copy the source files to our repo, and build it.
|
|
35
35
|
cp -r tmp-repo/src package/src
|
|
36
|
-
../../../node_modules/.bin/tsc -d -t esnext -m esnext --moduleResolution
|
|
36
|
+
../../../node_modules/.bin/tsc --ignoreConfig -d -t esnext -m esnext --moduleResolution bundler --strict --outDir package/dist/modules/ package/src/**/*.ts package/src/index.ts
|
|
37
37
|
|
|
38
38
|
echo "Rebuild complete."
|
|
@@ -21,16 +21,16 @@ export type LegacyWrapper<T extends UI.Widget.Widget, Component extends Wrappabl
|
|
|
21
21
|
getComponent(): Component,
|
|
22
22
|
}&T;
|
|
23
23
|
|
|
24
|
-
export function legacyWrapper<T extends
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return new class extends
|
|
24
|
+
export function legacyWrapper<T extends UI.Widget.Widget, Component extends WrappableComponent<T>>(
|
|
25
|
+
base: Platform.Constructor.Constructor<T>, component: Component,
|
|
26
|
+
jsLogContext?: string): LegacyWrapper<T, Component> {
|
|
27
|
+
return new class extends(base as Platform.Constructor.Constructor<UI.Widget.Widget>) {
|
|
28
28
|
#component: Component;
|
|
29
29
|
|
|
30
30
|
constructor(..._args: any[]) {
|
|
31
31
|
super(/* useShadowDom=*/ true);
|
|
32
32
|
this.#component = component;
|
|
33
|
-
this.#component.wrapper = this as
|
|
33
|
+
this.#component.wrapper = this as unknown as T;
|
|
34
34
|
void this.#component.render();
|
|
35
35
|
this.contentElement.appendChild(this.#component);
|
|
36
36
|
if (jsLogContext) {
|
|
@@ -57,6 +57,6 @@ export function legacyWrapper<T extends Platform.Constructor.Constructor<UI.Widg
|
|
|
57
57
|
return this.#component;
|
|
58
58
|
}
|
|
59
59
|
// clang-format off
|
|
60
|
-
}() as unknown as LegacyWrapper<
|
|
60
|
+
}() as unknown as LegacyWrapper<T, Component>;
|
|
61
61
|
// clang-format on
|
|
62
62
|
}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
6
6
|
|
|
7
7
|
import * as Common from '../../core/common/common.js';
|
|
8
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
|
+
import * as Buttons from '../components/buttons/buttons.js';
|
|
8
10
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
9
11
|
|
|
10
12
|
import * as ARIAUtils from './ARIAUtils.js';
|
|
@@ -15,6 +17,15 @@ import {KeyboardShortcut, Keys} from './KeyboardShortcut.js';
|
|
|
15
17
|
import type {SplitWidget} from './SplitWidget.js';
|
|
16
18
|
import {WidgetFocusRestorer} from './Widget.js';
|
|
17
19
|
|
|
20
|
+
const UIStrings = {
|
|
21
|
+
/**
|
|
22
|
+
* @description Text to close the dialog
|
|
23
|
+
*/
|
|
24
|
+
close: 'Close',
|
|
25
|
+
} as const;
|
|
26
|
+
const str_ = i18n.i18n.registerUIStrings('ui/legacy/Dialog.ts', UIStrings);
|
|
27
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
28
|
+
|
|
18
29
|
export class Dialog extends Common.ObjectWrapper.eventMixin<EventTypes, typeof GlassPane>(GlassPane) {
|
|
19
30
|
private tabIndexBehavior = OutsideTabIndexBehavior.DISABLE_ALL_OUTSIDE_TAB_INDEX;
|
|
20
31
|
private tabIndexMap = new Map<HTMLElement, number>();
|
|
@@ -113,8 +124,16 @@ export class Dialog extends Common.ObjectWrapper.eventMixin<EventTypes, typeof G
|
|
|
113
124
|
}
|
|
114
125
|
|
|
115
126
|
addCloseButton(): void {
|
|
116
|
-
const
|
|
117
|
-
|
|
127
|
+
const button = new Buttons.Button.Button();
|
|
128
|
+
button.data = {
|
|
129
|
+
variant: Buttons.Button.Variant.ICON,
|
|
130
|
+
iconName: 'cross',
|
|
131
|
+
accessibleLabel: i18nString(UIStrings.close),
|
|
132
|
+
jslogContext: 'dialog-close',
|
|
133
|
+
};
|
|
134
|
+
button.classList.add('dialog-close-button');
|
|
135
|
+
button.addEventListener('click', this.hide.bind(this));
|
|
136
|
+
this.contentElement.appendChild(button);
|
|
118
137
|
}
|
|
119
138
|
|
|
120
139
|
setOutsideTabIndexBehavior(tabIndexBehavior: OutsideTabIndexBehavior): void {
|
|
@@ -52,11 +52,11 @@ export class SoftContextMenu {
|
|
|
52
52
|
private parentMenu: SoftContextMenu|undefined;
|
|
53
53
|
private highlightedMenuItemElement: HTMLElement|null;
|
|
54
54
|
detailsForElementMap: WeakMap<HTMLElement, ElementMenuDetails>;
|
|
55
|
-
private document
|
|
55
|
+
private document!: Document;
|
|
56
56
|
private glassPane?: GlassPane;
|
|
57
|
-
private contextMenuElement
|
|
57
|
+
private contextMenuElement!: HTMLElement;
|
|
58
58
|
private focusRestorer?: ElementFocusRestorer;
|
|
59
|
-
private hideOnUserMouseDownUnlessInMenu?: (
|
|
59
|
+
private hideOnUserMouseDownUnlessInMenu?: (event: Event) => void;
|
|
60
60
|
private activeSubMenuElement?: HTMLElement;
|
|
61
61
|
private subMenu?: SoftContextMenu;
|
|
62
62
|
private onMenuClosed?: () => void;
|
|
@@ -13,7 +13,7 @@ import * as ARIAUtils from './ARIAUtils.js';
|
|
|
13
13
|
import {Events as ResizerWidgetEvents, type ResizeUpdatePositionEvent, SimpleResizerWidget} from './ResizerWidget.js';
|
|
14
14
|
import splitWidgetStyles from './splitWidget.css.js';
|
|
15
15
|
import {ToolbarButton} from './Toolbar.js';
|
|
16
|
-
import {registerWidgetConfig, Widget, widgetConfig, WidgetElement} from './Widget.js';
|
|
16
|
+
import {type AnyWidget, registerWidgetConfig, Widget, widgetConfig, WidgetElement} from './Widget.js';
|
|
17
17
|
import {Events as ZoomManagerEvents, ZoomManager} from './ZoomManager.js';
|
|
18
18
|
|
|
19
19
|
export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typeof Widget>(Widget) {
|
|
@@ -33,8 +33,8 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
33
33
|
}>|null;
|
|
34
34
|
#totalSizeCSS = 0;
|
|
35
35
|
#totalSizeOtherDimensionCSS = 0;
|
|
36
|
-
#mainWidget:
|
|
37
|
-
#sidebarWidget:
|
|
36
|
+
#mainWidget: AnyWidget|null = null;
|
|
37
|
+
#sidebarWidget: AnyWidget|null = null;
|
|
38
38
|
#animationFrameHandle = 0;
|
|
39
39
|
#animationCallback: (() => void)|null = null;
|
|
40
40
|
#showSidebarButtonTitle: Common.UIString.LocalizedString = Common.UIString.LocalizedEmptyString;
|
|
@@ -166,7 +166,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
166
166
|
this.#setSidebarSizeDIP(this.#preferredSidebarSizeDIP(), Boolean(animate));
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
setMainWidget(widget:
|
|
169
|
+
setMainWidget(widget: AnyWidget): void {
|
|
170
170
|
if (this.#mainWidget === widget) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
@@ -184,7 +184,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
184
184
|
this.resumeInvalidations();
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
setSidebarWidget(widget:
|
|
187
|
+
setSidebarWidget(widget: AnyWidget): void {
|
|
188
188
|
if (this.#sidebarWidget === widget) {
|
|
189
189
|
return;
|
|
190
190
|
}
|
|
@@ -202,11 +202,11 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
202
202
|
this.resumeInvalidations();
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
mainWidget():
|
|
205
|
+
mainWidget(): AnyWidget|null {
|
|
206
206
|
return this.#mainWidget;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
sidebarWidget():
|
|
209
|
+
sidebarWidget(): AnyWidget|null {
|
|
210
210
|
return this.#sidebarWidget;
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -291,8 +291,8 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
#showOnly(
|
|
294
|
-
sideToShow:
|
|
295
|
-
sideToHide:
|
|
294
|
+
sideToShow: AnyWidget|null,
|
|
295
|
+
sideToHide: AnyWidget|null,
|
|
296
296
|
shadowToShow: Element,
|
|
297
297
|
shadowToHide: Element,
|
|
298
298
|
animate?: boolean,
|
|
@@ -20,7 +20,7 @@ import tabbedPaneStyles from './tabbedPane.css.js';
|
|
|
20
20
|
import type {Toolbar} from './Toolbar.js';
|
|
21
21
|
import {Tooltip} from './Tooltip.js';
|
|
22
22
|
import {installDragHandle} from './UIUtils.js';
|
|
23
|
-
import {registerWidgetConfig, VBox, Widget, widgetConfig, WidgetElement} from './Widget.js';
|
|
23
|
+
import {type AnyWidget, registerWidgetConfig, VBox, Widget, widgetConfig, WidgetElement} from './Widget.js';
|
|
24
24
|
import {Events as ZoomManagerEvents, ZoomManager} from './ZoomManager.js';
|
|
25
25
|
|
|
26
26
|
const UIStrings = {
|
|
@@ -73,7 +73,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
73
73
|
export interface TabInfo {
|
|
74
74
|
id: string;
|
|
75
75
|
title: string;
|
|
76
|
-
view:
|
|
76
|
+
view: AnyWidget;
|
|
77
77
|
tabTooltip?: string;
|
|
78
78
|
isCloseable?: boolean;
|
|
79
79
|
previewFeature?: boolean;
|
|
@@ -183,7 +183,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
183
183
|
this.autoSelectFirstItemOnShow = autoSelect;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
get visibleView():
|
|
186
|
+
get visibleView(): AnyWidget|null {
|
|
187
187
|
return this.currentTab ? this.currentTab.view : null;
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -195,11 +195,11 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
195
195
|
return this.#tabs.findIndex(tab => tab.id === tabId);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
tabViews():
|
|
198
|
+
tabViews(): AnyWidget[] {
|
|
199
199
|
return this.#tabs.map(tab => tab.view);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
tabView(tabId: string):
|
|
202
|
+
tabView(tabId: string): AnyWidget|null {
|
|
203
203
|
const tab = this.tabsById.get(tabId);
|
|
204
204
|
return tab ? tab.view : null;
|
|
205
205
|
}
|
|
@@ -255,7 +255,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
appendTab(
|
|
258
|
-
id: string, tabTitle: string, view:
|
|
258
|
+
id: string, tabTitle: string, view: AnyWidget, tabTooltip?: string, userGesture?: boolean, isCloseable?: boolean,
|
|
259
259
|
isPreviewFeature?: boolean, index?: number, jslogContext?: string): void {
|
|
260
260
|
const closeable = typeof isCloseable === 'boolean' ? isCloseable : Boolean(this.closeableTabs);
|
|
261
261
|
const tab =
|
|
@@ -514,7 +514,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
changeTabView(id: string, view:
|
|
517
|
+
changeTabView(id: string, view: AnyWidget): void {
|
|
518
518
|
const tab = this.tabsById.get(id);
|
|
519
519
|
if (!tab || tab.view === view) {
|
|
520
520
|
return;
|
|
@@ -1137,7 +1137,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
|
|
|
1137
1137
|
export interface EventData {
|
|
1138
1138
|
prevTabId?: string;
|
|
1139
1139
|
tabId: string;
|
|
1140
|
-
view?:
|
|
1140
|
+
view?: AnyWidget;
|
|
1141
1141
|
isUserGesture?: boolean;
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
@@ -1167,7 +1167,7 @@ export class TabbedPaneTab {
|
|
|
1167
1167
|
#id: string;
|
|
1168
1168
|
#title: string;
|
|
1169
1169
|
#tooltip: string|undefined;
|
|
1170
|
-
#view:
|
|
1170
|
+
#view: AnyWidget;
|
|
1171
1171
|
shown: boolean;
|
|
1172
1172
|
measuredWidth!: number|undefined;
|
|
1173
1173
|
#tabElement!: HTMLElement|undefined;
|
|
@@ -1180,7 +1180,7 @@ export class TabbedPaneTab {
|
|
|
1180
1180
|
private dragStartX?: number;
|
|
1181
1181
|
#jslogContext?: string;
|
|
1182
1182
|
constructor(
|
|
1183
|
-
tabbedPane: TabbedPane, id: string, title: string, closeable: boolean, previewFeature: boolean, view:
|
|
1183
|
+
tabbedPane: TabbedPane, id: string, title: string, closeable: boolean, previewFeature: boolean, view: AnyWidget,
|
|
1184
1184
|
tooltip?: string, jslogContext?: string) {
|
|
1185
1185
|
this.closeable = closeable;
|
|
1186
1186
|
this.previewFeature = previewFeature;
|
|
@@ -1290,11 +1290,11 @@ export class TabbedPaneTab {
|
|
|
1290
1290
|
return true;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
-
get view():
|
|
1293
|
+
get view(): AnyWidget {
|
|
1294
1294
|
return this.#view;
|
|
1295
1295
|
}
|
|
1296
1296
|
|
|
1297
|
-
set view(view:
|
|
1297
|
+
set view(view: AnyWidget) {
|
|
1298
1298
|
this.#view = view;
|
|
1299
1299
|
}
|
|
1300
1300
|
|
|
@@ -7,7 +7,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
7
7
|
import type {TabbedPane} from './TabbedPane.js';
|
|
8
8
|
import type {ToolbarItem, ToolbarMenuButton} from './Toolbar.js';
|
|
9
9
|
import {ViewManager} from './ViewManager.js';
|
|
10
|
-
import {
|
|
10
|
+
import {type AnyWidget, VBox, type WidgetOptions} from './Widget.js';
|
|
11
11
|
|
|
12
12
|
export interface View {
|
|
13
13
|
viewId(): string;
|
|
@@ -24,7 +24,7 @@ export interface View {
|
|
|
24
24
|
|
|
25
25
|
toolbarItems(): Promise<ToolbarItem[]>;
|
|
26
26
|
|
|
27
|
-
widget(): Promise<
|
|
27
|
+
widget(): Promise<AnyWidget>;
|
|
28
28
|
|
|
29
29
|
disposeView(): void|Promise<void>;
|
|
30
30
|
}
|
|
@@ -32,23 +32,25 @@ export interface View {
|
|
|
32
32
|
/**
|
|
33
33
|
* Settings to control the behavior of `SimpleView` subclasses.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
35
|
+
export type SimpleViewOptions<ContentTypeT extends HTMLElement|DocumentFragment = HTMLElement> =
|
|
36
|
+
WidgetOptions<ContentTypeT>&{
|
|
37
|
+
/**
|
|
38
|
+
* User visible title for the view.
|
|
39
|
+
*/
|
|
40
|
+
title: Platform.UIString.LocalizedString,
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Internal ID used to refer to the view.
|
|
44
|
+
*
|
|
45
|
+
* Note that this is also used to construct VE contexts in some places.
|
|
46
|
+
*
|
|
47
|
+
* Must be in extended kebab case.
|
|
48
|
+
*/
|
|
49
|
+
viewId: Lowercase<string>,
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export class SimpleView<ContentTypeT extends HTMLElement|DocumentFragment = HTMLElement> extends VBox<ContentTypeT>
|
|
53
|
+
implements View {
|
|
52
54
|
readonly #title: Platform.UIString.LocalizedString;
|
|
53
55
|
readonly #viewId: Lowercase<string>;
|
|
54
56
|
|
|
@@ -58,7 +60,7 @@ export class SimpleView extends VBox implements View {
|
|
|
58
60
|
* @param options the settings for the resulting view.
|
|
59
61
|
* @throws TypeError - if `options.viewId` is not in extended kebab case.
|
|
60
62
|
*/
|
|
61
|
-
constructor(options: SimpleViewOptions) {
|
|
63
|
+
constructor(options: SimpleViewOptions<ContentTypeT>) {
|
|
62
64
|
super(options);
|
|
63
65
|
this.#title = options.title;
|
|
64
66
|
this.#viewId = options.viewId;
|
|
@@ -87,7 +89,7 @@ export class SimpleView extends VBox implements View {
|
|
|
87
89
|
return Promise.resolve([]);
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
widget(): Promise<
|
|
92
|
+
widget(): Promise<AnyWidget> {
|
|
91
93
|
return Promise.resolve(this);
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -113,7 +115,7 @@ export interface ViewLocation {
|
|
|
113
115
|
showView(view: View, insertBefore?: View|null, userGesture?: boolean): Promise<void>;
|
|
114
116
|
removeView(view: View): void;
|
|
115
117
|
isViewVisible(view: View): boolean;
|
|
116
|
-
widget():
|
|
118
|
+
widget(): AnyWidget;
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
export interface TabbedViewLocation extends ViewLocation {
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
ViewPersistence,
|
|
35
35
|
type ViewRegistration,
|
|
36
36
|
} from './ViewRegistration.js';
|
|
37
|
-
import {VBox, type Widget} from './Widget.js';
|
|
37
|
+
import {type AnyWidget, VBox, type Widget} from './Widget.js';
|
|
38
38
|
|
|
39
39
|
const UIStrings = {
|
|
40
40
|
/**
|
|
@@ -56,7 +56,7 @@ type TabbedPaneFactory = () => TabbedPane;
|
|
|
56
56
|
export class PreRegisteredView implements View {
|
|
57
57
|
private readonly viewRegistration: ViewRegistration;
|
|
58
58
|
private readonly universe?: Foundation.Universe.Universe;
|
|
59
|
-
private widgetPromise: Promise<
|
|
59
|
+
private widgetPromise: Promise<AnyWidget>|null;
|
|
60
60
|
|
|
61
61
|
constructor(viewRegistration: ViewRegistration, universe?: Foundation.Universe.Universe) {
|
|
62
62
|
this.viewRegistration = viewRegistration;
|
|
@@ -127,7 +127,7 @@ export class PreRegisteredView implements View {
|
|
|
127
127
|
return provider.toolbarItems();
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
widget(): Promise<
|
|
130
|
+
widget(): Promise<AnyWidget> {
|
|
131
131
|
if (this.widgetPromise === null) {
|
|
132
132
|
if (!this.universe) {
|
|
133
133
|
throw new Error('Creating views via ViewManager requires a Foundation.Universe');
|
|
@@ -332,12 +332,12 @@ export class ViewManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
332
332
|
return view;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
materializedWidget(viewId: string): Widget
|
|
336
|
-
const view = this.
|
|
335
|
+
materializedWidget<T extends HTMLElement|DocumentFragment = HTMLElement>(viewId: string): Widget<T>|null {
|
|
336
|
+
const view = this.views.get(viewId);
|
|
337
337
|
if (!view) {
|
|
338
338
|
return null;
|
|
339
339
|
}
|
|
340
|
-
return widgetForView.get(view) || null;
|
|
340
|
+
return (widgetForView.get(view) as Widget<T>| undefined) || null;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
hasView(viewId: string): boolean {
|
|
@@ -417,7 +417,7 @@ export class ViewManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
const widgetForView = new WeakMap<View,
|
|
420
|
+
const widgetForView = new WeakMap<View, AnyWidget>();
|
|
421
421
|
|
|
422
422
|
export class ContainerWidget extends VBox {
|
|
423
423
|
private readonly view: View;
|
|
@@ -479,7 +479,7 @@ class ExpandableContainerWidget extends VBox {
|
|
|
479
479
|
private titleElement: HTMLDivElement;
|
|
480
480
|
private readonly titleExpandIcon: Icon;
|
|
481
481
|
private readonly view: View;
|
|
482
|
-
private widget?:
|
|
482
|
+
private widget?: AnyWidget;
|
|
483
483
|
private materializePromise?: Promise<void>;
|
|
484
484
|
|
|
485
485
|
constructor(view: View) {
|
|
@@ -603,15 +603,15 @@ const expandableContainerForView = new WeakMap<View, ExpandableContainerWidget>(
|
|
|
603
603
|
class Location {
|
|
604
604
|
protected readonly manager: ViewManager;
|
|
605
605
|
private readonly revealCallback: (() => void)|undefined;
|
|
606
|
-
readonly #widget:
|
|
606
|
+
readonly #widget: AnyWidget;
|
|
607
607
|
|
|
608
|
-
constructor(manager: ViewManager, widget:
|
|
608
|
+
constructor(manager: ViewManager, widget: AnyWidget, revealCallback?: (() => void)) {
|
|
609
609
|
this.manager = manager;
|
|
610
610
|
this.revealCallback = revealCallback;
|
|
611
611
|
this.#widget = widget;
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
-
widget():
|
|
614
|
+
widget(): AnyWidget {
|
|
615
615
|
return this.#widget;
|
|
616
616
|
}
|
|
617
617
|
|
|
@@ -699,7 +699,7 @@ class TabbedLocation extends Location implements TabbedViewLocation {
|
|
|
699
699
|
this.closeableTabSetting.set(newClosable);
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
-
override widget():
|
|
702
|
+
override widget(): AnyWidget {
|
|
703
703
|
return this.#tabbedPane;
|
|
704
704
|
}
|
|
705
705
|
|
|
@@ -8,7 +8,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
8
8
|
import type * as Foundation from '../../foundation/foundation.js';
|
|
9
9
|
|
|
10
10
|
import type {ViewLocationResolver} from './View.js';
|
|
11
|
-
import type {
|
|
11
|
+
import type {AnyWidget} from './Widget.js';
|
|
12
12
|
|
|
13
13
|
const UIStrings = {
|
|
14
14
|
/**
|
|
@@ -140,7 +140,7 @@ export interface ViewRegistration {
|
|
|
140
140
|
* });
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
|
-
loadView: (universe: Foundation.Universe.Universe) => Promise<
|
|
143
|
+
loadView: (universe: Foundation.Universe.Universe) => Promise<AnyWidget>;
|
|
144
144
|
/**
|
|
145
145
|
* Used to sort the views that appear in a shared location.
|
|
146
146
|
*/
|