chrome-devtools-frontend 1.0.1662289 → 1.0.1664496
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/.agents/skills/{creating-a-model → devtools-model-management}/SKILL.md +0 -1
- package/.agents/skills/devtools-unicode-escaping/SKILL.md +64 -0
- package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +2 -1
- package/.agents/skills/fixing-skipped-tests/SKILL.md +3 -3
- package/.agents/skills/merging-devtools-module/SKILL.md +1 -1
- package/.agents/skills/migrate-chromium-test/SKILL.md +32 -6
- package/.agents/skills/repro-flaky-tests/SKILL.md +71 -31
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +1 -0
- package/docs/ui_engineering.md +2 -0
- package/eslint.config.mjs +1 -0
- package/front_end/core/common/SettingRegistration.ts +0 -5
- package/front_end/core/common/Settings.ts +144 -3
- package/front_end/core/platform/StringUtilities.ts +38 -6
- package/front_end/core/protocol_client/PuppeteerDevToolsConnection.ts +112 -0
- package/front_end/core/sdk/CPUProfilerModel.ts +21 -13
- package/front_end/core/sdk/CSSContainerQuery.ts +1 -1
- package/front_end/core/sdk/CSSLayer.ts +1 -1
- package/front_end/core/sdk/CSSMedia.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSNavigation.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +1 -1
- package/front_end/core/sdk/CSSScope.ts +1 -1
- package/front_end/core/sdk/CSSStartingStyle.ts +1 -1
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
- package/front_end/core/sdk/CSSSupports.ts +1 -1
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/NetworkRequest.ts +7 -7
- package/front_end/core/sdk/Resource.ts +1 -1
- package/front_end/core/sdk/ScopeTreeCache.ts +1 -1
- package/front_end/core/sdk/Script.ts +1 -1
- package/front_end/core/sdk/ServerSentEvents.ts +1 -1
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +1 -1
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
- package/front_end/core/sdk/sdk-meta.ts +3 -4
- package/front_end/{models → core}/text_utils/ContentProvider.ts +4 -6
- package/front_end/{models → core}/text_utils/StaticContentProvider.ts +4 -6
- package/front_end/{models → core}/text_utils/StreamingContentData.ts +1 -2
- package/front_end/{models → core}/text_utils/TextRange.ts +6 -3
- package/front_end/{models → core}/text_utils/TextUtils.ts +7 -7
- package/front_end/{models → core}/text_utils/WasmDisassembly.ts +2 -2
- package/front_end/core/text_utils/text_utils.ts +27 -0
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +1 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +21 -3
- package/front_end/foundation/Universe.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -14
- package/front_end/generated/protocol-mapping.d.ts +0 -53
- package/front_end/generated/protocol-proxy-api.d.ts +0 -46
- package/front_end/generated/protocol.ts +0 -148
- package/front_end/models/ai_assistance/AgentProject.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
- package/front_end/models/ai_assistance/AiConversation.ts +21 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +4 -7
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +19 -11
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +23 -10
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +19 -18
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +3 -4
- package/front_end/models/ai_assistance/contexts/FileContext.ts +7 -3
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +39 -11
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +6 -3
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +4 -4
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +76 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +11 -1
- package/front_end/models/badges/AiExplorerBadge.ts +8 -3
- package/front_end/models/badges/Badge.ts +1 -0
- package/front_end/models/badges/UserBadges.ts +43 -23
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
- package/front_end/models/bindings/ContentProviderBasedProject.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
- package/front_end/models/bindings/FileUtils.ts +1 -1
- package/front_end/models/bindings/NetworkProject.ts +16 -4
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +7 -10
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/ResourceScriptMapping.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +1 -1
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
- package/front_end/models/breakpoints/BreakpointManager.ts +1 -1
- package/front_end/models/crux-manager/CrUXManager.ts +1 -1
- package/front_end/models/emulation/DeviceModeModel.ts +67 -5
- package/front_end/models/emulation/EmulatedDevices.ts +3 -2
- package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/har/Log.snapshot.txt +193 -0
- package/front_end/models/har/Log.ts +3 -2
- package/front_end/models/har/Writer.ts +1 -1
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/LazyLoadImageIssue.ts +76 -0
- package/front_end/models/issues_manager/descriptions/lazyLoadImageZeroSize.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -10
- package/front_end/models/live-metrics/LiveMetrics.ts +2 -3
- package/front_end/models/logs/NetworkLog.ts +4 -3
- package/front_end/models/logs/logs-meta.ts +3 -3
- package/front_end/models/network_time_calculator/NetworkTimeCalculator.ts +4 -4
- package/front_end/models/persistence/Automapping.ts +1 -1
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +2 -2
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +1 -1
- package/front_end/models/persistence/PersistenceImpl.ts +1 -1
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +8 -6
- package/front_end/models/source_map_scopes/NamesResolver.ts +37 -31
- package/front_end/models/stack_trace/StackTrace.ts +17 -0
- package/front_end/models/text_utils/text_utils.ts +2 -24
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/ThirdParties.ts +1 -1
- package/front_end/models/workspace/FileManager.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +1 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityStrings.ts +2 -2
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -1
- package/front_end/panels/ai_assistance/ExportConversation.ts +1 -1
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +1 -2
- package/front_end/panels/application/CrashReportContextView.ts +1 -1
- package/front_end/panels/application/DOMStorageItemsView.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +4 -4
- package/front_end/panels/application/ExtensionStorageItemsView.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBModel.ts +0 -10
- package/front_end/panels/application/IndexedDBViews.ts +240 -164
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +12 -2
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/SharedStorageModel.ts +0 -10
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/AdsView.ts +23 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +21 -5
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +2 -2
- package/front_end/panels/application/components/adsView.css +21 -1
- package/front_end/panels/application/indexedDBViews.css +1 -1
- package/front_end/panels/application/preloading/PreloadingView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -4
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +1 -1
- package/front_end/panels/console/ConsoleFilter.ts +1 -1
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageDecorationManager.ts +9 -1
- package/front_end/panels/coverage/CoverageModel.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +1 -1
- package/front_end/panels/elements/AccessibilityTreeView.ts +38 -3
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +1 -1
- package/front_end/panels/elements/ElementIssueUtils.ts +2 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +10 -3
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesContainer.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +1 -1
- package/front_end/panels/explain/components/ConsoleInsight.ts +2 -2
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +76 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +1 -1
- package/front_end/panels/issues/IssueView.ts +2 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +5 -0
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/network/BinaryResourceView.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +72 -8
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +6 -6
- package/front_end/panels/network/NetworkPanel.ts +4 -4
- package/front_end/panels/network/NetworkSearchScope.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestHTMLView.ts +1 -1
- package/front_end/panels/network/RequestInitiatorView.ts +24 -2
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestPreviewView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +1 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -1
- package/front_end/panels/network/network-meta.ts +3 -3
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +200 -81
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +12 -8
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -1
- package/front_end/panels/recorder/README.md +1 -2
- package/front_end/panels/recorder/RecorderPanel.ts +1861 -17
- package/front_end/panels/recorder/RecordingListView.ts +8 -37
- package/front_end/panels/recorder/RecordingView.ts +54 -27
- package/front_end/panels/recorder/SelectorPicker.ts +0 -13
- package/front_end/panels/recorder/StepEditor.ts +6 -14
- package/front_end/panels/recorder/StepView.ts +36 -105
- package/front_end/panels/recorder/recorder.ts +0 -2
- package/front_end/panels/search/SearchResultsPane.ts +1 -1
- package/front_end/panels/security/SecurityPanel.ts +3 -3
- package/front_end/panels/settings/AISettingsTab.ts +17 -4
- package/front_end/panels/settings/components/SyncSection.ts +4 -4
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +3 -3
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CoveragePlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +27 -3
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/PersistenceActions.ts +1 -1
- package/front_end/panels/sources/SourcesNavigator.ts +1 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/components/HeadersView.ts +1 -1
- package/front_end/panels/sources/filteredUISourceCodeListProvider.css +12 -1
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/StatusDialog.ts +1 -1
- package/front_end/panels/timeline/TimelineController.ts +24 -3
- package/front_end/panels/timeline/TimelinePanel.ts +116 -25
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +2 -2
- package/front_end/panels/timeline/TimelineUIUtils.ts +1 -1
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -1
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timeline-meta.ts +13 -0
- package/front_end/services/tracing/TracingManager.ts +27 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1418 -1413
- package/front_end/third_party/lighthouse/locales/en-US.json +12 -6
- package/front_end/third_party/lighthouse/locales/en-XL.json +12 -6
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/puppeteer/puppeteer.ts +20 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +4 -1
- package/front_end/ui/components/highlighting/HighlightManager.ts +1 -1
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +46 -2
- package/front_end/ui/components/markdown_view/markdownView.css +23 -0
- package/front_end/ui/components/spinners/Spinner.ts +29 -32
- package/front_end/ui/components/spinners/spinner.css +32 -84
- package/front_end/ui/components/text_editor/config.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +7 -1
- package/front_end/ui/legacy/Infobar.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +12 -7
- package/front_end/ui/legacy/SuggestBox.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/Toolbar.ts +5 -2
- package/front_end/ui/legacy/Treeoutline.ts +40 -13
- package/front_end/ui/legacy/UIUtils.ts +25 -10
- package/front_end/ui/legacy/Widget.ts +17 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +37 -8
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +27 -13
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +5 -2
- package/front_end/ui/legacy/components/inline_editor/CSSLinearEasingModel.ts +23 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +223 -121
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +105 -115
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +5 -1
- package/front_end/ui/legacy/components/source_frame/jsonView.css +4 -0
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +10 -6
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/lit/render.ts +44 -10
- package/front_end/ui/lit/strip-whitespace.ts +23 -2
- package/front_end/ui/settings/SettingUIRegistration.ts +105 -0
- package/front_end/ui/settings/settings.ts +9 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +13 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/recorder/RecorderController.ts +0 -1759
- /package/.agents/skills/{verification → devtools-verification}/SKILL.md +0 -0
- /package/front_end/{models → core}/text_utils/CodeMirrorUtils.ts +0 -0
- /package/front_end/{models → core}/text_utils/ContentData.ts +0 -0
- /package/front_end/{models → core}/text_utils/Text.ts +0 -0
- /package/front_end/{models → core}/text_utils/TextCursor.ts +0 -0
- /package/front_end/{models → core}/text_utils/TextUtils.snapshot.txt +0 -0
- /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
|
@@ -48,39 +48,6 @@ declare global {
|
|
|
48
48
|
interface HTMLElementTagNameMap {
|
|
49
49
|
'devtools-recording-list-view': RecordingListView;
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
interface HTMLElementEventMap {
|
|
53
|
-
openrecording: OpenRecordingEvent;
|
|
54
|
-
deleterecording: DeleteRecordingEvent;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export class CreateRecordingEvent extends Event {
|
|
59
|
-
static readonly eventName = 'createrecording';
|
|
60
|
-
constructor() {
|
|
61
|
-
super(CreateRecordingEvent.eventName, {composed: true, bubbles: true});
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class DeleteRecordingEvent extends Event {
|
|
66
|
-
static readonly eventName = 'deleterecording';
|
|
67
|
-
constructor(public storageName: string) {
|
|
68
|
-
super(DeleteRecordingEvent.eventName, {composed: true, bubbles: true});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export class OpenRecordingEvent extends Event {
|
|
73
|
-
static readonly eventName = 'openrecording';
|
|
74
|
-
constructor(public storageName: string) {
|
|
75
|
-
super(OpenRecordingEvent.eventName, {composed: true, bubbles: true});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export class PlayRecordingEvent extends Event {
|
|
80
|
-
static readonly eventName = 'playrecording';
|
|
81
|
-
constructor(public storageName: string) {
|
|
82
|
-
super(PlayRecordingEvent.eventName, {composed: true, bubbles: true});
|
|
83
|
-
}
|
|
84
51
|
}
|
|
85
52
|
|
|
86
53
|
interface Recording {
|
|
@@ -195,6 +162,10 @@ export class RecordingListView extends UI.Widget.Widget {
|
|
|
195
162
|
#recordings: readonly Recording[] = [];
|
|
196
163
|
#replayAllowed = true;
|
|
197
164
|
#view: typeof DEFAULT_VIEW;
|
|
165
|
+
onCreateRecording?: () => void;
|
|
166
|
+
onDeleteRecording?: (storageName: string) => void;
|
|
167
|
+
onOpenRecording?: (storageName: string) => void;
|
|
168
|
+
onPlayRecording?: (storageName: string) => void;
|
|
198
169
|
|
|
199
170
|
constructor(element?: HTMLElement, view?: typeof DEFAULT_VIEW) {
|
|
200
171
|
super(element, {useShadowDom: true});
|
|
@@ -212,22 +183,22 @@ export class RecordingListView extends UI.Widget.Widget {
|
|
|
212
183
|
}
|
|
213
184
|
|
|
214
185
|
#onCreateClick(): void {
|
|
215
|
-
this.
|
|
186
|
+
this.onCreateRecording?.();
|
|
216
187
|
}
|
|
217
188
|
|
|
218
189
|
#onDeleteClick(storageName: string, event: Event): void {
|
|
219
190
|
event.stopPropagation();
|
|
220
|
-
this.
|
|
191
|
+
this.onDeleteRecording?.(storageName);
|
|
221
192
|
}
|
|
222
193
|
|
|
223
194
|
#onOpenClick(storageName: string, event: Event): void {
|
|
224
195
|
event.stopPropagation();
|
|
225
|
-
this.
|
|
196
|
+
this.onOpenRecording?.(storageName);
|
|
226
197
|
}
|
|
227
198
|
|
|
228
199
|
#onPlayRecordingClick(storageName: string, event: Event): void {
|
|
229
200
|
event.stopPropagation();
|
|
230
|
-
this.
|
|
201
|
+
this.onPlayRecording?.(storageName);
|
|
231
202
|
}
|
|
232
203
|
|
|
233
204
|
#onKeyDown(storageName: string, event: Event): void {
|
|
@@ -31,7 +31,7 @@ import * as Actions from './recorder-actions/recorder-actions.js';
|
|
|
31
31
|
import recordingViewStyles from './recordingView.css.js';
|
|
32
32
|
import {ReplaySection} from './ReplaySection.js';
|
|
33
33
|
import {
|
|
34
|
-
type
|
|
34
|
+
type AddStepPosition,
|
|
35
35
|
State,
|
|
36
36
|
StepView,
|
|
37
37
|
} from './StepView.js';
|
|
@@ -84,7 +84,7 @@ const UIStrings = {
|
|
|
84
84
|
*/
|
|
85
85
|
screenshotForSection: 'Screenshot for this section',
|
|
86
86
|
/**
|
|
87
|
-
* @description The title of the button that edits the current recording
|
|
87
|
+
* @description The title of the button that edits the current recording's title.
|
|
88
88
|
*/
|
|
89
89
|
editTitle: 'Edit title',
|
|
90
90
|
/**
|
|
@@ -591,12 +591,18 @@ function renderSections(input: ViewInput): Lit.LitTemplate {
|
|
|
591
591
|
removable: input.recording.steps.length > 1 && Boolean(section.causingStep),
|
|
592
592
|
onStepClick: input.onStepClick,
|
|
593
593
|
onStepHover: input.onStepHover,
|
|
594
|
+
onStepChanged: input.onStepChanged,
|
|
595
|
+
onAddStep: input.onAddStep,
|
|
596
|
+
onRemoveStep: input.onRemoveStep,
|
|
597
|
+
onAddBreakpoint: input.onAddBreakpoint,
|
|
598
|
+
onRemoveBreakpoint: input.onRemoveBreakpoint,
|
|
599
|
+
onAttributeRequested: input.onAttributeRequested,
|
|
600
|
+
onCopyStep: input.onCopyStep,
|
|
594
601
|
})}
|
|
595
602
|
${section.steps.map(step => {
|
|
596
603
|
const stepIndex = input.recording.steps.indexOf(step);
|
|
597
604
|
return html`
|
|
598
605
|
<devtools-widget
|
|
599
|
-
@copystep=${input.onCopyStep}
|
|
600
606
|
${widget(StepView, {
|
|
601
607
|
step,
|
|
602
608
|
state: input.getStepState(step),
|
|
@@ -618,6 +624,13 @@ function renderSections(input: ViewInput): Lit.LitTemplate {
|
|
|
618
624
|
recorderSettings: input.recorderSettings ?? undefined,
|
|
619
625
|
onStepClick: input.onStepClick,
|
|
620
626
|
onStepHover: input.onStepHover,
|
|
627
|
+
onCopyStep: input.onCopyStep,
|
|
628
|
+
onStepChanged: input.onStepChanged,
|
|
629
|
+
onAddStep: input.onAddStep,
|
|
630
|
+
onRemoveStep: input.onRemoveStep,
|
|
631
|
+
onAddBreakpoint: input.onAddBreakpoint,
|
|
632
|
+
onRemoveBreakpoint: input.onRemoveBreakpoint,
|
|
633
|
+
onAttributeRequested: input.onAttributeRequested,
|
|
621
634
|
})}
|
|
622
635
|
jslog=${VisualLogging.section('step').track({click: true})}
|
|
623
636
|
></devtools-widget>
|
|
@@ -648,7 +661,7 @@ function renderSections(input: ViewInput): Lit.LitTemplate {
|
|
|
648
661
|
)}
|
|
649
662
|
</div>
|
|
650
663
|
`;
|
|
651
|
-
|
|
664
|
+
// clang-format on
|
|
652
665
|
}
|
|
653
666
|
|
|
654
667
|
function renderHeader(input: ViewInput): Lit.LitTemplate {
|
|
@@ -758,7 +771,7 @@ interface ViewInput {
|
|
|
758
771
|
onMeasurePerformanceClick: (event: Event) => void;
|
|
759
772
|
onTogglePlaying: (speed: PlayRecordingSpeed, extension?: Extensions.ExtensionManager.Extension) => void;
|
|
760
773
|
onCodeFormatChange: (event: Menus.SelectMenu.SelectMenuItemSelectedEvent) => void;
|
|
761
|
-
onCopyStep: (
|
|
774
|
+
onCopyStep: (step: Models.Schema.Step) => void;
|
|
762
775
|
onEditTitleButtonClick: (event: Event) => void;
|
|
763
776
|
onNetworkConditionsChange: (event: Event) => void;
|
|
764
777
|
onReplaySettingsKeydown: (event: Event) => void;
|
|
@@ -768,6 +781,12 @@ interface ViewInput {
|
|
|
768
781
|
onTimeoutInput: (event: Event) => void;
|
|
769
782
|
onTitleBlur: (event: Event) => void;
|
|
770
783
|
onTitleInputKeyDown: (event: KeyboardEvent) => void;
|
|
784
|
+
onStepChanged?: (currentStep: Models.Schema.Step, newStep: Models.Schema.Step) => void;
|
|
785
|
+
onAddStep?: (stepOrSection: Models.Schema.Step|Models.Section.Section, position: AddStepPosition) => void;
|
|
786
|
+
onRemoveStep?: (step: Models.Schema.Step) => void;
|
|
787
|
+
onAddBreakpoint?: (index: number) => void;
|
|
788
|
+
onRemoveBreakpoint?: (index: number) => void;
|
|
789
|
+
onAttributeRequested?: (send: (attribute?: string) => void) => void;
|
|
771
790
|
onToggleReplaySettings: (event: Event) => void;
|
|
772
791
|
onWrapperClick: () => void;
|
|
773
792
|
showCodeToggle: () => void;
|
|
@@ -857,15 +876,19 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
857
876
|
extensionConverters: readonly Converters.Converter.Converter[] = [];
|
|
858
877
|
replayExtensions?: Extensions.ExtensionManager.Extension[];
|
|
859
878
|
extensionDescriptor?: PublicExtensions.RecorderPluginManager.ViewDescriptor;
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
879
|
+
onPlayRecording?: (detail: PlayRecordingEvent) => void;
|
|
880
|
+
onNetworkConditionsChanged?: (conditions: SDK.NetworkManager.Conditions|undefined) => void;
|
|
881
|
+
onTimeoutChanged?: (timeout: number) => void;
|
|
882
|
+
onTitleChanged?: (title: string) => void;
|
|
883
|
+
onAddAssertion?: () => void;
|
|
884
|
+
onRecordingFinished?: () => void;
|
|
885
|
+
onAbortReplay?: () => void;
|
|
886
|
+
onStepChanged?: (currentStep: Models.Schema.Step, newStep: Models.Schema.Step) => void;
|
|
887
|
+
onAddStep?: (stepOrSection: Models.Schema.Step|Models.Section.Section, position: AddStepPosition) => void;
|
|
888
|
+
onRemoveStep?: (step: Models.Schema.Step) => void;
|
|
889
|
+
onAddBreakpoint?: (index: number) => void;
|
|
890
|
+
onRemoveBreakpoint?: (index: number) => void;
|
|
891
|
+
onAttributeRequested?: (send: (attribute?: string) => void) => void;
|
|
869
892
|
#recorderSettings?: Models.RecorderSettings.RecorderSettings;
|
|
870
893
|
get recorderSettings(): Models.RecorderSettings.RecorderSettings|undefined {
|
|
871
894
|
return this.#recorderSettings;
|
|
@@ -938,24 +961,30 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
938
961
|
showCodeView: this.#showCodeView,
|
|
939
962
|
|
|
940
963
|
onAddAssertion: () => {
|
|
941
|
-
this.
|
|
964
|
+
this.onAddAssertion?.();
|
|
942
965
|
},
|
|
943
966
|
onRecordingFinished: () => {
|
|
944
|
-
this.
|
|
967
|
+
this.onRecordingFinished?.();
|
|
945
968
|
},
|
|
946
969
|
getSectionState: this.#getSectionState.bind(this),
|
|
947
970
|
getStepState: this.#getStepState.bind(this),
|
|
948
971
|
onAbortReplay: () => {
|
|
949
|
-
this.
|
|
972
|
+
this.onAbortReplay?.();
|
|
950
973
|
},
|
|
951
974
|
onMeasurePerformanceClick: this.#handleMeasurePerformanceClickEvent.bind(this),
|
|
952
975
|
onTogglePlaying: (speed: PlayRecordingSpeed, extension?: Extensions.ExtensionManager.Extension) => {
|
|
953
|
-
this.
|
|
976
|
+
this.onPlayRecording?.({
|
|
954
977
|
targetPanel: TargetPanel.DEFAULT,
|
|
955
978
|
speed,
|
|
956
979
|
extension,
|
|
957
980
|
});
|
|
958
981
|
},
|
|
982
|
+
onStepChanged: (currentStep, newStep) => this.onStepChanged?.(currentStep, newStep),
|
|
983
|
+
onAddStep: (stepOrSection, position) => this.onAddStep?.(stepOrSection, position),
|
|
984
|
+
onRemoveStep: step => this.onRemoveStep?.(step),
|
|
985
|
+
onAddBreakpoint: index => this.onAddBreakpoint?.(index),
|
|
986
|
+
onRemoveBreakpoint: index => this.onRemoveBreakpoint?.(index),
|
|
987
|
+
onAttributeRequested: send => this.onAttributeRequested?.(send),
|
|
959
988
|
onCodeFormatChange: this.#onCodeFormatChange.bind(this),
|
|
960
989
|
onCopyStep: this.#onCopyStepEvent.bind(this),
|
|
961
990
|
onEditTitleButtonClick: this.#onEditTitleButtonClick.bind(this),
|
|
@@ -1093,9 +1122,8 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1093
1122
|
const preset = networkConditionPresets.find(
|
|
1094
1123
|
preset => preset.i18nTitleKey === throttlingMenu.value,
|
|
1095
1124
|
);
|
|
1096
|
-
this.
|
|
1097
|
-
preset?.i18nTitleKey === SDK.NetworkManager.NoThrottlingConditions.i18nTitleKey ? undefined : preset
|
|
1098
|
-
);
|
|
1125
|
+
this.onNetworkConditionsChanged?.(
|
|
1126
|
+
preset?.i18nTitleKey === SDK.NetworkManager.NoThrottlingConditions.i18nTitleKey ? undefined : preset);
|
|
1099
1127
|
}
|
|
1100
1128
|
}
|
|
1101
1129
|
|
|
@@ -1105,7 +1133,7 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1105
1133
|
target.reportValidity();
|
|
1106
1134
|
return;
|
|
1107
1135
|
}
|
|
1108
|
-
this.
|
|
1136
|
+
this.onTimeoutChanged?.(Number(target.value));
|
|
1109
1137
|
}
|
|
1110
1138
|
|
|
1111
1139
|
#onTitleBlur = (event: Event): void => {
|
|
@@ -1116,7 +1144,7 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1116
1144
|
this.performUpdate();
|
|
1117
1145
|
return;
|
|
1118
1146
|
}
|
|
1119
|
-
this.
|
|
1147
|
+
this.onTitleChanged?.(title);
|
|
1120
1148
|
};
|
|
1121
1149
|
|
|
1122
1150
|
#onTitleInputKeyDown = (event: KeyboardEvent): void => {
|
|
@@ -1170,9 +1198,8 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1170
1198
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(text);
|
|
1171
1199
|
}
|
|
1172
1200
|
|
|
1173
|
-
#onCopyStepEvent(
|
|
1174
|
-
|
|
1175
|
-
void this.#copyCurrentSelection(event.step);
|
|
1201
|
+
#onCopyStepEvent(step: Models.Schema.Step): void {
|
|
1202
|
+
void this.#copyCurrentSelection(step);
|
|
1176
1203
|
}
|
|
1177
1204
|
|
|
1178
1205
|
async #onCopy(event: ClipboardEvent): Promise<void> {
|
|
@@ -1188,7 +1215,7 @@ export class RecordingView extends UI.Widget.Widget {
|
|
|
1188
1215
|
#handleMeasurePerformanceClickEvent(event: Event): void {
|
|
1189
1216
|
event.stopPropagation();
|
|
1190
1217
|
|
|
1191
|
-
this.
|
|
1218
|
+
this.onPlayRecording?.({
|
|
1192
1219
|
targetPanel: TargetPanel.PERFORMANCE_PANEL,
|
|
1193
1220
|
speed: PlayRecordingSpeed.NORMAL,
|
|
1194
1221
|
});
|
|
@@ -20,19 +20,6 @@ const {html} = Lit;
|
|
|
20
20
|
|
|
21
21
|
const BINDING_NAME = 'captureSelectors';
|
|
22
22
|
|
|
23
|
-
export class RequestSelectorAttributeEvent extends Event {
|
|
24
|
-
static readonly eventName = 'requestselectorattribute';
|
|
25
|
-
send: (attribute?: string) => void;
|
|
26
|
-
|
|
27
|
-
constructor(send: (attribute?: string) => void) {
|
|
28
|
-
super(RequestSelectorAttributeEvent.eventName, {
|
|
29
|
-
bubbles: true,
|
|
30
|
-
composed: true,
|
|
31
|
-
});
|
|
32
|
-
this.send = send;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
23
|
const UIStrings = {
|
|
37
24
|
/**
|
|
38
25
|
* @description The title of a button that allows you to select an element on the page and update CSS/ARIA selectors.
|
|
@@ -12,7 +12,7 @@ import * as Lit from '../../ui/lit/lit.js';
|
|
|
12
12
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
13
|
|
|
14
14
|
import * as Models from './models/models.js';
|
|
15
|
-
import {
|
|
15
|
+
import {SelectorPicker} from './SelectorPicker.js';
|
|
16
16
|
import stepEditorStyles from './stepEditor.css.js';
|
|
17
17
|
import {
|
|
18
18
|
ArrayAssignments,
|
|
@@ -239,7 +239,7 @@ const UIStrings = {
|
|
|
239
239
|
*/
|
|
240
240
|
deleteRow: 'Delete row',
|
|
241
241
|
/**
|
|
242
|
-
* @description The title of a button that adds a new input field for the entry of the frame index. Frame index is the number of the frame within the page
|
|
242
|
+
* @description The title of a button that adds a new input field for the entry of the frame index. Frame index is the number of the frame within the page's frame tree.
|
|
243
243
|
*/
|
|
244
244
|
addFrameIndex: 'Add frame index within the frame tree',
|
|
245
245
|
/**
|
|
@@ -270,16 +270,6 @@ const UIStrings = {
|
|
|
270
270
|
const str_ = i18n.i18n.registerUIStrings('panels/recorder/StepEditor.ts', UIStrings);
|
|
271
271
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
272
272
|
|
|
273
|
-
export class StepEditedEvent extends Event {
|
|
274
|
-
static readonly eventName = 'stepedited';
|
|
275
|
-
data: Models.Schema.Step;
|
|
276
|
-
|
|
277
|
-
constructor(step: Models.Schema.Step) {
|
|
278
|
-
super(StepEditedEvent.eventName, {bubbles: true, composed: true});
|
|
279
|
-
this.data = step;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
273
|
export interface EditorState {
|
|
284
274
|
type: Models.Schema.StepType;
|
|
285
275
|
target?: string;
|
|
@@ -1005,6 +995,8 @@ export class StepEditor extends UI.Widget.Widget {
|
|
|
1005
995
|
#isTypeEditable = true;
|
|
1006
996
|
#disabled = false;
|
|
1007
997
|
#view: View;
|
|
998
|
+
onStepEdited?: (step: Models.Schema.Step) => void;
|
|
999
|
+
onAttributeRequested?: (send: (attribute?: string) => void) => void;
|
|
1008
1000
|
|
|
1009
1001
|
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
1010
1002
|
super(element, {useShadowDom: true});
|
|
@@ -1048,7 +1040,7 @@ export class StepEditor extends UI.Widget.Widget {
|
|
|
1048
1040
|
|
|
1049
1041
|
#commit(updatedState: DeepImmutable<EditorState>): void {
|
|
1050
1042
|
try {
|
|
1051
|
-
this.
|
|
1043
|
+
this.onStepEdited?.(EditorState.toStep(updatedState));
|
|
1052
1044
|
// Note we don't need to update this variable since it will come from up
|
|
1053
1045
|
// the tree, but processing up the tree is asynchronous implying we cannot
|
|
1054
1046
|
// reliably know when the state will come back down. Since we need to
|
|
@@ -1073,7 +1065,7 @@ export class StepEditor extends UI.Widget.Widget {
|
|
|
1073
1065
|
};
|
|
1074
1066
|
|
|
1075
1067
|
#handleAttributeRequested = (send: (attribute?: string) => void): void => {
|
|
1076
|
-
this.
|
|
1068
|
+
this.onAttributeRequested?.(send);
|
|
1077
1069
|
};
|
|
1078
1070
|
|
|
1079
1071
|
#handleAddOrRemoveClick = (assignments: DeepImmutable<DeepPartial<Assignments<EditorState>>>,
|
|
@@ -13,7 +13,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
13
13
|
|
|
14
14
|
import type * as Converters from './converters/converters.js';
|
|
15
15
|
import * as Models from './models/models.js';
|
|
16
|
-
import {
|
|
16
|
+
import {StepEditor} from './StepEditor.js';
|
|
17
17
|
import stepViewStyles from './stepView.css.js';
|
|
18
18
|
import {TimelineSection} from './TimelineSection.js';
|
|
19
19
|
|
|
@@ -58,7 +58,7 @@ const UIStrings = {
|
|
|
58
58
|
*/
|
|
59
59
|
scrollStepTitle: 'Scroll',
|
|
60
60
|
/**
|
|
61
|
-
* @description Title for the key up step type. `up` refers to the state of the keyboard key: it
|
|
61
|
+
* @description Title for the key up step type. `up` refers to the state of the keyboard key: it's released, i.e., up. It does not refer to the down arrow key specifically.
|
|
62
62
|
*/
|
|
63
63
|
keyUpStepTitle: 'Key up',
|
|
64
64
|
/**
|
|
@@ -66,7 +66,7 @@ const UIStrings = {
|
|
|
66
66
|
*/
|
|
67
67
|
navigateStepTitle: 'Navigate',
|
|
68
68
|
/**
|
|
69
|
-
* @description Title for the key down step type. `down` refers to the state of the keyboard key: it
|
|
69
|
+
* @description Title for the key down step type. `down` refers to the state of the keyboard key: it's pressed, i.e., down. It does not refer to the down arrow key specifically.
|
|
70
70
|
*/
|
|
71
71
|
keyDownStepTitle: 'Key down',
|
|
72
72
|
/**
|
|
@@ -90,27 +90,27 @@ const UIStrings = {
|
|
|
90
90
|
*/
|
|
91
91
|
elementRoleFallback: 'Element',
|
|
92
92
|
/**
|
|
93
|
-
* @description The title of the button in the step
|
|
93
|
+
* @description The title of the button in the step's context menu that adds a new step before the current one.
|
|
94
94
|
*/
|
|
95
95
|
addStepBefore: 'Add step before',
|
|
96
96
|
/**
|
|
97
|
-
* @description The title of the button in the step
|
|
97
|
+
* @description The title of the button in the step's context menu that adds a new step after the current one.
|
|
98
98
|
*/
|
|
99
99
|
addStepAfter: 'Add step after',
|
|
100
100
|
/**
|
|
101
|
-
* @description The title of the button in the step
|
|
101
|
+
* @description The title of the button in the step's context menu that removes the step.
|
|
102
102
|
*/
|
|
103
103
|
removeStep: 'Remove step',
|
|
104
104
|
/**
|
|
105
|
-
* @description The title of the button that opens the step
|
|
105
|
+
* @description The title of the button that opens the step's context menu.
|
|
106
106
|
*/
|
|
107
107
|
openStepActions: 'Open step actions',
|
|
108
108
|
/**
|
|
109
|
-
* @description The title of the button in the step
|
|
109
|
+
* @description The title of the button in the step's context menu that adds a breakpoint.
|
|
110
110
|
*/
|
|
111
111
|
addBreakpoint: 'Add breakpoint',
|
|
112
112
|
/**
|
|
113
|
-
* @description The title of the button in the step
|
|
113
|
+
* @description The title of the button in the step's context menu that removes a breakpoint.
|
|
114
114
|
*/
|
|
115
115
|
removeBreakpoint: 'Remove breakpoint',
|
|
116
116
|
/**
|
|
@@ -142,89 +142,10 @@ export const enum State {
|
|
|
142
142
|
STOPPED = 'stopped',
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
export class CaptureSelectorsEvent extends Event {
|
|
146
|
-
static readonly eventName = 'captureselectors';
|
|
147
|
-
data: Models.Schema.StepWithSelectors&Partial<Models.Schema.ClickAttributes>;
|
|
148
|
-
|
|
149
|
-
constructor(
|
|
150
|
-
step: Models.Schema.StepWithSelectors&Partial<Models.Schema.ClickAttributes>,
|
|
151
|
-
) {
|
|
152
|
-
super(CaptureSelectorsEvent.eventName, {bubbles: true, composed: true});
|
|
153
|
-
this.data = step;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export class CopyStepEvent extends Event {
|
|
158
|
-
static readonly eventName = 'copystep';
|
|
159
|
-
step: Models.Schema.Step;
|
|
160
|
-
constructor(step: Models.Schema.Step) {
|
|
161
|
-
super(CopyStepEvent.eventName, {bubbles: true, composed: true});
|
|
162
|
-
this.step = step;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export class StepChanged extends Event {
|
|
167
|
-
static readonly eventName = 'stepchanged';
|
|
168
|
-
currentStep: Models.Schema.Step;
|
|
169
|
-
newStep: Models.Schema.Step;
|
|
170
|
-
|
|
171
|
-
constructor(currentStep: Models.Schema.Step, newStep: Models.Schema.Step) {
|
|
172
|
-
super(StepChanged.eventName, {bubbles: true, composed: true});
|
|
173
|
-
this.currentStep = currentStep;
|
|
174
|
-
this.newStep = newStep;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
145
|
export const enum AddStepPosition {
|
|
179
146
|
BEFORE = 'before',
|
|
180
147
|
AFTER = 'after',
|
|
181
148
|
}
|
|
182
|
-
|
|
183
|
-
export class AddStep extends Event {
|
|
184
|
-
static readonly eventName = 'addstep';
|
|
185
|
-
position: AddStepPosition;
|
|
186
|
-
stepOrSection: Models.Schema.Step|Models.Section.Section;
|
|
187
|
-
|
|
188
|
-
constructor(
|
|
189
|
-
stepOrSection: Models.Schema.Step|Models.Section.Section,
|
|
190
|
-
position: AddStepPosition,
|
|
191
|
-
) {
|
|
192
|
-
super(AddStep.eventName, {bubbles: true, composed: true});
|
|
193
|
-
this.stepOrSection = stepOrSection;
|
|
194
|
-
this.position = position;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export class RemoveStep extends Event {
|
|
199
|
-
static readonly eventName = 'removestep';
|
|
200
|
-
step: Models.Schema.Step;
|
|
201
|
-
|
|
202
|
-
constructor(step: Models.Schema.Step) {
|
|
203
|
-
super(RemoveStep.eventName, {bubbles: true, composed: true});
|
|
204
|
-
this.step = step;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export class AddBreakpointEvent extends Event {
|
|
209
|
-
static readonly eventName = 'addbreakpoint';
|
|
210
|
-
index: number;
|
|
211
|
-
|
|
212
|
-
constructor(index: number) {
|
|
213
|
-
super(AddBreakpointEvent.eventName, {bubbles: true, composed: true});
|
|
214
|
-
this.index = index;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
export class RemoveBreakpointEvent extends Event {
|
|
219
|
-
static readonly eventName = 'removebreakpoint';
|
|
220
|
-
index: number;
|
|
221
|
-
|
|
222
|
-
constructor(index: number) {
|
|
223
|
-
super(RemoveBreakpointEvent.eventName, {bubbles: true, composed: true});
|
|
224
|
-
this.index = index;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
149
|
const COPY_ACTION_PREFIX = 'copy-step-as-';
|
|
229
150
|
|
|
230
151
|
interface Action {
|
|
@@ -258,7 +179,8 @@ export interface ViewInput {
|
|
|
258
179
|
recorderSettings?: Models.RecorderSettings.RecorderSettings;
|
|
259
180
|
actions: Action[];
|
|
260
181
|
|
|
261
|
-
stepEdited: (
|
|
182
|
+
stepEdited: (newStep: Models.Schema.Step) => void;
|
|
183
|
+
onAttributeRequested?: (send: (attribute?: string) => void) => void;
|
|
262
184
|
onBreakpointClick: () => void;
|
|
263
185
|
handleStepAction: (event: Menus.Menu.MenuItemSelectedEvent) => void;
|
|
264
186
|
toggleShowDetails: () => void;
|
|
@@ -466,9 +388,10 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
466
388
|
html`<devtools-widget ${widget(StepEditor, {
|
|
467
389
|
step: input.step,
|
|
468
390
|
disabled: input.isPlaying,
|
|
391
|
+
onStepEdited: input.stepEdited,
|
|
392
|
+
onAttributeRequested: input.onAttributeRequested,
|
|
469
393
|
})}
|
|
470
|
-
class=${input.isSelected ? 'is-selected' : ''}
|
|
471
|
-
@stepedited=${input.stepEdited}></devtools-widget>`
|
|
394
|
+
class=${input.isSelected ? 'is-selected' : ''}></devtools-widget>`
|
|
472
395
|
}
|
|
473
396
|
${
|
|
474
397
|
input.section?.causingStep &&
|
|
@@ -476,8 +399,10 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
476
399
|
step: input.section.causingStep,
|
|
477
400
|
isTypeEditable: false,
|
|
478
401
|
disabled: input.isPlaying,
|
|
479
|
-
|
|
480
|
-
|
|
402
|
+
onStepEdited: input.stepEdited,
|
|
403
|
+
onAttributeRequested: input.onAttributeRequested,
|
|
404
|
+
})}></devtools-widget>`
|
|
405
|
+
}
|
|
481
406
|
}
|
|
482
407
|
</div>
|
|
483
408
|
${
|
|
@@ -500,6 +425,13 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
500
425
|
#observer: IntersectionObserver = new IntersectionObserver(result => {
|
|
501
426
|
this.#viewInput.isVisible = result[0].isIntersecting;
|
|
502
427
|
});
|
|
428
|
+
onStepChanged?: (currentStep: Models.Schema.Step, newStep: Models.Schema.Step) => void;
|
|
429
|
+
onAddStep?: (stepOrSection: Models.Schema.Step|Models.Section.Section, position: AddStepPosition) => void;
|
|
430
|
+
onRemoveStep?: (step: Models.Schema.Step) => void;
|
|
431
|
+
onAddBreakpoint?: (index: number) => void;
|
|
432
|
+
onRemoveBreakpoint?: (index: number) => void;
|
|
433
|
+
onCopyStep?: (step: Models.Schema.Step) => void;
|
|
434
|
+
onAttributeRequested?: (send: (attribute?: string) => void) => void;
|
|
503
435
|
#viewInput: ViewInput = {
|
|
504
436
|
state: State.DEFAULT,
|
|
505
437
|
showDetails: false,
|
|
@@ -520,6 +452,7 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
520
452
|
actions: [],
|
|
521
453
|
|
|
522
454
|
stepEdited: this.#stepEdited.bind(this),
|
|
455
|
+
onAttributeRequested: send => this.onAttributeRequested?.(send),
|
|
523
456
|
onBreakpointClick: this.#onBreakpointClick.bind(this),
|
|
524
457
|
handleStepAction: this.#handleStepAction.bind(this),
|
|
525
458
|
toggleShowDetails: this.#toggleShowDetails.bind(this),
|
|
@@ -672,12 +605,12 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
672
605
|
}
|
|
673
606
|
}
|
|
674
607
|
|
|
675
|
-
#stepEdited(
|
|
608
|
+
#stepEdited(newStep: Models.Schema.Step): void {
|
|
676
609
|
const step = this.#viewInput.step || this.#viewInput.section?.causingStep;
|
|
677
610
|
if (!step) {
|
|
678
611
|
throw new Error('Expected step.');
|
|
679
612
|
}
|
|
680
|
-
this.
|
|
613
|
+
this.onStepChanged?.(step, newStep);
|
|
681
614
|
}
|
|
682
615
|
|
|
683
616
|
#handleStepAction(event: Menus.Menu.MenuItemSelectedEvent): void {
|
|
@@ -687,7 +620,7 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
687
620
|
if (!stepOrSection) {
|
|
688
621
|
throw new Error('Expected step or section.');
|
|
689
622
|
}
|
|
690
|
-
this.
|
|
623
|
+
this.onAddStep?.(stepOrSection, AddStepPosition.BEFORE);
|
|
691
624
|
break;
|
|
692
625
|
}
|
|
693
626
|
case 'add-step-after': {
|
|
@@ -695,7 +628,7 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
695
628
|
if (!stepOrSection) {
|
|
696
629
|
throw new Error('Expected step or section.');
|
|
697
630
|
}
|
|
698
|
-
this.
|
|
631
|
+
this.onAddStep?.(stepOrSection, AddStepPosition.AFTER);
|
|
699
632
|
break;
|
|
700
633
|
}
|
|
701
634
|
case 'remove-step': {
|
|
@@ -703,23 +636,21 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
703
636
|
if (!this.#viewInput.step && !causingStep) {
|
|
704
637
|
throw new Error('Expected step.');
|
|
705
638
|
}
|
|
706
|
-
this.
|
|
707
|
-
new RemoveStep(this.#viewInput.step || (causingStep as Models.Schema.Step)),
|
|
708
|
-
);
|
|
639
|
+
this.onRemoveStep?.(this.#viewInput.step || (causingStep as Models.Schema.Step));
|
|
709
640
|
break;
|
|
710
641
|
}
|
|
711
642
|
case 'add-breakpoint': {
|
|
712
643
|
if (!this.#viewInput.step) {
|
|
713
644
|
throw new Error('Expected step');
|
|
714
645
|
}
|
|
715
|
-
this.
|
|
646
|
+
this.onAddBreakpoint?.(this.#viewInput.stepIndex);
|
|
716
647
|
break;
|
|
717
648
|
}
|
|
718
649
|
case 'remove-breakpoint': {
|
|
719
650
|
if (!this.#viewInput.step) {
|
|
720
651
|
throw new Error('Expected step');
|
|
721
652
|
}
|
|
722
|
-
this.
|
|
653
|
+
this.onRemoveBreakpoint?.(this.#viewInput.stepIndex);
|
|
723
654
|
break;
|
|
724
655
|
}
|
|
725
656
|
default: {
|
|
@@ -738,16 +669,16 @@ export class StepView extends UI.Widget.Widget<ShadowRoot> {
|
|
|
738
669
|
this.#viewInput.recorderSettings.preferredCopyFormat = converterId;
|
|
739
670
|
}
|
|
740
671
|
|
|
741
|
-
this.
|
|
672
|
+
this.onCopyStep?.(structuredClone(copyStep));
|
|
742
673
|
}
|
|
743
674
|
}
|
|
744
675
|
}
|
|
745
676
|
|
|
746
677
|
#onBreakpointClick(): void {
|
|
747
678
|
if (this.#viewInput.hasBreakpoint) {
|
|
748
|
-
this.
|
|
679
|
+
this.onRemoveBreakpoint?.(this.#viewInput.stepIndex);
|
|
749
680
|
} else {
|
|
750
|
-
this.
|
|
681
|
+
this.onAddBreakpoint?.(this.#viewInput.stepIndex);
|
|
751
682
|
}
|
|
752
683
|
this.requestUpdate();
|
|
753
684
|
}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as ControlButton from './ControlButton.js';
|
|
6
6
|
import * as CreateRecordingView from './CreateRecordingView.js';
|
|
7
|
-
import * as RecorderController from './RecorderController.js';
|
|
8
7
|
import * as RecorderEvents from './RecorderEvents.js';
|
|
9
8
|
import * as RecorderPanel from './RecorderPanel.js';
|
|
10
9
|
import * as RecordingListView from './RecordingListView.js';
|
|
@@ -18,7 +17,6 @@ import * as TimelineSection from './TimelineSection.js';
|
|
|
18
17
|
export {
|
|
19
18
|
ControlButton,
|
|
20
19
|
CreateRecordingView,
|
|
21
|
-
RecorderController,
|
|
22
20
|
RecorderEvents,
|
|
23
21
|
RecorderPanel,
|
|
24
22
|
RecordingListView,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import * as Common from '../../core/common/common.js';
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
6
|
import * as Platform from '../../core/platform/platform.js';
|
|
7
|
-
import * as TextUtils from '../../
|
|
7
|
+
import * as TextUtils from '../../core/text_utils/text_utils.js';
|
|
8
8
|
import type * as Workspace from '../../models/workspace/workspace.js';
|
|
9
9
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
10
|
import {html, render, type TemplateResult} from '../../ui/lit/lit.js';
|