chrome-devtools-frontend 1.0.1689415 → 1.0.1690531
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/.gitmodules +4 -0
- package/eslint.config.mjs +8 -2
- package/front_end/core/common/Object.ts +10 -4
- package/front_end/core/i18n/collect-ui-strings.js +5 -5
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/i18n/i18n.ts +6 -0
- package/front_end/core/root/Runtime.ts +1 -5
- package/front_end/core/sdk/CSSMetadata.ts +3 -5
- package/front_end/core/sdk/DOMModel.ts +46 -11
- package/front_end/core/sdk/EmulationModel.ts +18 -0
- package/front_end/core/sdk/NetworkRequest.ts +50 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +172 -0
- package/front_end/core/sdk/SDKSettings.ts +9 -0
- package/front_end/core/sdk/Script.ts +0 -1
- package/front_end/core/sdk/SecurityOrigin.ts +160 -25
- package/front_end/core/sdk/Target.ts +1 -5
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/generated/SupportedCSSProperties.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/AiConversation.ts +29 -18
- package/front_end/models/ai_assistance/AiUtils.ts +0 -10
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +6 -10
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -1
- package/front_end/models/ai_assistance/injected.ts +0 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
- package/front_end/models/trace/insights/Cache.ts +1 -3
- package/front_end/models/trace/insights/CharacterSet.ts +1 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -3
- package/front_end/models/trace/insights/DocumentLatency.ts +1 -3
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -3
- package/front_end/models/trace/insights/FontDisplay.ts +1 -2
- package/front_end/models/trace/insights/ForcedReflow.ts +1 -2
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -3
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -3
- package/front_end/models/trace/insights/LegacyJavaScript.ts +1 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -2
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -3
- package/front_end/models/trace/insights/SlowCSSSelector.ts +1 -3
- package/front_end/models/trace/insights/ThirdParties.ts +1 -3
- package/front_end/models/trace/insights/Viewport.ts +1 -2
- package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -2
- package/front_end/panels/accessibility/AccessibilityStrings.ts +7 -3
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +1 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +6 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBViews.ts +3 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiView.ts +2 -2
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/StorageItemsToolbar.ts +6 -2
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/WebMCPView.ts +2 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +1 -1
- package/front_end/panels/application/components/CrashReportContextGrid.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +3 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +2 -2
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +7 -2
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +2 -0
- package/front_end/panels/autofill/AutofillView.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +56 -15
- package/front_end/panels/changes/ChangesView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsolePrompt.ts +6 -2
- package/front_end/panels/console/ConsoleSidebar.ts +12 -4
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -9
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +16 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +402 -130
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/PropertyRenderer.ts +22 -15
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +7 -3
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +75 -26
- package/front_end/panels/elements/StylesSidebarPane.ts +9 -4
- package/front_end/panels/elements/components/StylePropertyEditor.ts +160 -148
- package/front_end/panels/elements/elementsTreeOutline.css +4 -0
- package/front_end/panels/emulation/DeviceModeView.ts +6 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +6 -2
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +6 -2
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +7 -2
- package/front_end/panels/layer_viewer/Layers3DView.ts +8 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +6 -2
- package/front_end/panels/lighthouse/lighthousePanel.css +5 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +13 -13
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +6 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +6 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +25 -54
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +12 -4
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/RequestHeadersView.css +5 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/networkLogView.css +4 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +2 -0
- package/front_end/panels/performance_monitor/performanceMonitor.css +3 -3
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +7 -2
- package/front_end/panels/profiler/HeapProfileView.ts +7 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +8 -4
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +6 -2
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +12 -5
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -2
- package/front_end/panels/profiler/profilesPanel.css +8 -9
- package/front_end/panels/profiler/profilesSidebarTree.css +13 -13
- package/front_end/panels/protocol_monitor/JSONEditor.css +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +6 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +2 -2
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesView.ts +7 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +6 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +10 -3
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/AnnotationHelpers.ts +9 -9
- package/front_end/panels/timeline/CountersGraph.ts +8 -8
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/ExtensionTrackAppender.ts +1 -1
- package/front_end/panels/timeline/GPUTrackAppender.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +3 -3
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +4 -4
- package/front_end/panels/timeline/NetworkTrackAppender.ts +2 -2
- package/front_end/panels/timeline/StatusDialog.ts +5 -6
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +4 -4
- package/front_end/panels/timeline/ThreadAppender.ts +12 -14
- package/front_end/panels/timeline/TimelineController.ts +5 -8
- package/front_end/panels/timeline/TimelineDetailsView.ts +13 -9
- package/front_end/panels/timeline/TimelineEventOverview.ts +4 -4
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +18 -18
- package/front_end/panels/timeline/TimelineFlameChartView.ts +8 -3
- package/front_end/panels/timeline/TimelineHistoryManager.ts +9 -9
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineMiniMap.ts +7 -2
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +60 -62
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +27 -27
- package/front_end/panels/timeline/TimelineTreeView.ts +47 -45
- package/front_end/panels/timeline/TimelineUIUtils.ts +146 -120
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TrackConfigBanner.ts +4 -4
- package/front_end/panels/timeline/UIDevtoolsUtils.ts +15 -15
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +30 -30
- package/front_end/panels/timeline/timelineFlameChartView.css +10 -10
- package/front_end/panels/timeline/timelineFlamechartPopover.css +5 -5
- package/front_end/panels/timeline/timelineHistoryManager.css +7 -7
- package/front_end/panels/timeline/timelinePaintProfiler.css +2 -2
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/IgnoreList.ts +4 -4
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/ui/comments/CommentAnchorResolver.ts +12 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +9 -1
- package/front_end/ui/components/buttons/Button.docs.ts +1 -1
- package/front_end/ui/components/buttons/button.css +21 -0
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/report_view/ReportView.docs.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbars.docs.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/spinners/Spinners.docs.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +46 -27
- package/front_end/ui/components/switch/Switch.docs.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +10 -8
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +2 -1
- package/front_end/ui/components/text_editor/ExecutionPositionHighlighter.ts +2 -2
- package/front_end/ui/components/text_editor/TextEditor.ts +19 -0
- package/front_end/ui/components/text_editor/config.ts +109 -96
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
- package/front_end/ui/components/text_editor/theme.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.docs.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +4 -1
- package/front_end/ui/kit/cards/Card.ts +1 -1
- package/front_end/ui/kit/icons/Icon.ts +1 -1
- package/front_end/ui/kit/link/Link.docs.ts +1 -1
- package/front_end/ui/kit/link/Link.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/Dialog.ts +10 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/FilterBar.ts +6 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/RadioButton.docs.ts +1 -1
- package/front_end/ui/legacy/SelectMenu.docs.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/Slider.docs.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +7 -2
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +5 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +13 -37
- package/front_end/ui/legacy/UIUtils.ts +6 -3
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +13 -2
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts +6 -2
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +54 -45
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +6 -2
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +141 -106
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -10
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -0
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +6 -2
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -7
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +11 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/package.json +3 -2
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +0 -191
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
|
@@ -10,19 +10,19 @@ import * as Workspace from '../../../models/workspace/workspace.js';
|
|
|
10
10
|
|
|
11
11
|
const UIStrings = {
|
|
12
12
|
/**
|
|
13
|
-
* @description
|
|
13
|
+
* @description Reason why a script is ignored because it is a Chrome extension content script.
|
|
14
14
|
*/
|
|
15
15
|
skipContentScripts: 'Content script',
|
|
16
16
|
/**
|
|
17
|
-
* @description
|
|
17
|
+
* @description Reason why a script is ignored because it is marked with ignoreList in the source map.
|
|
18
18
|
*/
|
|
19
19
|
skip3rdPartyScripts: 'Marked with ignoreList in source map',
|
|
20
20
|
/**
|
|
21
|
-
* @description
|
|
21
|
+
* @description Reason why a script is ignored because it is an anonymous script.
|
|
22
22
|
*/
|
|
23
23
|
skipAnonymousScripts: 'Anonymous script',
|
|
24
24
|
/**
|
|
25
|
-
* @description
|
|
25
|
+
* @description Reason why a script is ignored because of an unknown ignore rule.
|
|
26
26
|
*/
|
|
27
27
|
unknown: 'Unknown',
|
|
28
28
|
} as const;
|
|
@@ -6,7 +6,7 @@ import * as Trace from '../../../models/trace/trace.js';
|
|
|
6
6
|
|
|
7
7
|
const imageCache =
|
|
8
8
|
new WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null>();
|
|
9
|
-
export const emitter = new EventTarget();
|
|
9
|
+
export const emitter: EventTarget = new EventTarget();
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Synchronously returns an image, or return `null` while queuing up an async load of that image.
|
|
@@ -55,5 +55,7 @@ export function preload(screenshots: Array<Trace.Types.Events.LegacySyntheticScr
|
|
|
55
55
|
return Promise.all(promises);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export const cacheForTesting
|
|
59
|
-
|
|
58
|
+
export const cacheForTesting:
|
|
59
|
+
WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null> =
|
|
60
|
+
imageCache;
|
|
61
|
+
export const loadImageForTesting: typeof loadImage = loadImage;
|
|
@@ -76,14 +76,14 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
76
76
|
const WEBAUDIO_EXPLANATION_URL =
|
|
77
77
|
'https://developer.chrome.com/docs/devtools/webaudio' as Platform.DevToolsPath.UrlString;
|
|
78
78
|
|
|
79
|
-
interface ViewInput {
|
|
79
|
+
export interface ViewInput {
|
|
80
80
|
contexts: Protocol.WebAudio.BaseAudioContext[];
|
|
81
81
|
selectedContextIndex: number;
|
|
82
82
|
onContextSelectorSelectionChanged: (contextId: string) => void;
|
|
83
83
|
contextRealtimeData: Protocol.WebAudio.ContextRealtimeData|null;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
|
|
86
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
|
|
87
87
|
|
|
88
88
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
89
89
|
const {
|
|
@@ -189,7 +189,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
|
|
|
189
189
|
private selectedContextIndex = -1;
|
|
190
190
|
private readonly pollRealtimeDataThrottler: Common.Throttler.Throttler;
|
|
191
191
|
|
|
192
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
192
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
193
193
|
super({useShadowDom: 'pure'});
|
|
194
194
|
this.view = view;
|
|
195
195
|
|
|
@@ -240,19 +240,13 @@ const PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum<typeof Protocol.Web
|
|
|
240
240
|
U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
interface Authenticator {
|
|
243
|
+
export interface Authenticator {
|
|
244
244
|
name: string;
|
|
245
245
|
options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
|
|
246
246
|
credentials: Protocol.WebAuthn.Credential[];
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
interface
|
|
250
|
-
name: string;
|
|
251
|
-
options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
|
|
252
|
-
credentials: Protocol.WebAuthn.Credential[];
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
interface ViewInput {
|
|
249
|
+
export interface ViewInput {
|
|
256
250
|
enabled: boolean;
|
|
257
251
|
onToggleEnabled: () => void;
|
|
258
252
|
authenticators: Map<Protocol.WebAuthn.AuthenticatorId, Authenticator>;
|
|
@@ -270,11 +264,11 @@ interface ViewInput {
|
|
|
270
264
|
onRemoveCredential: (id: Protocol.WebAuthn.AuthenticatorId, credentialId: string) => void;
|
|
271
265
|
}
|
|
272
266
|
|
|
273
|
-
interface ViewOutput {
|
|
267
|
+
export interface ViewOutput {
|
|
274
268
|
revealSection: Map<string, () => void>;
|
|
275
269
|
}
|
|
276
270
|
|
|
277
|
-
type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
271
|
+
export type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
278
272
|
|
|
279
273
|
function renderToolbar(enabled: boolean, onToggle: () => void): Lit.TemplateResult {
|
|
280
274
|
const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);
|
|
@@ -629,7 +623,7 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
629
623
|
revealSection: new Map(),
|
|
630
624
|
};
|
|
631
625
|
|
|
632
|
-
constructor(view = DEFAULT_VIEW) {
|
|
626
|
+
constructor(view: ViewFunction = DEFAULT_VIEW) {
|
|
633
627
|
super('webauthn');
|
|
634
628
|
|
|
635
629
|
this.#view = view;
|
|
@@ -9,6 +9,6 @@ export {ESTree};
|
|
|
9
9
|
|
|
10
10
|
export { type Comment, defaultOptions, getLineInfo, Node, SourceLocation, Token, tokTypes} from './package/dist/acorn.mjs';
|
|
11
11
|
|
|
12
|
-
export const Parser = acorn.Parser;
|
|
13
|
-
export const tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
|
|
14
|
-
export const parse = acorn.Parser.parse.bind(acorn.Parser);
|
|
12
|
+
export const Parser: typeof acorn.Parser = acorn.Parser;
|
|
13
|
+
export const tokenizer: typeof acorn.Parser.tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
|
|
14
|
+
export const parse: typeof acorn.Parser.parse = acorn.Parser.parse.bind(acorn.Parser);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: e8d7f556806fab69401893b125dee4b6e6ded695
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -343,12 +343,12 @@ export function isUrlScheme(urlScheme: string): boolean {
|
|
|
343
343
|
/**
|
|
344
344
|
* A regex pattern to check nonce prefix and Base64 formatting of a nonce value.
|
|
345
345
|
*/
|
|
346
|
-
export const STRICT_NONCE_PATTERN =
|
|
346
|
+
export const STRICT_NONCE_PATTERN: RegExp =
|
|
347
347
|
new RegExp('^\'nonce-[a-zA-Z0-9+/_-]+[=]{0,2}\'$');
|
|
348
348
|
|
|
349
349
|
|
|
350
350
|
/** A regex pattern for checking if nonce prefix. */
|
|
351
|
-
export const NONCE_PATTERN = new RegExp('^\'nonce-(.+)\'$');
|
|
351
|
+
export const NONCE_PATTERN: RegExp = new RegExp('^\'nonce-(.+)\'$');
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
/**
|
|
@@ -367,12 +367,12 @@ export function isNonce(nonce: string, strictCheck?: boolean): boolean {
|
|
|
367
367
|
/**
|
|
368
368
|
* A regex pattern to check hash prefix and Base64 formatting of a hash value.
|
|
369
369
|
*/
|
|
370
|
-
export const STRICT_HASH_PATTERN =
|
|
370
|
+
export const STRICT_HASH_PATTERN: RegExp =
|
|
371
371
|
new RegExp('^\'(sha256|sha384|sha512)-[a-zA-Z0-9+/]+[=]{0,2}\'$');
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
/** A regex pattern to check hash prefix. */
|
|
375
|
-
export const HASH_PATTERN = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
|
|
375
|
+
export const HASH_PATTERN: RegExp = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
/**
|
|
@@ -97,4 +97,6 @@ function normalizeDirectiveValue(directiveValue: string): string {
|
|
|
97
97
|
return directiveValue;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export const TEST_ONLY
|
|
100
|
+
export const TEST_ONLY: {
|
|
101
|
+
normalizeDirectiveValue: typeof normalizeDirectiveValue,
|
|
102
|
+
} = {normalizeDirectiveValue};
|
|
@@ -136,7 +136,7 @@ export function matchWildcardUrls(
|
|
|
136
136
|
export function applyCheckFunktionToDirectives(
|
|
137
137
|
parsedCsp: csp.Csp,
|
|
138
138
|
check: (directive: string, directiveValues: string[]) => void,
|
|
139
|
-
) {
|
|
139
|
+
): void {
|
|
140
140
|
const directiveNames = Object.keys(parsedCsp.directives);
|
|
141
141
|
|
|
142
142
|
for (const directive of directiveNames) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
|
+
declare class diff_match_patch {
|
|
7
|
+
diff_main(text1: string, text2: string): Array<{0: number, 1: string}>;
|
|
8
|
+
diff_cleanupSemantic(diff: Array<{0: number, 1: string}>): void;
|
|
9
|
+
}
|
|
10
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -57,6 +57,16 @@ function isCodeMirrorEditor(element: Element): boolean {
|
|
|
57
57
|
return element.classList.contains('cm-editor');
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Resolves the file path attribute for a CodeMirror editor element.
|
|
62
|
+
*
|
|
63
|
+
* @param element The editor element to check.
|
|
64
|
+
* @returns The file path string or undefined if not found.
|
|
65
|
+
*/
|
|
66
|
+
export function getEditorFilePath(element: Element): string|undefined {
|
|
67
|
+
return element.getAttribute('data-file-path') ?? undefined;
|
|
68
|
+
}
|
|
69
|
+
|
|
60
70
|
/**
|
|
61
71
|
* Checks whether an element contains non-empty text content (after trimming whitespace),
|
|
62
72
|
* including text from any nested shadow roots.
|
|
@@ -340,7 +350,7 @@ export function resolveCommentAnchor(
|
|
|
340
350
|
return null;
|
|
341
351
|
}
|
|
342
352
|
textSignature = lineInfo.textSignature;
|
|
343
|
-
const filePath = target
|
|
353
|
+
const filePath = getEditorFilePath(target);
|
|
344
354
|
editor = {lineNumber: lineInfo.lineNumber, filePath};
|
|
345
355
|
} else {
|
|
346
356
|
textSignature = target.deepTextContent();
|
|
@@ -379,7 +389,6 @@ export function resolveCommentAnchor(
|
|
|
379
389
|
* @param limit Maximum number of matching elements to return (defaults to Infinity).
|
|
380
390
|
* @returns Array of matching Elements in document order.
|
|
381
391
|
*/
|
|
382
|
-
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
383
392
|
export function deepQuerySelectorAll(root: Document|Element, selector: string, limit: number = Infinity): Element[] {
|
|
384
393
|
const results: Element[] = [];
|
|
385
394
|
if (limit <= 0 || Number.isNaN(limit)) {
|
|
@@ -453,7 +462,7 @@ export function rematchCommentAnchor(comment: CommentThread, root: Document|Elem
|
|
|
453
462
|
const {lineNumber, filePath} = anchor.editor;
|
|
454
463
|
const cmEditors = deepQuerySelectorAll(root, '.cm-editor');
|
|
455
464
|
const matchingEditors = cmEditors.filter(cmEditor => {
|
|
456
|
-
if (filePath !== undefined && cmEditor
|
|
465
|
+
if (filePath !== undefined && getEditorFilePath(cmEditor) !== filePath) {
|
|
457
466
|
return false;
|
|
458
467
|
}
|
|
459
468
|
return VisualLogging.getVePath(cmEditor) === anchor.vePath;
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
type CommentThread,
|
|
10
10
|
computeVisibleRect,
|
|
11
11
|
deepQuerySelectorAll,
|
|
12
|
+
getEditorFilePath,
|
|
12
13
|
rematchCommentAnchor,
|
|
13
14
|
resolveCommentAnchor,
|
|
14
15
|
resolveCommentAnchorElement,
|
|
@@ -298,6 +299,13 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
298
299
|
continue;
|
|
299
300
|
}
|
|
300
301
|
|
|
302
|
+
if (thread.anchor.editor?.filePath) {
|
|
303
|
+
const currentFilePath = getEditorFilePath(el);
|
|
304
|
+
if (currentFilePath && currentFilePath !== thread.anchor.editor.filePath) {
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
301
309
|
const observer = this.#getIntersectionObserver();
|
|
302
310
|
if (!this.#observedThreads.has(el)) {
|
|
303
311
|
observer.observe(el);
|
|
@@ -608,7 +616,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
608
616
|
childList: true,
|
|
609
617
|
subtree: true,
|
|
610
618
|
attributes: true,
|
|
611
|
-
attributeFilter: ['jslog', 'data-network-request-id', 'data-backend-node-id', 'aria-expanded'],
|
|
619
|
+
attributeFilter: ['jslog', 'data-network-request-id', 'data-backend-node-id', 'aria-expanded', 'data-file-path'],
|
|
612
620
|
});
|
|
613
621
|
}
|
|
614
622
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {Button, FloatingButton} from './buttons.js';
|
|
6
6
|
|
|
7
|
-
export function render(container: HTMLElement) {
|
|
7
|
+
export function render(container: HTMLElement): void {
|
|
8
8
|
const buttonDocs = container.createChild('div', 'button-docs');
|
|
9
9
|
const style = document.createElement('style');
|
|
10
10
|
style.textContent = `
|
|
@@ -358,3 +358,24 @@ button {
|
|
|
358
358
|
transform: rotate(360deg);
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
+
|
|
362
|
+
@media (forced-colors: active) {
|
|
363
|
+
button.outlined {
|
|
364
|
+
background: ButtonFace;
|
|
365
|
+
border-color: ButtonText;
|
|
366
|
+
color: ButtonText;
|
|
367
|
+
|
|
368
|
+
devtools-icon {
|
|
369
|
+
color: ButtonText;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&:disabled {
|
|
373
|
+
border-color: GrayText;
|
|
374
|
+
color: GrayText;
|
|
375
|
+
|
|
376
|
+
devtools-icon {
|
|
377
|
+
color: GrayText;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
@@ -116,3 +116,28 @@ button {
|
|
|
116
116
|
color: var(--ref-palette-neutral100) !important; /* stylelint-disable-line declaration-no-important */
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
|
|
120
|
+
@media (forced-colors: active) {
|
|
121
|
+
button {
|
|
122
|
+
forced-color-adjust: none;
|
|
123
|
+
box-shadow: 0 0 0 var(--sys-size-1) ButtonText;
|
|
124
|
+
|
|
125
|
+
:host-context(:not(.theme-with-dark-background)) &,
|
|
126
|
+
:host-context(.theme-with-dark-background) &:not(:disabled) {
|
|
127
|
+
background-color: ButtonFace;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host-context(:not(.theme-with-dark-background)) &:not(:disabled) > devtools-icon,
|
|
131
|
+
:host-context(.theme-with-dark-background) &:not(:disabled) > devtools-icon {
|
|
132
|
+
color: ButtonText;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:focus-visible {
|
|
136
|
+
outline-color: ButtonText;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:disabled > devtools-icon {
|
|
140
|
+
color: GrayText;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -15,7 +15,7 @@ const exampleRenderHelper = (key: string, value: string) => html`
|
|
|
15
15
|
<devtools-report-value>${value}</devtools-report-value>
|
|
16
16
|
`;
|
|
17
17
|
|
|
18
|
-
export function render(container: HTMLElement) {
|
|
18
|
+
export function render(container: HTMLElement): void {
|
|
19
19
|
// clang-format off
|
|
20
20
|
Lit.render(
|
|
21
21
|
html`
|
|
@@ -14,7 +14,7 @@ export interface SpinnerProperties {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export class Spinner extends HTMLElement {
|
|
17
|
-
static readonly observedAttributes = ['active'];
|
|
17
|
+
static readonly observedAttributes = ['active'] as const;
|
|
18
18
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
19
19
|
|
|
20
20
|
constructor(props?: SpinnerProperties) {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
/* eslint-disable @devtools/enforce-custom-element-definitions-location */
|
|
5
5
|
|
|
6
6
|
import * as CodeHighlighter from '../../../ui/components/code_highlighter/code_highlighter.js';
|
|
7
|
-
import codeHighlighterStyles from '../../../ui/components/code_highlighter/codeHighlighter.css.js';
|
|
8
7
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
9
8
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
10
9
|
|
|
@@ -23,8 +22,7 @@ function assert<T>(
|
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
const {html,
|
|
27
|
-
const {customElement, property, state} = Decorators;
|
|
25
|
+
const {html, Directives} = Lit;
|
|
28
26
|
const {classMap} = Directives;
|
|
29
27
|
|
|
30
28
|
declare global {
|
|
@@ -42,7 +40,6 @@ const jsonPropertyOptions = {
|
|
|
42
40
|
attribute: false,
|
|
43
41
|
};
|
|
44
42
|
|
|
45
|
-
@customElement('devtools-editable-content')
|
|
46
43
|
class EditableContent extends HTMLElement {
|
|
47
44
|
static get observedAttributes(): string[] {
|
|
48
45
|
return ['disabled', 'placeholder'];
|
|
@@ -128,7 +125,7 @@ class SuggestionInitEvent extends Event {
|
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
|
|
131
|
-
type SuggestionFilter = (option: string, query: string) => boolean;
|
|
128
|
+
export type SuggestionFilter = (option: string, query: string) => boolean;
|
|
132
129
|
|
|
133
130
|
const defaultSuggestionFilter = (option: string, query: string): boolean =>
|
|
134
131
|
option.toLowerCase().startsWith(query.toLowerCase());
|
|
@@ -137,13 +134,19 @@ const defaultSuggestionFilter = (option: string, query: string): boolean =>
|
|
|
137
134
|
* @fires SuggestionInitEvent#suggestioninit
|
|
138
135
|
* @fires SuggestEvent#suggest
|
|
139
136
|
*/
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
class SuggestionBox extends Lit.LitElement {
|
|
138
|
+
static override properties: typeof Lit.LitElement.properties = {
|
|
139
|
+
options: jsonPropertyOptions,
|
|
140
|
+
expression: {type: String},
|
|
141
|
+
suggestionFilter: {attribute: false},
|
|
142
|
+
cursor: {state: true},
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare options: readonly string[];
|
|
146
|
+
declare expression: string;
|
|
147
|
+
declare suggestionFilter?: SuggestionFilter;
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
private declare cursor: number;
|
|
147
150
|
|
|
148
151
|
#suggestions: string[] = [];
|
|
149
152
|
|
|
@@ -230,30 +233,42 @@ class SuggestionBox extends LitElement {
|
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
235
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
...LitElement.shadowRootOptions,
|
|
236
|
+
export class SuggestionInput extends Lit.LitElement {
|
|
237
|
+
static override shadowRootOptions: ShadowRootInit = {
|
|
238
|
+
...Lit.LitElement.shadowRootOptions,
|
|
237
239
|
delegatesFocus: true,
|
|
238
|
-
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
static override properties: typeof Lit.LitElement.properties = {
|
|
243
|
+
options: jsonPropertyOptions,
|
|
244
|
+
autocomplete: {type: Boolean},
|
|
245
|
+
suggestionFilter: {attribute: false},
|
|
246
|
+
expression: {state: true},
|
|
247
|
+
placeholder: {type: String},
|
|
248
|
+
value: {type: String},
|
|
249
|
+
disabled: {type: Boolean},
|
|
250
|
+
strikethrough: {type: Boolean},
|
|
251
|
+
mimeType: {type: String},
|
|
252
|
+
jslogContext: {type: String},
|
|
253
|
+
};
|
|
239
254
|
|
|
240
255
|
/**
|
|
241
256
|
* State passed to devtools-suggestion-box.
|
|
242
257
|
*/
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
258
|
+
declare options: readonly string[];
|
|
259
|
+
declare autocomplete?: boolean;
|
|
260
|
+
declare suggestionFilter?: SuggestionFilter;
|
|
261
|
+
declare expression: string;
|
|
247
262
|
|
|
248
263
|
/**
|
|
249
264
|
* State passed to devtools-editable-content.
|
|
250
265
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
266
|
+
declare placeholder: string;
|
|
267
|
+
declare value: string;
|
|
268
|
+
declare disabled: boolean;
|
|
269
|
+
declare strikethrough: boolean;
|
|
270
|
+
declare mimeType: string;
|
|
271
|
+
declare jslogContext?: string;
|
|
257
272
|
|
|
258
273
|
constructor() {
|
|
259
274
|
super();
|
|
@@ -338,7 +353,7 @@ export class SuggestionInput extends LitElement {
|
|
|
338
353
|
protected override render(): Lit.TemplateResult {
|
|
339
354
|
// clang-format off
|
|
340
355
|
return html`<style>${contentEditableStyles}</style>
|
|
341
|
-
<style>${codeHighlighterStyles}</style>
|
|
356
|
+
<style>${CodeHighlighter.codeHighlighterStyles}</style>
|
|
342
357
|
<devtools-editable-content
|
|
343
358
|
?disabled=${this.disabled}
|
|
344
359
|
class=${classMap({
|
|
@@ -365,3 +380,7 @@ export class SuggestionInput extends LitElement {
|
|
|
365
380
|
// clang-format on
|
|
366
381
|
}
|
|
367
382
|
}
|
|
383
|
+
|
|
384
|
+
customElements.define('devtools-editable-content', EditableContent);
|
|
385
|
+
customElements.define('devtools-suggestion-box', SuggestionBox);
|
|
386
|
+
customElements.define('devtools-suggestion-input', SuggestionInput);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {Switch} from './switch.js';
|
|
6
6
|
|
|
7
|
-
export function render(container: HTMLElement) {
|
|
7
|
+
export function render(container: HTMLElement): void {
|
|
8
8
|
function switchExample({checked, disabled}: {checked: boolean, disabled: boolean}): HTMLElement {
|
|
9
9
|
const example = document.createElement('div');
|
|
10
10
|
example.style.marginTop = '20px';
|
|
@@ -33,14 +33,16 @@ export enum AiCodeCompletionTeaserMode {
|
|
|
33
33
|
ONLY_SHOW_ON_EMPTY = 'onlyShowOnEmpty',
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export const setAiCodeCompletionTeaserMode
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
export const setAiCodeCompletionTeaserMode: CodeMirror.StateEffectType<AiCodeCompletionTeaserMode> =
|
|
37
|
+
CodeMirror.StateEffect.define<AiCodeCompletionTeaserMode>();
|
|
38
|
+
|
|
39
|
+
export const aiCodeCompletionTeaserModeState: CodeMirror.StateField<AiCodeCompletionTeaserMode> =
|
|
40
|
+
CodeMirror.StateField.define<AiCodeCompletionTeaserMode>({
|
|
41
|
+
create: () => AiCodeCompletionTeaserMode.OFF,
|
|
42
|
+
update(value, tr) {
|
|
43
|
+
return tr.effects.find(effect => effect.is(setAiCodeCompletionTeaserMode))?.value ?? value;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
44
46
|
|
|
45
47
|
export interface AiCodeCompletionConfig {
|
|
46
48
|
completionContext: {
|
|
@@ -31,7 +31,8 @@ export enum AiCodeGenerationTeaserMode {
|
|
|
31
31
|
DISMISSED = 'dismissed',
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export const setAiCodeGenerationTeaserMode
|
|
34
|
+
export const setAiCodeGenerationTeaserMode: CodeMirror.StateEffectType<AiCodeGenerationTeaserMode> =
|
|
35
|
+
CodeMirror.StateEffect.define<AiCodeGenerationTeaserMode>();
|
|
35
36
|
|
|
36
37
|
const aiCodeGenerationTeaserModeState = CodeMirror.StateField.define<AiCodeGenerationTeaserMode>({
|
|
37
38
|
create: () => AiCodeGenerationTeaserMode.ACTIVE,
|
|
@@ -12,7 +12,7 @@ import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.nex
|
|
|
12
12
|
* view.dispatch({effects: setHighlightedPosition.of(position)});
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export const setHighlightedPosition = CodeMirror.StateEffect.define<number>();
|
|
15
|
+
export const setHighlightedPosition: CodeMirror.StateEffectType<number> = CodeMirror.StateEffect.define<number>();
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The CodeMirror effect used to clear the highlighted execution position.
|
|
@@ -22,7 +22,7 @@ export const setHighlightedPosition = CodeMirror.StateEffect.define<number>();
|
|
|
22
22
|
* view.dispatch({effects: clearHighlightedPosition.of()});
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
export const clearHighlightedPosition = CodeMirror.StateEffect.define<void>();
|
|
25
|
+
export const clearHighlightedPosition: CodeMirror.StateEffectType<void> = CodeMirror.StateEffect.define<void>();
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Constructs a CodeMirror extension that can be used to decorate the current execution
|
|
@@ -38,6 +38,20 @@ export class TextEditor extends HTMLElement {
|
|
|
38
38
|
};
|
|
39
39
|
#devtoolsResizeObserver = new ResizeObserver(this.#resizeListener);
|
|
40
40
|
|
|
41
|
+
static get observedAttributes(): string[] {
|
|
42
|
+
return ['data-file-path'];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
attributeChangedCallback(name: string, _oldValue: string|null, newValue: string|null): void {
|
|
46
|
+
if (name === 'data-file-path' && this.#activeEditor) {
|
|
47
|
+
if (newValue !== null) {
|
|
48
|
+
this.#activeEditor.dom.setAttribute('data-file-path', newValue);
|
|
49
|
+
} else {
|
|
50
|
+
this.#activeEditor.dom.removeAttribute('data-file-path');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
constructor(pendingState?: CodeMirror.EditorState) {
|
|
42
56
|
super();
|
|
43
57
|
this.#pendingState = pendingState;
|
|
@@ -59,6 +73,11 @@ export class TextEditor extends HTMLElement {
|
|
|
59
73
|
scrollTo: this.#lastScrollSnapshot,
|
|
60
74
|
});
|
|
61
75
|
|
|
76
|
+
const filePath = this.getAttribute('data-file-path');
|
|
77
|
+
if (filePath) {
|
|
78
|
+
this.#activeEditor.dom.setAttribute('data-file-path', filePath);
|
|
79
|
+
}
|
|
80
|
+
|
|
62
81
|
this.#activeEditor.scrollDOM.addEventListener('scroll', () => {
|
|
63
82
|
if (!this.#activeEditor) {
|
|
64
83
|
return;
|